rehive 4.1.0 → 4.1.2

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.
@@ -4,4 +4,4 @@
4
4
 
5
5
  `);g=_nullishCoalesce(_.pop(), () => (""));for(let ee of _){let re=ee.split(`
6
6
  `),L=[],W;for(let m of re)if(m.startsWith("data:"))L.push(m.replace(/^data:\s*/,""));else if(m.startsWith("event:"))W=m.replace(/^event:\s*/,"");else if(m.startsWith("id:"))O=m.replace(/^id:\s*/,"");else if(m.startsWith("retry:")){let I=Number.parseInt(m.replace(/^retry:\s*/,""),10);Number.isNaN(I)||(l=I)}let D,G=!1;if(L.length){let m=L.join(`
7
- `);try{D=JSON.parse(m),G=!0}catch (e3){D=m}}G&&(o&&await o(D),a&&(D=await a(D))),_optionalChain([s, 'optionalCall', _2 => _2({data:D,event:W,id:O,retry:l})]),L.length&&(yield D)}}}finally{f.removeEventListener("abort",V),T.releaseLock()}break}catch(E){if(_optionalChain([t, 'optionalCall', _3 => _3(E)]),c!==void 0&&w>=c)break;let A=Math.min(l*2**(w-1),_nullishCoalesce(i, () => (3e4)));await x(A)}}}()}};var se=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ne=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},oe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},z=({allowReserved:e,explode:t,name:s,style:a,value:o})=>{if(!t){let i=(e?o:o.map(u=>encodeURIComponent(u))).join(ne(a));switch(a){case"label":return`.${i}`;case"matrix":return`;${s}=${i}`;case"simple":return i;default:return`${s}=${i}`}}let p=se(a),c=o.map(i=>a==="label"||a==="simple"?e?i:encodeURIComponent(i):C({allowReserved:e,name:s,value:i})).join(p);return a==="label"||a==="matrix"?p+c:c},C=({allowReserved:e,name:t,value:s})=>{if(s==null)return"";if(typeof s=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?s:encodeURIComponent(s)}`},P=({allowReserved:e,explode:t,name:s,style:a,value:o,valueOnly:p})=>{if(o instanceof Date)return p?o.toISOString():`${s}=${o.toISOString()}`;if(a!=="deepObject"&&!t){let u=[];Object.entries(o).forEach(([n,O])=>{u=[...u,n,e?O:encodeURIComponent(O)]});let h=u.join(",");switch(a){case"form":return`${s}=${h}`;case"label":return`.${h}`;case"matrix":return`;${s}=${h}`;default:return h}}let c=oe(a),i=Object.entries(o).map(([u,h])=>C({allowReserved:e,name:a==="deepObject"?`${s}[${u}]`:u,value:h})).join(c);return a==="label"||a==="matrix"?c+i:i};var ae=/\{[^{}]+\}/g,ie=({path:e,url:t})=>{let s=t,a=t.match(ae);if(a)for(let o of a){let p=!1,c=o.substring(1,o.length-1),i="simple";c.endsWith("*")&&(p=!0,c=c.substring(0,c.length-1)),c.startsWith(".")?(c=c.substring(1),i="label"):c.startsWith(";")&&(c=c.substring(1),i="matrix");let u=e[c];if(u==null)continue;if(Array.isArray(u)){s=s.replace(o,z({explode:p,name:c,style:i,value:u}));continue}if(typeof u=="object"){s=s.replace(o,P({explode:p,name:c,style:i,value:u,valueOnly:!0}));continue}if(i==="matrix"){s=s.replace(o,`;${C({name:c,value:u})}`);continue}let h=encodeURIComponent(i==="label"?`.${u}`:u);s=s.replace(o,h)}return s},$=({baseUrl:e,path:t,query:s,querySerializer:a,url:o})=>{let p=o.startsWith("/")?o:`/${o}`,c=(_nullishCoalesce(e, () => ("")))+p;t&&(c=ie({path:t,url:c}));let i=s?a(s):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(c+=`?${i}`),c};function K(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var J=async(e,t)=>{let s=typeof t=="function"?await t(e):t;if(s)return e.scheme==="bearer"?`Bearer ${s}`:e.scheme==="basic"?`Basic ${btoa(s)}`:s};var j={bodySerializer:e=>JSON.stringify(e,(t,s)=>typeof s=="bigint"?s.toString():s)};var N=({parameters:e={},...t}={})=>a=>{let o=[];if(a&&typeof a=="object")for(let p in a){let c=a[p];if(c==null)continue;let i=e[p]||t;if(Array.isArray(c)){let u=z({allowReserved:i.allowReserved,explode:!0,name:p,style:"form",value:c,...i.array});u&&o.push(u)}else if(typeof c=="object"){let u=P({allowReserved:i.allowReserved,explode:!0,name:p,style:"deepObject",value:c,...i.object});u&&o.push(u)}else{let u=C({allowReserved:i.allowReserved,name:p,value:c});u&&o.push(u)}}return o.join("&")},H=e=>{if(!e)return"stream";let t=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(s=>t.startsWith(s)))return"blob";if(t.startsWith("text/"))return"text"}},ce=(e,t)=>t?!!(e.headers.has(t)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[t]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${t}=`)])):!1,Q=async({security:e,...t})=>{for(let s of e){if(ce(t,s.name))continue;let a=await J(s,t.auth);if(!a)continue;let o=_nullishCoalesce(s.name, () => ("Authorization"));switch(s.in){case"query":t.query||(t.query={}),t.query[o]=a;break;case"cookie":t.headers.append("Cookie",`${o}=${a}`);break;case"header":default:t.headers.set(o,a);break}}},q=e=>$({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:N(e.querySerializer),url:e.url}),M=(e,t)=>{let s={...e,...t};return _optionalChain([s, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(s.baseUrl=s.baseUrl.substring(0,s.baseUrl.length-1)),s.headers=S(e.headers,t.headers),s},ue=e=>{let t=[];return e.forEach((s,a)=>{t.push([a,s])}),t},S=(...e)=>{let t=new Headers;for(let s of e){if(!s)continue;let a=s instanceof Headers?ue(s):Object.entries(s);for(let[o,p]of a)if(p===null)t.delete(o);else if(Array.isArray(p))for(let c of p)t.append(o,c);else p!==void 0&&t.set(o,typeof p=="object"?JSON.stringify(p):p)}return t},U=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(t){let s=this.getInterceptorIndex(t);this.fns[s]&&(this.fns[s]=null)}exists(t){let s=this.getInterceptorIndex(t);return!!this.fns[s]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,s){let a=this.getInterceptorIndex(t);return this.fns[a]?(this.fns[a]=s,t):!1}use(t){return this.fns.push(t),this.fns.length-1}},X=()=>({error:new U,request:new U,response:new U}),pe=N({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),le={"Content-Type":"application/json"},k=(e={})=>({...j,headers:le,parseAs:"auto",querySerializer:pe,...e});var B=(e={})=>{let t=M(k(),e),s=()=>({...t}),a=h=>(t=M(t,h),s()),o=X(),p=async h=>{let n={...t,...h,fetch:_nullishCoalesce(_nullishCoalesce(h.fetch, () => (t.fetch)), () => (globalThis.fetch)),headers:S(t.headers,h.headers),serializedBody:void 0};n.security&&await Q({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let O=q(n);return{opts:n,url:O}},c=async h=>{let{opts:n,url:O}=await p(h),x={redirect:"follow",...n,body:K(n)},R=new Request(O,x);for(let d of o.request.fns)d&&(R=await d(R,n));let v=n.fetch,l;try{l=await v(R)}catch(d){let y=d;for(let T of o.error.fns)T&&(y=await T(d,void 0,R,n));if(y=y||{},n.throwOnError)throw y;return n.responseStyle==="data"?void 0:{error:y,request:R,response:void 0}}for(let d of o.response.fns)d&&(l=await d(l,R,n));let w={request:R,response:l};if(l.ok){let d=_nullishCoalesce((n.parseAs==="auto"?H(l.headers.get("Content-Type")):n.parseAs), () => ("json"));if(l.status===204||l.headers.get("Content-Length")==="0"){let T;switch(d){case"arrayBuffer":case"blob":case"text":T=await l[d]();break;case"formData":T=new FormData;break;case"stream":T=l.body;break;case"json":default:T={};break}return n.responseStyle==="data"?T:{data:T,...w}}let y;switch(d){case"arrayBuffer":case"blob":case"formData":case"text":y=await l[d]();break;case"json":{let T=await l.text();y=T?JSON.parse(T):{};break}case"stream":return n.responseStyle==="data"?l.body:{data:l.body,...w}}return d==="json"&&(n.responseValidator&&await n.responseValidator(y),n.responseTransformer&&(y=await n.responseTransformer(y))),n.responseStyle==="data"?y:{data:y,...w}}let f=await l.text(),b;try{b=JSON.parse(f)}catch (e4){}let E=_nullishCoalesce(b, () => (f)),A=E;for(let d of o.error.fns)d&&(A=await d(E,l,R,n));if(A=A||{},n.throwOnError)throw A;return n.responseStyle==="data"?void 0:{error:A,...w}},i=h=>n=>c({...n,method:h}),u=h=>async n=>{let{opts:O,url:x}=await p(n);return F({...O,body:O.body,headers:O.headers,method:h,onRequest:async(R,v)=>{let l=new Request(R,v);for(let w of o.request.fns)w&&(l=await w(l,O));return l},serializedBody:K(O),url:x})};return{buildUrl:q,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:s,head:i("HEAD"),interceptors:o,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:c,setConfig:a,sse:{connect:u("CONNECT"),delete:u("DELETE"),get:u("GET"),head:u("HEAD"),options:u("OPTIONS"),patch:u("PATCH"),post:u("POST"),put:u("PUT"),trace:u("TRACE")},trace:i("TRACE")}};var he={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},fn=Object.entries(he);var nn={};_chunkOEIQFP6Tjs.a.call(void 0, nn,{accountCurrenciesList:()=>ye,accountDefinitionsList:()=>de,accountDefinitionsRetrieve:()=>Oe,accountsCreate:()=>we,accountsCurrenciesCreate:()=>Ae,accountsCurrenciesFeesList:()=>Ce,accountsCurrenciesFeesRetrieve:()=>xe,accountsCurrenciesLimitsList:()=>be,accountsCurrenciesLimitsRetrieve:()=>ge,accountsCurrenciesList:()=>me,accountsCurrenciesPartialUpdate:()=>Ee,accountsCurrenciesRetrieve:()=>fe,accountsCurrenciesUpdate:()=>De,accountsList:()=>Te,accountsRetrieve:()=>Re,authDeactivate:()=>ve,authDeactivateVerify:()=>Le,authEmailVerify:()=>ze,authEmailVerifyResend:()=>Pe,authJwtCreate:()=>Se,authLogin:()=>Ke,authLogout:()=>je,authMfaAuthenticatorsCreate:()=>Me,authMfaAuthenticatorsDestroy:()=>Be,authMfaAuthenticatorsList:()=>qe,authMfaAuthenticatorsRetrieve:()=>Ve,authMfaDeliver:()=>_e,authMfaVerify:()=>We,authMobileVerify:()=>Ge,authMobileVerifyResend:()=>Ie,authOauthAuthorizeCreate:()=>Fe,authOauthLoginCreate:()=>$e,authOauthRegisterCreate:()=>Je,authOauthSessionCreate:()=>Ne,authOauthVerifyCreate:()=>He,authPasswordChange:()=>Qe,authPasswordReset:()=>Xe,authPasswordResetConfirm:()=>Ye,authRefreshCreate:()=>Ze,authRegister:()=>er,authRegisterCompany:()=>ke,authRequestDelete:()=>rr,authRequestDeleteVerify:()=>tr,authRetrieve:()=>Ue,authTokensCreate:()=>or,authTokensDestroy:()=>ar,authTokensList:()=>nr,authTokensListDestroy:()=>sr,authTokensRetrieve:()=>ir,companyBankAccountsList:()=>ur,companyCurrenciesList:()=>pr,companyCurrenciesRetrieve:()=>lr,companyRetrieve:()=>cr,companyWalletAccountsList:()=>hr,documentTypesList:()=>yr,documentTypesRetrieve:()=>dr,exportsCreate:()=>Tr,exportsList:()=>Or,exportsRetrieve:()=>wr,groupsFeesList:()=>Ar,groupsFeesRetrieve:()=>fr,groupsLimitsList:()=>Er,groupsLimitsRetrieve:()=>Dr,groupsList:()=>Rr,groupsPermissionsList:()=>Cr,groupsPermissionsRetrieve:()=>xr,groupsRetrieve:()=>mr,groupsTiersFeesList:()=>Ur,groupsTiersFeesRetrieve:()=>kr,groupsTiersLimitsList:()=>vr,groupsTiersLimitsRetrieve:()=>Lr,groupsTiersList:()=>br,groupsTiersRequirementSetsItemsList:()=>Sr,groupsTiersRequirementSetsItemsRetrieve:()=>Kr,groupsTiersRequirementSetsList:()=>zr,groupsTiersRequirementSetsRetrieve:()=>Pr,groupsTiersRetrieve:()=>gr,metricsCreate:()=>qr,metricsDestroy:()=>Mr,metricsList:()=>jr,metricsPointsList:()=>Vr,metricsRetrieve:()=>Br,permissionsList:()=>_r,permissionsRetrieve:()=>Wr,publicCompaniesGroupsList:()=>Fr,publicCompaniesGroupsRetrieve:()=>$r,publicCompaniesLegalTermsList:()=>Jr,publicCompaniesLegalTermsRetrieve:()=>Nr,publicCompaniesLegalTermsVersionsList:()=>Hr,publicCompaniesLegalTermsVersionsRetrieve:()=>Qr,publicCompaniesList:()=>Gr,publicCompaniesOauthClientsList:()=>Xr,publicCompaniesOauthClientsRetrieve:()=>Yr,publicCompaniesRetrieve:()=>Ir,publicLegalTermsList:()=>Zr,publicLegalTermsRetrieve:()=>et,publicLegalTermsVersionsList:()=>rt,publicLegalTermsVersionsRetrieve:()=>tt,statementsCreate:()=>nt,statementsDestroy:()=>ot,statementsList:()=>st,statementsRetrieve:()=>at,subtypesList:()=>it,subtypesRetrieve:()=>ct,transactionCollectionsCreate:()=>pt,transactionCollectionsList:()=>ut,transactionCollectionsRetrieve:()=>lt,transactionTotalsRetrieve:()=>ft,transactionsCreate:()=>yt,transactionsCreditCreate:()=>mt,transactionsDebitCreate:()=>At,transactionsList:()=>ht,transactionsMessagesList:()=>wt,transactionsMessagesRetrieve:()=>Rt,transactionsPartialUpdate:()=>Ot,transactionsRetrieve:()=>dt,transactionsTransferCreate:()=>Et,transactionsUpdate:()=>Tt,userAddressesCreate:()=>gt,userAddressesDestroy:()=>Ut,userAddressesList:()=>bt,userAddressesPartialUpdate:()=>vt,userAddressesRetrieve:()=>kt,userAddressesUpdate:()=>Lt,userBankAccountsAccountCurrenciesCreate:()=>Bt,userBankAccountsAccountCurrenciesDestroy:()=>Vt,userBankAccountsAccountCurrenciesList:()=>Mt,userBankAccountsAccountCurrenciesRetrieve:()=>_t,userBankAccountsCreate:()=>Pt,userBankAccountsCurrenciesCreate:()=>Gt,userBankAccountsCurrenciesDestroy:()=>It,userBankAccountsCurrenciesList:()=>Wt,userBankAccountsCurrenciesRetrieve:()=>Ft,userBankAccountsDestroy:()=>St,userBankAccountsDocumentsRetrieve:()=>$t,userBankAccountsDocumentsRetrieve2:()=>Jt,userBankAccountsList:()=>zt,userBankAccountsPartialUpdate:()=>jt,userBankAccountsRetrieve:()=>Kt,userBankAccountsUpdate:()=>qt,userCryptoAccountsAccountCurrenciesCreate:()=>rs,userCryptoAccountsAccountCurrenciesDestroy:()=>ts,userCryptoAccountsAccountCurrenciesList:()=>es,userCryptoAccountsAccountCurrenciesRetrieve:()=>ss,userCryptoAccountsCreate:()=>Ht,userCryptoAccountsCurrenciesCreate:()=>os,userCryptoAccountsCurrenciesDestroy:()=>as,userCryptoAccountsCurrenciesList:()=>ns,userCryptoAccountsCurrenciesRetrieve:()=>is,userCryptoAccountsDestroy:()=>Qt,userCryptoAccountsList:()=>Nt,userCryptoAccountsPartialUpdate:()=>Yt,userCryptoAccountsRetrieve:()=>Xt,userCryptoAccountsUpdate:()=>Zt,userDevicesAppsCreate:()=>ms,userDevicesAppsDestroy:()=>ps,userDevicesAppsList:()=>Rs,userDevicesAppsPartialUpdate:()=>hs,userDevicesAppsRetrieve:()=>ls,userDevicesAppsUpdate:()=>ys,userDevicesCreate:()=>us,userDevicesDestroy:()=>ds,userDevicesList:()=>cs,userDevicesPartialUpdate:()=>Ts,userDevicesRetrieve:()=>Os,userDevicesUpdate:()=>ws,userDocumentsCreate:()=>fs,userDocumentsDestroy:()=>Es,userDocumentsList:()=>As,userDocumentsRetrieve:()=>Ds,userEmailsCreate:()=>xs,userEmailsDestroy:()=>bs,userEmailsList:()=>Cs,userEmailsPartialUpdate:()=>Us,userEmailsRetrieve:()=>gs,userEmailsUpdate:()=>ks,userLegalTermsList:()=>vs,userLegalTermsRetrieve:()=>Ls,userLegalTermsVersionsList:()=>zs,userLegalTermsVersionsPartialUpdate:()=>Ss,userLegalTermsVersionsRetrieve:()=>Ps,userLegalTermsVersionsUpdate:()=>Ks,userMessagesList:()=>js,userMessagesRetrieve:()=>qs,userMobilesCreate:()=>Bs,userMobilesDestroy:()=>Vs,userMobilesList:()=>Ms,userMobilesPartialUpdate:()=>Ws,userMobilesRetrieve:()=>_s,userMobilesUpdate:()=>Gs,userPartialUpdate:()=>Ct,userRetrieve:()=>Dt,userUpdate:()=>xt,userWalletAccountsAccountCurrenciesCreate:()=>Xs,userWalletAccountsAccountCurrenciesDestroy:()=>Ys,userWalletAccountsAccountCurrenciesList:()=>Qs,userWalletAccountsAccountCurrenciesRetrieve:()=>Zs,userWalletAccountsCreate:()=>Fs,userWalletAccountsCurrenciesCreate:()=>rn,userWalletAccountsCurrenciesDestroy:()=>tn,userWalletAccountsCurrenciesList:()=>en,userWalletAccountsCurrenciesRetrieve:()=>sn,userWalletAccountsDestroy:()=>$s,userWalletAccountsList:()=>Is,userWalletAccountsPartialUpdate:()=>Ns,userWalletAccountsRetrieve:()=>Js,userWalletAccountsUpdate:()=>Hs});var r=B(k({baseUrl:"https://api.rehive.com"}));var ye=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/account-currencies/",...e}),de=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (r))).get({querySerializer:{parameters:{orderby:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/3/account-definitions/",...e}),Oe=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/account-definitions/{definition_name}/",...e}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/",...e}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),Re=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/",...e}),me=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/",...e}),Ee=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/fees/",...e}),xe=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/fees/{fee_id}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/limits/",...e}),ge=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/limits/{limit_id}/",...e}),Ue=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/",...e}),ke= exports.b =e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/company/register/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/deactivate/verify/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/email/verify/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/email/verify/resend/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/jwt/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _26 => _26.headers])}}),Ke= exports.c =e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/login/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je= exports.d =e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/logout/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _28 => _28.headers])}}),qe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/authenticators/",...e}),Me=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/authenticators/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/authenticators/{identifier}/",...e}),Ve=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/authenticators/{identifier}/",...e}),_e=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/deliver/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _31 => _31.headers])}}),We=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/verify/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mobile/verify/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/mobile/verify/resend/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Fe=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/oauth/authorize/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/oauth/login/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/oauth/register/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/oauth/session/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (r))).post({url:"/3/auth/oauth/verify/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _33 => _33.headers])}}),Qe=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/password/change/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/password/reset/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/password/reset/confirm/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ze= exports.e =e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/refresh/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _35 => _35.headers])}}),er= exports.f =e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/register/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/request-delete/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/request-delete/verify/",...e,headers:{"Content-Type":"application/json",...e.headers}}),sr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/tokens/",...e}),nr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _37 => _37.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/tokens/",...e}),or=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/tokens/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ar=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/tokens/{token_key}/",...e}),ir=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/tokens/{token_key}/",...e}),cr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _38 => _38.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/company/",...e}),ur=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _39 => _39.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/company/bank-accounts/",...e}),pr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _40 => _40.client]), () => (r))).get({querySerializer:{parameters:{orderby:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/3/company/currencies/",...e}),lr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/company/currencies/{code}/",...e}),hr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _41 => _41.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/company/wallet-accounts/",...e}),yr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _42 => _42.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/document-types/",...e}),dr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/document-types/{id}/",...e}),Or=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _43 => _43.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/exports/",...e}),Tr=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/exports/",...e,headers:{"Content-Type":"application/json",...e.headers}}),wr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/exports/{identifier}/",...e}),Rr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _44 => _44.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/",...e}),mr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/",...e}),Ar=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/fees/",...e}),fr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/fees/{fee_id}/",...e}),Er=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/limits/",...e}),Dr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/limits/{limit_id}/",...e}),Cr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/permissions/",...e}),xr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/permissions/{permission_id}/",...e}),br=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/",...e}),gr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/",...e}),Ur=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/fees/",...e}),kr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/fees/{fee_id}/",...e}),vr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/limits/",...e}),Lr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/limits/{limit_id}/",...e}),zr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/requirement-sets/",...e}),Pr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/requirement-sets/{req_set_id}/",...e}),Sr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/requirement-sets/{req_set_id}/items/",...e}),Kr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/requirement-sets/{req_set_id}/items/{req_item_id}/",...e}),jr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _45 => _45.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/metrics/",...e}),qr=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/metrics/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Mr=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/metrics/{identifier}/",...e}),Br=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/metrics/{identifier}/",...e}),Vr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/metrics/{identifier}/points/",...e}),_r=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _46 => _46.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/permissions/",...e}),Wr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/permissions/{permission_id}/",...e}),Gr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _47 => _47.client]), () => (r))).get({url:"/3/public/companies/",...e}),Ir=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/",...e}),Fr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/groups/",...e}),$r=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/groups/{group_name}/",...e}),Jr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/legal-terms/",...e}),Nr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/legal-terms/{term_id}/",...e}),Hr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/legal-terms/{term_id}/versions/",...e}),Qr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/legal-terms/{term_id}/versions/{version_id}/",...e}),Xr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/oauth-clients/",...e}),Yr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/oauth-clients/{identifier}/",...e}),Zr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _48 => _48.client]), () => (r))).get({url:"/3/public/legal-terms/",...e}),et=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/legal-terms/{term_id}/",...e}),rt=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/legal-terms/{term_id}/versions/",...e}),tt=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/legal-terms/{term_id}/versions/{version_id}/",...e}),st=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _49 => _49.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/statements/",...e}),nt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/statements/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ot=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/statements/{identifier}/",...e}),at=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/statements/{identifier}/",...e}),it=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _50 => _50.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/subtypes/",...e}),ct=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/subtypes/{id}/",...e}),ut=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _51 => _51.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transaction-collections/",...e}),pt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transaction-collections/",...e,headers:{"Content-Type":"application/json",...e.headers}}),lt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transaction-collections/{identifier}/",...e}),ht=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _52 => _52.client]), () => (r))).get({querySerializer:{parameters:{status__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/",...e}),yt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/",...e,headers:{"Content-Type":"application/json",...e.headers}}),dt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/{tx_code}/",...e}),Ot=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/{tx_code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Tt=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/{tx_code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),wt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/{tx_code}/messages/",...e}),Rt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/{tx_code}/messages/{id}/",...e}),mt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/credit/",...e,headers:{"Content-Type":"application/json",...e.headers}}),At=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/debit/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ft=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _53 => _53.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/totals/",...e}),Et=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/transfer/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Dt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _54 => _54.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/",...e}),Ct=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _55 => _55.client]), () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/",...e,headers:{"Content-Type":"multipart/form-data",..._optionalChain([e, 'optionalAccess', _56 => _56.headers])}}),xt=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/",...e,headers:{"Content-Type":"multipart/form-data",...e.headers}}),bt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _57 => _57.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/",...e}),gt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _58 => _58.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _59 => _59.headers])}}),Ut=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/{id}/",...e}),kt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/{id}/",...e}),vt=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Lt=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _60 => _60.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/",...e}),Pt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _61 => _61.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _62 => _62.headers])}}),St=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/",...e}),Kt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/",...e}),jt=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qt=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Mt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/account-currencies/",...e}),Bt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/account-currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Vt=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/account-currencies/{account_currency_id}/",...e}),_t=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/account-currencies/{account_currency_id}/",...e}),Wt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/currencies/",...e}),Gt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),It=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/currencies/{code}/",...e}),Ft=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/currencies/{code}/",...e}),$t=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/documents/",...e}),Jt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/documents/{document_type}/",...e}),Nt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _63 => _63.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/",...e}),Ht=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qt=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/",...e}),Xt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/",...e}),Yt=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Zt=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),es=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/account-currencies/",...e}),rs=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/account-currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ts=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/account-currencies/{account_currency_id}/",...e}),ss=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/account-currencies/{account_currency_id}/",...e}),ns=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/currencies/",...e}),os=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),as=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/currencies/{code}/",...e}),is=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/currencies/{code}/",...e}),cs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _64 => _64.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/",...e}),us=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ps=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{device_id}/apps/{app_id}/",...e}),ls=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{device_id}/apps/{app_id}/",...e}),hs=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{device_id}/apps/{app_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ys=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{device_id}/apps/{app_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ds=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/",...e}),Os=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/",...e}),Ts=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ws=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Rs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/apps/",...e}),ms=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/apps/",...e,headers:{"Content-Type":"application/json",...e.headers}}),As=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _65 => _65.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/documents/",...e}),fs=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/documents/",...e,headers:{"Content-Type":"multipart/form-data",...e.headers}}),Es=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/documents/{id}/",...e}),Ds=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/documents/{id}/",...e}),Cs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _66 => _66.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/",...e}),xs=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/",...e,headers:{"Content-Type":"application/json",...e.headers}}),bs=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/{id}/",...e}),gs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/{id}/",...e}),Us=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ks=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),vs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _67 => _67.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/",...e}),Ls=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/{id}/",...e}),zs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/{id}/versions/",...e}),Ps=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/{term_id}/versions/{version_id}/",...e}),Ss=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/{term_id}/versions/{version_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ks=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/{term_id}/versions/{version_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),js=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _68 => _68.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/messages/",...e}),qs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/messages/{id}/",...e}),Ms=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _69 => _69.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/",...e}),Bs=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Vs=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/{id}/",...e}),_s=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/{id}/",...e}),Ws=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Gs=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Is=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _70 => _70.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/",...e}),Fs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _71 => _71.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _72 => _72.headers])}}),$s=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/",...e}),Js=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/",...e}),Ns=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Hs=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/account-currencies/",...e}),Xs=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/account-currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ys=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/account-currencies/{account_currency_id}/",...e}),Zs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/account-currencies/{account_currency_id}/",...e}),en=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/currencies/",...e}),rn=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tn=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/currencies/{code}/",...e}),sn=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/currencies/{code}/",...e});exports.a = B; exports.b = ke; exports.c = Ke; exports.d = je; exports.e = Ze; exports.f = er; exports.g = nn;
7
+ `);try{D=JSON.parse(m),G=!0}catch (e3){D=m}}G&&(o&&await o(D),a&&(D=await a(D))),_optionalChain([s, 'optionalCall', _2 => _2({data:D,event:W,id:O,retry:l})]),L.length&&(yield D)}}}finally{f.removeEventListener("abort",V),T.releaseLock()}break}catch(E){if(_optionalChain([t, 'optionalCall', _3 => _3(E)]),c!==void 0&&w>=c)break;let A=Math.min(l*2**(w-1),_nullishCoalesce(i, () => (3e4)));await x(A)}}}()}};var se=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ne=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},oe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},z=({allowReserved:e,explode:t,name:s,style:a,value:o})=>{if(!t){let i=(e?o:o.map(u=>encodeURIComponent(u))).join(ne(a));switch(a){case"label":return`.${i}`;case"matrix":return`;${s}=${i}`;case"simple":return i;default:return`${s}=${i}`}}let p=se(a),c=o.map(i=>a==="label"||a==="simple"?e?i:encodeURIComponent(i):C({allowReserved:e,name:s,value:i})).join(p);return a==="label"||a==="matrix"?p+c:c},C=({allowReserved:e,name:t,value:s})=>{if(s==null)return"";if(typeof s=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?s:encodeURIComponent(s)}`},P=({allowReserved:e,explode:t,name:s,style:a,value:o,valueOnly:p})=>{if(o instanceof Date)return p?o.toISOString():`${s}=${o.toISOString()}`;if(a!=="deepObject"&&!t){let u=[];Object.entries(o).forEach(([n,O])=>{u=[...u,n,e?O:encodeURIComponent(O)]});let h=u.join(",");switch(a){case"form":return`${s}=${h}`;case"label":return`.${h}`;case"matrix":return`;${s}=${h}`;default:return h}}let c=oe(a),i=Object.entries(o).map(([u,h])=>C({allowReserved:e,name:a==="deepObject"?`${s}[${u}]`:u,value:h})).join(c);return a==="label"||a==="matrix"?c+i:i};var ae=/\{[^{}]+\}/g,ie=({path:e,url:t})=>{let s=t,a=t.match(ae);if(a)for(let o of a){let p=!1,c=o.substring(1,o.length-1),i="simple";c.endsWith("*")&&(p=!0,c=c.substring(0,c.length-1)),c.startsWith(".")?(c=c.substring(1),i="label"):c.startsWith(";")&&(c=c.substring(1),i="matrix");let u=e[c];if(u==null)continue;if(Array.isArray(u)){s=s.replace(o,z({explode:p,name:c,style:i,value:u}));continue}if(typeof u=="object"){s=s.replace(o,P({explode:p,name:c,style:i,value:u,valueOnly:!0}));continue}if(i==="matrix"){s=s.replace(o,`;${C({name:c,value:u})}`);continue}let h=encodeURIComponent(i==="label"?`.${u}`:u);s=s.replace(o,h)}return s},$=({baseUrl:e,path:t,query:s,querySerializer:a,url:o})=>{let p=o.startsWith("/")?o:`/${o}`,c=(_nullishCoalesce(e, () => ("")))+p;t&&(c=ie({path:t,url:c}));let i=s?a(s):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(c+=`?${i}`),c};function K(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var J=async(e,t)=>{let s=typeof t=="function"?await t(e):t;if(s)return e.scheme==="bearer"?`Bearer ${s}`:e.scheme==="basic"?`Basic ${btoa(s)}`:s};var j={bodySerializer:e=>JSON.stringify(e,(t,s)=>typeof s=="bigint"?s.toString():s)};var N=({parameters:e={},...t}={})=>a=>{let o=[];if(a&&typeof a=="object")for(let p in a){let c=a[p];if(c==null)continue;let i=e[p]||t;if(Array.isArray(c)){let u=z({allowReserved:i.allowReserved,explode:!0,name:p,style:"form",value:c,...i.array});u&&o.push(u)}else if(typeof c=="object"){let u=P({allowReserved:i.allowReserved,explode:!0,name:p,style:"deepObject",value:c,...i.object});u&&o.push(u)}else{let u=C({allowReserved:i.allowReserved,name:p,value:c});u&&o.push(u)}}return o.join("&")},H=e=>{if(!e)return"stream";let t=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(s=>t.startsWith(s)))return"blob";if(t.startsWith("text/"))return"text"}},ce=(e,t)=>t?!!(e.headers.has(t)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[t]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${t}=`)])):!1,Q=async({security:e,...t})=>{for(let s of e){if(ce(t,s.name))continue;let a=await J(s,t.auth);if(!a)continue;let o=_nullishCoalesce(s.name, () => ("Authorization"));switch(s.in){case"query":t.query||(t.query={}),t.query[o]=a;break;case"cookie":t.headers.append("Cookie",`${o}=${a}`);break;case"header":default:t.headers.set(o,a);break}}},q=e=>$({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:N(e.querySerializer),url:e.url}),M=(e,t)=>{let s={...e,...t};return _optionalChain([s, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(s.baseUrl=s.baseUrl.substring(0,s.baseUrl.length-1)),s.headers=S(e.headers,t.headers),s},ue=e=>{let t=[];return e.forEach((s,a)=>{t.push([a,s])}),t},S=(...e)=>{let t=new Headers;for(let s of e){if(!s)continue;let a=s instanceof Headers?ue(s):Object.entries(s);for(let[o,p]of a)if(p===null)t.delete(o);else if(Array.isArray(p))for(let c of p)t.append(o,c);else p!==void 0&&t.set(o,typeof p=="object"?JSON.stringify(p):p)}return t},U=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(t){let s=this.getInterceptorIndex(t);this.fns[s]&&(this.fns[s]=null)}exists(t){let s=this.getInterceptorIndex(t);return!!this.fns[s]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,s){let a=this.getInterceptorIndex(t);return this.fns[a]?(this.fns[a]=s,t):!1}use(t){return this.fns.push(t),this.fns.length-1}},X=()=>({error:new U,request:new U,response:new U}),pe=N({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),le={"Content-Type":"application/json"},k=(e={})=>({...j,headers:le,parseAs:"auto",querySerializer:pe,...e});var B=(e={})=>{let t=M(k(),e),s=()=>({...t}),a=h=>(t=M(t,h),s()),o=X(),p=async h=>{let n={...t,...h,fetch:_nullishCoalesce(_nullishCoalesce(h.fetch, () => (t.fetch)), () => (globalThis.fetch)),headers:S(t.headers,h.headers),serializedBody:void 0};n.security&&await Q({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let O=q(n);return{opts:n,url:O}},c=async h=>{let{opts:n,url:O}=await p(h),x={redirect:"follow",...n,body:K(n)},R=new Request(O,x);for(let d of o.request.fns)d&&(R=await d(R,n));let v=n.fetch,l;try{l=await v(R)}catch(d){let y=d;for(let T of o.error.fns)T&&(y=await T(d,void 0,R,n));if(y=y||{},n.throwOnError)throw y;return n.responseStyle==="data"?void 0:{error:y,request:R,response:void 0}}for(let d of o.response.fns)d&&(l=await d(l,R,n));let w={request:R,response:l};if(l.ok){let d=_nullishCoalesce((n.parseAs==="auto"?H(l.headers.get("Content-Type")):n.parseAs), () => ("json"));if(l.status===204||l.headers.get("Content-Length")==="0"){let T;switch(d){case"arrayBuffer":case"blob":case"text":T=await l[d]();break;case"formData":T=new FormData;break;case"stream":T=l.body;break;case"json":default:T={};break}return n.responseStyle==="data"?T:{data:T,...w}}let y;switch(d){case"arrayBuffer":case"blob":case"formData":case"text":y=await l[d]();break;case"json":{let T=await l.text();y=T?JSON.parse(T):{};break}case"stream":return n.responseStyle==="data"?l.body:{data:l.body,...w}}return d==="json"&&(n.responseValidator&&await n.responseValidator(y),n.responseTransformer&&(y=await n.responseTransformer(y))),n.responseStyle==="data"?y:{data:y,...w}}let f=await l.text(),b;try{b=JSON.parse(f)}catch (e4){}let E=_nullishCoalesce(b, () => (f)),A=E;for(let d of o.error.fns)d&&(A=await d(E,l,R,n));if(A=A||{},n.throwOnError)throw A;return n.responseStyle==="data"?void 0:{error:A,...w}},i=h=>n=>c({...n,method:h}),u=h=>async n=>{let{opts:O,url:x}=await p(n);return F({...O,body:O.body,headers:O.headers,method:h,onRequest:async(R,v)=>{let l=new Request(R,v);for(let w of o.request.fns)w&&(l=await w(l,O));return l},serializedBody:K(O),url:x})};return{buildUrl:q,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:s,head:i("HEAD"),interceptors:o,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:c,setConfig:a,sse:{connect:u("CONNECT"),delete:u("DELETE"),get:u("GET"),head:u("HEAD"),options:u("OPTIONS"),patch:u("PATCH"),post:u("POST"),put:u("PUT"),trace:u("TRACE")},trace:i("TRACE")}};var he={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},fn=Object.entries(he);var nn={};_chunkOEIQFP6Tjs.a.call(void 0, nn,{accountCurrenciesList:()=>ye,accountDefinitionsList:()=>de,accountDefinitionsRetrieve:()=>Oe,accountsCreate:()=>we,accountsCurrenciesCreate:()=>Ae,accountsCurrenciesFeesList:()=>Ce,accountsCurrenciesFeesRetrieve:()=>xe,accountsCurrenciesLimitsList:()=>be,accountsCurrenciesLimitsRetrieve:()=>ge,accountsCurrenciesList:()=>me,accountsCurrenciesPartialUpdate:()=>Ee,accountsCurrenciesRetrieve:()=>fe,accountsCurrenciesUpdate:()=>De,accountsList:()=>Te,accountsRetrieve:()=>Re,authDeactivate:()=>ve,authDeactivateVerify:()=>Le,authEmailVerify:()=>ze,authEmailVerifyResend:()=>Pe,authJwtCreate:()=>Se,authLogin:()=>Ke,authLogout:()=>je,authMfaAuthenticatorsCreate:()=>Me,authMfaAuthenticatorsDestroy:()=>Be,authMfaAuthenticatorsList:()=>qe,authMfaAuthenticatorsRetrieve:()=>Ve,authMfaDeliver:()=>_e,authMfaVerify:()=>We,authMobileVerify:()=>Ge,authMobileVerifyResend:()=>Ie,authOauthAuthorizeCreate:()=>Fe,authOauthLoginCreate:()=>$e,authOauthRegisterCreate:()=>Je,authOauthSessionCreate:()=>Ne,authOauthVerifyCreate:()=>He,authPasswordChange:()=>Qe,authPasswordReset:()=>Xe,authPasswordResetConfirm:()=>Ye,authRefreshCreate:()=>Ze,authRegister:()=>er,authRegisterCompany:()=>ke,authRequestDelete:()=>rr,authRequestDeleteVerify:()=>tr,authRetrieve:()=>Ue,authTokensCreate:()=>or,authTokensDestroy:()=>ar,authTokensList:()=>nr,authTokensListDestroy:()=>sr,authTokensRetrieve:()=>ir,companyBankAccountsList:()=>ur,companyCurrenciesList:()=>pr,companyCurrenciesRetrieve:()=>lr,companyRetrieve:()=>cr,companyWalletAccountsList:()=>hr,documentTypesList:()=>yr,documentTypesRetrieve:()=>dr,exportsCreate:()=>Tr,exportsList:()=>Or,exportsRetrieve:()=>wr,groupsFeesList:()=>Ar,groupsFeesRetrieve:()=>fr,groupsLimitsList:()=>Er,groupsLimitsRetrieve:()=>Dr,groupsList:()=>Rr,groupsPermissionsList:()=>Cr,groupsPermissionsRetrieve:()=>xr,groupsRetrieve:()=>mr,groupsTiersFeesList:()=>Ur,groupsTiersFeesRetrieve:()=>kr,groupsTiersLimitsList:()=>vr,groupsTiersLimitsRetrieve:()=>Lr,groupsTiersList:()=>br,groupsTiersRequirementSetsItemsList:()=>Sr,groupsTiersRequirementSetsItemsRetrieve:()=>Kr,groupsTiersRequirementSetsList:()=>zr,groupsTiersRequirementSetsRetrieve:()=>Pr,groupsTiersRetrieve:()=>gr,metricsCreate:()=>qr,metricsDestroy:()=>Mr,metricsList:()=>jr,metricsPointsList:()=>Vr,metricsRetrieve:()=>Br,permissionsList:()=>_r,permissionsRetrieve:()=>Wr,publicCompaniesGroupsList:()=>Fr,publicCompaniesGroupsRetrieve:()=>$r,publicCompaniesLegalTermsList:()=>Jr,publicCompaniesLegalTermsRetrieve:()=>Nr,publicCompaniesLegalTermsVersionsList:()=>Hr,publicCompaniesLegalTermsVersionsRetrieve:()=>Qr,publicCompaniesList:()=>Gr,publicCompaniesOauthClientsList:()=>Xr,publicCompaniesOauthClientsRetrieve:()=>Yr,publicCompaniesRetrieve:()=>Ir,publicLegalTermsList:()=>Zr,publicLegalTermsRetrieve:()=>et,publicLegalTermsVersionsList:()=>rt,publicLegalTermsVersionsRetrieve:()=>tt,statementsCreate:()=>nt,statementsDestroy:()=>ot,statementsList:()=>st,statementsRetrieve:()=>at,subtypesList:()=>it,subtypesRetrieve:()=>ct,transactionCollectionsCreate:()=>pt,transactionCollectionsList:()=>ut,transactionCollectionsRetrieve:()=>lt,transactionTotalsRetrieve:()=>ft,transactionsCreate:()=>yt,transactionsCreditCreate:()=>mt,transactionsDebitCreate:()=>At,transactionsList:()=>ht,transactionsMessagesList:()=>wt,transactionsMessagesRetrieve:()=>Rt,transactionsPartialUpdate:()=>Ot,transactionsRetrieve:()=>dt,transactionsTransferCreate:()=>Et,transactionsUpdate:()=>Tt,userAddressesCreate:()=>gt,userAddressesDestroy:()=>Ut,userAddressesList:()=>bt,userAddressesPartialUpdate:()=>vt,userAddressesRetrieve:()=>kt,userAddressesUpdate:()=>Lt,userBankAccountsAccountCurrenciesCreate:()=>Bt,userBankAccountsAccountCurrenciesDestroy:()=>Vt,userBankAccountsAccountCurrenciesList:()=>Mt,userBankAccountsAccountCurrenciesRetrieve:()=>_t,userBankAccountsCreate:()=>Pt,userBankAccountsCurrenciesCreate:()=>Gt,userBankAccountsCurrenciesDestroy:()=>It,userBankAccountsCurrenciesList:()=>Wt,userBankAccountsCurrenciesRetrieve:()=>Ft,userBankAccountsDestroy:()=>St,userBankAccountsDocumentsRetrieve:()=>$t,userBankAccountsDocumentsRetrieve2:()=>Jt,userBankAccountsList:()=>zt,userBankAccountsPartialUpdate:()=>jt,userBankAccountsRetrieve:()=>Kt,userBankAccountsUpdate:()=>qt,userCryptoAccountsAccountCurrenciesCreate:()=>rs,userCryptoAccountsAccountCurrenciesDestroy:()=>ts,userCryptoAccountsAccountCurrenciesList:()=>es,userCryptoAccountsAccountCurrenciesRetrieve:()=>ss,userCryptoAccountsCreate:()=>Ht,userCryptoAccountsCurrenciesCreate:()=>os,userCryptoAccountsCurrenciesDestroy:()=>as,userCryptoAccountsCurrenciesList:()=>ns,userCryptoAccountsCurrenciesRetrieve:()=>is,userCryptoAccountsDestroy:()=>Qt,userCryptoAccountsList:()=>Nt,userCryptoAccountsPartialUpdate:()=>Yt,userCryptoAccountsRetrieve:()=>Xt,userCryptoAccountsUpdate:()=>Zt,userDevicesAppsCreate:()=>ms,userDevicesAppsDestroy:()=>ps,userDevicesAppsList:()=>Rs,userDevicesAppsPartialUpdate:()=>hs,userDevicesAppsRetrieve:()=>ls,userDevicesAppsUpdate:()=>ys,userDevicesCreate:()=>us,userDevicesDestroy:()=>ds,userDevicesList:()=>cs,userDevicesPartialUpdate:()=>Ts,userDevicesRetrieve:()=>Os,userDevicesUpdate:()=>ws,userDocumentsCreate:()=>fs,userDocumentsDestroy:()=>Es,userDocumentsList:()=>As,userDocumentsRetrieve:()=>Ds,userEmailsCreate:()=>xs,userEmailsDestroy:()=>bs,userEmailsList:()=>Cs,userEmailsPartialUpdate:()=>Us,userEmailsRetrieve:()=>gs,userEmailsUpdate:()=>ks,userLegalTermsList:()=>vs,userLegalTermsRetrieve:()=>Ls,userLegalTermsVersionsList:()=>zs,userLegalTermsVersionsPartialUpdate:()=>Ss,userLegalTermsVersionsRetrieve:()=>Ps,userLegalTermsVersionsUpdate:()=>Ks,userMessagesList:()=>js,userMessagesRetrieve:()=>qs,userMobilesCreate:()=>Bs,userMobilesDestroy:()=>Vs,userMobilesList:()=>Ms,userMobilesPartialUpdate:()=>Ws,userMobilesRetrieve:()=>_s,userMobilesUpdate:()=>Gs,userPartialUpdate:()=>Ct,userRetrieve:()=>Dt,userUpdate:()=>xt,userWalletAccountsAccountCurrenciesCreate:()=>Xs,userWalletAccountsAccountCurrenciesDestroy:()=>Ys,userWalletAccountsAccountCurrenciesList:()=>Qs,userWalletAccountsAccountCurrenciesRetrieve:()=>Zs,userWalletAccountsCreate:()=>Fs,userWalletAccountsCurrenciesCreate:()=>rn,userWalletAccountsCurrenciesDestroy:()=>tn,userWalletAccountsCurrenciesList:()=>en,userWalletAccountsCurrenciesRetrieve:()=>sn,userWalletAccountsDestroy:()=>$s,userWalletAccountsList:()=>Is,userWalletAccountsPartialUpdate:()=>Ns,userWalletAccountsRetrieve:()=>Js,userWalletAccountsUpdate:()=>Hs});var r=B(k({baseUrl:"https://api.rehive.com"}));var ye=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/account-currencies/",...e}),de=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (r))).get({querySerializer:{parameters:{orderby:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/3/account-definitions/",...e}),Oe=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/account-definitions/{definition_name}/",...e}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/",...e}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),Re=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/",...e}),me=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/",...e}),Ee=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/fees/",...e}),xe=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/fees/{fee_id}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/limits/",...e}),ge=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/accounts/{reference}/currencies/{code}/limits/{limit_id}/",...e}),Ue=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/",...e}),ke= exports.b =e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/company/register/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/deactivate/verify/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/email/verify/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/email/verify/resend/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/jwt/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _26 => _26.headers])}}),Ke= exports.c =e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/login/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je= exports.d =e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/logout/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _28 => _28.headers])}}),qe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/authenticators/",...e}),Me=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/authenticators/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/authenticators/{identifier}/",...e}),Ve=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/authenticators/{identifier}/",...e}),_e=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/deliver/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _31 => _31.headers])}}),We=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mfa/verify/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/mobile/verify/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/mobile/verify/resend/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Fe=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/oauth/authorize/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/oauth/login/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/oauth/register/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/oauth/session/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (r))).post({url:"/3/auth/oauth/verify/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _33 => _33.headers])}}),Qe=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/password/change/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/password/reset/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/password/reset/confirm/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ze= exports.e =e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/refresh/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _35 => _35.headers])}}),er= exports.f =e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/register/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/request-delete/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/3/auth/request-delete/verify/",...e,headers:{"Content-Type":"application/json",...e.headers}}),sr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/tokens/",...e}),nr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _37 => _37.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/tokens/",...e}),or=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/tokens/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ar=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/tokens/{token_key}/",...e}),ir=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/auth/tokens/{token_key}/",...e}),cr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _38 => _38.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/company/",...e}),ur=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _39 => _39.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/company/bank-accounts/",...e}),pr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _40 => _40.client]), () => (r))).get({querySerializer:{parameters:{orderby:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/3/company/currencies/",...e}),lr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/company/currencies/{code}/",...e}),hr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _41 => _41.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/company/wallet-accounts/",...e}),yr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _42 => _42.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/document-types/",...e}),dr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/document-types/{id}/",...e}),Or=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _43 => _43.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/exports/",...e}),Tr=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/exports/",...e,headers:{"Content-Type":"application/json",...e.headers}}),wr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/exports/{identifier}/",...e}),Rr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _44 => _44.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/",...e}),mr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/",...e}),Ar=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/fees/",...e}),fr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/fees/{fee_id}/",...e}),Er=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/limits/",...e}),Dr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/limits/{limit_id}/",...e}),Cr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/permissions/",...e}),xr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/permissions/{permission_id}/",...e}),br=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/",...e}),gr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/",...e}),Ur=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/fees/",...e}),kr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/fees/{fee_id}/",...e}),vr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/limits/",...e}),Lr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/limits/{limit_id}/",...e}),zr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/requirement-sets/",...e}),Pr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/requirement-sets/{req_set_id}/",...e}),Sr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/requirement-sets/{req_set_id}/items/",...e}),Kr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/groups/{group_name}/tiers/{tier_id}/requirement-sets/{req_set_id}/items/{req_item_id}/",...e}),jr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _45 => _45.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/metrics/",...e}),qr=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/metrics/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Mr=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/metrics/{identifier}/",...e}),Br=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/metrics/{identifier}/",...e}),Vr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/metrics/{identifier}/points/",...e}),_r=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _46 => _46.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/permissions/",...e}),Wr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/permissions/{permission_id}/",...e}),Gr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _47 => _47.client]), () => (r))).get({url:"/3/public/companies/",...e}),Ir=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/",...e}),Fr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/groups/",...e}),$r=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/groups/{group_name}/",...e}),Jr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/legal-terms/",...e}),Nr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/legal-terms/{term_id}/",...e}),Hr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/legal-terms/{term_id}/versions/",...e}),Qr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/legal-terms/{term_id}/versions/{version_id}/",...e}),Xr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/oauth-clients/",...e}),Yr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/companies/{id}/oauth-clients/{identifier}/",...e}),Zr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _48 => _48.client]), () => (r))).get({url:"/3/public/legal-terms/",...e}),et=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/legal-terms/{term_id}/",...e}),rt=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/legal-terms/{term_id}/versions/",...e}),tt=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/3/public/legal-terms/{term_id}/versions/{version_id}/",...e}),st=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _49 => _49.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/statements/",...e}),nt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/statements/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ot=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/statements/{identifier}/",...e}),at=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/statements/{identifier}/",...e}),it=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _50 => _50.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/subtypes/",...e}),ct=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/subtypes/{id}/",...e}),ut=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _51 => _51.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transaction-collections/",...e}),pt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transaction-collections/",...e,headers:{"Content-Type":"application/json",...e.headers}}),lt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transaction-collections/{identifier}/",...e}),ht=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _52 => _52.client]), () => (r))).get({querySerializer:{parameters:{status__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/",...e}),yt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/",...e,headers:{"Content-Type":"application/json",...e.headers}}),dt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/{tx_code}/",...e}),Ot=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/{tx_code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Tt=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/{tx_code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),wt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/{tx_code}/messages/",...e}),Rt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/{tx_code}/messages/{id}/",...e}),mt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/credit/",...e,headers:{"Content-Type":"application/json",...e.headers}}),At=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/debit/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ft=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _53 => _53.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/totals/",...e}),Et=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/transactions/transfer/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Dt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _54 => _54.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/",...e}),Ct=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _55 => _55.client]), () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/",...e}),xt=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/",...e}),bt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _56 => _56.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/",...e}),gt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _57 => _57.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _58 => _58.headers])}}),Ut=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/{id}/",...e}),kt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/{id}/",...e}),vt=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Lt=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/addresses/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _59 => _59.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/",...e}),Pt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _60 => _60.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _61 => _61.headers])}}),St=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/",...e}),Kt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/",...e}),jt=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qt=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Mt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/account-currencies/",...e}),Bt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/account-currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Vt=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/account-currencies/{account_currency_id}/",...e}),_t=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/account-currencies/{account_currency_id}/",...e}),Wt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/currencies/",...e}),Gt=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),It=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/currencies/{code}/",...e}),Ft=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/currencies/{code}/",...e}),$t=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/documents/",...e}),Jt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/bank-accounts/{id}/documents/{document_type}/",...e}),Nt=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _62 => _62.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/",...e}),Ht=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qt=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/",...e}),Xt=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/",...e}),Yt=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Zt=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),es=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/account-currencies/",...e}),rs=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/account-currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ts=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/account-currencies/{account_currency_id}/",...e}),ss=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/account-currencies/{account_currency_id}/",...e}),ns=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/currencies/",...e}),os=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),as=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/currencies/{code}/",...e}),is=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/crypto-accounts/{id}/currencies/{code}/",...e}),cs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _63 => _63.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/",...e}),us=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ps=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{device_id}/apps/{app_id}/",...e}),ls=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{device_id}/apps/{app_id}/",...e}),hs=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{device_id}/apps/{app_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ys=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{device_id}/apps/{app_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ds=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/",...e}),Os=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/",...e}),Ts=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ws=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Rs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/apps/",...e}),ms=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/devices/{id}/apps/",...e,headers:{"Content-Type":"application/json",...e.headers}}),As=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _64 => _64.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/documents/",...e}),fs=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/documents/",...e}),Es=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/documents/{id}/",...e}),Ds=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/documents/{id}/",...e}),Cs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _65 => _65.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/",...e}),xs=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/",...e,headers:{"Content-Type":"application/json",...e.headers}}),bs=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/{id}/",...e}),gs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/{id}/",...e}),Us=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ks=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/emails/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),vs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _66 => _66.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/",...e}),Ls=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/{id}/",...e}),zs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/{id}/versions/",...e}),Ps=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/{term_id}/versions/{version_id}/",...e}),Ss=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/{term_id}/versions/{version_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ks=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/legal-terms/{term_id}/versions/{version_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),js=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _67 => _67.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/messages/",...e}),qs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/messages/{id}/",...e}),Ms=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _68 => _68.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/",...e}),Bs=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Vs=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/{id}/",...e}),_s=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/{id}/",...e}),Ws=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Gs=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/mobiles/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Is=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _69 => _69.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/",...e}),Fs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _70 => _70.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _71 => _71.headers])}}),$s=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/",...e}),Js=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/",...e}),Ns=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Hs=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/account-currencies/",...e}),Xs=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/account-currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ys=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/account-currencies/{account_currency_id}/",...e}),Zs=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/account-currencies/{account_currency_id}/",...e}),en=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/currencies/",...e}),rn=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tn=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/currencies/{code}/",...e}),sn=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/3/user/wallet-accounts/{id}/currencies/{code}/",...e});exports.a = B; exports.b = ke; exports.c = Ke; exports.d = je; exports.e = Ze; exports.f = er; exports.g = nn;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk7WQMKBQ6js = require('./chunk-7WQMKBQ6.js');var _chunkOEIQFP6Tjs = require('./chunk-OEIQFP6T.js');var R=class{async getItem(o){return typeof window<"u"&&window.localStorage?window.localStorage.getItem(o):null}async setItem(o,c){typeof window<"u"&&window.localStorage&&window.localStorage.setItem(o,c)}async removeItem(o){typeof window<"u"&&window.localStorage&&window.localStorage.removeItem(o)}},_= exports.b =class{constructor(){this.storage=new Map}async getItem(o){return this.storage.get(o)||null}async setItem(o,c){this.storage.set(o,c)}async removeItem(o){this.storage.delete(o)}},$= exports.c =class{constructor(o){this.asyncStorage=o}async getItem(o){return this.asyncStorage.getItem(o)}async setItem(o,c){return this.asyncStorage.setItem(o,c)}async removeItem(o){return this.asyncStorage.removeItem(o)}};function ee(a){return!a||a==="local"?typeof window<"u"&&window.localStorage?new R:new _:a==="memory"?new _:a}function se(a){return async(...o)=>{let c=await a(...o);if(!c.ok){let g=await c.text(),h=null;try{h=JSON.parse(g)}catch (e2){}throw new (0, _chunkOEIQFP6Tjs.b)({status:c.status,error:h||g,message:_optionalChain([h, 'optionalAccess', _2 => _2.error])||_optionalChain([h, 'optionalAccess', _3 => _3.message])||"A server error occurred. HTTPStatus: "+c.status})}return c}}function ae(a={}){let o=a.baseUrl||"https://api.rehive.com",c=ee(a.storage),g=a.token,h=_nullishCoalesce(a.enableCrossTabSync, () => (!0)),E="rehive_auth_state",f=_chunk7WQMKBQ6js.a.call(void 0, {baseUrl:o,responseStyle:"data",fetch:se(_chunkOEIQFP6Tjs.c.call(void 0, globalThis.fetch))}),y=[],S=-1,I=[],k=[],w=null,q=!1,v=null,W=!1;function z(e){return Date.now()>=e-30*1e3}function A(){return S>=0&&S<y.length?y[S]:null}function C(){let e=A();I.forEach(s=>s(e))}function u(e){k.forEach(s=>s(e))}async function l(){if(v)return v;v=(async()=>{let e={sessions:[],activeSessionIndex:-1};try{let s=await c.getItem(E);if(s){let t=JSON.parse(s);e.sessions=Array.isArray(t.sessions)?t.sessions:[],e.activeSessionIndex=typeof t.activeSessionIndex=="number"?t.activeSessionIndex:-1}}catch(s){console.error("Failed to load auth state:",s)}return y=e.sessions,S=e.activeSessionIndex,e})();try{return await v}finally{v=null}}async function d(e){try{await c.setItem(E,JSON.stringify(e)),y=e.sessions,S=e.activeSessionIndex,C()}catch(s){console.error("Failed to save auth state:",s)}}function B(){typeof window<"u"&&window.addEventListener("storage",e=>{if(e.key===E&&e.newValue)try{let s=JSON.parse(e.newValue);y=Array.isArray(s.sessions)?s.sessions:[],S=typeof s.activeSessionIndex=="number"?s.activeSessionIndex:-1,C()}catch(s){console.error("Failed to sync auth state from storage event:",s)}})}async function x(){W||(W=!0,g||(h&&B(),await l(),C()))}g||x().catch(console.error);async function H(e){await x();try{let s=_nullishCoalesce(e.session_duration, () => (900)),t={user:e.user,password:e.password,company:e.company,session_duration:s,auth_method:"token"},r=await _chunk7WQMKBQ6js.c.call(void 0, {client:f,body:t,throwOnError:!0}),n=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _4 => _4.data]), () => (r)),i={user:n.user,token:n.token,refresh_token:n.refresh_token,challenges:n.challenges,expires:n.expires,session_duration:s,company:e.company},m=await l(),P=m.sessions.findIndex(b=>b.user.id===i.user.id&&b.company===i.company),T;if(P!==-1){let b=[...m.sessions];b[P]=i,T={...m,sessions:b,activeSessionIndex:P}}else T={sessions:[...m.sessions,i],activeSessionIndex:m.sessions.length};return await d(T),u(null),i}catch(s){let t=s instanceof _chunkOEIQFP6Tjs.b?s:new Error("Login failed");throw u(t),s}}async function V(e){await x();try{let s=_nullishCoalesce(e.session_duration, () => (900)),t={email:e.email,mobile:e.mobile,username:e.username,company:e.company,password1:e.password,password2:e.password,first_name:e.first_name,last_name:e.last_name,terms_and_conditions:e.terms_and_conditions,privacy_policy:e.privacy_policy,session_duration:s},r=await _chunk7WQMKBQ6js.f.call(void 0, {client:f,body:t,throwOnError:!0}),n=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _5 => _5.data]), () => (r)),i={user:n.user,token:n.token,refresh_token:n.refresh_token,challenges:n.challenges,expires:n.expires,session_duration:s,company:e.company},m=await l(),P={sessions:[...m.sessions,i],activeSessionIndex:m.sessions.length};return await d(P),u(null),i}catch(s){let t=s instanceof _chunkOEIQFP6Tjs.b?s:new Error("Registration failed");throw u(t),s}}async function K(e){await x();try{let t=await _chunk7WQMKBQ6js.b.call(void 0, {client:f,body:e,throwOnError:!0}),r=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _6 => _6.data]), () => (t)),n={user:r.user,token:r.token,refresh_token:r.refresh_token,challenges:r.challenges,expires:r.expires,session_duration:900,company:typeof e.company=="string"?e.company:_optionalChain([e, 'access', _7 => _7.company, 'optionalAccess', _8 => _8.id])},i=await l(),m={sessions:[...i.sessions,n],activeSessionIndex:i.sessions.length};return await d(m),u(null),n}catch(s){let t=s instanceof _chunkOEIQFP6Tjs.b?s:new Error("Company registration failed");throw u(t),s}}async function M(){let e=await l(),s=e.sessions[e.activeSessionIndex],t={...e,sessions:e.sessions.filter((r,n)=>n!==e.activeSessionIndex),activeSessionIndex:-1};if(_optionalChain([s, 'optionalAccess', _9 => _9.token]))try{await _chunk7WQMKBQ6js.d.call(void 0, {client:f,body:{clear_session_option:"none"},headers:{Authorization:`Token ${s.token}`},throwOnError:!0})}catch (e3){}await d(t),u(null)}async function G(){let e=await l();await Promise.all(e.sessions.map(async s=>{try{await _chunk7WQMKBQ6js.d.call(void 0, {client:f,body:{clear_session_option:"none"},headers:{Authorization:`Token ${s.token}`},throwOnError:!0})}catch (e4){}})),await d({sessions:[],activeSessionIndex:-1}),u(null)}async function L(){return w||(w=(async()=>{q=!0;try{let e=await l(),s=e.activeSessionIndex,t=e.sessions[s];if(!_optionalChain([t, 'optionalAccess', _10 => _10.token])||!_optionalChain([t, 'optionalAccess', _11 => _11.refresh_token]))throw new Error("No active session, token, or refresh token found");let r=await _chunk7WQMKBQ6js.e.call(void 0, {client:f,body:{session_duration:_nullishCoalesce(t.session_duration, () => (900))},headers:{Authorization:`Refresh-Token ${t.refresh_token}`},throwOnError:!0}),n=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _12 => _12.data]), () => (r)),i=[...e.sessions];i[s]={...t,refresh_token:n.refresh_token,expires:n.expires,session_duration:_nullishCoalesce(t.session_duration, () => (900)),company:t.company},await d({...e,sessions:i}),u(null)}catch(e){let s=e instanceof _chunkOEIQFP6Tjs.b?e:new Error("Refresh failed");u(s);let t=await l();throw await d({...t,sessions:t.sessions.filter((r,n)=>n!==t.activeSessionIndex),activeSessionIndex:-1}),e}finally{q=!1,w=null}})(),w)}async function Q(){if(g)return g;await x();let e=A();if(e){if(e.expires&&z(e.expires)){try{await L()}catch (e5){return}return _optionalChain([A, 'call', _13 => _13(), 'optionalAccess', _14 => _14.token])}return e.token}}async function X(e,s){let t=await l(),r=t.sessions.findIndex(i=>i.user.id===e&&i.company===s);if(r===-1)return null;let n=t.sessions[r];return await d({...t,activeSessionIndex:r}),n.expires&&z(n.expires)?(await L(),A()):n}async function Y(){await d({sessions:[],activeSessionIndex:-1}),u(null)}async function Z(e){let s=await l(),t=s.activeSessionIndex;if(t<0||t>=s.sessions.length)return;let r=s.sessions[t],n=[...s.sessions];n[t]={...r,challenges:_optionalChain([r, 'access', _15 => _15.challenges, 'optionalAccess', _16 => _16.filter, 'call', _17 => _17(i=>i.id!==e)])||[]},await d({...s,sessions:n})}return{login:H,register:V,registerCompany:K,logout:M,logoutAll:G,refresh:L,getToken:Q,getActiveSession:A,getSessions:()=>[...y],getSessionsByCompany:e=>y.filter(s=>s.company===e),switchToSession:X,clearAllSessions:Y,deleteChallenge:Z,subscribe(e){return I.push(e),()=>{I=I.filter(s=>s!==e)}},subscribeToErrors(e){return k.push(e),()=>{k=k.filter(s=>s!==e)}},get baseUrl(){return o}}}exports.a = R; exports.b = _; exports.c = $; exports.d = ae;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkLTRLQIIMjs = require('./chunk-LTRLQIIM.js');var _chunkOEIQFP6Tjs = require('./chunk-OEIQFP6T.js');var R=class{async getItem(o){return typeof window<"u"&&window.localStorage?window.localStorage.getItem(o):null}async setItem(o,c){typeof window<"u"&&window.localStorage&&window.localStorage.setItem(o,c)}async removeItem(o){typeof window<"u"&&window.localStorage&&window.localStorage.removeItem(o)}},_= exports.b =class{constructor(){this.storage=new Map}async getItem(o){return this.storage.get(o)||null}async setItem(o,c){this.storage.set(o,c)}async removeItem(o){this.storage.delete(o)}},$= exports.c =class{constructor(o){this.asyncStorage=o}async getItem(o){return this.asyncStorage.getItem(o)}async setItem(o,c){return this.asyncStorage.setItem(o,c)}async removeItem(o){return this.asyncStorage.removeItem(o)}};function ee(a){return!a||a==="local"?typeof window<"u"&&window.localStorage?new R:new _:a==="memory"?new _:a}function se(a){return async(...o)=>{let c=await a(...o);if(!c.ok){let g=await c.text(),h=null;try{h=JSON.parse(g)}catch (e2){}throw new (0, _chunkOEIQFP6Tjs.b)({status:c.status,error:h||g,message:_optionalChain([h, 'optionalAccess', _2 => _2.error])||_optionalChain([h, 'optionalAccess', _3 => _3.message])||"A server error occurred. HTTPStatus: "+c.status})}return c}}function ae(a={}){let o=a.baseUrl||"https://api.rehive.com",c=ee(a.storage),g=a.token,h=_nullishCoalesce(a.enableCrossTabSync, () => (!0)),E="rehive_auth_state",f=_chunkLTRLQIIMjs.a.call(void 0, {baseUrl:o,responseStyle:"data",fetch:se(_chunkOEIQFP6Tjs.c.call(void 0, globalThis.fetch))}),y=[],S=-1,I=[],k=[],w=null,q=!1,v=null,W=!1;function z(e){return Date.now()>=e-30*1e3}function A(){return S>=0&&S<y.length?y[S]:null}function C(){let e=A();I.forEach(s=>s(e))}function u(e){k.forEach(s=>s(e))}async function l(){if(v)return v;v=(async()=>{let e={sessions:[],activeSessionIndex:-1};try{let s=await c.getItem(E);if(s){let t=JSON.parse(s);e.sessions=Array.isArray(t.sessions)?t.sessions:[],e.activeSessionIndex=typeof t.activeSessionIndex=="number"?t.activeSessionIndex:-1}}catch(s){console.error("Failed to load auth state:",s)}return y=e.sessions,S=e.activeSessionIndex,e})();try{return await v}finally{v=null}}async function d(e){try{await c.setItem(E,JSON.stringify(e)),y=e.sessions,S=e.activeSessionIndex,C()}catch(s){console.error("Failed to save auth state:",s)}}function B(){typeof window<"u"&&window.addEventListener("storage",e=>{if(e.key===E&&e.newValue)try{let s=JSON.parse(e.newValue);y=Array.isArray(s.sessions)?s.sessions:[],S=typeof s.activeSessionIndex=="number"?s.activeSessionIndex:-1,C()}catch(s){console.error("Failed to sync auth state from storage event:",s)}})}async function x(){W||(W=!0,g||(h&&B(),await l(),C()))}g||x().catch(console.error);async function H(e){await x();try{let s=_nullishCoalesce(e.session_duration, () => (900)),t={user:e.user,password:e.password,company:e.company,session_duration:s,auth_method:"token"},r=await _chunkLTRLQIIMjs.c.call(void 0, {client:f,body:t,throwOnError:!0}),n=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _4 => _4.data]), () => (r)),i={user:n.user,token:n.token,refresh_token:n.refresh_token,challenges:n.challenges,expires:n.expires,session_duration:s,company:e.company},m=await l(),P=m.sessions.findIndex(b=>b.user.id===i.user.id&&b.company===i.company),T;if(P!==-1){let b=[...m.sessions];b[P]=i,T={...m,sessions:b,activeSessionIndex:P}}else T={sessions:[...m.sessions,i],activeSessionIndex:m.sessions.length};return await d(T),u(null),i}catch(s){let t=s instanceof _chunkOEIQFP6Tjs.b?s:new Error("Login failed");throw u(t),s}}async function V(e){await x();try{let s=_nullishCoalesce(e.session_duration, () => (900)),t={email:e.email,mobile:e.mobile,username:e.username,company:e.company,password1:e.password,password2:e.password,first_name:e.first_name,last_name:e.last_name,terms_and_conditions:e.terms_and_conditions,privacy_policy:e.privacy_policy,session_duration:s},r=await _chunkLTRLQIIMjs.f.call(void 0, {client:f,body:t,throwOnError:!0}),n=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _5 => _5.data]), () => (r)),i={user:n.user,token:n.token,refresh_token:n.refresh_token,challenges:n.challenges,expires:n.expires,session_duration:s,company:e.company},m=await l(),P={sessions:[...m.sessions,i],activeSessionIndex:m.sessions.length};return await d(P),u(null),i}catch(s){let t=s instanceof _chunkOEIQFP6Tjs.b?s:new Error("Registration failed");throw u(t),s}}async function K(e){await x();try{let t=await _chunkLTRLQIIMjs.b.call(void 0, {client:f,body:e,throwOnError:!0}),r=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _6 => _6.data]), () => (t)),n={user:r.user,token:r.token,refresh_token:r.refresh_token,challenges:r.challenges,expires:r.expires,session_duration:900,company:typeof e.company=="string"?e.company:_optionalChain([e, 'access', _7 => _7.company, 'optionalAccess', _8 => _8.id])},i=await l(),m={sessions:[...i.sessions,n],activeSessionIndex:i.sessions.length};return await d(m),u(null),n}catch(s){let t=s instanceof _chunkOEIQFP6Tjs.b?s:new Error("Company registration failed");throw u(t),s}}async function M(){let e=await l(),s=e.sessions[e.activeSessionIndex],t={...e,sessions:e.sessions.filter((r,n)=>n!==e.activeSessionIndex),activeSessionIndex:-1};if(_optionalChain([s, 'optionalAccess', _9 => _9.token]))try{await _chunkLTRLQIIMjs.d.call(void 0, {client:f,body:{clear_session_option:"none"},headers:{Authorization:`Token ${s.token}`},throwOnError:!0})}catch (e3){}await d(t),u(null)}async function G(){let e=await l();await Promise.all(e.sessions.map(async s=>{try{await _chunkLTRLQIIMjs.d.call(void 0, {client:f,body:{clear_session_option:"none"},headers:{Authorization:`Token ${s.token}`},throwOnError:!0})}catch (e4){}})),await d({sessions:[],activeSessionIndex:-1}),u(null)}async function L(){return w||(w=(async()=>{q=!0;try{let e=await l(),s=e.activeSessionIndex,t=e.sessions[s];if(!_optionalChain([t, 'optionalAccess', _10 => _10.token])||!_optionalChain([t, 'optionalAccess', _11 => _11.refresh_token]))throw new Error("No active session, token, or refresh token found");let r=await _chunkLTRLQIIMjs.e.call(void 0, {client:f,body:{session_duration:_nullishCoalesce(t.session_duration, () => (900))},headers:{Authorization:`Refresh-Token ${t.refresh_token}`},throwOnError:!0}),n=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _12 => _12.data]), () => (r)),i=[...e.sessions];i[s]={...t,refresh_token:n.refresh_token,expires:n.expires,session_duration:_nullishCoalesce(t.session_duration, () => (900)),company:t.company},await d({...e,sessions:i}),u(null)}catch(e){let s=e instanceof _chunkOEIQFP6Tjs.b?e:new Error("Refresh failed");u(s);let t=await l();throw await d({...t,sessions:t.sessions.filter((r,n)=>n!==t.activeSessionIndex),activeSessionIndex:-1}),e}finally{q=!1,w=null}})(),w)}async function Q(){if(g)return g;await x();let e=A();if(e){if(e.expires&&z(e.expires)){try{await L()}catch (e5){return}return _optionalChain([A, 'call', _13 => _13(), 'optionalAccess', _14 => _14.token])}return e.token}}async function X(e,s){let t=await l(),r=t.sessions.findIndex(i=>i.user.id===e&&i.company===s);if(r===-1)return null;let n=t.sessions[r];return await d({...t,activeSessionIndex:r}),n.expires&&z(n.expires)?(await L(),A()):n}async function Y(){await d({sessions:[],activeSessionIndex:-1}),u(null)}async function Z(e){let s=await l(),t=s.activeSessionIndex;if(t<0||t>=s.sessions.length)return;let r=s.sessions[t],n=[...s.sessions];n[t]={...r,challenges:_optionalChain([r, 'access', _15 => _15.challenges, 'optionalAccess', _16 => _16.filter, 'call', _17 => _17(i=>i.id!==e)])||[]},await d({...s,sessions:n})}return{login:H,register:V,registerCompany:K,logout:M,logoutAll:G,refresh:L,getToken:Q,getActiveSession:A,getSessions:()=>[...y],getSessionsByCompany:e=>y.filter(s=>s.company===e),switchToSession:X,clearAllSessions:Y,deleteChallenge:Z,subscribe(e){return I.push(e),()=>{I=I.filter(s=>s!==e)}},subscribeToErrors(e){return k.push(e),()=>{k=k.filter(s=>s!==e)}},get baseUrl(){return o}}}exports.a = R; exports.b = _; exports.c = $; exports.d = ae;