@feedmepos/mf-inventory-portal 0.0.23-dev.9 → 0.0.24-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/App-D3sNH2MR.js +276 -0
  2. package/dist/{ApprovalView-e85YmdZN.js → ApprovalView-DHnRx0hJ.js} +17 -20
  3. package/dist/{BindingsDialog-giBUD0IH.js → BindingsDialog-oTeg2Dai.js} +6 -6
  4. package/dist/{BindingsPicker-CC4MmPbF.js → BindingsPicker-CWdjmMJ3.js} +8 -9
  5. package/dist/{BindingsTable-WphZdzrA.js → BindingsTable-bKLR1OKX.js} +18 -22
  6. package/dist/ClosingDraftView-CIQVz7lY.js +1225 -0
  7. package/dist/{ClosingTemplateView-1lzoDyet.js → ClosingTemplateView-D5pLzQwU.js} +259 -274
  8. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-ClLDcchC.js +142 -0
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cv-vvzr5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B_c6Vn6P.js} +23 -24
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DIFQcrc0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DhpHOaRH.js} +50 -51
  11. package/dist/{IngredientGroupView-UegBM_JK.js → IngredientGroupView-4C437mso.js} +63 -70
  12. package/dist/IngredientsView-DoiGgjre.js +1706 -0
  13. package/dist/{IntegrationView-FYNNzKia.js → IntegrationView-8ZKE7MAM.js} +123 -126
  14. package/dist/{InventoryBindingForm-DsHv_IHG.js → InventoryBindingForm-CcnfliYQ.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BURSXafS.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B_J-6C9x.js} +116 -108
  16. package/dist/{InventoryBindingSummary-BLb4MRPZ.js → InventoryBindingSummary-CRdHCzNE.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BG78-DHs.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B2-TypU0.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CqID5_7v.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BuQde75S.js} +20 -21
  19. package/dist/PublishView-t5gjGmK_.js +192 -0
  20. package/dist/{PurchaseOrderPrintPreview-BBMU3teq.js → PurchaseOrderPrintPreview-6i53Y-v1.js} +13 -14
  21. package/dist/ReceiveRequestView-uOeSh0Mr.js +1866 -0
  22. package/dist/RecipeView-BTWywckD.js +609 -0
  23. package/dist/StockView-DN2xk8ei.js +1817 -0
  24. package/dist/{SupplierView-B2aObtwK.js → SupplierView-l0XUg3J4.js} +185 -196
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CWMn6fFf.js +1327 -0
  26. package/dist/TransferTemplateView-wDKXpCWZ.js +1263 -0
  27. package/dist/UnitView-CUI-k-tS.js +648 -0
  28. package/dist/{WarehouseView-G8pej6Y2.js → WarehouseView-WsI_eG5r.js} +190 -197
  29. package/dist/api/adjustment-template.d.ts +25 -0
  30. package/dist/api/bill.d.ts +240 -84
  31. package/dist/api/inventory.d.ts +19 -6
  32. package/dist/api/netsuite.d.ts +3 -3
  33. package/dist/app-DntcWR3_.js +85558 -0
  34. package/dist/app.d.ts +85 -0
  35. package/dist/app.js +2 -2
  36. package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
  37. package/dist/components/FmLockableField.vue.d.ts +37 -0
  38. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  39. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
  40. package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
  41. package/dist/composable/defineDeepModel.d.ts +1 -1
  42. package/dist/{decimal-DC07xoJW.js → decimal-DTCTnMwO.js} +1 -1
  43. package/dist/format-unit-display-Hy48Iw5j.js +1215 -0
  44. package/dist/index-Bv9RYyTZ.js +29202 -0
  45. package/dist/{StockView-C5btudss.js → index-D4yJP9I2.js} +2220 -3863
  46. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -0
  47. package/dist/router/name.d.ts +2 -0
  48. package/dist/stock-BsdmfT-b.js +125 -0
  49. package/dist/stores/feature.d.ts +41 -1
  50. package/dist/stores/integration/netsuite.d.ts +3 -2
  51. package/dist/stores/inventory.d.ts +20 -8
  52. package/dist/stores/location.d.ts +29 -1
  53. package/dist/stores/supplier.d.ts +1 -1
  54. package/dist/style.css +1 -1
  55. package/dist/supplier-CXhkgC4M.js +77 -0
  56. package/dist/tsconfig.app.tsbuildinfo +1 -1
  57. package/dist/{use-inventory-binding-dialog-B0G2XYSw.js → use-inventory-binding-dialog-DPMJmBCr.js} +10 -11
  58. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
  59. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
  60. package/dist/views/adjustment-template/import/export.d.ts +60 -0
  61. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  62. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  63. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  64. package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
  65. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  66. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1377 -0
  67. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  68. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  69. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  70. package/dist/views/adjustment-template/wastage-template/props.d.ts +36 -0
  71. package/dist/views/adjustment-template/wastage-template/table.d.ts +1351 -0
  72. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +198 -12
  73. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +7 -4
  74. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1559 -467
  75. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  76. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  77. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
  78. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +72 -12
  79. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +73 -13
  80. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
  81. package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
  82. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
  83. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
  84. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
  85. package/dist/views/publish/PublishView.vue.d.ts +2 -0
  86. package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +12 -0
  87. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +13 -0
  88. package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +12 -0
  89. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +13 -0
  90. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  91. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +86 -17
  92. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
  93. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
  94. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +126 -24
  95. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +126 -24
  96. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
  97. package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
  98. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
  99. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  100. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -0
  101. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
  102. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +72 -12
  103. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +72 -12
  104. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
  105. package/dist/vue-i18n-ByVzHsI7.js +2365 -0
  106. package/package.json +5 -4
  107. package/dist/App-ByLgARNp.js +0 -259
  108. package/dist/ClosingDraftView-CQM1Sx45.js +0 -755
  109. package/dist/FmDroppableField-8RzKjEdL.js +0 -154
  110. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BvkN-71q.js +0 -436
  111. package/dist/FmMultiselectDialog-DScMA6iG.js +0 -415
  112. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-t4pim_k9.js +0 -51
  113. package/dist/IngredientsView-BfW-jZLM.js +0 -1666
  114. package/dist/ReceiveRequestView-vbANEzne.js +0 -4165
  115. package/dist/RecipeView-DW4DY0C0.js +0 -598
  116. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  117. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-B2LOvVef.js +0 -1229
  118. package/dist/TransferTemplateView-BKumN_p6.js +0 -1262
  119. package/dist/UnitView-CHLucv9s.js +0 -648
  120. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  121. package/dist/app-BXjk74IB.js +0 -33538
  122. package/dist/date2-CWAt9bRf.js +0 -117
  123. package/dist/dayjs.min-D3jPOnu6.js +0 -282
  124. package/dist/defineDeepModel-CiD4GtOw.js +0 -13
  125. package/dist/feature-6tcLMotY.js +0 -92
  126. package/dist/form-mode.enum-BKiNVH6A.js +0 -4
  127. package/dist/format-time-from-id-CYU5Z9Mt.js +0 -15
  128. package/dist/format-unit-display-CY-0bznr.js +0 -1217
  129. package/dist/fuzzy-BMkhNYLR.js +0 -41
  130. package/dist/index-BXwQa14X.js +0 -45
  131. package/dist/index-CRLd5xyg.js +0 -22283
  132. package/dist/index-DqwAtOgI.js +0 -12087
  133. package/dist/netsuite-fYUUk_ss.js +0 -225
  134. package/dist/row-action.enum-7rGLGZ5v.js +0 -55
  135. package/dist/rules-BmRGm3yv.js +0 -203
  136. package/dist/stock-CEX0DP2B.js +0 -111
  137. package/dist/supplier-CdJmZr7w.js +0 -77
  138. package/dist/use-template-enabled-locations-2-xbPJWHCs.js +0 -86
  139. package/dist/xlsx-CTOKp7SQ.js +0 -24004
  140. package/dist/xlsx.util-D5NFSfDg.js +0 -78
@@ -1,4165 +0,0 @@
1
- import { reactive as Vn, onMounted as It, h as ge, computed as Q, defineComponent as Ae, openBlock as G, createElementBlock as ne, Fragment as je, renderList as wt, createElementVNode as L, toDisplayString as re, unref as m, resolveComponent as X, createVNode as M, withCtx as q, createCommentVNode as Ie, ref as ce, createBlock as Oe, watch as qe, normalizeClass as Pe, normalizeStyle as Gn, getCurrentInstance as Yt, inject as ps, onUnmounted as _s, shallowRef as ms, Text as fs, createTextVNode as Ut, mergeProps as Ft, isRef as rt, Teleport as vs } from "vue";
2
- import { w as gs, x as Bn, a as Kt, y as bs, u as Xt, I as ys, z as vt } from "./app-BXjk74IB.js";
3
- import { i as on, u as Es, _ as hs, a as Ts } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BvkN-71q.js";
4
- import { u as $n, a as ks, b as Is, _ as Os, g as Ss } from "./TransferDetails.vue_vue_type_script_setup_true_lang-B2LOvVef.js";
5
- import { R as ln, a as Xe, g as Ns, j as qt, c as Rs, A as ht, M as Cs, B as As } from "./rules-BmRGm3yv.js";
6
- import { _ as jn, u as Ds, i as Ls, e as Ps } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-CqID5_7v.js";
7
- import { d as cn } from "./dayjs.min-D3jPOnu6.js";
8
- import { u as ws } from "./useTabStorage-BkIVScW_.js";
9
- import { useBreakpoints as Jt, components as st, FmButtonVariant as Us, useSnackbar as Ot, useDialog as Fs, useProxiedModel as Ms } from "@feedmepos/ui-library";
10
- import { F as ct } from "./form-mode.enum-BKiNVH6A.js";
11
- import { P as Te, u as Wn } from "./format-unit-display-CY-0bznr.js";
12
- import { _ as xs, F as Hs, a as un, b as Vs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DIFQcrc0.js";
13
- import { u as St } from "./feature-6tcLMotY.js";
14
- import { c as Me, u as Gs, _ as Bs } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cv-vvzr5.js";
15
- import { F as $s, i as js } from "./index-CRLd5xyg.js";
16
- import { useI18n as et } from "@feedmepos/mf-common";
17
- import { u as zt } from "./supplier-CdJmZr7w.js";
18
- import { F as Ws } from "./FmMultiselectDialog-DScMA6iG.js";
19
- import { d as Ys } from "./defineDeepModel-CiD4GtOw.js";
20
- import { F as xe, _ as Yn } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
21
- import { c as Qt, e as Ks, g as Xs, a as qs } from "./date2-CWAt9bRf.js";
22
- import { _ as Js } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
23
- import { u as Kn } from "./netsuite-fYUUk_ss.js";
24
- import "@vue/devtools-api";
25
- import "./array-hChJVZLE.js";
26
- var ke = /* @__PURE__ */ ((e) => (e.Code = "Code", e.Name = "Name", e.Amount = "Amount", e.Cost = "Cost", e.TotalCost = "TotalCost", e.Delete = "Delete", e))(ke || {});
27
- const dn = () => {
28
- const { t: e } = et();
29
- return ge(
30
- jn,
31
- {
32
- zIndex: 50,
33
- class: "whitespace-nowrap"
34
- },
35
- e("inventory.transfer.form.items.table.Cost", [Bn()])
36
- );
37
- };
38
- function zs(e) {
39
- const { t } = et(), n = Vn({}), { breakpoints: s } = Jt(), a = St();
40
- It(() => {
41
- for (const i of e.items) {
42
- if (!i.totalCost)
43
- continue;
44
- const u = Me(i.sku, i.quantity, i.measurement, {
45
- supplier: e.supplier
46
- }), f = i.totalCost ?? $s.reset();
47
- u ? n[i.sku._id] = u.amount !== f.amount || u.precision !== f.precision : n[i.sku._id] = !0;
48
- }
49
- });
50
- function r(i) {
51
- var f, b, v, O, C, R, I;
52
- return !!(((b = (f = i.defaultCost) == null ? void 0 : f.costPerUnit) == null ? void 0 : b.amount) ?? ((I = (R = (C = (O = (v = e.supplier) == null ? void 0 : v.supplyItems) == null ? void 0 : O.find((d) => d.skuId === i._id)) == null ? void 0 : C.defaultCost) == null ? void 0 : R.costPerUnit) == null ? void 0 : I.amount));
53
- }
54
- const c = [
55
- {
56
- id: "Code",
57
- header: () => t("inventory.transfer.form.items.table.Code"),
58
- accessorKey: "code",
59
- size: 96,
60
- cell(i) {
61
- const u = i.row.original;
62
- return ge(st.FmTextField, {
63
- modelValue: u.code,
64
- "onUpdate:modelValue": (f) => {
65
- e.updateItem({
66
- ...u,
67
- code: f
68
- });
69
- },
70
- key: u.sku._id,
71
- rules: [ln()],
72
- labelMark: "required"
73
- });
74
- },
75
- enableSorting: !1
76
- },
77
- {
78
- id: "Name",
79
- header: () => t("inventory.transfer.form.items.table.Name"),
80
- minSize: 300,
81
- cell(i) {
82
- const u = i.row.original;
83
- return ge(st.FmTextField, {
84
- modelValue: u.name,
85
- "onUpdate:modelValue": (f) => {
86
- e.updateItem({
87
- ...u,
88
- name: f
89
- });
90
- },
91
- key: u.sku._id,
92
- rules: [ln()],
93
- labelMark: "required"
94
- });
95
- },
96
- enableSorting: !1
97
- },
98
- {
99
- id: "Amount",
100
- header: () => t("inventory.transfer.form.items.table.Amount"),
101
- minSize: 200,
102
- cell(i) {
103
- var b, v, O;
104
- const u = i.row.original, f = (O = (v = (b = e.template) == null ? void 0 : b.purchaseOrder) == null ? void 0 : v.items) == null ? void 0 : O.find(
105
- (C) => C.sku._id === u.sku._id
106
- );
107
- return ge(xs, {
108
- style: {
109
- flex: "1 1 0%"
110
- },
111
- modelValue: {
112
- amount: u.quantity ?? { amount: 1, precision: 0 },
113
- measurement: u.measurement ?? null
114
- },
115
- key: u.sku._id,
116
- unit: u.sku.unit,
117
- "onUpdate:modelValue": (C) => {
118
- const R = {
119
- ...u,
120
- quantity: C.amount,
121
- measurement: C.measurement
122
- };
123
- a.enableTotalCost && (R.totalCost = Me(u.sku, u.quantity, u.measurement, {
124
- supplier: e.supplier,
125
- // NOTE: set undefined here if `manualTotalCost[row.sku._id] = false`, so that the function
126
- // will return the auto calculated default cost instead of the manual total cost
127
- manualTotalCost: n[u.sku._id] ? R.totalCost : void 0
128
- })), e.updateItem(R);
129
- },
130
- stepper: f == null ? void 0 : f.quantityStep,
131
- disableUnit: !!f,
132
- disabled: e.disabled,
133
- rules: [
134
- Hs(
135
- +Xe(
136
- (f == null ? void 0 : f.minimumQuantity) ?? {
137
- amount: 1,
138
- precision: Ns(u.sku.unit, u.measurement)
139
- }
140
- )
141
- ),
142
- f != null && f.maximumQuantity ? un(
143
- +Xe(f == null ? void 0 : f.maximumQuantity)
144
- ) : un(1 / 0),
145
- ...f != null && f.quantityStep ? [Vs(f.quantityStep)] : []
146
- ],
147
- applyDefaultRules: !0
148
- });
149
- },
150
- enableSorting: !1
151
- },
152
- a.mustUseDefaultCost ? {
153
- id: "TotalCost",
154
- header: dn,
155
- size: 180,
156
- accessorFn: (i) => {
157
- const u = Me(i.sku, i.quantity, i.measurement, {
158
- supplier: e.supplier
159
- });
160
- return Xe(u);
161
- }
162
- } : {
163
- id: "Cost",
164
- header: dn,
165
- size: 180,
166
- cell(i) {
167
- const u = i.row.original, f = r(u.sku), b = s.value.xs || s.value.sm;
168
- return !n[u.sku._id] && f ? ge(
169
- "div",
170
- {
171
- class: [
172
- "flex gap-4 fm-typo-en-body-md-400 items-center",
173
- e.disabled ? "text-fm-color-typo-disabled" : ""
174
- ],
175
- key: u.sku._id
176
- },
177
- [
178
- ge(st.FmButton, {
179
- prependIcon: "edit",
180
- variant: Us.Tertiary,
181
- disabled: e.disabled,
182
- onClick() {
183
- e.updateItem({
184
- ...u,
185
- totalCost: Me(u.sku, u.quantity, u.measurement, {
186
- supplier: e.supplier
187
- })
188
- }), n[u.sku._id] = !0;
189
- }
190
- }),
191
- ge(
192
- "div",
193
- {
194
- class: "flex flex-col"
195
- },
196
- [
197
- ge(
198
- "span",
199
- b ? qt(
200
- Me(u.sku, u.quantity, u.measurement, {
201
- supplier: e.supplier
202
- })
203
- ) : Xe(
204
- Me(u.sku, u.quantity, u.measurement, {
205
- supplier: e.supplier
206
- })
207
- )
208
- ),
209
- ge(
210
- "span",
211
- {
212
- class: [
213
- "fm-typo-en-body-sm-400",
214
- e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-neutral-gray-400"
215
- ]
216
- },
217
- t("inventory.transfer.form.items.autoCalculated")
218
- )
219
- ]
220
- )
221
- ]
222
- ) : ge(
223
- st.FmTextField,
224
- {
225
- modelValue: Xe(u.totalCost ?? { amount: 0, precision: 0 }),
226
- key: u.sku._id,
227
- "onUpdate:modelValue": (v) => {
228
- e.updateItem({
229
- ...u,
230
- totalCost: {
231
- ...Rs(+v),
232
- currency: gs()
233
- }
234
- });
235
- },
236
- rules: [ht(0), Cs(2)]
237
- },
238
- {
239
- prepend() {
240
- return b ? ge(
241
- "div",
242
- {
243
- class: [
244
- "text-fm-typo-en-body-lg-400",
245
- e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
246
- ]
247
- },
248
- Bn()
249
- ) : null;
250
- },
251
- append() {
252
- return f ? ge(st.FmButton, {
253
- prependIcon: "close",
254
- variant: "tertiary",
255
- disabled: e.disabled,
256
- onClick() {
257
- e.updateItem({
258
- ...u,
259
- // NOTE: different from PO template, if a default cost is reenabled,
260
- // the total cost will automatically assigned
261
- totalCost: Me(u.sku, u.quantity, u.measurement, {
262
- supplier: e.supplier
263
- })
264
- }), n[u.sku._id] = !1;
265
- }
266
- }) : null;
267
- }
268
- }
269
- );
270
- },
271
- enableSorting: !1
272
- },
273
- {
274
- id: "Delete",
275
- header: "",
276
- cell(i) {
277
- const u = i.row.original;
278
- return ge(st.FmButton, {
279
- key: u.sku._id,
280
- class: "delete-button",
281
- type: "button",
282
- icon: "delete",
283
- variant: "tertiary",
284
- size: "md",
285
- disabled: e.disabled,
286
- onClick: () => {
287
- e.deleteItem(u);
288
- }
289
- });
290
- },
291
- enableSorting: !1,
292
- size: 40,
293
- meta: {
294
- cellClass: "",
295
- headerClass: ""
296
- }
297
- }
298
- ];
299
- return {
300
- columnDefs: Q(() => a.enableTotalCost && (a.mustUseDefaultCost || e.transferType === Te.PURCHASE) ? c : c.filter(
301
- (i) => i.id !== "Cost"
302
- /* Cost */
303
- ))
304
- };
305
- }
306
- const Qs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, Zs = { class: "fm-typo-en-body-lg-600 xs:fm-typo-en-body-md-600 mr-auto xs:w-full" }, er = { class: "w-[450px] xs:w-full flex" }, tr = { class: "fm-typo-en-body-md-400 whitespace-nowrap" }, nr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Xn = /* @__PURE__ */ Ae({
307
- __name: "SupplierPriceHistory",
308
- props: {
309
- prices: {}
310
- },
311
- setup(e) {
312
- const t = zt();
313
- function n(s) {
314
- return t.suppliers.find((a) => a._id === s);
315
- }
316
- return (s, a) => (G(), ne("div", Qs, [
317
- (G(!0), ne(je, null, wt(Object.keys(s.prices), (r) => {
318
- var c;
319
- return G(), ne("div", {
320
- key: r,
321
- class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
322
- }, [
323
- L("div", Zs, re((c = n(r)) == null ? void 0 : c.name), 1),
324
- L("div", er, [
325
- (G(!0), ne(je, null, wt(s.prices[r].slice(0, 3), (p) => {
326
- var i;
327
- return G(), ne("div", {
328
- key: p.date,
329
- class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
330
- }, [
331
- L("div", tr, [
332
- L("span", null, re(p.totalCost ? m(qt)(p.totalCost) : "No data"), 1),
333
- a[0] || (a[0] = L("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
334
- L("span", null, re(m(Xe)(p.totalUnit, !1)), 1),
335
- L("span", null, re(((i = p.measurement) == null ? void 0 : i.abbrev) ?? p.unit.abbrev), 1)
336
- ]),
337
- L("div", nr, [
338
- L("span", null, "(#" + re(p.seqNumber) + ")", 1),
339
- a[1] || (a[1] = L("span", null, re(" "), -1)),
340
- L("span", null, re(m(Qt)(new Date(p.date))), 1)
341
- ])
342
- ]);
343
- }), 128))
344
- ])
345
- ]);
346
- }), 128))
347
- ]));
348
- }
349
- }), sr = { class: "flex flex-col gap-8 py-16" }, rr = { class: "flex items-center" }, ar = { class: "flex-1 flex gap-1 items-center" }, or = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, lr = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ir = { class: "flex gap-8 w-full" }, cr = { class: "flex-1 flex flex-col gap-4" }, ur = { class: "flex-1 flex flex-col gap-4" }, dr = { class: "flex gap-8 w-full" }, pr = { class: "flex-1 flex flex-col gap-4" }, _r = {
350
- key: 0,
351
- class: "flex-1 flex flex-col gap-4"
352
- }, mr = /* @__PURE__ */ Ae({
353
- __name: "TransferItem",
354
- props: {
355
- cellByColId: {},
356
- comparePriceBySku: {},
357
- showComparePrice: { type: Boolean },
358
- row: {}
359
- },
360
- setup(e) {
361
- const { t } = et();
362
- return (n, s) => {
363
- var c, p, i, u, f, b, v, O, C, R, I, d, g, S, y, T, k, h, V, H, B, Z, $, w, P, le, ye;
364
- const a = X("FmLabel"), r = X("FmSpacer");
365
- return G(), ne("div", sr, [
366
- L("div", rr, [
367
- L("div", ar, [
368
- L("span", or, " (" + re(n.row.original.sku.code) + ") ", 1),
369
- L("span", lr, re(n.row.original.sku.name), 1)
370
- ]),
371
- L("div", null, [
372
- M(m(xe), {
373
- render: (i = (p = (c = n.cellByColId.Delete) == null ? void 0 : c.column) == null ? void 0 : p.columnDef) == null ? void 0 : i.cell,
374
- props: (f = (u = n.cellByColId.Delete) == null ? void 0 : u.getContext) == null ? void 0 : f.call(u)
375
- }, null, 8, ["render", "props"])
376
- ])
377
- ]),
378
- L("div", ir, [
379
- L("div", cr, [
380
- M(a, {
381
- label: m(t)(`inventory.transfer.form.items.table.${m(ke).Code}`)
382
- }, null, 8, ["label"]),
383
- M(m(xe), {
384
- render: (O = (v = (b = n.cellByColId[m(ke).Code]) == null ? void 0 : b.column) == null ? void 0 : v.columnDef) == null ? void 0 : O.cell,
385
- props: (R = (C = n.cellByColId[m(ke).Code]) == null ? void 0 : C.getContext) == null ? void 0 : R.call(C)
386
- }, null, 8, ["render", "props"]),
387
- s[0] || (s[0] = L("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
388
- ]),
389
- L("div", ur, [
390
- M(a, {
391
- label: m(t)(`inventory.transfer.form.items.table.${m(ke).Name}`)
392
- }, null, 8, ["label"]),
393
- M(m(xe), {
394
- render: (g = (d = (I = n.cellByColId[m(ke).Name]) == null ? void 0 : I.column) == null ? void 0 : d.columnDef) == null ? void 0 : g.cell,
395
- props: (y = (S = n.cellByColId[m(ke).Name]) == null ? void 0 : S.getContext) == null ? void 0 : y.call(S)
396
- }, null, 8, ["render", "props"]),
397
- s[1] || (s[1] = L("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
398
- ])
399
- ]),
400
- L("div", dr, [
401
- L("div", pr, [
402
- M(a, {
403
- label: m(t)(`inventory.transfer.form.items.table.${m(ke).Amount}`)
404
- }, null, 8, ["label"]),
405
- M(m(xe), {
406
- render: (h = (k = (T = n.cellByColId[m(ke).Amount]) == null ? void 0 : T.column) == null ? void 0 : k.columnDef) == null ? void 0 : h.cell,
407
- props: (H = (V = n.cellByColId[m(ke).Amount]) == null ? void 0 : V.getContext) == null ? void 0 : H.call(V)
408
- }, null, 8, ["render", "props"]),
409
- s[2] || (s[2] = L("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
410
- ]),
411
- n.cellByColId[m(ke).Cost] ? (G(), ne("div", _r, [
412
- M(jn, { "z-index": 50 }, {
413
- default: q(() => [
414
- M(a, {
415
- label: m(t)(`inventory.transfer.form.items.table.${m(ke).Cost}2`)
416
- }, null, 8, ["label"])
417
- ]),
418
- _: 1
419
- }),
420
- M(m(xe), {
421
- render: ($ = (Z = (B = n.cellByColId[m(ke).Cost]) == null ? void 0 : B.column) == null ? void 0 : Z.columnDef) == null ? void 0 : $.cell,
422
- props: (P = (w = n.cellByColId[m(ke).Cost]) == null ? void 0 : w.getContext) == null ? void 0 : P.call(w)
423
- }, null, 8, ["render", "props"]),
424
- s[3] || (s[3] = L("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
425
- ])) : Ie("", !0)
426
- ]),
427
- n.showComparePrice && Object.keys(n.comparePriceBySku[(le = n.row.original.sku) == null ? void 0 : le._id] ?? {}).length > 0 ? (G(), ne(je, { key: 0 }, [
428
- M(r, { class: "h-8" }),
429
- M(Xn, {
430
- prices: n.comparePriceBySku[(ye = n.row.original.sku) == null ? void 0 : ye._id]
431
- }, null, 8, ["prices"])
432
- ], 64)) : Ie("", !0)
433
- ]);
434
- };
435
- }
436
- });
437
- function fr(e) {
438
- const t = Q({
439
- get() {
440
- const r = e.getEffectiveAt();
441
- return r ? new Date(r) : null;
442
- },
443
- set(r) {
444
- e.setEffectiveAt((r == null ? void 0 : r.toISOString()) ?? null);
445
- }
446
- }), n = Q({
447
- get() {
448
- return !!t.value;
449
- },
450
- set(r) {
451
- r ? t.value = /* @__PURE__ */ new Date() : t.value = null;
452
- }
453
- }), s = Q({
454
- get() {
455
- return t.value === null ? "" : Qt(t.value);
456
- },
457
- set(r) {
458
- r ? t.value = /* @__PURE__ */ new Date(`${r} ${a.value}`) : t.value = null;
459
- }
460
- }), a = Q({
461
- get() {
462
- return t.value === null ? "" : Ks(t.value);
463
- },
464
- set(r) {
465
- r ? t.value = /* @__PURE__ */ new Date(`${s.value} ${r}`) : t.value = null;
466
- }
467
- });
468
- return {
469
- backdatePo: t,
470
- backdateSwitch: n,
471
- backdateModel: s,
472
- backdateTimeModel: a
473
- };
474
- }
475
- const vr = {
476
- width: "24",
477
- height: "24",
478
- viewBox: "0 0 24 24",
479
- fill: "none",
480
- xmlns: "http://www.w3.org/2000/svg"
481
- }, gr = ["fill"], br = ["fill"], yr = ["stroke"], Er = ["stroke"], hr = /* @__PURE__ */ Ae({
482
- __name: "SparkIcon",
483
- props: {
484
- size: {
485
- type: Number,
486
- default: 24
487
- },
488
- color: {
489
- type: String,
490
- default: "#c7c7cc"
491
- }
492
- },
493
- setup(e) {
494
- return (t, n) => (G(), ne("svg", vr, [
495
- L("path", {
496
- d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
497
- fill: e.color
498
- }, null, 8, gr),
499
- L("path", {
500
- d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
501
- fill: e.color
502
- }, null, 8, br),
503
- L("path", {
504
- d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
505
- stroke: e.color,
506
- "stroke-width": "1.5",
507
- "stroke-linecap": "round",
508
- "stroke-linejoin": "round"
509
- }, null, 8, yr),
510
- L("path", {
511
- d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
512
- stroke: e.color,
513
- "stroke-width": "1.5",
514
- "stroke-linecap": "round",
515
- "stroke-linejoin": "round"
516
- }, null, 8, Er)
517
- ]));
518
- }
519
- }), Tr = { class: "flex gap-8 items-center" }, kr = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, Ir = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, Or = { class: "flex items-center w-full" }, Sr = { class: "flex-1" }, Nr = { class: "fm-typo-en-title-sm-800" }, Rr = { class: "flex items-start gap-8" }, Cr = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ar = { class: "flex gap-1" }, pn = /* @__PURE__ */ Ae({
520
- __name: "ForecastStock",
521
- props: {
522
- disabled: { type: Boolean }
523
- },
524
- emits: ["update:poItems"],
525
- setup(e, { emit: t }) {
526
- const n = t, s = ce(!1), a = ce(7), r = Ds(), c = Ot(), p = Kt(), { t: i } = et();
527
- async function u() {
528
- if (a.value < 1)
529
- return;
530
- s.value = !1, await r.readPurchaseOrder(a.value);
531
- const f = [];
532
- if (r.purchaseOrderForecast.skus.length <= 0) {
533
- c.open({
534
- message: i("inventory.transfer.form.items.forecastStock.notAvailable"),
535
- type: "info"
536
- });
537
- return;
538
- }
539
- const b = r.purchaseOrderForecast.skus.reduce((v, O) => {
540
- const C = p.skus.find((d) => d._id === O.id);
541
- if (v.find((d) => d.sku._id === O.id) || !C)
542
- return v;
543
- const I = {
544
- sku: C,
545
- code: C.code,
546
- name: C.name,
547
- quantity: {
548
- amount: O.amount,
549
- precision: 0
550
- }
551
- };
552
- return v.push(I), v;
553
- }, f);
554
- n("update:poItems", b);
555
- }
556
- return (f, b) => {
557
- const v = X("FmButton"), O = X("FmIcon"), C = X("FmStepperField"), R = X("FmPopover");
558
- return G(), Oe(R, {
559
- disabled: f.disabled,
560
- class: "flex",
561
- "show-popover": s.value,
562
- onPopoverChanged: b[3] || (b[3] = (I) => s.value = I)
563
- }, {
564
- "popover-button": q(() => [
565
- M(v, {
566
- label: "unused",
567
- variant: "secondary",
568
- "text-color": f.disabled ? "disabled" : "primary",
569
- "bg-color": "transparent",
570
- "border-color": f.disabled ? "disabled" : "primary",
571
- disabled: f.disabled
572
- }, {
573
- default: q(() => [
574
- L("div", Tr, [
575
- M(hr, {
576
- size: 24,
577
- color: f.disabled ? "#c7c7cc" : "#ff7823"
578
- }, null, 8, ["color"]),
579
- L("div", kr, re(m(i)("inventory.transfer.form.items.forecastStock.title")), 1)
580
- ])
581
- ]),
582
- _: 1
583
- }, 8, ["text-color", "border-color", "disabled"])
584
- ]),
585
- default: q(() => [
586
- L("div", Ir, [
587
- L("div", Or, [
588
- L("div", Sr, [
589
- M(Js, { "z-index": 99 }, {
590
- default: q(() => [
591
- L("p", Nr, re(m(i)("inventory.transfer.form.items.forecastStock.title")), 1)
592
- ]),
593
- _: 1
594
- })
595
- ]),
596
- M(v, {
597
- icon: "close",
598
- size: "md",
599
- variant: "tertiary",
600
- onClick: b[0] || (b[0] = (I) => s.value = !1)
601
- })
602
- ]),
603
- M(C, {
604
- modelValue: a.value,
605
- "onUpdate:modelValue": b[1] || (b[1] = (I) => a.value = I),
606
- label: m(i)("inventory.transfer.form.items.forecastStock.days"),
607
- rules: [m(ht)(1)]
608
- }, {
609
- "helper-text": q(() => [
610
- L("div", Rr, [
611
- M(O, {
612
- name: "warning",
613
- size: "sm",
614
- class: "text-fm-color-system-warning-300"
615
- }),
616
- L("div", Cr, re(m(i)("inventory.transfer.form.items.forecastStock.replace")), 1)
617
- ])
618
- ]),
619
- _: 1
620
- }, 8, ["modelValue", "label", "rules"]),
621
- L("div", Ar, [
622
- b[4] || (b[4] = L("div", { class: "grow" }, null, -1)),
623
- M(v, {
624
- label: m(i)("common.cancel"),
625
- variant: "tertiary",
626
- onClick: b[2] || (b[2] = (I) => s.value = !1)
627
- }, null, 8, ["label"]),
628
- M(v, {
629
- label: m(i)("inventory.transfer.form.items.forecastStock.generate"),
630
- onClick: u
631
- }, null, 8, ["label"])
632
- ])
633
- ])
634
- ]),
635
- _: 1
636
- }, 8, ["disabled", "show-popover"]);
637
- };
638
- }
639
- });
640
- function Dr() {
641
- const e = Ot(), t = $n(), n = ce(!1);
642
- qe(n, (c) => {
643
- c && (a.value = !0, s().finally(() => {
644
- a.value = !1;
645
- }));
646
- });
647
- async function s() {
648
- try {
649
- const { startDate: c, endDate: p } = Xs(6), f = (await t.getPurchaseOrders({ start: c, end: p })).filter(
650
- (b) => {
651
- var v, O;
652
- return b.status === bs.enum.COMPLETE && ((v = b.supplier) == null ? void 0 : v.internal) !== "warehouse" && ((O = b.supplier) == null ? void 0 : O.internal) !== "restaurant";
653
- }
654
- ).reduce((b, v) => {
655
- const O = new Date(js(v._id)), C = v.supplier._id;
656
- for (const R of v.items) {
657
- if (!R.totalCost) continue;
658
- const I = b[R.sku._id] ?? {}, d = I[C] ?? [];
659
- d.push({
660
- date: O.toISOString(),
661
- totalUnit: R.quantity,
662
- totalCost: R.totalCost,
663
- unit: R.sku.unit,
664
- measurement: R.measurement,
665
- seqNumber: v.seqNumber
666
- }), I[C] = d, b[R.sku._id] = I;
667
- }
668
- return b;
669
- }, {});
670
- r.value = f;
671
- } catch {
672
- e.open({
673
- title: "Something went wrong",
674
- message: "Cannot retrieve supplier purchase history. Please try again."
675
- }), n.value = !1;
676
- }
677
- }
678
- const a = ce(!1), r = ce({});
679
- return {
680
- comparePricesToggle: n,
681
- comparePriceFetching: a,
682
- comparePriceBySku: r
683
- };
684
- }
685
- const Lr = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, Pr = { key: 0 }, wr = ["colspan"], Ur = /* @__PURE__ */ Ae({
686
- __name: "TransferItemTable",
687
- props: {
688
- row: {},
689
- comparePriceBySku: {},
690
- showComparePrice: { type: Boolean }
691
- },
692
- setup(e) {
693
- function t(n) {
694
- return n.column.columnDef.meta;
695
- }
696
- return (n, s) => {
697
- var a, r;
698
- return G(), ne(je, null, [
699
- L("tr", {
700
- class: Pe(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm", {
701
- "bg-fm-color-neutral-gray-100": n.row.getIsSelected()
702
- }])
703
- }, [
704
- (G(!0), ne(je, null, wt(n.row.getVisibleCells(), (c) => {
705
- var p, i, u, f;
706
- return G(), ne("td", {
707
- key: c.id,
708
- class: Pe([
709
- "h-[52px] px-16 text-fm-color-typo-primary",
710
- ((p = t(c)) == null ? void 0 : p.cellClass) ?? "px-16"
711
- ]),
712
- style: Gn({
713
- width: (i = t(c)) == null ? void 0 : i.width,
714
- maxWidth: (u = t(c)) == null ? void 0 : u.maxWidth,
715
- textAlign: ((f = t(c)) == null ? void 0 : f.textAlign) ?? "left"
716
- })
717
- }, [
718
- L("span", Lr, [
719
- M(m(xe), {
720
- render: c.column.columnDef.cell,
721
- props: c.getContext()
722
- }, null, 8, ["render", "props"])
723
- ])
724
- ], 6);
725
- }), 128))
726
- ], 2),
727
- n.showComparePrice && Object.keys(n.comparePriceBySku[(a = n.row.original.sku) == null ? void 0 : a._id] ?? {}).length > 0 ? (G(), ne("tr", Pr, [
728
- L("td", {
729
- colspan: n.row.getVisibleCells().length
730
- }, [
731
- M(Xn, {
732
- prices: n.comparePriceBySku[(r = n.row.original.sku) == null ? void 0 : r._id]
733
- }, null, 8, ["prices"])
734
- ], 8, wr)
735
- ])) : Ie("", !0)
736
- ], 64);
737
- };
738
- }
739
- });
740
- /*!
741
- * shared v10.0.5
742
- * (c) 2024 kazuya kawaguchi
743
- * Released under the MIT License.
744
- */
745
- const _n = typeof window < "u", tt = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Fr = (e, t, n) => Mr({ l: e, k: t, s: n }), Mr = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), pe = (e) => typeof e == "number" && isFinite(e), xr = (e) => Zt(e) === "[object Date]", Tt = (e) => Zt(e) === "[object RegExp]", Nt = (e) => j(e) && Object.keys(e).length === 0, _e = Object.assign, Hr = Object.create, J = (e = null) => Hr(e);
746
- let mn;
747
- const Ze = () => mn || (mn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : J());
748
- function fn(e) {
749
- return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
750
- }
751
- const Vr = Object.prototype.hasOwnProperty;
752
- function we(e, t) {
753
- return Vr.call(e, t);
754
- }
755
- const ue = Array.isArray, te = (e) => typeof e == "function", x = (e) => typeof e == "string", ae = (e) => typeof e == "boolean", W = (e) => e !== null && typeof e == "object", Gr = (e) => W(e) && te(e.then) && te(e.catch), qn = Object.prototype.toString, Zt = (e) => qn.call(e), j = (e) => Zt(e) === "[object Object]", Br = (e) => e == null ? "" : ue(e) || j(e) && e.toString === qn ? JSON.stringify(e, null, 2) : String(e);
756
- function en(e, t = "") {
757
- return e.reduce((n, s, a) => a === 0 ? n + s : n + t + s, "");
758
- }
759
- function $r(e, t) {
760
- typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
761
- }
762
- const gt = (e) => !W(e) || ue(e);
763
- function Et(e, t) {
764
- if (gt(e) || gt(t))
765
- throw new Error("Invalid value");
766
- const n = [{ src: e, des: t }];
767
- for (; n.length; ) {
768
- const { src: s, des: a } = n.pop();
769
- Object.keys(s).forEach((r) => {
770
- r !== "__proto__" && (W(s[r]) && !W(a[r]) && (a[r] = Array.isArray(s[r]) ? [] : J()), gt(a[r]) || gt(s[r]) ? a[r] = s[r] : n.push({ src: s[r], des: a[r] }));
771
- });
772
- }
773
- }
774
- function jr(e, t, n) {
775
- return { line: e, column: t, offset: n };
776
- }
777
- function Mt(e, t, n) {
778
- return { start: e, end: t };
779
- }
780
- const K = {
781
- // tokenizer error codes
782
- EXPECTED_TOKEN: 1,
783
- INVALID_TOKEN_IN_PLACEHOLDER: 2,
784
- UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
785
- UNKNOWN_ESCAPE_SEQUENCE: 4,
786
- INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
787
- UNBALANCED_CLOSING_BRACE: 6,
788
- UNTERMINATED_CLOSING_BRACE: 7,
789
- EMPTY_PLACEHOLDER: 8,
790
- NOT_ALLOW_NEST_PLACEHOLDER: 9,
791
- INVALID_LINKED_FORMAT: 10,
792
- // parser error codes
793
- MUST_HAVE_MESSAGES_IN_PLURAL: 11,
794
- UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
795
- UNEXPECTED_EMPTY_LINKED_KEY: 13,
796
- UNEXPECTED_LEXICAL_ANALYSIS: 14,
797
- // generator error codes
798
- UNHANDLED_CODEGEN_NODE_TYPE: 15,
799
- // minifier error codes
800
- UNHANDLED_MINIFIER_NODE_TYPE: 16
801
- }, Wr = 17;
802
- function Rt(e, t, n = {}) {
803
- const { domain: s, messages: a, args: r } = n, c = e, p = new SyntaxError(String(c));
804
- return p.code = e, t && (p.location = t), p.domain = s, p;
805
- }
806
- function Yr(e) {
807
- throw e;
808
- }
809
- const Ge = " ", Kr = "\r", be = `
810
- `, Xr = "\u2028", qr = "\u2029";
811
- function Jr(e) {
812
- const t = e;
813
- let n = 0, s = 1, a = 1, r = 0;
814
- const c = (h) => t[h] === Kr && t[h + 1] === be, p = (h) => t[h] === be, i = (h) => t[h] === qr, u = (h) => t[h] === Xr, f = (h) => c(h) || p(h) || i(h) || u(h), b = () => n, v = () => s, O = () => a, C = () => r, R = (h) => c(h) || i(h) || u(h) ? be : t[h], I = () => R(n), d = () => R(n + r);
815
- function g() {
816
- return r = 0, f(n) && (s++, a = 0), c(n) && n++, n++, a++, t[n];
817
- }
818
- function S() {
819
- return c(n + r) && r++, r++, t[n + r];
820
- }
821
- function y() {
822
- n = 0, s = 1, a = 1, r = 0;
823
- }
824
- function T(h = 0) {
825
- r = h;
826
- }
827
- function k() {
828
- const h = n + r;
829
- for (; h !== n; )
830
- g();
831
- r = 0;
832
- }
833
- return {
834
- index: b,
835
- line: v,
836
- column: O,
837
- peekOffset: C,
838
- charAt: R,
839
- currentChar: I,
840
- currentPeek: d,
841
- next: g,
842
- peek: S,
843
- reset: y,
844
- resetPeek: T,
845
- skipToPeek: k
846
- };
847
- }
848
- const Ke = void 0, zr = ".", vn = "'", Qr = "tokenizer";
849
- function Zr(e, t = {}) {
850
- const n = t.location !== !1, s = Jr(e), a = () => s.index(), r = () => jr(s.line(), s.column(), s.index()), c = r(), p = a(), i = {
851
- currentType: 13,
852
- offset: p,
853
- startLoc: c,
854
- endLoc: c,
855
- lastType: 13,
856
- lastOffset: p,
857
- lastStartLoc: c,
858
- lastEndLoc: c,
859
- braceNest: 0,
860
- inLinked: !1,
861
- text: ""
862
- }, u = () => i, { onError: f } = t;
863
- function b(o, l, E, ...F) {
864
- const ee = u();
865
- if (l.column += E, l.offset += E, f) {
866
- const D = n ? Mt(ee.startLoc, l) : null, _ = Rt(o, D, {
867
- domain: Qr,
868
- args: F
869
- });
870
- f(_);
871
- }
872
- }
873
- function v(o, l, E) {
874
- o.endLoc = r(), o.currentType = l;
875
- const F = { type: l };
876
- return n && (F.loc = Mt(o.startLoc, o.endLoc)), E != null && (F.value = E), F;
877
- }
878
- const O = (o) => v(
879
- o,
880
- 13
881
- /* TokenTypes.EOF */
882
- );
883
- function C(o, l) {
884
- return o.currentChar() === l ? (o.next(), l) : (b(K.EXPECTED_TOKEN, r(), 0, l), "");
885
- }
886
- function R(o) {
887
- let l = "";
888
- for (; o.currentPeek() === Ge || o.currentPeek() === be; )
889
- l += o.currentPeek(), o.peek();
890
- return l;
891
- }
892
- function I(o) {
893
- const l = R(o);
894
- return o.skipToPeek(), l;
895
- }
896
- function d(o) {
897
- if (o === Ke)
898
- return !1;
899
- const l = o.charCodeAt(0);
900
- return l >= 97 && l <= 122 || // a-z
901
- l >= 65 && l <= 90 || // A-Z
902
- l === 95;
903
- }
904
- function g(o) {
905
- if (o === Ke)
906
- return !1;
907
- const l = o.charCodeAt(0);
908
- return l >= 48 && l <= 57;
909
- }
910
- function S(o, l) {
911
- const { currentType: E } = l;
912
- if (E !== 2)
913
- return !1;
914
- R(o);
915
- const F = d(o.currentPeek());
916
- return o.resetPeek(), F;
917
- }
918
- function y(o, l) {
919
- const { currentType: E } = l;
920
- if (E !== 2)
921
- return !1;
922
- R(o);
923
- const F = o.currentPeek() === "-" ? o.peek() : o.currentPeek(), ee = g(F);
924
- return o.resetPeek(), ee;
925
- }
926
- function T(o, l) {
927
- const { currentType: E } = l;
928
- if (E !== 2)
929
- return !1;
930
- R(o);
931
- const F = o.currentPeek() === vn;
932
- return o.resetPeek(), F;
933
- }
934
- function k(o, l) {
935
- const { currentType: E } = l;
936
- if (E !== 7)
937
- return !1;
938
- R(o);
939
- const F = o.currentPeek() === ".";
940
- return o.resetPeek(), F;
941
- }
942
- function h(o, l) {
943
- const { currentType: E } = l;
944
- if (E !== 8)
945
- return !1;
946
- R(o);
947
- const F = d(o.currentPeek());
948
- return o.resetPeek(), F;
949
- }
950
- function V(o, l) {
951
- const { currentType: E } = l;
952
- if (!(E === 7 || E === 11))
953
- return !1;
954
- R(o);
955
- const F = o.currentPeek() === ":";
956
- return o.resetPeek(), F;
957
- }
958
- function H(o, l) {
959
- const { currentType: E } = l;
960
- if (E !== 9)
961
- return !1;
962
- const F = () => {
963
- const D = o.currentPeek();
964
- return D === "{" ? d(o.peek()) : D === "@" || D === "|" || D === ":" || D === "." || D === Ge || !D ? !1 : D === be ? (o.peek(), F()) : Z(o, !1);
965
- }, ee = F();
966
- return o.resetPeek(), ee;
967
- }
968
- function B(o) {
969
- R(o);
970
- const l = o.currentPeek() === "|";
971
- return o.resetPeek(), l;
972
- }
973
- function Z(o, l = !0) {
974
- const E = (ee = !1, D = "") => {
975
- const _ = o.currentPeek();
976
- return _ === "{" || _ === "@" || !_ ? ee : _ === "|" ? !(D === Ge || D === be) : _ === Ge ? (o.peek(), E(!0, Ge)) : _ === be ? (o.peek(), E(!0, be)) : !0;
977
- }, F = E();
978
- return l && o.resetPeek(), F;
979
- }
980
- function $(o, l) {
981
- const E = o.currentChar();
982
- return E === Ke ? Ke : l(E) ? (o.next(), E) : null;
983
- }
984
- function w(o) {
985
- const l = o.charCodeAt(0);
986
- return l >= 97 && l <= 122 || // a-z
987
- l >= 65 && l <= 90 || // A-Z
988
- l >= 48 && l <= 57 || // 0-9
989
- l === 95 || // _
990
- l === 36;
991
- }
992
- function P(o) {
993
- return $(o, w);
994
- }
995
- function le(o) {
996
- const l = o.charCodeAt(0);
997
- return l >= 97 && l <= 122 || // a-z
998
- l >= 65 && l <= 90 || // A-Z
999
- l >= 48 && l <= 57 || // 0-9
1000
- l === 95 || // _
1001
- l === 36 || // $
1002
- l === 45;
1003
- }
1004
- function ye(o) {
1005
- return $(o, le);
1006
- }
1007
- function fe(o) {
1008
- const l = o.charCodeAt(0);
1009
- return l >= 48 && l <= 57;
1010
- }
1011
- function We(o) {
1012
- return $(o, fe);
1013
- }
1014
- function ve(o) {
1015
- const l = o.charCodeAt(0);
1016
- return l >= 48 && l <= 57 || // 0-9
1017
- l >= 65 && l <= 70 || // A-F
1018
- l >= 97 && l <= 102;
1019
- }
1020
- function He(o) {
1021
- return $(o, ve);
1022
- }
1023
- function Ye(o) {
1024
- let l = "", E = "";
1025
- for (; l = We(o); )
1026
- E += l;
1027
- return E;
1028
- }
1029
- function A(o) {
1030
- let l = "";
1031
- for (; ; ) {
1032
- const E = o.currentChar();
1033
- if (E === "{" || E === "}" || E === "@" || E === "|" || !E)
1034
- break;
1035
- if (E === Ge || E === be)
1036
- if (Z(o))
1037
- l += E, o.next();
1038
- else {
1039
- if (B(o))
1040
- break;
1041
- l += E, o.next();
1042
- }
1043
- else
1044
- l += E, o.next();
1045
- }
1046
- return l;
1047
- }
1048
- function U(o) {
1049
- I(o);
1050
- let l = "", E = "";
1051
- for (; l = ye(o); )
1052
- E += l;
1053
- return o.currentChar() === Ke && b(K.UNTERMINATED_CLOSING_BRACE, r(), 0), E;
1054
- }
1055
- function oe(o) {
1056
- I(o);
1057
- let l = "";
1058
- return o.currentChar() === "-" ? (o.next(), l += `-${Ye(o)}`) : l += Ye(o), o.currentChar() === Ke && b(K.UNTERMINATED_CLOSING_BRACE, r(), 0), l;
1059
- }
1060
- function Re(o) {
1061
- return o !== vn && o !== be;
1062
- }
1063
- function Se(o) {
1064
- I(o), C(o, "'");
1065
- let l = "", E = "";
1066
- for (; l = $(o, Re); )
1067
- l === "\\" ? E += De(o) : E += l;
1068
- const F = o.currentChar();
1069
- return F === be || F === Ke ? (b(K.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, r(), 0), F === be && (o.next(), C(o, "'")), E) : (C(o, "'"), E);
1070
- }
1071
- function De(o) {
1072
- const l = o.currentChar();
1073
- switch (l) {
1074
- case "\\":
1075
- case "'":
1076
- return o.next(), `\\${l}`;
1077
- case "u":
1078
- return Ee(o, l, 4);
1079
- case "U":
1080
- return Ee(o, l, 6);
1081
- default:
1082
- return b(K.UNKNOWN_ESCAPE_SEQUENCE, r(), 0, l), "";
1083
- }
1084
- }
1085
- function Ee(o, l, E) {
1086
- C(o, l);
1087
- let F = "";
1088
- for (let ee = 0; ee < E; ee++) {
1089
- const D = He(o);
1090
- if (!D) {
1091
- b(K.INVALID_UNICODE_ESCAPE_SEQUENCE, r(), 0, `\\${l}${F}${o.currentChar()}`);
1092
- break;
1093
- }
1094
- F += D;
1095
- }
1096
- return `\\${l}${F}`;
1097
- }
1098
- function he(o) {
1099
- return o !== "{" && o !== "}" && o !== Ge && o !== be;
1100
- }
1101
- function Le(o) {
1102
- I(o);
1103
- let l = "", E = "";
1104
- for (; l = $(o, he); )
1105
- E += l;
1106
- return E;
1107
- }
1108
- function Ue(o) {
1109
- let l = "", E = "";
1110
- for (; l = P(o); )
1111
- E += l;
1112
- return E;
1113
- }
1114
- function Ve(o) {
1115
- const l = (E) => {
1116
- const F = o.currentChar();
1117
- return F === "{" || F === "@" || F === "|" || F === "(" || F === ")" || !F || F === Ge ? E : (E += F, o.next(), l(E));
1118
- };
1119
- return l("");
1120
- }
1121
- function Y(o) {
1122
- I(o);
1123
- const l = C(
1124
- o,
1125
- "|"
1126
- /* TokenChars.Pipe */
1127
- );
1128
- return I(o), l;
1129
- }
1130
- function ie(o, l) {
1131
- let E = null;
1132
- switch (o.currentChar()) {
1133
- case "{":
1134
- return l.braceNest >= 1 && b(K.NOT_ALLOW_NEST_PLACEHOLDER, r(), 0), o.next(), E = v(
1135
- l,
1136
- 2,
1137
- "{"
1138
- /* TokenChars.BraceLeft */
1139
- ), I(o), l.braceNest++, E;
1140
- case "}":
1141
- return l.braceNest > 0 && l.currentType === 2 && b(K.EMPTY_PLACEHOLDER, r(), 0), o.next(), E = v(
1142
- l,
1143
- 3,
1144
- "}"
1145
- /* TokenChars.BraceRight */
1146
- ), l.braceNest--, l.braceNest > 0 && I(o), l.inLinked && l.braceNest === 0 && (l.inLinked = !1), E;
1147
- case "@":
1148
- return l.braceNest > 0 && b(K.UNTERMINATED_CLOSING_BRACE, r(), 0), E = me(o, l) || O(l), l.braceNest = 0, E;
1149
- default: {
1150
- let ee = !0, D = !0, _ = !0;
1151
- if (B(o))
1152
- return l.braceNest > 0 && b(K.UNTERMINATED_CLOSING_BRACE, r(), 0), E = v(l, 1, Y(o)), l.braceNest = 0, l.inLinked = !1, E;
1153
- if (l.braceNest > 0 && (l.currentType === 4 || l.currentType === 5 || l.currentType === 6))
1154
- return b(K.UNTERMINATED_CLOSING_BRACE, r(), 0), l.braceNest = 0, de(o, l);
1155
- if (ee = S(o, l))
1156
- return E = v(l, 4, U(o)), I(o), E;
1157
- if (D = y(o, l))
1158
- return E = v(l, 5, oe(o)), I(o), E;
1159
- if (_ = T(o, l))
1160
- return E = v(l, 6, Se(o)), I(o), E;
1161
- if (!ee && !D && !_)
1162
- return E = v(l, 12, Le(o)), b(K.INVALID_TOKEN_IN_PLACEHOLDER, r(), 0, E.value), I(o), E;
1163
- break;
1164
- }
1165
- }
1166
- return E;
1167
- }
1168
- function me(o, l) {
1169
- const { currentType: E } = l;
1170
- let F = null;
1171
- const ee = o.currentChar();
1172
- switch ((E === 7 || E === 8 || E === 11 || E === 9) && (ee === be || ee === Ge) && b(K.INVALID_LINKED_FORMAT, r(), 0), ee) {
1173
- case "@":
1174
- return o.next(), F = v(
1175
- l,
1176
- 7,
1177
- "@"
1178
- /* TokenChars.LinkedAlias */
1179
- ), l.inLinked = !0, F;
1180
- case ".":
1181
- return I(o), o.next(), v(
1182
- l,
1183
- 8,
1184
- "."
1185
- /* TokenChars.LinkedDot */
1186
- );
1187
- case ":":
1188
- return I(o), o.next(), v(
1189
- l,
1190
- 9,
1191
- ":"
1192
- /* TokenChars.LinkedDelimiter */
1193
- );
1194
- default:
1195
- return B(o) ? (F = v(l, 1, Y(o)), l.braceNest = 0, l.inLinked = !1, F) : k(o, l) || V(o, l) ? (I(o), me(o, l)) : h(o, l) ? (I(o), v(l, 11, Ue(o))) : H(o, l) ? (I(o), ee === "{" ? ie(o, l) || F : v(l, 10, Ve(o))) : (E === 7 && b(K.INVALID_LINKED_FORMAT, r(), 0), l.braceNest = 0, l.inLinked = !1, de(o, l));
1196
- }
1197
- }
1198
- function de(o, l) {
1199
- let E = {
1200
- type: 13
1201
- /* TokenTypes.EOF */
1202
- };
1203
- if (l.braceNest > 0)
1204
- return ie(o, l) || O(l);
1205
- if (l.inLinked)
1206
- return me(o, l) || O(l);
1207
- switch (o.currentChar()) {
1208
- case "{":
1209
- return ie(o, l) || O(l);
1210
- case "}":
1211
- return b(K.UNBALANCED_CLOSING_BRACE, r(), 0), o.next(), v(
1212
- l,
1213
- 3,
1214
- "}"
1215
- /* TokenChars.BraceRight */
1216
- );
1217
- case "@":
1218
- return me(o, l) || O(l);
1219
- default: {
1220
- if (B(o))
1221
- return E = v(l, 1, Y(o)), l.braceNest = 0, l.inLinked = !1, E;
1222
- if (Z(o))
1223
- return v(l, 0, A(o));
1224
- break;
1225
- }
1226
- }
1227
- return E;
1228
- }
1229
- function Ne() {
1230
- const { currentType: o, offset: l, startLoc: E, endLoc: F } = i;
1231
- return i.lastType = o, i.lastOffset = l, i.lastStartLoc = E, i.lastEndLoc = F, i.offset = a(), i.startLoc = r(), s.currentChar() === Ke ? v(
1232
- i,
1233
- 13
1234
- /* TokenTypes.EOF */
1235
- ) : de(s, i);
1236
- }
1237
- return {
1238
- nextToken: Ne,
1239
- currentOffset: a,
1240
- currentPosition: r,
1241
- context: u
1242
- };
1243
- }
1244
- const ea = "parser", ta = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
1245
- function na(e, t, n) {
1246
- switch (e) {
1247
- case "\\\\":
1248
- return "\\";
1249
- case "\\'":
1250
- return "'";
1251
- default: {
1252
- const s = parseInt(t || n, 16);
1253
- return s <= 55295 || s >= 57344 ? String.fromCodePoint(s) : "�";
1254
- }
1255
- }
1256
- }
1257
- function sa(e = {}) {
1258
- const t = e.location !== !1, { onError: n } = e;
1259
- function s(d, g, S, y, ...T) {
1260
- const k = d.currentPosition();
1261
- if (k.offset += y, k.column += y, n) {
1262
- const h = t ? Mt(S, k) : null, V = Rt(g, h, {
1263
- domain: ea,
1264
- args: T
1265
- });
1266
- n(V);
1267
- }
1268
- }
1269
- function a(d, g, S) {
1270
- const y = { type: d };
1271
- return t && (y.start = g, y.end = g, y.loc = { start: S, end: S }), y;
1272
- }
1273
- function r(d, g, S, y) {
1274
- t && (d.end = g, d.loc && (d.loc.end = S));
1275
- }
1276
- function c(d, g) {
1277
- const S = d.context(), y = a(3, S.offset, S.startLoc);
1278
- return y.value = g, r(y, d.currentOffset(), d.currentPosition()), y;
1279
- }
1280
- function p(d, g) {
1281
- const S = d.context(), { lastOffset: y, lastStartLoc: T } = S, k = a(5, y, T);
1282
- return k.index = parseInt(g, 10), d.nextToken(), r(k, d.currentOffset(), d.currentPosition()), k;
1283
- }
1284
- function i(d, g) {
1285
- const S = d.context(), { lastOffset: y, lastStartLoc: T } = S, k = a(4, y, T);
1286
- return k.key = g, d.nextToken(), r(k, d.currentOffset(), d.currentPosition()), k;
1287
- }
1288
- function u(d, g) {
1289
- const S = d.context(), { lastOffset: y, lastStartLoc: T } = S, k = a(9, y, T);
1290
- return k.value = g.replace(ta, na), d.nextToken(), r(k, d.currentOffset(), d.currentPosition()), k;
1291
- }
1292
- function f(d) {
1293
- const g = d.nextToken(), S = d.context(), { lastOffset: y, lastStartLoc: T } = S, k = a(8, y, T);
1294
- return g.type !== 11 ? (s(d, K.UNEXPECTED_EMPTY_LINKED_MODIFIER, S.lastStartLoc, 0), k.value = "", r(k, y, T), {
1295
- nextConsumeToken: g,
1296
- node: k
1297
- }) : (g.value == null && s(d, K.UNEXPECTED_LEXICAL_ANALYSIS, S.lastStartLoc, 0, Fe(g)), k.value = g.value || "", r(k, d.currentOffset(), d.currentPosition()), {
1298
- node: k
1299
- });
1300
- }
1301
- function b(d, g) {
1302
- const S = d.context(), y = a(7, S.offset, S.startLoc);
1303
- return y.value = g, r(y, d.currentOffset(), d.currentPosition()), y;
1304
- }
1305
- function v(d) {
1306
- const g = d.context(), S = a(6, g.offset, g.startLoc);
1307
- let y = d.nextToken();
1308
- if (y.type === 8) {
1309
- const T = f(d);
1310
- S.modifier = T.node, y = T.nextConsumeToken || d.nextToken();
1311
- }
1312
- switch (y.type !== 9 && s(d, K.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Fe(y)), y = d.nextToken(), y.type === 2 && (y = d.nextToken()), y.type) {
1313
- case 10:
1314
- y.value == null && s(d, K.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Fe(y)), S.key = b(d, y.value || "");
1315
- break;
1316
- case 4:
1317
- y.value == null && s(d, K.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Fe(y)), S.key = i(d, y.value || "");
1318
- break;
1319
- case 5:
1320
- y.value == null && s(d, K.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Fe(y)), S.key = p(d, y.value || "");
1321
- break;
1322
- case 6:
1323
- y.value == null && s(d, K.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Fe(y)), S.key = u(d, y.value || "");
1324
- break;
1325
- default: {
1326
- s(d, K.UNEXPECTED_EMPTY_LINKED_KEY, g.lastStartLoc, 0);
1327
- const T = d.context(), k = a(7, T.offset, T.startLoc);
1328
- return k.value = "", r(k, T.offset, T.startLoc), S.key = k, r(S, T.offset, T.startLoc), {
1329
- nextConsumeToken: y,
1330
- node: S
1331
- };
1332
- }
1333
- }
1334
- return r(S, d.currentOffset(), d.currentPosition()), {
1335
- node: S
1336
- };
1337
- }
1338
- function O(d) {
1339
- const g = d.context(), S = g.currentType === 1 ? d.currentOffset() : g.offset, y = g.currentType === 1 ? g.endLoc : g.startLoc, T = a(2, S, y);
1340
- T.items = [];
1341
- let k = null;
1342
- do {
1343
- const H = k || d.nextToken();
1344
- switch (k = null, H.type) {
1345
- case 0:
1346
- H.value == null && s(d, K.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Fe(H)), T.items.push(c(d, H.value || ""));
1347
- break;
1348
- case 5:
1349
- H.value == null && s(d, K.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Fe(H)), T.items.push(p(d, H.value || ""));
1350
- break;
1351
- case 4:
1352
- H.value == null && s(d, K.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Fe(H)), T.items.push(i(d, H.value || ""));
1353
- break;
1354
- case 6:
1355
- H.value == null && s(d, K.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Fe(H)), T.items.push(u(d, H.value || ""));
1356
- break;
1357
- case 7: {
1358
- const B = v(d);
1359
- T.items.push(B.node), k = B.nextConsumeToken || null;
1360
- break;
1361
- }
1362
- }
1363
- } while (g.currentType !== 13 && g.currentType !== 1);
1364
- const h = g.currentType === 1 ? g.lastOffset : d.currentOffset(), V = g.currentType === 1 ? g.lastEndLoc : d.currentPosition();
1365
- return r(T, h, V), T;
1366
- }
1367
- function C(d, g, S, y) {
1368
- const T = d.context();
1369
- let k = y.items.length === 0;
1370
- const h = a(1, g, S);
1371
- h.cases = [], h.cases.push(y);
1372
- do {
1373
- const V = O(d);
1374
- k || (k = V.items.length === 0), h.cases.push(V);
1375
- } while (T.currentType !== 13);
1376
- return k && s(d, K.MUST_HAVE_MESSAGES_IN_PLURAL, S, 0), r(h, d.currentOffset(), d.currentPosition()), h;
1377
- }
1378
- function R(d) {
1379
- const g = d.context(), { offset: S, startLoc: y } = g, T = O(d);
1380
- return g.currentType === 13 ? T : C(d, S, y, T);
1381
- }
1382
- function I(d) {
1383
- const g = Zr(d, _e({}, e)), S = g.context(), y = a(0, S.offset, S.startLoc);
1384
- return t && y.loc && (y.loc.source = d), y.body = R(g), e.onCacheKey && (y.cacheKey = e.onCacheKey(d)), S.currentType !== 13 && s(g, K.UNEXPECTED_LEXICAL_ANALYSIS, S.lastStartLoc, 0, d[S.offset] || ""), r(y, g.currentOffset(), g.currentPosition()), y;
1385
- }
1386
- return { parse: I };
1387
- }
1388
- function Fe(e) {
1389
- if (e.type === 13)
1390
- return "EOF";
1391
- const t = (e.value || "").replace(/\r?\n/gu, "\\n");
1392
- return t.length > 10 ? t.slice(0, 9) + "…" : t;
1393
- }
1394
- function ra(e, t = {}) {
1395
- const n = {
1396
- ast: e,
1397
- helpers: /* @__PURE__ */ new Set()
1398
- };
1399
- return { context: () => n, helper: (r) => (n.helpers.add(r), r) };
1400
- }
1401
- function gn(e, t) {
1402
- for (let n = 0; n < e.length; n++)
1403
- tn(e[n], t);
1404
- }
1405
- function tn(e, t) {
1406
- switch (e.type) {
1407
- case 1:
1408
- gn(e.cases, t), t.helper(
1409
- "plural"
1410
- /* HelperNameMap.PLURAL */
1411
- );
1412
- break;
1413
- case 2:
1414
- gn(e.items, t);
1415
- break;
1416
- case 6: {
1417
- tn(e.key, t), t.helper(
1418
- "linked"
1419
- /* HelperNameMap.LINKED */
1420
- ), t.helper(
1421
- "type"
1422
- /* HelperNameMap.TYPE */
1423
- );
1424
- break;
1425
- }
1426
- case 5:
1427
- t.helper(
1428
- "interpolate"
1429
- /* HelperNameMap.INTERPOLATE */
1430
- ), t.helper(
1431
- "list"
1432
- /* HelperNameMap.LIST */
1433
- );
1434
- break;
1435
- case 4:
1436
- t.helper(
1437
- "interpolate"
1438
- /* HelperNameMap.INTERPOLATE */
1439
- ), t.helper(
1440
- "named"
1441
- /* HelperNameMap.NAMED */
1442
- );
1443
- break;
1444
- }
1445
- }
1446
- function aa(e, t = {}) {
1447
- const n = ra(e);
1448
- n.helper(
1449
- "normalize"
1450
- /* HelperNameMap.NORMALIZE */
1451
- ), e.body && tn(e.body, n);
1452
- const s = n.context();
1453
- e.helpers = Array.from(s.helpers);
1454
- }
1455
- function oa(e) {
1456
- const t = e.body;
1457
- return t.type === 2 ? bn(t) : t.cases.forEach((n) => bn(n)), e;
1458
- }
1459
- function bn(e) {
1460
- if (e.items.length === 1) {
1461
- const t = e.items[0];
1462
- (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
1463
- } else {
1464
- const t = [];
1465
- for (let n = 0; n < e.items.length; n++) {
1466
- const s = e.items[n];
1467
- if (!(s.type === 3 || s.type === 9) || s.value == null)
1468
- break;
1469
- t.push(s.value);
1470
- }
1471
- if (t.length === e.items.length) {
1472
- e.static = en(t);
1473
- for (let n = 0; n < e.items.length; n++) {
1474
- const s = e.items[n];
1475
- (s.type === 3 || s.type === 9) && delete s.value;
1476
- }
1477
- }
1478
- }
1479
- }
1480
- function at(e) {
1481
- switch (e.t = e.type, e.type) {
1482
- case 0: {
1483
- const t = e;
1484
- at(t.body), t.b = t.body, delete t.body;
1485
- break;
1486
- }
1487
- case 1: {
1488
- const t = e, n = t.cases;
1489
- for (let s = 0; s < n.length; s++)
1490
- at(n[s]);
1491
- t.c = n, delete t.cases;
1492
- break;
1493
- }
1494
- case 2: {
1495
- const t = e, n = t.items;
1496
- for (let s = 0; s < n.length; s++)
1497
- at(n[s]);
1498
- t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
1499
- break;
1500
- }
1501
- case 3:
1502
- case 9:
1503
- case 8:
1504
- case 7: {
1505
- const t = e;
1506
- t.value && (t.v = t.value, delete t.value);
1507
- break;
1508
- }
1509
- case 6: {
1510
- const t = e;
1511
- at(t.key), t.k = t.key, delete t.key, t.modifier && (at(t.modifier), t.m = t.modifier, delete t.modifier);
1512
- break;
1513
- }
1514
- case 5: {
1515
- const t = e;
1516
- t.i = t.index, delete t.index;
1517
- break;
1518
- }
1519
- case 4: {
1520
- const t = e;
1521
- t.k = t.key, delete t.key;
1522
- break;
1523
- }
1524
- }
1525
- delete e.type;
1526
- }
1527
- function la(e, t) {
1528
- const { sourceMap: n, filename: s, breakLineCode: a, needIndent: r } = t, c = t.location !== !1, p = {
1529
- filename: s,
1530
- code: "",
1531
- column: 1,
1532
- line: 1,
1533
- offset: 0,
1534
- map: void 0,
1535
- breakLineCode: a,
1536
- needIndent: r,
1537
- indentLevel: 0
1538
- };
1539
- c && e.loc && (p.source = e.loc.source);
1540
- const i = () => p;
1541
- function u(I, d) {
1542
- p.code += I;
1543
- }
1544
- function f(I, d = !0) {
1545
- const g = d ? a : "";
1546
- u(r ? g + " ".repeat(I) : g);
1547
- }
1548
- function b(I = !0) {
1549
- const d = ++p.indentLevel;
1550
- I && f(d);
1551
- }
1552
- function v(I = !0) {
1553
- const d = --p.indentLevel;
1554
- I && f(d);
1555
- }
1556
- function O() {
1557
- f(p.indentLevel);
1558
- }
1559
- return {
1560
- context: i,
1561
- push: u,
1562
- indent: b,
1563
- deindent: v,
1564
- newline: O,
1565
- helper: (I) => `_${I}`,
1566
- needIndent: () => p.needIndent
1567
- };
1568
- }
1569
- function ia(e, t) {
1570
- const { helper: n } = e;
1571
- e.push(`${n(
1572
- "linked"
1573
- /* HelperNameMap.LINKED */
1574
- )}(`), ot(e, t.key), t.modifier ? (e.push(", "), ot(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
1575
- }
1576
- function ca(e, t) {
1577
- const { helper: n, needIndent: s } = e;
1578
- e.push(`${n(
1579
- "normalize"
1580
- /* HelperNameMap.NORMALIZE */
1581
- )}([`), e.indent(s());
1582
- const a = t.items.length;
1583
- for (let r = 0; r < a && (ot(e, t.items[r]), r !== a - 1); r++)
1584
- e.push(", ");
1585
- e.deindent(s()), e.push("])");
1586
- }
1587
- function ua(e, t) {
1588
- const { helper: n, needIndent: s } = e;
1589
- if (t.cases.length > 1) {
1590
- e.push(`${n(
1591
- "plural"
1592
- /* HelperNameMap.PLURAL */
1593
- )}([`), e.indent(s());
1594
- const a = t.cases.length;
1595
- for (let r = 0; r < a && (ot(e, t.cases[r]), r !== a - 1); r++)
1596
- e.push(", ");
1597
- e.deindent(s()), e.push("])");
1598
- }
1599
- }
1600
- function da(e, t) {
1601
- t.body ? ot(e, t.body) : e.push("null");
1602
- }
1603
- function ot(e, t) {
1604
- const { helper: n } = e;
1605
- switch (t.type) {
1606
- case 0:
1607
- da(e, t);
1608
- break;
1609
- case 1:
1610
- ua(e, t);
1611
- break;
1612
- case 2:
1613
- ca(e, t);
1614
- break;
1615
- case 6:
1616
- ia(e, t);
1617
- break;
1618
- case 8:
1619
- e.push(JSON.stringify(t.value), t);
1620
- break;
1621
- case 7:
1622
- e.push(JSON.stringify(t.value), t);
1623
- break;
1624
- case 5:
1625
- e.push(`${n(
1626
- "interpolate"
1627
- /* HelperNameMap.INTERPOLATE */
1628
- )}(${n(
1629
- "list"
1630
- /* HelperNameMap.LIST */
1631
- )}(${t.index}))`, t);
1632
- break;
1633
- case 4:
1634
- e.push(`${n(
1635
- "interpolate"
1636
- /* HelperNameMap.INTERPOLATE */
1637
- )}(${n(
1638
- "named"
1639
- /* HelperNameMap.NAMED */
1640
- )}(${JSON.stringify(t.key)}))`, t);
1641
- break;
1642
- case 9:
1643
- e.push(JSON.stringify(t.value), t);
1644
- break;
1645
- case 3:
1646
- e.push(JSON.stringify(t.value), t);
1647
- break;
1648
- }
1649
- }
1650
- const pa = (e, t = {}) => {
1651
- const n = x(t.mode) ? t.mode : "normal", s = x(t.filename) ? t.filename : "message.intl", a = !!t.sourceMap, r = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
1652
- `, c = t.needIndent ? t.needIndent : n !== "arrow", p = e.helpers || [], i = la(e, {
1653
- mode: n,
1654
- filename: s,
1655
- sourceMap: a,
1656
- breakLineCode: r,
1657
- needIndent: c
1658
- });
1659
- i.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), i.indent(c), p.length > 0 && (i.push(`const { ${en(p.map((b) => `${b}: _${b}`), ", ")} } = ctx`), i.newline()), i.push("return "), ot(i, e), i.deindent(c), i.push("}"), delete e.helpers;
1660
- const { code: u, map: f } = i.context();
1661
- return {
1662
- ast: e,
1663
- code: u,
1664
- map: f ? f.toJSON() : void 0
1665
- // eslint-disable-line @typescript-eslint/no-explicit-any
1666
- };
1667
- };
1668
- function _a(e, t = {}) {
1669
- const n = _e({}, t), s = !!n.jit, a = !!n.minify, r = n.optimize == null ? !0 : n.optimize, p = sa(n).parse(e);
1670
- return s ? (r && oa(p), a && at(p), { ast: p, code: "" }) : (aa(p, n), pa(p, n));
1671
- }
1672
- var ma = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_dfdffb9c-317f-4752-b027-2110b5c5e632", npm_package_dependencies_dinero_js: "^1.9.1", npm_package_dependencies_zod: "3.17.9", npm_package_devDependencies__types_node: "^18.19.33", npm_config_dedupe_peer_dependents: "", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_scripts_prepublish: "pnpm check:env && pnpm build:mf && pnpm build:dts", npm_package_dependencies_fuzzy_search: "^3.2.1", npm_package_dependencies_pinia: "^2.1.7", npm_package_devDependencies_vitest: "^1.6.0", USER: "runner", npm_config_user_agent: "pnpm/9.12.1 npm/? node/v20.18.2 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.13", npm_package_devDependencies_vite_plugin_commonjs: "^0.10.3", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_dfdffb9c-317f-4752-b027-2110b5c5e632", PIPX_HOME: "/opt/pipx", npm_package_scripts_dev_standalone: "vite --mode standalone", npm_package_dependencies_node_html_parser: "^7.0.1", npm_package_devDependencies_vite: "5.4.8", npm_node_execpath: "/opt/hostedtoolcache/node/20.18.2/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", npm_package_files_0: "dist", npm_package_scripts_prod_standalone: "PORTAL_ENV=production vite --mode standalone", npm_package_scripts_check_env: 'cat build-*.env | grep -qE "^[^#].*localhost" && { echo "Error: build-*.env files contains localhost reference" >&2; exit 1;} || exit 0', HOME: "/home/runner", npm_package_devDependencies_sass: "^1.77.2", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "PORTAL_ENV=production vite build --mode fmmf", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max_old_space_size=4096", GRADLE_HOME: "/usr/share/gradle-8.12.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", npm_package_scripts_type_check: "vue-tsc --declaration --noEmit -p tsconfig.app.json", npm_package_dependencies__feedmepos_mf_common: "1.13.0-beta.1", npm_package_devDependencies_npm_run_all2: "^6.2.0", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu24", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", SYSTEMD_EXEC_PID: "720", npm_package_dependencies__feedmepos_ui_library: "1.3.8", npm_package_dependencies_dayjs: "^1.11.11", npm_package_dependencies_dotenv: "^16.4.5", npm_package_devDependencies__tsconfig_node18: "^18.2.4", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_devDependencies_tailwindcss: "3.4.1", npm_package_devDependencies_typescript: "5.2.2", NVM_DIR: "/home/runner/.nvm", npm_package_dependencies_google_maps: "^4.3.3", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^1.8.27", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.13/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20250202.1.0", npm_package_scripts_build_prod: "PORTAL_ENV=production vite build --mode standalone", npm_package_scripts_dev: "vite", npm_package_dependencies__types_dinero_js: "^1.9.4", npm_package_devDependencies_prettier: "^3.2.5", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.11/x64", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", npm_package_scripts_prod: "PORTAL_ENV=production vite", npm_package_devDependencies__vue_tsconfig: "^0.4.0", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.5/x64", JOURNAL_STREAM: "8:5817", GITHUB_WORKFLOW: "Preview FeedMe Inventory Portal V1", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure", npm_package_scripts_lint: "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", npm_package_scripts_check_publish_version: "./bin/check-version.sh", npm_package_dependencies_csstype: "^3.1.3", npm_package_dependencies_fuzzy: "^0.1.3", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "13185622173", STATS_VMFE: "true", npm_package_devDependencies_happy_dom: "^12.10.3", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "b30e4357fd7e102b8e02d1b0ff173b1d34bdc79b", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^4.6.2", GITHUB_WORKFLOW_REF: "feedmepos/inventory-service/.github/workflows/inventory-portal-dev.yaml@refs/heads/dev/portal", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_dependencies__feedmepos_zod_inventory: "workspace:^", npm_package_dependencies_axios: "^1.7.1", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/inventory-service/inventory-service/apps/inventory-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/inventory-service/inventory-service/node_modules/.bin:/home/runner/work/inventory-service/inventory-service/apps/inventory-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/inventory-service/inventory-service/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.18.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_c546ab75-ecbd-4db3-87f4-e981d8189ec3", INVOCATION_ID: "144de6c5767444fd904593dc63ccf965", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.18.2/x64/bin/node", npm_package_name: "@feedmepos/mf-inventory-portal", GITHUB_ACTION: "publish_version", GITHUB_RUN_NUMBER: "344", GITHUB_TRIGGERING_ACTOR: "ye-yu", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_build_mf: "vite build --mode fmmf", npm_package_scripts_test_publish: "pnpm prepublish && pnpm pack", npm_package_dependencies_vue_country_flag_next: "^2.3.2", npm_config_frozen_lockfile: "", npm_package_dependencies__typescript_eslint_typescript_estree: "^8.21.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_devDependencies__vue_eslint_config_typescript: "^12.0.0", npm_package_devDependencies__vue_test_utils: "^2.4.6", npm_package_devDependencies_eslint: "^8.57.0", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 81", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "dev/portal", GITHUB_REPOSITORY: "feedmepos/inventory-service", STATS_D_D: "false", npm_package_scripts_build_dts: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false", npm_package_scripts_publish_beta: "pnpm publish --tag beta", npm_package_scripts_unpack: "tar zxf", npm_package_dependencies__feedmepos_core: "^2.9.3", npm_package_devDependencies__types_debounce: "^1.2.4", npm_lifecycle_script: "vite build --mode fmmf", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_scripts_test: "vitest", npm_package_devDependencies__vue_eslint_config_prettier: "^8.0.0", GITHUB_REPOSITORY_ID: "656626604", GITHUB_ACTIONS: "true", STATS_PIP: "false", NODE_PATH: "/home/runner/work/inventory-service/inventory-service/node_modules/.pnpm/vite@5.4.8_@types+node@18.19.33_sass@1.77.2_terser@5.30.3/node_modules/vite/bin/node_modules:/home/runner/work/inventory-service/inventory-service/node_modules/.pnpm/vite@5.4.8_@types+node@18.19.33_sass@1.77.2_terser@5.30.3/node_modules/vite/node_modules:/home/runner/work/inventory-service/inventory-service/node_modules/.pnpm/vite@5.4.8_@types+node@18.19.33_sass@1.77.2_terser@5.30.3/node_modules:/home/runner/work/inventory-service/inventory-service/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.0.23-dev.9", npm_package_scripts_build_only: "pnpm build:mf && pnpm build:dts && pnpm build-types", npm_package_dependencies__tanstack_vue_table: "^8.17.3", npm_package_dependencies__vue_cli_service: "^5.0.8", npm_package_devDependencies__rushstack_eslint_patch: "^1.10.3", npm_lifecycle_event: "build:mf", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vite build --mode standalone", npm_package_dependencies_vue_i18n: "^10.0.5", npm_config__feedmepos_registry: "https://registry.npmjs.org/", GITHUB_WORKSPACE: "/home/runner/work/inventory-service/inventory-service", ACCEPT_EULA: "Y", GITHUB_JOB: "setup", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_devDependencies__types_fuzzy_search: "^2.1.5", npm_package_devDependencies_cypress: "^13.9.0", GITHUB_SHA: "b30e4357fd7e102b8e02d1b0ff173b1d34bdc79b", GITHUB_RUN_ATTEMPT: "1", STATS_D_TC: "true", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.4.0", GITHUB_REF: "refs/heads/dev/portal", GITHUB_ACTOR: "ye-yu", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_devDependencies__testing_library_vue: "^8.1.0", npm_package_scripts_format: "prettier --write src/", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_dfdffb9c-317f-4752-b027-2110b5c5e632", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/inventory-service/inventory-service/apps/inventory-portal", GITHUB_ACTOR_ID: "30603031", RUNNER_WORKSPACE: "/home/runner/work/inventory-service", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "push", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_dfdffb9c-317f-4752-b027-2110b5c5e632", npm_package_exports___types: "./dist/app.d.ts", npm_package_dependencies__feedmepos_inventory_core: "workspace:^", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/inventory-service/inventory-service/apps/inventory-portal", npm_package_devDependencies_eslint_plugin_vue: "^9.26.0", npm_package_devDependencies_postcss: "^8.4.38", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.2.12479018", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_deploy: "pnpm run build-only && pnpm publish --no-git-checks .", npm_package_dependencies_debounce: "^2.0.0", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", STATS_EXTP: "https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data", npm_package_dependencies__feedmepos_menu: "1.0.34", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_dfdffb9c-317f-4752-b027-2110b5c5e632", INIT_CWD: "/home/runner/work/inventory-service/inventory-service/apps/inventory-portal", npm_package_dependencies__feedmepos_inventory_core_js: "workspace:^", npm_package_dependencies_libphonenumber_js: "^1.11.18", NODE_ENV: "production" } };
1673
- function fa() {
1674
- typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ze().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ze().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
1675
- }
1676
- function Dt(e) {
1677
- return (n) => va(n, e);
1678
- }
1679
- function va(e, t) {
1680
- const n = ba(t);
1681
- if (n == null)
1682
- throw dt(
1683
- 0
1684
- /* NodeTypes.Resource */
1685
- );
1686
- if (nn(n) === 1) {
1687
- const r = Ea(n);
1688
- return e.plural(r.reduce((c, p) => [
1689
- ...c,
1690
- yn(e, p)
1691
- ], []));
1692
- } else
1693
- return yn(e, n);
1694
- }
1695
- const ga = ["b", "body"];
1696
- function ba(e) {
1697
- return Je(e, ga);
1698
- }
1699
- const ya = ["c", "cases"];
1700
- function Ea(e) {
1701
- return Je(e, ya, []);
1702
- }
1703
- function yn(e, t) {
1704
- const n = Ta(t);
1705
- if (n != null)
1706
- return e.type === "text" ? n : e.normalize([n]);
1707
- {
1708
- const s = Ia(t).reduce((a, r) => [...a, xt(e, r)], []);
1709
- return e.normalize(s);
1710
- }
1711
- }
1712
- const ha = ["s", "static"];
1713
- function Ta(e) {
1714
- return Je(e, ha);
1715
- }
1716
- const ka = ["i", "items"];
1717
- function Ia(e) {
1718
- return Je(e, ka, []);
1719
- }
1720
- function xt(e, t) {
1721
- const n = nn(t);
1722
- switch (n) {
1723
- case 3:
1724
- return bt(t, n);
1725
- case 9:
1726
- return bt(t, n);
1727
- case 4: {
1728
- const s = t;
1729
- if (we(s, "k") && s.k)
1730
- return e.interpolate(e.named(s.k));
1731
- if (we(s, "key") && s.key)
1732
- return e.interpolate(e.named(s.key));
1733
- throw dt(n);
1734
- }
1735
- case 5: {
1736
- const s = t;
1737
- if (we(s, "i") && pe(s.i))
1738
- return e.interpolate(e.list(s.i));
1739
- if (we(s, "index") && pe(s.index))
1740
- return e.interpolate(e.list(s.index));
1741
- throw dt(n);
1742
- }
1743
- case 6: {
1744
- const s = t, a = Ra(s), r = Aa(s);
1745
- return e.linked(xt(e, r), a ? xt(e, a) : void 0, e.type);
1746
- }
1747
- case 7:
1748
- return bt(t, n);
1749
- case 8:
1750
- return bt(t, n);
1751
- default:
1752
- throw new Error(`unhandled node on format message part: ${n}`);
1753
- }
1754
- }
1755
- const Oa = ["t", "type"];
1756
- function nn(e) {
1757
- return Je(e, Oa);
1758
- }
1759
- const Sa = ["v", "value"];
1760
- function bt(e, t) {
1761
- const n = Je(e, Sa);
1762
- if (n)
1763
- return n;
1764
- throw dt(t);
1765
- }
1766
- const Na = ["m", "modifier"];
1767
- function Ra(e) {
1768
- return Je(e, Na);
1769
- }
1770
- const Ca = ["k", "key"];
1771
- function Aa(e) {
1772
- const t = Je(e, Ca);
1773
- if (t)
1774
- return t;
1775
- throw dt(
1776
- 6
1777
- /* NodeTypes.Linked */
1778
- );
1779
- }
1780
- function Je(e, t, n) {
1781
- for (let s = 0; s < t.length; s++) {
1782
- const a = t[s];
1783
- if (we(e, a) && e[a] != null)
1784
- return e[a];
1785
- }
1786
- return n;
1787
- }
1788
- function dt(e) {
1789
- return new Error(`unhandled node type: ${e}`);
1790
- }
1791
- const Da = (e) => e;
1792
- let yt = J();
1793
- function lt(e) {
1794
- return W(e) && nn(e) === 0 && (we(e, "b") || we(e, "body"));
1795
- }
1796
- function La(e, t = {}) {
1797
- let n = !1;
1798
- const s = t.onError || Yr;
1799
- return t.onError = (a) => {
1800
- n = !0, s(a);
1801
- }, { ..._a(e, t), detectError: n };
1802
- }
1803
- // @__NO_SIDE_EFFECTS__
1804
- function Pa(e, t) {
1805
- if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && x(e)) {
1806
- ae(t.warnHtmlMessage) && t.warnHtmlMessage;
1807
- const s = (t.onCacheKey || Da)(e), a = yt[s];
1808
- if (a)
1809
- return a;
1810
- const { ast: r, detectError: c } = La(e, {
1811
- ...t,
1812
- location: ma.env.NODE_ENV !== "production",
1813
- jit: !0
1814
- }), p = Dt(r);
1815
- return c ? p : yt[s] = p;
1816
- } else {
1817
- const n = e.cacheKey;
1818
- if (n) {
1819
- const s = yt[n];
1820
- return s || (yt[n] = Dt(e));
1821
- } else
1822
- return Dt(e);
1823
- }
1824
- }
1825
- let pt = null;
1826
- function wa(e) {
1827
- pt = e;
1828
- }
1829
- function Ua(e, t, n) {
1830
- pt && pt.emit("i18n:init", {
1831
- timestamp: Date.now(),
1832
- i18n: e,
1833
- version: t,
1834
- meta: n
1835
- });
1836
- }
1837
- const Fa = /* @__PURE__ */ Ma("function:translate");
1838
- function Ma(e) {
1839
- return (t) => pt && pt.emit(e, t);
1840
- }
1841
- const Be = {
1842
- INVALID_ARGUMENT: Wr,
1843
- // 17
1844
- INVALID_DATE_ARGUMENT: 18,
1845
- INVALID_ISO_DATE_ARGUMENT: 19,
1846
- NOT_SUPPORT_NON_STRING_MESSAGE: 20,
1847
- NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1848
- NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1849
- NOT_SUPPORT_LOCALE_TYPE: 23
1850
- }, xa = 24;
1851
- function $e(e) {
1852
- return Rt(e, null, void 0);
1853
- }
1854
- function sn(e, t) {
1855
- return t.locale != null ? En(t.locale) : En(e.locale);
1856
- }
1857
- let Lt;
1858
- function En(e) {
1859
- if (x(e))
1860
- return e;
1861
- if (te(e)) {
1862
- if (e.resolvedOnce && Lt != null)
1863
- return Lt;
1864
- if (e.constructor.name === "Function") {
1865
- const t = e();
1866
- if (Gr(t))
1867
- throw $e(Be.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1868
- return Lt = t;
1869
- } else
1870
- throw $e(Be.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1871
- } else
1872
- throw $e(Be.NOT_SUPPORT_LOCALE_TYPE);
1873
- }
1874
- function Ha(e, t, n) {
1875
- return [.../* @__PURE__ */ new Set([
1876
- n,
1877
- ...ue(t) ? t : W(t) ? Object.keys(t) : x(t) ? [t] : [n]
1878
- ])];
1879
- }
1880
- function Jn(e, t, n) {
1881
- const s = x(n) ? n : kt, a = e;
1882
- a.__localeChainCache || (a.__localeChainCache = /* @__PURE__ */ new Map());
1883
- let r = a.__localeChainCache.get(s);
1884
- if (!r) {
1885
- r = [];
1886
- let c = [n];
1887
- for (; ue(c); )
1888
- c = hn(r, c, t);
1889
- const p = ue(t) || !j(t) ? t : t.default ? t.default : null;
1890
- c = x(p) ? [p] : p, ue(c) && hn(r, c, !1), a.__localeChainCache.set(s, r);
1891
- }
1892
- return r;
1893
- }
1894
- function hn(e, t, n) {
1895
- let s = !0;
1896
- for (let a = 0; a < t.length && ae(s); a++) {
1897
- const r = t[a];
1898
- x(r) && (s = Va(e, t[a], n));
1899
- }
1900
- return s;
1901
- }
1902
- function Va(e, t, n) {
1903
- let s;
1904
- const a = t.split("-");
1905
- do {
1906
- const r = a.join("-");
1907
- s = Ga(e, r, n), a.splice(-1, 1);
1908
- } while (a.length && s === !0);
1909
- return s;
1910
- }
1911
- function Ga(e, t, n) {
1912
- let s = !1;
1913
- if (!e.includes(t) && (s = !0, t)) {
1914
- s = t[t.length - 1] !== "!";
1915
- const a = t.replace(/!/g, "");
1916
- e.push(a), (ue(n) || j(n)) && n[a] && (s = n[a]);
1917
- }
1918
- return s;
1919
- }
1920
- const ze = [];
1921
- ze[
1922
- 0
1923
- /* States.BEFORE_PATH */
1924
- ] = {
1925
- w: [
1926
- 0
1927
- /* States.BEFORE_PATH */
1928
- ],
1929
- i: [
1930
- 3,
1931
- 0
1932
- /* Actions.APPEND */
1933
- ],
1934
- "[": [
1935
- 4
1936
- /* States.IN_SUB_PATH */
1937
- ],
1938
- o: [
1939
- 7
1940
- /* States.AFTER_PATH */
1941
- ]
1942
- };
1943
- ze[
1944
- 1
1945
- /* States.IN_PATH */
1946
- ] = {
1947
- w: [
1948
- 1
1949
- /* States.IN_PATH */
1950
- ],
1951
- ".": [
1952
- 2
1953
- /* States.BEFORE_IDENT */
1954
- ],
1955
- "[": [
1956
- 4
1957
- /* States.IN_SUB_PATH */
1958
- ],
1959
- o: [
1960
- 7
1961
- /* States.AFTER_PATH */
1962
- ]
1963
- };
1964
- ze[
1965
- 2
1966
- /* States.BEFORE_IDENT */
1967
- ] = {
1968
- w: [
1969
- 2
1970
- /* States.BEFORE_IDENT */
1971
- ],
1972
- i: [
1973
- 3,
1974
- 0
1975
- /* Actions.APPEND */
1976
- ],
1977
- 0: [
1978
- 3,
1979
- 0
1980
- /* Actions.APPEND */
1981
- ]
1982
- };
1983
- ze[
1984
- 3
1985
- /* States.IN_IDENT */
1986
- ] = {
1987
- i: [
1988
- 3,
1989
- 0
1990
- /* Actions.APPEND */
1991
- ],
1992
- 0: [
1993
- 3,
1994
- 0
1995
- /* Actions.APPEND */
1996
- ],
1997
- w: [
1998
- 1,
1999
- 1
2000
- /* Actions.PUSH */
2001
- ],
2002
- ".": [
2003
- 2,
2004
- 1
2005
- /* Actions.PUSH */
2006
- ],
2007
- "[": [
2008
- 4,
2009
- 1
2010
- /* Actions.PUSH */
2011
- ],
2012
- o: [
2013
- 7,
2014
- 1
2015
- /* Actions.PUSH */
2016
- ]
2017
- };
2018
- ze[
2019
- 4
2020
- /* States.IN_SUB_PATH */
2021
- ] = {
2022
- "'": [
2023
- 5,
2024
- 0
2025
- /* Actions.APPEND */
2026
- ],
2027
- '"': [
2028
- 6,
2029
- 0
2030
- /* Actions.APPEND */
2031
- ],
2032
- "[": [
2033
- 4,
2034
- 2
2035
- /* Actions.INC_SUB_PATH_DEPTH */
2036
- ],
2037
- "]": [
2038
- 1,
2039
- 3
2040
- /* Actions.PUSH_SUB_PATH */
2041
- ],
2042
- o: 8,
2043
- l: [
2044
- 4,
2045
- 0
2046
- /* Actions.APPEND */
2047
- ]
2048
- };
2049
- ze[
2050
- 5
2051
- /* States.IN_SINGLE_QUOTE */
2052
- ] = {
2053
- "'": [
2054
- 4,
2055
- 0
2056
- /* Actions.APPEND */
2057
- ],
2058
- o: 8,
2059
- l: [
2060
- 5,
2061
- 0
2062
- /* Actions.APPEND */
2063
- ]
2064
- };
2065
- ze[
2066
- 6
2067
- /* States.IN_DOUBLE_QUOTE */
2068
- ] = {
2069
- '"': [
2070
- 4,
2071
- 0
2072
- /* Actions.APPEND */
2073
- ],
2074
- o: 8,
2075
- l: [
2076
- 6,
2077
- 0
2078
- /* Actions.APPEND */
2079
- ]
2080
- };
2081
- const Ba = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
2082
- function $a(e) {
2083
- return Ba.test(e);
2084
- }
2085
- function ja(e) {
2086
- const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
2087
- return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
2088
- }
2089
- function Wa(e) {
2090
- if (e == null)
2091
- return "o";
2092
- switch (e.charCodeAt(0)) {
2093
- case 91:
2094
- case 93:
2095
- case 46:
2096
- case 34:
2097
- case 39:
2098
- return e;
2099
- case 95:
2100
- case 36:
2101
- case 45:
2102
- return "i";
2103
- case 9:
2104
- case 10:
2105
- case 13:
2106
- case 160:
2107
- case 65279:
2108
- case 8232:
2109
- case 8233:
2110
- return "w";
2111
- }
2112
- return "i";
2113
- }
2114
- function Ya(e) {
2115
- const t = e.trim();
2116
- return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : $a(t) ? ja(t) : "*" + t;
2117
- }
2118
- function Ka(e) {
2119
- const t = [];
2120
- let n = -1, s = 0, a = 0, r, c, p, i, u, f, b;
2121
- const v = [];
2122
- v[
2123
- 0
2124
- /* Actions.APPEND */
2125
- ] = () => {
2126
- c === void 0 ? c = p : c += p;
2127
- }, v[
2128
- 1
2129
- /* Actions.PUSH */
2130
- ] = () => {
2131
- c !== void 0 && (t.push(c), c = void 0);
2132
- }, v[
2133
- 2
2134
- /* Actions.INC_SUB_PATH_DEPTH */
2135
- ] = () => {
2136
- v[
2137
- 0
2138
- /* Actions.APPEND */
2139
- ](), a++;
2140
- }, v[
2141
- 3
2142
- /* Actions.PUSH_SUB_PATH */
2143
- ] = () => {
2144
- if (a > 0)
2145
- a--, s = 4, v[
2146
- 0
2147
- /* Actions.APPEND */
2148
- ]();
2149
- else {
2150
- if (a = 0, c === void 0 || (c = Ya(c), c === !1))
2151
- return !1;
2152
- v[
2153
- 1
2154
- /* Actions.PUSH */
2155
- ]();
2156
- }
2157
- };
2158
- function O() {
2159
- const C = e[n + 1];
2160
- if (s === 5 && C === "'" || s === 6 && C === '"')
2161
- return n++, p = "\\" + C, v[
2162
- 0
2163
- /* Actions.APPEND */
2164
- ](), !0;
2165
- }
2166
- for (; s !== null; )
2167
- if (n++, r = e[n], !(r === "\\" && O())) {
2168
- if (i = Wa(r), b = ze[s], u = b[i] || b.l || 8, u === 8 || (s = u[0], u[1] !== void 0 && (f = v[u[1]], f && (p = r, f() === !1))))
2169
- return;
2170
- if (s === 7)
2171
- return t;
2172
- }
2173
- }
2174
- const Tn = /* @__PURE__ */ new Map();
2175
- function Xa(e, t) {
2176
- return W(e) ? e[t] : null;
2177
- }
2178
- function qa(e, t) {
2179
- if (!W(e))
2180
- return null;
2181
- let n = Tn.get(t);
2182
- if (n || (n = Ka(t), n && Tn.set(t, n)), !n)
2183
- return null;
2184
- const s = n.length;
2185
- let a = e, r = 0;
2186
- for (; r < s; ) {
2187
- const c = a[n[r]];
2188
- if (c === void 0 || te(a))
2189
- return null;
2190
- a = c, r++;
2191
- }
2192
- return a;
2193
- }
2194
- const Ja = "10.0.5", Ct = -1, kt = "en-US", kn = "", In = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
2195
- function za() {
2196
- return {
2197
- upper: (e, t) => t === "text" && x(e) ? e.toUpperCase() : t === "vnode" && W(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
2198
- lower: (e, t) => t === "text" && x(e) ? e.toLowerCase() : t === "vnode" && W(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
2199
- capitalize: (e, t) => t === "text" && x(e) ? In(e) : t === "vnode" && W(e) && "__v_isVNode" in e ? In(e.children) : e
2200
- };
2201
- }
2202
- let zn;
2203
- function Qa(e) {
2204
- zn = e;
2205
- }
2206
- let Qn;
2207
- function Za(e) {
2208
- Qn = e;
2209
- }
2210
- let Zn;
2211
- function eo(e) {
2212
- Zn = e;
2213
- }
2214
- let es = null;
2215
- const to = /* @__NO_SIDE_EFFECTS__ */ (e) => {
2216
- es = e;
2217
- }, no = /* @__NO_SIDE_EFFECTS__ */ () => es;
2218
- let ts = null;
2219
- const On = (e) => {
2220
- ts = e;
2221
- }, so = () => ts;
2222
- let Sn = 0;
2223
- function ro(e = {}) {
2224
- const t = te(e.onWarn) ? e.onWarn : $r, n = x(e.version) ? e.version : Ja, s = x(e.locale) || te(e.locale) ? e.locale : kt, a = te(s) ? kt : s, r = ue(e.fallbackLocale) || j(e.fallbackLocale) || x(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : a, c = j(e.messages) ? e.messages : Pt(a), p = j(e.datetimeFormats) ? e.datetimeFormats : Pt(a), i = j(e.numberFormats) ? e.numberFormats : Pt(a), u = _e(J(), e.modifiers, za()), f = e.pluralRules || J(), b = te(e.missing) ? e.missing : null, v = ae(e.missingWarn) || Tt(e.missingWarn) ? e.missingWarn : !0, O = ae(e.fallbackWarn) || Tt(e.fallbackWarn) ? e.fallbackWarn : !0, C = !!e.fallbackFormat, R = !!e.unresolving, I = te(e.postTranslation) ? e.postTranslation : null, d = j(e.processor) ? e.processor : null, g = ae(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, S = !!e.escapeParameter, y = te(e.messageCompiler) ? e.messageCompiler : zn, T = te(e.messageResolver) ? e.messageResolver : Qn || Xa, k = te(e.localeFallbacker) ? e.localeFallbacker : Zn || Ha, h = W(e.fallbackContext) ? e.fallbackContext : void 0, V = e, H = W(V.__datetimeFormatters) ? V.__datetimeFormatters : /* @__PURE__ */ new Map(), B = W(V.__numberFormatters) ? V.__numberFormatters : /* @__PURE__ */ new Map(), Z = W(V.__meta) ? V.__meta : {};
2225
- Sn++;
2226
- const $ = {
2227
- version: n,
2228
- cid: Sn,
2229
- locale: s,
2230
- fallbackLocale: r,
2231
- messages: c,
2232
- modifiers: u,
2233
- pluralRules: f,
2234
- missing: b,
2235
- missingWarn: v,
2236
- fallbackWarn: O,
2237
- fallbackFormat: C,
2238
- unresolving: R,
2239
- postTranslation: I,
2240
- processor: d,
2241
- warnHtmlMessage: g,
2242
- escapeParameter: S,
2243
- messageCompiler: y,
2244
- messageResolver: T,
2245
- localeFallbacker: k,
2246
- fallbackContext: h,
2247
- onWarn: t,
2248
- __meta: Z
2249
- };
2250
- return $.datetimeFormats = p, $.numberFormats = i, $.__datetimeFormatters = H, $.__numberFormatters = B, __INTLIFY_PROD_DEVTOOLS__ && Ua($, n, Z), $;
2251
- }
2252
- const Pt = (e) => ({ [e]: J() });
2253
- function rn(e, t, n, s, a) {
2254
- const { missing: r, onWarn: c } = e;
2255
- if (r !== null) {
2256
- const p = r(e, n, t, a);
2257
- return x(p) ? p : t;
2258
- } else
2259
- return t;
2260
- }
2261
- function ut(e, t, n) {
2262
- const s = e;
2263
- s.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
2264
- }
2265
- function ao(e, t) {
2266
- return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
2267
- }
2268
- function oo(e, t) {
2269
- const n = t.indexOf(e);
2270
- if (n === -1)
2271
- return !1;
2272
- for (let s = n + 1; s < t.length; s++)
2273
- if (ao(e, t[s]))
2274
- return !0;
2275
- return !1;
2276
- }
2277
- function Nn(e, ...t) {
2278
- const { datetimeFormats: n, unresolving: s, fallbackLocale: a, onWarn: r, localeFallbacker: c } = e, { __datetimeFormatters: p } = e, [i, u, f, b] = Ht(...t), v = ae(f.missingWarn) ? f.missingWarn : e.missingWarn;
2279
- ae(f.fallbackWarn) ? f.fallbackWarn : e.fallbackWarn;
2280
- const O = !!f.part, C = sn(e, f), R = c(
2281
- e,
2282
- // eslint-disable-line @typescript-eslint/no-explicit-any
2283
- a,
2284
- C
2285
- );
2286
- if (!x(i) || i === "")
2287
- return new Intl.DateTimeFormat(C, b).format(u);
2288
- let I = {}, d, g = null;
2289
- const S = "datetime format";
2290
- for (let k = 0; k < R.length && (d = R[k], I = n[d] || {}, g = I[i], !j(g)); k++)
2291
- rn(e, i, d, v, S);
2292
- if (!j(g) || !x(d))
2293
- return s ? Ct : i;
2294
- let y = `${d}__${i}`;
2295
- Nt(b) || (y = `${y}__${JSON.stringify(b)}`);
2296
- let T = p.get(y);
2297
- return T || (T = new Intl.DateTimeFormat(d, _e({}, g, b)), p.set(y, T)), O ? T.formatToParts(u) : T.format(u);
2298
- }
2299
- const ns = [
2300
- "localeMatcher",
2301
- "weekday",
2302
- "era",
2303
- "year",
2304
- "month",
2305
- "day",
2306
- "hour",
2307
- "minute",
2308
- "second",
2309
- "timeZoneName",
2310
- "formatMatcher",
2311
- "hour12",
2312
- "timeZone",
2313
- "dateStyle",
2314
- "timeStyle",
2315
- "calendar",
2316
- "dayPeriod",
2317
- "numberingSystem",
2318
- "hourCycle",
2319
- "fractionalSecondDigits"
2320
- ];
2321
- function Ht(...e) {
2322
- const [t, n, s, a] = e, r = J();
2323
- let c = J(), p;
2324
- if (x(t)) {
2325
- const i = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
2326
- if (!i)
2327
- throw $e(Be.INVALID_ISO_DATE_ARGUMENT);
2328
- const u = i[3] ? i[3].trim().startsWith("T") ? `${i[1].trim()}${i[3].trim()}` : `${i[1].trim()}T${i[3].trim()}` : i[1].trim();
2329
- p = new Date(u);
2330
- try {
2331
- p.toISOString();
2332
- } catch {
2333
- throw $e(Be.INVALID_ISO_DATE_ARGUMENT);
2334
- }
2335
- } else if (xr(t)) {
2336
- if (isNaN(t.getTime()))
2337
- throw $e(Be.INVALID_DATE_ARGUMENT);
2338
- p = t;
2339
- } else if (pe(t))
2340
- p = t;
2341
- else
2342
- throw $e(Be.INVALID_ARGUMENT);
2343
- return x(n) ? r.key = n : j(n) && Object.keys(n).forEach((i) => {
2344
- ns.includes(i) ? c[i] = n[i] : r[i] = n[i];
2345
- }), x(s) ? r.locale = s : j(s) && (c = s), j(a) && (c = a), [r.key || "", p, r, c];
2346
- }
2347
- function Rn(e, t, n) {
2348
- const s = e;
2349
- for (const a in n) {
2350
- const r = `${t}__${a}`;
2351
- s.__datetimeFormatters.has(r) && s.__datetimeFormatters.delete(r);
2352
- }
2353
- }
2354
- function Cn(e, ...t) {
2355
- const { numberFormats: n, unresolving: s, fallbackLocale: a, onWarn: r, localeFallbacker: c } = e, { __numberFormatters: p } = e, [i, u, f, b] = Vt(...t), v = ae(f.missingWarn) ? f.missingWarn : e.missingWarn;
2356
- ae(f.fallbackWarn) ? f.fallbackWarn : e.fallbackWarn;
2357
- const O = !!f.part, C = sn(e, f), R = c(
2358
- e,
2359
- // eslint-disable-line @typescript-eslint/no-explicit-any
2360
- a,
2361
- C
2362
- );
2363
- if (!x(i) || i === "")
2364
- return new Intl.NumberFormat(C, b).format(u);
2365
- let I = {}, d, g = null;
2366
- const S = "number format";
2367
- for (let k = 0; k < R.length && (d = R[k], I = n[d] || {}, g = I[i], !j(g)); k++)
2368
- rn(e, i, d, v, S);
2369
- if (!j(g) || !x(d))
2370
- return s ? Ct : i;
2371
- let y = `${d}__${i}`;
2372
- Nt(b) || (y = `${y}__${JSON.stringify(b)}`);
2373
- let T = p.get(y);
2374
- return T || (T = new Intl.NumberFormat(d, _e({}, g, b)), p.set(y, T)), O ? T.formatToParts(u) : T.format(u);
2375
- }
2376
- const ss = [
2377
- "localeMatcher",
2378
- "style",
2379
- "currency",
2380
- "currencyDisplay",
2381
- "currencySign",
2382
- "useGrouping",
2383
- "minimumIntegerDigits",
2384
- "minimumFractionDigits",
2385
- "maximumFractionDigits",
2386
- "minimumSignificantDigits",
2387
- "maximumSignificantDigits",
2388
- "compactDisplay",
2389
- "notation",
2390
- "signDisplay",
2391
- "unit",
2392
- "unitDisplay",
2393
- "roundingMode",
2394
- "roundingPriority",
2395
- "roundingIncrement",
2396
- "trailingZeroDisplay"
2397
- ];
2398
- function Vt(...e) {
2399
- const [t, n, s, a] = e, r = J();
2400
- let c = J();
2401
- if (!pe(t))
2402
- throw $e(Be.INVALID_ARGUMENT);
2403
- const p = t;
2404
- return x(n) ? r.key = n : j(n) && Object.keys(n).forEach((i) => {
2405
- ss.includes(i) ? c[i] = n[i] : r[i] = n[i];
2406
- }), x(s) ? r.locale = s : j(s) && (c = s), j(a) && (c = a), [r.key || "", p, r, c];
2407
- }
2408
- function An(e, t, n) {
2409
- const s = e;
2410
- for (const a in n) {
2411
- const r = `${t}__${a}`;
2412
- s.__numberFormatters.has(r) && s.__numberFormatters.delete(r);
2413
- }
2414
- }
2415
- const lo = (e) => e, io = (e) => "", co = "text", uo = (e) => e.length === 0 ? "" : en(e), po = Br;
2416
- function Dn(e, t) {
2417
- return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
2418
- }
2419
- function _o(e) {
2420
- const t = pe(e.pluralIndex) ? e.pluralIndex : -1;
2421
- return e.named && (pe(e.named.count) || pe(e.named.n)) ? pe(e.named.count) ? e.named.count : pe(e.named.n) ? e.named.n : t : t;
2422
- }
2423
- function mo(e, t) {
2424
- t.count || (t.count = e), t.n || (t.n = e);
2425
- }
2426
- function fo(e = {}) {
2427
- const t = e.locale, n = _o(e), s = W(e.pluralRules) && x(t) && te(e.pluralRules[t]) ? e.pluralRules[t] : Dn, a = W(e.pluralRules) && x(t) && te(e.pluralRules[t]) ? Dn : void 0, r = (d) => d[s(n, d.length, a)], c = e.list || [], p = (d) => c[d], i = e.named || J();
2428
- pe(e.pluralIndex) && mo(n, i);
2429
- const u = (d) => i[d];
2430
- function f(d, g) {
2431
- const S = te(e.messages) ? e.messages(d, !!g) : W(e.messages) ? e.messages[d] : !1;
2432
- return S || (e.parent ? e.parent.message(d) : io);
2433
- }
2434
- const b = (d) => e.modifiers ? e.modifiers[d] : lo, v = j(e.processor) && te(e.processor.normalize) ? e.processor.normalize : uo, O = j(e.processor) && te(e.processor.interpolate) ? e.processor.interpolate : po, C = j(e.processor) && x(e.processor.type) ? e.processor.type : co, I = {
2435
- list: p,
2436
- named: u,
2437
- plural: r,
2438
- linked: (d, ...g) => {
2439
- const [S, y] = g;
2440
- let T = "text", k = "";
2441
- g.length === 1 ? W(S) ? (k = S.modifier || k, T = S.type || T) : x(S) && (k = S || k) : g.length === 2 && (x(S) && (k = S || k), x(y) && (T = y || T));
2442
- const h = f(d, !0)(I), V = (
2443
- // The message in vnode resolved with linked are returned as an array by processor.nomalize
2444
- T === "vnode" && ue(h) && k ? h[0] : h
2445
- );
2446
- return k ? b(k)(V, T) : V;
2447
- },
2448
- message: f,
2449
- type: C,
2450
- interpolate: O,
2451
- normalize: v,
2452
- values: _e(J(), c, i)
2453
- };
2454
- return I;
2455
- }
2456
- const Ln = () => "", Ce = (e) => te(e);
2457
- function Pn(e, ...t) {
2458
- const { fallbackFormat: n, postTranslation: s, unresolving: a, messageCompiler: r, fallbackLocale: c, messages: p } = e, [i, u] = Gt(...t), f = ae(u.missingWarn) ? u.missingWarn : e.missingWarn, b = ae(u.fallbackWarn) ? u.fallbackWarn : e.fallbackWarn, v = ae(u.escapeParameter) ? u.escapeParameter : e.escapeParameter, O = !!u.resolvedMessage, C = x(u.default) || ae(u.default) ? ae(u.default) ? r ? i : () => i : u.default : n ? r ? i : () => i : null, R = n || C != null && (x(C) || te(C)), I = sn(e, u);
2459
- v && vo(u);
2460
- let [d, g, S] = O ? [
2461
- i,
2462
- I,
2463
- p[I] || J()
2464
- ] : rs(e, i, I, c, b, f), y = d, T = i;
2465
- if (!O && !(x(y) || lt(y) || Ce(y)) && R && (y = C, T = y), !O && (!(x(y) || lt(y) || Ce(y)) || !x(g)))
2466
- return a ? Ct : i;
2467
- let k = !1;
2468
- const h = () => {
2469
- k = !0;
2470
- }, V = Ce(y) ? y : as(e, i, g, y, T, h);
2471
- if (k)
2472
- return y;
2473
- const H = yo(e, g, S, u), B = fo(H), Z = go(e, V, B), $ = s ? s(Z, i) : Z;
2474
- if (__INTLIFY_PROD_DEVTOOLS__) {
2475
- const w = {
2476
- timestamp: Date.now(),
2477
- key: x(i) ? i : Ce(y) ? y.key : "",
2478
- locale: g || (Ce(y) ? y.locale : ""),
2479
- format: x(y) ? y : Ce(y) ? y.source : "",
2480
- message: $
2481
- };
2482
- w.meta = _e({}, e.__meta, /* @__PURE__ */ no() || {}), Fa(w);
2483
- }
2484
- return $;
2485
- }
2486
- function vo(e) {
2487
- ue(e.list) ? e.list = e.list.map((t) => x(t) ? fn(t) : t) : W(e.named) && Object.keys(e.named).forEach((t) => {
2488
- x(e.named[t]) && (e.named[t] = fn(e.named[t]));
2489
- });
2490
- }
2491
- function rs(e, t, n, s, a, r) {
2492
- const { messages: c, onWarn: p, messageResolver: i, localeFallbacker: u } = e, f = u(e, s, n);
2493
- let b = J(), v, O = null;
2494
- const C = "translate";
2495
- for (let R = 0; R < f.length && (v = f[R], b = c[v] || J(), (O = i(b, t)) === null && (O = b[t]), !(x(O) || lt(O) || Ce(O))); R++)
2496
- if (!oo(v, f)) {
2497
- const I = rn(
2498
- e,
2499
- // eslint-disable-line @typescript-eslint/no-explicit-any
2500
- t,
2501
- v,
2502
- r,
2503
- C
2504
- );
2505
- I !== t && (O = I);
2506
- }
2507
- return [O, v, b];
2508
- }
2509
- function as(e, t, n, s, a, r) {
2510
- const { messageCompiler: c, warnHtmlMessage: p } = e;
2511
- if (Ce(s)) {
2512
- const u = s;
2513
- return u.locale = u.locale || n, u.key = u.key || t, u;
2514
- }
2515
- if (c == null) {
2516
- const u = () => s;
2517
- return u.locale = n, u.key = t, u;
2518
- }
2519
- const i = c(s, bo(e, n, a, s, p, r));
2520
- return i.locale = n, i.key = t, i.source = s, i;
2521
- }
2522
- function go(e, t, n) {
2523
- return t(n);
2524
- }
2525
- function Gt(...e) {
2526
- const [t, n, s] = e, a = J();
2527
- if (!x(t) && !pe(t) && !Ce(t) && !lt(t))
2528
- throw $e(Be.INVALID_ARGUMENT);
2529
- const r = pe(t) ? String(t) : (Ce(t), t);
2530
- return pe(n) ? a.plural = n : x(n) ? a.default = n : j(n) && !Nt(n) ? a.named = n : ue(n) && (a.list = n), pe(s) ? a.plural = s : x(s) ? a.default = s : j(s) && _e(a, s), [r, a];
2531
- }
2532
- function bo(e, t, n, s, a, r) {
2533
- return {
2534
- locale: t,
2535
- key: n,
2536
- warnHtmlMessage: a,
2537
- onError: (c) => {
2538
- throw r && r(c), c;
2539
- },
2540
- onCacheKey: (c) => Fr(t, n, c)
2541
- };
2542
- }
2543
- function yo(e, t, n, s) {
2544
- const { modifiers: a, pluralRules: r, messageResolver: c, fallbackLocale: p, fallbackWarn: i, missingWarn: u, fallbackContext: f } = e, v = {
2545
- locale: t,
2546
- modifiers: a,
2547
- pluralRules: r,
2548
- messages: (O, C) => {
2549
- let R = c(n, O);
2550
- if (R == null && (f || C)) {
2551
- const [, , I] = rs(
2552
- f || e,
2553
- // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
2554
- O,
2555
- t,
2556
- p,
2557
- i,
2558
- u
2559
- );
2560
- R = c(I, O);
2561
- }
2562
- if (x(R) || lt(R)) {
2563
- let I = !1;
2564
- const g = as(e, O, t, R, O, () => {
2565
- I = !0;
2566
- });
2567
- return I ? Ln : g;
2568
- } else return Ce(R) ? R : Ln;
2569
- }
2570
- };
2571
- return e.processor && (v.processor = e.processor), s.list && (v.list = s.list), s.named && (v.named = s.named), pe(s.plural) && (v.pluralIndex = s.plural), v;
2572
- }
2573
- fa();
2574
- var Eo = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_dfdffb9c-317f-4752-b027-2110b5c5e632", npm_package_dependencies_dinero_js: "^1.9.1", npm_package_dependencies_zod: "3.17.9", npm_package_devDependencies__types_node: "^18.19.33", npm_config_dedupe_peer_dependents: "", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_scripts_prepublish: "pnpm check:env && pnpm build:mf && pnpm build:dts", npm_package_dependencies_fuzzy_search: "^3.2.1", npm_package_dependencies_pinia: "^2.1.7", npm_package_devDependencies_vitest: "^1.6.0", USER: "runner", npm_config_user_agent: "pnpm/9.12.1 npm/? node/v20.18.2 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.13", npm_package_devDependencies_vite_plugin_commonjs: "^0.10.3", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_dfdffb9c-317f-4752-b027-2110b5c5e632", PIPX_HOME: "/opt/pipx", npm_package_scripts_dev_standalone: "vite --mode standalone", npm_package_dependencies_node_html_parser: "^7.0.1", npm_package_devDependencies_vite: "5.4.8", npm_node_execpath: "/opt/hostedtoolcache/node/20.18.2/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", npm_package_files_0: "dist", npm_package_scripts_prod_standalone: "PORTAL_ENV=production vite --mode standalone", npm_package_scripts_check_env: 'cat build-*.env | grep -qE "^[^#].*localhost" && { echo "Error: build-*.env files contains localhost reference" >&2; exit 1;} || exit 0', HOME: "/home/runner", npm_package_devDependencies_sass: "^1.77.2", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "PORTAL_ENV=production vite build --mode fmmf", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max_old_space_size=4096", GRADLE_HOME: "/usr/share/gradle-8.12.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", npm_package_scripts_type_check: "vue-tsc --declaration --noEmit -p tsconfig.app.json", npm_package_dependencies__feedmepos_mf_common: "1.13.0-beta.1", npm_package_devDependencies_npm_run_all2: "^6.2.0", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu24", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", SYSTEMD_EXEC_PID: "720", npm_package_dependencies__feedmepos_ui_library: "1.3.8", npm_package_dependencies_dayjs: "^1.11.11", npm_package_dependencies_dotenv: "^16.4.5", npm_package_devDependencies__tsconfig_node18: "^18.2.4", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_devDependencies_tailwindcss: "3.4.1", npm_package_devDependencies_typescript: "5.2.2", NVM_DIR: "/home/runner/.nvm", npm_package_dependencies_google_maps: "^4.3.3", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^1.8.27", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.13/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20250202.1.0", npm_package_scripts_build_prod: "PORTAL_ENV=production vite build --mode standalone", npm_package_scripts_dev: "vite", npm_package_dependencies__types_dinero_js: "^1.9.4", npm_package_devDependencies_prettier: "^3.2.5", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.11/x64", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", npm_package_scripts_prod: "PORTAL_ENV=production vite", npm_package_devDependencies__vue_tsconfig: "^0.4.0", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.5/x64", JOURNAL_STREAM: "8:5817", GITHUB_WORKFLOW: "Preview FeedMe Inventory Portal V1", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure", npm_package_scripts_lint: "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", npm_package_scripts_check_publish_version: "./bin/check-version.sh", npm_package_dependencies_csstype: "^3.1.3", npm_package_dependencies_fuzzy: "^0.1.3", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "13185622173", STATS_VMFE: "true", npm_package_devDependencies_happy_dom: "^12.10.3", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "b30e4357fd7e102b8e02d1b0ff173b1d34bdc79b", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^4.6.2", GITHUB_WORKFLOW_REF: "feedmepos/inventory-service/.github/workflows/inventory-portal-dev.yaml@refs/heads/dev/portal", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_dependencies__feedmepos_zod_inventory: "workspace:^", npm_package_dependencies_axios: "^1.7.1", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/inventory-service/inventory-service/apps/inventory-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/inventory-service/inventory-service/node_modules/.bin:/home/runner/work/inventory-service/inventory-service/apps/inventory-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/inventory-service/inventory-service/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.18.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_c546ab75-ecbd-4db3-87f4-e981d8189ec3", INVOCATION_ID: "144de6c5767444fd904593dc63ccf965", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.18.2/x64/bin/node", npm_package_name: "@feedmepos/mf-inventory-portal", GITHUB_ACTION: "publish_version", GITHUB_RUN_NUMBER: "344", GITHUB_TRIGGERING_ACTOR: "ye-yu", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_build_mf: "vite build --mode fmmf", npm_package_scripts_test_publish: "pnpm prepublish && pnpm pack", npm_package_dependencies_vue_country_flag_next: "^2.3.2", npm_config_frozen_lockfile: "", npm_package_dependencies__typescript_eslint_typescript_estree: "^8.21.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_devDependencies__vue_eslint_config_typescript: "^12.0.0", npm_package_devDependencies__vue_test_utils: "^2.4.6", npm_package_devDependencies_eslint: "^8.57.0", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 81", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "dev/portal", GITHUB_REPOSITORY: "feedmepos/inventory-service", STATS_D_D: "false", npm_package_scripts_build_dts: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false", npm_package_scripts_publish_beta: "pnpm publish --tag beta", npm_package_scripts_unpack: "tar zxf", npm_package_dependencies__feedmepos_core: "^2.9.3", npm_package_devDependencies__types_debounce: "^1.2.4", npm_lifecycle_script: "vite build --mode fmmf", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_scripts_test: "vitest", npm_package_devDependencies__vue_eslint_config_prettier: "^8.0.0", GITHUB_REPOSITORY_ID: "656626604", GITHUB_ACTIONS: "true", STATS_PIP: "false", NODE_PATH: "/home/runner/work/inventory-service/inventory-service/node_modules/.pnpm/vite@5.4.8_@types+node@18.19.33_sass@1.77.2_terser@5.30.3/node_modules/vite/bin/node_modules:/home/runner/work/inventory-service/inventory-service/node_modules/.pnpm/vite@5.4.8_@types+node@18.19.33_sass@1.77.2_terser@5.30.3/node_modules/vite/node_modules:/home/runner/work/inventory-service/inventory-service/node_modules/.pnpm/vite@5.4.8_@types+node@18.19.33_sass@1.77.2_terser@5.30.3/node_modules:/home/runner/work/inventory-service/inventory-service/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.0.23-dev.9", npm_package_scripts_build_only: "pnpm build:mf && pnpm build:dts && pnpm build-types", npm_package_dependencies__tanstack_vue_table: "^8.17.3", npm_package_dependencies__vue_cli_service: "^5.0.8", npm_package_devDependencies__rushstack_eslint_patch: "^1.10.3", npm_lifecycle_event: "build:mf", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vite build --mode standalone", npm_package_dependencies_vue_i18n: "^10.0.5", npm_config__feedmepos_registry: "https://registry.npmjs.org/", GITHUB_WORKSPACE: "/home/runner/work/inventory-service/inventory-service", ACCEPT_EULA: "Y", GITHUB_JOB: "setup", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_devDependencies__types_fuzzy_search: "^2.1.5", npm_package_devDependencies_cypress: "^13.9.0", GITHUB_SHA: "b30e4357fd7e102b8e02d1b0ff173b1d34bdc79b", GITHUB_RUN_ATTEMPT: "1", STATS_D_TC: "true", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.4.0", GITHUB_REF: "refs/heads/dev/portal", GITHUB_ACTOR: "ye-yu", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_devDependencies__testing_library_vue: "^8.1.0", npm_package_scripts_format: "prettier --write src/", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_dfdffb9c-317f-4752-b027-2110b5c5e632", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/inventory-service/inventory-service/apps/inventory-portal", GITHUB_ACTOR_ID: "30603031", RUNNER_WORKSPACE: "/home/runner/work/inventory-service", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.12.1/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "push", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_dfdffb9c-317f-4752-b027-2110b5c5e632", npm_package_exports___types: "./dist/app.d.ts", npm_package_dependencies__feedmepos_inventory_core: "workspace:^", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/inventory-service/inventory-service/apps/inventory-portal", npm_package_devDependencies_eslint_plugin_vue: "^9.26.0", npm_package_devDependencies_postcss: "^8.4.38", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.2.12479018", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_deploy: "pnpm run build-only && pnpm publish --no-git-checks .", npm_package_dependencies_debounce: "^2.0.0", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", STATS_EXTP: "https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data", npm_package_dependencies__feedmepos_menu: "1.0.34", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_dfdffb9c-317f-4752-b027-2110b5c5e632", INIT_CWD: "/home/runner/work/inventory-service/inventory-service/apps/inventory-portal", npm_package_dependencies__feedmepos_inventory_core_js: "workspace:^", npm_package_dependencies_libphonenumber_js: "^1.11.18", NODE_ENV: "production" } };
2575
- const ho = "10.0.5";
2576
- function To() {
2577
- typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Ze().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Ze().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ze().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ze().__INTLIFY_PROD_DEVTOOLS__ = !1);
2578
- }
2579
- const it = {
2580
- // composer module errors
2581
- UNEXPECTED_RETURN_TYPE: xa,
2582
- // 24
2583
- // legacy module errors
2584
- INVALID_ARGUMENT: 25,
2585
- // i18n module errors
2586
- MUST_BE_CALL_SETUP_TOP: 26,
2587
- NOT_INSTALLED: 27,
2588
- // directive module errors
2589
- REQUIRED_VALUE: 28,
2590
- INVALID_VALUE: 29,
2591
- // vue-devtools errors
2592
- CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: 30,
2593
- NOT_INSTALLED_WITH_PROVIDE: 31,
2594
- // unexpected error
2595
- UNEXPECTED_ERROR: 32,
2596
- // not compatible legacy vue-i18n constructor
2597
- NOT_COMPATIBLE_LEGACY_VUE_I18N: 33,
2598
- // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly
2599
- NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
2600
- };
2601
- function _t(e, ...t) {
2602
- return Rt(e, null, void 0);
2603
- }
2604
- const Bt = /* @__PURE__ */ tt("__translateVNode"), $t = /* @__PURE__ */ tt("__datetimeParts"), jt = /* @__PURE__ */ tt("__numberParts"), ko = tt("__setPluralRules"), os = /* @__PURE__ */ tt("__injectWithOption"), Wt = /* @__PURE__ */ tt("__dispose");
2605
- function mt(e) {
2606
- if (!W(e))
2607
- return e;
2608
- for (const t in e)
2609
- if (we(e, t))
2610
- if (!t.includes("."))
2611
- W(e[t]) && mt(e[t]);
2612
- else {
2613
- const n = t.split("."), s = n.length - 1;
2614
- let a = e, r = !1;
2615
- for (let c = 0; c < s; c++) {
2616
- if (n[c] in a || (a[n[c]] = J()), !W(a[n[c]])) {
2617
- r = !0;
2618
- break;
2619
- }
2620
- a = a[n[c]];
2621
- }
2622
- r || (a[n[s]] = e[t], delete e[t]), W(a[n[s]]) && mt(a[n[s]]);
2623
- }
2624
- return e;
2625
- }
2626
- function ls(e, t) {
2627
- const { messages: n, __i18n: s, messageResolver: a, flatJson: r } = t, c = j(n) ? n : ue(s) ? J() : { [e]: J() };
2628
- if (ue(s) && s.forEach((p) => {
2629
- if ("locale" in p && "resource" in p) {
2630
- const { locale: i, resource: u } = p;
2631
- i ? (c[i] = c[i] || J(), Et(u, c[i])) : Et(u, c);
2632
- } else
2633
- x(p) && Et(JSON.parse(p), c);
2634
- }), a == null && r)
2635
- for (const p in c)
2636
- we(c, p) && mt(c[p]);
2637
- return c;
2638
- }
2639
- function is(e) {
2640
- return e.type;
2641
- }
2642
- function Io(e, t, n) {
2643
- let s = W(t.messages) ? t.messages : J();
2644
- "__i18nGlobal" in n && (s = ls(e.locale.value, {
2645
- messages: s,
2646
- __i18n: n.__i18nGlobal
2647
- }));
2648
- const a = Object.keys(s);
2649
- a.length && a.forEach((r) => {
2650
- e.mergeLocaleMessage(r, s[r]);
2651
- });
2652
- {
2653
- if (W(t.datetimeFormats)) {
2654
- const r = Object.keys(t.datetimeFormats);
2655
- r.length && r.forEach((c) => {
2656
- e.mergeDateTimeFormat(c, t.datetimeFormats[c]);
2657
- });
2658
- }
2659
- if (W(t.numberFormats)) {
2660
- const r = Object.keys(t.numberFormats);
2661
- r.length && r.forEach((c) => {
2662
- e.mergeNumberFormat(c, t.numberFormats[c]);
2663
- });
2664
- }
2665
- }
2666
- }
2667
- function wn(e) {
2668
- return M(fs, null, e, 0);
2669
- }
2670
- const Un = "__INTLIFY_META__", Fn = () => [], Oo = () => !1;
2671
- let Mn = 0;
2672
- function xn(e) {
2673
- return (t, n, s, a) => e(n, s, Yt() || void 0, a);
2674
- }
2675
- const So = /* @__NO_SIDE_EFFECTS__ */ () => {
2676
- const e = Yt();
2677
- let t = null;
2678
- return e && (t = is(e)[Un]) ? { [Un]: t } : null;
2679
- };
2680
- function No(e = {}) {
2681
- const { __root: t, __injectWithOption: n } = e, s = t === void 0, a = e.flatJson, r = _n ? ce : ms;
2682
- let c = ae(e.inheritLocale) ? e.inheritLocale : !0;
2683
- const p = r(
2684
- // prettier-ignore
2685
- t && c ? t.locale.value : x(e.locale) ? e.locale : kt
2686
- ), i = r(
2687
- // prettier-ignore
2688
- t && c ? t.fallbackLocale.value : x(e.fallbackLocale) || ue(e.fallbackLocale) || j(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : p.value
2689
- ), u = r(ls(p.value, e)), f = r(j(e.datetimeFormats) ? e.datetimeFormats : { [p.value]: {} }), b = r(j(e.numberFormats) ? e.numberFormats : { [p.value]: {} });
2690
- let v = t ? t.missingWarn : ae(e.missingWarn) || Tt(e.missingWarn) ? e.missingWarn : !0, O = t ? t.fallbackWarn : ae(e.fallbackWarn) || Tt(e.fallbackWarn) ? e.fallbackWarn : !0, C = t ? t.fallbackRoot : ae(e.fallbackRoot) ? e.fallbackRoot : !0, R = !!e.fallbackFormat, I = te(e.missing) ? e.missing : null, d = te(e.missing) ? xn(e.missing) : null, g = te(e.postTranslation) ? e.postTranslation : null, S = t ? t.warnHtmlMessage : ae(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, y = !!e.escapeParameter;
2691
- const T = t ? t.modifiers : j(e.modifiers) ? e.modifiers : {};
2692
- let k = e.pluralRules || t && t.pluralRules, h;
2693
- h = (() => {
2694
- s && On(null);
2695
- const _ = {
2696
- version: ho,
2697
- locale: p.value,
2698
- fallbackLocale: i.value,
2699
- messages: u.value,
2700
- modifiers: T,
2701
- pluralRules: k,
2702
- missing: d === null ? void 0 : d,
2703
- missingWarn: v,
2704
- fallbackWarn: O,
2705
- fallbackFormat: R,
2706
- unresolving: !0,
2707
- postTranslation: g === null ? void 0 : g,
2708
- warnHtmlMessage: S,
2709
- escapeParameter: y,
2710
- messageResolver: e.messageResolver,
2711
- messageCompiler: e.messageCompiler,
2712
- __meta: { framework: "vue" }
2713
- };
2714
- _.datetimeFormats = f.value, _.numberFormats = b.value, _.__datetimeFormatters = j(h) ? h.__datetimeFormatters : void 0, _.__numberFormatters = j(h) ? h.__numberFormatters : void 0;
2715
- const N = ro(_);
2716
- return s && On(N), N;
2717
- })(), ut(h, p.value, i.value);
2718
- function H() {
2719
- return [
2720
- p.value,
2721
- i.value,
2722
- u.value,
2723
- f.value,
2724
- b.value
2725
- ];
2726
- }
2727
- const B = Q({
2728
- get: () => p.value,
2729
- set: (_) => {
2730
- p.value = _, h.locale = p.value;
2731
- }
2732
- }), Z = Q({
2733
- get: () => i.value,
2734
- set: (_) => {
2735
- i.value = _, h.fallbackLocale = i.value, ut(h, p.value, _);
2736
- }
2737
- }), $ = Q(() => u.value), w = /* @__PURE__ */ Q(() => f.value), P = /* @__PURE__ */ Q(() => b.value);
2738
- function le() {
2739
- return te(g) ? g : null;
2740
- }
2741
- function ye(_) {
2742
- g = _, h.postTranslation = _;
2743
- }
2744
- function fe() {
2745
- return I;
2746
- }
2747
- function We(_) {
2748
- _ !== null && (d = xn(_)), I = _, h.missing = d;
2749
- }
2750
- const ve = (_, N, z, se, Qe, ft) => {
2751
- H();
2752
- let nt;
2753
- try {
2754
- Eo.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, s || (h.fallbackContext = t ? so() : void 0), nt = _(h);
2755
- } finally {
2756
- __INTLIFY_PROD_DEVTOOLS__, s || (h.fallbackContext = void 0);
2757
- }
2758
- if (z !== "translate exists" && // for not `te` (e.g `t`)
2759
- pe(nt) && nt === Ct || z === "translate exists" && !nt) {
2760
- const [ds, yl] = N();
2761
- return t && C ? se(t) : Qe(ds);
2762
- } else {
2763
- if (ft(nt))
2764
- return nt;
2765
- throw _t(it.UNEXPECTED_RETURN_TYPE);
2766
- }
2767
- };
2768
- function He(..._) {
2769
- return ve((N) => Reflect.apply(Pn, null, [N, ..._]), () => Gt(..._), "translate", (N) => Reflect.apply(N.t, N, [..._]), (N) => N, (N) => x(N));
2770
- }
2771
- function Ye(..._) {
2772
- const [N, z, se] = _;
2773
- if (se && !W(se))
2774
- throw _t(it.INVALID_ARGUMENT);
2775
- return He(N, z, _e({ resolvedMessage: !0 }, se || {}));
2776
- }
2777
- function A(..._) {
2778
- return ve((N) => Reflect.apply(Nn, null, [N, ..._]), () => Ht(..._), "datetime format", (N) => Reflect.apply(N.d, N, [..._]), () => kn, (N) => x(N));
2779
- }
2780
- function U(..._) {
2781
- return ve((N) => Reflect.apply(Cn, null, [N, ..._]), () => Vt(..._), "number format", (N) => Reflect.apply(N.n, N, [..._]), () => kn, (N) => x(N));
2782
- }
2783
- function oe(_) {
2784
- return _.map((N) => x(N) || pe(N) || ae(N) ? wn(String(N)) : N);
2785
- }
2786
- const Se = {
2787
- normalize: oe,
2788
- interpolate: (_) => _,
2789
- type: "vnode"
2790
- };
2791
- function De(..._) {
2792
- return ve((N) => {
2793
- let z;
2794
- const se = N;
2795
- try {
2796
- se.processor = Se, z = Reflect.apply(Pn, null, [se, ..._]);
2797
- } finally {
2798
- se.processor = null;
2799
- }
2800
- return z;
2801
- }, () => Gt(..._), "translate", (N) => N[Bt](..._), (N) => [wn(N)], (N) => ue(N));
2802
- }
2803
- function Ee(..._) {
2804
- return ve((N) => Reflect.apply(Cn, null, [N, ..._]), () => Vt(..._), "number format", (N) => N[jt](..._), Fn, (N) => x(N) || ue(N));
2805
- }
2806
- function he(..._) {
2807
- return ve((N) => Reflect.apply(Nn, null, [N, ..._]), () => Ht(..._), "datetime format", (N) => N[$t](..._), Fn, (N) => x(N) || ue(N));
2808
- }
2809
- function Le(_) {
2810
- k = _, h.pluralRules = k;
2811
- }
2812
- function Ue(_, N) {
2813
- return ve(() => {
2814
- if (!_)
2815
- return !1;
2816
- const z = x(N) ? N : p.value, se = ie(z), Qe = h.messageResolver(se, _);
2817
- return lt(Qe) || Ce(Qe) || x(Qe);
2818
- }, () => [_], "translate exists", (z) => Reflect.apply(z.te, z, [_, N]), Oo, (z) => ae(z));
2819
- }
2820
- function Ve(_) {
2821
- let N = null;
2822
- const z = Jn(h, i.value, p.value);
2823
- for (let se = 0; se < z.length; se++) {
2824
- const Qe = u.value[z[se]] || {}, ft = h.messageResolver(Qe, _);
2825
- if (ft != null) {
2826
- N = ft;
2827
- break;
2828
- }
2829
- }
2830
- return N;
2831
- }
2832
- function Y(_) {
2833
- const N = Ve(_);
2834
- return N ?? (t ? t.tm(_) || {} : {});
2835
- }
2836
- function ie(_) {
2837
- return u.value[_] || {};
2838
- }
2839
- function me(_, N) {
2840
- if (a) {
2841
- const z = { [_]: N };
2842
- for (const se in z)
2843
- we(z, se) && mt(z[se]);
2844
- N = z[_];
2845
- }
2846
- u.value[_] = N, h.messages = u.value;
2847
- }
2848
- function de(_, N) {
2849
- u.value[_] = u.value[_] || {};
2850
- const z = { [_]: N };
2851
- if (a)
2852
- for (const se in z)
2853
- we(z, se) && mt(z[se]);
2854
- N = z[_], Et(N, u.value[_]), h.messages = u.value;
2855
- }
2856
- function Ne(_) {
2857
- return f.value[_] || {};
2858
- }
2859
- function o(_, N) {
2860
- f.value[_] = N, h.datetimeFormats = f.value, Rn(h, _, N);
2861
- }
2862
- function l(_, N) {
2863
- f.value[_] = _e(f.value[_] || {}, N), h.datetimeFormats = f.value, Rn(h, _, N);
2864
- }
2865
- function E(_) {
2866
- return b.value[_] || {};
2867
- }
2868
- function F(_, N) {
2869
- b.value[_] = N, h.numberFormats = b.value, An(h, _, N);
2870
- }
2871
- function ee(_, N) {
2872
- b.value[_] = _e(b.value[_] || {}, N), h.numberFormats = b.value, An(h, _, N);
2873
- }
2874
- Mn++, t && _n && (qe(t.locale, (_) => {
2875
- c && (p.value = _, h.locale = _, ut(h, p.value, i.value));
2876
- }), qe(t.fallbackLocale, (_) => {
2877
- c && (i.value = _, h.fallbackLocale = _, ut(h, p.value, i.value));
2878
- }));
2879
- const D = {
2880
- id: Mn,
2881
- locale: B,
2882
- fallbackLocale: Z,
2883
- get inheritLocale() {
2884
- return c;
2885
- },
2886
- set inheritLocale(_) {
2887
- c = _, _ && t && (p.value = t.locale.value, i.value = t.fallbackLocale.value, ut(h, p.value, i.value));
2888
- },
2889
- get availableLocales() {
2890
- return Object.keys(u.value).sort();
2891
- },
2892
- messages: $,
2893
- get modifiers() {
2894
- return T;
2895
- },
2896
- get pluralRules() {
2897
- return k || {};
2898
- },
2899
- get isGlobal() {
2900
- return s;
2901
- },
2902
- get missingWarn() {
2903
- return v;
2904
- },
2905
- set missingWarn(_) {
2906
- v = _, h.missingWarn = v;
2907
- },
2908
- get fallbackWarn() {
2909
- return O;
2910
- },
2911
- set fallbackWarn(_) {
2912
- O = _, h.fallbackWarn = O;
2913
- },
2914
- get fallbackRoot() {
2915
- return C;
2916
- },
2917
- set fallbackRoot(_) {
2918
- C = _;
2919
- },
2920
- get fallbackFormat() {
2921
- return R;
2922
- },
2923
- set fallbackFormat(_) {
2924
- R = _, h.fallbackFormat = R;
2925
- },
2926
- get warnHtmlMessage() {
2927
- return S;
2928
- },
2929
- set warnHtmlMessage(_) {
2930
- S = _, h.warnHtmlMessage = _;
2931
- },
2932
- get escapeParameter() {
2933
- return y;
2934
- },
2935
- set escapeParameter(_) {
2936
- y = _, h.escapeParameter = _;
2937
- },
2938
- t: He,
2939
- getLocaleMessage: ie,
2940
- setLocaleMessage: me,
2941
- mergeLocaleMessage: de,
2942
- getPostTranslationHandler: le,
2943
- setPostTranslationHandler: ye,
2944
- getMissingHandler: fe,
2945
- setMissingHandler: We,
2946
- [ko]: Le
2947
- };
2948
- return D.datetimeFormats = w, D.numberFormats = P, D.rt = Ye, D.te = Ue, D.tm = Y, D.d = A, D.n = U, D.getDateTimeFormat = Ne, D.setDateTimeFormat = o, D.mergeDateTimeFormat = l, D.getNumberFormat = E, D.setNumberFormat = F, D.mergeNumberFormat = ee, D[os] = n, D[Bt] = De, D[$t] = he, D[jt] = Ee, D;
2949
- }
2950
- const an = {
2951
- tag: {
2952
- type: [String, Object]
2953
- },
2954
- locale: {
2955
- type: String
2956
- },
2957
- scope: {
2958
- type: String,
2959
- // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
2960
- validator: (e) => e === "parent" || e === "global",
2961
- default: "parent"
2962
- /* ComponentI18nScope */
2963
- },
2964
- i18n: {
2965
- type: Object
2966
- }
2967
- };
2968
- function Ro({ slots: e }, t) {
2969
- return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((s, a) => [
2970
- ...s,
2971
- // prettier-ignore
2972
- ...a.type === je ? a.children : [a]
2973
- ], []) : t.reduce((n, s) => {
2974
- const a = e[s];
2975
- return a && (n[s] = a()), n;
2976
- }, J());
2977
- }
2978
- function cs() {
2979
- return je;
2980
- }
2981
- _e({
2982
- keypath: {
2983
- type: String,
2984
- required: !0
2985
- },
2986
- plural: {
2987
- type: [Number, String],
2988
- validator: (e) => pe(e) || !isNaN(e)
2989
- }
2990
- }, an);
2991
- function Co(e) {
2992
- return ue(e) && !x(e[0]);
2993
- }
2994
- function us(e, t, n, s) {
2995
- const { slots: a, attrs: r } = t;
2996
- return () => {
2997
- const c = { part: !0 };
2998
- let p = J();
2999
- e.locale && (c.locale = e.locale), x(e.format) ? c.key = e.format : W(e.format) && (x(e.format.key) && (c.key = e.format.key), p = Object.keys(e.format).reduce((v, O) => n.includes(O) ? _e(J(), v, { [O]: e.format[O] }) : v, J()));
3000
- const i = s(e.value, c, p);
3001
- let u = [c.key];
3002
- ue(i) ? u = i.map((v, O) => {
3003
- const C = a[v.type], R = C ? C({ [v.type]: v.value, index: O, parts: i }) : [v.value];
3004
- return Co(R) && (R[0].key = `${v.type}-${O}`), R;
3005
- }) : x(i) && (u = [i]);
3006
- const f = _e(J(), r), b = x(e.tag) || W(e.tag) ? e.tag : cs();
3007
- return ge(b, f, u);
3008
- };
3009
- }
3010
- _e({
3011
- value: {
3012
- type: Number,
3013
- required: !0
3014
- },
3015
- format: {
3016
- type: [String, Object]
3017
- }
3018
- }, an);
3019
- _e({
3020
- value: {
3021
- type: [Number, Date],
3022
- required: !0
3023
- },
3024
- format: {
3025
- type: [String, Object]
3026
- }
3027
- }, an);
3028
- const Ao = /* @__PURE__ */ tt("global-vue-i18n");
3029
- function At(e = {}) {
3030
- const t = Yt();
3031
- if (t == null)
3032
- throw _t(it.MUST_BE_CALL_SETUP_TOP);
3033
- if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
3034
- throw _t(it.NOT_INSTALLED);
3035
- const n = Do(t), s = Po(n), a = is(t), r = Lo(e, a);
3036
- if (r === "global")
3037
- return Io(s, e, a), s;
3038
- if (r === "parent") {
3039
- let i = wo(n, t, e.__useComponent);
3040
- return i == null && (i = s), i;
3041
- }
3042
- const c = n;
3043
- let p = c.__getInstance(t);
3044
- if (p == null) {
3045
- const i = _e({}, e);
3046
- "__i18n" in a && (i.__i18n = a.__i18n), s && (i.__root = s), p = No(i), c.__composerExtend && (p[Wt] = c.__composerExtend(p)), Fo(c, t, p), c.__setInstance(t, p);
3047
- }
3048
- return p;
3049
- }
3050
- function Do(e) {
3051
- const t = ps(e.isCE ? Ao : e.appContext.app.__VUE_I18N_SYMBOL__);
3052
- if (!t)
3053
- throw _t(e.isCE ? it.NOT_INSTALLED_WITH_PROVIDE : it.UNEXPECTED_ERROR);
3054
- return t;
3055
- }
3056
- function Lo(e, t) {
3057
- return Nt(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
3058
- }
3059
- function Po(e) {
3060
- return e.mode === "composition" ? e.global : e.global.__composer;
3061
- }
3062
- function wo(e, t, n = !1) {
3063
- let s = null;
3064
- const a = t.root;
3065
- let r = Uo(t, n);
3066
- for (; r != null; ) {
3067
- const c = e;
3068
- if (e.mode === "composition")
3069
- s = c.__getInstance(r);
3070
- else if (__VUE_I18N_LEGACY_API__) {
3071
- const p = c.__getInstance(r);
3072
- p != null && (s = p.__composer, n && s && !s[os] && (s = null));
3073
- }
3074
- if (s != null || a === r)
3075
- break;
3076
- r = r.parent;
3077
- }
3078
- return s;
3079
- }
3080
- function Uo(e, t = !1) {
3081
- return e == null ? null : t && e.vnode.ctx || e.parent;
3082
- }
3083
- function Fo(e, t, n) {
3084
- It(() => {
3085
- }, t), _s(() => {
3086
- const s = n;
3087
- e.__deleteInstance(t);
3088
- const a = s[Wt];
3089
- a && (a(), delete s[Wt]);
3090
- }, t);
3091
- }
3092
- To();
3093
- Qa(Pa);
3094
- Za(qa);
3095
- eo(Jn);
3096
- if (__INTLIFY_PROD_DEVTOOLS__) {
3097
- const e = Ze();
3098
- e.__INTLIFY__ = !0, wa(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
3099
- }
3100
- const Mo = {
3101
- key: 0,
3102
- class: "flex flex-col gap-8"
3103
- }, xo = { class: "flex flex-col gap-4" }, Ho = { class: "flex items-center gap-4" }, Vo = {
3104
- key: 0,
3105
- class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
3106
- }, Go = /* @__PURE__ */ Ae({
3107
- __name: "NetSuiteField",
3108
- props: {
3109
- disabled: { type: Boolean },
3110
- supplier: {},
3111
- setting: {},
3112
- items: {},
3113
- onChange: { type: Function }
3114
- },
3115
- emits: ["netsuite:ready"],
3116
- setup(e, { emit: t }) {
3117
- const n = Kn(), s = e, a = t, { t: r } = At(), c = ce(!1), p = ce();
3118
- It(() => {
3119
- var b, v, O, C;
3120
- let f = {
3121
- id: "",
3122
- subsidiary: { id: "", name: "" },
3123
- errors: []
3124
- };
3125
- if (!n.isEnabled) {
3126
- a("netsuite:ready", f);
3127
- return;
3128
- }
3129
- try {
3130
- const R = n.currentLocationSubsidiary();
3131
- s.setting ? f = {
3132
- ...s.setting,
3133
- subsidiary: {
3134
- id: R.id || "",
3135
- name: R.name
3136
- }
3137
- } : f = {
3138
- ...f,
3139
- subsidiary: {
3140
- id: R.id || "",
3141
- name: R.name
3142
- }
3143
- };
3144
- const I = n.getAvailableItems(R.id), d = s.items.filter((g) => {
3145
- if (g.measurement != null) {
3146
- const S = n.getAvailableMeasurements(
3147
- g.sku._id,
3148
- R.id
3149
- );
3150
- return I.includes(g.sku._id) && S.includes(g.measurement.id);
3151
- }
3152
- return I.includes(g.sku._id);
3153
- }).map((g) => g.sku._id);
3154
- s.onChange(
3155
- s.items.filter((g) => d.includes(g.sku._id)),
3156
- f
3157
- );
3158
- } finally {
3159
- s.supplier.internal ? p.value = n.getNetSuiteLocation(
3160
- `${s.supplier.internal}_${s.supplier._id}`
3161
- ) : p.value = n.getNetSuiteVendor(s.supplier._id);
3162
- const R = s.supplier.internal ? n.getLocationSubsidiary((b = p.value) == null ? void 0 : b.netSuiteId).id : (v = p.value) == null ? void 0 : v.subsidiaryId, I = s.supplier.internal ? (O = n.currentLocationSubsidiary()) == null ? void 0 : O.id : (C = n.currentVendorSubsidiary(s.supplier._id)) == null ? void 0 : C.id;
3163
- !n.isEnabled || R && n.isEnabled && R == I ? a("netsuite:ready", f) : c.value = !0;
3164
- }
3165
- });
3166
- const i = Q(
3167
- () => s.supplier.internal ? n.currentLocationSubsidiary() : n.currentVendorSubsidiary(s.supplier._id)
3168
- ), u = Q(() => {
3169
- var f, b;
3170
- return p.value == null ? `Cannot find the NetSuite location for "${s.supplier.name}"` : `The subsidiary of the request
3171
- location is ${(b = n.getLocationSubsidiary((f = p.value) == null ? void 0 : f.netSuiteId)) == null ? void 0 : b.fullName}`;
3172
- });
3173
- return (f, b) => {
3174
- const v = X("FmLabel"), O = X("FmIcon"), C = X("FmField"), R = X("FmTooltip");
3175
- return m(n).isEnabled ? (G(), ne("div", Mo, [
3176
- M(v, {
3177
- label: `NetSuite ${m(r)("inventory.transfer.form.netsuite.subsidiary")}`
3178
- }, null, 8, ["label"]),
3179
- L("div", xo, [
3180
- M(R, {
3181
- "z-index": 51,
3182
- placement: "left",
3183
- disabled: f.disabled
3184
- }, {
3185
- content: q(() => b[0] || (b[0] = [
3186
- Ut("This field is locked and based on the location of the request.")
3187
- ])),
3188
- default: q(() => [
3189
- M(C, null, {
3190
- default: q(() => {
3191
- var I;
3192
- return [
3193
- L("div", Ho, [
3194
- M(O, {
3195
- name: "lock_outline",
3196
- size: "sm",
3197
- color: f.disabled ? "neutral-gray-200" : "neutral-gray-400"
3198
- }, null, 8, ["color"]),
3199
- L("div", {
3200
- class: Pe([f.disabled ? "text-fm-color-typo-disabled" : ""])
3201
- }, re((I = i.value) == null ? void 0 : I.fullName), 3)
3202
- ])
3203
- ];
3204
- }),
3205
- _: 1
3206
- })
3207
- ]),
3208
- _: 1
3209
- }, 8, ["disabled"]),
3210
- c.value ? (G(), ne("div", Vo, re(u.value), 1)) : Ie("", !0)
3211
- ])
3212
- ])) : Ie("", !0);
3213
- };
3214
- }
3215
- }), Bo = { class: "flex flex-col gap-4" }, $o = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, jo = { class: "flex flex-col gap-16" }, Wo = { class: "flex flex-col gap-24" }, Yo = { class: "flex flex-col gap-8" }, Ko = { class: "flex flex-col gap-4" }, Xo = { class: "flex items-center gap-4" }, qo = { class: "flex flex-col gap-8" }, Jo = { class: "flex flex-col gap-4" }, zo = { class: "flex items-center gap-4" }, Qo = {
3216
- key: 3,
3217
- class: "p-16 border border-fm-color-neutral-gray-300 fm-corner-radius-md flex flex-col"
3218
- }, Zo = {
3219
- key: 0,
3220
- class: "flex-1 flex gap-8 h-48 xs:flex-col xs:pt-16 sm:flex-col sm:pt-16"
3221
- }, el = { class: "flex-1" }, tl = { class: "flex-1" }, nl = {
3222
- key: 1,
3223
- class: "flex items-center gap-4"
3224
- }, sl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, rl = { class: "flex flex-col gap-16" }, al = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, ol = { class: "flex gap-8" }, ll = { key: 0 }, il = /* @__PURE__ */ Ae({
3225
- __name: "TransferForm2",
3226
- props: {
3227
- modelValue: {},
3228
- request: {},
3229
- disabled: { type: Boolean },
3230
- suppliers: {},
3231
- skus: {},
3232
- lastClosingDate: {}
3233
- },
3234
- emits: ["validation-success", "form:ready"],
3235
- setup(e, { expose: t, emit: n }) {
3236
- const s = e, a = n, r = Ys(), { t: c } = et(), p = Xt(), i = Kt(), u = Kn(), f = zt(), b = St(), v = Wn(), { breakpoints: O } = Jt(), C = Q(() => O.value.xs || O.value.sm), R = Vn({
3237
- value: !1
3238
- }), I = ce(!1), d = Q(
3239
- () => {
3240
- var A;
3241
- return ((A = s.modelValue) == null ? void 0 : A.templateDoc) ?? v.templates.find((U) => U._id === r.template);
3242
- }
3243
- ), g = Q(() => r.status === "DRAFT" || !r._rev);
3244
- qe(d, (A) => {
3245
- A && g.value && (r.supplier = (A == null ? void 0 : A.purchaseOrder.supplier) ?? r.supplier);
3246
- }), It(() => {
3247
- var A;
3248
- try {
3249
- if (!r.template) return;
3250
- r.items.length || (r.items = ((A = d.value) == null ? void 0 : A.purchaseOrder.items) ?? []);
3251
- } finally {
3252
- I.value = !0;
3253
- }
3254
- }), qe([I, R], ([A, U], [oe, Re]) => {
3255
- U.value && Re.value && a("form:ready");
3256
- });
3257
- const S = Q(
3258
- () => p.currentLocation.type === ys.restaurant
3259
- );
3260
- p.watchLocation(async () => {
3261
- location && (r.supplier || (r.supplier = f.suppliers.find((A) => A) ?? r.supplier));
3262
- });
3263
- const y = Fs(), T = Gs(
3264
- () => r,
3265
- (A) => {
3266
- Object.assign(r, A);
3267
- },
3268
- !0,
3269
- !0
3270
- ), k = Q({
3271
- get() {
3272
- var A;
3273
- return typeof ((A = r == null ? void 0 : r.supplier) == null ? void 0 : A.internal) == "string" ? Te.TRANSFER : Te.PURCHASE;
3274
- },
3275
- set(A) {
3276
- var oe;
3277
- const U = typeof ((oe = r == null ? void 0 : r.supplier) == null ? void 0 : oe.internal) == "string" ? Te.TRANSFER : Te.PURCHASE;
3278
- A !== U && (r.supplier = A === Te.PURCHASE ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
3279
- }
3280
- }), h = Q(() => T.transferLocationOptions.value), V = Q({
3281
- get() {
3282
- return r.supplier._id;
3283
- },
3284
- set(A) {
3285
- T.transferLocationModel.value = A;
3286
- }
3287
- }), H = Q({
3288
- get() {
3289
- return r.remark ?? void 0;
3290
- },
3291
- set(A) {
3292
- r.remark = A;
3293
- }
3294
- }), { backdatePo: B, backdateSwitch: Z, backdateModel: $, backdateTimeModel: w } = fr({
3295
- getEffectiveAt() {
3296
- return r.effectiveAt;
3297
- },
3298
- setEffectiveAt(A) {
3299
- r.effectiveAt = A;
3300
- }
3301
- }), { comparePricesToggle: P, comparePriceFetching: le, comparePriceBySku: ye } = Dr(), fe = ce();
3302
- t({
3303
- validateInputs: () => {
3304
- var A, U;
3305
- (U = (A = fe.value) == null ? void 0 : A.validateInputs) == null || U.call(A);
3306
- },
3307
- resetInputsValidation: () => {
3308
- var A, U;
3309
- (U = (A = fe.value) == null ? void 0 : A.resetInputsValidation) == null || U.call(A);
3310
- },
3311
- resetInputs: () => {
3312
- var A, U;
3313
- (U = (A = fe.value) == null ? void 0 : A.resetInputs) == null || U.call(A);
3314
- }
3315
- });
3316
- const We = zs({
3317
- updateItem: (A) => {
3318
- r.items = r.items.map((U) => U.sku._id !== A.sku._id ? U : A);
3319
- },
3320
- deleteItem: (A) => {
3321
- r.items = r.items.filter((U) => U.sku._id !== A.sku._id);
3322
- },
3323
- get supplier() {
3324
- return r.supplier;
3325
- },
3326
- get items() {
3327
- return r.items;
3328
- },
3329
- get transferType() {
3330
- return k.value;
3331
- },
3332
- get template() {
3333
- return d.value;
3334
- },
3335
- get disabled() {
3336
- return s.disabled;
3337
- }
3338
- }), ve = Q(() => We.columnDefs.value);
3339
- function He() {
3340
- var Ee, he, Le, Ue, Ve;
3341
- const A = new Set((Le = (he = (Ee = d.value) == null ? void 0 : Ee.purchaseOrder) == null ? void 0 : he.items) == null ? void 0 : Le.map((Y) => Y.sku._id)), U = u.isEnabled ? u.getAvailableItems((Ve = (Ue = r.netSuite) == null ? void 0 : Ue.subsidiary) == null ? void 0 : Ve.id) : [], oe = A.size ? i.skus.filter((Y) => A.has(Y._id)) : i.skus, Re = u.isEnabled ? oe.filter((Y) => {
3342
- var me, de, Ne, o;
3343
- const ie = (de = (me = d.value) == null ? void 0 : me.purchaseOrder) == null ? void 0 : de.items.find(
3344
- (l) => l.sku._id === Y._id
3345
- );
3346
- if (ie != null && ie.measurement != null) {
3347
- const l = u.getAvailableMeasurements(
3348
- ie.sku._id,
3349
- (o = (Ne = r.netSuite) == null ? void 0 : Ne.subsidiary) == null ? void 0 : o.id
3350
- );
3351
- return U.includes(ie.sku._id) && l.includes(ie.measurement.id);
3352
- }
3353
- return U.includes(Y._id);
3354
- }).map((Y) => Y._id) : oe.map((Y) => Y._id), Se = oe.map(
3355
- (Y) => ({
3356
- label: Y.name,
3357
- sublabel: Y.code,
3358
- value: Y,
3359
- disabled: !Re.includes(Y._id)
3360
- })
3361
- ), De = Se.filter((Y) => {
3362
- var ie;
3363
- return (ie = r.items) == null ? void 0 : ie.find((me) => me.sku._id === Y.value._id);
3364
- }).map((Y) => Y.value);
3365
- y.open({
3366
- title: c("inventory.transfer.form.items.selectItem"),
3367
- closeButton: !0,
3368
- contentComponent: Ws,
3369
- contentComponentProps: {
3370
- modelValue: De,
3371
- items: Se,
3372
- virtualScroll: !0
3373
- },
3374
- primaryActions: {
3375
- text: c("common.confirm"),
3376
- close: !0
3377
- },
3378
- secondaryActions: {
3379
- text: c("common.close"),
3380
- close: !0,
3381
- variant: "tertiary"
3382
- }
3383
- }).onPrimary((Y) => {
3384
- const ie = r.items ?? [], me = Y.map((de) => {
3385
- var l, E;
3386
- const Ne = ie.find((F) => F.sku._id === de._id);
3387
- if (Ne)
3388
- return Ne;
3389
- const o = ((E = (l = d.value) == null ? void 0 : l.purchaseOrder.items) == null ? void 0 : E.find(
3390
- (F) => F.sku._id === de._id
3391
- )) ?? {
3392
- sku: de,
3393
- code: de.code,
3394
- name: de.name,
3395
- quantity: {
3396
- amount: 1,
3397
- precision: 0
3398
- }
3399
- };
3400
- return k.value == Te.PURCHASE && (o.totalCost = Me(
3401
- o.sku,
3402
- o.quantity,
3403
- o.measurement,
3404
- {
3405
- supplier: r.supplier
3406
- }
3407
- )), o;
3408
- });
3409
- me.sort((de, Ne) => de.sku.code.localeCompare(Ne.sku.code)), r.items = me;
3410
- });
3411
- }
3412
- function Ye(A) {
3413
- return A;
3414
- }
3415
- return (A, U) => {
3416
- var l, E;
3417
- const oe = X("FmChip"), Re = X("FmLabel"), Se = X("FmIcon"), De = X("FmField"), Ee = X("FmTooltip"), he = X("FmSelect"), Le = X("FmTextField"), Ue = X("FmTextarea"), Ve = X("FmSwitch"), Y = X("FmDatePicker"), ie = X("FmTimePicker"), me = X("FmFormGroup"), de = X("FmButton"), Ne = X("FmTable"), o = X("FmForm");
3418
- return G(), ne("div", Bo, [
3419
- L("div", $o, [
3420
- (l = s.modelValue) != null && l.template ? (G(), Oe(oe, {
3421
- key: 0,
3422
- variant: A.disabled ? "warning" : void 0,
3423
- label: `${m(c)("inventory.transfer.template.title")}: ${((E = d.value) == null ? void 0 : E.name) ?? m(c)("inventory.transfer.form.loading")}`,
3424
- icon: "summarize",
3425
- compact: ""
3426
- }, null, 8, ["variant", "label"])) : Ie("", !0),
3427
- M(oe, {
3428
- label: m(p).currentLocation.name,
3429
- icon: "storefront",
3430
- compact: ""
3431
- }, null, 8, ["label"]),
3432
- A.lastClosingDate ? (G(), Oe(oe, {
3433
- key: 1,
3434
- label: `${m(c)("inventory.transfer.form.lastClosing")}: ${m(Qt)(A.lastClosingDate)} ${m(qs)(A.lastClosingDate)}`,
3435
- icon: "calendar_month",
3436
- compact: ""
3437
- }, null, 8, ["label"])) : Ie("", !0)
3438
- ]),
3439
- M(o, {
3440
- ref_key: "formRef",
3441
- ref: fe,
3442
- class: "flex flex-col gap-32",
3443
- disabled: A.disabled,
3444
- onValidationFailed: console.log,
3445
- onValidationSuccess: U[13] || (U[13] = (F) => a("validation-success"))
3446
- }, {
3447
- default: q(() => {
3448
- var F, ee;
3449
- return [
3450
- L("div", jo, [
3451
- L("div", Wo, [
3452
- (F = s.modelValue) != null && F.template ? (G(), ne(je, { key: 0 }, [
3453
- L("div", Yo, [
3454
- M(Re, {
3455
- label: m(c)("inventory.transfer.form.type.title")
3456
- }, null, 8, ["label"]),
3457
- L("div", Ko, [
3458
- M(Ee, {
3459
- "z-index": 51,
3460
- placement: "left",
3461
- disabled: A.disabled
3462
- }, {
3463
- content: q(() => U[14] || (U[14] = [
3464
- Ut("This field is locked from template.")
3465
- ])),
3466
- default: q(() => [
3467
- M(De, null, {
3468
- default: q(() => [
3469
- L("div", Xo, [
3470
- M(Se, {
3471
- name: "lock_outline",
3472
- size: "sm",
3473
- color: A.disabled ? "neutral-gray-200" : "neutral-gray-400"
3474
- }, null, 8, ["color"]),
3475
- L("div", {
3476
- class: Pe({ "text-fm-color-typo-disabled": A.disabled })
3477
- }, re(m(c)(`inventory.transfer.form.type.${k.value.toLocaleLowerCase("en-us")}`)), 3)
3478
- ])
3479
- ]),
3480
- _: 1
3481
- })
3482
- ]),
3483
- _: 1
3484
- }, 8, ["disabled"]),
3485
- L("div", {
3486
- class: Pe([
3487
- "fm-typo-en-body-sm-400",
3488
- A.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"
3489
- ])
3490
- }, null, 2)
3491
- ])
3492
- ]),
3493
- L("div", qo, [
3494
- M(Re, {
3495
- label: k.value === m(Te).PURCHASE ? m(c)("inventory.transfer.form.purchaseFrom") : m(c)("inventory.transfer.form.transferFrom")
3496
- }, null, 8, ["label"]),
3497
- L("div", Jo, [
3498
- M(Ee, {
3499
- "z-index": 51,
3500
- placement: "left",
3501
- disabled: A.disabled
3502
- }, {
3503
- content: q(() => U[15] || (U[15] = [
3504
- Ut("This field is locked from template.")
3505
- ])),
3506
- default: q(() => [
3507
- M(De, null, {
3508
- default: q(() => {
3509
- var D;
3510
- return [
3511
- L("div", zo, [
3512
- M(Se, {
3513
- name: "lock_outline",
3514
- size: "sm",
3515
- color: A.disabled ? "neutral-gray-200" : "neutral-gray-400"
3516
- }, null, 8, ["color"]),
3517
- L("div", {
3518
- class: Pe({ "text-fm-color-typo-disabled": A.disabled })
3519
- }, re((D = h.value.find((_) => _.value === V.value)) == null ? void 0 : D.label), 3)
3520
- ])
3521
- ];
3522
- }),
3523
- _: 1
3524
- })
3525
- ]),
3526
- _: 1
3527
- }, 8, ["disabled"])
3528
- ])
3529
- ])
3530
- ], 64)) : (G(), ne(je, { key: 1 }, [
3531
- M(he, {
3532
- label: m(c)("inventory.transfer.form.type.title"),
3533
- "model-value": k.value,
3534
- "onUpdate:modelValue": U[0] || (U[0] = (D) => k.value = D),
3535
- items: [
3536
- {
3537
- label: m(c)("inventory.transfer.form.type.purchase"),
3538
- value: m(Te).PURCHASE,
3539
- disabled: !m(T).locationOptionsTypePurchase.value.length,
3540
- sublabel: m(T).locationOptionsTypePurchase.value.length ? void 0 : m(c)("inventory.transfer.form.noSupplierAvailable")
3541
- },
3542
- {
3543
- label: m(c)("inventory.transfer.form.type.transfer"),
3544
- value: m(Te).TRANSFER,
3545
- disabled: !m(T).locationOptionsTypeTransfer.value.length,
3546
- sublabel: m(T).locationOptionsTypeTransfer.value.length ? void 0 : m(c)("inventory.transfer.form.noLocationAvailable")
3547
- }
3548
- ],
3549
- rules: [m(ht)(1)(h.value)]
3550
- }, null, 8, ["label", "model-value", "items", "rules"]),
3551
- M(he, {
3552
- label: k.value === m(Te).PURCHASE ? m(c)("inventory.transfer.form.purchaseFrom") : m(c)("inventory.transfer.form.transferFrom"),
3553
- modelValue: V.value,
3554
- "onUpdate:modelValue": U[1] || (U[1] = (D) => V.value = D),
3555
- items: h.value
3556
- }, {
3557
- "menu-wrapper": q((D) => {
3558
- var _, N;
3559
- return [
3560
- M(Bs, Ft(D, {
3561
- items: h.value,
3562
- "model-value": (N = (_ = A.modelValue) == null ? void 0 : _.supplier) == null ? void 0 : N._id
3563
- }), null, 16, ["items", "model-value"])
3564
- ];
3565
- }),
3566
- _: 1
3567
- }, 8, ["label", "modelValue", "items"])
3568
- ], 64)),
3569
- M(Le, {
3570
- label: m(c)("inventory.transfer.form.reference"),
3571
- "label-mark": "optional",
3572
- modelValue: m(r).ref,
3573
- "onUpdate:modelValue": U[2] || (U[2] = (D) => m(r).ref = D)
3574
- }, null, 8, ["label", "modelValue"]),
3575
- M(Ue, {
3576
- label: m(c)("inventory.transfer.form.remark"),
3577
- "label-mark": "optional",
3578
- "max-length": 240,
3579
- modelValue: H.value,
3580
- "onUpdate:modelValue": U[3] || (U[3] = (D) => H.value = D),
3581
- class: Pe([A.disabled ? "text-fm-color-typo-disabled " : ""])
3582
- }, null, 8, ["label", "modelValue", "class"]),
3583
- I.value ? (G(), Oe(Go, {
3584
- key: 2,
3585
- disabled: A.disabled,
3586
- supplier: m(r).supplier,
3587
- setting: m(r).netSuite,
3588
- items: m(r).items,
3589
- onChange: (D, _) => {
3590
- m(r).items = D, m(r).netSuite = _;
3591
- },
3592
- "onNetsuite:ready": U[4] || (U[4] = (D) => {
3593
- R.value = !0;
3594
- })
3595
- }, null, 8, ["disabled", "supplier", "setting", "items", "onChange"])) : Ie("", !0),
3596
- m(b).enableBackdatePo ? (G(), ne("div", Qo, [
3597
- L("div", {
3598
- class: Pe([
3599
- "flex",
3600
- {
3601
- "flex-col": C.value
3602
- }
3603
- ])
3604
- }, [
3605
- M(Ve, {
3606
- modelValue: m(Z),
3607
- "onUpdate:modelValue": U[5] || (U[5] = (D) => rt(Z) ? Z.value = D : null),
3608
- label: m(c)("inventory.transfer.form.backdate.title"),
3609
- sublabel: m(c)("inventory.transfer.form.backdate.subtitle"),
3610
- "label-placement": "right",
3611
- disabled: S.value && !A.lastClosingDate || A.disabled
3612
- }, null, 8, ["modelValue", "label", "sublabel", "disabled"]),
3613
- L("div", {
3614
- class: Pe({ hidden: C.value, "w-16": !C.value })
3615
- }, null, 2),
3616
- m(Z) ? (G(), ne("div", Zo, [
3617
- L("div", el, [
3618
- M(Y, {
3619
- modelValue: m($),
3620
- "onUpdate:modelValue": U[6] || (U[6] = (D) => rt($) ? $.value = D : null)
3621
- }, null, 8, ["modelValue"])
3622
- ]),
3623
- L("div", tl, [
3624
- M(ie, {
3625
- modelValue: m(w),
3626
- "onUpdate:modelValue": U[7] || (U[7] = (D) => rt(w) ? w.value = D : null)
3627
- }, null, 8, ["modelValue"])
3628
- ])
3629
- ])) : Ie("", !0)
3630
- ], 2),
3631
- m(B) ? (G(), Oe(me, {
3632
- key: 0,
3633
- modelValue: m(B),
3634
- "onUpdate:modelValue": U[8] || (U[8] = (D) => rt(B) ? B.value = D : null),
3635
- rules: [m(As)(new Date(A.lastClosingDate), /* @__PURE__ */ new Date())]
3636
- }, null, 8, ["modelValue", "rules"])) : Ie("", !0),
3637
- S.value && !A.lastClosingDate ? (G(), ne("div", nl, [
3638
- M(Se, {
3639
- name: "error",
3640
- size: "sm",
3641
- class: "text-fm-color-typo-warning"
3642
- }),
3643
- L("span", sl, re(m(c)("inventory.transfer.form.backdate.error")), 1)
3644
- ])) : Ie("", !0)
3645
- ])) : Ie("", !0)
3646
- ])
3647
- ]),
3648
- L("div", rl, [
3649
- M(me, {
3650
- "model-value": m(r).items,
3651
- rules: [m(ht)(1)]
3652
- }, null, 8, ["model-value", "rules"]),
3653
- L("div", {
3654
- class: Pe([
3655
- "flex gap-16",
3656
- {
3657
- "flex-col items-start": C.value,
3658
- "items-center": !C.value
3659
- }
3660
- ])
3661
- }, [
3662
- L("div", al, re(m(c)("inventory.transfer.form.items.title")), 1),
3663
- L("div", ol, [
3664
- M(de, {
3665
- disabled: A.disabled,
3666
- label: m(c)("inventory.transfer.form.items.addItem"),
3667
- "prepend-icon": "add",
3668
- variant: "secondary",
3669
- "text-color": "primary",
3670
- "bg-color": "transparent",
3671
- "border-color": "primary",
3672
- onClick: U[9] || (U[9] = (D) => He()),
3673
- size: "md"
3674
- }, null, 8, ["disabled", "label"]),
3675
- m(r).template ? (G(), Oe(Ee, {
3676
- key: 0,
3677
- "z-index": 50
3678
- }, {
3679
- content: q(() => [
3680
- L("div", null, re(m(c)("inventory.transfer.form.items.forecastStock.notAvailable")), 1)
3681
- ]),
3682
- default: q(() => [
3683
- M(pn, {
3684
- "onUpdate:poItems": U[10] || (U[10] = (D) => m(r).items = D),
3685
- disabled: ""
3686
- })
3687
- ]),
3688
- _: 1
3689
- })) : (G(), Oe(pn, {
3690
- key: 1,
3691
- "onUpdate:poItems": U[11] || (U[11] = (D) => m(r).items = D),
3692
- disabled: A.disabled || !!m(r).template
3693
- }, null, 8, ["disabled"]))
3694
- ])
3695
- ], 2),
3696
- k.value === m(Te).PURCHASE && g.value && m(b).enableTotalCost && ((ee = A.modelValue) != null && ee.items.length) ? (G(), ne("div", ll, [
3697
- M(Ve, {
3698
- label: m(le) ? m(c)("inventory.transfer.form.items.fetchingData") : m(c)("inventory.transfer.form.items.comparePriceHistory"),
3699
- "prepend-icon": "compare_arrows",
3700
- "label-placement": "right",
3701
- "model-value": m(P),
3702
- "onUpdate:modelValue": U[12] || (U[12] = (D) => rt(P) ? P.value = D : null),
3703
- disabled: m(le) || A.disabled
3704
- }, null, 8, ["label", "model-value", "disabled"])
3705
- ])) : Ie("", !0),
3706
- (G(), Oe(Ne, {
3707
- "column-defs": ve.value,
3708
- "row-data": m(r).items,
3709
- key: m(r).items.map((D) => D.sku._id).join("."),
3710
- "hide-footer": "",
3711
- "page-size": m(r).items.length
3712
- }, {
3713
- "table-row": q((D) => [
3714
- M(Ur, {
3715
- "compare-price-by-sku": m(ye),
3716
- "show-compare-price": k.value === m(Te).PURCHASE && m(P),
3717
- row: D
3718
- }, null, 8, ["compare-price-by-sku", "show-compare-price", "row"])
3719
- ]),
3720
- "list-row": q((D) => [
3721
- (G(), Oe(Yn, {
3722
- row: D,
3723
- key: m(r).items.map((_) => _.sku._id).join(".")
3724
- }, {
3725
- default: q((_) => [
3726
- M(mr, {
3727
- "compare-price-by-sku": m(ye),
3728
- "show-compare-price": k.value === m(Te).PURCHASE && m(P),
3729
- row: D,
3730
- "cell-by-col-id": _
3731
- }, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "cell-by-col-id"])
3732
- ]),
3733
- _: 2
3734
- }, 1032, ["row"]))
3735
- ]),
3736
- _: 1
3737
- }, 8, ["column-defs", "row-data", "page-size"]))
3738
- ])
3739
- ];
3740
- }),
3741
- _: 1
3742
- }, 8, ["disabled", "onValidationFailed"])
3743
- ]);
3744
- };
3745
- }
3746
- }), cl = { class: "flex items-center" }, ul = { class: "fm-typo-en-title-md-800" }, dl = { class: "flex gap-4" }, pl = /* @__PURE__ */ Ae({
3747
- __name: "TransferDialog",
3748
- props: {
3749
- mode: {},
3750
- modelValue: {},
3751
- templateId: {},
3752
- show: { type: Boolean },
3753
- lastClosingDate: {}
3754
- },
3755
- emits: ["update:show", "submitted"],
3756
- setup(e, { expose: t, emit: n }) {
3757
- var $;
3758
- const s = e, a = n, r = $n(), c = Wn(), p = Ot(), i = zt(), u = Kt(), f = Xt(), b = St(), { t: v } = et(), O = ce(!1), C = ce(!1), R = ce(!1);
3759
- async function I(w) {
3760
- if (w) {
3761
- C.value = !1;
3762
- try {
3763
- await i.readSuppliers(), C.value = !0;
3764
- } catch {
3765
- p.open({
3766
- title: v("inventory.transfer.form.unableToFetchListOfSuppliers.title"),
3767
- message: v("inventory.transfer.form.unableToFetchListOfSuppliers.message"),
3768
- type: "error"
3769
- });
3770
- }
3771
- }
3772
- }
3773
- f.watchLocation(I);
3774
- function d() {
3775
- return {
3776
- remark: void 0,
3777
- ref: void 0,
3778
- stockSnapshotId: void 0,
3779
- effectiveAt: void 0,
3780
- items: [],
3781
- supplier: {
3782
- _rev: void 0,
3783
- email: void 0,
3784
- internal: void 0,
3785
- contactName: void 0,
3786
- phoneNumber: void 0,
3787
- registrationNumber: void 0,
3788
- supplyItems: void 0,
3789
- _id: "",
3790
- name: "",
3791
- address: {
3792
- line2: void 0,
3793
- line1: "",
3794
- state: "",
3795
- city: "",
3796
- postcode: "",
3797
- country: ""
3798
- }
3799
- },
3800
- status: "DRAFT",
3801
- _id: "",
3802
- seqNumber: 0,
3803
- deliveryOrder: [],
3804
- template: s.templateId,
3805
- templateDoc: c.templates.find((P) => P._id === s.templateId)
3806
- };
3807
- }
3808
- const g = Ms(s, "show"), S = ce(s.modelValue ?? d()), y = ce((($ = s.modelValue) == null ? void 0 : $._id) ?? `${Math.random()}`);
3809
- qe(
3810
- () => s.show,
3811
- (w) => {
3812
- var P;
3813
- w && (R.value = !1, S.value = s.modelValue ?? d(), y.value = ((P = s.modelValue) == null ? void 0 : P._id) ?? `${Math.random()}`);
3814
- }
3815
- );
3816
- const T = Q(() => !C.value || !R.value), k = Q(() => {
3817
- switch (s.mode) {
3818
- case ct.READ:
3819
- return "View transfer";
3820
- case ct.CREATE:
3821
- return v("inventory.transfer.receiveRequest.create.title");
3822
- case ct.UPDATE:
3823
- return v("inventory.transfer.receiveRequest.update.title");
3824
- }
3825
- return "";
3826
- }), h = ce();
3827
- t({
3828
- validateInputs: () => {
3829
- var w, P;
3830
- (P = (w = h.value) == null ? void 0 : w.validateInputs) == null || P.call(w);
3831
- },
3832
- resetInputsValidation: () => {
3833
- var w, P;
3834
- (P = (w = h.value) == null ? void 0 : w.resetInputsValidation) == null || P.call(w);
3835
- },
3836
- resetInputs: () => {
3837
- var w, P;
3838
- (P = (w = h.value) == null ? void 0 : w.resetInputs) == null || P.call(w);
3839
- }
3840
- });
3841
- async function V() {
3842
- const w = S.value;
3843
- O.value = !0, (w.supplier.internal === "warehouse" || w.supplier.internal === "restaurant") && (w.items = w.items.map(({ totalCost: P, ...le }) => le)), b.mustUseDefaultCost && (w.items = w.items.map((P) => ({
3844
- ...P,
3845
- totalCost: Me(P.sku, P.quantity, P.measurement)
3846
- })));
3847
- try {
3848
- await r.createPurchaseOrder(w), await new Promise((P) => setTimeout(P, 1e3)), p.open({
3849
- title: v("inventory.transfer.receiveRequest.create.success"),
3850
- message: v("inventory.transfer.receiveRequest.create.successMessage"),
3851
- type: "success"
3852
- }), a("update:show", !1), a("submitted");
3853
- } catch (P) {
3854
- p.open({
3855
- title: v("inventory.transfer.receiveRequest.create.error.title"),
3856
- message: v("inventory.transfer.receiveRequest.create.error.message"),
3857
- type: "error"
3858
- }), console.error("Error in creating purchase order", P);
3859
- } finally {
3860
- O.value = !1;
3861
- }
3862
- }
3863
- async function H() {
3864
- const w = S.value;
3865
- O.value = !0, (w.supplier.internal === "warehouse" || w.supplier.internal === "restaurant") && (w.items = w.items.map(({ totalCost: P, ...le }) => le)), b.mustUseDefaultCost && (w.items = w.items.map((P) => ({
3866
- ...P,
3867
- totalCost: Me(P.sku, P.quantity, P.measurement)
3868
- })));
3869
- try {
3870
- await r.updatePurchaseOrder(w), await new Promise((P) => setTimeout(P, 1e3)), p.open({
3871
- title: v("inventory.transfer.receiveRequest.update.success"),
3872
- message: v("inventory.transfer.receiveRequest.update.successMessage"),
3873
- type: "success"
3874
- }), a("update:show", !1), a("submitted");
3875
- } catch (P) {
3876
- p.open({
3877
- title: v("inventory.transfer.receiveRequest.update.error.title"),
3878
- message: v("inventory.transfer.receiveRequest.update.error.message"),
3879
- type: "error"
3880
- }), console.error("Error in updating purchase order", P);
3881
- } finally {
3882
- O.value = !1;
3883
- }
3884
- }
3885
- function B() {
3886
- switch (s.mode) {
3887
- case ct.CREATE:
3888
- return V();
3889
- case ct.UPDATE:
3890
- return H();
3891
- }
3892
- }
3893
- function Z() {
3894
- var w, P;
3895
- (P = (w = h.value) == null ? void 0 : w.validateInputs) == null || P.call(w);
3896
- }
3897
- return (w, P) => {
3898
- const le = X("FmButton"), ye = X("FmSideSheet");
3899
- return G(), Oe(ye, {
3900
- modelValue: m(g),
3901
- "onUpdate:modelValue": P[3] || (P[3] = (fe) => rt(g) ? g.value = fe : null),
3902
- "dismiss-away": "",
3903
- "close-button": "",
3904
- "max-width": 900
3905
- }, {
3906
- "side-sheet-header": q(() => [
3907
- L("div", cl, [
3908
- L("div", ul, re(k.value), 1)
3909
- ])
3910
- ]),
3911
- default: q(() => [
3912
- (G(), Oe(il, {
3913
- class: "w-full",
3914
- ref_key: "formRef",
3915
- ref: h,
3916
- "onForm:ready": P[0] || (P[0] = () => R.value = !0),
3917
- onValidationSuccess: B,
3918
- modelValue: S.value,
3919
- "onUpdate:modelValue": P[1] || (P[1] = (fe) => S.value = fe),
3920
- disabled: O.value || T.value,
3921
- suppliers: m(i).suppliers,
3922
- skus: m(u).skus,
3923
- key: y.value,
3924
- "last-closing-date": w.lastClosingDate
3925
- }, null, 8, ["modelValue", "disabled", "suppliers", "skus", "last-closing-date"]))
3926
- ]),
3927
- "side-sheet-footer": q(() => [
3928
- L("div", dl, [
3929
- M(le, {
3930
- loading: O.value,
3931
- disabled: T.value,
3932
- label: m(v)("common.save"),
3933
- onClick: Z
3934
- }, null, 8, ["loading", "disabled", "label"]),
3935
- M(le, {
3936
- disabled: T.value,
3937
- variant: "tertiary",
3938
- label: m(v)("common.close"),
3939
- onClick: P[2] || (P[2] = (fe) => a("update:show", !1))
3940
- }, null, 8, ["disabled", "label"])
3941
- ])
3942
- ]),
3943
- _: 1
3944
- }, 8, ["modelValue"]);
3945
- };
3946
- }
3947
- }), _l = { class: "flex flex-col py-8" }, ml = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, vl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, gl = {
3948
- key: 0,
3949
- class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
3950
- }, bl = { class: "pt-8" }, Hn = "ReceiveRequestViewSearchCriteria", Wl = /* @__PURE__ */ Ae({
3951
- __name: "ReceiveRequestView",
3952
- setup(e) {
3953
- const { t } = et(), n = Ot();
3954
- vt.object({
3955
- name: vt.string().optional().nullable(),
3956
- startDate: vt.string().optional().nullable(),
3957
- endDate: vt.string().optional().nullable()
3958
- });
3959
- const s = Q(
3960
- () => !b._currentLocation || u.loading.value
3961
- ), a = ws(), r = St();
3962
- function c() {
3963
- const T = {
3964
- name: "",
3965
- ...on()
3966
- }, k = a.getItem(Hn);
3967
- if (!k)
3968
- return T;
3969
- try {
3970
- return JSON.parse(k);
3971
- } catch {
3972
- return T;
3973
- }
3974
- }
3975
- function p() {
3976
- a.setItem(Hn, JSON.stringify(i.value));
3977
- }
3978
- const i = ce(c()), u = ks("receive/request", i.value), { columnDefs: f } = Is("receive/request", u), b = Xt();
3979
- async function v() {
3980
- const T = `inventory-record_${cn(i.value.startDate).format("DD-MM-YYYY_HH-mm")}-${cn(i.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, k = u.purchaseOrders.value.flatMap(
3981
- (V) => V.items.map((H) => {
3982
- const B = new Date(Ls(V._id) ?? ""), Z = V.effectiveAt ? new Date(V.effectiveAt) : void 0, $ = Xe(
3983
- Ss(H.sku, V.deliveryOrder || [])
3984
- ), w = Xe(H.quantity);
3985
- return {
3986
- "SKU code": H.code,
3987
- "SKU name": H.name,
3988
- "PO #": V.seqNumber,
3989
- "Effective at": Z,
3990
- Date: B,
3991
- Status: V.status,
3992
- Reference: V.ref ?? "",
3993
- "Received quantity": $,
3994
- "Ordered quantity": w,
3995
- Unit: H.sku.unit.abbrev,
3996
- "Total cost": H.totalCost ? qt(H.totalCost) : null
3997
- };
3998
- })
3999
- ), h = [
4000
- "SKU code",
4001
- "SKU name",
4002
- "PO #",
4003
- "Date",
4004
- "Status",
4005
- "Reference",
4006
- "Received quantity",
4007
- "Ordered quantity",
4008
- "Unit"
4009
- ];
4010
- r.enableBackdatePo && h.insert("Effective at", 4), r.enableTotalCost && h.push("Total cost"), await Ps(
4011
- [
4012
- {
4013
- name: "purchases",
4014
- data: k,
4015
- columns: h
4016
- }
4017
- ],
4018
- T
4019
- ), n.open({
4020
- title: t("inventory.transfer.receiveRequest.export.success"),
4021
- message: t("inventory.transfer.receiveRequest.export.message", [T]),
4022
- type: "success"
4023
- });
4024
- }
4025
- const O = ce(on()), C = ce("");
4026
- qe([() => O.value], ([T]) => {
4027
- !T.startDate || !T.endDate || (i.value.startDate = T.startDate, i.value.endDate = T.endDate, u.updateDateRange(
4028
- i.value.startDate,
4029
- i.value.endDate
4030
- ), p());
4031
- }), qe([() => C.value], () => {
4032
- p();
4033
- });
4034
- function R(T) {
4035
- if (T === "create") {
4036
- if (s.value) {
4037
- n.open({
4038
- title: "Loading data...",
4039
- message: "Please wait.",
4040
- type: "info"
4041
- });
4042
- return;
4043
- }
4044
- return u.promptCreateTransferDialog();
4045
- }
4046
- if (T === "refresh")
4047
- return u.fetchData();
4048
- if (T === "export")
4049
- return v();
4050
- }
4051
- const { breakpoints: I } = Jt(), d = Q(() => I.value.xs || I.value.sm), g = Q(() => d.value ? 10 : 20), S = Es(), y = Q(() => [
4052
- {
4053
- label: t("inventory.transfer.receiveRequest.actions.create"),
4054
- value: "create",
4055
- isPrimary: !0,
4056
- prependIcon: "add"
4057
- },
4058
- {
4059
- label: t("common.refresh"),
4060
- value: "refresh"
4061
- },
4062
- {
4063
- label: t("common.export"),
4064
- value: "export"
4065
- }
4066
- ]);
4067
- return (T, k) => {
4068
- const h = X("FmTable");
4069
- return G(), Oe(hs, {
4070
- title: m(t)("inventory.transfer.receiveRequest.title2"),
4071
- actions: y.value,
4072
- "onClick:action": R
4073
- }, {
4074
- default: q(() => {
4075
- var V;
4076
- return [
4077
- L("div", {
4078
- class: Pe([
4079
- "flex flex-col gap-8 max-h-full",
4080
- {
4081
- "p-0": d.value,
4082
- "px-24 ": !d.value
4083
- }
4084
- ])
4085
- }, [
4086
- M(Ts, {
4087
- "date-range-query": "",
4088
- "date-range": O.value,
4089
- "onUpdate:dateRange": k[0] || (k[0] = (H) => O.value = H),
4090
- searchable: "",
4091
- "change-location": "",
4092
- search: C.value,
4093
- "onUpdate:search": k[1] || (k[1] = (H) => C.value = H)
4094
- }, null, 8, ["date-range", "search"]),
4095
- (G(), Oe(h, {
4096
- style: Gn(m(S).tableHeight),
4097
- "column-defs": m(f),
4098
- "row-data": m(u).purchaseOrders.value,
4099
- "search-value": C.value,
4100
- loading: s.value,
4101
- onRowClick: k[2] || (k[2] = (H) => m(u).promptShowTransferDetails(H.original)),
4102
- key: (V = m(b)._currentLocation) == null ? void 0 : V.dbName,
4103
- "page-size": g.value
4104
- }, {
4105
- "list-row": q((H) => [
4106
- M(Yn, {
4107
- row: H,
4108
- onRowClick: m(u).promptShowTransferDetails
4109
- }, {
4110
- default: q((B) => {
4111
- var Z, $, w, P, le, ye, fe, We, ve, He, Ye, A, U, oe, Re, Se, De, Ee, he, Le;
4112
- return [
4113
- L("div", _l, [
4114
- L("div", ml, [
4115
- M(m(xe), {
4116
- render: (w = ($ = (Z = B._id) == null ? void 0 : Z.column) == null ? void 0 : $.columnDef) == null ? void 0 : w.cell,
4117
- props: (le = (P = B._id) == null ? void 0 : P.getContext) == null ? void 0 : le.call(P)
4118
- }, null, 8, ["render", "props"])
4119
- ]),
4120
- L("div", fl, [
4121
- M(m(xe), {
4122
- render: (We = (fe = (ye = B.supplier_name) == null ? void 0 : ye.column) == null ? void 0 : fe.columnDef) == null ? void 0 : We.cell,
4123
- props: (He = (ve = B.supplier_name) == null ? void 0 : ve.getContext) == null ? void 0 : He.call(ve)
4124
- }, null, 8, ["render", "props"])
4125
- ]),
4126
- L("div", vl, re(H.original.items.map((Ue) => `${Ue.name}`).join(", ")), 1),
4127
- H.original.ref ? (G(), ne("div", gl, [
4128
- M(m(xe), {
4129
- render: (U = (A = (Ye = B.ref) == null ? void 0 : Ye.column) == null ? void 0 : A.columnDef) == null ? void 0 : U.cell,
4130
- props: (Re = (oe = B.ref) == null ? void 0 : oe.getContext) == null ? void 0 : Re.call(oe)
4131
- }, null, 8, ["render", "props"])
4132
- ])) : Ie("", !0),
4133
- L("div", bl, [
4134
- M(m(xe), {
4135
- render: (Ee = (De = (Se = B.status) == null ? void 0 : Se.column) == null ? void 0 : De.columnDef) == null ? void 0 : Ee.cell,
4136
- props: (Le = (he = B.status) == null ? void 0 : he.getContext) == null ? void 0 : Le.call(he)
4137
- }, null, 8, ["render", "props"])
4138
- ])
4139
- ])
4140
- ];
4141
- }),
4142
- _: 2
4143
- }, 1032, ["row", "onRowClick"])
4144
- ]),
4145
- _: 1
4146
- }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
4147
- ], 2),
4148
- (G(), Oe(vs, { to: "body" }, [
4149
- M(pl, Ft(m(u).transferDialogProps.value, {
4150
- onSubmitted: m(u).fetchData
4151
- }), null, 16, ["onSubmitted"]),
4152
- M(Os, Ft(m(u).transferDetailsProps.value, {
4153
- onSubmitted: m(u).fetchData
4154
- }), null, 16, ["onSubmitted"])
4155
- ]))
4156
- ];
4157
- }),
4158
- _: 1
4159
- }, 8, ["title", "actions"]);
4160
- };
4161
- }
4162
- });
4163
- export {
4164
- Wl as default
4165
- };