@feedmepos/mf-menu 0.20.2 → 0.20.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.
Files changed (58) hide show
  1. package/dist/App-DGK08eRV.js +18860 -0
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Ds2qfY_X.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DY5ZAvXD.js} +10 -10
  3. package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-BRepaPR3.js → ApplyProducts.vue_vue_type_script_setup_true_lang-CTQXFXig.js} +2 -2
  4. package/dist/{Catalog-S5KDEWzG.js → Catalog-DDLkwHEl.js} +3 -3
  5. package/dist/{Category-DLaNEtA5.js → Category-Dvijo086.js} +6 -6
  6. package/dist/{CookingGuide-DSGZapxz.js → CookingGuide-CsE9_yha.js} +4 -4
  7. package/dist/{Group-CBMSkmwQ.js → Group-BIQU7w0g.js} +1 -1
  8. package/dist/{Group-B0VQ-64x.js → Group-CMMIHqaG.js} +6 -6
  9. package/dist/{Group.vue_vue_type_script_setup_true_lang-DKzrhXtM.js → Group.vue_vue_type_script_setup_true_lang-BTL9j3_B.js} +70 -70
  10. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BV-FC8tM.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-pogjGaYM.js} +23 -23
  11. package/dist/{Ingredient-CnPQ0kiR.js → Ingredient-m0hSAC1U.js} +16 -16
  12. package/dist/{LinkProductSideSheet-A26Otbdm.js → LinkProductSideSheet-DfZrxiHw.js} +30 -29
  13. package/dist/{PrintRoute-BlJMdPP0.js → PrintRoute-iSOdrR8L.js} +27 -27
  14. package/dist/{Product-BvD813LL.js → Product-LV9usgIQ.js} +1 -1
  15. package/dist/{Product.vue_vue_type_script_setup_true_lang-D_oKtXbh.js → Product.vue_vue_type_script_setup_true_lang-D2840VfX.js} +67 -67
  16. package/dist/{Products-B8Ok-bkN.js → Products-C3u76O52.js} +37 -37
  17. package/dist/{Publish-qBiJUQ4X.js → Publish-_OkfKSnM.js} +69 -69
  18. package/dist/{Recipe-CJxJJAUV.js → Recipe-CB_uktjY.js} +34 -34
  19. package/dist/{Scheduler-DfAMwXCu.js → Scheduler-DWIGrzZY.js} +2 -2
  20. package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-CArE_Hua.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-BcruguLb.js} +1 -1
  21. package/dist/ServingSequence-Cq1ZZlrm.js +4 -0
  22. package/dist/{Setting-BbgJcWsN.js → Setting-N_eRQUsY.js} +1 -1
  23. package/dist/{Setting.vue_vue_type_script_setup_true_lang-BbVEzNve.js → Setting.vue_vue_type_script_setup_true_lang-WQ6hWgnm.js} +13 -13
  24. package/dist/{Takeaway-CMDFYeUw.js → Takeaway-DiOnksOz.js} +1 -1
  25. package/dist/{Takeaway-wAXsZQN2.js → Takeaway-NrqUpXFx.js} +9 -9
  26. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DSphRs_i.js → Takeaway.vue_vue_type_script_setup_true_lang-CHAbaRBT.js} +9 -9
  27. package/dist/{TaxSetting-C1XOTv-9.js → TaxSetting-V0dnzYo3.js} +6 -6
  28. package/dist/{Unit-BW3iqgp8.js → Unit-DOsZE2qJ.js} +15 -15
  29. package/dist/{Variant-BJIxp9PJ.js → Variant-CYP1P6ns.js} +40 -40
  30. package/dist/{_id_-B25OxuPV.js → _id_-B6Hne1hp.js} +34 -34
  31. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  32. package/dist/app-D2FqvCaC.js +127479 -0
  33. package/dist/app.js +4 -4
  34. package/dist/assets/linked-status-B-90MiJw.js +24 -0
  35. package/dist/assets/validate-menu-C1LwcZzw.js +24 -0
  36. package/dist/{catalog-B-Z6lEFK.js → catalog-Bq6JWNgk.js} +1 -1
  37. package/dist/{catalog-Do7RfIKm.js → catalog-C8CFP-ny.js} +22549 -22547
  38. package/dist/{category-DEWEor3m.js → category-DJo3MbY6.js} +14 -14
  39. package/dist/{currency-33gUke3q.js → currency-Ccc8KrCJ.js} +1 -1
  40. package/dist/index-BS64cx1H.js +7392 -0
  41. package/dist/{index-BEdHzZvu.js → index-PJVryAUX.js} +14 -14
  42. package/dist/{item-BooojPpg.js → item-Dj35T3VU.js} +940 -938
  43. package/dist/{lodash-247YxYiQ.js → lodash-MHSu1pkA.js} +439 -439
  44. package/dist/{menu-DCnWrgH7.js → menu-CUXJ9cXY.js} +1 -1
  45. package/dist/{object-B2cP_UeG.js → object-BN9wCbKv.js} +19 -19
  46. package/dist/remy-BWBsUWuo.js +36 -0
  47. package/dist/{scheduler-0cChIv2I.js → scheduler-DZwOVztH.js} +4 -4
  48. package/dist/style.css +1 -1
  49. package/dist/{takeaway-mwqVQ1ij.js → takeaway-PjB5BC80.js} +17 -17
  50. package/dist/{toExcel-Dha8Vf3u.js → toExcel-D9nGg3_g.js} +237 -237
  51. package/dist/{unit-BgfdgXAu.js → unit-97ZKmnbi.js} +12 -12
  52. package/dist/{vuedraggable-BEszc36M.js → vuedraggable-WU01qJgi.js} +110 -110
  53. package/package.json +1 -1
  54. package/dist/ServingSequence-DxDMeto7.js +0 -4
  55. package/dist/app-BFJlAowN.js +0 -135983
  56. package/dist/assets/linked-status-4i88AmvK.js +0 -24
  57. package/dist/assets/validate-menu-CTKwgXfw.js +0 -24
  58. package/dist/index-BXl09ebx.js +0 -21908
@@ -1,32 +1,34 @@
1
- import { defineStore as Fn } from "pinia";
2
- import { b as L, h as be, G as di, H as mi, I as hi, d as ae, m as ye, c as _e, J as En, u as me, K as fn, L as pi, M as Te, N as lt, a as Ye, i as He, O as Ht, P as Ot, g as ut, n as fi, x as gi, Q as vi, y as bi, F as yi, l as _i, S as gn, T as wi } from "./app-BFJlAowN.js";
3
- import { useDialog as Ue, useSnackbar as Le, components as ke, useDialogChild as In, FmButtonVariant as Be, FmButtonColorThemeVariant as $e, useBreakpoints as Pn } from "@feedmepos/ui-library";
4
- import { C as Pe } from "./catalog-B-Z6lEFK.js";
5
- import { openBlock as F, createElementBlock as Z, createElementVNode as D, defineComponent as le, computed as T, resolveComponent as B, createVNode as C, unref as p, createBlock as G, renderSlot as he, withCtx as N, Fragment as Re, renderList as Ke, resolveDynamicComponent as yt, withDirectives as Xe, vShow as wt, mergeProps as Dn, withModifiers as St, createCommentVNode as ee, ref as q, createTextVNode as _t, toDisplayString as se, normalizeClass as Ee, onMounted as Qe, resolveDirective as Ut, h as ue, watch as Ce, Transition as Si, onBeforeUnmount as Ci, normalizeProps as Ri, guardReactiveProps as Ai, normalizeStyle as xi, nextTick as ki, getCurrentInstance as Mi, render as Oi } from "vue";
1
+ import { defineStore as zi } from "pinia";
2
+ import { f as L, k as be, I as dn, J as mn, K as hn, h as ae, m as ye, d as _e, L as Fi, u as me, M as pi, N as pn, b as Ye, l as He, O as Ht, P as Ot, j as lt, q as fn, B as gn, Q as vn, C as bn, F as yn, p as _n, S as fi, T as wn } from "./app-D2FqvCaC.js";
3
+ import { useDialog as Ue, useSnackbar as Le, components as ke, useDialogChild as Ei, FmButtonVariant as Be, FmButtonColorThemeVariant as $e, useBreakpoints as Ii } from "@feedmepos/ui-library";
4
+ import { C as Pe } from "./catalog-Bq6JWNgk.js";
5
+ import { openBlock as F, createElementBlock as Z, createElementVNode as D, defineComponent as le, computed as T, resolveComponent as B, createVNode as C, unref as p, createBlock as G, renderSlot as he, withCtx as N, Fragment as Re, renderList as Ke, resolveDynamicComponent as yt, withDirectives as Xe, vShow as wt, mergeProps as Pi, withModifiers as St, createCommentVNode as ee, ref as q, createTextVNode as _t, toDisplayString as se, normalizeClass as Ee, onMounted as Qe, resolveDirective as Ut, h as ue, watch as Ce, Transition as Sn, onBeforeUnmount as Cn, normalizeProps as Rn, guardReactiveProps as An, normalizeStyle as xn, nextTick as kn, getCurrentInstance as Mn, render as On } from "vue";
6
6
  import { useI18n as ce, useCoreStore as Xt } from "@feedmepos/mf-common";
7
- import { u as zi } from "./category-DEWEor3m.js";
8
- import { a as Tn, _ as vn } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
9
- import { _ as Ge, a as Fi } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
7
+ import { u as zn } from "./category-DJo3MbY6.js";
8
+ import { R as Te } from "./remy-BWBsUWuo.js";
9
+ import { a as Di, _ as gi } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
10
+ import { _ as Ge, a as Fn } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
11
+ import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
12
  import { _ as et } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
11
- import { f as rt } from "./currency-33gUke3q.js";
12
- import { _ as Je, T as Ei, l as $t } from "./takeaway-mwqVQ1ij.js";
13
- import { d as Un } from "./vuedraggable-BEszc36M.js";
14
- import { l as Ne, u as Ii } from "./lodash-247YxYiQ.js";
13
+ import { f as rt } from "./currency-Ccc8KrCJ.js";
14
+ import { _ as Je, T as En, l as $t } from "./takeaway-PjB5BC80.js";
15
+ import { V as Ti } from "./vuedraggable-WU01qJgi.js";
16
+ import { l as Ne, u as In } from "./lodash-MHSu1pkA.js";
15
17
  import "vue-router";
16
- import { V as bn } from "./index-BEdHzZvu.js";
17
- import { s as Vt, F as Pi } from "./object-B2cP_UeG.js";
18
- import { L as Di } from "./LinkProductSideSheet-A26Otbdm.js";
19
- import { useInventoryStore as $n, InventoryBindingForm as Ti, InventoryBindingSummary as Ui } from "@feedmepos/mf-inventory-portal";
20
- import { c as $i } from "./string-DpfFixWH.js";
21
- import { _ as Vi } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Ds2qfY_X.js";
22
- const Ni = {
18
+ import { V as vi } from "./index-PJVryAUX.js";
19
+ import { s as Vt, F as Pn } from "./object-BN9wCbKv.js";
20
+ import { L as Dn } from "./LinkProductSideSheet-DfZrxiHw.js";
21
+ import { useInventoryStore as Ui, InventoryBindingForm as Tn, InventoryBindingSummary as Un } from "@feedmepos/mf-inventory-portal";
22
+ import { c as $n } from "./string-DpfFixWH.js";
23
+ import { _ as Vn } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DY5ZAvXD.js";
24
+ const Nn = {
23
25
  xmlns: "http://www.w3.org/2000/svg",
24
26
  width: "24",
25
27
  height: "24",
26
28
  fill: "none"
27
29
  };
28
- function Li(e, n) {
29
- return F(), Z("svg", Ni, n[0] || (n[0] = [
30
+ function Ln(e, i) {
31
+ return F(), Z("svg", Nn, i[0] || (i[0] = [
30
32
  D("g", {
31
33
  stroke: "#1C1C1E",
32
34
  "stroke-linecap": "round",
@@ -37,14 +39,14 @@ function Li(e, n) {
37
39
  ], -1)
38
40
  ]));
39
41
  }
40
- const Bi = { render: Li }, Ki = {
42
+ const Bn = { render: Ln }, Kn = {
41
43
  xmlns: "http://www.w3.org/2000/svg",
42
44
  width: "24",
43
45
  height: "24",
44
46
  fill: "none"
45
47
  };
46
- function Gi(e, n) {
47
- return F(), Z("svg", Ki, n[0] || (n[0] = [
48
+ function Gn(e, i) {
49
+ return F(), Z("svg", Kn, i[0] || (i[0] = [
48
50
  D("path", {
49
51
  fill: "#1C1C1E",
50
52
  d: "M7.6 7.6c.57-.658.9-2.1.9-2.1s.314 1.374.857 2c.572.66 2.143 1 2.143 1s-1.57.198-2.143.857C8.814 9.984 8.5 11.5 8.5 11.5s-.18-1.311-.75-1.91C7.149 8.962 5.5 8.5 5.5 8.5s1.5-.207 2.1-.9M12.2 12.2C13.342 10.885 14 8 14 8s.627 2.747 1.714 4C16.86 13.32 20 14 20 14s-3.141.395-4.286 1.714C14.627 16.967 14 20 14 20s-.358-2.622-1.5-3.818C11.298 14.922 8 14 8 14s2.998-.415 4.2-1.8"
@@ -58,20 +60,20 @@ function Gi(e, n) {
58
60
  }, null, -1)
59
61
  ]));
60
62
  }
61
- const Wi = { render: Gi };
63
+ const Wn = { render: Gn };
62
64
  class vt {
63
- constructor(n, t, i, a) {
64
- this.scheduler = n, this.menuStore = t, this.updateMenu = i, this.dialog = a;
65
+ constructor(i, t, n, a) {
66
+ this.scheduler = i, this.menuStore = t, this.updateMenu = n, this.dialog = a;
65
67
  }
66
68
  async create() {
67
- this.promptDialog().onPrimary(async (n) => {
69
+ this.promptDialog().onPrimary(async (i) => {
68
70
  await this.updateMenu(
69
71
  {
70
72
  module: L.F_MENU_MODULE_V4_KEY.enum.scheduler,
71
73
  operation: be.F_OPERATION_TYPE.create,
72
- data: n
74
+ data: i
73
75
  },
74
- n.name
76
+ i.name
75
77
  );
76
78
  });
77
79
  }
@@ -89,10 +91,10 @@ class vt {
89
91
  );
90
92
  }
91
93
  delete() {
92
- const n = this.scheduler;
93
- n && this.dialog.open({
94
+ const i = this.scheduler;
95
+ i && this.dialog.open({
94
96
  title: "Remove scheduler",
95
- message: `Are you sure to remove ${n.name}?`,
97
+ message: `Are you sure to remove ${i.name}?`,
96
98
  primaryActions: {
97
99
  text: "Remove",
98
100
  close: !0
@@ -106,24 +108,24 @@ class vt {
106
108
  {
107
109
  module: L.F_MENU_MODULE_V4_KEY.enum.scheduler,
108
110
  operation: be.F_OPERATION_TYPE.delete,
109
- data: n._id
111
+ data: i._id
110
112
  },
111
- n.name,
113
+ i.name,
112
114
  !0
113
115
  );
114
116
  });
115
117
  }
116
- getSchedulerGroup(n) {
117
- return this.scheduler ? this.scheduler.groups.find((t) => t._id === n) ?? {
118
- _id: n,
118
+ getSchedulerGroup(i) {
119
+ return this.scheduler ? this.scheduler.groups.find((t) => t._id === i) ?? {
120
+ _id: i,
119
121
  groupKey: ""
120
122
  } : null;
121
123
  }
122
- overrideSchedulerGroups(n) {
124
+ overrideSchedulerGroups(i) {
123
125
  if (!this.scheduler) return null;
124
- const t = this.scheduler.groups, i = n.map((o) => o._id), a = [
125
- ...t.filter((o) => !i.includes(o._id)),
126
- ...n.map((o) => ({
126
+ const t = this.scheduler.groups, n = i.map((o) => o._id), a = [
127
+ ...t.filter((o) => !n.includes(o._id)),
128
+ ...i.map((o) => ({
127
129
  _id: o._id,
128
130
  groupKey: "",
129
131
  items: o.items
@@ -132,14 +134,14 @@ class vt {
132
134
  this.scheduler = { ...this.scheduler, groups: a };
133
135
  }
134
136
  injectSchedulerToMenu() {
135
- const n = this.scheduler;
136
- if (!n) return null;
137
- const t = this.menuStore.state.menu, i = t.modules.scheduler.map((a) => a._id === n._id ? n : a);
137
+ const i = this.scheduler;
138
+ if (!i) return null;
139
+ const t = this.menuStore.state.menu, n = t.modules.scheduler.map((a) => a._id === i._id ? i : a);
138
140
  return {
139
141
  ...t,
140
142
  modules: {
141
143
  ...t.modules,
142
- scheduler: i
144
+ scheduler: n
143
145
  }
144
146
  };
145
147
  }
@@ -161,31 +163,31 @@ class vt {
161
163
  text: "Cancel",
162
164
  close: !0
163
165
  }
164
- }).onPrimary(async (i) => {
165
- this.updateItemAvailable(i.map((a) => a._id));
166
+ }).onPrimary(async (n) => {
167
+ this.updateItemAvailable(n.map((a) => a._id));
166
168
  });
167
169
  }
168
- async unlinkProduct(n) {
170
+ async unlinkProduct(i) {
169
171
  if (!this.scheduler) return;
170
- const i = this.getItemAvailable();
171
- if (!i) return;
172
- const a = i.filter((o) => !n.includes(o));
172
+ const n = this.getItemAvailable();
173
+ if (!n) return;
174
+ const a = n.filter((o) => !i.includes(o));
173
175
  this.updateItemAvailable(a);
174
176
  }
175
177
  async updateScheduler() {
176
- const n = this.scheduler;
177
- n && this.promptDialog(n).onPrimary(async (t) => {
178
- const i = {
178
+ const i = this.scheduler;
179
+ i && this.promptDialog(i).onPrimary(async (t) => {
180
+ const n = {
179
181
  ...t,
180
- items: n.items
182
+ items: i.items
181
183
  };
182
- this.scheduler = i, this.updateItemAvailable(t.items.map((a) => a._id));
184
+ this.scheduler = n, this.updateItemAvailable(t.items.map((a) => a._id));
183
185
  });
184
186
  }
185
- async overrideScheduler(n) {
187
+ async overrideScheduler(i) {
186
188
  const t = this.scheduler;
187
189
  if (!t) return;
188
- const i = this.menuStore.catalogs.find((l) => l._id === n), a = new Pe(i, this.menuStore, this.updateMenu, this.dialog), o = a.getCatalogScheduler(t._id);
190
+ const n = this.menuStore.catalogs.find((l) => l._id === i), a = new Pe(n, this.menuStore, this.updateMenu, this.dialog), o = a.getCatalogScheduler(t._id);
189
191
  if (!o) return;
190
192
  const r = this.menuStore.state.menu.modules.scheduler.find(
191
193
  (l) => l._id === t._id
@@ -193,12 +195,12 @@ class vt {
193
195
  this.promptDialog(
194
196
  o,
195
197
  r,
196
- i == null ? void 0 : i.name
198
+ n == null ? void 0 : n.name
197
199
  ).onPrimary(async (l) => {
198
200
  a.overrideCatalogScheduler(l), await a.update();
199
201
  });
200
202
  }
201
- promptDialog(n, t, i) {
203
+ promptDialog(i, t, n) {
202
204
  return this.menuStore.rules.item.multiScheduler, this.dialog.open({
203
205
  // component: SchedulerDialog,
204
206
  // componentProps: {
@@ -220,30 +222,30 @@ class vt {
220
222
  });
221
223
  }
222
224
  getItemAvailable() {
223
- var i;
225
+ var n;
224
226
  if (!this.scheduler) return null;
225
- const n = this.menuStore.currentCatalog, t = n ? ((i = n.override.scheduler[this.scheduler._id]) == null ? void 0 : i.items) ?? [] : this.scheduler.items;
227
+ const i = this.menuStore.currentCatalog, t = i ? ((n = i.override.scheduler[this.scheduler._id]) == null ? void 0 : n.items) ?? [] : this.scheduler.items;
226
228
  return [
227
229
  ...new Set(t.filter((a) => a.orderFrom != L.F_ORDER_FROM.enum.NONE).map((a) => a._id))
228
230
  ];
229
231
  }
230
- async updateItemAvailable(n) {
232
+ async updateItemAvailable(i) {
231
233
  const t = this.scheduler;
232
234
  if (!t) return;
233
- const i = this.menuStore.currentCatalog;
234
- if (i && this.menuStore.rules.scheduler.override) {
235
+ const n = this.menuStore.currentCatalog;
236
+ if (n && this.menuStore.rules.scheduler.override) {
235
237
  const a = new Pe(
236
- i,
238
+ n,
237
239
  this.menuStore,
238
240
  this.updateMenu,
239
241
  this.dialog
240
242
  );
241
- a.overrideCatalogSchedulerItems(n, t._id), await a.update();
243
+ a.overrideCatalogSchedulerItems(i, t._id), await a.update();
242
244
  } else {
243
- const a = n.reduce((r, l) => {
245
+ const a = i.reduce((r, l) => {
244
246
  const s = t.items.filter((u) => u._id == l) ?? [];
245
247
  return r = r.concat(
246
- di(l, s, (u) => ({
248
+ dn(l, s, (u) => ({
247
249
  ...u,
248
250
  orderFrom: null
249
251
  }))
@@ -256,30 +258,30 @@ class vt {
256
258
  }
257
259
  }
258
260
  getAvailableItemForLink() {
259
- const n = mi(
261
+ const i = mn(
260
262
  this.menuStore.variants,
261
263
  this.menuStore.categories,
262
- hi(this.menuStore.state.menu.modules.item, (a) => a.code || a.name)
264
+ hn(this.menuStore.state.menu.modules.item, (a) => a.code || a.name)
263
265
  ), t = new Set(
264
266
  this.menuStore.currentCatalog ? Pe.getItemAvailable(this.menuStore.currentCatalog) : this.menuStore.state.menu.modules.item.map((a) => a._id)
265
267
  );
266
- return n.map((a) => ({
268
+ return i.map((a) => ({
267
269
  ...a,
268
270
  items: a.items.filter((o) => t.has(o._id))
269
271
  })).filter((a) => a.items.length > 0);
270
272
  }
271
273
  }
272
- function Ct(e, n) {
273
- for (const t of n) {
274
- const i = e.find((a) => a._id === t._id);
275
- if (i != null && i.isDynamicAddon || t.isDynamicAddon) return L.F_ADDON_GROUP_TYPE.enum.DYNAMIC;
276
- if (i != null && i.category) return L.F_ADDON_GROUP_TYPE.enum.PRODUCT;
274
+ function Ct(e, i) {
275
+ for (const t of i) {
276
+ const n = e.find((a) => a._id === t._id);
277
+ if (n != null && n.isDynamicAddon || t.isDynamicAddon) return L.F_ADDON_GROUP_TYPE.enum.DYNAMIC;
278
+ if (n != null && n.category) return L.F_ADDON_GROUP_TYPE.enum.PRODUCT;
277
279
  }
278
280
  return L.F_ADDON_GROUP_TYPE.enum.NORMAL;
279
281
  }
280
- function ji(e) {
281
- return [...new Set(e.map((t) => t._id))].reduce((t, i) => {
282
- const a = e.filter((l) => l._id === i), { base: o, variants: r } = a.reduce(
282
+ function jn(e) {
283
+ return [...new Set(e.map((t) => t._id))].reduce((t, n) => {
284
+ const a = e.filter((l) => l._id === n), { base: o, variants: r } = a.reduce(
283
285
  (l, s) => {
284
286
  if (!s.combinationKey)
285
287
  l.base = s;
@@ -294,8 +296,8 @@ function ji(e) {
294
296
  variants: []
295
297
  }
296
298
  );
297
- return t[i] = {
298
- _id: i,
299
+ return t[n] = {
300
+ _id: n,
299
301
  code: o.code,
300
302
  name: o.name,
301
303
  price: o.price,
@@ -311,22 +313,22 @@ function ji(e) {
311
313
  }, {});
312
314
  }
313
315
  function qt(e) {
314
- const n = Object.values(e.items).reduce((t, i) => (t.push({
315
- _id: i._id,
316
- name: i.name,
317
- price: i.price,
318
- orderFrom: i.orderFrom,
319
- selection: i.selection,
320
- inventoryBindings: i.inventoryBindings,
321
- isDynamicAddon: i.isDynamicAddon
322
- }), t = t.concat((i == null ? void 0 : i.items) || []), t), []);
316
+ const i = Object.values(e.items).reduce((t, n) => (t.push({
317
+ _id: n._id,
318
+ name: n.name,
319
+ price: n.price,
320
+ orderFrom: n.orderFrom,
321
+ selection: n.selection,
322
+ inventoryBindings: n.inventoryBindings,
323
+ isDynamicAddon: n.isDynamicAddon
324
+ }), t = t.concat((n == null ? void 0 : n.items) || []), t), []);
323
325
  return {
324
326
  ...e,
325
- items: n
327
+ items: i
326
328
  };
327
329
  }
328
- function Vn(e) {
329
- const n = qt(e), t = (o) => ["product", "item", "addonGroup", "group"].some((r) => o._id.startsWith(r)), i = n.items.filter((o) => t(o)), a = n.items.filter((o) => !t(o)).map((o) => ({
330
+ function $i(e) {
331
+ const i = qt(e), t = (o) => ["product", "item", "addonGroup", "group"].some((r) => o._id.startsWith(r)), n = i.items.filter((o) => t(o)), a = i.items.filter((o) => !t(o)).map((o) => ({
330
332
  ...ye.generator.initMenuV4Item(),
331
333
  ...o,
332
334
  code: o.code ?? "",
@@ -338,35 +340,35 @@ function Vn(e) {
338
340
  }));
339
341
  return {
340
342
  group: {
341
- ...n,
342
- items: i
343
+ ...i,
344
+ items: n
343
345
  },
344
346
  linkItems: a
345
347
  };
346
348
  }
347
- class Nn {
348
- constructor(n, t, i) {
349
- this.menuStore = n, this.updateMenu = t, this.dialog = i;
349
+ class Vi {
350
+ constructor(i, t, n) {
351
+ this.menuStore = i, this.updateMenu = t, this.dialog = n;
350
352
  }
351
- getFallbackPrices(n) {
352
- const t = this.menuStore.currentCatalog, i = this.menuStore.currentScheduler, a = new Pe(t, this.menuStore, this.updateMenu, this.dialog), o = new vt(
353
- i,
353
+ getFallbackPrices(i) {
354
+ const t = this.menuStore.currentCatalog, n = this.menuStore.currentScheduler, a = new Pe(t, this.menuStore, this.updateMenu, this.dialog), o = new vt(
355
+ n,
354
356
  this.menuStore,
355
357
  this.updateMenu,
356
358
  this.dialog
357
359
  );
358
360
  let r = ae(this.menuStore.state.menu);
359
361
  if (t)
360
- i ? a.overrideCatalogSchedulerGroups(n, i._id) : a.overrideCatalogGroups(n), r = a.injectCatalogToMenu();
361
- else if (i)
362
- o.overrideSchedulerGroups(n), r = o.injectSchedulerToMenu();
362
+ n ? a.overrideCatalogSchedulerGroups(i, n._id) : a.overrideCatalogGroups(i), r = a.injectCatalogToMenu();
363
+ else if (n)
364
+ o.overrideSchedulerGroups(i), r = o.injectSchedulerToMenu();
363
365
  else {
364
366
  r = {
365
367
  ...r,
366
368
  modules: {
367
369
  ...r.modules,
368
370
  group: r == null ? void 0 : r.modules.group.reduce((s, u) => {
369
- const d = n.find((m) => m._id === u._id);
371
+ const d = i.find((m) => m._id === u._id);
370
372
  if (!d)
371
373
  return s = [...s, u], s;
372
374
  const h = d.items.filter(
@@ -384,8 +386,8 @@ class Nn {
384
386
  }, [])
385
387
  }
386
388
  };
387
- for (let s = 0; s < n.length; s++) {
388
- const u = n[s];
389
+ for (let s = 0; s < i.length; s++) {
390
+ const u = i[s];
389
391
  !(r == null ? void 0 : r.modules.group.find((h) => {
390
392
  h._id, u._id;
391
393
  })) && !u._id && r.modules.group.push(u);
@@ -393,13 +395,13 @@ class Nn {
393
395
  }
394
396
  return r ? ye.getFallbackPrices({
395
397
  catalogId: t == null ? void 0 : t._id,
396
- schedulerId: i == null ? void 0 : i._id,
398
+ schedulerId: n == null ? void 0 : n._id,
397
399
  rawMenu: r,
398
- groups: n.reduce((s, u) => (s[u._id] = { ...u, groupKey: "" }, s), {})
400
+ groups: i.reduce((s, u) => (s[u._id] = { ...u, groupKey: "" }, s), {})
399
401
  }).groups : {};
400
402
  }
401
- mapGroups(n, t) {
402
- const i = this.getFallbackPrices(n), a = this.menuStore.state.menu.modules.item, o = this.menuStore.state.menu.modules.group, r = this.menuStore.items;
403
+ mapGroups(i, t) {
404
+ const n = this.getFallbackPrices(i), a = this.menuStore.state.menu.modules.item, o = this.menuStore.state.menu.modules.group, r = this.menuStore.items;
403
405
  function l(s, u) {
404
406
  const d = s.items.reduce((m, c) => {
405
407
  var E, P, A, _;
@@ -409,7 +411,7 @@ class Nn {
409
411
  ...(E = y == null ? void 0 : y.variant) == null ? void 0 : E.variantCombinations.find(
410
412
  (R) => R.combinationKey === c.combinationKey
411
413
  ),
412
- name: En(me().variants, ((P = y == null ? void 0 : y.variant) == null ? void 0 : P.variantGroupIds) || [])[c.combinationKey]
414
+ name: Fi(me().variants, ((P = y == null ? void 0 : y.variant) == null ? void 0 : P.variantGroupIds) || [])[c.combinationKey]
413
415
  } : y, g = (A = o.find((R) => R._id === s._id)) == null ? void 0 : A.items.find((R) => R._id === c._id && R.combinationKey === c.combinationKey), w = !t && !c.combinationKey, z = (_ = u.find(
414
416
  (R) => R._id == c._id && R.combinationKey == c.combinationKey
415
417
  )) == null ? void 0 : _.price, O = c.name ?? (g == null ? void 0 : g.name) ?? (v == null ? void 0 : v.name) ?? "", I = {
@@ -427,35 +429,35 @@ class Nn {
427
429
  return {
428
430
  ...s,
429
431
  type: h,
430
- items: ji(d),
432
+ items: jn(d),
431
433
  itemsLinked: r.filter((m) => m.groups.some(({ _id: c }) => c === s._id)).map((m) => m._id)
432
434
  };
433
435
  }
434
- return n.map((s) => {
436
+ return i.map((s) => {
435
437
  var u;
436
- return l(s, ((u = i[s._id]) == null ? void 0 : u.items) ?? []);
438
+ return l(s, ((u = n[s._id]) == null ? void 0 : u.items) ?? []);
437
439
  });
438
440
  }
439
- async sortGroups(n) {
441
+ async sortGroups(i) {
440
442
  const t = {
441
443
  module: L.F_MENU_MODULE_V4_KEY.enum.group,
442
444
  operation: be.F_OPERATION_TYPE.rearrange,
443
- data: n.map((i) => i._id)
445
+ data: i.map((n) => n._id)
444
446
  };
445
447
  await this.updateMenu(t, "Groups");
446
448
  }
447
- async duplicateGroup(n) {
448
- const t = ae(n);
449
- n.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT || (t.items = Object.entries(t.items).reduce((r, [l, s]) => (r[l] = {
449
+ async duplicateGroup(i) {
450
+ const t = ae(i);
451
+ i.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT || (t.items = Object.entries(t.items).reduce((r, [l, s]) => (r[l] = {
450
452
  ...s,
451
453
  items: (s.items ?? []).map((u) => ({ ...u, _id: "" }))
452
454
  }, r), {}));
453
- const a = Vn(t), o = {
455
+ const a = $i(t), o = {
454
456
  module: L.F_MENU_MODULE_V4_KEY.enum.group,
455
457
  operation: be.F_OPERATION_TYPE.create,
456
458
  data: {
457
459
  ...a.group,
458
- name: `${n.name} clone`
460
+ name: `${i.name} clone`
459
461
  },
460
462
  link: [
461
463
  {
@@ -467,26 +469,26 @@ class Nn {
467
469
  };
468
470
  await this.updateMenu(o, a.group.name);
469
471
  }
470
- async deleteGroup(n) {
472
+ async deleteGroup(i) {
471
473
  const t = {
472
474
  module: L.F_MENU_MODULE_V4_KEY.enum.group,
473
475
  operation: be.F_OPERATION_TYPE.delete,
474
- data: n._id
476
+ data: i._id
475
477
  };
476
- await this.updateMenu(t, n.name);
478
+ await this.updateMenu(t, i.name);
477
479
  }
478
- async applyItems(n, t) {
479
- function i(s, u) {
480
- const d = s.filter((m) => m._id === n._id), h = s.filter((m) => m._id !== n._id);
481
- return u ? h : [...h, ...d.length ? d : [{ _id: n._id, groupKey: "" }]];
480
+ async applyItems(i, t) {
481
+ function n(s, u) {
482
+ const d = s.filter((m) => m._id === i._id), h = s.filter((m) => m._id !== i._id);
483
+ return u ? h : [...h, ...d.length ? d : [{ _id: i._id, groupKey: "" }]];
482
484
  }
483
485
  function a(s, u, d) {
484
486
  var c;
485
- const h = i(u.groups, d), m = (((c = u.variant) == null ? void 0 : c.variantCombinations) ?? []).map((y) => {
486
- const v = i(y.groups ?? [], d);
487
+ const h = n(u.groups, d), m = (((c = u.variant) == null ? void 0 : c.variantCombinations) ?? []).map((y) => {
488
+ const v = n(y.groups ?? [], d);
487
489
  return { ...y, groups: v };
488
490
  });
489
- return ui(s, {
491
+ return un(s, {
490
492
  ...u,
491
493
  groups: h,
492
494
  variant: u.variant ? {
@@ -495,7 +497,7 @@ class Nn {
495
497
  } : null
496
498
  });
497
499
  }
498
- const o = n.itemsLinked, l = [.../* @__PURE__ */ new Set([...t, ...o])].map((s) => {
500
+ const o = i.itemsLinked, l = [.../* @__PURE__ */ new Set([...t, ...o])].map((s) => {
499
501
  const u = this.menuStore.state.menu.modules.item.find(
500
502
  (d) => d._id === s
501
503
  );
@@ -506,20 +508,20 @@ class Nn {
506
508
  data: a(this.menuStore, u, !t.includes(s))
507
509
  };
508
510
  });
509
- await this.updateMenu(l, n.name);
511
+ await this.updateMenu(l, i.name);
510
512
  }
511
513
  isOverride() {
512
514
  return !!this.menuStore.state.currentCatalogId || !!this.menuStore.state.currentSchedulerId;
513
515
  }
514
516
  }
515
- const Yi = "/assets/linked-status-4i88AmvK.js";
516
- function Hi(e) {
517
- var i;
518
- const n = ae(e), t = (i = n.variant) == null ? void 0 : i.variantCombinations;
519
- return delete n.variant, delete n.thumbnail, [n, ...t || []];
517
+ const Yn = "/assets/linked-status-B-90MiJw.js";
518
+ function Hn(e) {
519
+ var n;
520
+ const i = ae(e), t = (n = i.variant) == null ? void 0 : n.variantCombinations;
521
+ return delete i.variant, delete i.thumbnail, [i, ...t || []];
520
522
  }
521
- function Xi(e, n, t, i) {
522
- const a = ae(n), o = t ? a.modules.catalog.find((m) => m._id === t) : null, r = i ? a.modules.scheduler.find((m) => m._id === i) : null, l = o ? ae(o) : void 0, s = t ? a.modules.catalog.filter((m) => m._id !== t) : [], u = r ? ae(r) : void 0, d = e.reduce((m, c) => (m[c._id] = Hi(c), m), {});
523
+ function Xn(e, i, t, n) {
524
+ const a = ae(i), o = t ? a.modules.catalog.find((m) => m._id === t) : null, r = n ? a.modules.scheduler.find((m) => m._id === n) : null, l = o ? ae(o) : void 0, s = t ? a.modules.catalog.filter((m) => m._id !== t) : [], u = r ? ae(r) : void 0, d = e.reduce((m, c) => (m[c._id] = Hn(c), m), {});
523
525
  function h(m = []) {
524
526
  const c = e.map((y) => y._id);
525
527
  return [
@@ -527,11 +529,11 @@ function Xi(e, n, t, i) {
527
529
  ...Object.values(d).flatMap((y) => y)
528
530
  ];
529
531
  }
530
- return l && i ? (l.override.scheduler = {
532
+ return l && n ? (l.override.scheduler = {
531
533
  ...l.override.scheduler,
532
- [i]: {
533
- ...l.override.scheduler[i],
534
- _id: i,
534
+ [n]: {
535
+ ...l.override.scheduler[n],
536
+ _id: n,
535
537
  items: h(u == null ? void 0 : u.items).map((m) => ({
536
538
  ...m,
537
539
  orderFrom: L.F_ORDER_FROM.enum.ALL
@@ -541,12 +543,12 @@ function Xi(e, n, t, i) {
541
543
  ...l.override.items,
542
544
  ...d
543
545
  }, a.modules.catalog = [...s, l], a) : u ? (u.items = h(u.items), a.modules.scheduler = [
544
- ...a.modules.scheduler.filter((m) => m._id !== i),
546
+ ...a.modules.scheduler.filter((m) => m._id !== n),
545
547
  u
546
548
  ], a) : {
547
- ...fn(),
549
+ ...pi(),
548
550
  modules: {
549
- ...fn().modules,
551
+ ...pi().modules,
550
552
  catalog: a.modules.catalog,
551
553
  item: a.modules.item,
552
554
  group: a.modules.group,
@@ -555,13 +557,13 @@ function Xi(e, n, t, i) {
555
557
  _id: a._id
556
558
  };
557
559
  }
558
- function ot(e, n, t) {
560
+ function ot(e, i, t) {
559
561
  var o;
560
562
  if (t >= 3) return e;
561
- const i = n.modules.item.find((r) => r._id === e._id);
562
- if (!i)
563
+ const n = i.modules.item.find((r) => r._id === e._id);
564
+ if (!n)
563
565
  throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
564
- const a = (o = i.groups) == null ? void 0 : o.map((r) => {
566
+ const a = (o = n.groups) == null ? void 0 : o.map((r) => {
565
567
  var u, d, h;
566
568
  const l = (u = e == null ? void 0 : e.groups) == null ? void 0 : u.find((m) => m._id === r._id);
567
569
  let s;
@@ -570,54 +572,54 @@ function ot(e, n, t) {
570
572
  const c = (y = l.items) == null ? void 0 : y.find(
571
573
  (v) => v._id === m._id && v.combinationKey === m.combinationKey
572
574
  );
573
- return ot(c || m, n, t + 1);
574
- })) ?? [] : s = ((h = r.items) == null ? void 0 : h.map((m) => ot(m, n, t + 1))) ?? [], {
575
+ return ot(c || m, i, t + 1);
576
+ })) ?? [] : s = ((h = r.items) == null ? void 0 : h.map((m) => ot(m, i, t + 1))) ?? [], {
575
577
  ...r,
576
578
  items: s
577
579
  };
578
580
  });
579
581
  return {
580
- _id: i._id,
581
- name: e.name || i.name,
582
- code: e.code || i.code,
582
+ _id: n._id,
583
+ name: e.name || n.name,
584
+ code: e.code || n.code,
583
585
  combinationKey: e.combinationKey,
584
586
  groups: a
585
587
  };
586
588
  }
587
- function qi(e, n) {
589
+ function qn(e, i) {
588
590
  const t = e.groups.map((o) => {
589
- const r = n.modules.group.find((s) => s._id === o._id), l = ((r == null ? void 0 : r.items) || []).map((s) => {
591
+ const r = i.modules.group.find((s) => s._id === o._id), l = ((r == null ? void 0 : r.items) || []).map((s) => {
590
592
  var h;
591
593
  const u = (h = o.items) == null ? void 0 : h.find(
592
594
  (m) => m._id === s._id && m.combinationKey === s.combinationKey
593
595
  );
594
596
  if (u)
595
- return ot(u, n, 1);
597
+ return ot(u, i, 1);
596
598
  const d = {
597
599
  ...ye.generator.initMenuV4ItemOverrider(),
598
600
  _id: s._id,
599
601
  combinationKey: s.combinationKey
600
602
  };
601
- return ot(d, n, 1);
603
+ return ot(d, i, 1);
602
604
  });
603
605
  return { ...o, items: l };
604
- }), i = e.variant ? e.variant.variantCombinations.map((o) => ot(o, n, 1)) : [], a = {
606
+ }), n = e.variant ? e.variant.variantCombinations.map((o) => ot(o, i, 1)) : [], a = {
605
607
  ...ye.generator.initMenuV4ItemOverrider(),
606
608
  _id: e._id,
607
609
  name: e.name,
608
610
  code: e.code,
609
611
  groups: t
610
612
  };
611
- return [...i, a];
613
+ return [...n, a];
612
614
  }
613
- function Nt(e, n) {
614
- var i;
615
- if (!n)
615
+ function Nt(e, i) {
616
+ var n;
617
+ if (!i)
616
618
  return e;
617
- const t = { ...e, code: n.code };
618
- return t.groups = (i = t.groups) == null ? void 0 : i.map((a) => {
619
+ const t = { ...e, code: i.code };
620
+ return t.groups = (n = t.groups) == null ? void 0 : n.map((a) => {
619
621
  var r, l;
620
- const o = (r = n.groups) == null ? void 0 : r.find((s) => s._id === a._id);
622
+ const o = (r = i.groups) == null ? void 0 : r.find((s) => s._id === a._id);
621
623
  return a.items = (l = a.items) == null ? void 0 : l.map((s) => {
622
624
  var d;
623
625
  const u = (d = o == null ? void 0 : o.items) == null ? void 0 : d.find(
@@ -627,11 +629,11 @@ function Nt(e, n) {
627
629
  }), a;
628
630
  }), t;
629
631
  }
630
- function Zi(e, n) {
631
- const t = e.items[n._id];
632
- n.variant && (n.variant = {
633
- ...n.variant,
634
- variantCombinations: n.variant.variantCombinations.map((a) => {
632
+ function Zn(e, i) {
633
+ const t = e.items[i._id];
634
+ i.variant && (i.variant = {
635
+ ...i.variant,
636
+ variantCombinations: i.variant.variantCombinations.map((a) => {
635
637
  const o = t.find(
636
638
  (r) => r._id === a._id && r.combinationKey === a.combinationKey
637
639
  );
@@ -640,12 +642,12 @@ function Zi(e, n) {
640
642
  return Nt(o, a);
641
643
  })
642
644
  });
643
- const i = t.find((a) => !a.combinationKey);
644
- if (!i)
645
- throw new Error(`Base item overrider not found - ${n._id}`);
646
- return n.groups = (i.groups || []).map((a) => {
645
+ const n = t.find((a) => !a.combinationKey);
646
+ if (!n)
647
+ throw new Error(`Base item overrider not found - ${i._id}`);
648
+ return i.groups = (n.groups || []).map((a) => {
647
649
  var r;
648
- const o = n.groups.find((l) => l._id === a._id);
650
+ const o = i.groups.find((l) => l._id === a._id);
649
651
  return a.items = (r = a.items) == null ? void 0 : r.map((l) => {
650
652
  var u;
651
653
  const s = (u = o == null ? void 0 : o.items) == null ? void 0 : u.find(
@@ -654,34 +656,34 @@ function Zi(e, n) {
654
656
  return Nt(l, s);
655
657
  }), a;
656
658
  }), {
657
- ...n,
658
- price: (i == null ? void 0 : i.price) || n.price
659
+ ...i,
660
+ price: (n == null ? void 0 : n.price) || i.price
659
661
  };
660
662
  }
661
- async function Qi(e, n, t, i, a, o = !0) {
662
- const r = ae(t), l = o ? Xi(n, r, i, a) : r, s = n.reduce((h, m) => (h[m._id] = l.modules.item.find((c) => c._id === m._id), h), {}), u = n.reduce((h, m) => {
663
+ async function Qn(e, i, t, n, a, o = !0) {
664
+ const r = ae(t), l = o ? Xn(i, r, n, a) : r, s = i.reduce((h, m) => (h[m._id] = l.modules.item.find((c) => c._id === m._id), h), {}), u = i.reduce((h, m) => {
663
665
  const c = m._id;
664
- return h[c] = qi(s[c], e), h;
666
+ return h[c] = qn(s[c], e), h;
665
667
  }, {}), d = ye.getFallbackPrices({
666
668
  rawMenu: l,
667
669
  items: u,
668
- catalogId: i || void 0,
670
+ catalogId: n || void 0,
669
671
  schedulerId: a
670
672
  });
671
- return n.map((h) => {
673
+ return i.map((h) => {
672
674
  const m = h._id, c = s[m];
673
675
  return {
674
- ...Zi(d, c),
675
- category: i || a ? c == null ? void 0 : c.category : null
676
+ ...Zn(d, c),
677
+ category: n || a ? c == null ? void 0 : c.category : null
676
678
  };
677
679
  });
678
680
  }
679
- function Ln(e, n) {
681
+ function Ni(e, i) {
680
682
  if (e.length === 0) return "";
681
683
  const t = e == null ? void 0 : e.split("variant");
682
684
  return ((t == null ? void 0 : t.reduce((a, o) => {
683
685
  if (o && o.length > 0) {
684
- const r = `variant${o.split("/")[0]}`, l = o.split("/")[1], u = n.find(
686
+ const r = `variant${o.split("/")[0]}`, l = o.split("/")[1], u = i.find(
685
687
  ({ _id: d }) => d === r
686
688
  ).options.find(({ _id: d }) => d === l);
687
689
  a.push(((u == null ? void 0 : u.name) || "").trim());
@@ -690,18 +692,18 @@ function Ln(e, n) {
690
692
  }, [])) || []).join(" / ");
691
693
  }
692
694
  const zt = /* @__PURE__ */ new Map();
693
- async function Ji(e, n) {
694
- const t = `${e._id}-${e.updatedAt}-${n}`;
695
+ async function Jn(e, i) {
696
+ const t = `${e._id}-${e.updatedAt}-${i}`;
695
697
  if (zt.has(t))
696
698
  return zt.get(t);
697
- const i = await pi(
698
- Yi,
699
+ const n = await pn(
700
+ Yn,
699
701
  JSON.stringify({
700
702
  menu: e,
701
- itemId: n
703
+ itemId: i
702
704
  })
703
705
  );
704
- return zt.set(t, i), i;
706
+ return zt.set(t, n), n;
705
707
  }
706
708
  const Zt = /* @__PURE__ */ le({
707
709
  __name: "OrderFrom",
@@ -744,18 +746,18 @@ const Zt = /* @__PURE__ */ le({
744
746
  }
745
747
  },
746
748
  emits: ["update:model-value"],
747
- setup(e, { emit: n }) {
748
- const t = e, { t: i } = ce(), a = n, o = T(() => ({
749
+ setup(e, { emit: i }) {
750
+ const t = e, { t: n } = ce(), a = i, o = T(() => ({
749
751
  ALL: {
750
- label: i("menu.order.from.options.all"),
752
+ label: n("menu.order.from.options.all"),
751
753
  value: L.F_ORDER_FROM.enum.ALL
752
754
  },
753
755
  POS_ONLY: {
754
- label: i("menu.order.from.options.pos_only"),
756
+ label: n("menu.order.from.options.pos_only"),
755
757
  value: L.F_ORDER_FROM.enum.POS_ONLY
756
758
  },
757
759
  NONE: {
758
- label: i("menu.order.from.options.none"),
760
+ label: n("menu.order.from.options.none"),
759
761
  value: L.F_ORDER_FROM.enum.NONE
760
762
  }
761
763
  })), r = T(() => {
@@ -785,10 +787,10 @@ const Zt = /* @__PURE__ */ le({
785
787
  C(h, {
786
788
  disabled: e.disable,
787
789
  items: r.value,
788
- label: e.label ?? p(i)("menu.common.labels.order_from"),
790
+ label: e.label ?? p(n)("menu.common.labels.order_from"),
789
791
  "menu-z-index": e.menuZIndex,
790
792
  "model-value": s.value,
791
- rules: e.required ? [(m) => !!m || p(i)("menu.common.validation.required_field")] : [],
793
+ rules: e.required ? [(m) => !!m || p(n)("menu.common.validation.required_field")] : [],
792
794
  "shift-menu": "",
793
795
  "onUpdate:modelValue": d[0] || (d[0] = (m) => a("update:model-value", m ?? null))
794
796
  }, null, 8, ["disabled", "items", "label", "menu-z-index", "model-value", "rules"])
@@ -796,134 +798,134 @@ const Zt = /* @__PURE__ */ le({
796
798
  };
797
799
  }
798
800
  });
799
- var eo = function(e, n) {
800
- return Object.assign(document.createElement("canvas"), { width: e, height: n });
801
+ var eo = function(e, i) {
802
+ return Object.assign(document.createElement("canvas"), { width: e, height: i });
801
803
  };
802
- function yn(e, n) {
804
+ function bi(e, i) {
803
805
  var t = Object.keys(e);
804
806
  if (Object.getOwnPropertySymbols) {
805
- var i = Object.getOwnPropertySymbols(e);
806
- n && (i = i.filter(function(a) {
807
+ var n = Object.getOwnPropertySymbols(e);
808
+ i && (n = n.filter(function(a) {
807
809
  return Object.getOwnPropertyDescriptor(e, a).enumerable;
808
- })), t.push.apply(t, i);
810
+ })), t.push.apply(t, n);
809
811
  }
810
812
  return t;
811
813
  }
812
- function ie(e) {
813
- for (var n = 1; n < arguments.length; n++) {
814
- var t = arguments[n] != null ? arguments[n] : {};
815
- n % 2 ? yn(Object(t), !0).forEach(function(i) {
816
- Ae(e, i, t[i]);
817
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : yn(Object(t)).forEach(function(i) {
818
- Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(t, i));
814
+ function ne(e) {
815
+ for (var i = 1; i < arguments.length; i++) {
816
+ var t = arguments[i] != null ? arguments[i] : {};
817
+ i % 2 ? bi(Object(t), !0).forEach(function(n) {
818
+ Ae(e, n, t[n]);
819
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : bi(Object(t)).forEach(function(n) {
820
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
819
821
  });
820
822
  }
821
823
  return e;
822
824
  }
823
- function Ae(e, n, t) {
824
- return n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
825
+ function Ae(e, i, t) {
826
+ return i in e ? Object.defineProperty(e, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[i] = t, e;
825
827
  }
826
- function to(e, n) {
828
+ function to(e, i) {
827
829
  if (e == null) return {};
828
- var t, i, a = function(r, l) {
830
+ var t, n, a = function(r, l) {
829
831
  if (r == null) return {};
830
832
  var s, u, d = {}, h = Object.keys(r);
831
833
  for (u = 0; u < h.length; u++) s = h[u], l.indexOf(s) >= 0 || (d[s] = r[s]);
832
834
  return d;
833
- }(e, n);
835
+ }(e, i);
834
836
  if (Object.getOwnPropertySymbols) {
835
837
  var o = Object.getOwnPropertySymbols(e);
836
- for (i = 0; i < o.length; i++) t = o[i], n.indexOf(t) >= 0 || Object.prototype.propertyIsEnumerable.call(e, t) && (a[t] = e[t]);
838
+ for (n = 0; n < o.length; n++) t = o[n], i.indexOf(t) >= 0 || Object.prototype.propertyIsEnumerable.call(e, t) && (a[t] = e[t]);
837
839
  }
838
840
  return a;
839
841
  }
840
842
  function qe(e) {
841
- return function(n) {
842
- if (Array.isArray(n)) return Ft(n);
843
- }(e) || function(n) {
844
- if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
845
- }(e) || function(n, t) {
846
- if (n) {
847
- if (typeof n == "string") return Ft(n, t);
848
- var i = Object.prototype.toString.call(n).slice(8, -1);
849
- if (i === "Object" && n.constructor && (i = n.constructor.name), i === "Map" || i === "Set") return Array.from(n);
850
- if (i === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return Ft(n, t);
843
+ return function(i) {
844
+ if (Array.isArray(i)) return Ft(i);
845
+ }(e) || function(i) {
846
+ if (typeof Symbol < "u" && i[Symbol.iterator] != null || i["@@iterator"] != null) return Array.from(i);
847
+ }(e) || function(i, t) {
848
+ if (i) {
849
+ if (typeof i == "string") return Ft(i, t);
850
+ var n = Object.prototype.toString.call(i).slice(8, -1);
851
+ if (n === "Object" && i.constructor && (n = i.constructor.name), n === "Map" || n === "Set") return Array.from(i);
852
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Ft(i, t);
851
853
  }
852
854
  }(e) || function() {
853
855
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
854
856
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
855
857
  }();
856
858
  }
857
- function Ft(e, n) {
858
- (n == null || n > e.length) && (n = e.length);
859
- for (var t = 0, i = new Array(n); t < n; t++) i[t] = e[t];
860
- return i;
859
+ function Ft(e, i) {
860
+ (i == null || i > e.length) && (i = e.length);
861
+ for (var t = 0, n = new Array(i); t < i; t++) n[t] = e[t];
862
+ return n;
861
863
  }
862
- var _n, no, mt, de = (_n = function(e) {
864
+ var yi, io, mt, de = (yi = function(e) {
863
865
  /*!
864
866
  Copyright (c) 2018 Jed Watson.
865
867
  Licensed under the MIT License (MIT), see
866
868
  http://jedwatson.github.io/classnames
867
869
  */
868
870
  (function() {
869
- var n = {}.hasOwnProperty;
871
+ var i = {}.hasOwnProperty;
870
872
  function t() {
871
- for (var i = [], a = 0; a < arguments.length; a++) {
873
+ for (var n = [], a = 0; a < arguments.length; a++) {
872
874
  var o = arguments[a];
873
875
  if (o) {
874
876
  var r = typeof o;
875
- if (r === "string" || r === "number") i.push(o);
877
+ if (r === "string" || r === "number") n.push(o);
876
878
  else if (Array.isArray(o)) {
877
879
  if (o.length) {
878
880
  var l = t.apply(null, o);
879
- l && i.push(l);
881
+ l && n.push(l);
880
882
  }
881
- } else if (r === "object") if (o.toString === Object.prototype.toString) for (var s in o) n.call(o, s) && o[s] && i.push(s);
882
- else i.push(o.toString());
883
+ } else if (r === "object") if (o.toString === Object.prototype.toString) for (var s in o) i.call(o, s) && o[s] && n.push(s);
884
+ else n.push(o.toString());
883
885
  }
884
886
  }
885
- return i.join(" ");
887
+ return n.join(" ");
886
888
  }
887
889
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
888
890
  })();
889
- }, _n(mt = { path: no, exports: {}, require: function(e, n) {
891
+ }, yi(mt = { path: io, exports: {}, require: function(e, i) {
890
892
  return function() {
891
893
  throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
892
- }(n == null && mt.path);
894
+ }(i == null && mt.path);
893
895
  } }, mt.exports), mt.exports), Me = function(e) {
894
- return function(n, t) {
895
- if (!n) return e;
896
- var i;
897
- typeof n == "string" ? i = n : t = n;
896
+ return function(i, t) {
897
+ if (!i) return e;
898
+ var n;
899
+ typeof i == "string" ? n = i : t = i;
898
900
  var a = e;
899
- return i && (a += "__" + i), a + (t ? Object.keys(t).reduce(function(o, r) {
901
+ return n && (a += "__" + n), a + (t ? Object.keys(t).reduce(function(o, r) {
900
902
  var l = t[r];
901
903
  return l && (o += " " + (typeof l == "boolean" ? a + "--" + r : a + "--" + r + "_" + l)), o;
902
904
  }, "") : "");
903
905
  };
904
906
  };
905
- function Lt(e, n, t) {
906
- var i, a, o, r, l;
907
+ function Lt(e, i, t) {
908
+ var n, a, o, r, l;
907
909
  function s() {
908
910
  var d = Date.now() - r;
909
- d < n && d >= 0 ? i = setTimeout(s, n - d) : (i = null, t || (l = e.apply(o, a), o = a = null));
911
+ d < i && d >= 0 ? n = setTimeout(s, i - d) : (n = null, t || (l = e.apply(o, a), o = a = null));
910
912
  }
911
- n == null && (n = 100);
913
+ i == null && (i = 100);
912
914
  var u = function() {
913
915
  o = this, a = arguments, r = Date.now();
914
- var d = t && !i;
915
- return i || (i = setTimeout(s, n)), d && (l = e.apply(o, a), o = a = null), l;
916
+ var d = t && !n;
917
+ return n || (n = setTimeout(s, i)), d && (l = e.apply(o, a), o = a = null), l;
916
918
  };
917
919
  return u.clear = function() {
918
- i && (clearTimeout(i), i = null);
920
+ n && (clearTimeout(n), n = null);
919
921
  }, u.flush = function() {
920
- i && (l = e.apply(o, a), o = a = null, clearTimeout(i), i = null);
922
+ n && (l = e.apply(o, a), o = a = null, clearTimeout(n), n = null);
921
923
  }, u;
922
924
  }
923
925
  Lt.debounce = Lt;
924
926
  var Bt = Lt, H = function() {
925
927
  return H = Object.assign || function(e) {
926
- for (var n, t = 1, i = arguments.length; t < i; t++) for (var a in n = arguments[t]) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
928
+ for (var i, t = 1, n = arguments.length; t < n; t++) for (var a in i = arguments[t]) Object.prototype.hasOwnProperty.call(i, a) && (e[a] = i[a]);
927
929
  return e;
928
930
  }, H.apply(this, arguments);
929
931
  };
@@ -941,16 +943,16 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
941
943
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
942
944
  PERFORMANCE OF THIS SOFTWARE.
943
945
  ***************************************************************************** */
944
- function Bn(e, n) {
945
- var t, i;
946
- return e && n ? (t = "" + e + n[0].toUpperCase() + n.slice(1), i = e + "-" + n) : (t = e || n, i = e || n), { name: t, classname: i };
946
+ function Li(e, i) {
947
+ var t, n;
948
+ return e && i ? (t = "" + e + i[0].toUpperCase() + i.slice(1), n = e + "-" + i) : (t = e || i, n = e || i), { name: t, classname: n };
947
949
  }
948
- function Kn(e) {
950
+ function Bi(e) {
949
951
  return /^blob:/.test(e);
950
952
  }
951
- function wn(e) {
952
- return Kn(e) || function(n) {
953
- return /^data:/.test(n);
953
+ function _i(e) {
954
+ return Bi(e) || function(i) {
955
+ return /^data:/.test(i);
954
956
  }(e);
955
957
  }
956
958
  function Ze(e) {
@@ -962,42 +964,42 @@ function fe(e) {
962
964
  function bt(e) {
963
965
  return typeof e == "object" && e !== null;
964
966
  }
965
- function Kt(e, n, t) {
966
- var i = {};
967
- return bt(e) ? (Object.keys(n).forEach(function(a) {
968
- fe(e[a]) ? i[a] = n[a] : bt(n[a]) ? bt(e[a]) ? i[a] = Kt(e[a], n[a], t[a]) : i[a] = e[a] ? n[a] : t[a] : n[a] === !0 || n[a] === !1 ? i[a] = !!e[a] : i[a] = e[a];
969
- }), i) : e ? n : t;
967
+ function Kt(e, i, t) {
968
+ var n = {};
969
+ return bt(e) ? (Object.keys(i).forEach(function(a) {
970
+ fe(e[a]) ? n[a] = i[a] : bt(i[a]) ? bt(e[a]) ? n[a] = Kt(e[a], i[a], t[a]) : n[a] = e[a] ? i[a] : t[a] : i[a] === !0 || i[a] === !1 ? n[a] = !!e[a] : n[a] = e[a];
971
+ }), n) : e ? i : t;
970
972
  }
971
973
  function ht(e) {
972
- var n = Number(e);
973
- return Number.isNaN(n) ? e : n;
974
+ var i = Number(e);
975
+ return Number.isNaN(i) ? e : i;
974
976
  }
975
- function Sn(e) {
976
- return typeof (e == "number" || /* @__PURE__ */ function(n) {
977
- return typeof n == "object" && n !== null;
978
- }(e) && toString.call(e) == "[object Number]") && !Gn(e);
977
+ function wi(e) {
978
+ return typeof (e == "number" || /* @__PURE__ */ function(i) {
979
+ return typeof i == "object" && i !== null;
980
+ }(e) && toString.call(e) == "[object Number]") && !Ki(e);
979
981
  }
980
- function Gn(e) {
982
+ function Ki(e) {
981
983
  return e != e;
982
984
  }
983
- function Wn(e, n) {
984
- return Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2));
985
+ function Gi(e, i) {
986
+ return Math.sqrt(Math.pow(e.x - i.x, 2) + Math.pow(e.y - i.y, 2));
985
987
  }
986
- var at = function(e, n) {
987
- e === void 0 && (e = {}), n === void 0 && (n = {}), this.type = "manipulateImage", this.move = e, this.scale = n;
988
- }, io = function(e, n) {
989
- n === void 0 && (n = {}), this.type = "resize", this.directions = e, this.params = n;
988
+ var at = function(e, i) {
989
+ e === void 0 && (e = {}), i === void 0 && (i = {}), this.type = "manipulateImage", this.move = e, this.scale = i;
990
+ }, no = function(e, i) {
991
+ i === void 0 && (i = {}), this.type = "resize", this.directions = e, this.params = i;
990
992
  }, Qt = function(e) {
991
993
  this.type = "move", this.directions = e;
992
994
  }, oo = function() {
993
- function e(n, t, i, a, o) {
994
- this.type = "drag", this.nativeEvent = n, this.position = i, this.previousPosition = a, this.element = t, this.anchor = o;
995
+ function e(i, t, n, a, o) {
996
+ this.type = "drag", this.nativeEvent = i, this.position = n, this.previousPosition = a, this.element = t, this.anchor = o;
995
997
  }
996
998
  return e.prototype.shift = function() {
997
- var n = this, t = n.element, i = n.anchor, a = n.position;
999
+ var i = this, t = i.element, n = i.anchor, a = i.position;
998
1000
  if (t) {
999
1001
  var o = t.getBoundingClientRect(), r = o.left, l = o.top;
1000
- return { left: a.left - r - i.left, top: a.top - l - i.top };
1002
+ return { left: a.left - r - n.left, top: a.top - l - n.top };
1001
1003
  }
1002
1004
  return { left: 0, top: 0 };
1003
1005
  }, e;
@@ -1013,8 +1015,8 @@ var at = function(e, n) {
1013
1015
  }, onMouseLeave: function() {
1014
1016
  this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
1015
1017
  }, onTouchStart: function(e) {
1016
- e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = qe(e.touches), this.hovered || (this.$emit("enter"), this.hovered = !0), e.touches.length && this.initAnchor(this.touches.reduce(function(n, t) {
1017
- return { clientX: n.clientX + t.clientX / e.touches.length, clientY: n.clientY + t.clientY / e.touches.length };
1018
+ e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = qe(e.touches), this.hovered || (this.$emit("enter"), this.hovered = !0), e.touches.length && this.initAnchor(this.touches.reduce(function(i, t) {
1019
+ return { clientX: i.clientX + t.clientX / e.touches.length, clientY: i.clientY + t.clientY / e.touches.length };
1018
1020
  }, { clientX: 0, clientY: 0 })), e.preventDefault && e.preventDefault(), e.stopPropagation());
1019
1021
  }, onTouchEnd: function() {
1020
1022
  this.processEnd();
@@ -1022,204 +1024,204 @@ var at = function(e, n) {
1022
1024
  this.touches.length && (this.processMove(e, e.touches), e.preventDefault && e.preventDefault(), e.stopPropagation && e.stopPropagation());
1023
1025
  }, onMouseDown: function(e) {
1024
1026
  if (!this.disabled) {
1025
- var n = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1026
- this.touches = [n], this.initAnchor(n), e.stopPropagation();
1027
+ var i = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1028
+ this.touches = [i], this.initAnchor(i), e.stopPropagation();
1027
1029
  }
1028
1030
  }, onMouseMove: function(e) {
1029
1031
  this.touches.length && (this.processMove(e, [{ fake: !0, clientX: e.clientX, clientY: e.clientY }]), e.preventDefault && e.preventDefault());
1030
1032
  }, onMouseUp: function() {
1031
1033
  this.processEnd();
1032
1034
  }, initAnchor: function(e) {
1033
- var n = this.$refs.draggable.getBoundingClientRect(), t = n.left, i = n.right, a = n.bottom, o = n.top;
1034
- this.anchor = { left: e.clientX - t, top: e.clientY - o, bottom: a - e.clientY, right: i - e.clientX };
1035
- }, processMove: function(e, n) {
1036
- var t = qe(n);
1035
+ var i = this.$refs.draggable.getBoundingClientRect(), t = i.left, n = i.right, a = i.bottom, o = i.top;
1036
+ this.anchor = { left: e.clientX - t, top: e.clientY - o, bottom: a - e.clientY, right: n - e.clientX };
1037
+ }, processMove: function(e, i) {
1038
+ var t = qe(i);
1037
1039
  if (this.touches.length) {
1038
1040
  if (this.touches.length === 1 && t.length === 1) {
1039
- var i = this.$refs.draggable;
1040
- this.$emit("drag", new oo(e, i, { left: t[0].clientX, top: t[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));
1041
+ var n = this.$refs.draggable;
1042
+ this.$emit("drag", new oo(e, n, { left: t[0].clientX, top: t[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));
1041
1043
  }
1042
1044
  this.touches = t;
1043
1045
  }
1044
1046
  }, processEnd: function() {
1045
1047
  this.touches.length && this.$emit("drag-end"), this.hovered && (this.$emit("leave"), this.hovered = !1), this.touches = [];
1046
1048
  } }, emits: ["drag", "drag-end", "leave", "enter"] };
1047
- Jt.render = function(e, n, t, i, a, o) {
1048
- return F(), G("div", { ref: "draggable", class: t.classname, onTouchstart: n[1] || (n[1] = function() {
1049
+ Jt.render = function(e, i, t, n, a, o) {
1050
+ return F(), G("div", { ref: "draggable", class: t.classname, onTouchstart: i[1] || (i[1] = function() {
1049
1051
  return o.onTouchStart && o.onTouchStart.apply(o, arguments);
1050
- }), onMousedown: n[2] || (n[2] = function() {
1052
+ }), onMousedown: i[2] || (i[2] = function() {
1051
1053
  return o.onMouseDown && o.onMouseDown.apply(o, arguments);
1052
- }), onMouseover: n[3] || (n[3] = function() {
1054
+ }), onMouseover: i[3] || (i[3] = function() {
1053
1055
  return o.onMouseOver && o.onMouseOver.apply(o, arguments);
1054
- }), onMouseleave: n[4] || (n[4] = function() {
1056
+ }), onMouseleave: i[4] || (i[4] = function() {
1055
1057
  return o.onMouseLeave && o.onMouseLeave.apply(o, arguments);
1056
1058
  }) }, [he(e.$slots, "default")], 34);
1057
1059
  };
1058
- var Et = Me("vue-handler-wrapper"), jn = { name: "HandlerWrapper", components: { DraggableElement: Jt }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
1060
+ var Et = Me("vue-handler-wrapper"), Wi = { name: "HandlerWrapper", components: { DraggableElement: Jt }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
1059
1061
  var e;
1060
1062
  if (this.horizontalPosition || this.verticalPosition) {
1061
- var n, t = Bn(this.horizontalPosition, this.verticalPosition);
1062
- e = Et((Ae(n = {}, t.classname, !0), Ae(n, "disabled", this.disabled), n));
1063
+ var i, t = Li(this.horizontalPosition, this.verticalPosition);
1064
+ e = Et((Ae(i = {}, t.classname, !0), Ae(i, "disabled", this.disabled), i));
1063
1065
  } else e = Et({ disabled: this.disabled });
1064
1066
  return { root: e, draggable: Et("draggable") };
1065
1067
  } }, emits: ["leave", "enter", "drag", "drag-end"] };
1066
- jn.render = function(e, n, t, i, a, o) {
1068
+ Wi.render = function(e, i, t, n, a, o) {
1067
1069
  var r = B("DraggableElement");
1068
- return F(), G("div", { class: o.classes.root }, [C(r, { class: o.classes.draggable, onDrag: n[1] || (n[1] = function(l) {
1070
+ return F(), G("div", { class: o.classes.root }, [C(r, { class: o.classes.draggable, onDrag: i[1] || (i[1] = function(l) {
1069
1071
  return e.$emit("drag", l);
1070
- }), onDragEnd: n[2] || (n[2] = function(l) {
1072
+ }), onDragEnd: i[2] || (i[2] = function(l) {
1071
1073
  return e.$emit("drag-end");
1072
- }), onLeave: n[3] || (n[3] = function(l) {
1074
+ }), onLeave: i[3] || (i[3] = function(l) {
1073
1075
  return e.$emit("leave");
1074
- }), onEnter: n[4] || (n[4] = function(l) {
1076
+ }), onEnter: i[4] || (i[4] = function(l) {
1075
1077
  return e.$emit("enter");
1076
1078
  }) }, { default: N(function() {
1077
1079
  return [he(e.$slots, "default")];
1078
1080
  }), _: 3 }, 8, ["class"])], 2);
1079
1081
  };
1080
- var ao = Me("vue-line-wrapper"), Yn = { name: "LineWrapper", components: { DraggableElement: Jt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
1082
+ var ao = Me("vue-line-wrapper"), ji = { name: "LineWrapper", components: { DraggableElement: Jt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
1081
1083
  var e;
1082
1084
  return ao((Ae(e = {}, this.position, !0), Ae(e, "disabled", this.disabled), e));
1083
1085
  } }, emits: ["leave", "enter", "drag", "drag-end"] };
1084
- Yn.render = function(e, n, t, i, a, o) {
1086
+ ji.render = function(e, i, t, n, a, o) {
1085
1087
  var r = B("DraggableElement");
1086
- return F(), G(r, { class: o.classname, onDrag: n[1] || (n[1] = function(l) {
1088
+ return F(), G(r, { class: o.classname, onDrag: i[1] || (i[1] = function(l) {
1087
1089
  return e.$emit("drag", l);
1088
- }), onDragEnd: n[2] || (n[2] = function(l) {
1090
+ }), onDragEnd: i[2] || (i[2] = function(l) {
1089
1091
  return e.$emit("drag-end");
1090
- }), onLeave: n[3] || (n[3] = function(l) {
1092
+ }), onLeave: i[3] || (i[3] = function(l) {
1091
1093
  return e.$emit("leave");
1092
- }), onEnter: n[4] || (n[4] = function(l) {
1094
+ }), onEnter: i[4] || (i[4] = function(l) {
1093
1095
  return e.$emit("enter");
1094
1096
  }) }, { default: N(function() {
1095
1097
  return [he(e.$slots, "default")];
1096
1098
  }), _: 3 }, 8, ["class"]);
1097
1099
  };
1098
- var ze = ["left", "right", "top", "bottom"], ro = ["left", "right"], so = ["top", "bottom"], lo = ["left", "top"], uo = ["fill-area", "fit-area", "stencil", "none"], Cn = { left: 0, top: 0, width: 0, height: 0 };
1099
- function Rn(e, n, t) {
1100
- return !(t = t || ["width", "height", "left", "top"]).some(function(i) {
1101
- return e[i] !== n[i];
1100
+ var ze = ["left", "right", "top", "bottom"], ro = ["left", "right"], so = ["top", "bottom"], lo = ["left", "top"], uo = ["fill-area", "fit-area", "stencil", "none"], Si = { left: 0, top: 0, width: 0, height: 0 };
1101
+ function Ci(e, i, t) {
1102
+ return !(t = t || ["width", "height", "left", "top"]).some(function(n) {
1103
+ return e[n] !== i[n];
1102
1104
  });
1103
1105
  }
1104
1106
  function Fe(e) {
1105
1107
  return { left: e.left, top: e.top, right: e.left + e.width, bottom: e.top + e.height };
1106
1108
  }
1107
- function tt(e, n) {
1108
- return { left: e.left - n.left, top: e.top - n.top };
1109
+ function tt(e, i) {
1110
+ return { left: e.left - i.left, top: e.top - i.top };
1109
1111
  }
1110
1112
  function ge(e) {
1111
1113
  return { left: e.left + e.width / 2, top: e.top + e.height / 2 };
1112
1114
  }
1113
- function st(e, n) {
1115
+ function st(e, i) {
1114
1116
  var t = { left: 0, top: 0, right: 0, bottom: 0 };
1115
- return ze.forEach(function(i) {
1116
- var a = n[i], o = Fe(e)[i];
1117
- t[i] = a !== void 0 && o !== void 0 ? i === "left" || i === "top" ? Math.max(0, a - o) : Math.max(0, o - a) : 0;
1117
+ return ze.forEach(function(n) {
1118
+ var a = i[n], o = Fe(e)[n];
1119
+ t[n] = a !== void 0 && o !== void 0 ? n === "left" || n === "top" ? Math.max(0, a - o) : Math.max(0, o - a) : 0;
1118
1120
  }), t;
1119
1121
  }
1120
- function Oe(e, n) {
1121
- return { left: e.left - n.left, top: e.top - n.top, width: e.width + n.left + n.right, height: e.height + n.top + n.bottom };
1122
+ function Oe(e, i) {
1123
+ return { left: e.left - i.left, top: e.top - i.top, width: e.width + i.left + i.right, height: e.height + i.top + i.bottom };
1122
1124
  }
1123
1125
  function Rt(e) {
1124
1126
  return { left: -e.left, top: -e.top };
1125
1127
  }
1126
- function Se(e, n) {
1127
- return H(H({}, e), { left: e.left + n.left, top: e.top + n.top });
1128
+ function Se(e, i) {
1129
+ return H(H({}, e), { left: e.left + i.left, top: e.top + i.top });
1128
1130
  }
1129
- function xe(e, n, t, i) {
1130
- if (n !== 1) {
1131
+ function xe(e, i, t, n) {
1132
+ if (i !== 1) {
1131
1133
  if (t) {
1132
1134
  var a = ge(e);
1133
- return { width: e.width * n, height: e.height * n, left: e.left + e.width * (1 - n) / 2 + (t.left - a.left) * (1 - n), top: e.top + e.height * (1 - n) / 2 + (t.top - a.top) * (1 - n) };
1135
+ return { width: e.width * i, height: e.height * i, left: e.left + e.width * (1 - i) / 2 + (t.left - a.left) * (1 - i), top: e.top + e.height * (1 - i) / 2 + (t.top - a.top) * (1 - i) };
1134
1136
  }
1135
- return { width: e.width * n, height: e.height * n, left: e.left + e.width * (1 - n) / 2, top: e.top + e.height * (1 - n) / 2 };
1137
+ return { width: e.width * i, height: e.height * i, left: e.left + e.width * (1 - i) / 2, top: e.top + e.height * (1 - i) / 2 };
1136
1138
  }
1137
1139
  return e;
1138
1140
  }
1139
1141
  function oe(e) {
1140
1142
  return e.width / e.height;
1141
1143
  }
1142
- function nt(e, n) {
1143
- return Math.min(n.right !== void 0 && n.left !== void 0 ? (n.right - n.left) / e.width : 1 / 0, n.bottom !== void 0 && n.top !== void 0 ? (n.bottom - n.top) / e.height : 1 / 0);
1144
+ function it(e, i) {
1145
+ return Math.min(i.right !== void 0 && i.left !== void 0 ? (i.right - i.left) / e.width : 1 / 0, i.bottom !== void 0 && i.top !== void 0 ? (i.bottom - i.top) / e.height : 1 / 0);
1144
1146
  }
1145
- function it(e, n) {
1146
- var t = { left: 0, top: 0 }, i = st(e, n);
1147
- return i.left && i.left > 0 ? t.left = i.left : i.right && i.right > 0 && (t.left = -i.right), i.top && i.top > 0 ? t.top = i.top : i.bottom && i.bottom > 0 && (t.top = -i.bottom), t;
1147
+ function nt(e, i) {
1148
+ var t = { left: 0, top: 0 }, n = st(e, i);
1149
+ return n.left && n.left > 0 ? t.left = n.left : n.right && n.right > 0 && (t.left = -n.right), n.top && n.top > 0 ? t.top = n.top : n.bottom && n.bottom > 0 && (t.top = -n.bottom), t;
1148
1150
  }
1149
- function It(e, n) {
1151
+ function It(e, i) {
1150
1152
  var t;
1151
- return n.minimum && e < n.minimum ? t = n.minimum : n.maximum && e > n.maximum && (t = n.maximum), t;
1153
+ return i.minimum && e < i.minimum ? t = i.minimum : i.maximum && e > i.maximum && (t = i.maximum), t;
1152
1154
  }
1153
- function Hn(e, n) {
1154
- var t = oe(e), i = oe(n);
1155
- return n.width < 1 / 0 && n.height < 1 / 0 ? t > i ? { width: n.width, height: n.width / t } : { width: n.height * t, height: n.height } : n.width < 1 / 0 ? { width: n.width, height: n.width / t } : n.height < 1 / 0 ? { width: n.height * t, height: n.height } : e;
1155
+ function Yi(e, i) {
1156
+ var t = oe(e), n = oe(i);
1157
+ return i.width < 1 / 0 && i.height < 1 / 0 ? t > n ? { width: i.width, height: i.width / t } : { width: i.height * t, height: i.height } : i.width < 1 / 0 ? { width: i.width, height: i.width / t } : i.height < 1 / 0 ? { width: i.height * t, height: i.height } : e;
1156
1158
  }
1157
- function Xn(e, n) {
1158
- var t = n * Math.PI / 180;
1159
+ function Hi(e, i) {
1160
+ var t = i * Math.PI / 180;
1159
1161
  return { width: Math.abs(e.width * Math.cos(t)) + Math.abs(e.height * Math.sin(t)), height: Math.abs(e.width * Math.sin(t)) + Math.abs(e.height * Math.cos(t)) };
1160
1162
  }
1161
- function Ve(e, n) {
1162
- var t = n * Math.PI / 180;
1163
+ function Ve(e, i) {
1164
+ var t = i * Math.PI / 180;
1163
1165
  return { left: e.left * Math.cos(t) - e.top * Math.sin(t), top: e.left * Math.sin(t) + e.top * Math.cos(t) };
1164
1166
  }
1165
- function At(e, n) {
1166
- var t = st(ve(e, n), n);
1167
- return t.left + t.right + t.top + t.bottom ? t.left + t.right > t.top + t.bottom ? Math.min((e.width + t.left + t.right) / e.width, nt(e, n)) : Math.min((e.height + t.top + t.bottom) / e.height, nt(e, n)) : 1;
1167
+ function At(e, i) {
1168
+ var t = st(ve(e, i), i);
1169
+ return t.left + t.right + t.top + t.bottom ? t.left + t.right > t.top + t.bottom ? Math.min((e.width + t.left + t.right) / e.width, it(e, i)) : Math.min((e.height + t.top + t.bottom) / e.height, it(e, i)) : 1;
1168
1170
  }
1169
- function ve(e, n, t) {
1171
+ function ve(e, i, t) {
1170
1172
  t === void 0 && (t = !1);
1171
- var i = it(e, n);
1172
- return Se(e, t ? Rt(i) : i);
1173
+ var n = nt(e, i);
1174
+ return Se(e, t ? Rt(n) : n);
1173
1175
  }
1174
1176
  function Gt(e) {
1175
1177
  return { width: e.right !== void 0 && e.left !== void 0 ? e.right - e.left : 1 / 0, height: e.bottom !== void 0 && e.top !== void 0 ? e.bottom - e.top : 1 / 0 };
1176
1178
  }
1177
- function co(e, n) {
1178
- return H(H({}, e), { minWidth: Math.min(n.width, e.minWidth), minHeight: Math.min(n.height, e.minHeight), maxWidth: Math.min(n.width, e.maxWidth), maxHeight: Math.min(n.height, e.maxHeight) });
1179
+ function co(e, i) {
1180
+ return H(H({}, e), { minWidth: Math.min(i.width, e.minWidth), minHeight: Math.min(i.height, e.minHeight), maxWidth: Math.min(i.width, e.maxWidth), maxHeight: Math.min(i.height, e.maxHeight) });
1179
1181
  }
1180
- function qn(e, n, t) {
1182
+ function Xi(e, i, t) {
1181
1183
  t === void 0 && (t = !0);
1182
- var i = {};
1184
+ var n = {};
1183
1185
  return ze.forEach(function(a) {
1184
- var o = e[a], r = n[a];
1185
- o !== void 0 && r !== void 0 ? i[a] = a === "left" || a === "top" ? t ? Math.max(o, r) : Math.min(o, r) : t ? Math.min(o, r) : Math.max(o, r) : r !== void 0 ? i[a] = r : o !== void 0 && (i[a] = o);
1186
- }), i;
1186
+ var o = e[a], r = i[a];
1187
+ o !== void 0 && r !== void 0 ? n[a] = a === "left" || a === "top" ? t ? Math.max(o, r) : Math.min(o, r) : t ? Math.min(o, r) : Math.max(o, r) : r !== void 0 ? n[a] = r : o !== void 0 && (n[a] = o);
1188
+ }), n;
1187
1189
  }
1188
- function xt(e, n) {
1189
- return qn(e, n, !0);
1190
+ function xt(e, i) {
1191
+ return Xi(e, i, !0);
1190
1192
  }
1191
- function An(e) {
1192
- var n = e.size, t = e.aspectRatio, i = e.ignoreMinimum, a = e.sizeRestrictions;
1193
- return !!((n.correctRatio || oe(n) >= t.minimum && oe(n) <= t.maximum) && n.height <= a.maxHeight && n.width <= a.maxWidth && n.width && n.height && (i || n.height >= a.minHeight && n.width >= a.minWidth));
1193
+ function Ri(e) {
1194
+ var i = e.size, t = e.aspectRatio, n = e.ignoreMinimum, a = e.sizeRestrictions;
1195
+ return !!((i.correctRatio || oe(i) >= t.minimum && oe(i) <= t.maximum) && i.height <= a.maxHeight && i.width <= a.maxWidth && i.width && i.height && (n || i.height >= a.minHeight && i.width >= a.minWidth));
1194
1196
  }
1195
- function xn(e, n) {
1196
- return Math.pow(e.width - n.width, 2) + Math.pow(e.height - n.height, 2);
1197
+ function Ai(e, i) {
1198
+ return Math.pow(e.width - i.width, 2) + Math.pow(e.height - i.height, 2);
1197
1199
  }
1198
1200
  function De(e) {
1199
- var n = e.width, t = e.height, i = e.sizeRestrictions, a = { minimum: e.aspectRatio && e.aspectRatio.minimum || 0, maximum: e.aspectRatio && e.aspectRatio.maximum || 1 / 0 }, o = { width: Math.max(i.minWidth, Math.min(i.maxWidth, n)), height: Math.max(i.minHeight, Math.min(i.maxHeight, t)) };
1201
+ var i = e.width, t = e.height, n = e.sizeRestrictions, a = { minimum: e.aspectRatio && e.aspectRatio.minimum || 0, maximum: e.aspectRatio && e.aspectRatio.maximum || 1 / 0 }, o = { width: Math.max(n.minWidth, Math.min(n.maxWidth, i)), height: Math.max(n.minHeight, Math.min(n.maxHeight, t)) };
1200
1202
  function r(u, d) {
1201
1203
  return d === void 0 && (d = !1), u.reduce(function(h, m) {
1202
- return An({ size: m, aspectRatio: a, sizeRestrictions: i, ignoreMinimum: d }) && (!h || xn(m, { width: n, height: t }) < xn(h, { width: n, height: t })) ? m : h;
1204
+ return Ri({ size: m, aspectRatio: a, sizeRestrictions: n, ignoreMinimum: d }) && (!h || Ai(m, { width: i, height: t }) < Ai(h, { width: i, height: t })) ? m : h;
1203
1205
  }, null);
1204
1206
  }
1205
1207
  var l = [];
1206
- [a.minimum, a.maximum].forEach(function(u) {
1208
+ a && [a.minimum, a.maximum].forEach(function(u) {
1207
1209
  u && l.push({ width: o.width, height: o.width / u, correctRatio: !0 }, { width: o.height * u, height: o.height, correctRatio: !0 });
1208
- }), An({ size: o, aspectRatio: a, sizeRestrictions: i }) && l.push(o);
1210
+ }), Ri({ size: o, aspectRatio: a, sizeRestrictions: n }) && l.push(o);
1209
1211
  var s = r(l) || r(l, !0);
1210
1212
  return s && { width: s.width, height: s.height };
1211
1213
  }
1212
1214
  function Wt(e) {
1213
- var n = e.event, t = e.coordinates, i = e.positionRestrictions, a = i === void 0 ? {} : i, o = Se(t, n.directions);
1214
- return Se(o, it(o, a));
1215
+ var i = e.event, t = e.coordinates, n = e.positionRestrictions, a = n === void 0 ? {} : n, o = Se(t, i.directions);
1216
+ return Se(o, nt(o, a));
1215
1217
  }
1216
1218
  function mo(e) {
1217
- var n = e.coordinates, t = e.transform, i = e.imageSize, a = e.sizeRestrictions, o = e.positionRestrictions, r = e.aspectRatio, l = e.visibleArea, s = function(d, h) {
1219
+ var i = e.coordinates, t = e.transform, n = e.imageSize, a = e.sizeRestrictions, o = e.positionRestrictions, r = e.aspectRatio, l = e.visibleArea, s = function(d, h) {
1218
1220
  return Wt({ coordinates: d, positionRestrictions: o, event: new Qt({ left: h.left - d.left, top: h.top - d.top }) });
1219
- }, u = H({}, n);
1221
+ }, u = H({}, i);
1220
1222
  return (Array.isArray(t) ? t : [t]).forEach(function(d) {
1221
1223
  var h = {};
1222
- fe((h = typeof d == "function" ? d({ coordinates: u, imageSize: i, visibleArea: l }) : d).width) && fe(h.height) || (u = function(m, c) {
1224
+ fe((h = typeof d == "function" ? d({ coordinates: u, imageSize: n, visibleArea: l }) : d).width) && fe(h.height) || (u = function(m, c) {
1223
1225
  var y = H(H(H({}, m), De({ width: c.width, height: c.height, sizeRestrictions: a, aspectRatio: r })), { left: 0, top: 0 });
1224
1226
  return s(y, { left: m.left, top: m.top });
1225
1227
  }(u, H(H({}, u), h))), fe(h.left) && fe(h.top) || (u = s(u, H(H({}, u), h)));
@@ -1227,83 +1229,83 @@ function mo(e) {
1227
1229
  }
1228
1230
  function ho(e) {
1229
1231
  e.event;
1230
- var n = e.getAreaRestrictions, t = e.boundaries, i = e.coordinates, a = e.visibleArea;
1232
+ var i = e.getAreaRestrictions, t = e.boundaries, n = e.coordinates, a = e.visibleArea;
1231
1233
  e.aspectRatio;
1232
1234
  var o = e.stencilSize, r = e.sizeRestrictions, l = e.positionRestrictions;
1233
1235
  e.stencilReference;
1234
- var s, u, d, h = H({}, i), m = H({}, a), c = H({}, o);
1236
+ var s, u, d, h = H({}, n), m = H({}, a), c = H({}, o);
1235
1237
  s = oe(c), u = oe(h), d === void 0 && (d = 1e-3), (s === 0 || u === 0 ? Math.abs(u - s) < d : Math.abs(u / s) < 1 + d && Math.abs(u / s) > 1 - d) || (h = H(H({}, h), De({ sizeRestrictions: r, width: h.width, height: h.height, aspectRatio: { minimum: oe(c), maximum: oe(c) } })));
1236
- var y = At(m = xe(m, h.width * t.width / (m.width * c.width)), n({ visibleArea: m, type: "resize" }));
1237
- return y !== 1 && (m = xe(m, y), h = xe(h, y)), m = ve(m = Se(m, tt(ge(h), ge(m))), n({ visibleArea: m, type: "move" })), { coordinates: h = ve(h, xt(Fe(m), l)), visibleArea: m };
1238
+ var y = At(m = xe(m, h.width * t.width / (m.width * c.width)), i({ visibleArea: m, type: "resize" }));
1239
+ return y !== 1 && (m = xe(m, y), h = xe(h, y)), m = ve(m = Se(m, tt(ge(h), ge(m))), i({ visibleArea: m, type: "move" })), { coordinates: h = ve(h, xt(Fe(m), l)), visibleArea: m };
1238
1240
  }
1239
1241
  function po(e) {
1240
- var n = e.event, t = e.getAreaRestrictions, i = e.boundaries, a = e.coordinates, o = e.visibleArea;
1242
+ var i = e.event, t = e.getAreaRestrictions, n = e.boundaries, a = e.coordinates, o = e.visibleArea;
1241
1243
  e.aspectRatio, e.stencilSize, e.sizeRestrictions;
1242
1244
  var r = e.positionRestrictions;
1243
1245
  e.stencilReference;
1244
1246
  var l = H({}, a), s = H({}, o);
1245
- if (a && o && n.type !== "manipulateImage") {
1247
+ if (a && o && i.type !== "manipulateImage") {
1246
1248
  var u = { width: 0, height: 0 };
1247
- s.width, i.width, oe(i) > oe(l) ? (u.height = 0.8 * i.height, u.width = u.height * oe(l)) : (u.width = 0.8 * i.width, u.height = u.width * oe(l));
1248
- var d = At(s = xe(s, l.width * i.width / (s.width * u.width)), t({ visibleArea: s, type: "resize" }));
1249
+ s.width, n.width, oe(n) > oe(l) ? (u.height = 0.8 * n.height, u.width = u.height * oe(l)) : (u.width = 0.8 * n.width, u.height = u.width * oe(l));
1250
+ var d = At(s = xe(s, l.width * n.width / (s.width * u.width)), t({ visibleArea: s, type: "resize" }));
1249
1251
  s = xe(s, d), d !== 1 && (u.height /= d, u.width /= d), s = ve(s = Se(s, tt(ge(l), ge(s))), t({ visibleArea: s, type: "move" })), l = ve(l, xt(Fe(s), r));
1250
1252
  }
1251
1253
  return { coordinates: l, visibleArea: s };
1252
1254
  }
1253
1255
  function fo(e) {
1254
- var n = e.event, t = e.coordinates, i = e.visibleArea, a = e.getAreaRestrictions, o = H({}, i), r = H({}, t);
1255
- if (n.type === "setCoordinates") {
1256
+ var i = e.event, t = e.coordinates, n = e.visibleArea, a = e.getAreaRestrictions, o = H({}, n), r = H({}, t);
1257
+ if (i.type === "setCoordinates") {
1256
1258
  var l = Math.max(0, r.width - o.width), s = Math.max(0, r.height - o.height);
1257
- l > s ? o = xe(o, Math.min(r.width / o.width, nt(o, a({ visibleArea: o, type: "resize" })))) : s > l && (o = xe(o, Math.min(r.height / o.height, nt(o, a({ visibleArea: o, type: "resize" }))))), o = ve(o = Se(o, Rt(it(r, Fe(o)))), a({ visibleArea: o, type: "move" }));
1259
+ l > s ? o = xe(o, Math.min(r.width / o.width, it(o, a({ visibleArea: o, type: "resize" })))) : s > l && (o = xe(o, Math.min(r.height / o.height, it(o, a({ visibleArea: o, type: "resize" }))))), o = ve(o = Se(o, Rt(nt(r, Fe(o)))), a({ visibleArea: o, type: "move" }));
1258
1260
  }
1259
1261
  return { visibleArea: o, coordinates: r };
1260
1262
  }
1261
1263
  function go(e) {
1262
- var n = e.imageSize, t = e.visibleArea, i = e.coordinates, a = t || n;
1263
- return { left: (t ? t.left : 0) + a.width / 2 - i.width / 2, top: (t ? t.top : 0) + a.height / 2 - i.height / 2 };
1264
+ var i = e.imageSize, t = e.visibleArea, n = e.coordinates, a = t || i;
1265
+ return { left: (t ? t.left : 0) + a.width / 2 - n.width / 2, top: (t ? t.top : 0) + a.height / 2 - n.height / 2 };
1264
1266
  }
1265
1267
  function vo(e) {
1266
- var n = e.imageSize, t = e.visibleArea, i = e.aspectRatio, a = e.sizeRestrictions, o = t || n, r = Math.min(i.maximum || 1 / 0, Math.max(i.minimum || 0, oe(o))), l = o.width < o.height ? { width: 0.8 * o.width, height: 0.8 * o.width / r } : { height: 0.8 * o.height, width: 0.8 * o.height * r };
1267
- return De(H(H({}, l), { aspectRatio: i, sizeRestrictions: a }));
1268
+ var i = e.imageSize, t = e.visibleArea, n = e.aspectRatio, a = e.sizeRestrictions, o = t || i, r = Math.min(n.maximum || 1 / 0, Math.max(n.minimum || 0, oe(o))), l = o.width < o.height ? { width: 0.8 * o.width, height: 0.8 * o.width / r } : { height: 0.8 * o.height, width: 0.8 * o.height * r };
1269
+ return De(H(H({}, l), { aspectRatio: n, sizeRestrictions: a }));
1268
1270
  }
1269
1271
  function bo(e) {
1270
- var n, t, i = e.imageSize, a = e.visibleArea, o = e.boundaries, r = e.aspectRatio, l = e.sizeRestrictions, s = e.stencilSize, u = a || i;
1271
- return oe(u) > oe(o) ? t = (n = s.height * u.height / o.height) * oe(s) : n = (t = s.width * u.width / o.width) / oe(s), De({ width: t, height: n, aspectRatio: r, sizeRestrictions: l });
1272
+ var i, t, n = e.imageSize, a = e.visibleArea, o = e.boundaries, r = e.aspectRatio, l = e.sizeRestrictions, s = e.stencilSize, u = a || n;
1273
+ return oe(u) > oe(o) ? t = (i = s.height * u.height / o.height) * oe(s) : i = (t = s.width * u.width / o.width) / oe(s), De({ width: t, height: i, aspectRatio: r, sizeRestrictions: l });
1272
1274
  }
1273
1275
  function yo(e) {
1274
- var n = e.getAreaRestrictions, t = e.coordinates, i = e.imageSize, a = oe(e.boundaries);
1276
+ var i = e.getAreaRestrictions, t = e.coordinates, n = e.imageSize, a = oe(e.boundaries);
1275
1277
  if (t) {
1276
- var o = { height: Math.max(t.height, i.height), width: Math.max(t.width, i.width) }, r = Hn({ width: oe(o) > a ? o.width : o.height * a, height: oe(o) > a ? o.width / a : o.height }, Gt(n())), l = { left: t.left + t.width / 2 - r.width / 2, top: t.top + t.height / 2 - r.height / 2, width: r.width, height: r.height }, s = st(t, Fe(H({ left: 0, top: 0 }, i))), u = {};
1277
- return !s.left && !s.right && l.width <= i.width && (u.left = 0, u.right = i.width), !s.top && !s.bottom && l.height <= i.height && (u.top = 0, u.bottom = i.height), ve(l, u);
1278
+ var o = { height: Math.max(t.height, n.height), width: Math.max(t.width, n.width) }, r = Yi({ width: oe(o) > a ? o.width : o.height * a, height: oe(o) > a ? o.width / a : o.height }, Gt(i())), l = { left: t.left + t.width / 2 - r.width / 2, top: t.top + t.height / 2 - r.height / 2, width: r.width, height: r.height }, s = st(t, Fe(H({ left: 0, top: 0 }, n))), u = {};
1279
+ return !s.left && !s.right && l.width <= n.width && (u.left = 0, u.right = n.width), !s.top && !s.bottom && l.height <= n.height && (u.top = 0, u.bottom = n.height), ve(l, u);
1278
1280
  }
1279
- var d = oe(i);
1280
- return r = { height: d > a ? i.height : i.width / a, width: d > a ? i.height * a : i.width }, { left: i.width / 2 - r.width / 2, top: i.height / 2 - r.height / 2, width: r.width, height: r.height };
1281
+ var d = oe(n);
1282
+ return r = { height: d > a ? n.height : n.width / a, width: d > a ? n.height * a : n.width }, { left: n.width / 2 - r.width / 2, top: n.height / 2 - r.height / 2, width: r.width, height: r.height };
1281
1283
  }
1282
- function pt(e, n) {
1283
- return qn(e, Fe(n));
1284
+ function pt(e, i) {
1285
+ return Xi(e, Fe(i));
1284
1286
  }
1285
1287
  function _o(e) {
1286
- var n = e.event, t = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.getAreaRestrictions, r = e.positionRestrictions, l = e.adjustStencil, s = n.scale, u = n.move, d = H({}, i), h = H({}, t), m = 1, c = 1, y = s.factor && Math.abs(s.factor - 1) > 1e-3;
1288
+ var i = e.event, t = e.coordinates, n = e.visibleArea, a = e.sizeRestrictions, o = e.getAreaRestrictions, r = e.positionRestrictions, l = e.adjustStencil, s = i.scale, u = i.move, d = H({}, n), h = H({}, t), m = 1, c = 1, y = s.factor && Math.abs(s.factor - 1) > 1e-3;
1287
1289
  d = Se(d, { left: u.left || 0, top: u.top || 0 });
1288
- var v = { stencil: { minimum: Math.max(a.minWidth ? a.minWidth / h.width : 0, a.minHeight ? a.minHeight / h.height : 0), maximum: Math.min(a.maxWidth ? a.maxWidth / h.width : 1 / 0, a.maxHeight ? a.maxHeight / h.height : 1 / 0, nt(h, r)) }, area: { maximum: nt(d, o({ visibleArea: d, type: "resize" })) } };
1290
+ var v = { stencil: { minimum: Math.max(a.minWidth ? a.minWidth / h.width : 0, a.minHeight ? a.minHeight / h.height : 0), maximum: Math.min(a.maxWidth ? a.maxWidth / h.width : 1 / 0, a.maxHeight ? a.maxHeight / h.height : 1 / 0, it(h, r)) }, area: { maximum: it(d, o({ visibleArea: d, type: "resize" })) } };
1289
1291
  s.factor && y && (s.factor < 1 ? (c = Math.max(s.factor, v.stencil.minimum)) > 1 && (c = 1) : s.factor > 1 && (c = Math.min(s.factor, Math.min(v.area.maximum, v.stencil.maximum))) < 1 && (c = 1)), c && (d = xe(d, c, s.center));
1290
- var g = t.left - i.left, w = i.width + i.left - (t.width + t.left), z = t.top - i.top, O = i.height + i.top - (t.height + t.top);
1291
- return d = ve(d = Se(d, it(d, { left: r.left !== void 0 ? r.left - g * c : void 0, top: r.top !== void 0 ? r.top - z * c : void 0, bottom: r.bottom !== void 0 ? r.bottom + O * c : void 0, right: r.right !== void 0 ? r.right + w * c : void 0 })), o({ visibleArea: d, type: "move" })), h.width = h.width * c, h.height = h.height * c, h.left = d.left + g * c, h.top = d.top + z * c, h = ve(h, xt(Fe(d), r)), s.factor && y && l && (s.factor > 1 ? m = Math.min(v.area.maximum, s.factor) / c : s.factor < 1 && (m = Math.max(h.height / d.height, h.width / d.width, s.factor / c)), m !== 1 && (d = Se(d = ve(d = xe(d, m, s.factor > 1 ? s.center : ge(h)), o({ visibleArea: d, type: "move" })), Rt(it(h, Fe(d)))))), { coordinates: h, visibleArea: d };
1292
+ var g = t.left - n.left, w = n.width + n.left - (t.width + t.left), z = t.top - n.top, O = n.height + n.top - (t.height + t.top);
1293
+ return d = ve(d = Se(d, nt(d, { left: r.left !== void 0 ? r.left - g * c : void 0, top: r.top !== void 0 ? r.top - z * c : void 0, bottom: r.bottom !== void 0 ? r.bottom + O * c : void 0, right: r.right !== void 0 ? r.right + w * c : void 0 })), o({ visibleArea: d, type: "move" })), h.width = h.width * c, h.height = h.height * c, h.left = d.left + g * c, h.top = d.top + z * c, h = ve(h, xt(Fe(d), r)), s.factor && y && l && (s.factor > 1 ? m = Math.min(v.area.maximum, s.factor) / c : s.factor < 1 && (m = Math.max(h.height / d.height, h.width / d.width, s.factor / c)), m !== 1 && (d = Se(d = ve(d = xe(d, m, s.factor > 1 ? s.center : ge(h)), o({ visibleArea: d, type: "move" })), Rt(nt(h, Fe(d)))))), { coordinates: h, visibleArea: d };
1292
1294
  }
1293
1295
  function wo(e) {
1294
- var n = e.aspectRatio, t = e.getAreaRestrictions, i = e.coordinates, a = e.visibleArea, o = e.sizeRestrictions, r = e.positionRestrictions, l = e.imageSize, s = e.previousImageSize, u = e.angle, d = H({}, i), h = H({}, a), m = Ve(ge(H({ left: 0, top: 0 }, s)), u);
1295
- return (d = H(H({}, De({ sizeRestrictions: o, aspectRatio: n, width: d.width, height: d.height })), Ve(ge(d), u))).left -= m.left - l.width / 2 + d.width / 2, d.top -= m.top - l.height / 2 + d.height / 2, h = xe(h, At(h, t({ visibleArea: h, type: "resize" }))), { coordinates: d = ve(d, r), visibleArea: h = ve(h = Se(h, tt(ge(d), ge(i))), t({ visibleArea: h, type: "move" })) };
1296
+ var i = e.aspectRatio, t = e.getAreaRestrictions, n = e.coordinates, a = e.visibleArea, o = e.sizeRestrictions, r = e.positionRestrictions, l = e.imageSize, s = e.previousImageSize, u = e.angle, d = H({}, n), h = H({}, a), m = Ve(ge(H({ left: 0, top: 0 }, s)), u);
1297
+ return (d = H(H({}, De({ sizeRestrictions: o, aspectRatio: i, width: d.width, height: d.height })), Ve(ge(d), u))).left -= m.left - l.width / 2 + d.width / 2, d.top -= m.top - l.height / 2 + d.height / 2, h = xe(h, At(h, t({ visibleArea: h, type: "resize" }))), { coordinates: d = ve(d, r), visibleArea: h = ve(h = Se(h, tt(ge(d), ge(n))), t({ visibleArea: h, type: "move" })) };
1296
1298
  }
1297
1299
  function So(e) {
1298
- var n = e.flip, t = e.previousFlip, i = e.rotate, a = e.getAreaRestrictions, o = e.coordinates, r = e.visibleArea, l = e.imageSize, s = H({}, o), u = H({}, r), d = t.horizontal !== n.horizontal, h = t.vertical !== n.vertical;
1300
+ var i = e.flip, t = e.previousFlip, n = e.rotate, a = e.getAreaRestrictions, o = e.coordinates, r = e.visibleArea, l = e.imageSize, s = H({}, o), u = H({}, r), d = t.horizontal !== i.horizontal, h = t.vertical !== i.vertical;
1299
1301
  if (d || h) {
1300
- var m = Ve({ left: l.width / 2, top: l.height / 2 }, -i), c = Ve(ge(s), -i), y = Ve({ left: d ? m.left - (c.left - m.left) : c.left, top: h ? m.top - (c.top - m.top) : c.top }, i);
1301
- s = Se(s, tt(y, ge(s))), c = Ve(ge(u), -i), u = ve(u = Se(u, tt(y = Ve({ left: d ? m.left - (c.left - m.left) : c.left, top: h ? m.top - (c.top - m.top) : c.top }, i), ge(u))), a({ visibleArea: u, type: "move" }));
1302
+ var m = Ve({ left: l.width / 2, top: l.height / 2 }, -n), c = Ve(ge(s), -n), y = Ve({ left: d ? m.left - (c.left - m.left) : c.left, top: h ? m.top - (c.top - m.top) : c.top }, n);
1303
+ s = Se(s, tt(y, ge(s))), c = Ve(ge(u), -n), u = ve(u = Se(u, tt(y = Ve({ left: d ? m.left - (c.left - m.left) : c.left, top: h ? m.top - (c.top - m.top) : c.top }, n), ge(u))), a({ visibleArea: u, type: "move" }));
1302
1304
  }
1303
1305
  return { coordinates: s, visibleArea: u };
1304
1306
  }
1305
- function kn(e) {
1306
- var n = e.directions, t = e.coordinates, i = e.positionRestrictions, a = i === void 0 ? {} : i, o = e.sizeRestrictions, r = e.preserveRatio, l = e.compensate, s = H({}, n), u = Oe(t, s).width, d = Oe(t, s).height;
1307
+ function xi(e) {
1308
+ var i = e.directions, t = e.coordinates, n = e.positionRestrictions, a = n === void 0 ? {} : n, o = e.sizeRestrictions, r = e.preserveRatio, l = e.compensate, s = H({}, i), u = Oe(t, s).width, d = Oe(t, s).height;
1307
1309
  u < 0 && (s.left < 0 && s.right < 0 ? (s.left = -(t.width - o.minWidth) / (s.left / s.right), s.right = -(t.width - o.minWidth) / (s.right / s.left)) : s.left < 0 ? s.left = -(t.width - o.minWidth) : s.right < 0 && (s.right = -(t.width - o.minWidth))), d < 0 && (s.top < 0 && s.bottom < 0 ? (s.top = -(t.height - o.minHeight) / (s.top / s.bottom), s.bottom = -(t.height - o.minHeight) / (s.bottom / s.top)) : s.top < 0 ? s.top = -(t.height - o.minHeight) : s.bottom < 0 && (s.bottom = -(t.height - o.minHeight)));
1308
1310
  var h = st(Oe(t, s), a);
1309
1311
  l && (h.left && h.left > 0 && h.right === 0 ? (s.right += h.left, s.left -= h.left) : h.right && h.right > 0 && h.left === 0 && (s.left += h.right, s.right -= h.right), h.top && h.top > 0 && h.bottom === 0 ? (s.bottom += h.top, s.top -= h.top) : h.bottom && h.bottom > 0 && h.top === 0 && (s.top += h.bottom, s.bottom -= h.bottom), h = st(Oe(t, s), a));
@@ -1333,14 +1335,14 @@ function kn(e) {
1333
1335
  });
1334
1336
  return s;
1335
1337
  }
1336
- function ft(e, n, t) {
1337
- return n == 0 && t == 0 ? e / 2 : n == 0 ? 0 : t == 0 ? e : e * Math.abs(n / (n + t));
1338
+ function ft(e, i, t) {
1339
+ return i == 0 && t == 0 ? e / 2 : i == 0 ? 0 : t == 0 ? e : e * Math.abs(i / (i + t));
1338
1340
  }
1339
- var Co = Me("vue-simple-handler"), Ro = Me("vue-simple-handler-wrapper"), en = { name: "SimpleHandler", components: { HandlerWrapper: jn }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1341
+ var Co = Me("vue-simple-handler"), Ro = Me("vue-simple-handler-wrapper"), ei = { name: "SimpleHandler", components: { HandlerWrapper: Wi }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1340
1342
  return { hover: !1 };
1341
1343
  }, computed: { classes: function() {
1342
- var e, n = (Ae(e = {}, this.horizontalPosition, !!this.horizontalPosition), Ae(e, this.verticalPosition, !!this.verticalPosition), Ae(e, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), Ae(e, "hover", this.hover), e);
1343
- return { default: de(Co(n), this.defaultClass, this.hover && this.hoverClass), wrapper: de(Ro(n), this.wrapperClass) };
1344
+ var e, i = (Ae(e = {}, this.horizontalPosition, !!this.horizontalPosition), Ae(e, this.verticalPosition, !!this.verticalPosition), Ae(e, "".concat(this.horizontalPosition, "-").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), Ae(e, "hover", this.hover), e);
1345
+ return { default: de(Co(i), this.defaultClass, this.hover && this.hoverClass), wrapper: de(Ro(i), this.wrapperClass) };
1344
1346
  } }, methods: { onDrag: function(e) {
1345
1347
  this.$emit("drag", e);
1346
1348
  }, onEnter: function() {
@@ -1350,13 +1352,13 @@ var Co = Me("vue-simple-handler"), Ro = Me("vue-simple-handler-wrapper"), en = {
1350
1352
  }, onDragEnd: function() {
1351
1353
  this.$emit("drag-end");
1352
1354
  } }, emits: ["drag", "drag-end"] };
1353
- en.render = function(e, n, t, i, a, o) {
1355
+ ei.render = function(e, i, t, n, a, o) {
1354
1356
  var r = B("HandlerWrapper");
1355
1357
  return F(), G(r, { class: o.classes.wrapper, "vertical-position": t.verticalPosition, "horizontal-position": t.horizontalPosition, disabled: t.disabled, onDrag: o.onDrag, onDragEnd: o.onDragEnd, onEnter: o.onEnter, onLeave: o.onLeave }, { default: N(function() {
1356
1358
  return [C("div", { class: o.classes.default }, null, 2)];
1357
1359
  }), _: 1 }, 8, ["class", "vertical-position", "horizontal-position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
1358
1360
  };
1359
- var Ao = Me("vue-simple-line"), xo = Me("vue-simple-line-wrapper"), tn = { name: "SimpleLine", components: { LineWrapper: Yn }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1361
+ var Ao = Me("vue-simple-line"), xo = Me("vue-simple-line-wrapper"), ti = { name: "SimpleLine", components: { LineWrapper: ji }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
1360
1362
  return { hover: !1 };
1361
1363
  }, computed: { classes: function() {
1362
1364
  return { root: de(Ao(Ae({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: de(xo(Ae({}, this.position, !0)), this.wrapperClass) };
@@ -1369,16 +1371,16 @@ var Ao = Me("vue-simple-line"), xo = Me("vue-simple-line-wrapper"), tn = { name:
1369
1371
  }, onDragEnd: function() {
1370
1372
  this.$emit("drag-end");
1371
1373
  } }, emits: ["drag", "drag-end"] };
1372
- tn.render = function(e, n, t, i, a, o) {
1374
+ ti.render = function(e, i, t, n, a, o) {
1373
1375
  var r = B("LineWrapper");
1374
1376
  return F(), G(r, { class: o.classes.wrapper, position: t.position, disabled: t.disabled, onDrag: o.onDrag, onDragEnd: o.onDragEnd, onEnter: o.onEnter, onLeave: o.onLeave }, { default: N(function() {
1375
1377
  return [C("div", { class: o.classes.root }, null, 2)];
1376
1378
  }), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
1377
1379
  };
1378
- var Pt = Me("vue-bounding-box"), ko = ["east", "west", null], Mo = ["south", "north", null], Zn = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
1380
+ var Pt = Me("vue-bounding-box"), ko = ["east", "west", null], Mo = ["south", "north", null], qi = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
1379
1381
  return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
1380
1382
  } }, handlersComponent: { type: [Object, String], default: function() {
1381
- return en;
1383
+ return ei;
1382
1384
  } }, handlersClasses: { type: Object, default: function() {
1383
1385
  return {};
1384
1386
  } }, handlersWrappersClasses: { type: Object, default: function() {
@@ -1386,18 +1388,18 @@ var Pt = Me("vue-bounding-box"), ko = ["east", "west", null], Mo = ["south", "no
1386
1388
  } }, lines: { type: Object, default: function() {
1387
1389
  return { west: !0, north: !0, east: !0, south: !0 };
1388
1390
  } }, linesComponent: { type: [Object, String], default: function() {
1389
- return tn;
1391
+ return ti;
1390
1392
  } }, linesClasses: { type: Object, default: function() {
1391
1393
  return {};
1392
1394
  } }, linesWrappersClasses: { type: Object, default: function() {
1393
1395
  return {};
1394
1396
  } }, resizable: { type: Boolean, default: !0 } }, data: function() {
1395
1397
  var e = [];
1396
- return ko.forEach(function(n) {
1398
+ return ko.forEach(function(i) {
1397
1399
  Mo.forEach(function(t) {
1398
- if (n !== t) {
1399
- var i = Bn(n, t), a = i.name, o = i.classname;
1400
- e.push({ name: a, classname: o, verticalDirection: t, horizontalDirection: n });
1400
+ if (i !== t) {
1401
+ var n = Li(i, t), a = n.name, o = n.classname;
1402
+ e.push({ name: a, classname: o, verticalDirection: t, horizontalDirection: i });
1401
1403
  }
1402
1404
  });
1403
1405
  }), { points: e };
@@ -1405,25 +1407,25 @@ var Pt = Me("vue-bounding-box"), ko = ["east", "west", null], Mo = ["south", "no
1405
1407
  var e = {};
1406
1408
  return this.width && this.height && (e.width = "".concat(this.width, "px"), e.height = "".concat(this.height, "px"), this.transitions && this.transitions.enabled && (e.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction))), e;
1407
1409
  }, classes: function() {
1408
- var e = this.handlersClasses, n = this.handlersWrappersClasses, t = this.linesClasses, i = this.linesWrappersClasses;
1409
- return { root: Pt(), handlers: e, handlersWrappers: n, lines: t, linesWrappers: i };
1410
+ var e = this.handlersClasses, i = this.handlersWrappersClasses, t = this.linesClasses, n = this.linesWrappersClasses;
1411
+ return { root: Pt(), handlers: e, handlersWrappers: i, lines: t, linesWrappers: n };
1410
1412
  }, lineNodes: function() {
1411
- var e = this, n = [];
1413
+ var e = this, i = [];
1412
1414
  return this.points.forEach(function(t) {
1413
- t.horizontalDirection && t.verticalDirection || !e.lines[t.name] || n.push({ name: t.name, component: e.linesComponent, class: de(e.classes.lines.default, e.classes.lines[t.name], !e.resizable && e.classes.lines.disabled), wrapperClass: de(e.classes.linesWrappers.default, e.classes.linesWrappers[t.name], !e.resizable && e.classes.linesWrappers.disabled), hoverClass: e.classes.lines.hover, verticalDirection: t.verticalDirection, horizontalDirection: t.horizontalDirection, disabled: !e.resizable });
1414
- }), n;
1415
+ t.horizontalDirection && t.verticalDirection || !e.lines[t.name] || i.push({ name: t.name, component: e.linesComponent, class: de(e.classes.lines.default, e.classes.lines[t.name], !e.resizable && e.classes.lines.disabled), wrapperClass: de(e.classes.linesWrappers.default, e.classes.linesWrappers[t.name], !e.resizable && e.classes.linesWrappers.disabled), hoverClass: e.classes.lines.hover, verticalDirection: t.verticalDirection, horizontalDirection: t.horizontalDirection, disabled: !e.resizable });
1416
+ }), i;
1415
1417
  }, handlerNodes: function() {
1416
- var e = this, n = [], t = this.width, i = this.height;
1418
+ var e = this, i = [], t = this.width, n = this.height;
1417
1419
  return this.points.forEach(function(a) {
1418
1420
  if (e.handlers[a.name]) {
1419
1421
  var o = { name: a.name, component: e.handlersComponent, class: de(e.classes.handlers.default, e.classes.handlers[a.name]), wrapperClass: de(e.classes.handlersWrappers.default, e.classes.handlersWrappers[a.name]), hoverClass: e.classes.handlers.hover, verticalDirection: a.verticalDirection, horizontalDirection: a.horizontalDirection, disabled: !e.resizable };
1420
- if (t && i) {
1421
- var r = a.horizontalDirection, l = a.verticalDirection, s = r === "east" ? t : r === "west" ? 0 : t / 2, u = l === "south" ? i : l === "north" ? 0 : i / 2;
1422
+ if (t && n) {
1423
+ var r = a.horizontalDirection, l = a.verticalDirection, s = r === "east" ? t : r === "west" ? 0 : t / 2, u = l === "south" ? n : l === "north" ? 0 : n / 2;
1422
1424
  o.wrapperClass = Pt("handler"), o.wrapperStyle = { transform: "translate(".concat(s, "px, ").concat(u, "px)") }, e.transitions && e.transitions.enabled && (o.wrapperStyle.transition = "".concat(e.transitions.time, "ms ").concat(e.transitions.timingFunction));
1423
1425
  } else o.wrapperClass = Pt("handler", Ae({}, a.classname, !0));
1424
- n.push(o);
1426
+ i.push(o);
1425
1427
  }
1426
- }), n;
1428
+ }), i;
1427
1429
  } }, beforeMount: function() {
1428
1430
  window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
1429
1431
  }, beforeUnmount: function() {
@@ -1432,26 +1434,26 @@ var Pt = Me("vue-bounding-box"), ko = ["east", "west", null], Mo = ["south", "no
1432
1434
  this.touches = [];
1433
1435
  }, methods: { onEnd: function() {
1434
1436
  this.$emit("resize-end");
1435
- }, onHandlerDrag: function(e, n, t) {
1436
- var i, a = e.shift(), o = a.left, r = a.top, l = { left: 0, right: 0, top: 0, bottom: 0 };
1437
- n === "west" ? l.left -= o : n === "east" && (l.right += o), t === "north" ? l.top -= r : t === "south" && (l.bottom += r), !t && n ? i = "width" : t && !n && (i = "height"), this.resizable && this.$emit("resize", new io(l, { allowedDirections: { left: n === "west" || !n, right: n === "east" || !n, bottom: t === "south" || !t, top: t === "north" || !t }, preserveAspectRatio: e.nativeEvent && e.nativeEvent.shiftKey, respectDirection: i }));
1437
+ }, onHandlerDrag: function(e, i, t) {
1438
+ var n, a = e.shift(), o = a.left, r = a.top, l = { left: 0, right: 0, top: 0, bottom: 0 };
1439
+ i === "west" ? l.left -= o : i === "east" && (l.right += o), t === "north" ? l.top -= r : t === "south" && (l.bottom += r), !t && i ? n = "width" : t && !i && (n = "height"), this.resizable && this.$emit("resize", new no(l, { allowedDirections: { left: i === "west" || !i, right: i === "east" || !i, bottom: t === "south" || !t, top: t === "north" || !t }, preserveAspectRatio: e.nativeEvent && e.nativeEvent.shiftKey, respectDirection: n }));
1438
1440
  } }, emits: ["resize", "resize-end"] };
1439
- Zn.render = function(e, n, t, i, a, o) {
1441
+ qi.render = function(e, i, t, n, a, o) {
1440
1442
  return F(), G("div", { ref: "box", class: o.classes.root, style: o.style }, [he(e.$slots, "default"), C("div", null, [(F(!0), G(Re, null, Ke(o.lineNodes, function(r) {
1441
1443
  return F(), G(yt(r.component), { key: r.name, "default-class": r.class, "hover-class": r.hoverClass, "wrapper-class": r.wrapperClass, position: r.name, disabled: r.disabled, onDrag: function(l) {
1442
1444
  return o.onHandlerDrag(l, r.horizontalDirection, r.verticalDirection);
1443
- }, onDragEnd: n[1] || (n[1] = function(l) {
1445
+ }, onDragEnd: i[1] || (i[1] = function(l) {
1444
1446
  return o.onEnd();
1445
1447
  }) }, null, 8, ["default-class", "hover-class", "wrapper-class", "position", "disabled", "onDrag"]);
1446
1448
  }), 128))]), (F(!0), G(Re, null, Ke(o.handlerNodes, function(r) {
1447
1449
  return F(), G("div", { key: r.name, style: r.wrapperStyle, class: r.wrapperClass }, [(F(), G(yt(r.component), { "default-class": r.class, "hover-class": r.hoverClass, "wrapper-class": r.wrapperClass, "horizontal-position": r.horizontalDirection, "vertical-position": r.verticalDirection, disabled: r.disabled, onDrag: function(l) {
1448
1450
  return o.onHandlerDrag(l, r.horizontalDirection, r.verticalDirection);
1449
- }, onDragEnd: n[2] || (n[2] = function(l) {
1451
+ }, onDragEnd: i[2] || (i[2] = function(l) {
1450
1452
  return o.onEnd();
1451
1453
  }) }, null, 8, ["default-class", "hover-class", "wrapper-class", "horizontal-position", "vertical-position", "disabled", "onDrag"]))], 6);
1452
1454
  }), 128))], 6);
1453
1455
  };
1454
- var Oo = Me("vue-draggable-area"), Qn = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
1456
+ var Oo = Me("vue-draggable-area"), Zi = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
1455
1457
  return { default: Oo() };
1456
1458
  } }, beforeMount: function() {
1457
1459
  window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
@@ -1461,66 +1463,66 @@ var Oo = Me("vue-draggable-area"), Qn = { name: "DraggableArea", props: { movabl
1461
1463
  this.touches = [], this.touchStarted = !1;
1462
1464
  }, methods: { onTouchStart: function(e) {
1463
1465
  if (e.cancelable) {
1464
- var n = this.movable && e.touches.length === 1;
1465
- n && (this.touches = qe(e.touches)), (this.touchStarted || n) && (e.preventDefault(), e.stopPropagation());
1466
+ var i = this.movable && e.touches.length === 1;
1467
+ i && (this.touches = qe(e.touches)), (this.touchStarted || i) && (e.preventDefault(), e.stopPropagation());
1466
1468
  }
1467
1469
  }, onTouchEnd: function() {
1468
1470
  this.touchStarted = !1, this.processEnd();
1469
1471
  }, onTouchMove: function(e) {
1470
- this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : Wn({ x: this.touches[0].clientX, y: this.touches[0].clientY }, { x: e.touches[0].clientX, y: e.touches[0].clientY }) > this.activationDistance && (this.initAnchor({ clientX: e.touches[0].clientX, clientY: e.touches[0].clientY }), this.touchStarted = !0));
1472
+ this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : Gi({ x: this.touches[0].clientX, y: this.touches[0].clientY }, { x: e.touches[0].clientX, y: e.touches[0].clientY }) > this.activationDistance && (this.initAnchor({ clientX: e.touches[0].clientX, clientY: e.touches[0].clientY }), this.touchStarted = !0));
1471
1473
  }, onMouseDown: function(e) {
1472
1474
  if (this.movable && e.button === 0) {
1473
- var n = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1474
- this.touches = [n], this.initAnchor(n), e.stopPropagation();
1475
+ var i = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1476
+ this.touches = [i], this.initAnchor(i), e.stopPropagation();
1475
1477
  }
1476
1478
  }, onMouseMove: function(e) {
1477
1479
  this.touches.length && (this.processMove(e, [{ fake: !0, clientX: e.clientX, clientY: e.clientY }]), e.preventDefault && e.cancelable && e.preventDefault(), e.stopPropagation());
1478
1480
  }, onMouseUp: function() {
1479
1481
  this.processEnd();
1480
1482
  }, initAnchor: function(e) {
1481
- var n = this.$refs.container.getBoundingClientRect(), t = n.left, i = n.top;
1482
- this.anchor = { x: e.clientX - t, y: e.clientY - i };
1483
- }, processMove: function(e, n) {
1484
- var t = qe(n);
1483
+ var i = this.$refs.container.getBoundingClientRect(), t = i.left, n = i.top;
1484
+ this.anchor = { x: e.clientX - t, y: e.clientY - n };
1485
+ }, processMove: function(e, i) {
1486
+ var t = qe(i);
1485
1487
  if (this.touches.length) {
1486
- var i = this.$refs.container.getBoundingClientRect(), a = i.left, o = i.top;
1488
+ var n = this.$refs.container.getBoundingClientRect(), a = n.left, o = n.top;
1487
1489
  this.touches.length === 1 && t.length === 1 && this.$emit("move", new Qt({ left: t[0].clientX - (a + this.anchor.x), top: t[0].clientY - (o + this.anchor.y) }));
1488
1490
  }
1489
1491
  }, processEnd: function() {
1490
1492
  this.touches.length && this.$emit("move-end"), this.touches = [];
1491
1493
  } }, emits: ["move", "move-end"] };
1492
- Qn.render = function(e, n, t, i, a, o) {
1493
- return F(), G("div", { ref: "container", onTouchstart: n[1] || (n[1] = function() {
1494
+ Zi.render = function(e, i, t, n, a, o) {
1495
+ return F(), G("div", { ref: "container", onTouchstart: i[1] || (i[1] = function() {
1494
1496
  return o.onTouchStart && o.onTouchStart.apply(o, arguments);
1495
- }), onMousedown: n[2] || (n[2] = function() {
1497
+ }), onMousedown: i[2] || (i[2] = function() {
1496
1498
  return o.onMouseDown && o.onMouseDown.apply(o, arguments);
1497
1499
  }) }, [he(e.$slots, "default")], 544);
1498
1500
  };
1499
1501
  function Dt(e) {
1500
- var n, t;
1501
- return { rotate: e.rotate || 0, flip: { horizontal: ((n = e == null ? void 0 : e.flip) === null || n === void 0 ? void 0 : n.horizontal) || !1, vertical: ((t = e == null ? void 0 : e.flip) === null || t === void 0 ? void 0 : t.vertical) || !1 } };
1502
+ var i, t;
1503
+ return { rotate: e.rotate || 0, flip: { horizontal: ((i = e == null ? void 0 : e.flip) === null || i === void 0 ? void 0 : i.horizontal) || !1, vertical: ((t = e == null ? void 0 : e.flip) === null || t === void 0 ? void 0 : t.vertical) || !1 } };
1502
1504
  }
1503
1505
  function zo(e) {
1504
- return new Promise(function(n, t) {
1506
+ return new Promise(function(i, t) {
1505
1507
  try {
1506
- if (e) if (/^data:/i.test(e)) n(function(s) {
1508
+ if (e) if (/^data:/i.test(e)) i(function(s) {
1507
1509
  s = s.replace(/^data:([^;]+);base64,/gim, "");
1508
1510
  for (var u = atob(s), d = u.length, h = new ArrayBuffer(d), m = new Uint8Array(h), c = 0; c < d; c++) m[c] = u.charCodeAt(c);
1509
1511
  return h;
1510
1512
  }(e));
1511
1513
  else if (/^blob:/i.test(e)) {
1512
- var i = new FileReader();
1513
- i.onload = function(s) {
1514
- n(s.target.result);
1514
+ var n = new FileReader();
1515
+ n.onload = function(s) {
1516
+ i(s.target.result);
1515
1517
  }, o = e, r = function(s) {
1516
- i.readAsArrayBuffer(s);
1518
+ n.readAsArrayBuffer(s);
1517
1519
  }, (l = new XMLHttpRequest()).open("GET", o, !0), l.responseType = "blob", l.onload = function() {
1518
1520
  this.status != 200 && this.status !== 0 || r(this.response);
1519
1521
  }, l.send();
1520
1522
  } else {
1521
1523
  var a = new XMLHttpRequest();
1522
1524
  a.onreadystatechange = function() {
1523
- a.readyState === 4 && (a.status === 200 || a.status === 0 ? n(a.response) : t("Warning: could not load an image to parse its orientation"), a = null);
1525
+ a.readyState === 4 && (a.status === 200 || a.status === 0 ? i(a.response) : t("Warning: could not load an image to parse its orientation"), a = null);
1524
1526
  }, a.onprogress = function() {
1525
1527
  a.getResponseHeader("content-type") !== "image/jpeg" && a.abort();
1526
1528
  }, a.withCredentials = !1, a.open("GET", e, !0), a.responseType = "arraybuffer", a.send(null);
@@ -1532,13 +1534,13 @@ function zo(e) {
1532
1534
  var o, r, l;
1533
1535
  });
1534
1536
  }
1535
- function Jn(e) {
1536
- var n = e.rotate, t = e.flip, i = e.scaleX, a = e.scaleY, o = "";
1537
- return o += " rotate(" + n + "deg) ", o += " scaleX(" + i * (t.horizontal ? -1 : 1) + ") ", o += " scaleY(" + a * (t.vertical ? -1 : 1) + ") ";
1537
+ function Qi(e) {
1538
+ var i = e.rotate, t = e.flip, n = e.scaleX, a = e.scaleY, o = "";
1539
+ return o += " rotate(" + i + "deg) ", o += " scaleX(" + n * (t.horizontal ? -1 : 1) + ") ", o += " scaleY(" + a * (t.vertical ? -1 : 1) + ") ";
1538
1540
  }
1539
1541
  function Fo(e) {
1540
1542
  try {
1541
- var n, t = new DataView(e), i = void 0, a = void 0, o = void 0, r = void 0;
1543
+ var i, t = new DataView(e), n = void 0, a = void 0, o = void 0, r = void 0;
1542
1544
  if (t.getUint8(0) === 255 && t.getUint8(1) === 216) for (var l = t.byteLength, s = 2; s + 1 < l; ) {
1543
1545
  if (t.getUint8(s) === 255 && t.getUint8(s + 1) === 225) {
1544
1546
  o = s;
@@ -1546,51 +1548,51 @@ function Fo(e) {
1546
1548
  }
1547
1549
  s++;
1548
1550
  }
1549
- if (o && (i = o + 10, function(c, y, v) {
1551
+ if (o && (n = o + 10, function(c, y, v) {
1550
1552
  var g, w = "";
1551
1553
  for (g = y, v += y; g < v; g++) w += String.fromCharCode(c.getUint8(g));
1552
1554
  return w;
1553
1555
  }(t, o + 4, 4) === "Exif")) {
1554
- var u = t.getUint16(i);
1555
- if (((a = u === 18761) || u === 19789) && t.getUint16(i + 2, a) === 42) {
1556
- var d = t.getUint32(i + 4, a);
1557
- d >= 8 && (r = i + d);
1556
+ var u = t.getUint16(n);
1557
+ if (((a = u === 18761) || u === 19789) && t.getUint16(n + 2, a) === 42) {
1558
+ var d = t.getUint32(n + 4, a);
1559
+ d >= 8 && (r = n + d);
1558
1560
  }
1559
1561
  }
1560
1562
  if (r) {
1561
1563
  for (var h = t.getUint16(r, a), m = 0; m < h; m++)
1562
1564
  if (s = r + 12 * m + 2, t.getUint16(s, a) === 274) {
1563
- s += 8, n = t.getUint16(s, a), t.setUint16(s, 1, a);
1565
+ s += 8, i = t.getUint16(s, a), t.setUint16(s, 1, a);
1564
1566
  break;
1565
1567
  }
1566
1568
  }
1567
- return n;
1569
+ return i;
1568
1570
  } catch {
1569
1571
  return null;
1570
1572
  }
1571
1573
  }
1572
- function Mn(e, n) {
1573
- var t = n.getBoundingClientRect(), i = t.left, a = t.top, o = { left: 0, top: 0 }, r = 0;
1574
+ function ki(e, i) {
1575
+ var t = i.getBoundingClientRect(), n = t.left, a = t.top, o = { left: 0, top: 0 }, r = 0;
1574
1576
  return e.forEach(function(l) {
1575
- o.left += (l.clientX - i) / e.length, o.top += (l.clientY - a) / e.length;
1577
+ o.left += (l.clientX - n) / e.length, o.top += (l.clientY - a) / e.length;
1576
1578
  }), e.forEach(function(l) {
1577
- r += Wn({ x: o.left, y: o.top }, { x: l.clientX - i, y: l.clientY - a });
1579
+ r += Gi({ x: o.left, y: o.top }, { x: l.clientX - n, y: l.clientY - a });
1578
1580
  }), { centerMass: o, spread: r, count: e.length };
1579
1581
  }
1580
- var ei = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 }, eventsFilter: { type: Function, required: !1 } }, beforeMount: function() {
1582
+ var Ji = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 }, eventsFilter: { type: Function, required: !1 } }, beforeMount: function() {
1581
1583
  window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
1582
1584
  }, beforeUnmount: function() {
1583
1585
  window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
1584
1586
  }, created: function() {
1585
1587
  this.transforming = !1, this.debouncedProcessEnd = Bt(this.processEnd), this.touches = [];
1586
- }, methods: { processMove: function(e, n) {
1588
+ }, methods: { processMove: function(e, i) {
1587
1589
  if (this.touches.length) {
1588
- if (this.touches.length === 1 && n.length === 1) this.$emit("move", new at({ left: this.touches[0].clientX - n[0].clientX, top: this.touches[0].clientY - n[0].clientY }));
1590
+ if (this.touches.length === 1 && i.length === 1) this.$emit("move", new at({ left: this.touches[0].clientX - i[0].clientX, top: this.touches[0].clientY - i[0].clientY }));
1589
1591
  else if (this.touches.length > 1 && this.touchResize) {
1590
- var t = Mn(n, this.$refs.container), i = this.oldGeometricProperties;
1591
- i.count === t.count && i.count > 1 && this.$emit("resize", new at({ left: i.centerMass.left - t.centerMass.left, top: i.centerMass.top - t.centerMass.top }, { factor: i.spread / t.spread, center: t.centerMass })), this.oldGeometricProperties = t;
1592
+ var t = ki(i, this.$refs.container), n = this.oldGeometricProperties;
1593
+ n.count === t.count && n.count > 1 && this.$emit("resize", new at({ left: n.centerMass.left - t.centerMass.left, top: n.centerMass.top - t.centerMass.top }, { factor: n.spread / t.spread, center: t.centerMass })), this.oldGeometricProperties = t;
1592
1594
  }
1593
- this.touches = n;
1595
+ this.touches = i;
1594
1596
  }
1595
1597
  }, processEnd: function() {
1596
1598
  this.transforming && (this.transforming = !1, this.$emit("transform-end"));
@@ -1600,27 +1602,27 @@ var ei = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
1600
1602
  return this.eventsFilter ? this.eventsFilter(e, this.transforming) !== !1 : (e.preventDefault(), e.stopPropagation(), !0);
1601
1603
  }, onTouchStart: function(e) {
1602
1604
  if (e.cancelable && (this.touchMove || this.touchResize && e.touches.length > 1) && this.processEvent(e)) {
1603
- var n = this.$refs.container, t = n.getBoundingClientRect(), i = t.left, a = t.top, o = t.bottom, r = t.right;
1605
+ var i = this.$refs.container, t = i.getBoundingClientRect(), n = t.left, a = t.top, o = t.bottom, r = t.right;
1604
1606
  this.touches = qe(e.touches).filter(function(l) {
1605
- return l.clientX > i && l.clientX < r && l.clientY > a && l.clientY < o;
1606
- }), this.oldGeometricProperties = Mn(this.touches, n);
1607
+ return l.clientX > n && l.clientX < r && l.clientY > a && l.clientY < o;
1608
+ }), this.oldGeometricProperties = ki(this.touches, i);
1607
1609
  }
1608
1610
  }, onTouchEnd: function(e) {
1609
1611
  e.touches.length === 0 && (this.touches = [], this.processEnd());
1610
1612
  }, onTouchMove: function(e) {
1611
- var n = this;
1613
+ var i = this;
1612
1614
  if (this.touches.length) {
1613
- var t = qe(e.touches).filter(function(i) {
1614
- return !i.identifier || n.touches.find(function(a) {
1615
- return a.identifier === i.identifier;
1615
+ var t = qe(e.touches).filter(function(n) {
1616
+ return !n.identifier || i.touches.find(function(a) {
1617
+ return a.identifier === n.identifier;
1616
1618
  });
1617
1619
  });
1618
1620
  this.processEvent(e) && (this.processMove(e, t), this.processStart());
1619
1621
  }
1620
1622
  }, onMouseDown: function(e) {
1621
1623
  if (this.mouseMove && "buttons" in e && e.buttons === 1 && this.processEvent(e)) {
1622
- var n = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1623
- this.touches = [n], this.processStart();
1624
+ var i = { fake: !0, clientX: e.clientX, clientY: e.clientY };
1625
+ this.touches = [i], this.processStart();
1624
1626
  }
1625
1627
  }, onMouseMove: function(e) {
1626
1628
  this.touches.length && this.processEvent(e) && this.processMove(e, [{ clientX: e.clientX, clientY: e.clientY }]);
@@ -1628,32 +1630,32 @@ var ei = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { typ
1628
1630
  this.touches = [], this.processEnd();
1629
1631
  }, onWheel: function(e) {
1630
1632
  if (this.wheelResize && this.processEvent(e)) {
1631
- var n = this.$refs.container.getBoundingClientRect(), t = n.left, i = n.top, a = 1 + this.wheelResize.ratio * (r = e.deltaY || e.detail || e.wheelDelta, (l = +r) == 0 || Gn(l) ? l : l > 0 ? 1 : -1), o = { left: e.clientX - t, top: e.clientY - i };
1633
+ var i = this.$refs.container.getBoundingClientRect(), t = i.left, n = i.top, a = 1 + this.wheelResize.ratio * (r = e.deltaY || e.detail || e.wheelDelta, (l = +r) == 0 || Ki(l) ? l : l > 0 ? 1 : -1), o = { left: e.clientX - t, top: e.clientY - n };
1632
1634
  this.$emit("resize", new at({}, { factor: a, center: o })), this.touches.length || this.debouncedProcessEnd();
1633
1635
  }
1634
1636
  var r, l;
1635
1637
  } }, emits: ["resize", "move", "transform-end"] };
1636
- ei.render = function(e, n, t, i, a, o) {
1637
- return F(), G("div", { ref: "container", onTouchstart: n[1] || (n[1] = function() {
1638
+ Ji.render = function(e, i, t, n, a, o) {
1639
+ return F(), G("div", { ref: "container", onTouchstart: i[1] || (i[1] = function() {
1638
1640
  return o.onTouchStart && o.onTouchStart.apply(o, arguments);
1639
- }), onMousedown: n[2] || (n[2] = function() {
1641
+ }), onMousedown: i[2] || (i[2] = function() {
1640
1642
  return o.onMouseDown && o.onMouseDown.apply(o, arguments);
1641
- }), onWheel: n[3] || (n[3] = function() {
1643
+ }), onWheel: i[3] || (i[3] = function() {
1642
1644
  return o.onWheel && o.onWheel.apply(o, arguments);
1643
1645
  }) }, [he(e.$slots, "default")], 544);
1644
1646
  };
1645
- var jt = { components: { TransformableImage: ei }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } }, emits: ["resize", "move"] };
1646
- jt.render = function(e, n, t, i, a, o) {
1647
+ var jt = { components: { TransformableImage: Ji }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } }, emits: ["resize", "move"] };
1648
+ jt.render = function(e, i, t, n, a, o) {
1647
1649
  var r = B("transformable-image");
1648
- return F(), G(r, { "touch-move": t.touchMove, "touch-resize": t.touchResize, "mouse-move": t.mouseMove, "wheel-resize": t.wheelResize, onMove: n[1] || (n[1] = function(l) {
1650
+ return F(), G(r, { "touch-move": t.touchMove, "touch-resize": t.touchResize, "mouse-move": t.mouseMove, "wheel-resize": t.wheelResize, onMove: i[1] || (i[1] = function(l) {
1649
1651
  return e.$emit("move", l);
1650
- }), onResize: n[2] || (n[2] = function(l) {
1652
+ }), onResize: i[2] || (i[2] = function(l) {
1651
1653
  return e.$emit("resize", l);
1652
1654
  }) }, { default: N(function() {
1653
1655
  return [he(e.$slots, "default")];
1654
1656
  }), _: 3 }, 8, ["touch-move", "touch-resize", "mouse-move", "wheel-resize"]);
1655
1657
  };
1656
- var gt = Me("vue-preview"), ti = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {
1658
+ var gt = Me("vue-preview"), en = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {
1657
1659
  return {};
1658
1660
  } }, imageClass: { type: String }, width: { type: Number }, height: { type: Number }, fill: { type: Boolean } }, data: function() {
1659
1661
  return { calculatedImageSize: { width: 0, height: 0 }, calculatedSize: { width: 0, height: 0 } };
@@ -1668,9 +1670,9 @@ var gt = Me("vue-preview"), ti = { props: { coordinates: { type: Object }, trans
1668
1670
  return this.transitions && this.transitions.enabled && (e.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), e;
1669
1671
  }, imageStyle: function() {
1670
1672
  if (this.coordinates && this.image) {
1671
- var e = this.coordinates.width / this.size.width, n = ie(ie({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / e, scaleY: 1 / e }), t = this.imageSize.width, i = this.imageSize.height, a = Xn({ width: t, height: i }, n.rotate), o = { width: "".concat(t, "px"), height: "".concat(i, "px"), left: "0px", top: "0px" }, r = { rotate: { left: (t - a.width) * n.scaleX / 2, top: (i - a.height) * n.scaleY / 2 }, scale: { left: (1 - n.scaleX) * t / 2, top: (1 - n.scaleY) * i / 2 } };
1673
+ var e = this.coordinates.width / this.size.width, i = ne(ne({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / e, scaleY: 1 / e }), t = this.imageSize.width, n = this.imageSize.height, a = Hi({ width: t, height: n }, i.rotate), o = { width: "".concat(t, "px"), height: "".concat(n, "px"), left: "0px", top: "0px" }, r = { rotate: { left: (t - a.width) * i.scaleX / 2, top: (n - a.height) * i.scaleY / 2 }, scale: { left: (1 - i.scaleX) * t / 2, top: (1 - i.scaleY) * n / 2 } };
1672
1674
  return o.transform = `translate(
1673
- `.concat(-this.coordinates.left / e - r.rotate.left - r.scale.left, "px,").concat(-this.coordinates.top / e - r.rotate.top - r.scale.top, "px) ") + Jn(n), this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
1675
+ `.concat(-this.coordinates.left / e - r.rotate.left - r.scale.left, "px,").concat(-this.coordinates.top / e - r.rotate.top - r.scale.top, "px) ") + Qi(i), this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
1674
1676
  }
1675
1677
  return {};
1676
1678
  }, size: function() {
@@ -1696,18 +1698,18 @@ var gt = Me("vue-preview"), ti = { props: { coordinates: { type: Object }, trans
1696
1698
  var e = this.$refs.image;
1697
1699
  e && e.complete && this.refreshImage(), this.refresh();
1698
1700
  } } };
1699
- ti.render = function(e, n, t, i, a, o) {
1701
+ en.render = function(e, i, t, n, a, o) {
1700
1702
  return F(), G("div", { ref: "root", class: o.classes.root, style: o.style }, [C("div", { ref: "wrapper", class: o.classes.wrapper, style: o.wrapperStyle }, [Xe(C("img", { ref: "image", src: t.image && t.image.src, class: o.classes.image, style: o.imageStyle }, null, 14, ["src"]), [[wt, t.image && t.image.src]])], 6)], 6);
1701
1703
  };
1702
- var ni = { components: { Preview: ti }, inheritAttrs: !1 };
1703
- ni.render = function(e, n, t, i, a, o) {
1704
+ var tn = { components: { Preview: en }, inheritAttrs: !1 };
1705
+ tn.render = function(e, i, t, n, a, o) {
1704
1706
  var r = B("preview");
1705
- return F(), G(r, Dn(e.$attrs, { fill: !0 }), null, 16);
1707
+ return F(), G(r, Pi(e.$attrs, { fill: !0 }), null, 16);
1706
1708
  };
1707
- var Tt = Me("vue-rectangle-stencil"), ii = { name: "RectangleStencil", components: { StencilPreview: ni, BoundingBox: Zn, DraggableArea: Qn }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
1708
- return en;
1709
+ var Tt = Me("vue-rectangle-stencil"), nn = { name: "RectangleStencil", components: { StencilPreview: tn, BoundingBox: qi, DraggableArea: Zi }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
1710
+ return ei;
1709
1711
  } }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
1710
- return tn;
1712
+ return ti;
1711
1713
  } }, aspectRatio: { type: [Number, String] }, minAspectRatio: { type: [Number, String] }, maxAspectRatio: { type: [Number, String] }, movable: { type: Boolean, default: !0 }, resizable: { type: Boolean, default: !0 }, transitions: { type: Object }, movingClass: { type: String }, resizingClass: { type: String }, previewClass: { type: String }, boundingBoxClass: { type: String }, linesClasses: { type: Object, default: function() {
1712
1714
  return {};
1713
1715
  } }, linesWrappersClasses: { type: Object, default: function() {
@@ -1721,7 +1723,7 @@ var Tt = Me("vue-rectangle-stencil"), ii = { name: "RectangleStencil", component
1721
1723
  }, computed: { classes: function() {
1722
1724
  return { stencil: de(Tt({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: de(Tt("preview"), this.previewClass), boundingBox: de(Tt("bounding-box"), this.boundingBoxClass) };
1723
1725
  }, style: function() {
1724
- var e = this.stencilCoordinates, n = e.height, t = e.width, i = e.left, a = e.top, o = { width: "".concat(t, "px"), height: "".concat(n, "px"), transform: "translate(".concat(i, "px, ").concat(a, "px)") };
1726
+ var e = this.stencilCoordinates, i = e.height, t = e.width, n = e.left, a = e.top, o = { width: "".concat(t, "px"), height: "".concat(i, "px"), transform: "translate(".concat(n, "px, ").concat(a, "px)") };
1725
1727
  return this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
1726
1728
  } }, methods: { onMove: function(e) {
1727
1729
  this.$emit("move", e), this.moving = !0;
@@ -1734,7 +1736,7 @@ var Tt = Me("vue-rectangle-stencil"), ii = { name: "RectangleStencil", component
1734
1736
  }, aspectRatios: function() {
1735
1737
  return { minimum: this.aspectRatio || this.minAspectRatio, maximum: this.aspectRatio || this.maxAspectRatio };
1736
1738
  } }, emits: ["resize", "resize-end", "move", "move-end"] };
1737
- ii.render = function(e, n, t, i, a, o) {
1739
+ nn.render = function(e, i, t, n, a, o) {
1738
1740
  var r = B("stencil-preview"), l = B("draggable-area"), s = B("bounding-box");
1739
1741
  return F(), G("div", { class: o.classes.stencil, style: o.style }, [C(s, { width: t.stencilCoordinates.width, height: t.stencilCoordinates.height, transitions: t.transitions, class: o.classes.boundingBox, handlers: t.handlers, "handlers-component": t.handlersComponent, "handlers-classes": t.handlersClasses, "handlers-wrappers-classes": t.handlersWrappersClasses, lines: t.lines, "lines-component": t.linesComponent, "lines-classes": t.linesClasses, "lines-wrappers-classes": t.linesWrappersClasses, resizable: t.resizable, onResize: o.onResize, onResizeEnd: o.onResizeEnd }, { default: N(function() {
1740
1742
  return [C(l, { movable: t.movable, onMove: o.onMove, onMoveEnd: o.onMoveEnd }, { default: N(function() {
@@ -1742,8 +1744,8 @@ ii.render = function(e, n, t, i, a, o) {
1742
1744
  }), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
1743
1745
  }), _: 1 }, 8, ["width", "height", "transitions", "class", "handlers", "handlers-component", "handlers-classes", "handlers-wrappers-classes", "lines", "lines-component", "lines-classes", "lines-wrappers-classes", "resizable", "onResize", "onResizeEnd"])], 6);
1744
1746
  };
1745
- var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper", components: { BackgroundWrapper: jt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
1746
- return ii;
1747
+ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), on = { name: "Cropper", components: { BackgroundWrapper: jt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
1748
+ return nn;
1747
1749
  } }, backgroundWrapperComponent: { type: [Object, String], default: function() {
1748
1750
  return jt;
1749
1751
  } }, stencilProps: { type: Object, default: function() {
@@ -1753,11 +1755,11 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
1753
1755
  } }, roundResult: { type: Boolean, default: !0 }, defaultSize: { type: [Function, Object] }, defaultPosition: { type: [Function, Object] }, defaultVisibleArea: { type: [Function, Object] }, defaultTransforms: { type: [Function, Object] }, defaultBoundaries: { type: [Function, String], validator: function(e) {
1754
1756
  return !(typeof e == "string" && e !== "fill" && e !== "fit");
1755
1757
  } }, priority: { type: String, default: "coordinates" }, stencilSize: { type: [Object, Function] }, resizeImage: { type: [Boolean, Object], default: !0 }, moveImage: { type: [Boolean, Object], default: !0 }, autoZoomAlgorithm: { type: Function }, resizeAlgorithm: { type: Function, default: function(e) {
1756
- var n = e.event, t = e.coordinates, i = e.aspectRatio, a = e.positionRestrictions, o = e.sizeRestrictions, r = H(H({}, t), { right: t.left + t.width, bottom: t.top + t.height }), l = n.params || {}, s = H({}, n.directions), u = l.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };
1758
+ var i = e.event, t = e.coordinates, n = e.aspectRatio, a = e.positionRestrictions, o = e.sizeRestrictions, r = H(H({}, t), { right: t.left + t.width, bottom: t.top + t.height }), l = i.params || {}, s = H({}, i.directions), u = l.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };
1757
1759
  o.widthFrozen && (s.left = 0, s.right = 0), o.heightFrozen && (s.top = 0, s.bottom = 0), ze.forEach(function(I) {
1758
1760
  u[I] || (s[I] = 0);
1759
1761
  });
1760
- var d = Oe(r, s = kn({ coordinates: r, directions: s, sizeRestrictions: o, positionRestrictions: a })).width, h = Oe(r, s).height, m = l.preserveRatio ? oe(r) : It(d / h, i);
1762
+ var d = Oe(r, s = xi({ coordinates: r, directions: s, sizeRestrictions: o, positionRestrictions: a })).width, h = Oe(r, s).height, m = l.preserveRatio ? oe(r) : It(d / h, n);
1761
1763
  if (m) {
1762
1764
  var c = l.respectDirection;
1763
1765
  if (c || (c = r.width >= r.height || m === 1 ? "width" : "height"), c === "width") {
@@ -1773,39 +1775,39 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
1773
1775
  s.left = -ft(w, z, O), s.right = -ft(w, O, z);
1774
1776
  } else u.left ? s.left = -w : u.right ? s.right = -w : u.top ? s.top = 0 : u.bottom && (s.bottom = 0);
1775
1777
  }
1776
- s = kn({ directions: s, coordinates: r, sizeRestrictions: o, positionRestrictions: a, preserveRatio: !0, compensate: l.compensate });
1778
+ s = xi({ directions: s, coordinates: r, sizeRestrictions: o, positionRestrictions: a, preserveRatio: !0, compensate: l.compensate });
1777
1779
  }
1778
- return d = Oe(r, s).width, h = Oe(r, s).height, (m = l.preserveRatio ? oe(r) : It(d / h, i)) && Math.abs(m - d / h) > 1e-3 && ze.forEach(function(I) {
1780
+ return d = Oe(r, s).width, h = Oe(r, s).height, (m = l.preserveRatio ? oe(r) : It(d / h, n)) && Math.abs(m - d / h) > 1e-3 && ze.forEach(function(I) {
1779
1781
  u[I] || (s[I] = 0);
1780
1782
  }), Wt({ event: new Qt({ left: -s.left, top: -s.top }), coordinates: { width: t.width + s.right + s.left, height: t.height + s.top + s.bottom, left: t.left, top: t.top }, positionRestrictions: a });
1781
1783
  } }, moveAlgorithm: { type: Function, default: Wt }, initStretcher: { type: Function, default: function(e) {
1782
- var n = e.stretcher, t = e.imageSize, i = oe(t);
1783
- n.style.width = t.width + "px", n.style.height = n.clientWidth / i + "px", n.style.width = n.clientWidth + "px";
1784
+ var i = e.stretcher, t = e.imageSize, n = oe(t);
1785
+ i.style.width = t.width + "px", i.style.height = i.clientWidth / n + "px", i.style.width = i.clientWidth + "px";
1784
1786
  } }, fitCoordinates: { type: Function, default: function(e) {
1785
- var n = e.visibleArea, t = e.coordinates, i = e.aspectRatio, a = e.sizeRestrictions, o = e.positionRestrictions, r = H(H({}, t), De({ width: t.width, height: t.height, aspectRatio: i, sizeRestrictions: { maxWidth: n.width, maxHeight: n.height, minHeight: Math.min(n.height, a.minHeight), minWidth: Math.min(n.width, a.minWidth) } }));
1786
- return r = ve(r = Se(r, tt(ge(t), ge(r))), xt(Fe(n), o));
1787
+ var i = e.visibleArea, t = e.coordinates, n = e.aspectRatio, a = e.sizeRestrictions, o = e.positionRestrictions, r = H(H({}, t), De({ width: t.width, height: t.height, aspectRatio: n, sizeRestrictions: { maxWidth: i.width, maxHeight: i.height, minHeight: Math.min(i.height, a.minHeight), minWidth: Math.min(i.width, a.minWidth) } }));
1788
+ return r = ve(r = Se(r, tt(ge(t), ge(r))), xt(Fe(i), o));
1787
1789
  } }, fitVisibleArea: { type: Function, default: function(e) {
1788
- var n = e.visibleArea, t = e.boundaries, i = e.getAreaRestrictions, a = e.coordinates, o = H({}, n);
1789
- o.height = o.width / oe(t), o.top += (n.height - o.height) / 2, (a.height - o.height > 0 || a.width - o.width > 0) && (o = xe(o, Math.max(a.height / o.height, a.width / o.width)));
1790
- var r = Rt(it(a, Fe(o = xe(o, At(o, i({ visibleArea: o, type: "resize" }))))));
1791
- return o.width < a.width && (r.left = 0), o.height < a.height && (r.top = 0), o = ve(o = Se(o, r), i({ visibleArea: o, type: "move" }));
1790
+ var i = e.visibleArea, t = e.boundaries, n = e.getAreaRestrictions, a = e.coordinates, o = H({}, i);
1791
+ o.height = o.width / oe(t), o.top += (i.height - o.height) / 2, (a.height - o.height > 0 || a.width - o.width > 0) && (o = xe(o, Math.max(a.height / o.height, a.width / o.width)));
1792
+ var r = Rt(nt(a, Fe(o = xe(o, At(o, n({ visibleArea: o, type: "resize" }))))));
1793
+ return o.width < a.width && (r.left = 0), o.height < a.height && (r.top = 0), o = ve(o = Se(o, r), n({ visibleArea: o, type: "move" }));
1792
1794
  } }, areaRestrictionsAlgorithm: { type: Function, default: function(e) {
1793
- var n = e.visibleArea, t = e.boundaries, i = e.imageSize, a = e.imageRestriction, o = e.type, r = {};
1794
- return a === "fill-area" ? r = { left: 0, top: 0, right: i.width, bottom: i.height } : a === "fit-area" && (oe(t) > oe(i) ? (r = { top: 0, bottom: i.height }, n && o === "move" && (n.width > i.width ? (r.left = -(n.width - i.width) / 2, r.right = i.width - r.left) : (r.left = 0, r.right = i.width))) : (r = { left: 0, right: i.width }, n && o === "move" && (n.height > i.height ? (r.top = -(n.height - i.height) / 2, r.bottom = i.height - r.top) : (r.top = 0, r.bottom = i.height)))), r;
1795
+ var i = e.visibleArea, t = e.boundaries, n = e.imageSize, a = e.imageRestriction, o = e.type, r = {};
1796
+ return a === "fill-area" ? r = { left: 0, top: 0, right: n.width, bottom: n.height } : a === "fit-area" && (oe(t) > oe(n) ? (r = { top: 0, bottom: n.height }, i && o === "move" && (i.width > n.width ? (r.left = -(i.width - n.width) / 2, r.right = n.width - r.left) : (r.left = 0, r.right = n.width))) : (r = { left: 0, right: n.width }, i && o === "move" && (i.height > n.height ? (r.top = -(i.height - n.height) / 2, r.bottom = n.height - r.top) : (r.top = 0, r.bottom = n.height)))), r;
1795
1797
  } }, sizeRestrictionsAlgorithm: { type: Function, default: function(e) {
1796
1798
  return { minWidth: e.minWidth, minHeight: e.minHeight, maxWidth: e.maxWidth, maxHeight: e.maxHeight };
1797
1799
  } }, positionRestrictionsAlgorithm: { type: Function, default: function(e) {
1798
- var n = e.imageSize, t = {};
1799
- return e.imageRestriction !== "none" && (t = { left: 0, top: 0, right: n.width, bottom: n.height }), t;
1800
+ var i = e.imageSize, t = {};
1801
+ return e.imageRestriction !== "none" && (t = { left: 0, top: 0, right: i.width, bottom: i.height }), t;
1800
1802
  } } }, data: function() {
1801
- return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: ie({}, Cn) };
1803
+ return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: ne({}, Si) };
1802
1804
  }, computed: { image: function() {
1803
1805
  return { src: this.imageAttributes.src, width: this.imageAttributes.width, height: this.imageAttributes.height, transforms: this.imageTransforms };
1804
1806
  }, imageTransforms: function() {
1805
1807
  return { rotate: this.appliedImageTransforms.rotate, flip: { horizontal: this.appliedImageTransforms.flip.horizontal, vertical: this.appliedImageTransforms.flip.vertical }, translateX: this.visibleArea ? this.visibleArea.left / this.coefficient : 0, translateY: this.visibleArea ? this.visibleArea.top / this.coefficient : 0, scaleX: 1 / this.coefficient, scaleY: 1 / this.coefficient };
1806
1808
  }, imageSize: function() {
1807
- var e = function(n) {
1808
- return n * Math.PI / 180;
1809
+ var e = function(i) {
1810
+ return i * Math.PI / 180;
1809
1811
  }(this.imageTransforms.rotate);
1810
1812
  return { width: Math.abs(this.imageAttributes.width * Math.cos(e)) + Math.abs(this.imageAttributes.height * Math.sin(e)), height: Math.abs(this.imageAttributes.width * Math.sin(e)) + Math.abs(this.imageAttributes.height * Math.cos(e)) };
1811
1813
  }, initialized: function() {
@@ -1822,14 +1824,14 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
1822
1824
  }, sizeRestrictions: function() {
1823
1825
  if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
1824
1826
  var e = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: fe(this.minWidth) ? 0 : ht(this.minWidth), minHeight: fe(this.minHeight) ? 0 : ht(this.minHeight), maxWidth: fe(this.maxWidth) ? 1 / 0 : ht(this.maxWidth), maxHeight: fe(this.maxHeight) ? 1 / 0 : ht(this.maxHeight) });
1825
- if (e = function(i) {
1826
- var a = i.areaRestrictions, o = i.sizeRestrictions, r = i.boundaries, l = i.positionRestrictions, s = H(H({}, o), { minWidth: o.minWidth !== void 0 ? o.minWidth : 0, minHeight: o.minHeight !== void 0 ? o.minHeight : 0, maxWidth: o.maxWidth !== void 0 ? o.maxWidth : 1 / 0, maxHeight: o.maxHeight !== void 0 ? o.maxHeight : 1 / 0 });
1827
+ if (e = function(n) {
1828
+ var a = n.areaRestrictions, o = n.sizeRestrictions, r = n.boundaries, l = n.positionRestrictions, s = H(H({}, o), { minWidth: o.minWidth !== void 0 ? o.minWidth : 0, minHeight: o.minHeight !== void 0 ? o.minHeight : 0, maxWidth: o.maxWidth !== void 0 ? o.maxWidth : 1 / 0, maxHeight: o.maxHeight !== void 0 ? o.maxHeight : 1 / 0 });
1827
1829
  l.left !== void 0 && l.right !== void 0 && (s.maxWidth = Math.min(s.maxWidth, l.right - l.left)), l.bottom !== void 0 && l.top !== void 0 && (s.maxHeight = Math.min(s.maxHeight, l.bottom - l.top));
1828
- var u = Gt(a), d = Hn(r, u);
1830
+ var u = Gt(a), d = Yi(r, u);
1829
1831
  return u.width < 1 / 0 && (!s.maxWidth || s.maxWidth > d.width) && (s.maxWidth = Math.min(s.maxWidth, d.width)), u.height < 1 / 0 && (!s.maxHeight || s.maxHeight > d.height) && (s.maxHeight = Math.min(s.maxHeight, d.height)), s.minWidth > s.maxWidth && (s.minWidth = s.maxWidth, s.widthFrozen = !0), s.minHeight > s.maxHeight && (s.minHeight = s.maxHeight, s.heightFrozen = !0), s;
1830
1832
  }({ sizeRestrictions: e, areaRestrictions: this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }), imageSize: this.imageSize, boundaries: this.boundaries, positionRestrictions: this.positionRestrictions, imageRestriction: this.imageRestriction, visibleArea: this.visibleArea, stencilSize: this.getStencilSize() }), this.visibleArea && this.stencilSize) {
1831
- var n = this.getStencilSize(), t = Gt(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
1832
- e.maxWidth = Math.min(e.maxWidth, t.width * n.width / this.boundaries.width), e.maxHeight = Math.min(e.maxHeight, t.height * n.height / this.boundaries.height), e.maxWidth < e.minWidth && (e.minWidth = e.maxWidth), e.maxHeight < e.minHeight && (e.minHeight = e.maxHeight);
1833
+ var i = this.getStencilSize(), t = Gt(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
1834
+ e.maxWidth = Math.min(e.maxWidth, t.width * i.width / this.boundaries.width), e.maxHeight = Math.min(e.maxHeight, t.height * i.height / this.boundaries.height), e.maxWidth < e.minWidth && (e.minWidth = e.maxWidth), e.maxHeight < e.minHeight && (e.minHeight = e.maxHeight);
1833
1835
  }
1834
1836
  return e;
1835
1837
  }
@@ -1840,15 +1842,15 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
1840
1842
  return { cropper: Ie(), image: de(Ie("image"), this.imageClass), stencil: Ie("stencil"), boundaries: de(Ie("boundaries"), this.boundariesClass), stretcher: de(Ie("stretcher")), background: de(Ie("background"), this.backgroundClass), foreground: de(Ie("foreground"), this.foregroundClass), imageWrapper: de(Ie("image-wrapper")), cropperWrapper: de(Ie("cropper-wrapper")) };
1841
1843
  }, stencilCoordinates: function() {
1842
1844
  if (this.initialized) {
1843
- var e = this.coordinates, n = e.width, t = e.height, i = e.left, a = e.top;
1844
- return { width: n / this.coefficient, height: t / this.coefficient, left: (i - this.visibleArea.left) / this.coefficient, top: (a - this.visibleArea.top) / this.coefficient };
1845
+ var e = this.coordinates, i = e.width, t = e.height, n = e.left, a = e.top;
1846
+ return { width: i / this.coefficient, height: t / this.coefficient, left: (n - this.visibleArea.left) / this.coefficient, top: (a - this.visibleArea.top) / this.coefficient };
1845
1847
  }
1846
1848
  return this.defaultCoordinates();
1847
1849
  }, boundariesStyle: function() {
1848
1850
  var e = { width: this.boundaries.width ? "".concat(Math.round(this.boundaries.width), "px") : "auto", height: this.boundaries.height ? "".concat(Math.round(this.boundaries.height), "px") : "auto", transition: "opacity ".concat(this.transitionTime, "ms"), pointerEvents: this.imageLoaded ? "all" : "none" };
1849
1851
  return this.imageLoaded || (e.opacity = "0"), e;
1850
1852
  }, imageStyle: function() {
1851
- var e = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, n = { left: (e.width - this.imageSize.width) / (2 * this.coefficient), top: (e.height - this.imageSize.height) / (2 * this.coefficient) }, t = { left: (1 - 1 / this.coefficient) * e.width / 2, top: (1 - 1 / this.coefficient) * e.height / 2 }, i = ie(ie({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height) }), a = { width: "".concat(e.width, "px"), height: "".concat(e.height, "px"), left: "0px", top: "0px", transform: "translate(".concat(-n.left - t.left - this.imageTransforms.translateX, "px, ").concat(-n.top - t.top - this.imageTransforms.translateY, "px)") + Jn(i) };
1853
+ var e = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, i = { left: (e.width - this.imageSize.width) / (2 * this.coefficient), top: (e.height - this.imageSize.height) / (2 * this.coefficient) }, t = { left: (1 - 1 / this.coefficient) * e.width / 2, top: (1 - 1 / this.coefficient) * e.height / 2 }, n = ne(ne({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height) }), a = { width: "".concat(e.width, "px"), height: "".concat(e.height, "px"), left: "0px", top: "0px", transform: "translate(".concat(-i.left - t.left - this.imageTransforms.translateX, "px, ").concat(-i.top - t.top - this.imageTransforms.translateY, "px)") + Qi(n) };
1852
1854
  return this.transitionsOptions.enabled && (a.transition = "".concat(this.transitionsOptions.time, "ms ").concat(this.transitionsOptions.timingFunction)), a;
1853
1855
  } }, watch: { src: function() {
1854
1856
  this.onChangeImage();
@@ -1867,9 +1869,9 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
1867
1869
  this.onPropsChange();
1868
1870
  }, imageRestriction: function() {
1869
1871
  this.reset();
1870
- }, stencilProps: function(e, n) {
1872
+ }, stencilProps: function(e, i) {
1871
1873
  ["aspectRatio", "minAspectRatio", "maxAspectRatio"].find(function(t) {
1872
- return e[t] !== n[t];
1874
+ return e[t] !== i[t];
1873
1875
  }) && this.$nextTick(this.onPropsChange);
1874
1876
  } }, created: function() {
1875
1877
  this.debouncedUpdate = Bt(this.update, this.debounce), this.debouncedDisableTransitions = Bt(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
@@ -1878,28 +1880,28 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
1878
1880
  }, unmounted: function() {
1879
1881
  window.removeEventListener("resize", this.refresh), window.removeEventListener("orientationchange", this.refresh), this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.debouncedUpdate.clear(), this.debouncedDisableTransitions.clear();
1880
1882
  }, methods: { getResult: function() {
1881
- var e = this.initialized ? this.prepareResult(ie({}, this.coordinates)) : this.defaultCoordinates(), n = { rotate: this.imageTransforms.rotate % 360, flip: ie({}, this.imageTransforms.flip) };
1883
+ var e = this.initialized ? this.prepareResult(ne({}, this.coordinates)) : this.defaultCoordinates(), i = { rotate: this.imageTransforms.rotate % 360, flip: ne({}, this.imageTransforms.flip) };
1882
1884
  if (this.src && this.imageLoaded) {
1883
1885
  var t = this;
1884
- return { image: this.image, coordinates: e, visibleArea: this.visibleArea ? ie({}, this.visibleArea) : null, imageTransforms: n, get canvas() {
1886
+ return { image: this.image, coordinates: e, visibleArea: this.visibleArea ? ne({}, this.visibleArea) : null, imageTransforms: i, get canvas() {
1885
1887
  return t.canvas ? t.getCanvas() : void 0;
1886
1888
  } };
1887
1889
  }
1888
- return { image: this.image, coordinates: e, visibleArea: this.visibleArea ? ie({}, this.visibleArea) : null, canvas: void 0, imageTransforms: n };
1889
- }, zoom: function(e, n) {
1890
- var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = t.transitions, a = i === void 0 || i;
1891
- this.onManipulateImage(new at({}, { factor: 1 / e, center: n }), { normalize: !1, transitions: a });
1892
- }, move: function(e, n) {
1893
- var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = t.transitions, a = i === void 0 || i;
1894
- this.onManipulateImage(new at({ left: e || 0, top: n || 0 }), { normalize: !1, transitions: a });
1890
+ return { image: this.image, coordinates: e, visibleArea: this.visibleArea ? ne({}, this.visibleArea) : null, canvas: void 0, imageTransforms: i };
1891
+ }, zoom: function(e, i) {
1892
+ var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.transitions, a = n === void 0 || n;
1893
+ this.onManipulateImage(new at({}, { factor: 1 / e, center: i }), { normalize: !1, transitions: a });
1894
+ }, move: function(e, i) {
1895
+ var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.transitions, a = n === void 0 || n;
1896
+ this.onManipulateImage(new at({ left: e || 0, top: i || 0 }), { normalize: !1, transitions: a });
1895
1897
  }, setCoordinates: function(e) {
1896
- var n = this, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = t.autoZoom, a = i === void 0 || i, o = t.transitions, r = o === void 0 || o;
1898
+ var i = this, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.autoZoom, a = n === void 0 || n, o = t.transitions, r = o === void 0 || o;
1897
1899
  this.$nextTick(function() {
1898
- n.imageLoaded ? (n.transitionsActive || (r && n.enableTransitions(), n.coordinates = n.applyTransform(e), a && n.runAutoZoom("setCoordinates"), r && n.debouncedDisableTransitions()), n.onChange()) : n.delayedTransforms = e;
1900
+ i.imageLoaded ? (i.transitionsActive || (r && i.enableTransitions(), i.coordinates = i.applyTransform(e), a && i.runAutoZoom("setCoordinates"), r && i.debouncedDisableTransitions()), i.onChange()) : i.delayedTransforms = e;
1899
1901
  });
1900
1902
  }, refresh: function() {
1901
- var e = this, n = this.$refs.image;
1902
- if (this.src && n) return this.initialized ? this.updateVisibleArea().then(function() {
1903
+ var e = this, i = this.$refs.image;
1904
+ if (this.src && i) return this.initialized ? this.updateVisibleArea().then(function() {
1903
1905
  e.onChange();
1904
1906
  }) : this.resetVisibleArea().then(function() {
1905
1907
  e.onChange();
@@ -1910,27 +1912,27 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
1910
1912
  e.onChange(!1);
1911
1913
  });
1912
1914
  }, awaitRender: function(e) {
1913
- var n = this;
1915
+ var i = this;
1914
1916
  this.awaiting || (this.awaiting = !0, this.$nextTick(function() {
1915
- e(), n.awaiting = !1;
1917
+ e(), i.awaiting = !1;
1916
1918
  }));
1917
1919
  }, prepareResult: function(e) {
1918
- return this.roundResult ? function(n) {
1919
- var t = n.coordinates, i = n.sizeRestrictions, a = n.positionRestrictions, o = { width: Math.round(t.width), height: Math.round(t.height), left: Math.round(t.left), top: Math.round(t.top) };
1920
- return o.width > i.maxWidth ? o.width = Math.floor(t.width) : o.width < i.minWidth && (o.width = Math.ceil(t.width)), o.height > i.maxHeight ? o.height = Math.floor(t.height) : o.height < i.minHeight && (o.height = Math.ceil(t.height)), ve(o, a);
1921
- }(ie(ie({}, this.getPublicProperties()), {}, { positionRestrictions: pt(this.positionRestrictions, this.visibleArea), coordinates: e })) : e;
1922
- }, processAutoZoom: function(e, n, t, i) {
1920
+ return this.roundResult ? function(i) {
1921
+ var t = i.coordinates, n = i.sizeRestrictions, a = i.positionRestrictions, o = { width: Math.round(t.width), height: Math.round(t.height), left: Math.round(t.left), top: Math.round(t.top) };
1922
+ return o.width > n.maxWidth ? o.width = Math.floor(t.width) : o.width < n.minWidth && (o.width = Math.ceil(t.width)), o.height > n.maxHeight ? o.height = Math.floor(t.height) : o.height < n.minHeight && (o.height = Math.ceil(t.height)), ve(o, a);
1923
+ }(ne(ne({}, this.getPublicProperties()), {}, { positionRestrictions: pt(this.positionRestrictions, this.visibleArea), coordinates: e })) : e;
1924
+ }, processAutoZoom: function(e, i, t, n) {
1923
1925
  var a = this.autoZoomAlgorithm;
1924
1926
  a || (a = this.stencilSize ? ho : this.autoZoom ? po : fo);
1925
- var o = a({ event: { type: e, params: i }, visibleArea: n, coordinates: t, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
1926
- return ie(ie({}, o), {}, { changed: !Rn(o.visibleArea, n) || !Rn(o.coordinates, t) });
1927
+ var o = a({ event: { type: e, params: n }, visibleArea: i, coordinates: t, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
1928
+ return ne(ne({}, o), {}, { changed: !Ci(o.visibleArea, i) || !Ci(o.coordinates, t) });
1927
1929
  }, runAutoZoom: function(e) {
1928
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.transitions, i = t !== void 0 && t, a = to(n, Eo), o = this.processAutoZoom(e, this.visibleArea, this.coordinates, a), r = o.visibleArea, l = o.coordinates, s = o.changed;
1929
- i && s && this.enableTransitions(), this.visibleArea = r, this.coordinates = l, i && s && this.debouncedDisableTransitions();
1930
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = i.transitions, n = t !== void 0 && t, a = to(i, Eo), o = this.processAutoZoom(e, this.visibleArea, this.coordinates, a), r = o.visibleArea, l = o.coordinates, s = o.changed;
1931
+ n && s && this.enableTransitions(), this.visibleArea = r, this.coordinates = l, n && s && this.debouncedDisableTransitions();
1930
1932
  }, normalizeEvent: function(e) {
1931
- return function(n) {
1932
- var t = n.event, i = n.visibleArea, a = n.coefficient;
1933
- if (t.type === "manipulateImage") return H(H({}, t), { move: { left: t.move && t.move.left ? a * t.move.left : 0, top: t.move && t.move.top ? a * t.move.top : 0 }, scale: { factor: t.scale && t.scale.factor ? t.scale.factor : 1, center: t.scale && t.scale.center ? { left: t.scale.center.left * a + i.left, top: t.scale.center.top * a + i.top } : null } });
1933
+ return function(i) {
1934
+ var t = i.event, n = i.visibleArea, a = i.coefficient;
1935
+ if (t.type === "manipulateImage") return H(H({}, t), { move: { left: t.move && t.move.left ? a * t.move.left : 0, top: t.move && t.move.top ? a * t.move.top : 0 }, scale: { factor: t.scale && t.scale.factor ? t.scale.factor : 1, center: t.scale && t.scale.center ? { left: t.scale.center.left * a + n.left, top: t.scale.center.top * a + n.top } : null } });
1934
1936
  if (t.type === "resize") {
1935
1937
  var o = H(H({}, t), { directions: H({}, t.directions) });
1936
1938
  return ze.forEach(function(l) {
@@ -1944,22 +1946,22 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
1944
1946
  }), r;
1945
1947
  }
1946
1948
  return t;
1947
- }(ie(ie({}, this.getPublicProperties()), {}, { event: e }));
1949
+ }(ne(ne({}, this.getPublicProperties()), {}, { event: e }));
1948
1950
  }, getCanvas: function() {
1949
1951
  if (this.$refs.canvas) {
1950
- var e = this.$refs.canvas, n = this.$refs.image, t = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(l, s, u) {
1951
- var d = u.rotate, h = u.flip, m = { width: s.naturalWidth, height: s.naturalHeight }, c = Xn(m, d), y = l.getContext("2d");
1952
+ var e = this.$refs.canvas, i = this.$refs.image, t = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(l, s, u) {
1953
+ var d = u.rotate, h = u.flip, m = { width: s.naturalWidth, height: s.naturalHeight }, c = Hi(m, d), y = l.getContext("2d");
1952
1954
  l.height = c.height, l.width = c.width, y.save();
1953
1955
  var v = Ve(ge(H({ left: 0, top: 0 }, m)), d);
1954
1956
  return y.translate(-(v.left - c.width / 2), -(v.top - c.height / 2)), y.rotate(d * Math.PI / 180), y.translate(h.horizontal ? m.width : 0, h.vertical ? m.height : 0), y.scale(h.horizontal ? -1 : 1, h.vertical ? -1 : 1), y.drawImage(s, 0, 0, m.width, m.height), y.restore(), l;
1955
- }(this.$refs.sourceCanvas, n, this.imageTransforms) : n, i = ie({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: "high", fillColor: "transparent" }, this.canvas), a = function(l) {
1957
+ }(this.$refs.sourceCanvas, i, this.imageTransforms) : i, n = ne({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: "high", fillColor: "transparent" }, this.canvas), a = function(l) {
1956
1958
  return l.find(function(s) {
1957
1959
  return u = s, !Number.isNaN(parseFloat(u)) && isFinite(u);
1958
1960
  var u;
1959
1961
  });
1960
- }, o = De({ sizeRestrictions: { minWidth: a([i.width, i.minWidth]) || 0, minHeight: a([i.height, i.minHeight]) || 0, maxWidth: a([i.width, i.maxWidth]) || 1 / 0, maxHeight: a([i.height, i.maxHeight]) || 1 / 0 }, width: this.coordinates.width, height: this.coordinates.height, aspectRatio: { minimum: this.coordinates.width / this.coordinates.height, maximum: this.coordinates.width / this.coordinates.height } });
1961
- if (i.maxArea && o.width * o.height > i.maxArea) {
1962
- var r = Math.sqrt(i.maxArea / (o.width * o.height));
1962
+ }, o = De({ sizeRestrictions: { minWidth: a([n.width, n.minWidth]) || 0, minHeight: a([n.height, n.minHeight]) || 0, maxWidth: a([n.width, n.maxWidth]) || 1 / 0, maxHeight: a([n.height, n.maxHeight]) || 1 / 0 }, width: this.coordinates.width, height: this.coordinates.height, aspectRatio: { minimum: this.coordinates.width / this.coordinates.height, maximum: this.coordinates.width / this.coordinates.height } });
1963
+ if (n.maxArea && o.width * o.height > n.maxArea) {
1964
+ var r = Math.sqrt(n.maxArea / (o.width * o.height));
1963
1965
  o = { width: Math.round(r * o.width), height: Math.round(r * o.height) };
1964
1966
  }
1965
1967
  return function(l, s, u, d, h) {
@@ -1968,55 +1970,55 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
1968
1970
  m.clearRect(0, 0, l.width, l.height), h && (h.imageSmoothingEnabled && (m.imageSmoothingEnabled = h.imageSmoothingEnabled), h.imageSmoothingQuality && (m.imageSmoothingQuality = h.imageSmoothingQuality), h.fillColor && (m.fillStyle = h.fillColor, m.fillRect(0, 0, l.width, l.height), m.save()));
1969
1971
  var c = u.left < 0 ? -u.left : 0, y = u.top < 0 ? -u.top : 0;
1970
1972
  m.drawImage(s, u.left + c, u.top + y, u.width, u.height, c * (l.width / u.width), y * (l.height / u.height), l.width, l.height);
1971
- }(e, t, this.coordinates, o, i), e;
1973
+ }(e, t, this.coordinates, o, n), e;
1972
1974
  }
1973
1975
  }, update: function() {
1974
1976
  this.$emit("change", this.getResult());
1975
1977
  }, applyTransform: function(e) {
1976
- var n = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], t = this.visibleArea && n ? co(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, i = this.visibleArea && n ? pt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
1977
- return mo({ transform: e, coordinates: this.coordinates, imageSize: this.imageSize, sizeRestrictions: t, positionRestrictions: i, aspectRatio: this.getAspectRatio(), visibleArea: this.visibleArea });
1978
+ var i = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], t = this.visibleArea && i ? co(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, n = this.visibleArea && i ? pt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
1979
+ return mo({ transform: e, coordinates: this.coordinates, imageSize: this.imageSize, sizeRestrictions: t, positionRestrictions: n, aspectRatio: this.getAspectRatio(), visibleArea: this.visibleArea });
1978
1980
  }, resetCoordinates: function() {
1979
1981
  var e = this;
1980
1982
  if (this.$refs.image) {
1981
1983
  this.$refs.cropper, this.$refs.image;
1982
- var n = this.defaultSize;
1983
- n || (n = this.stencilSize ? bo : vo);
1984
+ var i = this.defaultSize;
1985
+ i || (i = this.stencilSize ? bo : vo);
1984
1986
  var t = this.sizeRestrictions;
1985
1987
  t.minWidth, t.minHeight, t.maxWidth, t.maxHeight;
1986
- var i = Ze(n) ? n({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : n, a = this.defaultPosition || go, o = [i, function(r) {
1988
+ var n = Ze(i) ? i({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : i, a = this.defaultPosition || go, o = [n, function(r) {
1987
1989
  var l = r.coordinates;
1988
- return ie({}, Ze(a) ? a({ coordinates: l, imageSize: e.imageSize, visibleArea: e.visibleArea }) : e.defaultPosition);
1990
+ return ne({}, Ze(a) ? a({ coordinates: l, imageSize: e.imageSize, visibleArea: e.visibleArea }) : e.defaultPosition);
1989
1991
  }];
1990
1992
  this.delayedTransforms && o.push.apply(o, qe(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(o, !0), this.delayedTransforms = null;
1991
1993
  }
1992
1994
  }, clearImage: function() {
1993
1995
  var e = this;
1994
1996
  this.imageLoaded = !1, setTimeout(function() {
1995
- var n = e.$refs.stretcher;
1996
- n && (n.style.height = "auto", n.style.width = "auto"), e.coordinates = e.defaultCoordinates(), e.boundaries = { width: 0, height: 0 };
1997
+ var i = e.$refs.stretcher;
1998
+ i && (i.style.height = "auto", i.style.width = "auto"), e.coordinates = e.defaultCoordinates(), e.boundaries = { width: 0, height: 0 };
1997
1999
  }, this.transitionTime);
1998
2000
  }, enableTransitions: function() {
1999
2001
  this.transitions && (this.transitionsActive = !0);
2000
2002
  }, disableTransitions: function() {
2001
2003
  this.transitionsActive = !1;
2002
2004
  }, updateBoundaries: function() {
2003
- var e = this, n = this.$refs.stretcher, t = this.$refs.cropper;
2004
- return this.initStretcher({ cropper: t, stretcher: n, imageSize: this.imageSize }), this.$nextTick().then(function() {
2005
- var i = { cropper: t, imageSize: e.imageSize };
2006
- if (Ze(e.defaultBoundaries) ? e.boundaries = e.defaultBoundaries(i) : e.defaultBoundaries === "fit" ? e.boundaries = function(a) {
2005
+ var e = this, i = this.$refs.stretcher, t = this.$refs.cropper;
2006
+ return this.initStretcher({ cropper: t, stretcher: i, imageSize: this.imageSize }), this.$nextTick().then(function() {
2007
+ var n = { cropper: t, imageSize: e.imageSize };
2008
+ if (Ze(e.defaultBoundaries) ? e.boundaries = e.defaultBoundaries(n) : e.defaultBoundaries === "fit" ? e.boundaries = function(a) {
2007
2009
  var o = a.cropper, r = a.imageSize, l = o.clientHeight, s = o.clientWidth, u = l, d = r.width * l / r.height;
2008
2010
  return d > s && (d = s, u = r.height * s / r.width), { width: d, height: u };
2009
- }(i) : e.boundaries = function(a) {
2011
+ }(n) : e.boundaries = function(a) {
2010
2012
  var o = a.cropper;
2011
2013
  return { width: o.clientWidth, height: o.clientHeight };
2012
- }(i), !e.boundaries.width || !e.boundaries.height) throw new Error("It's impossible to fit the cropper in the current container");
2014
+ }(n), !e.boundaries.width || !e.boundaries.height) throw new Error("It's impossible to fit the cropper in the current container");
2013
2015
  });
2014
2016
  }, resetVisibleArea: function() {
2015
2017
  var e = this;
2016
- return this.appliedImageTransforms = ie(ie({}, this.defaultImageTransforms), {}, { flip: ie({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
2018
+ return this.appliedImageTransforms = ne(ne({}, this.defaultImageTransforms), {}, { flip: ne({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
2017
2019
  e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
2018
- var n, t, i, a, o, r, l = e.defaultVisibleArea || yo;
2019
- e.visibleArea = Ze(l) ? l({ imageSize: e.imageSize, boundaries: e.boundaries, coordinates: e.priority !== "visible-area" ? e.coordinates : null, getAreaRestrictions: e.getAreaRestrictions, stencilSize: e.getStencilSize() }) : e.defaultVisibleArea, e.visibleArea = (n = { visibleArea: e.visibleArea, boundaries: e.boundaries, getAreaRestrictions: e.getAreaRestrictions }, t = n.visibleArea, i = n.boundaries, a = n.getAreaRestrictions, o = H({}, t), r = oe(i), o.width / o.height !== r && (o.height = o.width / r), ve(o, a({ visibleArea: o, type: "move" }))), e.priority === "visible-area" ? e.resetCoordinates() : e.coordinates = e.fitCoordinates({ visibleArea: e.visibleArea, coordinates: e.coordinates, aspectRatio: e.getAspectRatio(), positionRestrictions: e.positionRestrictions, sizeRestrictions: e.sizeRestrictions }), e.runAutoZoom("resetVisibleArea");
2020
+ var i, t, n, a, o, r, l = e.defaultVisibleArea || yo;
2021
+ e.visibleArea = Ze(l) ? l({ imageSize: e.imageSize, boundaries: e.boundaries, coordinates: e.priority !== "visible-area" ? e.coordinates : null, getAreaRestrictions: e.getAreaRestrictions, stencilSize: e.getStencilSize() }) : e.defaultVisibleArea, e.visibleArea = (i = { visibleArea: e.visibleArea, boundaries: e.boundaries, getAreaRestrictions: e.getAreaRestrictions }, t = i.visibleArea, n = i.boundaries, a = i.getAreaRestrictions, o = H({}, t), r = oe(n), o.width / o.height !== r && (o.height = o.width / r), ve(o, a({ visibleArea: o, type: "move" }))), e.priority === "visible-area" ? e.resetCoordinates() : e.coordinates = e.fitCoordinates({ visibleArea: e.visibleArea, coordinates: e.coordinates, aspectRatio: e.getAspectRatio(), positionRestrictions: e.positionRestrictions, sizeRestrictions: e.sizeRestrictions }), e.runAutoZoom("resetVisibleArea");
2020
2022
  }).catch(function() {
2021
2023
  e.visibleArea = null;
2022
2024
  });
@@ -2031,10 +2033,10 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
2031
2033
  var e = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];
2032
2034
  e && this.debounce ? this.debouncedUpdate() : this.update();
2033
2035
  }, onChangeImage: function() {
2034
- var e, n = this;
2036
+ var e, i = this;
2035
2037
  if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
2036
2038
  if (function(a) {
2037
- if (wn(a)) return !1;
2039
+ if (_i(a)) return !1;
2038
2040
  var o = window.location, r = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(a) || [], l = { protocol: r[1] || "", host: r[2] || "", port: r[3] || "" }, s = function(u) {
2039
2041
  return u.port || ((u.protocol || o.protocol) === "http" ? 80 : 433);
2040
2042
  };
@@ -2044,7 +2046,7 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
2044
2046
  t === !0 && (t = "anonymous"), this.imageAttributes.crossOrigin = t || null;
2045
2047
  }
2046
2048
  if (this.checkOrientation) {
2047
- var i = (e = this.src, new Promise(function(a) {
2049
+ var n = (e = this.src, new Promise(function(a) {
2048
2050
  zo(e).then(function(o) {
2049
2051
  var r = Fo(o);
2050
2052
  a(o ? { source: e, arrayBuffer: o, orientation: r } : { source: e, arrayBuffer: null, orientation: null });
@@ -2053,28 +2055,28 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
2053
2055
  });
2054
2056
  }));
2055
2057
  setTimeout(function() {
2056
- i.then(n.onParseImage);
2058
+ n.then(i.onParseImage);
2057
2059
  }, this.transitionTime);
2058
2060
  } else setTimeout(function() {
2059
- n.onParseImage({ source: n.src });
2061
+ i.onParseImage({ source: i.src });
2060
2062
  }, this.transitionTime);
2061
2063
  } else this.clearImage();
2062
2064
  }, onFailLoadImage: function() {
2063
2065
  this.imageAttributes.src && (this.clearImage(), this.$emit("error"));
2064
2066
  }, onSuccessLoadImage: function() {
2065
- var e = this, n = this.$refs.image;
2066
- n && !this.imageLoaded && (this.imageAttributes.height = n.naturalHeight, this.imageAttributes.width = n.naturalWidth, this.imageLoaded = !0, this.resetVisibleArea().then(function() {
2067
+ var e = this, i = this.$refs.image;
2068
+ i && !this.imageLoaded && (this.imageAttributes.height = i.naturalHeight, this.imageAttributes.width = i.naturalWidth, this.imageLoaded = !0, this.resetVisibleArea().then(function() {
2067
2069
  e.$emit("ready"), e.onChange(!1);
2068
2070
  }));
2069
2071
  }, onParseImage: function(e) {
2070
- var n = this, t = e.source, i = e.arrayBuffer, a = e.orientation;
2071
- this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, i && a && a > 1 ? Kn(t) || !wn(t) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([i])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(o) {
2072
+ var i = this, t = e.source, n = e.arrayBuffer, a = e.orientation;
2073
+ this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, n && a && a > 1 ? Bi(t) || !_i(t) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([n])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(o) {
2072
2074
  for (var r = [], l = new Uint8Array(o); l.length > 0; ) {
2073
2075
  var s = l.subarray(0, 8192);
2074
2076
  r.push(String.fromCharCode.apply(null, Array.from ? Array.from(s) : s.slice())), l = l.subarray(8192);
2075
2077
  }
2076
2078
  return "data:image/jpeg;base64," + btoa(r.join(""));
2077
- }(i) : this.imageAttributes.src = t, Ze(this.defaultTransforms) ? this.appliedImageTransforms = Dt(this.defaultTransforms()) : bt(this.defaultTransforms) ? this.appliedImageTransforms = Dt(this.defaultTransforms) : this.appliedImageTransforms = function(o) {
2079
+ }(n) : this.imageAttributes.src = t, Ze(this.defaultTransforms) ? this.appliedImageTransforms = Dt(this.defaultTransforms()) : bt(this.defaultTransforms) ? this.appliedImageTransforms = Dt(this.defaultTransforms) : this.appliedImageTransforms = function(o) {
2078
2080
  var r = Dt({});
2079
2081
  if (o) switch (o) {
2080
2082
  case 2:
@@ -2099,79 +2101,79 @@ var Eo = ["transitions"], Ie = Me("vue-advanced-cropper"), oi = { name: "Cropper
2099
2101
  r.rotate = -90;
2100
2102
  }
2101
2103
  return r;
2102
- }(a), this.defaultImageTransforms = ie(ie({}, this.appliedImageTransforms), {}, { flip: ie({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {
2103
- var o = n.$refs.image;
2104
+ }(a), this.defaultImageTransforms = ne(ne({}, this.appliedImageTransforms), {}, { flip: ne({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {
2105
+ var o = i.$refs.image;
2104
2106
  o && o.complete && (function(r) {
2105
2107
  return !!r.naturalWidth;
2106
- }(o) ? n.onSuccessLoadImage() : n.onFailLoadImage());
2108
+ }(o) ? i.onSuccessLoadImage() : i.onFailLoadImage());
2107
2109
  });
2108
2110
  }, onResizeEnd: function() {
2109
2111
  this.runAutoZoom("resize", { transitions: !0 });
2110
2112
  }, onMoveEnd: function() {
2111
2113
  this.runAutoZoom("move", { transitions: !0 });
2112
2114
  }, onMove: function(e) {
2113
- var n = this;
2115
+ var i = this;
2114
2116
  this.transitionsOptions.enabled || this.awaitRender(function() {
2115
- n.coordinates = n.moveAlgorithm(ie(ie({}, n.getPublicProperties()), {}, { positionRestrictions: pt(n.positionRestrictions, n.visibleArea), coordinates: n.coordinates, event: n.normalizeEvent(e) })), n.onChange();
2117
+ i.coordinates = i.moveAlgorithm(ne(ne({}, i.getPublicProperties()), {}, { positionRestrictions: pt(i.positionRestrictions, i.visibleArea), coordinates: i.coordinates, event: i.normalizeEvent(e) })), i.onChange();
2116
2118
  });
2117
2119
  }, onResize: function(e) {
2118
- var n = this;
2120
+ var i = this;
2119
2121
  this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender(function() {
2120
- var t = n.sizeRestrictions, i = Math.min(n.coordinates.width, n.coordinates.height, 20 * n.coefficient);
2121
- n.coordinates = n.resizeAlgorithm(ie(ie({}, n.getPublicProperties()), {}, { positionRestrictions: pt(n.positionRestrictions, n.visibleArea), sizeRestrictions: { maxWidth: Math.min(t.maxWidth, n.visibleArea.width), maxHeight: Math.min(t.maxHeight, n.visibleArea.height), minWidth: Math.max(t.minWidth, i), minHeight: Math.max(t.minHeight, i) }, event: n.normalizeEvent(e) })), n.onChange(), n.ticking = !1;
2122
+ var t = i.sizeRestrictions, n = Math.min(i.coordinates.width, i.coordinates.height, 20 * i.coefficient);
2123
+ i.coordinates = i.resizeAlgorithm(ne(ne({}, i.getPublicProperties()), {}, { positionRestrictions: pt(i.positionRestrictions, i.visibleArea), sizeRestrictions: { maxWidth: Math.min(t.maxWidth, i.visibleArea.width), maxHeight: Math.min(t.maxHeight, i.visibleArea.height), minWidth: Math.max(t.minWidth, n), minHeight: Math.max(t.minHeight, n) }, event: i.normalizeEvent(e) })), i.onChange(), i.ticking = !1;
2122
2124
  });
2123
2125
  }, onManipulateImage: function(e) {
2124
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2126
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2125
2127
  if (!this.transitionsOptions.enabled) {
2126
- var t = n.transitions, i = t !== void 0 && t, a = n.normalize, o = a === void 0 || a;
2127
- i && this.enableTransitions();
2128
- var r = _o(ie(ie({}, this.getPublicProperties()), {}, { event: o ? this.normalizeEvent(e) : e, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), l = r.visibleArea, s = r.coordinates;
2129
- this.visibleArea = l, this.coordinates = s, this.runAutoZoom("manipulateImage"), this.onChange(), i && this.debouncedDisableTransitions();
2128
+ var t = i.transitions, n = t !== void 0 && t, a = i.normalize, o = a === void 0 || a;
2129
+ n && this.enableTransitions();
2130
+ var r = _o(ne(ne({}, this.getPublicProperties()), {}, { event: o ? this.normalizeEvent(e) : e, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), l = r.visibleArea, s = r.coordinates;
2131
+ this.visibleArea = l, this.coordinates = s, this.runAutoZoom("manipulateImage"), this.onChange(), n && this.debouncedDisableTransitions();
2130
2132
  }
2131
2133
  }, onPropsChange: function() {
2132
2134
  this.coordinates = this.applyTransform(this.coordinates, !0), this.onChange(!1);
2133
2135
  }, getAreaRestrictions: function() {
2134
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = e.visibleArea, t = e.type, i = t === void 0 ? "move" : t;
2135
- return this.areaRestrictionsAlgorithm({ boundaries: this.boundaries, imageSize: this.imageSize, imageRestriction: this.imageRestriction, visibleArea: n, type: i });
2136
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = e.visibleArea, t = e.type, n = t === void 0 ? "move" : t;
2137
+ return this.areaRestrictionsAlgorithm({ boundaries: this.boundaries, imageSize: this.imageSize, imageRestriction: this.imageRestriction, visibleArea: i, type: n });
2136
2138
  }, getAspectRatio: function(e) {
2137
- var n, t, i = this.stencilProps, a = i.aspectRatio, o = i.minAspectRatio, r = i.maxAspectRatio;
2139
+ var i, t, n = this.stencilProps, a = n.aspectRatio, o = n.minAspectRatio, r = n.maxAspectRatio;
2138
2140
  if (this.$refs.stencil && this.$refs.stencil.aspectRatios) {
2139
2141
  var l = this.$refs.stencil.aspectRatios();
2140
- n = l.minimum, t = l.maximum;
2142
+ i = l.minimum, t = l.maximum;
2141
2143
  }
2142
- if (fe(n) && (n = fe(a) ? o : a), fe(t) && (t = fe(a) ? r : a), !e && (fe(n) || fe(t))) {
2144
+ if (fe(i) && (i = fe(a) ? o : a), fe(t) && (t = fe(a) ? r : a), !e && (fe(i) || fe(t))) {
2143
2145
  var s = this.getStencilSize(), u = s ? oe(s) : null;
2144
- fe(n) && (n = Sn(u) ? u : void 0), fe(t) && (t = Sn(u) ? u : void 0);
2146
+ fe(i) && (i = wi(u) ? u : void 0), fe(t) && (t = wi(u) ? u : void 0);
2145
2147
  }
2146
- return { minimum: n, maximum: t };
2148
+ return { minimum: i, maximum: t };
2147
2149
  }, getStencilSize: function() {
2148
- if (this.stencilSize) return e = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, n = e.boundaries, t = e.stencilSize, i = e.aspectRatio, It(oe(a = Ze(t) ? t({ boundaries: n, aspectRatio: i }) : t), i) && (a = De({ sizeRestrictions: { maxWidth: n.width, maxHeight: n.height, minWidth: 0, minHeight: 0 }, width: a.width, height: a.height, aspectRatio: { minimum: i.minimum, maximum: i.maximum } })), (a.width > n.width || a.height > n.height) && (a = De({ sizeRestrictions: { maxWidth: n.width, maxHeight: n.height, minWidth: 0, minHeight: 0 }, width: a.width, height: a.height, aspectRatio: { minimum: oe(a), maximum: oe(a) } })), a;
2149
- var e, n, t, i, a;
2150
+ if (this.stencilSize) return e = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, i = e.boundaries, t = e.stencilSize, n = e.aspectRatio, It(oe(a = Ze(t) ? t({ boundaries: i, aspectRatio: n }) : t), n) && (a = De({ sizeRestrictions: { maxWidth: i.width, maxHeight: i.height, minWidth: 0, minHeight: 0 }, width: a.width, height: a.height, aspectRatio: { minimum: n.minimum, maximum: n.maximum } })), (a.width > i.width || a.height > i.height) && (a = De({ sizeRestrictions: { maxWidth: i.width, maxHeight: i.height, minWidth: 0, minHeight: 0 }, width: a.width, height: a.height, aspectRatio: { minimum: oe(a), maximum: oe(a) } })), a;
2151
+ var e, i, t, n, a;
2150
2152
  }, getPublicProperties: function() {
2151
2153
  return { coefficient: this.coefficient, visibleArea: this.visibleArea, coordinates: this.coordinates, boundaries: this.boundaries, sizeRestrictions: this.sizeRestrictions, positionRestrictions: this.positionRestrictions, aspectRatio: this.getAspectRatio(), imageRestriction: this.imageRestriction };
2152
2154
  }, defaultCoordinates: function() {
2153
- return ie({}, Cn);
2154
- }, flip: function(e, n) {
2155
- var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = t.transitions, a = i === void 0 || i;
2155
+ return ne({}, Si);
2156
+ }, flip: function(e, i) {
2157
+ var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.transitions, a = n === void 0 || n;
2156
2158
  if (!this.transitionsActive) {
2157
2159
  a && this.enableTransitions();
2158
- var o = ie({}, this.imageTransforms.flip), r = So({ flip: { horizontal: e ? !o.horizontal : o.horizontal, vertical: n ? !o.vertical : o.vertical }, previousFlip: o, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), l = r.visibleArea, s = r.coordinates;
2159
- e && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), n && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = l, this.coordinates = s, this.onChange(), a && this.debouncedDisableTransitions();
2160
+ var o = ne({}, this.imageTransforms.flip), r = So({ flip: { horizontal: e ? !o.horizontal : o.horizontal, vertical: i ? !o.vertical : o.vertical }, previousFlip: o, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), l = r.visibleArea, s = r.coordinates;
2161
+ e && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), i && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = l, this.coordinates = s, this.onChange(), a && this.debouncedDisableTransitions();
2160
2162
  }
2161
2163
  }, rotate: function(e) {
2162
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = n.transitions, i = t === void 0 || t;
2164
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = i.transitions, n = t === void 0 || t;
2163
2165
  if (!this.transitionsActive) {
2164
- i && this.enableTransitions();
2165
- var a = ie({}, this.imageSize);
2166
+ n && this.enableTransitions();
2167
+ var a = ne({}, this.imageSize);
2166
2168
  this.appliedImageTransforms.rotate += e;
2167
2169
  var o = wo({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: a, imageSize: this.imageSize, angle: e, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), r = o.visibleArea, l = o.coordinates, s = this.processAutoZoom("rotateImage", r, l);
2168
- r = s.visibleArea, l = s.coordinates, this.visibleArea = r, this.coordinates = l, this.onChange(), i && this.debouncedDisableTransitions();
2170
+ r = s.visibleArea, l = s.coordinates, this.visibleArea = r, this.coordinates = l, this.onChange(), n && this.debouncedDisableTransitions();
2169
2171
  }
2170
2172
  } }, emits: ["change", "error", "ready"] }, Io = { key: 0, ref: "canvas", style: { display: "none" } }, Po = { key: 1, ref: "sourceCanvas", style: { display: "none" } };
2171
- oi.render = function(e, n, t, i, a, o) {
2173
+ on.render = function(e, i, t, n, a, o) {
2172
2174
  return F(), G("div", { ref: "cropper", class: o.classes.cropper }, [C("div", { ref: "stretcher", class: o.classes.stretcher }, null, 2), C("div", { class: o.classes.boundaries, style: o.boundariesStyle }, [(F(), G(yt(t.backgroundWrapperComponent), { class: o.classes.cropperWrapper, "wheel-resize": o.settings.resizeImage.wheel, "touch-resize": o.settings.resizeImage.touch, "touch-move": o.settings.moveImage.touch, "mouse-move": o.settings.moveImage.mouse, onMove: o.onManipulateImage, onResize: o.onManipulateImage }, { default: N(function() {
2173
- return [C("div", { class: o.classes.background, style: o.boundariesStyle }, null, 6), C("div", { class: o.classes.imageWrapper }, [C("img", { ref: "image", crossorigin: a.imageAttributes.crossOrigin, src: a.imageAttributes.src, class: o.classes.image, style: o.imageStyle, onMousedown: n[1] || (n[1] = St(function() {
2174
- }, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), C("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), Xe((F(), G(yt(t.stencilComponent), Dn({ ref: "stencil", image: o.image, coordinates: a.coordinates, "stencil-coordinates": o.stencilCoordinates, transitions: o.transitionsOptions }, t.stencilProps, { onResize: o.onResize, onResizeEnd: o.onResizeEnd, onMove: o.onMove, onMoveEnd: o.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[wt, a.imageLoaded]]), t.canvas ? (F(), G("canvas", Io, null, 512)) : ee("", !0), t.canvas ? (F(), G("canvas", Po, null, 512)) : ee("", !0)];
2175
+ return [C("div", { class: o.classes.background, style: o.boundariesStyle }, null, 6), C("div", { class: o.classes.imageWrapper }, [C("img", { ref: "image", crossorigin: a.imageAttributes.crossOrigin, src: a.imageAttributes.src, class: o.classes.image, style: o.imageStyle, onMousedown: i[1] || (i[1] = St(function() {
2176
+ }, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), C("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), Xe((F(), G(yt(t.stencilComponent), Pi({ ref: "stencil", image: o.image, coordinates: a.coordinates, "stencil-coordinates": o.stencilCoordinates, transitions: o.transitionsOptions }, t.stencilProps, { onResize: o.onResize, onResizeEnd: o.onResizeEnd, onMove: o.onMove, onMoveEnd: o.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[wt, a.imageLoaded]]), t.canvas ? (F(), G("canvas", Io, null, 512)) : ee("", !0), t.canvas ? (F(), G("canvas", Po, null, 512)) : ee("", !0)];
2175
2177
  }), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
2176
2178
  };
2177
2179
  const Do = {
@@ -2193,8 +2195,8 @@ const Do = {
2193
2195
  modelValue: {}
2194
2196
  },
2195
2197
  emits: ["update:model-value", "reset:model-value"],
2196
- setup(e, { emit: n }) {
2197
- const t = e, { t: i } = ce(), a = n, o = T(() => t.modelValue ? URL.createObjectURL(t.modelValue) : ""), r = q();
2198
+ setup(e, { emit: i }) {
2199
+ const t = e, { t: n } = ce(), a = i, o = T(() => t.modelValue ? URL.createObjectURL(t.modelValue) : ""), r = q();
2198
2200
  function l(y, v) {
2199
2201
  const w = 2e3 / y;
2200
2202
  return {
@@ -2240,13 +2242,13 @@ const Do = {
2240
2242
  const g = B("fm-icon"), w = B("fm-drop-field");
2241
2243
  return r.value || o.value ? (F(), Z("div", Do, [
2242
2244
  D("p", To, [
2243
- _t(se(p(i)("menu.common.labels.product_image")) + " ", 1),
2244
- D("span", Uo, se(p(i)("menu.common.labels.optional")), 1)
2245
+ _t(se(p(n)("menu.common.labels.product_image")) + " ", 1),
2246
+ D("span", Uo, se(p(n)("menu.common.labels.optional")), 1)
2245
2247
  ]),
2246
2248
  D("div", $o, [
2247
2249
  D("div", Vo, [
2248
2250
  D("div", No, [
2249
- C(p(oi), {
2251
+ C(p(on), {
2250
2252
  class: "cropper h-[150px] w-[200px]",
2251
2253
  src: r.value || o.value,
2252
2254
  "stencil-props": {
@@ -2283,45 +2285,45 @@ const Do = {
2283
2285
  }, {
2284
2286
  label: N(() => [
2285
2287
  D("p", Lo, [
2286
- _t(se(p(i)("menu.common.labels.product_image")) + " ", 1),
2287
- D("span", Bo, se(p(i)("menu.common.labels.optional")), 1)
2288
+ _t(se(p(n)("menu.common.labels.product_image")) + " ", 1),
2289
+ D("span", Bo, se(p(n)("menu.common.labels.optional")), 1)
2288
2290
  ])
2289
2291
  ]),
2290
2292
  "accept-text": N(() => [
2291
- D("p", Ko, se(p(i)("menu.common.file.accepts")), 1)
2293
+ D("p", Ko, se(p(n)("menu.common.file.accepts")), 1)
2292
2294
  ]),
2293
2295
  _: 1
2294
2296
  }));
2295
2297
  };
2296
2298
  }
2297
- }), ai = /* @__PURE__ */ le({
2299
+ }), an = /* @__PURE__ */ le({
2298
2300
  __name: "RemyButton",
2299
2301
  props: {
2300
2302
  onClick: { type: Function },
2301
2303
  pureStyling: { type: Boolean }
2302
2304
  },
2303
2305
  setup(e) {
2304
- return (n, t) => {
2305
- var i;
2306
- return (i = p(Te)) != null && i.enable.value ? (F(), Z("button", {
2306
+ return (i, t) => {
2307
+ var n;
2308
+ return (n = p(Te)) != null && n.enable.value ? (F(), Z("button", {
2307
2309
  key: 0,
2308
- class: Ee([!n.pureStyling && "bg-fm-color-neutral-gray-100 rounded-lg p-[6px]"]),
2310
+ class: Ee([!i.pureStyling && "bg-fm-color-neutral-gray-100 rounded-lg p-[6px]"]),
2309
2311
  type: "button",
2310
2312
  onClick: t[0] || (t[0] = //@ts-ignore
2311
- (...a) => n.onClick && n.onClick(...a))
2313
+ (...a) => i.onClick && i.onClick(...a))
2312
2314
  }, [
2313
- p(Te).isDialogOpened.value ? (F(), G(p(Wi), { key: 1 })) : (F(), G(p(Bi), { key: 0 }))
2315
+ p(Te).isDialogOpened.value ? (F(), G(p(Wn), { key: 1 })) : (F(), G(p(Bn), { key: 0 }))
2314
2316
  ], 2)) : ee("", !0);
2315
2317
  };
2316
2318
  }
2317
2319
  }), Wo = {}, jo = { class: "pl-32" };
2318
- function Yo(e, n) {
2320
+ function Yo(e, i) {
2319
2321
  return F(), Z("div", jo, [
2320
2322
  he(e.$slots, "default")
2321
2323
  ]);
2322
2324
  }
2323
- const Ho = /* @__PURE__ */ lt(Wo, [["render", Yo]]);
2324
- function ri(e) {
2325
+ const Ho = /* @__PURE__ */ ut(Wo, [["render", Yo]]);
2326
+ function rn(e) {
2325
2327
  return e || null;
2326
2328
  }
2327
2329
  const Xo = {
@@ -2338,9 +2340,9 @@ const Xo = {
2338
2340
  class: "relative"
2339
2341
  }, ta = {
2340
2342
  class: "fm-typo-en-body-lg-600"
2341
- }, na = {
2342
- class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
2343
2343
  }, ia = {
2344
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
2345
+ }, na = {
2344
2346
  class: "flex flex-col gap-16"
2345
2347
  }, oa = {
2346
2348
  class: "space-y-8"
@@ -2369,14 +2371,14 @@ const ra = /* @__PURE__ */ le({
2369
2371
  },
2370
2372
  emits: ["update:form", "update:thumbnail", "reset:thumbnail"],
2371
2373
  setup(e, {
2372
- emit: n
2374
+ emit: i
2373
2375
  }) {
2374
- const t = e, i = me(), a = Ue(), o = Le(), r = Ye(o), l = He(r), s = zi({
2376
+ const t = e, n = me(), a = Ue(), o = Le(), r = Ye(o), l = He(r), s = zn({
2375
2377
  dialog: a,
2376
2378
  menuLoader: l
2377
2379
  }), {
2378
2380
  checkMenuIsLoading: u
2379
- } = He(Ye(Le())), d = n, h = T(() => i.rules.item), m = T(() => i.categorizedItems), c = T(() => {
2381
+ } = He(Ye(Le())), d = i, h = T(() => n.rules.item), m = T(() => n.categorizedItems), c = T(() => {
2380
2382
  const P = m.value.map((A) => ({
2381
2383
  label: A.name,
2382
2384
  value: A.id
@@ -2410,7 +2412,7 @@ const ra = /* @__PURE__ */ le({
2410
2412
  const w = T(() => {
2411
2413
  var A;
2412
2414
  const P = t.form.name || ((A = t.fallback) == null ? void 0 : A.name);
2413
- return P ? i.items.filter((_) => !!_.category && _._id !== t.form._id && _.name === P).length : 0;
2415
+ return P ? n.items.filter((_) => !!_.category && _._id !== t.form._id && _.name === P).length : 0;
2414
2416
  });
2415
2417
  function z(P) {
2416
2418
  var _, R, f;
@@ -2455,7 +2457,7 @@ const ra = /* @__PURE__ */ le({
2455
2457
  "model-value": P.form.code,
2456
2458
  placeholder: ((Y = P.fallback) == null ? void 0 : Y.code) || p(E)("menu.product.form.detail.fields.code.placeholder"),
2457
2459
  label: p(E)("menu.product.form.detail.fields.code.label"),
2458
- "onUpdate:modelValue": A[0] || (A[0] = (M) => d("update:form", "code", p(ri)(M)))
2460
+ "onUpdate:modelValue": A[0] || (A[0] = (M) => d("update:form", "code", p(rn)(M)))
2459
2461
  }, null, 8, ["model-value", "placeholder", "label"])]), D("div", Jo, [C(_, {
2460
2462
  id: "product-name",
2461
2463
  disabled: !h.value.name,
@@ -2475,12 +2477,12 @@ const ra = /* @__PURE__ */ le({
2475
2477
  placeholder: p(E)("menu.product.form.detail.fields.description.placeholder"),
2476
2478
  "onUpdate:modelValue": A[2] || (A[2] = (M) => d("update:form", "description", M.trim()))
2477
2479
  }, {
2478
- label: N(() => [D("p", ta, [_t(se(p(E)("menu.product.form.detail.fields.description.label")) + " ", 1), D("span", na, se(p(E)("menu.product.form.detail.fields.description.optional")), 1)])]),
2480
+ label: N(() => [D("p", ta, [_t(se(p(E)("menu.product.form.detail.fields.description.label")) + " ", 1), D("span", ia, se(p(E)("menu.product.form.detail.fields.description.optional")), 1)])]),
2479
2481
  _: 1
2480
- }, 8, ["disabled", "model-value", "placeholder"]), Xe(C(ai, {
2482
+ }, 8, ["disabled", "model-value", "placeholder"]), Xe(C(an, {
2481
2483
  class: Ee(["absolute top-[100px] left-8"]),
2482
2484
  onClick: I
2483
- }, null, 512), [[K, p(Tn)("Suggest description")]])])]), C(Go, {
2485
+ }, null, 512), [[K, p(Di)("Suggest description")]])])]), C(Go, {
2484
2486
  disabled: !h.value.thumbnail,
2485
2487
  "model-value": P.thumbnail,
2486
2488
  "onUpdate:modelValue": A[3] || (A[3] = (M) => d("update:thumbnail", M)),
@@ -2494,13 +2496,13 @@ const ra = /* @__PURE__ */ le({
2494
2496
  "model-value": P.isAddon ? je.ADD_ON : je.PRODUCT,
2495
2497
  "onUpdate:modelValue": A[5] || (A[5] = (M) => z(M))
2496
2498
  }, {
2497
- default: N(() => [D("div", ia, [D("div", oa, [C(f, {
2499
+ default: N(() => [D("div", na, [D("div", oa, [C(f, {
2498
2500
  disabled: v.value,
2499
2501
  value: je.PRODUCT,
2500
2502
  label: p(E)("menu.product.form.detail.category.options.product.label"),
2501
2503
  sublabel: p(E)("menu.product.form.detail.category.options.product.sublabel")
2502
2504
  }, null, 8, ["disabled", "value", "label", "sublabel"]), C(Ho, null, {
2503
- default: N(() => [p(i).isV4 ? (F(), G(g, {
2505
+ default: N(() => [p(n).isV4 ? (F(), G(g, {
2504
2506
  key: 0
2505
2507
  })) : ee("", !0)]),
2506
2508
  _: 1
@@ -2518,7 +2520,7 @@ const ra = /* @__PURE__ */ le({
2518
2520
  sublabel: p(E)("menu.product.form.detail.category.options.addon.sublabel")
2519
2521
  }, null, 8, ["value", "label", "sublabel"])])]),
2520
2522
  _: 1
2521
- }, 8, ["disabled", "model-value"])) : ee("", !0), p(i).isV4 ? ee("", !0) : (F(), G(S, {
2523
+ }, 8, ["disabled", "model-value"])) : ee("", !0), p(n).isV4 ? ee("", !0) : (F(), G(S, {
2522
2524
  key: 1,
2523
2525
  modelValue: P.form.category,
2524
2526
  "onUpdate:modelValue": A[6] || (A[6] = (M) => P.form.category = M),
@@ -2565,14 +2567,14 @@ const ra = /* @__PURE__ */ le({
2565
2567
  fallback: {}
2566
2568
  },
2567
2569
  emits: ["update:form"],
2568
- setup(e, { emit: n }) {
2569
- const t = e, i = Xt(), a = me(), { t: o } = ce(), r = n, l = T(() => a.rules.item), s = T(() => {
2570
+ setup(e, { emit: i }) {
2571
+ const t = e, n = Xt(), a = me(), { t: o } = ce(), r = i, l = T(() => a.rules.item), s = T(() => {
2570
2572
  var z, O;
2571
2573
  const g = t.isOverride ? ((z = t.fallback) == null ? void 0 : z.unit) ?? ((O = t.fallback) == null ? void 0 : O.perXUnit) : void 0, w = t.form.unit ?? t.form.perXUnit ?? g;
2572
2574
  return w != null;
2573
2575
  }), u = (g) => {
2574
2576
  r("update:form", "unit", g ? "" : void 0), r("update:form", "perXUnit", g ? 0 : void 0);
2575
- }, d = T(() => Ot.setCoreStore(i).taxSetting()), h = T(() => {
2577
+ }, d = T(() => Ot.setCoreStore(n).taxSetting()), h = T(() => {
2576
2578
  var g;
2577
2579
  return Ot.getSelectedTax(
2578
2580
  t.form.taxes,
@@ -2619,8 +2621,8 @@ const ra = /* @__PURE__ */ le({
2619
2621
  A,
2620
2622
  {
2621
2623
  name: t.form.name || "",
2622
- lat: (O = (z = (w = i.currentRestaurant) == null ? void 0 : w.value) == null ? void 0 : z.profile.address.coordinates) == null ? void 0 : O[1],
2623
- lon: (P = (E = (I = i.currentRestaurant) == null ? void 0 : I.value) == null ? void 0 : E.profile.address.coordinates) == null ? void 0 : P[0]
2624
+ lat: (O = (z = (w = n.currentRestaurant) == null ? void 0 : w.value) == null ? void 0 : z.profile.address.coordinates) == null ? void 0 : O[1],
2625
+ lon: (P = (E = (I = n.currentRestaurant) == null ? void 0 : I.value) == null ? void 0 : E.profile.address.coordinates) == null ? void 0 : P[0]
2624
2626
  },
2625
2627
  !0
2626
2628
  ));
@@ -2643,18 +2645,18 @@ const ra = /* @__PURE__ */ le({
2643
2645
  placeholder: (P = g.fallback) != null && P.price ? p(rt)(g.fallback.price, !1) : void 0,
2644
2646
  rules: [
2645
2647
  l.value.price ? (A) => !!A || p(o)("menu.product.form.price.fields.selling_price.required") : void 0
2646
- ].filter(p(ut).isSet),
2648
+ ].filter(p(lt).isSet),
2647
2649
  class: "w-[258px] xs:w-full",
2648
2650
  label: p(o)("menu.product.form.price.fields.selling_price.label"),
2649
2651
  "show-currency": "",
2650
2652
  "onUpdate:modelValue": w[0] || (w[0] = (A) => A && r("update:form", "price", A))
2651
2653
  }, {
2652
2654
  append: N(() => [
2653
- Xe(C(ai, {
2655
+ Xe(C(an, {
2654
2656
  "pure-styling": "",
2655
2657
  onClick: v
2656
2658
  }, null, 512), [
2657
- [E, p(Tn)("Suggest pricing")]
2659
+ [E, p(Di)("Suggest pricing")]
2658
2660
  ])
2659
2661
  ]),
2660
2662
  _: 1
@@ -2790,12 +2792,12 @@ const ra = /* @__PURE__ */ le({
2790
2792
  selectedVariants: {}
2791
2793
  },
2792
2794
  setup(e) {
2793
- const n = Ue(), { emitData: t, emitAction: i } = In(), a = me(), { t: o } = ce(), r = e, l = T(() => a.variants.map((h) => ({
2795
+ const i = Ue(), { emitData: t, emitAction: n } = Ei(), a = me(), { t: o } = ce(), r = e, l = T(() => a.variants.map((h) => ({
2794
2796
  label: h.name,
2795
2797
  value: h._id,
2796
2798
  disabled: !1
2797
2799
  }))), s = q(ae(r.selectedVariants)), u = q(""), d = () => {
2798
- t(s.value), i("primary"), n.close();
2800
+ t(s.value), n("primary"), i.close();
2799
2801
  };
2800
2802
  return (h, m) => {
2801
2803
  const c = B("FmSearch"), y = B("FmCheckbox"), v = B("FmButton");
@@ -2828,7 +2830,7 @@ const ra = /* @__PURE__ */ le({
2828
2830
  ])
2829
2831
  ]),
2830
2832
  D("div", Ca, [
2831
- C(p(bn), null, {
2833
+ C(p(vi), null, {
2832
2834
  default: N(({ trigger: g }) => [
2833
2835
  p(a).rules.item.variant ? (F(), G(v, {
2834
2836
  key: 0,
@@ -2844,7 +2846,7 @@ const ra = /* @__PURE__ */ le({
2844
2846
  C(v, {
2845
2847
  label: p(o)("menu.common.actions.cancel"),
2846
2848
  variant: "tertiary",
2847
- onClick: m[3] || (m[3] = (g) => p(n).close())
2849
+ onClick: m[3] || (m[3] = (g) => p(i).close())
2848
2850
  }, null, 8, ["label"]),
2849
2851
  C(v, {
2850
2852
  label: p(o)("menu.common.actions.confirm"),
@@ -2857,7 +2859,7 @@ const ra = /* @__PURE__ */ le({
2857
2859
  D("p", ka, se(p(o)("menu.common.empty.no_variant.title")), 1),
2858
2860
  D("p", Ma, se(p(o)("menu.common.empty.no_variant.subtitle")), 1)
2859
2861
  ]),
2860
- C(p(bn), null, {
2862
+ C(p(vi), null, {
2861
2863
  default: N(({ trigger: g }) => [
2862
2864
  C(v, {
2863
2865
  label: p(o)("menu.variant.add"),
@@ -2871,14 +2873,14 @@ const ra = /* @__PURE__ */ le({
2871
2873
  };
2872
2874
  }
2873
2875
  }), za = {}, Fa = { class: "overflow-x-auto" }, Ea = { class: "xs:w-[600px]" };
2874
- function Ia(e, n) {
2876
+ function Ia(e, i) {
2875
2877
  return F(), Z("div", Fa, [
2876
2878
  D("div", Ea, [
2877
2879
  he(e.$slots, "default")
2878
2880
  ])
2879
2881
  ]);
2880
2882
  }
2881
- const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
2883
+ const sn = /* @__PURE__ */ ut(za, [["render", Ia]]), Pa = {
2882
2884
  class: "space-y-16"
2883
2885
  }, Da = {
2884
2886
  class: "flex items-center space-x-8"
@@ -2901,13 +2903,13 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
2901
2903
  },
2902
2904
  emits: ["update:form", "replace:form"],
2903
2905
  setup(e, {
2904
- emit: n
2906
+ emit: i
2905
2907
  }) {
2906
- const t = e, i = me(), a = nn(), o = Le(), r = Ue(), {
2908
+ const t = e, n = me(), a = ii(), o = Le(), r = Ue(), {
2907
2909
  t: l
2908
- } = ce(), s = T(() => i.rules.item), u = T(() => s.value.minPrice && !!t.form.minPrice), d = T(() => !i.state.currentCatalogId), h = T(() => i.variants.reduce((_, R) => (_[R._id] = R, _), {}));
2910
+ } = ce(), s = T(() => n.rules.item), u = T(() => s.value.minPrice && !!t.form.minPrice), d = T(() => !n.state.currentCatalogId), h = T(() => n.variants.reduce((_, R) => (_[R._id] = R, _), {}));
2909
2911
  q(!1);
2910
- const m = n;
2912
+ const m = i;
2911
2913
  function c(_) {
2912
2914
  const R = Ne.clone(t.form);
2913
2915
  for (const {
@@ -2917,7 +2919,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
2917
2919
  R[f] = b;
2918
2920
  m("replace:form", R);
2919
2921
  }
2920
- T(() => i.variants.map((_) => ({
2922
+ T(() => n.variants.map((_) => ({
2921
2923
  label: _.name,
2922
2924
  value: _._id,
2923
2925
  disabled: !1
@@ -2979,7 +2981,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
2979
2981
  const f = _.filter((k) => !!k);
2980
2982
  let b;
2981
2983
  if (f.length) {
2982
- const k = f.map((K) => i.variants.find((Y) => Y._id === K)), S = ye.fullVariantCombination(k).map(({
2984
+ const k = f.map((K) => n.variants.find((Y) => Y._id === K)), S = ye.fullVariantCombination(k).map(({
2983
2985
  combinationKey: K
2984
2986
  }) => {
2985
2987
  var J;
@@ -3044,7 +3046,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3044
3046
  modelValue: R,
3045
3047
  placeholder: x || l("menu.product.form.variant.placeholders.no_code"),
3046
3048
  "onUpdate:modelValue": (K) => {
3047
- I(_.row.index, "code", ri(K));
3049
+ I(_.row.index, "code", rn(K));
3048
3050
  }
3049
3051
  });
3050
3052
  }
@@ -3108,8 +3110,8 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3108
3110
  minPrice: u.value
3109
3111
  }));
3110
3112
  function A(_) {
3111
- return _ != null && _.length && _.length > i.rules.item.maxVariant ? l("menu.product.form.variant.validation.max_variants", {
3112
- max: i.rules.item.maxVariant
3113
+ return _ != null && _.length && _.length > n.rules.item.maxVariant ? l("menu.product.form.variant.validation.max_variants", {
3114
+ max: n.rules.item.maxVariant
3113
3115
  }) : !0;
3114
3116
  }
3115
3117
  return (_, R) => {
@@ -3118,7 +3120,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3118
3120
  title: p(l)("menu.product.form.variant.title"),
3119
3121
  "sub-title": p(l)("menu.product.form.variant.subtitle")
3120
3122
  }, {
3121
- "append-title": N(() => [p(i).rules.item.variant ? (F(), G(f, {
3123
+ "append-title": N(() => [p(n).rules.item.variant ? (F(), G(f, {
3122
3124
  key: 0,
3123
3125
  label: p(l)("menu.product.form.variant.add"),
3124
3126
  variant: "secondary",
@@ -3133,7 +3135,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3133
3135
  }, {
3134
3136
  default: N(() => {
3135
3137
  var K;
3136
- return [C(p(Un), {
3138
+ return [C(p(Ti), {
3137
3139
  "model-value": ((K = _.form.variant) == null ? void 0 : K.variantGroupIds) ?? [],
3138
3140
  class: "space-y-16",
3139
3141
  group: "variants",
@@ -3162,7 +3164,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3162
3164
  }, 8, ["model-value"])];
3163
3165
  }),
3164
3166
  _: 1
3165
- }, 8, ["model-value", "rules"]), C(si, null, {
3167
+ }, 8, ["model-value", "rules"]), C(sn, null, {
3166
3168
  default: N(() => [z.value.length ? (F(), G(k, {
3167
3169
  key: 0,
3168
3170
  class: "w-full",
@@ -3183,34 +3185,34 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3183
3185
  }), Va = /* @__PURE__ */ le({
3184
3186
  __name: "AddForm",
3185
3187
  setup(e) {
3186
- const n = me(), t = T(() => n.rules.group), i = T(() => !!n.state.currentCatalogId || !!n.state.currentSchedulerId), a = T(() => {
3187
- const s = !n.state.currentSchedulerId, u = n.rules.group.type, d = n.version === L.F_MENU_VERSION.enum.v3, h = n.rules.item.orderFromActiveOnly, m = n.rules.item.bindToVariant;
3188
+ const i = me(), t = T(() => i.rules.group), n = T(() => !!i.state.currentCatalogId || !!i.state.currentSchedulerId), a = T(() => {
3189
+ const s = !i.state.currentSchedulerId, u = i.rules.group.type, d = i.version === L.F_MENU_VERSION.enum.v3, h = i.rules.item.orderFromActiveOnly, m = i.rules.item.bindToVariant;
3188
3190
  return function(y) {
3189
3191
  return {
3190
- link: (v) => !i.value && (!v || m),
3191
- name: (v) => !i.value && !v,
3192
- type: u && !y._id && !i.value,
3192
+ link: (v) => !n.value && (!v || m),
3193
+ name: (v) => !n.value && !v,
3194
+ type: u && !y._id && !n.value,
3193
3195
  price: y.type !== L.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
3194
- inventory: s ? d ? !i.value && y.type === L.F_ADDON_GROUP_TYPE.enum.NORMAL : !i.value : !1,
3195
- orderFrom: (v) => s ? d ? y.type === L.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? i.value : !!i.value == !v : i.value : !1,
3196
+ inventory: s ? d ? !n.value && y.type === L.F_ADDON_GROUP_TYPE.enum.NORMAL : !n.value : !1,
3197
+ orderFrom: (v) => s ? d ? y.type === L.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? n.value : !!n.value == !v : n.value : !1,
3196
3198
  orderFromActiveOnly: h,
3197
- showOrderFrom: s ? d ? i.value ? !0 : y.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT : i.value : !1,
3199
+ showOrderFrom: s ? d ? n.value ? !0 : y.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT : n.value : !1,
3198
3200
  bindToVariant: m,
3199
- isOverride: i.value,
3201
+ isOverride: n.value,
3200
3202
  isItemGroup: !1,
3201
3203
  isV4: !d
3202
3204
  };
3203
3205
  };
3204
3206
  }), o = () => ({
3205
3207
  ...ye.generator.initMenuV4Group(),
3206
- type: n.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
3208
+ type: i.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
3207
3209
  items: {},
3208
- position: n.groups.length - 1,
3210
+ position: i.groups.length - 1,
3209
3211
  itemsLinked: []
3210
3212
  }), r = q(o()), { t: l } = ce();
3211
3213
  return (s, u) => t.value.create ? (F(), G(p(rr), {
3212
3214
  key: 0,
3213
- "categorized-items": p(n).categorizedItems,
3215
+ "categorized-items": p(i).categorizedItems,
3214
3216
  config: a.value,
3215
3217
  group: r.value,
3216
3218
  "onUpdate:group": u[0] || (u[0] = (d) => r.value = d),
@@ -3236,9 +3238,9 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3236
3238
  allowRefund: { type: Boolean }
3237
3239
  },
3238
3240
  emits: ["update:inventory"],
3239
- setup(e, { expose: n, emit: t }) {
3240
- const i = e, a = q(!1), o = (m) => {
3241
- ut.isBoolean(m) ? a.value = m : a.value = !a.value;
3241
+ setup(e, { expose: i, emit: t }) {
3242
+ const n = e, a = q(!1), o = (m) => {
3243
+ lt.isBoolean(m) ? a.value = m : a.value = !a.value;
3242
3244
  }, r = q([]), l = t;
3243
3245
  function s() {
3244
3246
  for (const m of r.value)
@@ -3249,10 +3251,10 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3249
3251
  Ce(
3250
3252
  () => a.value,
3251
3253
  (m) => {
3252
- m && (r.value = ae(i.initialValue));
3254
+ m && (r.value = ae(n.initialValue));
3253
3255
  }
3254
- ), n({ getKey: () => i.bindingKey, trigger: o });
3255
- const { t: d } = ce(), h = $n();
3256
+ ), i({ getKey: () => n.bindingKey, trigger: o });
3257
+ const { t: d } = ce(), h = Ui();
3256
3258
  return Qe(() => {
3257
3259
  h.readInventory();
3258
3260
  }), (m, c) => {
@@ -3302,7 +3304,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3302
3304
  variant: "outlined"
3303
3305
  }, {
3304
3306
  default: N(() => [
3305
- C(p(Ti), {
3307
+ C(p(Tn), {
3306
3308
  modelValue: r.value,
3307
3309
  "onUpdate:modelValue": c[0] || (c[0] = (z) => r.value = z)
3308
3310
  }, null, 8, ["modelValue"])
@@ -3336,9 +3338,9 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3336
3338
  },
3337
3339
  emits: ["update:group", "update:unmap-group"],
3338
3340
  setup(e, {
3339
- emit: n
3341
+ emit: i
3340
3342
  }) {
3341
- const t = e, i = n, a = Xt(), o = me(), r = T(() => _e.Country.getCountry(a.currentCountry.value)), l = q(!1), s = T(() => t.config.isV4 || t.group.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT), u = T(() => Object.values(t.group.items).flatMap((M) => [{
3343
+ const t = e, n = i, a = Xt(), o = me(), r = T(() => _e.Country.getCountry(a.currentCountry.value)), l = q(!1), s = T(() => t.config.isV4 || t.group.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT), u = T(() => Object.values(t.group.items).flatMap((M) => [{
3342
3344
  _id: M._id,
3343
3345
  combinationKey: void 0
3344
3346
  }, ...(M.items ?? []).map((U) => ({
@@ -3347,7 +3349,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3347
3349
  }))])), {
3348
3350
  searchKey: d,
3349
3351
  filter: h
3350
- } = fi(), m = T(() => {
3352
+ } = fn(), m = T(() => {
3351
3353
  const M = Object.entries(t.group.items).filter(([, U]) => h([U.code || "", U.name || U.fallbackName, v(U.price ?? U.fallbackPrice), g(U.orderFrom || U.fallbackOrder), ...(U.items || []).map(($) => [$.code || "", $.name || $.fallbackName, v($.price ?? $.fallbackPrice), g($.orderFrom || $.fallbackOrder)].join(""))]));
3352
3354
  return Object.fromEntries(M);
3353
3355
  }), c = (M) => ({
@@ -3357,7 +3359,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3357
3359
  orderFrom: t.config.orderFrom(M)
3358
3360
  }), y = T(() => t.config.isItemGroup), v = (M) => M ? rt(M, !1) : "", g = (M) => {
3359
3361
  var U;
3360
- return M == null ? "" : (U = gi()[M]) == null ? void 0 : U.label;
3362
+ return M == null ? "" : (U = gn()[M]) == null ? void 0 : U.label;
3361
3363
  }, w = T(() => Object.values(m.value)), z = q({}), {
3362
3364
  t: O
3363
3365
  } = ce(), I = q([{
@@ -3365,26 +3367,26 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3365
3367
  header: () => O("menu.group.option.product_title"),
3366
3368
  enableSorting: !1,
3367
3369
  cell: (M) => {
3368
- const U = M.getValue(), $ = M.row.original, Q = M.row.depth > 0, j = $.combinationKey ? Ln($.combinationKey, me().variants) : null;
3370
+ const U = M.getValue(), $ = M.row.original, Q = M.row.depth > 0, j = $.combinationKey ? Ni($.combinationKey, me().variants) : null;
3369
3371
  return ue("div", ue(ke.FmTextField, {
3370
3372
  modelValue: U,
3371
3373
  placeholder: j ?? "",
3372
3374
  disabled: !c($.combinationKey).name,
3373
- rules: j ? void 0 : [(ne) => ne.length > 0 || O("menu.group.option.product_title_required")],
3374
- "onUpdate:modelValue": (ne) => {
3375
+ rules: j ? void 0 : [(ie) => ie.length > 0 || O("menu.group.option.product_title_required")],
3376
+ "onUpdate:modelValue": (ie) => {
3375
3377
  var te;
3376
3378
  if (Q) {
3377
3379
  const we = (te = M.row.getParentRow()) == null ? void 0 : te.original;
3378
3380
  if (!we) return;
3379
- _(we._id, $.combinationKey ?? "", "name", ne);
3381
+ _(we._id, $.combinationKey ?? "", "name", ie);
3380
3382
  } else
3381
- A($._id, "name", ne);
3383
+ A($._id, "name", ie);
3382
3384
  },
3383
3385
  class: "min-w-[300px]"
3384
3386
  }, {
3385
3387
  append: () => {
3386
- var ne, te;
3387
- return (te = (ne = M.row.original) == null ? void 0 : ne.items) != null && te.length ? ue(ke.FmIcon, {
3388
+ var ie, te;
3389
+ return (te = (ie = M.row.original) == null ? void 0 : ie.items) != null && te.length ? ue(ke.FmIcon, {
3388
3390
  name: "keyboard_arrow_up",
3389
3391
  onClick: M.row.getToggleExpandedHandler(),
3390
3392
  class: ["cursor-pointer", "transition-transform", M.row.getIsExpanded() ? "transform rotate-180" : ""],
@@ -3410,7 +3412,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3410
3412
  required: !Q,
3411
3413
  nullable: !!Q,
3412
3414
  min: y ? void 0 : 0,
3413
- "onUpdate:modelValue": (ne) => {
3415
+ "onUpdate:modelValue": (ie) => {
3414
3416
  var te;
3415
3417
  if (j) {
3416
3418
  const we = (te = M.row.getParentRow()) == null ? void 0 : te.original;
@@ -3420,10 +3422,10 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3420
3422
  $.combinationKey ?? "",
3421
3423
  // @ts-ignore
3422
3424
  "price",
3423
- ne
3425
+ ie
3424
3426
  );
3425
3427
  } else
3426
- A($._id, "price", ne);
3428
+ A($._id, "price", ie);
3427
3429
  },
3428
3430
  showCurrency: !1,
3429
3431
  class: "min-w-[88px]"
@@ -3441,7 +3443,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3441
3443
  disable: !c($.combinationKey).orderFrom,
3442
3444
  required: !0,
3443
3445
  editActiveOnly: c($.combinationKey).orderFromActiveOnly,
3444
- "onUpdate:modelValue": (ne) => {
3446
+ "onUpdate:modelValue": (ie) => {
3445
3447
  var te;
3446
3448
  if (j) {
3447
3449
  const we = (te = M.row.getParentRow()) == null ? void 0 : te.original;
@@ -3451,10 +3453,10 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3451
3453
  $.combinationKey ?? "",
3452
3454
  // @ts-ignore
3453
3455
  "orderFrom",
3454
- ne
3456
+ ie
3455
3457
  );
3456
3458
  } else
3457
- A($._id, "orderFrom", ne);
3459
+ A($._id, "orderFrom", ie);
3458
3460
  },
3459
3461
  label: "",
3460
3462
  menuZIndex: 101
@@ -3480,10 +3482,10 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3480
3482
  "onUpdate:inventory": (Q) => {
3481
3483
  var j;
3482
3484
  if ($) {
3483
- const ne = (j = M.row.getParentRow()) == null ? void 0 : j.original;
3484
- if (!ne) return;
3485
+ const ie = (j = M.row.getParentRow()) == null ? void 0 : j.original;
3486
+ if (!ie) return;
3485
3487
  _(
3486
- ne._id,
3488
+ ie._id,
3487
3489
  U.combinationKey ?? "",
3488
3490
  // @ts-ignore
3489
3491
  "inventoryBindings",
@@ -3533,7 +3535,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3533
3535
  }));
3534
3536
  async function P() {
3535
3537
  const M = (/* @__PURE__ */ new Date()).toISOString();
3536
- i("update:group", {
3538
+ n("update:group", {
3537
3539
  ...t.group,
3538
3540
  items: {
3539
3541
  ...t.group.items,
@@ -3555,7 +3557,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3555
3557
  const j = {
3556
3558
  ...Q
3557
3559
  };
3558
- U === "price" ? j[U] = !$ && !Q.fallbackPrice ? _e.Dinero.zero().toObject() : $ : j[U] = $, i("update:group", {
3560
+ U === "price" ? j[U] = !$ && !Q.fallbackPrice ? _e.Dinero.zero().toObject() : $ : j[U] = $, n("update:group", {
3559
3561
  ...t.group,
3560
3562
  items: {
3561
3563
  ...t.group.items,
@@ -3565,33 +3567,33 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3565
3567
  }
3566
3568
  function _(M, U, $, Q) {
3567
3569
  var we, ct;
3568
- const j = ae(t.group), ne = (we = j.items[M].items) == null ? void 0 : we.findIndex((dt) => dt.combinationKey === U);
3569
- if (!ut.isSet(ne)) return;
3570
- let te = (ct = j.items[M].items) == null ? void 0 : ct[ne];
3570
+ const j = ae(t.group), ie = (we = j.items[M].items) == null ? void 0 : we.findIndex((dt) => dt.combinationKey === U);
3571
+ if (!lt.isSet(ie)) return;
3572
+ let te = (ct = j.items[M].items) == null ? void 0 : ct[ie];
3571
3573
  te && (te = {
3572
3574
  ...te,
3573
3575
  [$]: Q
3574
- }, j.items[M].items[ne] = te, i("update:group", j));
3576
+ }, j.items[M].items[ie] = te, n("update:group", j));
3575
3577
  }
3576
3578
  function R(M) {
3577
3579
  const U = ae(t.group);
3578
- delete U.items[M], i("update:group", U);
3580
+ delete U.items[M], n("update:group", U);
3579
3581
  }
3580
3582
  function f(M, U) {
3581
3583
  const $ = ae(t.group), Q = $.items[M];
3582
- Q && (Q.items = (Q.items || []).filter((j) => j.combinationKey !== U), $.items[M] = Q, i("update:group", $));
3584
+ Q && (Q.items = (Q.items || []).filter((j) => j.combinationKey !== U), $.items[M] = Q, n("update:group", $));
3583
3585
  }
3584
3586
  const b = T(() => t.categorizedItems.flatMap((M) => M.items).reduce((M, U) => {
3585
3587
  var $;
3586
3588
  return M[U._id] = {
3587
3589
  price: U.price,
3588
- variants: vi((($ = U.variant) == null ? void 0 : $.variantCombinations) || [], "combinationKey")
3590
+ variants: vn((($ = U.variant) == null ? void 0 : $.variantCombinations) || [], "combinationKey")
3589
3591
  }, M;
3590
3592
  }, {})), x = (M) => {
3591
- var j, ne;
3593
+ var j, ie;
3592
3594
  const $ = o.state.menu.modules.item.find((te) => te._id === M._id), Q = M.combinationKey ? {
3593
3595
  ...(j = $ == null ? void 0 : $.variant) == null ? void 0 : j.variantCombinations.find((te) => te.combinationKey === M.combinationKey),
3594
- name: En(me().variants, ((ne = $ == null ? void 0 : $.variant) == null ? void 0 : ne.variantGroupIds) || [])[M.combinationKey]
3596
+ name: Fi(me().variants, ((ie = $ == null ? void 0 : $.variant) == null ? void 0 : ie.variantGroupIds) || [])[M.combinationKey]
3595
3597
  } : $;
3596
3598
  return Q == null ? void 0 : Q.name;
3597
3599
  }, k = async (M) => {
@@ -3599,7 +3601,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3599
3601
  U = {
3600
3602
  ...U,
3601
3603
  items: M.map(($) => {
3602
- const Q = U.items.find((ne) => ne._id == $._id && ne.combinationKey == $.combinationKey), j = b.value[$._id];
3604
+ const Q = U.items.find((ie) => ie._id == $._id && ie.combinationKey == $.combinationKey), j = b.value[$._id];
3603
3605
  return Q || {
3604
3606
  ...$,
3605
3607
  name: x($),
@@ -3607,16 +3609,16 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3607
3609
  orderFrom: L.F_ORDER_FROM.enum.ALL
3608
3610
  };
3609
3611
  })
3610
- }, i("update:unmap-group", U);
3612
+ }, n("update:unmap-group", U);
3611
3613
  }, S = (M) => M.items;
3612
3614
  function K(M) {
3613
3615
  const U = ae(t.group);
3614
3616
  U.items = M.reduce(($, Q) => ({
3615
3617
  ...$,
3616
3618
  [Q._id]: Q
3617
- }), {}), i("update:group", U);
3619
+ }), {}), n("update:group", U);
3618
3620
  }
3619
- const Y = Pn(), J = T(() => Y.breakpoints.value.xs);
3621
+ const Y = Ii(), J = T(() => Y.breakpoints.value.xs);
3620
3622
  return (M, U) => {
3621
3623
  const $ = B("fm-button"), Q = B("fm-table");
3622
3624
  return F(), G(Ge, {
@@ -3624,7 +3626,7 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3624
3626
  }, {
3625
3627
  "append-title": N(() => [M.config.link() ? (F(), Z(Re, {
3626
3628
  key: 0
3627
- }, [s.value ? (F(), Z("div", Ga, [C(Di, {
3629
+ }, [s.value ? (F(), Z("div", Ga, [C(Dn, {
3628
3630
  "categorized-items": M.categorizedItems,
3629
3631
  "initial-value": u.value,
3630
3632
  "show-variant": M.config.bindToVariant,
@@ -3671,15 +3673,15 @@ const si = /* @__PURE__ */ lt(za, [["render", Ia]]), Pa = {
3671
3673
  };
3672
3674
  }
3673
3675
  }), Xa = {}, qa = { class: "flex gap-16" };
3674
- function Za(e, n) {
3676
+ function Za(e, i) {
3675
3677
  return F(), Z("div", qa, [
3676
3678
  he(e.$slots, "default")
3677
3679
  ]);
3678
3680
  }
3679
- const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-title-md-600" }, er = {
3681
+ const Qa = /* @__PURE__ */ ut(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-title-md-600" }, er = {
3680
3682
  key: 0,
3681
3683
  class: "pt-8 space-y-32"
3682
- }, tr = { class: "flex gap-8 items-center justify-start" }, li = /* @__PURE__ */ le({
3684
+ }, tr = { class: "flex gap-8 items-center justify-start" }, ln = /* @__PURE__ */ le({
3683
3685
  __name: "Form",
3684
3686
  props: {
3685
3687
  title: {},
@@ -3690,11 +3692,11 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3690
3692
  allowRefundInventory: { type: Boolean }
3691
3693
  },
3692
3694
  emits: ["update:group", "submit:group", "status:show"],
3693
- setup(e, { expose: n, emit: t }) {
3694
- let i = e;
3695
+ setup(e, { expose: i, emit: t }) {
3696
+ let n = e;
3695
3697
  const a = t, o = me(), r = Ue(), l = He(Ye(Le())), s = q(!1), u = q(!1), d = (I) => {
3696
- ut.isBoolean(I) ? u.value = I : u.value = !u.value;
3697
- }, h = T(() => i.config(i.group)), m = T(() => [
3698
+ lt.isBoolean(I) ? u.value = I : u.value = !u.value;
3699
+ }, h = T(() => n.config(n.group)), m = T(() => [
3698
3700
  {
3699
3701
  label: "Normal",
3700
3702
  value: L.F_ADDON_GROUP_TYPE.enum.NORMAL
@@ -3714,12 +3716,12 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3714
3716
  function y(I) {
3715
3717
  function E() {
3716
3718
  c({
3717
- ...i.group,
3719
+ ...n.group,
3718
3720
  items: {},
3719
3721
  type: I
3720
3722
  });
3721
3723
  }
3722
- Object.keys(i.group.items).length > 0 ? r.open({
3724
+ Object.keys(n.group.items).length > 0 ? r.open({
3723
3725
  title: "Change addon group type",
3724
3726
  message: "Change addon group type will clear all products. Are you sure to proceed?",
3725
3727
  primaryActions: {
@@ -3733,20 +3735,20 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3733
3735
  }).onPrimary(E) : E();
3734
3736
  }
3735
3737
  function v(I) {
3736
- return new Nn(o, l.updateMenu, r).mapGroups(
3738
+ return new Vi(o, l.updateMenu, r).mapGroups(
3737
3739
  [I],
3738
3740
  h.value.isOverride
3739
3741
  )[0];
3740
3742
  }
3741
- const g = q(Ne.clone(i.group)), w = Ii(
3742
- () => !Ne.isEqual(i.group, g.value),
3743
+ const g = q(Ne.clone(n.group)), w = In(
3744
+ () => !Ne.isEqual(n.group, g.value),
3743
3745
  () => {
3744
3746
  u.value = !1;
3745
3747
  }
3746
3748
  );
3747
3749
  async function z() {
3748
- if (i.action === "add") {
3749
- const { group: I, linkItems: E } = Vn(i.group), P = {
3750
+ if (n.action === "add") {
3751
+ const { group: I, linkItems: E } = $i(n.group), P = {
3750
3752
  module: L.F_MENU_MODULE_V4_KEY.enum.group,
3751
3753
  operation: be.F_OPERATION_TYPE.create,
3752
3754
  data: I,
@@ -3758,16 +3760,16 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3758
3760
  }
3759
3761
  ]
3760
3762
  };
3761
- await l.updateMenu(P, I.name), a("submit:group", i.group);
3762
- } else i.action === "update" && a("submit:group", i.group);
3763
+ await l.updateMenu(P, I.name), a("submit:group", n.group);
3764
+ } else n.action === "update" && a("submit:group", n.group);
3763
3765
  d(!1);
3764
3766
  }
3765
3767
  Ce(
3766
3768
  () => u.value,
3767
3769
  (I) => {
3768
- a("status:show", I), I && (g.value = Ne.clone(i.group));
3770
+ a("status:show", I), I && (g.value = Ne.clone(n.group));
3769
3771
  }
3770
- ), n({
3772
+ ), i({
3771
3773
  trigger: d,
3772
3774
  show: u
3773
3775
  });
@@ -3794,7 +3796,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3794
3796
  "side-sheet-footer": N(() => [
3795
3797
  D("div", tr, [
3796
3798
  C(x, {
3797
- label: p($i)(I.action),
3799
+ label: p($n)(I.action),
3798
3800
  loading: s.value,
3799
3801
  size: "lg",
3800
3802
  type: "submit",
@@ -3811,7 +3813,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3811
3813
  default: N(() => [
3812
3814
  I.group ? (F(), Z("div", er, [
3813
3815
  he(I.$slots, "variant-section"),
3814
- C(Fi, null, {
3816
+ C(Fn, null, {
3815
3817
  default: N(() => [
3816
3818
  D("div", null, [
3817
3819
  C(P, {
@@ -3909,7 +3911,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3909
3911
  ], 64);
3910
3912
  };
3911
3913
  }
3912
- }), nr = { class: "fm-typo-en-title-sm-600" }, ir = { class: "flex items-end space-x-24" }, or = { class: "flex" }, ar = /* @__PURE__ */ le({
3914
+ }), ir = { class: "fm-typo-en-title-sm-600" }, nr = { class: "flex items-end space-x-24" }, or = { class: "flex" }, ar = /* @__PURE__ */ le({
3913
3915
  __name: "UpdateForm",
3914
3916
  props: {
3915
3917
  combinations: {},
@@ -3917,23 +3919,23 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3917
3919
  fullCombinations: {}
3918
3920
  },
3919
3921
  emits: ["update:combinations"],
3920
- setup(e, { expose: n, emit: t }) {
3922
+ setup(e, { expose: i, emit: t }) {
3921
3923
  var I, E;
3922
- const i = e, a = t, o = me(), r = Ue(), l = He(Ye(Le())), s = q([]), u = q(i.combinations[0].combinationKey || ""), d = T(
3924
+ const n = e, a = t, o = me(), r = Ue(), l = He(Ye(Le())), s = q([]), u = q(n.combinations[0].combinationKey || ""), d = T(
3923
3925
  () => s.value.findIndex((P) => P.combinationKey == u.value)
3924
3926
  ), h = T(
3925
- () => i.combinations.map((P) => ({
3926
- label: i.fullCombinations[P.combinationKey || ""],
3927
+ () => n.combinations.map((P) => ({
3928
+ label: n.fullCombinations[P.combinationKey || ""],
3927
3929
  value: P.combinationKey || ""
3928
3930
  }))
3929
3931
  ), m = T(() => {
3930
3932
  var b, x;
3931
3933
  const P = ((x = (b = s.value[d.value]) == null ? void 0 : b.groups) == null ? void 0 : x.find(
3932
- (k) => k._id === i.groupId
3934
+ (k) => k._id === n.groupId
3933
3935
  )) || {
3934
- _id: i.groupId,
3936
+ _id: n.groupId,
3935
3937
  groupKey: ""
3936
- }, _ = o.state.menu.modules.group.find((k) => k._id === i.groupId), R = Object.entries({ ...P, items: void 0 }).filter(([, k]) => !!k), f = {
3938
+ }, _ = o.state.menu.modules.group.find((k) => k._id === n.groupId), R = Object.entries({ ...P, items: void 0 }).filter(([, k]) => !!k), f = {
3937
3939
  ..._,
3938
3940
  ...Object.fromEntries(R),
3939
3941
  items: _.items.map((k) => {
@@ -3949,13 +3951,13 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3949
3951
  };
3950
3952
  })
3951
3953
  };
3952
- return new Nn(o, l.updateMenu, r).mapGroups([f], !0)[0];
3954
+ return new Vi(o, l.updateMenu, r).mapGroups([f], !0)[0];
3953
3955
  });
3954
3956
  function c(P) {
3955
3957
  var f, b;
3956
3958
  const A = (f = s.value[d.value].groups) == null ? void 0 : f.findIndex(
3957
- (x) => x._id === i.groupId
3958
- ), _ = ae(s.value), R = { ...qt(P), _id: i.groupId, groupKey: "" };
3959
+ (x) => x._id === n.groupId
3960
+ ), _ = ae(s.value), R = { ...qt(P), _id: n.groupId, groupKey: "" };
3959
3961
  (A ?? -1) < 0 ? _[d.value] = {
3960
3962
  ..._[d.value],
3961
3963
  groups: [...((b = _[d.value]) == null ? void 0 : b.groups) || [], R]
@@ -3989,18 +3991,18 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
3989
3991
  Ce(
3990
3992
  () => w.value,
3991
3993
  (P) => {
3992
- P && (s.value = ae(i.combinations), u.value = i.combinations[0].combinationKey || "");
3994
+ P && (s.value = ae(n.combinations), u.value = n.combinations[0].combinationKey || "");
3993
3995
  }
3994
3996
  );
3995
3997
  const z = q();
3996
- n({
3998
+ i({
3997
3999
  show: (I = z.value) == null ? void 0 : I.show,
3998
4000
  trigger: (E = z.value) == null ? void 0 : E.trigger
3999
4001
  });
4000
4002
  const { t: O } = ce();
4001
4003
  return (P, A) => {
4002
4004
  const _ = B("fm-select"), R = B("fm-button"), f = B("fm-card");
4003
- return F(), G(li, {
4005
+ return F(), G(ln, {
4004
4006
  ref_key: "sheet",
4005
4007
  ref: z,
4006
4008
  "allow-refund-inventory": !0,
@@ -4023,8 +4025,8 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4023
4025
  variant: "outlined"
4024
4026
  }, {
4025
4027
  default: N(() => [
4026
- D("p", nr, se(p(O)("menu.group.option.variant")), 1),
4027
- D("div", ir, [
4028
+ D("p", ir, se(p(O)("menu.group.option.variant")), 1),
4029
+ D("div", nr, [
4028
4030
  C(_, {
4029
4031
  modelValue: u.value,
4030
4032
  "onUpdate:modelValue": A[0] || (A[0] = (b) => u.value = b),
@@ -4055,7 +4057,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4055
4057
  }, 8, ["categorized-items", "group", "title"]);
4056
4058
  };
4057
4059
  }
4058
- }), rr = li, On = Va, sr = ar, lr = {
4060
+ }), rr = ln, Mi = Va, sr = ar, lr = {
4059
4061
  key: 0,
4060
4062
  class: "flex flex-col space-y-16 h-[440px]"
4061
4063
  }, ur = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, cr = { class: "flex justify-between pb-16" }, dr = { class: "flex gap-8" }, mr = {
@@ -4067,7 +4069,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4067
4069
  groupIds: {}
4068
4070
  },
4069
4071
  setup(e) {
4070
- const n = e, t = Ue(), { emitData: i, emitAction: a } = In(), o = me(), r = T(() => o.rules.group), l = T(() => o.groups);
4072
+ const i = e, t = Ue(), { emitData: n, emitAction: a } = Ei(), o = me(), r = T(() => o.rules.group), l = T(() => o.groups);
4071
4073
  function s(z) {
4072
4074
  return ae(z ?? []).sort((I, E) => I.position - E.position);
4073
4075
  }
@@ -4103,8 +4105,8 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4103
4105
  items: {},
4104
4106
  position: o.groups.length - 1,
4105
4107
  itemsLinked: []
4106
- })), y = q(ae(n.groupIds || [])), v = q(""), { t: g } = ce(), w = () => {
4107
- i(y.value), a("primary"), t.close();
4108
+ })), y = q(ae(i.groupIds || [])), v = q(""), { t: g } = ce(), w = () => {
4109
+ n(y.value), a("primary"), t.close();
4108
4110
  };
4109
4111
  return (z, O) => {
4110
4112
  const I = B("FmSearch"), E = B("FmCheckbox"), P = B("FmButton");
@@ -4126,7 +4128,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4126
4128
  modelValue: y.value,
4127
4129
  "onUpdate:modelValue": [
4128
4130
  O[1] || (O[1] = (_) => y.value = _),
4129
- O[2] || (O[2] = (_) => p(i)(y.value))
4131
+ O[2] || (O[2] = (_) => p(n)(y.value))
4130
4132
  ],
4131
4133
  label: A.label,
4132
4134
  value: A.value
@@ -4137,7 +4139,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4137
4139
  ])
4138
4140
  ]),
4139
4141
  D("div", cr, [
4140
- C(p(On), null, {
4142
+ C(p(Mi), null, {
4141
4143
  default: N(({ trigger: A }) => [
4142
4144
  C(P, {
4143
4145
  label: p(g)("menu.common.actions.add_group"),
@@ -4165,7 +4167,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4165
4167
  D("p", pr, se(p(g)("menu.common.empty.no_group.title")), 1),
4166
4168
  D("p", fr, se(p(g)("menu.common.empty.no_group.subtitle")), 1)
4167
4169
  ]),
4168
- C(p(On), {
4170
+ C(p(Mi), {
4169
4171
  "categorized-items": p(o).categorizedItems,
4170
4172
  config: m.value,
4171
4173
  group: c.value,
@@ -4199,14 +4201,14 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4199
4201
  },
4200
4202
  emits: ["update:form", "replace:form"],
4201
4203
  setup(e, {
4202
- emit: n
4204
+ emit: i
4203
4205
  }) {
4204
- const t = e, i = me(), a = nn(), o = Ue(), {
4206
+ const t = e, n = me(), a = ii(), o = Ue(), {
4205
4207
  t: r
4206
- } = ce(), l = n, s = T(() => i.rules.group), u = T(() => i.rules.item), d = T(() => i.groups);
4208
+ } = ce(), l = i, s = T(() => n.rules.group), u = T(() => n.rules.item), d = T(() => n.groups);
4207
4209
  q(!1);
4208
4210
  function h(f, b) {
4209
- return ae(b).map((k) => {
4211
+ return ae(b ?? []).map((k) => {
4210
4212
  const S = f.find((K) => K._id === k._id);
4211
4213
  return {
4212
4214
  name: (S == null ? void 0 : S.name) ?? "",
@@ -4224,7 +4226,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4224
4226
  }
4225
4227
  const y = T(() => c(d.value).reduce((f, b) => (f[b._id] = {
4226
4228
  name: b.name,
4227
- type: Ct(i.items, b.items)
4229
+ type: Ct(n.items, b.items)
4228
4230
  }, f), {})), v = T(() => [...Object.entries(y.value).map(([f, {
4229
4231
  name: b,
4230
4232
  type: x
@@ -4346,14 +4348,14 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4346
4348
  }
4347
4349
  Ce(() => d.value.length, () => z([...m.value, d.value[d.value.length - 1]._id])), T(() => ({
4348
4350
  ...ye.generator.initMenuV4Group(),
4349
- type: i.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
4351
+ type: n.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
4350
4352
  items: {},
4351
- position: i.groups.length - 1,
4353
+ position: n.groups.length - 1,
4352
4354
  itemsLinked: []
4353
4355
  }));
4354
- const A = T(() => !!i.state.currentCatalogId || !!i.state.currentSchedulerId);
4356
+ const A = T(() => !!n.state.currentCatalogId || !!n.state.currentSchedulerId);
4355
4357
  T(() => {
4356
- const f = !i.state.currentSchedulerId, b = i.rules.group.type, x = i.version == L.F_MENU_VERSION.enum.v3, k = i.rules.item.orderFromActiveOnly, S = i.rules.item.bindToVariant;
4358
+ const f = !n.state.currentSchedulerId, b = n.rules.group.type, x = n.version == L.F_MENU_VERSION.enum.v3, k = n.rules.item.orderFromActiveOnly, S = n.rules.item.bindToVariant;
4357
4359
  return function(Y) {
4358
4360
  return {
4359
4361
  link: (J) => !A.value && (!J || S),
@@ -4394,7 +4396,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4394
4396
  variant: "secondary",
4395
4397
  onClick: w
4396
4398
  }, null, 8, ["label"])]),
4397
- default: N(() => [C(si, null, {
4399
+ default: N(() => [C(sn, null, {
4398
4400
  default: N(() => {
4399
4401
  var S;
4400
4402
  return [((S = m.value) == null ? void 0 : S.length) > 0 ? (F(), G(k, {
@@ -4433,32 +4435,32 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4433
4435
  },
4434
4436
  emits: ["update:form", "replace:form"],
4435
4437
  setup(e, {
4436
- emit: n
4438
+ emit: i
4437
4439
  }) {
4438
4440
  const {
4439
4441
  t
4440
- } = ce(), i = e, a = n, o = me(), r = T(() => o.rules.item), l = T(() => r.value.inventory);
4442
+ } = ce(), n = e, a = i, o = me(), r = T(() => o.rules.item), l = T(() => r.value.inventory);
4441
4443
  function s(v, g, w, z) {
4442
- return !g || g.length === 0 ? [{
4444
+ return !g || g && g.length === 0 ? [{
4443
4445
  _id: "",
4444
4446
  name: w,
4445
4447
  binding: v || []
4446
4448
  }] : g.map((O) => ({
4447
4449
  _id: O.combinationKey || "",
4448
- name: Ln(O.combinationKey || "", z),
4450
+ name: Ni(O.combinationKey || "", z),
4449
4451
  binding: O.inventoryBindings || []
4450
4452
  }));
4451
4453
  }
4452
4454
  const u = T(() => {
4453
4455
  var v;
4454
- return i.form.name || ((v = i.fallback) == null ? void 0 : v.name) || "";
4456
+ return n.form.name || ((v = n.fallback) == null ? void 0 : v.name) || "";
4455
4457
  }), d = T(() => {
4456
4458
  var v;
4457
- return s(i.form.inventoryBindings || [], ((v = i.form.variant) == null ? void 0 : v.variantCombinations) || [], u.value, o.variants);
4459
+ return s(n.form.inventoryBindings || [], ((v = n.form.variant) == null ? void 0 : v.variantCombinations) || [], u.value, o.variants);
4458
4460
  });
4459
4461
  function h(v, g) {
4460
4462
  var I, E;
4461
- let w = Ne.clone(i.form);
4463
+ let w = Ne.clone(n.form);
4462
4464
  const z = w.variant;
4463
4465
  if ((((I = z == null ? void 0 : z.variantCombinations) == null ? void 0 : I.length) ?? 0) > 0 && z) {
4464
4466
  const P = z.variantCombinations.findIndex((_) => _.combinationKey === v);
@@ -4538,7 +4540,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4538
4540
  for (const g of m.value)
4539
4541
  g.getKey() === v && g.trigger(!0);
4540
4542
  }
4541
- const y = $n();
4543
+ const y = Ui();
4542
4544
  return Qe(() => {
4543
4545
  y.readInventory();
4544
4546
  }), (v, g) => (F(), G(Ge, {
@@ -4558,7 +4560,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4558
4560
  "onUpdate:inventory": (z) => {
4559
4561
  h(w._id, z);
4560
4562
  }
4561
- }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 256)), C(p(Ui), {
4563
+ }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 256)), C(p(Un), {
4562
4564
  "row-data": d.value,
4563
4565
  onRowClick: c
4564
4566
  }, null, 8, ["row-data"])])])]),
@@ -4580,11 +4582,11 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4580
4582
  },
4581
4583
  emits: ["update:form", "replace:form"],
4582
4584
  setup(e, {
4583
- emit: n
4585
+ emit: i
4584
4586
  }) {
4585
- const t = e, i = me(), a = T(() => i.rules.item), o = He(Ye(Le())), {
4587
+ const t = e, n = me(), a = T(() => n.rules.item), o = He(Ye(Le())), {
4586
4588
  t: r
4587
- } = ce(), l = n, s = T(() => {
4589
+ } = ce(), l = i, s = T(() => {
4588
4590
  var y, v;
4589
4591
  return !!((v = (y = t.form.variant) == null ? void 0 : y.variantCombinations) != null && v.length);
4590
4592
  }), u = T(() => {
@@ -4616,7 +4618,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4616
4618
  } : {
4617
4619
  label: r("menu.product.form.takeaway.options.no_preset"),
4618
4620
  value: null
4619
- }, ...i.takeaways.map((y) => ({
4621
+ }, ...n.takeaways.map((y) => ({
4620
4622
  label: y.name,
4621
4623
  value: y._id
4622
4624
  }))]), c = q([{
@@ -4629,10 +4631,10 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4629
4631
  header: () => r("menu.product.form.takeaway.columns.takeaway"),
4630
4632
  cell: (y) => {
4631
4633
  const v = y.getValue(), g = y.row.original;
4632
- return ue(Ei, {
4634
+ return ue(En, {
4633
4635
  action: "add",
4634
4636
  applyProduct: !1,
4635
- bindToVariant: i.rules.item.bindToVariant,
4637
+ bindToVariant: n.rules.item.bindToVariant,
4636
4638
  "onUpdate:takeaway": async (w) => {
4637
4639
  await o.updateMenu({
4638
4640
  module: L.F_MENU_MODULE_V4_KEY.enum.takeaway,
@@ -4653,7 +4655,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4653
4655
  g.onUpdate(z || "");
4654
4656
  }
4655
4657
  }, {
4656
- "append-menu": () => i.rules.takeaway.create ? ue("button", {
4658
+ "append-menu": () => n.rules.takeaway.create ? ue("button", {
4657
4659
  class: "flex items-center py-8 px-16 space-x-8",
4658
4660
  type: "button",
4659
4661
  onClick: w
@@ -4691,19 +4693,19 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4691
4693
  applyProduct: { type: Boolean }
4692
4694
  },
4693
4695
  setup(e) {
4694
- const { t: n } = ce(), t = e, i = He(Ye(Le())), a = T(
4695
- () => t.initialValue ? n("menu.print_dept.update") : n("menu.print_dept.add")
4696
+ const { t: i } = ce(), t = e, n = He(Ye(Le())), a = T(
4697
+ () => t.initialValue ? i("menu.print_dept.update") : i("menu.print_dept.add")
4696
4698
  ), o = T(
4697
- () => t.initialValue ? n("menu.common.actions.update") : n("menu.common.actions.add")
4699
+ () => t.initialValue ? i("menu.common.actions.update") : i("menu.common.actions.add")
4698
4700
  ), r = q(
4699
4701
  t.initialValue ? ae(t.initialValue) : { ...ye.generator.initMenuV4PrintDepartment(), usedBy: [] }
4700
4702
  ), l = q(!1), s = q(!1), u = (h) => {
4701
- ut.isBoolean(h) ? s.value = h : s.value = !s.value;
4703
+ lt.isBoolean(h) ? s.value = h : s.value = !s.value;
4702
4704
  };
4703
4705
  async function d() {
4704
4706
  var h, m;
4705
4707
  try {
4706
- l.value = !0, t.initialValue ? await i.updateMenu(
4708
+ l.value = !0, t.initialValue ? await n.updateMenu(
4707
4709
  {
4708
4710
  module: L.F_MENU_MODULE_V4_KEY.enum.printDepartment,
4709
4711
  operation: be.F_OPERATION_TYPE.update,
@@ -4711,7 +4713,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4711
4713
  link: $t(((h = r.value) == null ? void 0 : h.usedBy) || [])
4712
4714
  },
4713
4715
  r.value.name
4714
- ) : await i.updateMenu(
4716
+ ) : await n.updateMenu(
4715
4717
  {
4716
4718
  module: L.F_MENU_MODULE_V4_KEY.enum.printDepartment,
4717
4719
  operation: be.F_OPERATION_TYPE.create,
@@ -4761,7 +4763,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4761
4763
  variant: "primary"
4762
4764
  }, null, 8, ["label", "loading"]),
4763
4765
  C(y, {
4764
- label: p(n)("menu.common.actions.cancel"),
4766
+ label: p(i)("menu.common.actions.cancel"),
4765
4767
  size: "lg",
4766
4768
  variant: "tertiary",
4767
4769
  onClick: m[2] || (m[2] = () => s.value = !1)
@@ -4774,19 +4776,19 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4774
4776
  modelValue: r.value.name,
4775
4777
  "onUpdate:modelValue": m[0] || (m[0] = (g) => r.value.name = g),
4776
4778
  rules: [
4777
- (g) => g ? !0 : p(n)("menu.common.validation.required", {
4778
- field: p(n)("menu.print_dept.columns.name").toLowerCase()
4779
+ (g) => g ? !0 : p(i)("menu.common.validation.required", {
4780
+ field: p(i)("menu.print_dept.columns.name").toLowerCase()
4779
4781
  })
4780
4782
  ],
4781
4783
  autofocus: "",
4782
- label: p(n)("menu.print_dept.columns.name")
4784
+ label: p(i)("menu.print_dept.columns.name")
4783
4785
  }, null, 8, ["modelValue", "rules", "label"]),
4784
- h.applyProduct ? (F(), G(Vi, {
4786
+ h.applyProduct ? (F(), G(Vn, {
4785
4787
  key: 0,
4786
4788
  overrides: r.value.usedBy || [],
4787
4789
  "select-variant": !1,
4788
4790
  editable: "",
4789
- title: p(n)("menu.print_dept.columns.products"),
4791
+ title: p(i)("menu.print_dept.columns.products"),
4790
4792
  "onUpdate:overrides": m[1] || (m[1] = (g) => r.value.usedBy = g)
4791
4793
  }, null, 8, ["overrides", "title"])) : ee("", !0)
4792
4794
  ])
@@ -4806,8 +4808,8 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4806
4808
  fullCombinations: {}
4807
4809
  },
4808
4810
  emits: ["update:form", "replace:form"],
4809
- setup(e, { emit: n }) {
4810
- const t = e, i = me(), { t: a } = ce(), o = n;
4811
+ setup(e, { emit: i }) {
4812
+ const t = e, n = me(), { t: a } = ce(), o = i;
4811
4813
  function r() {
4812
4814
  return {
4813
4815
  ...ye.generator.initMenuV4PrintSetting(),
@@ -4815,7 +4817,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4815
4817
  toRoot: !1
4816
4818
  };
4817
4819
  }
4818
- const l = T(() => i.rules.item), s = T(() => i.printDepartments), u = T(() => {
4820
+ const l = T(() => n.rules.item), s = T(() => n.printDepartments), u = T(() => {
4819
4821
  var w;
4820
4822
  return ((w = t.form.print) == null ? void 0 : w.sequential) ?? !1;
4821
4823
  }), d = T(() => {
@@ -4920,7 +4922,7 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4920
4922
  label: p(a)("menu.product.form.print.routes.label")
4921
4923
  }, {
4922
4924
  default: N(() => [
4923
- d.value.length ? (F(), G(p(Un), {
4925
+ d.value.length ? (F(), G(p(Ti), {
4924
4926
  key: 0,
4925
4927
  "item-key": (R) => R,
4926
4928
  "model-value": d.value,
@@ -4991,11 +4993,11 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
4991
4993
  disabled: { type: Boolean }
4992
4994
  },
4993
4995
  emits: ["update:toggle"],
4994
- setup(e, { emit: n }) {
4995
- const t = n;
4996
- return (i, a) => {
4996
+ setup(e, { emit: i }) {
4997
+ const t = i;
4998
+ return (n, a) => {
4997
4999
  const o = B("fm-switch"), r = B("fm-card");
4998
- return i.disabled ? he(i.$slots, "default", { key: 0 }, void 0, !0) : (F(), G(r, {
5000
+ return n.disabled ? he(n.$slots, "default", { key: 0 }, void 0, !0) : (F(), G(r, {
4999
5001
  key: 1,
5000
5002
  class: "p-16 space-y-24",
5001
5003
  variant: "outlined"
@@ -5003,18 +5005,18 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
5003
5005
  default: N(() => [
5004
5006
  D("div", Er, [
5005
5007
  D("div", Ir, [
5006
- D("p", Pr, se(i.title), 1),
5007
- i.description ? (F(), Z("p", Dr, se(i.description), 1)) : ee("", !0)
5008
+ D("p", Pr, se(n.title), 1),
5009
+ n.description ? (F(), Z("p", Dr, se(n.description), 1)) : ee("", !0)
5008
5010
  ]),
5009
5011
  C(o, {
5010
- "model-value": i.toggle,
5012
+ "model-value": n.toggle,
5011
5013
  "onUpdate:modelValue": a[0] || (a[0] = (l) => t("update:toggle", l))
5012
5014
  }, null, 8, ["model-value"])
5013
5015
  ]),
5014
- C(Si, { name: "expand" }, {
5016
+ C(Sn, { name: "expand" }, {
5015
5017
  default: N(() => [
5016
- i.toggle ? (F(), Z("div", Tr, [
5017
- he(i.$slots, "default", {}, void 0, !0)
5018
+ n.toggle ? (F(), Z("div", Tr, [
5019
+ he(n.$slots, "default", {}, void 0, !0)
5018
5020
  ])) : ee("", !0)
5019
5021
  ]),
5020
5022
  _: 3
@@ -5024,16 +5026,16 @@ const Qa = /* @__PURE__ */ lt(Xa, [["render", Za]]), Ja = { class: "fm-typo-en-t
5024
5026
  }));
5025
5027
  };
5026
5028
  }
5027
- }), We = /* @__PURE__ */ lt(Ur, [["__scopeId", "data-v-e920f110"]]), $r = {};
5028
- function Vr(e, n) {
5029
- return F(), Z("div", null, n[0] || (n[0] = [
5029
+ }), We = /* @__PURE__ */ ut(Ur, [["__scopeId", "data-v-e920f110"]]), $r = {};
5030
+ function Vr(e, i) {
5031
+ return F(), Z("div", null, i[0] || (i[0] = [
5030
5032
  D("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
5031
5033
  ]));
5032
5034
  }
5033
- const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5035
+ const Nr = /* @__PURE__ */ ut($r, [["render", Vr]]), Lr = {
5034
5036
  key: 0,
5035
5037
  class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
5036
- }, Br = { class: "fm-typo-en-title-sm-600" }, zn = /* @__PURE__ */ le({
5038
+ }, Br = { class: "fm-typo-en-title-sm-600" }, Oi = /* @__PURE__ */ le({
5037
5039
  __name: "Summary",
5038
5040
  props: {
5039
5041
  title: {},
@@ -5041,13 +5043,13 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5041
5043
  items: {}
5042
5044
  },
5043
5045
  setup(e) {
5044
- const n = e, t = Ue();
5045
- function i() {
5046
+ const i = e, t = Ue();
5047
+ function n() {
5046
5048
  t.open({
5047
- title: n.title,
5049
+ title: i.title,
5048
5050
  contentComponent: ue("div", { class: "space-y-4" }, [
5049
- ...n.items.map(
5050
- (a) => ue(vn, {
5051
+ ...i.items.map(
5052
+ (a) => ue(gi, {
5051
5053
  name: a.name,
5052
5054
  value: a.value || "--"
5053
5055
  })
@@ -5057,10 +5059,10 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5057
5059
  }
5058
5060
  return (a, o) => {
5059
5061
  const r = B("FmButton");
5060
- return n.variant === "full" ? (F(), Z("div", Lr, [
5062
+ return i.variant === "full" ? (F(), Z("div", Lr, [
5061
5063
  D("div", Br, se(a.title), 1),
5062
5064
  C(Nr),
5063
- (F(!0), Z(Re, null, Ke(a.items, (l) => (F(), G(vn, {
5065
+ (F(!0), Z(Re, null, Ke(a.items, (l) => (F(), G(gi, {
5064
5066
  key: l.name,
5065
5067
  name: l.name,
5066
5068
  value: l.value || "--"
@@ -5069,7 +5071,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5069
5071
  key: 1,
5070
5072
  icon: "info",
5071
5073
  variant: "tertiary",
5072
- onClick: i
5074
+ onClick: n
5073
5075
  }));
5074
5076
  };
5075
5077
  }
@@ -5079,8 +5081,8 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5079
5081
  linkedStatus: {}
5080
5082
  },
5081
5083
  emits: ["update:catalogAndScheduler"],
5082
- setup(e, { emit: n }) {
5083
- const t = e, i = n, { t: a } = ce(), o = me(), r = q(o.state.currentCatalogId || null), l = T(() => {
5084
+ setup(e, { emit: i }) {
5085
+ const t = e, n = i, { t: a } = ce(), o = me(), r = q(o.state.currentCatalogId || null), l = T(() => {
5084
5086
  const m = Object.keys(t.linkedStatus.catalogs).map((c) => {
5085
5087
  var y;
5086
5088
  return {
@@ -5115,7 +5117,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5115
5117
  [null, ...u()].includes(s.value) || (s.value = null);
5116
5118
  });
5117
5119
  const h = Ne.debounce(() => {
5118
- i("update:catalogAndScheduler", [r.value, s.value]);
5120
+ n("update:catalogAndScheduler", [r.value, s.value]);
5119
5121
  }, 100);
5120
5122
  return Ce(
5121
5123
  () => `${r.value}-${s.value}`,
@@ -5150,7 +5152,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5150
5152
  ]);
5151
5153
  };
5152
5154
  }
5153
- }), Zr = Fn("menu-edit-state", {
5155
+ }), Zr = zi("menu-edit-state", {
5154
5156
  state: () => ({
5155
5157
  isUpdatingItem: !1,
5156
5158
  storedCatalogId: null,
@@ -5167,10 +5169,10 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5167
5169
  }, ts = {
5168
5170
  key: 4,
5169
5171
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
5170
- }, ns = {
5172
+ }, is = {
5171
5173
  key: 5,
5172
5174
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
5173
- }, is = {
5175
+ }, ns = {
5174
5176
  key: 7,
5175
5177
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
5176
5178
  }, os = {
@@ -5185,9 +5187,9 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5185
5187
  action: {}
5186
5188
  },
5187
5189
  emits: ["update:show", "submit:form"],
5188
- setup(e, { emit: n }) {
5189
- var an, rn, sn, ln, un;
5190
- const t = e, i = n, a = me(), o = Xt(), { t: r } = ce(), l = T(() => t.action === "add" ? r("menu.product.form.title.add") : r("menu.product.form.title.update")), s = T(() => a.rules.item), u = (W) => new Promise((V) => setTimeout(V, W));
5190
+ setup(e, { emit: i }) {
5191
+ var oi, ai, ri, si, li;
5192
+ const t = e, n = i, a = me(), o = Xt(), { t: r } = ce(), l = T(() => t.action === "add" ? r("menu.product.form.title.add") : r("menu.product.form.title.update")), s = T(() => a.rules.item), u = (W) => new Promise((V) => setTimeout(V, W));
5191
5193
  Qe(async () => {
5192
5194
  t.autoShow && (await u(100), h());
5193
5195
  });
@@ -5195,7 +5197,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5195
5197
  Ce(
5196
5198
  () => d.value,
5197
5199
  async (W) => {
5198
- await u(500), i("update:show", W);
5200
+ await u(500), n("update:show", W);
5199
5201
  }
5200
5202
  );
5201
5203
  const h = () => {
@@ -5210,7 +5212,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5210
5212
  () => t.initialForm,
5211
5213
  async () => {
5212
5214
  if (t.initialForm)
5213
- y.value = await Ji(
5215
+ y.value = await Jn(
5214
5216
  a.state.menu,
5215
5217
  t.initialForm._id
5216
5218
  );
@@ -5221,9 +5223,9 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5221
5223
  immediate: !0
5222
5224
  }
5223
5225
  );
5224
- const v = nn(), g = async ([W, V]) => {
5225
- a.selectCatalog(W), a.selectScheduler(V), await ki(), v.update(c.value._id), setTimeout(() => {
5226
- i("update:show", !1);
5226
+ const v = ii(), g = async ([W, V]) => {
5227
+ a.selectCatalog(W), a.selectScheduler(V), await kn(), v.update(c.value._id), setTimeout(() => {
5228
+ n("update:show", !1);
5227
5229
  }, 100);
5228
5230
  }, w = T(() => {
5229
5231
  var W;
@@ -5250,7 +5252,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5250
5252
  };
5251
5253
  async function I() {
5252
5254
  var W, V;
5253
- m.value = c.value._id ? (await Qi(
5255
+ m.value = c.value._id ? (await Qn(
5254
5256
  a.mergedMenu,
5255
5257
  [c.value],
5256
5258
  a.state.menu,
@@ -5271,13 +5273,13 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5271
5273
  (pe = m.value) == null ? void 0 : pe.taxes,
5272
5274
  a.taxSetting.countryTaxOptions
5273
5275
  ), re = a.taxSetting.countryTaxOptions.find((X) => X.value === W);
5274
- return re ? yi(re.meta.rate) : "-";
5276
+ return re ? yn(re.meta.rate) : "-";
5275
5277
  }
5276
5278
  function _() {
5277
5279
  z.value = null, c.value.thumbnail = null;
5278
5280
  }
5279
5281
  const R = T(() => {
5280
- var W, V, re, pe, X, cn, dn, mn, hn;
5282
+ var W, V, re, pe, X, ui, ci, di, mi;
5281
5283
  return {
5282
5284
  title: r("menu.product.form.summary.title"),
5283
5285
  items: [
@@ -5307,16 +5309,16 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5307
5309
  },
5308
5310
  {
5309
5311
  name: r("menu.product.form.summary.fields.inventory"),
5310
- value: (cn = c.value.inventoryBindings) != null && cn.length ? String(c.value.inventoryBindings.length) : (mn = (dn = m.value) == null ? void 0 : dn.inventoryBindings) != null && mn.length ? String(m.value.inventoryBindings.length) : "-"
5312
+ value: (ui = c.value.inventoryBindings) != null && ui.length ? String(c.value.inventoryBindings.length) : (di = (ci = m.value) == null ? void 0 : ci.inventoryBindings) != null && di.length ? String(m.value.inventoryBindings.length) : "-"
5311
5313
  },
5312
5314
  {
5313
5315
  name: r("menu.product.form.summary.fields.takeaway"),
5314
- value: ((hn = a.state.menu.modules.takeaway.find(
5316
+ value: ((mi = a.state.menu.modules.takeaway.find(
5315
5317
  (Mt) => {
5316
- var pn;
5317
- return Mt._id === (c.value.takeawayUsed || ((pn = m.value) == null ? void 0 : pn.takeawayUsed));
5318
+ var hi;
5319
+ return Mt._id === (c.value.takeawayUsed || ((hi = m.value) == null ? void 0 : hi.takeawayUsed));
5318
5320
  }
5319
- )) == null ? void 0 : hn.name) || "-"
5321
+ )) == null ? void 0 : mi.name) || "-"
5320
5322
  }
5321
5323
  ]
5322
5324
  };
@@ -5341,7 +5343,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5341
5343
  });
5342
5344
  }
5343
5345
  const S = q(
5344
- (((an = c.value.variant) == null ? void 0 : an.variantCombinations) || []).some(
5346
+ (((oi = c.value.variant) == null ? void 0 : oi.variantCombinations) || []).some(
5345
5347
  (W) => !!W.price || !!W.orderFrom || !!W.code
5346
5348
  )
5347
5349
  );
@@ -5361,7 +5363,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5361
5363
  });
5362
5364
  }
5363
5365
  const Y = q(
5364
- !!c.value.inventoryBindings || (((rn = c.value.variant) == null ? void 0 : rn.variantCombinations) || []).some((W) => !!W.inventoryBindings) || !1
5366
+ !!c.value.inventoryBindings || (((ai = c.value.variant) == null ? void 0 : ai.variantCombinations) || []).some((W) => !!W.inventoryBindings) || !1
5365
5367
  );
5366
5368
  function J(W) {
5367
5369
  var V, re, pe;
@@ -5378,7 +5380,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5378
5380
  });
5379
5381
  }
5380
5382
  const M = q(
5381
- c.value.takeawayUsed != null || (((sn = c.value.variant) == null ? void 0 : sn.variantCombinations) || []).some((W) => W.takeawayUsed != null) || !1
5383
+ c.value.takeawayUsed != null || (((ri = c.value.variant) == null ? void 0 : ri.variantCombinations) || []).some((W) => W.takeawayUsed != null) || !1
5382
5384
  );
5383
5385
  function U(W) {
5384
5386
  var V, re;
@@ -5399,12 +5401,12 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5399
5401
  W || (c.value = { ...c.value, print: void 0 });
5400
5402
  }
5401
5403
  const j = q(
5402
- !!((ln = c.value.groups) != null && ln.length) != null || (((un = c.value.variant) == null ? void 0 : un.variantCombinations) || []).some((W) => {
5404
+ !!((si = c.value.groups) != null && si.length) != null || (((li = c.value.variant) == null ? void 0 : li.variantCombinations) || []).some((W) => {
5403
5405
  var V;
5404
5406
  return !!((V = W.groups) != null && V.length);
5405
5407
  }) || !1
5406
5408
  );
5407
- function ne(W) {
5409
+ function ie(W) {
5408
5410
  var V, re;
5409
5411
  W || (c.value = {
5410
5412
  ...c.value,
@@ -5447,7 +5449,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5447
5449
  } catch (re) {
5448
5450
  console.log(re);
5449
5451
  }
5450
- }), Ci(() => {
5452
+ }), Cn(() => {
5451
5453
  try {
5452
5454
  Te.closeSession();
5453
5455
  } catch (W) {
@@ -5462,19 +5464,19 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5462
5464
  te.isUpdatingItem = !1, a.selectCatalog(te.storedCatalogId), a.selectScheduler(te.storedSchedulerId);
5463
5465
  }
5464
5466
  function ct() {
5465
- i("submit:form", c.value, z.value), h(), we();
5467
+ n("submit:form", c.value, z.value), h(), we();
5466
5468
  }
5467
5469
  function dt() {
5468
5470
  h(), we();
5469
5471
  }
5470
- const { isAtMost: kt } = Pn();
5472
+ const { isAtMost: kt } = Ii();
5471
5473
  T(() => kt("sm"));
5472
- const on = q(null), ci = bi(on);
5474
+ const ni = q(null), cn = bn(ni);
5473
5475
  return (W, V) => (F(), Z(Re, null, [
5474
- he(W.$slots, "trigger", Ri(Ai({
5476
+ he(W.$slots, "trigger", Rn(An({
5475
5477
  trigger: h
5476
5478
  }))),
5477
- C(Pi, {
5479
+ C(Pn, {
5478
5480
  title: l.value,
5479
5481
  show: d.value,
5480
5482
  "primary-action": {
@@ -5490,7 +5492,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5490
5492
  onOnCancel: dt
5491
5493
  }, {
5492
5494
  "append-title": N(() => [
5493
- p(kt)("sm") ? (F(), G(zn, {
5495
+ p(kt)("sm") ? (F(), G(Oi, {
5494
5496
  key: 0,
5495
5497
  variant: "dialog",
5496
5498
  title: R.value.title,
@@ -5500,12 +5502,12 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5500
5502
  default: N(() => {
5501
5503
  var re, pe;
5502
5504
  return [
5503
- p(kt)("sm") ? ee("", !0) : (F(), G(zn, {
5505
+ p(kt)("sm") ? ee("", !0) : (F(), G(Oi, {
5504
5506
  key: 0,
5505
5507
  class: "fixed",
5506
- style: xi({
5508
+ style: xn({
5507
5509
  top: "85px",
5508
- left: p(ci).right + "px"
5510
+ left: p(cn).right + "px"
5509
5511
  }),
5510
5512
  variant: "full",
5511
5513
  title: R.value.title,
@@ -5514,7 +5516,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5514
5516
  D("div", Qr, [
5515
5517
  D("div", {
5516
5518
  ref_key: "formWrapper",
5517
- ref: on,
5519
+ ref: ni,
5518
5520
  class: Ee(["flex-1 py-24 space-y-24", "xs:w-full"])
5519
5521
  }, [
5520
5522
  y.value && (Object.keys(y.value.catalogs || {}).length > 0 || y.value.schedulers.length > 0) ? (F(), G(qr, {
@@ -5618,13 +5620,13 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5618
5620
  ]),
5619
5621
  _: 1
5620
5622
  }, 8, ["toggle", "disabled"]),
5621
- s.value.group && !E.value ? (F(), Z("div", ns)) : ee("", !0),
5623
+ s.value.group && !E.value ? (F(), Z("div", is)) : ee("", !0),
5622
5624
  s.value.group ? (F(), G(We, {
5623
5625
  key: 6,
5624
5626
  toggle: j.value,
5625
5627
  "onUpdate:toggle": [
5626
5628
  V[12] || (V[12] = (X) => j.value = X),
5627
- V[13] || (V[13] = (X) => ne(X))
5629
+ V[13] || (V[13] = (X) => ie(X))
5628
5630
  ],
5629
5631
  disabled: !E.value,
5630
5632
  description: "Use a different group setting",
@@ -5643,7 +5645,7 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5643
5645
  ]),
5644
5646
  _: 1
5645
5647
  }, 8, ["toggle", "disabled"])) : ee("", !0),
5646
- s.value.inventory && !E.value ? (F(), Z("div", is)) : ee("", !0),
5648
+ s.value.inventory && !E.value ? (F(), Z("div", ns)) : ee("", !0),
5647
5649
  s.value.inventory ? (F(), G(We, {
5648
5650
  key: 8,
5649
5651
  toggle: Y.value,
@@ -5703,14 +5705,14 @@ const Nr = /* @__PURE__ */ lt($r, [["render", Vr]]), Lr = {
5703
5705
  ], 64));
5704
5706
  }
5705
5707
  }), rs = as;
5706
- function ui(e, n) {
5708
+ function un(e, i) {
5707
5709
  var o, r, l, s;
5708
- const t = (o = n.groups) == null ? void 0 : o.reduce((u, d) => {
5710
+ const t = (o = i.groups) == null ? void 0 : o.reduce((u, d) => {
5709
5711
  const h = e.groups.find((c) => c._id === d._id);
5710
5712
  return Ct(e.items, h.items) === L.F_ADDON_GROUP_TYPE.enum.DYNAMIC && u.push(h), u;
5711
5713
  }, []);
5712
- if (!(t != null && t.length)) return n;
5713
- const i = t.map((u) => u._id);
5714
+ if (!(t != null && t.length)) return i;
5715
+ const n = t.map((u) => u._id);
5714
5716
  function a(u) {
5715
5717
  const d = t.map((h) => {
5716
5718
  var y;
@@ -5733,28 +5735,28 @@ function ui(e, n) {
5733
5735
  items: c
5734
5736
  };
5735
5737
  });
5736
- return [...u.filter((h) => !i.includes(h._id)), ...d];
5738
+ return [...u.filter((h) => !n.includes(h._id)), ...d];
5737
5739
  }
5738
- if ((r = n.variant) != null && r.variantCombinations.length) {
5739
- const u = (l = n.variant) == null ? void 0 : l.variantCombinations.map((d) => ({ ...d, groups: a(d.groups || []) }));
5740
+ if ((r = i.variant) != null && r.variantCombinations.length) {
5741
+ const u = (l = i.variant) == null ? void 0 : l.variantCombinations.map((d) => ({ ...d, groups: a(d.groups || []) }));
5740
5742
  return {
5741
- ...n,
5743
+ ...i,
5742
5744
  variant: {
5743
- variantGroupIds: ((s = n.variant) == null ? void 0 : s.variantGroupIds) || [],
5745
+ variantGroupIds: ((s = i.variant) == null ? void 0 : s.variantGroupIds) || [],
5744
5746
  variantCombinations: u || []
5745
5747
  }
5746
5748
  };
5747
5749
  }
5748
- return { ...n, groups: a(n.groups || []) };
5750
+ return { ...i, groups: a(i.groups || []) };
5749
5751
  }
5750
- const nn = Fn("item-manager", () => {
5751
- const e = me(), n = Le(), t = Ue(), i = Ye(n), a = He(i), o = Mi(), { t: r } = ce(), l = (f) => {
5752
+ const ii = zi("item-manager", () => {
5753
+ const e = me(), i = Le(), t = Ue(), n = Ye(i), a = He(n), o = Mn(), { t: r } = ce(), l = (f) => {
5752
5754
  if (!o) throw new Error("No current instance found");
5753
- const { container: b } = _i(rs, o, {
5755
+ const { container: b } = _n(rs, o, {
5754
5756
  ...f,
5755
5757
  autoShow: !0,
5756
5758
  "onUpdate:show": async (x) => {
5757
- x || (Oi(null, b), b.remove());
5759
+ x || (On(null, b), b.remove());
5758
5760
  }
5759
5761
  });
5760
5762
  };
@@ -5764,11 +5766,11 @@ const nn = Fn("item-manager", () => {
5764
5766
  return delete b.variant, delete b.thumbnail, [b, ...x || []];
5765
5767
  }
5766
5768
  function u(f, b, x, k) {
5767
- const S = ae(b), K = x ? S.modules.catalog.find((j) => j._id === x) : null, Y = k ? S.modules.scheduler.find((j) => j._id === k) : null, J = K ? ae(K) : void 0, M = x ? S.modules.catalog.filter((j) => j._id !== x) : [], U = Y ? ae(Y) : void 0, $ = f.reduce((j, ne) => (j[ne._id] = s(ne), j), {});
5769
+ const S = ae(b), K = x ? S.modules.catalog.find((j) => j._id === x) : null, Y = k ? S.modules.scheduler.find((j) => j._id === k) : null, J = K ? ae(K) : void 0, M = x ? S.modules.catalog.filter((j) => j._id !== x) : [], U = Y ? ae(Y) : void 0, $ = f.reduce((j, ie) => (j[ie._id] = s(ie), j), {});
5768
5770
  function Q(j = []) {
5769
- const ne = f.map((te) => te._id);
5771
+ const ie = f.map((te) => te._id);
5770
5772
  return [
5771
- ...j.filter((te) => !ne.includes(te._id)),
5773
+ ...j.filter((te) => !ie.includes(te._id)),
5772
5774
  ...Object.values($).flatMap((te) => te)
5773
5775
  ];
5774
5776
  }
@@ -5807,7 +5809,7 @@ const nn = Fn("item-manager", () => {
5807
5809
  categoryId: f,
5808
5810
  "onSubmit:form": async (x, k) => {
5809
5811
  x.inventoryBindings ?? (x.inventoryBindings = []), x.inventoryBindings.length === 0 && (x.inventoryBindings = null);
5810
- const S = gn();
5812
+ const S = fi();
5811
5813
  await b(x, be.F_OPERATION_TYPE.create, S, k);
5812
5814
  }
5813
5815
  });
@@ -5965,7 +5967,7 @@ const nn = Fn("item-manager", () => {
5965
5967
  initialForm: f,
5966
5968
  action: "update",
5967
5969
  "onSubmit:form": async (x, k) => {
5968
- const S = gn(f._id);
5970
+ const S = fi(f._id);
5969
5971
  x.inventoryBindings ?? (x.inventoryBindings = []), x.inventoryBindings.length === 0 && (x.inventoryBindings = null), await b(x, be.F_OPERATION_TYPE.update, S, k);
5970
5972
  }
5971
5973
  });
@@ -6005,8 +6007,8 @@ const nn = Fn("item-manager", () => {
6005
6007
  !0
6006
6008
  );
6007
6009
  for (const k of f)
6008
- k.thumbnail && await wi.delete(k.thumbnail);
6009
- n.open({
6010
+ k.thumbnail && await wn.delete(k.thumbnail);
6011
+ i.open({
6010
6012
  message: r("menu.common.dialog.remove.product.success"),
6011
6013
  type: "success"
6012
6014
  });
@@ -6037,7 +6039,7 @@ const nn = Fn("item-manager", () => {
6037
6039
  );
6038
6040
  }
6039
6041
  return {
6040
- initDynamicGroupItem: (f) => ui(e, f),
6042
+ initDynamicGroupItem: (f) => un(e, f),
6041
6043
  create: d,
6042
6044
  update: E,
6043
6045
  updateMany: P,
@@ -6046,12 +6048,12 @@ const nn = Fn("item-manager", () => {
6046
6048
  };
6047
6049
  });
6048
6050
  export {
6049
- On as A,
6050
- Nn as M,
6051
+ Mi as A,
6052
+ Vi as M,
6051
6053
  vt as S,
6052
- li as _,
6053
- Vn as a,
6054
+ ln as _,
6055
+ $i as a,
6054
6056
  qt as e,
6055
- Qi as m,
6056
- nn as u
6057
+ Qn as m,
6058
+ ii as u
6057
6059
  };