@obb871001/api-integration-sdk 1.0.14 → 1.0.15

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 CHANGED
@@ -1,22 +1,30 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tanstack/react-query");const v=require("react"),re=require("axios"),x=v.createContext(null),te=()=>{const o=v.useContext(x);if(!o)throw new Error("useApiContext must be used within ApiProvider");return o},ne=()=>v.useContext(x)||{recentlyCreatedOwnerStacks:[]};var A={exports:{}},_={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tanstack/react-query");const D=require("react"),fr=require("axios"),N=D.createContext(null),dr=()=>{const b=D.useContext(N);if(!b)throw new Error("useApiContext must be used within ApiProvider");return b},vr=()=>D.useContext(N)||{recentlyCreatedOwnerStacks:[]};var q={exports:{}},$={};/**
2
2
  * @license React
3
- * react-jsx-runtime.production.js
3
+ * react-jsx-runtime.production.min.js
4
4
  *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
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 D;function ae(){if(D)return _;D=1;var o=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function f(d,u,c){var m=null;if(c!==void 0&&(m=""+c),u.key!==void 0&&(m=""+u.key),"key"in u){c={};for(var l in u)l!=="key"&&(c[l]=u[l])}else c=u;return u=c.ref,{$$typeof:o,type:d,key:m,ref:u!==void 0?u:null,props:c}}return _.Fragment=i,_.jsx=f,_.jsxs=f,_}var E={};/**
9
+ */var Oe;function pr(){if(Oe)return $;Oe=1;var b=D,E=Symbol.for("react.element"),T=Symbol.for("react.fragment"),R=Object.prototype.hasOwnProperty,O=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,w={key:!0,ref:!0,__self:!0,__source:!0};function m(p,u,g){var h,_={},x=null,Y=null;g!==void 0&&(x=""+g),u.key!==void 0&&(x=""+u.key),u.ref!==void 0&&(Y=u.ref);for(h in u)R.call(u,h)&&!w.hasOwnProperty(h)&&(_[h]=u[h]);if(p&&p.defaultProps)for(h in u=p.defaultProps,u)_[h]===void 0&&(_[h]=u[h]);return{$$typeof:E,type:p,key:x,ref:Y,props:_,_owner:O.current}}return $.Fragment=T,$.jsx=m,$.jsxs=m,$}var W={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
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 M;function oe(){return M||(M=1,process.env.NODE_ENV!=="production"&&(function(){function o(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case V:return"Profiler";case W:return"StrictMode";case X:return"Suspense";case B:return"SuspenseList";case Z:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case U:return"Portal";case J:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case G:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return r=e.displayName||null,r!==null?r:o(e.type)||"Memo";case O:r=e._payload,e=e._init;try{return o(e(r))}catch{}}return null}function i(e){return""+e}function f(e){try{i(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),i(e)}}function d(e){if(e===k)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===O)return"<...>";try{var r=o(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function u(){var e=S.A;return e===null?null:e.getOwner()}function c(){return Error("react-stack-top-frame")}function m(e){if(N.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function l(e,r){function t(){Y||(Y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function s(){var e=o(this.type);return $[e]||($[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function R(e,r,t,n,T,y){var a=t.ref;return e={$$typeof:g,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:s}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:T}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:y}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function w(e,r,t,n,T,y){var a=r.children;if(a!==void 0)if(n)if(K(a)){for(n=0;n<a.length;n++)j(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else j(a);if(N.call(r,"key")){a=o(e);var p=Object.keys(r).filter(function(ee){return ee!=="key"});n=0<p.length?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}",q[a+n]||(p=0<p.length?"{"+p.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var xe;function hr(){return xe||(xe=1,process.env.NODE_ENV!=="production"&&(function(){var b=D,E=Symbol.for("react.element"),T=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),p=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),Q=Symbol.iterator,Pe="@@iterator";function we(e){if(e===null||typeof e!="object")return null;var r=Q&&e[Q]||e[Pe];return typeof r=="function"?r:null}var j=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];je("error",e,t)}}function je(e,r,t){{var n=j.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var s=t.map(function(i){return String(i)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var ke=!1,Ae=!1,De=!1,Fe=!1,Ie=!1,ee;ee=Symbol.for("react.module.reference");function $e(e){return!!(typeof e=="string"||typeof e=="function"||e===R||e===w||Ie||e===O||e===g||e===h||Fe||e===Y||ke||Ae||De||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===_||e.$$typeof===m||e.$$typeof===p||e.$$typeof===u||e.$$typeof===ee||e.getModuleId!==void 0))}function We(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function re(e){return e.displayName||"Context"}function C(e){if(e==null)return null;if(typeof e.tag=="number"&&f("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 T:return"Portal";case w:return"Profiler";case O:return"StrictMode";case g:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case p:var r=e;return re(r)+".Consumer";case m:var t=e;return re(t._context)+".Provider";case u:return We(e,e.render,"ForwardRef");case _:var n=e.displayName||null;return n!==null?n:C(e.type)||"Memo";case x:{var o=e,s=o._payload,i=o._init;try{return C(i(s))}catch{return null}}}return null}var S=Object.assign,F=0,te,ne,ae,ie,oe,ue,se;function le(){}le.__reactDisabledLog=!0;function Ye(){{if(F===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:le,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}F++}}function Le(){{if(F--,F===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})})}F<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=j.ReactCurrentDispatcher,B;function L(e,r,t){{if(B===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);B=n&&n[1]||""}return`
18
+ `+B+e}}var K=!1,M;{var Me=typeof WeakMap=="function"?WeakMap:Map;M=new Me}function ce(e,r){if(!e||K)return"";{var t=M.get(e);if(t!==void 0)return t}var n;K=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=J.current,J.current=null,Ye();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(v){n=v}Reflect.construct(e,[],i)}else{try{i.call()}catch(v){n=v}e.call(i.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
19
+ `),d=n.stack.split(`
20
+ `),l=a.length-1,c=d.length-1;l>=1&&c>=0&&a[l]!==d[c];)c--;for(;l>=1&&c>=0;l--,c--)if(a[l]!==d[c]){if(l!==1||c!==1)do if(l--,c--,c<0||a[l]!==d[c]){var y=`
21
+ `+a[l].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,y),y}while(l>=1&&c>=0);break}}}finally{K=!1,J.current=s,Le(),Error.prepareStackTrace=o}var A=e?e.displayName||e.name:"",P=A?L(A):"";return typeof e=="function"&&M.set(e,P),P}function Ve(e,r,t){return ce(e,!1)}function Ue(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function V(e,r,t){if(e==null)return"";if(typeof e=="function")return ce(e,Ue(e));if(typeof e=="string")return L(e);switch(e){case g:return L("Suspense");case h:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case u:return Ve(e.render);case _:return V(e.type,r,t);case x:{var n=e,o=n._payload,s=n._init;try{return V(s(o),r,t)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,fe={},de=j.ReactDebugCurrentFrame;function U(e){if(e){var r=e._owner,t=V(e.type,e._source,r?r.type:null);de.setExtraStackFrame(t)}else de.setExtraStackFrame(null)}function qe(e,r,t,n,o){{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 d=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 d.name="Invariant Violation",d}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(o),f("%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 fe)&&(fe[a.message]=!0,U(o),f("Failed %s type: %s",t,a.message),U(null))}}}var Ne=Array.isArray;function z(e){return Ne(e)}function Je(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Be(e){try{return ve(e),!1}catch{return!0}}function ve(e){return""+e}function pe(e){if(Be(e))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(e)),ve(e)}var he=j.ReactCurrentOwner,Ke={key:!0,ref:!0,__self:!0,__source:!0},ye,be;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 Ge(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 Xe(e,r){typeof e.ref=="string"&&he.current}function He(e,r){{var t=function(){ye||(ye=!0,f("%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(){be||(be=!0,f("%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 Qe=function(e,r,t,n,o,s,i){var a={$$typeof:E,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:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function er(e,r,t,n,o){{var s,i={},a=null,d=null;t!==void 0&&(pe(t),a=""+t),Ge(r)&&(pe(r.key),a=""+r.key),ze(r)&&(d=r.ref,Xe(r,o));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||d){var c=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&He(i,c),d&&Ze(i,c)}return Qe(e,a,d,o,n,he.current,i)}}var G=j.ReactCurrentOwner,Ee=j.ReactDebugCurrentFrame;function k(e){if(e){var r=e._owner,t=V(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var X;X=!1;function H(e){return typeof e=="object"&&e!==null&&e.$$typeof===E}function Re(){{if(G.current){var e=C(G.current.type);if(e)return`
22
+
23
+ Check the render method of \``+e+"`."}return""}}function rr(e){return""}var ge={};function tr(e){{var r=Re();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
24
+
25
+ Check the top-level render call using <`+t+">.")}return r}}function _e(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=tr(r);if(ge[t])return;ge[t]=!0;var n="";e&&e._owner&&e._owner!==G.current&&(n=" It was passed a child from "+C(e._owner.type)+"."),k(e),f('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)}}function me(e,r){{if(typeof e!="object")return;if(z(e))for(var t=0;t<e.length;t++){var n=e[t];H(n)&&_e(n,r)}else if(H(e))e._store&&(e._store.validated=!0);else if(e){var o=we(e);if(typeof o=="function"&&o!==e.entries)for(var s=o.call(e),i;!(i=s.next()).done;)H(i.value)&&_e(i.value,r)}}}function nr(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===u||r.$$typeof===_))t=r.propTypes;else return;if(t){var n=C(r);qe(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!X){X=!0;var o=C(r);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ar(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){k(e),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),k(null);break}}e.ref!==null&&(k(e),f("Invalid attribute `ref` supplied to `React.Fragment`."),k(null))}}var Ce={};function Te(e,r,t,n,o,s){{var i=$e(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 d=rr();d?a+=d:a+=Re();var l;e===null?l="null":z(e)?l="array":e!==void 0&&e.$$typeof===E?(l="<"+(C(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,f("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 c=er(e,r,t,o,s);if(c==null)return c;if(i){var y=r.children;if(y!==void 0)if(n)if(z(y)){for(var A=0;A<y.length;A++)me(y[A],e);Object.freeze&&Object.freeze(y)}else f("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 me(y,e)}if(I.call(r,"key")){var P=C(e),v=Object.keys(r).filter(function(cr){return cr!=="key"}),Z=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!Ce[P+Z]){var lr=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";f(`A props object containing a "key" prop is being spread into JSX:
18
26
  let props = %s;
19
27
  <%s {...props} />
20
28
  React keys must be passed directly to JSX without using spread:
21
29
  let props = %s;
22
- <%s key={someKey} {...props} />`,n,a,p,a),q[a+n]=!0)}if(a=null,t!==void 0&&(f(t),a=""+t),m(r)&&(f(r.key),a=""+r.key),"key"in r){t={};for(var h in r)h!=="key"&&(t[h]=r[h])}else t=r;return a&&l(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),R(e,a,t,u(),T,y)}function j(e){C(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===O&&(e._payload.status==="fulfilled"?C(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function C(e){return typeof e=="object"&&e!==null&&e.$$typeof===g}var b=v,g=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),J=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),S=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,K=Array.isArray,P=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(e){return e()}};var Y,$={},I=b.react_stack_bottom_frame.bind(b,c)(),F=P(d(c)),q={};E.Fragment=k,E.jsx=function(e,r,t){var n=1e4>S.recentlyCreatedOwnerStacks++;return w(e,r,t,!1,n?Error("react-stack-top-frame"):I,n?P(d(e)):F)},E.jsxs=function(e,r,t){var n=1e4>S.recentlyCreatedOwnerStacks++;return w(e,r,t,!0,n?Error("react-stack-top-frame"):I,n?P(d(e)):F)}})()),E}var L;function se(){return L||(L=1,process.env.NODE_ENV==="production"?A.exports=ae():A.exports=oe()),A.exports}var ue=se();function ce({baseURL:o,getToken:i,timeoutMs:f=15e3,axiosInstance:d,currency:u,lng:c,onError:m}={}){const l=d??re.create({baseURL:o,timeout:f,headers:{"Content-Type":"application/json"}});return l.interceptors.request.use(async s=>{if(i){const R=await i();R&&(s.headers=s.headers||{},s.headers.Authorization=`Bearer ${R}`)}return s}),l.interceptors.request.use(s=>{s.headers.Currency=u,s.headers["currency-code"]=u,s.headers.lang=c}),l.interceptors.response.use(s=>s,s=>m?m(s,{instance:l}):Promise.reject(s)),l}function le({children:o,...i}){const f={recentlyCreatedOwnerStacks:[]},d=v.useMemo(()=>ce(i),[i]);return ue.jsx(x.Provider,{value:{client:d,...f},children:o})}exports.ApiCtx=x;exports.ApiProvider=le;exports.useApiContext=te;exports.useApiContextSafe=ne;
30
+ <%s key={someKey} {...props} />`,Z,P,lr,P),Ce[P+Z]=!0}}return e===R?ar(c):nr(c),c}}function ir(e,r,t){return Te(e,r,t,!0)}function or(e,r,t){return Te(e,r,t,!1)}var ur=or,sr=ir;W.Fragment=R,W.jsx=ur,W.jsxs=sr})()),W}var Se;function yr(){return Se||(Se=1,process.env.NODE_ENV==="production"?q.exports=pr():q.exports=hr()),q.exports}var br=yr();function Er({baseURL:b,getToken:E,timeoutMs:T=15e3,axiosInstance:R,currency:O,lng:w,onError:m}={}){const p=R??fr.create({baseURL:b,timeout:T,headers:{"Content-Type":"application/json"}});return p.interceptors.request.use(async u=>{if(E){const g=await E();g&&(u.headers=u.headers||{},u.headers.Authorization=`Bearer ${g}`)}return u}),p.interceptors.request.use(u=>{u.headers.Currency=O,u.headers["currency-code"]=O,u.headers.lang=w}),p.interceptors.response.use(u=>u,u=>m?m(u,{instance:p}):Promise.reject(u)),p}function Rr({children:b,...E}){const T={recentlyCreatedOwnerStacks:[]},R=D.useMemo(()=>Er(E),[E]);return br.jsx(N.Provider,{value:{client:R,...T},children:b})}exports.ApiCtx=N;exports.ApiProvider=Rr;exports.useApiContext=dr;exports.useApiContextSafe=vr;
package/dist/index.js CHANGED
@@ -1,330 +1,681 @@
1
1
  import "@tanstack/react-query";
2
- import re, { createContext as te, useContext as U, useMemo as ne } from "react";
3
- import ae from "axios";
4
- const P = te(null), me = () => {
5
- const o = U(P);
6
- if (!o)
2
+ import xe, { createContext as dr, useContext as Pe, useMemo as vr } from "react";
3
+ import pr from "axios";
4
+ const H = dr(null), Tr = () => {
5
+ const b = Pe(H);
6
+ if (!b)
7
7
  throw new Error("useApiContext must be used within ApiProvider");
8
- return o;
9
- }, _e = () => U(P) || {
8
+ return b;
9
+ }, Cr = () => Pe(H) || {
10
10
  recentlyCreatedOwnerStacks: []
11
11
  // 其他預設屬性...
12
12
  };
13
- var T = { exports: {} }, p = {};
13
+ var U = { exports: {} }, I = {};
14
14
  /**
15
15
  * @license React
16
- * react-jsx-runtime.production.js
16
+ * react-jsx-runtime.production.min.js
17
17
  *
18
- * Copyright (c) Meta Platforms, Inc. and affiliates.
18
+ * Copyright (c) Facebook, Inc. and its affiliates.
19
19
  *
20
20
  * This source code is licensed under the MIT license found in the
21
21
  * LICENSE file in the root directory of this source tree.
22
22
  */
23
- var D;
24
- function oe() {
25
- if (D) return p;
26
- D = 1;
27
- var o = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
28
- function f(d, u, c) {
29
- var m = null;
30
- if (c !== void 0 && (m = "" + c), u.key !== void 0 && (m = "" + u.key), "key" in u) {
31
- c = {};
32
- for (var l in u)
33
- l !== "key" && (c[l] = u[l]);
34
- } else c = u;
35
- return u = c.ref, {
36
- $$typeof: o,
37
- type: d,
38
- key: m,
39
- ref: u !== void 0 ? u : null,
40
- props: c
41
- };
23
+ var Ce;
24
+ function hr() {
25
+ if (Ce) return I;
26
+ Ce = 1;
27
+ var b = xe, E = Symbol.for("react.element"), C = Symbol.for("react.fragment"), R = Object.prototype.hasOwnProperty, O = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
28
+ function m(p, u, _) {
29
+ var h, g = {}, w = null, W = null;
30
+ _ !== void 0 && (w = "" + _), u.key !== void 0 && (w = "" + u.key), u.ref !== void 0 && (W = u.ref);
31
+ for (h in u) R.call(u, h) && !S.hasOwnProperty(h) && (g[h] = u[h]);
32
+ if (p && p.defaultProps) for (h in u = p.defaultProps, u) g[h] === void 0 && (g[h] = u[h]);
33
+ return { $$typeof: E, type: p, key: w, ref: W, props: g, _owner: O.current };
42
34
  }
43
- return p.Fragment = i, p.jsx = f, p.jsxs = f, p;
35
+ return I.Fragment = C, I.jsx = m, I.jsxs = m, I;
44
36
  }
45
- var E = {};
37
+ var $ = {};
46
38
  /**
47
39
  * @license React
48
40
  * react-jsx-runtime.development.js
49
41
  *
50
- * Copyright (c) Meta Platforms, Inc. and affiliates.
42
+ * Copyright (c) Facebook, Inc. and its affiliates.
51
43
  *
52
44
  * This source code is licensed under the MIT license found in the
53
45
  * LICENSE file in the root directory of this source tree.
54
46
  */
55
- var L;
56
- function se() {
57
- return L || (L = 1, process.env.NODE_ENV !== "production" && (function() {
58
- function o(e) {
59
- if (e == null) return null;
60
- if (typeof e == "function")
61
- return e.$$typeof === Q ? null : e.displayName || e.name || null;
62
- if (typeof e == "string") return e;
47
+ var Oe;
48
+ function yr() {
49
+ return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && (function() {
50
+ var b = xe, E = Symbol.for("react.element"), C = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), p = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), Z = Symbol.iterator, Se = "@@iterator";
51
+ function je(e) {
52
+ if (e === null || typeof e != "object")
53
+ return null;
54
+ var r = Z && e[Z] || e[Se];
55
+ return typeof r == "function" ? r : null;
56
+ }
57
+ var j = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58
+ function f(e) {
59
+ {
60
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
61
+ t[n - 1] = arguments[n];
62
+ ke("error", e, t);
63
+ }
64
+ }
65
+ function ke(e, r, t) {
66
+ {
67
+ var n = j.ReactDebugCurrentFrame, o = n.getStackAddendum();
68
+ o !== "" && (r += "%s", t = t.concat([o]));
69
+ var s = t.map(function(i) {
70
+ return String(i);
71
+ });
72
+ s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
73
+ }
74
+ }
75
+ var Ae = !1, De = !1, Fe = !1, Ie = !1, $e = !1, Q;
76
+ Q = Symbol.for("react.module.reference");
77
+ function We(e) {
78
+ return !!(typeof e == "string" || typeof e == "function" || e === R || e === S || $e || e === O || e === _ || e === h || Ie || e === W || Ae || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === g || e.$$typeof === m || e.$$typeof === p || e.$$typeof === u || // This needs to include all possible module reference object
79
+ // types supported by any Flight configuration anywhere since
80
+ // we don't know which Flight build this will end up being used
81
+ // with.
82
+ e.$$typeof === Q || e.getModuleId !== void 0));
83
+ }
84
+ function Ye(e, r, t) {
85
+ var n = e.displayName;
86
+ if (n)
87
+ return n;
88
+ var o = r.displayName || r.name || "";
89
+ return o !== "" ? t + "(" + o + ")" : t;
90
+ }
91
+ function ee(e) {
92
+ return e.displayName || "Context";
93
+ }
94
+ function T(e) {
95
+ if (e == null)
96
+ return null;
97
+ if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
98
+ return e.displayName || e.name || null;
99
+ if (typeof e == "string")
100
+ return e;
63
101
  switch (e) {
64
- case k:
102
+ case R:
65
103
  return "Fragment";
66
- case V:
104
+ case C:
105
+ return "Portal";
106
+ case S:
67
107
  return "Profiler";
68
- case q:
108
+ case O:
69
109
  return "StrictMode";
70
- case X:
110
+ case _:
71
111
  return "Suspense";
72
- case B:
112
+ case h:
73
113
  return "SuspenseList";
74
- case Z:
75
- return "Activity";
76
114
  }
77
115
  if (typeof e == "object")
78
- switch (typeof e.tag == "number" && console.error(
79
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
80
- ), e.$$typeof) {
81
- case W:
82
- return "Portal";
83
- case J:
84
- return e.displayName || "Context";
85
- case z:
86
- return (e._context.displayName || "Context") + ".Consumer";
87
- case G:
88
- var r = e.render;
89
- return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
90
- case H:
91
- return r = e.displayName || null, r !== null ? r : o(e.type) || "Memo";
92
- case A:
93
- r = e._payload, e = e._init;
116
+ switch (e.$$typeof) {
117
+ case p:
118
+ var r = e;
119
+ return ee(r) + ".Consumer";
120
+ case m:
121
+ var t = e;
122
+ return ee(t._context) + ".Provider";
123
+ case u:
124
+ return Ye(e, e.render, "ForwardRef");
125
+ case g:
126
+ var n = e.displayName || null;
127
+ return n !== null ? n : T(e.type) || "Memo";
128
+ case w: {
129
+ var o = e, s = o._payload, i = o._init;
94
130
  try {
95
- return o(e(r));
131
+ return T(i(s));
96
132
  } catch {
133
+ return null;
97
134
  }
135
+ }
98
136
  }
99
137
  return null;
100
138
  }
101
- function i(e) {
102
- return "" + e;
139
+ var x = Object.assign, D = 0, re, te, ne, ae, ie, oe, ue;
140
+ function se() {
103
141
  }
104
- function f(e) {
142
+ se.__reactDisabledLog = !0;
143
+ function Le() {
144
+ {
145
+ if (D === 0) {
146
+ re = console.log, te = console.info, ne = console.warn, ae = console.error, ie = console.group, oe = console.groupCollapsed, ue = console.groupEnd;
147
+ var e = {
148
+ configurable: !0,
149
+ enumerable: !0,
150
+ value: se,
151
+ writable: !0
152
+ };
153
+ Object.defineProperties(console, {
154
+ info: e,
155
+ log: e,
156
+ warn: e,
157
+ error: e,
158
+ group: e,
159
+ groupCollapsed: e,
160
+ groupEnd: e
161
+ });
162
+ }
163
+ D++;
164
+ }
165
+ }
166
+ function Ve() {
167
+ {
168
+ if (D--, D === 0) {
169
+ var e = {
170
+ configurable: !0,
171
+ enumerable: !0,
172
+ writable: !0
173
+ };
174
+ Object.defineProperties(console, {
175
+ log: x({}, e, {
176
+ value: re
177
+ }),
178
+ info: x({}, e, {
179
+ value: te
180
+ }),
181
+ warn: x({}, e, {
182
+ value: ne
183
+ }),
184
+ error: x({}, e, {
185
+ value: ae
186
+ }),
187
+ group: x({}, e, {
188
+ value: ie
189
+ }),
190
+ groupCollapsed: x({}, e, {
191
+ value: oe
192
+ }),
193
+ groupEnd: x({}, e, {
194
+ value: ue
195
+ })
196
+ });
197
+ }
198
+ D < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
199
+ }
200
+ }
201
+ var N = j.ReactCurrentDispatcher, q;
202
+ function Y(e, r, t) {
203
+ {
204
+ if (q === void 0)
205
+ try {
206
+ throw Error();
207
+ } catch (o) {
208
+ var n = o.stack.trim().match(/\n( *(at )?)/);
209
+ q = n && n[1] || "";
210
+ }
211
+ return `
212
+ ` + q + e;
213
+ }
214
+ }
215
+ var J = !1, L;
216
+ {
217
+ var Me = typeof WeakMap == "function" ? WeakMap : Map;
218
+ L = new Me();
219
+ }
220
+ function le(e, r) {
221
+ if (!e || J)
222
+ return "";
223
+ {
224
+ var t = L.get(e);
225
+ if (t !== void 0)
226
+ return t;
227
+ }
228
+ var n;
229
+ J = !0;
230
+ var o = Error.prepareStackTrace;
231
+ Error.prepareStackTrace = void 0;
232
+ var s;
233
+ s = N.current, N.current = null, Le();
105
234
  try {
106
- i(e);
107
- var r = !1;
108
- } catch {
109
- r = !0;
235
+ if (r) {
236
+ var i = function() {
237
+ throw Error();
238
+ };
239
+ if (Object.defineProperty(i.prototype, "props", {
240
+ set: function() {
241
+ throw Error();
242
+ }
243
+ }), typeof Reflect == "object" && Reflect.construct) {
244
+ try {
245
+ Reflect.construct(i, []);
246
+ } catch (v) {
247
+ n = v;
248
+ }
249
+ Reflect.construct(e, [], i);
250
+ } else {
251
+ try {
252
+ i.call();
253
+ } catch (v) {
254
+ n = v;
255
+ }
256
+ e.call(i.prototype);
257
+ }
258
+ } else {
259
+ try {
260
+ throw Error();
261
+ } catch (v) {
262
+ n = v;
263
+ }
264
+ e();
265
+ }
266
+ } catch (v) {
267
+ if (v && n && typeof v.stack == "string") {
268
+ for (var a = v.stack.split(`
269
+ `), d = n.stack.split(`
270
+ `), l = a.length - 1, c = d.length - 1; l >= 1 && c >= 0 && a[l] !== d[c]; )
271
+ c--;
272
+ for (; l >= 1 && c >= 0; l--, c--)
273
+ if (a[l] !== d[c]) {
274
+ if (l !== 1 || c !== 1)
275
+ do
276
+ if (l--, c--, c < 0 || a[l] !== d[c]) {
277
+ var y = `
278
+ ` + a[l].replace(" at new ", " at ");
279
+ return e.displayName && y.includes("<anonymous>") && (y = y.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, y), y;
280
+ }
281
+ while (l >= 1 && c >= 0);
282
+ break;
283
+ }
284
+ }
285
+ } finally {
286
+ J = !1, N.current = s, Ve(), Error.prepareStackTrace = o;
287
+ }
288
+ var A = e ? e.displayName || e.name : "", P = A ? Y(A) : "";
289
+ return typeof e == "function" && L.set(e, P), P;
290
+ }
291
+ function Ue(e, r, t) {
292
+ return le(e, !1);
293
+ }
294
+ function Ne(e) {
295
+ var r = e.prototype;
296
+ return !!(r && r.isReactComponent);
297
+ }
298
+ function V(e, r, t) {
299
+ if (e == null)
300
+ return "";
301
+ if (typeof e == "function")
302
+ return le(e, Ne(e));
303
+ if (typeof e == "string")
304
+ return Y(e);
305
+ switch (e) {
306
+ case _:
307
+ return Y("Suspense");
308
+ case h:
309
+ return Y("SuspenseList");
110
310
  }
111
- if (r) {
112
- r = console;
113
- var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
114
- return t.call(
115
- r,
116
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
117
- n
118
- ), i(e);
311
+ if (typeof e == "object")
312
+ switch (e.$$typeof) {
313
+ case u:
314
+ return Ue(e.render);
315
+ case g:
316
+ return V(e.type, r, t);
317
+ case w: {
318
+ var n = e, o = n._payload, s = n._init;
319
+ try {
320
+ return V(s(o), r, t);
321
+ } catch {
322
+ }
323
+ }
324
+ }
325
+ return "";
326
+ }
327
+ var F = Object.prototype.hasOwnProperty, ce = {}, fe = j.ReactDebugCurrentFrame;
328
+ function M(e) {
329
+ if (e) {
330
+ var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
331
+ fe.setExtraStackFrame(t);
332
+ } else
333
+ fe.setExtraStackFrame(null);
334
+ }
335
+ function qe(e, r, t, n, o) {
336
+ {
337
+ var s = Function.call.bind(F);
338
+ for (var i in e)
339
+ if (s(e, i)) {
340
+ var a = void 0;
341
+ try {
342
+ if (typeof e[i] != "function") {
343
+ var d = 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`.");
344
+ throw d.name = "Invariant Violation", d;
345
+ }
346
+ a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
347
+ } catch (l) {
348
+ a = l;
349
+ }
350
+ a && !(a instanceof Error) && (M(o), f("%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), M(null)), a instanceof Error && !(a.message in ce) && (ce[a.message] = !0, M(o), f("Failed %s type: %s", t, a.message), M(null));
351
+ }
352
+ }
353
+ }
354
+ var Je = Array.isArray;
355
+ function B(e) {
356
+ return Je(e);
357
+ }
358
+ function Be(e) {
359
+ {
360
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
361
+ return t;
119
362
  }
120
363
  }
121
- function d(e) {
122
- if (e === k) return "<>";
123
- if (typeof e == "object" && e !== null && e.$$typeof === A)
124
- return "<...>";
364
+ function Ke(e) {
125
365
  try {
126
- var r = o(e);
127
- return r ? "<" + r + ">" : "<...>";
366
+ return de(e), !1;
128
367
  } catch {
129
- return "<...>";
368
+ return !0;
130
369
  }
131
370
  }
132
- function u() {
133
- var e = x.A;
134
- return e === null ? null : e.getOwner();
371
+ function de(e) {
372
+ return "" + e;
373
+ }
374
+ function ve(e) {
375
+ if (Ke(e))
376
+ return f("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);
135
377
  }
136
- function c() {
137
- return Error("react-stack-top-frame");
378
+ var pe = j.ReactCurrentOwner, ze = {
379
+ key: !0,
380
+ ref: !0,
381
+ __self: !0,
382
+ __source: !0
383
+ }, he, ye;
384
+ function Ge(e) {
385
+ if (F.call(e, "ref")) {
386
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
387
+ if (r && r.isReactWarning)
388
+ return !1;
389
+ }
390
+ return e.ref !== void 0;
138
391
  }
139
- function m(e) {
140
- if (N.call(e, "key")) {
392
+ function Xe(e) {
393
+ if (F.call(e, "key")) {
141
394
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
142
- if (r && r.isReactWarning) return !1;
395
+ if (r && r.isReactWarning)
396
+ return !1;
143
397
  }
144
398
  return e.key !== void 0;
145
399
  }
146
- function l(e, r) {
147
- function t() {
148
- g || (g = !0, console.error(
149
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
150
- r
151
- ));
400
+ function He(e, r) {
401
+ typeof e.ref == "string" && pe.current;
402
+ }
403
+ function Ze(e, r) {
404
+ {
405
+ var t = function() {
406
+ he || (he = !0, f("%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));
407
+ };
408
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
409
+ get: t,
410
+ configurable: !0
411
+ });
412
+ }
413
+ }
414
+ function Qe(e, r) {
415
+ {
416
+ var t = function() {
417
+ ye || (ye = !0, f("%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));
418
+ };
419
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
420
+ get: t,
421
+ configurable: !0
422
+ });
152
423
  }
153
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
154
- get: t,
155
- configurable: !0
156
- });
157
- }
158
- function s() {
159
- var e = o(this.type);
160
- return Y[e] || (Y[e] = !0, console.error(
161
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
162
- )), e = this.props.ref, e !== void 0 ? e : null;
163
- }
164
- function R(e, r, t, n, b, h) {
165
- var a = t.ref;
166
- return e = {
167
- $$typeof: C,
424
+ }
425
+ var er = function(e, r, t, n, o, s, i) {
426
+ var a = {
427
+ // This tag allows us to uniquely identify this as a React Element
428
+ $$typeof: E,
429
+ // Built-in properties that belong on the element
168
430
  type: e,
169
431
  key: r,
170
- props: t,
171
- _owner: n
172
- }, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
173
- enumerable: !1,
174
- get: s
175
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
176
- configurable: !1,
177
- enumerable: !1,
178
- writable: !0,
179
- value: 0
180
- }), Object.defineProperty(e, "_debugInfo", {
432
+ ref: t,
433
+ props: i,
434
+ // Record the component responsible for creating this element.
435
+ _owner: s
436
+ };
437
+ return a._store = {}, Object.defineProperty(a._store, "validated", {
181
438
  configurable: !1,
182
439
  enumerable: !1,
183
440
  writable: !0,
184
- value: null
185
- }), Object.defineProperty(e, "_debugStack", {
441
+ value: !1
442
+ }), Object.defineProperty(a, "_self", {
186
443
  configurable: !1,
187
444
  enumerable: !1,
188
- writable: !0,
189
- value: b
190
- }), Object.defineProperty(e, "_debugTask", {
445
+ writable: !1,
446
+ value: n
447
+ }), Object.defineProperty(a, "_source", {
191
448
  configurable: !1,
192
449
  enumerable: !1,
193
- writable: !0,
194
- value: h
195
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
196
- }
197
- function S(e, r, t, n, b, h) {
198
- var a = r.children;
199
- if (a !== void 0)
200
- if (n)
201
- if (K(a)) {
202
- for (n = 0; n < a.length; n++)
203
- y(a[n]);
204
- Object.freeze && Object.freeze(a);
205
- } else
206
- console.error(
207
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
208
- );
209
- else y(a);
210
- if (N.call(r, "key")) {
211
- a = o(e);
212
- var _ = Object.keys(r).filter(function(ee) {
213
- return ee !== "key";
214
- });
215
- n = 0 < _.length ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}", F[a + n] || (_ = 0 < _.length ? "{" + _.join(": ..., ") + ": ...}" : "{}", console.error(
216
- `A props object containing a "key" prop is being spread into JSX:
450
+ writable: !1,
451
+ value: o
452
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
453
+ };
454
+ function rr(e, r, t, n, o) {
455
+ {
456
+ var s, i = {}, a = null, d = null;
457
+ t !== void 0 && (ve(t), a = "" + t), Xe(r) && (ve(r.key), a = "" + r.key), Ge(r) && (d = r.ref, He(r, o));
458
+ for (s in r)
459
+ F.call(r, s) && !ze.hasOwnProperty(s) && (i[s] = r[s]);
460
+ if (e && e.defaultProps) {
461
+ var l = e.defaultProps;
462
+ for (s in l)
463
+ i[s] === void 0 && (i[s] = l[s]);
464
+ }
465
+ if (a || d) {
466
+ var c = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
467
+ a && Ze(i, c), d && Qe(i, c);
468
+ }
469
+ return er(e, a, d, o, n, pe.current, i);
470
+ }
471
+ }
472
+ var K = j.ReactCurrentOwner, be = j.ReactDebugCurrentFrame;
473
+ function k(e) {
474
+ if (e) {
475
+ var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
476
+ be.setExtraStackFrame(t);
477
+ } else
478
+ be.setExtraStackFrame(null);
479
+ }
480
+ var z;
481
+ z = !1;
482
+ function G(e) {
483
+ return typeof e == "object" && e !== null && e.$$typeof === E;
484
+ }
485
+ function Ee() {
486
+ {
487
+ if (K.current) {
488
+ var e = T(K.current.type);
489
+ if (e)
490
+ return `
491
+
492
+ Check the render method of \`` + e + "`.";
493
+ }
494
+ return "";
495
+ }
496
+ }
497
+ function tr(e) {
498
+ return "";
499
+ }
500
+ var Re = {};
501
+ function nr(e) {
502
+ {
503
+ var r = Ee();
504
+ if (!r) {
505
+ var t = typeof e == "string" ? e : e.displayName || e.name;
506
+ t && (r = `
507
+
508
+ Check the top-level render call using <` + t + ">.");
509
+ }
510
+ return r;
511
+ }
512
+ }
513
+ function _e(e, r) {
514
+ {
515
+ if (!e._store || e._store.validated || e.key != null)
516
+ return;
517
+ e._store.validated = !0;
518
+ var t = nr(r);
519
+ if (Re[t])
520
+ return;
521
+ Re[t] = !0;
522
+ var n = "";
523
+ e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + T(e._owner.type) + "."), k(e), f('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);
524
+ }
525
+ }
526
+ function ge(e, r) {
527
+ {
528
+ if (typeof e != "object")
529
+ return;
530
+ if (B(e))
531
+ for (var t = 0; t < e.length; t++) {
532
+ var n = e[t];
533
+ G(n) && _e(n, r);
534
+ }
535
+ else if (G(e))
536
+ e._store && (e._store.validated = !0);
537
+ else if (e) {
538
+ var o = je(e);
539
+ if (typeof o == "function" && o !== e.entries)
540
+ for (var s = o.call(e), i; !(i = s.next()).done; )
541
+ G(i.value) && _e(i.value, r);
542
+ }
543
+ }
544
+ }
545
+ function ar(e) {
546
+ {
547
+ var r = e.type;
548
+ if (r == null || typeof r == "string")
549
+ return;
550
+ var t;
551
+ if (typeof r == "function")
552
+ t = r.propTypes;
553
+ else if (typeof r == "object" && (r.$$typeof === u || // Note: Memo only checks outer props here.
554
+ // Inner props are checked in the reconciler.
555
+ r.$$typeof === g))
556
+ t = r.propTypes;
557
+ else
558
+ return;
559
+ if (t) {
560
+ var n = T(r);
561
+ qe(t, e.props, "prop", n, e);
562
+ } else if (r.PropTypes !== void 0 && !z) {
563
+ z = !0;
564
+ var o = T(r);
565
+ f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
566
+ }
567
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
568
+ }
569
+ }
570
+ function ir(e) {
571
+ {
572
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
573
+ var n = r[t];
574
+ if (n !== "children" && n !== "key") {
575
+ k(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), k(null);
576
+ break;
577
+ }
578
+ }
579
+ e.ref !== null && (k(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
580
+ }
581
+ }
582
+ var me = {};
583
+ function Te(e, r, t, n, o, s) {
584
+ {
585
+ var i = We(e);
586
+ if (!i) {
587
+ var a = "";
588
+ (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.");
589
+ var d = tr();
590
+ d ? a += d : a += Ee();
591
+ var l;
592
+ e === null ? l = "null" : B(e) ? l = "array" : e !== void 0 && e.$$typeof === E ? (l = "<" + (T(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, f("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);
593
+ }
594
+ var c = rr(e, r, t, o, s);
595
+ if (c == null)
596
+ return c;
597
+ if (i) {
598
+ var y = r.children;
599
+ if (y !== void 0)
600
+ if (n)
601
+ if (B(y)) {
602
+ for (var A = 0; A < y.length; A++)
603
+ ge(y[A], e);
604
+ Object.freeze && Object.freeze(y);
605
+ } else
606
+ f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
607
+ else
608
+ ge(y, e);
609
+ }
610
+ if (F.call(r, "key")) {
611
+ var P = T(e), v = Object.keys(r).filter(function(fr) {
612
+ return fr !== "key";
613
+ }), X = v.length > 0 ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}";
614
+ if (!me[P + X]) {
615
+ var cr = v.length > 0 ? "{" + v.join(": ..., ") + ": ...}" : "{}";
616
+ f(`A props object containing a "key" prop is being spread into JSX:
217
617
  let props = %s;
218
618
  <%s {...props} />
219
619
  React keys must be passed directly to JSX without using spread:
220
620
  let props = %s;
221
- <%s key={someKey} {...props} />`,
222
- n,
223
- a,
224
- _,
225
- a
226
- ), F[a + n] = !0);
227
- }
228
- if (a = null, t !== void 0 && (f(t), a = "" + t), m(r) && (f(r.key), a = "" + r.key), "key" in r) {
229
- t = {};
230
- for (var w in r)
231
- w !== "key" && (t[w] = r[w]);
232
- } else t = r;
233
- return a && l(
234
- t,
235
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
236
- ), R(
237
- e,
238
- a,
239
- t,
240
- u(),
241
- b,
242
- h
243
- );
244
- }
245
- function y(e) {
246
- j(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === A && (e._payload.status === "fulfilled" ? j(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
247
- }
248
- function j(e) {
249
- return typeof e == "object" && e !== null && e.$$typeof === C;
250
- }
251
- var v = re, C = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), V = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), J = Symbol.for("react.context"), G = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"), B = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), Z = Symbol.for("react.activity"), Q = Symbol.for("react.client.reference"), x = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, K = Array.isArray, O = console.createTask ? console.createTask : function() {
252
- return null;
253
- };
254
- v = {
255
- react_stack_bottom_frame: function(e) {
256
- return e();
621
+ <%s key={someKey} {...props} />`, X, P, cr, P), me[P + X] = !0;
622
+ }
623
+ }
624
+ return e === R ? ir(c) : ar(c), c;
257
625
  }
258
- };
259
- var g, Y = {}, $ = v.react_stack_bottom_frame.bind(
260
- v,
261
- c
262
- )(), I = O(d(c)), F = {};
263
- E.Fragment = k, E.jsx = function(e, r, t) {
264
- var n = 1e4 > x.recentlyCreatedOwnerStacks++;
265
- return S(
266
- e,
267
- r,
268
- t,
269
- !1,
270
- n ? Error("react-stack-top-frame") : $,
271
- n ? O(d(e)) : I
272
- );
273
- }, E.jsxs = function(e, r, t) {
274
- var n = 1e4 > x.recentlyCreatedOwnerStacks++;
275
- return S(
276
- e,
277
- r,
278
- t,
279
- !0,
280
- n ? Error("react-stack-top-frame") : $,
281
- n ? O(d(e)) : I
282
- );
283
- };
284
- })()), E;
626
+ }
627
+ function or(e, r, t) {
628
+ return Te(e, r, t, !0);
629
+ }
630
+ function ur(e, r, t) {
631
+ return Te(e, r, t, !1);
632
+ }
633
+ var sr = ur, lr = or;
634
+ $.Fragment = R, $.jsx = sr, $.jsxs = lr;
635
+ })()), $;
285
636
  }
286
- var M;
287
- function ue() {
288
- return M || (M = 1, process.env.NODE_ENV === "production" ? T.exports = oe() : T.exports = se()), T.exports;
637
+ var we;
638
+ function br() {
639
+ return we || (we = 1, process.env.NODE_ENV === "production" ? U.exports = hr() : U.exports = yr()), U.exports;
289
640
  }
290
- var ce = ue();
291
- function le({
292
- baseURL: o,
293
- getToken: i,
294
- timeoutMs: f = 15e3,
295
- axiosInstance: d,
296
- currency: u,
297
- lng: c,
641
+ var Er = br();
642
+ function Rr({
643
+ baseURL: b,
644
+ getToken: E,
645
+ timeoutMs: C = 15e3,
646
+ axiosInstance: R,
647
+ currency: O,
648
+ lng: S,
298
649
  onError: m
299
650
  } = {}) {
300
- const l = d ?? ae.create({
301
- baseURL: o,
302
- timeout: f,
651
+ const p = R ?? pr.create({
652
+ baseURL: b,
653
+ timeout: C,
303
654
  headers: { "Content-Type": "application/json" }
304
655
  });
305
- return l.interceptors.request.use(async (s) => {
306
- if (i) {
307
- const R = await i();
308
- R && (s.headers = s.headers || {}, s.headers.Authorization = `Bearer ${R}`);
309
- }
310
- return s;
311
- }), l.interceptors.request.use((s) => {
312
- s.headers.Currency = u, s.headers["currency-code"] = u, s.headers.lang = c;
313
- }), l.interceptors.response.use(
314
- (s) => s,
315
- (s) => m ? m(s, { instance: l }) : Promise.reject(s)
316
- ), l;
656
+ return p.interceptors.request.use(async (u) => {
657
+ if (E) {
658
+ const _ = await E();
659
+ _ && (u.headers = u.headers || {}, u.headers.Authorization = `Bearer ${_}`);
660
+ }
661
+ return u;
662
+ }), p.interceptors.request.use((u) => {
663
+ u.headers.Currency = O, u.headers["currency-code"] = O, u.headers.lang = S;
664
+ }), p.interceptors.response.use(
665
+ (u) => u,
666
+ (u) => m ? m(u, { instance: p }) : Promise.reject(u)
667
+ ), p;
317
668
  }
318
- function pe({ children: o, ...i }) {
319
- const f = {
669
+ function Or({ children: b, ...E }) {
670
+ const C = {
320
671
  recentlyCreatedOwnerStacks: []
321
672
  // 其他 API 相關狀態...
322
- }, d = ne(() => le(i), [i]);
323
- return /* @__PURE__ */ ce.jsx(P.Provider, { value: { client: d, ...f }, children: o });
673
+ }, R = vr(() => Rr(E), [E]);
674
+ return /* @__PURE__ */ Er.jsx(H.Provider, { value: { client: R, ...C }, children: b });
324
675
  }
325
676
  export {
326
- P as ApiCtx,
327
- pe as ApiProvider,
328
- me as useApiContext,
329
- _e as useApiContextSafe
677
+ H as ApiCtx,
678
+ Or as ApiProvider,
679
+ Tr as useApiContext,
680
+ Cr as useApiContextSafe
330
681
  };
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.14",
4
+ "version": "1.0.15",
5
5
  "description": "集成API",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",
@@ -57,15 +57,15 @@
57
57
  "@eslint/js": "^9.36.0",
58
58
  "@tanstack/react-query": "^5.90.5",
59
59
  "@tanstack/react-query-devtools": "^5.90.2",
60
- "@types/react": "^19.1.16",
61
- "@types/react-dom": "^19.1.9",
60
+ "@types/react": "^18.3.3",
61
+ "@types/react-dom": "^18.3.0",
62
62
  "@vitejs/plugin-react": "^5.0.4",
63
63
  "eslint": "^9.36.0",
64
64
  "eslint-plugin-react-hooks": "^5.2.0",
65
65
  "eslint-plugin-react-refresh": "^0.4.22",
66
66
  "globals": "^16.4.0",
67
- "react": "^19.1.1",
68
- "react-dom": "^19.1.1",
67
+ "react": "^18.3.1",
68
+ "react-dom": "^18.3.1",
69
69
  "vite": "^7.1.7"
70
70
  }
71
71
  }