@obb871001/api-integration-sdk 1.0.24 → 1.0.26
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 +7 -7
- package/dist/index.js +110 -106
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("@tanstack/react-query"),T=require("react"),pr=require("axios"),Z=T.createContext(null),je=()=>{const c=T.useContext(Z);if(console.log(c),!c)throw new Error("useApiContext must be used within ApiProvider");return c},yr=()=>{const{client:c}=je()
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("@tanstack/react-query"),T=require("react"),pr=require("axios"),Z=T.createContext(null),je=()=>{const c=T.useContext(Z);if(console.log(c),!c)throw new Error("useApiContext must be used within ApiProvider");return c},yr=()=>{const{client:c}=je();console.log(c);const v=T.useCallback(async d=>{const{mac_address:p="",app_version:o="",anydesk_id:C=""}=d,{data:y}=await c.post("/cash-register/login",{mac_address:p,app_version:o,anydesk_id:C});return y},[c]),m=T.useCallback(async()=>{const{data:d}=await c.get("/getMemberInfo");return d},[c]);console.log(m);const E=T.useCallback(async()=>{const{data:d}=await c.get("/getGameList");return d},[c]),_=T.useCallback(async()=>{const{data:d}=await c.get("/getNowCurrencyExchange");return d},[c]),P=T.useCallback(async()=>{const{data:d}=await c.get("/getFavoriteGame");return d},[c]);return{machineLoginApi:v,userInfoApi:m,userGameListApi:E,userFavoriteGameApi:P,userCurrencyExchangeApi:_}},gr=()=>{const{userInfoApi:c}=yr(),v=H.useQueries({queries:[{queryKey:["getMemberInfo"],queryFn:async()=>await c(),refetchInterval:5e4}]});console.log(v);const{data:m,isFetching:E,error:_}=v[0]||{};return{data:m,isFetching:E,error:_}};var V={exports:{}},$={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.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 Pe;function hr(){if(Pe)return $;Pe=1;var c=T,v=Symbol.for("react.element"),
|
|
9
|
+
*/var Pe;function hr(){if(Pe)return $;Pe=1;var c=T,v=Symbol.for("react.element"),m=Symbol.for("react.fragment"),E=Object.prototype.hasOwnProperty,_=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P={key:!0,ref:!0,__self:!0,__source:!0};function d(p,o,C){var y,w={},x=null,Y=null;C!==void 0&&(x=""+C),o.key!==void 0&&(x=""+o.key),o.ref!==void 0&&(Y=o.ref);for(y in o)E.call(o,y)&&!P.hasOwnProperty(y)&&(w[y]=o[y]);if(p&&p.defaultProps)for(y in o=p.defaultProps,o)w[y]===void 0&&(w[y]=o[y]);return{$$typeof:v,type:p,key:x,ref:Y,props:w,_owner:_.current}}return $.Fragment=m,$.jsx=d,$.jsxs=d,$}var W={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
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 Oe;function br(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&(function(){var c=T,v=Symbol.for("react.element"),
|
|
17
|
+
*/var Oe;function br(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&(function(){var c=T,v=Symbol.for("react.element"),m=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),ee=Symbol.iterator,ke="@@iterator";function Ae(e){if(e===null||typeof e!="object")return null;var r=ee&&e[ee]||e[ke];return typeof r=="function"?r:null}var k=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Fe("error",e,t)}}function Fe(e,r,t){{var n=k.ReactDebugCurrentFrame,u=n.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));var s=t.map(function(i){return String(i)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var De=!1,Ie=!1,$e=!1,We=!1,Ye=!1,re;re=Symbol.for("react.module.reference");function Le(e){return!!(typeof e=="string"||typeof e=="function"||e===E||e===P||Ye||e===_||e===C||e===y||We||e===Y||De||Ie||$e||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===w||e.$$typeof===d||e.$$typeof===p||e.$$typeof===o||e.$$typeof===re||e.getModuleId!==void 0))}function Me(e,r,t){var n=e.displayName;if(n)return n;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function te(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case m:return"Portal";case P:return"Profiler";case _:return"StrictMode";case C:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case p:var r=e;return te(r)+".Consumer";case d:var t=e;return te(t._context)+".Provider";case o:return Me(e,e.render,"ForwardRef");case w:var n=e.displayName||null;return n!==null?n:O(e.type)||"Memo";case x:{var u=e,s=u._payload,i=u._init;try{return O(i(s))}catch{return null}}}return null}var S=Object.assign,D=0,ne,ae,ie,oe,ue,se,ce;function le(){}le.__reactDisabledLog=!0;function Ue(){{if(D===0){ne=console.log,ae=console.info,ie=console.warn,oe=console.error,ue=console.group,se=console.groupCollapsed,ce=console.groupEnd;var e={configurable:!0,enumerable:!0,value:le,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}D++}}function qe(){{if(D--,D===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:S({},e,{value:ne}),info:S({},e,{value:ae}),warn:S({},e,{value:ie}),error:S({},e,{value:oe}),group:S({},e,{value:ue}),groupCollapsed:S({},e,{value:se}),groupEnd:S({},e,{value:ce})})}D<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var N=k.ReactCurrentDispatcher,J;function L(e,r,t){{if(J===void 0)try{throw Error()}catch(u){var n=u.stack.trim().match(/\n( *(at )?)/);J=n&&n[1]||""}return`
|
|
18
18
|
`+J+e}}var B=!1,M;{var Ve=typeof WeakMap=="function"?WeakMap:Map;M=new Ve}function fe(e,r){if(!e||B)return"";{var t=M.get(e);if(t!==void 0)return t}var n;B=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=N.current,N.current=null,Ue();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(b){n=b}Reflect.construct(e,[],i)}else{try{i.call()}catch(b){n=b}e.call(i.prototype)}}else{try{throw Error()}catch(b){n=b}e()}}catch(b){if(b&&n&&typeof b.stack=="string"){for(var a=b.stack.split(`
|
|
19
19
|
`),h=n.stack.split(`
|
|
20
|
-
`),l=a.length-1,f=h.length-1;l>=1&&f>=0&&a[l]!==h[f];)f--;for(;l>=1&&f>=0;l--,f--)if(a[l]!==h[f]){if(l!==1||f!==1)do if(l--,f--,f<0||a[l]!==h[f]){var
|
|
21
|
-
`+a[l].replace(" at new "," at ");return e.displayName&&
|
|
20
|
+
`),l=a.length-1,f=h.length-1;l>=1&&f>=0&&a[l]!==h[f];)f--;for(;l>=1&&f>=0;l--,f--)if(a[l]!==h[f]){if(l!==1||f!==1)do if(l--,f--,f<0||a[l]!==h[f]){var R=`
|
|
21
|
+
`+a[l].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,R),R}while(l>=1&&f>=0);break}}}finally{B=!1,N.current=s,qe(),Error.prepareStackTrace=u}var F=e?e.displayName||e.name:"",j=F?L(F):"";return typeof e=="function"&&M.set(e,j),j}function Ne(e,r,t){return fe(e,!1)}function Je(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return fe(e,Je(e));if(typeof e=="string")return L(e);switch(e){case C:return L("Suspense");case y:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case o:return Ne(e.render);case w:return U(e.type,r,t);case x:{var n=e,u=n._payload,s=n._init;try{return U(s(u),r,t)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,de={},ve=k.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ve.setExtraStackFrame(t)}else ve.setExtraStackFrame(null)}function Be(e,r,t,n,u){{var s=Function.call.bind(I);for(var i in e)if(s(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var h=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(l){a=l}a&&!(a instanceof Error)&&(q(u),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),q(null)),a instanceof Error&&!(a.message in de)&&(de[a.message]=!0,q(u),g("Failed %s type: %s",t,a.message),q(null))}}}var Ge=Array.isArray;function G(e){return Ge(e)}function Ke(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Qe(e){try{return pe(e),!1}catch{return!0}}function pe(e){return""+e}function ye(e){if(Qe(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ke(e)),pe(e)}var ge=k.ReactCurrentOwner,ze={key:!0,ref:!0,__self:!0,__source:!0},he,be;function Xe(e){if(I.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function He(e){if(I.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ze(e,r){typeof e.ref=="string"&&ge.current}function er(e,r){{var t=function(){he||(he=!0,g("%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://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function rr(e,r){{var t=function(){be||(be=!0,g("%s: `ref` 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://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var tr=function(e,r,t,n,u,s,i){var a={$$typeof:v,type:e,key:r,ref:t,props:i,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function nr(e,r,t,n,u){{var s,i={},a=null,h=null;t!==void 0&&(ye(t),a=""+t),He(r)&&(ye(r.key),a=""+r.key),Xe(r)&&(h=r.ref,Ze(r,u));for(s in r)I.call(r,s)&&!ze.hasOwnProperty(s)&&(i[s]=r[s]);if(e&&e.defaultProps){var l=e.defaultProps;for(s in l)i[s]===void 0&&(i[s]=l[s])}if(a||h){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&er(i,f),h&&rr(i,f)}return tr(e,a,h,u,n,ge.current,i)}}var K=k.ReactCurrentOwner,Ee=k.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var Q;Q=!1;function z(e){return typeof e=="object"&&e!==null&&e.$$typeof===v}function _e(){{if(K.current){var e=O(K.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function ar(e){return""}var me={};function ir(e){{var r=_e();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+t+">.")}return r}}function Re(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ir(r);if(me[t])return;me[t]=!0;var n="";e&&e._owner&&e._owner!==K.current&&(n=" It was passed a child from "+O(e._owner.type)+"."),A(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function Ce(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];z(n)&&Re(n,r)}else if(z(e))e._store&&(e._store.validated=!0);else if(e){var u=Ae(e);if(typeof u=="function"&&u!==e.entries)for(var s=u.call(e),i;!(i=s.next()).done;)z(i.value)&&Re(i.value,r)}}}function or(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===o||r.$$typeof===w))t=r.propTypes;else return;if(t){var n=O(r);Be(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var u=O(r);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}var Te={};function we(e,r,t,n,u,s){{var i=Le(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var h=ar();h?a+=h:a+=_e();var l;e===null?l="null":G(e)?l="array":e!==void 0&&e.$$typeof===v?(l="<"+(O(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,a)}var f=nr(e,r,t,u,s);if(f==null)return f;if(i){var
|
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function Re(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ir(r);if(me[t])return;me[t]=!0;var n="";e&&e._owner&&e._owner!==K.current&&(n=" It was passed a child from "+O(e._owner.type)+"."),A(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function Ce(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];z(n)&&Re(n,r)}else if(z(e))e._store&&(e._store.validated=!0);else if(e){var u=Ae(e);if(typeof u=="function"&&u!==e.entries)for(var s=u.call(e),i;!(i=s.next()).done;)z(i.value)&&Re(i.value,r)}}}function or(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===o||r.$$typeof===w))t=r.propTypes;else return;if(t){var n=O(r);Be(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var u=O(r);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}var Te={};function we(e,r,t,n,u,s){{var i=Le(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var h=ar();h?a+=h:a+=_e();var l;e===null?l="null":G(e)?l="array":e!==void 0&&e.$$typeof===v?(l="<"+(O(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,a)}var f=nr(e,r,t,u,s);if(f==null)return f;if(i){var R=r.children;if(R!==void 0)if(n)if(G(R)){for(var F=0;F<R.length;F++)Ce(R[F],e);Object.freeze&&Object.freeze(R)}else g("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 Ce(R,e)}if(I.call(r,"key")){var j=O(e),b=Object.keys(r).filter(function(vr){return vr!=="key"}),X=b.length>0?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}";if(!Te[j+X]){var dr=b.length>0?"{"+b.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,X,j,dr,j),Te[j+X]=!0}}return e===E?ur(f):or(f),f}}function sr(e,r,t){return we(e,r,t,!0)}function cr(e,r,t){return we(e,r,t,!1)}var lr=cr,fr=sr;W.Fragment=E,W.jsx=lr,W.jsxs=fr})()),W}var xe;function Er(){return xe||(xe=1,process.env.NODE_ENV==="production"?V.exports=hr():V.exports=br()),V.exports}var Se=Er();function _r({baseURL:c,getToken:v,timeoutMs:
|
|
30
|
+
<%s key={someKey} {...props} />`,X,j,dr,j),Te[j+X]=!0}}return e===E?ur(f):or(f),f}}function sr(e,r,t){return we(e,r,t,!0)}function cr(e,r,t){return we(e,r,t,!1)}var lr=cr,fr=sr;W.Fragment=E,W.jsx=lr,W.jsxs=fr})()),W}var xe;function Er(){return xe||(xe=1,process.env.NODE_ENV==="production"?V.exports=hr():V.exports=br()),V.exports}var Se=Er();function _r({baseURL:c,getToken:v,timeoutMs:m=15e3,axiosInstance:E,currency:_,lng:P,onError:d}={}){const p=E??pr.create({baseURL:c,timeout:m,headers:{"Content-Type":"application/json"}});return p.interceptors.request.use(async o=>{if(v){const C=await v();C&&(o.headers=o.headers||{},o.headers.Authorization=`Bearer ${C}`)}return o}),p.interceptors.request.use(o=>{o.headers.Currency=_,o.headers["currency-code"]=_,o.headers.lang=P}),p.interceptors.response.use(o=>o,o=>d?d(o,{instance:p}):Promise.reject(o)),p}function mr({children:c,...v}){console.log(v);const m=T.useMemo(()=>_r(v),[v]),_=T.useMemo(()=>new H.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),[]);return Se.jsx(H.QueryClientProvider,{client:_,children:Se.jsx(Z.Provider,{value:{client:m},children:c})})}exports.ApiCtx=Z;exports.ApiProvider=mr;exports.useApiContext=je;exports.usePeriodicDataUpdater=gr;
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import { useQueries as pr, QueryClient as yr, QueryClientProvider as
|
|
2
|
-
import Se, { createContext as
|
|
1
|
+
import { useQueries as pr, QueryClient as yr, QueryClientProvider as gr } from "@tanstack/react-query";
|
|
2
|
+
import Se, { createContext as hr, useContext as mr, useCallback as I, useMemo as we } from "react";
|
|
3
3
|
import br from "axios";
|
|
4
|
-
const je =
|
|
4
|
+
const je = hr(null), Er = () => {
|
|
5
5
|
const c = mr(je);
|
|
6
6
|
if (console.log(c), !c)
|
|
7
7
|
throw new Error("useApiContext must be used within ApiProvider");
|
|
8
8
|
return c;
|
|
9
9
|
}, _r = () => {
|
|
10
|
-
const { client: c } = Er()
|
|
10
|
+
const { client: c } = Er();
|
|
11
|
+
console.log(c);
|
|
12
|
+
const v = I(
|
|
11
13
|
async (d) => {
|
|
12
|
-
const { mac_address: p = "", app_version:
|
|
14
|
+
const { mac_address: p = "", app_version: i = "", anydesk_id: C = "" } = d, { data: y } = await c.post("/cash-register/login", {
|
|
13
15
|
mac_address: p,
|
|
14
|
-
app_version:
|
|
16
|
+
app_version: i,
|
|
15
17
|
anydesk_id: C
|
|
16
18
|
});
|
|
17
19
|
return y;
|
|
18
20
|
},
|
|
19
21
|
[c]
|
|
20
|
-
),
|
|
22
|
+
), _ = I(async () => {
|
|
21
23
|
const { data: d } = await c.get("/getMemberInfo");
|
|
22
24
|
return d;
|
|
23
|
-
}, [c])
|
|
25
|
+
}, [c]);
|
|
26
|
+
console.log(_);
|
|
27
|
+
const b = I(async () => {
|
|
24
28
|
const { data: d } = await c.get("/getGameList");
|
|
25
29
|
return d;
|
|
26
30
|
}, [c]), E = I(async () => {
|
|
@@ -32,7 +36,7 @@ const je = gr(null), Er = () => {
|
|
|
32
36
|
}, [c]);
|
|
33
37
|
return {
|
|
34
38
|
machineLoginApi: v,
|
|
35
|
-
userInfoApi:
|
|
39
|
+
userInfoApi: _,
|
|
36
40
|
userGameListApi: b,
|
|
37
41
|
userFavoriteGameApi: T,
|
|
38
42
|
userCurrencyExchangeApi: E
|
|
@@ -48,8 +52,8 @@ const je = gr(null), Er = () => {
|
|
|
48
52
|
]
|
|
49
53
|
});
|
|
50
54
|
console.log(v);
|
|
51
|
-
const { data:
|
|
52
|
-
return { data:
|
|
55
|
+
const { data: _, isFetching: b, error: E } = v[0] || {};
|
|
56
|
+
return { data: _, isFetching: b, error: E };
|
|
53
57
|
};
|
|
54
58
|
var q = { exports: {} }, $ = {};
|
|
55
59
|
/**
|
|
@@ -65,15 +69,15 @@ var Te;
|
|
|
65
69
|
function Rr() {
|
|
66
70
|
if (Te) return $;
|
|
67
71
|
Te = 1;
|
|
68
|
-
var c = Se, v = Symbol.for("react.element"),
|
|
69
|
-
function d(p,
|
|
72
|
+
var c = Se, v = Symbol.for("react.element"), _ = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, E = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, T = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
|
+
function d(p, i, C) {
|
|
70
74
|
var y, w = {}, P = null, Y = null;
|
|
71
|
-
C !== void 0 && (P = "" + C),
|
|
72
|
-
for (y in
|
|
73
|
-
if (p && p.defaultProps) for (y in
|
|
75
|
+
C !== void 0 && (P = "" + C), i.key !== void 0 && (P = "" + i.key), i.ref !== void 0 && (Y = i.ref);
|
|
76
|
+
for (y in i) b.call(i, y) && !T.hasOwnProperty(y) && (w[y] = i[y]);
|
|
77
|
+
if (p && p.defaultProps) for (y in i = p.defaultProps, i) w[y] === void 0 && (w[y] = i[y]);
|
|
74
78
|
return { $$typeof: v, type: p, key: P, ref: Y, props: w, _owner: E.current };
|
|
75
79
|
}
|
|
76
|
-
return $.Fragment =
|
|
80
|
+
return $.Fragment = _, $.jsx = d, $.jsxs = d, $;
|
|
77
81
|
}
|
|
78
82
|
var W = {};
|
|
79
83
|
/**
|
|
@@ -88,7 +92,7 @@ var W = {};
|
|
|
88
92
|
var Oe;
|
|
89
93
|
function Cr() {
|
|
90
94
|
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
91
|
-
var c = Se, v = Symbol.for("react.element"),
|
|
95
|
+
var c = Se, v = Symbol.for("react.element"), _ = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), p = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), H = Symbol.iterator, ke = "@@iterator";
|
|
92
96
|
function Ae(e) {
|
|
93
97
|
if (e === null || typeof e != "object")
|
|
94
98
|
return null;
|
|
@@ -96,7 +100,7 @@ function Cr() {
|
|
|
96
100
|
return typeof r == "function" ? r : null;
|
|
97
101
|
}
|
|
98
102
|
var j = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
99
|
-
function
|
|
103
|
+
function g(e) {
|
|
100
104
|
{
|
|
101
105
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
102
106
|
t[n - 1] = arguments[n];
|
|
@@ -107,8 +111,8 @@ function Cr() {
|
|
|
107
111
|
{
|
|
108
112
|
var n = j.ReactDebugCurrentFrame, u = n.getStackAddendum();
|
|
109
113
|
u !== "" && (r += "%s", t = t.concat([u]));
|
|
110
|
-
var s = t.map(function(
|
|
111
|
-
return String(
|
|
114
|
+
var s = t.map(function(o) {
|
|
115
|
+
return String(o);
|
|
112
116
|
});
|
|
113
117
|
s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
|
|
114
118
|
}
|
|
@@ -116,7 +120,7 @@ function Cr() {
|
|
|
116
120
|
var De = !1, Ie = !1, $e = !1, We = !1, Ye = !1, Z;
|
|
117
121
|
Z = Symbol.for("react.module.reference");
|
|
118
122
|
function Le(e) {
|
|
119
|
-
return !!(typeof e == "string" || typeof e == "function" || e === b || e === T || Ye || e === E || e === C || e === y || We || e === Y || De || Ie || $e || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === w || e.$$typeof === d || e.$$typeof === p || e.$$typeof ===
|
|
123
|
+
return !!(typeof e == "string" || typeof e == "function" || e === b || e === T || Ye || e === E || e === C || e === y || We || e === Y || De || Ie || $e || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === w || e.$$typeof === d || e.$$typeof === p || e.$$typeof === i || // This needs to include all possible module reference object
|
|
120
124
|
// types supported by any Flight configuration anywhere since
|
|
121
125
|
// we don't know which Flight build this will end up being used
|
|
122
126
|
// with.
|
|
@@ -135,14 +139,14 @@ function Cr() {
|
|
|
135
139
|
function O(e) {
|
|
136
140
|
if (e == null)
|
|
137
141
|
return null;
|
|
138
|
-
if (typeof e.tag == "number" &&
|
|
142
|
+
if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
139
143
|
return e.displayName || e.name || null;
|
|
140
144
|
if (typeof e == "string")
|
|
141
145
|
return e;
|
|
142
146
|
switch (e) {
|
|
143
147
|
case b:
|
|
144
148
|
return "Fragment";
|
|
145
|
-
case
|
|
149
|
+
case _:
|
|
146
150
|
return "Portal";
|
|
147
151
|
case T:
|
|
148
152
|
return "Profiler";
|
|
@@ -161,15 +165,15 @@ function Cr() {
|
|
|
161
165
|
case d:
|
|
162
166
|
var t = e;
|
|
163
167
|
return ee(t._context) + ".Provider";
|
|
164
|
-
case
|
|
168
|
+
case i:
|
|
165
169
|
return Me(e, e.render, "ForwardRef");
|
|
166
170
|
case w:
|
|
167
171
|
var n = e.displayName || null;
|
|
168
172
|
return n !== null ? n : O(e.type) || "Memo";
|
|
169
173
|
case P: {
|
|
170
|
-
var u = e, s = u._payload,
|
|
174
|
+
var u = e, s = u._payload, o = u._init;
|
|
171
175
|
try {
|
|
172
|
-
return O(
|
|
176
|
+
return O(o(s));
|
|
173
177
|
} catch {
|
|
174
178
|
return null;
|
|
175
179
|
}
|
|
@@ -177,14 +181,14 @@ function Cr() {
|
|
|
177
181
|
}
|
|
178
182
|
return null;
|
|
179
183
|
}
|
|
180
|
-
var x = Object.assign, F = 0, re, te, ne, ae,
|
|
184
|
+
var x = Object.assign, F = 0, re, te, ne, ae, oe, ie, ue;
|
|
181
185
|
function se() {
|
|
182
186
|
}
|
|
183
187
|
se.__reactDisabledLog = !0;
|
|
184
188
|
function Ue() {
|
|
185
189
|
{
|
|
186
190
|
if (F === 0) {
|
|
187
|
-
re = console.log, te = console.info, ne = console.warn, ae = console.error,
|
|
191
|
+
re = console.log, te = console.info, ne = console.warn, ae = console.error, oe = console.group, ie = console.groupCollapsed, ue = console.groupEnd;
|
|
188
192
|
var e = {
|
|
189
193
|
configurable: !0,
|
|
190
194
|
enumerable: !0,
|
|
@@ -226,17 +230,17 @@ function Cr() {
|
|
|
226
230
|
value: ae
|
|
227
231
|
}),
|
|
228
232
|
group: x({}, e, {
|
|
229
|
-
value:
|
|
233
|
+
value: oe
|
|
230
234
|
}),
|
|
231
235
|
groupCollapsed: x({}, e, {
|
|
232
|
-
value:
|
|
236
|
+
value: ie
|
|
233
237
|
}),
|
|
234
238
|
groupEnd: x({}, e, {
|
|
235
239
|
value: ue
|
|
236
240
|
})
|
|
237
241
|
});
|
|
238
242
|
}
|
|
239
|
-
F < 0 &&
|
|
243
|
+
F < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
240
244
|
}
|
|
241
245
|
}
|
|
242
246
|
var N = j.ReactCurrentDispatcher, J;
|
|
@@ -274,27 +278,27 @@ function Cr() {
|
|
|
274
278
|
s = N.current, N.current = null, Ue();
|
|
275
279
|
try {
|
|
276
280
|
if (r) {
|
|
277
|
-
var
|
|
281
|
+
var o = function() {
|
|
278
282
|
throw Error();
|
|
279
283
|
};
|
|
280
|
-
if (Object.defineProperty(
|
|
284
|
+
if (Object.defineProperty(o.prototype, "props", {
|
|
281
285
|
set: function() {
|
|
282
286
|
throw Error();
|
|
283
287
|
}
|
|
284
288
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
285
289
|
try {
|
|
286
|
-
Reflect.construct(
|
|
290
|
+
Reflect.construct(o, []);
|
|
287
291
|
} catch (m) {
|
|
288
292
|
n = m;
|
|
289
293
|
}
|
|
290
|
-
Reflect.construct(e, [],
|
|
294
|
+
Reflect.construct(e, [], o);
|
|
291
295
|
} else {
|
|
292
296
|
try {
|
|
293
|
-
|
|
297
|
+
o.call();
|
|
294
298
|
} catch (m) {
|
|
295
299
|
n = m;
|
|
296
300
|
}
|
|
297
|
-
e.call(
|
|
301
|
+
e.call(o.prototype);
|
|
298
302
|
}
|
|
299
303
|
} else {
|
|
300
304
|
try {
|
|
@@ -307,17 +311,17 @@ function Cr() {
|
|
|
307
311
|
} catch (m) {
|
|
308
312
|
if (m && n && typeof m.stack == "string") {
|
|
309
313
|
for (var a = m.stack.split(`
|
|
310
|
-
`),
|
|
311
|
-
`), l = a.length - 1, f =
|
|
314
|
+
`), h = n.stack.split(`
|
|
315
|
+
`), l = a.length - 1, f = h.length - 1; l >= 1 && f >= 0 && a[l] !== h[f]; )
|
|
312
316
|
f--;
|
|
313
317
|
for (; l >= 1 && f >= 0; l--, f--)
|
|
314
|
-
if (a[l] !==
|
|
318
|
+
if (a[l] !== h[f]) {
|
|
315
319
|
if (l !== 1 || f !== 1)
|
|
316
320
|
do
|
|
317
|
-
if (l--, f--, f < 0 || a[l] !==
|
|
318
|
-
var
|
|
321
|
+
if (l--, f--, f < 0 || a[l] !== h[f]) {
|
|
322
|
+
var R = `
|
|
319
323
|
` + a[l].replace(" at new ", " at ");
|
|
320
|
-
return e.displayName &&
|
|
324
|
+
return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, R), R;
|
|
321
325
|
}
|
|
322
326
|
while (l >= 1 && f >= 0);
|
|
323
327
|
break;
|
|
@@ -351,7 +355,7 @@ function Cr() {
|
|
|
351
355
|
}
|
|
352
356
|
if (typeof e == "object")
|
|
353
357
|
switch (e.$$typeof) {
|
|
354
|
-
case
|
|
358
|
+
case i:
|
|
355
359
|
return Ne(e.render);
|
|
356
360
|
case w:
|
|
357
361
|
return U(e.type, r, t);
|
|
@@ -376,19 +380,19 @@ function Cr() {
|
|
|
376
380
|
function Be(e, r, t, n, u) {
|
|
377
381
|
{
|
|
378
382
|
var s = Function.call.bind(D);
|
|
379
|
-
for (var
|
|
380
|
-
if (s(e,
|
|
383
|
+
for (var o in e)
|
|
384
|
+
if (s(e, o)) {
|
|
381
385
|
var a = void 0;
|
|
382
386
|
try {
|
|
383
|
-
if (typeof e[
|
|
384
|
-
var
|
|
385
|
-
throw
|
|
387
|
+
if (typeof e[o] != "function") {
|
|
388
|
+
var h = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
389
|
+
throw h.name = "Invariant Violation", h;
|
|
386
390
|
}
|
|
387
|
-
a = e[
|
|
391
|
+
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
388
392
|
} catch (l) {
|
|
389
393
|
a = l;
|
|
390
394
|
}
|
|
391
|
-
a && !(a instanceof Error) && (V(u),
|
|
395
|
+
a && !(a instanceof Error) && (V(u), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), V(null)), a instanceof Error && !(a.message in le) && (le[a.message] = !0, V(u), g("Failed %s type: %s", t, a.message), V(null));
|
|
392
396
|
}
|
|
393
397
|
}
|
|
394
398
|
}
|
|
@@ -414,14 +418,14 @@ function Cr() {
|
|
|
414
418
|
}
|
|
415
419
|
function ve(e) {
|
|
416
420
|
if (ze(e))
|
|
417
|
-
return
|
|
421
|
+
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), de(e);
|
|
418
422
|
}
|
|
419
423
|
var pe = j.ReactCurrentOwner, Qe = {
|
|
420
424
|
key: !0,
|
|
421
425
|
ref: !0,
|
|
422
426
|
__self: !0,
|
|
423
427
|
__source: !0
|
|
424
|
-
}, ye,
|
|
428
|
+
}, ye, ge;
|
|
425
429
|
function Xe(e) {
|
|
426
430
|
if (D.call(e, "ref")) {
|
|
427
431
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -444,7 +448,7 @@ function Cr() {
|
|
|
444
448
|
function er(e, r) {
|
|
445
449
|
{
|
|
446
450
|
var t = function() {
|
|
447
|
-
ye || (ye = !0,
|
|
451
|
+
ye || (ye = !0, g("%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://reactjs.org/link/special-props)", r));
|
|
448
452
|
};
|
|
449
453
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
450
454
|
get: t,
|
|
@@ -455,7 +459,7 @@ function Cr() {
|
|
|
455
459
|
function rr(e, r) {
|
|
456
460
|
{
|
|
457
461
|
var t = function() {
|
|
458
|
-
|
|
462
|
+
ge || (ge = !0, g("%s: `ref` 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://reactjs.org/link/special-props)", r));
|
|
459
463
|
};
|
|
460
464
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
461
465
|
get: t,
|
|
@@ -463,7 +467,7 @@ function Cr() {
|
|
|
463
467
|
});
|
|
464
468
|
}
|
|
465
469
|
}
|
|
466
|
-
var tr = function(e, r, t, n, u, s,
|
|
470
|
+
var tr = function(e, r, t, n, u, s, o) {
|
|
467
471
|
var a = {
|
|
468
472
|
// This tag allows us to uniquely identify this as a React Element
|
|
469
473
|
$$typeof: v,
|
|
@@ -471,7 +475,7 @@ function Cr() {
|
|
|
471
475
|
type: e,
|
|
472
476
|
key: r,
|
|
473
477
|
ref: t,
|
|
474
|
-
props:
|
|
478
|
+
props: o,
|
|
475
479
|
// Record the component responsible for creating this element.
|
|
476
480
|
_owner: s
|
|
477
481
|
};
|
|
@@ -494,29 +498,29 @@ function Cr() {
|
|
|
494
498
|
};
|
|
495
499
|
function nr(e, r, t, n, u) {
|
|
496
500
|
{
|
|
497
|
-
var s,
|
|
498
|
-
t !== void 0 && (ve(t), a = "" + t), He(r) && (ve(r.key), a = "" + r.key), Xe(r) && (
|
|
501
|
+
var s, o = {}, a = null, h = null;
|
|
502
|
+
t !== void 0 && (ve(t), a = "" + t), He(r) && (ve(r.key), a = "" + r.key), Xe(r) && (h = r.ref, Ze(r, u));
|
|
499
503
|
for (s in r)
|
|
500
|
-
D.call(r, s) && !Qe.hasOwnProperty(s) && (
|
|
504
|
+
D.call(r, s) && !Qe.hasOwnProperty(s) && (o[s] = r[s]);
|
|
501
505
|
if (e && e.defaultProps) {
|
|
502
506
|
var l = e.defaultProps;
|
|
503
507
|
for (s in l)
|
|
504
|
-
|
|
508
|
+
o[s] === void 0 && (o[s] = l[s]);
|
|
505
509
|
}
|
|
506
|
-
if (a ||
|
|
510
|
+
if (a || h) {
|
|
507
511
|
var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
508
|
-
a && er(
|
|
512
|
+
a && er(o, f), h && rr(o, f);
|
|
509
513
|
}
|
|
510
|
-
return tr(e, a,
|
|
514
|
+
return tr(e, a, h, u, n, pe.current, o);
|
|
511
515
|
}
|
|
512
516
|
}
|
|
513
|
-
var K = j.ReactCurrentOwner,
|
|
517
|
+
var K = j.ReactCurrentOwner, he = j.ReactDebugCurrentFrame;
|
|
514
518
|
function k(e) {
|
|
515
519
|
if (e) {
|
|
516
520
|
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
517
|
-
|
|
521
|
+
he.setExtraStackFrame(t);
|
|
518
522
|
} else
|
|
519
|
-
|
|
523
|
+
he.setExtraStackFrame(null);
|
|
520
524
|
}
|
|
521
525
|
var z;
|
|
522
526
|
z = !1;
|
|
@@ -539,7 +543,7 @@ Check the render method of \`` + e + "`.";
|
|
|
539
543
|
return "";
|
|
540
544
|
}
|
|
541
545
|
var be = {};
|
|
542
|
-
function
|
|
546
|
+
function or(e) {
|
|
543
547
|
{
|
|
544
548
|
var r = me();
|
|
545
549
|
if (!r) {
|
|
@@ -556,12 +560,12 @@ Check the top-level render call using <` + t + ">.");
|
|
|
556
560
|
if (!e._store || e._store.validated || e.key != null)
|
|
557
561
|
return;
|
|
558
562
|
e._store.validated = !0;
|
|
559
|
-
var t =
|
|
563
|
+
var t = or(r);
|
|
560
564
|
if (be[t])
|
|
561
565
|
return;
|
|
562
566
|
be[t] = !0;
|
|
563
567
|
var n = "";
|
|
564
|
-
e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + O(e._owner.type) + "."), k(e),
|
|
568
|
+
e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + O(e._owner.type) + "."), k(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), k(null);
|
|
565
569
|
}
|
|
566
570
|
}
|
|
567
571
|
function _e(e, r) {
|
|
@@ -578,12 +582,12 @@ Check the top-level render call using <` + t + ">.");
|
|
|
578
582
|
else if (e) {
|
|
579
583
|
var u = Ae(e);
|
|
580
584
|
if (typeof u == "function" && u !== e.entries)
|
|
581
|
-
for (var s = u.call(e),
|
|
582
|
-
Q(
|
|
585
|
+
for (var s = u.call(e), o; !(o = s.next()).done; )
|
|
586
|
+
Q(o.value) && Ee(o.value, r);
|
|
583
587
|
}
|
|
584
588
|
}
|
|
585
589
|
}
|
|
586
|
-
function
|
|
590
|
+
function ir(e) {
|
|
587
591
|
{
|
|
588
592
|
var r = e.type;
|
|
589
593
|
if (r == null || typeof r == "string")
|
|
@@ -591,7 +595,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
591
595
|
var t;
|
|
592
596
|
if (typeof r == "function")
|
|
593
597
|
t = r.propTypes;
|
|
594
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
598
|
+
else if (typeof r == "object" && (r.$$typeof === i || // Note: Memo only checks outer props here.
|
|
595
599
|
// Inner props are checked in the reconciler.
|
|
596
600
|
r.$$typeof === w))
|
|
597
601
|
t = r.propTypes;
|
|
@@ -603,9 +607,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
603
607
|
} else if (r.PropTypes !== void 0 && !z) {
|
|
604
608
|
z = !0;
|
|
605
609
|
var u = O(r);
|
|
606
|
-
|
|
610
|
+
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
607
611
|
}
|
|
608
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
612
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
609
613
|
}
|
|
610
614
|
}
|
|
611
615
|
function ur(e) {
|
|
@@ -613,40 +617,40 @@ Check the top-level render call using <` + t + ">.");
|
|
|
613
617
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
614
618
|
var n = r[t];
|
|
615
619
|
if (n !== "children" && n !== "key") {
|
|
616
|
-
k(e),
|
|
620
|
+
k(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), k(null);
|
|
617
621
|
break;
|
|
618
622
|
}
|
|
619
623
|
}
|
|
620
|
-
e.ref !== null && (k(e),
|
|
624
|
+
e.ref !== null && (k(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
|
|
621
625
|
}
|
|
622
626
|
}
|
|
623
627
|
var Re = {};
|
|
624
628
|
function Ce(e, r, t, n, u, s) {
|
|
625
629
|
{
|
|
626
|
-
var
|
|
627
|
-
if (!
|
|
630
|
+
var o = Le(e);
|
|
631
|
+
if (!o) {
|
|
628
632
|
var a = "";
|
|
629
633
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
630
|
-
var
|
|
631
|
-
|
|
634
|
+
var h = ar();
|
|
635
|
+
h ? a += h : a += me();
|
|
632
636
|
var l;
|
|
633
|
-
e === null ? l = "null" : G(e) ? l = "array" : e !== void 0 && e.$$typeof === v ? (l = "<" + (O(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e,
|
|
637
|
+
e === null ? l = "null" : G(e) ? l = "array" : e !== void 0 && e.$$typeof === v ? (l = "<" + (O(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a);
|
|
634
638
|
}
|
|
635
639
|
var f = nr(e, r, t, u, s);
|
|
636
640
|
if (f == null)
|
|
637
641
|
return f;
|
|
638
|
-
if (
|
|
639
|
-
var
|
|
640
|
-
if (
|
|
642
|
+
if (o) {
|
|
643
|
+
var R = r.children;
|
|
644
|
+
if (R !== void 0)
|
|
641
645
|
if (n)
|
|
642
|
-
if (G(
|
|
643
|
-
for (var A = 0; A <
|
|
644
|
-
_e(
|
|
645
|
-
Object.freeze && Object.freeze(
|
|
646
|
+
if (G(R)) {
|
|
647
|
+
for (var A = 0; A < R.length; A++)
|
|
648
|
+
_e(R[A], e);
|
|
649
|
+
Object.freeze && Object.freeze(R);
|
|
646
650
|
} else
|
|
647
|
-
|
|
651
|
+
g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
648
652
|
else
|
|
649
|
-
_e(
|
|
653
|
+
_e(R, e);
|
|
650
654
|
}
|
|
651
655
|
if (D.call(r, "key")) {
|
|
652
656
|
var S = O(e), m = Object.keys(r).filter(function(vr) {
|
|
@@ -654,7 +658,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
654
658
|
}), X = m.length > 0 ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
655
659
|
if (!Re[S + X]) {
|
|
656
660
|
var dr = m.length > 0 ? "{" + m.join(": ..., ") + ": ...}" : "{}";
|
|
657
|
-
|
|
661
|
+
g(`A props object containing a "key" prop is being spread into JSX:
|
|
658
662
|
let props = %s;
|
|
659
663
|
<%s {...props} />
|
|
660
664
|
React keys must be passed directly to JSX without using spread:
|
|
@@ -662,7 +666,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
662
666
|
<%s key={someKey} {...props} />`, X, S, dr, S), Re[S + X] = !0;
|
|
663
667
|
}
|
|
664
668
|
}
|
|
665
|
-
return e === b ? ur(f) :
|
|
669
|
+
return e === b ? ur(f) : ir(f), f;
|
|
666
670
|
}
|
|
667
671
|
}
|
|
668
672
|
function sr(e, r, t) {
|
|
@@ -683,7 +687,7 @@ var xe = wr();
|
|
|
683
687
|
function Tr({
|
|
684
688
|
baseURL: c,
|
|
685
689
|
getToken: v,
|
|
686
|
-
timeoutMs:
|
|
690
|
+
timeoutMs: _ = 15e3,
|
|
687
691
|
axiosInstance: b,
|
|
688
692
|
currency: E,
|
|
689
693
|
lng: T,
|
|
@@ -691,25 +695,25 @@ function Tr({
|
|
|
691
695
|
} = {}) {
|
|
692
696
|
const p = b ?? br.create({
|
|
693
697
|
baseURL: c,
|
|
694
|
-
timeout:
|
|
698
|
+
timeout: _,
|
|
695
699
|
headers: { "Content-Type": "application/json" }
|
|
696
700
|
});
|
|
697
|
-
return p.interceptors.request.use(async (
|
|
701
|
+
return p.interceptors.request.use(async (i) => {
|
|
698
702
|
if (v) {
|
|
699
703
|
const C = await v();
|
|
700
|
-
C && (
|
|
704
|
+
C && (i.headers = i.headers || {}, i.headers.Authorization = `Bearer ${C}`);
|
|
701
705
|
}
|
|
702
|
-
return
|
|
703
|
-
}), p.interceptors.request.use((
|
|
704
|
-
|
|
706
|
+
return i;
|
|
707
|
+
}), p.interceptors.request.use((i) => {
|
|
708
|
+
i.headers.Currency = E, i.headers["currency-code"] = E, i.headers.lang = T;
|
|
705
709
|
}), p.interceptors.response.use(
|
|
706
|
-
(
|
|
707
|
-
(
|
|
710
|
+
(i) => i,
|
|
711
|
+
(i) => d ? d(i, { instance: p }) : Promise.reject(i)
|
|
708
712
|
), p;
|
|
709
713
|
}
|
|
710
714
|
function jr({ children: c, ...v }) {
|
|
711
715
|
console.log(v);
|
|
712
|
-
const
|
|
716
|
+
const _ = we(() => Tr(v), [v]), E = we(
|
|
713
717
|
() => new yr({
|
|
714
718
|
defaultOptions: {
|
|
715
719
|
queries: {
|
|
@@ -720,7 +724,7 @@ function jr({ children: c, ...v }) {
|
|
|
720
724
|
}),
|
|
721
725
|
[]
|
|
722
726
|
);
|
|
723
|
-
return /* @__PURE__ */ xe.jsx(
|
|
727
|
+
return /* @__PURE__ */ xe.jsx(gr, { client: E, children: /* @__PURE__ */ xe.jsx(je.Provider, { value: { client: _ }, children: c }) });
|
|
724
728
|
}
|
|
725
729
|
export {
|
|
726
730
|
je as ApiCtx,
|