@fuul/sdk 7.28.0 → 7.29.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AffiliatePortalService.d.ts","sourceRoot":"","sources":["../../src/affiliate-portal/AffiliatePortalService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,8BAA8B,EAC9B,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,8BAA8B,GAAG;IAC3C,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAIF,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;gBAE5B,QAAQ,EAAE,8BAA8B;IAIvC,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAgBtF,sBAAsB,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,8BAA8B,CAAC;IAYrG,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAUjF,iBAAiB,CAAC,MAAM,EAAE,gCAAgC,GAAG,OAAO,CAAC,kCAAkC,CAAC;IAiBxG,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAY/F"}
1
+ {"version":3,"file":"AffiliatePortalService.d.ts","sourceRoot":"","sources":["../../src/affiliate-portal/AffiliatePortalService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,8BAA8B,EAC9B,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,8BAA8B,GAAG;IAC3C,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAIF,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;gBAE5B,QAAQ,EAAE,8BAA8B;IAIvC,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAetF,sBAAsB,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,8BAA8B,CAAC;IAYrG,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAUjF,iBAAiB,CAAC,MAAM,EAAE,gCAAgC,GAAG,OAAO,CAAC,kCAAkC,CAAC;IAiBxG,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAY/F"}
package/dist/core.d.ts CHANGED
@@ -478,7 +478,7 @@ export declare function deleteReferral(params: DeleteReferralParams): Promise<vo
478
478
  * ```typescript
479
479
  * const stats = await Fuul.getAffiliateStats({
480
480
  * user_identifier: '0x12345',
481
- * user_identifier_type: UserIdentifierType.EvmAddress
481
+ * conversion_external_id: 1,
482
482
  * });
483
483
  * ```
484
484
  */
package/dist/index.mjs CHANGED
@@ -15,7 +15,6 @@ class Wt {
15
15
  from: e.from,
16
16
  to: e.to,
17
17
  this_month: e.this_month,
18
- conversion_id: e.conversion_id,
19
18
  conversion_external_id: e.conversion_external_id,
20
19
  conversion_name: e.conversion_name
21
20
  }
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(R,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(R=typeof globalThis<"u"?globalThis:R||self,T(R.Fuul={}))})(this,(function(R){"use strict";var Ms=Object.defineProperty;var Hs=(R,T,Q)=>T in R?Ms(R,T,{enumerable:!0,configurable:!0,writable:!0,value:Q}):R[T]=Q;var w=(R,T,Q)=>Hs(R,typeof T!="symbol"?T+"":T,Q);const T="/affiliate-portal";class Q{constructor(e){w(this,"httpClient");this.httpClient=e.httpClient}async getAffiliateStats(e){return(await this.httpClient.get({path:`${T}/stats`,queryParams:{user_identifier:e.user_identifier,from:e.from,to:e.to,this_month:e.this_month,conversion_id:e.conversion_id,conversion_external_id:e.conversion_external_id,conversion_name:e.conversion_name}})).data}async getAffiliateTotalStats(e){return(await this.httpClient.get({path:`${T}/total-stats`,queryParams:{statuses:e.statuses,regions:e.regions,audiences:e.audiences}})).data}async getReferralTree(e){return(await this.httpClient.get({path:`${T}/referral-tree`,queryParams:{user_identifier:e.user_identifier}})).data}async getStatsBreakdown(e){return(await this.httpClient.get({path:`${T}/stats-breakdown`,queryParams:{user_identifier:e.user_identifier,group_by:e.group_by,date_range:e.date_range,from:e.from,to:e.to,conversion_external_id:e.conversion_external_id,conversion_name:e.conversion_name,currency_id:e.currency_id}})).data}async getAffiliateNewTraders(e){return(await this.httpClient.get({path:`${T}/new-traders`,queryParams:{user_identifier:e.user_identifier,from:e.from,to:e.to,this_month:e.this_month}})).data}}function Ye(t,e){return function(){return t.apply(e,arguments)}}const{toString:Qt}=Object.prototype,{getPrototypeOf:Oe}=Object,{iterator:le,toStringTag:Ge}=Symbol,de=(t=>e=>{const r=Qt.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),F=t=>(t=t.toLowerCase(),e=>de(e)===t),fe=t=>e=>typeof e===t,{isArray:X}=Array,Y=fe("undefined");function re(t){return t!==null&&!Y(t)&&t.constructor!==null&&!Y(t.constructor)&&P(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ze=F("ArrayBuffer");function Xt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ze(t.buffer),e}const Yt=fe("string"),P=fe("function"),et=fe("number"),ne=t=>t!==null&&typeof t=="object",Gt=t=>t===!0||t===!1,he=t=>{if(de(t)!=="object")return!1;const e=Oe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Ge in t)&&!(le in t)},Zt=t=>{if(!ne(t)||re(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},er=F("Date"),tr=F("File"),rr=t=>!!(t&&typeof t.uri<"u"),nr=t=>t&&typeof t.getParts<"u",sr=F("Blob"),ir=F("FileList"),or=t=>ne(t)&&P(t.pipe);function ar(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const tt=ar(),rt=typeof tt.FormData<"u"?tt.FormData:void 0,cr=t=>{let e;return t&&(rt&&t instanceof rt||P(t.append)&&((e=de(t))==="formdata"||e==="object"&&P(t.toString)&&t.toString()==="[object FormData]"))},ur=F("URLSearchParams"),[lr,dr,fr,hr]=["ReadableStream","Request","Response","Headers"].map(F),pr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function se(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),X(t))for(n=0,s=t.length;n<s;n++)e.call(null,t[n],n,t);else{if(re(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(n=0;n<o;n++)a=i[n],e.call(null,t[a],a,t)}}function nt(t,e){if(re(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,s;for(;n-- >0;)if(s=r[n],e===s.toLowerCase())return s;return null}const M=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,st=t=>!Y(t)&&t!==M;function Ne(){const{caseless:t,skipUndefined:e}=st(this)&&this||{},r={},n=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const o=t&&nt(r,i)||i;he(r[o])&&he(s)?r[o]=Ne(r[o],s):he(s)?r[o]=Ne({},s):X(s)?r[o]=s.slice():(!e||!Y(s))&&(r[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&se(arguments[s],n);return r}const yr=(t,e,r,{allOwnKeys:n}={})=>(se(e,(s,i)=>{r&&P(s)?Object.defineProperty(t,i,{value:Ye(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),gr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),mr=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},_r=(t,e,r,n)=>{let s,i,o;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!n||n(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=r!==!1&&Oe(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},wr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},br=t=>{if(!t)return null;if(X(t))return t;let e=t.length;if(!et(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Cr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Oe(Uint8Array)),Er=(t,e)=>{const n=(t&&t[le]).call(t);let s;for(;(s=n.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},Rr=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Sr=F("HTMLFormElement"),Tr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),it=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Ar=F("RegExp"),ot=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};se(r,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(n[i]=o||s)}),Object.defineProperties(t,n)},Pr=t=>{ot(t,(e,r)=>{if(P(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(P(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Or=(t,e)=>{const r={},n=s=>{s.forEach(i=>{r[i]=!0})};return X(t)?n(t):n(String(t).split(e)),r},Nr=()=>{},Ur=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function xr(t){return!!(t&&P(t.append)&&t[Ge]==="FormData"&&t[le])}const Dr=t=>{const e=new Array(10),r=(n,s)=>{if(ne(n)){if(e.indexOf(n)>=0)return;if(re(n))return n;if(!("toJSON"in n)){e[s]=n;const i=X(n)?[]:{};return se(n,(o,a)=>{const f=r(o,s+1);!Y(f)&&(i[a]=f)}),e[s]=void 0,i}}return n};return r(t,0)},Lr=F("AsyncFunction"),Fr=t=>t&&(ne(t)||P(t))&&P(t.then)&&P(t.catch),at=((t,e)=>t?setImmediate:e?((r,n)=>(M.addEventListener("message",({source:s,data:i})=>{s===M&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),M.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",P(M.postMessage)),kr=typeof queueMicrotask<"u"?queueMicrotask.bind(M):typeof process<"u"&&process.nextTick||at,c={isArray:X,isArrayBuffer:Ze,isBuffer:re,isFormData:cr,isArrayBufferView:Xt,isString:Yt,isNumber:et,isBoolean:Gt,isObject:ne,isPlainObject:he,isEmptyObject:Zt,isReadableStream:lr,isRequest:dr,isResponse:fr,isHeaders:hr,isUndefined:Y,isDate:er,isFile:tr,isReactNativeBlob:rr,isReactNative:nr,isBlob:sr,isRegExp:Ar,isFunction:P,isStream:or,isURLSearchParams:ur,isTypedArray:Cr,isFileList:ir,forEach:se,merge:Ne,extend:yr,trim:pr,stripBOM:gr,inherits:mr,toFlatObject:_r,kindOf:de,kindOfTest:F,endsWith:wr,toArray:br,forEachEntry:Er,matchAll:Rr,isHTMLForm:Sr,hasOwnProperty:it,hasOwnProp:it,reduceDescriptors:ot,freezeMethods:Pr,toObjectSet:Or,toCamelCase:Tr,noop:Nr,toFiniteNumber:Ur,findKey:nt,global:M,isContextDefined:st,isSpecCompliantForm:xr,toJSONObject:Dr,isAsyncFn:Lr,isThenable:Fr,setImmediate:at,asap:kr,isIterable:t=>t!=null&&P(t[le])};let g=class Jt extends Error{static from(e,r,n,s,i,o){const a=new Jt(e.message,r||e.code,n,s,i);return a.cause=e,a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),o&&Object.assign(a,o),a}constructor(e,r,n,s,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}};g.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",g.ERR_BAD_OPTION="ERR_BAD_OPTION",g.ECONNABORTED="ECONNABORTED",g.ETIMEDOUT="ETIMEDOUT",g.ERR_NETWORK="ERR_NETWORK",g.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",g.ERR_DEPRECATED="ERR_DEPRECATED",g.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",g.ERR_BAD_REQUEST="ERR_BAD_REQUEST",g.ERR_CANCELED="ERR_CANCELED",g.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",g.ERR_INVALID_URL="ERR_INVALID_URL";const vr=null;function Ue(t){return c.isPlainObject(t)||c.isArray(t)}function ct(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function xe(t,e,r){return t?t.concat(e).map(function(s,i){return s=ct(s),!r&&i?"["+s+"]":s}).join(r?".":""):e}function Ir(t){return c.isArray(t)&&!t.some(Ue)}const Br=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function pe(t,e,r){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=c.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!c.isUndefined(p[y])});const n=r.metaTokens,s=r.visitor||u,i=r.dots,o=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(c.isDate(d))return d.toISOString();if(c.isBoolean(d))return d.toString();if(!f&&c.isBlob(d))throw new g("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(d)||c.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function u(d,y,p){let C=d;if(c.isReactNative(e)&&c.isReactNativeBlob(d))return e.append(xe(p,y,i),l(d)),!1;if(d&&!p&&typeof d=="object"){if(c.endsWith(y,"{}"))y=n?y:y.slice(0,-2),d=JSON.stringify(d);else if(c.isArray(d)&&Ir(d)||(c.isFileList(d)||c.endsWith(y,"[]"))&&(C=c.toArray(d)))return y=ct(y),C.forEach(function(S,N){!(c.isUndefined(S)||S===null)&&e.append(o===!0?xe([y],N,i):o===null?y:y+"[]",l(S))}),!1}return Ue(d)?!0:(e.append(xe(p,y,i),l(d)),!1)}const h=[],m=Object.assign(Br,{defaultVisitor:u,convertValue:l,isVisitable:Ue});function E(d,y){if(!c.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(d),c.forEach(d,function(C,D){(!(c.isUndefined(C)||C===null)&&s.call(e,C,c.isString(D)?D.trim():D,y,m))===!0&&E(C,y?y.concat(D):[D])}),h.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return E(t),e}function ut(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function De(t,e){this._pairs=[],t&&pe(t,this,e)}const lt=De.prototype;lt.append=function(e,r){this._pairs.push([e,r])},lt.toString=function(e){const r=e?function(n){return e.call(this,n,ut)}:ut;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function qr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dt(t,e,r){if(!e)return t;const n=r&&r.encode||qr,s=c.isFunction(r)?{serialize:r}:r,i=s&&s.serialize;let o;if(i?o=i(e,s):o=c.isURLSearchParams(e)?e.toString():new De(e,s).toString(n),o){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class ft{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},$r={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:De,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Fe=typeof window<"u"&&typeof document<"u",ke=typeof navigator=="object"&&navigator||void 0,jr=Fe&&(!ke||["ReactNative","NativeScript","NS"].indexOf(ke.product)<0),Mr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hr=Fe&&window.location.href||"http://localhost",A={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fe,hasStandardBrowserEnv:jr,hasStandardBrowserWebWorkerEnv:Mr,navigator:ke,origin:Hr},Symbol.toStringTag,{value:"Module"})),...$r};function Vr(t,e){return pe(t,new A.classes.URLSearchParams,{visitor:function(r,n,s,i){return A.isNode&&c.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function Kr(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function zr(t){const e={},r=Object.keys(t);let n;const s=r.length;let i;for(n=0;n<s;n++)i=r[n],e[i]=t[i];return e}function ht(t){function e(r,n,s,i){let o=r[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),f=i>=r.length;return o=!o&&c.isArray(s)?s.length:o,f?(c.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!a):((!s[o]||!c.isObject(s[o]))&&(s[o]=[]),e(r,n,s[o],i)&&c.isArray(s[o])&&(s[o]=zr(s[o])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const r={};return c.forEachEntry(t,(n,s)=>{e(Kr(n),s,r,0)}),r}return null}function Jr(t,e,r){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const ie={transitional:Le,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=c.isObject(e);if(i&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return s?JSON.stringify(ht(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Vr(e,this.formSerializer).toString();if((a=c.isFileList(e))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return pe(a?{"files[]":e}:e,f&&new f,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),Jr(e)):e}],transformResponse:[function(e){const r=this.transitional||ie.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(n&&!this.responseType||s)){const o=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?g.from(a,g.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{ie.headers[t]={}});const Wr=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qr=t=>{const e={};let r,n,s;return t&&t.split(`
1
+ (function(R,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(R=typeof globalThis<"u"?globalThis:R||self,T(R.Fuul={}))})(this,(function(R){"use strict";var Ms=Object.defineProperty;var Hs=(R,T,Q)=>T in R?Ms(R,T,{enumerable:!0,configurable:!0,writable:!0,value:Q}):R[T]=Q;var w=(R,T,Q)=>Hs(R,typeof T!="symbol"?T+"":T,Q);const T="/affiliate-portal";class Q{constructor(e){w(this,"httpClient");this.httpClient=e.httpClient}async getAffiliateStats(e){return(await this.httpClient.get({path:`${T}/stats`,queryParams:{user_identifier:e.user_identifier,from:e.from,to:e.to,this_month:e.this_month,conversion_external_id:e.conversion_external_id,conversion_name:e.conversion_name}})).data}async getAffiliateTotalStats(e){return(await this.httpClient.get({path:`${T}/total-stats`,queryParams:{statuses:e.statuses,regions:e.regions,audiences:e.audiences}})).data}async getReferralTree(e){return(await this.httpClient.get({path:`${T}/referral-tree`,queryParams:{user_identifier:e.user_identifier}})).data}async getStatsBreakdown(e){return(await this.httpClient.get({path:`${T}/stats-breakdown`,queryParams:{user_identifier:e.user_identifier,group_by:e.group_by,date_range:e.date_range,from:e.from,to:e.to,conversion_external_id:e.conversion_external_id,conversion_name:e.conversion_name,currency_id:e.currency_id}})).data}async getAffiliateNewTraders(e){return(await this.httpClient.get({path:`${T}/new-traders`,queryParams:{user_identifier:e.user_identifier,from:e.from,to:e.to,this_month:e.this_month}})).data}}function Ye(t,e){return function(){return t.apply(e,arguments)}}const{toString:Qt}=Object.prototype,{getPrototypeOf:Oe}=Object,{iterator:le,toStringTag:Ge}=Symbol,de=(t=>e=>{const r=Qt.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),F=t=>(t=t.toLowerCase(),e=>de(e)===t),fe=t=>e=>typeof e===t,{isArray:X}=Array,Y=fe("undefined");function re(t){return t!==null&&!Y(t)&&t.constructor!==null&&!Y(t.constructor)&&P(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ze=F("ArrayBuffer");function Xt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ze(t.buffer),e}const Yt=fe("string"),P=fe("function"),et=fe("number"),ne=t=>t!==null&&typeof t=="object",Gt=t=>t===!0||t===!1,he=t=>{if(de(t)!=="object")return!1;const e=Oe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Ge in t)&&!(le in t)},Zt=t=>{if(!ne(t)||re(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},er=F("Date"),tr=F("File"),rr=t=>!!(t&&typeof t.uri<"u"),nr=t=>t&&typeof t.getParts<"u",sr=F("Blob"),ir=F("FileList"),or=t=>ne(t)&&P(t.pipe);function ar(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const tt=ar(),rt=typeof tt.FormData<"u"?tt.FormData:void 0,cr=t=>{let e;return t&&(rt&&t instanceof rt||P(t.append)&&((e=de(t))==="formdata"||e==="object"&&P(t.toString)&&t.toString()==="[object FormData]"))},ur=F("URLSearchParams"),[lr,dr,fr,hr]=["ReadableStream","Request","Response","Headers"].map(F),pr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function se(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),X(t))for(n=0,s=t.length;n<s;n++)e.call(null,t[n],n,t);else{if(re(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(n=0;n<o;n++)a=i[n],e.call(null,t[a],a,t)}}function nt(t,e){if(re(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,s;for(;n-- >0;)if(s=r[n],e===s.toLowerCase())return s;return null}const M=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,st=t=>!Y(t)&&t!==M;function Ne(){const{caseless:t,skipUndefined:e}=st(this)&&this||{},r={},n=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const o=t&&nt(r,i)||i;he(r[o])&&he(s)?r[o]=Ne(r[o],s):he(s)?r[o]=Ne({},s):X(s)?r[o]=s.slice():(!e||!Y(s))&&(r[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&se(arguments[s],n);return r}const yr=(t,e,r,{allOwnKeys:n}={})=>(se(e,(s,i)=>{r&&P(s)?Object.defineProperty(t,i,{value:Ye(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),gr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),mr=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},_r=(t,e,r,n)=>{let s,i,o;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!n||n(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=r!==!1&&Oe(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},wr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},br=t=>{if(!t)return null;if(X(t))return t;let e=t.length;if(!et(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Cr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Oe(Uint8Array)),Er=(t,e)=>{const n=(t&&t[le]).call(t);let s;for(;(s=n.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},Rr=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Sr=F("HTMLFormElement"),Tr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),it=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Ar=F("RegExp"),ot=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};se(r,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(n[i]=o||s)}),Object.defineProperties(t,n)},Pr=t=>{ot(t,(e,r)=>{if(P(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(P(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Or=(t,e)=>{const r={},n=s=>{s.forEach(i=>{r[i]=!0})};return X(t)?n(t):n(String(t).split(e)),r},Nr=()=>{},Ur=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function xr(t){return!!(t&&P(t.append)&&t[Ge]==="FormData"&&t[le])}const Dr=t=>{const e=new Array(10),r=(n,s)=>{if(ne(n)){if(e.indexOf(n)>=0)return;if(re(n))return n;if(!("toJSON"in n)){e[s]=n;const i=X(n)?[]:{};return se(n,(o,a)=>{const f=r(o,s+1);!Y(f)&&(i[a]=f)}),e[s]=void 0,i}}return n};return r(t,0)},Lr=F("AsyncFunction"),Fr=t=>t&&(ne(t)||P(t))&&P(t.then)&&P(t.catch),at=((t,e)=>t?setImmediate:e?((r,n)=>(M.addEventListener("message",({source:s,data:i})=>{s===M&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),M.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",P(M.postMessage)),kr=typeof queueMicrotask<"u"?queueMicrotask.bind(M):typeof process<"u"&&process.nextTick||at,c={isArray:X,isArrayBuffer:Ze,isBuffer:re,isFormData:cr,isArrayBufferView:Xt,isString:Yt,isNumber:et,isBoolean:Gt,isObject:ne,isPlainObject:he,isEmptyObject:Zt,isReadableStream:lr,isRequest:dr,isResponse:fr,isHeaders:hr,isUndefined:Y,isDate:er,isFile:tr,isReactNativeBlob:rr,isReactNative:nr,isBlob:sr,isRegExp:Ar,isFunction:P,isStream:or,isURLSearchParams:ur,isTypedArray:Cr,isFileList:ir,forEach:se,merge:Ne,extend:yr,trim:pr,stripBOM:gr,inherits:mr,toFlatObject:_r,kindOf:de,kindOfTest:F,endsWith:wr,toArray:br,forEachEntry:Er,matchAll:Rr,isHTMLForm:Sr,hasOwnProperty:it,hasOwnProp:it,reduceDescriptors:ot,freezeMethods:Pr,toObjectSet:Or,toCamelCase:Tr,noop:Nr,toFiniteNumber:Ur,findKey:nt,global:M,isContextDefined:st,isSpecCompliantForm:xr,toJSONObject:Dr,isAsyncFn:Lr,isThenable:Fr,setImmediate:at,asap:kr,isIterable:t=>t!=null&&P(t[le])};let g=class Jt extends Error{static from(e,r,n,s,i,o){const a=new Jt(e.message,r||e.code,n,s,i);return a.cause=e,a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),o&&Object.assign(a,o),a}constructor(e,r,n,s,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}};g.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",g.ERR_BAD_OPTION="ERR_BAD_OPTION",g.ECONNABORTED="ECONNABORTED",g.ETIMEDOUT="ETIMEDOUT",g.ERR_NETWORK="ERR_NETWORK",g.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",g.ERR_DEPRECATED="ERR_DEPRECATED",g.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",g.ERR_BAD_REQUEST="ERR_BAD_REQUEST",g.ERR_CANCELED="ERR_CANCELED",g.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",g.ERR_INVALID_URL="ERR_INVALID_URL";const vr=null;function Ue(t){return c.isPlainObject(t)||c.isArray(t)}function ct(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function xe(t,e,r){return t?t.concat(e).map(function(s,i){return s=ct(s),!r&&i?"["+s+"]":s}).join(r?".":""):e}function Ir(t){return c.isArray(t)&&!t.some(Ue)}const Br=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function pe(t,e,r){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=c.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!c.isUndefined(p[y])});const n=r.metaTokens,s=r.visitor||u,i=r.dots,o=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(c.isDate(d))return d.toISOString();if(c.isBoolean(d))return d.toString();if(!f&&c.isBlob(d))throw new g("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(d)||c.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function u(d,y,p){let C=d;if(c.isReactNative(e)&&c.isReactNativeBlob(d))return e.append(xe(p,y,i),l(d)),!1;if(d&&!p&&typeof d=="object"){if(c.endsWith(y,"{}"))y=n?y:y.slice(0,-2),d=JSON.stringify(d);else if(c.isArray(d)&&Ir(d)||(c.isFileList(d)||c.endsWith(y,"[]"))&&(C=c.toArray(d)))return y=ct(y),C.forEach(function(S,N){!(c.isUndefined(S)||S===null)&&e.append(o===!0?xe([y],N,i):o===null?y:y+"[]",l(S))}),!1}return Ue(d)?!0:(e.append(xe(p,y,i),l(d)),!1)}const h=[],m=Object.assign(Br,{defaultVisitor:u,convertValue:l,isVisitable:Ue});function E(d,y){if(!c.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(d),c.forEach(d,function(C,D){(!(c.isUndefined(C)||C===null)&&s.call(e,C,c.isString(D)?D.trim():D,y,m))===!0&&E(C,y?y.concat(D):[D])}),h.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return E(t),e}function ut(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function De(t,e){this._pairs=[],t&&pe(t,this,e)}const lt=De.prototype;lt.append=function(e,r){this._pairs.push([e,r])},lt.toString=function(e){const r=e?function(n){return e.call(this,n,ut)}:ut;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function qr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dt(t,e,r){if(!e)return t;const n=r&&r.encode||qr,s=c.isFunction(r)?{serialize:r}:r,i=s&&s.serialize;let o;if(i?o=i(e,s):o=c.isURLSearchParams(e)?e.toString():new De(e,s).toString(n),o){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class ft{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},$r={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:De,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Fe=typeof window<"u"&&typeof document<"u",ke=typeof navigator=="object"&&navigator||void 0,jr=Fe&&(!ke||["ReactNative","NativeScript","NS"].indexOf(ke.product)<0),Mr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hr=Fe&&window.location.href||"http://localhost",A={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fe,hasStandardBrowserEnv:jr,hasStandardBrowserWebWorkerEnv:Mr,navigator:ke,origin:Hr},Symbol.toStringTag,{value:"Module"})),...$r};function Vr(t,e){return pe(t,new A.classes.URLSearchParams,{visitor:function(r,n,s,i){return A.isNode&&c.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function Kr(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function zr(t){const e={},r=Object.keys(t);let n;const s=r.length;let i;for(n=0;n<s;n++)i=r[n],e[i]=t[i];return e}function ht(t){function e(r,n,s,i){let o=r[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),f=i>=r.length;return o=!o&&c.isArray(s)?s.length:o,f?(c.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!a):((!s[o]||!c.isObject(s[o]))&&(s[o]=[]),e(r,n,s[o],i)&&c.isArray(s[o])&&(s[o]=zr(s[o])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const r={};return c.forEachEntry(t,(n,s)=>{e(Kr(n),s,r,0)}),r}return null}function Jr(t,e,r){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const ie={transitional:Le,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=c.isObject(e);if(i&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return s?JSON.stringify(ht(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Vr(e,this.formSerializer).toString();if((a=c.isFileList(e))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return pe(a?{"files[]":e}:e,f&&new f,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),Jr(e)):e}],transformResponse:[function(e){const r=this.transitional||ie.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(n&&!this.responseType||s)){const o=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?g.from(a,g.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{ie.headers[t]={}});const Wr=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qr=t=>{const e={};let r,n,s;return t&&t.split(`
2
2
  `).forEach(function(o){s=o.indexOf(":"),r=o.substring(0,s).trim().toLowerCase(),n=o.substring(s+1).trim(),!(!r||e[r]&&Wr[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},pt=Symbol("internals");function oe(t){return t&&String(t).trim().toLowerCase()}function ye(t){return t===!1||t==null?t:c.isArray(t)?t.map(ye):String(t)}function Xr(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Yr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ve(t,e,r,n,s){if(c.isFunction(n))return n.call(this,e,r);if(s&&(e=r),!!c.isString(e)){if(c.isString(n))return e.indexOf(n)!==-1;if(c.isRegExp(n))return n.test(e)}}function Gr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Zr(t,e){const r=c.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(s,i,o){return this[n].call(this,e,s,i,o)},configurable:!0})})}let O=class{constructor(e){e&&this.set(e)}set(e,r,n){const s=this;function i(a,f,l){const u=oe(f);if(!u)throw new Error("header name must be a non-empty string");const h=c.findKey(s,u);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||f]=ye(a))}const o=(a,f)=>c.forEach(a,(l,u)=>i(l,u,f));if(c.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(c.isString(e)&&(e=e.trim())&&!Yr(e))o(Qr(e),r);else if(c.isObject(e)&&c.isIterable(e)){let a={},f,l;for(const u of e){if(!c.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[l=u[0]]=(f=a[l])?c.isArray(f)?[...f,u[1]]:[f,u[1]]:u[1]}o(a,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=oe(e),e){const n=c.findKey(this,e);if(n){const s=this[n];if(!r)return s;if(r===!0)return Xr(s);if(c.isFunction(r))return r.call(this,s,n);if(c.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=oe(e),e){const n=c.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||ve(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let s=!1;function i(o){if(o=oe(o),o){const a=c.findKey(n,o);a&&(!r||ve(n,n[a],a,r))&&(delete n[a],s=!0)}}return c.isArray(e)?e.forEach(i):i(e),s}clear(e){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const i=r[n];(!e||ve(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const r=this,n={};return c.forEach(this,(s,i)=>{const o=c.findKey(n,i);if(o){r[o]=ye(s),delete r[i];return}const a=e?Gr(i):String(i).trim();a!==i&&delete r[i],r[a]=ye(s),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return c.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=e&&c.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
3
3
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[pt]=this[pt]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=oe(o);n[a]||(Zr(s,o),n[a]=!0)}return c.isArray(e)?e.forEach(i):i(e),this}};O.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(O.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}}),c.freezeMethods(O);function Ie(t,e){const r=this||ie,n=e||r,s=O.from(n.headers);let i=n.data;return c.forEach(t,function(a){i=a.call(r,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function yt(t){return!!(t&&t.__CANCEL__)}let ae=class extends g{constructor(e,r,n){super(e??"canceled",g.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function gt(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function en(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function tn(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(f){const l=Date.now(),u=n[i];o||(o=l),r[s]=f,n[s]=l;let h=i,m=0;for(;h!==s;)m+=r[h++],h=h%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),l-o<e)return;const E=u&&l-u;return E?Math.round(m*1e3/E):void 0}}function rn(t,e){let r=0,n=1e3/e,s,i;const o=(l,u=Date.now())=>{r=u,s=null,i&&(clearTimeout(i),i=null),t(...l)};return[(...l)=>{const u=Date.now(),h=u-r;h>=n?o(l,u):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},n-h)))},()=>s&&o(s)]}const ge=(t,e,r=3)=>{let n=0;const s=tn(50,250);return rn(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,f=o-n,l=s(f),u=o<=a;n=o;const h={loaded:o,total:a,progress:a?o/a:void 0,bytes:f,rate:l||void 0,estimated:l&&a&&u?(a-o)/l:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(h)},r)},mt=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},_t=t=>(...e)=>c.asap(()=>t(...e)),nn=A.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,A.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0,sn=A.hasStandardBrowserEnv?{write(t,e,r,n,s,i,o){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),c.isString(n)&&a.push(`path=${n}`),c.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),c.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function on(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function an(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function wt(t,e,r){let n=!on(e);return t&&(n||r==!1)?an(t,e):e}const bt=t=>t instanceof O?{...t}:t;function H(t,e){e=e||{};const r={};function n(l,u,h,m){return c.isPlainObject(l)&&c.isPlainObject(u)?c.merge.call({caseless:m},l,u):c.isPlainObject(u)?c.merge({},u):c.isArray(u)?u.slice():u}function s(l,u,h,m){if(c.isUndefined(u)){if(!c.isUndefined(l))return n(void 0,l,h,m)}else return n(l,u,h,m)}function i(l,u){if(!c.isUndefined(u))return n(void 0,u)}function o(l,u){if(c.isUndefined(u)){if(!c.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function a(l,u,h){if(h in e)return n(l,u);if(h in t)return n(void 0,l)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,u,h)=>s(bt(l),bt(u),h,!0)};return c.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=c.hasOwnProp(f,u)?f[u]:s,m=h(t[u],e[u],u);c.isUndefined(m)&&h!==a||(r[u]=m)}),r}const Ct=t=>{const e=H({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=e;if(e.headers=o=O.from(o),e.url=dt(wt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(r)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(c.isFunction(r.getHeaders)){const f=r.getHeaders(),l=["content-type","content-length"];Object.entries(f).forEach(([u,h])=>{l.includes(u.toLowerCase())&&o.set(u,h)})}}if(A.hasStandardBrowserEnv&&(n&&c.isFunction(n)&&(n=n(e)),n||n!==!1&&nn(e.url))){const f=s&&i&&sn.read(i);f&&o.set(s,f)}return e},cn=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,n){const s=Ct(t);let i=s.data;const o=O.from(s.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:l}=s,u,h,m,E,d;function y(){E&&E(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function C(){if(!p)return;const S=O.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),v={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:t,request:p};gt(function(L){r(L),y()},function(L){n(L),y()},v),p=null}"onloadend"in p?p.onloadend=C:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(C)},p.onabort=function(){p&&(n(new g("Request aborted",g.ECONNABORTED,t,p)),p=null)},p.onerror=function(N){const v=N&&N.message?N.message:"Network Error",J=new g(v,g.ERR_NETWORK,t,p);J.event=N||null,n(J),p=null},p.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const v=s.transitional||Le;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),n(new g(N,v.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,t,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&c.forEach(o.toJSON(),function(N,v){p.setRequestHeader(v,N)}),c.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),a&&a!=="json"&&(p.responseType=s.responseType),l&&([m,d]=ge(l,!0),p.addEventListener("progress",m)),f&&p.upload&&([h,E]=ge(f),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(u=S=>{p&&(n(!S||S.type?new ae(null,t,p):S),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const D=en(s.url);if(D&&A.protocols.indexOf(D)===-1){n(new g("Unsupported protocol "+D+":",g.ERR_BAD_REQUEST,t));return}p.send(i||null)})},un=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,s;const i=function(l){if(!s){s=!0,a();const u=l instanceof Error?l:this.reason;n.abort(u instanceof g?u:new ae(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,i(new g(`timeout of ${e}ms exceeded`,g.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),t=null)};t.forEach(l=>l.addEventListener("abort",i));const{signal:f}=n;return f.unsubscribe=()=>c.asap(a),f}},ln=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,s;for(;n<r;)s=n+e,yield t.slice(n,s),n=s},dn=async function*(t,e){for await(const r of fn(t))yield*ln(r,e)},fn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Et=(t,e,r,n)=>{const s=dn(t,e);let i=0,o,a=f=>{o||(o=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await s.next();if(l){a(),f.close();return}let h=u.byteLength;if(r){let m=i+=h;r(m)}f.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(f){return a(f),s.return()}},{highWaterMark:2})},Rt=64*1024,{isFunction:me}=c,hn=(({Request:t,Response:e})=>({Request:t,Response:e}))(c.global),{ReadableStream:St,TextEncoder:Tt}=c.global,At=(t,...e)=>{try{return!!t(...e)}catch{return!1}},pn=t=>{t=c.merge.call({skipUndefined:!0},hn,t);const{fetch:e,Request:r,Response:n}=t,s=e?me(e):typeof fetch=="function",i=me(r),o=me(n);if(!s)return!1;const a=s&&me(St),f=s&&(typeof Tt=="function"?(d=>y=>d.encode(y))(new Tt):async d=>new Uint8Array(await new r(d).arrayBuffer())),l=i&&a&&At(()=>{let d=!1;const y=new r(A.origin,{body:new St,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!y}),u=o&&a&&At(()=>c.isReadableStream(new n("").body)),h={stream:u&&(d=>d.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!h[d]&&(h[d]=(y,p)=>{let C=y&&y[d];if(C)return C.call(y);throw new g(`Response type '${d}' is not supported`,g.ERR_NOT_SUPPORT,p)})});const m=async d=>{if(d==null)return 0;if(c.isBlob(d))return d.size;if(c.isSpecCompliantForm(d))return(await new r(A.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(c.isArrayBufferView(d)||c.isArrayBuffer(d))return d.byteLength;if(c.isURLSearchParams(d)&&(d=d+""),c.isString(d))return(await f(d)).byteLength},E=async(d,y)=>{const p=c.toFiniteNumber(d.getContentLength());return p??m(y)};return async d=>{let{url:y,method:p,data:C,signal:D,cancelToken:S,timeout:N,onDownloadProgress:v,onUploadProgress:J,responseType:L,headers:Qe,withCredentials:Te="same-origin",fetchOptions:jt}=Ct(d),Mt=e||fetch;L=L?(L+"").toLowerCase():"text";let Ae=un([D,S&&S.toAbortSignal()],N),ue=null;const W=Ae&&Ae.unsubscribe&&(()=>{Ae.unsubscribe()});let Ht;try{if(J&&l&&p!=="get"&&p!=="head"&&(Ht=await E(Qe,C))!==0){let j=new r(y,{method:"POST",body:C,duplex:"half"}),te;if(c.isFormData(C)&&(te=j.headers.get("content-type"))&&Qe.setContentType(te),j.body){const[Xe,Pe]=mt(Ht,ge(_t(J)));C=Et(j.body,Rt,Xe,Pe)}}c.isString(Te)||(Te=Te?"include":"omit");const U=i&&"credentials"in r.prototype,Vt={...jt,signal:Ae,method:p.toUpperCase(),headers:Qe.normalize().toJSON(),body:C,duplex:"half",credentials:U?Te:void 0};ue=i&&new r(y,Vt);let $=await(i?Mt(ue,jt):Mt(y,Vt));const Kt=u&&(L==="stream"||L==="response");if(u&&(v||Kt&&W)){const j={};["status","statusText","headers"].forEach(zt=>{j[zt]=$[zt]});const te=c.toFiniteNumber($.headers.get("content-length")),[Xe,Pe]=v&&mt(te,ge(_t(v),!0))||[];$=new n(Et($.body,Rt,Xe,()=>{Pe&&Pe(),W&&W()}),j)}L=L||"text";let js=await h[c.findKey(h,L)||"text"]($,d);return!Kt&&W&&W(),await new Promise((j,te)=>{gt(j,te,{data:js,headers:O.from($.headers),status:$.status,statusText:$.statusText,config:d,request:ue})})}catch(U){throw W&&W(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,d,ue,U&&U.response),{cause:U.cause||U}):g.from(U,U&&U.code,d,ue,U&&U.response)}}},yn=new Map,Pt=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:s}=e,i=[n,s,r];let o=i.length,a=o,f,l,u=yn;for(;a--;)f=i[a],l=u.get(f),l===void 0&&u.set(f,l=a?new Map:pn(e)),u=l;return l};Pt();const Be={http:vr,xhr:cn,fetch:{get:Pt}};c.forEach(Be,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ot=t=>`- ${t}`,gn=t=>c.isFunction(t)||t===null||t===!1;function mn(t,e){t=c.isArray(t)?t:[t];const{length:r}=t;let n,s;const i={};for(let o=0;o<r;o++){n=t[o];let a;if(s=n,!gn(n)&&(s=Be[(a=String(n)).toLowerCase()],s===void 0))throw new g(`Unknown adapter '${a}'`);if(s&&(c.isFunction(s)||(s=s.get(e))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([f,l])=>`adapter ${f} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=r?o.length>1?`since :
4
4
  `+o.map(Ot).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuul/sdk",
3
- "version": "7.28.0",
3
+ "version": "7.29.0",
4
4
  "description": "Fuul SDK",
5
5
  "keywords": [
6
6
  "Fuul",