@feedmepos/mf-inventory-portal 0.0.25-dev.43 → 0.0.25-dev.45

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 (48) hide show
  1. package/dist/{App-DXrm29Xt.js → App-pkjhXf9g.js} +2 -2
  2. package/dist/{ApprovalView-CdkO81D-.js → ApprovalView-1a_56XYs.js} +2 -2
  3. package/dist/{BindingsDialog-C3LDf8O0.js → BindingsDialog-DLu9QHGD.js} +2 -2
  4. package/dist/{BindingsPicker-WoF8gzVL.js → BindingsPicker-DXmMOIwl.js} +1 -1
  5. package/dist/{BindingsTable-BiMt6dtC.js → BindingsTable-CAUD4hZv.js} +1 -1
  6. package/dist/{ClosingDraftView-DoQT7i-e.js → ClosingDraftView-DdooG5iI.js} +2 -2
  7. package/dist/{ClosingTemplateView-BQTlHSOP.js → ClosingTemplateView-BD4XHuGK.js} +2 -2
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BsNSEdH_.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CX6E3y7e.js} +3 -3
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-EAfn_gI2.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DMBch-HK.js} +1 -1
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bt0MPl6I.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bf416BWy.js} +1 -1
  11. package/dist/{IngredientGroupView-KPqbuUdq.js → IngredientGroupView-D8dTmPiL.js} +1 -1
  12. package/dist/{IngredientsView-btkrzfUb.js → IngredientsView-BqwnH9Ae.js} +4 -4
  13. package/dist/{IntegrationView-CPganv5I.js → IntegrationView-B9ihVgaE.js} +1 -1
  14. package/dist/{InventoryBindingForm-Cm69z42D.js → InventoryBindingForm-7RQ9q3SN.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-ByzbgoCW.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bdmd5l0w.js} +3 -3
  16. package/dist/{InventoryBindingSummary-C7EeAVAs.js → InventoryBindingSummary-CSF2fzjd.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CtfmvGMA.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dv-SSF1r.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-6RHBNS7-.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DyDwJIAd.js} +1 -1
  19. package/dist/{PublishView-C7s9DTwV.js → PublishView-DZwVo4uk.js} +2 -2
  20. package/dist/{PurchaseOrderPrintPreview-Bp8w6vni.js → PurchaseOrderPrintPreview-CnxE4Wfw.js} +1 -1
  21. package/dist/{ReceiveRequestView-VMEuhH5P.js → ReceiveRequestView-zFdXAq6L.js} +9 -9
  22. package/dist/{RecipeView-Dh0WI3gA.js → RecipeView-C2DZ6M6k.js} +3 -3
  23. package/dist/{StockView-CQziShwK.js → StockView-DFM-trvP.js} +7 -7
  24. package/dist/{SupplierView-BnXohTy2.js → SupplierView-DHffdoW_.js} +4 -4
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DseAaTbl.js +1615 -0
  26. package/dist/{TransferTemplateView-BNIFmGRO.js → TransferTemplateView-CHZPysze.js} +7 -7
  27. package/dist/{UnitView-B0QQr63Q.js → UnitView-Dk6PMBes.js} +3 -3
  28. package/dist/{WarehouseView-COD-NsAu.js → WarehouseView-7NkgjnAg.js} +1 -1
  29. package/dist/api/purchase-order.d.ts +1 -0
  30. package/dist/{app-Bs9204PI.js → app-1AEJE-GS.js} +16039 -14584
  31. package/dist/app.js +1 -1
  32. package/dist/{decimal-Cwq4YmHr.js → decimal-DDfoHLmD.js} +1 -1
  33. package/dist/{feature-aOw02w8c.js → feature-Dpqq9nbO.js} +107 -99
  34. package/dist/{format-unit-display-B0097Dbk.js → format-unit-display-RiOciSmt.js} +2 -2
  35. package/dist/{index-DIrzS8cU.js → index-CKWrNwz7.js} +2 -2
  36. package/dist/{stock-DqesOQBC.js → stock-Dulvtkjj.js} +1 -1
  37. package/dist/stores/feature.d.ts +4 -1
  38. package/dist/{supplier-BGNg5AzJ.js → supplier-DAIl-nmu.js} +1 -1
  39. package/dist/tsconfig.app.tsbuildinfo +1 -1
  40. package/dist/{use-ingredient-select-dialog-B3WOWtBJ.js → use-ingredient-select-dialog-C5P_xPWH.js} +1 -1
  41. package/dist/{use-inventory-binding-dialog-CTu19_Bj.js → use-inventory-binding-dialog-DrwdGL7H.js} +1 -1
  42. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +2 -2
  43. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +18 -0
  44. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +7 -7
  45. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +6 -6
  46. package/dist/{vue-i18n-uf0PuoRa.js → vue-i18n-uuPt2QY7.js} +2 -2
  47. package/package.json +3 -3
  48. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DCjg5ptE.js +0 -1564
package/dist/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { aZ as s, a_ as e, a$ as o, aY as t, b0 as i, a as m } from "./app-Bs9204PI.js";
2
+ import { aZ as s, a_ as e, a$ as o, aY as t, b0 as i, a as m } from "./app-1AEJE-GS.js";
3
3
  export {
4
4
  s as FmApp,
5
5
  e as InventoryBindingForm,
@@ -1,4 +1,4 @@
1
- import "./app-Bs9204PI.js";
1
+ import "./app-1AEJE-GS.js";
2
2
  function m(a) {
3
3
  function t(o, n = !0) {
4
4
  const e = Math.round(Math.log10(o));
@@ -1,14 +1,14 @@
1
1
  var fe = Object.defineProperty;
2
2
  var pe = (p, l, v) => l in p ? fe(p, l, { enumerable: !0, configurable: !0, writable: !0, value: v }) : p[l] = v;
3
- var ct = (p, l, v) => pe(p, typeof l != "symbol" ? l + "" : l, v);
4
- import { useCoreStore as ht } from "@feedmepos/mf-common";
5
- import { a4 as vt, u as Dt, aG as re, a as ye } from "./app-Bs9204PI.js";
3
+ var ht = (p, l, v) => pe(p, typeof l != "symbol" ? l + "" : l, v);
4
+ import { useCoreStore as vt } from "@feedmepos/mf-common";
5
+ import { a4 as dt, u as Dt, aG as re, a as ye } from "./app-1AEJE-GS.js";
6
6
  import { ref as gt, readonly as Kt } from "vue";
7
7
  var Gt = { exports: {} };
8
8
  (function(p, l) {
9
9
  (function(v, d) {
10
10
  d(l);
11
- })(vt, function(v) {
11
+ })(dt, function(v) {
12
12
  var d = { getItemSync: function(a) {
13
13
  try {
14
14
  return localStorage.getItem(a) || null;
@@ -159,7 +159,7 @@ var Gt = { exports: {} };
159
159
  Object.keys(e || {}).includes(i) || t.push(i);
160
160
  }), Object.keys(t).length ? t : null;
161
161
  }
162
- var E, g;
162
+ var F, g;
163
163
  function y(a, e, t) {
164
164
  var i = "shortString", n = !0;
165
165
  typeof t == "number" && (i = "javaDouble", n = !1), a[i] = a[i] || {}, a[i][e] = n ? t + "" : t;
@@ -178,26 +178,26 @@ var Gt = { exports: {} };
178
178
  }
179
179
  (function(a) {
180
180
  a.NONE = "NONE", a.DEFAULT_FLAGS = "DEFAULT_FLAGS", a.CACHE = "CACHE", a.SERVER = "SERVER";
181
- })(E || (E = {}));
182
- var Y, T = null, ce = "FLAGSMITH_EVENT", lt = ce, Vt = "https://edge.api.flagsmith.com/api/v1/", Mt = "flagsmith_value_", Bt = "flagsmith_enabled_", zt = "flagsmith_trait_", he = function() {
181
+ })(F || (F = {}));
182
+ var Y, T = null, ce = "FLAGSMITH_EVENT", ut = ce, Jt = "https://edge.api.flagsmith.com/api/v1/", Mt = "flagsmith_value_", Bt = "flagsmith_enabled_", zt = "flagsmith_trait_", he = function() {
183
183
  function a(e) {
184
184
  var t = this;
185
185
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
186
186
  var i = t, n = i.api, r = i.evaluationContext;
187
187
  t.log("Get Flags"), t.isLoading = !0, t.loadingState.isFetching || t.setLoadingState(o(o({}, t.loadingState), { isFetching: !0 }));
188
188
  var s = "".concat(t.getContext().identity), c = function(h) {
189
- var f, u, m, F;
189
+ var f, u, m, w;
190
190
  if (h && s === "".concat(t.getContext().identity)) {
191
191
  var D = h.flags, A = h.traits, k = h.identifier;
192
192
  t.isLoading = !1;
193
- var j = {}, N = {};
193
+ var j = {}, P = {};
194
194
  A = A || [], (D = D || []).forEach(function(S) {
195
195
  j[S.feature.name.toLowerCase().replace(/ /g, "_")] = { id: S.feature.id, enabled: S.enabled, value: S.feature_state_value };
196
196
  }), A.forEach(function(S) {
197
- N[S.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: S.transient, value: S.trait_value };
197
+ P[S.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: S.transient, value: S.trait_value };
198
198
  }), t.oldFlags = o({}, t.flags);
199
- var K = _(t.oldFlags, j), nt = _((f = t.evaluationContext.identity) === null || f === void 0 ? void 0 : f.traits, N);
200
- if ((k || Object.keys(N).length) && (t.evaluationContext.identity = o(o({}, t.evaluationContext.identity), { traits: N }), k && (t.evaluationContext.identity.identifier = k)), t.flags = j, t.updateStorage(), t._onChange(t.oldFlags, { isFromServer: !0, flagsChanged: K, traitsChanged: nt }, t._loadedState(null, E.SERVER)), t.datadogRum) try {
199
+ var K = _(t.oldFlags, j), nt = _((f = t.evaluationContext.identity) === null || f === void 0 ? void 0 : f.traits, P);
200
+ if ((k || Object.keys(P).length) && (t.evaluationContext.identity = o(o({}, t.evaluationContext.identity), { traits: P }), k && (t.evaluationContext.identity.identifier = k)), t.flags = j, t.updateStorage(), t._onChange(t.oldFlags, { isFromServer: !0, flagsChanged: K, traitsChanged: nt }, t._loadedState(null, F.SERVER)), t.datadogRum) try {
201
201
  if (t.datadogRum.trackTraits) {
202
202
  var it = {};
203
203
  Object.keys(((u = t.evaluationContext.identity) === null || u === void 0 ? void 0 : u.traits) || {}).map(function(S) {
@@ -210,12 +210,12 @@ var Gt = { exports: {} };
210
210
  console.error(S);
211
211
  }
212
212
  if (t.dtrum) try {
213
- var w = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
213
+ var O = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
214
214
  Object.keys(t.flags).map(function(S) {
215
- y(w, Mt + S, t.getValue(S, { skipAnalytics: !0 })), y(w, Bt + S, t.hasFeature(S, { skipAnalytics: !0 }));
216
- }), Object.keys(((F = t.evaluationContext.identity) === null || F === void 0 ? void 0 : F.traits) || {}).map(function(S) {
217
- y(w, zt + S, t.getTrait(S));
218
- }), t.log("Sending javaLongOrObject traits to dynatrace", w.javaLongOrObject), t.log("Sending date traits to dynatrace", w.date), t.log("Sending shortString traits to dynatrace", w.shortString), t.log("Sending javaDouble to dynatrace", w.javaDouble), t.dtrum.sendSessionProperties(w.javaLongOrObject, w.date, w.shortString, w.javaDouble);
215
+ y(O, Mt + S, t.getValue(S, { skipAnalytics: !0 })), y(O, Bt + S, t.hasFeature(S, { skipAnalytics: !0 }));
216
+ }), Object.keys(((w = t.evaluationContext.identity) === null || w === void 0 ? void 0 : w.traits) || {}).map(function(S) {
217
+ y(O, zt + S, t.getTrait(S));
218
+ }), t.log("Sending javaLongOrObject traits to dynatrace", O.javaLongOrObject), t.log("Sending date traits to dynatrace", O.date), t.log("Sending shortString traits to dynatrace", O.shortString), t.log("Sending javaDouble to dynatrace", O.javaDouble), t.dtrum.sendSessionProperties(O.javaLongOrObject, O.date, O.shortString, O.javaDouble);
219
219
  } catch (S) {
220
220
  console.error(S);
221
221
  }
@@ -244,7 +244,7 @@ var Gt = { exports: {} };
244
244
  }).catch(function(n) {
245
245
  t.log("Exception fetching evaluationEvent", n);
246
246
  }) : void 0;
247
- }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: E.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(i, n, r) {
247
+ }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: F.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(i, n, r) {
248
248
  var s = t.flags && t.flags[i.toLowerCase().replace(/ /g, "_")], c = null;
249
249
  if (s && (c = s.value), n != null && n.skipAnalytics || r || t.evaluateFlag(i, "VALUE"), c === null && (n == null ? void 0 : n.fallback) !== void 0) return n.fallback;
250
250
  if (n != null && n.json) try {
@@ -292,20 +292,20 @@ var Gt = { exports: {} };
292
292
  t.evaluationContext.environment && (f.headers["X-Environment-Key"] = t.evaluationContext.environment.apiKey), n && n !== "GET" && (f.headers["Content-Type"] = "application/json; charset=utf-8"), h && Object.assign(f.headers, h), g || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
293
293
  var u = "".concat((s = t.evaluationContext.identity) === null || s === void 0 ? void 0 : s.identifier);
294
294
  return g(i, f).then(function(m) {
295
- var F, D, A = "".concat((F = t.evaluationContext.identity) === null || F === void 0 ? void 0 : F.identifier);
295
+ var w, D, A = "".concat((w = t.evaluationContext.identity) === null || w === void 0 ? void 0 : w.identifier);
296
296
  if (u === A) {
297
297
  var k = (D = m.headers) === null || D === void 0 ? void 0 : D.get("x-flagsmith-document-updated-at");
298
298
  if (k) try {
299
299
  var j = parseFloat(k);
300
300
  if (isNaN(j)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
301
301
  t.timestamp = j;
302
- } catch (N) {
303
- t.log(N, "Failed to parse x-flagsmith-document-updated-at", k);
302
+ } catch (P) {
303
+ t.log(P, "Failed to parse x-flagsmith-document-updated-at", k);
304
304
  }
305
- return t.log("Fetch response: " + m.status + " " + (n || "GET") + 0 + i), m.text().then(function(N) {
306
- var K = N;
305
+ return t.log("Fetch response: " + m.status + " " + (n || "GET") + 0 + i), m.text().then(function(P) {
306
+ var K = P;
307
307
  try {
308
- K = JSON.parse(N);
308
+ K = JSON.parse(P);
309
309
  } catch {
310
310
  }
311
311
  return !K && m.status && (K = "API Response: ".concat(m.status)), m.status && m.status >= 200 && m.status < 300 ? K : Promise.reject(new Error(K));
@@ -322,36 +322,36 @@ var Gt = { exports: {} };
322
322
  }, this._onChange = function(i, n, r) {
323
323
  var s, c;
324
324
  t.setLoadingState(r), (s = t.onChange) === null || s === void 0 || s.call(t, i, n, t.loadingState), (c = t._trigger) === null || c === void 0 || c.call(t);
325
- }, g = e.fetch ? e.fetch : typeof fetch < "u" ? fetch : vt === null || vt === void 0 ? void 0 : vt.fetch, this.canUseStorage = typeof window < "u" || !!e.browserlessStorage, this.log("Constructing flagsmith instance " + e), e.eventSource && (Y = e.eventSource), e.AsyncStorage && (T = e.AsyncStorage);
325
+ }, g = e.fetch ? e.fetch : typeof fetch < "u" ? fetch : dt === null || dt === void 0 ? void 0 : dt.fetch, this.canUseStorage = typeof window < "u" || !!e.browserlessStorage, this.log("Constructing flagsmith instance " + e), e.eventSource && (Y = e.eventSource), e.AsyncStorage && (T = e.AsyncStorage);
326
326
  }
327
327
  return a.prototype.init = function(e) {
328
328
  var t, i, n;
329
329
  return x(this, void 0, void 0, function() {
330
- var r, s, c, h, f, u, m, F, D, A, k, j, N, K, nt, it, Z, w, S, pt, at, Zt, Q, yt, Qt, te, mt, ee, St, rt, tt, ne, O = this;
330
+ var r, s, c, h, f, u, m, w, D, A, k, j, P, K, nt, it, Z, O, S, pt, at, Zt, Q, yt, Qt, te, mt, ee, St, rt, tt, ne, I = this;
331
331
  return M(this, function(U) {
332
332
  switch (U.label) {
333
333
  case 0:
334
334
  r = z(e.evaluationContext || this.evaluationContext), U.label = 1;
335
335
  case 1:
336
- if (U.trys.push([1, 13, , 14]), s = e.environmentID, c = e.api, h = c === void 0 ? Vt : c, f = e.headers, u = e.onChange, m = e.cacheFlags, F = e.datadogRum, D = e.onError, A = e.defaultFlags, k = e.fetch, j = e.preventFetch, N = e.enableLogs, K = e.enableDynatrace, nt = e.enableAnalytics, it = e.realtime, Z = e.eventSourceUrl, w = Z === void 0 ? "https://realtime.flagsmith.com/" : Z, S = e.AsyncStorage, pt = e.identity, at = e.traits, Zt = e.state, Q = e.cacheOptions, yt = e.angularHttpClient, Qt = e._trigger, te = e._triggerLoadingState, r.environment = s ? { apiKey: s } : r.environment, !r.environment || !r.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
337
- if (r.identity = pt || at ? { identifier: pt, traits: at ? Object.fromEntries(Object.entries(at).map(function(P) {
338
- return [P[0], { value: P[1] }];
339
- })) : {} } : r.identity, this.evaluationContext = r, this.api = h, this.headers = f, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = u, mt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Qt || this._trigger, this._triggerLoadingState = te || this._triggerLoadingState, this.onError = function(P) {
340
- O.setLoadingState(o(o({}, O.loadingState), { isFetching: !1, isLoading: !1, error: P })), D == null || D(P);
341
- }, this.enableLogs = N || !1, this.cacheOptions = Q ? { skipAPI: !!Q.skipAPI, ttl: Q.ttl || 0, storageKey: Q.storageKey, loadStale: !!Q.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), k && (g = k), this.enableAnalytics = nt || !1, this.flags = Object.assign({}, A) || {}, this.datadogRum = F || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = T !== void 0 && !!m, lt = "FLAGSMITH_EVENT_" + r.environment.apiKey, S && (T = S), it && typeof window < "u" && this.setupRealtime(w, r.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = o(o({}, this.loadingState), { isLoading: !1, source: E.DEFAULT_FLAGS })), this.setState(Zt), this.log("Initialising with properties", e, this), K && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), yt && (g = /* @__PURE__ */ function(P) {
342
- return function(G, J) {
343
- var H = J.headers, b = J.method, et = J.body;
336
+ if (U.trys.push([1, 13, , 14]), s = e.environmentID, c = e.api, h = c === void 0 ? Jt : c, f = e.headers, u = e.onChange, m = e.cacheFlags, w = e.datadogRum, D = e.onError, A = e.defaultFlags, k = e.fetch, j = e.preventFetch, P = e.enableLogs, K = e.enableDynatrace, nt = e.enableAnalytics, it = e.realtime, Z = e.eventSourceUrl, O = Z === void 0 ? "https://realtime.flagsmith.com/" : Z, S = e.AsyncStorage, pt = e.identity, at = e.traits, Zt = e.state, Q = e.cacheOptions, yt = e.angularHttpClient, Qt = e._trigger, te = e._triggerLoadingState, r.environment = s ? { apiKey: s } : r.environment, !r.environment || !r.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
337
+ if (r.identity = pt || at ? { identifier: pt, traits: at ? Object.fromEntries(Object.entries(at).map(function(N) {
338
+ return [N[0], { value: N[1] }];
339
+ })) : {} } : r.identity, this.evaluationContext = r, this.api = h, this.headers = f, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = u, mt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Qt || this._trigger, this._triggerLoadingState = te || this._triggerLoadingState, this.onError = function(N) {
340
+ I.setLoadingState(o(o({}, I.loadingState), { isFetching: !1, isLoading: !1, error: N })), D == null || D(N);
341
+ }, this.enableLogs = P || !1, this.cacheOptions = Q ? { skipAPI: !!Q.skipAPI, ttl: Q.ttl || 0, storageKey: Q.storageKey, loadStale: !!Q.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), k && (g = k), this.enableAnalytics = nt || !1, this.flags = Object.assign({}, A) || {}, this.datadogRum = w || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = T !== void 0 && !!m, ut = "FLAGSMITH_EVENT_" + r.environment.apiKey, S && (T = S), it && typeof window < "u" && this.setupRealtime(O, r.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = o(o({}, this.loadingState), { isLoading: !1, source: F.DEFAULT_FLAGS })), this.setState(Zt), this.log("Initialising with properties", e, this), K && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), yt && (g = /* @__PURE__ */ function(N) {
342
+ return function(G, V) {
343
+ var H = V.headers, b = V.method, et = V.body;
344
344
  return new Promise(function(q) {
345
345
  switch (b) {
346
346
  case "GET":
347
- return P.get(G, { headers: H }).subscribe(function(B) {
347
+ return N.get(G, { headers: H }).subscribe(function(B) {
348
348
  q({ ok: !0, text: function() {
349
349
  return Promise.resolve(B);
350
350
  } });
351
351
  });
352
352
  case "POST":
353
353
  case "PUT":
354
- return P.post(G, et, { headers: H }).subscribe(function(B) {
354
+ return N.post(G, et, { headers: H }).subscribe(function(B) {
355
355
  q({ ok: !0, text: function() {
356
356
  return Promise.resolve(B);
357
357
  } });
@@ -359,33 +359,33 @@ var Gt = { exports: {} };
359
359
  }
360
360
  });
361
361
  };
362
- }(yt)), T && this.canUseStorage && T.getItem(lt).then(function(P) {
362
+ }(yt)), T && this.canUseStorage && T.getItem(ut).then(function(N) {
363
363
  try {
364
- O.evaluationEvent = JSON.parse(P) || {};
364
+ I.evaluationEvent = JSON.parse(N) || {};
365
365
  } catch {
366
- O.evaluationEvent = {};
366
+ I.evaluationEvent = {};
367
367
  }
368
- O.analyticsInterval = setInterval(O.analyticsFlags, O.ticks);
369
- }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), T && this.canUseStorage && T.getItem(lt, function(P, G) {
370
- if (G && O.evaluationContext.environment) {
371
- var J = JSON.parse(G);
372
- if (J[O.evaluationContext.environment.apiKey]) {
373
- var H = O.getState();
374
- O.log("Retrieved events from cache", G), O.setState(o(o({}, H), { evaluationEvent: J[O.evaluationContext.environment.apiKey] }));
368
+ I.analyticsInterval = setInterval(I.analyticsFlags, I.ticks);
369
+ }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), T && this.canUseStorage && T.getItem(ut, function(N, G) {
370
+ if (G && I.evaluationContext.environment) {
371
+ var V = JSON.parse(G);
372
+ if (V[I.evaluationContext.environment.apiKey]) {
373
+ var H = I.getState();
374
+ I.log("Retrieved events from cache", G), I.setState(o(o({}, H), { evaluationEvent: V[I.evaluationContext.environment.apiKey] }));
375
375
  }
376
376
  }
377
377
  })), !m) return [3, 9];
378
378
  if (!T || !this.canUseStorage) return [3, 8];
379
- ee = function(P, G) {
380
- return x(O, void 0, void 0, function() {
381
- var J, H, b, et, q, B, bt, ie, Ct, _t, xt, Et, Ft, wt, Ot, It, Tt, Lt, At, jt, Nt, Pt, Rt, kt, ae = this;
379
+ ee = function(N, G) {
380
+ return x(I, void 0, void 0, function() {
381
+ var V, H, b, et, q, B, bt, ie, Ct, _t, xt, Et, Ft, wt, Ot, It, Tt, Lt, At, jt, Pt, Nt, Rt, kt, ae = this;
382
382
  return M(this, function($) {
383
383
  switch ($.label) {
384
384
  case 0:
385
385
  if (!G) return [3, 7];
386
- J = null, H = null, $.label = 1;
386
+ V = null, H = null, $.label = 1;
387
387
  case 1:
388
- return $.trys.push([1, 5, , 6]), b = JSON.parse(G), et = !1, q = !1, b && b.api === this.api && ((_t = (Ct = b.evaluationContext) === null || Ct === void 0 ? void 0 : Ct.environment) === null || _t === void 0 ? void 0 : _t.apiKey) === ((xt = this.evaluationContext.environment) === null || xt === void 0 ? void 0 : xt.apiKey) && (B = !0, this.evaluationContext.identity && ((Ft = (Et = b.evaluationContext) === null || Et === void 0 ? void 0 : Et.identity) === null || Ft === void 0 ? void 0 : Ft.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Ot = (wt = b.evaluationContext) === null || wt === void 0 ? void 0 : wt.identity) === null || Ot === void 0 ? void 0 : Ot.identifier) + " to " + this.evaluationContext.identity.identifier), B = !1), this.cacheOptions.ttl && (!b.ts || (/* @__PURE__ */ new Date()).valueOf() - b.ts > this.cacheOptions.ttl) && (b.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + b.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - b.ts) + "ms"), B = !1) : b.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + b.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - b.ts) + "ms"), q = !0, B = !0)), B && (et = !0, H = _((It = this.evaluationContext.identity) === null || It === void 0 ? void 0 : It.traits, (Lt = (Tt = b.evaluationContext) === null || Tt === void 0 ? void 0 : Tt.identity) === null || Lt === void 0 ? void 0 : Lt.traits), J = _(this.flags, b.flags), this.setState(o(o({}, b), { evaluationContext: z(o(o({}, b.evaluationContext), { identity: !((At = b.evaluationContext) === null || At === void 0) && At.identity ? o(o({}, (jt = b.evaluationContext) === null || jt === void 0 ? void 0 : jt.identity), { traits: o(o({}, ((Pt = (Nt = b.evaluationContext) === null || Nt === void 0 ? void 0 : Nt.identity) === null || Pt === void 0 ? void 0 : Pt.traits) || {}), at || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", b))), et ? (bt = !j && (!this.cacheOptions.skipAPI || q), this._onChange(null, { isFromServer: !1, flagsChanged: J, traitsChanged: H }, this._loadedState(null, E.CACHE, bt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && et && !q && this.log("Skipping API, using cache"), bt && this.getFlags().catch(function(ge) {
388
+ return $.trys.push([1, 5, , 6]), b = JSON.parse(G), et = !1, q = !1, b && b.api === this.api && ((_t = (Ct = b.evaluationContext) === null || Ct === void 0 ? void 0 : Ct.environment) === null || _t === void 0 ? void 0 : _t.apiKey) === ((xt = this.evaluationContext.environment) === null || xt === void 0 ? void 0 : xt.apiKey) && (B = !0, this.evaluationContext.identity && ((Ft = (Et = b.evaluationContext) === null || Et === void 0 ? void 0 : Et.identity) === null || Ft === void 0 ? void 0 : Ft.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Ot = (wt = b.evaluationContext) === null || wt === void 0 ? void 0 : wt.identity) === null || Ot === void 0 ? void 0 : Ot.identifier) + " to " + this.evaluationContext.identity.identifier), B = !1), this.cacheOptions.ttl && (!b.ts || (/* @__PURE__ */ new Date()).valueOf() - b.ts > this.cacheOptions.ttl) && (b.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + b.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - b.ts) + "ms"), B = !1) : b.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + b.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - b.ts) + "ms"), q = !0, B = !0)), B && (et = !0, H = _((It = this.evaluationContext.identity) === null || It === void 0 ? void 0 : It.traits, (Lt = (Tt = b.evaluationContext) === null || Tt === void 0 ? void 0 : Tt.identity) === null || Lt === void 0 ? void 0 : Lt.traits), V = _(this.flags, b.flags), this.setState(o(o({}, b), { evaluationContext: z(o(o({}, b.evaluationContext), { identity: !((At = b.evaluationContext) === null || At === void 0) && At.identity ? o(o({}, (jt = b.evaluationContext) === null || jt === void 0 ? void 0 : jt.identity), { traits: o(o({}, ((Nt = (Pt = b.evaluationContext) === null || Pt === void 0 ? void 0 : Pt.identity) === null || Nt === void 0 ? void 0 : Nt.traits) || {}), at || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", b))), et ? (bt = !j && (!this.cacheOptions.skipAPI || q), this._onChange(null, { isFromServer: !1, flagsChanged: V, traitsChanged: H }, this._loadedState(null, F.CACHE, bt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && et && !q && this.log("Skipping API, using cache"), bt && this.getFlags().catch(function(ge) {
389
389
  var Ut;
390
390
  (Ut = ae.onError) === null || Ut === void 0 || Ut.call(ae, ge);
391
391
  }), [3, 4]) : [3, 2];
@@ -404,10 +404,10 @@ var Gt = { exports: {} };
404
404
  case 8:
405
405
  return $.sent(), [3, 10];
406
406
  case 9:
407
- if (A) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (Rt = this.evaluationContext.identity) === null || Rt === void 0 ? void 0 : Rt.traits) }, this._loadedState(null, E.DEFAULT_FLAGS));
407
+ if (A) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (Rt = this.evaluationContext.identity) === null || Rt === void 0 ? void 0 : Rt.traits) }, this._loadedState(null, F.DEFAULT_FLAGS));
408
408
  else {
409
409
  if (!this.flags) throw new Error(mt);
410
- this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (kt = this.evaluationContext.identity) === null || kt === void 0 ? void 0 : kt.traits) }, this._loadedState(null, E.DEFAULT_FLAGS));
410
+ this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (kt = this.evaluationContext.identity) === null || kt === void 0 ? void 0 : kt.traits) }, this._loadedState(null, F.DEFAULT_FLAGS));
411
411
  }
412
412
  $.label = 10;
413
413
  case 10:
@@ -434,8 +434,8 @@ var Gt = { exports: {} };
434
434
  case 10:
435
435
  return U.sent(), [3, 12];
436
436
  case 11:
437
- if (A) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, A), traitsChanged: _({}, (t = r.identity) === null || t === void 0 ? void 0 : t.traits) }, this._loadedState(null, E.DEFAULT_FLAGS));
438
- else if (this.flags && (rt = null, Object.keys(this.flags).length === 0 && (rt = mt), this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (i = r.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(rt, E.DEFAULT_FLAGS)), rt)) throw new Error(rt);
437
+ if (A) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, A), traitsChanged: _({}, (t = r.identity) === null || t === void 0 ? void 0 : t.traits) }, this._loadedState(null, F.DEFAULT_FLAGS));
438
+ else if (this.flags && (rt = null, Object.keys(this.flags).length === 0 && (rt = mt), this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (i = r.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(rt, F.DEFAULT_FLAGS)), rt)) throw new Error(rt);
439
439
  U.label = 12;
440
440
  case 12:
441
441
  return [3, 14];
@@ -456,7 +456,7 @@ var Gt = { exports: {} };
456
456
  }, a.prototype.getState = function() {
457
457
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
458
458
  }, a.prototype.setState = function(e) {
459
- e && (this.initialised = !0, this.api = e.api || this.api || Vt, this.flags = e.flags || this.flags, this.evaluationContext = e.evaluationContext || this.evaluationContext, this.evaluationEvent = e.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
459
+ e && (this.initialised = !0, this.api = e.api || this.api || Jt, this.flags = e.flags || this.flags, this.evaluationContext = e.evaluationContext || this.evaluationContext, this.evaluationEvent = e.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
460
460
  }, a.prototype.logout = function() {
461
461
  return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
462
462
  }, a.prototype.startListening = function(e) {
@@ -477,7 +477,7 @@ var Gt = { exports: {} };
477
477
  }, a.prototype.updateEventStorage = function() {
478
478
  if (this.enableAnalytics) {
479
479
  var e = JSON.stringify(this.getState().evaluationEvent);
480
- T.setItem(lt, e).catch(function(t) {
480
+ T.setItem(ut, e).catch(function(t) {
481
481
  return console.error("Flagsmith: Error setting item in async storage", t);
482
482
  });
483
483
  }
@@ -501,18 +501,18 @@ var Gt = { exports: {} };
501
501
  var e = a.fetch, t = a.AsyncStorage, i = a.eventSource;
502
502
  return new he({ fetch: e, AsyncStorage: t, eventSource: i });
503
503
  }
504
- var ut, ve = (ut = function(a, e) {
505
- return ut = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) {
504
+ var ct, ve = (ct = function(a, e) {
505
+ return ct = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, i) {
506
506
  t.__proto__ = i;
507
507
  } || function(t, i) {
508
508
  for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]);
509
- }, ut(a, e);
509
+ }, ct(a, e);
510
510
  }, function(a, e) {
511
511
  if (typeof e != "function" && e !== null) throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
512
512
  function t() {
513
513
  this.constructor = a;
514
514
  }
515
- ut(a, e), a.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
515
+ ct(a, e), a.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
516
516
  }), $t = function(a) {
517
517
  var e = typeof Symbol == "function" && Symbol.iterator, t = e && a[e], i = 0;
518
518
  if (t) return t.call(a);
@@ -643,8 +643,8 @@ Consider loading an EventSource polyfill and making it available globally as Eve
643
643
  } } };
644
644
  };
645
645
  for (var f in n.open(e.method || "get", a, !0), n.onload = function() {
646
- n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(u, m, F) {
647
- r.push(m = m.toLowerCase()), s.push([m, F]), c[m] = c[m] ? c[m] + "," + F : F;
646
+ n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(u, m, w) {
647
+ r.push(m = m.toLowerCase()), s.push([m, w]), c[m] = c[m] ? c[m] + "," + w : w;
648
648
  }), t(h());
649
649
  }, n.onerror = i, n.withCredentials = e.credentials == "include", e.headers) n.setRequestHeader(f, e.headers[f]);
650
650
  n.send(e.body || null);
@@ -661,13 +661,13 @@ var me = Gt.exports, se = {
661
661
  FETCH_FAILED: "Failed to fetch Flagsmith configuration",
662
662
  NO_USER_CONTEXT: "User context not set. Call setUser() first.",
663
663
  ALREADY_INITIALIZED: "FeatureFlag is already initialized."
664
- }, oe = "business", V, Se = (V = class {
664
+ }, oe = "business", J, Se = (J = class {
665
665
  constructor() {
666
- ct(this, "flagsmithClient", null);
667
- ct(this, "userContext", null);
666
+ ht(this, "flagsmithClient", null);
667
+ ht(this, "userContext", null);
668
668
  }
669
669
  static getInstance() {
670
- return V.instance || (V.instance = new V()), V.instance;
670
+ return J.instance || (J.instance = new J()), J.instance;
671
671
  }
672
672
  ensureInitialized() {
673
673
  if (!this.flagsmithClient)
@@ -769,7 +769,7 @@ var me = Gt.exports, se = {
769
769
  reset() {
770
770
  this.flagsmithClient = null, this.userContext = null;
771
771
  }
772
- }, ct(V, "instance"), V), be = Se.getInstance(), st = gt(!1), ot = gt([]), X = gt(null);
772
+ }, ht(J, "instance"), J), be = Se.getInstance(), st = gt(!1), ot = gt([]), X = gt(null);
773
773
  function Ce(p = be) {
774
774
  const l = () => st.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), v = async (g, y = []) => {
775
775
  if (st.value) {
@@ -816,7 +816,7 @@ function Ce(p = be) {
816
816
  } catch (z) {
817
817
  return console.error(`Error getting user flag value for ${y}:`, z), C;
818
818
  }
819
- }, _ = async (g, y, C = null, R) => W(`${oe}-${g}`, y, C, R), E = () => {
819
+ }, _ = async (g, y, C = null, R) => W(`${oe}-${g}`, y, C, R), F = () => {
820
820
  try {
821
821
  p.reset();
822
822
  } catch (g) {
@@ -837,10 +837,10 @@ function Ce(p = be) {
837
837
  getFlag: L,
838
838
  getUserFlagValue: W,
839
839
  getBusinessFlagValue: _,
840
- reset: E
840
+ reset: F
841
841
  };
842
842
  }
843
- var Jt = () => Ce();
843
+ var Vt = () => Ce();
844
844
  const _e = /* @__PURE__ */ new Set([
845
845
  // vivo pizza prod
846
846
  "business_6687e91fa7240b001ba3f4c2",
@@ -884,13 +884,14 @@ function ue() {
884
884
  enableWastageTemplate: !1,
885
885
  manualReceive: !1,
886
886
  mustUsePoTemplate: !1,
887
- enableXilnexTransferNote: !1
887
+ enableXilnexTransferNote: !1,
888
+ enablePoOperateV2: !1
888
889
  };
889
890
  }
890
- const I = gt(ue()), Le = () => ({
891
+ const E = gt(ue()), Le = () => ({
891
892
  get businessDbName() {
892
893
  var v;
893
- return `business_${((v = ht().currentBusiness.value) == null ? void 0 : v._id) ?? ""}`;
894
+ return `business_${((v = vt().currentBusiness.value) == null ? void 0 : v._id) ?? ""}`;
894
895
  },
895
896
  get isWarehouse() {
896
897
  var l;
@@ -899,7 +900,7 @@ const I = gt(ue()), Le = () => ({
899
900
  get restaurantPosVersion() {
900
901
  var v;
901
902
  const p = Dt();
902
- return (v = ht().restaurants.value.find(
903
+ return (v = vt().restaurants.value.find(
903
904
  (d) => {
904
905
  var o;
905
906
  return d._id === ((o = p._currentLocation) == null ? void 0 : o.doc._id);
@@ -907,45 +908,48 @@ const I = gt(ue()), Le = () => ({
907
908
  )) == null ? void 0 : v.posVersion;
908
909
  },
909
910
  get enableTotalCost() {
910
- return I.value.enableTotalCost;
911
+ return E.value.enableTotalCost;
911
912
  },
912
913
  get enableBackdatePo() {
913
- return I.value.enableBackdatePo;
914
+ return E.value.enableBackdatePo;
914
915
  },
915
916
  /** @deprecated TODO: remove */
916
917
  get autoReceiveWarehouse() {
917
- return I.value.autoReceiveWarehouse;
918
+ return E.value.autoReceiveWarehouse;
918
919
  },
919
920
  /** @deprecated TODO: remove */
920
921
  get manualReceive() {
921
- return I.value.manualReceive;
922
+ return E.value.manualReceive;
922
923
  },
923
924
  get enablePoTemplate() {
924
- return I.value.enablePoTemplate;
925
+ return E.value.enablePoTemplate;
925
926
  },
926
927
  get enableClosingTemplate() {
927
- return I.value.enableClosingTemplate;
928
+ return E.value.enableClosingTemplate;
928
929
  },
929
930
  get enableWastageTemplate() {
930
- return I.value.enableWastageTemplate;
931
+ return E.value.enableWastageTemplate;
931
932
  },
932
933
  get enableIngredientGroup() {
933
- return I.value.enableIngredientGroup;
934
+ return E.value.enableIngredientGroup;
934
935
  },
935
936
  get mustUsePoTemplate() {
936
- return I.value.mustUsePoTemplate;
937
+ return E.value.mustUsePoTemplate;
937
938
  },
938
939
  get enableSupplierMasterList() {
939
- return I.value.enableSupplierMasterList;
940
+ return E.value.enableSupplierMasterList;
940
941
  },
941
942
  get businessSupplierOnly() {
942
- return I.value.businessSupplierOnly;
943
+ return E.value.businessSupplierOnly;
943
944
  },
944
945
  get enableXilnexTransferNote() {
945
- return I.value.enableXilnexTransferNote;
946
+ return E.value.enableXilnexTransferNote;
947
+ },
948
+ get enablePoOperateV2() {
949
+ return E.value.enablePoOperateV2;
946
950
  },
947
951
  async init() {
948
- const p = ht(), { init: l, setUser: v } = Jt(), d = p.namespace.value === "prod";
952
+ const p = vt(), { init: l, setUser: v } = Vt(), d = p.namespace.value === "prod";
949
953
  await l({
950
954
  apiKey: d ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
951
955
  // url: 'https://flag.feedme.farm/api/v1/', // optional -> this is a default URL value
@@ -954,30 +958,30 @@ const I = gt(ue()), Le = () => ({
954
958
  }), Dt().watchLocation(async (x) => {
955
959
  var R, z, Y;
956
960
  if (!x) {
957
- I.value = ue();
961
+ E.value = ue();
958
962
  return;
959
963
  }
960
964
  await v(x.doc._id);
961
- const M = ye(), L = ht(), _ = `business_${((R = L.currentBusiness.value) == null ? void 0 : R._id) ?? ""}`, E = x.type === re.enum.warehouse, g = (
965
+ const M = ye(), L = vt(), _ = `business_${((R = L.currentBusiness.value) == null ? void 0 : R._id) ?? ""}`, F = x.type === re.enum.warehouse, g = (
962
966
  // if menu v4, must manual receive && must use outlet app
963
967
  ((z = L.currentBusiness.value) == null ? void 0 : z.menuVersion) === "v4" && // more guard for businesses using menu v4, only those listed for manual receive will be included
964
968
  // TODO: may be removed to use menu version only
965
969
  _e.has(this.businessDbName)
966
- ), y = le.has(_) || dt(
970
+ ), y = le.has(_) || lt(
967
971
  "inventory_portal_must_use_transfer_template"
968
972
  /* inventory_portal_must_use_transfer_template */
969
973
  ), C = xe.has(this.businessDbName) && (this.isWarehouse || M.state.closing !== null);
970
- I.value = {
974
+ E.value = {
971
975
  enableTotalCost: ((Y = L.currentBusiness.value) == null ? void 0 : Y.menuVersion) === "v4",
972
976
  enableBackdatePo: C,
973
- autoReceiveWarehouse: E && !g,
977
+ autoReceiveWarehouse: F && !g,
974
978
  manualReceive: g,
975
979
  enablePoTemplate: y,
976
- enableClosingTemplate: Ee.has(_) && dt(
980
+ enableClosingTemplate: Ee.has(_) && lt(
977
981
  "inventory_pos_closing_v2"
978
982
  /* inventory_pos_closing_v2 */
979
983
  ),
980
- enableWastageTemplate: Fe.has(_) && dt(
984
+ enableWastageTemplate: Fe.has(_) && lt(
981
985
  "inventory_pos_adjust_v2_wastage"
982
986
  /* inventory_pos_adjust_v2_wastage */
983
987
  ),
@@ -985,21 +989,25 @@ const I = gt(ue()), Le = () => ({
985
989
  mustUsePoTemplate: y,
986
990
  businessSupplierOnly: y,
987
991
  enableSupplierMasterList: le.has(_),
988
- enableXilnexTransferNote: dt(
992
+ enableXilnexTransferNote: lt(
989
993
  "inventory_portal_xilnex_transfer_note"
990
994
  /* inventory_portal_xilnex_transfer_note */
995
+ ),
996
+ enablePoOperateV2: lt(
997
+ "inventory_portal_po_operate_v2"
998
+ /* inventory_portal_po_operate_v2 */
991
999
  )
992
1000
  };
993
1001
  }, "feature");
994
1002
  },
995
1003
  async setUser(p) {
996
- const { setUser: l } = Jt();
1004
+ const { setUser: l } = Vt();
997
1005
  await l(p.doc._id);
998
1006
  }
999
1007
  });
1000
- function dt(p, l) {
1008
+ function lt(p, l) {
1001
1009
  l = l === void 0 ? null : l;
1002
- const { getFlagValue: v } = Jt();
1010
+ const { getFlagValue: v } = Vt();
1003
1011
  return v(p, (d) => d === "true") ?? l;
1004
1012
  }
1005
1013
  export {
@@ -1,10 +1,10 @@
1
- import { W as Ee, a as q, K as Ie, ad as U, r as Ae, ae as fe, s as ye, u as W, i as B, v as Ne, aG as ae, w as he, b as J, t as V, O as j, aF as Oe, ay as De, T as Fe, x as Pe, y as Ue, d as se, e as X, R as ie, H as Be, ac as Me, D as G, h as D, f as Le } from "./app-Bs9204PI.js";
1
+ import { W as Ee, a as q, K as Ie, ad as U, r as Ae, ae as fe, s as ye, u as W, i as B, v as Ne, aG as ae, w as he, b as J, t as V, O as j, aF as Oe, ay as De, T as Fe, x as Pe, y as Ue, d as se, e as X, R as ie, H as Be, ac as Me, D as G, h as D, f as Le } from "./app-1AEJE-GS.js";
2
2
  import { useCoreStore as ee, useI18n as te } from "@feedmepos/mf-common";
3
3
  import { useDialogChild as Qe, useSnackbar as ve, useDialog as He, FmButtonVariant as le, components as ce } from "@feedmepos/ui-library";
4
4
  import { defineStore as ge } from "pinia";
5
5
  import { defineComponent as be, resolveComponent as L, openBlock as T, createElementBlock as w, createElementVNode as $, normalizeClass as Q, createTextVNode as qe, toDisplayString as I, unref as E, createCommentVNode as H, createVNode as F, withCtx as Z, Fragment as M, renderList as K, ref as C, onMounted as Ve, computed as me, watch as je, createSlots as ze, createBlock as z, h as Y } from "vue";
6
6
  import { useRouter as Ke } from "vue-router";
7
- import { u as re } from "./supplier-BGNg5AzJ.js";
7
+ import { u as re } from "./supplier-DAIl-nmu.js";
8
8
  const Se = Ee((e, t) => {
9
9
  function a() {
10
10
  var n;