@yuno-payments/dashboard-api-mfe 0.40.18 → 0.40.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/queries/data-report/data-report.query.d.ts +4 -1
- package/build/esm/index.js +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/queries/data-report/data-report.query.d.ts +4 -1
- package/build/index.d.ts +4 -1
- package/package.json +1 -1
|
@@ -3,7 +3,10 @@ import { DataReport } from '../../types';
|
|
|
3
3
|
export declare function useGetSmartRoutingDataReport(params: {
|
|
4
4
|
[a: string]: number;
|
|
5
5
|
}): UseQueryResult<any, unknown>;
|
|
6
|
-
export declare function useInsightsConversionRateMetricsV2(params: DataReport.InsightMetricParams, path: string, enabled?: boolean
|
|
6
|
+
export declare function useInsightsConversionRateMetricsV2(params: DataReport.InsightMetricParams, path: string, enabled?: boolean, cacheConfig?: {
|
|
7
|
+
staleTime?: number;
|
|
8
|
+
cacheTime?: number;
|
|
9
|
+
}): UseQueryResult<any, unknown>;
|
|
7
10
|
export declare function useViewMoreMetrics(params: DataReport.InsightMetricParams, type: any): UseQueryResult<any, unknown>;
|
|
8
11
|
export declare function useInsightsFallbackMetrics(params: DataReport.InsightMetricParams): UseQueryResult<any, unknown>;
|
|
9
12
|
export declare function useInsightsVolumeMetrics(account_codes: string, params: DataReport.InsightMetricParams, enabled?: boolean): UseQueryResult<any, unknown>;
|
package/build/esm/index.js
CHANGED
|
@@ -213,7 +213,7 @@ function Vo(e){const t=Go.parse(e),n={};for(const e in t)void 0!==t[e]&&(n[e]=t[
|
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the MIT license found in the
|
|
215
215
|
* LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/"production"===process.env.NODE_ENV?bp.exports=function(){if(yp)return kp;yp=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,o=e.useEffect,a=e.useLayoutEffect,r=e.useDebugValue;function i(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!t(e,o)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),u=n({inst:{value:s,getSnapshot:t}}),c=u[0].inst,l=u[1];return a((function(){c.value=s,c.getSnapshot=t,i(c)&&l({inst:c})}),[e,s,t]),o((function(){return i(c)&&l({inst:c}),e((function(){i(c)&&l({inst:c})}))}),[e]),r(s),s};return kp.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u,kp}():bp.exports=(vp||(vp=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!n(e,o)}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},o=t.useState,a=t.useEffect,r=t.useLayoutEffect,i=t.useDebugValue,u=!1,c=!1,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(s,l){u||void 0===t.startTransition||(u=!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(!c){var p=l();n(d,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var h=(p=o({inst:{value:d,getSnapshot:l}}))[0].inst,m=p[1];return r((function(){h.value=d,h.getSnapshot=l,e(h)&&m({inst:h})}),[s,d,l]),a((function(){return e(h)&&m({inst:h}),s((function(){e(h)&&m({inst:h})}))}),[s]),i(d),d};jp.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())}()),jp);var wp=bp.exports;const _p=wp.useSyncExternalStore,Ep=i.createContext(void 0),Cp=i.createContext(!1);function Sp(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Ep),window.ReactQueryClientContext):Ep)}const Rp=({context:e}={})=>{const t=i.useContext(Sp(e,i.useContext(Cp)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},xp=({client:e,children:t,context:n,contextSharing:o=!1})=>{i.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]),"production"!==process.env.NODE_ENV&&o&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const a=Sp(n,o);return i.createElement(Cp.Provider,{value:!n&&o},i.createElement(a.Provider,{value:e},t))},Tp=i.createContext(!1);Tp.Provider;const Ip=i.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function Op(e,t){return"function"==typeof e?e(...t):!!e}function Ap(e,t){const n=Rp({context:e.context}),o=i.useContext(Tp),a=i.useContext(Ip),r=n.defaultQueryOptions(e);r._optimisticResults=o?"isRestoring":"optimistic",r.onError&&(r.onError=np.batchCalls(r.onError)),r.onSuccess&&(r.onSuccess=np.batchCalls(r.onSuccess)),r.onSettled&&(r.onSettled=np.batchCalls(r.onSettled)),(e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)})(r),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(r,a),(e=>{i.useEffect((()=>{e.clearReset()}),[e])})(a);const[s]=i.useState((()=>new t(n,r))),u=s.getOptimisticResult(r);if(_p(i.useCallback((e=>{const t=o?()=>{}:s.subscribe(np.batchCalls(e));return s.updateResult(),t}),[s,o]),(()=>s.getCurrentResult()),(()=>s.getCurrentResult())),i.useEffect((()=>{s.setOptions(r,{listeners:!1})}),[r,s]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(r,u,o))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)})))(r,s,a);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:o})=>e.isError&&!t.isReset()&&!e.isFetching&&Op(n,[e.error,o]))({result:u,errorResetBoundary:a,useErrorBoundary:r.useErrorBoundary,query:s.getCurrentQuery()}))throw u.error;return r.notifyOnChangeProps?u:s.trackResult(u)}function zp(e,t,n){return Ap(Id(e,t,n),dp)}function Pp(e,t,n){const o=function(e,t,n){return Wd(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),a=Rp({context:o.context}),[r]=i.useState((()=>new gp(a,o)));i.useEffect((()=>{r.setOptions(o)}),[r,o]);const s=_p(i.useCallback((e=>r.subscribe(np.batchCalls(e))),[r]),(()=>r.getCurrentResult()),(()=>r.getCurrentResult())),u=i.useCallback(((e,t)=>{r.mutate(e,t).catch(Dp)}),[r]);if(s.error&&Op(r.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}function Dp(){}var Lp;function Np(e){return Pp((function(e){var t=e.payload;return Ed.getInstance().postWebhookV2MultiAccount({payload:t})}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function qp(e){return Pp((function(e){var t=e.code,n=e.accountCode;return Ed.getInstance().deleteWebhookV2(t,n)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Mp(e){return Pp((function(e){var t=e.code,n=e.payload,o=e.accountCode;return Ed.getInstance().updateWebhookV2(t,n,o)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Up(){return Pp((function(e){var t=e.name,n=e.principal;return Ed.getInstance().postAccount(t,n)}))}function Bp(){return Pp((function(t){var n=e([Lp.ACCOUNT],t.duplicate_order,!0);return Ed.getInstance().duplicateAccount(a(a({},t),{duplicate_order:n}))}))}function Fp(){return Pp((function(e){return Ed.getInstance().retryDuplicateAccount(e)}))}function Wp(){return Pp((function(e){var t=e.name,n=e.code,o=e.principal;return Ed.getInstance().patchAccountV2({name:t,code:n,principal:o})}))}function Hp(){return Pp((function(e){var t=e.account_code;return Ed.getInstance().putAccountPrincipal({account_code:t})}))}function Gp(){return Pp((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Ed.getInstance().putAccountsUserMassive(t,n,o)}))}function Vp(){return Pp((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Ed.getInstance().deleteAccountsUserMassive(t,n,o)}))}function Kp(){return Pp(["post-validate-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Ed.getInstance().postValidateStatusConnection({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function $p(){return Pp(["post-change-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Ed.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Qp(){return Pp((function(e){return Ed.getInstance().putCosts(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Jp(){return Pp(["post-connection"],(function(e){var t=e.payload;return Ed.getInstance().postMultiConnection({payload:t}).then((function(e){return null==e?void 0:e.data}))}))}function Xp(){return Pp(["new-post-connection-validate"],(function(){return Ed.getInstance().postMultiConnectionValidate().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Yp(){return Pp(["patch-connection"],(function(e){var t=e.payload,n=e.connectionCode;return Ed.getInstance().patchConnection({payload:t,connectionCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function Zp(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postDefaultRoutes({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function eh(){return Pp((function(e){return Ed.getInstance().postValidateCredentials(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function th(){var e=this;return Pp((function(o){var a=o.payload,r=o.organizationCode;return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().postNetworkTokensOnboarding(a,r)];case 1:return[2,e.sent().data]}}))}))}),{useErrorBoundary:!1})}function nh(){return Pp(["patch-organizations"],(function(){return Ed.getInstance().updateOrganizationStatus().then((function(e){return null==e?void 0:e.data}))}))}function oh(){return Pp((function(e){return Ed.getInstance().getOrgByName(e).then((function(e){return null==e?void 0:e.data}))}))}function ah(){var e=this;return Pp((function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().changePasswordV2(o).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}))}function rh(e){return Pp((function(e){return Ed.getInstance().updateProfile(e)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function ih(){return Pp((function(e){return Ed.getInstance().inviteUsersMassive(e,e.organizationCode)}))}function sh(){return Pp((function(e){var t=e.userCode,n=e.organizationCode;return Ed.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})}))}function uh(){return Pp((function(e){return Ed.getInstance().createUserAuth0(e)}))}function ch(){return Pp((function(e){return Ed.getInstance().postCall(e)}))}function lh(){return Pp((function(e){return Ed.getInstance().changeLoginMethods(e)}))}function dh(e){return Pp((function(e){return Ed.getInstance().updateIsActiveCheckout(e)}),e)}function ph(){return Pp((function(e){var t=e.accountCode,n=e.template;return Ed.getInstance().updateCheckoutTemplate({accountCode:t,template:n}).then((function(e){return null==e?void 0:e.data}))}))}function hh(){return Pp((function(e){var t=e.accountCode,n=e.theme;return Ed.getInstance().updateStylingTheme({accountCode:t,theme:n}).then((function(e){return null==e?void 0:e.data}))}))}function mh(){return Pp((function(e){var t=e.payload,n=e.transactionId,o=e.paymentId,a=e.action;return Ed.getInstance().createOperationTransaction(t,n,o,a)}))}function fh(){return Pp((function(e){var t=e.payload,n=e.paymentId,o=e.transactionId,a=e.handleSetProgress;return Ed.getInstance().uploadChargebacks(t,n,o,a)}))}!function(e){e.ACCOUNT="ACCOUNT",e.CHECKOUT_BUILDER="CHECKOUT_BUILDER",e.CONNECTION="CONNECTION",e.ROUTING="ROUTING",e.RISK_CONDITIONS="RISK_CONDITIONS",e.WEBHOOKS="WEBHOOKS"}(Lp||(Lp={}));var gh=new rp({}),yh=new class{constructor(e={}){this.queryCache=e.queryCache||new rp,this.mutationCache=e.mutationCache||new up,this.logger=e.logger||tp,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=Kd.subscribe((()=>{Kd.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=Qd.subscribe((()=>{Qd.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]=Od(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 o=Id(e,t,n),a=this.getQueryData(o.queryKey);return a?Promise.resolve(a):this.fetchQuery(o)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const o=this.queryCache.find(e),a=function(e,t){return"function"==typeof e?e(t):e}(t,null==o?void 0:o.state.data);if(void 0===a)return;const r=Id(e),i=this.defaultQueryOptions(r);return this.queryCache.build(this,i).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return np.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]=Od(e,t),o=this.queryCache;np.batch((()=>{o.findAll(n).forEach((e=>{o.remove(e)}))}))}resetQueries(e,t,n){const[o,a]=Od(e,t,n),r=this.queryCache,i={type:"active",...o};return np.batch((()=>(r.findAll(o).forEach((e=>{e.reset()})),this.refetchQueries(i,a))))}cancelQueries(e,t,n){const[o,a={}]=Od(e,t,n);void 0===a.revert&&(a.revert=!0);const r=np.batch((()=>this.queryCache.findAll(o).map((e=>e.cancel(a)))));return Promise.all(r).then(Rd).catch(Rd)}invalidateQueries(e,t,n){const[o,a]=Od(e,t,n);return np.batch((()=>{var e,t;if(this.queryCache.findAll(o).forEach((e=>{e.invalidate()})),"none"===o.refetchType)return Promise.resolve();const n={...o,type:null!=(e=null!=(t=o.refetchType)?t:o.type)?e:"active"};return this.refetchQueries(n,a)}))}refetchQueries(e,t,n){const[o,a]=Od(e,t,n),r=np.batch((()=>this.queryCache.findAll(o).filter((e=>!e.isDisabled())).map((e=>{var t;return e.fetch(void 0,{...a,cancelRefetch:null==(t=null==a?void 0:a.cancelRefetch)||t,meta:{refetchPage:o.refetchPage}})}))));let i=Promise.all(r).then(Rd);return null!=a&&a.throwOnError||(i=i.catch(Rd)),i}fetchQuery(e,t,n){const o=Id(e,t,n),a=this.defaultQueryOptions(o);void 0===a.retry&&(a.retry=!1);const r=this.queryCache.build(this,a);return r.isStaleByTime(a.staleTime)?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(Rd).catch(Rd)}fetchInfiniteQuery(e,t,n){const o=Id(e,t,n);return o.behavior=cp(),this.fetchQuery(o)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(Rd).catch(Rd)}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=>Dd(e)===Dd(t.queryKey)));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find((t=>Ld(e,t.queryKey)));if("production"!==process.env.NODE_ENV){this.queryDefaults.filter((t=>Ld(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=>Dd(e)===Dd(t.mutationKey)));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find((t=>Ld(e,t.mutationKey)));if("production"!==process.env.NODE_ENV){this.mutationDefaults.filter((t=>Ld(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=Pd(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:gh});function bh(){return Pp((function(e){return Ed.getInstance().createReconciliationsReportV2(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function kh(){return Pp((function(e){return Ed.getInstance().createReportV2(e).then((function(e){return null==e?void 0:e.data}))}))}function vh(){return Pp((function(e){return Ed.getInstance().getTotalRowsForExport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function jh(){return Pp((function(e){return Ed.getInstance().cancelReport(e).then((function(e){return null==e?void 0:e.data}))}))}function wh(o){var a=this;return Pp((function(){return t(a,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().createReportTemplate(o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onMutate:function(o){return t(a,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return[4,yh.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return n.sent(),t=yh.getQueryData(["GET/reports/templates"]),yh.setQueryData(["GET/reports/templates"],(function(t){return e(e([],t,!0),[o],!1)})),[2,{previousTemplates:t}]}}))}))},onError:function(e,t,n){yh.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){yh.invalidateQueries({queryKey:["GET/reports/templates"]})}})}function _h(e){return Pp((function(){return Ed.getInstance().updateReportTemplate(e).then((function(e){return null==e?void 0:e.data}))}))}function Eh(e,o,a){var r=this;return void 0===a&&(a=null),Pp((function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().postSmartRoutingCreateWorkflow(e,o).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,t.sent()]}}))}))}),a)}function Ch(e,o){var a=this,r=e.versionCode,i=e.accountCode,s=e.organizationCode;return void 0===o&&(o=null),Pp((function(){return t(a,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().postSmartRoutingPublishVersion(i,r,s).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}),o)}function Sh(e,t){var n=e.data,o=e.accountCode;return void 0===t&&(t=null),Pp((function(){return Ed.getInstance().putSmartRoutingUpdateWorkflow(o,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),t)}function Rh(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Pp((function(){return Ed.getInstance().deleteSmartRoutingVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)}function xh(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Pp((function(){return Ed.getInstance().postSmartRoutingDuplicateVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)}function Th(e,t){var n=e.paymentMethod,o=e.active,a=e.accountCode;return void 0===t&&(t=null),Pp((function(){return Ed.getInstance().putSmartRoutingToggleMethod(a,n,o).then((function(e){return null==e?void 0:e.data}))}),t)}function Ih(e,t){var n=e.declinedId,o=e.accountCode;return void 0===t&&(t=null),Pp((function(e){return void 0===e&&(e=null),Ed.getInstance().updateSmartRoutingDeclinedGroup(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)}function Oh(e){var t=e.accountCode;return Pp((function(e){return void 0===e&&(e=null),Ed.getInstance().createSmartRoutingDeclinedGroup(t,e).then((function(e){return null==e?void 0:e.data}))}),e.options)}function Ah(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Pp((function(e){return void 0===e&&(e=!1),Ed.getInstance().updateSmartRoutingFavorite(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)}function zh(e,t){var n=e.code,o=e.name,a=e.accountCode;return void 0===t&&(t=null),Pp((function(){return Ed.getInstance().putSmartRoutingUpdateWorkflowName(a,{code:n,name:o}).then((function(e){return null==e?void 0:e.data}))}),t)}function Ph(e,t){var n=e.accountCode,o=e.workflowVersionCode;return void 0===t&&(t=null),Pp((function(e){return Ed.getInstance().simulateSmartRoutingTransaction(n,o,e).then((function(e){return null==e?void 0:e.data}))}),t)}function Dh(e,t){return void 0===t&&(t=null),Pp((function(t){return Ed.getInstance().updateMonitorRedistribution(e,t).then((function(e){return null==e?void 0:e.data}))}),t)}function Lh(e,t){return void 0===t&&(t={}),Pp((function(t){var n=t.declinedGroupCode;return Ed.getInstance().removeDeclinedGroup(e,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),a(a({},t),{useErrorBoundary:!1}))}function Nh(e,t){return void 0===t&&(t={}),Pp((function(t){var n=t.payload;return Ed.getInstance().multiAccountDeclinedGroupCreate(e,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),a(a({},t),{useErrorBoundary:!1}))}var qh=function(e){return Pp((function(t){return Ed.getInstance().createMonitorThreshold(t,e).then((function(e){return e.data}))}))},Mh=function(e){return Pp((function(t){return Ed.getInstance().createMonitorTemplate(t,e).then((function(e){return e.data}))}))};function Uh(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postSlackMessageChannel(t).then((function(e){return null==e?void 0:e.data}))}))}function Bh(){return Pp((function(e){var t=e.userCode,n=e.organizationCode;return Ed.getInstance().deleteUserTeamV2({userCode:t,organizationCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function Fh(){return Pp((function(){return Ed.getInstance().setCustodian().then((function(e){return null==e?void 0:e.data}))}))}function Wh(){return Pp((function(e){var t=e.payload,n=e.accountCode;return Ed.getInstance().createRoles(t,n).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Hh(){var e=this;return Pp((function(o){var a=o.payload,r=o.id,i=o.accountCode;return t(e,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().editRoles({payload:a,id:r},i)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}}))}))}),{useErrorBoundary:!1})}function Gh(){return Pp((function(e){return Ed.getInstance().deleteRoles(e).then((function(e){return null==e?void 0:e.data}))}))}function Vh(){return Pp(["post-payment-links"],(function(e){var t=e.payload,n=e.accountCode;return Ed.getInstance().postPaymentLinks({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function Kh(){return Pp(["post-delete-payment-link"],(function(e){var t=e.code;return Ed.getInstance().postDeletePaymentLink({code:t}).then((function(e){return null==e?void 0:e.data}))}))}function $h(){return Pp(["patch-payment-links"],(function(e){var t=e.payload,n=e.accountCode,o=e.paymentLinkCode;return Ed.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:o}).then((function(e){return null==e?void 0:e.data}))}))}function Qh(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postUserSettings(t)}),{onMutate:function(e){return e}})}function Jh(){return Pp((function(e){return Ed.getInstance().postUserThemeSettings(e)}))}function Xh(){return Pp((function(e){var t=e.payload,n=e.section;return Ed.getInstance().postUserSettingsTables(t,n)}),{onMutate:function(e){return e},onSuccess:function(e){var t=yh.getQueryData(["fetch-profile"]);e.data&&yh.setQueryData(["fetch-profile"],a(a({},t),{settings:e.data}))}})}function Yh(e){return Pp(["pinned-sections"],(function(e){var t=e.payload;return Ed.getInstance().postUserSettingsPinned(t)}),{onMutate:function(t){var n=t.payload;return e({payload:n})}})}function Zh(){return Pp((function(e){var t=e.password,n=e.otp;return Ed.getInstance().getMfaTokenValidation(t,n).then((function(e){return null==e?void 0:e.data}))}))}function em(){return Pp((function(){return Ed.getInstance().getEmailOtp().then((function(e){return null==e?void 0:e.data}))}))}function tm(){return Pp((function(e){return Ed.getInstance().confirmMfaOtp(e).then((function(e){return null==e?void 0:e.data}))}))}function nm(){return Pp((function(e){return Ed.getInstance().unrollMfa(e).then((function(e){return null==e?void 0:e.data}))}))}function om(){return Pp((function(){return Ed.getInstance().validatePasswordStatus().then((function(e){return null==e?void 0:e.data})).catch((function(e){return{valid:!1}}))}))}function am(){return Pp(["post-get-allowlist-items"],(function(e){var t=e.payload;return Ed.getInstance().postAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function rm(){return Pp(["post-get-allowlist-multi-account"],(function(e){var t=e.payload;return Ed.getInstance().postGetAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function im(){return Pp(["post-create-allowlist-multi-account"],(function(e){var t=e.payload;return Ed.getInstance().postCreateAllowlistMultiAccount({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function sm(){return Pp(["patch-change-status-allowlist"],(function(e){var t=e.payload;return Ed.getInstance().patchChangeStatusAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function um(){return Pp(["patch-change-status-allowlist-item"],(function(e){var t=e.payload;return Ed.getInstance().patchChangeStatusAllowlistItem({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function cm(){return Pp(["post-add-allowlist-items"],(function(e){var t=e.payload;return Ed.getInstance().patchAddAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function lm(){return Pp(["patch-allowlist"],(function(e){var t=e.payload;return Ed.getInstance().patchAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function dm(){return Pp(["post-blacklist-multi-account"],(function(e){var t=e.payload;return Ed.getInstance().postBlackListMultiAccount({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function pm(){return Pp(["put-blacklist"],(function(e){return Ed.getInstance().putBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function hm(){return Pp(["change-blacklist"],(function(e){return Ed.getInstance().changeBlackListStatus(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function mm(){return Pp(["change-blacklist-item"],(function(e){return Ed.getInstance().changeBlackListStatusItem(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function fm(){return Pp(["post-blacklist-items"],(function(e){var t=e.payload;return Ed.getInstance().postBlackListItems({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function gm(){return Pp(["delete-blacklist"],(function(e){var t=e.black_list_code;return Ed.getInstance().deleteBlackListType({black_list_code:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function ym(e){var t=e.handleSetProgress;return Pp(["post-blacklist-batch"],(function(e){var n=e.blacklist_code,o=e.expiration_days,a=e.file;return Ed.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:o,file:a,handleSetProgress:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function bm(){return Pp(["change-payments-webhook"],(function(e){var t=e.status,n=e.paymentCode;return Ed.getInstance().postChangePaymentsWebhook({status:t,paymentCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function km(){return Pp(["delete-blacklist-items"],(function(e){var t=e.blocklist_code,n=e.blocklist_item_id,o=e.account_code;return Ed.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function vm(){return Pp(["valiate-blacklist-items"],(function(e){return Ed.getInstance().valiateBlockListItems({payload:e}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function jm(){return Pp(["delete-allowlist-item"],(function(e){return Ed.getInstance().deleteAllowlistItem({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function wm(){return Pp(["validate-allowlist-items"],(function(e){return Ed.getInstance().validateAllowlistItems({payload:e}).then((function(e){return e.data})).catch((function(e){return e}))}))}function _m(e){var t=e.fileName,n=e.onSuccess,o=e.onError,a=u(0),r=a[0],i=a[1],s=c({cancel:function(){return null}}),l=Pp(["upload-file-chargeback",t],(function(e){var t=Ed.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:i}),a=t.promise,r=t.cancel;return s.current.cancel=r,a.then((function(e){return null==n||n(null==e?void 0:e.data),null==e?void 0:e.data})).catch((function(e){throw null==o||o(),e}))}),{useErrorBoundary:!1});return{mutation:l,cancelRequest:s.current.cancel,progress:r}}function Em(){return Pp((function(e){return Ed.getInstance().uploadBatchRefundsV2({payload:e}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Cm(){var e=this;return Pp((function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().batchRefundByFile({payload:o}).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function Sm(){var e=this;return Pp((function(o){var a=o.batchRefundId,r=o.organizationCode,i=o.accountCode;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().getBatchRefundProcessedFileDownload(a,r,i).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function Rm(){var e=this;return Pp((function(o){var a=o.batchRefundId,r=o.organizationCode,i=o.accountCode;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().getBatchRefundUserFileDownload(a,r,i).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function xm(){var e=c({cancel:function(){return null}}),t=Pp(["upload-file"],(function(t){var n=Ed.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),o=n.promise,a=n.cancel;return e.current.cancel=a,o.then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}));return{mutation:t,cancelRequest:e.current.cancel}}function Tm(){return Pp((function(e){var t=e.payload,n=e.organizationCode;return Ed.getInstance().updateMFAConfig(t,n)}))}function Im(){return Pp((function(e){var t=e.payload,n=e.organizationCode;return Ed.getInstance().mfaExcludeUsers(t,n)}))}function Om(e){return zp(["GET/scheduled-reports",e],(function(){return Ed.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 Am(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postScheduledReport(t).then((function(e){return{data:e.data,status:e.status}})).catch((function(e){return e}))}))}function zm(){return Pp((function(e){var t=e.reportCode,n=e.payload;return Ed.getInstance().updateScheduledReport(t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Pm(){return Pp((function(e){return Ed.getInstance().deleteScheduledReport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Dm(){return Pp((function(e){return Ed.getInstance().getConditionalConfigRules(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Lm(){return Pp((function(e){return Ed.getInstance().getRule(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Nm(){return Pp((function(e){var t=e.payload,n=e.accountCode;return Ed.getInstance().postCreateRuleMultiAccount(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function qm(){return Pp((function(e){var t=e.payload,n=e.ruleId,o=e.accountCode;return Ed.getInstance().postEditRule(t,n,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Mm(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postCreateCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Um(){return Pp((function(e){var t=e.payload,n=e.code;return Ed.getInstance().pathCreateCustomizedApiKeys(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Bm(){return Pp((function(e){var t=e.code,n=e.password;return Ed.getInstance().getCustomizedApiKeysToken(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))}function Fm(){return Pp((function(e){var t=e.passwordOtp;return Ed.getInstance().getDeveloperCredentialsValidatePassword(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))}function Wm(){return Pp((function(e){var t=e.code;return Ed.getInstance().deleteCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Hm(){return Pp((function(e){var t=e.payload,n=e.code;return Ed.getInstance().patchApiKeysEditNote(t,n).then((function(e){return e.data})).catch((function(e){return e}))}))}function Gm(){return Pp((function(e){var t=e.payload,n=e.code,o=e.password;return Ed.getInstance().postApiKeysRoll(t,n,o).then((function(e){return e.data})).catch((function(e){return e}))}))}function Vm(){return Pp((function(e){var t=e.password,n=e.accountCode;return Ed.getInstance().getDeveloperCredentials(t,n).then((function(e){return a(a({},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}}))}))}function Km(e){return Pp((function(e){var t=e.payload;return Ed.getInstance().postAuditMonitors(t)}),{onMutate:e.onMutate})}function $m(){return Pp((function(e){var t=e.codes;return Ed.getInstance().postResendWebhooks({codes:t}).then((function(e){return null==e?void 0:e.data}))}))}function Qm(){return Pp((function(e){return Ed.getInstance().postExportApiLogs(e).then((function(e){return null==e?void 0:e.data}))}))}function Jm(){return Pp((function(e){return Ed.getInstance().postExportWebhooksLogs(e).then((function(e){return null==e?void 0:e.data}))}))}function Xm(o){var a=this;return Pp((function(){return Ed.getInstance().createReconciliationReportTemplate(o).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{onMutate:function(o){return t(a,void 0,void 0,(function(){var t,a;return n(this,(function(n){switch(n.label){case 0:return[4,yh.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return n.sent(),t=null===(a=yh.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===a?void 0:a.templates,yh.setQueryData(["GET/reconciliation/reports/templates"],(function(t){return{templates:e(e([],t.templates,!0),[o],!1)}})),[2,{previousTemplates:t}]}}))}))},onError:function(e,t,n){yh.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){yh.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})}function Ym(e){return Pp((function(){return Ed.getInstance().updateReconciliationReportTemplate(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Zm(){return Pp(["POST/reconciliation/alerts"],(function(e){return Ed.getInstance().postReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yh.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function ef(){return Pp(["DELETE/reconciliation/alerts"],(function(e){return Ed.getInstance().deleteReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yh.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function tf(){return Pp(["UPDATE/reconciliation/alerts"],(function(e){return Ed.getInstance().updateReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yh.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function nf(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postCreateInsightsReport(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function of(){return Pp((function(e){return Ed.getInstance().createSamlConfig(e)}))}function af(){return Pp((function(e){return Ed.getInstance().updateSamlConfig(e)}))}function rf(){return Pp((function(){return Ed.getInstance().deleteSamlConfig()}))}function sf(e,t){return void 0===t&&(t={}),Pp((function(t){return Ed.getInstance().generateAIWorkflowRoutes(e,t).then((function(e){return null==e?void 0:e.data}))}),a(a({},t),{useErrorBoundary:!1}))}function uf(e){return void 0===e&&(e={}),Pp((function(e){return Ed.getInstance().postAIGenerationFeedback(e).then((function(e){return null==e?void 0:e.data}))}),a(a({},e),{useErrorBoundary:!1}))}function cf(){return Pp((function(e){return Ed.getInstance().createChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function lf(){return Pp((function(e){return Ed.getInstance().deleteChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function df(){return Pp((function(e){var t=e.chart_id,n=e.type,o=e.name,a=e.user_prompt,r=void 0===a?"":a;return Ed.getInstance().patchChartGPTChart(t,{type:n,name:o,user_prompt:r}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function pf(){var e=this;return Pp((function(o){return t(e,void 0,void 0,(function(){var e,t,a,r,i;return n(this,(function(n){switch(n.label){case 0:return[4,Ed.getInstance().createChartGPTChart(o)];case 1:if(e=n.sent(),!(t=null!==(r=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.chartgpt_id)&&void 0!==r?r: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:t}]}}))}))}),{useErrorBoundary:!1})}function hf(){return Pp((function(e){return Ed.getInstance().createChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function mf(){var e=this;return Pp((function(o){return t(e,void 0,void 0,(function(){var e,t,a,r,i;return n(this,(function(n){switch(n.label){case 0:return[4,Ed.getInstance().createChartGPTChart(o)];case 1:if(e=n.sent(),!(t=null!==(r=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.chartgpt_id)&&void 0!==r?r: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:t}]}}))}))}),{useErrorBoundary:!1})}function ff(){var e=this;return Pp(["POST/template-reporting/report-templates"],(function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().createTemplateReporting(o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function gf(){var e=this;return Pp(["POST/template-reporting/report-templates/clone"],(function(o){var a=o.templateId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().cloneReportTemplate(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function yf(){var e=this;return Pp(["PATCH/template-reporting/report-templates/selection"],(function(o){var a=o.templateId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().updateTemplateSelection(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function bf(){var e=this;return Pp(["PATCH/template-reporting/report-templates/status"],(function(o){var a=o.templateId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().changeTemplateStatus(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function kf(){var e=this;return Pp(["DELETE/template-reporting/report-templates"],(function(o){var a=o.templateId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().deleteReportTemplate(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function vf(){var e=this;return Pp(["POST/template-reporting/report-schedules"],(function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().createReportSchedule(o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}function jf(){var e=this;return Pp(["PATCH/template-reporting/report-schedules/disable"],(function(o){var a=o.scheduleId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().disableReportSchedule(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}function wf(){var e=this;return Pp(["DELETE/template-reporting/report-schedules"],(function(o){var a=o.scheduleId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().deleteReportSchedule(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}var _f,Ef=function(){var e,t;return null===(t=null===(e=function(e){var t=localStorage.getItem(e),n=u(t&&JSON.parse(t)),o=n[0],a=n[1];return l((function(){var t=function(t){if(t.key===e){var n=t.newValue;a(n)}};return window.addEventListener("storage",t),function(){window.removeEventListener("storage",t)}}),[e]),o}("account"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.organization_code};function Cf(e){var o=this;return zp(["fetch-payments-lazy",e],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.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 Sf(e){return zp(["fetch-payments-evaluated",e],(function(){return Ed.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 Rf(e){var o=this,a=e.paymentCode,r=e.enabled,i=void 0===r||r,s=Ed.getInstance();return zp(["get-payment-v2",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getPaymentV2(a).then((function(e){return e.data}))]}))}))}),{enabled:i,cacheTime:500,useErrorBoundary:!1})}function xf(e){var o=this,a=e.payment_code,r=e.enabled,i=void 0===r||r,s=Ed.getInstance();return zp(["get-payment-transaction-details-v2",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getTransactionDetailsV2({payment_code:a}).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!a&&i,cacheTime:0,useErrorBoundary:!1})}function Tf(e){var o=this,a=e.transaction_code,r=e.enabled,i=void 0===r||r,s=Ed.getInstance();return zp(["get-payment-transaction-raw-response",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getTransactionRawResponse({transaction_code:a})]}))}))}),{enabled:!!a&&i,cacheTime:0,useErrorBoundary:!1})}function If(e){var t=Ef();return zp(["payment-methods",e],(function(){return Ed.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 Of(){return zp({queryKey:["/payment-methods/providers"],queryFn:function(){return Ed.getInstance().getPaymentMethodsAndProviders().then((function(e){return null==e?void 0:e.data}))},cacheTime:864e5,useErrorBoundary:!1})}function Af(){return zp(["GET/catalog/card-brands"],(function(){return Ed.getInstance().getCardBrands().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function zf(e,t){return void 0===e&&(e=!0),void 0===t&&(t=Sc.PAYMENTS),zp(["payment-filters",e,t],(function(){return Ed.getInstance().getPaymentFilters(t).then((function(e){return null==e?void 0:e.data}))}),{enabled:e,useErrorBoundary:!1,cacheTime:3e5})}function Pf(){return zp(["payment-metrics-filters"],(function(){return Ed.getInstance().getPaymentMetricsFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Df(e){var t=e.transaction_code,n=e.enabled;return zp(["payment-transaction-details",t],(function(){return Ed.getInstance().getPaymentTransactionsDetails({transaction_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function Lf(e){var t=e.payment_code,n=e.enabled;return zp(["transaction-history",t],(function(){return Ed.getInstance().getTransactionHistoryByPaymentCode({payment_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function Nf(e){var o=this;return zp(["POST/transactions",JSON.stringify(e)],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().postTransactions(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function qf(e){var o=this;return zp(["POST/fraud-transactions",JSON.stringify(e)],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.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 Mf(e){return zp(["GET/payout-detail",JSON.stringify(e)],(function(){var t=Ed.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 Uf(e){return zp(["GET/payout-transaction-detail",JSON.stringify(e)],(function(){return Ed.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 Bf(e){var t=Ef();return zp(["GET/payout-history-detail",JSON.stringify(e)],(function(){return Ed.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 Ff(e,o){var a=this,r=Ef();return zp(["GET/useGetProofOfCancel",r,e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getProofOfCancel(e,r,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&!!r&&!!o,cacheTime:0,useErrorBoundary:!1})}function Wf(e,o){var a=this,r=Ef();return zp(["GET/useGetProofOfPayment",r,e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getProofOfPayment(e,r,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&!!r&&!!o,cacheTime:0,useErrorBoundary:!1})}function Hf(e,o,a){var r=this,i=Ed.getInstance();return zp(["send-payment-notification",e,o],(function(){return t(r,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,i.sendPaymentNotification(e,o)];case 1:return t=n.sent(),a.onSuccess(),[2,t.data];case 2:throw r=n.sent(),a.onError(),r;case 3:return[2]}}))}))}),{enabled:a.enabled,cacheTime:0,useErrorBoundary:!1})}function Gf(e){return zp(["usePayoutsList",e&&JSON.stringify(e)],(function(){var t=Ed.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 Vf(e){var o=this;void 0===e&&(e=!0);var a=Ef();return zp(["getPayoutsFilters",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().getPayoutsFilters(a).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))]}))}))}),{enabled:e&&!!a})}function Kf(e){var t=e.password,n=e.accountCode;return zp(["developers"],(function(){return Ed.getInstance().getDeveloperCredentials(t,n).then((function(e){return a(a({},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 $f(){return zp(["fetch-customized-api-keys-members"],(function(){return Ed.getInstance().getCustomizedApiKeysMembers().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function Qf(){return zp(["developers-get-allowed-ips"],(function(){return Ed.getInstance().getAllowedIps().then((function(e){return(null==e?void 0:e.data)?a(a({},null==e?void 0:e.data),{isError:!1}):null})).catch((function(e){return a(a({},e),{isError:!0})}))}),{enabled:!1,cacheTime:0})}function Jf(){return zp(["fetch-customized-api-keys-accounts"],(function(){return Ed.getInstance().getCustomizedApiKeysAccounts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function Xf(e){return zp(["fetch-customized-api-keys",e],(function(){return Ed.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 Yf(){return zp(["fetch-customized-api-keys-products"],(function(){return Ed.getInstance().getCustomizedApiKeysProducts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{cacheTime:0})}function Zf(){return Pp(["developers-patch-allowed-ips"],(function(e){return Ed.getInstance().patchAllowedIps(e).then((function(e){return(null==e?void 0:e.data)?a(a({},null==e?void 0:e.data),{isError:!1}):null})).catch((function(e){return a(a({},e),{isError:!0})}))}),{cacheTime:0})}function eg(){return zp(["fetch-organizations"],(function(){return Ed.getInstance().getOrganization().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function tg(){return zp(["fetch-all-organizations",Ef()],(function(){return Ed.getInstance().getAllOrganization().then((function(e){return(null==e?void 0:e.data)||[]}))}),{cacheTime:36e5,keepPreviousData:!0,useErrorBoundary:!1})}function ng(e){var t=Ef();return zp(["organizations-provider-params",e],(function(e){var n=e.queryKey;return Ed.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 og(e){var t=e.integration_code,n=e.enabled,o=e.accountCode;return zp(["integration-params",t,o],(function(){return t.includes("undefined")?{}:Ed.getInstance().getIntegrationParams({accountCode:o,integration_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,useErrorBoundary:!1})}function ag(e){var t=e.accountCode,n=e.organizationCode,o=Ef();return zp(["organizations-account-integrations",t,n],(function(){return Ed.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||o}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,enabled:!!t,useErrorBoundary:!1})}function rg(e){var t=e.accountCode,n=e.paymentMethod;return zp(["fetch-connections-by-payment-method",n,t],(function(){return Ed.getInstance().getConnectionsByPaymentMethod(t,n).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!n&&!!t,cacheTime:0,useErrorBoundary:!1})}function ig(){var e=this;return zp(["fetch-hash-pylon"],(function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().getHashPylon()]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})}function sg(){return zp(["connections"],(function(){return Ed.getInstance().getConnections().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function ug(){return zp(["dialogs"],(function(){return Ed.getInstance().getDialogs().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,retryDelay:2e3,cacheTime:36e5})}function cg(){return zp(["params-catalog"],(function(){return Ed.getInstance().getWebhookParamsV2().then((function(e){return null==e?void 0:e.data}))}))}function lg(e){var t=e.accountCode,n=e.name;return zp(["webhooks",t,n],(function(){return Ed.getInstance().getWebhooksV3({accountCode:t,name:n}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t,useErrorBoundary:!1})}function dg(e){var t=e.accountCode,n=e.enabled;return zp(["webhooks-detail",t],(function(){return Ed.getInstance().getWebhooksV2Detail({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!n})}function pg(e){var t,n=Ef(),o=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return zp({queryKey:["accounts",o],queryFn:function(){return Ed.getInstance().getAccounts(o).then((function(e){return null==e?void 0:e.data}))},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!o})}function hg(e){return zp(["accountsV2",e],(function(){return Ed.getInstance().getAccountsV2().then((function(e){return(null==e?void 0:e.data)||[]})).catch((function(e){throw e}))}),{keepPreviousData:!0,enabled:!!e,useErrorBoundary:!1})}function mg(e){return zp(["accountsV2-by-user",e],(function(){return e?Ed.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 fg(e,o){var a=this;return zp({queryKey:["accounts-for-impersonation",e,o],queryFn:function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getAccountsForImpersonation(e).then((function(e){var t,n;return(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.response)||void 0===n?void 0:n.map((function(e){return{label:e.name,value:o?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 gg(e){return zp({queryKey:["pending-duplicate-accounts",e],queryFn:function(){return Ed.getInstance().getPendingDuplicateAccounts()},useErrorBoundary:!1,keepPreviousData:!0,refetchInterval:e})}function yg(){return zp(["menu"],(function(){return Ed.getInstance().getMenu().then((function(e){return sd(e)?md:null==e?void 0:e.data})).catch((function(){return md}))}))}function bg(){return zp(["/payment/statuses/style"],(function(){return Ed.getInstance().useGetPaymentStatusesStyles().then((function(e){return sd(e)?ud:null==e?void 0:e.data})).catch((function(){return ud}))}))}function kg(){return zp(["/transaction/statuses/style"],(function(){return Ed.getInstance().useGetTransactionStatusesStyles().then((function(e){return sd(e)?cd:null==e?void 0:e.data})).catch((function(){return cd}))}),{cacheTime:36e5,useErrorBoundary:!1})}function vg(){return zp(["/reconciliation/transaction/statuses/style"],(function(){return Ed.getInstance().useGetReconciliationTransactionStatusesStyles().then((function(e){return sd(e)?ld:null==e?void 0:e.data})).catch((function(){return ld}))}))}function jg(){return zp(["timezone-catalog"],(function(){return Ed.getInstance().useGetTimeZoneCatalog().then((function(e){return sd(e)?dd:null==e?void 0:e.data})).catch((function(){return dd}))}))}function wg(){return zp(["/cms/audit-logs-filters"],(function(){return Ed.getInstance().useGetAuditLogsFilters().then((function(e){return sd(e)?pd:null==e?void 0:e.data})).catch((function(){return pd}))}))}function _g(){return zp(["/cms/static-contents"],(function(){return Ed.getInstance().getDashboardStaticContents().then((function(e){var t,n;return sd(e)?hd:(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 Eg(){return zp(["/cms/locales"],(function(){return Ed.getInstance().getLocales().then((function(e){return sd(e)?fd:e.data})).catch((function(){return fd}))}))}!function(e){e.IN_PROGRESS="IN_PROGRESS",e.COMPLETED="COMPLETED",e.FAILED="FAILED"}(_f||(_f={}));var Cg=function(){var e=u("ON"===localStorage.getItem("isTesting")),t=e[0],n=e[1];return l((function(){window.addEventListener("storage",(function(e){"isTesting"===e.key&&n("ON"===e.newValue)}))}),[]),{isTesting:t}};function Sg(e){return zp(["smart-routing-methods",e],(function(){return Ed.getInstance().getSmartRoutingMethods(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function Rg(e,t){return zp(["smart-routing-workflow",t,e],(function(){return Ed.getInstance().getSmartRoutingWorkflow(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e,cacheTime:0,retry:!1})}function xg(e,t){return zp(["smart-routing-condition-types",e,t],(function(){return Ed.getInstance().getSmartRoutingConditionTypes(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e})}function Tg(e,t){return zp(["smart-routing-condition-payment-method",e,t],(function(){return Ed.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 Ig(e,t){return zp(["smart-routing-condition-types-values",t,e],(function(){return Ed.getInstance().getSmartRoutingConditionTypesValues(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&!!e,useErrorBoundary:!1})}function Og(e){var t=e.accountCode,n=e.workflowVersionId;return zp(["smart-routing-workflow-version",n,t],(function(){return Ed.getInstance().getSmartRoutingWorkflowVersion(t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!n&&!!t,cacheTime:0})}function Ag(e,t,n){return zp(["smart-routing-next-route",e,n,t],(function(){return Ed.getInstance().getSmartRoutingNextSteps(e,t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function zg(e){return zp(["smart-routing-decline-groups",e],(function(){return Ed.getInstance().getSmartRoutingDeclinedGroup(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function Pg(e,t){return zp(["smart-routing-payment-route",e,t],(function(){return Ed.getInstance().getSmartRoutingPaymentRoute(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&!!t,cacheTime:0})}function Dg(e){return zp(["smart-routing-simulate-condition-type-values",e],(function(){return Ed.getInstance().getSmartRoutingSimulateConditionTypeValues(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function Lg(e){var t=e.text,n=e.conditionType;return zp(["smart-routing-search-condition-values",t,n],(function(){return Ed.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 Ng(){return zp(["smart-routing-conversion-rates"],(function(){return Ed.getInstance().getProviderConversionRatesData().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!1,useErrorBoundary:!1})}function qg(){var e=this;return zp({queryKey:["smart-routing-3ds-excemptions"],queryFn:function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})}function Mg(){var e=this;return zp({queryKey:["smart-routing-network-tokens-onboarding"],queryFn:function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})}function Ug(e){return zp(["fetch-routing-monitors-templates",e],(function(){return Ed.getInstance().getRoutingMonitorsTemplates(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Bg(e,t){return zp(["fetch-routing-monitors-template",e],(function(){return Ed.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 Fg(e){var t=e.accountCode;return zp(["checkouts",t],(function(){return Ed.getInstance().getCheckouts({accountCode:t}).then((function(e){return e.data}))}),{cacheTime:0,enabled:Boolean(t)})}function Wg(e){var t=e.accountCode;return zp(["checkouts-template"],(function(){return Ed.getInstance().getCheckoutTemplate({accountCode:t}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,enabled:Boolean(t)})}var Hg=function(e){return["checkout-builder-name-and-icon",e.paymentMethodType,e.type]},Gg=function(e,t){var n=e.paymentMethodType,o=e.type;return zp(Hg({paymentMethodType:n,type:o}),(function(){return Ed.getInstance().getNameAndIcon({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)},Vg=function(e){return["checkout-builder-required-fields",e.paymentMethodType,e.type]},Kg=function(e,t){var n=e.paymentMethodType,o=e.type;return zp(Vg({paymentMethodType:n,type:o}),(function(){return Ed.getInstance().getRequiredFields({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)};function $g(e){var t=e.accountCode;return zp(["styling-sdk-dynamic",t],(function(){return Ed.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 Qg(e){var t=e.accountCode;return zp(["styling-theme",t],(function(){return Ed.getInstance().getStylingTheme({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 Jg(e){var t=e.accountCode;return zp(["styling-settings",t],(function(){return Ed.getInstance().getStylingSettings({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 Xg(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n;return zp(["styling-settings-v2",t],(function(){return Ed.getInstance().getStylingSettingsV2({accountCode:t,environment:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Yg(){return Pp((function(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n,a=e.payload;return Ed.getInstance().changeStylingSettings({accountCode:t,environment:o,payload:a}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function Zg(){return zp(["fetch-profile"],(function(){return Ed.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 ey(){var e=this;return zp(["get-user-full"],(function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().getUserFull()];case 1:return[2,e.sent().data]}}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})}function ty(e,t){return zp(["fetch-permissions",e,t],(function(){var e,t,n,o=localStorage.getItem("account"),a=localStorage.getItem("user"),r=o&&JSON.parse(o),i=a&&JSON.parse(a);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==r?void 0:r.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 ny(e){return zp(["email-verification",e],(function(){return Ed.getInstance().emailVerification(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function oy(){return zp({queryKey:["get-login-methods"],queryFn:function(){return Ed.getInstance().getLoginMethods().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}})}function ay(){return zp(["fetch-impersonation-users"],(function(){return Ed.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 ry(){return zp(["fetch-impersonation-enabled"],(function(){return Ed.getInstance().getImpersonationEnabled().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function iy(e,o,a,r,i){var s=this;return void 0===a&&(a=1),void 0===r&&(r=10),zp(["get-users-to-impersonate",e,o,a,r,i],(function(){return t(s,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getUsersToImpersonate(e,o,a,r,i).then((function(e){return null==e?void 0:e.data}))]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function sy(e){var t;return zp(["fetch-communications",e],(function(){return Ed.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 uy(){return zp(["fetch-communications-filters"],(function(){return Ed.getInstance().getCommunicationsFilters().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function cy(e,t){return zp(["fetch-communication-details",e],(function(){return Ed.getInstance().getCommunicationDetails(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e,useErrorBoundary:!1,cacheTime:0})}function ly(e){return zp(["notifications-customer",e],(function(){return Ed.getInstance().getNotificationsCustomer(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,keepPreviousData:!1})}function dy(e){return zp(["validate-opsgenie-key",e],(function(){return Ed.getInstance().getValidateOpsgenieKey(e).then((function(e){return null==e?void 0:e.data})).catch((function(){return{error:!0}}))}),{enabled:!!e,cacheTime:0})}function py(){return zp(["notifications-merged"],(function(){return Ed.getInstance().getMergedNotifications().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{keepPreviousData:!1,cacheTime:0})}function hy(){return Pp((function(e){return Ed.getInstance().getNotificationsNumber(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function my(){var e=this;return Pp((function(o){return t(e,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().pathNotification(o)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}}))}))}))}var fy={key:"metadata_fields",name:"metadata_fields"};function gy(){return zp(["reports"],(function(){return Ed.getInstance().reportsList().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function yy(e){return void 0===e&&(e=!0),zp(["reports-multi-env"],(function(){return Ed.getInstance().reportsListMultiEnv().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e})}function by(e,t,n){return void 0===t&&(t=!1),zp(["reports/".concat(e)],(function(){return Ed.getInstance().downloadReports(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:t,onSuccess:n,useErrorBoundary:!1})}function ky(e){return zp(["GET/reports/templates"],(function(){return Ed.getInstance().getReportTemplates().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e,useErrorBoundary:!1})}function vy(o,a,r){var i=this;return zp(["GET/reports/columns/".concat(a,"/").concat(r)],(function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getReportColumns(a,r).then((function(t){return a===Oc.ALL&&r===Ic.PAYMENTS?e(e([],null==t?void 0:t.data,!0),[fy],!1):null==t?void 0:t.data})).catch((function(e){return e}))]}))}))}),{enabled:o,useErrorBoundary:!1})}function jy(e,o){var a=this,r=Ef();return zp(["getRefundPdf",e,r,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getRefundPdf(e,r,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))]}))}))}),{enabled:!!e&&!!r,useErrorBoundary:!1})}function wy(){var e=Ef();return zp(["teams-filters-members"],(function(){return Ed.getInstance().teamsFiltersMembers({organizationCode:e}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})}function _y(e){var t=e.organizationCode,n=e.accountCodes,o=e.email,a=e.page,r=e.pageSize,i=Ef();return zp(["fetch-post-members-v2",t,n,o,a,r],(function(){return Ed.getInstance().postMembersPaginatedV2({organizationCode:i,accountCodes:n,email:o,page:a,pageSize:r}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&!!n,cacheTime:0,useErrorBoundary:!1})}function Ey(){return zp(["fetch-roles"],(function(){return Ed.getInstance().getRoles().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Cy(){return zp(["fetch-rolespermissions"],(function(){return Ed.getInstance().getRolesPermissions().then((function(e){return null==e?void 0:e.data}))}))}function Sy(){return zp(["fetch-permissions-catalog"],(function(){return Ed.getInstance().getPermissionsCatalog().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Ry(e){return zp(["data-report",e],(function(){return Ed.getInstance().getSmartRoutingDataReport(e).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,useErrorBoundary:!1})}function xy(e,t,n){return void 0===n&&(n=!0),zp(["get-insights-conversion-rate-metrics-v2",e,t],(function(){return Ed.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:3e5,cacheTime:3e5,useErrorBoundary:!1,retry:1})}function Ty(e,t){return zp(["get-insights-conversion-rate-view-more-metrics",t,e],(function(){return Ed.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 Iy(e){return zp(["get-insights-conversion-rate-fallback-metrics",e],(function(){return Ed.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 Oy(e,t,n){return void 0===n&&(n=!0),delete t.account_code,zp(["get-insights-volume-metrics",t,e],(function(){return Ed.getInstance().getInsightsMetricsVolume(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function Ay(e,t,n,o){return void 0===o&&(o=!0),delete t.account_code,zp(["get-insights-volume-metrics-v2",t,e,n],(function(){return Ed.getInstance().getInsightsMetricsVolumeV2(e,n,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:o,cacheTime:200,useErrorBoundary:!1})}function zy(e,t,n){return void 0===n&&(n=!0),delete t.account_code,zp(["get-insights-total-payment-fraud-metrics",t,e],(function(){return Ed.getInstance().getInsightsMetricsTotalPaymentsAndFraud(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function Py(e,t,n){return void 0===n&&(n=!0),delete t.account_code,zp(["get-insights-customer-payment-fraud-metrics",t,e],(function(){return Ed.getInstance().getInsightsMetricsCustomerPaymentsAndFraud(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function Dy(e){return zp(["get-insights-overview",e],(function(){return Ed.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 Ly(e,t){var n=!!(null==e?void 0:e.enabled)&&void 0!==(null==e?void 0:e.account_code);return zp(["get-insights-overview-v3",e,t],(function(){return Ed.getInstance().getInsightOverviewV3(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:0,useErrorBoundary:!1})}function Ny(e){return zp(["get-insights-home-metrics",e],(function(){return Ed.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 qy(e){return zp(["get-insights-reports",e],(function(){return Ed.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 My(e){return zp(["get-insights-reports-again",e],(function(){return Ed.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 Uy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-fraud-screening-volume-and-count-tx",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsFraudScreeningVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function By(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-fraud-screening-conversion-rate",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsFraudScreeningConversionRate(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Fy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-3ds-volume-and-count-tx",o,e],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsights3dsVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Wy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-3ds-conversion-rate-and-evolution",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsights3dsConversionRateAndEvolution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Hy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-3ds-decline-reasons",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsights3dsDeclineReasons(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Gy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-3ds-frictionless-vs-challenge",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsights3dsFrictionlessVsChallenge(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Vy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-volume-and-count-tx",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ky(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-total-rate-and-evolution",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksTotalRateAndEvolution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function $y(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-win-rate",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksWinRate(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Qy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-disputed",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksDisputed(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Jy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksByProviderAndCardBrand(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Xy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-reasons-distribution",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksReasonsDistribution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Yy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-status-distribution",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksStatusDistribution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Zy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-by-card-brand",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksByCardBrand(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function eb(e,t){return zp(["fetch-reconciliation-transaction",e],(function(){return Ed.getInstance().getReconciliationTransactions(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!!t,useErrorBoundary:!1})}function tb(e,t){return zp(["fetch-reconciliation-settlements",e],(function(){return Ed.getInstance().getReconciliationSettlements(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!!t,useErrorBoundary:!1})}function nb(e,t){return zp(["fetch-reconciliation-metrics",e],(function(){return Ed.getInstance().getReconciliationMetrics(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t,cacheTime:500})}function ob(){return zp(["GET-reconciliation-filters"],(function(){return Ed.getInstance().getReconciliationFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function ab(e){return zp(["GET/v1/reconciliation/table/".concat(e,"/columns")],(function(){return Ed.getInstance().getAllTableColumns(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function rb(){return zp(["GET/v1/reconciliation/active"],(function(){return Ed.getInstance().getReconciliationActive().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function ib(e,t,n){return zp(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],(function(){return Ed.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 sb(e){return zp(["GET/reconciliation/reports/templates"],(function(){return Ed.getInstance().getReconciliationReportTemplates().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{enabled:e,useErrorBoundary:!1})}function ub(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/alerts/list",t,n],(function(){return Ed.getInstance().getReconciliationAlerts(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function cb(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/agenda/list",t,n],(function(){return Ed.getInstance().getReconciliationAgenda(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function lb(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/agenda/insights",t,n],(function(){return Ed.getInstance().getReconciliationAgendaInsightByKey(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function db(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/sales/list",t,n],(function(){return Ed.getInstance().getReconciliationSales(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function pb(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/advancements/list",t,n],(function(){return Ed.getInstance().getReconciliationAdvancements(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function hb(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/fees/list",t,n],(function(){return Ed.getInstance().getReconciliationFees(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function mb(e){var o=this,a=Object.values(e).filter(Boolean);return zp(["feature-flags",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getFeatureFlagId(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:a.length>1,useErrorBoundary:!1})}function fb(e){var o=this,a=zp({queryKey:["all-feature-flags",Object.values(e).filter(Boolean)],queryFn:function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.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}),r=Rp();return l((function(){r.setQueryData(["cached-feature-flags"],a)}),[a,r]),a}function gb(e){var t,n,o=Rp(),r=o.getQueryState(["cached-feature-flags"]),i=Boolean(!(null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.status)||"loading"===(null===(n=null==r?void 0:r.data)||void 0===n?void 0:n.status)),s=zp({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 a(a({},s),{isLoading:i})}function yb(e){return zp(["events",e],(function(){return Ed.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 bb(e){return zp(["audit-monitor-event-detail",e],(function(){return Ed.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 kb(e){return zp(["api-logs",e],(function(){return Ed.getInstance().postApiLogs({payload:e}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e.organizationCode,cacheTime:0,useErrorBoundary:!1})}function vb(e){var t=e.params;return zp(["webhook-logs",t],(function(){return Ed.getInstance().postWebhookLogs({payload:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t.organizationCode,cacheTime:0,useErrorBoundary:!1})}function jb(e){return zp(["api-logs-detail",e],(function(){return Ed.getInstance().getApiLogsDetailByPaymentCode(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function wb(e,t){return zp(["fetch-payment-links",e,t],(function(){return Ed.getInstance().getPaymentLinks(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t,cacheTime:0})}function _b(e){return zp(["payment-link"],(function(){return Ed.getInstance().getPaymentLinksByCode(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function Eb(e){return void 0===e&&(e=!0),zp(["countries",e],(function(){return Ed.getInstance().useGetCountriesConfig().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e,keepPreviousData:!0})}function Cb(e){var t=localStorage.getItem("lang")||"en",n=e||t;return zp(["countries-v2",n],(function(){return Ed.getInstance().useGetCountriesConfigV2(n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!0,keepPreviousData:!0})}function Sb(e){return zp(["timezone"],(function(){return Ed.getInstance().getTimezone(e).then((function(e){return sd(e)?dd:null==e?void 0:e.data})).catch((function(){return dd}))}),{enabled:!0,keepPreviousData:!0})}function Rb(e){return zp(["installments-plans",e],(function(){return Ed.getInstance().getInstallmentPlans(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(e),useErrorBoundary:!1})}function xb(e){return Pp((function(e){var t=e.payload;return Ed.getInstance().firebaseUserSubscribe(t)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Tb(e,t){return zp(["get-cofig-allow-list",e],(function(){return Ed.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 Ib(e){return zp(["get-black-list",e],(function(){return Ed.getInstance().getBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!e})}function Ob(e,t,n,o){var a;return zp(["post-black-list",e],(function(){return Ed.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=o?o:25).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:(null===(a=e[0])||void 0===a?void 0:a.length)>0&&null!==t,useErrorBoundary:!1})}function Ab(e,t,n){return zp(["get-block-list-summary",e,t,n],(function(){var o=Ed.getInstance();return n?o.getBlackListSummary(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e})):Promise.resolve({})}),{enabled:!!e&&!!n})}function zb(e,t,n,o,a,r){return zp(["black-list-detail",e,t,o,a,r],(function(){return Ed.getInstance().getBlacklistDetail(e,t,n,o,a).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&r,cacheTime:0})}function Pb(e,t,n){return zp(["allow-list-detail",e],(function(){return Ed.getInstance().getAllowlistDetail(e,t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{enabled:!!e&&!!n})}function Db(e){return zp(["query-post-get-allowlist-multi-account",JSON.stringify(e)],(function(){return Ed.getInstance().postGetAllowlist({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function Lb(e,o){var a=this;return void 0===e&&(e=26),void 0===o&&(o=0),zp(["batch-refunds",e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getBatchRefunds(e,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))]}))}))}),{cacheTime:0})}function Nb(e){return zp(["velocity-rules",e],(function(){var t=Ed.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 qb(){return zp(["config-rules"],(function(){return Ed.getInstance().getAllConfigRules().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0})}function Mb(e,t){var n=e.organizationCode;return zp(["mfa-excluded-users",n],(function(){return Ed.getInstance().getMFAExcludedUsers({organizationCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function Ub(e,t){var n=e.organizationCode;return zp(["mfa-config",n],(function(){return Ed.getInstance().getMFAConfig({organizationCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function Bb(e,t){return zp(["mfa-enforcement-status",e.accountCode],(function(){return Ed.getInstance().getMFAEnforcementStatus().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function Fb(e){return zp(["fetch-organization-saml-config",e],(function(){return Ed.getInstance().getSamlConfig().then((function(e){return e.data}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Wb(e){return zp(["chartgpt-chart-execute",e],(function(){return Ed.getInstance().executeChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e})}function Hb(){return zp(["chartgpt-user-charts"],(function(){return Ed.getInstance().getChartsByUser().then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})}function Gb(){var e=this;return zp(["chartgpt-user-charts-with-results"],(function(){return t(e,void 0,void 0,(function(){var e,o,r,i=this;return n(this,(function(s){switch(s.label){case 0:return[4,(e=Ed.getInstance()).getChartsByUser()];case 1:return o=s.sent(),r=(null==o?void 0:o.data)||[],[4,Promise.all(r.map((function(o){return t(i,void 0,void 0,(function(){var t,r,i,s,u,c,l,d;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.executeChartGPTChart(o.code)];case 1:return t=n.sent(),[2,a(a({},o),{user_prompt:null!==(s=null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.user_prompt)&&void 0!==s?s:o.user_prompt,unit_to_display:null!==(c=null===(u=null==t?void 0:t.data)||void 0===u?void 0:u.unit_to_display)&&void 0!==c?c:o.unit_to_display,results:null!==(d=null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.results)&&void 0!==d?d:[]})];case 2:return r=n.sent(),console.error("Failed to execute chart ".concat(o.chart_id,":"),r),[2,a(a({},o),{results:[]})];case 3:return[2]}}))}))})))];case 2:return[2,s.sent()]}}))}))}))}function Vb(e,o,a){var r=this;return void 0===a&&(a=!0),zp(["chartgpt-patch-and-execute",e,o],(function(){return t(r,void 0,void 0,(function(){var t,a,r,i,s;return n(this,(function(n){switch(n.label){case 0:return[4,(t=Ed.getInstance()).patchChartGPTChart(e,o)];case 1:return a=n.sent(),r=null==a?void 0:a.data,[4,t.executeChartGPTChart(e)];case 2:return i=n.sent(),s=null==i?void 0:i.data,[2,{chart:r,execution:s}]}}))}))}),{enabled:a&&!!e,retry:!1})}function Kb(){return zp(["languages"],(function(){return Ed.getInstance().getLanguages().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:300})}function $b(){var e=localStorage.getItem("lang")||"en";return zp(["translations",e],(function(){return Ed.getInstance().getTranslations(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:3e4})}function Qb(e){var o=this;return zp({queryKey:["network-tokens-onboarding",e],queryFn:function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getNetworkTokensOnboardingByOrganization(e)];case 1:return[2,t.sent().data]}}))}))},enabled:!!e,useErrorBoundary:!1})}var Jb=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())},Xb=function(e,t,n){if(!t||!n)return e||[];var o=function(e,t){var n=[],o=new Date(e),a=new Date(t);o.setUTCHours(0,0,0,0),a.setUTCHours(0,0,0,0);for(var r=new Date(o);r<=a;)n.push(r.toISOString()),r.setUTCDate(r.getUTCDate()+1);return n}(t,n),a=new Map;return null==e||e.forEach((function(e){if(e.date){var t=new Date(e.date).toISOString().split("T")[0];a.set(t,e.value)}})),o.map((function(e){var t=e.split("T")[0];return{date:e,value:a.get(t)||"0"}}))},Yb=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 o=parseFloat(n.value||"0");return{distribution:n.rows.map((function(e){var t,n=100*parseFloat(e.value),a=Math.round(o*parseFloat(e.value));return{key:(null===(t=e.label)||void 0===t?void 0:t.toUpperCase())||"UNKNOWN",total:a,percentage:n,amount:a}})),total:o}},Zb=function(e,t,n){var o,a={};return null===(o=e.plots)||void 0===o||o.forEach((function(e){var o=Xb(e.rows,t,n),r=e.label;a[r]=o.map((function(e){return{key:e.date||"",total:100*parseFloat(e.value),current_label:Jb(e.date||""),current_amount:100*parseFloat(e.value)}}))})),a},ek=function(e,t,n){var o,a=null===(o=e.plots)||void 0===o?void 0:o[0];return{distribution:Xb(null==a?void 0:a.rows,t,n).map((function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Jb(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==a?void 0:a.value)||"0"),total_amount:parseFloat((null==a?void 0:a.value)||"0")}},tk=function(e,t,n){var o,a=null===(o=e.plots)||void 0===o?void 0:o[0];return{distribution:Xb(null==a?void 0:a.rows,t,n).map((function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Jb(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==a?void 0:a.value)||"0"),total_amount:parseFloat((null==a?void 0:a.value)||"0")}},nk=function(e,o){return zp(a({queryKey:["smart-recovery-communications-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return t=Ed.getInstance(),o={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",o)];case 1:return a=n.sent(),[2,(r=a.data,i=o.start_date,s=o.end_date,u=r.plots||[],c=u.find((function(e){return"TOTAL_COMMUNICATIONS_LABEL"===e.label})),l=u.find((function(e){return"COMPLETED_COMMUNICATIONS_LABEL"===e.label})),d=u.find((function(e){return"CONVERSION_RATE_LABEL"===e.label})),p=Xb(null==c?void 0:c.rows,i,s),h=Xb(null==l?void 0:l.rows,i,s),m=Xb(null==d?void 0:d.rows,i,s),{communications:{distribution:p.map((function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Jb(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==c?void 0:c.value)||"0")},conversion_rate:{distribution:m.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:Jb(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==l?void 0:l.value)||"0")}})]}var r,i,s,u,c,l,d,p,h,m}))}))},enabled:!!e.organization_code,staleTime:3e5},o))},ok=function(e,o){return zp(a({queryKey:["smart-recovery-communications-by-substatus",e],queryFn:function(){return t(void 0,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return t=Ed.getInstance(),o={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",o)];case 1:return a=n.sent(),[2,Yb(a.data)]}}))}))},enabled:!!e.organization_code,staleTime:3e5},o))},ak=function(e,o){return zp(a({queryKey:["smart-recovery-communications-substatus-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return t=Ed.getInstance(),o={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",o)];case 1:return a=n.sent(),[2,Zb(a.data,o.start_date,o.end_date)]}}))}))},enabled:!!e.organization_code,staleTime:3e5},o))},rk=function(e,o){return zp(a({queryKey:["smart-recovery-recovered-tpv-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return t=Ed.getInstance(),o={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",o)];case 1:return a=n.sent(),[2,ek(a.data,o.start_date,o.end_date)]}}))}))},enabled:!!e.organization_code,staleTime:3e5},o))},ik=function(e,o){return zp(a({queryKey:["smart-recovery-recovered-payments-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return t=Ed.getInstance(),o={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",o)];case 1:return a=n.sent(),[2,tk(a.data,o.start_date,o.end_date)]}}))}))},enabled:!!e.organization_code,staleTime:3e5},o))};function sk(e,o){var a=this;return zp(["POST/template-reporting/templates/search",e],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().searchReportTemplates(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:o,useErrorBoundary:!1,cacheTime:0})}function uk(e,o,a){var r=this;return zp(["POST/template-reporting/template-by-id/search",e,o],(function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().searchReportTemplateById(e,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:a&&!!e,useErrorBoundary:!1,cacheTime:0})}function ck(e,o){var a=this;return zp(["POST/template-reporting/schedules/search",e],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().searchReportSchedules(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:o,useErrorBoundary:!1,cacheTime:0})}function lk(e,o,a){var r=this;return zp(["POST/template-reporting/schedule-by-id/search",e,o],(function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().searchReportScheduleById(e,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:a&&!!e,useErrorBoundary:!1,cacheTime:0})}function dk(){return dk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},dk.apply(this,arguments)}
|
|
216
|
+
*/"production"===process.env.NODE_ENV?bp.exports=function(){if(yp)return kp;yp=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,o=e.useEffect,a=e.useLayoutEffect,r=e.useDebugValue;function i(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!t(e,o)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),u=n({inst:{value:s,getSnapshot:t}}),c=u[0].inst,l=u[1];return a((function(){c.value=s,c.getSnapshot=t,i(c)&&l({inst:c})}),[e,s,t]),o((function(){return i(c)&&l({inst:c}),e((function(){i(c)&&l({inst:c})}))}),[e]),r(s),s};return kp.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u,kp}():bp.exports=(vp||(vp=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!n(e,o)}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},o=t.useState,a=t.useEffect,r=t.useLayoutEffect,i=t.useDebugValue,u=!1,c=!1,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(s,l){u||void 0===t.startTransition||(u=!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(!c){var p=l();n(d,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var h=(p=o({inst:{value:d,getSnapshot:l}}))[0].inst,m=p[1];return r((function(){h.value=d,h.getSnapshot=l,e(h)&&m({inst:h})}),[s,d,l]),a((function(){return e(h)&&m({inst:h}),s((function(){e(h)&&m({inst:h})}))}),[s]),i(d),d};jp.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())}()),jp);var wp=bp.exports;const _p=wp.useSyncExternalStore,Ep=i.createContext(void 0),Cp=i.createContext(!1);function Sp(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Ep),window.ReactQueryClientContext):Ep)}const Rp=({context:e}={})=>{const t=i.useContext(Sp(e,i.useContext(Cp)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},xp=({client:e,children:t,context:n,contextSharing:o=!1})=>{i.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]),"production"!==process.env.NODE_ENV&&o&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const a=Sp(n,o);return i.createElement(Cp.Provider,{value:!n&&o},i.createElement(a.Provider,{value:e},t))},Tp=i.createContext(!1);Tp.Provider;const Ip=i.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function Op(e,t){return"function"==typeof e?e(...t):!!e}function Ap(e,t){const n=Rp({context:e.context}),o=i.useContext(Tp),a=i.useContext(Ip),r=n.defaultQueryOptions(e);r._optimisticResults=o?"isRestoring":"optimistic",r.onError&&(r.onError=np.batchCalls(r.onError)),r.onSuccess&&(r.onSuccess=np.batchCalls(r.onSuccess)),r.onSettled&&(r.onSettled=np.batchCalls(r.onSettled)),(e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)})(r),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(r,a),(e=>{i.useEffect((()=>{e.clearReset()}),[e])})(a);const[s]=i.useState((()=>new t(n,r))),u=s.getOptimisticResult(r);if(_p(i.useCallback((e=>{const t=o?()=>{}:s.subscribe(np.batchCalls(e));return s.updateResult(),t}),[s,o]),(()=>s.getCurrentResult()),(()=>s.getCurrentResult())),i.useEffect((()=>{s.setOptions(r,{listeners:!1})}),[r,s]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(r,u,o))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)})))(r,s,a);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:o})=>e.isError&&!t.isReset()&&!e.isFetching&&Op(n,[e.error,o]))({result:u,errorResetBoundary:a,useErrorBoundary:r.useErrorBoundary,query:s.getCurrentQuery()}))throw u.error;return r.notifyOnChangeProps?u:s.trackResult(u)}function zp(e,t,n){return Ap(Id(e,t,n),dp)}function Pp(e,t,n){const o=function(e,t,n){return Wd(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),a=Rp({context:o.context}),[r]=i.useState((()=>new gp(a,o)));i.useEffect((()=>{r.setOptions(o)}),[r,o]);const s=_p(i.useCallback((e=>r.subscribe(np.batchCalls(e))),[r]),(()=>r.getCurrentResult()),(()=>r.getCurrentResult())),u=i.useCallback(((e,t)=>{r.mutate(e,t).catch(Dp)}),[r]);if(s.error&&Op(r.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}function Dp(){}var Lp;function Np(e){return Pp((function(e){var t=e.payload;return Ed.getInstance().postWebhookV2MultiAccount({payload:t})}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function qp(e){return Pp((function(e){var t=e.code,n=e.accountCode;return Ed.getInstance().deleteWebhookV2(t,n)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Mp(e){return Pp((function(e){var t=e.code,n=e.payload,o=e.accountCode;return Ed.getInstance().updateWebhookV2(t,n,o)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Up(){return Pp((function(e){var t=e.name,n=e.principal;return Ed.getInstance().postAccount(t,n)}))}function Bp(){return Pp((function(t){var n=e([Lp.ACCOUNT],t.duplicate_order,!0);return Ed.getInstance().duplicateAccount(a(a({},t),{duplicate_order:n}))}))}function Fp(){return Pp((function(e){return Ed.getInstance().retryDuplicateAccount(e)}))}function Wp(){return Pp((function(e){var t=e.name,n=e.code,o=e.principal;return Ed.getInstance().patchAccountV2({name:t,code:n,principal:o})}))}function Hp(){return Pp((function(e){var t=e.account_code;return Ed.getInstance().putAccountPrincipal({account_code:t})}))}function Gp(){return Pp((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Ed.getInstance().putAccountsUserMassive(t,n,o)}))}function Vp(){return Pp((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Ed.getInstance().deleteAccountsUserMassive(t,n,o)}))}function Kp(){return Pp(["post-validate-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Ed.getInstance().postValidateStatusConnection({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function $p(){return Pp(["post-change-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Ed.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Qp(){return Pp((function(e){return Ed.getInstance().putCosts(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Jp(){return Pp(["post-connection"],(function(e){var t=e.payload;return Ed.getInstance().postMultiConnection({payload:t}).then((function(e){return null==e?void 0:e.data}))}))}function Xp(){return Pp(["new-post-connection-validate"],(function(){return Ed.getInstance().postMultiConnectionValidate().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Yp(){return Pp(["patch-connection"],(function(e){var t=e.payload,n=e.connectionCode;return Ed.getInstance().patchConnection({payload:t,connectionCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function Zp(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postDefaultRoutes({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function eh(){return Pp((function(e){return Ed.getInstance().postValidateCredentials(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function th(){var e=this;return Pp((function(o){var a=o.payload,r=o.organizationCode;return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().postNetworkTokensOnboarding(a,r)];case 1:return[2,e.sent().data]}}))}))}),{useErrorBoundary:!1})}function nh(){return Pp(["patch-organizations"],(function(){return Ed.getInstance().updateOrganizationStatus().then((function(e){return null==e?void 0:e.data}))}))}function oh(){return Pp((function(e){return Ed.getInstance().getOrgByName(e).then((function(e){return null==e?void 0:e.data}))}))}function ah(){var e=this;return Pp((function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().changePasswordV2(o).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}))}function rh(e){return Pp((function(e){return Ed.getInstance().updateProfile(e)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function ih(){return Pp((function(e){return Ed.getInstance().inviteUsersMassive(e,e.organizationCode)}))}function sh(){return Pp((function(e){var t=e.userCode,n=e.organizationCode;return Ed.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})}))}function uh(){return Pp((function(e){return Ed.getInstance().createUserAuth0(e)}))}function ch(){return Pp((function(e){return Ed.getInstance().postCall(e)}))}function lh(){return Pp((function(e){return Ed.getInstance().changeLoginMethods(e)}))}function dh(e){return Pp((function(e){return Ed.getInstance().updateIsActiveCheckout(e)}),e)}function ph(){return Pp((function(e){var t=e.accountCode,n=e.template;return Ed.getInstance().updateCheckoutTemplate({accountCode:t,template:n}).then((function(e){return null==e?void 0:e.data}))}))}function hh(){return Pp((function(e){var t=e.accountCode,n=e.theme;return Ed.getInstance().updateStylingTheme({accountCode:t,theme:n}).then((function(e){return null==e?void 0:e.data}))}))}function mh(){return Pp((function(e){var t=e.payload,n=e.transactionId,o=e.paymentId,a=e.action;return Ed.getInstance().createOperationTransaction(t,n,o,a)}))}function fh(){return Pp((function(e){var t=e.payload,n=e.paymentId,o=e.transactionId,a=e.handleSetProgress;return Ed.getInstance().uploadChargebacks(t,n,o,a)}))}!function(e){e.ACCOUNT="ACCOUNT",e.CHECKOUT_BUILDER="CHECKOUT_BUILDER",e.CONNECTION="CONNECTION",e.ROUTING="ROUTING",e.RISK_CONDITIONS="RISK_CONDITIONS",e.WEBHOOKS="WEBHOOKS"}(Lp||(Lp={}));var gh=new rp({}),yh=new class{constructor(e={}){this.queryCache=e.queryCache||new rp,this.mutationCache=e.mutationCache||new up,this.logger=e.logger||tp,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=Kd.subscribe((()=>{Kd.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=Qd.subscribe((()=>{Qd.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]=Od(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 o=Id(e,t,n),a=this.getQueryData(o.queryKey);return a?Promise.resolve(a):this.fetchQuery(o)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const o=this.queryCache.find(e),a=function(e,t){return"function"==typeof e?e(t):e}(t,null==o?void 0:o.state.data);if(void 0===a)return;const r=Id(e),i=this.defaultQueryOptions(r);return this.queryCache.build(this,i).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return np.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]=Od(e,t),o=this.queryCache;np.batch((()=>{o.findAll(n).forEach((e=>{o.remove(e)}))}))}resetQueries(e,t,n){const[o,a]=Od(e,t,n),r=this.queryCache,i={type:"active",...o};return np.batch((()=>(r.findAll(o).forEach((e=>{e.reset()})),this.refetchQueries(i,a))))}cancelQueries(e,t,n){const[o,a={}]=Od(e,t,n);void 0===a.revert&&(a.revert=!0);const r=np.batch((()=>this.queryCache.findAll(o).map((e=>e.cancel(a)))));return Promise.all(r).then(Rd).catch(Rd)}invalidateQueries(e,t,n){const[o,a]=Od(e,t,n);return np.batch((()=>{var e,t;if(this.queryCache.findAll(o).forEach((e=>{e.invalidate()})),"none"===o.refetchType)return Promise.resolve();const n={...o,type:null!=(e=null!=(t=o.refetchType)?t:o.type)?e:"active"};return this.refetchQueries(n,a)}))}refetchQueries(e,t,n){const[o,a]=Od(e,t,n),r=np.batch((()=>this.queryCache.findAll(o).filter((e=>!e.isDisabled())).map((e=>{var t;return e.fetch(void 0,{...a,cancelRefetch:null==(t=null==a?void 0:a.cancelRefetch)||t,meta:{refetchPage:o.refetchPage}})}))));let i=Promise.all(r).then(Rd);return null!=a&&a.throwOnError||(i=i.catch(Rd)),i}fetchQuery(e,t,n){const o=Id(e,t,n),a=this.defaultQueryOptions(o);void 0===a.retry&&(a.retry=!1);const r=this.queryCache.build(this,a);return r.isStaleByTime(a.staleTime)?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(Rd).catch(Rd)}fetchInfiniteQuery(e,t,n){const o=Id(e,t,n);return o.behavior=cp(),this.fetchQuery(o)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(Rd).catch(Rd)}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=>Dd(e)===Dd(t.queryKey)));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find((t=>Ld(e,t.queryKey)));if("production"!==process.env.NODE_ENV){this.queryDefaults.filter((t=>Ld(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=>Dd(e)===Dd(t.mutationKey)));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find((t=>Ld(e,t.mutationKey)));if("production"!==process.env.NODE_ENV){this.mutationDefaults.filter((t=>Ld(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=Pd(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:gh});function bh(){return Pp((function(e){return Ed.getInstance().createReconciliationsReportV2(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function kh(){return Pp((function(e){return Ed.getInstance().createReportV2(e).then((function(e){return null==e?void 0:e.data}))}))}function vh(){return Pp((function(e){return Ed.getInstance().getTotalRowsForExport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function jh(){return Pp((function(e){return Ed.getInstance().cancelReport(e).then((function(e){return null==e?void 0:e.data}))}))}function wh(o){var a=this;return Pp((function(){return t(a,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().createReportTemplate(o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onMutate:function(o){return t(a,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return[4,yh.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return n.sent(),t=yh.getQueryData(["GET/reports/templates"]),yh.setQueryData(["GET/reports/templates"],(function(t){return e(e([],t,!0),[o],!1)})),[2,{previousTemplates:t}]}}))}))},onError:function(e,t,n){yh.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){yh.invalidateQueries({queryKey:["GET/reports/templates"]})}})}function _h(e){return Pp((function(){return Ed.getInstance().updateReportTemplate(e).then((function(e){return null==e?void 0:e.data}))}))}function Eh(e,o,a){var r=this;return void 0===a&&(a=null),Pp((function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().postSmartRoutingCreateWorkflow(e,o).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,t.sent()]}}))}))}),a)}function Ch(e,o){var a=this,r=e.versionCode,i=e.accountCode,s=e.organizationCode;return void 0===o&&(o=null),Pp((function(){return t(a,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().postSmartRoutingPublishVersion(i,r,s).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}),o)}function Sh(e,t){var n=e.data,o=e.accountCode;return void 0===t&&(t=null),Pp((function(){return Ed.getInstance().putSmartRoutingUpdateWorkflow(o,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),t)}function Rh(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Pp((function(){return Ed.getInstance().deleteSmartRoutingVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)}function xh(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Pp((function(){return Ed.getInstance().postSmartRoutingDuplicateVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)}function Th(e,t){var n=e.paymentMethod,o=e.active,a=e.accountCode;return void 0===t&&(t=null),Pp((function(){return Ed.getInstance().putSmartRoutingToggleMethod(a,n,o).then((function(e){return null==e?void 0:e.data}))}),t)}function Ih(e,t){var n=e.declinedId,o=e.accountCode;return void 0===t&&(t=null),Pp((function(e){return void 0===e&&(e=null),Ed.getInstance().updateSmartRoutingDeclinedGroup(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)}function Oh(e){var t=e.accountCode;return Pp((function(e){return void 0===e&&(e=null),Ed.getInstance().createSmartRoutingDeclinedGroup(t,e).then((function(e){return null==e?void 0:e.data}))}),e.options)}function Ah(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Pp((function(e){return void 0===e&&(e=!1),Ed.getInstance().updateSmartRoutingFavorite(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)}function zh(e,t){var n=e.code,o=e.name,a=e.accountCode;return void 0===t&&(t=null),Pp((function(){return Ed.getInstance().putSmartRoutingUpdateWorkflowName(a,{code:n,name:o}).then((function(e){return null==e?void 0:e.data}))}),t)}function Ph(e,t){var n=e.accountCode,o=e.workflowVersionCode;return void 0===t&&(t=null),Pp((function(e){return Ed.getInstance().simulateSmartRoutingTransaction(n,o,e).then((function(e){return null==e?void 0:e.data}))}),t)}function Dh(e,t){return void 0===t&&(t=null),Pp((function(t){return Ed.getInstance().updateMonitorRedistribution(e,t).then((function(e){return null==e?void 0:e.data}))}),t)}function Lh(e,t){return void 0===t&&(t={}),Pp((function(t){var n=t.declinedGroupCode;return Ed.getInstance().removeDeclinedGroup(e,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),a(a({},t),{useErrorBoundary:!1}))}function Nh(e,t){return void 0===t&&(t={}),Pp((function(t){var n=t.payload;return Ed.getInstance().multiAccountDeclinedGroupCreate(e,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),a(a({},t),{useErrorBoundary:!1}))}var qh=function(e){return Pp((function(t){return Ed.getInstance().createMonitorThreshold(t,e).then((function(e){return e.data}))}))},Mh=function(e){return Pp((function(t){return Ed.getInstance().createMonitorTemplate(t,e).then((function(e){return e.data}))}))};function Uh(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postSlackMessageChannel(t).then((function(e){return null==e?void 0:e.data}))}))}function Bh(){return Pp((function(e){var t=e.userCode,n=e.organizationCode;return Ed.getInstance().deleteUserTeamV2({userCode:t,organizationCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function Fh(){return Pp((function(){return Ed.getInstance().setCustodian().then((function(e){return null==e?void 0:e.data}))}))}function Wh(){return Pp((function(e){var t=e.payload,n=e.accountCode;return Ed.getInstance().createRoles(t,n).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Hh(){var e=this;return Pp((function(o){var a=o.payload,r=o.id,i=o.accountCode;return t(e,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().editRoles({payload:a,id:r},i)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}}))}))}),{useErrorBoundary:!1})}function Gh(){return Pp((function(e){return Ed.getInstance().deleteRoles(e).then((function(e){return null==e?void 0:e.data}))}))}function Vh(){return Pp(["post-payment-links"],(function(e){var t=e.payload,n=e.accountCode;return Ed.getInstance().postPaymentLinks({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function Kh(){return Pp(["post-delete-payment-link"],(function(e){var t=e.code;return Ed.getInstance().postDeletePaymentLink({code:t}).then((function(e){return null==e?void 0:e.data}))}))}function $h(){return Pp(["patch-payment-links"],(function(e){var t=e.payload,n=e.accountCode,o=e.paymentLinkCode;return Ed.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:o}).then((function(e){return null==e?void 0:e.data}))}))}function Qh(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postUserSettings(t)}),{onMutate:function(e){return e}})}function Jh(){return Pp((function(e){return Ed.getInstance().postUserThemeSettings(e)}))}function Xh(){return Pp((function(e){var t=e.payload,n=e.section;return Ed.getInstance().postUserSettingsTables(t,n)}),{onMutate:function(e){return e},onSuccess:function(e){var t=yh.getQueryData(["fetch-profile"]);e.data&&yh.setQueryData(["fetch-profile"],a(a({},t),{settings:e.data}))}})}function Yh(e){return Pp(["pinned-sections"],(function(e){var t=e.payload;return Ed.getInstance().postUserSettingsPinned(t)}),{onMutate:function(t){var n=t.payload;return e({payload:n})}})}function Zh(){return Pp((function(e){var t=e.password,n=e.otp;return Ed.getInstance().getMfaTokenValidation(t,n).then((function(e){return null==e?void 0:e.data}))}))}function em(){return Pp((function(){return Ed.getInstance().getEmailOtp().then((function(e){return null==e?void 0:e.data}))}))}function tm(){return Pp((function(e){return Ed.getInstance().confirmMfaOtp(e).then((function(e){return null==e?void 0:e.data}))}))}function nm(){return Pp((function(e){return Ed.getInstance().unrollMfa(e).then((function(e){return null==e?void 0:e.data}))}))}function om(){return Pp((function(){return Ed.getInstance().validatePasswordStatus().then((function(e){return null==e?void 0:e.data})).catch((function(e){return{valid:!1}}))}))}function am(){return Pp(["post-get-allowlist-items"],(function(e){var t=e.payload;return Ed.getInstance().postAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function rm(){return Pp(["post-get-allowlist-multi-account"],(function(e){var t=e.payload;return Ed.getInstance().postGetAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function im(){return Pp(["post-create-allowlist-multi-account"],(function(e){var t=e.payload;return Ed.getInstance().postCreateAllowlistMultiAccount({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function sm(){return Pp(["patch-change-status-allowlist"],(function(e){var t=e.payload;return Ed.getInstance().patchChangeStatusAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function um(){return Pp(["patch-change-status-allowlist-item"],(function(e){var t=e.payload;return Ed.getInstance().patchChangeStatusAllowlistItem({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function cm(){return Pp(["post-add-allowlist-items"],(function(e){var t=e.payload;return Ed.getInstance().patchAddAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function lm(){return Pp(["patch-allowlist"],(function(e){var t=e.payload;return Ed.getInstance().patchAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function dm(){return Pp(["post-blacklist-multi-account"],(function(e){var t=e.payload;return Ed.getInstance().postBlackListMultiAccount({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function pm(){return Pp(["put-blacklist"],(function(e){return Ed.getInstance().putBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function hm(){return Pp(["change-blacklist"],(function(e){return Ed.getInstance().changeBlackListStatus(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function mm(){return Pp(["change-blacklist-item"],(function(e){return Ed.getInstance().changeBlackListStatusItem(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function fm(){return Pp(["post-blacklist-items"],(function(e){var t=e.payload;return Ed.getInstance().postBlackListItems({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function gm(){return Pp(["delete-blacklist"],(function(e){var t=e.black_list_code;return Ed.getInstance().deleteBlackListType({black_list_code:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function ym(e){var t=e.handleSetProgress;return Pp(["post-blacklist-batch"],(function(e){var n=e.blacklist_code,o=e.expiration_days,a=e.file;return Ed.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:o,file:a,handleSetProgress:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function bm(){return Pp(["change-payments-webhook"],(function(e){var t=e.status,n=e.paymentCode;return Ed.getInstance().postChangePaymentsWebhook({status:t,paymentCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function km(){return Pp(["delete-blacklist-items"],(function(e){var t=e.blocklist_code,n=e.blocklist_item_id,o=e.account_code;return Ed.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function vm(){return Pp(["valiate-blacklist-items"],(function(e){return Ed.getInstance().valiateBlockListItems({payload:e}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function jm(){return Pp(["delete-allowlist-item"],(function(e){return Ed.getInstance().deleteAllowlistItem({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function wm(){return Pp(["validate-allowlist-items"],(function(e){return Ed.getInstance().validateAllowlistItems({payload:e}).then((function(e){return e.data})).catch((function(e){return e}))}))}function _m(e){var t=e.fileName,n=e.onSuccess,o=e.onError,a=u(0),r=a[0],i=a[1],s=c({cancel:function(){return null}}),l=Pp(["upload-file-chargeback",t],(function(e){var t=Ed.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:i}),a=t.promise,r=t.cancel;return s.current.cancel=r,a.then((function(e){return null==n||n(null==e?void 0:e.data),null==e?void 0:e.data})).catch((function(e){throw null==o||o(),e}))}),{useErrorBoundary:!1});return{mutation:l,cancelRequest:s.current.cancel,progress:r}}function Em(){return Pp((function(e){return Ed.getInstance().uploadBatchRefundsV2({payload:e}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Cm(){var e=this;return Pp((function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().batchRefundByFile({payload:o}).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function Sm(){var e=this;return Pp((function(o){var a=o.batchRefundId,r=o.organizationCode,i=o.accountCode;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().getBatchRefundProcessedFileDownload(a,r,i).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function Rm(){var e=this;return Pp((function(o){var a=o.batchRefundId,r=o.organizationCode,i=o.accountCode;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().getBatchRefundUserFileDownload(a,r,i).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function xm(){var e=c({cancel:function(){return null}}),t=Pp(["upload-file"],(function(t){var n=Ed.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),o=n.promise,a=n.cancel;return e.current.cancel=a,o.then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}));return{mutation:t,cancelRequest:e.current.cancel}}function Tm(){return Pp((function(e){var t=e.payload,n=e.organizationCode;return Ed.getInstance().updateMFAConfig(t,n)}))}function Im(){return Pp((function(e){var t=e.payload,n=e.organizationCode;return Ed.getInstance().mfaExcludeUsers(t,n)}))}function Om(e){return zp(["GET/scheduled-reports",e],(function(){return Ed.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 Am(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postScheduledReport(t).then((function(e){return{data:e.data,status:e.status}})).catch((function(e){return e}))}))}function zm(){return Pp((function(e){var t=e.reportCode,n=e.payload;return Ed.getInstance().updateScheduledReport(t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Pm(){return Pp((function(e){return Ed.getInstance().deleteScheduledReport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Dm(){return Pp((function(e){return Ed.getInstance().getConditionalConfigRules(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Lm(){return Pp((function(e){return Ed.getInstance().getRule(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Nm(){return Pp((function(e){var t=e.payload,n=e.accountCode;return Ed.getInstance().postCreateRuleMultiAccount(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function qm(){return Pp((function(e){var t=e.payload,n=e.ruleId,o=e.accountCode;return Ed.getInstance().postEditRule(t,n,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Mm(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postCreateCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Um(){return Pp((function(e){var t=e.payload,n=e.code;return Ed.getInstance().pathCreateCustomizedApiKeys(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Bm(){return Pp((function(e){var t=e.code,n=e.password;return Ed.getInstance().getCustomizedApiKeysToken(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))}function Fm(){return Pp((function(e){var t=e.passwordOtp;return Ed.getInstance().getDeveloperCredentialsValidatePassword(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))}function Wm(){return Pp((function(e){var t=e.code;return Ed.getInstance().deleteCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Hm(){return Pp((function(e){var t=e.payload,n=e.code;return Ed.getInstance().patchApiKeysEditNote(t,n).then((function(e){return e.data})).catch((function(e){return e}))}))}function Gm(){return Pp((function(e){var t=e.payload,n=e.code,o=e.password;return Ed.getInstance().postApiKeysRoll(t,n,o).then((function(e){return e.data})).catch((function(e){return e}))}))}function Vm(){return Pp((function(e){var t=e.password,n=e.accountCode;return Ed.getInstance().getDeveloperCredentials(t,n).then((function(e){return a(a({},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}}))}))}function Km(e){return Pp((function(e){var t=e.payload;return Ed.getInstance().postAuditMonitors(t)}),{onMutate:e.onMutate})}function $m(){return Pp((function(e){var t=e.codes;return Ed.getInstance().postResendWebhooks({codes:t}).then((function(e){return null==e?void 0:e.data}))}))}function Qm(){return Pp((function(e){return Ed.getInstance().postExportApiLogs(e).then((function(e){return null==e?void 0:e.data}))}))}function Jm(){return Pp((function(e){return Ed.getInstance().postExportWebhooksLogs(e).then((function(e){return null==e?void 0:e.data}))}))}function Xm(o){var a=this;return Pp((function(){return Ed.getInstance().createReconciliationReportTemplate(o).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{onMutate:function(o){return t(a,void 0,void 0,(function(){var t,a;return n(this,(function(n){switch(n.label){case 0:return[4,yh.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return n.sent(),t=null===(a=yh.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===a?void 0:a.templates,yh.setQueryData(["GET/reconciliation/reports/templates"],(function(t){return{templates:e(e([],t.templates,!0),[o],!1)}})),[2,{previousTemplates:t}]}}))}))},onError:function(e,t,n){yh.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){yh.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})}function Ym(e){return Pp((function(){return Ed.getInstance().updateReconciliationReportTemplate(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Zm(){return Pp(["POST/reconciliation/alerts"],(function(e){return Ed.getInstance().postReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yh.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function ef(){return Pp(["DELETE/reconciliation/alerts"],(function(e){return Ed.getInstance().deleteReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yh.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function tf(){return Pp(["UPDATE/reconciliation/alerts"],(function(e){return Ed.getInstance().updateReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yh.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function nf(){return Pp((function(e){var t=e.payload;return Ed.getInstance().postCreateInsightsReport(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function of(){return Pp((function(e){return Ed.getInstance().createSamlConfig(e)}))}function af(){return Pp((function(e){return Ed.getInstance().updateSamlConfig(e)}))}function rf(){return Pp((function(){return Ed.getInstance().deleteSamlConfig()}))}function sf(e,t){return void 0===t&&(t={}),Pp((function(t){return Ed.getInstance().generateAIWorkflowRoutes(e,t).then((function(e){return null==e?void 0:e.data}))}),a(a({},t),{useErrorBoundary:!1}))}function uf(e){return void 0===e&&(e={}),Pp((function(e){return Ed.getInstance().postAIGenerationFeedback(e).then((function(e){return null==e?void 0:e.data}))}),a(a({},e),{useErrorBoundary:!1}))}function cf(){return Pp((function(e){return Ed.getInstance().createChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function lf(){return Pp((function(e){return Ed.getInstance().deleteChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function df(){return Pp((function(e){var t=e.chart_id,n=e.type,o=e.name,a=e.user_prompt,r=void 0===a?"":a;return Ed.getInstance().patchChartGPTChart(t,{type:n,name:o,user_prompt:r}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function pf(){var e=this;return Pp((function(o){return t(e,void 0,void 0,(function(){var e,t,a,r,i;return n(this,(function(n){switch(n.label){case 0:return[4,Ed.getInstance().createChartGPTChart(o)];case 1:if(e=n.sent(),!(t=null!==(r=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.chartgpt_id)&&void 0!==r?r: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:t}]}}))}))}),{useErrorBoundary:!1})}function hf(){return Pp((function(e){return Ed.getInstance().createChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function mf(){var e=this;return Pp((function(o){return t(e,void 0,void 0,(function(){var e,t,a,r,i;return n(this,(function(n){switch(n.label){case 0:return[4,Ed.getInstance().createChartGPTChart(o)];case 1:if(e=n.sent(),!(t=null!==(r=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.chartgpt_id)&&void 0!==r?r: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:t}]}}))}))}),{useErrorBoundary:!1})}function ff(){var e=this;return Pp(["POST/template-reporting/report-templates"],(function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().createTemplateReporting(o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function gf(){var e=this;return Pp(["POST/template-reporting/report-templates/clone"],(function(o){var a=o.templateId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().cloneReportTemplate(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function yf(){var e=this;return Pp(["PATCH/template-reporting/report-templates/selection"],(function(o){var a=o.templateId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().updateTemplateSelection(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function bf(){var e=this;return Pp(["PATCH/template-reporting/report-templates/status"],(function(o){var a=o.templateId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().changeTemplateStatus(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function kf(){var e=this;return Pp(["DELETE/template-reporting/report-templates"],(function(o){var a=o.templateId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().deleteReportTemplate(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})}function vf(){var e=this;return Pp(["POST/template-reporting/report-schedules"],(function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().createReportSchedule(o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}function jf(){var e=this;return Pp(["PATCH/template-reporting/report-schedules/disable"],(function(o){var a=o.scheduleId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().disableReportSchedule(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}function wf(){var e=this;return Pp(["DELETE/template-reporting/report-schedules"],(function(o){var a=o.scheduleId,r=o.payload;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().deleteReportSchedule(a,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){yh.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})}var _f,Ef=function(){var e,t;return null===(t=null===(e=function(e){var t=localStorage.getItem(e),n=u(t&&JSON.parse(t)),o=n[0],a=n[1];return l((function(){var t=function(t){if(t.key===e){var n=t.newValue;a(n)}};return window.addEventListener("storage",t),function(){window.removeEventListener("storage",t)}}),[e]),o}("account"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.organization_code};function Cf(e){var o=this;return zp(["fetch-payments-lazy",e],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.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 Sf(e){return zp(["fetch-payments-evaluated",e],(function(){return Ed.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 Rf(e){var o=this,a=e.paymentCode,r=e.enabled,i=void 0===r||r,s=Ed.getInstance();return zp(["get-payment-v2",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getPaymentV2(a).then((function(e){return e.data}))]}))}))}),{enabled:i,cacheTime:500,useErrorBoundary:!1})}function xf(e){var o=this,a=e.payment_code,r=e.enabled,i=void 0===r||r,s=Ed.getInstance();return zp(["get-payment-transaction-details-v2",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getTransactionDetailsV2({payment_code:a}).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!a&&i,cacheTime:0,useErrorBoundary:!1})}function Tf(e){var o=this,a=e.transaction_code,r=e.enabled,i=void 0===r||r,s=Ed.getInstance();return zp(["get-payment-transaction-raw-response",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getTransactionRawResponse({transaction_code:a})]}))}))}),{enabled:!!a&&i,cacheTime:0,useErrorBoundary:!1})}function If(e){var t=Ef();return zp(["payment-methods",e],(function(){return Ed.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 Of(){return zp({queryKey:["/payment-methods/providers"],queryFn:function(){return Ed.getInstance().getPaymentMethodsAndProviders().then((function(e){return null==e?void 0:e.data}))},cacheTime:864e5,useErrorBoundary:!1})}function Af(){return zp(["GET/catalog/card-brands"],(function(){return Ed.getInstance().getCardBrands().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function zf(e,t){return void 0===e&&(e=!0),void 0===t&&(t=Sc.PAYMENTS),zp(["payment-filters",e,t],(function(){return Ed.getInstance().getPaymentFilters(t).then((function(e){return null==e?void 0:e.data}))}),{enabled:e,useErrorBoundary:!1,cacheTime:3e5})}function Pf(){return zp(["payment-metrics-filters"],(function(){return Ed.getInstance().getPaymentMetricsFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Df(e){var t=e.transaction_code,n=e.enabled;return zp(["payment-transaction-details",t],(function(){return Ed.getInstance().getPaymentTransactionsDetails({transaction_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function Lf(e){var t=e.payment_code,n=e.enabled;return zp(["transaction-history",t],(function(){return Ed.getInstance().getTransactionHistoryByPaymentCode({payment_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function Nf(e){var o=this;return zp(["POST/transactions",JSON.stringify(e)],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().postTransactions(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function qf(e){var o=this;return zp(["POST/fraud-transactions",JSON.stringify(e)],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.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 Mf(e){return zp(["GET/payout-detail",JSON.stringify(e)],(function(){var t=Ed.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 Uf(e){return zp(["GET/payout-transaction-detail",JSON.stringify(e)],(function(){return Ed.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 Bf(e){var t=Ef();return zp(["GET/payout-history-detail",JSON.stringify(e)],(function(){return Ed.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 Ff(e,o){var a=this,r=Ef();return zp(["GET/useGetProofOfCancel",r,e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getProofOfCancel(e,r,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&!!r&&!!o,cacheTime:0,useErrorBoundary:!1})}function Wf(e,o){var a=this,r=Ef();return zp(["GET/useGetProofOfPayment",r,e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getProofOfPayment(e,r,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&!!r&&!!o,cacheTime:0,useErrorBoundary:!1})}function Hf(e,o,a){var r=this,i=Ed.getInstance();return zp(["send-payment-notification",e,o],(function(){return t(r,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,i.sendPaymentNotification(e,o)];case 1:return t=n.sent(),a.onSuccess(),[2,t.data];case 2:throw r=n.sent(),a.onError(),r;case 3:return[2]}}))}))}),{enabled:a.enabled,cacheTime:0,useErrorBoundary:!1})}function Gf(e){return zp(["usePayoutsList",e&&JSON.stringify(e)],(function(){var t=Ed.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 Vf(e){var o=this;void 0===e&&(e=!0);var a=Ef();return zp(["getPayoutsFilters",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().getPayoutsFilters(a).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))]}))}))}),{enabled:e&&!!a})}function Kf(e){var t=e.password,n=e.accountCode;return zp(["developers"],(function(){return Ed.getInstance().getDeveloperCredentials(t,n).then((function(e){return a(a({},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 $f(){return zp(["fetch-customized-api-keys-members"],(function(){return Ed.getInstance().getCustomizedApiKeysMembers().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function Qf(){return zp(["developers-get-allowed-ips"],(function(){return Ed.getInstance().getAllowedIps().then((function(e){return(null==e?void 0:e.data)?a(a({},null==e?void 0:e.data),{isError:!1}):null})).catch((function(e){return a(a({},e),{isError:!0})}))}),{enabled:!1,cacheTime:0})}function Jf(){return zp(["fetch-customized-api-keys-accounts"],(function(){return Ed.getInstance().getCustomizedApiKeysAccounts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function Xf(e){return zp(["fetch-customized-api-keys",e],(function(){return Ed.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 Yf(){return zp(["fetch-customized-api-keys-products"],(function(){return Ed.getInstance().getCustomizedApiKeysProducts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{cacheTime:0})}function Zf(){return Pp(["developers-patch-allowed-ips"],(function(e){return Ed.getInstance().patchAllowedIps(e).then((function(e){return(null==e?void 0:e.data)?a(a({},null==e?void 0:e.data),{isError:!1}):null})).catch((function(e){return a(a({},e),{isError:!0})}))}),{cacheTime:0})}function eg(){return zp(["fetch-organizations"],(function(){return Ed.getInstance().getOrganization().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function tg(){return zp(["fetch-all-organizations",Ef()],(function(){return Ed.getInstance().getAllOrganization().then((function(e){return(null==e?void 0:e.data)||[]}))}),{cacheTime:36e5,keepPreviousData:!0,useErrorBoundary:!1})}function ng(e){var t=Ef();return zp(["organizations-provider-params",e],(function(e){var n=e.queryKey;return Ed.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 og(e){var t=e.integration_code,n=e.enabled,o=e.accountCode;return zp(["integration-params",t,o],(function(){return t.includes("undefined")?{}:Ed.getInstance().getIntegrationParams({accountCode:o,integration_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,useErrorBoundary:!1})}function ag(e){var t=e.accountCode,n=e.organizationCode,o=Ef();return zp(["organizations-account-integrations",t,n],(function(){return Ed.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||o}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,enabled:!!t,useErrorBoundary:!1})}function rg(e){var t=e.accountCode,n=e.paymentMethod;return zp(["fetch-connections-by-payment-method",n,t],(function(){return Ed.getInstance().getConnectionsByPaymentMethod(t,n).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!n&&!!t,cacheTime:0,useErrorBoundary:!1})}function ig(){var e=this;return zp(["fetch-hash-pylon"],(function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Ed.getInstance().getHashPylon()]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})}function sg(){return zp(["connections"],(function(){return Ed.getInstance().getConnections().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function ug(){return zp(["dialogs"],(function(){return Ed.getInstance().getDialogs().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,retryDelay:2e3,cacheTime:36e5})}function cg(){return zp(["params-catalog"],(function(){return Ed.getInstance().getWebhookParamsV2().then((function(e){return null==e?void 0:e.data}))}))}function lg(e){var t=e.accountCode,n=e.name;return zp(["webhooks",t,n],(function(){return Ed.getInstance().getWebhooksV3({accountCode:t,name:n}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t,useErrorBoundary:!1})}function dg(e){var t=e.accountCode,n=e.enabled;return zp(["webhooks-detail",t],(function(){return Ed.getInstance().getWebhooksV2Detail({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!n})}function pg(e){var t,n=Ef(),o=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return zp({queryKey:["accounts",o],queryFn:function(){return Ed.getInstance().getAccounts(o).then((function(e){return null==e?void 0:e.data}))},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!o})}function hg(e){return zp(["accountsV2",e],(function(){return Ed.getInstance().getAccountsV2().then((function(e){return(null==e?void 0:e.data)||[]})).catch((function(e){throw e}))}),{keepPreviousData:!0,enabled:!!e,useErrorBoundary:!1})}function mg(e){return zp(["accountsV2-by-user",e],(function(){return e?Ed.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 fg(e,o){var a=this;return zp({queryKey:["accounts-for-impersonation",e,o],queryFn:function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getAccountsForImpersonation(e).then((function(e){var t,n;return(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.response)||void 0===n?void 0:n.map((function(e){return{label:e.name,value:o?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 gg(e){return zp({queryKey:["pending-duplicate-accounts",e],queryFn:function(){return Ed.getInstance().getPendingDuplicateAccounts()},useErrorBoundary:!1,keepPreviousData:!0,refetchInterval:e})}function yg(){return zp(["menu"],(function(){return Ed.getInstance().getMenu().then((function(e){return sd(e)?md:null==e?void 0:e.data})).catch((function(){return md}))}))}function bg(){return zp(["/payment/statuses/style"],(function(){return Ed.getInstance().useGetPaymentStatusesStyles().then((function(e){return sd(e)?ud:null==e?void 0:e.data})).catch((function(){return ud}))}))}function kg(){return zp(["/transaction/statuses/style"],(function(){return Ed.getInstance().useGetTransactionStatusesStyles().then((function(e){return sd(e)?cd:null==e?void 0:e.data})).catch((function(){return cd}))}),{cacheTime:36e5,useErrorBoundary:!1})}function vg(){return zp(["/reconciliation/transaction/statuses/style"],(function(){return Ed.getInstance().useGetReconciliationTransactionStatusesStyles().then((function(e){return sd(e)?ld:null==e?void 0:e.data})).catch((function(){return ld}))}))}function jg(){return zp(["timezone-catalog"],(function(){return Ed.getInstance().useGetTimeZoneCatalog().then((function(e){return sd(e)?dd:null==e?void 0:e.data})).catch((function(){return dd}))}))}function wg(){return zp(["/cms/audit-logs-filters"],(function(){return Ed.getInstance().useGetAuditLogsFilters().then((function(e){return sd(e)?pd:null==e?void 0:e.data})).catch((function(){return pd}))}))}function _g(){return zp(["/cms/static-contents"],(function(){return Ed.getInstance().getDashboardStaticContents().then((function(e){var t,n;return sd(e)?hd:(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 Eg(){return zp(["/cms/locales"],(function(){return Ed.getInstance().getLocales().then((function(e){return sd(e)?fd:e.data})).catch((function(){return fd}))}))}!function(e){e.IN_PROGRESS="IN_PROGRESS",e.COMPLETED="COMPLETED",e.FAILED="FAILED"}(_f||(_f={}));var Cg=function(){var e=u("ON"===localStorage.getItem("isTesting")),t=e[0],n=e[1];return l((function(){window.addEventListener("storage",(function(e){"isTesting"===e.key&&n("ON"===e.newValue)}))}),[]),{isTesting:t}};function Sg(e){return zp(["smart-routing-methods",e],(function(){return Ed.getInstance().getSmartRoutingMethods(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function Rg(e,t){return zp(["smart-routing-workflow",t,e],(function(){return Ed.getInstance().getSmartRoutingWorkflow(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e,cacheTime:0,retry:!1})}function xg(e,t){return zp(["smart-routing-condition-types",e,t],(function(){return Ed.getInstance().getSmartRoutingConditionTypes(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e})}function Tg(e,t){return zp(["smart-routing-condition-payment-method",e,t],(function(){return Ed.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 Ig(e,t){return zp(["smart-routing-condition-types-values",t,e],(function(){return Ed.getInstance().getSmartRoutingConditionTypesValues(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&!!e,useErrorBoundary:!1})}function Og(e){var t=e.accountCode,n=e.workflowVersionId;return zp(["smart-routing-workflow-version",n,t],(function(){return Ed.getInstance().getSmartRoutingWorkflowVersion(t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!n&&!!t,cacheTime:0})}function Ag(e,t,n){return zp(["smart-routing-next-route",e,n,t],(function(){return Ed.getInstance().getSmartRoutingNextSteps(e,t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function zg(e){return zp(["smart-routing-decline-groups",e],(function(){return Ed.getInstance().getSmartRoutingDeclinedGroup(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function Pg(e,t){return zp(["smart-routing-payment-route",e,t],(function(){return Ed.getInstance().getSmartRoutingPaymentRoute(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&!!t,cacheTime:0})}function Dg(e){return zp(["smart-routing-simulate-condition-type-values",e],(function(){return Ed.getInstance().getSmartRoutingSimulateConditionTypeValues(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function Lg(e){var t=e.text,n=e.conditionType;return zp(["smart-routing-search-condition-values",t,n],(function(){return Ed.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 Ng(){return zp(["smart-routing-conversion-rates"],(function(){return Ed.getInstance().getProviderConversionRatesData().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!1,useErrorBoundary:!1})}function qg(){var e=this;return zp({queryKey:["smart-routing-3ds-excemptions"],queryFn:function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})}function Mg(){var e=this;return zp({queryKey:["smart-routing-network-tokens-onboarding"],queryFn:function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})}function Ug(e){return zp(["fetch-routing-monitors-templates",e],(function(){return Ed.getInstance().getRoutingMonitorsTemplates(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Bg(e,t){return zp(["fetch-routing-monitors-template",e],(function(){return Ed.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 Fg(e){var t=e.accountCode;return zp(["checkouts",t],(function(){return Ed.getInstance().getCheckouts({accountCode:t}).then((function(e){return e.data}))}),{cacheTime:0,enabled:Boolean(t)})}function Wg(e){var t=e.accountCode;return zp(["checkouts-template"],(function(){return Ed.getInstance().getCheckoutTemplate({accountCode:t}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,enabled:Boolean(t)})}var Hg=function(e){return["checkout-builder-name-and-icon",e.paymentMethodType,e.type]},Gg=function(e,t){var n=e.paymentMethodType,o=e.type;return zp(Hg({paymentMethodType:n,type:o}),(function(){return Ed.getInstance().getNameAndIcon({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)},Vg=function(e){return["checkout-builder-required-fields",e.paymentMethodType,e.type]},Kg=function(e,t){var n=e.paymentMethodType,o=e.type;return zp(Vg({paymentMethodType:n,type:o}),(function(){return Ed.getInstance().getRequiredFields({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)};function $g(e){var t=e.accountCode;return zp(["styling-sdk-dynamic",t],(function(){return Ed.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 Qg(e){var t=e.accountCode;return zp(["styling-theme",t],(function(){return Ed.getInstance().getStylingTheme({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 Jg(e){var t=e.accountCode;return zp(["styling-settings",t],(function(){return Ed.getInstance().getStylingSettings({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 Xg(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n;return zp(["styling-settings-v2",t],(function(){return Ed.getInstance().getStylingSettingsV2({accountCode:t,environment:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Yg(){return Pp((function(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n,a=e.payload;return Ed.getInstance().changeStylingSettings({accountCode:t,environment:o,payload:a}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function Zg(){return zp(["fetch-profile"],(function(){return Ed.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 ey(){var e=this;return zp(["get-user-full"],(function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Ed.getInstance().getUserFull()];case 1:return[2,e.sent().data]}}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})}function ty(e,t){return zp(["fetch-permissions",e,t],(function(){var e,t,n,o=localStorage.getItem("account"),a=localStorage.getItem("user"),r=o&&JSON.parse(o),i=a&&JSON.parse(a);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==r?void 0:r.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 ny(e){return zp(["email-verification",e],(function(){return Ed.getInstance().emailVerification(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function oy(){return zp({queryKey:["get-login-methods"],queryFn:function(){return Ed.getInstance().getLoginMethods().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}})}function ay(){return zp(["fetch-impersonation-users"],(function(){return Ed.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 ry(){return zp(["fetch-impersonation-enabled"],(function(){return Ed.getInstance().getImpersonationEnabled().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function iy(e,o,a,r,i){var s=this;return void 0===a&&(a=1),void 0===r&&(r=10),zp(["get-users-to-impersonate",e,o,a,r,i],(function(){return t(s,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getUsersToImpersonate(e,o,a,r,i).then((function(e){return null==e?void 0:e.data}))]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function sy(e){var t;return zp(["fetch-communications",e],(function(){return Ed.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 uy(){return zp(["fetch-communications-filters"],(function(){return Ed.getInstance().getCommunicationsFilters().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function cy(e,t){return zp(["fetch-communication-details",e],(function(){return Ed.getInstance().getCommunicationDetails(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e,useErrorBoundary:!1,cacheTime:0})}function ly(e){return zp(["notifications-customer",e],(function(){return Ed.getInstance().getNotificationsCustomer(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,keepPreviousData:!1})}function dy(e){return zp(["validate-opsgenie-key",e],(function(){return Ed.getInstance().getValidateOpsgenieKey(e).then((function(e){return null==e?void 0:e.data})).catch((function(){return{error:!0}}))}),{enabled:!!e,cacheTime:0})}function py(){return zp(["notifications-merged"],(function(){return Ed.getInstance().getMergedNotifications().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{keepPreviousData:!1,cacheTime:0})}function hy(){return Pp((function(e){return Ed.getInstance().getNotificationsNumber(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function my(){var e=this;return Pp((function(o){return t(e,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().pathNotification(o)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}}))}))}))}var fy={key:"metadata_fields",name:"metadata_fields"};function gy(){return zp(["reports"],(function(){return Ed.getInstance().reportsList().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function yy(e){return void 0===e&&(e=!0),zp(["reports-multi-env"],(function(){return Ed.getInstance().reportsListMultiEnv().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e})}function by(e,t,n){return void 0===t&&(t=!1),zp(["reports/".concat(e)],(function(){return Ed.getInstance().downloadReports(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:t,onSuccess:n,useErrorBoundary:!1})}function ky(e){return zp(["GET/reports/templates"],(function(){return Ed.getInstance().getReportTemplates().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e,useErrorBoundary:!1})}function vy(o,a,r){var i=this;return zp(["GET/reports/columns/".concat(a,"/").concat(r)],(function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getReportColumns(a,r).then((function(t){return a===Oc.ALL&&r===Ic.PAYMENTS?e(e([],null==t?void 0:t.data,!0),[fy],!1):null==t?void 0:t.data})).catch((function(e){return e}))]}))}))}),{enabled:o,useErrorBoundary:!1})}function jy(e,o){var a=this,r=Ef();return zp(["getRefundPdf",e,r,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getRefundPdf(e,r,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))]}))}))}),{enabled:!!e&&!!r,useErrorBoundary:!1})}function wy(){var e=Ef();return zp(["teams-filters-members"],(function(){return Ed.getInstance().teamsFiltersMembers({organizationCode:e}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})}function _y(e){var t=e.organizationCode,n=e.accountCodes,o=e.email,a=e.page,r=e.pageSize,i=Ef();return zp(["fetch-post-members-v2",t,n,o,a,r],(function(){return Ed.getInstance().postMembersPaginatedV2({organizationCode:i,accountCodes:n,email:o,page:a,pageSize:r}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&!!n,cacheTime:0,useErrorBoundary:!1})}function Ey(){return zp(["fetch-roles"],(function(){return Ed.getInstance().getRoles().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Cy(){return zp(["fetch-rolespermissions"],(function(){return Ed.getInstance().getRolesPermissions().then((function(e){return null==e?void 0:e.data}))}))}function Sy(){return zp(["fetch-permissions-catalog"],(function(){return Ed.getInstance().getPermissionsCatalog().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Ry(e){return zp(["data-report",e],(function(){return Ed.getInstance().getSmartRoutingDataReport(e).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,useErrorBoundary:!1})}function xy(e,t,n,o){var a,r;void 0===n&&(n=!0);var i=null!==(a=null==o?void 0:o.staleTime)&&void 0!==a?a:3e5,s=null!==(r=null==o?void 0:o.cacheTime)&&void 0!==r?r:3e5;return zp(["get-insights-conversion-rate-metrics-v2",e,t],(function(){return Ed.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:i,cacheTime:s,useErrorBoundary:!1,retry:1})}function Ty(e,t){return zp(["get-insights-conversion-rate-view-more-metrics",t,e],(function(){return Ed.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 Iy(e){return zp(["get-insights-conversion-rate-fallback-metrics",e],(function(){return Ed.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 Oy(e,t,n){return void 0===n&&(n=!0),delete t.account_code,zp(["get-insights-volume-metrics",t,e],(function(){return Ed.getInstance().getInsightsMetricsVolume(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function Ay(e,t,n,o){return void 0===o&&(o=!0),delete t.account_code,zp(["get-insights-volume-metrics-v2",t,e,n],(function(){return Ed.getInstance().getInsightsMetricsVolumeV2(e,n,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:o,cacheTime:200,useErrorBoundary:!1})}function zy(e,t,n){return void 0===n&&(n=!0),delete t.account_code,zp(["get-insights-total-payment-fraud-metrics",t,e],(function(){return Ed.getInstance().getInsightsMetricsTotalPaymentsAndFraud(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function Py(e,t,n){return void 0===n&&(n=!0),delete t.account_code,zp(["get-insights-customer-payment-fraud-metrics",t,e],(function(){return Ed.getInstance().getInsightsMetricsCustomerPaymentsAndFraud(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function Dy(e){return zp(["get-insights-overview",e],(function(){return Ed.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 Ly(e,t){var n=!!(null==e?void 0:e.enabled)&&void 0!==(null==e?void 0:e.account_code);return zp(["get-insights-overview-v3",e,t],(function(){return Ed.getInstance().getInsightOverviewV3(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:0,useErrorBoundary:!1})}function Ny(e){return zp(["get-insights-home-metrics",e],(function(){return Ed.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 qy(e){return zp(["get-insights-reports",e],(function(){return Ed.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 My(e){return zp(["get-insights-reports-again",e],(function(){return Ed.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 Uy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-fraud-screening-volume-and-count-tx",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsFraudScreeningVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function By(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-fraud-screening-conversion-rate",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsFraudScreeningConversionRate(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Fy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-3ds-volume-and-count-tx",o,e],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsights3dsVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Wy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-3ds-conversion-rate-and-evolution",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsights3dsConversionRateAndEvolution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Hy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-3ds-decline-reasons",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsights3dsDeclineReasons(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Gy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-3ds-frictionless-vs-challenge",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsights3dsFrictionlessVsChallenge(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Vy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-volume-and-count-tx",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ky(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-total-rate-and-evolution",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksTotalRateAndEvolution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function $y(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-win-rate",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksWinRate(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Qy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-disputed",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksDisputed(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Jy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksByProviderAndCardBrand(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Xy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-reasons-distribution",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksReasonsDistribution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Yy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-status-distribution",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksStatusDistribution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Zy(e,o,a){var r=this;return void 0===a&&(a={enabled:!0}),zp({queryKey:["post-insights-chargebacks-by-card-brand",e,o],queryFn:function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getInsightsChargebacksByCardBrand(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function eb(e,t){return zp(["fetch-reconciliation-transaction",e],(function(){return Ed.getInstance().getReconciliationTransactions(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!!t,useErrorBoundary:!1})}function tb(e,t){return zp(["fetch-reconciliation-settlements",e],(function(){return Ed.getInstance().getReconciliationSettlements(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!!t,useErrorBoundary:!1})}function nb(e,t){return zp(["fetch-reconciliation-metrics",e],(function(){return Ed.getInstance().getReconciliationMetrics(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t,cacheTime:500})}function ob(){return zp(["GET-reconciliation-filters"],(function(){return Ed.getInstance().getReconciliationFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function ab(e){return zp(["GET/v1/reconciliation/table/".concat(e,"/columns")],(function(){return Ed.getInstance().getAllTableColumns(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function rb(){return zp(["GET/v1/reconciliation/active"],(function(){return Ed.getInstance().getReconciliationActive().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function ib(e,t,n){return zp(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],(function(){return Ed.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 sb(e){return zp(["GET/reconciliation/reports/templates"],(function(){return Ed.getInstance().getReconciliationReportTemplates().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{enabled:e,useErrorBoundary:!1})}function ub(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/alerts/list",t,n],(function(){return Ed.getInstance().getReconciliationAlerts(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function cb(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/agenda/list",t,n],(function(){return Ed.getInstance().getReconciliationAgenda(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function lb(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/agenda/insights",t,n],(function(){return Ed.getInstance().getReconciliationAgendaInsightByKey(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function db(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/sales/list",t,n],(function(){return Ed.getInstance().getReconciliationSales(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function pb(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/advancements/list",t,n],(function(){return Ed.getInstance().getReconciliationAdvancements(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function hb(e){var t=e.body,n=e.params,o=e.enabled;return zp(["GET/reconciliation/fees/list",t,n],(function(){return Ed.getInstance().getReconciliationFees(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function mb(e){var o=this,a=Object.values(e).filter(Boolean);return zp(["feature-flags",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getFeatureFlagId(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:a.length>1,useErrorBoundary:!1})}function fb(e){var o=this,a=zp({queryKey:["all-feature-flags",Object.values(e).filter(Boolean)],queryFn:function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.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}),r=Rp();return l((function(){r.setQueryData(["cached-feature-flags"],a)}),[a,r]),a}function gb(e){var t,n,o=Rp(),r=o.getQueryState(["cached-feature-flags"]),i=Boolean(!(null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.status)||"loading"===(null===(n=null==r?void 0:r.data)||void 0===n?void 0:n.status)),s=zp({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 a(a({},s),{isLoading:i})}function yb(e){return zp(["events",e],(function(){return Ed.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 bb(e){return zp(["audit-monitor-event-detail",e],(function(){return Ed.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 kb(e){return zp(["api-logs",e],(function(){return Ed.getInstance().postApiLogs({payload:e}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e.organizationCode,cacheTime:0,useErrorBoundary:!1})}function vb(e){var t=e.params;return zp(["webhook-logs",t],(function(){return Ed.getInstance().postWebhookLogs({payload:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t.organizationCode,cacheTime:0,useErrorBoundary:!1})}function jb(e){return zp(["api-logs-detail",e],(function(){return Ed.getInstance().getApiLogsDetailByPaymentCode(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function wb(e,t){return zp(["fetch-payment-links",e,t],(function(){return Ed.getInstance().getPaymentLinks(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t,cacheTime:0})}function _b(e){return zp(["payment-link"],(function(){return Ed.getInstance().getPaymentLinksByCode(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function Eb(e){return void 0===e&&(e=!0),zp(["countries",e],(function(){return Ed.getInstance().useGetCountriesConfig().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e,keepPreviousData:!0})}function Cb(e){var t=localStorage.getItem("lang")||"en",n=e||t;return zp(["countries-v2",n],(function(){return Ed.getInstance().useGetCountriesConfigV2(n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!0,keepPreviousData:!0})}function Sb(e){return zp(["timezone"],(function(){return Ed.getInstance().getTimezone(e).then((function(e){return sd(e)?dd:null==e?void 0:e.data})).catch((function(){return dd}))}),{enabled:!0,keepPreviousData:!0})}function Rb(e){return zp(["installments-plans",e],(function(){return Ed.getInstance().getInstallmentPlans(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(e),useErrorBoundary:!1})}function xb(e){return Pp((function(e){var t=e.payload;return Ed.getInstance().firebaseUserSubscribe(t)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Tb(e,t){return zp(["get-cofig-allow-list",e],(function(){return Ed.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 Ib(e){return zp(["get-black-list",e],(function(){return Ed.getInstance().getBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!e})}function Ob(e,t,n,o){var a;return zp(["post-black-list",e],(function(){return Ed.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=o?o:25).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:(null===(a=e[0])||void 0===a?void 0:a.length)>0&&null!==t,useErrorBoundary:!1})}function Ab(e,t,n){return zp(["get-block-list-summary",e,t,n],(function(){var o=Ed.getInstance();return n?o.getBlackListSummary(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e})):Promise.resolve({})}),{enabled:!!e&&!!n})}function zb(e,t,n,o,a,r){return zp(["black-list-detail",e,t,o,a,r],(function(){return Ed.getInstance().getBlacklistDetail(e,t,n,o,a).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&r,cacheTime:0})}function Pb(e,t,n){return zp(["allow-list-detail",e],(function(){return Ed.getInstance().getAllowlistDetail(e,t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{enabled:!!e&&!!n})}function Db(e){return zp(["query-post-get-allowlist-multi-account",JSON.stringify(e)],(function(){return Ed.getInstance().postGetAllowlist({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function Lb(e,o){var a=this;return void 0===e&&(e=26),void 0===o&&(o=0),zp(["batch-refunds",e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().getBatchRefunds(e,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))]}))}))}),{cacheTime:0})}function Nb(e){return zp(["velocity-rules",e],(function(){var t=Ed.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 qb(){return zp(["config-rules"],(function(){return Ed.getInstance().getAllConfigRules().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0})}function Mb(e,t){var n=e.organizationCode;return zp(["mfa-excluded-users",n],(function(){return Ed.getInstance().getMFAExcludedUsers({organizationCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function Ub(e,t){var n=e.organizationCode;return zp(["mfa-config",n],(function(){return Ed.getInstance().getMFAConfig({organizationCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function Bb(e,t){return zp(["mfa-enforcement-status",e.accountCode],(function(){return Ed.getInstance().getMFAEnforcementStatus().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function Fb(e){return zp(["fetch-organization-saml-config",e],(function(){return Ed.getInstance().getSamlConfig().then((function(e){return e.data}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Wb(e){return zp(["chartgpt-chart-execute",e],(function(){return Ed.getInstance().executeChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e})}function Hb(){return zp(["chartgpt-user-charts"],(function(){return Ed.getInstance().getChartsByUser().then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})}function Gb(){var e=this;return zp(["chartgpt-user-charts-with-results"],(function(){return t(e,void 0,void 0,(function(){var e,o,r,i=this;return n(this,(function(s){switch(s.label){case 0:return[4,(e=Ed.getInstance()).getChartsByUser()];case 1:return o=s.sent(),r=(null==o?void 0:o.data)||[],[4,Promise.all(r.map((function(o){return t(i,void 0,void 0,(function(){var t,r,i,s,u,c,l,d;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.executeChartGPTChart(o.code)];case 1:return t=n.sent(),[2,a(a({},o),{user_prompt:null!==(s=null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.user_prompt)&&void 0!==s?s:o.user_prompt,unit_to_display:null!==(c=null===(u=null==t?void 0:t.data)||void 0===u?void 0:u.unit_to_display)&&void 0!==c?c:o.unit_to_display,results:null!==(d=null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.results)&&void 0!==d?d:[]})];case 2:return r=n.sent(),console.error("Failed to execute chart ".concat(o.chart_id,":"),r),[2,a(a({},o),{results:[]})];case 3:return[2]}}))}))})))];case 2:return[2,s.sent()]}}))}))}))}function Vb(e,o,a){var r=this;return void 0===a&&(a=!0),zp(["chartgpt-patch-and-execute",e,o],(function(){return t(r,void 0,void 0,(function(){var t,a,r,i,s;return n(this,(function(n){switch(n.label){case 0:return[4,(t=Ed.getInstance()).patchChartGPTChart(e,o)];case 1:return a=n.sent(),r=null==a?void 0:a.data,[4,t.executeChartGPTChart(e)];case 2:return i=n.sent(),s=null==i?void 0:i.data,[2,{chart:r,execution:s}]}}))}))}),{enabled:a&&!!e,retry:!1})}function Kb(){return zp(["languages"],(function(){return Ed.getInstance().getLanguages().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:300})}function $b(){var e=localStorage.getItem("lang")||"en";return zp(["translations",e],(function(){return Ed.getInstance().getTranslations(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:3e4})}function Qb(e){var o=this;return zp({queryKey:["network-tokens-onboarding",e],queryFn:function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Ed.getInstance().getNetworkTokensOnboardingByOrganization(e)];case 1:return[2,t.sent().data]}}))}))},enabled:!!e,useErrorBoundary:!1})}var Jb=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())},Xb=function(e,t,n){if(!t||!n)return e||[];var o=function(e,t){var n=[],o=new Date(e),a=new Date(t);o.setUTCHours(0,0,0,0),a.setUTCHours(0,0,0,0);for(var r=new Date(o);r<=a;)n.push(r.toISOString()),r.setUTCDate(r.getUTCDate()+1);return n}(t,n),a=new Map;return null==e||e.forEach((function(e){if(e.date){var t=new Date(e.date).toISOString().split("T")[0];a.set(t,e.value)}})),o.map((function(e){var t=e.split("T")[0];return{date:e,value:a.get(t)||"0"}}))},Yb=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 o=parseFloat(n.value||"0");return{distribution:n.rows.map((function(e){var t,n=100*parseFloat(e.value),a=Math.round(o*parseFloat(e.value));return{key:(null===(t=e.label)||void 0===t?void 0:t.toUpperCase())||"UNKNOWN",total:a,percentage:n,amount:a}})),total:o}},Zb=function(e,t,n){var o,a={};return null===(o=e.plots)||void 0===o||o.forEach((function(e){var o=Xb(e.rows,t,n),r=e.label;a[r]=o.map((function(e){return{key:e.date||"",total:100*parseFloat(e.value),current_label:Jb(e.date||""),current_amount:100*parseFloat(e.value)}}))})),a},ek=function(e,t,n){var o,a=null===(o=e.plots)||void 0===o?void 0:o[0];return{distribution:Xb(null==a?void 0:a.rows,t,n).map((function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Jb(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==a?void 0:a.value)||"0"),total_amount:parseFloat((null==a?void 0:a.value)||"0")}},tk=function(e,t,n){var o,a=null===(o=e.plots)||void 0===o?void 0:o[0];return{distribution:Xb(null==a?void 0:a.rows,t,n).map((function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Jb(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==a?void 0:a.value)||"0"),total_amount:parseFloat((null==a?void 0:a.value)||"0")}},nk=function(e,o){return zp(a({queryKey:["smart-recovery-communications-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return t=Ed.getInstance(),o={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",o)];case 1:return a=n.sent(),[2,(r=a.data,i=o.start_date,s=o.end_date,u=r.plots||[],c=u.find((function(e){return"TOTAL_COMMUNICATIONS_LABEL"===e.label})),l=u.find((function(e){return"COMPLETED_COMMUNICATIONS_LABEL"===e.label})),d=u.find((function(e){return"CONVERSION_RATE_LABEL"===e.label})),p=Xb(null==c?void 0:c.rows,i,s),h=Xb(null==l?void 0:l.rows,i,s),m=Xb(null==d?void 0:d.rows,i,s),{communications:{distribution:p.map((function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:Jb(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==c?void 0:c.value)||"0")},conversion_rate:{distribution:m.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:Jb(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==l?void 0:l.value)||"0")}})]}var r,i,s,u,c,l,d,p,h,m}))}))},enabled:!!e.organization_code,staleTime:3e5},o))},ok=function(e,o){return zp(a({queryKey:["smart-recovery-communications-by-substatus",e],queryFn:function(){return t(void 0,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return t=Ed.getInstance(),o={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",o)];case 1:return a=n.sent(),[2,Yb(a.data)]}}))}))},enabled:!!e.organization_code,staleTime:3e5},o))},ak=function(e,o){return zp(a({queryKey:["smart-recovery-communications-substatus-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return t=Ed.getInstance(),o={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",o)];case 1:return a=n.sent(),[2,Zb(a.data,o.start_date,o.end_date)]}}))}))},enabled:!!e.organization_code,staleTime:3e5},o))},rk=function(e,o){return zp(a({queryKey:["smart-recovery-recovered-tpv-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return t=Ed.getInstance(),o={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",o)];case 1:return a=n.sent(),[2,ek(a.data,o.start_date,o.end_date)]}}))}))},enabled:!!e.organization_code,staleTime:3e5},o))},ik=function(e,o){return zp(a({queryKey:["smart-recovery-recovered-payments-by-day",e],queryFn:function(){return t(void 0,void 0,void 0,(function(){var t,o,a;return n(this,(function(n){switch(n.label){case 0:return t=Ed.getInstance(),o={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",o)];case 1:return a=n.sent(),[2,tk(a.data,o.start_date,o.end_date)]}}))}))},enabled:!!e.organization_code,staleTime:3e5},o))};function sk(e,o){var a=this;return zp(["POST/template-reporting/templates/search",e],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().searchReportTemplates(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:o,useErrorBoundary:!1,cacheTime:0})}function uk(e,o,a){var r=this;return zp(["POST/template-reporting/template-by-id/search",e,o],(function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().searchReportTemplateById(e,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:a&&!!e,useErrorBoundary:!1,cacheTime:0})}function ck(e,o){var a=this;return zp(["POST/template-reporting/schedules/search",e],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().searchReportSchedules(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:o,useErrorBoundary:!1,cacheTime:0})}function lk(e,o,a){var r=this;return zp(["POST/template-reporting/schedule-by-id/search",e,o],(function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){return[2,Ed.getInstance().searchReportScheduleById(e,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:a&&!!e,useErrorBoundary:!1,cacheTime:0})}function dk(){return dk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},dk.apply(this,arguments)}
|
|
217
217
|
/**
|
|
218
218
|
* match-sorter-utils
|
|
219
219
|
*
|