@feedmepos/mf-inventory-portal 1.7.0-dev.8 → 1.7.0

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 (90) hide show
  1. package/dist/{App-DGt1TKAe.js → App-mfv976r3.js} +4 -4
  2. package/dist/{ApprovalView-DA6vPFB8.js → ApprovalView-B3nQokUv.js} +8 -8
  3. package/dist/{BindingsDialog-CdcKh6UZ.js → BindingsDialog-DnWLIslN.js} +2 -2
  4. package/dist/{BindingsPicker-C0q1FNa6.js → BindingsPicker-BOPzfVXq.js} +2 -2
  5. package/dist/{BindingsTable-BnBAlW1t.js → BindingsTable-Cky7o_NG.js} +3 -3
  6. package/dist/{BulkReceiveRequestView-BiiwvM-O.js → BulkReceiveRequestView-CyFXAM_t.js} +19 -19
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DsY0X4Er.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-dRYFLJVj.js} +1 -1
  8. package/dist/{ClosingDraftView-CNEvYNfz.js → ClosingDraftView-BsREbRBA.js} +19 -19
  9. package/dist/{ClosingHistoryView-BvaVrfjv.js → ClosingHistoryView-J8XyfB2_.js} +5 -5
  10. package/dist/{ClosingTemplateView-DxPGJz0K.js → ClosingTemplateView-CkiPhzJ8.js} +16 -16
  11. package/dist/{DefaultView-Mqtuxaq1.js → DefaultView-BqtI-DBZ.js} +2 -2
  12. package/dist/{DeliveryOrderPrintPreview--IKofxUf.js → DeliveryOrderPrintPreview-Bo4KtO5Q.js} +2 -2
  13. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-CZLIa7_0.js → EmailDialog.vue_vue_type_script_setup_true_lang-hBB0AHTL.js} +23 -23
  14. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-cu92NvT7.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BDni_x3F.js} +1 -1
  15. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DJSDKAcv.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BkEFIDXV.js} +2 -2
  16. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DC21Ybcs.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Bu-ccw4K.js} +2 -2
  17. package/dist/{FmMultiselectDialog-DNMu6Pyo.js → FmMultiselectDialog-B1vR5H5H.js} +2 -2
  18. package/dist/{FmMultiselectDialog-BRN_fVWG.js → FmMultiselectDialog-DMB-1gqC.js} +1 -1
  19. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-JjqnjgF6.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BsjlumX9.js} +5 -5
  20. package/dist/{ImportView-CzhINr8x.js → ImportView-xLqTJPKm.js} +6 -6
  21. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-UX70sCkO.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DuxQPayd.js} +1 -1
  22. package/dist/{IngredientGroupView-D34lU0nT.js → IngredientGroupView-DQjBoKhR.js} +5 -5
  23. package/dist/{IngredientsView-C5APBsVv.js → IngredientsView-Be4k9xvZ.js} +15 -15
  24. package/dist/{IntegrationExplorerView-B9CMZOyM.js → IntegrationExplorerView-Dbcybdvj.js} +4 -4
  25. package/dist/{IntegrationView-C2QFD6iK.js → IntegrationView-C5t2Rsq1.js} +13 -13
  26. package/dist/{InventoryBindingForm-B6KPHHXM.js → InventoryBindingForm-B7RefQSJ.js} +1 -1
  27. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DqTs4tkd.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-lYl5CWxn.js} +5 -5
  28. package/dist/{InventoryBindingSummary-C3pSlQIV.js → InventoryBindingSummary-BKF-B5Kf.js} +1 -1
  29. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BBj2fp9p.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DhpB51X8.js} +1 -1
  30. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BQcze770.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Dhf-ROKc.js} +1 -1
  31. package/dist/{ProductionView-D3hxR4Al.js → ProductionView-BAkzsaXt.js} +7 -7
  32. package/dist/{PublishView-dyIbB5oY.js → PublishView-u1DSi_3y.js} +3 -3
  33. package/dist/{PurchaseOrderPrintPreview-BtecmMvJ.js → PurchaseOrderPrintPreview-spvdjRxW.js} +2 -2
  34. package/dist/{ReceiveRequestView-CsyLhbWO.js → ReceiveRequestView-TfjSKJ7q.js} +13 -13
  35. package/dist/{RecipeView-C0GFeSDy.js → RecipeView-DB_zPDd6.js} +17 -17
  36. package/dist/{SettingsView-CLjyeHBv.js → SettingsView-DsFxSs0T.js} +4 -4
  37. package/dist/{StockView-CGiQO7JM.js → StockView-DEkXxk4b.js} +21 -21
  38. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bpa_-7Xw.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BLWES2jH.js} +1 -1
  39. package/dist/{SupplierView-BxGah90N.js → SupplierView-Di8rBh-_.js} +12 -12
  40. package/dist/{SurchargeView-_K_rxa1E.js → SurchargeView-s7i5_7XF.js} +6 -6
  41. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-C5iFkaac.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-18j2ZpX-.js} +2 -2
  42. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CJHiozGf.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-aSnsm9Sw.js} +1 -1
  43. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-XTJW-ITd.js → TransferDetails.vue_vue_type_script_setup_true_lang-CpUyhO4Q.js} +20 -20
  44. package/dist/{TransferTemplateView-BEVHHa3g.js → TransferTemplateView-C94eigII.js} +20 -20
  45. package/dist/{UnitCostHistoryView-BHYOJdh7.js → UnitCostHistoryView-DTPzSJrM.js} +4 -4
  46. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DbqnEmeM.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-B3NPv8Eb.js} +4 -4
  47. package/dist/{UnitView-BtwxautF.js → UnitView-DdGUw_tx.js} +7 -7
  48. package/dist/{WarehouseView-iCaNZRIz.js → WarehouseView-BQxSYVvF.js} +5 -5
  49. package/dist/{WastageTemplateView-Bc6GJd4d.js → WastageTemplateView-Bjc1PUko.js} +14 -14
  50. package/dist/{app-BP2iMkXf.js → app-Ci7Aaea6.js} +109 -103
  51. package/dist/app.js +1 -1
  52. package/dist/{closing-template-5y8eotCC.js → closing-template-Chy8WrlR.js} +1 -1
  53. package/dist/{date2-Bfw67PjS.js → date2-Bidui0P3.js} +1 -1
  54. package/dist/{dayjs.min-B3qfrpYu.js → dayjs.min-CFgtzCV7.js} +1 -1
  55. package/dist/{decimal-SalS1cxI.js → decimal-C9gpKKZI.js} +2 -2
  56. package/dist/{defineDeepModel-CCBhCBwm.js → defineDeepModel-jLHm8HR1.js} +1 -1
  57. package/dist/{duplicate-template-C0FI8Pt9.js → duplicate-template-D9TiIFbd.js} +1 -1
  58. package/dist/{feature-Cp_nrPL6.js → feature-HqzShic7.js} +130 -125
  59. package/dist/{format-time-from-id-BCn8GnjQ.js → format-time-from-id-Dw-n4jjX.js} +1 -1
  60. package/dist/{format-unit-display-CXbG9MgA.js → format-unit-display-C8RuVRS1.js} +12 -12
  61. package/dist/{import-export.helper-D4GvjZUO.js → import-export.helper-CuhpmMlh.js} +6 -6
  62. package/dist/{index-CzkezMbA.js → index-BbLw-k2u.js} +1 -1
  63. package/dist/{index-xDQmlVeP.js → index-BvJJtxfs.js} +3 -3
  64. package/dist/{index-DvTfqbiM.js → index-CsDKvy88.js} +1 -1
  65. package/dist/{inventory-core-dart.default-CVpYUeBn.js → inventory-core-dart.default-l09rPSab.js} +1 -1
  66. package/dist/{jszip.min-CfuFlbgP.js → jszip.min-Q-x0ALLG.js} +129 -129
  67. package/dist/{lz-string-D9ANZJke.js → lz-string-BeXPK_xO.js} +1 -1
  68. package/dist/{netsuite-Dijt7bYw.js → netsuite-BTb2NFU5.js} +2 -2
  69. package/dist/{number-DI4WG85J.js → number-Zlh6TxmH.js} +3 -3
  70. package/dist/{predefined-templates-1-zDE0Iu.js → predefined-templates-CXh7OWR3.js} +1 -1
  71. package/dist/{purchase-order-template-CbI-13Ym.js → purchase-order-template-Dvr65U29.js} +1 -1
  72. package/dist/{recalculationUtils-B2r9j-19.js → recalculationUtils-BkF7XUdf.js} +1 -1
  73. package/dist/{rules-DxJtL6OC.js → rules-FAZ-EkdF.js} +2 -2
  74. package/dist/{stock-6C0d5Fe8.js → stock-BEJdUeLP.js} +1 -1
  75. package/dist/{stock-BDGgOFuW.js → stock-CGowMSCF.js} +3 -3
  76. package/dist/stores/feature.d.ts +2 -0
  77. package/dist/{supplier-BVmJ5p3z.js → supplier-JOAqqBkF.js} +2 -2
  78. package/dist/{surcharge-BRNgbJmg.js → surcharge-gdAEvtj9.js} +1 -1
  79. package/dist/tsconfig.app.tsbuildinfo +1 -1
  80. package/dist/{uom-rules-Czbq4YOl.js → uom-rules-By1vxOaF.js} +1 -1
  81. package/dist/{use-ingredient-select-dialog-F4E4y-uM.js → use-ingredient-select-dialog-B-bFjj3N.js} +2 -2
  82. package/dist/{use-inventory-binding-dialog-CETXyyXW.js → use-inventory-binding-dialog-o-pedZ68.js} +2 -2
  83. package/dist/{use-template-enabled-locations-BXD1IoQM.js → use-template-enabled-locations-5H3RhSuH.js} +2 -2
  84. package/dist/{use-transfer-locations-DSHSzGPR.js → use-transfer-locations-o51Ss7cr.js} +2 -2
  85. package/dist/{useHrmPermission-tg3v6qrq.js → useHrmPermission-DzihMP-i.js} +1 -1
  86. package/dist/{useNavigationMenu-tbjt_qJ2.js → useNavigationMenu-B_d4hWSX.js} +30 -30
  87. package/dist/{useSseClient-BvEOOnEx.js → useSseClient-Cd0it8zJ.js} +1 -1
  88. package/dist/{vue-i18n-D1uxFCER.js → vue-i18n-CsIY6eJ6.js} +263 -263
  89. package/dist/{xlsx.util-CRhZzioa.js → xlsx.util-CuxvUzGN.js} +2 -2
  90. package/package.json +2 -2
@@ -1,12 +1,12 @@
1
1
  var ht = Object.defineProperty;
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, _);
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, _);
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-BP2iMkXf.js";
5
+ import { Y as ve, a as ft, u as Ve, j as ot } from "./app-Ci7Aaea6.js";
6
6
  import { readonly as Ge, ref as de } from "vue";
7
- import "./inventory-core-dart.default-CVpYUeBn.js";
7
+ import "./inventory-core-dart.default-l09rPSab.js";
8
8
  var qe = { exports: {} };
9
- (function(l, u) {
9
+ (function(s, u) {
10
10
  (function(_, p) {
11
11
  p(u);
12
12
  })(ve, function(_) {
@@ -34,31 +34,31 @@ var qe = { exports: {} };
34
34
  e && e(a, null), n(a);
35
35
  }
36
36
  });
37
- } }, s = function() {
38
- return s = Object.assign || function(i) {
37
+ } }, l = function() {
38
+ return l = 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
- }, s.apply(this, arguments);
41
+ }, l.apply(this, arguments);
42
42
  };
43
43
  function O(i, t, e, r) {
44
44
  return new (e || (e = Promise))(function(n, a) {
45
- function o(y) {
45
+ function o(m) {
46
46
  try {
47
- d(r.next(y));
47
+ d(r.next(m));
48
48
  } catch (c) {
49
49
  a(c);
50
50
  }
51
51
  }
52
- function v(y) {
52
+ function v(m) {
53
53
  try {
54
- d(r.throw(y));
54
+ d(r.throw(m));
55
55
  } catch (c) {
56
56
  a(c);
57
57
  }
58
58
  }
59
- function d(y) {
59
+ function d(m) {
60
60
  var c;
61
- y.done ? n(y.value) : (c = y.value, c instanceof e ? c : new e(function(b) {
61
+ m.done ? n(m.value) : (c = m.value, c instanceof e ? c : new e(function(b) {
62
62
  b(c);
63
63
  })).then(o, v);
64
64
  }
@@ -74,7 +74,7 @@ var qe = { exports: {} };
74
74
  return this;
75
75
  }), a;
76
76
  function v(d) {
77
- return function(y) {
77
+ return function(m) {
78
78
  return function(c) {
79
79
  if (e) throw new TypeError("Generator is already executing.");
80
80
  for (; o; ) try {
@@ -120,7 +120,7 @@ var qe = { exports: {} };
120
120
  }
121
121
  if (5 & c[0]) throw c[1];
122
122
  return { value: c[0] ? c[1] : void 0, done: !0 };
123
- }([d, y]);
123
+ }([d, m]);
124
124
  };
125
125
  }
126
126
  }
@@ -175,7 +175,7 @@ var qe = { exports: {} };
175
175
  }));
176
176
  }
177
177
  function Y(i) {
178
- return s(s({}, i), { identity: i.identity ? s(s({}, i.identity), { traits: $(i.identity.traits || {}) }) : void 0 });
178
+ return l(l({}, i), { identity: i.identity ? l(l({}, 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(s(s({}, e.loadingState), { isFetching: !0 }));
188
+ e.log("Get Flags"), e.isLoading = !0, e.loadingState.isFetching || e.setLoadingState(l(l({}, e.loadingState), { isFetching: !0 }));
189
189
  var o = "".concat(e.getContext().identity), v = function(d) {
190
- var y, c, b, k;
190
+ var m, c, b, k;
191
191
  if (d && o === "".concat(e.getContext().identity)) {
192
- var V = d.flags, F = d.traits, U = d.identifier;
192
+ var V = d.flags, I = d.traits, U = d.identifier;
193
193
  e.isLoading = !1;
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) {
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) {
198
198
  N[S.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: S.transient, value: S.trait_value };
199
- }), e.oldFlags = s({}, e.flags);
200
- var G = E(e.oldFlags, I), re = E((y = e.evaluationContext.identity) === null || y === void 0 ? void 0 : y.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 {
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 {
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 = 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);
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);
208
208
  e.log("Setting Datadog user", Z), e.datadogRum.client.setUser(Z);
209
209
  }
210
210
  } catch (S) {
@@ -223,14 +223,14 @@ var qe = { exports: {} };
223
223
  }
224
224
  };
225
225
  return a.identity ? Promise.all([a.identity.traits && Object.keys(a.identity.traits).length || !a.identity.identifier ? e.getJSON(n + "identities/", "POST", JSON.stringify({ identifier: a.identity.identifier, transient: a.identity.transient, traits: Object.entries(a.identity.traits).map(function(d) {
226
- var y = d[0], c = d[1];
227
- return { trait_key: y, trait_value: c == null ? void 0 : c.value, transient: c == null ? void 0 : c.transient };
226
+ var m = d[0], c = d[1];
227
+ return { trait_key: m, trait_value: c == null ? void 0 : c.value, transient: c == null ? void 0 : c.transient };
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 = s(s({}, e.evaluationContext.identity), { traits: {} }), v(d == null ? void 0 : d[0]);
231
+ return e.evaluationContext.identity = l(l({}, e.evaluationContext.identity), { traits: {} }), v(d == null ? void 0 : d[0]);
232
232
  }).catch(function(d) {
233
- var y = d.message, c = new Error(y);
233
+ var m = d.message, c = new Error(m);
234
234
  return Promise.reject(c);
235
235
  }) : e.getJSON(n + "flags/").then(function(d) {
236
236
  return v({ flags: d, traits: void 0 });
@@ -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(s(s({}, a), { evaluationEvent: e.evaluationEvent })), e.updateEventStorage();
243
+ e.evaluationEvent || (e.evaluationEvent = {}), e.evaluationEvent[e.evaluationContext.environment.apiKey] = {}, e.setState(l(l({}, 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 = s(s({}, n), { environment: n.environment || e.evaluationContext.environment }), e.initialised ? e.getFlags() : Promise.resolve();
268
+ return e.evaluationContext = l(l({}, 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(s(s({}, e.getContext()), r));
272
+ return e.setContext(l(l({}, e.getContext()), r));
273
273
  }, this.setTrait = function(r, n) {
274
274
  var a;
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]]))) }) }));
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]]))) }) }));
276
276
  }, this.setTraits = function(r) {
277
277
  var n;
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) {
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) {
279
279
  var o = a[0], v = a[1];
280
280
  return [o, A(v) ? v : { value: v }];
281
281
  }))) }) }));
@@ -289,17 +289,17 @@ var qe = { exports: {} };
289
289
  }, this.getJSON = function(r, n, a) {
290
290
  var o, v = e;
291
291
  v.evaluationContext;
292
- var d = v.headers, y = { method: n || "GET", body: a, cache: "no-cache", headers: {} };
293
- e.evaluationContext.environment && (y.headers["X-Environment-Key"] = e.evaluationContext.environment.apiKey), n && n !== "GET" && (y.headers["Content-Type"] = "application/json; charset=utf-8"), d && Object.assign(y.headers, d), C || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
292
+ var d = v.headers, m = { method: n || "GET", body: a, cache: "no-cache", headers: {} };
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
- return C(r, y).then(function(b) {
296
- var k, V, F = "".concat((k = e.evaluationContext.identity) === null || k === void 0 ? void 0 : k.identifier);
297
- if (c === F) {
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) {
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 I = parseFloat(U);
301
- if (isNaN(I)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
302
- e.timestamp = I;
300
+ var F = parseFloat(U);
301
+ if (isNaN(F)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
302
+ e.timestamp = F;
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(F));
315
+ e.log("Received response with identity mismatch, ignoring response. Requested: ".concat(c, ", Current: ").concat(I));
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, y, 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;
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;
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, y = 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`");
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`");
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
- })) : {} } : a.identity, this.evaluationContext = a, this.api = d, this.headers = y, 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(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) {
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) {
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(s(s({}, z), { evaluationEvent: B[L.evaluationContext.environment.apiKey] }));
375
+ L.log("Retrieved events from cache", q), L.setState(l(l({}, 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, Fe, Ie, 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, Ie, Fe, 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(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) {
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) {
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 I ? [3, 4] : [4, this.getFlags()];
394
+ return F ? [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 I ? [3, 9] : [4, this.getFlags()];
404
+ return F ? [3, 9] : [4, this.getFlags()];
405
405
  case 8:
406
406
  return H.sent(), [3, 10];
407
407
  case 9:
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));
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));
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 I ? [3, 11] : [4, this.getFlags()];
434
+ return F ? [3, 11] : [4, this.getFlags()];
435
435
  case 10:
436
436
  return D.sent(), [3, 12];
437
437
  case 11:
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));
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));
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 = s({}, t), this.log("Loading state changed", t), (e = this._triggerLoadingState) === null || e === void 0 || e.call(this));
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));
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) {
@@ -643,11 +643,11 @@ Consider loading an EventSource polyfill and making it available globally as Eve
643
643
  return c.toLowerCase() in v;
644
644
  } } };
645
645
  };
646
- for (var y in n.open(t.method || "get", i, !0), n.onload = function() {
646
+ for (var m in n.open(t.method || "get", i, !0), n.onload = function() {
647
647
  n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(c, b, k) {
648
648
  a.push(b = b.toLowerCase()), o.push([b, k]), v[b] = v[b] ? v[b] + "," + k : k;
649
649
  }), e(d());
650
- }, n.onerror = r, n.withCredentials = t.credentials == "include", t.headers) n.setRequestHeader(y, t.headers[y]);
650
+ }, n.onerror = r, n.withCredentials = t.credentials == "include", t.headers) n.setRequestHeader(m, t.headers[m]);
651
651
  n.send(t.body || null);
652
652
  });
653
653
  }, Ze = He({ AsyncStorage: p, fetch: Ye, eventSource: We });
@@ -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((s, O) => (s[O.feature.name] = O, s), {});
677
+ const p = _.reduce((l, O) => (l[O.feature.name] = O, l), {});
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 s;
708
+ var l;
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: ((s = p.value) == null ? void 0 : s.toString()) ?? null
715
+ value: ((l = p.value) == null ? void 0 : l.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 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;
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;
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, s) {
745
+ async getUserFlagValue(u, _, p = null, l) {
746
746
  var K;
747
747
  const O = this.userContext;
748
748
  try {
749
- return await this.setUser(u), this.getFlagValue(_, s) ?? p;
749
+ return await this.setUser(u), this.getFlagValue(_, l) ?? 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(l = bt) {
764
+ function St(s = 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 l.init(f, C), _e.value = await l.getFlags(), se.value = !0, ne.value = null;
771
+ await s.init(f, C), _e.value = await s.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 l.setUser(f), _e.value = await l.getFlags(), ne.value = null;
778
+ await s.setUser(f), _e.value = await s.getFlags(), ne.value = null;
779
779
  } catch (C) {
780
780
  console.error("Failed to set user:", C), ne.value = C;
781
781
  }
782
- }, s = async (f) => p(`${st}-${f}`), O = (f, C, w = null) => {
782
+ }, l = async (f) => p(`${st}-${f}`), O = (f, C, w = null) => {
783
783
  if (!u()) return w;
784
784
  try {
785
- return l.getFlagValue(f, C) ?? w;
785
+ return s.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 l.getFlag(f) ?? C ?? null;
792
+ return s.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 l.getUserFlagValue(f, C, w, A);
799
+ return await s.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
- l.reset();
805
+ s.reset();
806
806
  } catch (f) {
807
807
  console.error("Error resetting feature flags:", f);
808
808
  } finally {
@@ -815,7 +815,7 @@ function St(l = bt) {
815
815
  error: Ge(ne),
816
816
  init: _,
817
817
  setUser: p,
818
- setBusiness: s,
818
+ setBusiness: l,
819
819
  getFlagValue: O,
820
820
  getFlag: K,
821
821
  getUserFlagValue: P,
@@ -823,7 +823,7 @@ function St(l = bt) {
823
823
  reset: E
824
824
  };
825
825
  }
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_scheduler_daily_stock_snapshot = "inventory_scheduler_daily_stock_snapshot", l.inventory_scheduler_hourly_recalculation = "inventory_scheduler_hourly_recalculation", l))(g || {});
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 || {});
827
827
  const Ct = /* @__PURE__ */ new Set([
828
828
  // vivo pizza prod
829
829
  "business_6687e91fa7240b001ba3f4c2",
@@ -872,6 +872,7 @@ function lt() {
872
872
  inventory_purchase_order_email: !1,
873
873
  inventory_bulk_edit_recipes: !1,
874
874
  inventory_receive_request_beta: !1,
875
+ inventory_portal_production_item: !1,
875
876
  report_portal_po_forecast_days_constraint: null,
876
877
  report_portal_po_forecast_days_default: 7
877
878
  };
@@ -887,11 +888,11 @@ const h = de(lt()), wt = () => ({
887
888
  },
888
889
  get restaurantPosVersion() {
889
890
  var _;
890
- const l = Ve();
891
+ const s = Ve();
891
892
  return (_ = Ke().restaurants.value.find(
892
893
  (p) => {
893
- var s;
894
- return p._id === ((s = l._currentLocation) == null ? void 0 : s.doc._id);
894
+ var l;
895
+ return p._id === ((l = s._currentLocation) == null ? void 0 : l.doc._id);
895
896
  }
896
897
  )) == null ? void 0 : _.posVersion;
897
898
  },
@@ -999,6 +1000,9 @@ const h = de(lt()), wt = () => ({
999
1000
  get enableReceiveRequestBeta() {
1000
1001
  return h.value.inventory_receive_request_beta;
1001
1002
  },
1003
+ get enableProductionItem() {
1004
+ return h.value.inventory_portal_production_item;
1005
+ },
1002
1006
  get poForecastDaysConstraint() {
1003
1007
  return h.value.report_portal_po_forecast_days_constraint;
1004
1008
  },
@@ -1006,9 +1010,9 @@ const h = de(lt()), wt = () => ({
1006
1010
  return h.value.report_portal_po_forecast_days_default;
1007
1011
  },
1008
1012
  async init() {
1009
- const l = Ke(), { init: u, setBusiness: _ } = he(), p = ft(), s = l.namespace.value === "prod";
1013
+ const s = Ke(), { init: u, setBusiness: _ } = he(), p = ft(), l = s.namespace.value === "prod";
1010
1014
  await u({
1011
- apiKey: s ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
1015
+ apiKey: l ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
1012
1016
  // url: 'https://flag.feedme.farm/api/v1/', // optional -> this is a default URL value
1013
1017
  // enableAnalytics: true, // optional, defaults to true
1014
1018
  // cacheFlags: true // optional, defaults to true
@@ -1018,71 +1022,72 @@ const h = de(lt()), wt = () => ({
1018
1022
  h.value = lt();
1019
1023
  return;
1020
1024
  }
1021
- const P = ((A = l.currentBusiness.value) == null ? void 0 : A._id) ?? "";
1025
+ const P = ((A = s.currentBusiness.value) == null ? void 0 : A._id) ?? "";
1022
1026
  await _(P);
1023
1027
  const W = `business_${P}`, E = K.type === ot.enum.warehouse, f = (
1024
1028
  // if menu v4, must manual receive && must use outlet app
1025
- (($ = l.currentBusiness.value) == null ? void 0 : $.menuVersion) === "v4" && // more guard for businesses using menu v4, only those listed for manual receive will be included
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
1026
1030
  // TODO: may be removed to use menu version only
1027
1031
  Ct.has(this.businessDbName)
1028
- ), C = xt.has(W) || m(g.inventory_portal_must_use_transfer_template), w = m(g.inventory_purchase_order_backdate) && (this.isWarehouse || p.state.closing !== null);
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);
1029
1033
  h.value = {
1030
1034
  isLoaded: !0,
1031
- enableTotalCost: ((Y = l.currentBusiness.value) == null ? void 0 : Y.menuVersion) === "v4",
1035
+ enableTotalCost: ((Y = s.currentBusiness.value) == null ? void 0 : Y.menuVersion) === "v4",
1032
1036
  enableBackdatePo: w,
1033
1037
  autoReceiveWarehouse: E && !f,
1034
1038
  manualReceive: f,
1035
1039
  enablePoTemplate: C,
1036
- enableClosingTemplate: m(g.inventory_pos_closing_v2),
1037
- enableWastageTemplate: m(g.inventory_pos_adjust_v2_wastage),
1038
- enableIngredientGroup: m(g.inventory_ingredient_group),
1040
+ enableClosingTemplate: y(g.inventory_pos_closing_v2),
1041
+ enableWastageTemplate: y(g.inventory_pos_adjust_v2_wastage),
1042
+ enableIngredientGroup: y(g.inventory_ingredient_group),
1039
1043
  mustUsePoTemplate: C,
1040
1044
  businessSupplierOnly: C,
1041
- enableXilnexTransferNote: m(g.inventory_portal_xilnex_transfer_note),
1042
- enableCustomAttribute: m(g.inventory_portal_custom_attribute),
1043
- usePurchaseOrderV2: m(g.inventory_portal_purchase_order_v2),
1044
- acceptRequireFulfillment: m(
1045
+ enableXilnexTransferNote: y(g.inventory_portal_xilnex_transfer_note),
1046
+ enableCustomAttribute: y(g.inventory_portal_custom_attribute),
1047
+ usePurchaseOrderV2: y(g.inventory_portal_purchase_order_v2),
1048
+ acceptRequireFulfillment: y(
1045
1049
  g.inventory_portal_accept_require_fulfillment
1046
1050
  ),
1047
- useOperatePurchaseOrderV2: m(g.inventory_portal_po_operate_v2),
1048
- inventory_xilnex_opening_migration: m(
1051
+ useOperatePurchaseOrderV2: y(g.inventory_portal_po_operate_v2),
1052
+ inventory_xilnex_opening_migration: y(
1049
1053
  g.inventory_xilnex_opening_migration
1050
1054
  ),
1051
- inventory_synergy_opening_migration: m(
1055
+ inventory_synergy_opening_migration: y(
1052
1056
  g.inventory_synergy_opening_migration
1053
1057
  ),
1054
- inventory_netsuite_inventory_transfer_out: m(
1058
+ inventory_netsuite_inventory_transfer_out: y(
1055
1059
  g.inventory_netsuite_inventory_transfer_out
1056
1060
  ),
1057
- inventory_portal_supplier_preparation_time: m(
1061
+ inventory_portal_supplier_preparation_time: y(
1058
1062
  g.inventory_portal_supplier_preparation_time
1059
1063
  ),
1060
- inventory_portal_delivery_order_write: m(
1064
+ inventory_portal_delivery_order_write: y(
1061
1065
  g.inventory_portal_delivery_order_write
1062
1066
  ),
1063
- inventory_pos_transfer_require_fulfillment: m(
1067
+ inventory_pos_transfer_require_fulfillment: y(
1064
1068
  g.inventory_pos_transfer_require_fulfillment
1065
1069
  ),
1066
- inventory_backdate_receive: m(g.inventory_backdate_receive),
1067
- inventory_purchase_order_custom_cost: m(
1070
+ inventory_backdate_receive: y(g.inventory_backdate_receive),
1071
+ inventory_purchase_order_custom_cost: y(
1068
1072
  g.inventory_purchase_order_custom_cost
1069
1073
  ),
1070
- inventory_bulk_import: m(g.inventory_bulk_import),
1071
- inventory_portal_surcharge: m(g.inventory_portal_surcharge),
1072
- inventory_purchase_order_cost_edit: m(
1074
+ inventory_bulk_import: y(g.inventory_bulk_import),
1075
+ inventory_portal_surcharge: y(g.inventory_portal_surcharge),
1076
+ inventory_purchase_order_cost_edit: y(
1073
1077
  g.inventory_purchase_order_cost_edit
1074
1078
  ),
1075
- inventory_purchase_order_price_adjustment: m(
1079
+ inventory_purchase_order_price_adjustment: y(
1076
1080
  g.inventory_purchase_order_price_adjustment
1077
1081
  ),
1078
- inventory_purchase_order_workflow_allow_to_mark_completed: m(
1082
+ inventory_purchase_order_workflow_allow_to_mark_completed: y(
1079
1083
  g.inventory_purchase_order_workflow_allow_to_mark_completed
1080
1084
  ),
1081
- inventory_recipe_v2: m(g.inventory_recipe_v2),
1082
- inventory_print_template: m(g.inventory_print_template),
1083
- inventory_purchase_order_email: m(g.inventory_purchase_order_email),
1084
- inventory_bulk_edit_recipes: m(g.inventory_bulk_edit_recipes),
1085
- inventory_receive_request_beta: m("inventory_receive_request_beta"),
1085
+ inventory_recipe_v2: y(g.inventory_recipe_v2),
1086
+ inventory_print_template: y(g.inventory_print_template),
1087
+ inventory_purchase_order_email: y(g.inventory_purchase_order_email),
1088
+ inventory_bulk_edit_recipes: y(g.inventory_bulk_edit_recipes),
1089
+ inventory_receive_request_beta: y("inventory_receive_request_beta"),
1090
+ inventory_portal_production_item: y(g.inventory_portal_production_item),
1086
1091
  report_portal_po_forecast_days_constraint: Et(
1087
1092
  "report_portal_po_forecast_days_constraint"
1088
1093
  ),
@@ -1093,28 +1098,28 @@ const h = de(lt()), wt = () => ({
1093
1098
  };
1094
1099
  }, "feature");
1095
1100
  },
1096
- async awaitFeatureLoaded(l) {
1101
+ async awaitFeatureLoaded(s) {
1097
1102
  return new Promise((u) => {
1098
1103
  const _ = () => {
1099
- h.value.isLoaded ? u(l()) : setTimeout(_, 100);
1104
+ h.value.isLoaded ? u(s()) : setTimeout(_, 100);
1100
1105
  };
1101
1106
  _();
1102
1107
  });
1103
1108
  }
1104
1109
  });
1105
- function m(l, u) {
1110
+ function y(s, u) {
1106
1111
  u = u === void 0 ? null : u;
1107
1112
  const { getFlagValue: _ } = he();
1108
- return _(l, (p) => p === "true") ?? u;
1113
+ return _(s, (p) => p === "true") ?? u;
1109
1114
  }
1110
- function Et(l) {
1115
+ function Et(s) {
1111
1116
  const { getFlagValue: u } = he();
1112
- return u(l, (p) => p.trim() ? p.trim() : null) ?? null;
1117
+ return u(s, (p) => p.trim() ? p.trim() : null) ?? null;
1113
1118
  }
1114
- function Ot(l, u) {
1119
+ function Ot(s, u) {
1115
1120
  const { getFlagValue: _ } = he();
1116
- return _(l, (s) => {
1117
- const O = parseInt(s, 10);
1121
+ return _(s, (l) => {
1122
+ const O = parseInt(l, 10);
1118
1123
  return isNaN(O) ? null : O;
1119
1124
  }) ?? u;
1120
1125
  }