react-marketing-tools 0.0.6 → 0.0.9

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.
package/README.md CHANGED
@@ -112,22 +112,27 @@ COMING SOON: [React Marketing Tools Demo](https://)
112
112
  // create session cookie, useful for unauthenticated user tracking and other things
113
113
  document.cookie = `${appSessionCookieName}=${uuid()};max-age=${70};SameSite=Strict;Secure`
114
114
 
115
- const eventNameInfo = {
116
- actionPrefix: eventActionPrefixList.JOURNEY,
117
- description: 'Welcome Landing',
118
- globalAppEvent: analyticsGlobalEventActionList.UNAUTHENTICATED,
115
+ const sendAnalyticsEvent = async () => {
116
+ const eventNameInfo = {
117
+ actionPrefix: eventActionPrefixList.JOURNEY,
118
+ description: 'Welcome Landing',
119
+ globalAppEvent: analyticsGlobalEventActionList.UNAUTHENTICATED,
120
+ }
121
+
122
+ await trackAnalyticsEvent({
123
+ data: {},
124
+ eventNameInfo,
125
+ analyticsType: analyticsPlatform.DATALAYER_PUSH,
126
+ dataLayerCheck: true,
127
+ })
119
128
  }
120
129
 
121
- trackAnalyticsEvent({
122
- data: {},
123
- eventNameInfo,
124
- analyticsType: analyticsPlatform.DATALAYER_PUSH,
125
- dataLayerCheck: true,
126
- })
130
+ sendAnalyticsEvent()
127
131
  })
128
132
 
129
- const handleButtonClick = () => {
130
- setCount((count) => count + 1)
133
+ const handleButtonClick = async () => {
134
+ const countActual = count + 1
135
+ setCount(countActual)
131
136
 
132
137
  const eventNameInfo = {
133
138
  eventName: 'count button click',
@@ -136,9 +141,9 @@ COMING SOON: [React Marketing Tools Demo](https://)
136
141
  previousGlobalAppEvent: analyticsGlobalEventActionList.UNAUTHENTICATED
137
142
  }
138
143
 
139
- trackAnalyticsEvent({
144
+ await trackAnalyticsEvent({
140
145
  data: {
141
- count,
146
+ count: countActual,
142
147
  firstName: 'bob',
143
148
  lastName: 'yeah nah',
144
149
  email: 'yeahnah@gmail.com',
@@ -150,6 +155,36 @@ COMING SOON: [React Marketing Tools Demo](https://)
150
155
  }
151
156
  })
152
157
  }
158
+
159
+ /* Example: use GA4 directly
160
+ const handleButtonClick = useCallback(async () => {
161
+ const countActual = count + 1
162
+
163
+ setCount(countActual)
164
+
165
+ const eventNameInfo = {
166
+ eventName: 'count button click',
167
+ actionPrefix: eventActionPrefixList.INTERACTION,
168
+ globalAppEvent: analyticsGlobalEventActionList.AUTHENTICATED,
169
+ previousGlobalAppEvent: analyticsGlobalEventActionList.UNAUTHENTICATED,
170
+ }
171
+
172
+ await trackAnalyticsEvent({
173
+ data: {
174
+ count: countActual,
175
+ firstName: 'bob',
176
+ lastName: 'yeah nah',
177
+ email: 'yeahnah@gmail.com',
178
+ },
179
+ eventNameInfo,
180
+ analyticsType: analyticsPlatform.GOOGLE,
181
+ userDataToHashKeyArray: ['email', 'firstName', 'lastName'],
182
+ consoleLogData: {
183
+ showJourneyPropsPayload: true,
184
+ },
185
+ })
186
+ }, [count])
187
+ */
153
188
  ...
154
189
 
155
190
  return (
@@ -166,22 +201,27 @@ COMING SOON: [React Marketing Tools Demo](https://)
166
201
 
167
202
  const WelcomePage = () => {
168
203
  useEffect(function appLoadPageLandingWelcome() {
169
- const eventNameInfo = {
170
- actionPrefix: eventActionPrefixList.JOURNEY,
171
- description: 'Welcome Landing',
172
- globalAppEvent: analyticsGlobalEventActionList.UNAUTHENTICATED,
204
+ const sendAnalyticsEvent = async () => {
205
+ const eventNameInfo = {
206
+ actionPrefix: eventActionPrefixList.JOURNEY,
207
+ description: 'Welcome Landing',
208
+ globalAppEvent: analyticsGlobalEventActionList.UNAUTHENTICATED,
209
+ }
210
+
211
+ trackAnalyticsEvent({
212
+ data: {},
213
+ eventNameInfo,
214
+ analyticsType: analyticsPlatform.DATALAYER_PUSH,
215
+ dataLayerCheck: true,
216
+ })
173
217
  }
174
218
 
175
- trackAnalyticsEvent({
176
- data: {},
177
- eventNameInfo,
178
- analyticsType: analyticsPlatform.DATALAYER_PUSH,
179
- dataLayerCheck: true,
180
- })
219
+ sendAnalyticsEvent()
181
220
  })
182
221
 
183
- const handleButtonClick = () => {
184
- setCount((count) => count + 1)
222
+ const handleButtonClick = async () => {
223
+ const countActual = count + 1
224
+ setCount(countActual)
185
225
 
186
226
  const eventNameInfo = {
187
227
  eventName: 'count button click',
@@ -190,9 +230,9 @@ COMING SOON: [React Marketing Tools Demo](https://)
190
230
  previousGlobalAppEvent: analyticsGlobalEventActionList.UNAUTHENTICATED
191
231
  }
192
232
 
193
- trackAnalyticsEvent({
233
+ await trackAnalyticsEvent({
194
234
  data: {
195
- count,
235
+ count: countActual,
196
236
  firstName: 'bob',
197
237
  lastName: 'yeah nah',
198
238
  email: 'yeahnah@gmail.com',
@@ -123,7 +123,7 @@ function ll() {
123
123
  }
124
124
  }
125
125
  }
126
- var S = $, re = A, Le = m, he = g, $e = d, be = M, Ae = l, Me = k, q = N, z = o, me = i, ee = a, ie = P, se = !1;
126
+ var S = $, re = A, Le = m, he = g, $e = d, be = M, Ae = l, Me = k, q = N, z = o, ne = i, ee = a, ie = P, se = !1;
127
127
  function Pe(c) {
128
128
  return se || (se = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), n(c) || U(c) === $;
129
129
  }
@@ -163,7 +163,7 @@ function ll() {
163
163
  function Z(c) {
164
164
  return U(c) === P;
165
165
  }
166
- R.AsyncMode = S, R.ConcurrentMode = re, R.ContextConsumer = Le, R.ContextProvider = he, R.Element = $e, R.ForwardRef = be, R.Fragment = Ae, R.Lazy = Me, R.Memo = q, R.Portal = z, R.Profiler = me, R.StrictMode = ee, R.Suspense = ie, R.isAsyncMode = Pe, R.isConcurrentMode = n, R.isContextConsumer = u, R.isContextProvider = L, R.isElement = _, R.isForwardRef = T, R.isFragment = O, R.isLazy = p, R.isMemo = G, R.isPortal = b, R.isProfiler = I, R.isStrictMode = E, R.isSuspense = Z, R.isValidElementType = H, R.typeOf = U;
166
+ R.AsyncMode = S, R.ConcurrentMode = re, R.ContextConsumer = Le, R.ContextProvider = he, R.Element = $e, R.ForwardRef = be, R.Fragment = Ae, R.Lazy = Me, R.Memo = q, R.Portal = z, R.Profiler = ne, R.StrictMode = ee, R.Suspense = ie, R.isAsyncMode = Pe, R.isConcurrentMode = n, R.isContextConsumer = u, R.isContextProvider = L, R.isElement = _, R.isForwardRef = T, R.isFragment = O, R.isLazy = p, R.isMemo = G, R.isPortal = b, R.isProfiler = I, R.isStrictMode = E, R.isSuspense = Z, R.isValidElementType = H, R.typeOf = U;
167
167
  }()), R;
168
168
  }
169
169
  var Uo;
@@ -568,12 +568,12 @@ Valid keys: ` + JSON.stringify(Object.keys(n), null, " ")
568
568
  return !1;
569
569
  }
570
570
  }
571
- function me(n, u) {
571
+ function ne(n, u) {
572
572
  return n === "symbol" ? !0 : u ? u["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && u instanceof Symbol : !1;
573
573
  }
574
574
  function ee(n) {
575
575
  var u = typeof n;
576
- return Array.isArray(n) ? "array" : n instanceof RegExp ? "object" : me(u, n) ? "symbol" : u;
576
+ return Array.isArray(n) ? "array" : n instanceof RegExp ? "object" : ne(u, n) ? "symbol" : u;
577
577
  }
578
578
  function ie(n) {
579
579
  if (typeof n > "u" || n === null)
@@ -661,7 +661,7 @@ if (process.env.NODE_ENV !== "production") {
661
661
  j.exports = il()(ml.isElement, nl);
662
662
  } else
663
663
  j.exports = tl()();
664
- const xe = (e, d = "") => {
664
+ const te = (e, d = "") => {
665
665
  if (!e)
666
666
  throw new Error(d != null ? d : "Is true assertion failed");
667
667
  }, Se = {
@@ -708,7 +708,7 @@ const o_ = (e) => {
708
708
  withDeviceInfo: m = !1,
709
709
  withServerLocationInfo: $ = !1
710
710
  } = { ...e };
711
- xe(d, "An appName must be provided in the config."), oe = {
711
+ te(d, "An appName must be provided in the config."), oe = {
712
712
  TOKENS: g,
713
713
  appName: d,
714
714
  appSessionCookieName: o,
@@ -724,12 +724,12 @@ const o_ = (e) => {
724
724
  ...a
725
725
  }
726
726
  };
727
- }, ge = (e, d = "") => d ? e.hasOwnProperty(d) : Object.keys(e).length > 0, hr = (e, d) => d ? e.replace(/[\s]/g, d) : e.replace(/[\s]+/g, ""), cl = async (e) => {
727
+ }, xe = (e, d = "") => d ? e.hasOwnProperty(d) : Object.keys(e).length > 0, hr = (e, d) => d ? e.replace(/[\s]/g, d) : e.replace(/[\s]+/g, ""), cl = async (e) => {
728
728
  const d = new TextEncoder().encode(e), o = await crypto.subtle.digest("SHA-256", d);
729
729
  return Array.from(new Uint8Array(o)).map((i) => i.toString(16).padStart(2, "0")).join("");
730
730
  }, Sl = async (e) => {
731
731
  const { TOKENS: d } = { ...oe };
732
- if (xe(
732
+ if (te(
733
733
  e ? d == null ? void 0 : d.IP_INFO_TOKEN : !0,
734
734
  "if you want serverLocationInfo your config must have the TOKEN.IP_INFO_TOKEN AND withServerLocationInfo must be true."
735
735
  ), e && (d == null ? void 0 : d.IP_INFO_TOKEN)) {
@@ -737,31 +737,31 @@ const o_ = (e) => {
737
737
  (a) => a
738
738
  );
739
739
  return {
740
- CITY: o.city,
741
- COUNTRY: o.country,
742
- HOSTNAME: o.hostname,
743
- IP: o.ip,
744
- LOC: o.loc,
745
- POSTAL: o.postal,
746
- REGION: o.region,
747
- TIMEZONE: o.timezone
740
+ SERVER_CITY: o.city,
741
+ SERVER_COUNTRY: o.country,
742
+ SERVER_HOSTNAME: o.hostname,
743
+ SERVER_IP: o.ip,
744
+ SERVER_LOCATION: o.loc,
745
+ SERVER_POSTAL: o.postal,
746
+ SERVER_REGION: o.region,
747
+ SERVER_TIMEZONE: o.timezone
748
748
  };
749
749
  }
750
750
  }, ul = (e) => fetch(`https://ipinfo.io/110.174.218.10?token=${e}`).then(
751
751
  (d) => d.json()
752
752
  );
753
- var mo = {}, Fe = {}, te = {}, no = {};
753
+ var mo = {}, Fe = {}, me = {}, no = {};
754
754
  Object.defineProperty(no, "__esModule", { value: !0 });
755
755
  no.trim = (e, d) => e.replace(new RegExp("^[" + d + "]+|[" + d + "]+$", "g"), "");
756
- Object.defineProperty(te, "__esModule", { value: !0 });
756
+ Object.defineProperty(me, "__esModule", { value: !0 });
757
757
  const $l = no;
758
- te.formatVersion = (e, d) => {
758
+ me.formatVersion = (e, d) => {
759
759
  if (e === void 0)
760
760
  return "";
761
761
  const o = $l.trim(e, ". ").replace(new RegExp("_", "g"), "."), l = o.split(".");
762
762
  return /^\d+$/.test(l.join("")) ? d !== 0 && Number.isInteger(parseFloat(o)) ? parseInt(o, 10).toFixed(1) : l.length > 1 && d !== null ? l.slice(0, d + 1).join(".") : o : o;
763
763
  };
764
- te.parseBrowserEngineVersion = (e, d) => {
764
+ me.parseBrowserEngineVersion = (e, d) => {
765
765
  if (!d)
766
766
  return "";
767
767
  if (d === "Gecko") {
@@ -3803,7 +3803,7 @@ var fe = h && h.__importDefault || function(e) {
3803
3803
  return e && e.__esModule ? e : { default: e };
3804
3804
  };
3805
3805
  Object.defineProperty(Fe, "__esModule", { value: !0 });
3806
- const Xe = te, zo = Y, An = Q, Mn = fe(Pl), Pn = fe(vl), vn = fe(un), Tn = fe($n);
3806
+ const Xe = me, zo = Y, An = Q, Mn = fe(Pl), Pn = fe(vl), vn = fe(un), Tn = fe($n);
3807
3807
  class Re {
3808
3808
  constructor(d) {
3809
3809
  this.options = {
@@ -4480,7 +4480,7 @@ var Gn = h && h.__importDefault || function(e) {
4480
4480
  return e && e.__esModule ? e : { default: e };
4481
4481
  };
4482
4482
  Object.defineProperty(xo, "__esModule", { value: !0 });
4483
- const _n = Gn(pn), Ln = te, jo = Y, hn = Q;
4483
+ const _n = Gn(pn), Ln = me, jo = Y, hn = Q;
4484
4484
  class bn {
4485
4485
  constructor(d) {
4486
4486
  this.options = {
@@ -4671,7 +4671,7 @@ var Bn = h && h.__importDefault || function(e) {
4671
4671
  return e && e.__esModule ? e : { default: e };
4672
4672
  };
4673
4673
  Object.defineProperty(so, "__esModule", { value: !0 });
4674
- const Cn = Bn(En), Nn = te, qo = Y, On = Q;
4674
+ const Cn = Bn(En), Nn = me, qo = Y, On = Q;
4675
4675
  class yn {
4676
4676
  constructor(d) {
4677
4677
  this.options = {
@@ -4871,7 +4871,7 @@ var wn = h && h.__importDefault || function(e) {
4871
4871
  return e && e.__esModule ? e : { default: e };
4872
4872
  };
4873
4873
  Object.defineProperty(co, "__esModule", { value: !0 });
4874
- const Xn = wn(In), Dn = te, er = Y, Rn = Q;
4874
+ const Xn = wn(In), Dn = me, er = Y, Rn = Q;
4875
4875
  class Fn {
4876
4876
  constructor(d) {
4877
4877
  this.options = {
@@ -5027,7 +5027,7 @@ var Vn = h && h.__importDefault || function(e) {
5027
5027
  return e && e.__esModule ? e : { default: e };
5028
5028
  };
5029
5029
  Object.defineProperty(So, "__esModule", { value: !0 });
5030
- const Hn = Vn(fn), Un = te, or = Y, kn = Q;
5030
+ const Hn = Vn(fn), Un = me, or = Y, kn = Q;
5031
5031
  class Kn {
5032
5032
  constructor(d) {
5033
5033
  this.options = {
@@ -5127,7 +5127,7 @@ var Qn = h && h.__importDefault || function(e) {
5127
5127
  return e && e.__esModule ? e : { default: e };
5128
5128
  };
5129
5129
  Object.defineProperty(uo, "__esModule", { value: !0 });
5130
- const Zn = Qn(Wn), Yn = te, rr = Y, Jn = Q;
5130
+ const Zn = Qn(Wn), Yn = me, rr = Y, Jn = Q;
5131
5131
  class zn {
5132
5132
  constructor(d) {
5133
5133
  this.options = {
@@ -44477,7 +44477,7 @@ var br = h && h.__importDefault || function(e) {
44477
44477
  return e && e.__esModule ? e : { default: e };
44478
44478
  };
44479
44479
  Object.defineProperty(_o, "__esModule", { value: !0 });
44480
- const dG = br(eG), aG = te, $r = Y, Ge = Q, Er = br(lG), iG = ["AmigaOS", "IBM", "GNU/Linux", "Mac", "Unix", "Windows", "BeOS", "Chrome OS"], tG = Er.default.operatingSystem, mG = Er.default.osFamilies;
44480
+ const dG = br(eG), aG = me, $r = Y, Ge = Q, Er = br(lG), iG = ["AmigaOS", "IBM", "GNU/Linux", "Mac", "Unix", "Windows", "BeOS", "Chrome OS"], tG = Er.default.operatingSystem, mG = Er.default.osFamilies;
44481
44481
  class Ne {
44482
44482
  constructor(d) {
44483
44483
  this.options = {
@@ -47729,8 +47729,8 @@ class fG {
47729
47729
  var VG = fG;
47730
47730
  const HG = async (e, d) => {
47731
47731
  const o = [...d], l = {};
47732
- xe(
47733
- ge(e),
47732
+ te(
47733
+ xe(e),
47734
47734
  `helpers.js ~ line 25 ~ hashUserData ~ Please check your user data, it looks like it is empty! ${e}`
47735
47735
  );
47736
47736
  for (let a in e)
@@ -47741,13 +47741,13 @@ const HG = async (e, d) => {
47741
47741
  return l;
47742
47742
  }, ro = (e, d) => {
47743
47743
  const o = {};
47744
- return ge(e) && d.length > 0 && d.forEach((l) => {
47744
+ return xe(e) && (d == null ? void 0 : d.length) > 0 && d.forEach((l) => {
47745
47745
  e[l] ? o[l] = `${e[l]}` : console.error(
47746
47746
  `analyticsEventService -> buildNewUserData: line 94 - The key:${l} does not exist on the data object`
47747
47747
  );
47748
47748
  }), o;
47749
47749
  }, UG = (e) => {
47750
- if (!ge(e, "actionPrefix") && !ge(e, "globalAppEvent"))
47750
+ if (!xe(e, "actionPrefix") && !xe(e, "globalAppEvent"))
47751
47751
  throw new Error(
47752
47752
  "actionPrefix AND globalAppEvent must be included in the eventNameInfo object passed to buildAnalyticsEventName function"
47753
47753
  );
@@ -47772,7 +47772,7 @@ const HG = async (e, d) => {
47772
47772
  }, kG = (e) => !!window.dataLayer.find((o) => o.event === e), KG = (e) => new VG().parse(e), Cr = (e, d = "") => {
47773
47773
  const { analyticsGlobalEventActionList: o } = oe;
47774
47774
  let l = "";
47775
- xe(
47775
+ te(
47776
47776
  Object.values(o).includes(e),
47777
47777
  "getEventSequence(), globalAppEvent is not in the analyticsGlobalEventActionList!"
47778
47778
  );
@@ -47810,8 +47810,8 @@ const HG = async (e, d) => {
47810
47810
  }, ZG = async (e) => {
47811
47811
  var B, N;
47812
47812
  const { consoleLogData: d, data: o, eventName: l, globalAppEvent: a, userDetails: i } = e, { appSessionCookieName: g, TOKENS: m } = { ...oe };
47813
- xe(
47814
- m && !ge(m),
47813
+ te(
47814
+ m && xe(m),
47815
47815
  "TOKENS in config must contain GA4_PUBLIC_API_SECRET and GA4_PUBLIC_MEASUREMENT_ID key: value if you want to use ga4GoogleAnalyticsEventTracking"
47816
47816
  );
47817
47817
  const { GA4_PUBLIC_API_SECRET: $, GA4_PUBLIC_MEASUREMENT_ID: A } = m, M = await Br(o, a), P = {
@@ -47857,9 +47857,9 @@ const HG = async (e, d) => {
47857
47857
  globalVars: {
47858
47858
  app: m,
47859
47859
  ...P ? {
47860
- deviceCategory: (k = P.device) == null ? void 0 : k.type,
47861
- deviceOS: `${(w = P.os) == null ? void 0 : w.name}_${(V = P.os) == null ? void 0 : V.version}`,
47862
- deviceBrowser: (x = P.client) == null ? void 0 : x.name
47860
+ device_category: (k = P.device) == null ? void 0 : k.type,
47861
+ device_os: `${(w = P.os) == null ? void 0 : w.name}_${(V = P.os) == null ? void 0 : V.version}`,
47862
+ device_browser: (x = P.client) == null ? void 0 : x.name
47863
47863
  } : []
47864
47864
  },
47865
47865
  userProps: {
@@ -47888,11 +47888,11 @@ const HG = async (e, d) => {
47888
47888
  dataLayerCheck: i = !1,
47889
47889
  consoleLogData: g = null
47890
47890
  } = e, { includeUserKeys: m } = oe;
47891
- xe(
47892
- ge(Se, l),
47891
+ te(
47892
+ xe(Se, l),
47893
47893
  `"analyticsType" of ${l} cannot be found in the analyticsPlatform object to view available platforms use showMeBuildInAnalyticsPlatform()`
47894
- ), xe(
47895
- ge(o, "actionPrefix") && ge(o, "globalAppEvent"),
47894
+ ), te(
47895
+ xe(o, "actionPrefix") && xe(o, "globalAppEvent"),
47896
47896
  "actionPrefix AND globalAppEvent must be included in the eventNameInfo object passed to trackAnalyticsEvent function"
47897
47897
  );
47898
47898
  const $ = o != null && o.eventName ? `${o.actionPrefix}_${hr(
@@ -47910,7 +47910,10 @@ const HG = async (e, d) => {
47910
47910
  consoleLogData: g
47911
47911
  }), l === Se.GOOGLE) {
47912
47912
  let A = {};
47913
- ge(ro(d, m)) && (A = await HG(
47913
+ te(
47914
+ a,
47915
+ 'User data must be hashed before sending to GA4, any user data that is considered "Identifiable"'
47916
+ ), xe(ro(d, m)) && (A = await HG(
47914
47917
  ro(d, m),
47915
47918
  a
47916
47919
  )), await ZG({
@@ -48048,13 +48051,13 @@ function qG() {
48048
48051
  }
48049
48052
  return null;
48050
48053
  }
48051
- var z = Object.assign, me = 0, ee, ie, se, Pe, n, u, L;
48054
+ var z = Object.assign, ne = 0, ee, ie, se, Pe, n, u, L;
48052
48055
  function _() {
48053
48056
  }
48054
48057
  _.__reactDisabledLog = !0;
48055
48058
  function T() {
48056
48059
  {
48057
- if (me === 0) {
48060
+ if (ne === 0) {
48058
48061
  ee = console.log, ie = console.info, se = console.warn, Pe = console.error, n = console.group, u = console.groupCollapsed, L = console.groupEnd;
48059
48062
  var r = {
48060
48063
  configurable: !0,
@@ -48072,12 +48075,12 @@ function qG() {
48072
48075
  groupEnd: r
48073
48076
  });
48074
48077
  }
48075
- me++;
48078
+ ne++;
48076
48079
  }
48077
48080
  }
48078
48081
  function O() {
48079
48082
  {
48080
- if (me--, me === 0) {
48083
+ if (ne--, ne === 0) {
48081
48084
  var r = {
48082
48085
  configurable: !0,
48083
48086
  enumerable: !0,
@@ -48107,7 +48110,7 @@ function qG() {
48107
48110
  })
48108
48111
  });
48109
48112
  }
48110
- me < 0 && F("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
48113
+ ne < 0 && F("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
48111
48114
  }
48112
48115
  }
48113
48116
  var p = x.ReactCurrentDispatcher, G;
@@ -48155,29 +48158,29 @@ function qG() {
48155
48158
  }), typeof Reflect == "object" && Reflect.construct) {
48156
48159
  try {
48157
48160
  Reflect.construct(y, []);
48158
- } catch (ne) {
48159
- v = ne;
48161
+ } catch (ge) {
48162
+ v = ge;
48160
48163
  }
48161
48164
  Reflect.construct(r, [], y);
48162
48165
  } else {
48163
48166
  try {
48164
48167
  y.call();
48165
- } catch (ne) {
48166
- v = ne;
48168
+ } catch (ge) {
48169
+ v = ge;
48167
48170
  }
48168
48171
  r.call(y.prototype);
48169
48172
  }
48170
48173
  } else {
48171
48174
  try {
48172
48175
  throw Error();
48173
- } catch (ne) {
48174
- v = ne;
48176
+ } catch (ge) {
48177
+ v = ge;
48175
48178
  }
48176
48179
  r();
48177
48180
  }
48178
- } catch (ne) {
48179
- if (ne && v && typeof ne.stack == "string") {
48180
- for (var C = ne.stack.split(`
48181
+ } catch (ge) {
48182
+ if (ge && v && typeof ge.stack == "string") {
48183
+ for (var C = ge.stack.split(`
48181
48184
  `), J = v.stack.split(`
48182
48185
  `), K = C.length - 1, W = J.length - 1; K >= 1 && W >= 0 && C[K] !== J[W]; )
48183
48186
  W--;
@@ -48584,10 +48587,10 @@ const r_ = ({
48584
48587
  });
48585
48588
  }, l_ = () => {
48586
48589
  const e = Gr(Or);
48587
- return xe(e, "useAppState must be used within the AppProvider"), e;
48590
+ return te(e, "useAppState must be used within the AppProvider"), e;
48588
48591
  }, d_ = () => {
48589
48592
  const e = Gr(yr);
48590
- return xe(e, "useAppApi must be used within the AppProvider"), e;
48593
+ return te(e, "useAppApi must be used within the AppProvider"), e;
48591
48594
  };
48592
48595
  export {
48593
48596
  yr as ContextApi,