@yuno-payments/dashboard-api-mfe 1.10.0 → 1.10.1

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.
@@ -47,7 +47,7 @@ statuses/index.js:
47
47
  *
48
48
  * This source code is licensed under the MIT license found in the
49
49
  * LICENSE file in the root directory of this source tree.
50
- */"production"===process.env.NODE_ENV?Af.exports=function(){if(Tf)return Of;Tf=1;var e=s,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,r=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function i(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!t(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),c=n({inst:{value:s,getSnapshot:t}}),u=c[0].inst,l=c[1];return o(function(){u.value=s,u.getSnapshot=t,i(u)&&l({inst:u})},[e,s,t]),r(function(){return i(u)&&l({inst:u}),e(function(){i(u)&&l({inst:u})})},[e]),a(s),s};return Of.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:c,Of}():Af.exports=(Pf||(Pf=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=s,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useState,o=t.useEffect,a=t.useLayoutEffect,i=t.useDebugValue,c=!1,u=!1,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(s,l){c||void 0===t.startTransition||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=l();if(!u){var p=l();n(d,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}var h=(p=r({inst:{value:d,getSnapshot:l}}))[0].inst,f=p[1];return a(function(){h.value=d,h.getSnapshot=l,e(h)&&f({inst:h})},[s,d,l]),o(function(){return e(h)&&f({inst:h}),s(function(){e(h)&&f({inst:h})})},[s]),i(d),d};Df.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:l,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Df);var Lf=Af.exports;const jf=Lf.useSyncExternalStore,Nf=i.createContext(void 0),zf=i.createContext(!1);function qf(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Nf),window.ReactQueryClientContext):Nf)}const Uf=({context:e}={})=>{const t=i.useContext(qf(e,i.useContext(zf)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Mf=({client:e,children:t,context:n,contextSharing:r=!1})=>{i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),"production"!==process.env.NODE_ENV&&r&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const o=qf(n,r);return i.createElement(zf.Provider,{value:!n&&r},i.createElement(o.Provider,{value:e},t))},Bf=i.createContext(!1);Bf.Provider;const Ff=i.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function Gf(e,t){return"function"==typeof e?e(...t):!!e}function Wf(e,t){const n=Uf({context:e.context}),r=i.useContext(Bf),o=i.useContext(Ff),a=n.defaultQueryOptions(e);a._optimisticResults=r?"isRestoring":"optimistic",a.onError&&(a.onError=ff.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=ff.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=ff.batchCalls(a.onSettled)),(e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.cacheTime&&(e.cacheTime=Math.max(e.cacheTime,1e3)))})(a),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(a,o),(e=>{i.useEffect(()=>{e.clearReset()},[e])})(o);const[s]=i.useState(()=>new t(n,a)),c=s.getOptimisticResult(a);if(jf(i.useCallback(e=>{const t=r?()=>{}:s.subscribe(ff.batchCalls(e));return s.updateResult(),t},[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),i.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(a,c,r))throw((e,t,n)=>t.fetchOptimistic(e).then(({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)}).catch(t=>{n.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)}))(a,s,o);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Gf(n,[e.error,r]))({result:c,errorResetBoundary:o,useErrorBoundary:a.useErrorBoundary,query:s.getCurrentQuery()}))throw c.error;return a.notifyOnChangeProps?c:s.trackResult(c)}function Hf(e,t,n){return Wf(Bh(e,t,n),Ef)}function Vf(e,t,n){const r=function(e,t,n){return ef(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),o=Uf({context:r.context}),[a]=i.useState(()=>new Rf(o,r));i.useEffect(()=>{a.setOptions(r)},[a,r]);const s=jf(i.useCallback(e=>a.subscribe(ff.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=i.useCallback((e,t)=>{a.mutate(e,t).catch(Kf)},[a]);if(s.error&&Gf(a.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:c,mutateAsync:s.mutate}}function Kf(){}var $f;function Qf(e){return Vf(function(e){var t=e.payload;return jh.getInstance().postWebhookV2MultiAccount({payload:t})},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Yf(e){return Vf(function(e){var t=e.code,n=e.accountCode;return jh.getInstance().deleteWebhookV2(t,n)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Jf(e){return Vf(function(e){var t=e.code,n=e.payload,r=e.accountCode;return jh.getInstance().updateWebhookV2(t,n,r)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Zf(){return Vf(function(e){var t=e.name,n=e.principal;return jh.getInstance().postAccount(t,n)})}function Xf(){return Vf(function(n){var r=e([$f.ACCOUNT],n.duplicate_order,!0);return jh.getInstance().duplicateAccount(t(t({},n),{duplicate_order:r}))})}function em(){return Vf(function(e){return jh.getInstance().retryDuplicateAccount(e)})}function tm(){return Vf(function(e){var t=e.name,n=e.code,r=e.principal;return jh.getInstance().patchAccountV2({name:t,code:n,principal:r})})}function nm(){return Vf(function(e){var t=e.account_code;return jh.getInstance().putAccountPrincipal({account_code:t})})}function rm(){return Vf(function(e){var t=e.organizationCode,n=e.userCode,r=e.payload;return jh.getInstance().putAccountsUserMassive(t,n,r)})}function om(){return Vf(function(e){var t=e.organizationCode,n=e.userCode,r=e.payload;return jh.getInstance().deleteAccountsUserMassive(t,n,r)})}function am(){return Vf(["post-validate-status-connection"],function(e){var t=e.payload,n=e.accountCode;return jh.getInstance().postValidateStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function im(){return Vf(["post-change-status-connection"],function(e){var t=e.payload,n=e.accountCode;return jh.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function sm(){return Vf(function(e){return jh.getInstance().putCosts(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function cm(){return Vf(["post-connection"],function(e){var t=e.payload;return jh.getInstance().postMultiConnection({payload:t}).then(function(e){return null==e?void 0:e.data})})}function um(){return Vf(["new-post-connection-validate"],function(){return jh.getInstance().postMultiConnectionValidate().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function lm(){return Vf(["patch-connection"],function(e){var t=e.payload,n=e.connectionCode;return jh.getInstance().patchConnection({payload:t,connectionCode:n}).then(function(e){return null==e?void 0:e.data})})}function dm(){return Vf(function(e){var t=e.payload;return jh.getInstance().postDefaultRoutes({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function pm(){return Vf(function(e){return jh.getInstance().postValidateCredentials(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function hm(){var e=this;return Vf(function(t){var o=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().postNetworkTokensOnboarding(o)];case 1:return[2,e.sent().data]}})})},{useErrorBoundary:!1})}function fm(){return Vf(["patch-organizations"],function(){return jh.getInstance().updateOrganizationStatus().then(function(e){return null==e?void 0:e.data})})}function mm(){return Vf(function(e){return jh.getInstance().getOrgByName(e).then(function(e){return null==e?void 0:e.data})})}function gm(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().changePasswordV2(t).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function ym(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().workosPasswordReset(t).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function vm(){var e=this;return Vf(function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().workosAdminPortal().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function bm(){var e=this;return Vf(function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().workosDomainVerificationPortal().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function km(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().workosVerifyMfa(t).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function _m(e){return Vf(function(e){return jh.getInstance().updateProfile(e)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function wm(){return Vf(function(e){return jh.getInstance().inviteUsersMassive(e,e.organizationCode)})}function Em(){return Vf(function(e){return jh.getInstance().inviteUsersMassiveV2(e)})}function xm(){return Vf(function(e){var t=e.userCode,n=e.organizationCode;return jh.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})})}function Sm(){return Vf(function(e){return jh.getInstance().createUserAuth0(e)})}function Cm(){return Vf(function(e){return jh.getInstance().postCall(e)})}function Im(){return Vf(function(e){return jh.getInstance().changeLoginMethods(e)})}!function(e){e.ACCOUNT="ACCOUNT",e.CHECKOUT_BUILDER="CHECKOUT_BUILDER",e.CONNECTION="CONNECTION",e.ROUTING="ROUTING",e.RISK_CONDITIONS="RISK_CONDITIONS",e.WEBHOOKS="WEBHOOKS"}($f||($f={}));var Rm=function(){var e=c("ON"===localStorage.getItem("isTesting")),t=e[0],n=e[1];return u(function(){var e=function(e){"isTesting"===e.key&&n("ON"===e.newValue)};return window.addEventListener("storage",e),function(){window.removeEventListener("storage",e)}},[]),{isTesting:t}},Tm=function(e){var t=localStorage.getItem(e),n=c(t&&JSON.parse(t)),r=n[0],o=n[1];return u(function(){var t=function(t){if(t.key===e){var n=t.newValue;o(n)}};return window.addEventListener("storage",t),function(){window.removeEventListener("storage",t)}},[e]),r},Am=function(){var e,t;return null===(t=null===(e=Tm("account"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.organization_code},Om=function(){var e,t=Rm().isTesting,n=null===(e=Tm("account"))||void 0===e?void 0:e.value;return(t?null==n?void 0:n.account_code_testing:null==n?void 0:n.account_code_live)||(null==n?void 0:n.code)};function Pm(e){var n=Om(),r=l(n);return r.current=n,Vf(function(e){return jh.getInstance().updateIsActiveCheckout(t(t({},e),{accountCode:r.current}))},e)}function Dm(e){var n=Om(),r=l(n);return r.current=n,Vf(function(e){return jh.getInstance().publishCheckout(t(t({},e),{accountCode:r.current}))},e)}function Lm(){return Vf(function(e){var t=e.payload,n=e.transactionId,r=e.paymentId,o=e.action;return jh.getInstance().createOperationTransaction(t,n,r,o)})}function jm(){return Vf(function(e){var t=e.payload,n=e.paymentId,r=e.transactionId,o=e.handleSetProgress;return jh.getInstance().uploadChargebacks(t,n,r,o)})}function Nm(){return Vf(function(e){var t=e.transactionCode,n=e.payload;return jh.getInstance().postProviderRawResponse(t,n)})}function zm(){return Vf(function(e){var t=e.paymentId,n=e.payload;return jh.getInstance().addToRiskList(t,n)})}var qm=new yf({}),Um=new class{constructor(e={}){this.queryCache=e.queryCache||new yf,this.mutationCache=e.mutationCache||new kf,this.logger=e.logger||hf,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,"production"!==process.env.NODE_ENV&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=of.subscribe(()=>{of.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=sf.subscribe(()=>{sf.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=Fh(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const r=Bh(e,t,n),o=this.getQueryData(r.queryKey);return o?Promise.resolve(o):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const r=this.queryCache.find(e),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==r?void 0:r.state.data);if(void 0===o)return;const a=Bh(e),i=this.defaultQueryOptions(a);return this.queryCache.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ff.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=Fh(e,t),r=this.queryCache;ff.batch(()=>{r.findAll(n).forEach(e=>{r.remove(e)})})}resetQueries(e,t,n){const[r,o]=Fh(e,t,n),a=this.queryCache,i={type:"active",...r};return ff.batch(()=>(a.findAll(r).forEach(e=>{e.reset()}),this.refetchQueries(i,o)))}cancelQueries(e,t,n){const[r,o={}]=Fh(e,t,n);void 0===o.revert&&(o.revert=!0);const a=ff.batch(()=>this.queryCache.findAll(r).map(e=>e.cancel(o)));return Promise.all(a).then(qh).catch(qh)}invalidateQueries(e,t,n){const[r,o]=Fh(e,t,n);return ff.batch(()=>{var e,t;if(this.queryCache.findAll(r).forEach(e=>{e.invalidate()}),"none"===r.refetchType)return Promise.resolve();const n={...r,type:null!=(e=null!=(t=r.refetchType)?t:r.type)?e:"active"};return this.refetchQueries(n,o)})}refetchQueries(e,t,n){const[r,o]=Fh(e,t,n),a=ff.batch(()=>this.queryCache.findAll(r).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...o,cancelRefetch:null==(t=null==o?void 0:o.cancelRefetch)||t,meta:{refetchPage:r.refetchPage}})}));let i=Promise.all(a).then(qh);return null!=o&&o.throwOnError||(i=i.catch(qh)),i}fetchQuery(e,t,n){const r=Bh(e,t,n),o=this.defaultQueryOptions(r);void 0===o.retry&&(o.retry=!1);const a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(qh).catch(qh)}fetchInfiniteQuery(e,t,n){const r=Bh(e,t,n);return r.behavior=_f(),this.fetchQuery(r)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(qh).catch(qh)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find(t=>Vh(e)===Vh(t.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find(t=>Kh(e,t.queryKey));if("production"!==process.env.NODE_ENV){this.queryDefaults.filter(t=>Kh(e,t.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.")}return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find(t=>Vh(e)===Vh(t.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find(t=>Kh(e,t.mutationKey));if("production"!==process.env.NODE_ENV){this.mutationDefaults.filter(t=>Kh(e,t.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults.")}return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=Hh(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:!1,staleTime:3e5,useErrorBoundary:!0}},queryCache:qm});function Mm(){return Vf(function(e){return jh.getInstance().createReconciliationsReportV2(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Bm(){return Vf(function(e){return jh.getInstance().createReconciliationsReportV3(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Fm(){return Vf(function(e){return jh.getInstance().createReportV2(e).then(function(e){return null==e?void 0:e.data})})}function Gm(){return Vf(function(e){return jh.getInstance().getTotalRowsForExport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Wm(){return Vf(function(e){return jh.getInstance().cancelReport(e).then(function(e){return null==e?void 0:e.data})})}function Hm(t){var o=this;return Vf(function(){return n(o,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().createReportTemplate(t).then(function(e){return null==e?void 0:e.data})]})})},{onMutate:function(t){return n(o,void 0,void 0,function(){var n;return r(this,function(r){switch(r.label){case 0:return[4,Um.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return r.sent(),n=Um.getQueryData(["GET/reports/templates"]),Um.setQueryData(["GET/reports/templates"],function(n){return e(e([],n,!0),[t],!1)}),[2,{previousTemplates:n}]}})})},onError:function(e,t,n){Um.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){Um.invalidateQueries({queryKey:["GET/reports/templates"]})}})}function Vm(e){return Vf(function(){return jh.getInstance().updateReportTemplate(e).then(function(e){return null==e?void 0:e.data})})}function Km(){return Vf(function(e){return jh.getInstance().deletePaymentsReportTemplate(e).then(function(e){return null==e?void 0:e.data})})}function $m(e,t,o){var a=this;void 0===o&&(o=null);var i=(null==o?void 0:o.basePath)||Ad.DEFAULT_ROUTING_TYPE;return Vf(function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().postSmartRoutingCreateWorkflow(e,t,i).then(function(e){return null==e?void 0:e.data})];case 1:return[2,n.sent()]}})})},o)}function Qm(e,t){var o=this,a=e.versionCode,i=e.accountCode,s=e.organizationCode,c=e.routingType,u=void 0===c?Ad.DEFAULT_ROUTING_TYPE:c;return void 0===t&&(t=null),Vf(function(){return n(o,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().postSmartRoutingPublishVersion(i,a,s,u).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})},t)}function Ym(e,t){var n=e.data,r=e.accountCode,o=e.routingType,a=void 0===o?Ad.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),Vf(function(){return jh.getInstance().putSmartRoutingUpdateWorkflow(r,n,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},t)}function Jm(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?Ad.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),Vf(function(){return jh.getInstance().deleteSmartRoutingVersion(r,n,a).then(function(e){return null==e?void 0:e.data})},t)}function Zm(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?Ad.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),Vf(function(){return jh.getInstance().postSmartRoutingDuplicateVersion(r,String(n),a).then(function(e){return null==e?void 0:e.data})},t)}function Xm(e,t){var n=e.paymentMethod,r=e.active,o=e.accountCode,a=e.routingType,i=void 0===a?Ad.DEFAULT_ROUTING_TYPE:a;return void 0===t&&(t=null),Vf(function(){return jh.getInstance().putSmartRoutingToggleMethod(o,n,r,i).then(function(e){return null==e?void 0:e.data})},t)}function eg(e,t){var o=this;return void 0===t&&(t=null),Vf(function(t){return n(o,void 0,void 0,function(){var n,o,a,i,s,c;return r(this,function(r){switch(r.label){case 0:return n=jh.getInstance(),o=t.map(function(t){return n.putSmartRoutingToggleMethod(e,t.paymentMethod,t.active,t.routingType)}),[4,Promise.allSettled(o)];case 1:return a=r.sent(),i=a.filter(function(e){return"rejected"===e.status}),s=a.filter(function(e){return"fulfilled"===e.status}),c=i.map(function(e,n){return{paymentMethod:t[n].paymentMethod,error:"rejected"===e.status?e.reason:null}}),[2,{success:s.length,failed:i.length,total:t.length,errors:c}]}})})},t)}function tg(e,t){var n=e.declinedId,r=e.accountCode;return void 0===t&&(t=null),Vf(function(e){return void 0===e&&(e=null),jh.getInstance().updateSmartRoutingDeclinedGroup(r,n,e).then(function(e){return null==e?void 0:e.data})},t)}function ng(e){var t=e.accountCode;return Vf(function(e){return void 0===e&&(e=null),jh.getInstance().createSmartRoutingDeclinedGroup(t,e).then(function(e){return null==e?void 0:e.data})},e.options)}function rg(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?Ad.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),Vf(function(e){return void 0===e&&(e=!1),jh.getInstance().updateSmartRoutingFavorite(r,n,e,a).then(function(e){return null==e?void 0:e.data})},t)}function og(e,t){var n=e.code,r=e.name,o=e.accountCode,a=e.routingType,i=void 0===a?Ad.DEFAULT_ROUTING_TYPE:a;return void 0===t&&(t=null),Vf(function(){return jh.getInstance().putSmartRoutingUpdateWorkflowName(o,{code:n,name:r},i).then(function(e){return null==e?void 0:e.data})},t)}function ag(e,t){var n=e.accountCode,r=e.workflowVersionCode,o=e.routingType,a=void 0===o?Ad.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),Vf(function(e){return jh.getInstance().simulateSmartRoutingTransaction(n,r,e,a).then(function(e){return null==e?void 0:e.data})},t)}function ig(e,t){return void 0===t&&(t=null),Vf(function(t){return jh.getInstance().updateMonitorRedistribution(e,t).then(function(e){return null==e?void 0:e.data})},t)}function sg(e,n){return void 0===n&&(n={}),Vf(function(t){var n=t.declinedGroupCode;return jh.getInstance().removeDeclinedGroup(e,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},t(t({},n),{useErrorBoundary:!1}))}function cg(e,n){return void 0===n&&(n={}),Vf(function(t){var n=t.payload;return jh.getInstance().multiAccountDeclinedGroupCreate(e,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},t(t({},n),{useErrorBoundary:!1}))}var ug=function(e){return Vf(function(t){return jh.getInstance().createMonitorThreshold(t,e).then(function(e){return e.data})})},lg=function(e){return Vf(function(t){return jh.getInstance().createMonitorTemplate(t,e).then(function(e){return e.data})})};function dg(){return Vf(function(e){var t=e.payload;return jh.getInstance().postSlackMessageChannel(t).then(function(e){return null==e?void 0:e.data})})}function pg(){return Vf(function(e){var t=e.userCode,n=e.organizationCode;return jh.getInstance().deleteUserTeamV2({userCode:t,organizationCode:n}).then(function(e){return null==e?void 0:e.data})})}function hg(){return Vf(function(){return jh.getInstance().setCustodian().then(function(e){return null==e?void 0:e.data})})}function fg(){return Vf(function(e){var t=e.payload,n=e.accountCode;return jh.getInstance().createRoles(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function mg(){var e=this;return Vf(function(t){var o=t.payload,a=t.id,i=t.accountCode;return n(e,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return[4,jh.getInstance().editRoles({payload:o,id:a},i)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}})})},{useErrorBoundary:!1})}function gg(){return Vf(function(e){return jh.getInstance().deleteRoles(e).then(function(e){return null==e?void 0:e.data})})}function yg(){return Vf(function(e){var t=e.payload;return jh.getInstance().createOrgRole(t).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function vg(){var e=this;return Vf(function(t){var o=t.payload,a=t.id;return n(e,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return[4,jh.getInstance().editOrgRole({payload:o,id:a})];case 1:return[2,null==(e=t.sent())?void 0:e.data]}})})},{useErrorBoundary:!1})}function bg(){return Vf(function(e){return jh.getInstance().deleteOrgRole(e).then(function(e){return null==e?void 0:e.data})})}function kg(){return Vf(function(e){return jh.getInstance().startUserExport({accountCodes:e.account_codes,name:e.name,search:e.search,statuses:e.statuses,roleIds:e.role_ids}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function _g(){return Vf(["post-payment-links"],function(e){var t=e.payload,n=e.accountCode;return jh.getInstance().postPaymentLinks({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data})})}function wg(){return Vf(["post-delete-payment-link"],function(e){var t=e.code;return jh.getInstance().postDeletePaymentLink({code:t}).then(function(e){return null==e?void 0:e.data})})}function Eg(){return Vf(["patch-payment-links"],function(e){var t=e.payload,n=e.accountCode,r=e.paymentLinkCode;return jh.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:r}).then(function(e){return null==e?void 0:e.data})})}function xg(){return Vf(["upload-payment-link-logo"],function(e){var t=e.payload;return jh.getInstance().uploadPaymentLinkLogo({payload:t}).then(function(e){return null==e?void 0:e.data})})}function Sg(){return Vf(["post-subscription"],function(e){return jh.getInstance().postSubscription(e).then(function(e){return null==e?void 0:e.data})})}function Cg(){return Vf(["post-pause-subscription"],function(e){var t=e.subscriptionCode;return jh.getInstance().postPauseSubscription(t).then(function(e){return null==e?void 0:e.data})})}function Ig(){return Vf(["post-resume-subscription"],function(e){var t=e.subscriptionCode;return jh.getInstance().postResumeSubscription(t).then(function(e){return null==e?void 0:e.data})})}function Rg(){return Vf(["post-cancel-subscription"],function(e){var t=e.subscriptionCode;return jh.getInstance().postCancelSubscription(t).then(function(e){return null==e?void 0:e.data})})}function Tg(){return Vf(["patch-subscription"],function(e){var t=e.subscriptionCode,n=e.payload;return jh.getInstance().patchSubscription(t,n).then(function(e){return null==e?void 0:e.data})})}function Ag(){return Vf(["post-reschedule-subscription"],function(e){var t=e.subscriptionCode;return jh.getInstance().postRescheduleSubscription(t).then(function(e){return null==e?void 0:e.data})})}function Og(){return Vf(["post-list-subscriptions"],function(e){return jh.getInstance().postListSubscriptions(e).then(function(e){return null==e?void 0:e.data})})}function Pg(){return Vf(function(e){var t=e.payload;return jh.getInstance().postUserSettings(t)},{onMutate:function(e){return e}})}function Dg(){return Vf(function(e){return jh.getInstance().postUserThemeSettings(e)})}function Lg(){return Vf(function(e){var t=e.payload,n=e.section;return jh.getInstance().postUserSettingsTables(t,n)},{onMutate:function(e){return e},onSuccess:function(e){var n=Um.getQueryData(["fetch-profile"]);e.data&&Um.setQueryData(["fetch-profile"],t(t({},n),{settings:e.data}))}})}function jg(e){return Vf(["pinned-sections"],function(e){var t=e.payload;return jh.getInstance().postUserSettingsPinned(t)},{onMutate:function(t){var n=t.payload;return e({payload:n})}})}function Ng(){return Hf(["fetch-profile"],function(){return jh.getInstance().getProfile().then(function(e){var t=null==e?void 0:e.data;return t&&localStorage.setItem("user",JSON.stringify(t)),t}).catch(function(e){throw e})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function zg(){var e=this;return Hf(["get-user-full"],function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().getUserFull()];case 1:return[2,e.sent().data]}})})},{keepPreviousData:!0,useErrorBoundary:!1})}function qg(e,t){return Hf(["fetch-permissions",e,t],function(){var e,t,n,r=localStorage.getItem("account"),o=localStorage.getItem("user"),a=r&&JSON.parse(r),i=o&&JSON.parse(o);return((null==i?void 0:i.merlin)?null===(e=null==i?void 0:i.merlin)||void 0===e?void 0:e.permissions:null===(n=null===(t=null==a?void 0:a.value)||void 0===t?void 0:t.role)||void 0===n?void 0:n.permission_ids.map(function(e){return{permission_name:e,description:e,resource_server_name:e,resource_server_identifier:e}}))||[]})}function Ug(e){return Hf(["email-verification",e],function(){return jh.getInstance().emailVerification(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})}function Mg(){return Hf({queryKey:["get-login-methods"],queryFn:function(){return jh.getInstance().getLoginMethods().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})}})}function Bg(){return Hf(["fetch-impersonation-users"],function(){return jh.getInstance().getImpersonationUsers().then(function(e){var t;return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.result)||[]})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Fg(){return Hf(["fetch-impersonation-enabled"],function(){return jh.getInstance().getImpersonationEnabled().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Gg(e,t,o,a,i,s){var c=this;return void 0===o&&(o=1),void 0===a&&(a=10),Hf(["get-users-to-impersonate",e,t,o,a,i,s],function(){return n(c,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getUsersToImpersonate(e,t,o,a,i,s).then(function(e){return null==e?void 0:e.data})]})})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function Wg(e){var t;return Hf(["fetch-communications",e],function(){return jh.getInstance().getCommunications(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null===(t=e.account_codes)||void 0===t?void 0:t.length),useErrorBoundary:!1,cacheTime:3e3})}function Hg(){return Hf(["fetch-communications-filters"],function(){return jh.getInstance().getCommunicationsFilters().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Vg(e,t){return Hf(["fetch-communication-details",e],function(){return jh.getInstance().getCommunicationDetails(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,useErrorBoundary:!1,cacheTime:0})}function Kg(n,r,o){var a,i,s=Ng(),c=Pg(),u=s.data,l=s.isLoading||!s.isFetched,p=null!==(i=null===(a=null==u?void 0:u.settings)||void 0===a?void 0:a.viewedTutorials)&&void 0!==i?i:[],h="onboarding-".concat(null!=n?n:"default","-").concat(r,"-").concat(o),f=p.includes(h),m=d(function(){if(!f){var n=e(e([],p,!0),[h],!1);Um.setQueryData(["fetch-profile"],function(e){var r;return e?t(t({},e),{settings:t(t({},null!==(r=e.settings)&&void 0!==r?r:{}),{viewedTutorials:n})}):e}),c.mutate({payload:{viewedTutorials:n}})}},[f,h,c,p]);return{hasSeenOnboarding:f,dismiss:m,id:h,isProfileLoading:l}}function $g(){return Vf(function(e){var t=e.password,n=e.otp;return jh.getInstance().getMfaTokenValidation(t,n).then(function(e){return null==e?void 0:e.data})})}function Qg(){return Vf(function(){return jh.getInstance().getEmailOtp().then(function(e){return null==e?void 0:e.data})})}function Yg(){return Vf(function(e){return jh.getInstance().confirmMfaOtp(e).then(function(e){return null==e?void 0:e.data})})}function Jg(){return Vf(function(e){return jh.getInstance().unrollMfa(e).then(function(e){return null==e?void 0:e.data})})}function Zg(){return Vf(function(){return jh.getInstance().validatePasswordStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return{valid:!1}})})}function Xg(){return Vf(["post-get-allowlist-items"],function(e){var t=e.payload;return jh.getInstance().postAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ey(){return Vf(["post-get-allowlist-multi-account"],function(e){var t=e.payload;return jh.getInstance().postGetAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ty(){return Vf(["post-create-allowlist-multi-account"],function(e){var t=e.payload;return jh.getInstance().postCreateAllowlistMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ny(){return Vf(["patch-change-status-allowlist"],function(e){var t=e.payload;return jh.getInstance().patchChangeStatusAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ry(){return Vf(["patch-change-status-allowlist-item"],function(e){var t=e.payload;return jh.getInstance().patchChangeStatusAllowlistItem({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function oy(){return Vf(["post-add-allowlist-items"],function(e){var t=e.payload;return jh.getInstance().patchAddAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ay(){return Vf(["patch-allowlist"],function(e){var t=e.payload;return jh.getInstance().patchAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function iy(){return Vf(["post-blacklist-multi-account"],function(e){var t=e.payload;return jh.getInstance().postBlackListMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function sy(){return Vf(["put-blacklist"],function(e){return jh.getInstance().putBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function cy(){return Vf(["change-blacklist"],function(e){return jh.getInstance().changeBlackListStatus(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function uy(){return Vf(["change-blacklist-item"],function(e){return jh.getInstance().changeBlackListStatusItem(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function ly(){return Vf(["post-blacklist-items"],function(e){var t=e.payload;return jh.getInstance().postBlackListItems({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function dy(){return Vf(["delete-blacklist"],function(e){var t=e.black_list_code;return jh.getInstance().deleteBlackListType({black_list_code:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function py(e){var t=e.handleSetProgress;return Vf(["post-blacklist-batch"],function(e){var n=e.blacklist_code,r=e.expiration_days,o=e.file;return jh.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:r,file:o,handleSetProgress:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function hy(){return Vf(["change-payments-webhook"],function(e){var t=e.status,n=e.paymentCode;return jh.getInstance().postChangePaymentsWebhook({status:t,paymentCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function fy(){return Vf(["delete-blacklist-items"],function(e){var t=e.blocklist_code,n=e.blocklist_item_id,r=e.account_code;return jh.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:r}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function my(){return Vf(["valiate-blacklist-items"],function(e){return jh.getInstance().valiateBlockListItems({payload:e}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function gy(){return Vf(["delete-allowlist-item"],function(e){return jh.getInstance().deleteAllowlistItem({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function yy(){return Vf(["validate-allowlist-items"],function(e){return jh.getInstance().validateAllowlistItems({payload:e}).then(function(e){return e.data}).catch(function(e){return e})})}function vy(e){var t=e.fileName,n=e.onSuccess,r=e.onError,o=c(0),a=o[0],i=o[1],s=l({cancel:function(){return null}}),u=Vf(["upload-file-chargeback",t],function(e){var t=jh.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:i}),o=t.promise,a=t.cancel;return s.current.cancel=a,o.then(function(e){return null==n||n(null==e?void 0:e.data),null==e?void 0:e.data}).catch(function(e){throw null==r||r(),e})},{useErrorBoundary:!1});return{mutation:u,cancelRequest:s.current.cancel,progress:a}}function by(){return Vf(function(e){return jh.getInstance().uploadBatchRefundsV2({payload:e}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ky(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().batchRefundByFile({payload:t}).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function _y(){var e=this;return Vf(function(t){var o=t.batchRefundId,a=t.organizationCode,i=t.accountCode;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getBatchRefundProcessedFileDownload(o,a,i).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function wy(){var e=this;return Vf(function(t){var o=t.batchRefundId,a=t.organizationCode,i=t.accountCode;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getBatchRefundUserFileDownload(o,a,i).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function Ey(){var e=l({cancel:function(){return null}}),t=Vf(["upload-file"],function(t){var n=jh.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),r=n.promise,o=n.cancel;return e.current.cancel=o,r.then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})});return{mutation:t,cancelRequest:e.current.cancel}}function xy(){return Vf(function(e){var t=e.payload,n=e.organizationCode;return jh.getInstance().updateMFAConfig(t,n)})}function Sy(){return Vf(function(e){var t=e.payload,n=e.organizationCode;return jh.getInstance().mfaExcludeUsers(t,n)})}function Cy(e){return Hf(["GET/scheduled-reports",e],function(){return jh.getInstance().getScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Iy(){return Vf(function(e){var t=e.payload;return jh.getInstance().postScheduledReport(t).then(function(e){return{data:e.data,status:e.status}}).catch(function(e){return e})})}function Ry(){return Vf(function(e){var t=e.reportCode,n=e.payload;return jh.getInstance().updateScheduledReport(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Ty(){return Vf(function(e){return jh.getInstance().deleteScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Ay(){return Vf(function(e){return jh.getInstance().getConditionalConfigRules(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Oy(){return Vf(function(e){return jh.getInstance().getRule(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Py(){return Vf(function(e){var t=e.payload,n=e.accountCode;return jh.getInstance().postCreateRuleMultiAccount(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Dy(){return Vf(function(e){var t=e.payload,n=e.ruleId,r=e.accountCode;return jh.getInstance().postEditRule(t,n,r).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Ly(){return Vf(function(e){var t=e.payload;return jh.getInstance().postCreateCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function jy(){return Vf(function(e){var t=e.payload,n=e.code;return jh.getInstance().pathCreateCustomizedApiKeys(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Ny(){return Vf(function(e){var t=e.code,n=e.password,r=e.otp,o=e.mfaToken;return jh.getInstance().getCustomizedApiKeysToken(t,n,r,o).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})}function zy(){return Vf(function(e){var t=e.passwordOtp;return jh.getInstance().getDeveloperCredentialsValidatePassword(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})}function qy(){return Vf(function(e){var t=e.password;return jh.getInstance().getDeveloperCredentialsValidatePasswordRegularUser(t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function Uy(){return Vf(function(e){var t=e.code;return jh.getInstance().deleteCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function My(){return Vf(function(e){var t=e.payload,n=e.code,r=e.password;return jh.getInstance().patchApiKeysEditNote(t,n,r).then(function(e){return e.data}).catch(function(e){return e})})}function By(){return Vf(function(e){var t=e.payload,n=e.code,r=e.password;return jh.getInstance().postApiKeysRoll(t,n,r).then(function(e){return e.data}).catch(function(e){return e})})}function Fy(){return Vf(function(e){var n=e.password,r=e.accountCode,o=e.otp,a=e.mfaToken;return jh.getInstance().getDeveloperCredentials(n,r,o,a).then(function(e){return t(t({},null==e?void 0:e.data),{isValid:!0})}).catch(function(e){var t,n,r;return{isValid:!1,status:null===(t=e.response)||void 0===t?void 0:t.status,error:null===(r=null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.data)||void 0===r?void 0:r.data}})})}function Gy(){return Vf(function(e){var t=e.password,n=e.accountCode,r=e.otp,o=e.mfaToken;return jh.getInstance().getDeveloperCredentials(t,n,r,o).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})}function Wy(){return Vf(function(){return jh.getInstance().getOrganizationKeysMetadata().then(function(e){return(null==e?void 0:e.data)||null})})}function Hy(){return Vf(function(e){var t=e.note,n=e.password;return jh.getInstance().patchOrganizationKeysNote({note:t},n).then(function(e){return(null==e?void 0:e.data)||null})})}function Vy(){return Vf(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return jh.getInstance().postOrganizationKeysRoll(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})}function Ky(){return Vf(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return jh.getInstance().postOrganizationKeysTamRequest(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})}function $y(){return Vf(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return jh.getInstance().postOrganizationKeysMarkRevealed(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})}function Qy(e){return Vf(function(e){var t=e.payload;return jh.getInstance().postAuditMonitors(t)},{onMutate:e.onMutate})}function Yy(){return Vf(function(e){var t=e.codes;return jh.getInstance().postResendWebhooks({codes:t}).then(function(e){return null==e?void 0:e.data})})}function Jy(){return Vf(function(e){var t=e.tab,n=e.payload;return jh.getInstance().postUnifiedExport(t,n).then(function(e){return null==e?void 0:e.data})})}function Zy(){return Vf(function(e){return jh.getInstance().postExportApiLogs(e).then(function(e){return null==e?void 0:e.data})})}function Xy(){return Vf(function(e){return jh.getInstance().postExportWebhooksLogs(e).then(function(e){return null==e?void 0:e.data})})}function ev(){return Vf(function(e){return jh.getInstance().postExportDashboardLogs(e).then(function(e){return null==e?void 0:e.data})})}function tv(){return Vf(function(e){return jh.getInstance().postExportMonitorsLogs(e).then(function(e){return null==e?void 0:e.data})})}function nv(t){var o=this;return Vf(function(){return jh.getInstance().createReconciliationReportTemplate(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{onMutate:function(t){return n(o,void 0,void 0,function(){var n,o;return r(this,function(r){switch(r.label){case 0:return[4,Um.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return r.sent(),n=null===(o=Um.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===o?void 0:o.templates,Um.setQueryData(["GET/reconciliation/reports/templates"],function(n){return{templates:e(e([],n.templates,!0),[t],!1)}}),[2,{previousTemplates:n}]}})})},onError:function(e,t,n){Um.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){Um.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})}function rv(e){return Vf(function(){return jh.getInstance().updateReconciliationReportTemplate(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{useErrorBoundary:!1})}function ov(){return Vf(["POST/reconciliation/alerts"],function(e){return jh.getInstance().postReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function av(){return Vf(["DELETE/reconciliation/alerts"],function(e){return jh.getInstance().deleteReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function iv(){return Vf(["UPDATE/reconciliation/alerts"],function(e){return jh.getInstance().updateReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function sv(){return Vf(function(e){var t=e.payload;return jh.getInstance().postCreateInsightsReport(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function cv(){return Vf(function(e){return jh.getInstance().createSamlConfig(e)})}function uv(){return Vf(function(e){return jh.getInstance().updateSamlConfig(e)})}function lv(){return Vf(function(){return jh.getInstance().deleteSamlConfig()})}function dv(e,n){return void 0===n&&(n={}),Vf(function(t){return jh.getInstance().generateAIWorkflowRoutes(e,t).then(function(e){return null==e?void 0:e.data})},t(t({},n),{useErrorBoundary:!1}))}function pv(e){return void 0===e&&(e={}),Vf(function(e){return jh.getInstance().postAIGenerationFeedback(e).then(function(e){return null==e?void 0:e.data})},t(t({},e),{useErrorBoundary:!1}))}function hv(){return Vf(function(e){return jh.getInstance().createChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function fv(){return Vf(function(e){return jh.getInstance().deleteChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function mv(){return Vf(function(e){var t=e.chart_id,n=e.type,r=e.name,o=e.user_prompt,a=void 0===o?"":o;return jh.getInstance().patchChartGPTChart(t,{type:n,name:r,user_prompt:a}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function gv(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){var e,n,o,a,i;return r(this,function(r){switch(r.label){case 0:return[4,jh.getInstance().createChartGPTChart(t)];case 1:if(e=r.sent(),!(n=null!==(a=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.chartgpt_id)&&void 0!==a?a:null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.chart_id))throw new Error("Failed to create chart: No chart ID returned");return[2,{chart_id:n}]}})})},{useErrorBoundary:!1})}function yv(){return Vf(function(e){return jh.getInstance().createChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function vv(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){var e,n,o,a,i;return r(this,function(r){switch(r.label){case 0:return[4,jh.getInstance().createChartGPTChart(t)];case 1:if(e=r.sent(),!(n=null!==(a=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.chartgpt_id)&&void 0!==a?a:null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.chart_id))throw new Error("Failed to create chart: No chart ID returned");return[2,{chart_id:n}]}})})},{useErrorBoundary:!1})}function bv(e,t){var n=e.chartCode,r=Uf();return Vf(function(e){return jh.getInstance().submitChartFeedback(n,{rating:e.rating,issues:e.issues||[],comment:e.comment}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(e){var o;r.invalidateQueries(["chart-feedback",n]),null===(o=null==t?void 0:t.onSuccess)||void 0===o||o.call(t,e)},onError:function(e){var n;null===(n=null==t?void 0:t.onError)||void 0===n||n.call(t,e)}})}function kv(){var e=this;return Vf(["POST/template-reporting/report-templates"],function(t){return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().createTemplateReporting(t).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function _v(){var e=this;return Vf(["POST/template-reporting/report-templates/clone"],function(t){var o=t.templateId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().cloneReportTemplate(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function wv(){var e=this;return Vf(["PATCH/template-reporting/report-templates/selection"],function(t){var o=t.templateId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().updateTemplateSelection(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function Ev(){var e=this;return Vf(["PATCH/template-reporting/report-templates/status"],function(t){var o=t.templateId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().changeTemplateStatus(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function xv(){var e=this;return Vf(["DELETE/template-reporting/report-templates"],function(t){var o=t.templateId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().deleteReportTemplate(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function Sv(){var e=this;return Vf(["POST/template-reporting/report-schedules"],function(t){return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().createReportSchedule(t).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}function Cv(){var e=this;return Vf(["PATCH/template-reporting/report-schedules/disable"],function(t){var o=t.scheduleId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().disableReportSchedule(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}function Iv(){var e=this;return Vf(["DELETE/template-reporting/report-schedules"],function(t){var o=t.scheduleId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().deleteReportSchedule(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}function Rv(){return Vf(function(e){return jh.getInstance().postOrganizationConfigs(e)})}function Tv(){return Vf(function(e){return jh.getInstance().putOrganizationConfigsByAccount(e)})}function Av(){return Vf(["create-installments-plan"],function(e){var t=e.payload;return jh.getInstance().createInstallmentsPlan(t).then(function(e){return null==e?void 0:e.data})})}function Ov(){return Vf(["update-installments-plan"],function(e){var t=e.code,n=e.payload;return jh.getInstance().updateInstallmentsPlan(t,n).then(function(e){return null==e?void 0:e.data})})}function Pv(){return Vf(["delete-installments-plan"],function(e){var t=e.code;return jh.getInstance().deleteInstallmentsPlan(t).then(function(e){return null==e?void 0:e.data})})}function Dv(){return Vf(["bulk-create-installments-plans"],function(e){var t=e.payload;return jh.getInstance().bulkCreateInstallmentsPlans(t).then(function(e){return null==e?void 0:e.data})})}function Lv(){return Vf(["bulk-delete-installments-plans"],function(e){var t=e.payload;return jh.getInstance().bulkDeleteInstallmentsPlans(t).then(function(e){return null==e?void 0:e.data})})}function jv(){var e=Uf();return Vf(["create-recipient"],function(e){var t=e.organizationCode,n=e.payload;return jh.getInstance().createRecipient(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function Nv(){var e=Uf();return Vf(["update-recipient"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.payload;return jh.getInstance().updateRecipient(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function zv(){var e=Uf();return Vf(["delete-recipient"],function(e){var t=e.organizationCode,n=e.recipientId;return jh.getInstance().deleteRecipient(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function qv(){var e=Uf();return Vf(["create-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.payload;return jh.getInstance().createOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function Uv(){var e=Uf();return Vf(["update-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId,o=e.payload;return jh.getInstance().updateOnboarding(t,n,r,o).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function Mv(){var e=Uf();return Vf(["block-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId;return jh.getInstance().blockOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function Bv(){var e=Uf();return Vf(["unblock-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId;return jh.getInstance().unblockOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}var Fv="GET/concierge/alerts",Gv="GET/concierge/alerts/by-id";function Wv(){return Hf([Fv],function(){return jh.getInstance().getConciergeAlerts().then(function(e){return e.data})},{useErrorBoundary:!1})}function Hv(e){return Hf([Gv,e],function(){return jh.getInstance().getConciergeAlertById(e).then(function(e){return e.data})},{enabled:!!e,useErrorBoundary:!1})}function Vv(){return Vf(["POST/concierge/alerts"],function(e){return jh.getInstance().createConciergeAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries([Fv]),Um.invalidateQueries([Gv])},useErrorBoundary:!1})}function Kv(){return Vf(["DELETE/concierge/alerts"],function(e){return jh.getInstance().deleteConciergeAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries([Fv]),Um.invalidateQueries([Gv])},useErrorBoundary:!1})}function $v(){return Vf(["POST/concierge/alerts/enable"],function(e){var t=e.alertId,n=e.payload;return jh.getInstance().enableConciergeAlert(t,n).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries([Fv]),Um.invalidateQueries([Gv])},useErrorBoundary:!1})}var Qv;function Yv(e){var t=this;return Hf(["fetch-payments-lazy",e],function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().postPaymentsLazy(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function Jv(e){return Hf(["fetch-payments-evaluated",e],function(){return jh.getInstance().postPaymentsEvaluated(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function Zv(e){var t=this,o=e.paymentCode,a=e.enabled,i=void 0===a||a,s=jh.getInstance();return Hf(["get-payment-v2",o],function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,s.getPaymentV2(o).then(function(e){return e.data})]})})},{enabled:i,cacheTime:500,useErrorBoundary:!1})}function Xv(e){var t=this,o=e.payment_code,a=e.enabled,i=void 0===a||a,s=jh.getInstance();return Hf(["get-payment-transaction-details-v2",o],function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,s.getTransactionDetailsV2({payment_code:o}).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!o&&i,cacheTime:0,useErrorBoundary:!1})}function eb(e){var t=this,o=e.transaction_code,a=e.enabled,i=void 0===a||a,s=jh.getInstance();return Hf(["get-payment-transaction-raw-response",o],function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,s.getTransactionRawResponse({transaction_code:o})]})})},{enabled:!!o&&i,cacheTime:0,useErrorBoundary:!1})}function tb(e){var t=Am();return Hf(["payment-methods",e],function(){return jh.getInstance().getPaymentMethodsByCountry({provider_id:null==e?void 0:e.provider_id,country:null==e?void 0:e.country},t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!(null==e?void 0:e.provider_id),useErrorBoundary:!1})}function nb(){return Hf({queryKey:["/payment-methods/providers"],queryFn:function(){return jh.getInstance().getPaymentMethodsAndProviders().then(function(e){return null==e?void 0:e.data})},cacheTime:864e5,useErrorBoundary:!1})}function rb(){return Hf(["GET/catalog/card-brands"],function(){return jh.getInstance().getCardBrands().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ob(e,t){return void 0===e&&(e=!0),void 0===t&&(t=xd.PAYMENTS),Hf(["payment-filters",e,t],function(){return jh.getInstance().getPaymentFilters(t).then(function(e){return null==e?void 0:e.data})},{enabled:e,useErrorBoundary:!1,cacheTime:3e5})}function ab(){return Hf(["payment-metrics-filters"],function(){return jh.getInstance().getPaymentMetricsFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ib(e){var t=e.transaction_code,n=e.enabled;return Hf(["payment-transaction-details",t],function(){return jh.getInstance().getPaymentTransactionsDetails({transaction_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function sb(e){var t=e.payment_code,n=e.enabled;return Hf(["transaction-history",t],function(){return jh.getInstance().getTransactionHistoryByPaymentCode({payment_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function cb(e){var t=this;return Hf(["POST/transactions",JSON.stringify(e)],function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().postTransactions(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function ub(e){var t=this;return Hf(["POST/fraud-transactions",JSON.stringify(e)],function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().postFraudTransactions(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function lb(e){return Hf(["GET/payout-detail",JSON.stringify(e)],function(){var t=jh.getInstance();return e.organization_code?t.getPayoutDetails(e).then(function(e){return null==e?void 0:e.data}):{}},{enabled:!!e.organization_code&&!!e&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function db(e){return Hf(["GET/payout-transaction-detail",JSON.stringify(e)],function(){return jh.getInstance().getPayoutTransactionDetails(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!(null==e?void 0:e.transaction_code)&&(null==e?void 0:e.enabled),cacheTime:0,useErrorBoundary:!1})}function pb(e){var t=Am();return Hf(["GET/payout-history-detail",JSON.stringify(e)],function(){return jh.getInstance().getPayoutHistoryDetails(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.payout_code)&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function hb(e,t){var o=this,a=Am();return Hf(["GET/useGetProofOfCancel",a,e,t],function(){return n(o,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getProofOfCancel(e,a,t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!a&&!!t,cacheTime:0,useErrorBoundary:!1})}function fb(e,t){var o=this,a=Am();return Hf(["GET/useGetProofOfPayment",a,e,t],function(){return n(o,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getProofOfPayment(e,a,t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!a&&!!t,cacheTime:0,useErrorBoundary:!1})}function mb(e,t,o){var a=this,i=jh.getInstance();return Hf(["send-payment-notification",e,t],function(){return n(a,void 0,void 0,function(){var n,a;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.sendPaymentNotification(e,t)];case 1:return n=r.sent(),o.onSuccess(),[2,n.data];case 2:throw a=r.sent(),o.onError(),a;case 3:return[2]}})})},{enabled:o.enabled,cacheTime:0,useErrorBoundary:!1})}function gb(e){return Hf(["usePayoutsList",e&&JSON.stringify(e)],function(){var t=jh.getInstance();if(e)return t.postPayouts(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&!!Object.values(e).length,cacheTime:0})}function yb(e){var t=this;void 0===e&&(e=!0);var o=Am();return Hf(["getPayoutsFilters",o],function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getPayoutsFilters(o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{enabled:e&&!!o})}function vb(e,t){var o=this;void 0===t&&(t=!0);var a=Am();return Hf(["getPayoutTimeline",e,a],function(){return n(o,void 0,void 0,function(){var t;return r(this,function(n){return t=jh.getInstance(),e?[2,t.getPayoutTimeline(e,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]:[2]})})},{enabled:t&&!!e&&!!a,cacheTime:500,useErrorBoundary:!1})}function bb(e){var n=e.password,r=e.accountCode,o=e.otp,a=e.mfaToken;return Hf(["developers"],function(){return jh.getInstance().getDeveloperCredentials(n,r,o,a).then(function(e){return t(t({},null==e?void 0:e.data),{isValid:!0})}).catch(function(e){var t,n;return{isValid:!1,status:e.response.status,error:null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.data}})},{enabled:!1,cacheTime:0})}function kb(){return Hf(["fetch-customized-api-keys-members"],function(){return jh.getInstance().getCustomizedApiKeysMembers().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function _b(){return Hf(["developers-get-allowed-ips"],function(){return jh.getInstance().getAllowedIps().then(function(e){return(null==e?void 0:e.data)?t(t({},null==e?void 0:e.data),{isError:!1}):null}).catch(function(e){return t(t({},e),{isError:!0})})},{enabled:!1,cacheTime:0})}function wb(){return Hf(["fetch-customized-api-keys-accounts"],function(){return jh.getInstance().getCustomizedApiKeysAccounts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function Eb(e){return Hf(["fetch-customized-api-keys",e],function(){return jh.getInstance().postCustomizedApiKeys(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0,enabled:!!(null==e?void 0:e.length)})}function xb(){return Hf(["fetch-customized-api-keys-products"],function(){return jh.getInstance().getCustomizedApiKeysProducts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0})}function Sb(){return Vf(["developers-patch-allowed-ips"],function(e){return jh.getInstance().patchAllowedIps(e).then(function(e){return(null==e?void 0:e.data)?t(t({},null==e?void 0:e.data),{isError:!1}):null}).catch(function(e){return t(t({},e),{isError:!0})})},{cacheTime:0})}function Cb(){return Hf(["fetch-organizations"],function(){return jh.getInstance().getOrganization().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function Ib(){return Hf(["fetch-all-organizations",Am()],function(){return jh.getInstance().getAllOrganization().then(function(e){return(null==e?void 0:e.data)||[]})},{cacheTime:36e5,keepPreviousData:!0,useErrorBoundary:!1})}function Rb(e){var t=Am();return Hf(["organizations-provider-params",e],function(e){var n=e.queryKey;return jh.getInstance().getProviderParams(n[1],t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.id),useErrorBoundary:!1})}function Tb(e){var t=e.integration_code,n=e.enabled,r=e.accountCode;return Hf(["integration-params",t,r],function(){return t.includes("undefined")?{}:jh.getInstance().getIntegrationParams({accountCode:r,integration_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:n,useErrorBoundary:!1})}function Ab(e){var t=e.accountCode,n=e.organizationCode,r=Am();return Hf(["organizations-account-integrations",t,n],function(){return jh.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||r}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:!!t,useErrorBoundary:!1})}function Ob(e){var t=e.accountCode,n=e.paymentMethod,r=e.basePath,o=void 0===r?Ad.DEFAULT_ROUTING_TYPE:r;return Hf(["fetch-connections-by-payment-method",n,t,o],function(){return jh.getInstance().getConnectionsByPaymentMethod(t,n,o).then(function(e){return null==e?void 0:e.data})},{enabled:!!n&&!!t,cacheTime:0,useErrorBoundary:!1})}function Pb(){var e=this;return Hf(["fetch-hash-pylon"],function(){return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getHashPylon()]})})},{keepPreviousData:!0,useErrorBoundary:!1})}function Db(){return Hf(["connections"],function(){return jh.getInstance().getConnections().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Lb(){return Hf(["dialogs"],function(){return jh.getInstance().getDialogs().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,retryDelay:2e3,cacheTime:36e5})}function jb(){return Hf(["params-catalog"],function(){return jh.getInstance().getWebhookParamsV2().then(function(e){return null==e?void 0:e.data})})}function Nb(e){var t=e.accountCode,n=e.name;return Hf(["webhooks",t,n],function(){return jh.getInstance().getWebhooksV3({accountCode:t,name:n}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,useErrorBoundary:!1})}function zb(e){var t=e.accountCode,n=e.enabled;return Hf(["webhooks-detail",t],function(){return jh.getInstance().getWebhooksV2Detail({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!n})}function qb(e){var t,n=Am(),r=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return Hf({queryKey:["accounts",r],queryFn:function(){return jh.getInstance().getAccounts(r).then(function(e){return null==e?void 0:e.data})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!r})}function Ub(e){return Hf(["accountsV2",e],function(){return jh.getInstance().getAccountsV2().then(function(e){return(null==e?void 0:e.data)||[]}).catch(function(e){throw e})},{keepPreviousData:!0,enabled:!!e,useErrorBoundary:!1})}function Mb(e){return Hf(["accountsV2-by-user",e],function(){return e?jh.getInstance().getAccountsByUser(e).then(function(e){return{accountsV2ByUser:(null==e?void 0:e.data)||null}}).catch(function(e){return{accountsV2ByUser:[],error:e}}):{accountsV2ByUser:[]}},{enabled:!!e,staleTime:0})}function Bb(e,t){var o=this;return Hf({queryKey:["accounts-for-impersonation",e,t],queryFn:function(){return n(o,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getAccountsForImpersonation(e).then(function(e){var n,r;return(null===(r=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.response)||void 0===r?void 0:r.map(function(e){return{label:e.name,value:t?e.code_testing:e.code_live,code_live:e.code_live,code_testing:e.code_testing}}))||[]})]})})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function Fb(e){var t=this;return Hf({queryKey:["roles-for-impersonation",e],queryFn:function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().getRolesForImpersonation(e).then(function(e){var t,n;return(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.roles)||void 0===n?void 0:n.map(function(e){return{label:e.name,value:e.id}}))||[]})]})})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function Gb(e){return Hf({queryKey:["pending-duplicate-accounts",e],queryFn:function(){return jh.getInstance().getPendingDuplicateAccounts()},useErrorBoundary:!1,keepPreviousData:!0,refetchInterval:e})}function Wb(){return Hf(["menu"],function(){return jh.getInstance().getMenu().then(function(e){return mh(e)?wh:null==e?void 0:e.data}).catch(function(){return wh})})}function Hb(){return Hf(["/payment/statuses/style"],function(){return jh.getInstance().useGetPaymentStatusesStyles().then(function(e){return mh(e)?gh:null==e?void 0:e.data}).catch(function(){return gh})})}function Vb(){return Hf(["/transaction/statuses/style"],function(){return jh.getInstance().useGetTransactionStatusesStyles().then(function(e){return mh(e)?yh:null==e?void 0:e.data}).catch(function(){return yh})},{cacheTime:36e5,useErrorBoundary:!1})}function Kb(){return Hf(["/reconciliation/transaction/statuses/style"],function(){return jh.getInstance().useGetReconciliationTransactionStatusesStyles().then(function(e){return mh(e)?vh:null==e?void 0:e.data}).catch(function(){return vh})},{useErrorBoundary:!1})}function $b(){return Hf(["timezone-catalog"],function(){return jh.getInstance().useGetTimeZoneCatalog().then(function(e){return mh(e)?bh:null==e?void 0:e.data}).catch(function(){return bh})})}function Qb(){return Hf(["/cms/audit-logs-filters"],function(){return jh.getInstance().useGetAuditLogsFilters().then(function(e){return mh(e)?kh:null==e?void 0:e.data}).catch(function(){return kh})})}function Yb(){return Hf(["/cms/static-contents"],function(){return jh.getInstance().getDashboardStaticContents().then(function(e){var t,n;return mh(e)?_h:(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||{}})},{cacheTime:6048e5,useErrorBoundary:!1})}function Jb(){return Hf(["/cms/locales"],function(){return jh.getInstance().getLocales().then(function(e){return mh(e)?Eh:e.data}).catch(function(){return Eh})})}function Zb(e,t){return void 0===t&&(t=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-methods",e,t],function(){return jh.getInstance().getSmartRoutingMethods(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function Xb(e,t,n){return void 0===n&&(n=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-workflow",t,e,n],function(){return jh.getInstance().getSmartRoutingWorkflow(e,t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e,cacheTime:0,retry:!1})}function ek(e,t,n){return void 0===n&&(n=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-condition-types",e,t,n],function(){return jh.getInstance().getSmartRoutingConditionTypes(e,t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e})}function tk(e,t){return Hf(["smart-routing-condition-payment-method",e,t],function(){return jh.getInstance().getSmartRoutingConditionPaymentMethod(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:null!==t})}function nk(e,t){return Hf(["smart-routing-condition-types-values",t,e],function(){return jh.getInstance().getSmartRoutingConditionTypesValues(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!e,useErrorBoundary:!1})}function rk(e){var t=e.accountCode,n=e.workflowVersionId,r=e.routingType,o=void 0===r?Ad.DEFAULT_ROUTING_TYPE:r;return Hf(["smart-routing-workflow-version",n,t,o],function(){return jh.getInstance().getSmartRoutingWorkflowVersion(t,n,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})}function ok(e,t,n,r){return void 0===r&&(r=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-next-route",e,n,t,r],function(){return jh.getInstance().getSmartRoutingNextSteps(e,t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,useErrorBoundary:!1})}function ak(e,t){return void 0===t&&(t=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-decline-groups",e,t],function(){return jh.getInstance().getSmartRoutingDeclinedGroup(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function ik(e,t,n){return void 0===n&&(n=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-payment-route",e,t,n],function(){return jh.getInstance().getSmartRoutingPaymentRoute(e,t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!t,cacheTime:0,useErrorBoundary:!1})}function sk(e,t){return void 0===t&&(t=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-simulate-condition-type-values",e,t],function(){return jh.getInstance().getSmartRoutingSimulateConditionTypeValues(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function ck(e){var t=e.text,n=e.conditionType;return Hf(["smart-routing-search-condition-values",t,n],function(){return jh.getInstance().getSmartRoutingSearchConditionValues(n,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})}function uk(){return Hf(["smart-routing-conversion-rates"],function(){return jh.getInstance().getProviderConversionRatesData().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!1,useErrorBoundary:!1})}function lk(){var e=this;return Hf({queryKey:["smart-routing-3ds-excemptions"],queryFn:function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})}function dk(){var e=this;return Hf({queryKey:["smart-routing-network-tokens-onboarding"],queryFn:function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})}function pk(e){return Hf(["fetch-routing-monitors-templates",e],function(){return jh.getInstance().getRoutingMonitorsTemplates(e).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function hk(e,t){return Hf(["fetch-routing-monitors-template",e],function(){return jh.getInstance().getRoutingMonitorsTemplate(e,t).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e&&!!t&&"NONE"!==e,useErrorBoundary:!1})}function fk(e,n){var r=e.accountCode;return Hf(["checkouts",r],function(){return jh.getInstance().getCheckouts({accountCode:r}).then(function(e){return e.data})},t({cacheTime:0,enabled:Boolean(r),useErrorBoundary:!1},n))}!function(e){e.IN_PROGRESS="IN_PROGRESS",e.COMPLETED="COMPLETED",e.FAILED="FAILED"}(Qv||(Qv={}));var mk=function(e){return["checkout-builder-name-and-icon",e.paymentMethodType,e.type]},gk=function(e,t){var n=e.paymentMethodType,r=e.type;return Hf(mk({paymentMethodType:n,type:r}),function(){return jh.getInstance().getNameAndIcon({paymentMethodType:n,type:r}).then(function(e){return null==e?void 0:e.data})},t)},yk=function(e){return["checkout-builder-required-fields",e.paymentMethodType,e.type]},vk=function(e,t){var n=e.paymentMethodType,r=e.type;return Hf(yk({paymentMethodType:n,type:r}),function(){return jh.getInstance().getRequiredFields({paymentMethodType:n,type:r}).then(function(e){return null==e?void 0:e.data})},t)},bk=function(e){return Hf(["checkout-builder-country-data",e],function(){return jh.getInstance().getCountryData({accountCode:e}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:Boolean(e),useErrorBoundary:!1})},kk=function(e){return["checkout-payment-method-accounts",e.paymentMethod,e.organizationCode]},_k=function(e,n){var r=e.paymentMethod,o=e.organizationCode;return Hf(kk({paymentMethod:r,organizationCode:o}),function(){return jh.getInstance().getPaymentMethodAccounts({paymentMethod:r,organizationCode:o}).then(function(e){return null==e?void 0:e.data})},t({cacheTime:0,enabled:Boolean(r),useErrorBoundary:!1},n))};function wk(e){var t=e.accountCode;return Hf(["styling-sdk-dynamic",t],function(){return jh.getInstance().getStylingSdkDynamic({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Ek(e){var t=e.accountCode;return Hf(["styling-settings-v2",t],function(){return jh.getInstance().getStylingSettingsV2({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function xk(){return Vf(function(e){var t=e.accountCode,n=e.payload;return jh.getInstance().changeStylingSettings({accountCode:t,payload:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function Sk(e){return Hf(["notifications-customer",e],function(){return jh.getInstance().getNotificationsCustomer(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,keepPreviousData:!1})}function Ck(e){return Hf(["validate-opsgenie-key",e],function(){return jh.getInstance().getValidateOpsgenieKey(e).then(function(e){return null==e?void 0:e.data}).catch(function(){return{error:!0}})},{enabled:!!e,cacheTime:0})}function Ik(){return Hf(["notifications-merged"],function(){return jh.getInstance().getMergedNotifications().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{keepPreviousData:!1,cacheTime:0})}function Rk(){return Vf(function(e){return jh.getInstance().getNotificationsNumber(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Tk(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().pathNotification(t)];case 1:return[2,null==(e=n.sent())?void 0:e.data]}})})})}var Ak={key:"metadata_fields",name:"metadata_fields",unique_key:"metadata_fields"};function Ok(){return Hf(["reports"],function(){return jh.getInstance().reportsList().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Pk(e){return void 0===e&&(e=!0),Hf(["reports-multi-env"],function(){return jh.getInstance().reportsListMultiEnv().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e})}function Dk(e,t,n){return void 0===t&&(t=!1),Hf(["reports/".concat(e)],function(){return jh.getInstance().downloadReports(e).then(function(e){return null==e?void 0:e.data})},{enabled:t,onSuccess:n,useErrorBoundary:!1})}function Lk(e){return Hf(["GET/reports/templates"],function(){return jh.getInstance().getReportTemplates().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,useErrorBoundary:!1})}function jk(t,o,a){var i=this;return Hf(["GET/reports/columns/".concat(o,"/").concat(a)],function(){return n(i,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().getReportColumns(o,a).then(function(t){return o===Td.ALL&&a===Rd.PAYMENTS?e(e([],(null==t?void 0:t.data)||[],!0),[Ak],!1):null==t?void 0:t.data}).catch(function(e){return e})]})})},{enabled:t,useErrorBoundary:!1})}function Nk(e,t){var o=this,a=Am();return Hf(["getRefundPdf",e,a,t],function(){return n(o,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getRefundPdf(e,a,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})]})})},{enabled:!!e&&!!a,useErrorBoundary:!1})}function zk(){var e=Am();return Hf(["teams-filters-members"],function(){return jh.getInstance().teamsFiltersMembers({organizationCode:e}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0})}function qk(e){var t=e.organizationCode,n=e.accountCodes,r=e.search,o=e.status,a=e.roleId,i=e.statuses,s=e.roleIds,c=e.page,u=e.pageSize,l=Am();return Hf(["fetch-post-members-v2",t,n,r,o,a,i,s,c,u],function(){return jh.getInstance().postMembersPaginatedV2({organizationCode:l,accountCodes:n,search:r,status:o,roleId:a,statuses:i,roleIds:s,page:c,pageSize:u}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!n,cacheTime:0,useErrorBoundary:!1})}function Uk(){return Hf(["fetch-roles"],function(){return jh.getInstance().getRoles().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Mk(){return Hf(["fetch-rolespermissions"],function(){return jh.getInstance().getRolesPermissions().then(function(e){return null==e?void 0:e.data})})}function Bk(){return Hf(["fetch-permissions-catalog"],function(){return jh.getInstance().getPermissionsCatalog().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Fk(){return Hf(["fetch-org-roles-permissions"],function(){return jh.getInstance().getOrgRolesPermissions().then(function(e){return null==e?void 0:e.data})})}function Gk(){return Hf(["fetch-org-permissions-catalog"],function(){return jh.getInstance().getOrgPermissionsCatalog().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Wk(e){var t=e.exportCode,n=e.enabled;return Hf(["user-export-status",t],function(){return jh.getInstance().getUserExportStatus({exportCode:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),refetchInterval:function(e){return("PENDING"===(null==e?void 0:e.status)||"IN_PROGRESS"===(null==e?void 0:e.status))&&5e3},useErrorBoundary:!1})}function Hk(e){var t=e.page,n=void 0===t?0:t,r=e.pageSize,o=void 0===r?20:r,a=e.enabled;return Hf(["user-exports-list",n,o],function(){return jh.getInstance().listUserExports({page:n,pageSize:o}).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===a||a,useErrorBoundary:!1})}function Vk(){var e=this,t=Uf();return function(o){return n(e,void 0,void 0,function(){return r(this,function(e){return[2,t.fetchQuery(["user-export-status",o],function(){return jh.getInstance().getUserExportStatus({exportCode:o}).then(function(e){return null==e?void 0:e.data})})]})})}}function Kk(e){return Hf(["data-report",e],function(){return jh.getInstance().getSmartRoutingDataReport(e).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,useErrorBoundary:!1})}function $k(e,t,n,r){void 0===n&&(n=!0);return Hf(["get-insights-conversion-rate-metrics-v2",e,t],function(){return jh.getInstance().getInsightsMetricsConversionRateV2(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:n&&(!!(null==e?void 0:e.currency_code)&&"Empty"!==(null==e?void 0:e.currency_code)&&"string"==typeof(null==e?void 0:e.currency_code)||Array.isArray(null==e?void 0:e.currency_code)&&0===(null==e?void 0:e.currency_code.length)),staleTime:200,cacheTime:200,useErrorBoundary:!1,retry:1})}function Qk(e,t){return Hf(["get-insights-conversion-rate-view-more-metrics",t,e],function(){return jh.getInstance().getInsightsMetricsConversionRateViewMore(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled)&&!!t,cacheTime:200,useErrorBoundary:!1})}function Yk(e){return Hf(["get-insights-conversion-rate-fallback-metrics",e],function(){return jh.getInstance().getInsightFallbackMetrics(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled),cacheTime:200,useErrorBoundary:!1})}function Jk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Hf(["get-insights-volume-metrics",t,e],function(){return jh.getInstance().getInsightsMetricsVolume(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function Zk(e,t,n,r){return void 0===r&&(r=!0),delete t.account_code,Hf(["get-insights-volume-metrics-v2",t,e,n],function(){return jh.getInstance().getInsightsMetricsVolumeV2(e,n,t).then(function(e){return null==e?void 0:e.data})},{enabled:r,cacheTime:200,useErrorBoundary:!1})}function Xk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Hf(["get-insights-total-payment-fraud-metrics",t,e],function(){return jh.getInstance().getInsightsMetricsTotalPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function e_(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Hf(["get-insights-customer-payment-fraud-metrics",t,e],function(){return jh.getInstance().getInsightsMetricsCustomerPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function t_(e){return Hf(["get-insights-overview",e],function(){return jh.getInstance().getInsightOverview(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled)&&void 0!==e.account_code,cacheTime:200,useErrorBoundary:!1})}function n_(e,t){var n=!!(null==e?void 0:e.enabled)&&void 0!==(null==e?void 0:e.account_code);return Hf(["get-insights-overview-v3",e,t],function(){return jh.getInstance().getInsightOverviewV3(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:0,useErrorBoundary:!1})}function r_(e){return Hf(["get-insights-home-metrics",e],function(){return jh.getInstance().getInsighstHomeMetrics(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.currency_code)&&!!(null==e?void 0:e.account_codes)&&!!(null==e?void 0:e.organization_code)&&(null==e?void 0:e.isLiveMode)&&!!(null==e?void 0:e.timezone),cacheTime:200,useErrorBoundary:!1})}function o_(e){return Hf(["get-insights-reports",e],function(){return jh.getInstance().getInsightsReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!(null==e?void 0:e.type),cacheTime:0,useErrorBoundary:!1})}function a_(e){return Hf(["get-insights-reports-again",e],function(){return jh.getInstance().getInsightsReportAgain(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!(null==e?void 0:e.code),cacheTime:0,useErrorBoundary:!1})}function i_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-fraud-screening-volume-and-count-tx",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsFraudScreeningVolumeAndCountTx(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function s_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-fraud-screening-conversion-rate",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsFraudScreeningConversionRate(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function c_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-3ds-volume-and-count-tx",t,e],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsights3dsVolumeAndCountTx(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function u_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-3ds-conversion-rate-and-evolution",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsights3dsConversionRateAndEvolution(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function l_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-3ds-decline-reasons",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsights3dsDeclineReasons(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function d_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-3ds-frictionless-vs-challenge",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsights3dsFrictionlessVsChallenge(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function p_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-volume-and-count-tx",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksVolumeAndCountTx(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function h_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-total-rate-and-evolution",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksTotalRateAndEvolution(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function f_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-win-rate",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksWinRate(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function m_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-disputed",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksDisputed(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function g_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksByProviderAndCardBrand(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function y_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-reasons-distribution",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksReasonsDistribution(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function v_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-status-distribution",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksStatusDistribution(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function b_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-by-card-brand",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksByCardBrand(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function k_(e,t){return Hf(["fetch-reconciliation-transaction",e],function(){return jh.getInstance().getReconciliationTransactions(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})}function __(e,t){return Hf(["fetch-reconciliation-settlements",e],function(){return jh.getInstance().getReconciliationSettlements(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})}function w_(e,t){return Hf(["fetch-reconciliation-metrics",e],function(){return jh.getInstance().getReconciliationMetrics(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t,cacheTime:500})}function E_(){return Hf(["GET-reconciliation-filters"],function(){return jh.getInstance().getReconciliationFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function x_(e){return Hf(["GET/v1/reconciliation/table/".concat(e,"/columns")],function(){return jh.getInstance().getAllTableColumns(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function S_(){return Hf(["GET/v1/reconciliation/active"],function(){return jh.getInstance().getReconciliationActive().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{useErrorBoundary:!1})}function C_(e,t,n){return Hf(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],function(){return jh.getInstance().getReconciliationsReportColumns(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})}function I_(e){return Hf(["GET/reconciliation/reports/templates"],function(){return jh.getInstance().getReconciliationReportTemplates().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})}function R_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/alerts/list",t,n],function(){return jh.getInstance().getReconciliationAlerts(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function T_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/agenda/list",t,n],function(){return jh.getInstance().getReconciliationAgenda(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function A_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/agenda/insights",t,n],function(){return jh.getInstance().getReconciliationAgendaInsightByKey(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function O_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/sales/list",t,n],function(){return jh.getInstance().getReconciliationSales(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function P_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/advancements/list",t,n],function(){return jh.getInstance().getReconciliationAdvancements(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function D_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/fees/list",t,n],function(){return jh.getInstance().getReconciliationFees(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function L_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-conflicts-summary",t],function(){return jh.getInstance().getReconciliationInsightsConflictsSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function j_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-not-reconciled-aggregators",t],function(){return jh.getInstance().getReconciliationInsightsNotReconciledAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function N_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-not-reconciled-list",t],function(){return jh.getInstance().getReconciliationInsightsNotReconciledList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function z_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-status-conflict-aggregators",t],function(){return jh.getInstance().getReconciliationInsightsStatusConflictAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function q_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-status-conflict-list",t],function(){return jh.getInstance().getReconciliationInsightsStatusConflictList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function U_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-amount-conflict-aggregators",t],function(){return jh.getInstance().getReconciliationInsightsAmountConflictAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function M_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-amount-conflict-list",t],function(){return jh.getInstance().getReconciliationInsightsAmountConflictList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function B_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-conflict-date-summary",t],function(){return jh.getInstance().getReconciliationInsightsConflictDateSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function F_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-conflict-date-aggregators",t],function(){return jh.getInstance().getReconciliationInsightsConflictDateAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function G_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-conflict-date-list",t],function(){return jh.getInstance().getReconciliationInsightsConflictDateList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function W_(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Hf(["reconciliation-insights-incorrect-fees-summary",t,n],function(){return jh.getInstance().getReconciliationInsightsIncorrectFeesSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})}function H_(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Hf(["reconciliation-insights-incorrect-fees-aggregators",t,n],function(){return jh.getInstance().getReconciliationInsightsIncorrectFeesAggregators(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})}function V_(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Hf(["reconciliation-insights-incorrect-fees-list",t,n],function(){return jh.getInstance().getReconciliationInsightsIncorrectFeesList(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})}function K_(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Hf(["reconciliation-insights-fees-charged-summary",t,n],function(){return jh.getInstance().getReconciliationInsightsFeesChargedSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})}function $_(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Hf(["reconciliation-insights-reconciled-summary",t,n],function(){return jh.getInstance().getReconciliationInsightsReconciledSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})}function Q_(e){var t=e.body,n=e.dateFilter,r=e.transactionType,o=e.enabled;return Hf(["reconciliation-insights-reconciled-aggregators",t,n,r],function(){return jh.getInstance().getReconciliationInsightsReconciledAggregators(t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===o||o,useErrorBoundary:!1})}function Y_(e){var t=e.body,n=e.dateFilter,r=e.transactionType,o=e.enabled;return Hf(["reconciliation-insights-reconciled-list",t,n,r],function(){return jh.getInstance().getReconciliationInsightsReconciledList(t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===o||o,useErrorBoundary:!1})}function J_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-not-confirm-summary",t],function(){return jh.getInstance().getReconciliationInsightsNotConfirmSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function Z_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-not-confirm-aggregators",t],function(){return jh.getInstance().getReconciliationInsightsNotConfirmAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function X_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-not-confirm-list",t],function(){return jh.getInstance().getReconciliationInsightsNotConfirmList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function ew(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-amount-to-be-settled-summary",t],function(){return jh.getInstance().getReconciliationInsightsAmountToBeSettledSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function tw(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-reconciliation-rate-by-provider",t],function(){return jh.getInstance().getReconciliationInsightsReconciliationRateByProvider(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function nw(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-reconciliation-rate-by-account",t],function(){return jh.getInstance().getReconciliationInsightsReconciliationRateByAccount(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function rw(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-reconciliation-rate-by-currency",t],function(){return jh.getInstance().getReconciliationInsightsReconciliationRateByCurrency(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function ow(e){var t=this,o=Object.values(e).filter(Boolean);return Hf(["feature-flags",o],function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().getFeatureFlagId(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:o.length>1,useErrorBoundary:!1})}function aw(e){var t=this,o=Hf({queryKey:["all-feature-flags",Object.values(e).filter(Boolean)],queryFn:function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().getFeatureFlagIdAll({accountCode:e.account_code}).then(function(e){return null==e?void 0:e.data})]})})},enabled:!!e.account_code&&!!e.organization_code&&!!e.email,cacheTime:9e5,useErrorBoundary:!1}),a=Uf();return u(function(){a.setQueryData(["cached-feature-flags"],o)},[o,a]),o}function iw(e){var n,r,o=Uf(),a=o.getQueryState(["cached-feature-flags"]),i=Boolean(!(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.status)||"loading"===(null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.status)),s=Hf({queryKey:["cached-feature-flags"],queryFn:function(){},enabled:!1,select:function(t){var n;return{result:null===(n=null==t?void 0:t.data)||void 0===n?void 0:n[e]}},initialData:function(){var e=o.getQueryData(["cached-feature-flags"]);return(null==e?void 0:e.data)||{}}});return t(t({},s),{isLoading:i})}function sw(e){return Hf(["events",e],function(){return jh.getInstance().getAuditEvents(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.account_code&&!!e.organizationCode,cacheTime:0,keepPreviousData:!0,useErrorBoundary:!1})}function cw(e){return Hf(["audit-monitor-event-detail",e],function(){return jh.getInstance().getAuditMonitorDetail(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:null!==e,cacheTime:0,useErrorBoundary:!1})}function uw(e){return Hf(["api-logs",e],function(){return jh.getInstance().postApiLogs({payload:e}).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.organizationCode,cacheTime:0,useErrorBoundary:!1})}function lw(e){var t=e.params;return Hf(["webhook-logs",t],function(){return jh.getInstance().postWebhookLogs({payload:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.organizationCode,cacheTime:0,useErrorBoundary:!1})}function dw(e,t){return Hf(["api-logs-detail",e,t],function(){return jh.getInstance().getApiLogsDetailByPaymentCode(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function pw(e,t){return Hf(["api-logs-by-transaction",e,t],function(){return jh.getInstance().getApiLogsByTransactionCode(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!t,cacheTime:0,useErrorBoundary:!1})}function hw(e,t){return void 0===t&&(t=!0),Hf(["audit-exports-list",e],function(){return jh.getInstance().getAuditExportsList(e).then(function(e){return null==e?void 0:e.data})},{enabled:t,cacheTime:0,useErrorBoundary:!1})}function fw(e,t,n){return void 0===t&&(t=!1),Hf(["audit-export-download",e],function(){return jh.getInstance().getAuditExportDownload(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&t,cacheTime:0,useErrorBoundary:!1,onSuccess:n})}function mw(e){var t=e.tab,n=e.exportId,r=e.enabled,o=void 0!==r&&r,a=e.onSuccess;return Hf(["unified-export-status",t,n],function(){return jh.getInstance().getUnifiedExportStatus(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!n&&o,cacheTime:0,useErrorBoundary:!1,onSuccess:a})}function gw(e){var t=e.tab,n=e.page,r=void 0===n?0:n,o=e.size,a=void 0===o?10:o,i=e.enabled;return Hf(["unified-exports-list",t,r,a],function(){return jh.getInstance().getUnifiedExportsList(t,r,a).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===i||i,cacheTime:0,useErrorBoundary:!1})}function yw(e){return Hf(["api-logs-stats-requests",e],function(){return jh.getInstance().postApiLogsStatsRequests(t({},e)).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.start_date,cacheTime:0,useErrorBoundary:!1})}function vw(e){return Hf(["api-logs-stats-errors",e],function(){return jh.getInstance().postApiLogsStatsErrors(t({},e)).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.start_date,cacheTime:0,useErrorBoundary:!1})}function bw(e){return Hf(["api-logs-stats-errors-by-endpoint",e],function(){return jh.getInstance().postApiLogsStatsErrorsByEndpoint(t({},e)).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.start_date,cacheTime:0,useErrorBoundary:!1})}function kw(e){return Hf(["api-logs-list",e],function(){return jh.getInstance().postApiLogsList(t({},e)).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.start_date,cacheTime:0,useErrorBoundary:!1})}function _w(e){var t=e.paymentCode,n=e.createdAtFrom,r=e.enabled;return Hf(["api-logs-v2-payment",t,n],function(){return jh.getInstance().getApiLogsV3ByPaymentCode(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:(void 0===r||r)&&!!t,cacheTime:0,useErrorBoundary:!1})}function ww(e,t){return Hf(["fetch-payment-links",e,t],function(){return jh.getInstance().getPaymentLinks(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,cacheTime:0})}function Ew(e){return Hf(["payment-link"],function(){return jh.getInstance().getPaymentLinksByCode(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})}function xw(e){return void 0===e&&(e=!0),Hf(["countries",e],function(){return jh.getInstance().useGetCountriesConfig().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,keepPreviousData:!0})}function Sw(e){var t=localStorage.getItem("lang")||"en",n=e||t;return Hf(["countries-v2",n],function(){return jh.getInstance().useGetCountriesConfigV2(n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!0,keepPreviousData:!0})}function Cw(e){return Hf(["timezone"],function(){return jh.getInstance().getTimezone(e).then(function(e){return mh(e)?bh:null==e?void 0:e.data}).catch(function(){return bh})},{enabled:!0,keepPreviousData:!0})}function Iw(e,t){return void 0===t&&(t=!0),Hf(["subscription",e],function(){return jh.getInstance().getSubscriptionByCode(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&t,cacheTime:500})}function Rw(e,t,n,r){return void 0===r&&(r=!0),Hf(["subscription-payments",e,t,n],function(){return jh.getInstance().getSubscriptionPayments(e,t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&r,cacheTime:0})}function Tw(e){return Vf(function(e){var t=e.payload;return jh.getInstance().firebaseUserSubscribe(t)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Aw(e,t){return Hf(["get-cofig-allow-list",e],function(){return jh.getInstance().getConfigAllowlist(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0,enabled:!!e&&!!t})}function Ow(e,t){return void 0===t&&(t=!0),Hf(["get-black-list",e],function(){return jh.getInstance().getBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e&&t})}function Pw(e,t,n,r){var o;return Hf(["post-black-list",e],function(){return jh.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=r?r:25).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:(null===(o=e[0])||void 0===o?void 0:o.length)>0&&null!==t,useErrorBoundary:!1})}function Dw(e,t,n){return Hf(["get-block-list-summary",e,t,n],function(){var r=jh.getInstance();return n?r.getBlackListSummary(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e}):Promise.resolve({})},{enabled:!!e&&!!n})}function Lw(e,t,n,r,o,a){return Hf(["black-list-detail",e,t,r,o,a],function(){return jh.getInstance().getBlacklistDetail(e,t,n,r,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&a,cacheTime:0})}function jw(e,t,n){return Hf(["allow-list-detail",e],function(){return jh.getInstance().getAllowlistDetail(e,t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e&&!!n})}function Nw(e,t){return void 0===t&&(t=!0),Hf(["query-post-get-allowlist-multi-account",JSON.stringify(e)],function(){return jh.getInstance().postGetAllowlist({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e&&t,cacheTime:0})}function zw(e,t){var o=this;return void 0===e&&(e=26),void 0===t&&(t=0),Hf(["batch-refunds",e,t],function(){return n(o,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getBatchRefunds(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{cacheTime:0})}function qw(e){return Hf(["velocity-rules",e],function(){var t=jh.getInstance();return e?t.getVelocityRules(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e}):Promise.resolve({})},{enabled:!!e,keepPreviousData:!0})}function Uw(){return Hf(["config-rules"],function(){return jh.getInstance().getAllConfigRules().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0})}function Mw(e,t){var n=e.organizationCode;return Hf(["mfa-excluded-users",n],function(){return jh.getInstance().getMFAExcludedUsers({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function Bw(e,t){var n=e.organizationCode;return Hf(["mfa-config",n],function(){return jh.getInstance().getMFAConfig({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function Fw(e,t){return Hf(["mfa-enforcement-status",e.accountCode],function(){return jh.getInstance().getMFAEnforcementStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function Gw(e){return Hf(["fetch-organization-saml-config",e],function(){return jh.getInstance().getSamlConfig().then(function(e){return e.data})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Ww(e){return Hf(["chartgpt-chart-execute",e],function(){return jh.getInstance().executeChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e})}function Hw(){return Hf(["chartgpt-user-charts"],function(){return jh.getInstance().getChartsByUser().then(function(e){return null==e?void 0:e.data})},{cacheTime:0})}function Vw(){var e=this;return Hf(["chartgpt-user-charts-with-results"],function(){return n(e,void 0,void 0,function(){var e,o,a,i=this;return r(this,function(s){switch(s.label){case 0:return[4,(e=jh.getInstance()).getChartsByUser()];case 1:return o=s.sent(),a=(null==o?void 0:o.data)||[],[4,Promise.all(a.map(function(o){return n(i,void 0,void 0,function(){var n,a,i,s,c,u,l,d;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e.executeChartGPTChart(o.code)];case 1:return n=r.sent(),[2,t(t({},o),{user_prompt:null!==(s=null===(i=null==n?void 0:n.data)||void 0===i?void 0:i.user_prompt)&&void 0!==s?s:o.user_prompt,unit_to_display:null!==(u=null===(c=null==n?void 0:n.data)||void 0===c?void 0:c.unit_to_display)&&void 0!==u?u:o.unit_to_display,results:null!==(d=null===(l=null==n?void 0:n.data)||void 0===l?void 0:l.results)&&void 0!==d?d:[]})];case 2:return a=r.sent(),console.error("Failed to execute chart ".concat(o.chart_id,":"),a),[2,t(t({},o),{results:[]})];case 3:return[2]}})})}))];case 2:return[2,s.sent()]}})})})}function Kw(e,t,o){var a=this;return void 0===o&&(o=!0),Hf(["chartgpt-patch-and-execute",e,t],function(){return n(a,void 0,void 0,function(){var n,o,a,i,s;return r(this,function(r){switch(r.label){case 0:return[4,(n=jh.getInstance()).patchChartGPTChart(e,t)];case 1:return o=r.sent(),a=null==o?void 0:o.data,[4,n.executeChartGPTChart(e)];case 2:return i=r.sent(),s=null==i?void 0:i.data,[2,{chart:a,execution:s}]}})})},{enabled:o&&!!e,retry:!1})}function $w(e){var t=this,o=e.chartCode,a=e.enabled;return Hf(["chart-feedback",o],function(){return n(t,void 0,void 0,function(){var e,t,n,a,i;return r(this,function(r){switch(r.label){case 0:e=jh.getInstance(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.getChartFeedback(o)];case 2:return t=r.sent(),(n=null==t?void 0:t.data)&&n.rating?[2,n]:[2,null];case 3:if(a=r.sent(),404===(null===(i=null==a?void 0:a.response)||void 0===i?void 0:i.status))return[2,null];throw a;case 4:return[2]}})})},{enabled:(void 0===a||a)&&!!o,staleTime:3e5})}function Qw(){return Hf(["languages"],function(){return jh.getInstance().getLanguages().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:300})}function Yw(){var e=localStorage.getItem("lang")||"en";return Hf(["translations",e],function(){return jh.getInstance().getTranslations(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:3e4})}function Jw(e){var t=this;return Hf({queryKey:["network-tokens-onboarding",e],queryFn:function(){return n(t,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,jh.getInstance().getNetworkTokensOnboardingByOrganization(e)];case 1:return[2,t.sent().data]}})})},enabled:!!e,useErrorBoundary:!1,cacheTime:0})}var Zw=function(e){if(!e)return"";var t=new Date(e);return"".concat(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getUTCMonth()]," ").concat(t.getUTCDate())},Xw=function(e,t,n){if(!t||!n)return e||[];var r=function(e,t){var n=[],r=new Date(e),o=new Date(t);r.setUTCHours(0,0,0,0),o.setUTCHours(0,0,0,0);for(var a=new Date(r);a<=o;)n.push(a.toISOString()),a.setUTCDate(a.getUTCDate()+1);return n}(t,n),o=new Map;return null==e||e.forEach(function(e){if(e.date){var t=new Date(e.date).toISOString().split("T")[0];o.set(t,e.value)}}),r.map(function(e){var t=e.split("T")[0];return{date:e,value:o.get(t)||"0"}})},eE=function(e){var t,n=null===(t=e.plots)||void 0===t?void 0:t[0];if(!n||!n.rows)return{distribution:[],total:0};var r=parseFloat(n.value||"0");return{distribution:n.rows.map(function(e){var t,n=100*parseFloat(e.value),o=Math.round(r*parseFloat(e.value));return{key:(null===(t=e.label)||void 0===t?void 0:t.toUpperCase())||"UNKNOWN",total:o,percentage:n,amount:o}}),total:r}},tE=function(e,t,n){var r,o={};return null===(r=e.plots)||void 0===r||r.forEach(function(e){var r=Xw(e.rows,t,n),a=e.label;o[a]=r.map(function(e){return{key:e.date||"",total:100*parseFloat(e.value),current_label:Zw(e.date||""),current_amount:100*parseFloat(e.value)}})}),o},nE=function(e,t,n){var r,o=null===(r=e.plots)||void 0===r?void 0:r[0];return{distribution:Xw(null==o?void 0:o.rows,t,n).map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Zw(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==o?void 0:o.value)||"0"),total_amount:parseFloat((null==o?void 0:o.value)||"0")}},rE=function(e,t,n){var r,o=null===(r=e.plots)||void 0===r?void 0:r[0];return{distribution:Xw(null==o?void 0:o.rows,t,n).map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Zw(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==o?void 0:o.value)||"0"),total_amount:parseFloat((null==o?void 0:o.value)||"0")}},oE=function(e,o){return Hf(t({queryKey:["smart-recovery-communications-by-day",e],queryFn:function(){return n(void 0,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return t=jh.getInstance(),n={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[],timezone:e.timezone},[4,t.post("/nova-insights/communications-by-day",n)];case 1:return o=r.sent(),[2,(a=o.data,i=n.start_date,s=n.end_date,c=a.plots||[],u=c.find(function(e){return"TOTAL_COMMUNICATIONS_LABEL"===e.label}),l=c.find(function(e){return"COMPLETED_COMMUNICATIONS_LABEL"===e.label}),d=c.find(function(e){return"CONVERSION_RATE_LABEL"===e.label}),p=Xw(null==u?void 0:u.rows,i,s),h=Xw(null==l?void 0:l.rows,i,s),f=Xw(null==d?void 0:d.rows,i,s),{communications:{distribution:p.map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Zw(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==u?void 0:u.value)||"0")},conversion_rate:{distribution:f.map(function(e){return{key:e.date||"",total:parseFloat(e.value),percentage:parseFloat(e.value)}}),total:parseFloat((null==d?void 0:d.value)||"0")},completed_communications:{distribution:h.map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Zw(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==l?void 0:l.value)||"0")}})]}var a,i,s,c,u,l,d,p,h,f})})},enabled:!!e.organization_code,staleTime:3e5},o))},aE=function(e,o){return Hf(t({queryKey:["smart-recovery-communications-by-substatus",e],queryFn:function(){return n(void 0,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return t=jh.getInstance(),n={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[],timezone:e.timezone},[4,t.post("/nova-insights/communications-by-substatus",n)];case 1:return o=r.sent(),[2,eE(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},o))},iE=function(e,o){return Hf(t({queryKey:["smart-recovery-communications-substatus-by-day",e],queryFn:function(){return n(void 0,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return t=jh.getInstance(),n={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[],timezone:e.timezone},[4,t.post("/nova-insights/communications-substatus-by-day",n)];case 1:return o=r.sent(),[2,tE(o.data,n.start_date,n.end_date)]}})})},enabled:!!e.organization_code,staleTime:3e5},o))},sE=function(e,o){return Hf(t({queryKey:["smart-recovery-recovered-tpv-by-day",e],queryFn:function(){return n(void 0,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return t=jh.getInstance(),n={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[],timezone:e.timezone},[4,t.post("/nova-insights/recovered-tpv-by-day",n)];case 1:return o=r.sent(),[2,nE(o.data,n.start_date,n.end_date)]}})})},enabled:!!e.organization_code,staleTime:3e5},o))},cE=function(e,o){return Hf(t({queryKey:["smart-recovery-recovered-payments-by-day",e],queryFn:function(){return n(void 0,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return t=jh.getInstance(),n={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[],timezone:e.timezone},[4,t.post("/nova-insights/recovered-payments-by-day",n)];case 1:return o=r.sent(),[2,rE(o.data,n.start_date,n.end_date)]}})})},enabled:!!e.organization_code,staleTime:3e5},o))};function uE(e,t){var o=this;return Hf(["POST/template-reporting/templates/search",e],function(){return n(o,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().searchReportTemplates(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:t,useErrorBoundary:!1})}function lE(e,t,o){var a=this;return Hf(["POST/template-reporting/template-by-id/search",e,t],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().searchReportTemplateById(e,t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:o&&!!e,useErrorBoundary:!1})}function dE(e,t){var o=this;return Hf(["POST/template-reporting/schedules/search",e],function(){return n(o,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().searchReportSchedules(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:t,useErrorBoundary:!1})}function pE(e,t,o){var a=this;return Hf(["POST/template-reporting/schedule-by-id/search",e,t],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().searchReportScheduleById(e,t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:o&&!!e,useErrorBoundary:!1})}function hE(){return Hf({queryKey:["organization-configs"],queryFn:function(){return jh.getInstance().getOrganizationConfigs().then(function(e){return null==e?void 0:e.data})},cacheTime:0,useErrorBoundary:!1})}function fE(e){var t=e.accountCode,n=e.enabled;return Hf(["onboarding-status",t],function(){return jh.getInstance().getOnboardingStatus(t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function mE(e,t,o){var a=this;return void 0===o&&(o=!0),Hf(["get-recipients",e,t],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getRecipients(e,t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&o,cacheTime:0,useErrorBoundary:!1})}function gE(e,t,o){var a=this;return void 0===o&&(o=!0),Hf(["get-recipient-by-id",e,t.recipient_id],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getRecipientById(e,t.recipient_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!t.recipient_id&&o,cacheTime:500,useErrorBoundary:!1})}function yE(e,t,o){var a=this;return void 0===o&&(o=!0),Hf(["get-onboarding-detail",e,t.recipient_id,t.onboarding_id],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getOnboardingDetail(e,t.recipient_id,t.onboarding_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!t.recipient_id&&!!t.onboarding_id&&o,cacheTime:500,useErrorBoundary:!1})}function vE(e,t,o){var a=this;return void 0===o&&(o=!0),Hf(["get-onboarding-timeline",e,t.onboarding_id],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getOnboardingTimeline(e,t.onboarding_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!t.onboarding_id&&o,cacheTime:500,useErrorBoundary:!1})}function bE(e,t,n){return void 0===t&&(t=!0),Hf(["installments-plans",e,n],function(){return jh.getInstance().getInstallmentPlans(n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(e)&&t,useErrorBoundary:!1})}function kE(e,t){return void 0===t&&(t=!0),Hf(["search-installments-plans",JSON.stringify(e)],function(){return jh.getInstance().searchInstallmentsPlans(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:t,useErrorBoundary:!1})}function _E(e){var t=this,o=e.paymentCode,a=e.enabled;return Hf({queryKey:["api-logs-v3",o],queryFn:function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getApiLogsV3(o).then(function(e){return null==e?void 0:e.data})]})})},enabled:(void 0===a||a)&&!!o,staleTime:3e4,cacheTime:3e5,useErrorBoundary:!1})}function wE(e){var t=this,o=e.paymentCode,a=e.enabled;return Hf({queryKey:["webhook-timeline",o],queryFn:function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getWebhookTimeline(o).then(function(e){return null==e?void 0:e.data})]})})},enabled:(void 0===a||a)&&!!o,staleTime:3e4,cacheTime:3e5,useErrorBoundary:!1})}function EE(){var e=this;return Hf(["workos-domain-status"],function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().workosDomainStatus().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function xE(){return xE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xE.apply(this,arguments)}
50
+ */"production"===process.env.NODE_ENV?Af.exports=function(){if(Tf)return Of;Tf=1;var e=s,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,r=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function i(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!t(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),c=n({inst:{value:s,getSnapshot:t}}),u=c[0].inst,l=c[1];return o(function(){u.value=s,u.getSnapshot=t,i(u)&&l({inst:u})},[e,s,t]),r(function(){return i(u)&&l({inst:u}),e(function(){i(u)&&l({inst:u})})},[e]),a(s),s};return Of.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:c,Of}():Af.exports=(Pf||(Pf=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=s,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useState,o=t.useEffect,a=t.useLayoutEffect,i=t.useDebugValue,c=!1,u=!1,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(s,l){c||void 0===t.startTransition||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=l();if(!u){var p=l();n(d,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}var h=(p=r({inst:{value:d,getSnapshot:l}}))[0].inst,f=p[1];return a(function(){h.value=d,h.getSnapshot=l,e(h)&&f({inst:h})},[s,d,l]),o(function(){return e(h)&&f({inst:h}),s(function(){e(h)&&f({inst:h})})},[s]),i(d),d};Df.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:l,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Df);var Lf=Af.exports;const jf=Lf.useSyncExternalStore,Nf=i.createContext(void 0),zf=i.createContext(!1);function qf(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Nf),window.ReactQueryClientContext):Nf)}const Uf=({context:e}={})=>{const t=i.useContext(qf(e,i.useContext(zf)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Mf=({client:e,children:t,context:n,contextSharing:r=!1})=>{i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),"production"!==process.env.NODE_ENV&&r&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const o=qf(n,r);return i.createElement(zf.Provider,{value:!n&&r},i.createElement(o.Provider,{value:e},t))},Bf=i.createContext(!1);Bf.Provider;const Ff=i.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function Gf(e,t){return"function"==typeof e?e(...t):!!e}function Wf(e,t){const n=Uf({context:e.context}),r=i.useContext(Bf),o=i.useContext(Ff),a=n.defaultQueryOptions(e);a._optimisticResults=r?"isRestoring":"optimistic",a.onError&&(a.onError=ff.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=ff.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=ff.batchCalls(a.onSettled)),(e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.cacheTime&&(e.cacheTime=Math.max(e.cacheTime,1e3)))})(a),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(a,o),(e=>{i.useEffect(()=>{e.clearReset()},[e])})(o);const[s]=i.useState(()=>new t(n,a)),c=s.getOptimisticResult(a);if(jf(i.useCallback(e=>{const t=r?()=>{}:s.subscribe(ff.batchCalls(e));return s.updateResult(),t},[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),i.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(a,c,r))throw((e,t,n)=>t.fetchOptimistic(e).then(({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)}).catch(t=>{n.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)}))(a,s,o);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Gf(n,[e.error,r]))({result:c,errorResetBoundary:o,useErrorBoundary:a.useErrorBoundary,query:s.getCurrentQuery()}))throw c.error;return a.notifyOnChangeProps?c:s.trackResult(c)}function Hf(e,t,n){return Wf(Bh(e,t,n),Ef)}function Vf(e,t,n){const r=function(e,t,n){return ef(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),o=Uf({context:r.context}),[a]=i.useState(()=>new Rf(o,r));i.useEffect(()=>{a.setOptions(r)},[a,r]);const s=jf(i.useCallback(e=>a.subscribe(ff.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=i.useCallback((e,t)=>{a.mutate(e,t).catch(Kf)},[a]);if(s.error&&Gf(a.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:c,mutateAsync:s.mutate}}function Kf(){}var $f;function Qf(e){return Vf(function(e){var t=e.payload;return jh.getInstance().postWebhookV2MultiAccount({payload:t})},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Yf(e){return Vf(function(e){var t=e.code,n=e.accountCode;return jh.getInstance().deleteWebhookV2(t,n)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Jf(e){return Vf(function(e){var t=e.code,n=e.payload,r=e.accountCode;return jh.getInstance().updateWebhookV2(t,n,r)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Zf(){return Vf(function(e){var t=e.name,n=e.principal;return jh.getInstance().postAccount(t,n)})}function Xf(){return Vf(function(n){var r=e([$f.ACCOUNT],n.duplicate_order,!0);return jh.getInstance().duplicateAccount(t(t({},n),{duplicate_order:r}))})}function em(){return Vf(function(e){return jh.getInstance().retryDuplicateAccount(e)})}function tm(){return Vf(function(e){var t=e.name,n=e.code,r=e.principal;return jh.getInstance().patchAccountV2({name:t,code:n,principal:r})})}function nm(){return Vf(function(e){var t=e.account_code;return jh.getInstance().putAccountPrincipal({account_code:t})})}function rm(){return Vf(function(e){var t=e.organizationCode,n=e.userCode,r=e.payload;return jh.getInstance().putAccountsUserMassive(t,n,r)})}function om(){return Vf(function(e){var t=e.organizationCode,n=e.userCode,r=e.payload;return jh.getInstance().deleteAccountsUserMassive(t,n,r)})}function am(){return Vf(["post-validate-status-connection"],function(e){var t=e.payload,n=e.accountCode;return jh.getInstance().postValidateStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function im(){return Vf(["post-change-status-connection"],function(e){var t=e.payload,n=e.accountCode;return jh.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function sm(){return Vf(function(e){return jh.getInstance().putCosts(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function cm(){return Vf(["post-connection"],function(e){var t=e.payload;return jh.getInstance().postMultiConnection({payload:t}).then(function(e){return null==e?void 0:e.data})})}function um(){return Vf(["new-post-connection-validate"],function(){return jh.getInstance().postMultiConnectionValidate().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function lm(){return Vf(["patch-connection"],function(e){var t=e.payload,n=e.connectionCode;return jh.getInstance().patchConnection({payload:t,connectionCode:n}).then(function(e){return null==e?void 0:e.data})})}function dm(){return Vf(function(e){var t=e.payload;return jh.getInstance().postDefaultRoutes({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function pm(){return Vf(function(e){return jh.getInstance().postValidateCredentials(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function hm(){var e=this;return Vf(function(t){var o=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().postNetworkTokensOnboarding(o)];case 1:return[2,e.sent().data]}})})},{useErrorBoundary:!1})}function fm(){return Vf(["patch-organizations"],function(){return jh.getInstance().updateOrganizationStatus().then(function(e){return null==e?void 0:e.data})})}function mm(){return Vf(function(e){return jh.getInstance().getOrgByName(e).then(function(e){return null==e?void 0:e.data})})}function gm(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().changePasswordV2(t).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function ym(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().workosPasswordReset(t).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function vm(){var e=this;return Vf(function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().workosAdminPortal().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function bm(){var e=this;return Vf(function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().workosDomainVerificationPortal().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function km(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().workosVerifyMfa(t).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function _m(e){return Vf(function(e){return jh.getInstance().updateProfile(e)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function wm(){return Vf(function(e){return jh.getInstance().inviteUsersMassive(e,e.organizationCode)})}function Em(){return Vf(function(e){return jh.getInstance().inviteUsersMassiveV2(e)})}function xm(){return Vf(function(e){var t=e.userCode,n=e.organizationCode;return jh.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})})}function Sm(){return Vf(function(e){return jh.getInstance().createUserAuth0(e)})}function Cm(){return Vf(function(e){return jh.getInstance().postCall(e)})}function Im(){return Vf(function(e){return jh.getInstance().changeLoginMethods(e)})}!function(e){e.ACCOUNT="ACCOUNT",e.CHECKOUT_BUILDER="CHECKOUT_BUILDER",e.CONNECTION="CONNECTION",e.ROUTING="ROUTING",e.RISK_CONDITIONS="RISK_CONDITIONS",e.WEBHOOKS="WEBHOOKS"}($f||($f={}));var Rm=function(){var e=c("ON"===localStorage.getItem("isTesting")),t=e[0],n=e[1];return u(function(){var e=function(e){"isTesting"===e.key&&n("ON"===e.newValue)};return window.addEventListener("storage",e),function(){window.removeEventListener("storage",e)}},[]),{isTesting:t}},Tm=function(e){var t=localStorage.getItem(e),n=c(t&&JSON.parse(t)),r=n[0],o=n[1];return u(function(){var t=function(t){if(t.key===e){var n=t.newValue;o(n)}};return window.addEventListener("storage",t),function(){window.removeEventListener("storage",t)}},[e]),r},Am=function(){var e,t;return null===(t=null===(e=Tm("account"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.organization_code},Om=function(){var e,t=Rm().isTesting,n=null===(e=Tm("account"))||void 0===e?void 0:e.value;return(t?null==n?void 0:n.account_code_testing:null==n?void 0:n.account_code_live)||(null==n?void 0:n.code)};function Pm(e){var n=Om(),r=l(n);return r.current=n,Vf(function(e){return jh.getInstance().updateIsActiveCheckout(t(t({},e),{accountCode:r.current}))},e)}function Dm(e){var n=Om(),r=l(n);return r.current=n,Vf(function(e){return jh.getInstance().publishCheckout(t(t({},e),{accountCode:r.current}))},e)}function Lm(){return Vf(function(e){var t=e.payload,n=e.transactionId,r=e.paymentId,o=e.action;return jh.getInstance().createOperationTransaction(t,n,r,o)})}function jm(){return Vf(function(e){var t=e.payload,n=e.paymentId,r=e.transactionId,o=e.handleSetProgress;return jh.getInstance().uploadChargebacks(t,n,r,o)})}function Nm(){return Vf(function(e){var t=e.transactionCode,n=e.payload;return jh.getInstance().postProviderRawResponse(t,n)})}function zm(){return Vf(function(e){var t=e.paymentId,n=e.payload;return jh.getInstance().addToRiskList(t,n)})}var qm=new yf({}),Um=new class{constructor(e={}){this.queryCache=e.queryCache||new yf,this.mutationCache=e.mutationCache||new kf,this.logger=e.logger||hf,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,"production"!==process.env.NODE_ENV&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=of.subscribe(()=>{of.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=sf.subscribe(()=>{sf.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=Fh(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const r=Bh(e,t,n),o=this.getQueryData(r.queryKey);return o?Promise.resolve(o):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const r=this.queryCache.find(e),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==r?void 0:r.state.data);if(void 0===o)return;const a=Bh(e),i=this.defaultQueryOptions(a);return this.queryCache.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ff.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=Fh(e,t),r=this.queryCache;ff.batch(()=>{r.findAll(n).forEach(e=>{r.remove(e)})})}resetQueries(e,t,n){const[r,o]=Fh(e,t,n),a=this.queryCache,i={type:"active",...r};return ff.batch(()=>(a.findAll(r).forEach(e=>{e.reset()}),this.refetchQueries(i,o)))}cancelQueries(e,t,n){const[r,o={}]=Fh(e,t,n);void 0===o.revert&&(o.revert=!0);const a=ff.batch(()=>this.queryCache.findAll(r).map(e=>e.cancel(o)));return Promise.all(a).then(qh).catch(qh)}invalidateQueries(e,t,n){const[r,o]=Fh(e,t,n);return ff.batch(()=>{var e,t;if(this.queryCache.findAll(r).forEach(e=>{e.invalidate()}),"none"===r.refetchType)return Promise.resolve();const n={...r,type:null!=(e=null!=(t=r.refetchType)?t:r.type)?e:"active"};return this.refetchQueries(n,o)})}refetchQueries(e,t,n){const[r,o]=Fh(e,t,n),a=ff.batch(()=>this.queryCache.findAll(r).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...o,cancelRefetch:null==(t=null==o?void 0:o.cancelRefetch)||t,meta:{refetchPage:r.refetchPage}})}));let i=Promise.all(a).then(qh);return null!=o&&o.throwOnError||(i=i.catch(qh)),i}fetchQuery(e,t,n){const r=Bh(e,t,n),o=this.defaultQueryOptions(r);void 0===o.retry&&(o.retry=!1);const a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(qh).catch(qh)}fetchInfiniteQuery(e,t,n){const r=Bh(e,t,n);return r.behavior=_f(),this.fetchQuery(r)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(qh).catch(qh)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find(t=>Vh(e)===Vh(t.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find(t=>Kh(e,t.queryKey));if("production"!==process.env.NODE_ENV){this.queryDefaults.filter(t=>Kh(e,t.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.")}return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find(t=>Vh(e)===Vh(t.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find(t=>Kh(e,t.mutationKey));if("production"!==process.env.NODE_ENV){this.mutationDefaults.filter(t=>Kh(e,t.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults.")}return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=Hh(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:!1,staleTime:3e5,useErrorBoundary:!0}},queryCache:qm});function Mm(){return Vf(function(e){return jh.getInstance().createReconciliationsReportV2(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Bm(){return Vf(function(e){return jh.getInstance().createReconciliationsReportV3(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Fm(){return Vf(function(e){return jh.getInstance().createReportV2(e).then(function(e){return null==e?void 0:e.data})})}function Gm(){return Vf(function(e){return jh.getInstance().getTotalRowsForExport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Wm(){return Vf(function(e){return jh.getInstance().cancelReport(e).then(function(e){return null==e?void 0:e.data})})}function Hm(t){var o=this;return Vf(function(){return n(o,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().createReportTemplate(t).then(function(e){return null==e?void 0:e.data})]})})},{onMutate:function(t){return n(o,void 0,void 0,function(){var n;return r(this,function(r){switch(r.label){case 0:return[4,Um.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return r.sent(),n=Um.getQueryData(["GET/reports/templates"]),Um.setQueryData(["GET/reports/templates"],function(n){return e(e([],n,!0),[t],!1)}),[2,{previousTemplates:n}]}})})},onError:function(e,t,n){Um.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){Um.invalidateQueries({queryKey:["GET/reports/templates"]})}})}function Vm(e){return Vf(function(){return jh.getInstance().updateReportTemplate(e).then(function(e){return null==e?void 0:e.data})})}function Km(){return Vf(function(e){return jh.getInstance().deletePaymentsReportTemplate(e).then(function(e){return null==e?void 0:e.data})})}function $m(e,t,o){var a=this;void 0===o&&(o=null);var i=(null==o?void 0:o.basePath)||Ad.DEFAULT_ROUTING_TYPE;return Vf(function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().postSmartRoutingCreateWorkflow(e,t,i).then(function(e){return null==e?void 0:e.data})];case 1:return[2,n.sent()]}})})},o)}function Qm(e,t){var o=this,a=e.versionCode,i=e.accountCode,s=e.organizationCode,c=e.routingType,u=void 0===c?Ad.DEFAULT_ROUTING_TYPE:c;return void 0===t&&(t=null),Vf(function(){return n(o,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().postSmartRoutingPublishVersion(i,a,s,u).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})},t)}function Ym(e,t){var n=e.data,r=e.accountCode,o=e.routingType,a=void 0===o?Ad.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),Vf(function(){return jh.getInstance().putSmartRoutingUpdateWorkflow(r,n,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},t)}function Jm(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?Ad.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),Vf(function(){return jh.getInstance().deleteSmartRoutingVersion(r,n,a).then(function(e){return null==e?void 0:e.data})},t)}function Zm(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?Ad.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),Vf(function(){return jh.getInstance().postSmartRoutingDuplicateVersion(r,String(n),a).then(function(e){return null==e?void 0:e.data})},t)}function Xm(e,t){var n=e.paymentMethod,r=e.active,o=e.accountCode,a=e.routingType,i=void 0===a?Ad.DEFAULT_ROUTING_TYPE:a;return void 0===t&&(t=null),Vf(function(){return jh.getInstance().putSmartRoutingToggleMethod(o,n,r,i).then(function(e){return null==e?void 0:e.data})},t)}function eg(e,t){var o=this;return void 0===t&&(t=null),Vf(function(t){return n(o,void 0,void 0,function(){var n,o,a,i,s,c;return r(this,function(r){switch(r.label){case 0:return n=jh.getInstance(),o=t.map(function(t){return n.putSmartRoutingToggleMethod(e,t.paymentMethod,t.active,t.routingType)}),[4,Promise.allSettled(o)];case 1:return a=r.sent(),i=a.filter(function(e){return"rejected"===e.status}),s=a.filter(function(e){return"fulfilled"===e.status}),c=i.map(function(e,n){return{paymentMethod:t[n].paymentMethod,error:"rejected"===e.status?e.reason:null}}),[2,{success:s.length,failed:i.length,total:t.length,errors:c}]}})})},t)}function tg(e,t){var n=e.declinedId,r=e.accountCode;return void 0===t&&(t=null),Vf(function(e){return void 0===e&&(e=null),jh.getInstance().updateSmartRoutingDeclinedGroup(r,n,e).then(function(e){return null==e?void 0:e.data})},t)}function ng(e){var t=e.accountCode;return Vf(function(e){return void 0===e&&(e=null),jh.getInstance().createSmartRoutingDeclinedGroup(t,e).then(function(e){return null==e?void 0:e.data})},e.options)}function rg(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?Ad.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),Vf(function(e){return void 0===e&&(e=!1),jh.getInstance().updateSmartRoutingFavorite(r,n,e,a).then(function(e){return null==e?void 0:e.data})},t)}function og(e,t){var n=e.code,r=e.name,o=e.accountCode,a=e.routingType,i=void 0===a?Ad.DEFAULT_ROUTING_TYPE:a;return void 0===t&&(t=null),Vf(function(){return jh.getInstance().putSmartRoutingUpdateWorkflowName(o,{code:n,name:r},i).then(function(e){return null==e?void 0:e.data})},t)}function ag(e,t){var n=e.accountCode,r=e.workflowVersionCode,o=e.routingType,a=void 0===o?Ad.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),Vf(function(e){return jh.getInstance().simulateSmartRoutingTransaction(n,r,e,a).then(function(e){return null==e?void 0:e.data})},t)}function ig(e,t){return void 0===t&&(t=null),Vf(function(t){return jh.getInstance().updateMonitorRedistribution(e,t).then(function(e){return null==e?void 0:e.data})},t)}function sg(e,n){return void 0===n&&(n={}),Vf(function(t){var n=t.declinedGroupCode;return jh.getInstance().removeDeclinedGroup(e,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},t(t({},n),{useErrorBoundary:!1}))}function cg(e,n){return void 0===n&&(n={}),Vf(function(t){var n=t.payload;return jh.getInstance().multiAccountDeclinedGroupCreate(e,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},t(t({},n),{useErrorBoundary:!1}))}var ug=function(e){return Vf(function(t){return jh.getInstance().createMonitorThreshold(t,e).then(function(e){return e.data})})},lg=function(e){return Vf(function(t){return jh.getInstance().createMonitorTemplate(t,e).then(function(e){return e.data})})};function dg(){return Vf(function(e){var t=e.payload;return jh.getInstance().postSlackMessageChannel(t).then(function(e){return null==e?void 0:e.data})})}function pg(){return Vf(function(e){var t=e.userCode,n=e.organizationCode;return jh.getInstance().deleteUserTeamV2({userCode:t,organizationCode:n}).then(function(e){return null==e?void 0:e.data})})}function hg(){return Vf(function(){return jh.getInstance().setCustodian().then(function(e){return null==e?void 0:e.data})})}function fg(){return Vf(function(e){var t=e.payload,n=e.accountCode;return jh.getInstance().createRoles(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function mg(){var e=this;return Vf(function(t){var o=t.payload,a=t.id,i=t.accountCode;return n(e,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return[4,jh.getInstance().editRoles({payload:o,id:a},i)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}})})},{useErrorBoundary:!1})}function gg(){return Vf(function(e){return jh.getInstance().deleteRoles(e).then(function(e){return null==e?void 0:e.data})})}function yg(){return Vf(function(e){var t=e.payload;return jh.getInstance().createOrgRole(t).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function vg(){var e=this;return Vf(function(t){var o=t.payload,a=t.id;return n(e,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return[4,jh.getInstance().editOrgRole({payload:o,id:a})];case 1:return[2,null==(e=t.sent())?void 0:e.data]}})})},{useErrorBoundary:!1})}function bg(){return Vf(function(e){return jh.getInstance().deleteOrgRole(e).then(function(e){return null==e?void 0:e.data})})}function kg(){return Vf(function(e){return jh.getInstance().startUserExport({accountCodes:e.account_codes,name:e.name,search:e.search,statuses:e.statuses,roleIds:e.role_ids}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function _g(){return Vf(["post-payment-links"],function(e){var t=e.payload,n=e.accountCode;return jh.getInstance().postPaymentLinks({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data})})}function wg(){return Vf(["post-delete-payment-link"],function(e){var t=e.code;return jh.getInstance().postDeletePaymentLink({code:t}).then(function(e){return null==e?void 0:e.data})})}function Eg(){return Vf(["patch-payment-links"],function(e){var t=e.payload,n=e.accountCode,r=e.paymentLinkCode;return jh.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:r}).then(function(e){return null==e?void 0:e.data})})}function xg(){return Vf(["upload-payment-link-logo"],function(e){var t=e.payload;return jh.getInstance().uploadPaymentLinkLogo({payload:t}).then(function(e){return null==e?void 0:e.data})})}function Sg(){return Vf(["post-subscription"],function(e){return jh.getInstance().postSubscription(e).then(function(e){return null==e?void 0:e.data})})}function Cg(){return Vf(["post-pause-subscription"],function(e){var t=e.subscriptionCode;return jh.getInstance().postPauseSubscription(t).then(function(e){return null==e?void 0:e.data})})}function Ig(){return Vf(["post-resume-subscription"],function(e){var t=e.subscriptionCode;return jh.getInstance().postResumeSubscription(t).then(function(e){return null==e?void 0:e.data})})}function Rg(){return Vf(["post-cancel-subscription"],function(e){var t=e.subscriptionCode;return jh.getInstance().postCancelSubscription(t).then(function(e){return null==e?void 0:e.data})})}function Tg(){return Vf(["patch-subscription"],function(e){var t=e.subscriptionCode,n=e.payload;return jh.getInstance().patchSubscription(t,n).then(function(e){return null==e?void 0:e.data})})}function Ag(){return Vf(["post-reschedule-subscription"],function(e){var t=e.subscriptionCode;return jh.getInstance().postRescheduleSubscription(t).then(function(e){return null==e?void 0:e.data})})}function Og(){return Vf(["post-list-subscriptions"],function(e){return jh.getInstance().postListSubscriptions(e).then(function(e){return null==e?void 0:e.data})})}function Pg(){return Vf(function(e){var t=e.payload;return jh.getInstance().postUserSettings(t)},{onMutate:function(e){return e}})}function Dg(){return Vf(function(e){return jh.getInstance().postUserThemeSettings(e)})}function Lg(){return Vf(function(e){var t=e.payload,n=e.section;return jh.getInstance().postUserSettingsTables(t,n)},{onMutate:function(e){return e},onSuccess:function(e){var n=Um.getQueryData(["fetch-profile"]);e.data&&Um.setQueryData(["fetch-profile"],t(t({},n),{settings:e.data}))}})}function jg(e){return Vf(["pinned-sections"],function(e){var t=e.payload;return jh.getInstance().postUserSettingsPinned(t)},{onMutate:function(t){var n=t.payload;return e({payload:n})}})}function Ng(){return Hf(["fetch-profile"],function(){return jh.getInstance().getProfile().then(function(e){var t=null==e?void 0:e.data;return t&&localStorage.setItem("user",JSON.stringify(t)),t}).catch(function(e){throw e})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function zg(){var e=this;return Hf(["get-user-full"],function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().getUserFull()];case 1:return[2,e.sent().data]}})})},{keepPreviousData:!0,useErrorBoundary:!1})}function qg(e,t){return Hf(["fetch-permissions",e,t],function(){var e,t,n,r=localStorage.getItem("account"),o=localStorage.getItem("user"),a=r&&JSON.parse(r),i=o&&JSON.parse(o);return((null==i?void 0:i.merlin)?null===(e=null==i?void 0:i.merlin)||void 0===e?void 0:e.permissions:null===(n=null===(t=null==a?void 0:a.value)||void 0===t?void 0:t.role)||void 0===n?void 0:n.permission_ids.map(function(e){return{permission_name:e,description:e,resource_server_name:e,resource_server_identifier:e}}))||[]})}function Ug(e){return Hf(["email-verification",e],function(){return jh.getInstance().emailVerification(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})}function Mg(){return Hf({queryKey:["get-login-methods"],queryFn:function(){return jh.getInstance().getLoginMethods().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})}})}function Bg(){return Hf(["fetch-impersonation-users"],function(){return jh.getInstance().getImpersonationUsers().then(function(e){var t;return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.result)||[]})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Fg(){return Hf(["fetch-impersonation-enabled"],function(){return jh.getInstance().getImpersonationEnabled().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Gg(e,t,o,a,i,s){var c=this;return void 0===o&&(o=1),void 0===a&&(a=10),Hf(["get-users-to-impersonate",e,t,o,a,i,s],function(){return n(c,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getUsersToImpersonate(e,t,o,a,i,s).then(function(e){return null==e?void 0:e.data})]})})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function Wg(e){var t;return Hf(["fetch-communications",e],function(){return jh.getInstance().getCommunications(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null===(t=e.account_codes)||void 0===t?void 0:t.length),useErrorBoundary:!1,cacheTime:3e3})}function Hg(){return Hf(["fetch-communications-filters"],function(){return jh.getInstance().getCommunicationsFilters().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Vg(e,t){return Hf(["fetch-communication-details",e],function(){return jh.getInstance().getCommunicationDetails(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,useErrorBoundary:!1,cacheTime:0})}function Kg(n,r,o){var a,i,s=Ng(),c=Pg(),u=s.data,l=s.isLoading||!s.isFetched,p=null!==(i=null===(a=null==u?void 0:u.settings)||void 0===a?void 0:a.viewed_tutorials)&&void 0!==i?i:[],h="onboarding-".concat(null!=n?n:"default","-").concat(r,"-").concat(o),f=p.includes(h),m=d(function(){if(!f){var n=e(e([],p,!0),[h],!1);Um.setQueryData(["fetch-profile"],function(e){var r;return e?t(t({},e),{settings:t(t({},null!==(r=e.settings)&&void 0!==r?r:{}),{viewed_tutorials:n})}):e}),c.mutate({payload:{viewed_tutorials:n}})}},[f,h,c,p]);return{hasSeenOnboarding:f,dismiss:m,id:h,isProfileLoading:l}}function $g(){return Vf(function(e){var t=e.password,n=e.otp;return jh.getInstance().getMfaTokenValidation(t,n).then(function(e){return null==e?void 0:e.data})})}function Qg(){return Vf(function(){return jh.getInstance().getEmailOtp().then(function(e){return null==e?void 0:e.data})})}function Yg(){return Vf(function(e){return jh.getInstance().confirmMfaOtp(e).then(function(e){return null==e?void 0:e.data})})}function Jg(){return Vf(function(e){return jh.getInstance().unrollMfa(e).then(function(e){return null==e?void 0:e.data})})}function Zg(){return Vf(function(){return jh.getInstance().validatePasswordStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return{valid:!1}})})}function Xg(){return Vf(["post-get-allowlist-items"],function(e){var t=e.payload;return jh.getInstance().postAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ey(){return Vf(["post-get-allowlist-multi-account"],function(e){var t=e.payload;return jh.getInstance().postGetAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ty(){return Vf(["post-create-allowlist-multi-account"],function(e){var t=e.payload;return jh.getInstance().postCreateAllowlistMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ny(){return Vf(["patch-change-status-allowlist"],function(e){var t=e.payload;return jh.getInstance().patchChangeStatusAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ry(){return Vf(["patch-change-status-allowlist-item"],function(e){var t=e.payload;return jh.getInstance().patchChangeStatusAllowlistItem({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function oy(){return Vf(["post-add-allowlist-items"],function(e){var t=e.payload;return jh.getInstance().patchAddAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function ay(){return Vf(["patch-allowlist"],function(e){var t=e.payload;return jh.getInstance().patchAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function iy(){return Vf(["post-blacklist-multi-account"],function(e){var t=e.payload;return jh.getInstance().postBlackListMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function sy(){return Vf(["put-blacklist"],function(e){return jh.getInstance().putBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function cy(){return Vf(["change-blacklist"],function(e){return jh.getInstance().changeBlackListStatus(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function uy(){return Vf(["change-blacklist-item"],function(e){return jh.getInstance().changeBlackListStatusItem(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function ly(){return Vf(["post-blacklist-items"],function(e){var t=e.payload;return jh.getInstance().postBlackListItems({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function dy(){return Vf(["delete-blacklist"],function(e){var t=e.black_list_code;return jh.getInstance().deleteBlackListType({black_list_code:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function py(e){var t=e.handleSetProgress;return Vf(["post-blacklist-batch"],function(e){var n=e.blacklist_code,r=e.expiration_days,o=e.file;return jh.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:r,file:o,handleSetProgress:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function hy(){return Vf(["change-payments-webhook"],function(e){var t=e.status,n=e.paymentCode;return jh.getInstance().postChangePaymentsWebhook({status:t,paymentCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function fy(){return Vf(["delete-blacklist-items"],function(e){var t=e.blocklist_code,n=e.blocklist_item_id,r=e.account_code;return jh.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:r}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function my(){return Vf(["valiate-blacklist-items"],function(e){return jh.getInstance().valiateBlockListItems({payload:e}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function gy(){return Vf(["delete-allowlist-item"],function(e){return jh.getInstance().deleteAllowlistItem({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function yy(){return Vf(["validate-allowlist-items"],function(e){return jh.getInstance().validateAllowlistItems({payload:e}).then(function(e){return e.data}).catch(function(e){return e})})}function vy(e){var t=e.fileName,n=e.onSuccess,r=e.onError,o=c(0),a=o[0],i=o[1],s=l({cancel:function(){return null}}),u=Vf(["upload-file-chargeback",t],function(e){var t=jh.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:i}),o=t.promise,a=t.cancel;return s.current.cancel=a,o.then(function(e){return null==n||n(null==e?void 0:e.data),null==e?void 0:e.data}).catch(function(e){throw null==r||r(),e})},{useErrorBoundary:!1});return{mutation:u,cancelRequest:s.current.cancel,progress:a}}function by(){return Vf(function(e){return jh.getInstance().uploadBatchRefundsV2({payload:e}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ky(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().batchRefundByFile({payload:t}).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function _y(){var e=this;return Vf(function(t){var o=t.batchRefundId,a=t.organizationCode,i=t.accountCode;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getBatchRefundProcessedFileDownload(o,a,i).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function wy(){var e=this;return Vf(function(t){var o=t.batchRefundId,a=t.organizationCode,i=t.accountCode;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getBatchRefundUserFileDownload(o,a,i).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})}function Ey(){var e=l({cancel:function(){return null}}),t=Vf(["upload-file"],function(t){var n=jh.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),r=n.promise,o=n.cancel;return e.current.cancel=o,r.then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})});return{mutation:t,cancelRequest:e.current.cancel}}function xy(){return Vf(function(e){var t=e.payload,n=e.organizationCode;return jh.getInstance().updateMFAConfig(t,n)})}function Sy(){return Vf(function(e){var t=e.payload,n=e.organizationCode;return jh.getInstance().mfaExcludeUsers(t,n)})}function Cy(e){return Hf(["GET/scheduled-reports",e],function(){return jh.getInstance().getScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Iy(){return Vf(function(e){var t=e.payload;return jh.getInstance().postScheduledReport(t).then(function(e){return{data:e.data,status:e.status}}).catch(function(e){return e})})}function Ry(){return Vf(function(e){var t=e.reportCode,n=e.payload;return jh.getInstance().updateScheduledReport(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Ty(){return Vf(function(e){return jh.getInstance().deleteScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Ay(){return Vf(function(e){return jh.getInstance().getConditionalConfigRules(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Oy(){return Vf(function(e){return jh.getInstance().getRule(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Py(){return Vf(function(e){var t=e.payload,n=e.accountCode;return jh.getInstance().postCreateRuleMultiAccount(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Dy(){return Vf(function(e){var t=e.payload,n=e.ruleId,r=e.accountCode;return jh.getInstance().postEditRule(t,n,r).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Ly(){return Vf(function(e){var t=e.payload;return jh.getInstance().postCreateCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function jy(){return Vf(function(e){var t=e.payload,n=e.code;return jh.getInstance().pathCreateCustomizedApiKeys(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function Ny(){return Vf(function(e){var t=e.code,n=e.password,r=e.otp,o=e.mfaToken;return jh.getInstance().getCustomizedApiKeysToken(t,n,r,o).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})}function zy(){return Vf(function(e){var t=e.passwordOtp;return jh.getInstance().getDeveloperCredentialsValidatePassword(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})}function qy(){return Vf(function(e){var t=e.password;return jh.getInstance().getDeveloperCredentialsValidatePasswordRegularUser(t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function Uy(){return Vf(function(e){var t=e.code;return jh.getInstance().deleteCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function My(){return Vf(function(e){var t=e.payload,n=e.code,r=e.password;return jh.getInstance().patchApiKeysEditNote(t,n,r).then(function(e){return e.data}).catch(function(e){return e})})}function By(){return Vf(function(e){var t=e.payload,n=e.code,r=e.password;return jh.getInstance().postApiKeysRoll(t,n,r).then(function(e){return e.data}).catch(function(e){return e})})}function Fy(){return Vf(function(e){var n=e.password,r=e.accountCode,o=e.otp,a=e.mfaToken;return jh.getInstance().getDeveloperCredentials(n,r,o,a).then(function(e){return t(t({},null==e?void 0:e.data),{isValid:!0})}).catch(function(e){var t,n,r;return{isValid:!1,status:null===(t=e.response)||void 0===t?void 0:t.status,error:null===(r=null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.data)||void 0===r?void 0:r.data}})})}function Gy(){return Vf(function(e){var t=e.password,n=e.accountCode,r=e.otp,o=e.mfaToken;return jh.getInstance().getDeveloperCredentials(t,n,r,o).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})}function Wy(){return Vf(function(){return jh.getInstance().getOrganizationKeysMetadata().then(function(e){return(null==e?void 0:e.data)||null})})}function Hy(){return Vf(function(e){var t=e.note,n=e.password;return jh.getInstance().patchOrganizationKeysNote({note:t},n).then(function(e){return(null==e?void 0:e.data)||null})})}function Vy(){return Vf(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return jh.getInstance().postOrganizationKeysRoll(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})}function Ky(){return Vf(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return jh.getInstance().postOrganizationKeysTamRequest(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})}function $y(){return Vf(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return jh.getInstance().postOrganizationKeysMarkRevealed(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})}function Qy(e){return Vf(function(e){var t=e.payload;return jh.getInstance().postAuditMonitors(t)},{onMutate:e.onMutate})}function Yy(){return Vf(function(e){var t=e.codes;return jh.getInstance().postResendWebhooks({codes:t}).then(function(e){return null==e?void 0:e.data})})}function Jy(){return Vf(function(e){var t=e.tab,n=e.payload;return jh.getInstance().postUnifiedExport(t,n).then(function(e){return null==e?void 0:e.data})})}function Zy(){return Vf(function(e){return jh.getInstance().postExportApiLogs(e).then(function(e){return null==e?void 0:e.data})})}function Xy(){return Vf(function(e){return jh.getInstance().postExportWebhooksLogs(e).then(function(e){return null==e?void 0:e.data})})}function ev(){return Vf(function(e){return jh.getInstance().postExportDashboardLogs(e).then(function(e){return null==e?void 0:e.data})})}function tv(){return Vf(function(e){return jh.getInstance().postExportMonitorsLogs(e).then(function(e){return null==e?void 0:e.data})})}function nv(t){var o=this;return Vf(function(){return jh.getInstance().createReconciliationReportTemplate(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{onMutate:function(t){return n(o,void 0,void 0,function(){var n,o;return r(this,function(r){switch(r.label){case 0:return[4,Um.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return r.sent(),n=null===(o=Um.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===o?void 0:o.templates,Um.setQueryData(["GET/reconciliation/reports/templates"],function(n){return{templates:e(e([],n.templates,!0),[t],!1)}}),[2,{previousTemplates:n}]}})})},onError:function(e,t,n){Um.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){Um.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})}function rv(e){return Vf(function(){return jh.getInstance().updateReconciliationReportTemplate(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{useErrorBoundary:!1})}function ov(){return Vf(["POST/reconciliation/alerts"],function(e){return jh.getInstance().postReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function av(){return Vf(["DELETE/reconciliation/alerts"],function(e){return jh.getInstance().deleteReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function iv(){return Vf(["UPDATE/reconciliation/alerts"],function(e){return jh.getInstance().updateReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function sv(){return Vf(function(e){var t=e.payload;return jh.getInstance().postCreateInsightsReport(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function cv(){return Vf(function(e){return jh.getInstance().createSamlConfig(e)})}function uv(){return Vf(function(e){return jh.getInstance().updateSamlConfig(e)})}function lv(){return Vf(function(){return jh.getInstance().deleteSamlConfig()})}function dv(e,n){return void 0===n&&(n={}),Vf(function(t){return jh.getInstance().generateAIWorkflowRoutes(e,t).then(function(e){return null==e?void 0:e.data})},t(t({},n),{useErrorBoundary:!1}))}function pv(e){return void 0===e&&(e={}),Vf(function(e){return jh.getInstance().postAIGenerationFeedback(e).then(function(e){return null==e?void 0:e.data})},t(t({},e),{useErrorBoundary:!1}))}function hv(){return Vf(function(e){return jh.getInstance().createChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function fv(){return Vf(function(e){return jh.getInstance().deleteChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function mv(){return Vf(function(e){var t=e.chart_id,n=e.type,r=e.name,o=e.user_prompt,a=void 0===o?"":o;return jh.getInstance().patchChartGPTChart(t,{type:n,name:r,user_prompt:a}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function gv(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){var e,n,o,a,i;return r(this,function(r){switch(r.label){case 0:return[4,jh.getInstance().createChartGPTChart(t)];case 1:if(e=r.sent(),!(n=null!==(a=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.chartgpt_id)&&void 0!==a?a:null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.chart_id))throw new Error("Failed to create chart: No chart ID returned");return[2,{chart_id:n}]}})})},{useErrorBoundary:!1})}function yv(){return Vf(function(e){return jh.getInstance().createChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function vv(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){var e,n,o,a,i;return r(this,function(r){switch(r.label){case 0:return[4,jh.getInstance().createChartGPTChart(t)];case 1:if(e=r.sent(),!(n=null!==(a=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.chartgpt_id)&&void 0!==a?a:null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.chart_id))throw new Error("Failed to create chart: No chart ID returned");return[2,{chart_id:n}]}})})},{useErrorBoundary:!1})}function bv(e,t){var n=e.chartCode,r=Uf();return Vf(function(e){return jh.getInstance().submitChartFeedback(n,{rating:e.rating,issues:e.issues||[],comment:e.comment}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(e){var o;r.invalidateQueries(["chart-feedback",n]),null===(o=null==t?void 0:t.onSuccess)||void 0===o||o.call(t,e)},onError:function(e){var n;null===(n=null==t?void 0:t.onError)||void 0===n||n.call(t,e)}})}function kv(){var e=this;return Vf(["POST/template-reporting/report-templates"],function(t){return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().createTemplateReporting(t).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function _v(){var e=this;return Vf(["POST/template-reporting/report-templates/clone"],function(t){var o=t.templateId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().cloneReportTemplate(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function wv(){var e=this;return Vf(["PATCH/template-reporting/report-templates/selection"],function(t){var o=t.templateId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().updateTemplateSelection(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function Ev(){var e=this;return Vf(["PATCH/template-reporting/report-templates/status"],function(t){var o=t.templateId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().changeTemplateStatus(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function xv(){var e=this;return Vf(["DELETE/template-reporting/report-templates"],function(t){var o=t.templateId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().deleteReportTemplate(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function Sv(){var e=this;return Vf(["POST/template-reporting/report-schedules"],function(t){return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().createReportSchedule(t).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}function Cv(){var e=this;return Vf(["PATCH/template-reporting/report-schedules/disable"],function(t){var o=t.scheduleId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().disableReportSchedule(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}function Iv(){var e=this;return Vf(["DELETE/template-reporting/report-schedules"],function(t){var o=t.scheduleId,a=t.payload;return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().deleteReportSchedule(o,a).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){Um.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}function Rv(){return Vf(function(e){return jh.getInstance().postOrganizationConfigs(e)})}function Tv(){return Vf(function(e){return jh.getInstance().putOrganizationConfigsByAccount(e)})}function Av(){return Vf(["create-installments-plan"],function(e){var t=e.payload;return jh.getInstance().createInstallmentsPlan(t).then(function(e){return null==e?void 0:e.data})})}function Ov(){return Vf(["update-installments-plan"],function(e){var t=e.code,n=e.payload;return jh.getInstance().updateInstallmentsPlan(t,n).then(function(e){return null==e?void 0:e.data})})}function Pv(){return Vf(["delete-installments-plan"],function(e){var t=e.code;return jh.getInstance().deleteInstallmentsPlan(t).then(function(e){return null==e?void 0:e.data})})}function Dv(){return Vf(["bulk-create-installments-plans"],function(e){var t=e.payload;return jh.getInstance().bulkCreateInstallmentsPlans(t).then(function(e){return null==e?void 0:e.data})})}function Lv(){return Vf(["bulk-delete-installments-plans"],function(e){var t=e.payload;return jh.getInstance().bulkDeleteInstallmentsPlans(t).then(function(e){return null==e?void 0:e.data})})}function jv(){var e=Uf();return Vf(["create-recipient"],function(e){var t=e.organizationCode,n=e.payload;return jh.getInstance().createRecipient(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function Nv(){var e=Uf();return Vf(["update-recipient"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.payload;return jh.getInstance().updateRecipient(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function zv(){var e=Uf();return Vf(["delete-recipient"],function(e){var t=e.organizationCode,n=e.recipientId;return jh.getInstance().deleteRecipient(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function qv(){var e=Uf();return Vf(["create-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.payload;return jh.getInstance().createOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function Uv(){var e=Uf();return Vf(["update-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId,o=e.payload;return jh.getInstance().updateOnboarding(t,n,r,o).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function Mv(){var e=Uf();return Vf(["block-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId;return jh.getInstance().blockOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}function Bv(){var e=Uf();return Vf(["unblock-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId;return jh.getInstance().unblockOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})}var Fv="GET/concierge/alerts",Gv="GET/concierge/alerts/by-id";function Wv(){return Hf([Fv],function(){return jh.getInstance().getConciergeAlerts().then(function(e){return e.data})},{useErrorBoundary:!1})}function Hv(e){return Hf([Gv,e],function(){return jh.getInstance().getConciergeAlertById(e).then(function(e){return e.data})},{enabled:!!e,useErrorBoundary:!1})}function Vv(){return Vf(["POST/concierge/alerts"],function(e){return jh.getInstance().createConciergeAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries([Fv]),Um.invalidateQueries([Gv])},useErrorBoundary:!1})}function Kv(){return Vf(["DELETE/concierge/alerts"],function(e){return jh.getInstance().deleteConciergeAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries([Fv]),Um.invalidateQueries([Gv])},useErrorBoundary:!1})}function $v(){return Vf(["POST/concierge/alerts/enable"],function(e){var t=e.alertId,n=e.payload;return jh.getInstance().enableConciergeAlert(t,n).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){Um.invalidateQueries([Fv]),Um.invalidateQueries([Gv])},useErrorBoundary:!1})}var Qv;function Yv(e){var t=this;return Hf(["fetch-payments-lazy",e],function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().postPaymentsLazy(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function Jv(e){return Hf(["fetch-payments-evaluated",e],function(){return jh.getInstance().postPaymentsEvaluated(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function Zv(e){var t=this,o=e.paymentCode,a=e.enabled,i=void 0===a||a,s=jh.getInstance();return Hf(["get-payment-v2",o],function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,s.getPaymentV2(o).then(function(e){return e.data})]})})},{enabled:i,cacheTime:500,useErrorBoundary:!1})}function Xv(e){var t=this,o=e.payment_code,a=e.enabled,i=void 0===a||a,s=jh.getInstance();return Hf(["get-payment-transaction-details-v2",o],function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,s.getTransactionDetailsV2({payment_code:o}).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!o&&i,cacheTime:0,useErrorBoundary:!1})}function eb(e){var t=this,o=e.transaction_code,a=e.enabled,i=void 0===a||a,s=jh.getInstance();return Hf(["get-payment-transaction-raw-response",o],function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,s.getTransactionRawResponse({transaction_code:o})]})})},{enabled:!!o&&i,cacheTime:0,useErrorBoundary:!1})}function tb(e){var t=Am();return Hf(["payment-methods",e],function(){return jh.getInstance().getPaymentMethodsByCountry({provider_id:null==e?void 0:e.provider_id,country:null==e?void 0:e.country},t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!(null==e?void 0:e.provider_id),useErrorBoundary:!1})}function nb(){return Hf({queryKey:["/payment-methods/providers"],queryFn:function(){return jh.getInstance().getPaymentMethodsAndProviders().then(function(e){return null==e?void 0:e.data})},cacheTime:864e5,useErrorBoundary:!1})}function rb(){return Hf(["GET/catalog/card-brands"],function(){return jh.getInstance().getCardBrands().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ob(e,t){return void 0===e&&(e=!0),void 0===t&&(t=xd.PAYMENTS),Hf(["payment-filters",e,t],function(){return jh.getInstance().getPaymentFilters(t).then(function(e){return null==e?void 0:e.data})},{enabled:e,useErrorBoundary:!1,cacheTime:3e5})}function ab(){return Hf(["payment-metrics-filters"],function(){return jh.getInstance().getPaymentMetricsFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function ib(e){var t=e.transaction_code,n=e.enabled;return Hf(["payment-transaction-details",t],function(){return jh.getInstance().getPaymentTransactionsDetails({transaction_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function sb(e){var t=e.payment_code,n=e.enabled;return Hf(["transaction-history",t],function(){return jh.getInstance().getTransactionHistoryByPaymentCode({payment_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function cb(e){var t=this;return Hf(["POST/transactions",JSON.stringify(e)],function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().postTransactions(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function ub(e){var t=this;return Hf(["POST/fraud-transactions",JSON.stringify(e)],function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().postFraudTransactions(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function lb(e){return Hf(["GET/payout-detail",JSON.stringify(e)],function(){var t=jh.getInstance();return e.organization_code?t.getPayoutDetails(e).then(function(e){return null==e?void 0:e.data}):{}},{enabled:!!e.organization_code&&!!e&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function db(e){return Hf(["GET/payout-transaction-detail",JSON.stringify(e)],function(){return jh.getInstance().getPayoutTransactionDetails(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!(null==e?void 0:e.transaction_code)&&(null==e?void 0:e.enabled),cacheTime:0,useErrorBoundary:!1})}function pb(e){var t=Am();return Hf(["GET/payout-history-detail",JSON.stringify(e)],function(){return jh.getInstance().getPayoutHistoryDetails(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.payout_code)&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function hb(e,t){var o=this,a=Am();return Hf(["GET/useGetProofOfCancel",a,e,t],function(){return n(o,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getProofOfCancel(e,a,t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!a&&!!t,cacheTime:0,useErrorBoundary:!1})}function fb(e,t){var o=this,a=Am();return Hf(["GET/useGetProofOfPayment",a,e,t],function(){return n(o,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getProofOfPayment(e,a,t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!a&&!!t,cacheTime:0,useErrorBoundary:!1})}function mb(e,t,o){var a=this,i=jh.getInstance();return Hf(["send-payment-notification",e,t],function(){return n(a,void 0,void 0,function(){var n,a;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.sendPaymentNotification(e,t)];case 1:return n=r.sent(),o.onSuccess(),[2,n.data];case 2:throw a=r.sent(),o.onError(),a;case 3:return[2]}})})},{enabled:o.enabled,cacheTime:0,useErrorBoundary:!1})}function gb(e){return Hf(["usePayoutsList",e&&JSON.stringify(e)],function(){var t=jh.getInstance();if(e)return t.postPayouts(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&!!Object.values(e).length,cacheTime:0})}function yb(e){var t=this;void 0===e&&(e=!0);var o=Am();return Hf(["getPayoutsFilters",o],function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getPayoutsFilters(o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{enabled:e&&!!o})}function vb(e,t){var o=this;void 0===t&&(t=!0);var a=Am();return Hf(["getPayoutTimeline",e,a],function(){return n(o,void 0,void 0,function(){var t;return r(this,function(n){return t=jh.getInstance(),e?[2,t.getPayoutTimeline(e,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]:[2]})})},{enabled:t&&!!e&&!!a,cacheTime:500,useErrorBoundary:!1})}function bb(e){var n=e.password,r=e.accountCode,o=e.otp,a=e.mfaToken;return Hf(["developers"],function(){return jh.getInstance().getDeveloperCredentials(n,r,o,a).then(function(e){return t(t({},null==e?void 0:e.data),{isValid:!0})}).catch(function(e){var t,n;return{isValid:!1,status:e.response.status,error:null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.data}})},{enabled:!1,cacheTime:0})}function kb(){return Hf(["fetch-customized-api-keys-members"],function(){return jh.getInstance().getCustomizedApiKeysMembers().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function _b(){return Hf(["developers-get-allowed-ips"],function(){return jh.getInstance().getAllowedIps().then(function(e){return(null==e?void 0:e.data)?t(t({},null==e?void 0:e.data),{isError:!1}):null}).catch(function(e){return t(t({},e),{isError:!0})})},{enabled:!1,cacheTime:0})}function wb(){return Hf(["fetch-customized-api-keys-accounts"],function(){return jh.getInstance().getCustomizedApiKeysAccounts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function Eb(e){return Hf(["fetch-customized-api-keys",e],function(){return jh.getInstance().postCustomizedApiKeys(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0,enabled:!!(null==e?void 0:e.length)})}function xb(){return Hf(["fetch-customized-api-keys-products"],function(){return jh.getInstance().getCustomizedApiKeysProducts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0})}function Sb(){return Vf(["developers-patch-allowed-ips"],function(e){return jh.getInstance().patchAllowedIps(e).then(function(e){return(null==e?void 0:e.data)?t(t({},null==e?void 0:e.data),{isError:!1}):null}).catch(function(e){return t(t({},e),{isError:!0})})},{cacheTime:0})}function Cb(){return Hf(["fetch-organizations"],function(){return jh.getInstance().getOrganization().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})}function Ib(){return Hf(["fetch-all-organizations",Am()],function(){return jh.getInstance().getAllOrganization().then(function(e){return(null==e?void 0:e.data)||[]})},{cacheTime:36e5,keepPreviousData:!0,useErrorBoundary:!1})}function Rb(e){var t=Am();return Hf(["organizations-provider-params",e],function(e){var n=e.queryKey;return jh.getInstance().getProviderParams(n[1],t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.id),useErrorBoundary:!1})}function Tb(e){var t=e.integration_code,n=e.enabled,r=e.accountCode;return Hf(["integration-params",t,r],function(){return t.includes("undefined")?{}:jh.getInstance().getIntegrationParams({accountCode:r,integration_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:n,useErrorBoundary:!1})}function Ab(e){var t=e.accountCode,n=e.organizationCode,r=Am();return Hf(["organizations-account-integrations",t,n],function(){return jh.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||r}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:!!t,useErrorBoundary:!1})}function Ob(e){var t=e.accountCode,n=e.paymentMethod,r=e.basePath,o=void 0===r?Ad.DEFAULT_ROUTING_TYPE:r;return Hf(["fetch-connections-by-payment-method",n,t,o],function(){return jh.getInstance().getConnectionsByPaymentMethod(t,n,o).then(function(e){return null==e?void 0:e.data})},{enabled:!!n&&!!t,cacheTime:0,useErrorBoundary:!1})}function Pb(){var e=this;return Hf(["fetch-hash-pylon"],function(){return n(e,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getHashPylon()]})})},{keepPreviousData:!0,useErrorBoundary:!1})}function Db(){return Hf(["connections"],function(){return jh.getInstance().getConnections().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Lb(){return Hf(["dialogs"],function(){return jh.getInstance().getDialogs().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,retryDelay:2e3,cacheTime:36e5})}function jb(){return Hf(["params-catalog"],function(){return jh.getInstance().getWebhookParamsV2().then(function(e){return null==e?void 0:e.data})})}function Nb(e){var t=e.accountCode,n=e.name;return Hf(["webhooks",t,n],function(){return jh.getInstance().getWebhooksV3({accountCode:t,name:n}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,useErrorBoundary:!1})}function zb(e){var t=e.accountCode,n=e.enabled;return Hf(["webhooks-detail",t],function(){return jh.getInstance().getWebhooksV2Detail({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!n})}function qb(e){var t,n=Am(),r=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return Hf({queryKey:["accounts",r],queryFn:function(){return jh.getInstance().getAccounts(r).then(function(e){return null==e?void 0:e.data})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!r})}function Ub(e){return Hf(["accountsV2",e],function(){return jh.getInstance().getAccountsV2().then(function(e){return(null==e?void 0:e.data)||[]}).catch(function(e){throw e})},{keepPreviousData:!0,enabled:!!e,useErrorBoundary:!1})}function Mb(e){return Hf(["accountsV2-by-user",e],function(){return e?jh.getInstance().getAccountsByUser(e).then(function(e){return{accountsV2ByUser:(null==e?void 0:e.data)||null}}).catch(function(e){return{accountsV2ByUser:[],error:e}}):{accountsV2ByUser:[]}},{enabled:!!e,staleTime:0})}function Bb(e,t){var o=this;return Hf({queryKey:["accounts-for-impersonation",e,t],queryFn:function(){return n(o,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getAccountsForImpersonation(e).then(function(e){var n,r;return(null===(r=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.response)||void 0===r?void 0:r.map(function(e){return{label:e.name,value:t?e.code_testing:e.code_live,code_live:e.code_live,code_testing:e.code_testing}}))||[]})]})})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function Fb(e){var t=this;return Hf({queryKey:["roles-for-impersonation",e],queryFn:function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().getRolesForImpersonation(e).then(function(e){var t,n;return(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.roles)||void 0===n?void 0:n.map(function(e){return{label:e.name,value:e.id}}))||[]})]})})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function Gb(e){return Hf({queryKey:["pending-duplicate-accounts",e],queryFn:function(){return jh.getInstance().getPendingDuplicateAccounts()},useErrorBoundary:!1,keepPreviousData:!0,refetchInterval:e})}function Wb(){return Hf(["menu"],function(){return jh.getInstance().getMenu().then(function(e){return mh(e)?wh:null==e?void 0:e.data}).catch(function(){return wh})})}function Hb(){return Hf(["/payment/statuses/style"],function(){return jh.getInstance().useGetPaymentStatusesStyles().then(function(e){return mh(e)?gh:null==e?void 0:e.data}).catch(function(){return gh})})}function Vb(){return Hf(["/transaction/statuses/style"],function(){return jh.getInstance().useGetTransactionStatusesStyles().then(function(e){return mh(e)?yh:null==e?void 0:e.data}).catch(function(){return yh})},{cacheTime:36e5,useErrorBoundary:!1})}function Kb(){return Hf(["/reconciliation/transaction/statuses/style"],function(){return jh.getInstance().useGetReconciliationTransactionStatusesStyles().then(function(e){return mh(e)?vh:null==e?void 0:e.data}).catch(function(){return vh})},{useErrorBoundary:!1})}function $b(){return Hf(["timezone-catalog"],function(){return jh.getInstance().useGetTimeZoneCatalog().then(function(e){return mh(e)?bh:null==e?void 0:e.data}).catch(function(){return bh})})}function Qb(){return Hf(["/cms/audit-logs-filters"],function(){return jh.getInstance().useGetAuditLogsFilters().then(function(e){return mh(e)?kh:null==e?void 0:e.data}).catch(function(){return kh})})}function Yb(){return Hf(["/cms/static-contents"],function(){return jh.getInstance().getDashboardStaticContents().then(function(e){var t,n;return mh(e)?_h:(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||{}})},{cacheTime:6048e5,useErrorBoundary:!1})}function Jb(){return Hf(["/cms/locales"],function(){return jh.getInstance().getLocales().then(function(e){return mh(e)?Eh:e.data}).catch(function(){return Eh})})}function Zb(e,t){return void 0===t&&(t=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-methods",e,t],function(){return jh.getInstance().getSmartRoutingMethods(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function Xb(e,t,n){return void 0===n&&(n=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-workflow",t,e,n],function(){return jh.getInstance().getSmartRoutingWorkflow(e,t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e,cacheTime:0,retry:!1})}function ek(e,t,n){return void 0===n&&(n=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-condition-types",e,t,n],function(){return jh.getInstance().getSmartRoutingConditionTypes(e,t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e})}function tk(e,t){return Hf(["smart-routing-condition-payment-method",e,t],function(){return jh.getInstance().getSmartRoutingConditionPaymentMethod(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:null!==t})}function nk(e,t){return Hf(["smart-routing-condition-types-values",t,e],function(){return jh.getInstance().getSmartRoutingConditionTypesValues(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!e,useErrorBoundary:!1})}function rk(e){var t=e.accountCode,n=e.workflowVersionId,r=e.routingType,o=void 0===r?Ad.DEFAULT_ROUTING_TYPE:r;return Hf(["smart-routing-workflow-version",n,t,o],function(){return jh.getInstance().getSmartRoutingWorkflowVersion(t,n,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})}function ok(e,t,n,r){return void 0===r&&(r=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-next-route",e,n,t,r],function(){return jh.getInstance().getSmartRoutingNextSteps(e,t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,useErrorBoundary:!1})}function ak(e,t){return void 0===t&&(t=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-decline-groups",e,t],function(){return jh.getInstance().getSmartRoutingDeclinedGroup(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function ik(e,t,n){return void 0===n&&(n=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-payment-route",e,t,n],function(){return jh.getInstance().getSmartRoutingPaymentRoute(e,t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!t,cacheTime:0,useErrorBoundary:!1})}function sk(e,t){return void 0===t&&(t=Ad.DEFAULT_ROUTING_TYPE),Hf(["smart-routing-simulate-condition-type-values",e,t],function(){return jh.getInstance().getSmartRoutingSimulateConditionTypeValues(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})}function ck(e){var t=e.text,n=e.conditionType;return Hf(["smart-routing-search-condition-values",t,n],function(){return jh.getInstance().getSmartRoutingSearchConditionValues(n,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})}function uk(){return Hf(["smart-routing-conversion-rates"],function(){return jh.getInstance().getProviderConversionRatesData().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!1,useErrorBoundary:!1})}function lk(){var e=this;return Hf({queryKey:["smart-routing-3ds-excemptions"],queryFn:function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})}function dk(){var e=this;return Hf({queryKey:["smart-routing-network-tokens-onboarding"],queryFn:function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})}function pk(e){return Hf(["fetch-routing-monitors-templates",e],function(){return jh.getInstance().getRoutingMonitorsTemplates(e).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function hk(e,t){return Hf(["fetch-routing-monitors-template",e],function(){return jh.getInstance().getRoutingMonitorsTemplate(e,t).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e&&!!t&&"NONE"!==e,useErrorBoundary:!1})}function fk(e,n){var r=e.accountCode;return Hf(["checkouts",r],function(){return jh.getInstance().getCheckouts({accountCode:r}).then(function(e){return e.data})},t({cacheTime:0,enabled:Boolean(r),useErrorBoundary:!1},n))}!function(e){e.IN_PROGRESS="IN_PROGRESS",e.COMPLETED="COMPLETED",e.FAILED="FAILED"}(Qv||(Qv={}));var mk=function(e){return["checkout-builder-name-and-icon",e.paymentMethodType,e.type]},gk=function(e,t){var n=e.paymentMethodType,r=e.type;return Hf(mk({paymentMethodType:n,type:r}),function(){return jh.getInstance().getNameAndIcon({paymentMethodType:n,type:r}).then(function(e){return null==e?void 0:e.data})},t)},yk=function(e){return["checkout-builder-required-fields",e.paymentMethodType,e.type]},vk=function(e,t){var n=e.paymentMethodType,r=e.type;return Hf(yk({paymentMethodType:n,type:r}),function(){return jh.getInstance().getRequiredFields({paymentMethodType:n,type:r}).then(function(e){return null==e?void 0:e.data})},t)},bk=function(e){return Hf(["checkout-builder-country-data",e],function(){return jh.getInstance().getCountryData({accountCode:e}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:Boolean(e),useErrorBoundary:!1})},kk=function(e){return["checkout-payment-method-accounts",e.paymentMethod,e.organizationCode]},_k=function(e,n){var r=e.paymentMethod,o=e.organizationCode;return Hf(kk({paymentMethod:r,organizationCode:o}),function(){return jh.getInstance().getPaymentMethodAccounts({paymentMethod:r,organizationCode:o}).then(function(e){return null==e?void 0:e.data})},t({cacheTime:0,enabled:Boolean(r),useErrorBoundary:!1},n))};function wk(e){var t=e.accountCode;return Hf(["styling-sdk-dynamic",t],function(){return jh.getInstance().getStylingSdkDynamic({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Ek(e){var t=e.accountCode;return Hf(["styling-settings-v2",t],function(){return jh.getInstance().getStylingSettingsV2({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function xk(){return Vf(function(e){var t=e.accountCode,n=e.payload;return jh.getInstance().changeStylingSettings({accountCode:t,payload:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})}function Sk(e){return Hf(["notifications-customer",e],function(){return jh.getInstance().getNotificationsCustomer(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,keepPreviousData:!1})}function Ck(e){return Hf(["validate-opsgenie-key",e],function(){return jh.getInstance().getValidateOpsgenieKey(e).then(function(e){return null==e?void 0:e.data}).catch(function(){return{error:!0}})},{enabled:!!e,cacheTime:0})}function Ik(){return Hf(["notifications-merged"],function(){return jh.getInstance().getMergedNotifications().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{keepPreviousData:!1,cacheTime:0})}function Rk(){return Vf(function(e){return jh.getInstance().getNotificationsNumber(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})}function Tk(){var e=this;return Vf(function(t){return n(e,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().pathNotification(t)];case 1:return[2,null==(e=n.sent())?void 0:e.data]}})})})}var Ak={key:"metadata_fields",name:"metadata_fields",unique_key:"metadata_fields"};function Ok(){return Hf(["reports"],function(){return jh.getInstance().reportsList().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Pk(e){return void 0===e&&(e=!0),Hf(["reports-multi-env"],function(){return jh.getInstance().reportsListMultiEnv().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e})}function Dk(e,t,n){return void 0===t&&(t=!1),Hf(["reports/".concat(e)],function(){return jh.getInstance().downloadReports(e).then(function(e){return null==e?void 0:e.data})},{enabled:t,onSuccess:n,useErrorBoundary:!1})}function Lk(e){return Hf(["GET/reports/templates"],function(){return jh.getInstance().getReportTemplates().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,useErrorBoundary:!1})}function jk(t,o,a){var i=this;return Hf(["GET/reports/columns/".concat(o,"/").concat(a)],function(){return n(i,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().getReportColumns(o,a).then(function(t){return o===Td.ALL&&a===Rd.PAYMENTS?e(e([],(null==t?void 0:t.data)||[],!0),[Ak],!1):null==t?void 0:t.data}).catch(function(e){return e})]})})},{enabled:t,useErrorBoundary:!1})}function Nk(e,t){var o=this,a=Am();return Hf(["getRefundPdf",e,a,t],function(){return n(o,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getRefundPdf(e,a,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})]})})},{enabled:!!e&&!!a,useErrorBoundary:!1})}function zk(){var e=Am();return Hf(["teams-filters-members"],function(){return jh.getInstance().teamsFiltersMembers({organizationCode:e}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0})}function qk(e){var t=e.organizationCode,n=e.accountCodes,r=e.search,o=e.status,a=e.roleId,i=e.statuses,s=e.roleIds,c=e.page,u=e.pageSize,l=Am();return Hf(["fetch-post-members-v2",t,n,r,o,a,i,s,c,u],function(){return jh.getInstance().postMembersPaginatedV2({organizationCode:l,accountCodes:n,search:r,status:o,roleId:a,statuses:i,roleIds:s,page:c,pageSize:u}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!n,cacheTime:0,useErrorBoundary:!1})}function Uk(){return Hf(["fetch-roles"],function(){return jh.getInstance().getRoles().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Mk(){return Hf(["fetch-rolespermissions"],function(){return jh.getInstance().getRolesPermissions().then(function(e){return null==e?void 0:e.data})})}function Bk(){return Hf(["fetch-permissions-catalog"],function(){return jh.getInstance().getPermissionsCatalog().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})}function Fk(){return Hf(["fetch-org-roles-permissions"],function(){return jh.getInstance().getOrgRolesPermissions().then(function(e){return null==e?void 0:e.data})})}function Gk(){return Hf(["fetch-org-permissions-catalog"],function(){return jh.getInstance().getOrgPermissionsCatalog().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function Wk(e){var t=e.exportCode,n=e.enabled;return Hf(["user-export-status",t],function(){return jh.getInstance().getUserExportStatus({exportCode:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),refetchInterval:function(e){return("PENDING"===(null==e?void 0:e.status)||"IN_PROGRESS"===(null==e?void 0:e.status))&&5e3},useErrorBoundary:!1})}function Hk(e){var t=e.page,n=void 0===t?0:t,r=e.pageSize,o=void 0===r?20:r,a=e.enabled;return Hf(["user-exports-list",n,o],function(){return jh.getInstance().listUserExports({page:n,pageSize:o}).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===a||a,useErrorBoundary:!1})}function Vk(){var e=this,t=Uf();return function(o){return n(e,void 0,void 0,function(){return r(this,function(e){return[2,t.fetchQuery(["user-export-status",o],function(){return jh.getInstance().getUserExportStatus({exportCode:o}).then(function(e){return null==e?void 0:e.data})})]})})}}function Kk(e){return Hf(["data-report",e],function(){return jh.getInstance().getSmartRoutingDataReport(e).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,useErrorBoundary:!1})}function $k(e,t,n,r){void 0===n&&(n=!0);return Hf(["get-insights-conversion-rate-metrics-v2",e,t],function(){return jh.getInstance().getInsightsMetricsConversionRateV2(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:n&&(!!(null==e?void 0:e.currency_code)&&"Empty"!==(null==e?void 0:e.currency_code)&&"string"==typeof(null==e?void 0:e.currency_code)||Array.isArray(null==e?void 0:e.currency_code)&&0===(null==e?void 0:e.currency_code.length)),staleTime:200,cacheTime:200,useErrorBoundary:!1,retry:1})}function Qk(e,t){return Hf(["get-insights-conversion-rate-view-more-metrics",t,e],function(){return jh.getInstance().getInsightsMetricsConversionRateViewMore(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled)&&!!t,cacheTime:200,useErrorBoundary:!1})}function Yk(e){return Hf(["get-insights-conversion-rate-fallback-metrics",e],function(){return jh.getInstance().getInsightFallbackMetrics(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled),cacheTime:200,useErrorBoundary:!1})}function Jk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Hf(["get-insights-volume-metrics",t,e],function(){return jh.getInstance().getInsightsMetricsVolume(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function Zk(e,t,n,r){return void 0===r&&(r=!0),delete t.account_code,Hf(["get-insights-volume-metrics-v2",t,e,n],function(){return jh.getInstance().getInsightsMetricsVolumeV2(e,n,t).then(function(e){return null==e?void 0:e.data})},{enabled:r,cacheTime:200,useErrorBoundary:!1})}function Xk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Hf(["get-insights-total-payment-fraud-metrics",t,e],function(){return jh.getInstance().getInsightsMetricsTotalPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function e_(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Hf(["get-insights-customer-payment-fraud-metrics",t,e],function(){return jh.getInstance().getInsightsMetricsCustomerPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})}function t_(e){return Hf(["get-insights-overview",e],function(){return jh.getInstance().getInsightOverview(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled)&&void 0!==e.account_code,cacheTime:200,useErrorBoundary:!1})}function n_(e,t){var n=!!(null==e?void 0:e.enabled)&&void 0!==(null==e?void 0:e.account_code);return Hf(["get-insights-overview-v3",e,t],function(){return jh.getInstance().getInsightOverviewV3(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:0,useErrorBoundary:!1})}function r_(e){return Hf(["get-insights-home-metrics",e],function(){return jh.getInstance().getInsighstHomeMetrics(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.currency_code)&&!!(null==e?void 0:e.account_codes)&&!!(null==e?void 0:e.organization_code)&&(null==e?void 0:e.isLiveMode)&&!!(null==e?void 0:e.timezone),cacheTime:200,useErrorBoundary:!1})}function o_(e){return Hf(["get-insights-reports",e],function(){return jh.getInstance().getInsightsReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!(null==e?void 0:e.type),cacheTime:0,useErrorBoundary:!1})}function a_(e){return Hf(["get-insights-reports-again",e],function(){return jh.getInstance().getInsightsReportAgain(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!(null==e?void 0:e.code),cacheTime:0,useErrorBoundary:!1})}function i_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-fraud-screening-volume-and-count-tx",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsFraudScreeningVolumeAndCountTx(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function s_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-fraud-screening-conversion-rate",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsFraudScreeningConversionRate(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function c_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-3ds-volume-and-count-tx",t,e],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsights3dsVolumeAndCountTx(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function u_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-3ds-conversion-rate-and-evolution",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsights3dsConversionRateAndEvolution(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function l_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-3ds-decline-reasons",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsights3dsDeclineReasons(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function d_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-3ds-frictionless-vs-challenge",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsights3dsFrictionlessVsChallenge(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function p_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-volume-and-count-tx",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksVolumeAndCountTx(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function h_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-total-rate-and-evolution",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksTotalRateAndEvolution(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function f_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-win-rate",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksWinRate(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function m_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-disputed",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksDisputed(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function g_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksByProviderAndCardBrand(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function y_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-reasons-distribution",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksReasonsDistribution(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function v_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-status-distribution",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksStatusDistribution(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function b_(e,t,o){var a=this;return void 0===o&&(o={enabled:!0}),Hf({queryKey:["post-insights-chargebacks-by-card-brand",e,t],queryFn:function(){return n(a,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,jh.getInstance().getInsightsChargebacksByCardBrand(e,t)];case 1:return[2,n.sent()]}})})},enabled:o.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function k_(e,t){return Hf(["fetch-reconciliation-transaction",e],function(){return jh.getInstance().getReconciliationTransactions(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})}function __(e,t){return Hf(["fetch-reconciliation-settlements",e],function(){return jh.getInstance().getReconciliationSettlements(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})}function w_(e,t){return Hf(["fetch-reconciliation-metrics",e],function(){return jh.getInstance().getReconciliationMetrics(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t,cacheTime:500})}function E_(){return Hf(["GET-reconciliation-filters"],function(){return jh.getInstance().getReconciliationFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})}function x_(e){return Hf(["GET/v1/reconciliation/table/".concat(e,"/columns")],function(){return jh.getInstance().getAllTableColumns(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})}function S_(){return Hf(["GET/v1/reconciliation/active"],function(){return jh.getInstance().getReconciliationActive().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{useErrorBoundary:!1})}function C_(e,t,n){return Hf(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],function(){return jh.getInstance().getReconciliationsReportColumns(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})}function I_(e){return Hf(["GET/reconciliation/reports/templates"],function(){return jh.getInstance().getReconciliationReportTemplates().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})}function R_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/alerts/list",t,n],function(){return jh.getInstance().getReconciliationAlerts(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function T_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/agenda/list",t,n],function(){return jh.getInstance().getReconciliationAgenda(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function A_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/agenda/insights",t,n],function(){return jh.getInstance().getReconciliationAgendaInsightByKey(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function O_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/sales/list",t,n],function(){return jh.getInstance().getReconciliationSales(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function P_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/advancements/list",t,n],function(){return jh.getInstance().getReconciliationAdvancements(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function D_(e){var t=e.body,n=e.params,r=e.enabled;return Hf(["GET/reconciliation/fees/list",t,n],function(){return jh.getInstance().getReconciliationFees(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})}function L_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-conflicts-summary",t],function(){return jh.getInstance().getReconciliationInsightsConflictsSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function j_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-not-reconciled-aggregators",t],function(){return jh.getInstance().getReconciliationInsightsNotReconciledAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function N_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-not-reconciled-list",t],function(){return jh.getInstance().getReconciliationInsightsNotReconciledList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function z_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-status-conflict-aggregators",t],function(){return jh.getInstance().getReconciliationInsightsStatusConflictAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function q_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-status-conflict-list",t],function(){return jh.getInstance().getReconciliationInsightsStatusConflictList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function U_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-amount-conflict-aggregators",t],function(){return jh.getInstance().getReconciliationInsightsAmountConflictAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function M_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-amount-conflict-list",t],function(){return jh.getInstance().getReconciliationInsightsAmountConflictList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function B_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-conflict-date-summary",t],function(){return jh.getInstance().getReconciliationInsightsConflictDateSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function F_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-conflict-date-aggregators",t],function(){return jh.getInstance().getReconciliationInsightsConflictDateAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function G_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-conflict-date-list",t],function(){return jh.getInstance().getReconciliationInsightsConflictDateList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function W_(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Hf(["reconciliation-insights-incorrect-fees-summary",t,n],function(){return jh.getInstance().getReconciliationInsightsIncorrectFeesSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})}function H_(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Hf(["reconciliation-insights-incorrect-fees-aggregators",t,n],function(){return jh.getInstance().getReconciliationInsightsIncorrectFeesAggregators(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})}function V_(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Hf(["reconciliation-insights-incorrect-fees-list",t,n],function(){return jh.getInstance().getReconciliationInsightsIncorrectFeesList(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})}function K_(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Hf(["reconciliation-insights-fees-charged-summary",t,n],function(){return jh.getInstance().getReconciliationInsightsFeesChargedSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})}function $_(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Hf(["reconciliation-insights-reconciled-summary",t,n],function(){return jh.getInstance().getReconciliationInsightsReconciledSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})}function Q_(e){var t=e.body,n=e.dateFilter,r=e.transactionType,o=e.enabled;return Hf(["reconciliation-insights-reconciled-aggregators",t,n,r],function(){return jh.getInstance().getReconciliationInsightsReconciledAggregators(t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===o||o,useErrorBoundary:!1})}function Y_(e){var t=e.body,n=e.dateFilter,r=e.transactionType,o=e.enabled;return Hf(["reconciliation-insights-reconciled-list",t,n,r],function(){return jh.getInstance().getReconciliationInsightsReconciledList(t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===o||o,useErrorBoundary:!1})}function J_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-not-confirm-summary",t],function(){return jh.getInstance().getReconciliationInsightsNotConfirmSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function Z_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-not-confirm-aggregators",t],function(){return jh.getInstance().getReconciliationInsightsNotConfirmAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function X_(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-not-confirm-list",t],function(){return jh.getInstance().getReconciliationInsightsNotConfirmList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function ew(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-amount-to-be-settled-summary",t],function(){return jh.getInstance().getReconciliationInsightsAmountToBeSettledSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function tw(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-reconciliation-rate-by-provider",t],function(){return jh.getInstance().getReconciliationInsightsReconciliationRateByProvider(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function nw(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-reconciliation-rate-by-account",t],function(){return jh.getInstance().getReconciliationInsightsReconciliationRateByAccount(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function rw(e){var t=e.body,n=e.enabled;return Hf(["reconciliation-insights-reconciliation-rate-by-currency",t],function(){return jh.getInstance().getReconciliationInsightsReconciliationRateByCurrency(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})}function ow(e){var t=this,o=Object.values(e).filter(Boolean);return Hf(["feature-flags",o],function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().getFeatureFlagId(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:o.length>1,useErrorBoundary:!1})}function aw(e){var t=this,o=Hf({queryKey:["all-feature-flags",Object.values(e).filter(Boolean)],queryFn:function(){return n(t,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().getFeatureFlagIdAll({accountCode:e.account_code}).then(function(e){return null==e?void 0:e.data})]})})},enabled:!!e.account_code&&!!e.organization_code&&!!e.email,cacheTime:9e5,useErrorBoundary:!1}),a=Uf();return u(function(){a.setQueryData(["cached-feature-flags"],o)},[o,a]),o}function iw(e){var n,r,o=Uf(),a=o.getQueryState(["cached-feature-flags"]),i=Boolean(!(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.status)||"loading"===(null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.status)),s=Hf({queryKey:["cached-feature-flags"],queryFn:function(){},enabled:!1,select:function(t){var n;return{result:null===(n=null==t?void 0:t.data)||void 0===n?void 0:n[e]}},initialData:function(){var e=o.getQueryData(["cached-feature-flags"]);return(null==e?void 0:e.data)||{}}});return t(t({},s),{isLoading:i})}function sw(e){return Hf(["events",e],function(){return jh.getInstance().getAuditEvents(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.account_code&&!!e.organizationCode,cacheTime:0,keepPreviousData:!0,useErrorBoundary:!1})}function cw(e){return Hf(["audit-monitor-event-detail",e],function(){return jh.getInstance().getAuditMonitorDetail(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:null!==e,cacheTime:0,useErrorBoundary:!1})}function uw(e){return Hf(["api-logs",e],function(){return jh.getInstance().postApiLogs({payload:e}).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.organizationCode,cacheTime:0,useErrorBoundary:!1})}function lw(e){var t=e.params;return Hf(["webhook-logs",t],function(){return jh.getInstance().postWebhookLogs({payload:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.organizationCode,cacheTime:0,useErrorBoundary:!1})}function dw(e,t){return Hf(["api-logs-detail",e,t],function(){return jh.getInstance().getApiLogsDetailByPaymentCode(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function pw(e,t){return Hf(["api-logs-by-transaction",e,t],function(){return jh.getInstance().getApiLogsByTransactionCode(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!t,cacheTime:0,useErrorBoundary:!1})}function hw(e,t){return void 0===t&&(t=!0),Hf(["audit-exports-list",e],function(){return jh.getInstance().getAuditExportsList(e).then(function(e){return null==e?void 0:e.data})},{enabled:t,cacheTime:0,useErrorBoundary:!1})}function fw(e,t,n){return void 0===t&&(t=!1),Hf(["audit-export-download",e],function(){return jh.getInstance().getAuditExportDownload(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&t,cacheTime:0,useErrorBoundary:!1,onSuccess:n})}function mw(e){var t=e.tab,n=e.exportId,r=e.enabled,o=void 0!==r&&r,a=e.onSuccess;return Hf(["unified-export-status",t,n],function(){return jh.getInstance().getUnifiedExportStatus(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!n&&o,cacheTime:0,useErrorBoundary:!1,onSuccess:a})}function gw(e){var t=e.tab,n=e.page,r=void 0===n?0:n,o=e.size,a=void 0===o?10:o,i=e.enabled;return Hf(["unified-exports-list",t,r,a],function(){return jh.getInstance().getUnifiedExportsList(t,r,a).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===i||i,cacheTime:0,useErrorBoundary:!1})}function yw(e){return Hf(["api-logs-stats-requests",e],function(){return jh.getInstance().postApiLogsStatsRequests(t({},e)).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.start_date,cacheTime:0,useErrorBoundary:!1})}function vw(e){return Hf(["api-logs-stats-errors",e],function(){return jh.getInstance().postApiLogsStatsErrors(t({},e)).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.start_date,cacheTime:0,useErrorBoundary:!1})}function bw(e){return Hf(["api-logs-stats-errors-by-endpoint",e],function(){return jh.getInstance().postApiLogsStatsErrorsByEndpoint(t({},e)).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.start_date,cacheTime:0,useErrorBoundary:!1})}function kw(e){return Hf(["api-logs-list",e],function(){return jh.getInstance().postApiLogsList(t({},e)).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.start_date,cacheTime:0,useErrorBoundary:!1})}function _w(e){var t=e.paymentCode,n=e.createdAtFrom,r=e.enabled;return Hf(["api-logs-v2-payment",t,n],function(){return jh.getInstance().getApiLogsV3ByPaymentCode(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:(void 0===r||r)&&!!t,cacheTime:0,useErrorBoundary:!1})}function ww(e,t){return Hf(["fetch-payment-links",e,t],function(){return jh.getInstance().getPaymentLinks(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,cacheTime:0})}function Ew(e){return Hf(["payment-link"],function(){return jh.getInstance().getPaymentLinksByCode(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})}function xw(e){return void 0===e&&(e=!0),Hf(["countries",e],function(){return jh.getInstance().useGetCountriesConfig().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,keepPreviousData:!0})}function Sw(e){var t=localStorage.getItem("lang")||"en",n=e||t;return Hf(["countries-v2",n],function(){return jh.getInstance().useGetCountriesConfigV2(n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!0,keepPreviousData:!0})}function Cw(e){return Hf(["timezone"],function(){return jh.getInstance().getTimezone(e).then(function(e){return mh(e)?bh:null==e?void 0:e.data}).catch(function(){return bh})},{enabled:!0,keepPreviousData:!0})}function Iw(e,t){return void 0===t&&(t=!0),Hf(["subscription",e],function(){return jh.getInstance().getSubscriptionByCode(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&t,cacheTime:500})}function Rw(e,t,n,r){return void 0===r&&(r=!0),Hf(["subscription-payments",e,t,n],function(){return jh.getInstance().getSubscriptionPayments(e,t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&r,cacheTime:0})}function Tw(e){return Vf(function(e){var t=e.payload;return jh.getInstance().firebaseUserSubscribe(t)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Aw(e,t){return Hf(["get-cofig-allow-list",e],function(){return jh.getInstance().getConfigAllowlist(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0,enabled:!!e&&!!t})}function Ow(e,t){return void 0===t&&(t=!0),Hf(["get-black-list",e],function(){return jh.getInstance().getBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e&&t})}function Pw(e,t,n,r){var o;return Hf(["post-black-list",e],function(){return jh.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=r?r:25).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:(null===(o=e[0])||void 0===o?void 0:o.length)>0&&null!==t,useErrorBoundary:!1})}function Dw(e,t,n){return Hf(["get-block-list-summary",e,t,n],function(){var r=jh.getInstance();return n?r.getBlackListSummary(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e}):Promise.resolve({})},{enabled:!!e&&!!n})}function Lw(e,t,n,r,o,a){return Hf(["black-list-detail",e,t,r,o,a],function(){return jh.getInstance().getBlacklistDetail(e,t,n,r,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&a,cacheTime:0})}function jw(e,t,n){return Hf(["allow-list-detail",e],function(){return jh.getInstance().getAllowlistDetail(e,t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e&&!!n})}function Nw(e,t){return void 0===t&&(t=!0),Hf(["query-post-get-allowlist-multi-account",JSON.stringify(e)],function(){return jh.getInstance().postGetAllowlist({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e&&t,cacheTime:0})}function zw(e,t){var o=this;return void 0===e&&(e=26),void 0===t&&(t=0),Hf(["batch-refunds",e,t],function(){return n(o,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getBatchRefunds(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{cacheTime:0})}function qw(e){return Hf(["velocity-rules",e],function(){var t=jh.getInstance();return e?t.getVelocityRules(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e}):Promise.resolve({})},{enabled:!!e,keepPreviousData:!0})}function Uw(){return Hf(["config-rules"],function(){return jh.getInstance().getAllConfigRules().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0})}function Mw(e,t){var n=e.organizationCode;return Hf(["mfa-excluded-users",n],function(){return jh.getInstance().getMFAExcludedUsers({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function Bw(e,t){var n=e.organizationCode;return Hf(["mfa-config",n],function(){return jh.getInstance().getMFAConfig({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function Fw(e,t){return Hf(["mfa-enforcement-status",e.accountCode],function(){return jh.getInstance().getMFAEnforcementStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})}function Gw(e){return Hf(["fetch-organization-saml-config",e],function(){return jh.getInstance().getSamlConfig().then(function(e){return e.data})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Ww(e){return Hf(["chartgpt-chart-execute",e],function(){return jh.getInstance().executeChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e})}function Hw(){return Hf(["chartgpt-user-charts"],function(){return jh.getInstance().getChartsByUser().then(function(e){return null==e?void 0:e.data})},{cacheTime:0})}function Vw(){var e=this;return Hf(["chartgpt-user-charts-with-results"],function(){return n(e,void 0,void 0,function(){var e,o,a,i=this;return r(this,function(s){switch(s.label){case 0:return[4,(e=jh.getInstance()).getChartsByUser()];case 1:return o=s.sent(),a=(null==o?void 0:o.data)||[],[4,Promise.all(a.map(function(o){return n(i,void 0,void 0,function(){var n,a,i,s,c,u,l,d;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e.executeChartGPTChart(o.code)];case 1:return n=r.sent(),[2,t(t({},o),{user_prompt:null!==(s=null===(i=null==n?void 0:n.data)||void 0===i?void 0:i.user_prompt)&&void 0!==s?s:o.user_prompt,unit_to_display:null!==(u=null===(c=null==n?void 0:n.data)||void 0===c?void 0:c.unit_to_display)&&void 0!==u?u:o.unit_to_display,results:null!==(d=null===(l=null==n?void 0:n.data)||void 0===l?void 0:l.results)&&void 0!==d?d:[]})];case 2:return a=r.sent(),console.error("Failed to execute chart ".concat(o.chart_id,":"),a),[2,t(t({},o),{results:[]})];case 3:return[2]}})})}))];case 2:return[2,s.sent()]}})})})}function Kw(e,t,o){var a=this;return void 0===o&&(o=!0),Hf(["chartgpt-patch-and-execute",e,t],function(){return n(a,void 0,void 0,function(){var n,o,a,i,s;return r(this,function(r){switch(r.label){case 0:return[4,(n=jh.getInstance()).patchChartGPTChart(e,t)];case 1:return o=r.sent(),a=null==o?void 0:o.data,[4,n.executeChartGPTChart(e)];case 2:return i=r.sent(),s=null==i?void 0:i.data,[2,{chart:a,execution:s}]}})})},{enabled:o&&!!e,retry:!1})}function $w(e){var t=this,o=e.chartCode,a=e.enabled;return Hf(["chart-feedback",o],function(){return n(t,void 0,void 0,function(){var e,t,n,a,i;return r(this,function(r){switch(r.label){case 0:e=jh.getInstance(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.getChartFeedback(o)];case 2:return t=r.sent(),(n=null==t?void 0:t.data)&&n.rating?[2,n]:[2,null];case 3:if(a=r.sent(),404===(null===(i=null==a?void 0:a.response)||void 0===i?void 0:i.status))return[2,null];throw a;case 4:return[2]}})})},{enabled:(void 0===a||a)&&!!o,staleTime:3e5})}function Qw(){return Hf(["languages"],function(){return jh.getInstance().getLanguages().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:300})}function Yw(){var e=localStorage.getItem("lang")||"en";return Hf(["translations",e],function(){return jh.getInstance().getTranslations(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:3e4})}function Jw(e){var t=this;return Hf({queryKey:["network-tokens-onboarding",e],queryFn:function(){return n(t,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,jh.getInstance().getNetworkTokensOnboardingByOrganization(e)];case 1:return[2,t.sent().data]}})})},enabled:!!e,useErrorBoundary:!1,cacheTime:0})}var Zw=function(e){if(!e)return"";var t=new Date(e);return"".concat(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getUTCMonth()]," ").concat(t.getUTCDate())},Xw=function(e,t,n){if(!t||!n)return e||[];var r=function(e,t){var n=[],r=new Date(e),o=new Date(t);r.setUTCHours(0,0,0,0),o.setUTCHours(0,0,0,0);for(var a=new Date(r);a<=o;)n.push(a.toISOString()),a.setUTCDate(a.getUTCDate()+1);return n}(t,n),o=new Map;return null==e||e.forEach(function(e){if(e.date){var t=new Date(e.date).toISOString().split("T")[0];o.set(t,e.value)}}),r.map(function(e){var t=e.split("T")[0];return{date:e,value:o.get(t)||"0"}})},eE=function(e){var t,n=null===(t=e.plots)||void 0===t?void 0:t[0];if(!n||!n.rows)return{distribution:[],total:0};var r=parseFloat(n.value||"0");return{distribution:n.rows.map(function(e){var t,n=100*parseFloat(e.value),o=Math.round(r*parseFloat(e.value));return{key:(null===(t=e.label)||void 0===t?void 0:t.toUpperCase())||"UNKNOWN",total:o,percentage:n,amount:o}}),total:r}},tE=function(e,t,n){var r,o={};return null===(r=e.plots)||void 0===r||r.forEach(function(e){var r=Xw(e.rows,t,n),a=e.label;o[a]=r.map(function(e){return{key:e.date||"",total:100*parseFloat(e.value),current_label:Zw(e.date||""),current_amount:100*parseFloat(e.value)}})}),o},nE=function(e,t,n){var r,o=null===(r=e.plots)||void 0===r?void 0:r[0];return{distribution:Xw(null==o?void 0:o.rows,t,n).map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Zw(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==o?void 0:o.value)||"0"),total_amount:parseFloat((null==o?void 0:o.value)||"0")}},rE=function(e,t,n){var r,o=null===(r=e.plots)||void 0===r?void 0:r[0];return{distribution:Xw(null==o?void 0:o.rows,t,n).map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Zw(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==o?void 0:o.value)||"0"),total_amount:parseFloat((null==o?void 0:o.value)||"0")}},oE=function(e,o){return Hf(t({queryKey:["smart-recovery-communications-by-day",e],queryFn:function(){return n(void 0,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return t=jh.getInstance(),n={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[],timezone:e.timezone},[4,t.post("/nova-insights/communications-by-day",n)];case 1:return o=r.sent(),[2,(a=o.data,i=n.start_date,s=n.end_date,c=a.plots||[],u=c.find(function(e){return"TOTAL_COMMUNICATIONS_LABEL"===e.label}),l=c.find(function(e){return"COMPLETED_COMMUNICATIONS_LABEL"===e.label}),d=c.find(function(e){return"CONVERSION_RATE_LABEL"===e.label}),p=Xw(null==u?void 0:u.rows,i,s),h=Xw(null==l?void 0:l.rows,i,s),f=Xw(null==d?void 0:d.rows,i,s),{communications:{distribution:p.map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Zw(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==u?void 0:u.value)||"0")},conversion_rate:{distribution:f.map(function(e){return{key:e.date||"",total:parseFloat(e.value),percentage:parseFloat(e.value)}}),total:parseFloat((null==d?void 0:d.value)||"0")},completed_communications:{distribution:h.map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Zw(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==l?void 0:l.value)||"0")}})]}var a,i,s,c,u,l,d,p,h,f})})},enabled:!!e.organization_code,staleTime:3e5},o))},aE=function(e,o){return Hf(t({queryKey:["smart-recovery-communications-by-substatus",e],queryFn:function(){return n(void 0,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return t=jh.getInstance(),n={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[],timezone:e.timezone},[4,t.post("/nova-insights/communications-by-substatus",n)];case 1:return o=r.sent(),[2,eE(o.data)]}})})},enabled:!!e.organization_code,staleTime:3e5},o))},iE=function(e,o){return Hf(t({queryKey:["smart-recovery-communications-substatus-by-day",e],queryFn:function(){return n(void 0,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return t=jh.getInstance(),n={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[],timezone:e.timezone},[4,t.post("/nova-insights/communications-substatus-by-day",n)];case 1:return o=r.sent(),[2,tE(o.data,n.start_date,n.end_date)]}})})},enabled:!!e.organization_code,staleTime:3e5},o))},sE=function(e,o){return Hf(t({queryKey:["smart-recovery-recovered-tpv-by-day",e],queryFn:function(){return n(void 0,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return t=jh.getInstance(),n={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[],timezone:e.timezone},[4,t.post("/nova-insights/recovered-tpv-by-day",n)];case 1:return o=r.sent(),[2,nE(o.data,n.start_date,n.end_date)]}})})},enabled:!!e.organization_code,staleTime:3e5},o))},cE=function(e,o){return Hf(t({queryKey:["smart-recovery-recovered-payments-by-day",e],queryFn:function(){return n(void 0,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return t=jh.getInstance(),n={start_date:e.start_date||"",end_date:e.end_date||"",organization_code:e.organization_code,account_codes:e.account_code||[],countries:e.countries||[],channels:e.channels||[],focuses:e.focuses||[],timezone:e.timezone},[4,t.post("/nova-insights/recovered-payments-by-day",n)];case 1:return o=r.sent(),[2,rE(o.data,n.start_date,n.end_date)]}})})},enabled:!!e.organization_code,staleTime:3e5},o))};function uE(e,t){var o=this;return Hf(["POST/template-reporting/templates/search",e],function(){return n(o,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().searchReportTemplates(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:t,useErrorBoundary:!1})}function lE(e,t,o){var a=this;return Hf(["POST/template-reporting/template-by-id/search",e,t],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().searchReportTemplateById(e,t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:o&&!!e,useErrorBoundary:!1})}function dE(e,t){var o=this;return Hf(["POST/template-reporting/schedules/search",e],function(){return n(o,void 0,void 0,function(){return r(this,function(t){return[2,jh.getInstance().searchReportSchedules(e).then(function(e){return null==e?void 0:e.data})]})})},{enabled:t,useErrorBoundary:!1})}function pE(e,t,o){var a=this;return Hf(["POST/template-reporting/schedule-by-id/search",e,t],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().searchReportScheduleById(e,t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:o&&!!e,useErrorBoundary:!1})}function hE(){return Hf({queryKey:["organization-configs"],queryFn:function(){return jh.getInstance().getOrganizationConfigs().then(function(e){return null==e?void 0:e.data})},cacheTime:0,useErrorBoundary:!1})}function fE(e){var t=e.accountCode,n=e.enabled;return Hf(["onboarding-status",t],function(){return jh.getInstance().getOnboardingStatus(t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function mE(e,t,o){var a=this;return void 0===o&&(o=!0),Hf(["get-recipients",e,t],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getRecipients(e,t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&o,cacheTime:0,useErrorBoundary:!1})}function gE(e,t,o){var a=this;return void 0===o&&(o=!0),Hf(["get-recipient-by-id",e,t.recipient_id],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getRecipientById(e,t.recipient_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!t.recipient_id&&o,cacheTime:500,useErrorBoundary:!1})}function yE(e,t,o){var a=this;return void 0===o&&(o=!0),Hf(["get-onboarding-detail",e,t.recipient_id,t.onboarding_id],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getOnboardingDetail(e,t.recipient_id,t.onboarding_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!t.recipient_id&&!!t.onboarding_id&&o,cacheTime:500,useErrorBoundary:!1})}function vE(e,t,o){var a=this;return void 0===o&&(o=!0),Hf(["get-onboarding-timeline",e,t.onboarding_id],function(){return n(a,void 0,void 0,function(){return r(this,function(n){return[2,jh.getInstance().getOnboardingTimeline(e,t.onboarding_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!e&&!!t.onboarding_id&&o,cacheTime:500,useErrorBoundary:!1})}function bE(e,t,n){return void 0===t&&(t=!0),Hf(["installments-plans",e,n],function(){return jh.getInstance().getInstallmentPlans(n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(e)&&t,useErrorBoundary:!1})}function kE(e,t){return void 0===t&&(t=!0),Hf(["search-installments-plans",JSON.stringify(e)],function(){return jh.getInstance().searchInstallmentsPlans(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:t,useErrorBoundary:!1})}function _E(e){var t=this,o=e.paymentCode,a=e.enabled;return Hf({queryKey:["api-logs-v3",o],queryFn:function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getApiLogsV3(o).then(function(e){return null==e?void 0:e.data})]})})},enabled:(void 0===a||a)&&!!o,staleTime:3e4,cacheTime:3e5,useErrorBoundary:!1})}function wE(e){var t=this,o=e.paymentCode,a=e.enabled;return Hf({queryKey:["webhook-timeline",o],queryFn:function(){return n(t,void 0,void 0,function(){return r(this,function(e){return[2,jh.getInstance().getWebhookTimeline(o).then(function(e){return null==e?void 0:e.data})]})})},enabled:(void 0===a||a)&&!!o,staleTime:3e4,cacheTime:3e5,useErrorBoundary:!1})}function EE(){var e=this;return Hf(["workos-domain-status"],function(){return n(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,jh.getInstance().workosDomainStatus().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})}function xE(){return xE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xE.apply(this,arguments)}
51
51
  /**
52
52
  * match-sorter-utils
53
53
  *