@yuno-payments/dashboard-api-mfe 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +3 -3
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +3 -3
- package/build/esm/index.js.map +1 -1
- package/package.json +1 -1
package/build/cjs/index.js
CHANGED
|
@@ -47,7 +47,7 @@ statuses/index.js:
|
|
|
47
47
|
*
|
|
48
48
|
* This source code is licensed under the MIT license found in the
|
|
49
49
|
* LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/"production"===process.env.NODE_ENV?Pf.exports=function(){if(Of)return Df;Of=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}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 n=t(),u=r({inst:{value:n,getSnapshot:t}}),c=u[0].inst,l=u[1];return a(function(){c.value=n,c.getSnapshot=t,s(c)&&l({inst:c})},[e,n,t]),o(function(){return s(c)&&l({inst:c}),e(function(){s(c)&&l({inst:c})})},[e]),i(n),n};return Df.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u,Df}():Pf.exports=(Lf||(Lf=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,i=n.useLayoutEffect,s=n.useDebugValue,u=!1,c=!1,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,l){u||void 0===n.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();r(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,f=p[1];return i(function(){h.value=d,h.getSnapshot=l,e(h)&&f({inst:h})},[t,d,l]),a(function(){return e(h)&&f({inst:h}),t(function(){e(h)&&f({inst:h})})},[t]),s(d),d};jf.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),jf);var Nf=Pf.exports;const zf=Nf.useSyncExternalStore,qf=r.createContext(void 0),Uf=r.createContext(!1);function Mf(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=qf),window.ReactQueryClientContext):qf)}const Bf=({context:e}={})=>{const t=r.useContext(Mf(e,r.useContext(Uf)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ff=({client:e,children:t,context:n,contextSharing:o=!1})=>{r.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=Mf(n,o);return r.createElement(Uf.Provider,{value:!n&&o},r.createElement(a.Provider,{value:e},t))},Gf=r.createContext(!1);Gf.Provider;const Vf=r.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function Wf(e,t){return"function"==typeof e?e(...t):!!e}function Hf(e,t){const n=Bf({context:e.context}),o=r.useContext(Gf),a=r.useContext(Vf),i=n.defaultQueryOptions(e);i._optimisticResults=o?"isRestoring":"optimistic",i.onError&&(i.onError=mf.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=mf.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=mf.batchCalls(i.onSettled)),(e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.cacheTime&&(e.cacheTime=Math.max(e.cacheTime,1e3)))})(i),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(i,a),(e=>{r.useEffect(()=>{e.clearReset()},[e])})(a);const[s]=r.useState(()=>new t(n,i)),u=s.getOptimisticResult(i);if(zf(r.useCallback(e=>{const t=o?()=>{}:s.subscribe(mf.batchCalls(e));return s.updateResult(),t},[s,o]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),r.useEffect(()=>{s.setOptions(i,{listeners:!1})},[i,s]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(i,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)}))(i,s,a);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Wf(n,[e.error,r]))({result:u,errorResetBoundary:a,useErrorBoundary:i.useErrorBoundary,query:s.getCurrentQuery()}))throw u.error;return i.notifyOnChangeProps?u:s.trackResult(u)}function Kf(e,t,n){return Hf(Gh(e,t,n),Sf)}function $f(e,t,n){const o=function(e,t,n){return nf(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),a=Bf({context:o.context}),[i]=r.useState(()=>new Af(a,o));r.useEffect(()=>{i.setOptions(o)},[i,o]);const s=zf(r.useCallback(e=>i.subscribe(mf.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=r.useCallback((e,t)=>{i.mutate(e,t).catch(Qf)},[i]);if(s.error&&Wf(i.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}function Qf(){}var Yf;exports.DuplicateSetting=void 0,(Yf=exports.DuplicateSetting||(exports.DuplicateSetting={})).ACCOUNT="ACCOUNT",Yf.CHECKOUT_BUILDER="CHECKOUT_BUILDER",Yf.CONNECTION="CONNECTION",Yf.ROUTING="ROUTING",Yf.RISK_CONDITIONS="RISK_CONDITIONS",Yf.WEBHOOKS="WEBHOOKS";var Jf=function(){var e=t.useState("ON"===localStorage.getItem("isTesting")),n=e[0],r=e[1];return t.useEffect(function(){var e=function(e){"isTesting"===e.key&&r("ON"===e.newValue)};return window.addEventListener("storage",e),function(){window.removeEventListener("storage",e)}},[]),{isTesting:n}},Zf=function(e){var n=localStorage.getItem(e),r=t.useState(n&&JSON.parse(n)),o=r[0],a=r[1];return t.useEffect(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},Xf=function(){var e,t;return null===(t=null===(e=Zf("account"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.organization_code},eg=function(){var e,t=Jf().isTesting,n=null===(e=Zf("account"))||void 0===e?void 0:e.value;return(t?null==n?void 0:n.account_code_testing:null==n?void 0:n.account_code_live)||(null==n?void 0:n.code)};var tg=new bf({}),ng=new class{constructor(e={}){this.queryCache=e.queryCache||new bf,this.mutationCache=e.mutationCache||new wf,this.logger=e.logger||gf,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=sf.subscribe(()=>{sf.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=cf.subscribe(()=>{cf.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]=Vh(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const r=Gh(e,t,n),o=this.getQueryData(r.queryKey);return o?Promise.resolve(o):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const r=this.queryCache.find(e),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==r?void 0:r.state.data);if(void 0===o)return;const a=Gh(e),i=this.defaultQueryOptions(a);return this.queryCache.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return mf.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]=Vh(e,t),r=this.queryCache;mf.batch(()=>{r.findAll(n).forEach(e=>{r.remove(e)})})}resetQueries(e,t,n){const[r,o]=Vh(e,t,n),a=this.queryCache,i={type:"active",...r};return mf.batch(()=>(a.findAll(r).forEach(e=>{e.reset()}),this.refetchQueries(i,o)))}cancelQueries(e,t,n){const[r,o={}]=Vh(e,t,n);void 0===o.revert&&(o.revert=!0);const a=mf.batch(()=>this.queryCache.findAll(r).map(e=>e.cancel(o)));return Promise.all(a).then(Mh).catch(Mh)}invalidateQueries(e,t,n){const[r,o]=Vh(e,t,n);return mf.batch(()=>{var e,t;if(this.queryCache.findAll(r).forEach(e=>{e.invalidate()}),"none"===r.refetchType)return Promise.resolve();const n={...r,type:null!=(e=null!=(t=r.refetchType)?t:r.type)?e:"active"};return this.refetchQueries(n,o)})}refetchQueries(e,t,n){const[r,o]=Vh(e,t,n),a=mf.batch(()=>this.queryCache.findAll(r).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...o,cancelRefetch:null==(t=null==o?void 0:o.cancelRefetch)||t,meta:{refetchPage:r.refetchPage}})}));let i=Promise.all(a).then(Mh);return null!=o&&o.throwOnError||(i=i.catch(Mh)),i}fetchQuery(e,t,n){const r=Gh(e,t,n),o=this.defaultQueryOptions(r);void 0===o.retry&&(o.retry=!1);const a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(Mh).catch(Mh)}fetchInfiniteQuery(e,t,n){const r=Gh(e,t,n);return r.behavior=xf(),this.fetchQuery(r)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(Mh).catch(Mh)}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=>$h(e)===$h(t.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find(t=>Qh(e,t.queryKey));if("production"!==process.env.NODE_ENV){this.queryDefaults.filter(t=>Qh(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=>$h(e)===$h(t.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find(t=>Qh(e,t.mutationKey));if("production"!==process.env.NODE_ENV){this.mutationDefaults.filter(t=>Qh(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=Kh(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:tg});function rg(){return $f(function(e){var t=e.payload;return zh.getInstance().postUserSettings(t)},{onMutate:function(e){return e}})}function og(){return Kf(["fetch-profile"],function(){return zh.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})}var ag="GET/concierge/alerts",ig="GET/concierge/alerts/by-id";var sg;exports.PendingDuplicateAccountStatus=void 0,(sg=exports.PendingDuplicateAccountStatus||(exports.PendingDuplicateAccountStatus={})).IN_PROGRESS="IN_PROGRESS",sg.COMPLETED="COMPLETED",sg.FAILED="FAILED";var ug=function(e){return["checkout-builder-name-and-icon",e.paymentMethodType,e.type]},cg=function(e){return["checkout-builder-required-fields",e.paymentMethodType,e.type]},lg=function(e){return["checkout-payment-method-accounts",e.paymentMethod,e.organizationCode]};var dg={key:"metadata_fields",name:"metadata_fields",unique_key:"metadata_fields"};var pg=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())},hg=function(e,t,n){if(!t||!n)return e||[];var r=function(e,t){var n=[],r=new Date(e),o=new Date(t);r.setUTCHours(0,0,0,0),o.setUTCHours(0,0,0,0);for(var a=new Date(r);a<=o;)n.push(a.toISOString()),a.setUTCDate(a.getUTCDate()+1);return n}(t,n),o=new Map;return null==e||e.forEach(function(e){if(e.date){var t=new Date(e.date).toISOString().split("T")[0];o.set(t,e.value)}}),r.map(function(e){var t=e.split("T")[0];return{date:e,value:o.get(t)||"0"}})},fg=function(e){var t,n=null===(t=e.plots)||void 0===t?void 0:t[0];if(!n||!n.rows)return{distribution:[],total:0};var r=parseFloat(n.value||"0");return{distribution:n.rows.map(function(e){var t,n=100*parseFloat(e.value),o=Math.round(r*parseFloat(e.value));return{key:(null===(t=e.label)||void 0===t?void 0:t.toUpperCase())||"UNKNOWN",total:o,percentage:n,amount:o}}),total:r}},gg=function(e,t,n){var r,o={};return null===(r=e.plots)||void 0===r||r.forEach(function(e){var r=hg(e.rows,t,n),a=e.label;o[a]=r.map(function(e){return{key:e.date||"",total:100*parseFloat(e.value),current_label:pg(e.date||""),current_amount:100*parseFloat(e.value)}})}),o},mg=function(e,t,n){var r,o=null===(r=e.plots)||void 0===r?void 0:r[0];return{distribution:hg(null==o?void 0:o.rows,t,n).map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:pg(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==o?void 0:o.value)||"0"),total_amount:parseFloat((null==o?void 0:o.value)||"0")}},yg=function(e,t,n){var r,o=null===(r=e.plots)||void 0===r?void 0:r[0];return{distribution:hg(null==o?void 0:o.rows,t,n).map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:pg(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==o?void 0:o.value)||"0"),total_amount:parseFloat((null==o?void 0:o.value)||"0")}};function vg(){return vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vg.apply(this,arguments)}
|
|
50
|
+
*/"production"===process.env.NODE_ENV?Pf.exports=function(){if(Of)return Df;Of=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}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 n=t(),u=r({inst:{value:n,getSnapshot:t}}),c=u[0].inst,l=u[1];return a(function(){c.value=n,c.getSnapshot=t,s(c)&&l({inst:c})},[e,n,t]),o(function(){return s(c)&&l({inst:c}),e(function(){s(c)&&l({inst:c})})},[e]),i(n),n};return Df.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u,Df}():Pf.exports=(Lf||(Lf=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,i=n.useLayoutEffect,s=n.useDebugValue,u=!1,c=!1,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,l){u||void 0===n.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();r(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,f=p[1];return i(function(){h.value=d,h.getSnapshot=l,e(h)&&f({inst:h})},[t,d,l]),a(function(){return e(h)&&f({inst:h}),t(function(){e(h)&&f({inst:h})})},[t]),s(d),d};jf.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),jf);var Nf=Pf.exports;const zf=Nf.useSyncExternalStore,qf=r.createContext(void 0),Uf=r.createContext(!1);function Mf(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=qf),window.ReactQueryClientContext):qf)}const Bf=({context:e}={})=>{const t=r.useContext(Mf(e,r.useContext(Uf)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ff=({client:e,children:t,context:n,contextSharing:o=!1})=>{r.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=Mf(n,o);return r.createElement(Uf.Provider,{value:!n&&o},r.createElement(a.Provider,{value:e},t))},Gf=r.createContext(!1);Gf.Provider;const Vf=r.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function Wf(e,t){return"function"==typeof e?e(...t):!!e}function Hf(e,t){const n=Bf({context:e.context}),o=r.useContext(Gf),a=r.useContext(Vf),i=n.defaultQueryOptions(e);i._optimisticResults=o?"isRestoring":"optimistic",i.onError&&(i.onError=mf.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=mf.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=mf.batchCalls(i.onSettled)),(e=>{e.suspense&&("number"!=typeof e.staleTime&&(e.staleTime=1e3),"number"==typeof e.cacheTime&&(e.cacheTime=Math.max(e.cacheTime,1e3)))})(i),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(i,a),(e=>{r.useEffect(()=>{e.clearReset()},[e])})(a);const[s]=r.useState(()=>new t(n,i)),u=s.getOptimisticResult(i);if(zf(r.useCallback(e=>{const t=o?()=>{}:s.subscribe(mf.batchCalls(e));return s.updateResult(),t},[s,o]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),r.useEffect(()=>{s.setOptions(i,{listeners:!1})},[i,s]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(i,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)}))(i,s,a);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Wf(n,[e.error,r]))({result:u,errorResetBoundary:a,useErrorBoundary:i.useErrorBoundary,query:s.getCurrentQuery()}))throw u.error;return i.notifyOnChangeProps?u:s.trackResult(u)}function Kf(e,t,n){return Hf(Gh(e,t,n),Sf)}function $f(e,t,n){const o=function(e,t,n){return nf(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),a=Bf({context:o.context}),[i]=r.useState(()=>new Af(a,o));r.useEffect(()=>{i.setOptions(o)},[i,o]);const s=zf(r.useCallback(e=>i.subscribe(mf.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=r.useCallback((e,t)=>{i.mutate(e,t).catch(Qf)},[i]);if(s.error&&Wf(i.options.useErrorBoundary,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}function Qf(){}var Yf;exports.DuplicateSetting=void 0,(Yf=exports.DuplicateSetting||(exports.DuplicateSetting={})).ACCOUNT="ACCOUNT",Yf.CHECKOUT_BUILDER="CHECKOUT_BUILDER",Yf.CONNECTION="CONNECTION",Yf.ROUTING="ROUTING",Yf.RISK_CONDITIONS="RISK_CONDITIONS",Yf.WEBHOOKS="WEBHOOKS";var Jf=function(){var e=t.useState("ON"===localStorage.getItem("isTesting")),n=e[0],r=e[1];return t.useEffect(function(){var e=function(e){"isTesting"===e.key&&r("ON"===e.newValue)};return window.addEventListener("storage",e),function(){window.removeEventListener("storage",e)}},[]),{isTesting:n}},Zf=function(e){var n=localStorage.getItem(e),r=t.useState(n&&JSON.parse(n)),o=r[0],a=r[1];return t.useEffect(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},Xf=function(){var e,t;return null===(t=null===(e=Zf("account"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.organization_code},eg=function(){var e,t=Jf().isTesting,n=null===(e=Zf("account"))||void 0===e?void 0:e.value;return(t?null==n?void 0:n.account_code_testing:null==n?void 0:n.account_code_live)||(null==n?void 0:n.code)};var tg=new bf({}),ng=new class{constructor(e={}){this.queryCache=e.queryCache||new bf,this.mutationCache=e.mutationCache||new wf,this.logger=e.logger||gf,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=sf.subscribe(()=>{sf.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=cf.subscribe(()=>{cf.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]=Vh(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const r=Gh(e,t,n),o=this.getQueryData(r.queryKey);return o?Promise.resolve(o):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const r=this.queryCache.find(e),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==r?void 0:r.state.data);if(void 0===o)return;const a=Gh(e),i=this.defaultQueryOptions(a);return this.queryCache.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return mf.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]=Vh(e,t),r=this.queryCache;mf.batch(()=>{r.findAll(n).forEach(e=>{r.remove(e)})})}resetQueries(e,t,n){const[r,o]=Vh(e,t,n),a=this.queryCache,i={type:"active",...r};return mf.batch(()=>(a.findAll(r).forEach(e=>{e.reset()}),this.refetchQueries(i,o)))}cancelQueries(e,t,n){const[r,o={}]=Vh(e,t,n);void 0===o.revert&&(o.revert=!0);const a=mf.batch(()=>this.queryCache.findAll(r).map(e=>e.cancel(o)));return Promise.all(a).then(Mh).catch(Mh)}invalidateQueries(e,t,n){const[r,o]=Vh(e,t,n);return mf.batch(()=>{var e,t;if(this.queryCache.findAll(r).forEach(e=>{e.invalidate()}),"none"===r.refetchType)return Promise.resolve();const n={...r,type:null!=(e=null!=(t=r.refetchType)?t:r.type)?e:"active"};return this.refetchQueries(n,o)})}refetchQueries(e,t,n){const[r,o]=Vh(e,t,n),a=mf.batch(()=>this.queryCache.findAll(r).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...o,cancelRefetch:null==(t=null==o?void 0:o.cancelRefetch)||t,meta:{refetchPage:r.refetchPage}})}));let i=Promise.all(a).then(Mh);return null!=o&&o.throwOnError||(i=i.catch(Mh)),i}fetchQuery(e,t,n){const r=Gh(e,t,n),o=this.defaultQueryOptions(r);void 0===o.retry&&(o.retry=!1);const a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(Mh).catch(Mh)}fetchInfiniteQuery(e,t,n){const r=Gh(e,t,n);return r.behavior=xf(),this.fetchQuery(r)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(Mh).catch(Mh)}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=>$h(e)===$h(t.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find(t=>Qh(e,t.queryKey));if("production"!==process.env.NODE_ENV){this.queryDefaults.filter(t=>Qh(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=>$h(e)===$h(t.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find(t=>Qh(e,t.mutationKey));if("production"!==process.env.NODE_ENV){this.mutationDefaults.filter(t=>Qh(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=Kh(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:tg});function rg(){return $f(function(e){var t=e.payload;return zh.getInstance().postUserSettings(t)},{onMutate:function(e){return e}})}function og(){return Kf(["fetch-profile"],function(){return zh.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})}var ag=["fetch-profile"];var ig="GET/concierge/alerts",sg="GET/concierge/alerts/by-id";var ug;exports.PendingDuplicateAccountStatus=void 0,(ug=exports.PendingDuplicateAccountStatus||(exports.PendingDuplicateAccountStatus={})).IN_PROGRESS="IN_PROGRESS",ug.COMPLETED="COMPLETED",ug.FAILED="FAILED";var cg=function(e){return["checkout-builder-name-and-icon",e.paymentMethodType,e.type]},lg=function(e){return["checkout-builder-required-fields",e.paymentMethodType,e.type]},dg=function(e){return["checkout-payment-method-accounts",e.paymentMethod,e.organizationCode]};var pg={key:"metadata_fields",name:"metadata_fields",unique_key:"metadata_fields"};var hg=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())},fg=function(e,t,n){if(!t||!n)return e||[];var r=function(e,t){var n=[],r=new Date(e),o=new Date(t);r.setUTCHours(0,0,0,0),o.setUTCHours(0,0,0,0);for(var a=new Date(r);a<=o;)n.push(a.toISOString()),a.setUTCDate(a.getUTCDate()+1);return n}(t,n),o=new Map;return null==e||e.forEach(function(e){if(e.date){var t=new Date(e.date).toISOString().split("T")[0];o.set(t,e.value)}}),r.map(function(e){var t=e.split("T")[0];return{date:e,value:o.get(t)||"0"}})},gg=function(e){var t,n=null===(t=e.plots)||void 0===t?void 0:t[0];if(!n||!n.rows)return{distribution:[],total:0};var r=parseFloat(n.value||"0");return{distribution:n.rows.map(function(e){var t,n=100*parseFloat(e.value),o=Math.round(r*parseFloat(e.value));return{key:(null===(t=e.label)||void 0===t?void 0:t.toUpperCase())||"UNKNOWN",total:o,percentage:n,amount:o}}),total:r}},mg=function(e,t,n){var r,o={};return null===(r=e.plots)||void 0===r||r.forEach(function(e){var r=fg(e.rows,t,n),a=e.label;o[a]=r.map(function(e){return{key:e.date||"",total:100*parseFloat(e.value),current_label:hg(e.date||""),current_amount:100*parseFloat(e.value)}})}),o},yg=function(e,t,n){var r,o=null===(r=e.plots)||void 0===r?void 0:r[0];return{distribution:fg(null==o?void 0:o.rows,t,n).map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:hg(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==o?void 0:o.value)||"0"),total_amount:parseFloat((null==o?void 0:o.value)||"0")}},vg=function(e,t,n){var r,o=null===(r=e.plots)||void 0===r?void 0:r[0];return{distribution:fg(null==o?void 0:o.rows,t,n).map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:hg(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==o?void 0:o.value)||"0"),total_amount:parseFloat((null==o?void 0:o.value)||"0")}};function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bg.apply(this,arguments)}
|
|
51
51
|
/**
|
|
52
52
|
* match-sorter-utils
|
|
53
53
|
*
|
|
@@ -57,12 +57,12 @@ statuses/index.js:
|
|
|
57
57
|
* LICENSE.md file in the root directory of this source tree.
|
|
58
58
|
*
|
|
59
59
|
* @license MIT
|
|
60
|
-
*/const
|
|
60
|
+
*/const _g={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z"},kg=Object.keys(_g).join("|"),wg=new RegExp(kg,"g");
|
|
61
61
|
/**
|
|
62
62
|
* @name match-sorter
|
|
63
63
|
* @license MIT license.
|
|
64
64
|
* @copyright (c) 2099 Kent C. Dodds
|
|
65
65
|
* @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
|
|
66
66
|
*/
|
|
67
|
-
const wg=7,xg=6,Eg=5,Sg=4,Cg=3,Rg=2,Ig=1,Tg=0;function Ag(e,t,n){var r;if((n=n||{}).threshold=null!=(r=n.threshold)?r:Ig,!n.accessors){const r=Og(e,t,n);return{rankedValue:e,rank:r,accessorIndex:-1,accessorThreshold:n.threshold,passed:r>=n.threshold}}const o=function(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const o=t[r],a=jg(o),i=Dg(e,o);for(let e=0,t=i.length;e<t;e++)n.push({itemValue:i[e],attributes:a})}return n}(e,n.accessors),a={rankedValue:e,rank:Tg,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let e=0;e<o.length;e++){const r=o[e];let i=Og(r.itemValue,t,n);const{minRanking:s,maxRanking:u,threshold:c=n.threshold}=r.attributes;i<s&&i>=Ig?i=s:i>u&&(i=u),i=Math.min(i,u),i>=c&&i>a.rank&&(a.rank=i,a.passed=!0,a.accessorIndex=e,a.accessorThreshold=c,a.rankedValue=r.itemValue)}return a}function Og(e,t,n){return e=Pg(e,n),(t=Pg(t,n)).length>e.length?Tg:e===t?wg:(e=e.toLowerCase())===(t=t.toLowerCase())?xg:e.startsWith(t)?Eg:e.includes(` ${t}`)?Sg:e.includes(t)?Cg:1===t.length?Tg:function(e){let t="";return e.split(" ").forEach(e=>{e.split("-").forEach(e=>{t+=e.substr(0,1)})}),t}(e).includes(t)?Rg:function(e,t){let n=0,r=0;function o(e,t,r){for(let o=r,a=t.length;o<a;o++){if(t[o]===e)return n+=1,o+1}return-1}function a(e){const r=1/e,o=n/t.length;return Ig+o*r}const i=o(t[0],e,0);if(i<0)return Tg;r=i;for(let n=1,a=t.length;n<a;n++){r=o(t[n],e,r);if(!(r>-1))return Tg}const s=r-i;return a(s)}(e,t)}function Pg(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=e.replace(kg,e=>bg[e])),e}function Dg(e,t){let n=t;"object"==typeof t&&(n=t.accessor);const r=n(e);return null==r?[]:Array.isArray(r)?r:[String(r)]}const Lg={maxRanking:1/0,minRanking:-1/0};function jg(e){return"function"==typeof e?Lg:{...Lg,...e}}function Ng(e,t){const[n,o]=r.useState();r.useEffect(()=>{const n=(e=>{try{const t=localStorage.getItem(e);return"string"==typeof t?JSON.parse(t):void 0}catch{return}})(e);o(null==n?"function"==typeof t?t():t:n)},[t,e]);return[n,r.useCallback(t=>{o(n=>{let r=t;"function"==typeof t&&(r=t(n));try{localStorage.setItem(e,JSON.stringify(r))}catch{}return r})},[e])]}var zg,qg=function(){function e(){this.keyToValue=new Map,this.valueToKey=new Map}return e.prototype.set=function(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)},e.prototype.getByKey=function(e){return this.keyToValue.get(e)},e.prototype.getByValue=function(e){return this.valueToKey.get(e)},e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},e}(),Ug=function(){function e(e){this.generateIdentifier=e,this.kv=new qg}return e.prototype.register=function(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))},e.prototype.clear=function(){this.kv.clear()},e.prototype.getIdentifier=function(e){return this.kv.getByValue(e)},e.prototype.getValue=function(e){return this.kv.getByKey(e)},e}(),Mg=(zg=function(e,t){return zg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},zg(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}zg(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Bg=function(e){function t(){var t=e.call(this,function(e){return e.name})||this;return t.classToAllowedProps=new Map,t}return Mg(t,e),t.prototype.register=function(t,n){"object"==typeof n?(n.allowProps&&this.classToAllowedProps.set(t,n.allowProps),e.prototype.register.call(this,t,n.identifier)):e.prototype.register.call(this,t,n)},t.prototype.getAllowedProps=function(e){return this.classToAllowedProps.get(e)},t}(Ug),Fg=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i};function Gg(e,t){var n=function(e){if("values"in Object)return Object.values(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}(e);if("find"in n)return n.find(t);for(var r=n,o=0;o<r.length;o++){var a=r[o];if(t(a))return a}}function Vg(e,t){Object.entries(e).forEach(function(e){var n=Fg(e,2),r=n[0],o=n[1];return t(o,r)})}function Wg(e,t){return-1!==e.indexOf(t)}function Hg(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t(r))return r}}var Kg=function(){function e(){this.transfomers={}}return e.prototype.register=function(e){this.transfomers[e.name]=e},e.prototype.findApplicable=function(e){return Gg(this.transfomers,function(t){return t.isApplicable(e)})},e.prototype.findByName=function(e){return this.transfomers[e]},e}(),$g=function(e){return void 0===e},Qg=function(e){return"object"==typeof e&&null!==e&&(e!==Object.prototype&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype))},Yg=function(e){return Qg(e)&&0===Object.keys(e).length},Jg=function(e){return Array.isArray(e)},Zg=function(e){return e instanceof Map},Xg=function(e){return e instanceof Set},em=function(e){return"Symbol"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)},tm=function(e){return"number"==typeof e&&isNaN(e)},nm=function(e){return function(e){return"boolean"==typeof e}(e)||function(e){return null===e}(e)||$g(e)||function(e){return"number"==typeof e&&!isNaN(e)}(e)||function(e){return"string"==typeof e}(e)||em(e)},rm=function(e){return e.replace(/\./g,"\\.")},om=function(e){return e.map(String).map(rm).join(".")},am=function(e){for(var t=[],n="",r=0;r<e.length;r++){var o=e.charAt(r);if("\\"===o&&"."===e.charAt(r+1))n+=".",r++;else"."===o?(t.push(n),n=""):n+=o}var a=n;return t.push(a),t},im=function(){return im=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},im.apply(this,arguments)},sm=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},um=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};function cm(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var lm=[cm($g,"undefined",function(){return null},function(){}),cm(function(e){return"bigint"==typeof e},"bigint",function(e){return e.toString()},function(e){return"undefined"!=typeof BigInt?BigInt(e):(console.error("Please add a BigInt polyfill."),e)}),cm(function(e){return e instanceof Date&&!isNaN(e.valueOf())},"Date",function(e){return e.toISOString()},function(e){return new Date(e)}),cm(function(e){return e instanceof Error},"Error",function(e,t){var n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(function(t){n[t]=e[t]}),n},function(e,t){var n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(function(t){n[t]=e[t]}),n}),cm(function(e){return e instanceof RegExp},"regexp",function(e){return""+e},function(e){var t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),cm(Xg,"set",function(e){return um([],sm(e.values()))},function(e){return new Set(e)}),cm(Zg,"map",function(e){return um([],sm(e.entries()))},function(e){return new Map(e)}),cm(function(e){return tm(e)||((t=e)===1/0||t===-1/0);var t},"number",function(e){return tm(e)?"NaN":e>0?"Infinity":"-Infinity"},Number),cm(function(e){return 0===e&&1/e==-1/0},"number",function(){return"-0"},Number),cm(function(e){return e instanceof URL},"URL",function(e){return e.toString()},function(e){return new URL(e)})];function dm(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var pm=dm(function(e,t){return!!em(e)&&!!t.symbolRegistry.getIdentifier(e)},function(e,t){return["symbol",t.symbolRegistry.getIdentifier(e)]},function(e){return e.description},function(e,t,n){var r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),hm=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),fm=dm(function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},function(e){return["typed-array",e.constructor.name]},function(e){return um([],sm(e))},function(e,t){var n=hm[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function gm(e,t){return!!(null==e?void 0:e.constructor)&&!!t.classRegistry.getIdentifier(e.constructor)}var mm=dm(gm,function(e,t){return["class",t.classRegistry.getIdentifier(e.constructor)]},function(e,t){var n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return im({},e);var r={};return n.forEach(function(t){r[t]=e[t]}),r},function(e,t,n){var r=n.classRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(r.prototype),e)}),ym=dm(function(e,t){return!!t.customTransformerRegistry.findApplicable(e)},function(e,t){return["custom",t.customTransformerRegistry.findApplicable(e).name]},function(e,t){return t.customTransformerRegistry.findApplicable(e).serialize(e)},function(e,t,n){var r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),vm=[mm,pm,ym,fm],bm=function(e,t){var n=Hg(vm,function(n){return n.isApplicable(e,t)});if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};var r=Hg(lm,function(n){return n.isApplicable(e,t)});return r?{value:r.transform(e,t),type:r.annotation}:void 0},_m={};lm.forEach(function(e){_m[e.annotation]=e});var km=function(e,t){for(var n=e.keys();t>0;)n.next(),t--;return n.next().value};function wm(e){if(Wg(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Wg(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Wg(e,"constructor"))throw new Error("constructor is not allowed as a property")}var xm=function(e,t,n){if(wm(t),0===t.length)return n(e);for(var r=e,o=0;o<t.length-1;o++){var a=t[o];if(Jg(r))r=r[+a];else if(Qg(r))r=r[a];else if(Xg(r)){r=km(r,i=+a)}else if(Zg(r)){if(o===t.length-2)break;var i=+a,s=0===+t[++o]?"key":"value",u=km(r,i);switch(s){case"key":r=u;break;case"value":r=r.get(u)}}}var c=t[t.length-1];if(Jg(r)?r[+c]=n(r[+c]):Qg(r)&&(r[c]=n(r[c])),Xg(r)){var l=km(r,+c),d=n(l);l!==d&&(r.delete(l),r.add(d))}if(Zg(r)){i=+t[t.length-2];var p=km(r,i);switch(s=0===+c?"key":"value"){case"key":var h=n(p);r.set(h,r.get(p)),h!==p&&r.delete(p);break;case"value":r.set(p,n(r.get(p)))}}return e},Em=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},Sm=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};function Cm(e,t,n){if(void 0===n&&(n=[]),e)if(Jg(e)){var r=Em(e,2),o=r[0],a=r[1];a&&Vg(a,function(e,r){Cm(e,t,Sm(Sm([],Em(n)),Em(am(r))))}),t(o,n)}else Vg(e,function(e,r){return Cm(e,t,Sm(Sm([],Em(n)),Em(am(r))))})}function Rm(e,t,n){return Cm(t,function(t,r){e=xm(e,r,function(e){return function(e,t,n){if(!Jg(t)){var r=_m[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}switch(t[0]){case"symbol":return pm.untransform(e,t,n);case"class":return mm.untransform(e,t,n);case"custom":return ym.untransform(e,t,n);case"typed-array":return fm.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}}(e,t,n)})}),e}function Im(e,t){function n(t,n){var r=function(e,t){wm(t);for(var n=0;n<t.length;n++){var r=t[n];if(Xg(e))e=km(e,+r);else if(Zg(e)){var o=+r,a=0===+t[++n]?"key":"value",i=km(e,o);switch(a){case"key":e=i;break;case"value":e=e.get(i)}}else e=e[r]}return e}(e,am(n));t.map(am).forEach(function(t){e=xm(e,t,function(){return r})})}if(Jg(t)){var r=Em(t,2),o=r[0],a=r[1];o.forEach(function(t){e=xm(e,am(t),function(){return e})}),a&&Vg(a,n)}else Vg(t,n);return e}var Tm=function(e,t,n,r,o,a,i){var s;void 0===o&&(o=[]),void 0===a&&(a=[]),void 0===i&&(i=new Map);var u=nm(e);if(!u){!function(e,t,n){var r=n.get(e);r?r.push(t):n.set(e,[t])}(e,o,t);var c=i.get(e);if(c)return r?{transformedValue:null}:c}if(!function(e,t){return Qg(e)||Jg(e)||Zg(e)||Xg(e)||gm(e,t)}(e,n)){var l=bm(e,n),d=l?{transformedValue:l.value,annotations:[l.type]}:{transformedValue:e};return u||i.set(e,d),d}if(Wg(a,e))return{transformedValue:null};var p=bm(e,n),h=null!==(s=null==p?void 0:p.value)&&void 0!==s?s:e,f=Jg(h)?[]:{},g={};Vg(h,function(s,u){var c=Tm(s,t,n,r,Sm(Sm([],Em(o)),[u]),Sm(Sm([],Em(a)),[e]),i);f[u]=c.transformedValue,Jg(c.annotations)?g[u]=c.annotations:Qg(c.annotations)&&Vg(c.annotations,function(e,t){g[rm(u)+"."+t]=e})});var m=Yg(g)?{transformedValue:f,annotations:p?[p.type]:void 0}:{transformedValue:f,annotations:p?[p.type,g]:g};return u||i.set(e,m),m};function Am(e){return Object.prototype.toString.call(e).slice(8,-1)}function Om(e){return"Array"===Am(e)}function Pm(e,t={}){if(Om(e))return e.map(e=>Pm(e,t));if(!function(e){if("Object"!==Am(e))return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}(e))return e;return[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].reduce((n,r)=>{if(Om(t.props)&&!t.props.includes(r))return n;return function(e,t,n,r,o){const a={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";"enumerable"===a&&(e[t]=n),o&&"nonenumerable"===a&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}(n,r,Pm(e[r],t),e,t.nonenumerable),n},{})}var Dm=function(){return Dm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Dm.apply(this,arguments)},Lm=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},jm=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},Nm=function(){function e(e){var t=(void 0===e?{}:e).dedupe,n=void 0!==t&&t;this.classRegistry=new Bg,this.symbolRegistry=new Ug(function(e){var t;return null!==(t=e.description)&&void 0!==t?t:""}),this.customTransformerRegistry=new Kg,this.allowedErrorProps=[],this.dedupe=n}return e.prototype.serialize=function(e){var t=new Map,n=Tm(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta=Dm(Dm({},r.meta),{values:n.annotations}));var o,a,i,s,u=(o=t,a=this.dedupe,i={},s=void 0,o.forEach(function(e){if(!(e.length<=1)){a||(e=e.map(function(e){return e.map(String)}).sort(function(e,t){return e.length-t.length}));var t=Em(e),n=t[0],r=t.slice(1);0===n.length?s=r.map(om):i[om(n)]=r.map(om)}}),s?Yg(i)?[s]:[s,i]:Yg(i)?void 0:i);return u&&(r.meta=Dm(Dm({},r.meta),{referentialEqualities:u})),r},e.prototype.deserialize=function(e){var t=e.json,n=e.meta,r=Pm(t);return(null==n?void 0:n.values)&&(r=Rm(r,n.values,this)),(null==n?void 0:n.referentialEqualities)&&(r=Im(r,n.referentialEqualities)),r},e.prototype.stringify=function(e){return JSON.stringify(this.serialize(e))},e.prototype.parse=function(e){return this.deserialize(JSON.parse(e))},e.prototype.registerClass=function(e,t){this.classRegistry.register(e,t)},e.prototype.registerSymbol=function(e,t){this.symbolRegistry.register(e,t)},e.prototype.registerCustom=function(e,t){this.customTransformerRegistry.register(Dm({name:t},e))},e.prototype.allowErrorProps=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];(e=this.allowedErrorProps).push.apply(e,jm([],Lm(t)))},e.defaultInstance=new e,e.serialize=e.defaultInstance.serialize.bind(e.defaultInstance),e.deserialize=e.defaultInstance.deserialize.bind(e.defaultInstance),e.stringify=e.defaultInstance.stringify.bind(e.defaultInstance),e.parse=e.defaultInstance.parse.bind(e.defaultInstance),e.registerClass=e.defaultInstance.registerClass.bind(e.defaultInstance),e.registerSymbol=e.defaultInstance.registerSymbol.bind(e.defaultInstance),e.registerCustom=e.defaultInstance.registerCustom.bind(e.defaultInstance),e.allowErrorProps=e.defaultInstance.allowErrorProps.bind(e.defaultInstance),e}();const zm={background:"#0b1521",backgroundAlt:"#132337",foreground:"white",gray:"#3f4e60",grayAlt:"#222e3e",inputBackgroundColor:"#fff",inputTextColor:"#000",success:"#00ab52",danger:"#ff0085",active:"#006bff",paused:"#8c49eb",warning:"#ffb200"},qm=r.createContext(zm);function Um({theme:e,...t}){return r.createElement(qm.Provider,vg({value:e},t))}function Mm({queryState:e,observerCount:t,isStale:n,theme:r}){return"fetching"===e.fetchStatus?r.active:t?"paused"===e.fetchStatus?r.paused:n?r.warning:r.success:r.gray}function Bm(e){return"fetching"===e.state.fetchStatus?"fetching":e.getObserversCount()?"paused"===e.state.fetchStatus?"paused":e.isStale()?"stale":"fresh":"inactive"}function Fm(e,t,n={}){return r.forwardRef(({style:o,...a},i)=>{const s=r.useContext(qm),u=Object.entries(n).reduce((e,[t,n])=>function(e){const[t,n]=r.useState(()=>{if("undefined"!=typeof window)return window.matchMedia(e).matches});return r.useEffect(()=>{if("undefined"!=typeof window){const t=window.matchMedia(e),r=({matches:e})=>n(e);return t.addListener(r),()=>{t.removeListener(r)}}},[t,e,n]),t}(t)?{...e,..."function"==typeof n?n(a,s):n}:e,{});return r.createElement(e,{...a,style:{..."function"==typeof t?t(a,s):t,...o,...u},ref:i})})}const Gm=(e,t=!1)=>{const{json:n}=Nm.serialize(e);return JSON.stringify(n,null,t?2:void 0)},Vm=e=>"idle"!==e.state.fetchStatus?0:e.getObserversCount()?e.isStale()?2:1:3,Wm=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,Hm={"Status > Last Updated":(e,t)=>Vm(e)===Vm(t)?Wm(e,t):Vm(e)>Vm(t)?1:-1,"Query Hash":(e,t)=>e.queryHash.localeCompare(t.queryHash),"Last Updated":Wm},Km=500,$m={top:"bottom",bottom:"top",left:"right",right:"left"};function Qm(e){return["left","right"].includes(e)}function Ym(e){return $m[e]}function Jm(e,t){return""+e+(t.charAt(0).toUpperCase()+t.slice(1))}function Zm(e="bottom"){const t=Qm(e),n=Ym(e),r=Jm("margin",n);return{position:"absolute",cursor:t?"col-resize":"row-resize",zIndex:1e5,[n]:0,[r]:"-4px",...t?{top:0,height:"100%",width:"4px"}:{width:"100%",height:"4px"}}}const Xm=Fm("div",(e,t)=>({fontSize:"clamp(12px, 1.5vw, 14px)",fontFamily:"sans-serif",display:"flex",backgroundColor:t.background,color:t.foreground}),{"(max-width: 700px)":{flexDirection:"column"},"(max-width: 600px)":{fontSize:".9em"}}),ey=Fm("div",()=>({flex:"1 1 500px",display:"flex",flexDirection:"column",overflow:"auto",height:"100%"}),{"(max-width: 700px)":(e,t)=>({borderTop:"2px solid "+t.gray})}),ty=Fm("button",(e,t)=>({appearance:"none",fontSize:".9em",fontWeight:"bold",background:t.gray,border:"0",borderRadius:".3em",color:"white",padding:".5em",opacity:e.disabled?".5":void 0,cursor:"pointer"})),ny=Fm("span",{display:"flex",flexWrap:"wrap",gap:"0.5em",fontSize:"0.9em"}),ry=Fm("span",{display:"inline-flex",alignItems:"center",padding:".2em .4em",fontWeight:"bold",textShadow:"0 0 10px black",borderRadius:".2em"}),oy=Fm("code",{fontSize:".9em",color:"inherit",background:"inherit"}),ay=Fm("input",(e,t)=>({backgroundColor:t.inputBackgroundColor,border:0,borderRadius:".2em",color:t.inputTextColor,fontSize:".9em",lineHeight:"1.3",padding:".3em .4em"})),iy=Fm("select",(e,t)=>({display:"inline-block",fontSize:".9em",fontFamily:"sans-serif",fontWeight:"normal",lineHeight:"1.3",padding:".3em 1.5em .3em .5em",height:"auto",border:0,borderRadius:".2em",appearance:"none",WebkitAppearance:"none",backgroundColor:t.inputBackgroundColor,backgroundImage:"url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23444444'><polygon points='0,25 100,25 50,75'/></svg>\")",backgroundRepeat:"no-repeat",backgroundPosition:"right .55em center",backgroundSize:".65em auto, 100%",color:t.inputTextColor}),{"(max-width: 500px)":{display:"none"}});function sy({text:e}){return r.createElement("span",{style:{position:"absolute",width:"0.1px",height:"0.1px",overflow:"hidden"}},e)}const uy=Fm("div",{fontFamily:"Menlo, monospace",fontSize:"1em",lineHeight:"1.7",outline:"none",wordBreak:"break-word"}),cy=Fm("span",{color:"white"}),ly=Fm("button",{cursor:"pointer",color:"white"}),dy=Fm("button",{cursor:"pointer",color:"inherit",font:"inherit",outline:"inherit",background:"transparent",border:"none",padding:0}),py=({value:e})=>{const[t,n]=r.useState("NoCopy");return r.createElement("button",{onClick:"NoCopy"===t?()=>{navigator.clipboard.writeText(Nm.stringify(e)).then(()=>{n("SuccessCopy"),setTimeout(()=>{n("NoCopy")},1500)},e=>{console.error("Failed to copy: ",e),n("ErrorCopy"),setTimeout(()=>{n("NoCopy")},1500)})}:void 0,style:{cursor:"pointer",color:"inherit",font:"inherit",outline:"inherit",background:"transparent",border:"none",padding:0}},"NoCopy"===t?r.createElement(yy,null):"SuccessCopy"===t?r.createElement(by,null):r.createElement(vy,null))},hy=Fm("span",(e,t)=>({color:t.danger})),fy=Fm("div",{marginLeft:".1em",paddingLeft:"1em",borderLeft:"2px solid rgba(0,0,0,.15)"}),gy=Fm("span",{color:"grey",fontSize:".7em"}),my=({expanded:e,style:t={}})=>r.createElement("span",{style:{display:"inline-block",transition:"all .1s ease",transform:"rotate("+(e?90:0)+"deg) "+(t.transform||""),...t}},"▶"),yy=()=>r.createElement("span",{"aria-label":"Copy object to clipboard",title:"Copy object to clipboard",style:{paddingLeft:"1em"}},r.createElement("svg",{height:"12",viewBox:"0 0 16 12",width:"10"},r.createElement("path",{fill:"currentColor",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"}),r.createElement("path",{fill:"currentColor",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"}))),vy=()=>r.createElement("span",{"aria-label":"Failed copying to clipboard",title:"Failed copying to clipboard",style:{paddingLeft:"1em",display:"flex",alignItems:"center"}},r.createElement("svg",{height:"12",viewBox:"0 0 16 12",width:"10",display:"block"},r.createElement("path",{fill:"red",d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})),r.createElement("span",{style:{color:"red",fontSize:"12px",paddingLeft:"4px",position:"relative",top:"2px"}},"See console")),by=()=>r.createElement("span",{"aria-label":"Object copied to clipboard",title:"Object copied to clipboard",style:{paddingLeft:"1em",display:"inline-block",verticalAlign:"middle"}},r.createElement("svg",{height:"16",viewBox:"0 0 16 16",width:"16",display:"block"},r.createElement("path",{fill:"green",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"})));const _y=({handleEntry:e,label:t,value:n,subEntries:o=[],subEntryPages:a=[],type:i,expanded:s=!1,copyable:u=!1,toggleExpanded:c,pageSize:l})=>{const[d,p]=r.useState([]);return r.createElement(uy,{key:t},a.length?r.createElement(r.Fragment,null,r.createElement(dy,{onClick:()=>c()},r.createElement(my,{expanded:s})," ",t," ",r.createElement(gy,null,"iterable"===String(i).toLowerCase()?"(Iterable) ":"",o.length," ",o.length>1?"items":"item")),u?r.createElement(py,{value:n}):null,s?1===a.length?r.createElement(fy,null,o.map(e)):r.createElement(fy,null,a.map((t,n)=>r.createElement("div",{key:n},r.createElement(uy,null,r.createElement(ly,{onClick:()=>p(e=>e.includes(n)?e.filter(e=>e!==n):[...e,n])},r.createElement(my,{expanded:s})," [",n*l," ..."," ",n*l+l-1,"]"),d.includes(n)?r.createElement(fy,null,t.map(e)):null)))):null):r.createElement(r.Fragment,null,r.createElement(cy,null,t,":")," ",r.createElement(hy,null,Gm(n))))};function ky({value:e,defaultExpanded:t,renderer:n=_y,pageSize:o=100,copyable:a=!1,...i}){const[s,u]=r.useState(Boolean(t)),c=r.useCallback(()=>u(e=>!e),[]);let l=typeof e,d=[];const p=e=>{const n=!0===t?{[e.label]:!0}:null==t?void 0:t[e.label];return{...e,defaultExpanded:n}};var h;Array.isArray(e)?(l="array",d=e.map((e,t)=>p({label:t.toString(),value:e}))):null!==e&&"object"==typeof e&&(h=e,Symbol.iterator in h)&&"function"==typeof e[Symbol.iterator]?(l="Iterable",d=Array.from(e,(e,t)=>p({label:t.toString(),value:e}))):"object"==typeof e&&null!==e&&(l="object",d=Object.entries(e).map(([e,t])=>p({label:e,value:t})));const f=function(e,t){if(t<1)return[];let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r}(d,o);return n({handleEntry:t=>r.createElement(ky,vg({key:t.label,value:e,renderer:n,copyable:a},i,t)),type:l,subEntries:d,subEntryPages:f,value:e,expanded:s,copyable:a,toggleExpanded:c,pageSize:o,...i})}function wy(e){return r.createElement("svg",vg({width:"40px",height:"40px",viewBox:"0 0 190 190",version:"1.1"},e),r.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},r.createElement("g",{transform:"translate(-33.000000, 0.000000)"},r.createElement("path",{d:"M72.7239712,61.3436237 C69.631224,46.362877 68.9675112,34.8727722 70.9666331,26.5293551 C72.1555965,21.5671678 74.3293088,17.5190846 77.6346064,14.5984631 C81.1241394,11.5150478 85.5360327,10.0020122 90.493257,10.0020122 C98.6712013,10.0020122 107.26826,13.7273214 116.455725,20.8044264 C120.20312,23.6910458 124.092437,27.170411 128.131651,31.2444746 C128.45314,30.8310265 128.816542,30.4410453 129.22143,30.0806152 C140.64098,19.9149716 150.255245,13.5989272 158.478408,11.1636507 C163.367899,9.715636 167.958526,9.57768202 172.138936,10.983031 C176.551631,12.4664684 180.06766,15.5329489 182.548314,19.8281091 C186.642288,26.9166735 187.721918,36.2310983 186.195595,47.7320243 C185.573451,52.4199112 184.50985,57.5263831 183.007094,63.0593153 C183.574045,63.1277086 184.142416,63.2532808 184.705041,63.4395297 C199.193932,68.2358678 209.453582,73.3937462 215.665021,79.2882839 C219.360669,82.7953831 221.773972,86.6998434 222.646365,91.0218204 C223.567176,95.5836746 222.669313,100.159332 220.191548,104.451297 C216.105211,111.529614 208.591643,117.11221 197.887587,121.534031 C193.589552,123.309539 188.726579,124.917559 183.293259,126.363748 C183.541176,126.92292 183.733521,127.516759 183.862138,128.139758 C186.954886,143.120505 187.618598,154.61061 185.619477,162.954027 C184.430513,167.916214 182.256801,171.964297 178.951503,174.884919 C175.46197,177.968334 171.050077,179.48137 166.092853,179.48137 C157.914908,179.48137 149.31785,175.756061 140.130385,168.678956 C136.343104,165.761613 132.410866,162.238839 128.325434,158.108619 C127.905075,158.765474 127.388968,159.376011 126.77857,159.919385 C115.35902,170.085028 105.744755,176.401073 97.5215915,178.836349 C92.6321009,180.284364 88.0414736,180.422318 83.8610636,179.016969 C79.4483686,177.533532 75.9323404,174.467051 73.4516862,170.171891 C69.3577116,163.083327 68.2780823,153.768902 69.8044053,142.267976 C70.449038,137.410634 71.56762,132.103898 73.1575891,126.339009 C72.5361041,126.276104 71.9120754,126.144816 71.2949591,125.940529 C56.8060684,121.144191 46.5464184,115.986312 40.3349789,110.091775 C36.6393312,106.584675 34.2260275,102.680215 33.3536352,98.3582381 C32.4328237,93.7963839 33.3306866,89.2207269 35.8084524,84.9287618 C39.8947886,77.8504443 47.4083565,72.2678481 58.1124133,67.8460273 C62.5385143,66.0176154 67.5637208,64.366822 73.1939394,62.8874674 C72.9933393,62.3969171 72.8349374,61.8811235 72.7239712,61.3436237 Z",fill:"#002C4B",fillRule:"nonzero",transform:"translate(128.000000, 95.000000) scale(-1, 1) translate(-128.000000, -95.000000) "}),r.createElement("path",{d:"M113.396882,64 L142.608177,64 C144.399254,64 146.053521,64.958025 146.944933,66.5115174 L161.577138,92.0115174 C162.461464,93.5526583 162.461464,95.4473417 161.577138,96.9884826 L146.944933,122.488483 C146.053521,124.041975 144.399254,125 142.608177,125 L113.396882,125 C111.605806,125 109.951539,124.041975 109.060126,122.488483 L94.4279211,96.9884826 C93.543596,95.4473417 93.543596,93.5526583 94.4279211,92.0115174 L109.060126,66.5115174 C109.951539,64.958025 111.605806,64 113.396882,64 Z M138.987827,70.2765273 C140.779849,70.2765273 142.434839,71.2355558 143.325899,72.7903404 L154.343038,92.0138131 C155.225607,93.5537825 155.225607,95.4462175 154.343038,96.9861869 L143.325899,116.20966 C142.434839,117.764444 140.779849,118.723473 138.987827,118.723473 L117.017233,118.723473 C115.225211,118.723473 113.570221,117.764444 112.67916,116.20966 L101.662022,96.9861869 C100.779452,95.4462175 100.779452,93.5537825 101.662022,92.0138131 L112.67916,72.7903404 C113.570221,71.2355558 115.225211,70.2765273 117.017233,70.2765273 L138.987827,70.2765273 Z M135.080648,77.1414791 L120.924411,77.1414791 C119.134228,77.1414791 117.480644,78.0985567 116.5889,79.6508285 L116.5889,79.6508285 L109.489217,92.0093494 C108.603232,93.5515958 108.603232,95.4484042 109.489217,96.9906506 L109.489217,96.9906506 L116.5889,109.349172 C117.480644,110.901443 119.134228,111.858521 120.924411,111.858521 L120.924411,111.858521 L135.080648,111.858521 C136.870831,111.858521 138.524416,110.901443 139.41616,109.349172 L139.41616,109.349172 L146.515843,96.9906506 C147.401828,95.4484042 147.401828,93.5515958 146.515843,92.0093494 L146.515843,92.0093494 L139.41616,79.6508285 C138.524416,78.0985567 136.870831,77.1414791 135.080648,77.1414791 L135.080648,77.1414791 Z M131.319186,83.7122186 C133.108028,83.7122186 134.760587,84.6678753 135.652827,86.2183156 L138.983552,92.0060969 C139.87203,93.5500005 139.87203,95.4499995 138.983552,96.9939031 L135.652827,102.781684 C134.760587,104.332125 133.108028,105.287781 131.319186,105.287781 L124.685874,105.287781 C122.897032,105.287781 121.244473,104.332125 120.352233,102.781684 L117.021508,96.9939031 C116.13303,95.4499995 116.13303,93.5500005 117.021508,92.0060969 L120.352233,86.2183156 C121.244473,84.6678753 122.897032,83.7122186 124.685874,83.7122186 L131.319186,83.7122186 Z M128.003794,90.1848875 C126.459294,90.1848875 125.034382,91.0072828 124.263005,92.3424437 C123.491732,93.6774232 123.491732,95.3225768 124.263005,96.6575563 C125.034382,97.9927172 126.459294,98.8151125 128.001266,98.8151125 L128.001266,98.8151125 C129.545766,98.8151125 130.970678,97.9927172 131.742055,96.6575563 C132.513327,95.3225768 132.513327,93.6774232 131.742055,92.3424437 C130.970678,91.0072828 129.545766,90.1848875 128.003794,90.1848875 L128.003794,90.1848875 Z M93,94.5009646 L100.767764,94.5009646",fill:"#FFD94C"}),r.createElement("path",{d:"M87.8601729,108.357758 C89.1715224,107.608286 90.8360246,108.074601 91.5779424,109.399303 L91.5779424,109.399303 L92.0525843,110.24352 C95.8563392,116.982993 99.8190116,123.380176 103.940602,129.435068 C108.807881,136.585427 114.28184,143.82411 120.362479,151.151115 C121.316878,152.30114 121.184944,154.011176 120.065686,154.997937 L120.065686,154.997937 L119.454208,155.534625 C99.3465389,173.103314 86.2778188,176.612552 80.2480482,166.062341 C74.3500652,155.742717 76.4844915,136.982888 86.6513274,109.782853 C86.876818,109.179582 87.3045861,108.675291 87.8601729,108.357758 Z M173.534177,129.041504 C174.986131,128.785177 176.375496,129.742138 176.65963,131.194242 L176.65963,131.194242 L176.812815,131.986376 C181.782365,157.995459 178.283348,171 166.315764,171 C154.609745,171 139.708724,159.909007 121.612702,137.727022 C121.211349,137.235047 120.994572,136.617371 121,135.981509 C121.013158,134.480686 122.235785,133.274651 123.730918,133.287756 L123.730918,133.287756 L124.684654,133.294531 C132.305698,133.335994 139.714387,133.071591 146.910723,132.501323 C155.409039,131.82788 164.283523,130.674607 173.534177,129.041504 Z M180.408726,73.8119663 C180.932139,72.4026903 182.508386,71.6634537 183.954581,72.149012 L183.954581,72.149012 L184.742552,72.4154854 C210.583763,81.217922 220.402356,90.8916805 214.198332,101.436761 C208.129904,111.751366 190.484347,119.260339 161.26166,123.963678 C160.613529,124.067994 159.948643,123.945969 159.382735,123.618843 C158.047025,122.846729 157.602046,121.158214 158.388848,119.847438 L158.388848,119.847438 L158.889328,119.0105 C162.877183,112.31633 166.481358,105.654262 169.701854,99.0242957 C173.50501,91.1948179 177.073967,82.7907081 180.408726,73.8119663 Z M94.7383398,66.0363218 C95.3864708,65.9320063 96.0513565,66.0540315 96.6172646,66.3811573 C97.9529754,67.153271 98.3979538,68.8417862 97.6111517,70.1525615 L97.6111517,70.1525615 L97.1106718,70.9895001 C93.1228168,77.6836699 89.5186416,84.3457379 86.2981462,90.9757043 C82.49499,98.8051821 78.9260328,107.209292 75.5912744,116.188034 C75.0678608,117.59731 73.4916142,118.336546 72.045419,117.850988 L72.045419,117.850988 L71.2574475,117.584515 C45.4162372,108.782078 35.597644,99.1083195 41.8016679,88.5632391 C47.8700957,78.2486335 65.515653,70.7396611 94.7383398,66.0363218 Z M136.545792,34.4653746 C156.653461,16.8966864 169.722181,13.3874478 175.751952,23.9376587 C181.649935,34.2572826 179.515508,53.0171122 169.348673,80.2171474 C169.123182,80.8204179 168.695414,81.324709 168.139827,81.6422422 C166.828478,82.3917144 165.163975,81.9253986 164.422058,80.6006966 L164.422058,80.6006966 L163.947416,79.7564798 C160.143661,73.0170065 156.180988,66.6198239 152.059398,60.564932 C147.192119,53.4145727 141.71816,46.1758903 135.637521,38.8488847 C134.683122,37.6988602 134.815056,35.9888243 135.934314,35.0020629 L135.934314,35.0020629 Z M90.6842361,18 C102.390255,18 117.291276,29.0909926 135.387298,51.2729777 C135.788651,51.7649527 136.005428,52.3826288 136,53.0184911 C135.986842,54.5193144 134.764215,55.7253489 133.269082,55.7122445 L133.269082,55.7122445 L132.315346,55.7054689 C124.694302,55.6640063 117.285613,55.9284091 110.089277,56.4986773 C101.590961,57.17212 92.7164767,58.325393 83.4658235,59.9584962 C82.0138691,60.2148231 80.6245044,59.2578618 80.3403697,57.805758 L80.3403697,57.805758 L80.1871846,57.0136235 C75.2176347,31.0045412 78.7166519,18 90.6842361,18 Z",fill:"#FF4154"}))))}const xy=(e,t,n=!1)=>Nf.useSyncExternalStore(r.useCallback(t=>n?()=>{}:e.subscribe(mf.batchCalls(t)),[e,n]),t,t),Ey=r.forwardRef(function(e,t){const{isOpen:n=!0,styleNonce:o,setIsOpen:a,context:i,onDragStart:s,onPositionChange:u,showCloseButton:c,position:l,closeButtonProps:d={},errorTypes:p=[],...h}=e,{onClick:f,...g}=d,m=Bf({context:i}),y=m.getQueryCache(),[v,b]=Ng("reactQueryDevtoolsSortFn",Object.keys(Hm)[0]),[_,k]=Ng("reactQueryDevtoolsFilter",""),[w,x]=Ng("reactQueryDevtoolsBaseSort",1),E=r.useMemo(()=>Hm[v],[v]),S=xy(y,()=>y.getAll().length,!n),[C,R]=Ng("reactQueryDevtoolsActiveQueryHash",""),I=r.useMemo(()=>{const e=y.getAll();if(0===S)return[];const t=_?e.filter(e=>Ag(e.queryHash,_).passed):[...e];return E?t.sort((e,t)=>E(e,t)*w):t},[w,E,_,S,y]),[T,A]=r.useState(!1);return r.createElement(Um,{theme:zm},r.createElement(Xm,vg({ref:t,className:"ReactQueryDevtoolsPanel","aria-label":"React Query Devtools Panel",id:"ReactQueryDevtoolsPanel"},h,{style:{height:Km,position:"relative",...h.style}}),r.createElement("style",{nonce:o,dangerouslySetInnerHTML:{__html:"\n .ReactQueryDevtoolsPanel * {\n scrollbar-color: "+zm.backgroundAlt+" "+zm.gray+";\n }\n\n .ReactQueryDevtoolsPanel *::-webkit-scrollbar, .ReactQueryDevtoolsPanel scrollbar {\n width: 1em;\n height: 1em;\n }\n\n .ReactQueryDevtoolsPanel *::-webkit-scrollbar-track, .ReactQueryDevtoolsPanel scrollbar-track {\n background: "+zm.backgroundAlt+";\n }\n\n .ReactQueryDevtoolsPanel *::-webkit-scrollbar-thumb, .ReactQueryDevtoolsPanel scrollbar-thumb {\n background: "+zm.gray+";\n border-radius: .5em;\n border: 3px solid "+zm.backgroundAlt+";\n }\n "}}),r.createElement("div",{style:Zm(l),onMouseDown:s}),n&&r.createElement("div",{style:{flex:"1 1 500px",minHeight:"40%",maxHeight:"100%",overflow:"auto",borderRight:"1px solid "+zm.grayAlt,display:"flex",flexDirection:"column"}},r.createElement("div",{style:{padding:".5em",background:zm.backgroundAlt,display:"flex",justifyContent:"space-between",alignItems:"center"}},r.createElement("button",{type:"button","aria-label":"Close React Query Devtools","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"true",onClick:()=>a(!1),style:{display:"inline-flex",background:"none",border:0,padding:0,marginRight:".5em",cursor:"pointer"}},r.createElement(wy,{"aria-hidden":!0}),r.createElement(sy,{text:"Close React Query Devtools"})),r.createElement("div",{style:{display:"flex",flexDirection:"column"}},r.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:".5em"}},r.createElement(Cy,{queryCache:y}),l&&u?r.createElement(iy,{"aria-label":"Panel position",value:l,style:{marginInlineStart:".5em"},onChange:e=>u(e.target.value)},r.createElement("option",{value:"left"},"Left"),r.createElement("option",{value:"right"},"Right"),r.createElement("option",{value:"top"},"Top"),r.createElement("option",{value:"bottom"},"Bottom")):null),r.createElement("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5em"}},r.createElement(ay,{placeholder:"Filter","aria-label":"Filter by queryhash",value:null!=_?_:"",onChange:e=>k(e.target.value),onKeyDown:e=>{"Escape"===e.key&&k("")},style:{flex:"1",width:"100%"}}),r.createElement(iy,{"aria-label":"Sort queries",value:v,onChange:e=>b(e.target.value),style:{flex:"1",minWidth:75,marginRight:".5em"}},Object.keys(Hm).map(e=>r.createElement("option",{key:e,value:e},"Sort by ",e))),r.createElement(ty,{type:"button",onClick:()=>x(e=>-1*e),style:{padding:".3em .4em",marginRight:".5em"}},1===w?"⬆ Asc":"⬇ Desc"),r.createElement(ty,{title:"Clear cache","aria-label":"Clear cache",type:"button",onClick:()=>y.clear(),style:{padding:".3em .4em",marginRight:".5em"}},"Clear"),r.createElement(ty,{type:"button",onClick:()=>{T?(cf.setOnline(void 0),A(!1),window.dispatchEvent(new Event("online"))):(cf.setOnline(!1),A(!0))},"aria-label":T?"Restore offline mock":"Mock offline behavior",title:T?"Restore offline mock":"Mock offline behavior",style:{padding:"0",height:"2em"}},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2em",height:"2em",viewBox:"0 0 24 24",stroke:T?zm.danger:"currentColor",fill:"none"},T?r.createElement(r.Fragment,null,r.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),r.createElement("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"}),r.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),r.createElement("path",{d:"M6.343 12.343a7.963 7.963 0 0 1 3.864 -2.14m4.163 .155a7.965 7.965 0 0 1 3.287 2"}),r.createElement("path",{d:"M3.515 9.515a12 12 0 0 1 3.544 -2.455m3.101 -.92a12 12 0 0 1 10.325 3.374"}),r.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"})):r.createElement(r.Fragment,null,r.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),r.createElement("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"}),r.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),r.createElement("path",{d:"M6.343 12.343a8 8 0 0 1 11.314 0"}),r.createElement("path",{d:"M3.515 9.515c4.686 -4.687 12.284 -4.687 17 0"}))),r.createElement(sy,{text:T?"Restore offline mock":"Mock offline behavior"}))))),r.createElement("div",{style:{overflowY:"auto",flex:"1"}},I.map(e=>r.createElement(Ry,{queryKey:e.queryKey,activeQueryHash:C,setActiveQueryHash:R,key:e.queryHash,queryCache:y})))),C&&n?r.createElement(Sy,{activeQueryHash:C,queryCache:y,queryClient:m,errorTypes:p}):null,c?r.createElement(ty,vg({type:"button","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"true"},g,{style:{position:"absolute",zIndex:99999,margin:".5em",bottom:0,left:0,...g.style},onClick:e=>{a(!1),null==f||f(e)}}),"Close"):null))}),Sy=({queryCache:e,activeQueryHash:n,queryClient:o,errorTypes:a})=>{var i,s;const u=xy(e,()=>e.getAll().find(e=>e.queryHash===n)),c=xy(e,()=>{var t;return null==(t=e.getAll().find(e=>e.queryHash===n))?void 0:t.state}),l=null!=(i=xy(e,()=>{var t;return null==(t=e.getAll().find(e=>e.queryHash===n))?void 0:t.isStale()}))&&i,d=null!=(s=xy(e,()=>{var t;return null==(t=e.getAll().find(e=>e.queryHash===n))?void 0:t.getObserversCount()}))?s:0,p=t.useMemo(()=>{if(u&&null!=c&&c.error){const e=a.find(e=>{var t;return e.initializer(u).toString()===(null==(t=c.error)?void 0:t.toString())});return null==e?void 0:e.name}},[u,null==c?void 0:c.error,a]);if(!u||!c)return null;const h=e=>{var t;const n=null!=(t=null==e?void 0:e.initializer(u))?t:new Error("Unknown error from devtools"),r=u.options;u.setState({status:"error",error:n,fetchMeta:{...u.state.fetchMeta,__previousQueryOptions:r}})};return r.createElement(ey,null,r.createElement("div",{style:{padding:".5em",background:zm.backgroundAlt,position:"sticky",top:0,zIndex:1}},"Query Details"),r.createElement("div",{style:{padding:".5em"}},r.createElement("div",{style:{marginBottom:".5em",display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},r.createElement(oy,{style:{lineHeight:"1.8em"}},r.createElement("pre",{style:{margin:0,padding:0,overflow:"auto"}},Gm(u.queryKey,!0))),r.createElement("span",{style:{padding:"0.3em .6em",borderRadius:"0.4em",fontWeight:"bold",textShadow:"0 2px 10px black",background:Mm({queryState:c,isStale:l,observerCount:d,theme:zm}),flexShrink:0}},Bm(u))),r.createElement("div",{style:{marginBottom:".5em",display:"flex",alignItems:"center",justifyContent:"space-between"}},"Observers: ",r.createElement(oy,null,d)),r.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},"Last Updated:"," ",r.createElement(oy,null,new Date(c.dataUpdatedAt).toLocaleTimeString()))),r.createElement("div",{style:{background:zm.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Actions"),r.createElement("div",{style:{padding:"0.5em",display:"flex",flexWrap:"wrap",gap:"0.5em",alignItems:"flex-end"}},r.createElement(ty,{type:"button",onClick:()=>{const e=null==u?void 0:u.fetch();null==e||e.catch(Iy)},disabled:"fetching"===c.fetchStatus,style:{background:zm.active}},"Refetch")," ",r.createElement(ty,{type:"button",onClick:()=>o.invalidateQueries(u),style:{background:zm.warning,color:zm.inputTextColor}},"Invalidate")," ",r.createElement(ty,{type:"button",onClick:()=>o.resetQueries(u),style:{background:zm.gray}},"Reset")," ",r.createElement(ty,{type:"button",onClick:()=>o.removeQueries(u),style:{background:zm.danger}},"Remove")," ",r.createElement(ty,{type:"button",onClick:()=>{var e;if("fetching"!==u.state.fetchStatus||void 0!==(null==(e=u.state.fetchMeta)?void 0:e.__previousQueryOptions))if(void 0===u.state.data)u.fetch(u.state.fetchMeta.__previousQueryOptions,{cancelRefetch:!0});else{const e=u.options;u.fetch({...e,queryFn:()=>new Promise(()=>{}),cacheTime:-1}),u.setState({data:void 0,status:"loading",fetchMeta:{...u.state.fetchMeta,__previousQueryOptions:e}})}},style:{background:zm.paused}},"loading"===u.state.status?"Restore":"Trigger"," ","loading")," ",0===a.length||"error"===u.state.status?r.createElement(ty,{type:"button",onClick:()=>{u.state.error?o.resetQueries(u):h()},style:{background:zm.danger}},"error"===u.state.status?"Restore":"Trigger"," error"):r.createElement("label",null,"Trigger error:",r.createElement(iy,{value:null!=p?p:"",style:{marginInlineStart:".5em"},onChange:e=>{const t=a.find(t=>t.name===e.target.value);h(t)}},r.createElement("option",{key:"",value:""}),a.map(e=>r.createElement("option",{key:e.name,value:e.name},e.name))))),r.createElement("div",{style:{background:zm.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Data Explorer"),r.createElement("div",{style:{padding:".5em"}},r.createElement(ky,{label:"Data",value:c.data,defaultExpanded:{},copyable:!0})),r.createElement("div",{style:{background:zm.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Query Explorer"),r.createElement("div",{style:{padding:".5em"}},r.createElement(ky,{label:"Query",value:u,defaultExpanded:{queryKey:!0}})))},Cy=({queryCache:e})=>{const t=xy(e,()=>e.getAll().filter(e=>"fresh"===Bm(e)).length),n=xy(e,()=>e.getAll().filter(e=>"fetching"===Bm(e)).length),o=xy(e,()=>e.getAll().filter(e=>"paused"===Bm(e)).length),a=xy(e,()=>e.getAll().filter(e=>"stale"===Bm(e)).length),i=xy(e,()=>e.getAll().filter(e=>"inactive"===Bm(e)).length);return r.createElement(ny,null,r.createElement(ry,{style:{background:zm.success,opacity:t?1:.3}},"fresh ",r.createElement(oy,null,"(",t,")"))," ",r.createElement(ry,{style:{background:zm.active,opacity:n?1:.3}},"fetching ",r.createElement(oy,null,"(",n,")"))," ",r.createElement(ry,{style:{background:zm.paused,opacity:o?1:.3}},"paused ",r.createElement(oy,null,"(",o,")"))," ",r.createElement(ry,{style:{background:zm.warning,color:"black",textShadow:"0",opacity:a?1:.3}},"stale ",r.createElement(oy,null,"(",a,")"))," ",r.createElement(ry,{style:{background:zm.gray,opacity:i?1:.3}},"inactive ",r.createElement(oy,null,"(",i,")")))},Ry=r.memo(({queryKey:e,setActiveQueryHash:t,activeQueryHash:n,queryCache:o})=>{var a,i,s,u;const c=null!=(a=xy(o,()=>{var t;return null==(t=o.find(e))?void 0:t.queryHash}))?a:"",l=xy(o,()=>{var t;return null==(t=o.find(e))?void 0:t.state}),d=null!=(i=xy(o,()=>{var t;return null==(t=o.find(e))?void 0:t.isStale()}))&&i,p=null!=(s=xy(o,()=>{var t;return null==(t=o.find(e))?void 0:t.isDisabled()}))&&s,h=null!=(u=xy(o,()=>{var t;return null==(t=o.find(e))?void 0:t.getObserversCount()}))?u:0;return l?r.createElement("div",{role:"button","aria-label":"Open query details for "+c,onClick:()=>t(n===c?"":c),style:{display:"flex",borderBottom:"solid 1px "+zm.grayAlt,cursor:"pointer",background:c===n?"rgba(255,255,255,.1)":void 0}},r.createElement("div",{style:{flex:"0 0 auto",width:"2em",height:"2em",background:Mm({queryState:l,isStale:d,observerCount:h,theme:zm}),display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",textShadow:d?"0":"0 0 10px black",color:d?"black":"white"}},h),p?r.createElement("div",{style:{flex:"0 0 auto",height:"2em",background:zm.gray,display:"flex",alignItems:"center",fontWeight:"bold",padding:"0 0.5em"}},"disabled"):null,r.createElement(oy,{style:{padding:".5em"}},""+c)):null});function Iy(){}Ry.displayName="QueryRow";const Ty="development"!==process.env.NODE_ENV?function(){return null}:function({initialIsOpen:e,panelProps:t={},closeButtonProps:n={},toggleButtonProps:o={},position:a="bottom-left",containerElement:i="aside",context:s,styleNonce:u,panelPosition:c="bottom",errorTypes:l=[]}){const d=r.useRef(null),p=r.useRef(null),[h,f]=Ng("reactQueryDevtoolsOpen",e),[g,m]=Ng("reactQueryDevtoolsHeight",Km),[y,v]=Ng("reactQueryDevtoolsWidth",Km),[b="bottom",_]=Ng("reactQueryDevtoolsPanelPosition",c),[k,w]=r.useState(!1),[x,E]=r.useState(!1),S=function(){const e=r.useRef(!1),t=r.useCallback(()=>e.current,[]);return r.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t}();r.useEffect(()=>{w(null!=h&&h)},[h,k,w]),r.useEffect(()=>{const e=p.current;if(e){const t=()=>{k&&(e.style.visibility="visible")},n=()=>{k||(e.style.visibility="hidden")};return e.addEventListener("transitionstart",t),e.addEventListener("transitionend",n),()=>{e.removeEventListener("transitionstart",t),e.removeEventListener("transitionend",n)}}},[k]),r.useEffect(()=>{var e;if(k&&null!=(e=d.current)&&e.parentElement){const{parentElement:e}=d.current,t=Jm("padding",b),n=Qm(b),r=(({padding:e,paddingTop:t,paddingBottom:n,paddingLeft:r,paddingRight:o})=>({padding:e,paddingTop:t,paddingBottom:n,paddingLeft:r,paddingRight:o}))(e.style),o=()=>{e.style.padding="0px",e.style.paddingTop="0px",e.style.paddingBottom="0px",e.style.paddingLeft="0px",e.style.paddingRight="0px",e.style[t]=(n?y:g)+"px"};if(o(),"undefined"!=typeof window)return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),Object.entries(r).forEach(([t,n])=>{e.style[t]=n})}}},[k,b,g,y]);const{style:C={},...R}=t,{style:I={},onClick:T,...A}=o,O=function({position:e="bottom",height:t,width:n,devtoolsTheme:r,isOpen:o,isResizing:a,panelStyle:i}){const s=Ym(e),u=Jm("border",s),c=Qm(e);return{...i,direction:"ltr",position:"fixed",[e]:0,[u]:"1px solid "+r.gray,transformOrigin:s,boxShadow:"0 0 20px rgba(0,0,0,.3)",zIndex:99999,visibility:o?"visible":"hidden",...a?{transition:"none"}:{transition:"all .2s ease"},...o?{opacity:1,pointerEvents:"all",transform:c?"translateX(0) scale(1)":"translateY(0) scale(1)"}:{opacity:0,pointerEvents:"none",transform:c?"translateX(15px) scale(1.02)":"translateY(15px) scale(1.02)"},...c?{top:0,height:"100vh",maxWidth:"90%",width:"number"==typeof n&&n>=70?n:Km}:{left:0,width:"100%",maxHeight:"90%",height:"number"==typeof t&&t>=70?t:Km}}}({position:b,devtoolsTheme:zm,isOpen:k,height:g,width:y,isResizing:x,panelStyle:C});return S()?r.createElement(i,{ref:d,className:"ReactQueryDevtools","aria-label":"React Query Devtools"},r.createElement(Um,{theme:zm},r.createElement(Ey,vg({ref:p,context:s,styleNonce:u,position:b,onPositionChange:_,showCloseButton:!0,closeButtonProps:n},R,{style:O,isOpen:k,setIsOpen:f,onDragStart:e=>((e,t)=>{if(!e)return;if(0!==t.button)return;const n=Qm(b);E(!0);const{height:r,width:o}=e.getBoundingClientRect(),a=t.clientX,i=t.clientY;let s=0;const u=e=>{e.preventDefault(),n?(s=o+("right"===b?a-e.clientX:e.clientX-a),v(s)):(s=r+("bottom"===b?i-e.clientY:e.clientY-i),m(s)),f(!(s<70))},c=()=>{x&&E(!1),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseUp",c,!1)};document.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",c,!1)})(p.current,e),errorTypes:l}))),k?null:r.createElement("button",vg({type:"button"},A,{"aria-label":"Open React Query Devtools","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"false",onClick:e=>{f(!0),null==T||T(e)},style:{background:"none",border:0,padding:0,position:"fixed",zIndex:99999,display:"inline-flex",fontSize:"1.5em",margin:".5em",cursor:"pointer",width:"fit-content",..."top-right"===a?{top:"0",right:"0"}:"top-left"===a?{top:"0",left:"0"}:"bottom-right"===a?{bottom:"0",right:"0"}:{bottom:"0",left:"0"},...I}}),r.createElement(wy,{"aria-hidden":!0}),r.createElement(sy,{text:"Open React Query Devtools"}))):null};process.env.NODE_ENV;var Ay,Oy={backgroundColor:"#fcfcff",width:"100%",zIndex:1e7,height:"100%",position:"absolute"};exports.ApiErrorCodes=void 0,(Ay=exports.ApiErrorCodes||(exports.ApiErrorCodes={})).ECONNABORTED="ECONNABORTED",Ay.ETIMEDOUT="ETIMEDOUT",Ay.ERR_BAD_REQUEST="ERR_BAD_REQUEST";var Py=["LOCAL","DEV","STG"].includes(process.env.ENVIRONMENT||"");"undefined"!=typeof window&&Py&&function(){e.__awaiter(this,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:if(!di())return console.info('MSW is disabled. Run "window.enableMSW()" to enable it.'),[2];console.info('MSW is enabled. Run "window.disableMSW()" to disable it.'),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,ui.start({serviceWorker:{url:"/mockServiceWorker.js"},onUnhandledRequest:"bypass"})];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),console.error("Error starting MSW:",t),[3,4];case 4:return[2]}})})}(),exports.Api=Dh,exports.ApiProvider=function(n){var r=this,o=n.children,a=process.env.ENVIRONMENT,i=t.useMemo(function(){return"DEV"!==a&&"LOCAL"!==a?"testing":"live"},[a]),s=t.useState(!1),u=s[0],c=s[1],l=t.useCallback(function(t){return e.__awaiter(r,void 0,void 0,function(){var n,r,o,a,s;return e.__generator(this,function(u){switch(u.label){case 0:return n=localStorage.getItem("headers"),r=n&&JSON.parse(n),o=localStorage.getItem("isTesting")&&"OFF"!==localStorage.getItem("isTesting")?"testing":"live",a=localStorage.getItem("x-organization-code"),s=a?JSON.parse(a).value:"",[4,zh.refreshInstance({headers:e.__assign(e.__assign({},r),{"X-Environment":o||i,"x-organization-code":s,"x-account-code":t.detail.accountCode,"X-Content-Type-Options":"nosniff"})})];case 1:return u.sent(),[2]}})})},[i]);t.useEffect(function(){return addEventListener("ACCOUNT_CHANGED",l),function(){window.removeEventListener("ACCOUNT_CHANGED",l)}},[l]);var d=t.useCallback(function(t){return e.__awaiter(r,void 0,void 0,function(){var n,r,o,a,s,u,l;return e.__generator(this,function(d){switch(d.label){case 0:return n=localStorage.getItem("headers"),(r=n&&JSON.parse(n))?(o=localStorage.getItem("x-organization-code"),a=localStorage.getItem("account"),s=a?null===(l=JSON.parse(a).value)||void 0===l?void 0:l.code:"",u=o?JSON.parse(o).value:"",[4,zh.refreshInstance({headers:e.__assign(e.__assign({},r),{"X-Environment":t||i,"x-organization-code":u,"x-account-code":s,"X-Content-Type-Options":"nosniff"})})]):[3,2];case 1:d.sent(),ng.refetchQueries(["fetch-profile","accountsV2","accounts","fetch-all-organizations","fetch-permissions"]),c(!0),d.label=2;case 2:return[2]}})})},[i,c]);return t.useEffect(function(){var e=localStorage.getItem("isTesting")&&"OFF"!==localStorage.getItem("isTesting")?"testing":"live";window.addEventListener("storage",function(t){if("token"===t.key||"isTesting"===t.key){var n="OFF"===t.newValue?"live":"testing";"isTesting"===t.key?d(n):"token"===t.key&&d(e)}}),d(e)},[c,d]),u?React.createElement(Ff,{client:ng},o,React.createElement(Ty,{initialIsOpen:!1})):React.createElement("div",{style:Oy})},exports.ApiSingleton=zh,exports.CONCIERGE_ALERTS_QUERY_KEY=ag,exports.CONCIERGE_ALERT_BY_ID_QUERY_KEY=ig,exports.FEEDBACK_ISSUE_OPTIONS=[{value:"CHART_NOT_EXPECTED",labelKey:"insights.feedback.issues.chartNotExpected"},{value:"TIME_RANGE_INCORRECT",labelKey:"insights.feedback.issues.timeRangeIncorrect"},{value:"DATA_INACCURATE",labelKey:"insights.feedback.issues.dataInaccurate"},{value:"NOT_ANSWERING_QUESTION",labelKey:"insights.feedback.issues.notAnsweringQuestion"},{value:"EXPECTED_INSIGHTS",labelKey:"insights.feedback.issues.expectedInsights"},{value:"OTHER",labelKey:"insights.feedback.issues.other"}],exports.getQueryKeyGetNameAndIcon=ug,exports.getQueryKeyPaymentMethodAccounts=lg,exports.getQueryKeyRequiredFields=cg,exports.queryCache=tg,exports.queryClient=ng,exports.use3DSExemptions=function(){var t=this;return Kf({queryKey:["smart-routing-3ds-excemptions"],queryFn:function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})},exports.useAICreateWorkflow=function(t,n){return void 0===n&&(n={}),$f(function(e){return zh.getInstance().generateAIWorkflowRoutes(t,e).then(function(e){return null==e?void 0:e.data})},e.__assign(e.__assign({},n),{useErrorBoundary:!1}))},exports.useAccountCode=eg,exports.useAddToRiskList=function(){return $f(function(e){var t=e.paymentId,n=e.payload;return zh.getInstance().addToRiskList(t,n)})},exports.useAllFeatureFlags=function(n){var r=this,o=Kf({queryKey:["all-feature-flags",Object.values(n).filter(Boolean)],queryFn:function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getFeatureFlagIdAll({accountCode:n.account_code}).then(function(e){return null==e?void 0:e.data})]})})},enabled:!!n.account_code&&!!n.organization_code&&!!n.email,cacheTime:9e5,useErrorBoundary:!1}),a=Bf();return t.useEffect(function(){a.setQueryData(["cached-feature-flags"],o)},[o,a]),o},exports.useAllowListDetail=function(e,t,n){return Kf(["allow-list-detail",e],function(){return zh.getInstance().getAllowlistDetail(e,t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e&&!!n})},exports.useBlackListDetail=function(e,t,n,r,o,a){return Kf(["black-list-detail",e,t,r,o,a],function(){return zh.getInstance().getBlacklistDetail(e,t,n,r,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&a,cacheTime:0})},exports.useBlockOnboarding=function(){var e=Bf();return $f(["block-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId;return zh.getInstance().blockOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useBulkCreateInstallmentsPlans=function(){return $f(["bulk-create-installments-plans"],function(e){var t=e.payload;return zh.getInstance().bulkCreateInstallmentsPlans(t).then(function(e){return null==e?void 0:e.data})})},exports.useBulkDeleteInstallmentsPlans=function(){return $f(["bulk-delete-installments-plans"],function(e){var t=e.payload;return zh.getInstance().bulkDeleteInstallmentsPlans(t).then(function(e){return null==e?void 0:e.data})})},exports.useBulkToggleMethod=function(t,n){var r=this;return void 0===n&&(n=null),$f(function(n){return e.__awaiter(r,void 0,void 0,function(){var r,o,a,i,s,u;return e.__generator(this,function(e){switch(e.label){case 0:return r=zh.getInstance(),o=n.map(function(e){return r.putSmartRoutingToggleMethod(t,e.paymentMethod,e.active,e.routingType)}),[4,Promise.allSettled(o)];case 1:return a=e.sent(),i=a.filter(function(e){return"rejected"===e.status}),s=a.filter(function(e){return"fulfilled"===e.status}),u=i.map(function(e,t){return{paymentMethod:n[t].paymentMethod,error:"rejected"===e.status?e.reason:null}}),[2,{success:s.length,failed:i.length,total:n.length,errors:u}]}})})},n)},exports.useCachedFeatureFlag=function(t){var n,r,o=Bf(),a=o.getQueryState(["cached-feature-flags"]),i=Boolean(!(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.status)||"loading"===(null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.status)),s=Kf({queryKey:["cached-feature-flags"],queryFn:function(){},enabled:!1,select:function(e){var n;return{result:null===(n=null==e?void 0:e.data)||void 0===n?void 0:n[t]}},initialData:function(){var e=o.getQueryData(["cached-feature-flags"]);return(null==e?void 0:e.data)||{}}});return e.__assign(e.__assign({},s),{isLoading:i})},exports.useCancelReport=function(){return $f(function(e){return zh.getInstance().cancelReport(e).then(function(e){return null==e?void 0:e.data})})},exports.useCancelSubscription=function(){return $f(["post-cancel-subscription"],function(e){var t=e.subscriptionCode;return zh.getInstance().postCancelSubscription(t).then(function(e){return null==e?void 0:e.data})})},exports.useChangePasswordV2=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().changePasswordV2(n).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})},exports.useChangePaymentsWebhook=function(){return $f(["change-payments-webhook"],function(e){var t=e.status,n=e.paymentCode;return zh.getInstance().postChangePaymentsWebhook({status:t,paymentCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useChangeStatusBlackList=function(){return $f(["change-blacklist"],function(e){return zh.getInstance().changeBlackListStatus(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useChangeStatusItemBlackList=function(){return $f(["change-blacklist-item"],function(e){return zh.getInstance().changeBlackListStatusItem(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useChangeStylingSettings=function(){return $f(function(e){var t=e.accountCode,n=e.payload;return zh.getInstance().changeStylingSettings({accountCode:t,payload:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})},exports.useChangeTemplateStatus=function(){var t=this;return $f(["PATCH/template-reporting/report-templates/status"],function(n){var r=n.templateId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().changeTemplateStatus(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useChargebacksUpload=function(){return $f(function(e){var t=e.payload,n=e.paymentId,r=e.transactionId,o=e.handleSetProgress;return zh.getInstance().uploadChargebacks(t,n,r,o)})},exports.useChartAssistantSocket=function(){var e=t.useRef(null),n=t.useRef(null),r=t.useRef(null),o=t.useState(!1),a=o[0],i=o[1],s=t.useState(null),u=s[0],c=s[1],l=t.useState(null),d=l[0],p=l[1],h=t.useCallback(function(){n.current&&(clearInterval(n.current),n.current=null),r.current&&(clearTimeout(r.current),r.current=null)},[]),f=t.useCallback(function(){n.current&&(clearInterval(n.current),n.current=null),r.current&&(clearTimeout(r.current),r.current=null),p(null);try{var t=new WebSocket("".concat(Nh["WS_URL_".concat(Nh.ENVIRONMENT)],"/data-assistant/charts/ws"));e.current=t,t.onopen=function(){i(!0);var e=localStorage.getItem("token");e&&t.send(JSON.stringify({type:"auth",token:e})),n.current=setInterval(function(){t.readyState===WebSocket.OPEN?t.send(JSON.stringify({type:"ping"})):(h(),i(!1))},3e4)},t.onmessage=function(e){try{var t=JSON.parse(e.data);c(t)}catch(e){p("Failed to parse server response")}},t.onerror=function(e){p("Connection error occurred"),i(!1)},t.onclose=function(e){i(!1),h(),e.wasClean||1e3===e.code||(r.current=setTimeout(function(){f()},5e3))}}catch(e){p("Failed to establish connection")}},[]),g=t.useCallback(function(t){var n;(null===(n=e.current)||void 0===n?void 0:n.readyState)===WebSocket.OPEN&&e.current.send(JSON.stringify({type:"subscribe",chart_id:t}))},[]),m=t.useCallback(function(t){var n;(null===(n=e.current)||void 0===n?void 0:n.readyState)===WebSocket.OPEN&&e.current.send(JSON.stringify({type:"unsubscribe",chart_id:t}))},[]),y=t.useCallback(function(){c(null)},[]),v=t.useCallback(function(){n.current&&(clearInterval(n.current),n.current=null),r.current&&(clearTimeout(r.current),r.current=null),e.current&&(i(!1),e.current.close(1e3,"Manual disconnect"),e.current=null)},[]);return t.useEffect(function(){return f(),function(){h(),v()}},[]),{subscribe:g,unsubscribe:m,disconnect:v,connect:f,clearChartData:y,isConnected:a,chartData:u,connectionError:d}},exports.useChartExecute=function(e){return Kf(["chartgpt-chart-execute",e],function(){return zh.getInstance().executeChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e})},exports.useCloneTemplate=function(){var t=this;return $f(["POST/template-reporting/report-templates/clone"],function(n){var r=n.templateId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().cloneReportTemplate(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useCommunicationDetails=function(e,t){return Kf(["fetch-communication-details",e],function(){return zh.getInstance().getCommunicationDetails(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,useErrorBoundary:!1,cacheTime:0})},exports.useCommunications=function(e){var t;return Kf(["fetch-communications",e],function(){return zh.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})},exports.useCommunicationsByDay=function(t,n){return Kf(e.__assign({queryKey:["smart-recovery-communications-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return n=zh.getInstance(),r={start_date:t.start_date||"",end_date:t.end_date||"",organization_code:t.organization_code,account_codes:t.account_code||[],countries:t.countries||[],channels:t.channels||[],focuses:t.focuses||[],timezone:t.timezone},[4,n.post("/nova-insights/communications-by-day",r)];case 1:return o=e.sent(),[2,(a=o.data,i=r.start_date,s=r.end_date,u=a.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=hg(null==c?void 0:c.rows,i,s),h=hg(null==l?void 0:l.rows,i,s),f=hg(null==d?void 0:d.rows,i,s),{communications:{distribution:p.map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:pg(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==c?void 0:c.value)||"0")},conversion_rate:{distribution:f.map(function(e){return{key:e.date||"",total:parseFloat(e.value),percentage:parseFloat(e.value)}}),total:parseFloat((null==d?void 0:d.value)||"0")},completed_communications:{distribution:h.map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:pg(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==l?void 0:l.value)||"0")}})]}var a,i,s,u,c,l,d,p,h,f})})},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useCommunicationsBySubstatus=function(t,n){return Kf(e.__assign({queryKey:["smart-recovery-communications-by-substatus",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return n=zh.getInstance(),r={start_date:t.start_date||"",end_date:t.end_date||"",organization_code:t.organization_code,account_codes:t.account_code||[],countries:t.countries||[],channels:t.channels||[],focuses:t.focuses||[],timezone:t.timezone},[4,n.post("/nova-insights/communications-by-substatus",r)];case 1:return o=e.sent(),[2,fg(o.data)]}})})},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useCommunicationsFilters=function(){return Kf(["fetch-communications-filters"],function(){return zh.getInstance().getCommunicationsFilters().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})},exports.useCommunicationsSubstatusByDay=function(t,n){return Kf(e.__assign({queryKey:["smart-recovery-communications-substatus-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return n=zh.getInstance(),r={start_date:t.start_date||"",end_date:t.end_date||"",organization_code:t.organization_code,account_codes:t.account_code||[],countries:t.countries||[],channels:t.channels||[],focuses:t.focuses||[],timezone:t.timezone},[4,n.post("/nova-insights/communications-substatus-by-day",r)];case 1:return o=e.sent(),[2,gg(o.data,r.start_date,r.end_date)]}})})},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useConfirmedOtpMfa=function(){return $f(function(e){return zh.getInstance().confirmMfaOtp(e).then(function(e){return null==e?void 0:e.data})})},exports.useCountRowsForReport=function(){return $f(function(e){return zh.getInstance().getTotalRowsForExport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.useCreateAndExecuteChart=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){var t,r,o,a,i;return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().createChartGPTChart(n)];case 1:if(t=e.sent(),!(r=null!==(a=null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.chartgpt_id)&&void 0!==a?a:null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.chart_id))throw new Error("Failed to create chart: No chart ID returned");return[2,{chart_id:r}]}})})},{useErrorBoundary:!1})},exports.useCreateAndExecuteChartWithTimezone=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){var t,r,o,a,i;return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().createChartGPTChart(n)];case 1:if(t=e.sent(),!(r=null!==(a=null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.chartgpt_id)&&void 0!==a?a:null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.chart_id))throw new Error("Failed to create chart: No chart ID returned");return[2,{chart_id:r}]}})})},{useErrorBoundary:!1})},exports.useCreateChart=function(){return $f(function(e){return zh.getInstance().createChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreateChartWithTimezone=function(){return $f(function(e){return zh.getInstance().createChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreateConciergeAlert=function(){return $f(["POST/concierge/alerts"],function(e){return zh.getInstance().createConciergeAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries([ag]),ng.invalidateQueries([ig])},useErrorBoundary:!1})},exports.useCreateInstallmentsPlan=function(){return $f(["create-installments-plan"],function(e){var t=e.payload;return zh.getInstance().createInstallmentsPlan(t).then(function(e){return null==e?void 0:e.data})})},exports.useCreateMonitorTemplate=function(e){return $f(function(t){return zh.getInstance().createMonitorTemplate(t,e).then(function(e){return e.data})})},exports.useCreateMonitorThreshold=function(e){return $f(function(t){return zh.getInstance().createMonitorThreshold(t,e).then(function(e){return e.data})})},exports.useCreateOnboarding=function(){var e=Bf();return $f(["create-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.payload;return zh.getInstance().createOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useCreateOperationTransaction=function(){return $f(function(e){var t=e.payload,n=e.transactionId,r=e.paymentId,o=e.action;return zh.getInstance().createOperationTransaction(t,n,r,o)})},exports.useCreateOrgRole=function(){return $f(function(e){var t=e.payload;return zh.getInstance().createOrgRole(t).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreatePaymentLinks=function(){return $f(["post-payment-links"],function(e){var t=e.payload,n=e.accountCode;return zh.getInstance().postPaymentLinks({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data})})},exports.useCreateRecipient=function(){var e=Bf();return $f(["create-recipient"],function(e){var t=e.organizationCode,n=e.payload;return zh.getInstance().createRecipient(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useCreateReconciliationAlert=function(){return $f(["POST/reconciliation/alerts"],function(e){return zh.getInstance().postReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useCreateReconciliationReportTemplate=function(t){var n=this;return $f(function(){return zh.getInstance().createReconciliationReportTemplate(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{onMutate:function(t){return e.__awaiter(n,void 0,void 0,function(){var n,r;return e.__generator(this,function(o){switch(o.label){case 0:return[4,ng.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return o.sent(),n=null===(r=ng.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===r?void 0:r.templates,ng.setQueryData(["GET/reconciliation/reports/templates"],function(n){return{templates:e.__spreadArray(e.__spreadArray([],n.templates,!0),[t],!1)}}),[2,{previousTemplates:n}]}})})},onError:function(e,t,n){ng.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){ng.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})},exports.useCreateReconciliationsReportV2=function(){return $f(function(e){return zh.getInstance().createReconciliationsReportV2(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreateReconciliationsReportV3=function(){return $f(function(e){return zh.getInstance().createReconciliationsReportV3(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreateReportTemplate=function(t){var n=this;return $f(function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().createReportTemplate(t).then(function(e){return null==e?void 0:e.data})]})})},{onMutate:function(t){return e.__awaiter(n,void 0,void 0,function(){var n;return e.__generator(this,function(r){switch(r.label){case 0:return[4,ng.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return r.sent(),n=ng.getQueryData(["GET/reports/templates"]),ng.setQueryData(["GET/reports/templates"],function(n){return e.__spreadArray(e.__spreadArray([],n,!0),[t],!1)}),[2,{previousTemplates:n}]}})})},onError:function(e,t,n){ng.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){ng.invalidateQueries({queryKey:["GET/reports/templates"]})}})},exports.useCreateReportV2=function(){return $f(function(e){return zh.getInstance().createReportV2(e).then(function(e){return null==e?void 0:e.data})})},exports.useCreateRoles=function(){return $f(function(e){var t=e.payload,n=e.accountCode;return zh.getInstance().createRoles(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreateSamlConfig=function(){return $f(function(e){return zh.getInstance().createSamlConfig(e)})},exports.useCreateSchedule=function(){var t=this;return $f(["POST/template-reporting/report-schedules"],function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().createReportSchedule(n).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useCreateScheduledReport=function(){return $f(function(e){var t=e.payload;return zh.getInstance().postScheduledReport(t).then(function(e){return{data:e.data,status:e.status}}).catch(function(e){return e})})},exports.useCreateSubscription=function(){return $f(["post-subscription"],function(e){return zh.getInstance().postSubscription(e).then(function(e){return null==e?void 0:e.data})})},exports.useCreateTemplate=function(){var t=this;return $f(["POST/template-reporting/report-templates"],function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().createTemplateReporting(n).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useCreateUserAuth0=function(){return $f(function(e){return zh.getInstance().createUserAuth0(e)})},exports.useCreateWorkflow=function(t,n,r){var o=this;void 0===r&&(r=null);var a=(null==r?void 0:r.basePath)||exports.SmartRouting.DEFAULT_ROUTING_TYPE;return $f(function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().postSmartRoutingCreateWorkflow(t,n,a).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})},r)},exports.useDeleteAccountsUserMassive=function(){return $f(function(e){var t=e.organizationCode,n=e.userCode,r=e.payload;return zh.getInstance().deleteAccountsUserMassive(t,n,r)})},exports.useDeleteAllowlistItem=function(){return $f(["delete-allowlist-item"],function(e){return zh.getInstance().deleteAllowlistItem({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.useDeleteBlackListType=function(){return $f(["delete-blacklist"],function(e){var t=e.black_list_code;return zh.getInstance().deleteBlackListType({black_list_code:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useDeleteBlockListItem=function(){return $f(["delete-blacklist-items"],function(e){var t=e.blocklist_code,n=e.blocklist_item_id,r=e.account_code;return zh.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:r}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useDeleteChart=function(){return $f(function(e){return zh.getInstance().deleteChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useDeleteConciergeAlert=function(){return $f(["DELETE/concierge/alerts"],function(e){return zh.getInstance().deleteConciergeAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries([ag]),ng.invalidateQueries([ig])},useErrorBoundary:!1})},exports.useDeleteCustomizedApiKeys=function(){return $f(function(e){var t=e.code;return zh.getInstance().deleteCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.useDeleteInstallmentsPlan=function(){return $f(["delete-installments-plan"],function(e){var t=e.code;return zh.getInstance().deleteInstallmentsPlan(t).then(function(e){return null==e?void 0:e.data})})},exports.useDeleteOrgRole=function(){return $f(function(e){return zh.getInstance().deleteOrgRole(e).then(function(e){return null==e?void 0:e.data})})},exports.useDeletePaymentLink=function(){return $f(["post-delete-payment-link"],function(e){var t=e.code;return zh.getInstance().postDeletePaymentLink({code:t}).then(function(e){return null==e?void 0:e.data})})},exports.useDeleteRecipient=function(){var e=Bf();return $f(["delete-recipient"],function(e){var t=e.organizationCode,n=e.recipientId;return zh.getInstance().deleteRecipient(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useDeleteReconciliationAlert=function(){return $f(["DELETE/reconciliation/alerts"],function(e){return zh.getInstance().deleteReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useDeleteReportTemplate=function(){return $f(function(e){return zh.getInstance().deletePaymentsReportTemplate(e).then(function(e){return null==e?void 0:e.data})})},exports.useDeleteRoles=function(){return $f(function(e){return zh.getInstance().deleteRoles(e).then(function(e){return null==e?void 0:e.data})})},exports.useDeleteSamlConfig=function(){return $f(function(){return zh.getInstance().deleteSamlConfig()})},exports.useDeleteSchedule=function(){var t=this;return $f(["DELETE/template-reporting/report-schedules"],function(n){var r=n.scheduleId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().deleteReportSchedule(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useDeleteScheduledReport=function(){return $f(function(e){return zh.getInstance().deleteScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useDeleteTemplate=function(){var t=this;return $f(["DELETE/template-reporting/report-templates"],function(n){var r=n.templateId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().deleteReportTemplate(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useDeleteUserTeamV2=function(){return $f(function(e){var t=e.userCode,n=e.organizationCode;return zh.getInstance().deleteUserTeamV2({userCode:t,organizationCode:n}).then(function(e){return null==e?void 0:e.data})})},exports.useDeleteVersion=function(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?exports.SmartRouting.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),$f(function(){return zh.getInstance().deleteSmartRoutingVersion(r,n,a).then(function(e){return null==e?void 0:e.data})},t)},exports.useDeleteWebhookV2=function(e){return $f(function(e){var t=e.code,n=e.accountCode;return zh.getInstance().deleteWebhookV2(t,n)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useDisableSchedule=function(){var t=this;return $f(["PATCH/template-reporting/report-schedules/disable"],function(n){var r=n.scheduleId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().disableReportSchedule(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useDuplicateAccount=function(){return $f(function(t){var n=e.__spreadArray([exports.DuplicateSetting.ACCOUNT],t.duplicate_order,!0);return zh.getInstance().duplicateAccount(e.__assign(e.__assign({},t),{duplicate_order:n}))})},exports.useDuplicateVersion=function(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?exports.SmartRouting.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),$f(function(){return zh.getInstance().postSmartRoutingDuplicateVersion(r,String(n),a).then(function(e){return null==e?void 0:e.data})},t)},exports.useEditOrgRole=function(){var t=this;return $f(function(n){var r=n.payload,o=n.id;return e.__awaiter(t,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().editOrgRole({payload:r,id:o})];case 1:return[2,null==(t=e.sent())?void 0:t.data]}})})},{useErrorBoundary:!1})},exports.useEditPaymentLinks=function(){return $f(["patch-payment-links"],function(e){var t=e.payload,n=e.accountCode,r=e.paymentLinkCode;return zh.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:r}).then(function(e){return null==e?void 0:e.data})})},exports.useEditRoles=function(){var t=this;return $f(function(n){var r=n.payload,o=n.id,a=n.accountCode;return e.__awaiter(t,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().editRoles({payload:r,id:o},a)];case 1:return[2,null==(t=e.sent())?void 0:t.data]}})})},{useErrorBoundary:!1})},exports.useEmailVerification=function(e){return Kf(["email-verification",e],function(){return zh.getInstance().emailVerification(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})},exports.useEnableConciergeAlert=function(){return $f(["POST/concierge/alerts/enable"],function(e){var t=e.alertId,n=e.payload;return zh.getInstance().enableConciergeAlert(t,n).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries([ag]),ng.invalidateQueries([ig])},useErrorBoundary:!1})},exports.useExcludeUsers=function(){return $f(function(e){var t=e.payload,n=e.organizationCode;return zh.getInstance().mfaExcludeUsers(t,n)})},exports.useExportApiLogs=function(){return $f(function(e){return zh.getInstance().postExportApiLogs(e).then(function(e){return null==e?void 0:e.data})})},exports.useExportDashboardLogs=function(){return $f(function(e){return zh.getInstance().postExportDashboardLogs(e).then(function(e){return null==e?void 0:e.data})})},exports.useExportMonitorsLogs=function(){return $f(function(e){return zh.getInstance().postExportMonitorsLogs(e).then(function(e){return null==e?void 0:e.data})})},exports.useExportWebhooksLogs=function(){return $f(function(e){return zh.getInstance().postExportWebhooksLogs(e).then(function(e){return null==e?void 0:e.data})})},exports.useFeatureFlags=function(t){var n=this,r=Object.values(t).filter(Boolean);return Kf(["feature-flags",r],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getFeatureFlagId(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:r.length>1,useErrorBoundary:!1})},exports.useFetchUserExportDetail=function(){var t=this,n=Bf();return function(r){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,n.fetchQuery(["user-export-status",r],function(){return zh.getInstance().getUserExportStatus({exportCode:r}).then(function(e){return null==e?void 0:e.data})})]})})}},exports.useFirebaseUserSubscribe=function(e){return $f(function(e){var t=e.payload;return zh.getInstance().firebaseUserSubscribe(t)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useGenerateFeedback=function(t){return void 0===t&&(t={}),$f(function(e){return zh.getInstance().postAIGenerationFeedback(e).then(function(e){return null==e?void 0:e.data})},e.__assign(e.__assign({},t),{useErrorBoundary:!1}))},exports.useGetAccounts=function(e){var t,n=Xf(),r=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return Kf({queryKey:["accounts",r],queryFn:function(){return zh.getInstance().getAccounts(r).then(function(e){return null==e?void 0:e.data})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!r})},exports.useGetAccountsByUser=function(e){return Kf(["accountsV2-by-user",e],function(){return e?zh.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})},exports.useGetAccountsForImpersonation=function(t,n){var r=this;return Kf({queryKey:["accounts-for-impersonation",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getAccountsForImpersonation(t).then(function(e){var t,r;return(null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.response)||void 0===r?void 0:r.map(function(e){return{label:e.name,value:n?e.code_testing:e.code_live,code_live:e.code_live,code_testing:e.code_testing}}))||[]})]})})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!t})},exports.useGetAccountsV2=function(e){return Kf(["accountsV2",e],function(){return zh.getInstance().getAccountsV2().then(function(e){return(null==e?void 0:e.data)||[]}).catch(function(e){throw e})},{keepPreviousData:!0,enabled:!!e,useErrorBoundary:!1})},exports.useGetAllConfigRules=function(){return Kf(["config-rules"],function(){return zh.getInstance().getAllConfigRules().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0})},exports.useGetAllOrganizations=function(){return Kf(["fetch-all-organizations",Xf()],function(){return zh.getInstance().getAllOrganization().then(function(e){return(null==e?void 0:e.data)||[]})},{cacheTime:36e5,keepPreviousData:!0,useErrorBoundary:!1})},exports.useGetAllReconciliationsAdvancements=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/advancements/list",t,n],function(){return zh.getInstance().getReconciliationAdvancements(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetAllReconciliationsAgenda=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/agenda/list",t,n],function(){return zh.getInstance().getReconciliationAgenda(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetAllReconciliationsAlerts=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/alerts/list",t,n],function(){return zh.getInstance().getReconciliationAlerts(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetAllReconciliationsFees=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/fees/list",t,n],function(){return zh.getInstance().getReconciliationFees(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetAllReconciliationsSales=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/sales/list",t,n],function(){return zh.getInstance().getReconciliationSales(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetAllTableColumns=function(e){return Kf(["GET/v1/reconciliation/table/".concat(e,"/columns")],function(){return zh.getInstance().getAllTableColumns(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.useGetAllowedIps=function(){return Kf(["developers-get-allowed-ips"],function(){return zh.getInstance().getAllowedIps().then(function(t){return(null==t?void 0:t.data)?e.__assign(e.__assign({},null==t?void 0:t.data),{isError:!1}):null}).catch(function(t){return e.__assign(e.__assign({},t),{isError:!0})})},{enabled:!1,cacheTime:0})},exports.useGetApiLogsByTransactionCode=function(e,t){return Kf(["api-logs-by-transaction",e,t],function(){return zh.getInstance().getApiLogsByTransactionCode(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!t,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsDetailByPaymentCode=function(e,t){return Kf(["api-logs-detail",e,t],function(){return zh.getInstance().getApiLogsDetailByPaymentCode(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsList=function(t){return Kf(["api-logs-list",t],function(){return zh.getInstance().postApiLogsList(e.__assign({},t)).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.start_date,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsStatsErrors=function(t){return Kf(["api-logs-stats-errors",t],function(){return zh.getInstance().postApiLogsStatsErrors(e.__assign({},t)).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.start_date,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsStatsErrorsByEndpoint=function(t){return Kf(["api-logs-stats-errors-by-endpoint",t],function(){return zh.getInstance().postApiLogsStatsErrorsByEndpoint(e.__assign({},t)).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.start_date,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsStatsRequests=function(t){return Kf(["api-logs-stats-requests",t],function(){return zh.getInstance().postApiLogsStatsRequests(e.__assign({},t)).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.start_date,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsV3=function(t){var n=this,r=t.paymentCode,o=t.enabled;return Kf({queryKey:["api-logs-v3",r],queryFn:function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getApiLogsV3(r).then(function(e){return null==e?void 0:e.data})]})})},enabled:(void 0===o||o)&&!!r,staleTime:3e4,cacheTime:3e5,useErrorBoundary:!1})},exports.useGetApiLogsV3ByPaymentCode=function(e){var t=e.paymentCode,n=e.createdAtFrom,r=e.enabled;return Kf(["api-logs-v2-payment",t,n],function(){return zh.getInstance().getApiLogsV3ByPaymentCode(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:(void 0===r||r)&&!!t,cacheTime:0,useErrorBoundary:!1})},exports.useGetAuditEvents=function(e){return Kf(["events",e],function(){return zh.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})},exports.useGetAuditExportDownload=function(e,t,n){return void 0===t&&(t=!1),Kf(["audit-export-download",e],function(){return zh.getInstance().getAuditExportDownload(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&t,cacheTime:0,useErrorBoundary:!1,onSuccess:n})},exports.useGetAuditExportsList=function(e,t){return void 0===t&&(t=!0),Kf(["audit-exports-list",e],function(){return zh.getInstance().getAuditExportsList(e).then(function(e){return null==e?void 0:e.data})},{enabled:t,cacheTime:0,useErrorBoundary:!1})},exports.useGetAuditLogsFilters=function(){return Kf(["/cms/audit-logs-filters"],function(){return zh.getInstance().useGetAuditLogsFilters().then(function(e){return yh(e)?wh:null==e?void 0:e.data}).catch(function(){return wh})})},exports.useGetAuditMonitorEventDetail=function(e){return Kf(["audit-monitor-event-detail",e],function(){return zh.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})},exports.useGetBatchRefundProcessedFileDownload=function(){var t=this;return $f(function(n){var r=n.batchRefundId,o=n.organizationCode,a=n.accountCode;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getBatchRefundProcessedFileDownload(r,o,a).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})},exports.useGetBatchRefundUserFileDownload=function(){var t=this;return $f(function(n){var r=n.batchRefundId,o=n.organizationCode,a=n.accountCode;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getBatchRefundUserFileDownload(r,o,a).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})},exports.useGetBatchRefunds=function(t,n){var r=this;return void 0===t&&(t=26),void 0===n&&(n=0),Kf(["batch-refunds",t,n],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getBatchRefunds(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{cacheTime:0})},exports.useGetBlackList=function(e,t){return void 0===t&&(t=!0),Kf(["get-black-list",e],function(){return zh.getInstance().getBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e&&t})},exports.useGetBlockListSummary=function(e,t,n){return Kf(["get-block-list-summary",e,t,n],function(){var r=zh.getInstance();return n?r.getBlackListSummary(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e}):Promise.resolve({})},{enabled:!!e&&!!n})},exports.useGetCardBrands=function(){return Kf(["GET/catalog/card-brands"],function(){return zh.getInstance().getCardBrands().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetChartFeedback=function(t){var n=this,r=t.chartCode,o=t.enabled;return Kf(["chart-feedback",r],function(){return e.__awaiter(n,void 0,void 0,function(){var t,n,o,a,i;return e.__generator(this,function(e){switch(e.label){case 0:t=zh.getInstance(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.getChartFeedback(r)];case 2:return n=e.sent(),(o=null==n?void 0:n.data)&&o.rating?[2,o]:[2,null];case 3:if(a=e.sent(),404===(null===(i=null==a?void 0:a.response)||void 0===i?void 0:i.status))return[2,null];throw a;case 4:return[2]}})})},{enabled:(void 0===o||o)&&!!r,staleTime:3e5})},exports.useGetChartsByUser=function(){return Kf(["chartgpt-user-charts"],function(){return zh.getInstance().getChartsByUser().then(function(e){return null==e?void 0:e.data})},{cacheTime:0})},exports.useGetChartsByUserWithResults=function(){var t=this;return Kf(["chartgpt-user-charts-with-results"],function(){return e.__awaiter(t,void 0,void 0,function(){var t,n,r,o=this;return e.__generator(this,function(a){switch(a.label){case 0:return[4,(t=zh.getInstance()).getChartsByUser()];case 1:return n=a.sent(),r=(null==n?void 0:n.data)||[],[4,Promise.all(r.map(function(n){return e.__awaiter(o,void 0,void 0,function(){var r,o,a,i,s,u,c,l;return e.__generator(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),[4,t.executeChartGPTChart(n.code)];case 1:return r=d.sent(),[2,e.__assign(e.__assign({},n),{user_prompt:null!==(i=null===(a=null==r?void 0:r.data)||void 0===a?void 0:a.user_prompt)&&void 0!==i?i:n.user_prompt,unit_to_display:null!==(u=null===(s=null==r?void 0:r.data)||void 0===s?void 0:s.unit_to_display)&&void 0!==u?u:n.unit_to_display,results:null!==(l=null===(c=null==r?void 0:r.data)||void 0===c?void 0:c.results)&&void 0!==l?l:[]})];case 2:return o=d.sent(),console.error("Failed to execute chart ".concat(n.chart_id,":"),o),[2,e.__assign(e.__assign({},n),{results:[]})];case 3:return[2]}})})}))];case 2:return[2,a.sent()]}})})})},exports.useGetCheckouts=function(t,n){var r=t.accountCode;return Kf(["checkouts",r],function(){return zh.getInstance().getCheckouts({accountCode:r}).then(function(e){return e.data})},e.__assign({cacheTime:0,enabled:Boolean(r),useErrorBoundary:!1},n))},exports.useGetConciergeAlertById=function(e){return Kf([ig,e],function(){return zh.getInstance().getConciergeAlertById(e).then(function(e){return e.data})},{enabled:!!e,useErrorBoundary:!1})},exports.useGetConciergeAlerts=function(){return Kf([ag],function(){return zh.getInstance().getConciergeAlerts().then(function(e){return e.data})},{useErrorBoundary:!1})},exports.useGetConditionalConfigRules=function(){return $f(function(e){return zh.getInstance().getConditionalConfigRules(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useGetConfigAllowlist=function(e,t){return Kf(["get-cofig-allow-list",e],function(){return zh.getInstance().getConfigAllowlist(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0,enabled:!!e&&!!t})},exports.useGetConnections=function(){return Kf(["connections"],function(){return zh.getInstance().getConnections().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.useGetConnectionsByPaymentMethod=function(e){var t=e.accountCode,n=e.paymentMethod,r=e.basePath,o=void 0===r?exports.SmartRouting.DEFAULT_ROUTING_TYPE:r;return Kf(["fetch-connections-by-payment-method",n,t,o],function(){return zh.getInstance().getConnectionsByPaymentMethod(t,n,o).then(function(e){return null==e?void 0:e.data})},{enabled:!!n&&!!t,cacheTime:0,useErrorBoundary:!1})},exports.useGetCountriesConfigPaymentLink=function(e){return void 0===e&&(e=!0),Kf(["countries",e],function(){return zh.getInstance().useGetCountriesConfig().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,keepPreviousData:!0})},exports.useGetCountriesConfigPaymentLinkV2=function(e){var t=localStorage.getItem("lang")||"en",n=e||t;return Kf(["countries-v2",n],function(){return zh.getInstance().useGetCountriesConfigV2(n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!0,keepPreviousData:!0})},exports.useGetCountryData=function(e){return Kf(["checkout-builder-country-data",e],function(){return zh.getInstance().getCountryData({accountCode:e}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:Boolean(e),useErrorBoundary:!1})},exports.useGetCredentials=function(t){var n=t.password,r=t.accountCode,o=t.otp,a=t.mfaToken;return Kf(["developers"],function(){return zh.getInstance().getDeveloperCredentials(n,r,o,a).then(function(t){return e.__assign(e.__assign({},null==t?void 0:t.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})},exports.useGetCredentialsMFA=function(){return $f(function(t){var n=t.password,r=t.accountCode,o=t.otp,a=t.mfaToken;return zh.getInstance().getDeveloperCredentials(n,r,o,a).then(function(t){return e.__assign(e.__assign({},null==t?void 0:t.data),{isValid:!0})}).catch(function(e){var t,n,r;return{isValid:!1,status:null===(t=e.response)||void 0===t?void 0:t.status,error:null===(r=null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.data)||void 0===r?void 0:r.data}})})},exports.useGetCustomizedApiKeys=function(e){return Kf(["fetch-customized-api-keys",e],function(){return zh.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)})},exports.useGetCustomizedApiKeysAccounts=function(){return Kf(["fetch-customized-api-keys-accounts"],function(){return zh.getInstance().getCustomizedApiKeysAccounts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})},exports.useGetCustomizedApiKeysMembers=function(){return Kf(["fetch-customized-api-keys-members"],function(){return zh.getInstance().getCustomizedApiKeysMembers().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})},exports.useGetCustomizedApiKeysProducts=function(){return Kf(["fetch-customized-api-keys-products"],function(){return zh.getInstance().getCustomizedApiKeysProducts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0})},exports.useGetCustomizedApiKeysToken=function(){return $f(function(e){var t=e.code,n=e.password,r=e.otp,o=e.mfaToken;return zh.getInstance().getCustomizedApiKeysToken(t,n,r,o).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})},exports.useGetDashboardStaticContents=function(){return Kf(["/cms/static-contents"],function(){return zh.getInstance().getDashboardStaticContents().then(function(e){var t,n;return yh(e)?xh:(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})},exports.useGetDialogs=function(){return Kf(["dialogs"],function(){return zh.getInstance().getDialogs().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,retryDelay:2e3,cacheTime:36e5})},exports.useGetDownloadReport=function(e,t,n){return void 0===t&&(t=!1),Kf(["reports/".concat(e)],function(){return zh.getInstance().downloadReports(e).then(function(e){return null==e?void 0:e.data})},{enabled:t,onSuccess:n,useErrorBoundary:!1})},exports.useGetEmailOtp=function(){return $f(function(){return zh.getInstance().getEmailOtp().then(function(e){return null==e?void 0:e.data})})},exports.useGetHashPylon=function(){var t=this;return Kf(["fetch-hash-pylon"],function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getHashPylon()]})})},{keepPreviousData:!0,useErrorBoundary:!1})},exports.useGetImpersonationEnabled=function(){return Kf(["fetch-impersonation-enabled"],function(){return zh.getInstance().getImpersonationEnabled().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})},exports.useGetImpersonationUsers=function(){return Kf(["fetch-impersonation-users"],function(){return zh.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})},exports.useGetInsightsReport=function(e){return Kf(["get-insights-reports",e],function(){return zh.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})},exports.useGetInsightsReportAgain=function(e){return Kf(["get-insights-reports-again",e],function(){return zh.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})},exports.useGetInstallmentsPlans=function(e,t,n){return void 0===t&&(t=!0),Kf(["installments-plans",e,n],function(){return zh.getInstance().getInstallmentPlans(n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(e)&&t,useErrorBoundary:!1})},exports.useGetIntegrationByAccountV2=function(e){var t=e.accountCode,n=e.organizationCode,r=Xf();return Kf(["organizations-account-integrations",t,n],function(){return zh.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||r}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:!!t,useErrorBoundary:!1})},exports.useGetIntegrationParams=function(e){var t=e.integration_code,n=e.enabled,r=e.accountCode;return Kf(["integration-params",t,r],function(){return t.includes("undefined")?{}:zh.getInstance().getIntegrationParams({accountCode:r,integration_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:n,useErrorBoundary:!1})},exports.useGetLanguages=function(){return Kf(["languages"],function(){return zh.getInstance().getLanguages().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:300})},exports.useGetLocales=function(){return Kf(["/cms/locales"],function(){return zh.getInstance().getLocales().then(function(e){return yh(e)?Sh:e.data}).catch(function(){return Sh})})},exports.useGetLoginMethods=function(){return Kf({queryKey:["get-login-methods"],queryFn:function(){return zh.getInstance().getLoginMethods().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})}})},exports.useGetMFAConfig=function(e,t){var n=e.organizationCode;return Kf(["mfa-config",n],function(){return zh.getInstance().getMFAConfig({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})},exports.useGetMFAExcludedUsers=function(e,t){var n=e.organizationCode;return Kf(["mfa-excluded-users",n],function(){return zh.getInstance().getMFAExcludedUsers({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})},exports.useGetMFAStatus=function(e,t){return Kf(["mfa-enforcement-status",e.accountCode],function(){return zh.getInstance().getMFAEnforcementStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})},exports.useGetMenu=function(){return Kf(["menu"],function(){return zh.getInstance().getMenu().then(function(e){return yh(e)?Eh:null==e?void 0:e.data}).catch(function(){return Eh})})},exports.useGetMergedNotifications=function(){return Kf(["notifications-merged"],function(){return zh.getInstance().getMergedNotifications().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{keepPreviousData:!1,cacheTime:0})},exports.useGetNameAndIcon=function(e,t){var n=e.paymentMethodType,r=e.type;return Kf(ug({paymentMethodType:n,type:r}),function(){return zh.getInstance().getNameAndIcon({paymentMethodType:n,type:r}).then(function(e){return null==e?void 0:e.data})},t)},exports.useGetNetworkTokensOnboardingByOrganization=function(t){var n=this;return Kf({queryKey:["network-tokens-onboarding",t],queryFn:function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getNetworkTokensOnboardingByOrganization(t)];case 1:return[2,e.sent().data]}})})},enabled:!!t,useErrorBoundary:!1,cacheTime:0})},exports.useGetNotificationsCustomer=function(e){return Kf(["notifications-customer",e],function(){return zh.getInstance().getNotificationsCustomer(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,keepPreviousData:!1})},exports.useGetNotificationsNumberMutation=function(){return $f(function(e){return zh.getInstance().getNotificationsNumber(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useGetOnboardingDetail=function(t,n,r){var o=this;return void 0===r&&(r=!0),Kf(["get-onboarding-detail",t,n.recipient_id,n.onboarding_id],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getOnboardingDetail(t,n.recipient_id,n.onboarding_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&!!n.recipient_id&&!!n.onboarding_id&&r,cacheTime:500,useErrorBoundary:!1})},exports.useGetOnboardingStatus=function(e){var t=e.accountCode,n=e.enabled;return Kf(["onboarding-status",t],function(){return zh.getInstance().getOnboardingStatus(t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})},exports.useGetOnboardingTimeline=function(t,n,r){var o=this;return void 0===r&&(r=!0),Kf(["get-onboarding-timeline",t,n.onboarding_id],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getOnboardingTimeline(t,n.onboarding_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&!!n.onboarding_id&&r,cacheTime:500,useErrorBoundary:!1})},exports.useGetOrgPermissionsCatalog=function(){return Kf(["fetch-org-permissions-catalog"],function(){return zh.getInstance().getOrgPermissionsCatalog().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetOrgRolesPermissions=function(){return Kf(["fetch-org-roles-permissions"],function(){return zh.getInstance().getOrgRolesPermissions().then(function(e){return null==e?void 0:e.data})})},exports.useGetOrganization=function(){return Kf(["fetch-organizations"],function(){return zh.getInstance().getOrganization().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})},exports.useGetOrganizationConfigs=function(){return Kf({queryKey:["organization-configs"],queryFn:function(){return zh.getInstance().getOrganizationConfigs().then(function(e){return null==e?void 0:e.data})},cacheTime:0,useErrorBoundary:!1})},exports.useGetOrganizationKeysMetadata=function(){return $f(function(){return zh.getInstance().getOrganizationKeysMetadata().then(function(e){return(null==e?void 0:e.data)||null})})},exports.useGetPaymentFilters=function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=exports.PaymentFiltersSection.PAYMENTS),Kf(["payment-filters",e,t],function(){return zh.getInstance().getPaymentFilters(t).then(function(e){return null==e?void 0:e.data})},{enabled:e,useErrorBoundary:!1,cacheTime:3e5})},exports.useGetPaymentLinkByCode=function(e){return Kf(["payment-link"],function(){return zh.getInstance().getPaymentLinksByCode(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})},exports.useGetPaymentLinks=function(e,t){return Kf(["fetch-payment-links",e,t],function(){return zh.getInstance().getPaymentLinks(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,cacheTime:0})},exports.useGetPaymentMethodAccounts=function(t,n){var r=t.paymentMethod,o=t.organizationCode;return Kf(lg({paymentMethod:r,organizationCode:o}),function(){return zh.getInstance().getPaymentMethodAccounts({paymentMethod:r,organizationCode:o}).then(function(e){return null==e?void 0:e.data})},e.__assign({cacheTime:0,enabled:Boolean(r),useErrorBoundary:!1},n))},exports.useGetPaymentMethodsAndProviders=function(){return Kf({queryKey:["/payment-methods/providers"],queryFn:function(){return zh.getInstance().getPaymentMethodsAndProviders().then(function(e){return null==e?void 0:e.data})},cacheTime:864e5,useErrorBoundary:!1})},exports.useGetPaymentMetricsFilters=function(){return Kf(["payment-metrics-filters"],function(){return zh.getInstance().getPaymentMetricsFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetPaymentStatusesStyles=function(){return Kf(["/payment/statuses/style"],function(){return zh.getInstance().useGetPaymentStatusesStyles().then(function(e){return yh(e)?vh:null==e?void 0:e.data}).catch(function(){return vh})})},exports.useGetPaymentTransactionsDetails=function(e){var t=e.transaction_code,n=e.enabled;return Kf(["payment-transaction-details",t],function(){return zh.getInstance().getPaymentTransactionsDetails({transaction_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})},exports.useGetPaymentV2=function(t){var n=this,r=t.paymentCode,o=t.enabled,a=void 0===o||o,i=zh.getInstance();return Kf(["get-payment-v2",r],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,i.getPaymentV2(r).then(function(e){return e.data})]})})},{enabled:a,cacheTime:500,useErrorBoundary:!1})},exports.useGetPaymentsMethodsByCountry=function(e){var t=Xf();return Kf(["payment-methods",e],function(){return zh.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})},exports.useGetPayoutDetail=function(e){return Kf(["GET/payout-detail",JSON.stringify(e)],function(){var t=zh.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})},exports.useGetPayoutHistoryDetail=function(e){var t=Xf();return Kf(["GET/payout-history-detail",JSON.stringify(e)],function(){return zh.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})},exports.useGetPayoutTimeline=function(t,n){var r=this;void 0===n&&(n=!0);var o=Xf();return Kf(["getPayoutTimeline",t,o],function(){return e.__awaiter(r,void 0,void 0,function(){var n;return e.__generator(this,function(e){return n=zh.getInstance(),t?[2,n.getPayoutTimeline(t,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]:[2]})})},{enabled:n&&!!t&&!!o,cacheTime:500,useErrorBoundary:!1})},exports.useGetPayoutTransactionDetail=function(e){return Kf(["GET/payout-transaction-detail",JSON.stringify(e)],function(){return zh.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})},exports.useGetPendingDuplicateAccounts=function(e){return Kf({queryKey:["pending-duplicate-accounts",e],queryFn:function(){return zh.getInstance().getPendingDuplicateAccounts()},useErrorBoundary:!1,keepPreviousData:!0,refetchInterval:e})},exports.useGetPermissions=function(e,t){return Kf(["fetch-permissions",e,t],function(){var e,t,n,r=localStorage.getItem("account"),o=localStorage.getItem("user"),a=r&&JSON.parse(r),i=o&&JSON.parse(o);return((null==i?void 0:i.merlin)?null===(e=null==i?void 0:i.merlin)||void 0===e?void 0:e.permissions:null===(n=null===(t=null==a?void 0:a.value)||void 0===t?void 0:t.role)||void 0===n?void 0:n.permission_ids.map(function(e){return{permission_name:e,description:e,resource_server_name:e,resource_server_identifier:e}}))||[]})},exports.useGetPermissionsCatalog=function(){return Kf(["fetch-permissions-catalog"],function(){return zh.getInstance().getPermissionsCatalog().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.useGetProfile=og,exports.useGetProofOfCancel=function(t,n){var r=this,o=Xf();return Kf(["GET/useGetProofOfCancel",o,t,n],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getProofOfCancel(t,o,n).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&!!o&&!!n,cacheTime:0,useErrorBoundary:!1})},exports.useGetProofOfPayment=function(t,n){var r=this,o=Xf();return Kf(["GET/useGetProofOfPayment",o,t,n],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getProofOfPayment(t,o,n).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&!!o&&!!n,cacheTime:0,useErrorBoundary:!1})},exports.useGetProviderParams=function(e){var t=Xf();return Kf(["organizations-provider-params",e],function(e){var n=e.queryKey;return zh.getInstance().getProviderParams(n[1],t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.id),useErrorBoundary:!1})},exports.useGetRecipientById=function(t,n,r){var o=this;return void 0===r&&(r=!0),Kf(["get-recipient-by-id",t,n.recipient_id],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getRecipientById(t,n.recipient_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&!!n.recipient_id&&r,cacheTime:500,useErrorBoundary:!1})},exports.useGetRecipients=function(t,n,r){var o=this;return void 0===r&&(r=!0),Kf(["get-recipients",t,n],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getRecipients(t,n).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&r,cacheTime:0,useErrorBoundary:!1})},exports.useGetReconciliationActive=function(){return Kf(["GET/v1/reconciliation/active"],function(){return zh.getInstance().getReconciliationActive().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{useErrorBoundary:!1})},exports.useGetReconciliationAgendaInsightsByKey=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/agenda/insights",t,n],function(){return zh.getInstance().getReconciliationAgendaInsightByKey(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetReconciliationFilters=function(){return Kf(["GET-reconciliation-filters"],function(){return zh.getInstance().getReconciliationFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetReconciliationInsightsAmountConflictAggregators=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-amount-conflict-aggregators",t],function(){return zh.getInstance().getReconciliationInsightsAmountConflictAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsAmountConflictList=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-amount-conflict-list",t],function(){return zh.getInstance().getReconciliationInsightsAmountConflictList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsAmountToBeSettledSummary=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-amount-to-be-settled-summary",t],function(){return zh.getInstance().getReconciliationInsightsAmountToBeSettledSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsConflictDateAggregators=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-conflict-date-aggregators",t],function(){return zh.getInstance().getReconciliationInsightsConflictDateAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsConflictDateList=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-conflict-date-list",t],function(){return zh.getInstance().getReconciliationInsightsConflictDateList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsConflictDateSummary=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-conflict-date-summary",t],function(){return zh.getInstance().getReconciliationInsightsConflictDateSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsConflictsSummary=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-conflicts-summary",t],function(){return zh.getInstance().getReconciliationInsightsConflictsSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsFeesChargedSummary=function(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Kf(["reconciliation-insights-fees-charged-summary",t,n],function(){return zh.getInstance().getReconciliationInsightsFeesChargedSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})},exports.useGetReconciliationInsightsIncorrectFeesAggregators=function(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Kf(["reconciliation-insights-incorrect-fees-aggregators",t,n],function(){return zh.getInstance().getReconciliationInsightsIncorrectFeesAggregators(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})},exports.useGetReconciliationInsightsIncorrectFeesList=function(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Kf(["reconciliation-insights-incorrect-fees-list",t,n],function(){return zh.getInstance().getReconciliationInsightsIncorrectFeesList(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})},exports.useGetReconciliationInsightsIncorrectFeesSummary=function(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Kf(["reconciliation-insights-incorrect-fees-summary",t,n],function(){return zh.getInstance().getReconciliationInsightsIncorrectFeesSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})},exports.useGetReconciliationInsightsNotConfirmAggregators=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-not-confirm-aggregators",t],function(){return zh.getInstance().getReconciliationInsightsNotConfirmAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsNotConfirmList=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-not-confirm-list",t],function(){return zh.getInstance().getReconciliationInsightsNotConfirmList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsNotConfirmSummary=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-not-confirm-summary",t],function(){return zh.getInstance().getReconciliationInsightsNotConfirmSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsNotReconciledAggregators=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-not-reconciled-aggregators",t],function(){return zh.getInstance().getReconciliationInsightsNotReconciledAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsNotReconciledList=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-not-reconciled-list",t],function(){return zh.getInstance().getReconciliationInsightsNotReconciledList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciledAggregators=function(e){var t=e.body,n=e.dateFilter,r=e.transactionType,o=e.enabled;return Kf(["reconciliation-insights-reconciled-aggregators",t,n,r],function(){return zh.getInstance().getReconciliationInsightsReconciledAggregators(t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===o||o,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciledList=function(e){var t=e.body,n=e.dateFilter,r=e.transactionType,o=e.enabled;return Kf(["reconciliation-insights-reconciled-list",t,n,r],function(){return zh.getInstance().getReconciliationInsightsReconciledList(t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===o||o,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciledSummary=function(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Kf(["reconciliation-insights-reconciled-summary",t,n],function(){return zh.getInstance().getReconciliationInsightsReconciledSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciliationRateByAccount=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-reconciliation-rate-by-account",t],function(){return zh.getInstance().getReconciliationInsightsReconciliationRateByAccount(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciliationRateByCurrency=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-reconciliation-rate-by-currency",t],function(){return zh.getInstance().getReconciliationInsightsReconciliationRateByCurrency(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciliationRateByProvider=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-reconciliation-rate-by-provider",t],function(){return zh.getInstance().getReconciliationInsightsReconciliationRateByProvider(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsStatusConflictAggregators=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-status-conflict-aggregators",t],function(){return zh.getInstance().getReconciliationInsightsStatusConflictAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsStatusConflictList=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-status-conflict-list",t],function(){return zh.getInstance().getReconciliationInsightsStatusConflictList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationMetrics=function(e,t){return Kf(["fetch-reconciliation-metrics",e],function(){return zh.getInstance().getReconciliationMetrics(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t,cacheTime:500})},exports.useGetReconciliationTransactionStatusesStyles=function(){return Kf(["/reconciliation/transaction/statuses/style"],function(){return zh.getInstance().useGetReconciliationTransactionStatusesStyles().then(function(e){return yh(e)?_h:null==e?void 0:e.data}).catch(function(){return _h})},{useErrorBoundary:!1})},exports.useGetReconciliationTransactions=function(e,t){return Kf(["fetch-reconciliation-transaction",e],function(){return zh.getInstance().getReconciliationTransactions(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})},exports.useGetReconciliationsReportColumns=function(e,t,n){return Kf(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],function(){return zh.getInstance().getReconciliationsReportColumns(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})},exports.useGetReconciliationsReportTemplates=function(e){return Kf(["GET/reconciliation/reports/templates"],function(){return zh.getInstance().getReconciliationReportTemplates().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})},exports.useGetRefundPdf=function(t,n){var r=this,o=Xf();return Kf(["getRefundPdf",t,o,n],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getRefundPdf(t,o,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})]})})},{enabled:!!t&&!!o,useErrorBoundary:!1})},exports.useGetReportColumns=function(t,n,r){var o=this;return Kf(["GET/reports/columns/".concat(n,"/").concat(r)],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(t){return[2,zh.getInstance().getReportColumns(n,r).then(function(t){return n===exports.TemplateType.ALL&&r===exports.ReportType.PAYMENTS?e.__spreadArray(e.__spreadArray([],(null==t?void 0:t.data)||[],!0),[dg],!1):null==t?void 0:t.data}).catch(function(e){return e})]})})},{enabled:t,useErrorBoundary:!1})},exports.useGetReportTemplates=function(e){return Kf(["GET/reports/templates"],function(){return zh.getInstance().getReportTemplates().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,useErrorBoundary:!1})},exports.useGetReportsList=function(){return Kf(["reports"],function(){return zh.getInstance().reportsList().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetReportsListMultiEnv=function(e){return void 0===e&&(e=!0),Kf(["reports-multi-env"],function(){return zh.getInstance().reportsListMultiEnv().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e})},exports.useGetRequiredFields=function(e,t){var n=e.paymentMethodType,r=e.type;return Kf(cg({paymentMethodType:n,type:r}),function(){return zh.getInstance().getRequiredFields({paymentMethodType:n,type:r}).then(function(e){return null==e?void 0:e.data})},t)},exports.useGetRoles=function(){return Kf(["fetch-roles"],function(){return zh.getInstance().getRoles().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetRolesForImpersonation=function(t){var n=this;return Kf({queryKey:["roles-for-impersonation",t],queryFn:function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getRolesForImpersonation(t).then(function(e){var t,n;return(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.roles)||void 0===n?void 0:n.map(function(e){return{label:e.name,value:e.id}}))||[]})]})})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!t})},exports.useGetRolesPermissions=function(){return Kf(["fetch-rolespermissions"],function(){return zh.getInstance().getRolesPermissions().then(function(e){return null==e?void 0:e.data})})},exports.useGetRoutingMonitorsTemplate=function(e,t){return Kf(["fetch-routing-monitors-template",e],function(){return zh.getInstance().getRoutingMonitorsTemplate(e,t).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e&&!!t&&"NONE"!==e,useErrorBoundary:!1})},exports.useGetRoutingMonitorsTemplates=function(e){return Kf(["fetch-routing-monitors-templates",e],function(){return zh.getInstance().getRoutingMonitorsTemplates(e).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})},exports.useGetRule=function(){return $f(function(e){return zh.getInstance().getRule(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useGetSamlConfig=function(e){return Kf(["fetch-organization-saml-config",e],function(){return zh.getInstance().getSamlConfig().then(function(e){return e.data})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})},exports.useGetScheduledReportsList=function(e){return Kf(["GET/scheduled-reports",e],function(){return zh.getInstance().getScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})},exports.useGetSettlements=function(e,t){return Kf(["fetch-reconciliation-settlements",e],function(){return zh.getInstance().getReconciliationSettlements(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})},exports.useGetSmartRoutingConditionPaymentMethod=function(e,t){return Kf(["smart-routing-condition-payment-method",e,t],function(){return zh.getInstance().getSmartRoutingConditionPaymentMethod(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:null!==t})},exports.useGetSmartRoutingConditionTypes=function(e,t,n){return void 0===n&&(n=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-condition-types",e,t,n],function(){return zh.getInstance().getSmartRoutingConditionTypes(e,t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e})},exports.useGetSmartRoutingConditionTypesValues=function(e,t){return Kf(["smart-routing-condition-types-values",t,e],function(){return zh.getInstance().getSmartRoutingConditionTypesValues(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!e,useErrorBoundary:!1})},exports.useGetSmartRoutingDataReport=function(e){return Kf(["data-report",e],function(){return zh.getInstance().getSmartRoutingDataReport(e).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,useErrorBoundary:!1})},exports.useGetSmartRoutingDeclineGroups=function(e,t){return void 0===t&&(t=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-decline-groups",e,t],function(){return zh.getInstance().getSmartRoutingDeclinedGroup(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})},exports.useGetSmartRoutingMethods=function(e,t){return void 0===t&&(t=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-methods",e,t],function(){return zh.getInstance().getSmartRoutingMethods(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})},exports.useGetSmartRoutingNextRoute=function(e,t,n,r){return void 0===r&&(r=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-next-route",e,n,t,r],function(){return zh.getInstance().getSmartRoutingNextSteps(e,t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,useErrorBoundary:!1})},exports.useGetSmartRoutingPaymentRoute=function(e,t,n){return void 0===n&&(n=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-payment-route",e,t,n],function(){return zh.getInstance().getSmartRoutingPaymentRoute(e,t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!t,cacheTime:0,useErrorBoundary:!1})},exports.useGetSmartRoutingSearchConditionValues=function(e){var t=e.text,n=e.conditionType;return Kf(["smart-routing-search-condition-values",t,n],function(){return zh.getInstance().getSmartRoutingSearchConditionValues(n,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})},exports.useGetSmartRoutingSimulateConditionTypeValues=function(e,t){return void 0===t&&(t=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-simulate-condition-type-values",e,t],function(){return zh.getInstance().getSmartRoutingSimulateConditionTypeValues(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})},exports.useGetSmartRoutingWorkflow=function(e,t,n){return void 0===n&&(n=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-workflow",t,e,n],function(){return zh.getInstance().getSmartRoutingWorkflow(e,t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e,cacheTime:0,retry:!1})},exports.useGetSmartRoutingWorkflowVersion=function(e){var t=e.accountCode,n=e.workflowVersionId,r=e.routingType,o=void 0===r?exports.SmartRouting.DEFAULT_ROUTING_TYPE:r;return Kf(["smart-routing-workflow-version",n,t,o],function(){return zh.getInstance().getSmartRoutingWorkflowVersion(t,n,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})},exports.useGetStylingSdkDynamic=function(e){var t=e.accountCode;return Kf(["styling-sdk-dynamic",t],function(){return zh.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})},exports.useGetStylingSettingsV2=function(e){var t=e.accountCode;return Kf(["styling-settings-v2",t],function(){return zh.getInstance().getStylingSettingsV2({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})},exports.useGetSubscriptionByCode=function(e,t){return void 0===t&&(t=!0),Kf(["subscription",e],function(){return zh.getInstance().getSubscriptionByCode(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&t,cacheTime:500})},exports.useGetSubscriptionPayments=function(e,t,n,r){return void 0===r&&(r=!0),Kf(["subscription-payments",e,t,n],function(){return zh.getInstance().getSubscriptionPayments(e,t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&r,cacheTime:0})},exports.useGetTeamsFiltersMembers=function(){var e=Xf();return Kf(["teams-filters-members"],function(){return zh.getInstance().teamsFiltersMembers({organizationCode:e}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0})},exports.useGetTimeZoneCatalog=function(){return Kf(["timezone-catalog"],function(){return zh.getInstance().useGetTimeZoneCatalog().then(function(e){return yh(e)?kh:null==e?void 0:e.data}).catch(function(){return kh})})},exports.useGetTimezonePaymentLink=function(e){return Kf(["timezone"],function(){return zh.getInstance().getTimezone(e).then(function(e){return yh(e)?kh:null==e?void 0:e.data}).catch(function(){return kh})},{enabled:!0,keepPreviousData:!0})},exports.useGetTokenValidation=function(){return $f(function(e){var t=e.password,n=e.otp;return zh.getInstance().getMfaTokenValidation(t,n).then(function(e){return null==e?void 0:e.data})})},exports.useGetTransactionDetailsV2=function(t){var n=this,r=t.payment_code,o=t.enabled,a=void 0===o||o,i=zh.getInstance();return Kf(["get-payment-transaction-details-v2",r],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,i.getTransactionDetailsV2({payment_code:r}).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!r&&a,cacheTime:0,useErrorBoundary:!1})},exports.useGetTransactionHistoryByPaymentCode=function(e){var t=e.payment_code,n=e.enabled;return Kf(["transaction-history",t],function(){return zh.getInstance().getTransactionHistoryByPaymentCode({payment_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})},exports.useGetTransactionRawResponse=function(t){var n=this,r=t.transaction_code,o=t.enabled,a=void 0===o||o,i=zh.getInstance();return Kf(["get-payment-transaction-raw-response",r],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,i.getTransactionRawResponse({transaction_code:r})]})})},{enabled:!!r&&a,cacheTime:0,useErrorBoundary:!1})},exports.useGetTransactionStatusesStyles=function(){return Kf(["/transaction/statuses/style"],function(){return zh.getInstance().useGetTransactionStatusesStyles().then(function(e){return yh(e)?bh:null==e?void 0:e.data}).catch(function(){return bh})},{cacheTime:36e5,useErrorBoundary:!1})},exports.useGetTranslations=function(){var e=localStorage.getItem("lang")||"en";return Kf(["translations",e],function(){return zh.getInstance().getTranslations(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:3e4})},exports.useGetUnifiedExportStatus=function(e){var t=e.tab,n=e.exportId,r=e.enabled,o=void 0!==r&&r,a=e.onSuccess;return Kf(["unified-export-status",t,n],function(){return zh.getInstance().getUnifiedExportStatus(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!n&&o,cacheTime:0,useErrorBoundary:!1,onSuccess:a})},exports.useGetUnifiedExportsList=function(e){var t=e.tab,n=e.page,r=void 0===n?0:n,o=e.size,a=void 0===o?10:o,i=e.enabled;return Kf(["unified-exports-list",t,r,a],function(){return zh.getInstance().getUnifiedExportsList(t,r,a).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===i||i,cacheTime:0,useErrorBoundary:!1})},exports.useGetUserExportStatus=function(e){var t=e.exportCode,n=e.enabled;return Kf(["user-export-status",t],function(){return zh.getInstance().getUserExportStatus({exportCode:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),refetchInterval:function(e){return("PENDING"===(null==e?void 0:e.status)||"IN_PROGRESS"===(null==e?void 0:e.status))&&5e3},useErrorBoundary:!1})},exports.useGetUserFull=function(){var t=this;return Kf(["get-user-full"],function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getUserFull()];case 1:return[2,e.sent().data]}})})},{keepPreviousData:!0,useErrorBoundary:!1})},exports.useGetUsersToImpersonate=function(t,n,r,o,a,i){var s=this;return void 0===r&&(r=1),void 0===o&&(o=10),Kf(["get-users-to-impersonate",t,n,r,o,a,i],function(){return e.__awaiter(s,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getUsersToImpersonate(t,n,r,o,a,i).then(function(e){return null==e?void 0:e.data})]})})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!t})},exports.useGetValidateOpsgenieKey=function(e){return Kf(["validate-opsgenie-key",e],function(){return zh.getInstance().getValidateOpsgenieKey(e).then(function(e){return null==e?void 0:e.data}).catch(function(){return{error:!0}})},{enabled:!!e,cacheTime:0})},exports.useGetWebhookParamsV2=function(){return Kf(["params-catalog"],function(){return zh.getInstance().getWebhookParamsV2().then(function(e){return null==e?void 0:e.data})})},exports.useGetWebhookTimeline=function(t){var n=this,r=t.paymentCode,o=t.enabled;return Kf({queryKey:["webhook-timeline",r],queryFn:function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getWebhookTimeline(r).then(function(e){return null==e?void 0:e.data})]})})},enabled:(void 0===o||o)&&!!r,staleTime:3e4,cacheTime:3e5,useErrorBoundary:!1})},exports.useGetWebhooksV2Detail=function(e){var t=e.accountCode,n=e.enabled;return Kf(["webhooks-detail",t],function(){return zh.getInstance().getWebhooksV2Detail({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!n})},exports.useGetWebhooksV3=function(e){var t=e.accountCode,n=e.name;return Kf(["webhooks",t,n],function(){return zh.getInstance().getWebhooksV3({accountCode:t,name:n}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,useErrorBoundary:!1})},exports.useInsights3dsConversionRateAndEvolution=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-3ds-conversion-rate-and-evolution",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsights3dsConversionRateAndEvolution(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsDeclineReasons=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-3ds-decline-reasons",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsights3dsDeclineReasons(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsFrictionlessVsChallenge=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-3ds-frictionless-vs-challenge",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsights3dsFrictionlessVsChallenge(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsVolumeAndCountTx=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-3ds-volume-and-count-tx",n,t],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsights3dsVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksByCardBrand=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-by-card-brand",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksByCardBrand(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksByProviderAndCardBrand=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksByProviderAndCardBrand(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksDisputed=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-disputed",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksDisputed(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksReasonsDistribution=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-reasons-distribution",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksReasonsDistribution(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksStatusDistribution=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-status-distribution",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksStatusDistribution(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksTotalRateAndEvolution=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-total-rate-and-evolution",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksTotalRateAndEvolution(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksVolumeAndCountTx=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-volume-and-count-tx",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksWinRate=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-win-rate",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksWinRate(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsConversionRateMetricsV2=function(e,t,n,r){return void 0===n&&(n=!0),Kf(["get-insights-conversion-rate-metrics-v2",e,t],function(){return zh.getInstance().getInsightsMetricsConversionRateV2(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:n&&(!!(null==e?void 0:e.currency_code)&&"Empty"!==(null==e?void 0:e.currency_code)&&"string"==typeof(null==e?void 0:e.currency_code)||Array.isArray(null==e?void 0:e.currency_code)&&0===(null==e?void 0:e.currency_code.length)),staleTime:200,cacheTime:200,useErrorBoundary:!1,retry:1})},exports.useInsightsCustomerPaymentsAndFraudMetrics=function(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Kf(["get-insights-customer-payment-fraud-metrics",t,e],function(){return zh.getInstance().getInsightsMetricsCustomerPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsFallbackMetrics=function(e){return Kf(["get-insights-conversion-rate-fallback-metrics",e],function(){return zh.getInstance().getInsightFallbackMetrics(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled),cacheTime:200,useErrorBoundary:!1})},exports.useInsightsFraudScreeningConversionRate=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-fraud-screening-conversion-rate",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsFraudScreeningConversionRate(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsFraudScreeningVolumeAndCountTx=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-fraud-screening-volume-and-count-tx",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsFraudScreeningVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsHomeMetrics=function(e){return Kf(["get-insights-home-metrics",e],function(){return zh.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})},exports.useInsightsOverviewMetrics=function(e){return Kf(["get-insights-overview",e],function(){return zh.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})},exports.useInsightsOverviewMetricsV3=function(e,t){var n=!!(null==e?void 0:e.enabled)&&void 0!==(null==e?void 0:e.account_code);return Kf(["get-insights-overview-v3",e,t],function(){return zh.getInstance().getInsightOverviewV3(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:0,useErrorBoundary:!1})},exports.useInsightsTotalPaymentsAndFraudMetrics=function(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Kf(["get-insights-total-payment-fraud-metrics",t,e],function(){return zh.getInstance().getInsightsMetricsTotalPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsVolumeMetrics=function(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Kf(["get-insights-volume-metrics",t,e],function(){return zh.getInstance().getInsightsMetricsVolume(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsVolumeMetricsV2=function(e,t,n,r){return void 0===r&&(r=!0),delete t.account_code,Kf(["get-insights-volume-metrics-v2",t,e,n],function(){return zh.getInstance().getInsightsMetricsVolumeV2(e,n,t).then(function(e){return null==e?void 0:e.data})},{enabled:r,cacheTime:200,useErrorBoundary:!1})},exports.useInviteUsersMultiaccountMassive=function(){return $f(function(e){return zh.getInstance().inviteUsersMassive(e,e.organizationCode)})},exports.useInviteUsersMultiaccountMassiveV2=function(){return $f(function(e){return zh.getInstance().inviteUsersMassiveV2(e)})},exports.useIsTesting=Jf,exports.useListSubscriptions=function(){return $f(["post-list-subscriptions"],function(e){return zh.getInstance().postListSubscriptions(e).then(function(e){return null==e?void 0:e.data})})},exports.useListUserExports=function(e){var t=e.page,n=void 0===t?0:t,r=e.pageSize,o=void 0===r?20:r,a=e.enabled;return Kf(["user-exports-list",n,o],function(){return zh.getInstance().listUserExports({page:n,pageSize:o}).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===a||a,useErrorBoundary:!1})},exports.useLocalStorage=Zf,exports.useLoginMethods=function(){return $f(function(e){return zh.getInstance().changeLoginMethods(e)})},exports.useNetworkTokensOnboarding=function(){var t=this;return Kf({queryKey:["smart-routing-network-tokens-onboarding"],queryFn:function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})},exports.useNewPostConnectionValidate=function(){return $f(["new-post-connection-validate"],function(){return zh.getInstance().postMultiConnectionValidate().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.useOrganizationCode=Xf,exports.usePatchAccountV2=function(){return $f(function(e){var t=e.name,n=e.code,r=e.principal;return zh.getInstance().patchAccountV2({name:t,code:n,principal:r})})},exports.usePatchAddAllowlistItems=function(){return $f(["post-add-allowlist-items"],function(e){var t=e.payload;return zh.getInstance().patchAddAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePatchAllowedIps=function(){return $f(["developers-patch-allowed-ips"],function(t){return zh.getInstance().patchAllowedIps(t).then(function(t){return(null==t?void 0:t.data)?e.__assign(e.__assign({},null==t?void 0:t.data),{isError:!1}):null}).catch(function(t){return e.__assign(e.__assign({},t),{isError:!0})})},{cacheTime:0})},exports.usePatchAllowlist=function(){return $f(["patch-allowlist"],function(e){var t=e.payload;return zh.getInstance().patchAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePatchAndExecuteChart=function(t,n,r){var o=this;return void 0===r&&(r=!0),Kf(["chartgpt-patch-and-execute",t,n],function(){return e.__awaiter(o,void 0,void 0,function(){var r,o,a,i,s;return e.__generator(this,function(e){switch(e.label){case 0:return[4,(r=zh.getInstance()).patchChartGPTChart(t,n)];case 1:return o=e.sent(),a=null==o?void 0:o.data,[4,r.executeChartGPTChart(t)];case 2:return i=e.sent(),s=null==i?void 0:i.data,[2,{chart:a,execution:s}]}})})},{enabled:r&&!!t,retry:!1})},exports.usePatchApiKeysEditNote=function(){return $f(function(e){var t=e.payload,n=e.code,r=e.password;return zh.getInstance().patchApiKeysEditNote(t,n,r).then(function(e){return e.data}).catch(function(e){return e})})},exports.usePatchChangeStatusAllowlist=function(){return $f(["patch-change-status-allowlist"],function(e){var t=e.payload;return zh.getInstance().patchChangeStatusAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePatchChangeStatusAllowlistItem=function(){return $f(["patch-change-status-allowlist-item"],function(e){var t=e.payload;return zh.getInstance().patchChangeStatusAllowlistItem({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePatchChartName=function(){return $f(function(e){var t=e.chart_id,n=e.type,r=e.name,o=e.user_prompt,a=void 0===o?"":o;return zh.getInstance().patchChartGPTChart(t,{type:n,name:r,user_prompt:a}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.usePatchConnection=function(){return $f(["patch-connection"],function(e){var t=e.payload,n=e.connectionCode;return zh.getInstance().patchConnection({payload:t,connectionCode:n}).then(function(e){return null==e?void 0:e.data})})},exports.usePatchOrganizationKeysNote=function(){return $f(function(e){var t=e.note,n=e.password;return zh.getInstance().patchOrganizationKeysNote({note:t},n).then(function(e){return(null==e?void 0:e.data)||null})})},exports.usePathCreateCustomizedApiKeys=function(){return $f(function(e){var t=e.payload,n=e.code;return zh.getInstance().pathCreateCustomizedApiKeys(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePathNotifications=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().pathNotification(n)];case 1:return[2,null==(t=e.sent())?void 0:t.data]}})})})},exports.usePauseSubscription=function(){return $f(["post-pause-subscription"],function(e){var t=e.subscriptionCode;return zh.getInstance().postPauseSubscription(t).then(function(e){return null==e?void 0:e.data})})},exports.usePayoutsFilters=function(t){var n=this;void 0===t&&(t=!0);var r=Xf();return Kf(["getPayoutsFilters",r],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getPayoutsFilters(r).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{enabled:t&&!!r})},exports.usePayoutsList=function(e){return Kf(["usePayoutsList",e&&JSON.stringify(e)],function(){var t=zh.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})},exports.usePostAccount=function(){return $f(function(e){var t=e.name,n=e.principal;return zh.getInstance().postAccount(t,n)})},exports.usePostAllowlistMultiAccount=function(e,t){return void 0===t&&(t=!0),Kf(["query-post-get-allowlist-multi-account",JSON.stringify(e)],function(){return zh.getInstance().postGetAllowlist({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e&&t,cacheTime:0})},exports.usePostApiKeysRoll=function(){return $f(function(e){var t=e.payload,n=e.code,r=e.password;return zh.getInstance().postApiKeysRoll(t,n,r).then(function(e){return e.data}).catch(function(e){return e})})},exports.usePostApiLogs=function(e){return Kf(["api-logs",e],function(){return zh.getInstance().postApiLogs({payload:e}).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.organizationCode,cacheTime:0,useErrorBoundary:!1})},exports.usePostAuditMonitors=function(e){return $f(function(e){var t=e.payload;return zh.getInstance().postAuditMonitors(t)},{onMutate:e.onMutate})},exports.usePostBatchRefundByFile=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().batchRefundByFile({payload:n}).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})},exports.usePostBlackListBatch=function(e){var t=e.handleSetProgress;return $f(["post-blacklist-batch"],function(e){var n=e.blacklist_code,r=e.expiration_days,o=e.file;return zh.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:r,file:o,handleSetProgress:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.usePostBlackListItems=function(){return $f(["post-blacklist-items"],function(e){var t=e.payload;return zh.getInstance().postBlackListItems({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.usePostBlackListMultiAccount=function(){return $f(["post-blacklist-multi-account"],function(e){var t=e.payload;return zh.getInstance().postBlackListMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostBlockList=function(e,t,n,r){var o;return Kf(["post-black-list",e],function(){return zh.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=r?r:25).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:(null===(o=e[0])||void 0===o?void 0:o.length)>0&&null!==t,useErrorBoundary:!1})},exports.usePostCall=function(){return $f(function(e){return zh.getInstance().postCall(e)})},exports.usePostChangeStatusConnection=function(){return $f(["post-change-status-connection"],function(e){var t=e.payload,n=e.accountCode;return zh.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.usePostConnectionMultiAccount=function(){return $f(["post-connection"],function(e){var t=e.payload;return zh.getInstance().postMultiConnection({payload:t}).then(function(e){return null==e?void 0:e.data})})},exports.usePostCreateAllowlistMultiAccount=function(){return $f(["post-create-allowlist-multi-account"],function(e){var t=e.payload;return zh.getInstance().postCreateAllowlistMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostCreateCustomizedApiKeys=function(){return $f(function(e){var t=e.payload;return zh.getInstance().postCreateCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostCreateInsightsReport=function(){return $f(function(e){var t=e.payload;return zh.getInstance().postCreateInsightsReport(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostCreateRuleMultiAccount=function(){return $f(function(e){var t=e.payload,n=e.accountCode;return zh.getInstance().postCreateRuleMultiAccount(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostCredentialsValidatePassword=function(){return $f(function(e){var t=e.passwordOtp;return zh.getInstance().getDeveloperCredentialsValidatePassword(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})},exports.usePostCredentialsValidatePasswordRegularUser=function(){return $f(function(e){var t=e.password;return zh.getInstance().getDeveloperCredentialsValidatePasswordRegularUser(t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})},exports.usePostCredentialsWithOtpMfa=function(){return $f(function(e){var t=e.password,n=e.accountCode,r=e.otp,o=e.mfaToken;return zh.getInstance().getDeveloperCredentials(t,n,r,o).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})},exports.usePostDefaultRoutes=function(){return $f(function(e){var t=e.payload;return zh.getInstance().postDefaultRoutes({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})},exports.usePostEditRule=function(){return $f(function(e){var t=e.payload,n=e.ruleId,r=e.accountCode;return zh.getInstance().postEditRule(t,n,r).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.usePostFraudTransactions=function(t){var n=this;return Kf(["POST/fraud-transactions",JSON.stringify(t)],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().postFraudTransactions(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&Object.keys(t).length>0,cacheTime:0,useErrorBoundary:!1})},exports.usePostGetAllowlistItems=function(){return $f(["post-get-allowlist-items"],function(e){var t=e.payload;return zh.getInstance().postAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostGetAllowlistMultiAccount=function(){return $f(["post-get-allowlist-multi-account"],function(e){var t=e.payload;return zh.getInstance().postGetAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostMembersPaginatedV2=function(e){var t=e.organizationCode,n=e.accountCodes,r=e.search,o=e.status,a=e.roleId,i=e.statuses,s=e.roleIds,u=e.page,c=e.pageSize,l=Xf();return Kf(["fetch-post-members-v2",t,n,r,o,a,i,s,u,c],function(){return zh.getInstance().postMembersPaginatedV2({organizationCode:l,accountCodes:n,search:r,status:o,roleId:a,statuses:i,roleIds:s,page:u,pageSize:c}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!n,cacheTime:0,useErrorBoundary:!1})},exports.usePostNetworkTokensOnboarding=function(){var t=this;return $f(function(n){var r=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().postNetworkTokensOnboarding(r)];case 1:return[2,e.sent().data]}})})},{useErrorBoundary:!1})},exports.usePostOrganizationConfigs=function(){return $f(function(e){return zh.getInstance().postOrganizationConfigs(e)})},exports.usePostOrganizationKeysMarkRevealed=function(){return $f(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return zh.getInstance().postOrganizationKeysMarkRevealed(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})},exports.usePostOrganizationKeysRoll=function(){return $f(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return zh.getInstance().postOrganizationKeysRoll(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})},exports.usePostOrganizationKeysTamRequest=function(){return $f(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return zh.getInstance().postOrganizationKeysTamRequest(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})},exports.usePostPaymentsEvaluated=function(e){return Kf(["fetch-payments-evaluated",e],function(){return zh.getInstance().postPaymentsEvaluated(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})},exports.usePostPaymentsLazy=function(t){var n=this;return Kf(["fetch-payments-lazy",t],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().postPaymentsLazy(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&Object.keys(t).length>0,cacheTime:0,useErrorBoundary:!1})},exports.usePostSlackMessageChannel=function(){return $f(function(e){var t=e.payload;return zh.getInstance().postSlackMessageChannel(t).then(function(e){return null==e?void 0:e.data})})},exports.usePostTransactions=function(t){var n=this;return Kf(["POST/transactions",JSON.stringify(t)],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().postTransactions(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t,cacheTime:0,useErrorBoundary:!1})},exports.usePostUserSettings=rg,exports.usePostUserSettingsPinned=function(e){return $f(["pinned-sections"],function(e){var t=e.payload;return zh.getInstance().postUserSettingsPinned(t)},{onMutate:function(t){var n=t.payload;return e({payload:n})}})},exports.usePostUserSettingsTables=function(){return $f(function(e){var t=e.payload,n=e.section;return zh.getInstance().postUserSettingsTables(t,n)},{onMutate:function(e){return e},onSuccess:function(t){var n=ng.getQueryData(["fetch-profile"]);t.data&&ng.setQueryData(["fetch-profile"],e.__assign(e.__assign({},n),{settings:t.data}))}})},exports.usePostUserThemeSettings=function(){return $f(function(e){return zh.getInstance().postUserThemeSettings(e)})},exports.usePostValideStatusConnection=function(){return $f(["post-validate-status-connection"],function(e){var t=e.payload,n=e.accountCode;return zh.getInstance().postValidateStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.usePostVelocityRules=function(e){return Kf(["velocity-rules",e],function(){var t=zh.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})},exports.usePostWebhookLogs=function(e){var t=e.params;return Kf(["webhook-logs",t],function(){return zh.getInstance().postWebhookLogs({payload:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.organizationCode,cacheTime:0,useErrorBoundary:!1})},exports.usePostWebhookMultiAccount=function(e){return $f(function(e){var t=e.payload;return zh.getInstance().postWebhookV2MultiAccount({payload:t})},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useProviderConversionRatesData=function(){return Kf(["smart-routing-conversion-rates"],function(){return zh.getInstance().getProviderConversionRatesData().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!1,useErrorBoundary:!1})},exports.useProviderRawResponse=function(){return $f(function(e){var t=e.transactionCode,n=e.payload;return zh.getInstance().postProviderRawResponse(t,n)})},exports.usePublishCheckout=function(n){var r=eg(),o=t.useRef(r);return o.current=r,$f(function(t){return zh.getInstance().publishCheckout(e.__assign(e.__assign({},t),{accountCode:o.current}))},n)},exports.usePublishVersion=function(t,n){var r=this,o=t.versionCode,a=t.accountCode,i=t.organizationCode,s=t.routingType,u=void 0===s?exports.SmartRouting.DEFAULT_ROUTING_TYPE:s;return void 0===n&&(n=null),$f(function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().postSmartRoutingPublishVersion(a,o,i,u).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})},n)},exports.usePutAccountPrincipal=function(){return $f(function(e){var t=e.account_code;return zh.getInstance().putAccountPrincipal({account_code:t})})},exports.usePutAccountsUserMassive=function(){return $f(function(e){var t=e.organizationCode,n=e.userCode,r=e.payload;return zh.getInstance().putAccountsUserMassive(t,n,r)})},exports.usePutBlackListType=function(){return $f(["put-blacklist"],function(e){return zh.getInstance().putBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.usePutCosts=function(){return $f(function(e){return zh.getInstance().putCosts(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.usePutOrganizationConfigsByAccount=function(){return $f(function(e){return zh.getInstance().putOrganizationConfigsByAccount(e)})},exports.useRecoveredPaymentsByDay=function(t,n){return Kf(e.__assign({queryKey:["smart-recovery-recovered-payments-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return n=zh.getInstance(),r={start_date:t.start_date||"",end_date:t.end_date||"",organization_code:t.organization_code,account_codes:t.account_code||[],countries:t.countries||[],channels:t.channels||[],focuses:t.focuses||[],timezone:t.timezone},[4,n.post("/nova-insights/recovered-payments-by-day",r)];case 1:return o=e.sent(),[2,yg(o.data,r.start_date,r.end_date)]}})})},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useRecoveredTPVByDay=function(t,n){return Kf(e.__assign({queryKey:["smart-recovery-recovered-tpv-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return n=zh.getInstance(),r={start_date:t.start_date||"",end_date:t.end_date||"",organization_code:t.organization_code,account_codes:t.account_code||[],countries:t.countries||[],channels:t.channels||[],focuses:t.focuses||[],timezone:t.timezone},[4,n.post("/nova-insights/recovered-tpv-by-day",r)];case 1:return o=e.sent(),[2,mg(o.data,r.start_date,r.end_date)]}})})},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useRescheduleSubscription=function(){return $f(["post-reschedule-subscription"],function(e){var t=e.subscriptionCode;return zh.getInstance().postRescheduleSubscription(t).then(function(e){return null==e?void 0:e.data})})},exports.useResendWebhooks=function(){return $f(function(e){var t=e.codes;return zh.getInstance().postResendWebhooks({codes:t}).then(function(e){return null==e?void 0:e.data})})},exports.useResumeSubscription=function(){return $f(["post-resume-subscription"],function(e){var t=e.subscriptionCode;return zh.getInstance().postResumeSubscription(t).then(function(e){return null==e?void 0:e.data})})},exports.useRetryDuplicateAccount=function(){return $f(function(e){return zh.getInstance().retryDuplicateAccount(e)})},exports.useSaveVersion=function(e,t){var n=e.data,r=e.accountCode,o=e.routingType,a=void 0===o?exports.SmartRouting.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),$f(function(){return zh.getInstance().putSmartRoutingUpdateWorkflow(r,n,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},t)},exports.useSearchInstallmentsPlans=function(e,t){return void 0===t&&(t=!0),Kf(["search-installments-plans",JSON.stringify(e)],function(){return zh.getInstance().searchInstallmentsPlans(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:t,useErrorBoundary:!1})},exports.useSearchScheduleById=function(t,n,r){var o=this;return Kf(["POST/template-reporting/schedule-by-id/search",t,n],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().searchReportScheduleById(t,n).then(function(e){return null==e?void 0:e.data})]})})},{enabled:r&&!!t,useErrorBoundary:!1})},exports.useSearchSchedules=function(t,n){var r=this;return Kf(["POST/template-reporting/schedules/search",t],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().searchReportSchedules(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:n,useErrorBoundary:!1})},exports.useSearchTemplateById=function(t,n,r){var o=this;return Kf(["POST/template-reporting/template-by-id/search",t,n],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().searchReportTemplateById(t,n).then(function(e){return null==e?void 0:e.data})]})})},{enabled:r&&!!t,useErrorBoundary:!1})},exports.useSearchTemplates=function(t,n){var r=this;return Kf(["POST/template-reporting/templates/search",t],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().searchReportTemplates(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:n,useErrorBoundary:!1})},exports.useSendPaymentNotification=function(t,n,r){var o=this,a=zh.getInstance();return Kf(["send-payment-notification",t,n],function(){return e.__awaiter(o,void 0,void 0,function(){var o,i;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,a.sendPaymentNotification(t,n)];case 1:return o=e.sent(),r.onSuccess(),[2,o.data];case 2:throw i=e.sent(),r.onError(),i;case 3:return[2]}})})},{enabled:r.enabled,cacheTime:0,useErrorBoundary:!1})},exports.useSetCustodian=function(){return $f(function(){return zh.getInstance().setCustodian().then(function(e){return null==e?void 0:e.data})})},exports.useSmartRoutingCreateDeclinedGroup=function(e){var t=e.accountCode;return $f(function(e){return void 0===e&&(e=null),zh.getInstance().createSmartRoutingDeclinedGroup(t,e).then(function(e){return null==e?void 0:e.data})},e.options)},exports.useSmartRoutingEditWorkflowName=function(e,t){var n=e.code,r=e.name,o=e.accountCode,a=e.routingType,i=void 0===a?exports.SmartRouting.DEFAULT_ROUTING_TYPE:a;return void 0===t&&(t=null),$f(function(){return zh.getInstance().putSmartRoutingUpdateWorkflowName(o,{code:n,name:r},i).then(function(e){return null==e?void 0:e.data})},t)},exports.useSmartRoutingMultiAccountDeclinedGroupCreate=function(t,n){return void 0===n&&(n={}),$f(function(e){var n=e.payload;return zh.getInstance().multiAccountDeclinedGroupCreate(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},e.__assign(e.__assign({},n),{useErrorBoundary:!1}))},exports.useSmartRoutingRemoveDeclinedGroup=function(t,n){return void 0===n&&(n={}),$f(function(e){var n=e.declinedGroupCode;return zh.getInstance().removeDeclinedGroup(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},e.__assign(e.__assign({},n),{useErrorBoundary:!1}))},exports.useSmartRoutingSimulateTransaction=function(e,t){var n=e.accountCode,r=e.workflowVersionCode,o=e.routingType,a=void 0===o?exports.SmartRouting.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),$f(function(e){return zh.getInstance().simulateSmartRoutingTransaction(n,r,e,a).then(function(e){return null==e?void 0:e.data})},t)},exports.useSmartRoutingToggleFavorite=function(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?exports.SmartRouting.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),$f(function(e){return void 0===e&&(e=!1),zh.getInstance().updateSmartRoutingFavorite(r,n,e,a).then(function(e){return null==e?void 0:e.data})},t)},exports.useSmartRoutingUpdateDeclinedGroup=function(e,t){var n=e.declinedId,r=e.accountCode;return void 0===t&&(t=null),$f(function(e){return void 0===e&&(e=null),zh.getInstance().updateSmartRoutingDeclinedGroup(r,n,e).then(function(e){return null==e?void 0:e.data})},t)},exports.useSmartRoutingUpdateMonitorRedistribution=function(e,t){return void 0===t&&(t=null),$f(function(t){return zh.getInstance().updateMonitorRedistribution(e,t).then(function(e){return null==e?void 0:e.data})},t)},exports.useStartUserExport=function(){return $f(function(e){return zh.getInstance().startUserExport({accountCodes:e.account_codes,name:e.name,search:e.search,statuses:e.statuses,roleIds:e.role_ids}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useSubmitChartFeedback=function(e,t){var n=e.chartCode,r=Bf();return $f(function(e){return zh.getInstance().submitChartFeedback(n,{rating:e.rating,issues:e.issues||[],comment:e.comment}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(e){var o;r.invalidateQueries(["chart-feedback",n]),null===(o=null==t?void 0:t.onSuccess)||void 0===o||o.call(t,e)},onError:function(e){var n;null===(n=null==t?void 0:t.onError)||void 0===n||n.call(t,e)}})},exports.useTableOnboarding=function(n,r,o){var a,i,s=og(),u=rg(),c=s.data,l=s.isLoading||!s.isFetched,d=null!==(i=null===(a=null==c?void 0:c.settings)||void 0===a?void 0:a.viewed_tutorials)&&void 0!==i?i:[],p="onboarding-".concat(null!=n?n:"default","-").concat(r,"-").concat(o),h=d.includes(p),f=t.useCallback(function(){if(!h){var t=e.__spreadArray(e.__spreadArray([],d,!0),[p],!1);ng.setQueryData(["fetch-profile"],function(n){var r;return n?e.__assign(e.__assign({},n),{settings:e.__assign(e.__assign({},null!==(r=n.settings)&&void 0!==r?r:{}),{viewed_tutorials:t})}):n}),u.mutate({payload:{viewed_tutorials:t}})}},[h,p,u,d]);return{hasSeenOnboarding:h,dismiss:f,id:p,isProfileLoading:l}},exports.useToggleMethod=function(e,t){var n=e.paymentMethod,r=e.active,o=e.accountCode,a=e.routingType,i=void 0===a?exports.SmartRouting.DEFAULT_ROUTING_TYPE:a;return void 0===t&&(t=null),$f(function(){return zh.getInstance().putSmartRoutingToggleMethod(o,n,r,i).then(function(e){return null==e?void 0:e.data})},t)},exports.useUnInviteUsersV2=function(){return $f(function(e){var t=e.userCode,n=e.organizationCode;return zh.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})})},exports.useUnblockOnboarding=function(){var e=Bf();return $f(["unblock-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId;return zh.getInstance().unblockOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useUnifiedExportStart=function(){return $f(function(e){var t=e.tab,n=e.payload;return zh.getInstance().postUnifiedExport(t,n).then(function(e){return null==e?void 0:e.data})})},exports.useUnrollUserV2=function(){return $f(function(e){return zh.getInstance().unrollMfa(e).then(function(e){return null==e?void 0:e.data})})},exports.useUpdateInstallmentsPlan=function(){return $f(["update-installments-plan"],function(e){var t=e.code,n=e.payload;return zh.getInstance().updateInstallmentsPlan(t,n).then(function(e){return null==e?void 0:e.data})})},exports.useUpdateIsActiveCheckout=function(n){var r=eg(),o=t.useRef(r);return o.current=r,$f(function(t){return zh.getInstance().updateIsActiveCheckout(e.__assign(e.__assign({},t),{accountCode:o.current}))},n)},exports.useUpdateMFAConfig=function(){return $f(function(e){var t=e.payload,n=e.organizationCode;return zh.getInstance().updateMFAConfig(t,n)})},exports.useUpdateOnboarding=function(){var e=Bf();return $f(["update-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId,o=e.payload;return zh.getInstance().updateOnboarding(t,n,r,o).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useUpdateOrganizationStatus=function(){return $f(["patch-organizations"],function(){return zh.getInstance().updateOrganizationStatus().then(function(e){return null==e?void 0:e.data})})},exports.useUpdateProfile=function(e){return $f(function(e){return zh.getInstance().updateProfile(e)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useUpdateRecipient=function(){var e=Bf();return $f(["update-recipient"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.payload;return zh.getInstance().updateRecipient(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useUpdateReconciliationAlert=function(){return $f(["UPDATE/reconciliation/alerts"],function(e){return zh.getInstance().updateReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useUpdateReconciliationReportTemplate=function(e){return $f(function(){return zh.getInstance().updateReconciliationReportTemplate(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.useUpdateReportTemplate=function(e){return $f(function(){return zh.getInstance().updateReportTemplate(e).then(function(e){return null==e?void 0:e.data})})},exports.useUpdateSamlConfig=function(){return $f(function(e){return zh.getInstance().updateSamlConfig(e)})},exports.useUpdateScheduledReport=function(){return $f(function(e){var t=e.reportCode,n=e.payload;return zh.getInstance().updateScheduledReport(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useUpdateSubscription=function(){return $f(["patch-subscription"],function(e){var t=e.subscriptionCode,n=e.payload;return zh.getInstance().patchSubscription(t,n).then(function(e){return null==e?void 0:e.data})})},exports.useUpdateTemplateSelection=function(){var t=this;return $f(["PATCH/template-reporting/report-templates/selection"],function(n){var r=n.templateId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().updateTemplateSelection(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useUpdateWebhookV2=function(e){return $f(function(e){var t=e.code,n=e.payload,r=e.accountCode;return zh.getInstance().updateWebhookV2(t,n,r)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useUploadBatchRefundsFileV2=function(e){var n=e.fileName,r=e.onSuccess,o=e.onError,a=t.useState(0),i=a[0],s=a[1],u=t.useRef({cancel:function(){return null}}),c=$f(["upload-file-chargeback",n],function(e){var t=zh.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:s}),n=t.promise,a=t.cancel;return u.current.cancel=a,n.then(function(e){return null==r||r(null==e?void 0:e.data),null==e?void 0:e.data}).catch(function(e){throw null==o||o(),e})},{useErrorBoundary:!1});return{mutation:c,cancelRequest:u.current.cancel,progress:i}},exports.useUploadBatchRefundsV2=function(){return $f(function(e){return zh.getInstance().uploadBatchRefundsV2({payload:e}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useUploadFileS3ClientBatchRefunds=function(){var e=t.useRef({cancel:function(){return null}}),n=$f(["upload-file"],function(t){var n=zh.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),r=n.promise,o=n.cancel;return e.current.cancel=o,r.then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})});return{mutation:n,cancelRequest:e.current.cancel}},exports.useUploadPaymentLinkLogo=function(){return $f(["upload-payment-link-logo"],function(e){var t=e.payload;return zh.getInstance().uploadPaymentLinkLogo({payload:t}).then(function(e){return null==e?void 0:e.data})})},exports.useValiateAllowlistItems=function(){return $f(["validate-allowlist-items"],function(e){return zh.getInstance().validateAllowlistItems({payload:e}).then(function(e){return e.data}).catch(function(e){return e})})},exports.useValidateBlockListItems=function(){return $f(["valiate-blacklist-items"],function(e){return zh.getInstance().valiateBlockListItems({payload:e}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useValidateCredentials=function(){return $f(function(e){return zh.getInstance().postValidateCredentials(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})},exports.useValidateOrgName=function(){return $f(function(e){return zh.getInstance().getOrgByName(e).then(function(e){return null==e?void 0:e.data})})},exports.useValidatePasswordStatus=function(){return $f(function(){return zh.getInstance().validatePasswordStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return{valid:!1}})})},exports.useViewMoreMetrics=function(e,t){return Kf(["get-insights-conversion-rate-view-more-metrics",t,e],function(){return zh.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})},exports.useWorkosAdminPortal=function(){var t=this;return $f(function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().workosAdminPortal().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})},exports.useWorkosDomainStatus=function(){var t=this;return Kf(["workos-domain-status"],function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().workosDomainStatus().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})},exports.useWorkosDomainVerificationPortal=function(){var t=this;return $f(function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().workosDomainVerificationPortal().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})},exports.useWorkosPasswordReset=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().workosPasswordReset(n).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})},exports.useWorkosVerifyMfa=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().workosVerifyMfa(n).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})};
|
|
67
|
+
const xg=7,Eg=6,Sg=5,Cg=4,Rg=3,Ig=2,Tg=1,Ag=0;function Og(e,t,n){var r;if((n=n||{}).threshold=null!=(r=n.threshold)?r:Tg,!n.accessors){const r=Pg(e,t,n);return{rankedValue:e,rank:r,accessorIndex:-1,accessorThreshold:n.threshold,passed:r>=n.threshold}}const o=function(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const o=t[r],a=Ng(o),i=Lg(e,o);for(let e=0,t=i.length;e<t;e++)n.push({itemValue:i[e],attributes:a})}return n}(e,n.accessors),a={rankedValue:e,rank:Ag,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let e=0;e<o.length;e++){const r=o[e];let i=Pg(r.itemValue,t,n);const{minRanking:s,maxRanking:u,threshold:c=n.threshold}=r.attributes;i<s&&i>=Tg?i=s:i>u&&(i=u),i=Math.min(i,u),i>=c&&i>a.rank&&(a.rank=i,a.passed=!0,a.accessorIndex=e,a.accessorThreshold=c,a.rankedValue=r.itemValue)}return a}function Pg(e,t,n){return e=Dg(e,n),(t=Dg(t,n)).length>e.length?Ag:e===t?xg:(e=e.toLowerCase())===(t=t.toLowerCase())?Eg:e.startsWith(t)?Sg:e.includes(` ${t}`)?Cg:e.includes(t)?Rg:1===t.length?Ag:function(e){let t="";return e.split(" ").forEach(e=>{e.split("-").forEach(e=>{t+=e.substr(0,1)})}),t}(e).includes(t)?Ig:function(e,t){let n=0,r=0;function o(e,t,r){for(let o=r,a=t.length;o<a;o++){if(t[o]===e)return n+=1,o+1}return-1}function a(e){const r=1/e,o=n/t.length;return Tg+o*r}const i=o(t[0],e,0);if(i<0)return Ag;r=i;for(let n=1,a=t.length;n<a;n++){r=o(t[n],e,r);if(!(r>-1))return Ag}const s=r-i;return a(s)}(e,t)}function Dg(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=e.replace(wg,e=>_g[e])),e}function Lg(e,t){let n=t;"object"==typeof t&&(n=t.accessor);const r=n(e);return null==r?[]:Array.isArray(r)?r:[String(r)]}const jg={maxRanking:1/0,minRanking:-1/0};function Ng(e){return"function"==typeof e?jg:{...jg,...e}}function zg(e,t){const[n,o]=r.useState();r.useEffect(()=>{const n=(e=>{try{const t=localStorage.getItem(e);return"string"==typeof t?JSON.parse(t):void 0}catch{return}})(e);o(null==n?"function"==typeof t?t():t:n)},[t,e]);return[n,r.useCallback(t=>{o(n=>{let r=t;"function"==typeof t&&(r=t(n));try{localStorage.setItem(e,JSON.stringify(r))}catch{}return r})},[e])]}var qg,Ug=function(){function e(){this.keyToValue=new Map,this.valueToKey=new Map}return e.prototype.set=function(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)},e.prototype.getByKey=function(e){return this.keyToValue.get(e)},e.prototype.getByValue=function(e){return this.valueToKey.get(e)},e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},e}(),Mg=function(){function e(e){this.generateIdentifier=e,this.kv=new Ug}return e.prototype.register=function(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))},e.prototype.clear=function(){this.kv.clear()},e.prototype.getIdentifier=function(e){return this.kv.getByValue(e)},e.prototype.getValue=function(e){return this.kv.getByKey(e)},e}(),Bg=(qg=function(e,t){return qg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},qg(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}qg(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Fg=function(e){function t(){var t=e.call(this,function(e){return e.name})||this;return t.classToAllowedProps=new Map,t}return Bg(t,e),t.prototype.register=function(t,n){"object"==typeof n?(n.allowProps&&this.classToAllowedProps.set(t,n.allowProps),e.prototype.register.call(this,t,n.identifier)):e.prototype.register.call(this,t,n)},t.prototype.getAllowedProps=function(e){return this.classToAllowedProps.get(e)},t}(Mg),Gg=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i};function Vg(e,t){var n=function(e){if("values"in Object)return Object.values(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}(e);if("find"in n)return n.find(t);for(var r=n,o=0;o<r.length;o++){var a=r[o];if(t(a))return a}}function Wg(e,t){Object.entries(e).forEach(function(e){var n=Gg(e,2),r=n[0],o=n[1];return t(o,r)})}function Hg(e,t){return-1!==e.indexOf(t)}function Kg(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t(r))return r}}var $g=function(){function e(){this.transfomers={}}return e.prototype.register=function(e){this.transfomers[e.name]=e},e.prototype.findApplicable=function(e){return Vg(this.transfomers,function(t){return t.isApplicable(e)})},e.prototype.findByName=function(e){return this.transfomers[e]},e}(),Qg=function(e){return void 0===e},Yg=function(e){return"object"==typeof e&&null!==e&&(e!==Object.prototype&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype))},Jg=function(e){return Yg(e)&&0===Object.keys(e).length},Zg=function(e){return Array.isArray(e)},Xg=function(e){return e instanceof Map},em=function(e){return e instanceof Set},tm=function(e){return"Symbol"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)},nm=function(e){return"number"==typeof e&&isNaN(e)},rm=function(e){return function(e){return"boolean"==typeof e}(e)||function(e){return null===e}(e)||Qg(e)||function(e){return"number"==typeof e&&!isNaN(e)}(e)||function(e){return"string"==typeof e}(e)||tm(e)},om=function(e){return e.replace(/\./g,"\\.")},am=function(e){return e.map(String).map(om).join(".")},im=function(e){for(var t=[],n="",r=0;r<e.length;r++){var o=e.charAt(r);if("\\"===o&&"."===e.charAt(r+1))n+=".",r++;else"."===o?(t.push(n),n=""):n+=o}var a=n;return t.push(a),t},sm=function(){return sm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},sm.apply(this,arguments)},um=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},cm=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};function lm(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var dm=[lm(Qg,"undefined",function(){return null},function(){}),lm(function(e){return"bigint"==typeof e},"bigint",function(e){return e.toString()},function(e){return"undefined"!=typeof BigInt?BigInt(e):(console.error("Please add a BigInt polyfill."),e)}),lm(function(e){return e instanceof Date&&!isNaN(e.valueOf())},"Date",function(e){return e.toISOString()},function(e){return new Date(e)}),lm(function(e){return e instanceof Error},"Error",function(e,t){var n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(function(t){n[t]=e[t]}),n},function(e,t){var n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(function(t){n[t]=e[t]}),n}),lm(function(e){return e instanceof RegExp},"regexp",function(e){return""+e},function(e){var t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),lm(em,"set",function(e){return cm([],um(e.values()))},function(e){return new Set(e)}),lm(Xg,"map",function(e){return cm([],um(e.entries()))},function(e){return new Map(e)}),lm(function(e){return nm(e)||((t=e)===1/0||t===-1/0);var t},"number",function(e){return nm(e)?"NaN":e>0?"Infinity":"-Infinity"},Number),lm(function(e){return 0===e&&1/e==-1/0},"number",function(){return"-0"},Number),lm(function(e){return e instanceof URL},"URL",function(e){return e.toString()},function(e){return new URL(e)})];function pm(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var hm=pm(function(e,t){return!!tm(e)&&!!t.symbolRegistry.getIdentifier(e)},function(e,t){return["symbol",t.symbolRegistry.getIdentifier(e)]},function(e){return e.description},function(e,t,n){var r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),fm=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),gm=pm(function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},function(e){return["typed-array",e.constructor.name]},function(e){return cm([],um(e))},function(e,t){var n=fm[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function mm(e,t){return!!(null==e?void 0:e.constructor)&&!!t.classRegistry.getIdentifier(e.constructor)}var ym=pm(mm,function(e,t){return["class",t.classRegistry.getIdentifier(e.constructor)]},function(e,t){var n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return sm({},e);var r={};return n.forEach(function(t){r[t]=e[t]}),r},function(e,t,n){var r=n.classRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(r.prototype),e)}),vm=pm(function(e,t){return!!t.customTransformerRegistry.findApplicable(e)},function(e,t){return["custom",t.customTransformerRegistry.findApplicable(e).name]},function(e,t){return t.customTransformerRegistry.findApplicable(e).serialize(e)},function(e,t,n){var r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),bm=[ym,hm,vm,gm],_m=function(e,t){var n=Kg(bm,function(n){return n.isApplicable(e,t)});if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};var r=Kg(dm,function(n){return n.isApplicable(e,t)});return r?{value:r.transform(e,t),type:r.annotation}:void 0},km={};dm.forEach(function(e){km[e.annotation]=e});var wm=function(e,t){for(var n=e.keys();t>0;)n.next(),t--;return n.next().value};function xm(e){if(Hg(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Hg(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Hg(e,"constructor"))throw new Error("constructor is not allowed as a property")}var Em=function(e,t,n){if(xm(t),0===t.length)return n(e);for(var r=e,o=0;o<t.length-1;o++){var a=t[o];if(Zg(r))r=r[+a];else if(Yg(r))r=r[a];else if(em(r)){r=wm(r,i=+a)}else if(Xg(r)){if(o===t.length-2)break;var i=+a,s=0===+t[++o]?"key":"value",u=wm(r,i);switch(s){case"key":r=u;break;case"value":r=r.get(u)}}}var c=t[t.length-1];if(Zg(r)?r[+c]=n(r[+c]):Yg(r)&&(r[c]=n(r[c])),em(r)){var l=wm(r,+c),d=n(l);l!==d&&(r.delete(l),r.add(d))}if(Xg(r)){i=+t[t.length-2];var p=wm(r,i);switch(s=0===+c?"key":"value"){case"key":var h=n(p);r.set(h,r.get(p)),h!==p&&r.delete(p);break;case"value":r.set(p,n(r.get(p)))}}return e},Sm=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},Cm=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e};function Rm(e,t,n){if(void 0===n&&(n=[]),e)if(Zg(e)){var r=Sm(e,2),o=r[0],a=r[1];a&&Wg(a,function(e,r){Rm(e,t,Cm(Cm([],Sm(n)),Sm(im(r))))}),t(o,n)}else Wg(e,function(e,r){return Rm(e,t,Cm(Cm([],Sm(n)),Sm(im(r))))})}function Im(e,t,n){return Rm(t,function(t,r){e=Em(e,r,function(e){return function(e,t,n){if(!Zg(t)){var r=km[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}switch(t[0]){case"symbol":return hm.untransform(e,t,n);case"class":return ym.untransform(e,t,n);case"custom":return vm.untransform(e,t,n);case"typed-array":return gm.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}}(e,t,n)})}),e}function Tm(e,t){function n(t,n){var r=function(e,t){xm(t);for(var n=0;n<t.length;n++){var r=t[n];if(em(e))e=wm(e,+r);else if(Xg(e)){var o=+r,a=0===+t[++n]?"key":"value",i=wm(e,o);switch(a){case"key":e=i;break;case"value":e=e.get(i)}}else e=e[r]}return e}(e,im(n));t.map(im).forEach(function(t){e=Em(e,t,function(){return r})})}if(Zg(t)){var r=Sm(t,2),o=r[0],a=r[1];o.forEach(function(t){e=Em(e,im(t),function(){return e})}),a&&Wg(a,n)}else Wg(t,n);return e}var Am=function(e,t,n,r,o,a,i){var s;void 0===o&&(o=[]),void 0===a&&(a=[]),void 0===i&&(i=new Map);var u=rm(e);if(!u){!function(e,t,n){var r=n.get(e);r?r.push(t):n.set(e,[t])}(e,o,t);var c=i.get(e);if(c)return r?{transformedValue:null}:c}if(!function(e,t){return Yg(e)||Zg(e)||Xg(e)||em(e)||mm(e,t)}(e,n)){var l=_m(e,n),d=l?{transformedValue:l.value,annotations:[l.type]}:{transformedValue:e};return u||i.set(e,d),d}if(Hg(a,e))return{transformedValue:null};var p=_m(e,n),h=null!==(s=null==p?void 0:p.value)&&void 0!==s?s:e,f=Zg(h)?[]:{},g={};Wg(h,function(s,u){var c=Am(s,t,n,r,Cm(Cm([],Sm(o)),[u]),Cm(Cm([],Sm(a)),[e]),i);f[u]=c.transformedValue,Zg(c.annotations)?g[u]=c.annotations:Yg(c.annotations)&&Wg(c.annotations,function(e,t){g[om(u)+"."+t]=e})});var m=Jg(g)?{transformedValue:f,annotations:p?[p.type]:void 0}:{transformedValue:f,annotations:p?[p.type,g]:g};return u||i.set(e,m),m};function Om(e){return Object.prototype.toString.call(e).slice(8,-1)}function Pm(e){return"Array"===Om(e)}function Dm(e,t={}){if(Pm(e))return e.map(e=>Dm(e,t));if(!function(e){if("Object"!==Om(e))return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}(e))return e;return[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].reduce((n,r)=>{if(Pm(t.props)&&!t.props.includes(r))return n;return function(e,t,n,r,o){const a={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";"enumerable"===a&&(e[t]=n),o&&"nonenumerable"===a&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}(n,r,Dm(e[r],t),e,t.nonenumerable),n},{})}var Lm=function(){return Lm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Lm.apply(this,arguments)},jm=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},Nm=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},zm=function(){function e(e){var t=(void 0===e?{}:e).dedupe,n=void 0!==t&&t;this.classRegistry=new Fg,this.symbolRegistry=new Mg(function(e){var t;return null!==(t=e.description)&&void 0!==t?t:""}),this.customTransformerRegistry=new $g,this.allowedErrorProps=[],this.dedupe=n}return e.prototype.serialize=function(e){var t=new Map,n=Am(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta=Lm(Lm({},r.meta),{values:n.annotations}));var o,a,i,s,u=(o=t,a=this.dedupe,i={},s=void 0,o.forEach(function(e){if(!(e.length<=1)){a||(e=e.map(function(e){return e.map(String)}).sort(function(e,t){return e.length-t.length}));var t=Sm(e),n=t[0],r=t.slice(1);0===n.length?s=r.map(am):i[am(n)]=r.map(am)}}),s?Jg(i)?[s]:[s,i]:Jg(i)?void 0:i);return u&&(r.meta=Lm(Lm({},r.meta),{referentialEqualities:u})),r},e.prototype.deserialize=function(e){var t=e.json,n=e.meta,r=Dm(t);return(null==n?void 0:n.values)&&(r=Im(r,n.values,this)),(null==n?void 0:n.referentialEqualities)&&(r=Tm(r,n.referentialEqualities)),r},e.prototype.stringify=function(e){return JSON.stringify(this.serialize(e))},e.prototype.parse=function(e){return this.deserialize(JSON.parse(e))},e.prototype.registerClass=function(e,t){this.classRegistry.register(e,t)},e.prototype.registerSymbol=function(e,t){this.symbolRegistry.register(e,t)},e.prototype.registerCustom=function(e,t){this.customTransformerRegistry.register(Lm({name:t},e))},e.prototype.allowErrorProps=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];(e=this.allowedErrorProps).push.apply(e,Nm([],jm(t)))},e.defaultInstance=new e,e.serialize=e.defaultInstance.serialize.bind(e.defaultInstance),e.deserialize=e.defaultInstance.deserialize.bind(e.defaultInstance),e.stringify=e.defaultInstance.stringify.bind(e.defaultInstance),e.parse=e.defaultInstance.parse.bind(e.defaultInstance),e.registerClass=e.defaultInstance.registerClass.bind(e.defaultInstance),e.registerSymbol=e.defaultInstance.registerSymbol.bind(e.defaultInstance),e.registerCustom=e.defaultInstance.registerCustom.bind(e.defaultInstance),e.allowErrorProps=e.defaultInstance.allowErrorProps.bind(e.defaultInstance),e}();const qm={background:"#0b1521",backgroundAlt:"#132337",foreground:"white",gray:"#3f4e60",grayAlt:"#222e3e",inputBackgroundColor:"#fff",inputTextColor:"#000",success:"#00ab52",danger:"#ff0085",active:"#006bff",paused:"#8c49eb",warning:"#ffb200"},Um=r.createContext(qm);function Mm({theme:e,...t}){return r.createElement(Um.Provider,bg({value:e},t))}function Bm({queryState:e,observerCount:t,isStale:n,theme:r}){return"fetching"===e.fetchStatus?r.active:t?"paused"===e.fetchStatus?r.paused:n?r.warning:r.success:r.gray}function Fm(e){return"fetching"===e.state.fetchStatus?"fetching":e.getObserversCount()?"paused"===e.state.fetchStatus?"paused":e.isStale()?"stale":"fresh":"inactive"}function Gm(e,t,n={}){return r.forwardRef(({style:o,...a},i)=>{const s=r.useContext(Um),u=Object.entries(n).reduce((e,[t,n])=>function(e){const[t,n]=r.useState(()=>{if("undefined"!=typeof window)return window.matchMedia(e).matches});return r.useEffect(()=>{if("undefined"!=typeof window){const t=window.matchMedia(e),r=({matches:e})=>n(e);return t.addListener(r),()=>{t.removeListener(r)}}},[t,e,n]),t}(t)?{...e,..."function"==typeof n?n(a,s):n}:e,{});return r.createElement(e,{...a,style:{..."function"==typeof t?t(a,s):t,...o,...u},ref:i})})}const Vm=(e,t=!1)=>{const{json:n}=zm.serialize(e);return JSON.stringify(n,null,t?2:void 0)},Wm=e=>"idle"!==e.state.fetchStatus?0:e.getObserversCount()?e.isStale()?2:1:3,Hm=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,Km={"Status > Last Updated":(e,t)=>Wm(e)===Wm(t)?Hm(e,t):Wm(e)>Wm(t)?1:-1,"Query Hash":(e,t)=>e.queryHash.localeCompare(t.queryHash),"Last Updated":Hm},$m=500,Qm={top:"bottom",bottom:"top",left:"right",right:"left"};function Ym(e){return["left","right"].includes(e)}function Jm(e){return Qm[e]}function Zm(e,t){return""+e+(t.charAt(0).toUpperCase()+t.slice(1))}function Xm(e="bottom"){const t=Ym(e),n=Jm(e),r=Zm("margin",n);return{position:"absolute",cursor:t?"col-resize":"row-resize",zIndex:1e5,[n]:0,[r]:"-4px",...t?{top:0,height:"100%",width:"4px"}:{width:"100%",height:"4px"}}}const ey=Gm("div",(e,t)=>({fontSize:"clamp(12px, 1.5vw, 14px)",fontFamily:"sans-serif",display:"flex",backgroundColor:t.background,color:t.foreground}),{"(max-width: 700px)":{flexDirection:"column"},"(max-width: 600px)":{fontSize:".9em"}}),ty=Gm("div",()=>({flex:"1 1 500px",display:"flex",flexDirection:"column",overflow:"auto",height:"100%"}),{"(max-width: 700px)":(e,t)=>({borderTop:"2px solid "+t.gray})}),ny=Gm("button",(e,t)=>({appearance:"none",fontSize:".9em",fontWeight:"bold",background:t.gray,border:"0",borderRadius:".3em",color:"white",padding:".5em",opacity:e.disabled?".5":void 0,cursor:"pointer"})),ry=Gm("span",{display:"flex",flexWrap:"wrap",gap:"0.5em",fontSize:"0.9em"}),oy=Gm("span",{display:"inline-flex",alignItems:"center",padding:".2em .4em",fontWeight:"bold",textShadow:"0 0 10px black",borderRadius:".2em"}),ay=Gm("code",{fontSize:".9em",color:"inherit",background:"inherit"}),iy=Gm("input",(e,t)=>({backgroundColor:t.inputBackgroundColor,border:0,borderRadius:".2em",color:t.inputTextColor,fontSize:".9em",lineHeight:"1.3",padding:".3em .4em"})),sy=Gm("select",(e,t)=>({display:"inline-block",fontSize:".9em",fontFamily:"sans-serif",fontWeight:"normal",lineHeight:"1.3",padding:".3em 1.5em .3em .5em",height:"auto",border:0,borderRadius:".2em",appearance:"none",WebkitAppearance:"none",backgroundColor:t.inputBackgroundColor,backgroundImage:"url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23444444'><polygon points='0,25 100,25 50,75'/></svg>\")",backgroundRepeat:"no-repeat",backgroundPosition:"right .55em center",backgroundSize:".65em auto, 100%",color:t.inputTextColor}),{"(max-width: 500px)":{display:"none"}});function uy({text:e}){return r.createElement("span",{style:{position:"absolute",width:"0.1px",height:"0.1px",overflow:"hidden"}},e)}const cy=Gm("div",{fontFamily:"Menlo, monospace",fontSize:"1em",lineHeight:"1.7",outline:"none",wordBreak:"break-word"}),ly=Gm("span",{color:"white"}),dy=Gm("button",{cursor:"pointer",color:"white"}),py=Gm("button",{cursor:"pointer",color:"inherit",font:"inherit",outline:"inherit",background:"transparent",border:"none",padding:0}),hy=({value:e})=>{const[t,n]=r.useState("NoCopy");return r.createElement("button",{onClick:"NoCopy"===t?()=>{navigator.clipboard.writeText(zm.stringify(e)).then(()=>{n("SuccessCopy"),setTimeout(()=>{n("NoCopy")},1500)},e=>{console.error("Failed to copy: ",e),n("ErrorCopy"),setTimeout(()=>{n("NoCopy")},1500)})}:void 0,style:{cursor:"pointer",color:"inherit",font:"inherit",outline:"inherit",background:"transparent",border:"none",padding:0}},"NoCopy"===t?r.createElement(vy,null):"SuccessCopy"===t?r.createElement(_y,null):r.createElement(by,null))},fy=Gm("span",(e,t)=>({color:t.danger})),gy=Gm("div",{marginLeft:".1em",paddingLeft:"1em",borderLeft:"2px solid rgba(0,0,0,.15)"}),my=Gm("span",{color:"grey",fontSize:".7em"}),yy=({expanded:e,style:t={}})=>r.createElement("span",{style:{display:"inline-block",transition:"all .1s ease",transform:"rotate("+(e?90:0)+"deg) "+(t.transform||""),...t}},"▶"),vy=()=>r.createElement("span",{"aria-label":"Copy object to clipboard",title:"Copy object to clipboard",style:{paddingLeft:"1em"}},r.createElement("svg",{height:"12",viewBox:"0 0 16 12",width:"10"},r.createElement("path",{fill:"currentColor",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"}),r.createElement("path",{fill:"currentColor",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"}))),by=()=>r.createElement("span",{"aria-label":"Failed copying to clipboard",title:"Failed copying to clipboard",style:{paddingLeft:"1em",display:"flex",alignItems:"center"}},r.createElement("svg",{height:"12",viewBox:"0 0 16 12",width:"10",display:"block"},r.createElement("path",{fill:"red",d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})),r.createElement("span",{style:{color:"red",fontSize:"12px",paddingLeft:"4px",position:"relative",top:"2px"}},"See console")),_y=()=>r.createElement("span",{"aria-label":"Object copied to clipboard",title:"Object copied to clipboard",style:{paddingLeft:"1em",display:"inline-block",verticalAlign:"middle"}},r.createElement("svg",{height:"16",viewBox:"0 0 16 16",width:"16",display:"block"},r.createElement("path",{fill:"green",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"})));const ky=({handleEntry:e,label:t,value:n,subEntries:o=[],subEntryPages:a=[],type:i,expanded:s=!1,copyable:u=!1,toggleExpanded:c,pageSize:l})=>{const[d,p]=r.useState([]);return r.createElement(cy,{key:t},a.length?r.createElement(r.Fragment,null,r.createElement(py,{onClick:()=>c()},r.createElement(yy,{expanded:s})," ",t," ",r.createElement(my,null,"iterable"===String(i).toLowerCase()?"(Iterable) ":"",o.length," ",o.length>1?"items":"item")),u?r.createElement(hy,{value:n}):null,s?1===a.length?r.createElement(gy,null,o.map(e)):r.createElement(gy,null,a.map((t,n)=>r.createElement("div",{key:n},r.createElement(cy,null,r.createElement(dy,{onClick:()=>p(e=>e.includes(n)?e.filter(e=>e!==n):[...e,n])},r.createElement(yy,{expanded:s})," [",n*l," ..."," ",n*l+l-1,"]"),d.includes(n)?r.createElement(gy,null,t.map(e)):null)))):null):r.createElement(r.Fragment,null,r.createElement(ly,null,t,":")," ",r.createElement(fy,null,Vm(n))))};function wy({value:e,defaultExpanded:t,renderer:n=ky,pageSize:o=100,copyable:a=!1,...i}){const[s,u]=r.useState(Boolean(t)),c=r.useCallback(()=>u(e=>!e),[]);let l=typeof e,d=[];const p=e=>{const n=!0===t?{[e.label]:!0}:null==t?void 0:t[e.label];return{...e,defaultExpanded:n}};var h;Array.isArray(e)?(l="array",d=e.map((e,t)=>p({label:t.toString(),value:e}))):null!==e&&"object"==typeof e&&(h=e,Symbol.iterator in h)&&"function"==typeof e[Symbol.iterator]?(l="Iterable",d=Array.from(e,(e,t)=>p({label:t.toString(),value:e}))):"object"==typeof e&&null!==e&&(l="object",d=Object.entries(e).map(([e,t])=>p({label:e,value:t})));const f=function(e,t){if(t<1)return[];let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r}(d,o);return n({handleEntry:t=>r.createElement(wy,bg({key:t.label,value:e,renderer:n,copyable:a},i,t)),type:l,subEntries:d,subEntryPages:f,value:e,expanded:s,copyable:a,toggleExpanded:c,pageSize:o,...i})}function xy(e){return r.createElement("svg",bg({width:"40px",height:"40px",viewBox:"0 0 190 190",version:"1.1"},e),r.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},r.createElement("g",{transform:"translate(-33.000000, 0.000000)"},r.createElement("path",{d:"M72.7239712,61.3436237 C69.631224,46.362877 68.9675112,34.8727722 70.9666331,26.5293551 C72.1555965,21.5671678 74.3293088,17.5190846 77.6346064,14.5984631 C81.1241394,11.5150478 85.5360327,10.0020122 90.493257,10.0020122 C98.6712013,10.0020122 107.26826,13.7273214 116.455725,20.8044264 C120.20312,23.6910458 124.092437,27.170411 128.131651,31.2444746 C128.45314,30.8310265 128.816542,30.4410453 129.22143,30.0806152 C140.64098,19.9149716 150.255245,13.5989272 158.478408,11.1636507 C163.367899,9.715636 167.958526,9.57768202 172.138936,10.983031 C176.551631,12.4664684 180.06766,15.5329489 182.548314,19.8281091 C186.642288,26.9166735 187.721918,36.2310983 186.195595,47.7320243 C185.573451,52.4199112 184.50985,57.5263831 183.007094,63.0593153 C183.574045,63.1277086 184.142416,63.2532808 184.705041,63.4395297 C199.193932,68.2358678 209.453582,73.3937462 215.665021,79.2882839 C219.360669,82.7953831 221.773972,86.6998434 222.646365,91.0218204 C223.567176,95.5836746 222.669313,100.159332 220.191548,104.451297 C216.105211,111.529614 208.591643,117.11221 197.887587,121.534031 C193.589552,123.309539 188.726579,124.917559 183.293259,126.363748 C183.541176,126.92292 183.733521,127.516759 183.862138,128.139758 C186.954886,143.120505 187.618598,154.61061 185.619477,162.954027 C184.430513,167.916214 182.256801,171.964297 178.951503,174.884919 C175.46197,177.968334 171.050077,179.48137 166.092853,179.48137 C157.914908,179.48137 149.31785,175.756061 140.130385,168.678956 C136.343104,165.761613 132.410866,162.238839 128.325434,158.108619 C127.905075,158.765474 127.388968,159.376011 126.77857,159.919385 C115.35902,170.085028 105.744755,176.401073 97.5215915,178.836349 C92.6321009,180.284364 88.0414736,180.422318 83.8610636,179.016969 C79.4483686,177.533532 75.9323404,174.467051 73.4516862,170.171891 C69.3577116,163.083327 68.2780823,153.768902 69.8044053,142.267976 C70.449038,137.410634 71.56762,132.103898 73.1575891,126.339009 C72.5361041,126.276104 71.9120754,126.144816 71.2949591,125.940529 C56.8060684,121.144191 46.5464184,115.986312 40.3349789,110.091775 C36.6393312,106.584675 34.2260275,102.680215 33.3536352,98.3582381 C32.4328237,93.7963839 33.3306866,89.2207269 35.8084524,84.9287618 C39.8947886,77.8504443 47.4083565,72.2678481 58.1124133,67.8460273 C62.5385143,66.0176154 67.5637208,64.366822 73.1939394,62.8874674 C72.9933393,62.3969171 72.8349374,61.8811235 72.7239712,61.3436237 Z",fill:"#002C4B",fillRule:"nonzero",transform:"translate(128.000000, 95.000000) scale(-1, 1) translate(-128.000000, -95.000000) "}),r.createElement("path",{d:"M113.396882,64 L142.608177,64 C144.399254,64 146.053521,64.958025 146.944933,66.5115174 L161.577138,92.0115174 C162.461464,93.5526583 162.461464,95.4473417 161.577138,96.9884826 L146.944933,122.488483 C146.053521,124.041975 144.399254,125 142.608177,125 L113.396882,125 C111.605806,125 109.951539,124.041975 109.060126,122.488483 L94.4279211,96.9884826 C93.543596,95.4473417 93.543596,93.5526583 94.4279211,92.0115174 L109.060126,66.5115174 C109.951539,64.958025 111.605806,64 113.396882,64 Z M138.987827,70.2765273 C140.779849,70.2765273 142.434839,71.2355558 143.325899,72.7903404 L154.343038,92.0138131 C155.225607,93.5537825 155.225607,95.4462175 154.343038,96.9861869 L143.325899,116.20966 C142.434839,117.764444 140.779849,118.723473 138.987827,118.723473 L117.017233,118.723473 C115.225211,118.723473 113.570221,117.764444 112.67916,116.20966 L101.662022,96.9861869 C100.779452,95.4462175 100.779452,93.5537825 101.662022,92.0138131 L112.67916,72.7903404 C113.570221,71.2355558 115.225211,70.2765273 117.017233,70.2765273 L138.987827,70.2765273 Z M135.080648,77.1414791 L120.924411,77.1414791 C119.134228,77.1414791 117.480644,78.0985567 116.5889,79.6508285 L116.5889,79.6508285 L109.489217,92.0093494 C108.603232,93.5515958 108.603232,95.4484042 109.489217,96.9906506 L109.489217,96.9906506 L116.5889,109.349172 C117.480644,110.901443 119.134228,111.858521 120.924411,111.858521 L120.924411,111.858521 L135.080648,111.858521 C136.870831,111.858521 138.524416,110.901443 139.41616,109.349172 L139.41616,109.349172 L146.515843,96.9906506 C147.401828,95.4484042 147.401828,93.5515958 146.515843,92.0093494 L146.515843,92.0093494 L139.41616,79.6508285 C138.524416,78.0985567 136.870831,77.1414791 135.080648,77.1414791 L135.080648,77.1414791 Z M131.319186,83.7122186 C133.108028,83.7122186 134.760587,84.6678753 135.652827,86.2183156 L138.983552,92.0060969 C139.87203,93.5500005 139.87203,95.4499995 138.983552,96.9939031 L135.652827,102.781684 C134.760587,104.332125 133.108028,105.287781 131.319186,105.287781 L124.685874,105.287781 C122.897032,105.287781 121.244473,104.332125 120.352233,102.781684 L117.021508,96.9939031 C116.13303,95.4499995 116.13303,93.5500005 117.021508,92.0060969 L120.352233,86.2183156 C121.244473,84.6678753 122.897032,83.7122186 124.685874,83.7122186 L131.319186,83.7122186 Z M128.003794,90.1848875 C126.459294,90.1848875 125.034382,91.0072828 124.263005,92.3424437 C123.491732,93.6774232 123.491732,95.3225768 124.263005,96.6575563 C125.034382,97.9927172 126.459294,98.8151125 128.001266,98.8151125 L128.001266,98.8151125 C129.545766,98.8151125 130.970678,97.9927172 131.742055,96.6575563 C132.513327,95.3225768 132.513327,93.6774232 131.742055,92.3424437 C130.970678,91.0072828 129.545766,90.1848875 128.003794,90.1848875 L128.003794,90.1848875 Z M93,94.5009646 L100.767764,94.5009646",fill:"#FFD94C"}),r.createElement("path",{d:"M87.8601729,108.357758 C89.1715224,107.608286 90.8360246,108.074601 91.5779424,109.399303 L91.5779424,109.399303 L92.0525843,110.24352 C95.8563392,116.982993 99.8190116,123.380176 103.940602,129.435068 C108.807881,136.585427 114.28184,143.82411 120.362479,151.151115 C121.316878,152.30114 121.184944,154.011176 120.065686,154.997937 L120.065686,154.997937 L119.454208,155.534625 C99.3465389,173.103314 86.2778188,176.612552 80.2480482,166.062341 C74.3500652,155.742717 76.4844915,136.982888 86.6513274,109.782853 C86.876818,109.179582 87.3045861,108.675291 87.8601729,108.357758 Z M173.534177,129.041504 C174.986131,128.785177 176.375496,129.742138 176.65963,131.194242 L176.65963,131.194242 L176.812815,131.986376 C181.782365,157.995459 178.283348,171 166.315764,171 C154.609745,171 139.708724,159.909007 121.612702,137.727022 C121.211349,137.235047 120.994572,136.617371 121,135.981509 C121.013158,134.480686 122.235785,133.274651 123.730918,133.287756 L123.730918,133.287756 L124.684654,133.294531 C132.305698,133.335994 139.714387,133.071591 146.910723,132.501323 C155.409039,131.82788 164.283523,130.674607 173.534177,129.041504 Z M180.408726,73.8119663 C180.932139,72.4026903 182.508386,71.6634537 183.954581,72.149012 L183.954581,72.149012 L184.742552,72.4154854 C210.583763,81.217922 220.402356,90.8916805 214.198332,101.436761 C208.129904,111.751366 190.484347,119.260339 161.26166,123.963678 C160.613529,124.067994 159.948643,123.945969 159.382735,123.618843 C158.047025,122.846729 157.602046,121.158214 158.388848,119.847438 L158.388848,119.847438 L158.889328,119.0105 C162.877183,112.31633 166.481358,105.654262 169.701854,99.0242957 C173.50501,91.1948179 177.073967,82.7907081 180.408726,73.8119663 Z M94.7383398,66.0363218 C95.3864708,65.9320063 96.0513565,66.0540315 96.6172646,66.3811573 C97.9529754,67.153271 98.3979538,68.8417862 97.6111517,70.1525615 L97.6111517,70.1525615 L97.1106718,70.9895001 C93.1228168,77.6836699 89.5186416,84.3457379 86.2981462,90.9757043 C82.49499,98.8051821 78.9260328,107.209292 75.5912744,116.188034 C75.0678608,117.59731 73.4916142,118.336546 72.045419,117.850988 L72.045419,117.850988 L71.2574475,117.584515 C45.4162372,108.782078 35.597644,99.1083195 41.8016679,88.5632391 C47.8700957,78.2486335 65.515653,70.7396611 94.7383398,66.0363218 Z M136.545792,34.4653746 C156.653461,16.8966864 169.722181,13.3874478 175.751952,23.9376587 C181.649935,34.2572826 179.515508,53.0171122 169.348673,80.2171474 C169.123182,80.8204179 168.695414,81.324709 168.139827,81.6422422 C166.828478,82.3917144 165.163975,81.9253986 164.422058,80.6006966 L164.422058,80.6006966 L163.947416,79.7564798 C160.143661,73.0170065 156.180988,66.6198239 152.059398,60.564932 C147.192119,53.4145727 141.71816,46.1758903 135.637521,38.8488847 C134.683122,37.6988602 134.815056,35.9888243 135.934314,35.0020629 L135.934314,35.0020629 Z M90.6842361,18 C102.390255,18 117.291276,29.0909926 135.387298,51.2729777 C135.788651,51.7649527 136.005428,52.3826288 136,53.0184911 C135.986842,54.5193144 134.764215,55.7253489 133.269082,55.7122445 L133.269082,55.7122445 L132.315346,55.7054689 C124.694302,55.6640063 117.285613,55.9284091 110.089277,56.4986773 C101.590961,57.17212 92.7164767,58.325393 83.4658235,59.9584962 C82.0138691,60.2148231 80.6245044,59.2578618 80.3403697,57.805758 L80.3403697,57.805758 L80.1871846,57.0136235 C75.2176347,31.0045412 78.7166519,18 90.6842361,18 Z",fill:"#FF4154"}))))}const Ey=(e,t,n=!1)=>Nf.useSyncExternalStore(r.useCallback(t=>n?()=>{}:e.subscribe(mf.batchCalls(t)),[e,n]),t,t),Sy=r.forwardRef(function(e,t){const{isOpen:n=!0,styleNonce:o,setIsOpen:a,context:i,onDragStart:s,onPositionChange:u,showCloseButton:c,position:l,closeButtonProps:d={},errorTypes:p=[],...h}=e,{onClick:f,...g}=d,m=Bf({context:i}),y=m.getQueryCache(),[v,b]=zg("reactQueryDevtoolsSortFn",Object.keys(Km)[0]),[_,k]=zg("reactQueryDevtoolsFilter",""),[w,x]=zg("reactQueryDevtoolsBaseSort",1),E=r.useMemo(()=>Km[v],[v]),S=Ey(y,()=>y.getAll().length,!n),[C,R]=zg("reactQueryDevtoolsActiveQueryHash",""),I=r.useMemo(()=>{const e=y.getAll();if(0===S)return[];const t=_?e.filter(e=>Og(e.queryHash,_).passed):[...e];return E?t.sort((e,t)=>E(e,t)*w):t},[w,E,_,S,y]),[T,A]=r.useState(!1);return r.createElement(Mm,{theme:qm},r.createElement(ey,bg({ref:t,className:"ReactQueryDevtoolsPanel","aria-label":"React Query Devtools Panel",id:"ReactQueryDevtoolsPanel"},h,{style:{height:$m,position:"relative",...h.style}}),r.createElement("style",{nonce:o,dangerouslySetInnerHTML:{__html:"\n .ReactQueryDevtoolsPanel * {\n scrollbar-color: "+qm.backgroundAlt+" "+qm.gray+";\n }\n\n .ReactQueryDevtoolsPanel *::-webkit-scrollbar, .ReactQueryDevtoolsPanel scrollbar {\n width: 1em;\n height: 1em;\n }\n\n .ReactQueryDevtoolsPanel *::-webkit-scrollbar-track, .ReactQueryDevtoolsPanel scrollbar-track {\n background: "+qm.backgroundAlt+";\n }\n\n .ReactQueryDevtoolsPanel *::-webkit-scrollbar-thumb, .ReactQueryDevtoolsPanel scrollbar-thumb {\n background: "+qm.gray+";\n border-radius: .5em;\n border: 3px solid "+qm.backgroundAlt+";\n }\n "}}),r.createElement("div",{style:Xm(l),onMouseDown:s}),n&&r.createElement("div",{style:{flex:"1 1 500px",minHeight:"40%",maxHeight:"100%",overflow:"auto",borderRight:"1px solid "+qm.grayAlt,display:"flex",flexDirection:"column"}},r.createElement("div",{style:{padding:".5em",background:qm.backgroundAlt,display:"flex",justifyContent:"space-between",alignItems:"center"}},r.createElement("button",{type:"button","aria-label":"Close React Query Devtools","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"true",onClick:()=>a(!1),style:{display:"inline-flex",background:"none",border:0,padding:0,marginRight:".5em",cursor:"pointer"}},r.createElement(xy,{"aria-hidden":!0}),r.createElement(uy,{text:"Close React Query Devtools"})),r.createElement("div",{style:{display:"flex",flexDirection:"column"}},r.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:".5em"}},r.createElement(Ry,{queryCache:y}),l&&u?r.createElement(sy,{"aria-label":"Panel position",value:l,style:{marginInlineStart:".5em"},onChange:e=>u(e.target.value)},r.createElement("option",{value:"left"},"Left"),r.createElement("option",{value:"right"},"Right"),r.createElement("option",{value:"top"},"Top"),r.createElement("option",{value:"bottom"},"Bottom")):null),r.createElement("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5em"}},r.createElement(iy,{placeholder:"Filter","aria-label":"Filter by queryhash",value:null!=_?_:"",onChange:e=>k(e.target.value),onKeyDown:e=>{"Escape"===e.key&&k("")},style:{flex:"1",width:"100%"}}),r.createElement(sy,{"aria-label":"Sort queries",value:v,onChange:e=>b(e.target.value),style:{flex:"1",minWidth:75,marginRight:".5em"}},Object.keys(Km).map(e=>r.createElement("option",{key:e,value:e},"Sort by ",e))),r.createElement(ny,{type:"button",onClick:()=>x(e=>-1*e),style:{padding:".3em .4em",marginRight:".5em"}},1===w?"⬆ Asc":"⬇ Desc"),r.createElement(ny,{title:"Clear cache","aria-label":"Clear cache",type:"button",onClick:()=>y.clear(),style:{padding:".3em .4em",marginRight:".5em"}},"Clear"),r.createElement(ny,{type:"button",onClick:()=>{T?(cf.setOnline(void 0),A(!1),window.dispatchEvent(new Event("online"))):(cf.setOnline(!1),A(!0))},"aria-label":T?"Restore offline mock":"Mock offline behavior",title:T?"Restore offline mock":"Mock offline behavior",style:{padding:"0",height:"2em"}},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2em",height:"2em",viewBox:"0 0 24 24",stroke:T?qm.danger:"currentColor",fill:"none"},T?r.createElement(r.Fragment,null,r.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),r.createElement("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"}),r.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),r.createElement("path",{d:"M6.343 12.343a7.963 7.963 0 0 1 3.864 -2.14m4.163 .155a7.965 7.965 0 0 1 3.287 2"}),r.createElement("path",{d:"M3.515 9.515a12 12 0 0 1 3.544 -2.455m3.101 -.92a12 12 0 0 1 10.325 3.374"}),r.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"})):r.createElement(r.Fragment,null,r.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),r.createElement("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"}),r.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),r.createElement("path",{d:"M6.343 12.343a8 8 0 0 1 11.314 0"}),r.createElement("path",{d:"M3.515 9.515c4.686 -4.687 12.284 -4.687 17 0"}))),r.createElement(uy,{text:T?"Restore offline mock":"Mock offline behavior"}))))),r.createElement("div",{style:{overflowY:"auto",flex:"1"}},I.map(e=>r.createElement(Iy,{queryKey:e.queryKey,activeQueryHash:C,setActiveQueryHash:R,key:e.queryHash,queryCache:y})))),C&&n?r.createElement(Cy,{activeQueryHash:C,queryCache:y,queryClient:m,errorTypes:p}):null,c?r.createElement(ny,bg({type:"button","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"true"},g,{style:{position:"absolute",zIndex:99999,margin:".5em",bottom:0,left:0,...g.style},onClick:e=>{a(!1),null==f||f(e)}}),"Close"):null))}),Cy=({queryCache:e,activeQueryHash:n,queryClient:o,errorTypes:a})=>{var i,s;const u=Ey(e,()=>e.getAll().find(e=>e.queryHash===n)),c=Ey(e,()=>{var t;return null==(t=e.getAll().find(e=>e.queryHash===n))?void 0:t.state}),l=null!=(i=Ey(e,()=>{var t;return null==(t=e.getAll().find(e=>e.queryHash===n))?void 0:t.isStale()}))&&i,d=null!=(s=Ey(e,()=>{var t;return null==(t=e.getAll().find(e=>e.queryHash===n))?void 0:t.getObserversCount()}))?s:0,p=t.useMemo(()=>{if(u&&null!=c&&c.error){const e=a.find(e=>{var t;return e.initializer(u).toString()===(null==(t=c.error)?void 0:t.toString())});return null==e?void 0:e.name}},[u,null==c?void 0:c.error,a]);if(!u||!c)return null;const h=e=>{var t;const n=null!=(t=null==e?void 0:e.initializer(u))?t:new Error("Unknown error from devtools"),r=u.options;u.setState({status:"error",error:n,fetchMeta:{...u.state.fetchMeta,__previousQueryOptions:r}})};return r.createElement(ty,null,r.createElement("div",{style:{padding:".5em",background:qm.backgroundAlt,position:"sticky",top:0,zIndex:1}},"Query Details"),r.createElement("div",{style:{padding:".5em"}},r.createElement("div",{style:{marginBottom:".5em",display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},r.createElement(ay,{style:{lineHeight:"1.8em"}},r.createElement("pre",{style:{margin:0,padding:0,overflow:"auto"}},Vm(u.queryKey,!0))),r.createElement("span",{style:{padding:"0.3em .6em",borderRadius:"0.4em",fontWeight:"bold",textShadow:"0 2px 10px black",background:Bm({queryState:c,isStale:l,observerCount:d,theme:qm}),flexShrink:0}},Fm(u))),r.createElement("div",{style:{marginBottom:".5em",display:"flex",alignItems:"center",justifyContent:"space-between"}},"Observers: ",r.createElement(ay,null,d)),r.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},"Last Updated:"," ",r.createElement(ay,null,new Date(c.dataUpdatedAt).toLocaleTimeString()))),r.createElement("div",{style:{background:qm.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Actions"),r.createElement("div",{style:{padding:"0.5em",display:"flex",flexWrap:"wrap",gap:"0.5em",alignItems:"flex-end"}},r.createElement(ny,{type:"button",onClick:()=>{const e=null==u?void 0:u.fetch();null==e||e.catch(Ty)},disabled:"fetching"===c.fetchStatus,style:{background:qm.active}},"Refetch")," ",r.createElement(ny,{type:"button",onClick:()=>o.invalidateQueries(u),style:{background:qm.warning,color:qm.inputTextColor}},"Invalidate")," ",r.createElement(ny,{type:"button",onClick:()=>o.resetQueries(u),style:{background:qm.gray}},"Reset")," ",r.createElement(ny,{type:"button",onClick:()=>o.removeQueries(u),style:{background:qm.danger}},"Remove")," ",r.createElement(ny,{type:"button",onClick:()=>{var e;if("fetching"!==u.state.fetchStatus||void 0!==(null==(e=u.state.fetchMeta)?void 0:e.__previousQueryOptions))if(void 0===u.state.data)u.fetch(u.state.fetchMeta.__previousQueryOptions,{cancelRefetch:!0});else{const e=u.options;u.fetch({...e,queryFn:()=>new Promise(()=>{}),cacheTime:-1}),u.setState({data:void 0,status:"loading",fetchMeta:{...u.state.fetchMeta,__previousQueryOptions:e}})}},style:{background:qm.paused}},"loading"===u.state.status?"Restore":"Trigger"," ","loading")," ",0===a.length||"error"===u.state.status?r.createElement(ny,{type:"button",onClick:()=>{u.state.error?o.resetQueries(u):h()},style:{background:qm.danger}},"error"===u.state.status?"Restore":"Trigger"," error"):r.createElement("label",null,"Trigger error:",r.createElement(sy,{value:null!=p?p:"",style:{marginInlineStart:".5em"},onChange:e=>{const t=a.find(t=>t.name===e.target.value);h(t)}},r.createElement("option",{key:"",value:""}),a.map(e=>r.createElement("option",{key:e.name,value:e.name},e.name))))),r.createElement("div",{style:{background:qm.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Data Explorer"),r.createElement("div",{style:{padding:".5em"}},r.createElement(wy,{label:"Data",value:c.data,defaultExpanded:{},copyable:!0})),r.createElement("div",{style:{background:qm.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Query Explorer"),r.createElement("div",{style:{padding:".5em"}},r.createElement(wy,{label:"Query",value:u,defaultExpanded:{queryKey:!0}})))},Ry=({queryCache:e})=>{const t=Ey(e,()=>e.getAll().filter(e=>"fresh"===Fm(e)).length),n=Ey(e,()=>e.getAll().filter(e=>"fetching"===Fm(e)).length),o=Ey(e,()=>e.getAll().filter(e=>"paused"===Fm(e)).length),a=Ey(e,()=>e.getAll().filter(e=>"stale"===Fm(e)).length),i=Ey(e,()=>e.getAll().filter(e=>"inactive"===Fm(e)).length);return r.createElement(ry,null,r.createElement(oy,{style:{background:qm.success,opacity:t?1:.3}},"fresh ",r.createElement(ay,null,"(",t,")"))," ",r.createElement(oy,{style:{background:qm.active,opacity:n?1:.3}},"fetching ",r.createElement(ay,null,"(",n,")"))," ",r.createElement(oy,{style:{background:qm.paused,opacity:o?1:.3}},"paused ",r.createElement(ay,null,"(",o,")"))," ",r.createElement(oy,{style:{background:qm.warning,color:"black",textShadow:"0",opacity:a?1:.3}},"stale ",r.createElement(ay,null,"(",a,")"))," ",r.createElement(oy,{style:{background:qm.gray,opacity:i?1:.3}},"inactive ",r.createElement(ay,null,"(",i,")")))},Iy=r.memo(({queryKey:e,setActiveQueryHash:t,activeQueryHash:n,queryCache:o})=>{var a,i,s,u;const c=null!=(a=Ey(o,()=>{var t;return null==(t=o.find(e))?void 0:t.queryHash}))?a:"",l=Ey(o,()=>{var t;return null==(t=o.find(e))?void 0:t.state}),d=null!=(i=Ey(o,()=>{var t;return null==(t=o.find(e))?void 0:t.isStale()}))&&i,p=null!=(s=Ey(o,()=>{var t;return null==(t=o.find(e))?void 0:t.isDisabled()}))&&s,h=null!=(u=Ey(o,()=>{var t;return null==(t=o.find(e))?void 0:t.getObserversCount()}))?u:0;return l?r.createElement("div",{role:"button","aria-label":"Open query details for "+c,onClick:()=>t(n===c?"":c),style:{display:"flex",borderBottom:"solid 1px "+qm.grayAlt,cursor:"pointer",background:c===n?"rgba(255,255,255,.1)":void 0}},r.createElement("div",{style:{flex:"0 0 auto",width:"2em",height:"2em",background:Bm({queryState:l,isStale:d,observerCount:h,theme:qm}),display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",textShadow:d?"0":"0 0 10px black",color:d?"black":"white"}},h),p?r.createElement("div",{style:{flex:"0 0 auto",height:"2em",background:qm.gray,display:"flex",alignItems:"center",fontWeight:"bold",padding:"0 0.5em"}},"disabled"):null,r.createElement(ay,{style:{padding:".5em"}},""+c)):null});function Ty(){}Iy.displayName="QueryRow";const Ay="development"!==process.env.NODE_ENV?function(){return null}:function({initialIsOpen:e,panelProps:t={},closeButtonProps:n={},toggleButtonProps:o={},position:a="bottom-left",containerElement:i="aside",context:s,styleNonce:u,panelPosition:c="bottom",errorTypes:l=[]}){const d=r.useRef(null),p=r.useRef(null),[h,f]=zg("reactQueryDevtoolsOpen",e),[g,m]=zg("reactQueryDevtoolsHeight",$m),[y,v]=zg("reactQueryDevtoolsWidth",$m),[b="bottom",_]=zg("reactQueryDevtoolsPanelPosition",c),[k,w]=r.useState(!1),[x,E]=r.useState(!1),S=function(){const e=r.useRef(!1),t=r.useCallback(()=>e.current,[]);return r.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t}();r.useEffect(()=>{w(null!=h&&h)},[h,k,w]),r.useEffect(()=>{const e=p.current;if(e){const t=()=>{k&&(e.style.visibility="visible")},n=()=>{k||(e.style.visibility="hidden")};return e.addEventListener("transitionstart",t),e.addEventListener("transitionend",n),()=>{e.removeEventListener("transitionstart",t),e.removeEventListener("transitionend",n)}}},[k]),r.useEffect(()=>{var e;if(k&&null!=(e=d.current)&&e.parentElement){const{parentElement:e}=d.current,t=Zm("padding",b),n=Ym(b),r=(({padding:e,paddingTop:t,paddingBottom:n,paddingLeft:r,paddingRight:o})=>({padding:e,paddingTop:t,paddingBottom:n,paddingLeft:r,paddingRight:o}))(e.style),o=()=>{e.style.padding="0px",e.style.paddingTop="0px",e.style.paddingBottom="0px",e.style.paddingLeft="0px",e.style.paddingRight="0px",e.style[t]=(n?y:g)+"px"};if(o(),"undefined"!=typeof window)return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),Object.entries(r).forEach(([t,n])=>{e.style[t]=n})}}},[k,b,g,y]);const{style:C={},...R}=t,{style:I={},onClick:T,...A}=o,O=function({position:e="bottom",height:t,width:n,devtoolsTheme:r,isOpen:o,isResizing:a,panelStyle:i}){const s=Jm(e),u=Zm("border",s),c=Ym(e);return{...i,direction:"ltr",position:"fixed",[e]:0,[u]:"1px solid "+r.gray,transformOrigin:s,boxShadow:"0 0 20px rgba(0,0,0,.3)",zIndex:99999,visibility:o?"visible":"hidden",...a?{transition:"none"}:{transition:"all .2s ease"},...o?{opacity:1,pointerEvents:"all",transform:c?"translateX(0) scale(1)":"translateY(0) scale(1)"}:{opacity:0,pointerEvents:"none",transform:c?"translateX(15px) scale(1.02)":"translateY(15px) scale(1.02)"},...c?{top:0,height:"100vh",maxWidth:"90%",width:"number"==typeof n&&n>=70?n:$m}:{left:0,width:"100%",maxHeight:"90%",height:"number"==typeof t&&t>=70?t:$m}}}({position:b,devtoolsTheme:qm,isOpen:k,height:g,width:y,isResizing:x,panelStyle:C});return S()?r.createElement(i,{ref:d,className:"ReactQueryDevtools","aria-label":"React Query Devtools"},r.createElement(Mm,{theme:qm},r.createElement(Sy,bg({ref:p,context:s,styleNonce:u,position:b,onPositionChange:_,showCloseButton:!0,closeButtonProps:n},R,{style:O,isOpen:k,setIsOpen:f,onDragStart:e=>((e,t)=>{if(!e)return;if(0!==t.button)return;const n=Ym(b);E(!0);const{height:r,width:o}=e.getBoundingClientRect(),a=t.clientX,i=t.clientY;let s=0;const u=e=>{e.preventDefault(),n?(s=o+("right"===b?a-e.clientX:e.clientX-a),v(s)):(s=r+("bottom"===b?i-e.clientY:e.clientY-i),m(s)),f(!(s<70))},c=()=>{x&&E(!1),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseUp",c,!1)};document.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",c,!1)})(p.current,e),errorTypes:l}))),k?null:r.createElement("button",bg({type:"button"},A,{"aria-label":"Open React Query Devtools","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"false",onClick:e=>{f(!0),null==T||T(e)},style:{background:"none",border:0,padding:0,position:"fixed",zIndex:99999,display:"inline-flex",fontSize:"1.5em",margin:".5em",cursor:"pointer",width:"fit-content",..."top-right"===a?{top:"0",right:"0"}:"top-left"===a?{top:"0",left:"0"}:"bottom-right"===a?{bottom:"0",right:"0"}:{bottom:"0",left:"0"},...I}}),r.createElement(xy,{"aria-hidden":!0}),r.createElement(uy,{text:"Open React Query Devtools"}))):null};process.env.NODE_ENV;var Oy,Py={backgroundColor:"#fcfcff",width:"100%",zIndex:1e7,height:"100%",position:"absolute"};exports.ApiErrorCodes=void 0,(Oy=exports.ApiErrorCodes||(exports.ApiErrorCodes={})).ECONNABORTED="ECONNABORTED",Oy.ETIMEDOUT="ETIMEDOUT",Oy.ERR_BAD_REQUEST="ERR_BAD_REQUEST";var Dy=["LOCAL","DEV","STG"].includes(process.env.ENVIRONMENT||"");"undefined"!=typeof window&&Dy&&function(){e.__awaiter(this,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:if(!di())return console.info('MSW is disabled. Run "window.enableMSW()" to enable it.'),[2];console.info('MSW is enabled. Run "window.disableMSW()" to disable it.'),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,ui.start({serviceWorker:{url:"/mockServiceWorker.js"},onUnhandledRequest:"bypass"})];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),console.error("Error starting MSW:",t),[3,4];case 4:return[2]}})})}(),exports.Api=Dh,exports.ApiProvider=function(n){var r=this,o=n.children,a=process.env.ENVIRONMENT,i=t.useMemo(function(){return"DEV"!==a&&"LOCAL"!==a?"testing":"live"},[a]),s=t.useState(!1),u=s[0],c=s[1],l=t.useCallback(function(t){return e.__awaiter(r,void 0,void 0,function(){var n,r,o,a,s;return e.__generator(this,function(u){switch(u.label){case 0:return n=localStorage.getItem("headers"),r=n&&JSON.parse(n),o=localStorage.getItem("isTesting")&&"OFF"!==localStorage.getItem("isTesting")?"testing":"live",a=localStorage.getItem("x-organization-code"),s=a?JSON.parse(a).value:"",[4,zh.refreshInstance({headers:e.__assign(e.__assign({},r),{"X-Environment":o||i,"x-organization-code":s,"x-account-code":t.detail.accountCode,"X-Content-Type-Options":"nosniff"})})];case 1:return u.sent(),[2]}})})},[i]);t.useEffect(function(){return addEventListener("ACCOUNT_CHANGED",l),function(){window.removeEventListener("ACCOUNT_CHANGED",l)}},[l]);var d=t.useCallback(function(t){return e.__awaiter(r,void 0,void 0,function(){var n,r,o,a,s,u,l;return e.__generator(this,function(d){switch(d.label){case 0:return n=localStorage.getItem("headers"),(r=n&&JSON.parse(n))?(o=localStorage.getItem("x-organization-code"),a=localStorage.getItem("account"),s=a?null===(l=JSON.parse(a).value)||void 0===l?void 0:l.code:"",u=o?JSON.parse(o).value:"",[4,zh.refreshInstance({headers:e.__assign(e.__assign({},r),{"X-Environment":t||i,"x-organization-code":u,"x-account-code":s,"X-Content-Type-Options":"nosniff"})})]):[3,2];case 1:d.sent(),ng.refetchQueries(["fetch-profile","accountsV2","accounts","fetch-all-organizations","fetch-permissions"]),c(!0),d.label=2;case 2:return[2]}})})},[i,c]);return t.useEffect(function(){var e=localStorage.getItem("isTesting")&&"OFF"!==localStorage.getItem("isTesting")?"testing":"live";window.addEventListener("storage",function(t){if("token"===t.key||"isTesting"===t.key){var n="OFF"===t.newValue?"live":"testing";"isTesting"===t.key?d(n):"token"===t.key&&d(e)}}),d(e)},[c,d]),u?React.createElement(Ff,{client:ng},o,React.createElement(Ay,{initialIsOpen:!1})):React.createElement("div",{style:Py})},exports.ApiSingleton=zh,exports.CONCIERGE_ALERTS_QUERY_KEY=ig,exports.CONCIERGE_ALERT_BY_ID_QUERY_KEY=sg,exports.FEEDBACK_ISSUE_OPTIONS=[{value:"CHART_NOT_EXPECTED",labelKey:"insights.feedback.issues.chartNotExpected"},{value:"TIME_RANGE_INCORRECT",labelKey:"insights.feedback.issues.timeRangeIncorrect"},{value:"DATA_INACCURATE",labelKey:"insights.feedback.issues.dataInaccurate"},{value:"NOT_ANSWERING_QUESTION",labelKey:"insights.feedback.issues.notAnsweringQuestion"},{value:"EXPECTED_INSIGHTS",labelKey:"insights.feedback.issues.expectedInsights"},{value:"OTHER",labelKey:"insights.feedback.issues.other"}],exports.getQueryKeyGetNameAndIcon=cg,exports.getQueryKeyPaymentMethodAccounts=dg,exports.getQueryKeyRequiredFields=lg,exports.queryCache=tg,exports.queryClient=ng,exports.use3DSExemptions=function(){var t=this;return Kf({queryKey:["smart-routing-3ds-excemptions"],queryFn:function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})},exports.useAICreateWorkflow=function(t,n){return void 0===n&&(n={}),$f(function(e){return zh.getInstance().generateAIWorkflowRoutes(t,e).then(function(e){return null==e?void 0:e.data})},e.__assign(e.__assign({},n),{useErrorBoundary:!1}))},exports.useAccountCode=eg,exports.useAddToRiskList=function(){return $f(function(e){var t=e.paymentId,n=e.payload;return zh.getInstance().addToRiskList(t,n)})},exports.useAllFeatureFlags=function(n){var r=this,o=Kf({queryKey:["all-feature-flags",Object.values(n).filter(Boolean)],queryFn:function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getFeatureFlagIdAll({accountCode:n.account_code}).then(function(e){return null==e?void 0:e.data})]})})},enabled:!!n.account_code&&!!n.organization_code&&!!n.email,cacheTime:9e5,useErrorBoundary:!1}),a=Bf();return t.useEffect(function(){a.setQueryData(["cached-feature-flags"],o)},[o,a]),o},exports.useAllowListDetail=function(e,t,n){return Kf(["allow-list-detail",e],function(){return zh.getInstance().getAllowlistDetail(e,t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e&&!!n})},exports.useBlackListDetail=function(e,t,n,r,o,a){return Kf(["black-list-detail",e,t,r,o,a],function(){return zh.getInstance().getBlacklistDetail(e,t,n,r,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&a,cacheTime:0})},exports.useBlockOnboarding=function(){var e=Bf();return $f(["block-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId;return zh.getInstance().blockOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useBulkCreateInstallmentsPlans=function(){return $f(["bulk-create-installments-plans"],function(e){var t=e.payload;return zh.getInstance().bulkCreateInstallmentsPlans(t).then(function(e){return null==e?void 0:e.data})})},exports.useBulkDeleteInstallmentsPlans=function(){return $f(["bulk-delete-installments-plans"],function(e){var t=e.payload;return zh.getInstance().bulkDeleteInstallmentsPlans(t).then(function(e){return null==e?void 0:e.data})})},exports.useBulkToggleMethod=function(t,n){var r=this;return void 0===n&&(n=null),$f(function(n){return e.__awaiter(r,void 0,void 0,function(){var r,o,a,i,s,u;return e.__generator(this,function(e){switch(e.label){case 0:return r=zh.getInstance(),o=n.map(function(e){return r.putSmartRoutingToggleMethod(t,e.paymentMethod,e.active,e.routingType)}),[4,Promise.allSettled(o)];case 1:return a=e.sent(),i=a.filter(function(e){return"rejected"===e.status}),s=a.filter(function(e){return"fulfilled"===e.status}),u=i.map(function(e,t){return{paymentMethod:n[t].paymentMethod,error:"rejected"===e.status?e.reason:null}}),[2,{success:s.length,failed:i.length,total:n.length,errors:u}]}})})},n)},exports.useCachedFeatureFlag=function(t){var n,r,o=Bf(),a=o.getQueryState(["cached-feature-flags"]),i=Boolean(!(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.status)||"loading"===(null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.status)),s=Kf({queryKey:["cached-feature-flags"],queryFn:function(){},enabled:!1,select:function(e){var n;return{result:null===(n=null==e?void 0:e.data)||void 0===n?void 0:n[t]}},initialData:function(){var e=o.getQueryData(["cached-feature-flags"]);return(null==e?void 0:e.data)||{}}});return e.__assign(e.__assign({},s),{isLoading:i})},exports.useCancelReport=function(){return $f(function(e){return zh.getInstance().cancelReport(e).then(function(e){return null==e?void 0:e.data})})},exports.useCancelSubscription=function(){return $f(["post-cancel-subscription"],function(e){var t=e.subscriptionCode;return zh.getInstance().postCancelSubscription(t).then(function(e){return null==e?void 0:e.data})})},exports.useChangePasswordV2=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().changePasswordV2(n).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})},exports.useChangePaymentsWebhook=function(){return $f(["change-payments-webhook"],function(e){var t=e.status,n=e.paymentCode;return zh.getInstance().postChangePaymentsWebhook({status:t,paymentCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useChangeStatusBlackList=function(){return $f(["change-blacklist"],function(e){return zh.getInstance().changeBlackListStatus(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useChangeStatusItemBlackList=function(){return $f(["change-blacklist-item"],function(e){return zh.getInstance().changeBlackListStatusItem(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useChangeStylingSettings=function(){return $f(function(e){var t=e.accountCode,n=e.payload;return zh.getInstance().changeStylingSettings({accountCode:t,payload:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})},exports.useChangeTemplateStatus=function(){var t=this;return $f(["PATCH/template-reporting/report-templates/status"],function(n){var r=n.templateId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().changeTemplateStatus(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useChargebacksUpload=function(){return $f(function(e){var t=e.payload,n=e.paymentId,r=e.transactionId,o=e.handleSetProgress;return zh.getInstance().uploadChargebacks(t,n,r,o)})},exports.useChartAssistantSocket=function(){var e=t.useRef(null),n=t.useRef(null),r=t.useRef(null),o=t.useState(!1),a=o[0],i=o[1],s=t.useState(null),u=s[0],c=s[1],l=t.useState(null),d=l[0],p=l[1],h=t.useCallback(function(){n.current&&(clearInterval(n.current),n.current=null),r.current&&(clearTimeout(r.current),r.current=null)},[]),f=t.useCallback(function(){n.current&&(clearInterval(n.current),n.current=null),r.current&&(clearTimeout(r.current),r.current=null),p(null);try{var t=new WebSocket("".concat(Nh["WS_URL_".concat(Nh.ENVIRONMENT)],"/data-assistant/charts/ws"));e.current=t,t.onopen=function(){i(!0);var e=localStorage.getItem("token");e&&t.send(JSON.stringify({type:"auth",token:e})),n.current=setInterval(function(){t.readyState===WebSocket.OPEN?t.send(JSON.stringify({type:"ping"})):(h(),i(!1))},3e4)},t.onmessage=function(e){try{var t=JSON.parse(e.data);c(t)}catch(e){p("Failed to parse server response")}},t.onerror=function(e){p("Connection error occurred"),i(!1)},t.onclose=function(e){i(!1),h(),e.wasClean||1e3===e.code||(r.current=setTimeout(function(){f()},5e3))}}catch(e){p("Failed to establish connection")}},[]),g=t.useCallback(function(t){var n;(null===(n=e.current)||void 0===n?void 0:n.readyState)===WebSocket.OPEN&&e.current.send(JSON.stringify({type:"subscribe",chart_id:t}))},[]),m=t.useCallback(function(t){var n;(null===(n=e.current)||void 0===n?void 0:n.readyState)===WebSocket.OPEN&&e.current.send(JSON.stringify({type:"unsubscribe",chart_id:t}))},[]),y=t.useCallback(function(){c(null)},[]),v=t.useCallback(function(){n.current&&(clearInterval(n.current),n.current=null),r.current&&(clearTimeout(r.current),r.current=null),e.current&&(i(!1),e.current.close(1e3,"Manual disconnect"),e.current=null)},[]);return t.useEffect(function(){return f(),function(){h(),v()}},[]),{subscribe:g,unsubscribe:m,disconnect:v,connect:f,clearChartData:y,isConnected:a,chartData:u,connectionError:d}},exports.useChartExecute=function(e){return Kf(["chartgpt-chart-execute",e],function(){return zh.getInstance().executeChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e})},exports.useCloneTemplate=function(){var t=this;return $f(["POST/template-reporting/report-templates/clone"],function(n){var r=n.templateId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().cloneReportTemplate(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useCommunicationDetails=function(e,t){return Kf(["fetch-communication-details",e],function(){return zh.getInstance().getCommunicationDetails(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,useErrorBoundary:!1,cacheTime:0})},exports.useCommunications=function(e){var t;return Kf(["fetch-communications",e],function(){return zh.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})},exports.useCommunicationsByDay=function(t,n){return Kf(e.__assign({queryKey:["smart-recovery-communications-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return n=zh.getInstance(),r={start_date:t.start_date||"",end_date:t.end_date||"",organization_code:t.organization_code,account_codes:t.account_code||[],countries:t.countries||[],channels:t.channels||[],focuses:t.focuses||[],timezone:t.timezone},[4,n.post("/nova-insights/communications-by-day",r)];case 1:return o=e.sent(),[2,(a=o.data,i=r.start_date,s=r.end_date,u=a.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=fg(null==c?void 0:c.rows,i,s),h=fg(null==l?void 0:l.rows,i,s),f=fg(null==d?void 0:d.rows,i,s),{communications:{distribution:p.map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:hg(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==c?void 0:c.value)||"0")},conversion_rate:{distribution:f.map(function(e){return{key:e.date||"",total:parseFloat(e.value),percentage:parseFloat(e.value)}}),total:parseFloat((null==d?void 0:d.value)||"0")},completed_communications:{distribution:h.map(function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:hg(e.date||""),current_amount:parseFloat(e.value)}}),total:parseFloat((null==l?void 0:l.value)||"0")}})]}var a,i,s,u,c,l,d,p,h,f})})},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useCommunicationsBySubstatus=function(t,n){return Kf(e.__assign({queryKey:["smart-recovery-communications-by-substatus",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return n=zh.getInstance(),r={start_date:t.start_date||"",end_date:t.end_date||"",organization_code:t.organization_code,account_codes:t.account_code||[],countries:t.countries||[],channels:t.channels||[],focuses:t.focuses||[],timezone:t.timezone},[4,n.post("/nova-insights/communications-by-substatus",r)];case 1:return o=e.sent(),[2,gg(o.data)]}})})},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useCommunicationsFilters=function(){return Kf(["fetch-communications-filters"],function(){return zh.getInstance().getCommunicationsFilters().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})},exports.useCommunicationsSubstatusByDay=function(t,n){return Kf(e.__assign({queryKey:["smart-recovery-communications-substatus-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return n=zh.getInstance(),r={start_date:t.start_date||"",end_date:t.end_date||"",organization_code:t.organization_code,account_codes:t.account_code||[],countries:t.countries||[],channels:t.channels||[],focuses:t.focuses||[],timezone:t.timezone},[4,n.post("/nova-insights/communications-substatus-by-day",r)];case 1:return o=e.sent(),[2,mg(o.data,r.start_date,r.end_date)]}})})},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useConfirmedOtpMfa=function(){return $f(function(e){return zh.getInstance().confirmMfaOtp(e).then(function(e){return null==e?void 0:e.data})})},exports.useCountRowsForReport=function(){return $f(function(e){return zh.getInstance().getTotalRowsForExport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.useCreateAndExecuteChart=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){var t,r,o,a,i;return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().createChartGPTChart(n)];case 1:if(t=e.sent(),!(r=null!==(a=null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.chartgpt_id)&&void 0!==a?a:null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.chart_id))throw new Error("Failed to create chart: No chart ID returned");return[2,{chart_id:r}]}})})},{useErrorBoundary:!1})},exports.useCreateAndExecuteChartWithTimezone=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){var t,r,o,a,i;return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().createChartGPTChart(n)];case 1:if(t=e.sent(),!(r=null!==(a=null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.chartgpt_id)&&void 0!==a?a:null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.chart_id))throw new Error("Failed to create chart: No chart ID returned");return[2,{chart_id:r}]}})})},{useErrorBoundary:!1})},exports.useCreateChart=function(){return $f(function(e){return zh.getInstance().createChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreateChartWithTimezone=function(){return $f(function(e){return zh.getInstance().createChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreateConciergeAlert=function(){return $f(["POST/concierge/alerts"],function(e){return zh.getInstance().createConciergeAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries([ig]),ng.invalidateQueries([sg])},useErrorBoundary:!1})},exports.useCreateInstallmentsPlan=function(){return $f(["create-installments-plan"],function(e){var t=e.payload;return zh.getInstance().createInstallmentsPlan(t).then(function(e){return null==e?void 0:e.data})})},exports.useCreateMonitorTemplate=function(e){return $f(function(t){return zh.getInstance().createMonitorTemplate(t,e).then(function(e){return e.data})})},exports.useCreateMonitorThreshold=function(e){return $f(function(t){return zh.getInstance().createMonitorThreshold(t,e).then(function(e){return e.data})})},exports.useCreateOnboarding=function(){var e=Bf();return $f(["create-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.payload;return zh.getInstance().createOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useCreateOperationTransaction=function(){return $f(function(e){var t=e.payload,n=e.transactionId,r=e.paymentId,o=e.action;return zh.getInstance().createOperationTransaction(t,n,r,o)})},exports.useCreateOrgRole=function(){return $f(function(e){var t=e.payload;return zh.getInstance().createOrgRole(t).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreatePaymentLinks=function(){return $f(["post-payment-links"],function(e){var t=e.payload,n=e.accountCode;return zh.getInstance().postPaymentLinks({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data})})},exports.useCreateRecipient=function(){var e=Bf();return $f(["create-recipient"],function(e){var t=e.organizationCode,n=e.payload;return zh.getInstance().createRecipient(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useCreateReconciliationAlert=function(){return $f(["POST/reconciliation/alerts"],function(e){return zh.getInstance().postReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useCreateReconciliationReportTemplate=function(t){var n=this;return $f(function(){return zh.getInstance().createReconciliationReportTemplate(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{onMutate:function(t){return e.__awaiter(n,void 0,void 0,function(){var n,r;return e.__generator(this,function(o){switch(o.label){case 0:return[4,ng.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return o.sent(),n=null===(r=ng.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===r?void 0:r.templates,ng.setQueryData(["GET/reconciliation/reports/templates"],function(n){return{templates:e.__spreadArray(e.__spreadArray([],n.templates,!0),[t],!1)}}),[2,{previousTemplates:n}]}})})},onError:function(e,t,n){ng.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){ng.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})},exports.useCreateReconciliationsReportV2=function(){return $f(function(e){return zh.getInstance().createReconciliationsReportV2(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreateReconciliationsReportV3=function(){return $f(function(e){return zh.getInstance().createReconciliationsReportV3(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreateReportTemplate=function(t){var n=this;return $f(function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().createReportTemplate(t).then(function(e){return null==e?void 0:e.data})]})})},{onMutate:function(t){return e.__awaiter(n,void 0,void 0,function(){var n;return e.__generator(this,function(r){switch(r.label){case 0:return[4,ng.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return r.sent(),n=ng.getQueryData(["GET/reports/templates"]),ng.setQueryData(["GET/reports/templates"],function(n){return e.__spreadArray(e.__spreadArray([],n,!0),[t],!1)}),[2,{previousTemplates:n}]}})})},onError:function(e,t,n){ng.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){ng.invalidateQueries({queryKey:["GET/reports/templates"]})}})},exports.useCreateReportV2=function(){return $f(function(e){return zh.getInstance().createReportV2(e).then(function(e){return null==e?void 0:e.data})})},exports.useCreateRoles=function(){return $f(function(e){var t=e.payload,n=e.accountCode;return zh.getInstance().createRoles(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useCreateSamlConfig=function(){return $f(function(e){return zh.getInstance().createSamlConfig(e)})},exports.useCreateSchedule=function(){var t=this;return $f(["POST/template-reporting/report-schedules"],function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().createReportSchedule(n).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useCreateScheduledReport=function(){return $f(function(e){var t=e.payload;return zh.getInstance().postScheduledReport(t).then(function(e){return{data:e.data,status:e.status}}).catch(function(e){return e})})},exports.useCreateSubscription=function(){return $f(["post-subscription"],function(e){return zh.getInstance().postSubscription(e).then(function(e){return null==e?void 0:e.data})})},exports.useCreateTemplate=function(){var t=this;return $f(["POST/template-reporting/report-templates"],function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().createTemplateReporting(n).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useCreateUserAuth0=function(){return $f(function(e){return zh.getInstance().createUserAuth0(e)})},exports.useCreateWorkflow=function(t,n,r){var o=this;void 0===r&&(r=null);var a=(null==r?void 0:r.basePath)||exports.SmartRouting.DEFAULT_ROUTING_TYPE;return $f(function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().postSmartRoutingCreateWorkflow(t,n,a).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})},r)},exports.useDeleteAccountsUserMassive=function(){return $f(function(e){var t=e.organizationCode,n=e.userCode,r=e.payload;return zh.getInstance().deleteAccountsUserMassive(t,n,r)})},exports.useDeleteAllowlistItem=function(){return $f(["delete-allowlist-item"],function(e){return zh.getInstance().deleteAllowlistItem({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.useDeleteBlackListType=function(){return $f(["delete-blacklist"],function(e){var t=e.black_list_code;return zh.getInstance().deleteBlackListType({black_list_code:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useDeleteBlockListItem=function(){return $f(["delete-blacklist-items"],function(e){var t=e.blocklist_code,n=e.blocklist_item_id,r=e.account_code;return zh.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:r}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useDeleteChart=function(){return $f(function(e){return zh.getInstance().deleteChartGPTChart(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useDeleteConciergeAlert=function(){return $f(["DELETE/concierge/alerts"],function(e){return zh.getInstance().deleteConciergeAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries([ig]),ng.invalidateQueries([sg])},useErrorBoundary:!1})},exports.useDeleteCustomizedApiKeys=function(){return $f(function(e){var t=e.code;return zh.getInstance().deleteCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.useDeleteInstallmentsPlan=function(){return $f(["delete-installments-plan"],function(e){var t=e.code;return zh.getInstance().deleteInstallmentsPlan(t).then(function(e){return null==e?void 0:e.data})})},exports.useDeleteOrgRole=function(){return $f(function(e){return zh.getInstance().deleteOrgRole(e).then(function(e){return null==e?void 0:e.data})})},exports.useDeletePaymentLink=function(){return $f(["post-delete-payment-link"],function(e){var t=e.code;return zh.getInstance().postDeletePaymentLink({code:t}).then(function(e){return null==e?void 0:e.data})})},exports.useDeleteRecipient=function(){var e=Bf();return $f(["delete-recipient"],function(e){var t=e.organizationCode,n=e.recipientId;return zh.getInstance().deleteRecipient(t,n).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useDeleteReconciliationAlert=function(){return $f(["DELETE/reconciliation/alerts"],function(e){return zh.getInstance().deleteReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useDeleteReportTemplate=function(){return $f(function(e){return zh.getInstance().deletePaymentsReportTemplate(e).then(function(e){return null==e?void 0:e.data})})},exports.useDeleteRoles=function(){return $f(function(e){return zh.getInstance().deleteRoles(e).then(function(e){return null==e?void 0:e.data})})},exports.useDeleteSamlConfig=function(){return $f(function(){return zh.getInstance().deleteSamlConfig()})},exports.useDeleteSchedule=function(){var t=this;return $f(["DELETE/template-reporting/report-schedules"],function(n){var r=n.scheduleId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().deleteReportSchedule(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useDeleteScheduledReport=function(){return $f(function(e){return zh.getInstance().deleteScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useDeleteTemplate=function(){var t=this;return $f(["DELETE/template-reporting/report-templates"],function(n){var r=n.templateId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().deleteReportTemplate(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useDeleteUserTeamV2=function(){return $f(function(e){var t=e.userCode,n=e.organizationCode;return zh.getInstance().deleteUserTeamV2({userCode:t,organizationCode:n}).then(function(e){return null==e?void 0:e.data})})},exports.useDeleteVersion=function(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?exports.SmartRouting.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),$f(function(){return zh.getInstance().deleteSmartRoutingVersion(r,n,a).then(function(e){return null==e?void 0:e.data})},t)},exports.useDeleteWebhookV2=function(e){return $f(function(e){var t=e.code,n=e.accountCode;return zh.getInstance().deleteWebhookV2(t,n)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useDisableSchedule=function(){var t=this;return $f(["PATCH/template-reporting/report-schedules/disable"],function(n){var r=n.scheduleId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().disableReportSchedule(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useDuplicateAccount=function(){return $f(function(t){var n=e.__spreadArray([exports.DuplicateSetting.ACCOUNT],t.duplicate_order,!0);return zh.getInstance().duplicateAccount(e.__assign(e.__assign({},t),{duplicate_order:n}))})},exports.useDuplicateVersion=function(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?exports.SmartRouting.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),$f(function(){return zh.getInstance().postSmartRoutingDuplicateVersion(r,String(n),a).then(function(e){return null==e?void 0:e.data})},t)},exports.useEditOrgRole=function(){var t=this;return $f(function(n){var r=n.payload,o=n.id;return e.__awaiter(t,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().editOrgRole({payload:r,id:o})];case 1:return[2,null==(t=e.sent())?void 0:t.data]}})})},{useErrorBoundary:!1})},exports.useEditPaymentLinks=function(){return $f(["patch-payment-links"],function(e){var t=e.payload,n=e.accountCode,r=e.paymentLinkCode;return zh.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:r}).then(function(e){return null==e?void 0:e.data})})},exports.useEditRoles=function(){var t=this;return $f(function(n){var r=n.payload,o=n.id,a=n.accountCode;return e.__awaiter(t,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().editRoles({payload:r,id:o},a)];case 1:return[2,null==(t=e.sent())?void 0:t.data]}})})},{useErrorBoundary:!1})},exports.useEmailVerification=function(e){return Kf(["email-verification",e],function(){return zh.getInstance().emailVerification(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})},exports.useEnableConciergeAlert=function(){return $f(["POST/concierge/alerts/enable"],function(e){var t=e.alertId,n=e.payload;return zh.getInstance().enableConciergeAlert(t,n).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries([ig]),ng.invalidateQueries([sg])},useErrorBoundary:!1})},exports.useExcludeUsers=function(){return $f(function(e){var t=e.payload,n=e.organizationCode;return zh.getInstance().mfaExcludeUsers(t,n)})},exports.useExportApiLogs=function(){return $f(function(e){return zh.getInstance().postExportApiLogs(e).then(function(e){return null==e?void 0:e.data})})},exports.useExportDashboardLogs=function(){return $f(function(e){return zh.getInstance().postExportDashboardLogs(e).then(function(e){return null==e?void 0:e.data})})},exports.useExportMonitorsLogs=function(){return $f(function(e){return zh.getInstance().postExportMonitorsLogs(e).then(function(e){return null==e?void 0:e.data})})},exports.useExportWebhooksLogs=function(){return $f(function(e){return zh.getInstance().postExportWebhooksLogs(e).then(function(e){return null==e?void 0:e.data})})},exports.useFeatureFlags=function(t){var n=this,r=Object.values(t).filter(Boolean);return Kf(["feature-flags",r],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getFeatureFlagId(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:r.length>1,useErrorBoundary:!1})},exports.useFetchUserExportDetail=function(){var t=this,n=Bf();return function(r){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,n.fetchQuery(["user-export-status",r],function(){return zh.getInstance().getUserExportStatus({exportCode:r}).then(function(e){return null==e?void 0:e.data})})]})})}},exports.useFirebaseUserSubscribe=function(e){return $f(function(e){var t=e.payload;return zh.getInstance().firebaseUserSubscribe(t)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useGenerateFeedback=function(t){return void 0===t&&(t={}),$f(function(e){return zh.getInstance().postAIGenerationFeedback(e).then(function(e){return null==e?void 0:e.data})},e.__assign(e.__assign({},t),{useErrorBoundary:!1}))},exports.useGetAccounts=function(e){var t,n=Xf(),r=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return Kf({queryKey:["accounts",r],queryFn:function(){return zh.getInstance().getAccounts(r).then(function(e){return null==e?void 0:e.data})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!r})},exports.useGetAccountsByUser=function(e){return Kf(["accountsV2-by-user",e],function(){return e?zh.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})},exports.useGetAccountsForImpersonation=function(t,n){var r=this;return Kf({queryKey:["accounts-for-impersonation",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getAccountsForImpersonation(t).then(function(e){var t,r;return(null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.response)||void 0===r?void 0:r.map(function(e){return{label:e.name,value:n?e.code_testing:e.code_live,code_live:e.code_live,code_testing:e.code_testing}}))||[]})]})})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!t})},exports.useGetAccountsV2=function(e){return Kf(["accountsV2",e],function(){return zh.getInstance().getAccountsV2().then(function(e){return(null==e?void 0:e.data)||[]}).catch(function(e){throw e})},{keepPreviousData:!0,enabled:!!e,useErrorBoundary:!1})},exports.useGetAllConfigRules=function(){return Kf(["config-rules"],function(){return zh.getInstance().getAllConfigRules().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0})},exports.useGetAllOrganizations=function(){return Kf(["fetch-all-organizations",Xf()],function(){return zh.getInstance().getAllOrganization().then(function(e){return(null==e?void 0:e.data)||[]})},{cacheTime:36e5,keepPreviousData:!0,useErrorBoundary:!1})},exports.useGetAllReconciliationsAdvancements=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/advancements/list",t,n],function(){return zh.getInstance().getReconciliationAdvancements(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetAllReconciliationsAgenda=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/agenda/list",t,n],function(){return zh.getInstance().getReconciliationAgenda(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetAllReconciliationsAlerts=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/alerts/list",t,n],function(){return zh.getInstance().getReconciliationAlerts(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetAllReconciliationsFees=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/fees/list",t,n],function(){return zh.getInstance().getReconciliationFees(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetAllReconciliationsSales=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/sales/list",t,n],function(){return zh.getInstance().getReconciliationSales(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetAllTableColumns=function(e){return Kf(["GET/v1/reconciliation/table/".concat(e,"/columns")],function(){return zh.getInstance().getAllTableColumns(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.useGetAllowedIps=function(){return Kf(["developers-get-allowed-ips"],function(){return zh.getInstance().getAllowedIps().then(function(t){return(null==t?void 0:t.data)?e.__assign(e.__assign({},null==t?void 0:t.data),{isError:!1}):null}).catch(function(t){return e.__assign(e.__assign({},t),{isError:!0})})},{enabled:!1,cacheTime:0})},exports.useGetApiLogsByTransactionCode=function(e,t){return Kf(["api-logs-by-transaction",e,t],function(){return zh.getInstance().getApiLogsByTransactionCode(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!t,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsDetailByPaymentCode=function(e,t){return Kf(["api-logs-detail",e,t],function(){return zh.getInstance().getApiLogsDetailByPaymentCode(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsList=function(t){return Kf(["api-logs-list",t],function(){return zh.getInstance().postApiLogsList(e.__assign({},t)).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.start_date,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsStatsErrors=function(t){return Kf(["api-logs-stats-errors",t],function(){return zh.getInstance().postApiLogsStatsErrors(e.__assign({},t)).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.start_date,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsStatsErrorsByEndpoint=function(t){return Kf(["api-logs-stats-errors-by-endpoint",t],function(){return zh.getInstance().postApiLogsStatsErrorsByEndpoint(e.__assign({},t)).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.start_date,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsStatsRequests=function(t){return Kf(["api-logs-stats-requests",t],function(){return zh.getInstance().postApiLogsStatsRequests(e.__assign({},t)).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.start_date,cacheTime:0,useErrorBoundary:!1})},exports.useGetApiLogsV3=function(t){var n=this,r=t.paymentCode,o=t.enabled;return Kf({queryKey:["api-logs-v3",r],queryFn:function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getApiLogsV3(r).then(function(e){return null==e?void 0:e.data})]})})},enabled:(void 0===o||o)&&!!r,staleTime:3e4,cacheTime:3e5,useErrorBoundary:!1})},exports.useGetApiLogsV3ByPaymentCode=function(e){var t=e.paymentCode,n=e.createdAtFrom,r=e.enabled;return Kf(["api-logs-v2-payment",t,n],function(){return zh.getInstance().getApiLogsV3ByPaymentCode(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:(void 0===r||r)&&!!t,cacheTime:0,useErrorBoundary:!1})},exports.useGetAuditEvents=function(e){return Kf(["events",e],function(){return zh.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})},exports.useGetAuditExportDownload=function(e,t,n){return void 0===t&&(t=!1),Kf(["audit-export-download",e],function(){return zh.getInstance().getAuditExportDownload(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&t,cacheTime:0,useErrorBoundary:!1,onSuccess:n})},exports.useGetAuditExportsList=function(e,t){return void 0===t&&(t=!0),Kf(["audit-exports-list",e],function(){return zh.getInstance().getAuditExportsList(e).then(function(e){return null==e?void 0:e.data})},{enabled:t,cacheTime:0,useErrorBoundary:!1})},exports.useGetAuditLogsFilters=function(){return Kf(["/cms/audit-logs-filters"],function(){return zh.getInstance().useGetAuditLogsFilters().then(function(e){return yh(e)?wh:null==e?void 0:e.data}).catch(function(){return wh})})},exports.useGetAuditMonitorEventDetail=function(e){return Kf(["audit-monitor-event-detail",e],function(){return zh.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})},exports.useGetBatchRefundProcessedFileDownload=function(){var t=this;return $f(function(n){var r=n.batchRefundId,o=n.organizationCode,a=n.accountCode;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getBatchRefundProcessedFileDownload(r,o,a).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})},exports.useGetBatchRefundUserFileDownload=function(){var t=this;return $f(function(n){var r=n.batchRefundId,o=n.organizationCode,a=n.accountCode;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getBatchRefundUserFileDownload(r,o,a).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})},exports.useGetBatchRefunds=function(t,n){var r=this;return void 0===t&&(t=26),void 0===n&&(n=0),Kf(["batch-refunds",t,n],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getBatchRefunds(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{cacheTime:0})},exports.useGetBlackList=function(e,t){return void 0===t&&(t=!0),Kf(["get-black-list",e],function(){return zh.getInstance().getBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e&&t})},exports.useGetBlockListSummary=function(e,t,n){return Kf(["get-block-list-summary",e,t,n],function(){var r=zh.getInstance();return n?r.getBlackListSummary(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e}):Promise.resolve({})},{enabled:!!e&&!!n})},exports.useGetCardBrands=function(){return Kf(["GET/catalog/card-brands"],function(){return zh.getInstance().getCardBrands().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetChartFeedback=function(t){var n=this,r=t.chartCode,o=t.enabled;return Kf(["chart-feedback",r],function(){return e.__awaiter(n,void 0,void 0,function(){var t,n,o,a,i;return e.__generator(this,function(e){switch(e.label){case 0:t=zh.getInstance(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.getChartFeedback(r)];case 2:return n=e.sent(),(o=null==n?void 0:n.data)&&o.rating?[2,o]:[2,null];case 3:if(a=e.sent(),404===(null===(i=null==a?void 0:a.response)||void 0===i?void 0:i.status))return[2,null];throw a;case 4:return[2]}})})},{enabled:(void 0===o||o)&&!!r,staleTime:3e5})},exports.useGetChartsByUser=function(){return Kf(["chartgpt-user-charts"],function(){return zh.getInstance().getChartsByUser().then(function(e){return null==e?void 0:e.data})},{cacheTime:0})},exports.useGetChartsByUserWithResults=function(){var t=this;return Kf(["chartgpt-user-charts-with-results"],function(){return e.__awaiter(t,void 0,void 0,function(){var t,n,r,o=this;return e.__generator(this,function(a){switch(a.label){case 0:return[4,(t=zh.getInstance()).getChartsByUser()];case 1:return n=a.sent(),r=(null==n?void 0:n.data)||[],[4,Promise.all(r.map(function(n){return e.__awaiter(o,void 0,void 0,function(){var r,o,a,i,s,u,c,l;return e.__generator(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),[4,t.executeChartGPTChart(n.code)];case 1:return r=d.sent(),[2,e.__assign(e.__assign({},n),{user_prompt:null!==(i=null===(a=null==r?void 0:r.data)||void 0===a?void 0:a.user_prompt)&&void 0!==i?i:n.user_prompt,unit_to_display:null!==(u=null===(s=null==r?void 0:r.data)||void 0===s?void 0:s.unit_to_display)&&void 0!==u?u:n.unit_to_display,results:null!==(l=null===(c=null==r?void 0:r.data)||void 0===c?void 0:c.results)&&void 0!==l?l:[]})];case 2:return o=d.sent(),console.error("Failed to execute chart ".concat(n.chart_id,":"),o),[2,e.__assign(e.__assign({},n),{results:[]})];case 3:return[2]}})})}))];case 2:return[2,a.sent()]}})})})},exports.useGetCheckouts=function(t,n){var r=t.accountCode;return Kf(["checkouts",r],function(){return zh.getInstance().getCheckouts({accountCode:r}).then(function(e){return e.data})},e.__assign({cacheTime:0,enabled:Boolean(r),useErrorBoundary:!1},n))},exports.useGetConciergeAlertById=function(e){return Kf([sg,e],function(){return zh.getInstance().getConciergeAlertById(e).then(function(e){return e.data})},{enabled:!!e,useErrorBoundary:!1})},exports.useGetConciergeAlerts=function(){return Kf([ig],function(){return zh.getInstance().getConciergeAlerts().then(function(e){return e.data})},{useErrorBoundary:!1})},exports.useGetConditionalConfigRules=function(){return $f(function(e){return zh.getInstance().getConditionalConfigRules(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useGetConfigAllowlist=function(e,t){return Kf(["get-cofig-allow-list",e],function(){return zh.getInstance().getConfigAllowlist(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0,enabled:!!e&&!!t})},exports.useGetConnections=function(){return Kf(["connections"],function(){return zh.getInstance().getConnections().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.useGetConnectionsByPaymentMethod=function(e){var t=e.accountCode,n=e.paymentMethod,r=e.basePath,o=void 0===r?exports.SmartRouting.DEFAULT_ROUTING_TYPE:r;return Kf(["fetch-connections-by-payment-method",n,t,o],function(){return zh.getInstance().getConnectionsByPaymentMethod(t,n,o).then(function(e){return null==e?void 0:e.data})},{enabled:!!n&&!!t,cacheTime:0,useErrorBoundary:!1})},exports.useGetCountriesConfigPaymentLink=function(e){return void 0===e&&(e=!0),Kf(["countries",e],function(){return zh.getInstance().useGetCountriesConfig().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,keepPreviousData:!0})},exports.useGetCountriesConfigPaymentLinkV2=function(e){var t=localStorage.getItem("lang")||"en",n=e||t;return Kf(["countries-v2",n],function(){return zh.getInstance().useGetCountriesConfigV2(n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!0,keepPreviousData:!0})},exports.useGetCountryData=function(e){return Kf(["checkout-builder-country-data",e],function(){return zh.getInstance().getCountryData({accountCode:e}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:Boolean(e),useErrorBoundary:!1})},exports.useGetCredentials=function(t){var n=t.password,r=t.accountCode,o=t.otp,a=t.mfaToken;return Kf(["developers"],function(){return zh.getInstance().getDeveloperCredentials(n,r,o,a).then(function(t){return e.__assign(e.__assign({},null==t?void 0:t.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})},exports.useGetCredentialsMFA=function(){return $f(function(t){var n=t.password,r=t.accountCode,o=t.otp,a=t.mfaToken;return zh.getInstance().getDeveloperCredentials(n,r,o,a).then(function(t){return e.__assign(e.__assign({},null==t?void 0:t.data),{isValid:!0})}).catch(function(e){var t,n,r;return{isValid:!1,status:null===(t=e.response)||void 0===t?void 0:t.status,error:null===(r=null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.data)||void 0===r?void 0:r.data}})})},exports.useGetCustomizedApiKeys=function(e){return Kf(["fetch-customized-api-keys",e],function(){return zh.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)})},exports.useGetCustomizedApiKeysAccounts=function(){return Kf(["fetch-customized-api-keys-accounts"],function(){return zh.getInstance().getCustomizedApiKeysAccounts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})},exports.useGetCustomizedApiKeysMembers=function(){return Kf(["fetch-customized-api-keys-members"],function(){return zh.getInstance().getCustomizedApiKeysMembers().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})},exports.useGetCustomizedApiKeysProducts=function(){return Kf(["fetch-customized-api-keys-products"],function(){return zh.getInstance().getCustomizedApiKeysProducts().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{cacheTime:0})},exports.useGetCustomizedApiKeysToken=function(){return $f(function(e){var t=e.code,n=e.password,r=e.otp,o=e.mfaToken;return zh.getInstance().getCustomizedApiKeysToken(t,n,r,o).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})},exports.useGetDashboardStaticContents=function(){return Kf(["/cms/static-contents"],function(){return zh.getInstance().getDashboardStaticContents().then(function(e){var t,n;return yh(e)?xh:(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})},exports.useGetDialogs=function(){return Kf(["dialogs"],function(){return zh.getInstance().getDialogs().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,retryDelay:2e3,cacheTime:36e5})},exports.useGetDownloadReport=function(e,t,n){return void 0===t&&(t=!1),Kf(["reports/".concat(e)],function(){return zh.getInstance().downloadReports(e).then(function(e){return null==e?void 0:e.data})},{enabled:t,onSuccess:n,useErrorBoundary:!1})},exports.useGetEmailOtp=function(){return $f(function(){return zh.getInstance().getEmailOtp().then(function(e){return null==e?void 0:e.data})})},exports.useGetHashPylon=function(){var t=this;return Kf(["fetch-hash-pylon"],function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getHashPylon()]})})},{keepPreviousData:!0,useErrorBoundary:!1})},exports.useGetImpersonationEnabled=function(){return Kf(["fetch-impersonation-enabled"],function(){return zh.getInstance().getImpersonationEnabled().then(function(e){return null==e?void 0:e.data})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})},exports.useGetImpersonationUsers=function(){return Kf(["fetch-impersonation-users"],function(){return zh.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})},exports.useGetInsightsReport=function(e){return Kf(["get-insights-reports",e],function(){return zh.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})},exports.useGetInsightsReportAgain=function(e){return Kf(["get-insights-reports-again",e],function(){return zh.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})},exports.useGetInstallmentsPlans=function(e,t,n){return void 0===t&&(t=!0),Kf(["installments-plans",e,n],function(){return zh.getInstance().getInstallmentPlans(n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(e)&&t,useErrorBoundary:!1})},exports.useGetIntegrationByAccountV2=function(e){var t=e.accountCode,n=e.organizationCode,r=Xf();return Kf(["organizations-account-integrations",t,n],function(){return zh.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||r}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,enabled:!!t,useErrorBoundary:!1})},exports.useGetIntegrationParams=function(e){var t=e.integration_code,n=e.enabled,r=e.accountCode;return Kf(["integration-params",t,r],function(){return t.includes("undefined")?{}:zh.getInstance().getIntegrationParams({accountCode:r,integration_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:n,useErrorBoundary:!1})},exports.useGetLanguages=function(){return Kf(["languages"],function(){return zh.getInstance().getLanguages().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:300})},exports.useGetLocales=function(){return Kf(["/cms/locales"],function(){return zh.getInstance().getLocales().then(function(e){return yh(e)?Sh:e.data}).catch(function(){return Sh})})},exports.useGetLoginMethods=function(){return Kf({queryKey:["get-login-methods"],queryFn:function(){return zh.getInstance().getLoginMethods().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})}})},exports.useGetMFAConfig=function(e,t){var n=e.organizationCode;return Kf(["mfa-config",n],function(){return zh.getInstance().getMFAConfig({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})},exports.useGetMFAExcludedUsers=function(e,t){var n=e.organizationCode;return Kf(["mfa-excluded-users",n],function(){return zh.getInstance().getMFAExcludedUsers({organizationCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})},exports.useGetMFAStatus=function(e,t){return Kf(["mfa-enforcement-status",e.accountCode],function(){return zh.getInstance().getMFAEnforcementStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:t})},exports.useGetMenu=function(){return Kf(["menu"],function(){return zh.getInstance().getMenu().then(function(e){return yh(e)?Eh:null==e?void 0:e.data}).catch(function(){return Eh})})},exports.useGetMergedNotifications=function(){return Kf(["notifications-merged"],function(){return zh.getInstance().getMergedNotifications().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{keepPreviousData:!1,cacheTime:0})},exports.useGetNameAndIcon=function(e,t){var n=e.paymentMethodType,r=e.type;return Kf(cg({paymentMethodType:n,type:r}),function(){return zh.getInstance().getNameAndIcon({paymentMethodType:n,type:r}).then(function(e){return null==e?void 0:e.data})},t)},exports.useGetNetworkTokensOnboardingByOrganization=function(t){var n=this;return Kf({queryKey:["network-tokens-onboarding",t],queryFn:function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getNetworkTokensOnboardingByOrganization(t)];case 1:return[2,e.sent().data]}})})},enabled:!!t,useErrorBoundary:!1,cacheTime:0})},exports.useGetNotificationsCustomer=function(e){return Kf(["notifications-customer",e],function(){return zh.getInstance().getNotificationsCustomer(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,keepPreviousData:!1})},exports.useGetNotificationsNumberMutation=function(){return $f(function(e){return zh.getInstance().getNotificationsNumber(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useGetOnboardingDetail=function(t,n,r){var o=this;return void 0===r&&(r=!0),Kf(["get-onboarding-detail",t,n.recipient_id,n.onboarding_id],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getOnboardingDetail(t,n.recipient_id,n.onboarding_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&!!n.recipient_id&&!!n.onboarding_id&&r,cacheTime:500,useErrorBoundary:!1})},exports.useGetOnboardingStatus=function(e){var t=e.accountCode,n=e.enabled;return Kf(["onboarding-status",t],function(){return zh.getInstance().getOnboardingStatus(t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})},exports.useGetOnboardingTimeline=function(t,n,r){var o=this;return void 0===r&&(r=!0),Kf(["get-onboarding-timeline",t,n.onboarding_id],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getOnboardingTimeline(t,n.onboarding_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&!!n.onboarding_id&&r,cacheTime:500,useErrorBoundary:!1})},exports.useGetOrgPermissionsCatalog=function(){return Kf(["fetch-org-permissions-catalog"],function(){return zh.getInstance().getOrgPermissionsCatalog().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetOrgRolesPermissions=function(){return Kf(["fetch-org-roles-permissions"],function(){return zh.getInstance().getOrgRolesPermissions().then(function(e){return null==e?void 0:e.data})})},exports.useGetOrganization=function(){return Kf(["fetch-organizations"],function(){return zh.getInstance().getOrganization().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{keepPreviousData:!0})},exports.useGetOrganizationConfigs=function(){return Kf({queryKey:["organization-configs"],queryFn:function(){return zh.getInstance().getOrganizationConfigs().then(function(e){return null==e?void 0:e.data})},cacheTime:0,useErrorBoundary:!1})},exports.useGetOrganizationKeysMetadata=function(){return $f(function(){return zh.getInstance().getOrganizationKeysMetadata().then(function(e){return(null==e?void 0:e.data)||null})})},exports.useGetPaymentFilters=function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=exports.PaymentFiltersSection.PAYMENTS),Kf(["payment-filters",e,t],function(){return zh.getInstance().getPaymentFilters(t).then(function(e){return null==e?void 0:e.data})},{enabled:e,useErrorBoundary:!1,cacheTime:3e5})},exports.useGetPaymentLinkByCode=function(e){return Kf(["payment-link"],function(){return zh.getInstance().getPaymentLinksByCode(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e})},exports.useGetPaymentLinks=function(e,t){return Kf(["fetch-payment-links",e,t],function(){return zh.getInstance().getPaymentLinks(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,cacheTime:0})},exports.useGetPaymentMethodAccounts=function(t,n){var r=t.paymentMethod,o=t.organizationCode;return Kf(dg({paymentMethod:r,organizationCode:o}),function(){return zh.getInstance().getPaymentMethodAccounts({paymentMethod:r,organizationCode:o}).then(function(e){return null==e?void 0:e.data})},e.__assign({cacheTime:0,enabled:Boolean(r),useErrorBoundary:!1},n))},exports.useGetPaymentMethodsAndProviders=function(){return Kf({queryKey:["/payment-methods/providers"],queryFn:function(){return zh.getInstance().getPaymentMethodsAndProviders().then(function(e){return null==e?void 0:e.data})},cacheTime:864e5,useErrorBoundary:!1})},exports.useGetPaymentMetricsFilters=function(){return Kf(["payment-metrics-filters"],function(){return zh.getInstance().getPaymentMetricsFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetPaymentStatusesStyles=function(){return Kf(["/payment/statuses/style"],function(){return zh.getInstance().useGetPaymentStatusesStyles().then(function(e){return yh(e)?vh:null==e?void 0:e.data}).catch(function(){return vh})})},exports.useGetPaymentTransactionsDetails=function(e){var t=e.transaction_code,n=e.enabled;return Kf(["payment-transaction-details",t],function(){return zh.getInstance().getPaymentTransactionsDetails({transaction_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})},exports.useGetPaymentV2=function(t){var n=this,r=t.paymentCode,o=t.enabled,a=void 0===o||o,i=zh.getInstance();return Kf(["get-payment-v2",r],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,i.getPaymentV2(r).then(function(e){return e.data})]})})},{enabled:a,cacheTime:500,useErrorBoundary:!1})},exports.useGetPaymentsMethodsByCountry=function(e){var t=Xf();return Kf(["payment-methods",e],function(){return zh.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})},exports.useGetPayoutDetail=function(e){return Kf(["GET/payout-detail",JSON.stringify(e)],function(){var t=zh.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})},exports.useGetPayoutHistoryDetail=function(e){var t=Xf();return Kf(["GET/payout-history-detail",JSON.stringify(e)],function(){return zh.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})},exports.useGetPayoutTimeline=function(t,n){var r=this;void 0===n&&(n=!0);var o=Xf();return Kf(["getPayoutTimeline",t,o],function(){return e.__awaiter(r,void 0,void 0,function(){var n;return e.__generator(this,function(e){return n=zh.getInstance(),t?[2,n.getPayoutTimeline(t,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]:[2]})})},{enabled:n&&!!t&&!!o,cacheTime:500,useErrorBoundary:!1})},exports.useGetPayoutTransactionDetail=function(e){return Kf(["GET/payout-transaction-detail",JSON.stringify(e)],function(){return zh.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})},exports.useGetPendingDuplicateAccounts=function(e){return Kf({queryKey:["pending-duplicate-accounts",e],queryFn:function(){return zh.getInstance().getPendingDuplicateAccounts()},useErrorBoundary:!1,keepPreviousData:!0,refetchInterval:e})},exports.useGetPermissions=function(e,t){return Kf(["fetch-permissions",e,t],function(){var e,t,n,r=localStorage.getItem("account"),o=localStorage.getItem("user"),a=r&&JSON.parse(r),i=o&&JSON.parse(o);return((null==i?void 0:i.merlin)?null===(e=null==i?void 0:i.merlin)||void 0===e?void 0:e.permissions:null===(n=null===(t=null==a?void 0:a.value)||void 0===t?void 0:t.role)||void 0===n?void 0:n.permission_ids.map(function(e){return{permission_name:e,description:e,resource_server_name:e,resource_server_identifier:e}}))||[]})},exports.useGetPermissionsCatalog=function(){return Kf(["fetch-permissions-catalog"],function(){return zh.getInstance().getPermissionsCatalog().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.useGetProfile=og,exports.useGetProofOfCancel=function(t,n){var r=this,o=Xf();return Kf(["GET/useGetProofOfCancel",o,t,n],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getProofOfCancel(t,o,n).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&!!o&&!!n,cacheTime:0,useErrorBoundary:!1})},exports.useGetProofOfPayment=function(t,n){var r=this,o=Xf();return Kf(["GET/useGetProofOfPayment",o,t,n],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getProofOfPayment(t,o,n).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&!!o&&!!n,cacheTime:0,useErrorBoundary:!1})},exports.useGetProviderParams=function(e){var t=Xf();return Kf(["organizations-provider-params",e],function(e){var n=e.queryKey;return zh.getInstance().getProviderParams(n[1],t).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.id),useErrorBoundary:!1})},exports.useGetRecipientById=function(t,n,r){var o=this;return void 0===r&&(r=!0),Kf(["get-recipient-by-id",t,n.recipient_id],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getRecipientById(t,n.recipient_id).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&!!n.recipient_id&&r,cacheTime:500,useErrorBoundary:!1})},exports.useGetRecipients=function(t,n,r){var o=this;return void 0===r&&(r=!0),Kf(["get-recipients",t,n],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getRecipients(t,n).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&r,cacheTime:0,useErrorBoundary:!1})},exports.useGetReconciliationActive=function(){return Kf(["GET/v1/reconciliation/active"],function(){return zh.getInstance().getReconciliationActive().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{useErrorBoundary:!1})},exports.useGetReconciliationAgendaInsightsByKey=function(e){var t=e.body,n=e.params,r=e.enabled;return Kf(["GET/reconciliation/agenda/insights",t,n],function(){return zh.getInstance().getReconciliationAgendaInsightByKey(t,n).then(function(e){return e.data})},{enabled:r,useErrorBoundary:!1})},exports.useGetReconciliationFilters=function(){return Kf(["GET-reconciliation-filters"],function(){return zh.getInstance().getReconciliationFilters().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetReconciliationInsightsAmountConflictAggregators=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-amount-conflict-aggregators",t],function(){return zh.getInstance().getReconciliationInsightsAmountConflictAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsAmountConflictList=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-amount-conflict-list",t],function(){return zh.getInstance().getReconciliationInsightsAmountConflictList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsAmountToBeSettledSummary=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-amount-to-be-settled-summary",t],function(){return zh.getInstance().getReconciliationInsightsAmountToBeSettledSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsConflictDateAggregators=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-conflict-date-aggregators",t],function(){return zh.getInstance().getReconciliationInsightsConflictDateAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsConflictDateList=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-conflict-date-list",t],function(){return zh.getInstance().getReconciliationInsightsConflictDateList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsConflictDateSummary=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-conflict-date-summary",t],function(){return zh.getInstance().getReconciliationInsightsConflictDateSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsConflictsSummary=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-conflicts-summary",t],function(){return zh.getInstance().getReconciliationInsightsConflictsSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsFeesChargedSummary=function(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Kf(["reconciliation-insights-fees-charged-summary",t,n],function(){return zh.getInstance().getReconciliationInsightsFeesChargedSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})},exports.useGetReconciliationInsightsIncorrectFeesAggregators=function(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Kf(["reconciliation-insights-incorrect-fees-aggregators",t,n],function(){return zh.getInstance().getReconciliationInsightsIncorrectFeesAggregators(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})},exports.useGetReconciliationInsightsIncorrectFeesList=function(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Kf(["reconciliation-insights-incorrect-fees-list",t,n],function(){return zh.getInstance().getReconciliationInsightsIncorrectFeesList(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})},exports.useGetReconciliationInsightsIncorrectFeesSummary=function(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Kf(["reconciliation-insights-incorrect-fees-summary",t,n],function(){return zh.getInstance().getReconciliationInsightsIncorrectFeesSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})},exports.useGetReconciliationInsightsNotConfirmAggregators=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-not-confirm-aggregators",t],function(){return zh.getInstance().getReconciliationInsightsNotConfirmAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsNotConfirmList=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-not-confirm-list",t],function(){return zh.getInstance().getReconciliationInsightsNotConfirmList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsNotConfirmSummary=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-not-confirm-summary",t],function(){return zh.getInstance().getReconciliationInsightsNotConfirmSummary(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsNotReconciledAggregators=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-not-reconciled-aggregators",t],function(){return zh.getInstance().getReconciliationInsightsNotReconciledAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsNotReconciledList=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-not-reconciled-list",t],function(){return zh.getInstance().getReconciliationInsightsNotReconciledList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciledAggregators=function(e){var t=e.body,n=e.dateFilter,r=e.transactionType,o=e.enabled;return Kf(["reconciliation-insights-reconciled-aggregators",t,n,r],function(){return zh.getInstance().getReconciliationInsightsReconciledAggregators(t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===o||o,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciledList=function(e){var t=e.body,n=e.dateFilter,r=e.transactionType,o=e.enabled;return Kf(["reconciliation-insights-reconciled-list",t,n,r],function(){return zh.getInstance().getReconciliationInsightsReconciledList(t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===o||o,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciledSummary=function(e){var t=e.body,n=e.dateFilter,r=e.enabled;return Kf(["reconciliation-insights-reconciled-summary",t,n],function(){return zh.getInstance().getReconciliationInsightsReconciledSummary(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===r||r,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciliationRateByAccount=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-reconciliation-rate-by-account",t],function(){return zh.getInstance().getReconciliationInsightsReconciliationRateByAccount(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciliationRateByCurrency=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-reconciliation-rate-by-currency",t],function(){return zh.getInstance().getReconciliationInsightsReconciliationRateByCurrency(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsReconciliationRateByProvider=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-reconciliation-rate-by-provider",t],function(){return zh.getInstance().getReconciliationInsightsReconciliationRateByProvider(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsStatusConflictAggregators=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-status-conflict-aggregators",t],function(){return zh.getInstance().getReconciliationInsightsStatusConflictAggregators(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationInsightsStatusConflictList=function(e){var t=e.body,n=e.enabled;return Kf(["reconciliation-insights-status-conflict-list",t],function(){return zh.getInstance().getReconciliationInsightsStatusConflictList(t).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===n||n,useErrorBoundary:!1})},exports.useGetReconciliationMetrics=function(e,t){return Kf(["fetch-reconciliation-metrics",e],function(){return zh.getInstance().getReconciliationMetrics(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t,cacheTime:500})},exports.useGetReconciliationTransactionStatusesStyles=function(){return Kf(["/reconciliation/transaction/statuses/style"],function(){return zh.getInstance().useGetReconciliationTransactionStatusesStyles().then(function(e){return yh(e)?_h:null==e?void 0:e.data}).catch(function(){return _h})},{useErrorBoundary:!1})},exports.useGetReconciliationTransactions=function(e,t){return Kf(["fetch-reconciliation-transaction",e],function(){return zh.getInstance().getReconciliationTransactions(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})},exports.useGetReconciliationsReportColumns=function(e,t,n){return Kf(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],function(){return zh.getInstance().getReconciliationsReportColumns(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})},exports.useGetReconciliationsReportTemplates=function(e){return Kf(["GET/reconciliation/reports/templates"],function(){return zh.getInstance().getReconciliationReportTemplates().then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{enabled:e,useErrorBoundary:!1})},exports.useGetRefundPdf=function(t,n){var r=this,o=Xf();return Kf(["getRefundPdf",t,o,n],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getRefundPdf(t,o,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})]})})},{enabled:!!t&&!!o,useErrorBoundary:!1})},exports.useGetReportColumns=function(t,n,r){var o=this;return Kf(["GET/reports/columns/".concat(n,"/").concat(r)],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(t){return[2,zh.getInstance().getReportColumns(n,r).then(function(t){return n===exports.TemplateType.ALL&&r===exports.ReportType.PAYMENTS?e.__spreadArray(e.__spreadArray([],(null==t?void 0:t.data)||[],!0),[pg],!1):null==t?void 0:t.data}).catch(function(e){return e})]})})},{enabled:t,useErrorBoundary:!1})},exports.useGetReportTemplates=function(e){return Kf(["GET/reports/templates"],function(){return zh.getInstance().getReportTemplates().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e,useErrorBoundary:!1})},exports.useGetReportsList=function(){return Kf(["reports"],function(){return zh.getInstance().reportsList().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetReportsListMultiEnv=function(e){return void 0===e&&(e=!0),Kf(["reports-multi-env"],function(){return zh.getInstance().reportsListMultiEnv().then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:e})},exports.useGetRequiredFields=function(e,t){var n=e.paymentMethodType,r=e.type;return Kf(lg({paymentMethodType:n,type:r}),function(){return zh.getInstance().getRequiredFields({paymentMethodType:n,type:r}).then(function(e){return null==e?void 0:e.data})},t)},exports.useGetRoles=function(){return Kf(["fetch-roles"],function(){return zh.getInstance().getRoles().then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useGetRolesForImpersonation=function(t){var n=this;return Kf({queryKey:["roles-for-impersonation",t],queryFn:function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getRolesForImpersonation(t).then(function(e){var t,n;return(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.roles)||void 0===n?void 0:n.map(function(e){return{label:e.name,value:e.id}}))||[]})]})})},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!t})},exports.useGetRolesPermissions=function(){return Kf(["fetch-rolespermissions"],function(){return zh.getInstance().getRolesPermissions().then(function(e){return null==e?void 0:e.data})})},exports.useGetRoutingMonitorsTemplate=function(e,t){return Kf(["fetch-routing-monitors-template",e],function(){return zh.getInstance().getRoutingMonitorsTemplate(e,t).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e&&!!t&&"NONE"!==e,useErrorBoundary:!1})},exports.useGetRoutingMonitorsTemplates=function(e){return Kf(["fetch-routing-monitors-templates",e],function(){return zh.getInstance().getRoutingMonitorsTemplates(e).then(function(e){return e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})},exports.useGetRule=function(){return $f(function(e){return zh.getInstance().getRule(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useGetSamlConfig=function(e){return Kf(["fetch-organization-saml-config",e],function(){return zh.getInstance().getSamlConfig().then(function(e){return e.data})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})},exports.useGetScheduledReportsList=function(e){return Kf(["GET/scheduled-reports",e],function(){return zh.getInstance().getScheduledReport(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:!!e,useErrorBoundary:!1})},exports.useGetSettlements=function(e,t){return Kf(["fetch-reconciliation-settlements",e],function(){return zh.getInstance().getReconciliationSettlements(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!!t,useErrorBoundary:!1})},exports.useGetSmartRoutingConditionPaymentMethod=function(e,t){return Kf(["smart-routing-condition-payment-method",e,t],function(){return zh.getInstance().getSmartRoutingConditionPaymentMethod(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:null!==t})},exports.useGetSmartRoutingConditionTypes=function(e,t,n){return void 0===n&&(n=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-condition-types",e,t,n],function(){return zh.getInstance().getSmartRoutingConditionTypes(e,t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e})},exports.useGetSmartRoutingConditionTypesValues=function(e,t){return Kf(["smart-routing-condition-types-values",t,e],function(){return zh.getInstance().getSmartRoutingConditionTypesValues(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!e,useErrorBoundary:!1})},exports.useGetSmartRoutingDataReport=function(e){return Kf(["data-report",e],function(){return zh.getInstance().getSmartRoutingDataReport(e).then(function(e){return null==e?void 0:e.data})},{cacheTime:0,useErrorBoundary:!1})},exports.useGetSmartRoutingDeclineGroups=function(e,t){return void 0===t&&(t=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-decline-groups",e,t],function(){return zh.getInstance().getSmartRoutingDeclinedGroup(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})},exports.useGetSmartRoutingMethods=function(e,t){return void 0===t&&(t=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-methods",e,t],function(){return zh.getInstance().getSmartRoutingMethods(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})},exports.useGetSmartRoutingNextRoute=function(e,t,n,r){return void 0===r&&(r=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-next-route",e,n,t,r],function(){return zh.getInstance().getSmartRoutingNextSteps(e,t,n,r).then(function(e){return null==e?void 0:e.data})},{enabled:!!e,useErrorBoundary:!1})},exports.useGetSmartRoutingPaymentRoute=function(e,t,n){return void 0===n&&(n=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-payment-route",e,t,n],function(){return zh.getInstance().getSmartRoutingPaymentRoute(e,t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&!!t,cacheTime:0,useErrorBoundary:!1})},exports.useGetSmartRoutingSearchConditionValues=function(e){var t=e.text,n=e.conditionType;return Kf(["smart-routing-search-condition-values",t,n],function(){return zh.getInstance().getSmartRoutingSearchConditionValues(n,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})},exports.useGetSmartRoutingSimulateConditionTypeValues=function(e,t){return void 0===t&&(t=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-simulate-condition-type-values",e,t],function(){return zh.getInstance().getSmartRoutingSimulateConditionTypeValues(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e,cacheTime:0})},exports.useGetSmartRoutingWorkflow=function(e,t,n){return void 0===n&&(n=exports.SmartRouting.DEFAULT_ROUTING_TYPE),Kf(["smart-routing-workflow",t,e,n],function(){return zh.getInstance().getSmartRoutingWorkflow(e,t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!e,cacheTime:0,retry:!1})},exports.useGetSmartRoutingWorkflowVersion=function(e){var t=e.accountCode,n=e.workflowVersionId,r=e.routingType,o=void 0===r?exports.SmartRouting.DEFAULT_ROUTING_TYPE:r;return Kf(["smart-routing-workflow-version",n,t,o],function(){return zh.getInstance().getSmartRoutingWorkflowVersion(t,n,o).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!n&&!!t,cacheTime:0})},exports.useGetStylingSdkDynamic=function(e){var t=e.accountCode;return Kf(["styling-sdk-dynamic",t],function(){return zh.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})},exports.useGetStylingSettingsV2=function(e){var t=e.accountCode;return Kf(["styling-settings-v2",t],function(){return zh.getInstance().getStylingSettingsV2({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})},exports.useGetSubscriptionByCode=function(e,t){return void 0===t&&(t=!0),Kf(["subscription",e],function(){return zh.getInstance().getSubscriptionByCode(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!e&&t,cacheTime:500})},exports.useGetSubscriptionPayments=function(e,t,n,r){return void 0===r&&(r=!0),Kf(["subscription-payments",e,t,n],function(){return zh.getInstance().getSubscriptionPayments(e,t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&r,cacheTime:0})},exports.useGetTeamsFiltersMembers=function(){var e=Xf();return Kf(["teams-filters-members"],function(){return zh.getInstance().teamsFiltersMembers({organizationCode:e}).then(function(e){return null==e?void 0:e.data})},{cacheTime:0})},exports.useGetTimeZoneCatalog=function(){return Kf(["timezone-catalog"],function(){return zh.getInstance().useGetTimeZoneCatalog().then(function(e){return yh(e)?kh:null==e?void 0:e.data}).catch(function(){return kh})})},exports.useGetTimezonePaymentLink=function(e){return Kf(["timezone"],function(){return zh.getInstance().getTimezone(e).then(function(e){return yh(e)?kh:null==e?void 0:e.data}).catch(function(){return kh})},{enabled:!0,keepPreviousData:!0})},exports.useGetTokenValidation=function(){return $f(function(e){var t=e.password,n=e.otp;return zh.getInstance().getMfaTokenValidation(t,n).then(function(e){return null==e?void 0:e.data})})},exports.useGetTransactionDetailsV2=function(t){var n=this,r=t.payment_code,o=t.enabled,a=void 0===o||o,i=zh.getInstance();return Kf(["get-payment-transaction-details-v2",r],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,i.getTransactionDetailsV2({payment_code:r}).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!r&&a,cacheTime:0,useErrorBoundary:!1})},exports.useGetTransactionHistoryByPaymentCode=function(e){var t=e.payment_code,n=e.enabled;return Kf(["transaction-history",t],function(){return zh.getInstance().getTransactionHistoryByPaymentCode({payment_code:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})},exports.useGetTransactionRawResponse=function(t){var n=this,r=t.transaction_code,o=t.enabled,a=void 0===o||o,i=zh.getInstance();return Kf(["get-payment-transaction-raw-response",r],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,i.getTransactionRawResponse({transaction_code:r})]})})},{enabled:!!r&&a,cacheTime:0,useErrorBoundary:!1})},exports.useGetTransactionStatusesStyles=function(){return Kf(["/transaction/statuses/style"],function(){return zh.getInstance().useGetTransactionStatusesStyles().then(function(e){return yh(e)?bh:null==e?void 0:e.data}).catch(function(){return bh})},{cacheTime:36e5,useErrorBoundary:!1})},exports.useGetTranslations=function(){var e=localStorage.getItem("lang")||"en";return Kf(["translations",e],function(){return zh.getInstance().getTranslations(e).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,cacheTime:3e4})},exports.useGetUnifiedExportStatus=function(e){var t=e.tab,n=e.exportId,r=e.enabled,o=void 0!==r&&r,a=e.onSuccess;return Kf(["unified-export-status",t,n],function(){return zh.getInstance().getUnifiedExportStatus(t,n).then(function(e){return null==e?void 0:e.data})},{enabled:!!n&&o,cacheTime:0,useErrorBoundary:!1,onSuccess:a})},exports.useGetUnifiedExportsList=function(e){var t=e.tab,n=e.page,r=void 0===n?0:n,o=e.size,a=void 0===o?10:o,i=e.enabled;return Kf(["unified-exports-list",t,r,a],function(){return zh.getInstance().getUnifiedExportsList(t,r,a).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===i||i,cacheTime:0,useErrorBoundary:!1})},exports.useGetUserExportStatus=function(e){var t=e.exportCode,n=e.enabled;return Kf(["user-export-status",t],function(){return zh.getInstance().getUserExportStatus({exportCode:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&(void 0===n||n),refetchInterval:function(e){return("PENDING"===(null==e?void 0:e.status)||"IN_PROGRESS"===(null==e?void 0:e.status))&&5e3},useErrorBoundary:!1})},exports.useGetUserFull=function(){var t=this;return Kf(["get-user-full"],function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getUserFull()];case 1:return[2,e.sent().data]}})})},{keepPreviousData:!0,useErrorBoundary:!1})},exports.useGetUsersToImpersonate=function(t,n,r,o,a,i){var s=this;return void 0===r&&(r=1),void 0===o&&(o=10),Kf(["get-users-to-impersonate",t,n,r,o,a,i],function(){return e.__awaiter(s,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getUsersToImpersonate(t,n,r,o,a,i).then(function(e){return null==e?void 0:e.data})]})})},{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!t})},exports.useGetValidateOpsgenieKey=function(e){return Kf(["validate-opsgenie-key",e],function(){return zh.getInstance().getValidateOpsgenieKey(e).then(function(e){return null==e?void 0:e.data}).catch(function(){return{error:!0}})},{enabled:!!e,cacheTime:0})},exports.useGetWebhookParamsV2=function(){return Kf(["params-catalog"],function(){return zh.getInstance().getWebhookParamsV2().then(function(e){return null==e?void 0:e.data})})},exports.useGetWebhookTimeline=function(t){var n=this,r=t.paymentCode,o=t.enabled;return Kf({queryKey:["webhook-timeline",r],queryFn:function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getWebhookTimeline(r).then(function(e){return null==e?void 0:e.data})]})})},enabled:(void 0===o||o)&&!!r,staleTime:3e4,cacheTime:3e5,useErrorBoundary:!1})},exports.useGetWebhooksV2Detail=function(e){var t=e.accountCode,n=e.enabled;return Kf(["webhooks-detail",t],function(){return zh.getInstance().getWebhooksV2Detail({accountCode:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{enabled:!!t&&!!n})},exports.useGetWebhooksV3=function(e){var t=e.accountCode,n=e.name;return Kf(["webhooks",t,n],function(){return zh.getInstance().getWebhooksV3({accountCode:t,name:n}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t,useErrorBoundary:!1})},exports.useInsights3dsConversionRateAndEvolution=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-3ds-conversion-rate-and-evolution",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsights3dsConversionRateAndEvolution(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsDeclineReasons=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-3ds-decline-reasons",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsights3dsDeclineReasons(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsFrictionlessVsChallenge=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-3ds-frictionless-vs-challenge",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsights3dsFrictionlessVsChallenge(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsVolumeAndCountTx=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-3ds-volume-and-count-tx",n,t],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsights3dsVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksByCardBrand=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-by-card-brand",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksByCardBrand(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksByProviderAndCardBrand=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksByProviderAndCardBrand(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksDisputed=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-disputed",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksDisputed(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksReasonsDistribution=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-reasons-distribution",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksReasonsDistribution(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksStatusDistribution=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-status-distribution",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksStatusDistribution(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksTotalRateAndEvolution=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-total-rate-and-evolution",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksTotalRateAndEvolution(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksVolumeAndCountTx=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-volume-and-count-tx",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksWinRate=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-chargebacks-win-rate",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsChargebacksWinRate(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsConversionRateMetricsV2=function(e,t,n,r){return void 0===n&&(n=!0),Kf(["get-insights-conversion-rate-metrics-v2",e,t],function(){return zh.getInstance().getInsightsMetricsConversionRateV2(e,t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:n&&(!!(null==e?void 0:e.currency_code)&&"Empty"!==(null==e?void 0:e.currency_code)&&"string"==typeof(null==e?void 0:e.currency_code)||Array.isArray(null==e?void 0:e.currency_code)&&0===(null==e?void 0:e.currency_code.length)),staleTime:200,cacheTime:200,useErrorBoundary:!1,retry:1})},exports.useInsightsCustomerPaymentsAndFraudMetrics=function(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Kf(["get-insights-customer-payment-fraud-metrics",t,e],function(){return zh.getInstance().getInsightsMetricsCustomerPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsFallbackMetrics=function(e){return Kf(["get-insights-conversion-rate-fallback-metrics",e],function(){return zh.getInstance().getInsightFallbackMetrics(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!(null==e?void 0:e.enabled),cacheTime:200,useErrorBoundary:!1})},exports.useInsightsFraudScreeningConversionRate=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-fraud-screening-conversion-rate",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsFraudScreeningConversionRate(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsFraudScreeningVolumeAndCountTx=function(t,n,r){var o=this;return void 0===r&&(r={enabled:!0}),Kf({queryKey:["post-insights-fraud-screening-volume-and-count-tx",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getInsightsFraudScreeningVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}})})},enabled:r.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsHomeMetrics=function(e){return Kf(["get-insights-home-metrics",e],function(){return zh.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})},exports.useInsightsOverviewMetrics=function(e){return Kf(["get-insights-overview",e],function(){return zh.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})},exports.useInsightsOverviewMetricsV3=function(e,t){var n=!!(null==e?void 0:e.enabled)&&void 0!==(null==e?void 0:e.account_code);return Kf(["get-insights-overview-v3",e,t],function(){return zh.getInstance().getInsightOverviewV3(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:0,useErrorBoundary:!1})},exports.useInsightsTotalPaymentsAndFraudMetrics=function(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Kf(["get-insights-total-payment-fraud-metrics",t,e],function(){return zh.getInstance().getInsightsMetricsTotalPaymentsAndFraud(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsVolumeMetrics=function(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Kf(["get-insights-volume-metrics",t,e],function(){return zh.getInstance().getInsightsMetricsVolume(e,t).then(function(e){return null==e?void 0:e.data})},{enabled:n,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsVolumeMetricsV2=function(e,t,n,r){return void 0===r&&(r=!0),delete t.account_code,Kf(["get-insights-volume-metrics-v2",t,e,n],function(){return zh.getInstance().getInsightsMetricsVolumeV2(e,n,t).then(function(e){return null==e?void 0:e.data})},{enabled:r,cacheTime:200,useErrorBoundary:!1})},exports.useInviteUsersMultiaccountMassive=function(){return $f(function(e){return zh.getInstance().inviteUsersMassive(e,e.organizationCode)})},exports.useInviteUsersMultiaccountMassiveV2=function(){return $f(function(e){return zh.getInstance().inviteUsersMassiveV2(e)})},exports.useIsTesting=Jf,exports.useListSubscriptions=function(){return $f(["post-list-subscriptions"],function(e){return zh.getInstance().postListSubscriptions(e).then(function(e){return null==e?void 0:e.data})})},exports.useListUserExports=function(e){var t=e.page,n=void 0===t?0:t,r=e.pageSize,o=void 0===r?20:r,a=e.enabled;return Kf(["user-exports-list",n,o],function(){return zh.getInstance().listUserExports({page:n,pageSize:o}).then(function(e){return null==e?void 0:e.data})},{enabled:void 0===a||a,useErrorBoundary:!1})},exports.useLocalStorage=Zf,exports.useLoginMethods=function(){return $f(function(e){return zh.getInstance().changeLoginMethods(e)})},exports.useNetworkTokensOnboarding=function(){var t=this;return Kf({queryKey:["smart-routing-network-tokens-onboarding"],queryFn:function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}})})},useErrorBoundary:!1})},exports.useNewPostConnectionValidate=function(){return $f(["new-post-connection-validate"],function(){return zh.getInstance().postMultiConnectionValidate().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.useOrganizationCode=Xf,exports.usePatchAccountV2=function(){return $f(function(e){var t=e.name,n=e.code,r=e.principal;return zh.getInstance().patchAccountV2({name:t,code:n,principal:r})})},exports.usePatchAddAllowlistItems=function(){return $f(["post-add-allowlist-items"],function(e){var t=e.payload;return zh.getInstance().patchAddAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePatchAllowedIps=function(){return $f(["developers-patch-allowed-ips"],function(t){return zh.getInstance().patchAllowedIps(t).then(function(t){return(null==t?void 0:t.data)?e.__assign(e.__assign({},null==t?void 0:t.data),{isError:!1}):null}).catch(function(t){return e.__assign(e.__assign({},t),{isError:!0})})},{cacheTime:0})},exports.usePatchAllowlist=function(){return $f(["patch-allowlist"],function(e){var t=e.payload;return zh.getInstance().patchAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePatchAndExecuteChart=function(t,n,r){var o=this;return void 0===r&&(r=!0),Kf(["chartgpt-patch-and-execute",t,n],function(){return e.__awaiter(o,void 0,void 0,function(){var r,o,a,i,s;return e.__generator(this,function(e){switch(e.label){case 0:return[4,(r=zh.getInstance()).patchChartGPTChart(t,n)];case 1:return o=e.sent(),a=null==o?void 0:o.data,[4,r.executeChartGPTChart(t)];case 2:return i=e.sent(),s=null==i?void 0:i.data,[2,{chart:a,execution:s}]}})})},{enabled:r&&!!t,retry:!1})},exports.usePatchApiKeysEditNote=function(){return $f(function(e){var t=e.payload,n=e.code,r=e.password;return zh.getInstance().patchApiKeysEditNote(t,n,r).then(function(e){return e.data}).catch(function(e){return e})})},exports.usePatchChangeStatusAllowlist=function(){return $f(["patch-change-status-allowlist"],function(e){var t=e.payload;return zh.getInstance().patchChangeStatusAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePatchChangeStatusAllowlistItem=function(){return $f(["patch-change-status-allowlist-item"],function(e){var t=e.payload;return zh.getInstance().patchChangeStatusAllowlistItem({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePatchChartName=function(){return $f(function(e){var t=e.chart_id,n=e.type,r=e.name,o=e.user_prompt,a=void 0===o?"":o;return zh.getInstance().patchChartGPTChart(t,{type:n,name:r,user_prompt:a}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.usePatchConnection=function(){return $f(["patch-connection"],function(e){var t=e.payload,n=e.connectionCode;return zh.getInstance().patchConnection({payload:t,connectionCode:n}).then(function(e){return null==e?void 0:e.data})})},exports.usePatchOrganizationKeysNote=function(){return $f(function(e){var t=e.note,n=e.password;return zh.getInstance().patchOrganizationKeysNote({note:t},n).then(function(e){return(null==e?void 0:e.data)||null})})},exports.usePathCreateCustomizedApiKeys=function(){return $f(function(e){var t=e.payload,n=e.code;return zh.getInstance().pathCreateCustomizedApiKeys(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePathNotifications=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().pathNotification(n)];case 1:return[2,null==(t=e.sent())?void 0:t.data]}})})})},exports.usePauseSubscription=function(){return $f(["post-pause-subscription"],function(e){var t=e.subscriptionCode;return zh.getInstance().postPauseSubscription(t).then(function(e){return null==e?void 0:e.data})})},exports.usePayoutsFilters=function(t){var n=this;void 0===t&&(t=!0);var r=Xf();return Kf(["getPayoutsFilters",r],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().getPayoutsFilters(r).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})]})})},{enabled:t&&!!r})},exports.usePayoutsList=function(e){return Kf(["usePayoutsList",e&&JSON.stringify(e)],function(){var t=zh.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})},exports.usePostAccount=function(){return $f(function(e){var t=e.name,n=e.principal;return zh.getInstance().postAccount(t,n)})},exports.usePostAllowlistMultiAccount=function(e,t){return void 0===t&&(t=!0),Kf(["query-post-get-allowlist-multi-account",JSON.stringify(e)],function(){return zh.getInstance().postGetAllowlist({payload:e}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})},{enabled:!!e&&t,cacheTime:0})},exports.usePostApiKeysRoll=function(){return $f(function(e){var t=e.payload,n=e.code,r=e.password;return zh.getInstance().postApiKeysRoll(t,n,r).then(function(e){return e.data}).catch(function(e){return e})})},exports.usePostApiLogs=function(e){return Kf(["api-logs",e],function(){return zh.getInstance().postApiLogs({payload:e}).then(function(e){return null==e?void 0:e.data})},{enabled:!!e.organizationCode,cacheTime:0,useErrorBoundary:!1})},exports.usePostAuditMonitors=function(e){return $f(function(e){var t=e.payload;return zh.getInstance().postAuditMonitors(t)},{onMutate:e.onMutate})},exports.usePostBatchRefundByFile=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().batchRefundByFile({payload:n}).then(function(e){return null==e?void 0:e.data})]})})},{useErrorBoundary:!1})},exports.usePostBlackListBatch=function(e){var t=e.handleSetProgress;return $f(["post-blacklist-batch"],function(e){var n=e.blacklist_code,r=e.expiration_days,o=e.file;return zh.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:r,file:o,handleSetProgress:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.usePostBlackListItems=function(){return $f(["post-blacklist-items"],function(e){var t=e.payload;return zh.getInstance().postBlackListItems({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.usePostBlackListMultiAccount=function(){return $f(["post-blacklist-multi-account"],function(e){var t=e.payload;return zh.getInstance().postBlackListMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostBlockList=function(e,t,n,r){var o;return Kf(["post-black-list",e],function(){return zh.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=r?r:25).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},{cacheTime:0,enabled:(null===(o=e[0])||void 0===o?void 0:o.length)>0&&null!==t,useErrorBoundary:!1})},exports.usePostCall=function(){return $f(function(e){return zh.getInstance().postCall(e)})},exports.usePostChangeStatusConnection=function(){return $f(["post-change-status-connection"],function(e){var t=e.payload,n=e.accountCode;return zh.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.usePostConnectionMultiAccount=function(){return $f(["post-connection"],function(e){var t=e.payload;return zh.getInstance().postMultiConnection({payload:t}).then(function(e){return null==e?void 0:e.data})})},exports.usePostCreateAllowlistMultiAccount=function(){return $f(["post-create-allowlist-multi-account"],function(e){var t=e.payload;return zh.getInstance().postCreateAllowlistMultiAccount({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostCreateCustomizedApiKeys=function(){return $f(function(e){var t=e.payload;return zh.getInstance().postCreateCustomizedApiKeys(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostCreateInsightsReport=function(){return $f(function(e){var t=e.payload;return zh.getInstance().postCreateInsightsReport(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostCreateRuleMultiAccount=function(){return $f(function(e){var t=e.payload,n=e.accountCode;return zh.getInstance().postCreateRuleMultiAccount(t,n).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostCredentialsValidatePassword=function(){return $f(function(e){var t=e.passwordOtp;return zh.getInstance().getDeveloperCredentialsValidatePassword(t).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})},exports.usePostCredentialsValidatePasswordRegularUser=function(){return $f(function(e){var t=e.password;return zh.getInstance().getDeveloperCredentialsValidatePasswordRegularUser(t).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})},exports.usePostCredentialsWithOtpMfa=function(){return $f(function(e){var t=e.password,n=e.accountCode,r=e.otp,o=e.mfaToken;return zh.getInstance().getDeveloperCredentials(t,n,r,o).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})})},exports.usePostDefaultRoutes=function(){return $f(function(e){var t=e.payload;return zh.getInstance().postDefaultRoutes({payload:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})},exports.usePostEditRule=function(){return $f(function(e){var t=e.payload,n=e.ruleId,r=e.accountCode;return zh.getInstance().postEditRule(t,n,r).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.usePostFraudTransactions=function(t){var n=this;return Kf(["POST/fraud-transactions",JSON.stringify(t)],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().postFraudTransactions(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&Object.keys(t).length>0,cacheTime:0,useErrorBoundary:!1})},exports.usePostGetAllowlistItems=function(){return $f(["post-get-allowlist-items"],function(e){var t=e.payload;return zh.getInstance().postAllowlistItems({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostGetAllowlistMultiAccount=function(){return $f(["post-get-allowlist-multi-account"],function(e){var t=e.payload;return zh.getInstance().postGetAllowlist({payload:t}).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){return e})})},exports.usePostMembersPaginatedV2=function(e){var t=e.organizationCode,n=e.accountCodes,r=e.search,o=e.status,a=e.roleId,i=e.statuses,s=e.roleIds,u=e.page,c=e.pageSize,l=Xf();return Kf(["fetch-post-members-v2",t,n,r,o,a,i,s,u,c],function(){return zh.getInstance().postMembersPaginatedV2({organizationCode:l,accountCodes:n,search:r,status:o,roleId:a,statuses:i,roleIds:s,page:u,pageSize:c}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t&&!!n,cacheTime:0,useErrorBoundary:!1})},exports.usePostNetworkTokensOnboarding=function(){var t=this;return $f(function(n){var r=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().postNetworkTokensOnboarding(r)];case 1:return[2,e.sent().data]}})})},{useErrorBoundary:!1})},exports.usePostOrganizationConfigs=function(){return $f(function(e){return zh.getInstance().postOrganizationConfigs(e)})},exports.usePostOrganizationKeysMarkRevealed=function(){return $f(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return zh.getInstance().postOrganizationKeysMarkRevealed(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})},exports.usePostOrganizationKeysRoll=function(){return $f(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return zh.getInstance().postOrganizationKeysRoll(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})},exports.usePostOrganizationKeysTamRequest=function(){return $f(function(e){var t=e.password,n=e.otp,r=e.mfaToken;return zh.getInstance().postOrganizationKeysTamRequest(t,n,r).then(function(e){return(null==e?void 0:e.data)||null})})},exports.usePostPaymentsEvaluated=function(e){return Kf(["fetch-payments-evaluated",e],function(){return zh.getInstance().postPaymentsEvaluated(e).then(function(e){return null==e?void 0:e.data})},{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})},exports.usePostPaymentsLazy=function(t){var n=this;return Kf(["fetch-payments-lazy",t],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().postPaymentsLazy(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t&&Object.keys(t).length>0,cacheTime:0,useErrorBoundary:!1})},exports.usePostSlackMessageChannel=function(){return $f(function(e){var t=e.payload;return zh.getInstance().postSlackMessageChannel(t).then(function(e){return null==e?void 0:e.data})})},exports.usePostTransactions=function(t){var n=this;return Kf(["POST/transactions",JSON.stringify(t)],function(){return e.__awaiter(n,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().postTransactions(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:!!t,cacheTime:0,useErrorBoundary:!1})},exports.usePostUserSettings=rg,exports.usePostUserSettingsPinned=function(e){return $f(["pinned-sections"],function(e){var t=e.payload;return zh.getInstance().postUserSettingsPinned(t)},{onMutate:function(t){var n=t.payload;return e({payload:n})}})},exports.usePostUserSettingsTables=function(){return $f(function(e){var t=e.payload,n=e.section;return zh.getInstance().postUserSettingsTables(t,n)},{onMutate:function(e){return e},onSuccess:function(t){var n=ng.getQueryData(["fetch-profile"]);t.data&&ng.setQueryData(["fetch-profile"],e.__assign(e.__assign({},n),{settings:t.data}))}})},exports.usePostUserThemeSettings=function(){return $f(function(e){return zh.getInstance().postUserThemeSettings(e)})},exports.usePostValideStatusConnection=function(){return $f(["post-validate-status-connection"],function(e){var t=e.payload,n=e.accountCode;return zh.getInstance().postValidateStatusConnection({payload:t,accountCode:n}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.usePostVelocityRules=function(e){return Kf(["velocity-rules",e],function(){var t=zh.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})},exports.usePostWebhookLogs=function(e){var t=e.params;return Kf(["webhook-logs",t],function(){return zh.getInstance().postWebhookLogs({payload:t}).then(function(e){return null==e?void 0:e.data})},{enabled:!!t.organizationCode,cacheTime:0,useErrorBoundary:!1})},exports.usePostWebhookMultiAccount=function(e){return $f(function(e){var t=e.payload;return zh.getInstance().postWebhookV2MultiAccount({payload:t})},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useProviderConversionRatesData=function(){return Kf(["smart-routing-conversion-rates"],function(){return zh.getInstance().getProviderConversionRatesData().then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{enabled:!1,useErrorBoundary:!1})},exports.useProviderRawResponse=function(){return $f(function(e){var t=e.transactionCode,n=e.payload;return zh.getInstance().postProviderRawResponse(t,n)})},exports.usePublishCheckout=function(n){var r=eg(),o=t.useRef(r);return o.current=r,$f(function(t){return zh.getInstance().publishCheckout(e.__assign(e.__assign({},t),{accountCode:o.current}))},n)},exports.usePublishVersion=function(t,n){var r=this,o=t.versionCode,a=t.accountCode,i=t.organizationCode,s=t.routingType,u=void 0===s?exports.SmartRouting.DEFAULT_ROUTING_TYPE:s;return void 0===n&&(n=null),$f(function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().postSmartRoutingPublishVersion(a,o,i,u).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})},n)},exports.usePutAccountPrincipal=function(){return $f(function(e){var t=e.account_code;return zh.getInstance().putAccountPrincipal({account_code:t})})},exports.usePutAccountsUserMassive=function(){return $f(function(e){var t=e.organizationCode,n=e.userCode,r=e.payload;return zh.getInstance().putAccountsUserMassive(t,n,r)})},exports.usePutBlackListType=function(){return $f(["put-blacklist"],function(e){return zh.getInstance().putBlackListType(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.usePutCosts=function(){return $f(function(e){return zh.getInstance().putCosts(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.usePutOrganizationConfigsByAccount=function(){return $f(function(e){return zh.getInstance().putOrganizationConfigsByAccount(e)})},exports.useRecoveredPaymentsByDay=function(t,n){return Kf(e.__assign({queryKey:["smart-recovery-recovered-payments-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return n=zh.getInstance(),r={start_date:t.start_date||"",end_date:t.end_date||"",organization_code:t.organization_code,account_codes:t.account_code||[],countries:t.countries||[],channels:t.channels||[],focuses:t.focuses||[],timezone:t.timezone},[4,n.post("/nova-insights/recovered-payments-by-day",r)];case 1:return o=e.sent(),[2,vg(o.data,r.start_date,r.end_date)]}})})},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useRecoveredTPVByDay=function(t,n){return Kf(e.__assign({queryKey:["smart-recovery-recovered-tpv-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return n=zh.getInstance(),r={start_date:t.start_date||"",end_date:t.end_date||"",organization_code:t.organization_code,account_codes:t.account_code||[],countries:t.countries||[],channels:t.channels||[],focuses:t.focuses||[],timezone:t.timezone},[4,n.post("/nova-insights/recovered-tpv-by-day",r)];case 1:return o=e.sent(),[2,yg(o.data,r.start_date,r.end_date)]}})})},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useRescheduleSubscription=function(){return $f(["post-reschedule-subscription"],function(e){var t=e.subscriptionCode;return zh.getInstance().postRescheduleSubscription(t).then(function(e){return null==e?void 0:e.data})})},exports.useResendWebhooks=function(){return $f(function(e){var t=e.codes;return zh.getInstance().postResendWebhooks({codes:t}).then(function(e){return null==e?void 0:e.data})})},exports.useResumeSubscription=function(){return $f(["post-resume-subscription"],function(e){var t=e.subscriptionCode;return zh.getInstance().postResumeSubscription(t).then(function(e){return null==e?void 0:e.data})})},exports.useRetryDuplicateAccount=function(){return $f(function(e){return zh.getInstance().retryDuplicateAccount(e)})},exports.useSaveVersion=function(e,t){var n=e.data,r=e.accountCode,o=e.routingType,a=void 0===o?exports.SmartRouting.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),$f(function(){return zh.getInstance().putSmartRoutingUpdateWorkflow(r,n,a).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})},t)},exports.useSearchInstallmentsPlans=function(e,t){return void 0===t&&(t=!0),Kf(["search-installments-plans",JSON.stringify(e)],function(){return zh.getInstance().searchInstallmentsPlans(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},{cacheTime:0,enabled:t,useErrorBoundary:!1})},exports.useSearchScheduleById=function(t,n,r){var o=this;return Kf(["POST/template-reporting/schedule-by-id/search",t,n],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().searchReportScheduleById(t,n).then(function(e){return null==e?void 0:e.data})]})})},{enabled:r&&!!t,useErrorBoundary:!1})},exports.useSearchSchedules=function(t,n){var r=this;return Kf(["POST/template-reporting/schedules/search",t],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().searchReportSchedules(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:n,useErrorBoundary:!1})},exports.useSearchTemplateById=function(t,n,r){var o=this;return Kf(["POST/template-reporting/template-by-id/search",t,n],function(){return e.__awaiter(o,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().searchReportTemplateById(t,n).then(function(e){return null==e?void 0:e.data})]})})},{enabled:r&&!!t,useErrorBoundary:!1})},exports.useSearchTemplates=function(t,n){var r=this;return Kf(["POST/template-reporting/templates/search",t],function(){return e.__awaiter(r,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().searchReportTemplates(t).then(function(e){return null==e?void 0:e.data})]})})},{enabled:n,useErrorBoundary:!1})},exports.useSendPaymentNotification=function(t,n,r){var o=this,a=zh.getInstance();return Kf(["send-payment-notification",t,n],function(){return e.__awaiter(o,void 0,void 0,function(){var o,i;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,a.sendPaymentNotification(t,n)];case 1:return o=e.sent(),r.onSuccess(),[2,o.data];case 2:throw i=e.sent(),r.onError(),i;case 3:return[2]}})})},{enabled:r.enabled,cacheTime:0,useErrorBoundary:!1})},exports.useSetCustodian=function(){return $f(function(){return zh.getInstance().setCustodian().then(function(e){return null==e?void 0:e.data})})},exports.useSmartRoutingCreateDeclinedGroup=function(e){var t=e.accountCode;return $f(function(e){return void 0===e&&(e=null),zh.getInstance().createSmartRoutingDeclinedGroup(t,e).then(function(e){return null==e?void 0:e.data})},e.options)},exports.useSmartRoutingEditWorkflowName=function(e,t){var n=e.code,r=e.name,o=e.accountCode,a=e.routingType,i=void 0===a?exports.SmartRouting.DEFAULT_ROUTING_TYPE:a;return void 0===t&&(t=null),$f(function(){return zh.getInstance().putSmartRoutingUpdateWorkflowName(o,{code:n,name:r},i).then(function(e){return null==e?void 0:e.data})},t)},exports.useSmartRoutingMultiAccountDeclinedGroupCreate=function(t,n){return void 0===n&&(n={}),$f(function(e){var n=e.payload;return zh.getInstance().multiAccountDeclinedGroupCreate(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},e.__assign(e.__assign({},n),{useErrorBoundary:!1}))},exports.useSmartRoutingRemoveDeclinedGroup=function(t,n){return void 0===n&&(n={}),$f(function(e){var n=e.declinedGroupCode;return zh.getInstance().removeDeclinedGroup(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})},e.__assign(e.__assign({},n),{useErrorBoundary:!1}))},exports.useSmartRoutingSimulateTransaction=function(e,t){var n=e.accountCode,r=e.workflowVersionCode,o=e.routingType,a=void 0===o?exports.SmartRouting.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),$f(function(e){return zh.getInstance().simulateSmartRoutingTransaction(n,r,e,a).then(function(e){return null==e?void 0:e.data})},t)},exports.useSmartRoutingToggleFavorite=function(e,t){var n=e.versionCode,r=e.accountCode,o=e.routingType,a=void 0===o?exports.SmartRouting.DEFAULT_ROUTING_TYPE:o;return void 0===t&&(t=null),$f(function(e){return void 0===e&&(e=!1),zh.getInstance().updateSmartRoutingFavorite(r,n,e,a).then(function(e){return null==e?void 0:e.data})},t)},exports.useSmartRoutingUpdateDeclinedGroup=function(e,t){var n=e.declinedId,r=e.accountCode;return void 0===t&&(t=null),$f(function(e){return void 0===e&&(e=null),zh.getInstance().updateSmartRoutingDeclinedGroup(r,n,e).then(function(e){return null==e?void 0:e.data})},t)},exports.useSmartRoutingUpdateMonitorRedistribution=function(e,t){return void 0===t&&(t=null),$f(function(t){return zh.getInstance().updateMonitorRedistribution(e,t).then(function(e){return null==e?void 0:e.data})},t)},exports.useStartUserExport=function(){return $f(function(e){return zh.getInstance().startUserExport({accountCodes:e.account_codes,name:e.name,search:e.search,statuses:e.statuses,roleIds:e.role_ids}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useSubmitChartFeedback=function(e,t){var n=e.chartCode,r=Bf();return $f(function(e){return zh.getInstance().submitChartFeedback(n,{rating:e.rating,issues:e.issues||[],comment:e.comment}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(e){var o;r.invalidateQueries(["chart-feedback",n]),null===(o=null==t?void 0:t.onSuccess)||void 0===o||o.call(t,e)},onError:function(e){var n;null===(n=null==t?void 0:t.onError)||void 0===n||n.call(t,e)}})},exports.useTableOnboarding=function(n,r,o){var a,i,s=og(),u=rg().mutate,c=s.data,l=s.isLoading||!s.isFetched,d=null!==(i=null===(a=null==c?void 0:c.settings)||void 0===a?void 0:a.viewed_tutorials)&&void 0!==i?i:[],p="onboarding-".concat(null!=n?n:"default","-").concat(r,"-").concat(o),h=d.includes(p),f=t.useCallback(function(){var t=null;ng.setQueryData(ag,function(n){var r,o,a;if(!n)return n;var i=null!==(o=null===(r=n.settings)||void 0===r?void 0:r.viewed_tutorials)&&void 0!==o?o:[];if(i.includes(p))return n;var s=e.__spreadArray(e.__spreadArray([],i,!0),[p],!1);return t=s,e.__assign(e.__assign({},n),{settings:e.__assign(e.__assign({},null!==(a=n.settings)&&void 0!==a?a:{}),{viewed_tutorials:s})})}),t&&u({payload:{viewed_tutorials:t}})},[p,u]);return{hasSeenOnboarding:h,dismiss:f,id:p,isProfileLoading:l}},exports.useToggleMethod=function(e,t){var n=e.paymentMethod,r=e.active,o=e.accountCode,a=e.routingType,i=void 0===a?exports.SmartRouting.DEFAULT_ROUTING_TYPE:a;return void 0===t&&(t=null),$f(function(){return zh.getInstance().putSmartRoutingToggleMethod(o,n,r,i).then(function(e){return null==e?void 0:e.data})},t)},exports.useUnInviteUsersV2=function(){return $f(function(e){var t=e.userCode,n=e.organizationCode;return zh.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})})},exports.useUnblockOnboarding=function(){var e=Bf();return $f(["unblock-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId;return zh.getInstance().unblockOnboarding(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useUnifiedExportStart=function(){return $f(function(e){var t=e.tab,n=e.payload;return zh.getInstance().postUnifiedExport(t,n).then(function(e){return null==e?void 0:e.data})})},exports.useUnrollUserV2=function(){return $f(function(e){return zh.getInstance().unrollMfa(e).then(function(e){return null==e?void 0:e.data})})},exports.useUpdateInstallmentsPlan=function(){return $f(["update-installments-plan"],function(e){var t=e.code,n=e.payload;return zh.getInstance().updateInstallmentsPlan(t,n).then(function(e){return null==e?void 0:e.data})})},exports.useUpdateIsActiveCheckout=function(n){var r=eg(),o=t.useRef(r);return o.current=r,$f(function(t){return zh.getInstance().updateIsActiveCheckout(e.__assign(e.__assign({},t),{accountCode:o.current}))},n)},exports.useUpdateMFAConfig=function(){return $f(function(e){var t=e.payload,n=e.organizationCode;return zh.getInstance().updateMFAConfig(t,n)})},exports.useUpdateOnboarding=function(){var e=Bf();return $f(["update-onboarding"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.onboardingId,o=e.payload;return zh.getInstance().updateOnboarding(t,n,r,o).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useUpdateOrganizationStatus=function(){return $f(["patch-organizations"],function(){return zh.getInstance().updateOrganizationStatus().then(function(e){return null==e?void 0:e.data})})},exports.useUpdateProfile=function(e){return $f(function(e){return zh.getInstance().updateProfile(e)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useUpdateRecipient=function(){var e=Bf();return $f(["update-recipient"],function(e){var t=e.organizationCode,n=e.recipientId,r=e.payload;return zh.getInstance().updateRecipient(t,n,r).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1,onSuccess:function(){e.invalidateQueries(["recipients"])}})},exports.useUpdateReconciliationAlert=function(){return $f(["UPDATE/reconciliation/alerts"],function(e){return zh.getInstance().updateReconciliationAlert(e).then(function(e){return e.data}).catch(function(e){throw e})},{onSuccess:function(){ng.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useUpdateReconciliationReportTemplate=function(e){return $f(function(){return zh.getInstance().updateReconciliationReportTemplate(e).then(function(e){return(null==e?void 0:e.data)||null}).catch(function(e){throw e})},{useErrorBoundary:!1})},exports.useUpdateReportTemplate=function(e){return $f(function(){return zh.getInstance().updateReportTemplate(e).then(function(e){return null==e?void 0:e.data})})},exports.useUpdateSamlConfig=function(){return $f(function(e){return zh.getInstance().updateSamlConfig(e)})},exports.useUpdateScheduledReport=function(){return $f(function(e){var t=e.reportCode,n=e.payload;return zh.getInstance().updateScheduledReport(t,n).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useUpdateSubscription=function(){return $f(["patch-subscription"],function(e){var t=e.subscriptionCode,n=e.payload;return zh.getInstance().patchSubscription(t,n).then(function(e){return null==e?void 0:e.data})})},exports.useUpdateTemplateSelection=function(){var t=this;return $f(["PATCH/template-reporting/report-templates/selection"],function(n){var r=n.templateId,o=n.payload;return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){return[2,zh.getInstance().updateTemplateSelection(r,o).then(function(e){return null==e?void 0:e.data})]})})},{onSuccess:function(){ng.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useUpdateWebhookV2=function(e){return $f(function(e){var t=e.code,n=e.payload,r=e.accountCode;return zh.getInstance().updateWebhookV2(t,n,r)},{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useUploadBatchRefundsFileV2=function(e){var n=e.fileName,r=e.onSuccess,o=e.onError,a=t.useState(0),i=a[0],s=a[1],u=t.useRef({cancel:function(){return null}}),c=$f(["upload-file-chargeback",n],function(e){var t=zh.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:s}),n=t.promise,a=t.cancel;return u.current.cancel=a,n.then(function(e){return null==r||r(null==e?void 0:e.data),null==e?void 0:e.data}).catch(function(e){throw null==o||o(),e})},{useErrorBoundary:!1});return{mutation:c,cancelRequest:u.current.cancel,progress:i}},exports.useUploadBatchRefundsV2=function(){return $f(function(e){return zh.getInstance().uploadBatchRefundsV2({payload:e}).then(function(e){return null==e?void 0:e.data})},{useErrorBoundary:!1})},exports.useUploadFileS3ClientBatchRefunds=function(){var e=t.useRef({cancel:function(){return null}}),n=$f(["upload-file"],function(t){var n=zh.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),r=n.promise,o=n.cancel;return e.current.cancel=o,r.then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})});return{mutation:n,cancelRequest:e.current.cancel}},exports.useUploadPaymentLinkLogo=function(){return $f(["upload-payment-link-logo"],function(e){var t=e.payload;return zh.getInstance().uploadPaymentLinkLogo({payload:t}).then(function(e){return null==e?void 0:e.data})})},exports.useValiateAllowlistItems=function(){return $f(["validate-allowlist-items"],function(e){return zh.getInstance().validateAllowlistItems({payload:e}).then(function(e){return e.data}).catch(function(e){return e})})},exports.useValidateBlockListItems=function(){return $f(["valiate-blacklist-items"],function(e){return zh.getInstance().valiateBlockListItems({payload:e}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return e})})},exports.useValidateCredentials=function(){return $f(function(e){return zh.getInstance().postValidateCredentials(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})})},exports.useValidateOrgName=function(){return $f(function(e){return zh.getInstance().getOrgByName(e).then(function(e){return null==e?void 0:e.data})})},exports.useValidatePasswordStatus=function(){return $f(function(){return zh.getInstance().validatePasswordStatus().then(function(e){return null==e?void 0:e.data}).catch(function(e){return{valid:!1}})})},exports.useViewMoreMetrics=function(e,t){return Kf(["get-insights-conversion-rate-view-more-metrics",t,e],function(){return zh.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})},exports.useWorkosAdminPortal=function(){var t=this;return $f(function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().workosAdminPortal().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})},exports.useWorkosDomainStatus=function(){var t=this;return Kf(["workos-domain-status"],function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().workosDomainStatus().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})},exports.useWorkosDomainVerificationPortal=function(){var t=this;return $f(function(){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().workosDomainVerificationPortal().then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})},exports.useWorkosPasswordReset=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().workosPasswordReset(n).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})},exports.useWorkosVerifyMfa=function(){var t=this;return $f(function(n){return e.__awaiter(t,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,zh.getInstance().workosVerifyMfa(n).then(function(e){return null==e?void 0:e.data})];case 1:return[2,e.sent()]}})})})};
|
|
68
68
|
//# sourceMappingURL=index.js.map
|