@feedmepos/mf-inventory-portal 1.7.0 → 1.7.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 (95) hide show
  1. package/dist/{App-mfv976r3.js → App-B0lFktSW.js} +4 -4
  2. package/dist/{ApprovalView-B3nQokUv.js → ApprovalView-Ka7ehCQd.js} +8 -8
  3. package/dist/{BindingsDialog-DnWLIslN.js → BindingsDialog-B_YgAtlu.js} +2 -2
  4. package/dist/{BindingsPicker-BOPzfVXq.js → BindingsPicker-CtCjgzt7.js} +2 -2
  5. package/dist/{BindingsTable-Cky7o_NG.js → BindingsTable-BNPP0R_A.js} +3 -3
  6. package/dist/{BulkReceiveRequestView-CyFXAM_t.js → BulkReceiveRequestView-B0bj9Syr.js} +19 -19
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-dRYFLJVj.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CiGVQ_6T.js} +1 -1
  8. package/dist/{ClosingDraftView-BsREbRBA.js → ClosingDraftView-QJKj8C9l.js} +19 -19
  9. package/dist/{ClosingHistoryView-J8XyfB2_.js → ClosingHistoryView-BS3DFkAz.js} +5 -5
  10. package/dist/ClosingTemplateView-B8njPb4E.js +2346 -0
  11. package/dist/{DefaultView-BqtI-DBZ.js → DefaultView-BLv5wqcv.js} +2 -2
  12. package/dist/{DeliveryOrderPrintPreview-Bo4KtO5Q.js → DeliveryOrderPrintPreview-CnuwXphl.js} +2 -2
  13. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-hBB0AHTL.js → EmailDialog.vue_vue_type_script_setup_true_lang-9lUR6kHg.js} +6614 -6605
  14. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BDni_x3F.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-fC_rbTfa.js} +1 -1
  15. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BkEFIDXV.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DvX5xI9b.js} +2 -2
  16. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Bu-ccw4K.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-hFKGb0Aa.js} +2 -2
  17. package/dist/{FmMultiselectDialog-DMB-1gqC.js → FmMultiselectDialog-D231CKWQ.js} +1 -1
  18. package/dist/{FmMultiselectDialog-B1vR5H5H.js → FmMultiselectDialog-QrLJQhIf.js} +2 -2
  19. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BsjlumX9.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C6RH3VSF.js} +5 -5
  20. package/dist/{ImportView-xLqTJPKm.js → ImportView-DwLmW0jr.js} +6 -6
  21. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DuxQPayd.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-LrPxsgOW.js} +1 -1
  22. package/dist/{IngredientGroupView-DQjBoKhR.js → IngredientGroupView-D4SUVGTu.js} +5 -5
  23. package/dist/{IngredientsView-Be4k9xvZ.js → IngredientsView-CUUYlGfs.js} +15 -15
  24. package/dist/{IntegrationExplorerView-Dbcybdvj.js → IntegrationExplorerView-C2xZMSEm.js} +4 -4
  25. package/dist/{IntegrationView-C5t2Rsq1.js → IntegrationView-4J5SmJPp.js} +13 -13
  26. package/dist/{InventoryBindingForm-B7RefQSJ.js → InventoryBindingForm-B7YadUXu.js} +1 -1
  27. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-lYl5CWxn.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B3lKJcut.js} +5 -5
  28. package/dist/{InventoryBindingSummary-BKF-B5Kf.js → InventoryBindingSummary-Cw8ppkq9.js} +1 -1
  29. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DhpB51X8.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CvXdUIPp.js} +1 -1
  30. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Dhf-ROKc.js → PremiumBadge.vue_vue_type_script_setup_true_lang-C7Gol-ne.js} +1 -1
  31. package/dist/{ProductionView-BAkzsaXt.js → ProductionView-D7_RHbkz.js} +7 -7
  32. package/dist/{PublishView-u1DSi_3y.js → PublishView-CXalRknq.js} +3 -3
  33. package/dist/{PurchaseOrderPrintPreview-spvdjRxW.js → PurchaseOrderPrintPreview-CRrYe6dD.js} +2 -2
  34. package/dist/{ReceiveRequestView-TfjSKJ7q.js → ReceiveRequestView-CR2_mNj2.js} +13 -13
  35. package/dist/{RecipeView-DB_zPDd6.js → RecipeView-Yzx4gY33.js} +17 -17
  36. package/dist/{SettingsView-DsFxSs0T.js → SettingsView-Dfih5z0X.js} +4 -4
  37. package/dist/{StockView-DEkXxk4b.js → StockView-B-OIr9-B.js} +21 -21
  38. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BLWES2jH.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B2vo0BFA.js} +1 -1
  39. package/dist/{SupplierView-Di8rBh-_.js → SupplierView-CKCPRXZV.js} +12 -12
  40. package/dist/{SurchargeView-s7i5_7XF.js → SurchargeView-Da7YbT5A.js} +6 -6
  41. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-18j2ZpX-.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-Btecdwc5.js} +2 -2
  42. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-aSnsm9Sw.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DgDzjf87.js} +1 -1
  43. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DuKUOvt4.js +4682 -0
  44. package/dist/{TransferTemplateView-C94eigII.js → TransferTemplateView-C3Nx1W5t.js} +20 -20
  45. package/dist/{UnitCostHistoryView-DTPzSJrM.js → UnitCostHistoryView-DYHBMjfW.js} +4 -4
  46. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-B3NPv8Eb.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BmLZ-7TM.js} +4 -4
  47. package/dist/{UnitView-DdGUw_tx.js → UnitView-Ccwmj-B0.js} +7 -7
  48. package/dist/{WarehouseView-BQxSYVvF.js → WarehouseView-DiXvpGkL.js} +5 -5
  49. package/dist/{WastageTemplateView-Bjc1PUko.js → WastageTemplateView-CAbu77vo.js} +14 -14
  50. package/dist/{app-Ci7Aaea6.js → app-BWvf7Pbw.js} +14 -14
  51. package/dist/app.js +1 -1
  52. package/dist/{closing-template-Chy8WrlR.js → closing-template-hsPMmSJP.js} +1 -1
  53. package/dist/{date2-Bidui0P3.js → date2-BJfdfeJO.js} +1 -1
  54. package/dist/{dayjs.min-CFgtzCV7.js → dayjs.min-DadksG29.js} +1 -1
  55. package/dist/{decimal-C9gpKKZI.js → decimal-C9idbIOo.js} +2 -2
  56. package/dist/{defineDeepModel-jLHm8HR1.js → defineDeepModel-CH4cTogB.js} +1 -1
  57. package/dist/{duplicate-template-D9TiIFbd.js → duplicate-template-BMd6tF6Y.js} +1 -1
  58. package/dist/{feature-HqzShic7.js → feature-Bt9vQSu_.js} +80 -80
  59. package/dist/{format-time-from-id-Dw-n4jjX.js → format-time-from-id-B6Oxxcmv.js} +1 -1
  60. package/dist/{format-unit-display-C8RuVRS1.js → format-unit-display-B32MF8YP.js} +12 -12
  61. package/dist/{import-export.helper-CuhpmMlh.js → import-export.helper-BWex8GSP.js} +6 -6
  62. package/dist/{index-BvJJtxfs.js → index-BgS2MztF.js} +3 -3
  63. package/dist/{index-BbLw-k2u.js → index-BrmQVR18.js} +1 -1
  64. package/dist/{index-CsDKvy88.js → index-G8zX1OUg.js} +1 -1
  65. package/dist/{inventory-core-dart.default-l09rPSab.js → inventory-core-dart.default-DMYZxr7z.js} +1 -1
  66. package/dist/{jszip.min-Q-x0ALLG.js → jszip.min-BiUtLGgB.js} +2 -2
  67. package/dist/{lz-string-BeXPK_xO.js → lz-string-CVwhv8uD.js} +1 -1
  68. package/dist/{netsuite-BTb2NFU5.js → netsuite-jqgyyem9.js} +2 -2
  69. package/dist/{number-Zlh6TxmH.js → number-4scgLaMY.js} +3 -3
  70. package/dist/{predefined-templates-CXh7OWR3.js → predefined-templates-CK5XSRe_.js} +1 -1
  71. package/dist/{purchase-order-template-Dvr65U29.js → purchase-order-template-D4JHGs3l.js} +1 -1
  72. package/dist/{recalculationUtils-BkF7XUdf.js → recalculationUtils-B9BLpNFc.js} +1 -1
  73. package/dist/{rules-FAZ-EkdF.js → rules-CEKN0fON.js} +2 -2
  74. package/dist/{stock-CGowMSCF.js → stock-BSIJKbLk.js} +3 -3
  75. package/dist/{stock-BEJdUeLP.js → stock-DEDIyrA9.js} +1 -1
  76. package/dist/{supplier-JOAqqBkF.js → supplier-CnEm0FdT.js} +2 -2
  77. package/dist/{surcharge-gdAEvtj9.js → surcharge-BTe4mWtB.js} +1 -1
  78. package/dist/tsconfig.app.tsbuildinfo +1 -1
  79. package/dist/{uom-rules-By1vxOaF.js → uom-rules-C1nV-lQn.js} +1 -1
  80. package/dist/{use-ingredient-select-dialog-B-bFjj3N.js → use-ingredient-select-dialog-COiU0eIQ.js} +2 -2
  81. package/dist/{use-inventory-binding-dialog-o-pedZ68.js → use-inventory-binding-dialog-Dhpo1L4-.js} +2 -2
  82. package/dist/{use-template-enabled-locations-5H3RhSuH.js → use-template-enabled-locations-BZN5nUrH.js} +2 -2
  83. package/dist/{use-transfer-locations-o51Ss7cr.js → use-transfer-locations-DDtX2nBf.js} +2 -2
  84. package/dist/{useHrmPermission-DzihMP-i.js → useHrmPermission-EZ3pfyTj.js} +1 -1
  85. package/dist/{useNavigationMenu-B_d4hWSX.js → useNavigationMenu-CIGwi2pS.js} +2 -2
  86. package/dist/{useSseClient-Cd0it8zJ.js → useSseClient-Ccmg1XUC.js} +1 -1
  87. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-search.d.ts +6 -0
  88. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-search.spec.d.ts +1 -0
  89. package/dist/views/receive-request/helper/resolve-po-item-cost.d.ts +12 -0
  90. package/dist/views/receive-request/helper/resolve-po-item-cost.spec.d.ts +1 -0
  91. package/dist/{vue-i18n-CsIY6eJ6.js → vue-i18n-XR3XXGIN.js} +127 -127
  92. package/dist/{xlsx.util-CuxvUzGN.js → xlsx.util-Cit0fL6n.js} +2 -2
  93. package/package.json +3 -3
  94. package/dist/ClosingTemplateView-CkiPhzJ8.js +0 -2270
  95. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CpUyhO4Q.js +0 -4660
@@ -1,12 +1,12 @@
1
1
  var ht = Object.defineProperty;
2
- var pt = (s, u, _) => u in s ? ht(s, u, { enumerable: !0, configurable: !0, writable: !0, value: _ }) : s[u] = _;
3
- var ce = (s, u, _) => pt(s, typeof u != "symbol" ? u + "" : u, _);
2
+ var pt = (l, u, _) => u in l ? ht(l, u, { enumerable: !0, configurable: !0, writable: !0, value: _ }) : l[u] = _;
3
+ var ce = (l, u, _) => pt(l, typeof u != "symbol" ? u + "" : u, _);
4
4
  import { useCoreStore as Ke } from "@feedmepos/mf-common";
5
- import { Y as ve, a as ft, u as Ve, j as ot } from "./app-Ci7Aaea6.js";
5
+ import { Y as ve, a as ft, u as Ve, j as ot } from "./app-BWvf7Pbw.js";
6
6
  import { readonly as Ge, ref as de } from "vue";
7
- import "./inventory-core-dart.default-l09rPSab.js";
7
+ import "./inventory-core-dart.default-DMYZxr7z.js";
8
8
  var qe = { exports: {} };
9
- (function(s, u) {
9
+ (function(l, u) {
10
10
  (function(_, p) {
11
11
  p(u);
12
12
  })(ve, function(_) {
@@ -34,11 +34,11 @@ var qe = { exports: {} };
34
34
  e && e(a, null), n(a);
35
35
  }
36
36
  });
37
- } }, l = function() {
38
- return l = Object.assign || function(i) {
37
+ } }, s = function() {
38
+ return s = Object.assign || function(i) {
39
39
  for (var t, e = 1, r = arguments.length; e < r; e++) for (var n in t = arguments[e]) Object.prototype.hasOwnProperty.call(t, n) && (i[n] = t[n]);
40
40
  return i;
41
- }, l.apply(this, arguments);
41
+ }, s.apply(this, arguments);
42
42
  };
43
43
  function O(i, t, e, r) {
44
44
  return new (e || (e = Promise))(function(n, a) {
@@ -175,7 +175,7 @@ var qe = { exports: {} };
175
175
  }));
176
176
  }
177
177
  function Y(i) {
178
- return l(l({}, i), { identity: i.identity ? l(l({}, i.identity), { traits: $(i.identity.traits || {}) }) : void 0 });
178
+ return s(s({}, i), { identity: i.identity ? s(s({}, i.identity), { traits: $(i.identity.traits || {}) }) : void 0 });
179
179
  }
180
180
  (function(i) {
181
181
  i.NONE = "NONE", i.DEFAULT_FLAGS = "DEFAULT_FLAGS", i.CACHE = "CACHE", i.SERVER = "SERVER";
@@ -185,26 +185,26 @@ var qe = { exports: {} };
185
185
  var e = this;
186
186
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
187
187
  var r = e, n = r.api, a = r.evaluationContext;
188
- e.log("Get Flags"), e.isLoading = !0, e.loadingState.isFetching || e.setLoadingState(l(l({}, e.loadingState), { isFetching: !0 }));
188
+ e.log("Get Flags"), e.isLoading = !0, e.loadingState.isFetching || e.setLoadingState(s(s({}, e.loadingState), { isFetching: !0 }));
189
189
  var o = "".concat(e.getContext().identity), v = function(d) {
190
190
  var m, c, b, k;
191
191
  if (d && o === "".concat(e.getContext().identity)) {
192
- var V = d.flags, I = d.traits, U = d.identifier;
192
+ var V = d.flags, F = d.traits, U = d.identifier;
193
193
  e.isLoading = !1;
194
- var F = {}, N = {};
195
- I = I || [], (V = V || []).forEach(function(S) {
196
- F[S.feature.name.toLowerCase().replace(/ /g, "_")] = { id: S.feature.id, enabled: S.enabled, value: S.feature_state_value };
197
- }), I.forEach(function(S) {
194
+ var I = {}, N = {};
195
+ F = F || [], (V = V || []).forEach(function(S) {
196
+ I[S.feature.name.toLowerCase().replace(/ /g, "_")] = { id: S.feature.id, enabled: S.enabled, value: S.feature_state_value };
197
+ }), F.forEach(function(S) {
198
198
  N[S.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: S.transient, value: S.trait_value };
199
- }), e.oldFlags = l({}, e.flags);
200
- var G = E(e.oldFlags, F), re = E((m = e.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits, N);
201
- if ((U || Object.keys(N).length) && (e.evaluationContext.identity = l(l({}, e.evaluationContext.identity), { traits: N }), U && (e.evaluationContext.identity.identifier = U)), e.flags = F, e.updateStorage(), e._onChange(e.oldFlags, { isFromServer: !0, flagsChanged: G, traitsChanged: re }, e._loadedState(null, f.SERVER)), e.datadogRum) try {
199
+ }), e.oldFlags = s({}, e.flags);
200
+ var G = E(e.oldFlags, I), re = E((m = e.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits, N);
201
+ if ((U || Object.keys(N).length) && (e.evaluationContext.identity = s(s({}, e.evaluationContext.identity), { traits: N }), U && (e.evaluationContext.identity.identifier = U)), e.flags = I, e.updateStorage(), e._onChange(e.oldFlags, { isFromServer: !0, flagsChanged: G, traitsChanged: re }, e._loadedState(null, f.SERVER)), e.datadogRum) try {
202
202
  if (e.datadogRum.trackTraits) {
203
203
  var ie = {};
204
204
  Object.keys(((c = e.evaluationContext.identity) === null || c === void 0 ? void 0 : c.traits) || {}).map(function(S) {
205
205
  ie[ze + S] = e.getTrait(S);
206
206
  });
207
- var Z = l(l(l({}, e.datadogRum.client.getUser()), { id: e.datadogRum.client.getUser().id || ((b = e.evaluationContext.identity) === null || b === void 0 ? void 0 : b.identifier) }), ie);
207
+ var Z = s(s(s({}, e.datadogRum.client.getUser()), { id: e.datadogRum.client.getUser().id || ((b = e.evaluationContext.identity) === null || b === void 0 ? void 0 : b.identifier) }), ie);
208
208
  e.log("Setting Datadog user", Z), e.datadogRum.client.setUser(Z);
209
209
  }
210
210
  } catch (S) {
@@ -228,7 +228,7 @@ var qe = { exports: {} };
228
228
  }).filter(function(d) {
229
229
  return d.trait_value !== void 0 || (e.log("Warning - attempted to set an undefined trait value for key", d.trait_key), !1);
230
230
  }) })) : e.getJSON(n + "identities/?identifier=" + encodeURIComponent(a.identity.identifier) + (a.identity.transient ? "&transient=true" : ""))]).then(function(d) {
231
- return e.evaluationContext.identity = l(l({}, e.evaluationContext.identity), { traits: {} }), v(d == null ? void 0 : d[0]);
231
+ return e.evaluationContext.identity = s(s({}, e.evaluationContext.identity), { traits: {} }), v(d == null ? void 0 : d[0]);
232
232
  }).catch(function(d) {
233
233
  var m = d.message, c = new Error(m);
234
234
  return Promise.reject(c);
@@ -240,7 +240,7 @@ var qe = { exports: {} };
240
240
  if (e.evaluationEvent && e.evaluationContext.environment && e.evaluationEvent[e.evaluationContext.environment.apiKey]) return e.evaluationEvent && Object.getOwnPropertyNames(e.evaluationEvent).length !== 0 && Object.getOwnPropertyNames(e.evaluationEvent[e.evaluationContext.environment.apiKey]).length !== 0 ? e.getJSON(r + "analytics/flags/", "POST", JSON.stringify(e.evaluationEvent[e.evaluationContext.environment.apiKey])).then(function(n) {
241
241
  if (e.evaluationContext.environment) {
242
242
  var a = e.getState();
243
- e.evaluationEvent || (e.evaluationEvent = {}), e.evaluationEvent[e.evaluationContext.environment.apiKey] = {}, e.setState(l(l({}, a), { evaluationEvent: e.evaluationEvent })), e.updateEventStorage();
243
+ e.evaluationEvent || (e.evaluationEvent = {}), e.evaluationEvent[e.evaluationContext.environment.apiKey] = {}, e.setState(s(s({}, a), { evaluationEvent: e.evaluationEvent })), e.updateEventStorage();
244
244
  }
245
245
  }).catch(function(n) {
246
246
  e.log("Exception fetching evaluationEvent", n);
@@ -265,17 +265,17 @@ var qe = { exports: {} };
265
265
  }));
266
266
  }, this.setContext = function(r) {
267
267
  var n = Y(r);
268
- return e.evaluationContext = l(l({}, n), { environment: n.environment || e.evaluationContext.environment }), e.initialised ? e.getFlags() : Promise.resolve();
268
+ return e.evaluationContext = s(s({}, n), { environment: n.environment || e.evaluationContext.environment }), e.initialised ? e.getFlags() : Promise.resolve();
269
269
  }, this.getContext = function() {
270
270
  return e.evaluationContext;
271
271
  }, this.updateContext = function(r) {
272
- return e.setContext(l(l({}, e.getContext()), r));
272
+ return e.setContext(s(s({}, e.getContext()), r));
273
273
  }, this.setTrait = function(r, n) {
274
274
  var a;
275
- if (e.api) return e.setContext(l(l({}, e.evaluationContext), { identity: l(l({}, e.evaluationContext.identity), { traits: l(l({}, (a = e.evaluationContext.identity) === null || a === void 0 ? void 0 : a.traits), $(Object.fromEntries([[r, n]]))) }) }));
275
+ if (e.api) return e.setContext(s(s({}, e.evaluationContext), { identity: s(s({}, e.evaluationContext.identity), { traits: s(s({}, (a = e.evaluationContext.identity) === null || a === void 0 ? void 0 : a.traits), $(Object.fromEntries([[r, n]]))) }) }));
276
276
  }, this.setTraits = function(r) {
277
277
  var n;
278
- if (e.api) return e.setContext(l(l({}, e.evaluationContext), { identity: l(l({}, e.evaluationContext.identity), { traits: l(l({}, (n = e.evaluationContext.identity) === null || n === void 0 ? void 0 : n.traits), Object.fromEntries(Object.entries(r).map(function(a) {
278
+ if (e.api) return e.setContext(s(s({}, e.evaluationContext), { identity: s(s({}, e.evaluationContext.identity), { traits: s(s({}, (n = e.evaluationContext.identity) === null || n === void 0 ? void 0 : n.traits), Object.fromEntries(Object.entries(r).map(function(a) {
279
279
  var o = a[0], v = a[1];
280
280
  return [o, A(v) ? v : { value: v }];
281
281
  }))) }) }));
@@ -293,13 +293,13 @@ var qe = { exports: {} };
293
293
  e.evaluationContext.environment && (m.headers["X-Environment-Key"] = e.evaluationContext.environment.apiKey), n && n !== "GET" && (m.headers["Content-Type"] = "application/json; charset=utf-8"), d && Object.assign(m.headers, d), C || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
294
294
  var c = "".concat((o = e.evaluationContext.identity) === null || o === void 0 ? void 0 : o.identifier);
295
295
  return C(r, m).then(function(b) {
296
- var k, V, I = "".concat((k = e.evaluationContext.identity) === null || k === void 0 ? void 0 : k.identifier);
297
- if (c === I) {
296
+ var k, V, F = "".concat((k = e.evaluationContext.identity) === null || k === void 0 ? void 0 : k.identifier);
297
+ if (c === F) {
298
298
  var U = (V = b.headers) === null || V === void 0 ? void 0 : V.get("x-flagsmith-document-updated-at");
299
299
  if (U) try {
300
- var F = parseFloat(U);
301
- if (isNaN(F)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
302
- e.timestamp = F;
300
+ var I = parseFloat(U);
301
+ if (isNaN(I)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
302
+ e.timestamp = I;
303
303
  } catch (N) {
304
304
  e.log(N, "Failed to parse x-flagsmith-document-updated-at", U);
305
305
  }
@@ -312,7 +312,7 @@ var qe = { exports: {} };
312
312
  return !G && b.status && (G = "API Response: ".concat(b.status)), b.status && b.status >= 200 && b.status < 300 ? G : Promise.reject(new Error(G));
313
313
  });
314
314
  }
315
- e.log("Received response with identity mismatch, ignoring response. Requested: ".concat(c, ", Current: ").concat(I));
315
+ e.log("Received response with identity mismatch, ignoring response. Requested: ".concat(c, ", Current: ").concat(F));
316
316
  });
317
317
  }, this.evaluateFlag = function(r, n) {
318
318
  if (e.datadogRum && (e.datadogRum.client.addFeatureFlagEvaluation ? n === "VALUE" ? e.datadogRum.client.addFeatureFlagEvaluation(Je + r, e.getValue(r, {}, !0)) : e.datadogRum.client.addFeatureFlagEvaluation(Me + r, e.hasFeature(r, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), e.enableAnalytics) {
@@ -328,18 +328,18 @@ var qe = { exports: {} };
328
328
  return i.prototype.init = function(t) {
329
329
  var e, r, n;
330
330
  return O(this, void 0, void 0, function() {
331
- var a, o, v, d, m, c, b, k, V, I, U, F, N, G, re, ie, Z, T, S, ge, ae, Qe, Q, ye, et, tt, me, nt, be, oe, ee, rt, L = this;
331
+ var a, o, v, d, m, c, b, k, V, F, U, I, N, G, re, ie, Z, T, S, ge, ae, Qe, Q, ye, et, tt, me, nt, be, oe, ee, rt, L = this;
332
332
  return K(this, function(D) {
333
333
  switch (D.label) {
334
334
  case 0:
335
335
  a = Y(t.evaluationContext || this.evaluationContext), D.label = 1;
336
336
  case 1:
337
- if (D.trys.push([1, 13, , 14]), o = t.environmentID, v = t.api, d = v === void 0 ? Be : v, m = t.headers, c = t.onChange, b = t.cacheFlags, k = t.datadogRum, V = t.onError, I = t.defaultFlags, U = t.fetch, F = t.preventFetch, N = t.enableLogs, G = t.enableDynatrace, re = t.enableAnalytics, ie = t.realtime, Z = t.eventSourceUrl, T = Z === void 0 ? "https://realtime.flagsmith.com/" : Z, S = t.AsyncStorage, ge = t.identity, ae = t.traits, Qe = t.state, Q = t.cacheOptions, ye = t.angularHttpClient, et = t._trigger, tt = t._triggerLoadingState, a.environment = o ? { apiKey: o } : a.environment, !a.environment || !a.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
337
+ if (D.trys.push([1, 13, , 14]), o = t.environmentID, v = t.api, d = v === void 0 ? Be : v, m = t.headers, c = t.onChange, b = t.cacheFlags, k = t.datadogRum, V = t.onError, F = t.defaultFlags, U = t.fetch, I = t.preventFetch, N = t.enableLogs, G = t.enableDynatrace, re = t.enableAnalytics, ie = t.realtime, Z = t.eventSourceUrl, T = Z === void 0 ? "https://realtime.flagsmith.com/" : Z, S = t.AsyncStorage, ge = t.identity, ae = t.traits, Qe = t.state, Q = t.cacheOptions, ye = t.angularHttpClient, et = t._trigger, tt = t._triggerLoadingState, a.environment = o ? { apiKey: o } : a.environment, !a.environment || !a.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
338
338
  if (a.identity = ge || ae ? { identifier: ge, traits: ae ? Object.fromEntries(Object.entries(ae).map(function(R) {
339
339
  return [R[0], { value: R[1] }];
340
340
  })) : {} } : a.identity, this.evaluationContext = a, this.api = d, this.headers = m, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = c, me = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = et || this._trigger, this._triggerLoadingState = tt || this._triggerLoadingState, this.onError = function(R) {
341
- L.setLoadingState(l(l({}, L.loadingState), { isFetching: !1, isLoading: !1, error: R })), V == null || V(R);
342
- }, 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."), U && (C = U), this.enableAnalytics = re || !1, this.flags = Object.assign({}, I) || {}, this.datadogRum = k || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = j !== void 0 && !!b, le = "FLAGSMITH_EVENT_" + a.environment.apiKey, S && (j = S), ie && typeof window < "u" && this.setupRealtime(T, a.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = l(l({}, this.loadingState), { isLoading: !1, source: f.DEFAULT_FLAGS })), this.setState(Qe), this.log("Initialising with properties", t, this), G && (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), ye && (C = /* @__PURE__ */ function(R) {
341
+ L.setLoadingState(s(s({}, L.loadingState), { isFetching: !1, isLoading: !1, error: R })), V == null || V(R);
342
+ }, 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."), U && (C = U), this.enableAnalytics = re || !1, this.flags = Object.assign({}, F) || {}, this.datadogRum = k || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = j !== void 0 && !!b, le = "FLAGSMITH_EVENT_" + a.environment.apiKey, S && (j = S), ie && typeof window < "u" && this.setupRealtime(T, a.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: f.DEFAULT_FLAGS })), this.setState(Qe), this.log("Initialising with properties", t, this), G && (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), ye && (C = /* @__PURE__ */ function(R) {
343
343
  return function(q, B) {
344
344
  var z = B.headers, x = B.method, te = B.body;
345
345
  return new Promise(function(X) {
@@ -372,26 +372,26 @@ var qe = { exports: {} };
372
372
  var B = JSON.parse(q);
373
373
  if (B[L.evaluationContext.environment.apiKey]) {
374
374
  var z = L.getState();
375
- L.log("Retrieved events from cache", q), L.setState(l(l({}, z), { evaluationEvent: B[L.evaluationContext.environment.apiKey] }));
375
+ L.log("Retrieved events from cache", q), L.setState(s(s({}, z), { evaluationEvent: B[L.evaluationContext.environment.apiKey] }));
376
376
  }
377
377
  }
378
378
  })), !b) return [3, 9];
379
379
  if (!j || !this.canUseStorage) return [3, 8];
380
380
  nt = function(R, q) {
381
381
  return O(L, void 0, void 0, function() {
382
- var B, z, x, te, X, M, Se, it, Ce, xe, we, Ee, Oe, ke, Te, Le, je, Pe, Ae, Ie, Fe, Ne, Re, Ue, at = this;
382
+ var B, z, x, te, X, M, Se, it, Ce, xe, we, Ee, Oe, ke, Te, Le, je, Pe, Ae, Fe, Ie, Ne, Re, Ue, at = this;
383
383
  return K(this, function(H) {
384
384
  switch (H.label) {
385
385
  case 0:
386
386
  if (!q) return [3, 7];
387
387
  B = null, z = null, H.label = 1;
388
388
  case 1:
389
- return H.trys.push([1, 5, , 6]), x = JSON.parse(q), te = !1, X = !1, x && x.api === this.api && ((xe = (Ce = x.evaluationContext) === null || Ce === void 0 ? void 0 : Ce.environment) === null || xe === void 0 ? void 0 : xe.apiKey) === ((we = this.evaluationContext.environment) === null || we === void 0 ? void 0 : we.apiKey) && (M = !0, this.evaluationContext.identity && ((Oe = (Ee = x.evaluationContext) === null || Ee === void 0 ? void 0 : Ee.identity) === null || Oe === void 0 ? void 0 : Oe.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Te = (ke = x.evaluationContext) === null || ke === void 0 ? void 0 : ke.identity) === null || Te === void 0 ? void 0 : Te.identifier) + " to " + this.evaluationContext.identity.identifier), M = !1), this.cacheOptions.ttl && (!x.ts || (/* @__PURE__ */ new Date()).valueOf() - x.ts > this.cacheOptions.ttl) && (x.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + x.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - x.ts) + "ms"), M = !1) : x.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + x.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - x.ts) + "ms"), X = !0, M = !0)), M && (te = !0, z = E((Le = this.evaluationContext.identity) === null || Le === void 0 ? void 0 : Le.traits, (Pe = (je = x.evaluationContext) === null || je === void 0 ? void 0 : je.identity) === null || Pe === void 0 ? void 0 : Pe.traits), B = E(this.flags, x.flags), this.setState(l(l({}, x), { evaluationContext: Y(l(l({}, x.evaluationContext), { identity: !((Ae = x.evaluationContext) === null || Ae === void 0) && Ae.identity ? l(l({}, (Ie = x.evaluationContext) === null || Ie === void 0 ? void 0 : Ie.identity), { traits: l(l({}, ((Ne = (Fe = x.evaluationContext) === null || Fe === void 0 ? void 0 : Fe.identity) === null || Ne === void 0 ? void 0 : Ne.traits) || {}), ae || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", x))), te ? (Se = !F && (!this.cacheOptions.skipAPI || X), this._onChange(null, { isFromServer: !1, flagsChanged: B, traitsChanged: z }, this._loadedState(null, f.CACHE, Se)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && te && !X && this.log("Skipping API, using cache"), Se && this.getFlags().catch(function(dt) {
389
+ return H.trys.push([1, 5, , 6]), x = JSON.parse(q), te = !1, X = !1, x && x.api === this.api && ((xe = (Ce = x.evaluationContext) === null || Ce === void 0 ? void 0 : Ce.environment) === null || xe === void 0 ? void 0 : xe.apiKey) === ((we = this.evaluationContext.environment) === null || we === void 0 ? void 0 : we.apiKey) && (M = !0, this.evaluationContext.identity && ((Oe = (Ee = x.evaluationContext) === null || Ee === void 0 ? void 0 : Ee.identity) === null || Oe === void 0 ? void 0 : Oe.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Te = (ke = x.evaluationContext) === null || ke === void 0 ? void 0 : ke.identity) === null || Te === void 0 ? void 0 : Te.identifier) + " to " + this.evaluationContext.identity.identifier), M = !1), this.cacheOptions.ttl && (!x.ts || (/* @__PURE__ */ new Date()).valueOf() - x.ts > this.cacheOptions.ttl) && (x.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + x.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - x.ts) + "ms"), M = !1) : x.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + x.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - x.ts) + "ms"), X = !0, M = !0)), M && (te = !0, z = E((Le = this.evaluationContext.identity) === null || Le === void 0 ? void 0 : Le.traits, (Pe = (je = x.evaluationContext) === null || je === void 0 ? void 0 : je.identity) === null || Pe === void 0 ? void 0 : Pe.traits), B = E(this.flags, x.flags), this.setState(s(s({}, x), { evaluationContext: Y(s(s({}, x.evaluationContext), { identity: !((Ae = x.evaluationContext) === null || Ae === void 0) && Ae.identity ? s(s({}, (Fe = x.evaluationContext) === null || Fe === void 0 ? void 0 : Fe.identity), { traits: s(s({}, ((Ne = (Ie = x.evaluationContext) === null || Ie === void 0 ? void 0 : Ie.identity) === null || Ne === void 0 ? void 0 : Ne.traits) || {}), ae || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", x))), te ? (Se = !I && (!this.cacheOptions.skipAPI || X), this._onChange(null, { isFromServer: !1, flagsChanged: B, traitsChanged: z }, this._loadedState(null, f.CACHE, Se)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && te && !X && this.log("Skipping API, using cache"), Se && this.getFlags().catch(function(dt) {
390
390
  var De;
391
391
  (De = at.onError) === null || De === void 0 || De.call(at, dt);
392
392
  }), [3, 4]) : [3, 2];
393
393
  case 2:
394
- return F ? [3, 4] : [4, this.getFlags()];
394
+ return I ? [3, 4] : [4, this.getFlags()];
395
395
  case 3:
396
396
  H.sent(), H.label = 4;
397
397
  case 4:
@@ -401,11 +401,11 @@ var qe = { exports: {} };
401
401
  case 6:
402
402
  return [3, 10];
403
403
  case 7:
404
- return F ? [3, 9] : [4, this.getFlags()];
404
+ return I ? [3, 9] : [4, this.getFlags()];
405
405
  case 8:
406
406
  return H.sent(), [3, 10];
407
407
  case 9:
408
- if (I) this._onChange(null, { isFromServer: !1, flagsChanged: E({}, this.flags), traitsChanged: E({}, (Re = this.evaluationContext.identity) === null || Re === void 0 ? void 0 : Re.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
408
+ if (F) this._onChange(null, { isFromServer: !1, flagsChanged: E({}, this.flags), traitsChanged: E({}, (Re = this.evaluationContext.identity) === null || Re === void 0 ? void 0 : Re.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
409
409
  else {
410
410
  if (!this.flags) throw new Error(me);
411
411
  this._onChange(null, { isFromServer: !1, flagsChanged: E({}, this.flags), traitsChanged: E({}, (Ue = this.evaluationContext.identity) === null || Ue === void 0 ? void 0 : Ue.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
@@ -431,11 +431,11 @@ var qe = { exports: {} };
431
431
  case 8:
432
432
  return [3, 12];
433
433
  case 9:
434
- return F ? [3, 11] : [4, this.getFlags()];
434
+ return I ? [3, 11] : [4, this.getFlags()];
435
435
  case 10:
436
436
  return D.sent(), [3, 12];
437
437
  case 11:
438
- if (I) this._onChange(null, { isFromServer: !1, flagsChanged: E({}, I), traitsChanged: E({}, (e = a.identity) === null || e === void 0 ? void 0 : e.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
438
+ if (F) this._onChange(null, { isFromServer: !1, flagsChanged: E({}, F), traitsChanged: E({}, (e = a.identity) === null || e === void 0 ? void 0 : e.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
439
439
  else if (this.flags && (oe = null, Object.keys(this.flags).length === 0 && (oe = me), this._onChange(null, { isFromServer: !1, flagsChanged: E({}, this.flags), traitsChanged: E({}, (r = a.identity) === null || r === void 0 ? void 0 : r.traits) }, this._loadedState(oe, f.DEFAULT_FLAGS)), oe)) throw new Error(oe);
440
440
  D.label = 12;
441
441
  case 12:
@@ -484,7 +484,7 @@ var qe = { exports: {} };
484
484
  }
485
485
  }, i.prototype.setLoadingState = function(t) {
486
486
  var e;
487
- W(t, this.loadingState) || (this.loadingState = l({}, t), this.log("Loading state changed", t), (e = this._triggerLoadingState) === null || e === void 0 || e.call(this));
487
+ W(t, this.loadingState) || (this.loadingState = s({}, t), this.log("Loading state changed", t), (e = this._triggerLoadingState) === null || e === void 0 || e.call(this));
488
488
  }, i.prototype.setupRealtime = function(t, e) {
489
489
  var r = this, n = t + "sse/environments/" + e + "/stream";
490
490
  pe ? this.eventSource || (this.log("Creating event source with url " + n), this.eventSource = new pe(n), this.eventSource.addEventListener("environment_updated", function(a) {
@@ -674,7 +674,7 @@ var gt = qe.exports, yt = {
674
674
  if (!this.flagsmithClient)
675
675
  try {
676
676
  this.flagsmithClient = gt.createFlagsmithInstance();
677
- const p = _.reduce((l, O) => (l[O.feature.name] = O, l), {});
677
+ const p = _.reduce((s, O) => (s[O.feature.name] = O, s), {});
678
678
  await this.flagsmithClient.init({
679
679
  environmentID: u.apiKey,
680
680
  api: (u == null ? void 0 : u.url) ?? "https://feature-flag-proxy.feedme.farm/api/v1/",
@@ -705,14 +705,14 @@ var gt = qe.exports, yt = {
705
705
  this.ensureInitialized();
706
706
  const u = this.flagsmithClient.getAllFlags();
707
707
  return Object.entries(u).map(([_, p]) => {
708
- var l;
708
+ var s;
709
709
  return {
710
710
  feature: {
711
711
  name: _,
712
712
  id: (p == null ? void 0 : p.id) ?? 0
713
713
  },
714
714
  enabled: p.enabled,
715
- value: ((l = p.value) == null ? void 0 : l.toString()) ?? null
715
+ value: ((s = p.value) == null ? void 0 : s.toString()) ?? null
716
716
  };
717
717
  });
718
718
  }
@@ -722,10 +722,10 @@ var gt = qe.exports, yt = {
722
722
  if (p == null)
723
723
  return null;
724
724
  try {
725
- const l = p.toString();
726
- return _ ? _(l) : typeof {} == "number" ? isNaN(Number(l)) ? null : Number(l) : typeof {} == "boolean" ? l.toLowerCase() === "true" : l;
727
- } catch (l) {
728
- return console.error("Error transforming flag value:", l), null;
725
+ const s = p.toString();
726
+ return _ ? _(s) : typeof {} == "number" ? isNaN(Number(s)) ? null : Number(s) : typeof {} == "boolean" ? s.toLowerCase() === "true" : s;
727
+ } catch (s) {
728
+ return console.error("Error transforming flag value:", s), null;
729
729
  }
730
730
  }
731
731
  getFlag(u) {
@@ -742,11 +742,11 @@ var gt = qe.exports, yt = {
742
742
  value: _.toString()
743
743
  };
744
744
  }
745
- async getUserFlagValue(u, _, p = null, l) {
745
+ async getUserFlagValue(u, _, p = null, s) {
746
746
  var K;
747
747
  const O = this.userContext;
748
748
  try {
749
- return await this.setUser(u), this.getFlagValue(_, l) ?? p;
749
+ return await this.setUser(u), this.getFlagValue(_, s) ?? p;
750
750
  } catch (P) {
751
751
  return console.error(`Error getting user flag value for ${_}:`, P), p;
752
752
  } finally {
@@ -761,48 +761,48 @@ var gt = qe.exports, yt = {
761
761
  this.flagsmithClient = null, this.userContext = null;
762
762
  }
763
763
  }, ce(J, "instance"), J), bt = mt.getInstance(), se = de(!1), _e = de([]), ne = de(null);
764
- function St(s = bt) {
764
+ function St(l = bt) {
765
765
  const u = () => se.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), _ = async (f, C = []) => {
766
766
  if (se.value) {
767
767
  console.warn("FeatureFlag is already initialized.");
768
768
  return;
769
769
  }
770
770
  try {
771
- await s.init(f, C), _e.value = await s.getFlags(), se.value = !0, ne.value = null;
771
+ await l.init(f, C), _e.value = await l.getFlags(), se.value = !0, ne.value = null;
772
772
  } catch (w) {
773
773
  console.error("Failed to initialize feature flags:", w), ne.value = w;
774
774
  }
775
775
  }, p = async (f) => {
776
776
  if (u())
777
777
  try {
778
- await s.setUser(f), _e.value = await s.getFlags(), ne.value = null;
778
+ await l.setUser(f), _e.value = await l.getFlags(), ne.value = null;
779
779
  } catch (C) {
780
780
  console.error("Failed to set user:", C), ne.value = C;
781
781
  }
782
- }, l = async (f) => p(`${st}-${f}`), O = (f, C, w = null) => {
782
+ }, s = async (f) => p(`${st}-${f}`), O = (f, C, w = null) => {
783
783
  if (!u()) return w;
784
784
  try {
785
- return s.getFlagValue(f, C) ?? w;
785
+ return l.getFlagValue(f, C) ?? w;
786
786
  } catch (A) {
787
787
  return console.error(`Error getting flag value for ${f}:`, A), w;
788
788
  }
789
789
  }, K = (f, C) => {
790
790
  if (!u()) return C ?? null;
791
791
  try {
792
- return s.getFlag(f) ?? C ?? null;
792
+ return l.getFlag(f) ?? C ?? null;
793
793
  } catch (w) {
794
794
  return console.error(`Error getting flag for ${f}:`, w), C ?? null;
795
795
  }
796
796
  }, P = async (f, C, w = null, A) => {
797
797
  if (!u()) return w;
798
798
  try {
799
- return await s.getUserFlagValue(f, C, w, A);
799
+ return await l.getUserFlagValue(f, C, w, A);
800
800
  } catch ($) {
801
801
  return console.error(`Error getting user flag value for ${C}:`, $), w;
802
802
  }
803
803
  }, W = async (f, C, w = null, A) => P(`${st}-${f}`, C, w, A), E = () => {
804
804
  try {
805
- s.reset();
805
+ l.reset();
806
806
  } catch (f) {
807
807
  console.error("Error resetting feature flags:", f);
808
808
  } finally {
@@ -815,7 +815,7 @@ function St(s = bt) {
815
815
  error: Ge(ne),
816
816
  init: _,
817
817
  setUser: p,
818
- setBusiness: l,
818
+ setBusiness: s,
819
819
  getFlagValue: O,
820
820
  getFlag: K,
821
821
  getUserFlagValue: P,
@@ -823,7 +823,7 @@ function St(s = bt) {
823
823
  reset: E
824
824
  };
825
825
  }
826
- var he = () => St(), g = /* @__PURE__ */ ((s) => (s.inventory_portal_must_use_transfer_template = "inventory_portal_must_use_transfer_template", s.inventory_portal_use_iframe = "inventory_portal_use_iframe", s.inventory_pos_adjust_v1 = "inventory_pos_adjust_v1", s.inventory_pos_adjust_v2_wastage = "inventory_pos_adjust_v2_wastage", s.inventory_pos_closing_recalculation = "inventory_pos_closing_recalculation", s.inventory_pos_closing_v1 = "inventory_pos_closing_v1", s.inventory_pos_closing_v2 = "inventory_pos_closing_v2", s.inventory_pos_convert_v1 = "inventory_pos_convert_v1", s.inventory_pos_costing = "inventory_pos_costing", s.inventory_pos_stock_return = "inventory_pos_stock_return", s.inventory_pos_transfer_require_fulfillment = "inventory_pos_transfer_require_fulfillment", s.inventory_purchase_order_approval = "inventory_purchase_order_approval", s.inventory_portal_xilnex_transfer_note = "inventory_portal_xilnex_transfer_note", s.inventory_portal_custom_attribute = "inventory_portal_custom_attribute", s.inventory_portal_purchase_order_v2 = "inventory_portal_purchase_order_v2", s.inventory_portal_accept_require_fulfillment = "inventory_portal_accept_require_fulfillment", s.inventory_portal_po_operate_v2 = "inventory_portal_po_operate_v2", s.inventory_pos_allow_receive_order = "inventory_pos_allow_receive_order", s.inventory_xilnex_opening_migration = "inventory_xilnex_opening_migration", s.inventory_ingredient_group = "inventory_ingredient_group", s.inventory_purchase_order_backdate = "inventory_purchase_order_backdate", s.inventory_synergy_opening_migration = "inventory_synergy_opening_migration", s.inventory_netsuite_inventory_transfer_out = "inventory_netsuite_inventory_transfer_out", s.inventory_portal_supplier_preparation_time = "inventory_portal_supplier_preparation_time", s.inventory_backdate_receive = "inventory_backdate_receive", s.inventory_portal_delivery_order_write = "inventory_portal_delivery_order_write", s.inventory_purchase_order_custom_cost = "inventory_purchase_order_custom_cost", s.inventory_bulk_import = "inventory_bulk_import", s.inventory_portal_surcharge = "inventory_portal_surcharge", s.inventory_purchase_order_cost_edit = "inventory_purchase_order_cost_edit", s.inventory_purchase_order_price_adjustment = "inventory_purchase_order_price_adjustment", s.inventory_purchase_order_workflow_allow_to_mark_completed = "inventory_purchase_order_workflow_allow_to_mark_completed", s.inventory_recipe_v2 = "inventory_recipe_v2", s.inventory_print_template = "inventory_print_template", s.inventory_purchase_order_email = "inventory_purchase_order_email", s.inventory_bulk_edit_recipes = "inventory_bulk_edit_recipes", s.inventory_stocksnapshot_cron_beta = "inventory_stocksnapshot_cron_beta", s.inventory_scheduler_daily_stock_snapshot = "inventory_scheduler_daily_stock_snapshot", s.inventory_scheduler_hourly_recalculation = "inventory_scheduler_hourly_recalculation", s.inventory_portal_production_item = "inventory_portal_production_item", s))(g || {});
826
+ var he = () => St(), g = /* @__PURE__ */ ((l) => (l.inventory_portal_must_use_transfer_template = "inventory_portal_must_use_transfer_template", l.inventory_portal_use_iframe = "inventory_portal_use_iframe", l.inventory_pos_adjust_v1 = "inventory_pos_adjust_v1", l.inventory_pos_adjust_v2_wastage = "inventory_pos_adjust_v2_wastage", l.inventory_pos_closing_recalculation = "inventory_pos_closing_recalculation", l.inventory_pos_closing_v1 = "inventory_pos_closing_v1", l.inventory_pos_closing_v2 = "inventory_pos_closing_v2", l.inventory_pos_convert_v1 = "inventory_pos_convert_v1", l.inventory_pos_costing = "inventory_pos_costing", l.inventory_pos_stock_return = "inventory_pos_stock_return", l.inventory_pos_transfer_require_fulfillment = "inventory_pos_transfer_require_fulfillment", l.inventory_purchase_order_approval = "inventory_purchase_order_approval", l.inventory_portal_xilnex_transfer_note = "inventory_portal_xilnex_transfer_note", l.inventory_portal_custom_attribute = "inventory_portal_custom_attribute", l.inventory_portal_purchase_order_v2 = "inventory_portal_purchase_order_v2", l.inventory_portal_accept_require_fulfillment = "inventory_portal_accept_require_fulfillment", l.inventory_portal_po_operate_v2 = "inventory_portal_po_operate_v2", l.inventory_pos_allow_receive_order = "inventory_pos_allow_receive_order", l.inventory_xilnex_opening_migration = "inventory_xilnex_opening_migration", l.inventory_ingredient_group = "inventory_ingredient_group", l.inventory_purchase_order_backdate = "inventory_purchase_order_backdate", l.inventory_synergy_opening_migration = "inventory_synergy_opening_migration", l.inventory_netsuite_inventory_transfer_out = "inventory_netsuite_inventory_transfer_out", l.inventory_portal_supplier_preparation_time = "inventory_portal_supplier_preparation_time", l.inventory_backdate_receive = "inventory_backdate_receive", l.inventory_portal_delivery_order_write = "inventory_portal_delivery_order_write", l.inventory_purchase_order_custom_cost = "inventory_purchase_order_custom_cost", l.inventory_bulk_import = "inventory_bulk_import", l.inventory_portal_surcharge = "inventory_portal_surcharge", l.inventory_purchase_order_cost_edit = "inventory_purchase_order_cost_edit", l.inventory_purchase_order_price_adjustment = "inventory_purchase_order_price_adjustment", l.inventory_purchase_order_workflow_allow_to_mark_completed = "inventory_purchase_order_workflow_allow_to_mark_completed", l.inventory_recipe_v2 = "inventory_recipe_v2", l.inventory_print_template = "inventory_print_template", l.inventory_purchase_order_email = "inventory_purchase_order_email", l.inventory_bulk_edit_recipes = "inventory_bulk_edit_recipes", l.inventory_stocksnapshot_cron_beta = "inventory_stocksnapshot_cron_beta", l.inventory_portal_production_item = "inventory_portal_production_item", l))(g || {});
827
827
  const Ct = /* @__PURE__ */ new Set([
828
828
  // vivo pizza prod
829
829
  "business_6687e91fa7240b001ba3f4c2",
@@ -888,11 +888,11 @@ const h = de(lt()), wt = () => ({
888
888
  },
889
889
  get restaurantPosVersion() {
890
890
  var _;
891
- const s = Ve();
891
+ const l = Ve();
892
892
  return (_ = Ke().restaurants.value.find(
893
893
  (p) => {
894
- var l;
895
- return p._id === ((l = s._currentLocation) == null ? void 0 : l.doc._id);
894
+ var s;
895
+ return p._id === ((s = l._currentLocation) == null ? void 0 : s.doc._id);
896
896
  }
897
897
  )) == null ? void 0 : _.posVersion;
898
898
  },
@@ -1010,9 +1010,9 @@ const h = de(lt()), wt = () => ({
1010
1010
  return h.value.report_portal_po_forecast_days_default;
1011
1011
  },
1012
1012
  async init() {
1013
- const s = Ke(), { init: u, setBusiness: _ } = he(), p = ft(), l = s.namespace.value === "prod";
1013
+ const l = Ke(), { init: u, setBusiness: _ } = he(), p = ft(), s = l.namespace.value === "prod";
1014
1014
  await u({
1015
- apiKey: l ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
1015
+ apiKey: s ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
1016
1016
  // url: 'https://flag.feedme.farm/api/v1/', // optional -> this is a default URL value
1017
1017
  // enableAnalytics: true, // optional, defaults to true
1018
1018
  // cacheFlags: true // optional, defaults to true
@@ -1022,17 +1022,17 @@ const h = de(lt()), wt = () => ({
1022
1022
  h.value = lt();
1023
1023
  return;
1024
1024
  }
1025
- const P = ((A = s.currentBusiness.value) == null ? void 0 : A._id) ?? "";
1025
+ const P = ((A = l.currentBusiness.value) == null ? void 0 : A._id) ?? "";
1026
1026
  await _(P);
1027
1027
  const W = `business_${P}`, E = K.type === ot.enum.warehouse, f = (
1028
1028
  // if menu v4, must manual receive && must use outlet app
1029
- (($ = s.currentBusiness.value) == null ? void 0 : $.menuVersion) === "v4" && // more guard for businesses using menu v4, only those listed for manual receive will be included
1029
+ (($ = l.currentBusiness.value) == null ? void 0 : $.menuVersion) === "v4" && // more guard for businesses using menu v4, only those listed for manual receive will be included
1030
1030
  // TODO: may be removed to use menu version only
1031
1031
  Ct.has(this.businessDbName)
1032
1032
  ), C = xt.has(W) || y(g.inventory_portal_must_use_transfer_template), w = y(g.inventory_purchase_order_backdate) && (this.isWarehouse || p.state.closing !== null);
1033
1033
  h.value = {
1034
1034
  isLoaded: !0,
1035
- enableTotalCost: ((Y = s.currentBusiness.value) == null ? void 0 : Y.menuVersion) === "v4",
1035
+ enableTotalCost: ((Y = l.currentBusiness.value) == null ? void 0 : Y.menuVersion) === "v4",
1036
1036
  enableBackdatePo: w,
1037
1037
  autoReceiveWarehouse: E && !f,
1038
1038
  manualReceive: f,
@@ -1098,28 +1098,28 @@ const h = de(lt()), wt = () => ({
1098
1098
  };
1099
1099
  }, "feature");
1100
1100
  },
1101
- async awaitFeatureLoaded(s) {
1101
+ async awaitFeatureLoaded(l) {
1102
1102
  return new Promise((u) => {
1103
1103
  const _ = () => {
1104
- h.value.isLoaded ? u(s()) : setTimeout(_, 100);
1104
+ h.value.isLoaded ? u(l()) : setTimeout(_, 100);
1105
1105
  };
1106
1106
  _();
1107
1107
  });
1108
1108
  }
1109
1109
  });
1110
- function y(s, u) {
1110
+ function y(l, u) {
1111
1111
  u = u === void 0 ? null : u;
1112
1112
  const { getFlagValue: _ } = he();
1113
- return _(s, (p) => p === "true") ?? u;
1113
+ return _(l, (p) => p === "true") ?? u;
1114
1114
  }
1115
- function Et(s) {
1115
+ function Et(l) {
1116
1116
  const { getFlagValue: u } = he();
1117
- return u(s, (p) => p.trim() ? p.trim() : null) ?? null;
1117
+ return u(l, (p) => p.trim() ? p.trim() : null) ?? null;
1118
1118
  }
1119
- function Ot(s, u) {
1119
+ function Ot(l, u) {
1120
1120
  const { getFlagValue: _ } = he();
1121
- return _(s, (l) => {
1122
- const O = parseInt(l, 10);
1121
+ return _(l, (s) => {
1122
+ const O = parseInt(s, 10);
1123
1123
  return isNaN(O) ? null : O;
1124
1124
  }) ?? u;
1125
1125
  }
@@ -1,4 +1,4 @@
1
- import { h as n } from "./date2-Bidui0P3.js";
1
+ import { h as n } from "./date2-BJfdfeJO.js";
2
2
  function d(r) {
3
3
  const t = a(r);
4
4
  return t === null ? "" : n(t);
@@ -1,24 +1,24 @@
1
1
  import { components as ce, useDialogChild as Pe, useSnackbar as de, useDialog as Me, FmButtonVariant as te } from "@feedmepos/ui-library";
2
2
  import { defineStore as pe } from "pinia";
3
3
  import { F as xe } from "./form-mode.enum-BKiNVH6A.js";
4
- import { u as fe } from "./purchase-order-template-Dvr65U29.js";
4
+ import { u as fe } from "./purchase-order-template-D4JHGs3l.js";
5
5
  import { ref as I, h as oe, defineComponent as ye, resolveComponent as W, createElementBlock as F, openBlock as O, createElementVNode as N, createCommentVNode as J, normalizeClass as Z, createTextVNode as Be, toDisplayString as q, unref as B, createVNode as j, withCtx as me, Fragment as Y, renderList as ae, onMounted as Le, computed as H, watch as Qe, createSlots as Ue, createBlock as re } from "vue";
6
- import { a as X, c as ve, r as L, u as ie, l as qe, j as _e, s as Ve, R as we } from "./app-Ci7Aaea6.js";
6
+ import { a as X, c as ve, r as L, u as ie, l as qe, j as _e, s as Ve, R as we } from "./app-BWvf7Pbw.js";
7
7
  import { useRouter as He } from "vue-router";
8
- import { a as je } from "./FmMultiselectDialog-B1vR5H5H.js";
8
+ import { a as je } from "./FmMultiselectDialog-QrLJQhIf.js";
9
9
  import { D as ne, R as U } from "./row-action.enum-DQ9bJ_uv.js";
10
10
  import { c as ze } from "./component-kqxARxvM.js";
11
- import { f as Ye } from "./format-time-from-id-Dw-n4jjX.js";
11
+ import { f as Ye } from "./format-time-from-id-B6Oxxcmv.js";
12
12
  import { useI18n as he, useCoreStore as Ie } from "@feedmepos/mf-common";
13
- import { t as K, a as Ce, d as Oe, s as Ae, r as Ke } from "./xlsx.util-CuxvUzGN.js";
13
+ import { t as K, a as Ce, d as Oe, s as Ae, r as Ke } from "./xlsx.util-Cit0fL6n.js";
14
14
  import { F as Ge } from "./FmDroppableField-J0tG_U3w.js";
15
- import { a as G, c as We, t as se, g as ue } from "./number-Zlh6TxmH.js";
16
- import { f as Je } from "./date2-Bidui0P3.js";
17
- import { u as ge } from "./supplier-JOAqqBkF.js";
18
- import { a as Ze, B as Xe } from "./rules-FAZ-EkdF.js";
19
- import { u as Te } from "./netsuite-BTb2NFU5.js";
20
- import { u as et } from "./duplicate-template-D9TiIFbd.js";
21
- import { u as tt } from "./vue-i18n-CsIY6eJ6.js";
15
+ import { a as G, c as We, t as se, g as ue } from "./number-4scgLaMY.js";
16
+ import { f as Je } from "./date2-BJfdfeJO.js";
17
+ import { u as ge } from "./supplier-CnEm0FdT.js";
18
+ import { a as Ze, B as Xe } from "./rules-CEKN0fON.js";
19
+ import { u as Te } from "./netsuite-jqgyyem9.js";
20
+ import { u as et } from "./duplicate-template-BMd6tF6Y.js";
21
+ import { u as tt } from "./vue-i18n-XR3XXGIN.js";
22
22
  function De(n) {
23
23
  const e = X(), o = n.sku, d = e.skuById[o._id];
24
24
  if (d.unit._id !== o.unit._id) return !0;
@@ -1,10 +1,10 @@
1
- import { a as w, t as H, f as T } from "./number-Zlh6TxmH.js";
2
- import { u as P } from "./feature-HqzShic7.js";
1
+ import { a as w, t as H, f as T } from "./number-4scgLaMY.js";
2
+ import { u as P } from "./feature-Bt9vQSu_.js";
3
3
  import { useCoreStore as y } from "@feedmepos/mf-common";
4
- import { a as g, g as k, l as j, d as S } from "./app-Ci7Aaea6.js";
5
- import { b as N, d as $, s as I } from "./xlsx.util-CuxvUzGN.js";
6
- import { f as _ } from "./date2-Bidui0P3.js";
7
- import { I as O } from "./rules-FAZ-EkdF.js";
4
+ import { a as g, g as k, l as j, d as S } from "./app-BWvf7Pbw.js";
5
+ import { b as N, d as $, s as I } from "./xlsx.util-Cit0fL6n.js";
6
+ import { f as _ } from "./date2-BJfdfeJO.js";
7
+ import { I as O } from "./rules-CEKN0fON.js";
8
8
  function U() {
9
9
  return {
10
10
  low: 6,
@@ -1,8 +1,8 @@
1
1
  import { ref as p, computed as m } from "vue";
2
- import { u as C } from "./netsuite-BTb2NFU5.js";
3
- import { A as $, a as S, u as f, m as L, E as h } from "./app-Ci7Aaea6.js";
2
+ import { u as C } from "./netsuite-jqgyyem9.js";
3
+ import { A as $, a as S, u as f, m as L, E as h } from "./app-BWvf7Pbw.js";
4
4
  import { useSnackbar as x } from "@feedmepos/ui-library";
5
- import { u as b } from "./feature-HqzShic7.js";
5
+ import { u as b } from "./feature-Bt9vQSu_.js";
6
6
  function k() {
7
7
  return {
8
8
  setting: {
@@ -1,4 +1,4 @@
1
- import { y as x, ar as V, as as Ve, at as Q, aj as Zl, Y as Er, au as ke, av as Jt, aw as qt } from "./app-Ci7Aaea6.js";
1
+ import { y as x, ar as V, as as Ve, at as Q, aj as Zl, Y as Er, au as ke, av as Jt, aw as qt } from "./app-BWvf7Pbw.js";
2
2
  function Hl(t, e) {
3
3
  for (var r = 0; r < e.length; r++) {
4
4
  const n = e[r];
@@ -1,4 +1,4 @@
1
- import { y as h } from "./app-Ci7Aaea6.js";
1
+ import { y as h } from "./app-BWvf7Pbw.js";
2
2
  var a = { exports: {} };
3
3
  function x(r, s = 100, u = {}) {
4
4
  if (typeof r != "function")