@obb871001/api-integration-sdk 1.0.18 → 1.0.19

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 (3) hide show
  1. package/dist/index.cjs +10 -10
  2. package/dist/index.js +135 -129
  3. 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 dr=require("@tanstack/react-query"),C=require("react"),vr=require("axios"),Q=C.createContext(null),xe=()=>{const c=C.useContext(Q);if(!c)throw new Error("useApiContext must be used within ApiProvider");return c},pr=()=>{const{client:c}=xe(),v=C.useCallback(async d=>{const{mac_address:p="",app_version:o="",anydesk_id:m=""}=d,{data:y}=await c.post("/cash-register/login",{mac_address:p,app_version:o,anydesk_id:m});return y},[c]),_=C.useCallback(async()=>{const{data:d}=await c.get("/getMemberInfo");return d},[c]),R=C.useCallback(async()=>{const{data:d}=await c.get("/getGameList");return d},[c]),T=C.useCallback(async()=>{const{data:d}=await c.get("/getNowCurrencyExchange");return d},[c]),P=C.useCallback(async()=>{const{data:d}=await c.get("/getFavoriteGame");return d},[c]);return{machineLoginApi:v,userInfoApi:_,userGameListApi:R,userFavoriteGameApi:P,userCurrencyExchangeApi:T}},yr=()=>{const{userInfoApi:c}=pr(),{data:v,isFetching:_}=dr.useQueries({queries:[{queryKey:["getMemberInfo"],queryFn:c,refetchInterval:5e4}]});return{data:v,isFetching:_}};var V={exports:{}},$={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("@tanstack/react-query"),C=require("react"),pr=require("axios"),Z=C.createContext(null),je=()=>{const c=C.useContext(Z);if(!c)throw new Error("useApiContext must be used within ApiProvider");return c},yr=()=>{const{client:c}=je(),v=C.useCallback(async d=>{const{mac_address:p="",app_version:o="",anydesk_id:R=""}=d,{data:y}=await c.post("/cash-register/login",{mac_address:p,app_version:o,anydesk_id:R});return y},[c]),m=C.useCallback(async()=>{const{data:d}=await c.get("/getMemberInfo");return d},[c]),E=C.useCallback(async()=>{const{data:d}=await c.get("/getGameList");return d},[c]),T=C.useCallback(async()=>{const{data:d}=await c.get("/getNowCurrencyExchange");return d},[c]),P=C.useCallback(async()=>{const{data:d}=await c.get("/getFavoriteGame");return d},[c]);return{machineLoginApi:v,userInfoApi:m,userGameListApi:E,userFavoriteGameApi:P,userCurrencyExchangeApi:T}},hr=()=>{const{userInfoApi:c}=yr(),{data:v,isFetching:m}=H.useQueries({queries:[{queryKey:["getMemberInfo"],queryFn:c,refetchInterval:5e4}]});return{data:v,isFetching:m}};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 we;function gr(){if(we)return $;we=1;var c=C,v=Symbol.for("react.element"),_=Symbol.for("react.fragment"),R=Object.prototype.hasOwnProperty,T=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,m){var y,w={},x=null,Y=null;m!==void 0&&(x=""+m),o.key!==void 0&&(x=""+o.key),o.ref!==void 0&&(Y=o.ref);for(y in o)R.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:T.current}}return $.Fragment=_,$.jsx=d,$.jsxs=d,$}var W={};/**
9
+ */var Pe;function gr(){if(Pe)return $;Pe=1;var c=C,v=Symbol.for("react.element"),m=Symbol.for("react.fragment"),E=Object.prototype.hasOwnProperty,T=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,R){var y,w={},x=null,Y=null;R!==void 0&&(x=""+R),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:T.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 Pe;function hr(){return Pe||(Pe=1,process.env.NODE_ENV!=="production"&&(function(){var c=C,v=Symbol.for("react.element"),_=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),T=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"),m=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"),Z=Symbol.iterator,Se="@@iterator";function je(e){if(e===null||typeof e!="object")return null;var r=Z&&e[Z]||e[Se];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];ke("error",e,t)}}function ke(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 Ae=!1,Fe=!1,De=!1,Ie=!1,$e=!1,ee;ee=Symbol.for("react.module.reference");function We(e){return!!(typeof e=="string"||typeof e=="function"||e===R||e===P||$e||e===T||e===m||e===y||Ie||e===Y||Ae||Fe||De||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===w||e.$$typeof===d||e.$$typeof===p||e.$$typeof===o||e.$$typeof===ee||e.getModuleId!==void 0))}function Ye(e,r,t){var n=e.displayName;if(n)return n;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function re(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 R:return"Fragment";case _:return"Portal";case P:return"Profiler";case T:return"StrictMode";case m:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case p:var r=e;return re(r)+".Consumer";case d:var t=e;return re(t._context)+".Provider";case o:return Ye(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,te,ne,ae,ie,oe,ue,se;function ce(){}ce.__reactDisabledLog=!0;function Le(){{if(D===0){te=console.log,ne=console.info,ae=console.warn,ie=console.error,oe=console.group,ue=console.groupCollapsed,se=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}D++}}function Me(){{if(D--,D===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:S({},e,{value:te}),info:S({},e,{value:ne}),warn:S({},e,{value:ae}),error:S({},e,{value:ie}),group:S({},e,{value:oe}),groupCollapsed:S({},e,{value:ue}),groupEnd:S({},e,{value:se})})}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
- `+J+e}}var B=!1,M;{var Ue=typeof WeakMap=="function"?WeakMap:Map;M=new Ue}function le(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,Le();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
- `),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 E=`
21
- `+a[l].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,E),E}while(l>=1&&f>=0);break}}}finally{B=!1,N.current=s,Me(),Error.prepareStackTrace=u}var F=e?e.displayName||e.name:"",j=F?L(F):"";return typeof e=="function"&&M.set(e,j),j}function qe(e,r,t){return le(e,!1)}function Ve(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return le(e,Ve(e));if(typeof e=="string")return L(e);switch(e){case m:return L("Suspense");case y:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case o:return qe(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,fe={},de=k.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);de.setExtraStackFrame(t)}else de.setExtraStackFrame(null)}function Ne(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 fe)&&(fe[a.message]=!0,q(u),g("Failed %s type: %s",t,a.message),q(null))}}}var Je=Array.isArray;function G(e){return Je(e)}function Be(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ge(e){try{return ve(e),!1}catch{return!0}}function ve(e){return""+e}function pe(e){if(Ge(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Be(e)),ve(e)}var ye=k.ReactCurrentOwner,Ke={key:!0,ref:!0,__self:!0,__source:!0},ge,he;function ze(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 Xe(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 He(e,r){typeof e.ref=="string"&&ye.current}function Qe(e,r){{var t=function(){ge||(ge=!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 Ze(e,r){{var t=function(){he||(he=!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 er=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 rr(e,r,t,n,u){{var s,i={},a=null,h=null;t!==void 0&&(pe(t),a=""+t),Xe(r)&&(pe(r.key),a=""+r.key),ze(r)&&(h=r.ref,He(r,u));for(s in r)I.call(r,s)&&!Ke.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&&Qe(i,f),h&&Ze(i,f)}return er(e,a,h,u,n,ye.current,i)}}var K=k.ReactCurrentOwner,be=k.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);be.setExtraStackFrame(t)}else be.setExtraStackFrame(null)}var z;z=!1;function X(e){return typeof e=="object"&&e!==null&&e.$$typeof===v}function Ee(){{if(K.current){var e=O(K.current.type);if(e)return`
17
+ */var Oe;function br(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&(function(){var c=C,v=Symbol.for("react.element"),m=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),T=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"),R=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 h(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===T||e===R||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 qe(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"&&h("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 T:return"StrictMode";case R: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 qe(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 Me(){{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 Ue(){{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&&h("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
+ `+J+e}}var B=!1,q;{var Ve=typeof WeakMap=="function"?WeakMap:Map;q=new Ve}function fe(e,r){if(!e||B)return"";{var t=q.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,Me();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
+ `),g=n.stack.split(`
20
+ `),l=a.length-1,f=g.length-1;l>=1&&f>=0&&a[l]!==g[f];)f--;for(;l>=1&&f>=0;l--,f--)if(a[l]!==g[f]){if(l!==1||f!==1)do if(l--,f--,f<0||a[l]!==g[f]){var _=`
21
+ `+a[l].replace(" at new "," at ");return e.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,_),_}while(l>=1&&f>=0);break}}}finally{B=!1,N.current=s,Ue(),Error.prepareStackTrace=u}var F=e?e.displayName||e.name:"",j=F?L(F):"";return typeof e=="function"&&q.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 M(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 R:return L("Suspense");case y:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case o:return Ne(e.render);case w:return M(e.type,r,t);case x:{var n=e,u=n._payload,s=n._init;try{return M(s(u),r,t)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,de={},ve=k.ReactDebugCurrentFrame;function U(e){if(e){var r=e._owner,t=M(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 g=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 g.name="Invariant Violation",g}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)&&(U(u),h("%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),U(null)),a instanceof Error&&!(a.message in de)&&(de[a.message]=!0,U(u),h("Failed %s type: %s",t,a.message),U(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 ze(e){try{return pe(e),!1}catch{return!0}}function pe(e){return""+e}function ye(e){if(ze(e))return h("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 he=k.ReactCurrentOwner,Xe={key:!0,ref:!0,__self:!0,__source:!0},ge,be;function Qe(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"&&he.current}function er(e,r){{var t=function(){ge||(ge=!0,h("%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,h("%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,g=null;t!==void 0&&(ye(t),a=""+t),He(r)&&(ye(r.key),a=""+r.key),Qe(r)&&(g=r.ref,Ze(r,u));for(s in r)I.call(r,s)&&!Xe.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||g){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&er(i,f),g&&rr(i,f)}return tr(e,a,g,u,n,he.current,i)}}var K=k.ReactCurrentOwner,Ee=k.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=M(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var z;z=!1;function X(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
- Check the render method of \``+e+"`."}return""}}function tr(e){return""}var _e={};function nr(e){{var r=Ee();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
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 me(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=nr(r);if(_e[t])return;_e[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 Re(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];X(n)&&me(n,r)}else if(X(e))e._store&&(e._store.validated=!0);else if(e){var u=je(e);if(typeof u=="function"&&u!==e.entries)for(var s=u.call(e),i;!(i=s.next()).done;)X(i.value)&&me(i.value,r)}}}function ar(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);Ne(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!z){z=!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 ir(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 Ce={};function Te(e,r,t,n,u,s){{var i=We(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=tr();h?a+=h:a+=Ee();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=rr(e,r,t,u,s);if(f==null)return f;if(i){var E=r.children;if(E!==void 0)if(n)if(G(E)){for(var F=0;F<E.length;F++)Re(E[F],e);Object.freeze&&Object.freeze(E)}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 Re(E,e)}if(I.call(r,"key")){var j=O(e),b=Object.keys(r).filter(function(fr){return fr!=="key"}),H=b.length>0?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}";if(!Ce[j+H]){var lr=b.length>0?"{"+b.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
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),h('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];X(n)&&Re(n,r)}else if(X(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;)X(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&&!z){z=!0;var u=O(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("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),h("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),h("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 g=ar();g?a+=g: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,h("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.children;if(_!==void 0)if(n)if(G(_)){for(var F=0;F<_.length;F++)Ce(_[F],e);Object.freeze&&Object.freeze(_)}else h("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(_,e)}if(I.call(r,"key")){var j=O(e),b=Object.keys(r).filter(function(vr){return vr!=="key"}),Q=b.length>0?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}";if(!Te[j+Q]){var dr=b.length>0?"{"+b.join(": ..., ")+": ...}":"{}";h(`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} />`,H,j,lr,j),Ce[j+H]=!0}}return e===R?ir(f):ar(f),f}}function or(e,r,t){return Te(e,r,t,!0)}function ur(e,r,t){return Te(e,r,t,!1)}var sr=ur,cr=or;W.Fragment=R,W.jsx=sr,W.jsxs=cr})()),W}var Oe;function br(){return Oe||(Oe=1,process.env.NODE_ENV==="production"?V.exports=gr():V.exports=hr()),V.exports}var Er=br();function _r({baseURL:c,getToken:v,timeoutMs:_=15e3,axiosInstance:R,currency:T,lng:P,onError:d}={}){const p=R??vr.create({baseURL:c,timeout:_,headers:{"Content-Type":"application/json"}});return p.interceptors.request.use(async o=>{if(v){const m=await v();m&&(o.headers=o.headers||{},o.headers.Authorization=`Bearer ${m}`)}return o}),p.interceptors.request.use(o=>{o.headers.Currency=T,o.headers["currency-code"]=T,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}){const _=C.useMemo(()=>_r(v),[v]);return Er.jsx(Q.Provider,{value:{client:_},children:c})}exports.ApiCtx=Q;exports.ApiProvider=mr;exports.useApiContext=xe;exports.usePeriodicDataUpdater=yr;
30
+ <%s key={someKey} {...props} />`,Q,j,dr,j),Te[j+Q]=!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=gr():V.exports=br()),V.exports}var Se=Er();function _r({baseURL:c,getToken:v,timeoutMs:m=15e3,axiosInstance:E,currency:T,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 R=await v();R&&(o.headers=o.headers||{},o.headers.Authorization=`Bearer ${R}`)}return o}),p.interceptors.request.use(o=>{o.headers.Currency=T,o.headers["currency-code"]=T,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}){const m=C.useMemo(()=>_r(v),[v]),E=new H.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});return Se.jsx(H.QueryClientProvider,{client:E,children:Se.jsx(Z.Provider,{value:{client:m},children:c})})}exports.ApiCtx=Z;exports.ApiProvider=mr;exports.useApiContext=je;exports.usePeriodicDataUpdater=hr;
package/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
- import { useQueries as dr } from "@tanstack/react-query";
2
- import Pe, { createContext as vr, useContext as pr, useCallback as I, useMemo as hr } from "react";
3
- import yr from "axios";
4
- const xe = vr(null), gr = () => {
5
- const c = pr(xe);
1
+ import { useQueries as vr, QueryClient as pr, QueryClientProvider as hr } from "@tanstack/react-query";
2
+ import xe, { createContext as yr, useContext as gr, useCallback as I, useMemo as mr } from "react";
3
+ import br from "axios";
4
+ const Se = yr(null), Er = () => {
5
+ const c = gr(Se);
6
6
  if (!c)
7
7
  throw new Error("useApiContext must be used within ApiProvider");
8
8
  return c;
9
- }, mr = () => {
10
- const { client: c } = gr(), v = I(
9
+ }, _r = () => {
10
+ const { client: c } = Er(), v = I(
11
11
  async (d) => {
12
- const { mac_address: p = "", app_version: o = "", anydesk_id: _ = "" } = d, { data: h } = await c.post("/cash-register/login", {
12
+ const { mac_address: p = "", app_version: o = "", anydesk_id: R = "" } = d, { data: h } = await c.post("/cash-register/login", {
13
13
  mac_address: p,
14
14
  app_version: o,
15
- anydesk_id: _
15
+ anydesk_id: R
16
16
  });
17
17
  return h;
18
18
  },
19
19
  [c]
20
- ), E = I(async () => {
20
+ ), _ = I(async () => {
21
21
  const { data: d } = await c.get("/getMemberInfo");
22
22
  return d;
23
- }, [c]), R = I(async () => {
23
+ }, [c]), b = I(async () => {
24
24
  const { data: d } = await c.get("/getGameList");
25
25
  return d;
26
- }, [c]), T = I(async () => {
26
+ }, [c]), C = I(async () => {
27
27
  const { data: d } = await c.get("/getNowCurrencyExchange");
28
28
  return d;
29
29
  }, [c]), w = I(async () => {
@@ -32,13 +32,13 @@ const xe = vr(null), gr = () => {
32
32
  }, [c]);
33
33
  return {
34
34
  machineLoginApi: v,
35
- userInfoApi: E,
36
- userGameListApi: R,
35
+ userInfoApi: _,
36
+ userGameListApi: b,
37
37
  userFavoriteGameApi: w,
38
- userCurrencyExchangeApi: T
38
+ userCurrencyExchangeApi: C
39
39
  };
40
- }, Pr = () => {
41
- const { userInfoApi: c } = mr(), { data: v, isFetching: E } = dr({
40
+ }, Sr = () => {
41
+ const { userInfoApi: c } = _r(), { data: v, isFetching: _ } = vr({
42
42
  queries: [
43
43
  {
44
44
  queryKey: ["getMemberInfo"],
@@ -47,9 +47,9 @@ const xe = vr(null), gr = () => {
47
47
  }
48
48
  ]
49
49
  });
50
- return { data: v, isFetching: E };
50
+ return { data: v, isFetching: _ };
51
51
  };
52
- var q = { exports: {} }, $ = {};
52
+ var V = { exports: {} }, $ = {};
53
53
  /**
54
54
  * @license React
55
55
  * react-jsx-runtime.production.min.js
@@ -59,19 +59,19 @@ var q = { exports: {} }, $ = {};
59
59
  * This source code is licensed under the MIT license found in the
60
60
  * LICENSE file in the root directory of this source tree.
61
61
  */
62
- var Ce;
63
- function br() {
64
- if (Ce) return $;
65
- Ce = 1;
66
- var c = Pe, v = Symbol.for("react.element"), E = Symbol.for("react.fragment"), R = Object.prototype.hasOwnProperty, T = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, w = { key: !0, ref: !0, __self: !0, __source: !0 };
67
- function d(p, o, _) {
68
- var h, C = {}, P = null, Y = null;
69
- _ !== void 0 && (P = "" + _), o.key !== void 0 && (P = "" + o.key), o.ref !== void 0 && (Y = o.ref);
70
- for (h in o) R.call(o, h) && !w.hasOwnProperty(h) && (C[h] = o[h]);
71
- if (p && p.defaultProps) for (h in o = p.defaultProps, o) C[h] === void 0 && (C[h] = o[h]);
72
- return { $$typeof: v, type: p, key: P, ref: Y, props: C, _owner: T.current };
62
+ var Te;
63
+ function Rr() {
64
+ if (Te) return $;
65
+ Te = 1;
66
+ var c = xe, v = Symbol.for("react.element"), _ = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, C = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, w = { key: !0, ref: !0, __self: !0, __source: !0 };
67
+ function d(p, o, R) {
68
+ var h, T = {}, P = null, Y = null;
69
+ R !== void 0 && (P = "" + R), o.key !== void 0 && (P = "" + o.key), o.ref !== void 0 && (Y = o.ref);
70
+ for (h in o) b.call(o, h) && !w.hasOwnProperty(h) && (T[h] = o[h]);
71
+ if (p && p.defaultProps) for (h in o = p.defaultProps, o) T[h] === void 0 && (T[h] = o[h]);
72
+ return { $$typeof: v, type: p, key: P, ref: Y, props: T, _owner: C.current };
73
73
  }
74
- return $.Fragment = E, $.jsx = d, $.jsxs = d, $;
74
+ return $.Fragment = _, $.jsx = d, $.jsxs = d, $;
75
75
  }
76
76
  var W = {};
77
77
  /**
@@ -84,13 +84,13 @@ var W = {};
84
84
  * LICENSE file in the root directory of this source tree.
85
85
  */
86
86
  var we;
87
- function Er() {
87
+ function Cr() {
88
88
  return we || (we = 1, process.env.NODE_ENV !== "production" && (function() {
89
- var c = Pe, v = Symbol.for("react.element"), E = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), p = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Q = Symbol.iterator, Se = "@@iterator";
90
- function je(e) {
89
+ var c = xe, v = Symbol.for("react.element"), _ = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), p = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Q = Symbol.iterator, je = "@@iterator";
90
+ function ke(e) {
91
91
  if (e === null || typeof e != "object")
92
92
  return null;
93
- var r = Q && e[Q] || e[Se];
93
+ var r = Q && e[Q] || e[je];
94
94
  return typeof r == "function" ? r : null;
95
95
  }
96
96
  var j = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -98,10 +98,10 @@ function Er() {
98
98
  {
99
99
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
100
100
  t[n - 1] = arguments[n];
101
- ke("error", e, t);
101
+ Ae("error", e, t);
102
102
  }
103
103
  }
104
- function ke(e, r, t) {
104
+ function Ae(e, r, t) {
105
105
  {
106
106
  var n = j.ReactDebugCurrentFrame, u = n.getStackAddendum();
107
107
  u !== "" && (r += "%s", t = t.concat([u]));
@@ -111,16 +111,16 @@ function Er() {
111
111
  s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
112
112
  }
113
113
  }
114
- var Ae = !1, Fe = !1, De = !1, Ie = !1, $e = !1, Z;
114
+ var Fe = !1, De = !1, Ie = !1, $e = !1, We = !1, Z;
115
115
  Z = Symbol.for("react.module.reference");
116
- function We(e) {
117
- return !!(typeof e == "string" || typeof e == "function" || e === R || e === w || $e || e === T || e === _ || e === h || Ie || e === Y || Ae || Fe || De || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === C || e.$$typeof === d || e.$$typeof === p || e.$$typeof === o || // This needs to include all possible module reference object
116
+ function Ye(e) {
117
+ return !!(typeof e == "string" || typeof e == "function" || e === b || e === w || We || e === C || e === R || e === h || $e || e === Y || Fe || De || Ie || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === T || e.$$typeof === d || e.$$typeof === p || e.$$typeof === o || // This needs to include all possible module reference object
118
118
  // types supported by any Flight configuration anywhere since
119
119
  // we don't know which Flight build this will end up being used
120
120
  // with.
121
121
  e.$$typeof === Z || e.getModuleId !== void 0));
122
122
  }
123
- function Ye(e, r, t) {
123
+ function Le(e, r, t) {
124
124
  var n = e.displayName;
125
125
  if (n)
126
126
  return n;
@@ -138,15 +138,15 @@ function Er() {
138
138
  if (typeof e == "string")
139
139
  return e;
140
140
  switch (e) {
141
- case R:
141
+ case b:
142
142
  return "Fragment";
143
- case E:
143
+ case _:
144
144
  return "Portal";
145
145
  case w:
146
146
  return "Profiler";
147
- case T:
147
+ case C:
148
148
  return "StrictMode";
149
- case _:
149
+ case R:
150
150
  return "Suspense";
151
151
  case h:
152
152
  return "SuspenseList";
@@ -160,8 +160,8 @@ function Er() {
160
160
  var t = e;
161
161
  return ee(t._context) + ".Provider";
162
162
  case o:
163
- return Ye(e, e.render, "ForwardRef");
164
- case C:
163
+ return Le(e, e.render, "ForwardRef");
164
+ case T:
165
165
  var n = e.displayName || null;
166
166
  return n !== null ? n : O(e.type) || "Memo";
167
167
  case P: {
@@ -179,7 +179,7 @@ function Er() {
179
179
  function se() {
180
180
  }
181
181
  se.__reactDisabledLog = !0;
182
- function Le() {
182
+ function Me() {
183
183
  {
184
184
  if (F === 0) {
185
185
  re = console.log, te = console.info, ne = console.warn, ae = console.error, ie = console.group, oe = console.groupCollapsed, ue = console.groupEnd;
@@ -202,7 +202,7 @@ function Er() {
202
202
  F++;
203
203
  }
204
204
  }
205
- function Me() {
205
+ function Ue() {
206
206
  {
207
207
  if (F--, F === 0) {
208
208
  var e = {
@@ -253,8 +253,8 @@ function Er() {
253
253
  }
254
254
  var B = !1, M;
255
255
  {
256
- var Ue = typeof WeakMap == "function" ? WeakMap : Map;
257
- M = new Ue();
256
+ var qe = typeof WeakMap == "function" ? WeakMap : Map;
257
+ M = new qe();
258
258
  }
259
259
  function ce(e, r) {
260
260
  if (!e || B)
@@ -269,7 +269,7 @@ function Er() {
269
269
  var u = Error.prepareStackTrace;
270
270
  Error.prepareStackTrace = void 0;
271
271
  var s;
272
- s = N.current, N.current = null, Le();
272
+ s = N.current, N.current = null, Me();
273
273
  try {
274
274
  if (r) {
275
275
  var i = function() {
@@ -313,16 +313,16 @@ function Er() {
313
313
  if (l !== 1 || f !== 1)
314
314
  do
315
315
  if (l--, f--, f < 0 || a[l] !== g[f]) {
316
- var b = `
316
+ var E = `
317
317
  ` + a[l].replace(" at new ", " at ");
318
- return e.displayName && b.includes("<anonymous>") && (b = b.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, b), b;
318
+ return e.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, E), E;
319
319
  }
320
320
  while (l >= 1 && f >= 0);
321
321
  break;
322
322
  }
323
323
  }
324
324
  } finally {
325
- B = !1, N.current = s, Me(), Error.prepareStackTrace = u;
325
+ B = !1, N.current = s, Ue(), Error.prepareStackTrace = u;
326
326
  }
327
327
  var A = e ? e.displayName || e.name : "", S = A ? L(A) : "";
328
328
  return typeof e == "function" && M.set(e, S), S;
@@ -330,7 +330,7 @@ function Er() {
330
330
  function Ve(e, r, t) {
331
331
  return ce(e, !1);
332
332
  }
333
- function qe(e) {
333
+ function Ne(e) {
334
334
  var r = e.prototype;
335
335
  return !!(r && r.isReactComponent);
336
336
  }
@@ -338,11 +338,11 @@ function Er() {
338
338
  if (e == null)
339
339
  return "";
340
340
  if (typeof e == "function")
341
- return ce(e, qe(e));
341
+ return ce(e, Ne(e));
342
342
  if (typeof e == "string")
343
343
  return L(e);
344
344
  switch (e) {
345
- case _:
345
+ case R:
346
346
  return L("Suspense");
347
347
  case h:
348
348
  return L("SuspenseList");
@@ -351,7 +351,7 @@ function Er() {
351
351
  switch (e.$$typeof) {
352
352
  case o:
353
353
  return Ve(e.render);
354
- case C:
354
+ case T:
355
355
  return U(e.type, r, t);
356
356
  case P: {
357
357
  var n = e, u = n._payload, s = n._init;
@@ -364,14 +364,14 @@ function Er() {
364
364
  return "";
365
365
  }
366
366
  var D = Object.prototype.hasOwnProperty, le = {}, fe = j.ReactDebugCurrentFrame;
367
- function V(e) {
367
+ function q(e) {
368
368
  if (e) {
369
369
  var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
370
370
  fe.setExtraStackFrame(t);
371
371
  } else
372
372
  fe.setExtraStackFrame(null);
373
373
  }
374
- function Ne(e, r, t, n, u) {
374
+ function Je(e, r, t, n, u) {
375
375
  {
376
376
  var s = Function.call.bind(D);
377
377
  for (var i in e)
@@ -386,21 +386,21 @@ function Er() {
386
386
  } catch (l) {
387
387
  a = l;
388
388
  }
389
- a && !(a instanceof Error) && (V(u), y("%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), V(null)), a instanceof Error && !(a.message in le) && (le[a.message] = !0, V(u), y("Failed %s type: %s", t, a.message), V(null));
389
+ a && !(a instanceof Error) && (q(u), y("%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 le) && (le[a.message] = !0, q(u), y("Failed %s type: %s", t, a.message), q(null));
390
390
  }
391
391
  }
392
392
  }
393
- var Je = Array.isArray;
393
+ var Be = Array.isArray;
394
394
  function G(e) {
395
- return Je(e);
395
+ return Be(e);
396
396
  }
397
- function Be(e) {
397
+ function Ge(e) {
398
398
  {
399
399
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
400
400
  return t;
401
401
  }
402
402
  }
403
- function Ge(e) {
403
+ function Ke(e) {
404
404
  try {
405
405
  return de(e), !1;
406
406
  } catch {
@@ -411,16 +411,16 @@ function Er() {
411
411
  return "" + e;
412
412
  }
413
413
  function ve(e) {
414
- if (Ge(e))
415
- return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), de(e);
414
+ if (Ke(e))
415
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), de(e);
416
416
  }
417
- var pe = j.ReactCurrentOwner, Ke = {
417
+ var pe = j.ReactCurrentOwner, ze = {
418
418
  key: !0,
419
419
  ref: !0,
420
420
  __self: !0,
421
421
  __source: !0
422
422
  }, he, ye;
423
- function ze(e) {
423
+ function Xe(e) {
424
424
  if (D.call(e, "ref")) {
425
425
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
426
426
  if (r && r.isReactWarning)
@@ -428,7 +428,7 @@ function Er() {
428
428
  }
429
429
  return e.ref !== void 0;
430
430
  }
431
- function Xe(e) {
431
+ function He(e) {
432
432
  if (D.call(e, "key")) {
433
433
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
434
434
  if (r && r.isReactWarning)
@@ -436,10 +436,10 @@ function Er() {
436
436
  }
437
437
  return e.key !== void 0;
438
438
  }
439
- function He(e, r) {
439
+ function Qe(e, r) {
440
440
  typeof e.ref == "string" && pe.current;
441
441
  }
442
- function Qe(e, r) {
442
+ function Ze(e, r) {
443
443
  {
444
444
  var t = function() {
445
445
  he || (he = !0, y("%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));
@@ -450,7 +450,7 @@ function Er() {
450
450
  });
451
451
  }
452
452
  }
453
- function Ze(e, r) {
453
+ function er(e, r) {
454
454
  {
455
455
  var t = function() {
456
456
  ye || (ye = !0, y("%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));
@@ -461,7 +461,7 @@ function Er() {
461
461
  });
462
462
  }
463
463
  }
464
- var er = function(e, r, t, n, u, s, i) {
464
+ var rr = function(e, r, t, n, u, s, i) {
465
465
  var a = {
466
466
  // This tag allows us to uniquely identify this as a React Element
467
467
  $$typeof: v,
@@ -490,12 +490,12 @@ function Er() {
490
490
  value: u
491
491
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
492
492
  };
493
- function rr(e, r, t, n, u) {
493
+ function tr(e, r, t, n, u) {
494
494
  {
495
495
  var s, i = {}, a = null, g = null;
496
- t !== void 0 && (ve(t), a = "" + t), Xe(r) && (ve(r.key), a = "" + r.key), ze(r) && (g = r.ref, He(r, u));
496
+ t !== void 0 && (ve(t), a = "" + t), He(r) && (ve(r.key), a = "" + r.key), Xe(r) && (g = r.ref, Qe(r, u));
497
497
  for (s in r)
498
- D.call(r, s) && !Ke.hasOwnProperty(s) && (i[s] = r[s]);
498
+ D.call(r, s) && !ze.hasOwnProperty(s) && (i[s] = r[s]);
499
499
  if (e && e.defaultProps) {
500
500
  var l = e.defaultProps;
501
501
  for (s in l)
@@ -503,9 +503,9 @@ function Er() {
503
503
  }
504
504
  if (a || g) {
505
505
  var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
506
- a && Qe(i, f), g && Ze(i, f);
506
+ a && Ze(i, f), g && er(i, f);
507
507
  }
508
- return er(e, a, g, u, n, pe.current, i);
508
+ return rr(e, a, g, u, n, pe.current, i);
509
509
  }
510
510
  }
511
511
  var K = j.ReactCurrentOwner, ge = j.ReactDebugCurrentFrame;
@@ -533,11 +533,11 @@ Check the render method of \`` + e + "`.";
533
533
  return "";
534
534
  }
535
535
  }
536
- function tr(e) {
536
+ function nr(e) {
537
537
  return "";
538
538
  }
539
539
  var be = {};
540
- function nr(e) {
540
+ function ar(e) {
541
541
  {
542
542
  var r = me();
543
543
  if (!r) {
@@ -554,7 +554,7 @@ Check the top-level render call using <` + t + ">.");
554
554
  if (!e._store || e._store.validated || e.key != null)
555
555
  return;
556
556
  e._store.validated = !0;
557
- var t = nr(r);
557
+ var t = ar(r);
558
558
  if (be[t])
559
559
  return;
560
560
  be[t] = !0;
@@ -574,14 +574,14 @@ Check the top-level render call using <` + t + ">.");
574
574
  else if (X(e))
575
575
  e._store && (e._store.validated = !0);
576
576
  else if (e) {
577
- var u = je(e);
577
+ var u = ke(e);
578
578
  if (typeof u == "function" && u !== e.entries)
579
579
  for (var s = u.call(e), i; !(i = s.next()).done; )
580
580
  X(i.value) && Ee(i.value, r);
581
581
  }
582
582
  }
583
583
  }
584
- function ar(e) {
584
+ function ir(e) {
585
585
  {
586
586
  var r = e.type;
587
587
  if (r == null || typeof r == "string")
@@ -591,13 +591,13 @@ Check the top-level render call using <` + t + ">.");
591
591
  t = r.propTypes;
592
592
  else if (typeof r == "object" && (r.$$typeof === o || // Note: Memo only checks outer props here.
593
593
  // Inner props are checked in the reconciler.
594
- r.$$typeof === C))
594
+ r.$$typeof === T))
595
595
  t = r.propTypes;
596
596
  else
597
597
  return;
598
598
  if (t) {
599
599
  var n = O(r);
600
- Ne(t, e.props, "prop", n, e);
600
+ Je(t, e.props, "prop", n, e);
601
601
  } else if (r.PropTypes !== void 0 && !z) {
602
602
  z = !0;
603
603
  var u = O(r);
@@ -606,7 +606,7 @@ Check the top-level render call using <` + t + ">.");
606
606
  typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
607
607
  }
608
608
  }
609
- function ir(e) {
609
+ function or(e) {
610
610
  {
611
611
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
612
612
  var n = r[t];
@@ -619,99 +619,105 @@ Check the top-level render call using <` + t + ">.");
619
619
  }
620
620
  }
621
621
  var Re = {};
622
- function Te(e, r, t, n, u, s) {
622
+ function Ce(e, r, t, n, u, s) {
623
623
  {
624
- var i = We(e);
624
+ var i = Ye(e);
625
625
  if (!i) {
626
626
  var a = "";
627
627
  (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.");
628
- var g = tr();
628
+ var g = nr();
629
629
  g ? a += g : a += me();
630
630
  var l;
631
631
  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, y("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);
632
632
  }
633
- var f = rr(e, r, t, u, s);
633
+ var f = tr(e, r, t, u, s);
634
634
  if (f == null)
635
635
  return f;
636
636
  if (i) {
637
- var b = r.children;
638
- if (b !== void 0)
637
+ var E = r.children;
638
+ if (E !== void 0)
639
639
  if (n)
640
- if (G(b)) {
641
- for (var A = 0; A < b.length; A++)
642
- _e(b[A], e);
643
- Object.freeze && Object.freeze(b);
640
+ if (G(E)) {
641
+ for (var A = 0; A < E.length; A++)
642
+ _e(E[A], e);
643
+ Object.freeze && Object.freeze(E);
644
644
  } else
645
645
  y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
646
646
  else
647
- _e(b, e);
647
+ _e(E, e);
648
648
  }
649
649
  if (D.call(r, "key")) {
650
- var S = O(e), m = Object.keys(r).filter(function(fr) {
651
- return fr !== "key";
650
+ var S = O(e), m = Object.keys(r).filter(function(dr) {
651
+ return dr !== "key";
652
652
  }), H = m.length > 0 ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}";
653
653
  if (!Re[S + H]) {
654
- var lr = m.length > 0 ? "{" + m.join(": ..., ") + ": ...}" : "{}";
654
+ var fr = m.length > 0 ? "{" + m.join(": ..., ") + ": ...}" : "{}";
655
655
  y(`A props object containing a "key" prop is being spread into JSX:
656
656
  let props = %s;
657
657
  <%s {...props} />
658
658
  React keys must be passed directly to JSX without using spread:
659
659
  let props = %s;
660
- <%s key={someKey} {...props} />`, H, S, lr, S), Re[S + H] = !0;
660
+ <%s key={someKey} {...props} />`, H, S, fr, S), Re[S + H] = !0;
661
661
  }
662
662
  }
663
- return e === R ? ir(f) : ar(f), f;
663
+ return e === b ? or(f) : ir(f), f;
664
664
  }
665
665
  }
666
- function or(e, r, t) {
667
- return Te(e, r, t, !0);
668
- }
669
666
  function ur(e, r, t) {
670
- return Te(e, r, t, !1);
667
+ return Ce(e, r, t, !0);
668
+ }
669
+ function sr(e, r, t) {
670
+ return Ce(e, r, t, !1);
671
671
  }
672
- var sr = ur, cr = or;
673
- W.Fragment = R, W.jsx = sr, W.jsxs = cr;
672
+ var cr = sr, lr = ur;
673
+ W.Fragment = b, W.jsx = cr, W.jsxs = lr;
674
674
  })()), W;
675
675
  }
676
676
  var Oe;
677
- function _r() {
678
- return Oe || (Oe = 1, process.env.NODE_ENV === "production" ? q.exports = br() : q.exports = Er()), q.exports;
677
+ function Tr() {
678
+ return Oe || (Oe = 1, process.env.NODE_ENV === "production" ? V.exports = Rr() : V.exports = Cr()), V.exports;
679
679
  }
680
- var Rr = _r();
681
- function Tr({
680
+ var Pe = Tr();
681
+ function wr({
682
682
  baseURL: c,
683
683
  getToken: v,
684
- timeoutMs: E = 15e3,
685
- axiosInstance: R,
686
- currency: T,
684
+ timeoutMs: _ = 15e3,
685
+ axiosInstance: b,
686
+ currency: C,
687
687
  lng: w,
688
688
  onError: d
689
689
  } = {}) {
690
- const p = R ?? yr.create({
690
+ const p = b ?? br.create({
691
691
  baseURL: c,
692
- timeout: E,
692
+ timeout: _,
693
693
  headers: { "Content-Type": "application/json" }
694
694
  });
695
695
  return p.interceptors.request.use(async (o) => {
696
696
  if (v) {
697
- const _ = await v();
698
- _ && (o.headers = o.headers || {}, o.headers.Authorization = `Bearer ${_}`);
697
+ const R = await v();
698
+ R && (o.headers = o.headers || {}, o.headers.Authorization = `Bearer ${R}`);
699
699
  }
700
700
  return o;
701
701
  }), p.interceptors.request.use((o) => {
702
- o.headers.Currency = T, o.headers["currency-code"] = T, o.headers.lang = w;
702
+ o.headers.Currency = C, o.headers["currency-code"] = C, o.headers.lang = w;
703
703
  }), p.interceptors.response.use(
704
704
  (o) => o,
705
705
  (o) => d ? d(o, { instance: p }) : Promise.reject(o)
706
706
  ), p;
707
707
  }
708
- function xr({ children: c, ...v }) {
709
- const E = hr(() => Tr(v), [v]);
710
- return /* @__PURE__ */ Rr.jsx(xe.Provider, { value: { client: E }, children: c });
708
+ function jr({ children: c, ...v }) {
709
+ const _ = mr(() => wr(v), [v]), b = new pr({
710
+ defaultOptions: {
711
+ queries: {
712
+ refetchOnWindowFocus: !1
713
+ }
714
+ }
715
+ });
716
+ return /* @__PURE__ */ Pe.jsx(hr, { client: b, children: /* @__PURE__ */ Pe.jsx(Se.Provider, { value: { client: _ }, children: c }) });
711
717
  }
712
718
  export {
713
- xe as ApiCtx,
714
- xr as ApiProvider,
715
- gr as useApiContext,
716
- Pr as usePeriodicDataUpdater
719
+ Se as ApiCtx,
720
+ jr as ApiProvider,
721
+ Er as useApiContext,
722
+ Sr as usePeriodicDataUpdater
717
723
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@obb871001/api-integration-sdk",
3
3
  "private": false,
4
- "version": "1.0.18",
4
+ "version": "1.0.19",
5
5
  "description": "集成API",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",