@obb871001/api-integration-sdk 1.0.8 → 1.0.10
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/dist/index.cjs +4 -4
- package/dist/index.js +127 -95
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tanstack/react-query");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tanstack/react-query");const A=require("react"),ee=require("axios"),re=A.createContext(null),te=()=>{const s=A.useContext(re);if(!s)throw new Error("useAxios must be used inside <ApiProvider>");return s.client};var T={exports:{}},E={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var q;function ne(){if(q)return E;q=1;var s=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function f(m,u,l){var d=null;if(l!==void 0&&(d=""+l),u.key!==void 0&&(d=""+u.key),"key"in u){l={};for(var i in u)i!=="key"&&(l[i]=u[i])}else l=u;return u=l.ref,{$$typeof:s,type:m,key:d,ref:u!==void 0?u:null,props:l}}return E.Fragment=c,E.jsx=f,E.jsxs=f,E}var p={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var D;function ae(){return D||(D=1,process.env.NODE_ENV!=="production"&&(function(){function s(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case W:return"Profiler";case U:return"StrictMode";case G:return"Suspense";case X:return"SuspenseList";case H:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case L:return"Portal";case J:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case V:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return r=e.displayName||null,r!==null?r:s(e.type)||"Memo";case x:r=e._payload,e=e._init;try{return s(e(r))}catch{}}return null}function c(e){return""+e}function f(e){try{c(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),c(e)}}function m(e){if(e===k)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===x)return"<...>";try{var r=s(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function u(){var e=P.A;return e===null?null:e.getOwner()}function l(){return Error("react-stack-top-frame")}function d(e){if(C.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function i(e,r){function t(){N||(N=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function o(){var e=s(this.type);return Y[e]||(Y[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function v(e,r,t,n,b,h){var a=t.ref;return e={$$typeof:g,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:o}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:b}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:h}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function S(e,r,t,n,b,h){var a=r.children;if(a!==void 0)if(n)if(Q(a)){for(n=0;n<a.length;n++)w(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else w(a);if(C.call(r,"key")){a=s(e);var _=Object.keys(r).filter(function(K){return K!=="key"});n=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",F[a+n]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,n,a,
|
|
22
|
+
<%s key={someKey} {...props} />`,n,a,_,a),F[a+n]=!0)}if(a=null,t!==void 0&&(f(t),a=""+t),d(r)&&(f(r.key),a=""+r.key),"key"in r){t={};for(var y in r)y!=="key"&&(t[y]=r[y])}else t=r;return a&&i(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),v(e,a,t,u(),b,h)}function w(e){j(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===x&&(e._payload.status==="fulfilled"?j(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function j(e){return typeof e=="object"&&e!==null&&e.$$typeof===g}var R=A,g=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),J=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),P=R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=Object.prototype.hasOwnProperty,Q=Array.isArray,O=console.createTask?console.createTask:function(){return null};R={react_stack_bottom_frame:function(e){return e()}};var N,Y={},$=R.react_stack_bottom_frame.bind(R,l)(),I=O(m(l)),F={};p.Fragment=k,p.jsx=function(e,r,t){var n=1e4>P.recentlyCreatedOwnerStacks++;return S(e,r,t,!1,n?Error("react-stack-top-frame"):$,n?O(m(e)):I)},p.jsxs=function(e,r,t){var n=1e4>P.recentlyCreatedOwnerStacks++;return S(e,r,t,!0,n?Error("react-stack-top-frame"):$,n?O(m(e)):I)}})()),p}var M;function oe(){return M||(M=1,process.env.NODE_ENV==="production"?T.exports=ne():T.exports=ae()),T.exports}var se=oe();function ue({baseURL:s,getToken:c,timeoutMs:f=15e3,axiosInstance:m,currency:u,lng:l,onError:d}={}){const i=m??ee.create({baseURL:s,timeout:f,headers:{"Content-Type":"application/json"}});return i.interceptors.request.use(async o=>{if(c){const v=await c();v&&(o.headers=o.headers||{},o.headers.Authorization=`Bearer ${v}`)}return o}),i.interceptors.request.use(o=>{o.headers.Currency=u,o.headers["currency-code"]=u,o.headers.lang=l}),i.interceptors.response.use(o=>o,o=>d?d(o,{instance:i}):Promise.reject(o)),i}function le({children:s,...c}){const f=A.useMemo(()=>ue(c),[c]);return se.jsx(ApiCtx.Provider,{value:{client:f},children:s})}exports.ApiProvider=le;exports.useAxios=te;
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "@tanstack/react-query";
|
|
2
|
-
import K, { createContext as ee, useContext as re } from "react";
|
|
3
|
-
import "axios";
|
|
4
|
-
const
|
|
5
|
-
const s = re(
|
|
2
|
+
import K, { createContext as ee, useContext as re, useMemo as te } from "react";
|
|
3
|
+
import ne from "axios";
|
|
4
|
+
const ae = ee(null), me = () => {
|
|
5
|
+
const s = re(ae);
|
|
6
6
|
if (!s) throw new Error("useAxios must be used inside <ApiProvider>");
|
|
7
7
|
return s.client;
|
|
8
8
|
};
|
|
9
|
-
var
|
|
9
|
+
var T = { exports: {} }, E = {};
|
|
10
10
|
/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react-jsx-runtime.production.js
|
|
@@ -16,29 +16,29 @@ var p = { exports: {} }, m = {};
|
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
18
|
*/
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
var s = Symbol.for("react.transitional.element"),
|
|
24
|
-
function
|
|
25
|
-
var
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
for (var
|
|
29
|
-
|
|
30
|
-
} else
|
|
31
|
-
return
|
|
19
|
+
var F;
|
|
20
|
+
function oe() {
|
|
21
|
+
if (F) return E;
|
|
22
|
+
F = 1;
|
|
23
|
+
var s = Symbol.for("react.transitional.element"), c = Symbol.for("react.fragment");
|
|
24
|
+
function f(m, u, l) {
|
|
25
|
+
var d = null;
|
|
26
|
+
if (l !== void 0 && (d = "" + l), u.key !== void 0 && (d = "" + u.key), "key" in u) {
|
|
27
|
+
l = {};
|
|
28
|
+
for (var i in u)
|
|
29
|
+
i !== "key" && (l[i] = u[i]);
|
|
30
|
+
} else l = u;
|
|
31
|
+
return u = l.ref, {
|
|
32
32
|
$$typeof: s,
|
|
33
|
-
type:
|
|
34
|
-
key:
|
|
35
|
-
ref:
|
|
36
|
-
props:
|
|
33
|
+
type: m,
|
|
34
|
+
key: d,
|
|
35
|
+
ref: u !== void 0 ? u : null,
|
|
36
|
+
props: l
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
return
|
|
39
|
+
return E.Fragment = c, E.jsx = f, E.jsxs = f, E;
|
|
40
40
|
}
|
|
41
|
-
var
|
|
41
|
+
var p = {};
|
|
42
42
|
/**
|
|
43
43
|
* @license React
|
|
44
44
|
* react-jsx-runtime.development.js
|
|
@@ -48,22 +48,22 @@ var _ = {};
|
|
|
48
48
|
* This source code is licensed under the MIT license found in the
|
|
49
49
|
* LICENSE file in the root directory of this source tree.
|
|
50
50
|
*/
|
|
51
|
-
var
|
|
52
|
-
function
|
|
53
|
-
return
|
|
51
|
+
var D;
|
|
52
|
+
function se() {
|
|
53
|
+
return D || (D = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
54
54
|
function s(e) {
|
|
55
55
|
if (e == null) return null;
|
|
56
56
|
if (typeof e == "function")
|
|
57
57
|
return e.$$typeof === H ? null : e.displayName || e.name || null;
|
|
58
58
|
if (typeof e == "string") return e;
|
|
59
59
|
switch (e) {
|
|
60
|
-
case
|
|
60
|
+
case A:
|
|
61
61
|
return "Fragment";
|
|
62
|
-
case U:
|
|
63
|
-
return "Profiler";
|
|
64
62
|
case W:
|
|
63
|
+
return "Profiler";
|
|
64
|
+
case U:
|
|
65
65
|
return "StrictMode";
|
|
66
|
-
case
|
|
66
|
+
case V:
|
|
67
67
|
return "Suspense";
|
|
68
68
|
case G:
|
|
69
69
|
return "SuspenseList";
|
|
@@ -76,16 +76,16 @@ function ae() {
|
|
|
76
76
|
), e.$$typeof) {
|
|
77
77
|
case M:
|
|
78
78
|
return "Portal";
|
|
79
|
-
case
|
|
79
|
+
case z:
|
|
80
80
|
return e.displayName || "Context";
|
|
81
81
|
case q:
|
|
82
82
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
83
|
-
case
|
|
83
|
+
case J:
|
|
84
84
|
var r = e.render;
|
|
85
85
|
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
86
86
|
case X:
|
|
87
87
|
return r = e.displayName || null, r !== null ? r : s(e.type) || "Memo";
|
|
88
|
-
case
|
|
88
|
+
case k:
|
|
89
89
|
r = e._payload, e = e._init;
|
|
90
90
|
try {
|
|
91
91
|
return s(e(r));
|
|
@@ -94,12 +94,12 @@ function ae() {
|
|
|
94
94
|
}
|
|
95
95
|
return null;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function c(e) {
|
|
98
98
|
return "" + e;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function f(e) {
|
|
101
101
|
try {
|
|
102
|
-
|
|
102
|
+
c(e);
|
|
103
103
|
var r = !1;
|
|
104
104
|
} catch {
|
|
105
105
|
r = !0;
|
|
@@ -111,12 +111,12 @@ function ae() {
|
|
|
111
111
|
r,
|
|
112
112
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
113
113
|
n
|
|
114
|
-
),
|
|
114
|
+
), c(e);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
if (e ===
|
|
119
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
117
|
+
function m(e) {
|
|
118
|
+
if (e === A) return "<>";
|
|
119
|
+
if (typeof e == "object" && e !== null && e.$$typeof === k)
|
|
120
120
|
return "<...>";
|
|
121
121
|
try {
|
|
122
122
|
var r = s(e);
|
|
@@ -125,23 +125,23 @@ function ae() {
|
|
|
125
125
|
return "<...>";
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
var e =
|
|
128
|
+
function u() {
|
|
129
|
+
var e = x.A;
|
|
130
130
|
return e === null ? null : e.getOwner();
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function l() {
|
|
133
133
|
return Error("react-stack-top-frame");
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
if (
|
|
135
|
+
function d(e) {
|
|
136
|
+
if (C.call(e, "key")) {
|
|
137
137
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
138
138
|
if (r && r.isReactWarning) return !1;
|
|
139
139
|
}
|
|
140
140
|
return e.key !== void 0;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function i(e, r) {
|
|
143
143
|
function t() {
|
|
144
|
-
|
|
144
|
+
N || (N = !0, console.error(
|
|
145
145
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
146
146
|
r
|
|
147
147
|
));
|
|
@@ -151,23 +151,23 @@ function ae() {
|
|
|
151
151
|
configurable: !0
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function o() {
|
|
155
155
|
var e = s(this.type);
|
|
156
|
-
return
|
|
156
|
+
return g[e] || (g[e] = !0, console.error(
|
|
157
157
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
158
158
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function R(e, r, t, n, b, P) {
|
|
161
161
|
var a = t.ref;
|
|
162
162
|
return e = {
|
|
163
|
-
$$typeof:
|
|
163
|
+
$$typeof: j,
|
|
164
164
|
type: e,
|
|
165
165
|
key: r,
|
|
166
166
|
props: t,
|
|
167
167
|
_owner: n
|
|
168
168
|
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
169
169
|
enumerable: !1,
|
|
170
|
-
get:
|
|
170
|
+
get: o
|
|
171
171
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
172
172
|
configurable: !1,
|
|
173
173
|
enumerable: !1,
|
|
@@ -187,28 +187,28 @@ function ae() {
|
|
|
187
187
|
configurable: !1,
|
|
188
188
|
enumerable: !1,
|
|
189
189
|
writable: !0,
|
|
190
|
-
value:
|
|
190
|
+
value: P
|
|
191
191
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function w(e, r, t, n, b, P) {
|
|
194
194
|
var a = r.children;
|
|
195
195
|
if (a !== void 0)
|
|
196
196
|
if (n)
|
|
197
197
|
if (Z(a)) {
|
|
198
198
|
for (n = 0; n < a.length; n++)
|
|
199
|
-
|
|
199
|
+
y(a[n]);
|
|
200
200
|
Object.freeze && Object.freeze(a);
|
|
201
201
|
} else
|
|
202
202
|
console.error(
|
|
203
203
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
204
204
|
);
|
|
205
|
-
else
|
|
206
|
-
if (
|
|
205
|
+
else y(a);
|
|
206
|
+
if (C.call(r, "key")) {
|
|
207
207
|
a = s(e);
|
|
208
|
-
var
|
|
208
|
+
var _ = Object.keys(r).filter(function(Q) {
|
|
209
209
|
return Q !== "key";
|
|
210
210
|
});
|
|
211
|
-
n = 0 <
|
|
211
|
+
n = 0 < _.length ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}", I[a + n] || (_ = 0 < _.length ? "{" + _.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
212
212
|
`A props object containing a "key" prop is being spread into JSX:
|
|
213
213
|
let props = %s;
|
|
214
214
|
<%s {...props} />
|
|
@@ -217,73 +217,105 @@ React keys must be passed directly to JSX without using spread:
|
|
|
217
217
|
<%s key={someKey} {...props} />`,
|
|
218
218
|
n,
|
|
219
219
|
a,
|
|
220
|
-
|
|
220
|
+
_,
|
|
221
221
|
a
|
|
222
|
-
),
|
|
222
|
+
), I[a + n] = !0);
|
|
223
223
|
}
|
|
224
|
-
if (a = null, t !== void 0 && (
|
|
224
|
+
if (a = null, t !== void 0 && (f(t), a = "" + t), d(r) && (f(r.key), a = "" + r.key), "key" in r) {
|
|
225
225
|
t = {};
|
|
226
|
-
for (var
|
|
227
|
-
|
|
226
|
+
for (var h in r)
|
|
227
|
+
h !== "key" && (t[h] = r[h]);
|
|
228
228
|
} else t = r;
|
|
229
|
-
return a &&
|
|
229
|
+
return a && i(
|
|
230
230
|
t,
|
|
231
231
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
232
|
-
),
|
|
232
|
+
), R(
|
|
233
233
|
e,
|
|
234
234
|
a,
|
|
235
235
|
t,
|
|
236
|
-
|
|
236
|
+
u(),
|
|
237
237
|
b,
|
|
238
|
-
|
|
238
|
+
P
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
|
|
241
|
+
function y(e) {
|
|
242
|
+
S(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === k && (e._payload.status === "fulfilled" ? S(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
244
|
+
function S(e) {
|
|
245
|
+
return typeof e == "object" && e !== null && e.$$typeof === j;
|
|
246
246
|
}
|
|
247
|
-
var
|
|
247
|
+
var v = K, j = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), A = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), q = Symbol.for("react.consumer"), z = Symbol.for("react.context"), J = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), x = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, Z = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
248
248
|
return null;
|
|
249
249
|
};
|
|
250
|
-
|
|
250
|
+
v = {
|
|
251
251
|
react_stack_bottom_frame: function(e) {
|
|
252
252
|
return e();
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
|
-
var
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
)(),
|
|
259
|
-
|
|
260
|
-
var n = 1e4 >
|
|
261
|
-
return
|
|
255
|
+
var N, g = {}, Y = v.react_stack_bottom_frame.bind(
|
|
256
|
+
v,
|
|
257
|
+
l
|
|
258
|
+
)(), $ = O(m(l)), I = {};
|
|
259
|
+
p.Fragment = A, p.jsx = function(e, r, t) {
|
|
260
|
+
var n = 1e4 > x.recentlyCreatedOwnerStacks++;
|
|
261
|
+
return w(
|
|
262
262
|
e,
|
|
263
263
|
r,
|
|
264
264
|
t,
|
|
265
265
|
!1,
|
|
266
|
-
n ? Error("react-stack-top-frame") :
|
|
267
|
-
n ?
|
|
266
|
+
n ? Error("react-stack-top-frame") : Y,
|
|
267
|
+
n ? O(m(e)) : $
|
|
268
268
|
);
|
|
269
|
-
},
|
|
270
|
-
var n = 1e4 >
|
|
271
|
-
return
|
|
269
|
+
}, p.jsxs = function(e, r, t) {
|
|
270
|
+
var n = 1e4 > x.recentlyCreatedOwnerStacks++;
|
|
271
|
+
return w(
|
|
272
272
|
e,
|
|
273
273
|
r,
|
|
274
274
|
t,
|
|
275
275
|
!0,
|
|
276
|
-
n ? Error("react-stack-top-frame") :
|
|
277
|
-
n ?
|
|
276
|
+
n ? Error("react-stack-top-frame") : Y,
|
|
277
|
+
n ? O(m(e)) : $
|
|
278
278
|
);
|
|
279
279
|
};
|
|
280
|
-
})()),
|
|
280
|
+
})()), p;
|
|
281
281
|
}
|
|
282
|
-
var
|
|
283
|
-
function
|
|
284
|
-
return
|
|
282
|
+
var L;
|
|
283
|
+
function ue() {
|
|
284
|
+
return L || (L = 1, process.env.NODE_ENV === "production" ? T.exports = oe() : T.exports = se()), T.exports;
|
|
285
|
+
}
|
|
286
|
+
var le = ue();
|
|
287
|
+
function ie({
|
|
288
|
+
baseURL: s,
|
|
289
|
+
getToken: c,
|
|
290
|
+
timeoutMs: f = 15e3,
|
|
291
|
+
axiosInstance: m,
|
|
292
|
+
currency: u,
|
|
293
|
+
lng: l,
|
|
294
|
+
onError: d
|
|
295
|
+
} = {}) {
|
|
296
|
+
const i = m ?? ne.create({
|
|
297
|
+
baseURL: s,
|
|
298
|
+
timeout: f,
|
|
299
|
+
headers: { "Content-Type": "application/json" }
|
|
300
|
+
});
|
|
301
|
+
return i.interceptors.request.use(async (o) => {
|
|
302
|
+
if (c) {
|
|
303
|
+
const R = await c();
|
|
304
|
+
R && (o.headers = o.headers || {}, o.headers.Authorization = `Bearer ${R}`);
|
|
305
|
+
}
|
|
306
|
+
return o;
|
|
307
|
+
}), i.interceptors.request.use((o) => {
|
|
308
|
+
o.headers.Currency = u, o.headers["currency-code"] = u, o.headers.lang = l;
|
|
309
|
+
}), i.interceptors.response.use(
|
|
310
|
+
(o) => o,
|
|
311
|
+
(o) => d ? d(o, { instance: i }) : Promise.reject(o)
|
|
312
|
+
), i;
|
|
313
|
+
}
|
|
314
|
+
function _e({ children: s, ...c }) {
|
|
315
|
+
const f = te(() => ie(c), [c]);
|
|
316
|
+
return /* @__PURE__ */ le.jsx(ApiCtx.Provider, { value: { client: f }, children: s });
|
|
285
317
|
}
|
|
286
|
-
oe();
|
|
287
318
|
export {
|
|
288
|
-
|
|
319
|
+
_e as ApiProvider,
|
|
320
|
+
me as useAxios
|
|
289
321
|
};
|