@yuno-payments/dashboard-api-mfe 0.42.3-subscriptions-beta.2 → 0.42.3-subscriptions-beta.4

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.
@@ -230,5 +230,5 @@ function No(e){const t=Lo.parse(e),n={};for(const e in t)void 0!==t[e]&&(n[e]=t[
230
230
  * @copyright (c) 2099 Kent C. Dodds
231
231
  * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
232
232
  */
233
- const rh=7,ah=6,ih=5,sh=4,uh=3,ch=2,lh=1,ph=0;function dh(e,t,n){var o;if((n=n||{}).threshold=null!=(o=n.threshold)?o:lh,!n.accessors){const o=hh(e,t,n);return{rankedValue:e,rank:o,accessorIndex:-1,accessorThreshold:n.threshold,passed:o>=n.threshold}}const r=function(e,t){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],a=yh(r),i=fh(e,r);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:ph,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let e=0;e<r.length;e++){const o=r[e];let i=hh(o.itemValue,t,n);const{minRanking:s,maxRanking:u,threshold:c=n.threshold}=o.attributes;i<s&&i>=lh?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=o.itemValue)}return a}function hh(e,t,n){return e=mh(e,n),(t=mh(t,n)).length>e.length?ph:e===t?rh:(e=e.toLowerCase())===(t=t.toLowerCase())?ah:e.startsWith(t)?ih:e.includes(` ${t}`)?sh:e.includes(t)?uh:1===t.length?ph:function(e){let t="";return e.split(" ").forEach((e=>{e.split("-").forEach((e=>{t+=e.substr(0,1)}))})),t}(e).includes(t)?ch:function(e,t){let n=0,o=0;function r(e,t,o){for(let r=o,a=t.length;r<a;r++){if(t[r]===e)return n+=1,r+1}return-1}function a(e){const o=1/e,r=n/t.length;return lh+r*o}const i=r(t[0],e,0);if(i<0)return ph;o=i;for(let n=1,a=t.length;n<a;n++){o=r(t[n],e,o);if(!(o>-1))return ph}const s=o-i;return a(s)}(e,t)}function mh(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=e.replace(oh,(e=>th[e]))),e}function fh(e,t){let n=t;"object"==typeof t&&(n=t.accessor);const o=n(e);return null==o?[]:Array.isArray(o)?o:[String(o)]}const gh={maxRanking:1/0,minRanking:-1/0};function yh(e){return"function"==typeof e?gh:{...gh,...e}}function bh(e,t){const[n,r]=o.useState();o.useEffect((()=>{const n=(e=>{try{const t=localStorage.getItem(e);return"string"==typeof t?JSON.parse(t):void 0}catch{return}})(e);r(null==n?"function"==typeof t?t():t:n)}),[t,e]);return[n,o.useCallback((t=>{r((n=>{let o=t;"function"==typeof t&&(o=t(n));try{localStorage.setItem(e,JSON.stringify(o))}catch{}return o}))}),[e])]}var kh,vh=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}(),wh=function(){function e(e){this.generateIdentifier=e,this.kv=new vh}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}(),jh=(kh=function(e,t){return kh=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])},kh(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}kh(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),_h=function(e){function t(){var t=e.call(this,(function(e){return e.name}))||this;return t.classToAllowedProps=new Map,t}return jh(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}(wh),Eh=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i};function Ch(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 o=n,r=0;r<o.length;r++){var a=o[r];if(t(a))return a}}function Sh(e,t){Object.entries(e).forEach((function(e){var n=Eh(e,2),o=n[0],r=n[1];return t(r,o)}))}function xh(e,t){return-1!==e.indexOf(t)}function Rh(e,t){for(var n=0;n<e.length;n++){var o=e[n];if(t(o))return o}}var Th=function(){function e(){this.transfomers={}}return e.prototype.register=function(e){this.transfomers[e.name]=e},e.prototype.findApplicable=function(e){return Ch(this.transfomers,(function(t){return t.isApplicable(e)}))},e.prototype.findByName=function(e){return this.transfomers[e]},e}(),Ih=function(e){return void 0===e},Ah=function(e){return"object"==typeof e&&null!==e&&(e!==Object.prototype&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype))},Oh=function(e){return Ah(e)&&0===Object.keys(e).length},Ph=function(e){return Array.isArray(e)},zh=function(e){return e instanceof Map},Dh=function(e){return e instanceof Set},Lh=function(e){return"Symbol"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)},Nh=function(e){return"number"==typeof e&&isNaN(e)},Mh=function(e){return function(e){return"boolean"==typeof e}(e)||function(e){return null===e}(e)||Ih(e)||function(e){return"number"==typeof e&&!isNaN(e)}(e)||function(e){return"string"==typeof e}(e)||Lh(e)},qh=function(e){return e.replace(/\./g,"\\.")},Uh=function(e){return e.map(String).map(qh).join(".")},Bh=function(e){for(var t=[],n="",o=0;o<e.length;o++){var r=e.charAt(o);if("\\"===r&&"."===e.charAt(o+1))n+=".",o++;else"."===r?(t.push(n),n=""):n+=r}var a=n;return t.push(a),t},Fh=function(){return Fh=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Fh.apply(this,arguments)},Gh=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},Vh=function(e,t){for(var n=0,o=t.length,r=e.length;n<o;n++,r++)e[r]=t[n];return e};function Wh(e,t,n,o){return{isApplicable:e,annotation:t,transform:n,untransform:o}}var Hh=[Wh(Ih,"undefined",(function(){return null}),(function(){})),Wh((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)})),Wh((function(e){return e instanceof Date&&!isNaN(e.valueOf())}),"Date",(function(e){return e.toISOString()}),(function(e){return new Date(e)})),Wh((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})),Wh((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)})),Wh(Dh,"set",(function(e){return Vh([],Gh(e.values()))}),(function(e){return new Set(e)})),Wh(zh,"map",(function(e){return Vh([],Gh(e.entries()))}),(function(e){return new Map(e)})),Wh((function(e){return Nh(e)||((t=e)===1/0||t===-1/0);var t}),"number",(function(e){return Nh(e)?"NaN":e>0?"Infinity":"-Infinity"}),Number),Wh((function(e){return 0===e&&1/e==-1/0}),"number",(function(){return"-0"}),Number),Wh((function(e){return e instanceof URL}),"URL",(function(e){return e.toString()}),(function(e){return new URL(e)}))];function Kh(e,t,n,o){return{isApplicable:e,annotation:t,transform:n,untransform:o}}var $h=Kh((function(e,t){return!!Lh(e)&&!!t.symbolRegistry.getIdentifier(e)}),(function(e,t){return["symbol",t.symbolRegistry.getIdentifier(e)]}),(function(e){return e.description}),(function(e,t,n){var o=n.symbolRegistry.getValue(t[1]);if(!o)throw new Error("Trying to deserialize unknown symbol");return o})),Qh=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((function(e,t){return e[t.name]=t,e}),{}),Jh=Kh((function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}),(function(e){return["typed-array",e.constructor.name]}),(function(e){return Vh([],Gh(e))}),(function(e,t){var n=Qh[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)}));function Xh(e,t){return!!(null==e?void 0:e.constructor)&&!!t.classRegistry.getIdentifier(e.constructor)}var Yh=Kh(Xh,(function(e,t){return["class",t.classRegistry.getIdentifier(e.constructor)]}),(function(e,t){var n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return Fh({},e);var o={};return n.forEach((function(t){o[t]=e[t]})),o}),(function(e,t,n){var o=n.classRegistry.getValue(t[1]);if(!o)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(o.prototype),e)})),Zh=Kh((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 o=n.customTransformerRegistry.findByName(t[1]);if(!o)throw new Error("Trying to deserialize unknown custom value");return o.deserialize(e)})),em=[Yh,$h,Zh,Jh],tm=function(e,t){var n=Rh(em,(function(n){return n.isApplicable(e,t)}));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};var o=Rh(Hh,(function(n){return n.isApplicable(e,t)}));return o?{value:o.transform(e,t),type:o.annotation}:void 0},nm={};Hh.forEach((function(e){nm[e.annotation]=e}));var om=function(e,t){for(var n=e.keys();t>0;)n.next(),t--;return n.next().value};function rm(e){if(xh(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(xh(e,"prototype"))throw new Error("prototype is not allowed as a property");if(xh(e,"constructor"))throw new Error("constructor is not allowed as a property")}var am=function(e,t,n){if(rm(t),0===t.length)return n(e);for(var o=e,r=0;r<t.length-1;r++){var a=t[r];if(Ph(o))o=o[+a];else if(Ah(o))o=o[a];else if(Dh(o)){o=om(o,i=+a)}else if(zh(o)){if(r===t.length-2)break;var i=+a,s=0==+t[++r]?"key":"value",u=om(o,i);switch(s){case"key":o=u;break;case"value":o=o.get(u)}}}var c=t[t.length-1];if(Ph(o)?o[+c]=n(o[+c]):Ah(o)&&(o[c]=n(o[c])),Dh(o)){var l=om(o,+c),p=n(l);l!==p&&(o.delete(l),o.add(p))}if(zh(o)){i=+t[t.length-2];var d=om(o,i);switch(s=0==+c?"key":"value"){case"key":var h=n(d);o.set(h,o.get(d)),h!==d&&o.delete(d);break;case"value":o.set(d,n(o.get(d)))}}return e},im=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},sm=function(e,t){for(var n=0,o=t.length,r=e.length;n<o;n++,r++)e[r]=t[n];return e};function um(e,t,n){if(void 0===n&&(n=[]),e)if(Ph(e)){var o=im(e,2),r=o[0],a=o[1];a&&Sh(a,(function(e,o){um(e,t,sm(sm([],im(n)),im(Bh(o))))})),t(r,n)}else Sh(e,(function(e,o){return um(e,t,sm(sm([],im(n)),im(Bh(o))))}))}function cm(e,t,n){return um(t,(function(t,o){e=am(e,o,(function(e){return function(e,t,n){if(!Ph(t)){var o=nm[t];if(!o)throw new Error("Unknown transformation: "+t);return o.untransform(e,n)}switch(t[0]){case"symbol":return $h.untransform(e,t,n);case"class":return Yh.untransform(e,t,n);case"custom":return Zh.untransform(e,t,n);case"typed-array":return Jh.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}}(e,t,n)}))})),e}function lm(e,t){function n(t,n){var o=function(e,t){rm(t);for(var n=0;n<t.length;n++){var o=t[n];if(Dh(e))e=om(e,+o);else if(zh(e)){var r=+o,a=0==+t[++n]?"key":"value",i=om(e,r);switch(a){case"key":e=i;break;case"value":e=e.get(i)}}else e=e[o]}return e}(e,Bh(n));t.map(Bh).forEach((function(t){e=am(e,t,(function(){return o}))}))}if(Ph(t)){var o=im(t,2),r=o[0],a=o[1];r.forEach((function(t){e=am(e,Bh(t),(function(){return e}))})),a&&Sh(a,n)}else Sh(t,n);return e}var pm=function(e,t,n,o,r,a,i){var s;void 0===r&&(r=[]),void 0===a&&(a=[]),void 0===i&&(i=new Map);var u=Mh(e);if(!u){!function(e,t,n){var o=n.get(e);o?o.push(t):n.set(e,[t])}(e,r,t);var c=i.get(e);if(c)return o?{transformedValue:null}:c}if(!function(e,t){return Ah(e)||Ph(e)||zh(e)||Dh(e)||Xh(e,t)}(e,n)){var l=tm(e,n),p=l?{transformedValue:l.value,annotations:[l.type]}:{transformedValue:e};return u||i.set(e,p),p}if(xh(a,e))return{transformedValue:null};var d=tm(e,n),h=null!==(s=null==d?void 0:d.value)&&void 0!==s?s:e,m=Ph(h)?[]:{},f={};Sh(h,(function(s,u){var c=pm(s,t,n,o,sm(sm([],im(r)),[u]),sm(sm([],im(a)),[e]),i);m[u]=c.transformedValue,Ph(c.annotations)?f[u]=c.annotations:Ah(c.annotations)&&Sh(c.annotations,(function(e,t){f[qh(u)+"."+t]=e}))}));var g=Oh(f)?{transformedValue:m,annotations:d?[d.type]:void 0}:{transformedValue:m,annotations:d?[d.type,f]:f};return u||i.set(e,g),g};function dm(e){return Object.prototype.toString.call(e).slice(8,-1)}function hm(e){return"Array"===dm(e)}function mm(e,t={}){if(hm(e))return e.map((e=>mm(e,t)));if(!function(e){if("Object"!==dm(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,o)=>{if(hm(t.props)&&!t.props.includes(o))return n;return function(e,t,n,o,r){const a={}.propertyIsEnumerable.call(o,t)?"enumerable":"nonenumerable";"enumerable"===a&&(e[t]=n),r&&"nonenumerable"===a&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}(n,o,mm(e[o],t),e,t.nonenumerable),n}),{})}var fm=function(){return fm=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},fm.apply(this,arguments)},gm=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},ym=function(e,t){for(var n=0,o=t.length,r=e.length;n<o;n++,r++)e[r]=t[n];return e},bm=function(){function e(e){var t=(void 0===e?{}:e).dedupe,n=void 0!==t&&t;this.classRegistry=new _h,this.symbolRegistry=new wh((function(e){var t;return null!==(t=e.description)&&void 0!==t?t:""})),this.customTransformerRegistry=new Th,this.allowedErrorProps=[],this.dedupe=n}return e.prototype.serialize=function(e){var t=new Map,n=pm(e,t,this,this.dedupe),o={json:n.transformedValue};n.annotations&&(o.meta=fm(fm({},o.meta),{values:n.annotations}));var r,a,i,s,u=(r=t,a=this.dedupe,i={},s=void 0,r.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=im(e),n=t[0],o=t.slice(1);0===n.length?s=o.map(Uh):i[Uh(n)]=o.map(Uh)}})),s?Oh(i)?[s]:[s,i]:Oh(i)?void 0:i);return u&&(o.meta=fm(fm({},o.meta),{referentialEqualities:u})),o},e.prototype.deserialize=function(e){var t=e.json,n=e.meta,o=mm(t);return(null==n?void 0:n.values)&&(o=cm(o,n.values,this)),(null==n?void 0:n.referentialEqualities)&&(o=lm(o,n.referentialEqualities)),o},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(fm({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,ym([],gm(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 km={background:"#0b1521",backgroundAlt:"#132337",foreground:"white",gray:"#3f4e60",grayAlt:"#222e3e",inputBackgroundColor:"#fff",inputTextColor:"#000",success:"#00ab52",danger:"#ff0085",active:"#006bff",paused:"#8c49eb",warning:"#ffb200"},vm=o.createContext(km);function wm({theme:e,...t}){return o.createElement(vm.Provider,eh({value:e},t))}function jm({queryState:e,observerCount:t,isStale:n,theme:o}){return"fetching"===e.fetchStatus?o.active:t?"paused"===e.fetchStatus?o.paused:n?o.warning:o.success:o.gray}function _m(e){return"fetching"===e.state.fetchStatus?"fetching":e.getObserversCount()?"paused"===e.state.fetchStatus?"paused":e.isStale()?"stale":"fresh":"inactive"}function Em(e,t,n={}){return o.forwardRef((({style:r,...a},i)=>{const s=o.useContext(vm),u=Object.entries(n).reduce(((e,[t,n])=>function(e){const[t,n]=o.useState((()=>{if("undefined"!=typeof window)return window.matchMedia(e).matches}));return o.useEffect((()=>{if("undefined"!=typeof window){const t=window.matchMedia(e),o=({matches:e})=>n(e);return t.addListener(o),()=>{t.removeListener(o)}}}),[t,e,n]),t}(t)?{...e,..."function"==typeof n?n(a,s):n}:e),{});return o.createElement(e,{...a,style:{..."function"==typeof t?t(a,s):t,...r,...u},ref:i})}))}const Cm=(e,t=!1)=>{const{json:n}=bm.serialize(e);return JSON.stringify(n,null,t?2:void 0)},Sm=e=>"idle"!==e.state.fetchStatus?0:e.getObserversCount()?e.isStale()?2:1:3,xm=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,Rm={"Status > Last Updated":(e,t)=>Sm(e)===Sm(t)?xm(e,t):Sm(e)>Sm(t)?1:-1,"Query Hash":(e,t)=>e.queryHash.localeCompare(t.queryHash),"Last Updated":xm},Tm=500,Im={top:"bottom",bottom:"top",left:"right",right:"left"};function Am(e){return["left","right"].includes(e)}function Om(e){return Im[e]}function Pm(e,t){return""+e+(t.charAt(0).toUpperCase()+t.slice(1))}function zm(e="bottom"){const t=Am(e),n=Om(e),o=Pm("margin",n);return{position:"absolute",cursor:t?"col-resize":"row-resize",zIndex:1e5,[n]:0,[o]:"-4px",...t?{top:0,height:"100%",width:"4px"}:{width:"100%",height:"4px"}}}const Dm=Em("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"}}),Lm=Em("div",(()=>({flex:"1 1 500px",display:"flex",flexDirection:"column",overflow:"auto",height:"100%"})),{"(max-width: 700px)":(e,t)=>({borderTop:"2px solid "+t.gray})}),Nm=Em("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"}))),Mm=Em("span",{display:"flex",flexWrap:"wrap",gap:"0.5em",fontSize:"0.9em"}),qm=Em("span",{display:"inline-flex",alignItems:"center",padding:".2em .4em",fontWeight:"bold",textShadow:"0 0 10px black",borderRadius:".2em"}),Um=Em("code",{fontSize:".9em",color:"inherit",background:"inherit"}),Bm=Em("input",((e,t)=>({backgroundColor:t.inputBackgroundColor,border:0,borderRadius:".2em",color:t.inputTextColor,fontSize:".9em",lineHeight:"1.3",padding:".3em .4em"}))),Fm=Em("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 Gm({text:e}){return o.createElement("span",{style:{position:"absolute",width:"0.1px",height:"0.1px",overflow:"hidden"}},e)}const Vm=Em("div",{fontFamily:"Menlo, monospace",fontSize:"1em",lineHeight:"1.7",outline:"none",wordBreak:"break-word"}),Wm=Em("span",{color:"white"}),Hm=Em("button",{cursor:"pointer",color:"white"}),Km=Em("button",{cursor:"pointer",color:"inherit",font:"inherit",outline:"inherit",background:"transparent",border:"none",padding:0}),$m=({value:e})=>{const[t,n]=o.useState("NoCopy");return o.createElement("button",{onClick:"NoCopy"===t?()=>{navigator.clipboard.writeText(bm.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?o.createElement(Zm,null):"SuccessCopy"===t?o.createElement(tf,null):o.createElement(ef,null))},Qm=Em("span",((e,t)=>({color:t.danger}))),Jm=Em("div",{marginLeft:".1em",paddingLeft:"1em",borderLeft:"2px solid rgba(0,0,0,.15)"}),Xm=Em("span",{color:"grey",fontSize:".7em"}),Ym=({expanded:e,style:t={}})=>o.createElement("span",{style:{display:"inline-block",transition:"all .1s ease",transform:"rotate("+(e?90:0)+"deg) "+(t.transform||""),...t}},"▶"),Zm=()=>o.createElement("span",{"aria-label":"Copy object to clipboard",title:"Copy object to clipboard",style:{paddingLeft:"1em"}},o.createElement("svg",{height:"12",viewBox:"0 0 16 12",width:"10"},o.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"}),o.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"}))),ef=()=>o.createElement("span",{"aria-label":"Failed copying to clipboard",title:"Failed copying to clipboard",style:{paddingLeft:"1em",display:"flex",alignItems:"center"}},o.createElement("svg",{height:"12",viewBox:"0 0 16 12",width:"10",display:"block"},o.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"})),o.createElement("span",{style:{color:"red",fontSize:"12px",paddingLeft:"4px",position:"relative",top:"2px"}},"See console")),tf=()=>o.createElement("span",{"aria-label":"Object copied to clipboard",title:"Object copied to clipboard",style:{paddingLeft:"1em",display:"inline-block",verticalAlign:"middle"}},o.createElement("svg",{height:"16",viewBox:"0 0 16 16",width:"16",display:"block"},o.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 nf=({handleEntry:e,label:t,value:n,subEntries:r=[],subEntryPages:a=[],type:i,expanded:s=!1,copyable:u=!1,toggleExpanded:c,pageSize:l})=>{const[p,d]=o.useState([]);return o.createElement(Vm,{key:t},a.length?o.createElement(o.Fragment,null,o.createElement(Km,{onClick:()=>c()},o.createElement(Ym,{expanded:s})," ",t," ",o.createElement(Xm,null,"iterable"===String(i).toLowerCase()?"(Iterable) ":"",r.length," ",r.length>1?"items":"item")),u?o.createElement($m,{value:n}):null,s?1===a.length?o.createElement(Jm,null,r.map(e)):o.createElement(Jm,null,a.map(((t,n)=>o.createElement("div",{key:n},o.createElement(Vm,null,o.createElement(Hm,{onClick:()=>d((e=>e.includes(n)?e.filter((e=>e!==n)):[...e,n]))},o.createElement(Ym,{expanded:s})," [",n*l," ..."," ",n*l+l-1,"]"),p.includes(n)?o.createElement(Jm,null,t.map(e)):null))))):null):o.createElement(o.Fragment,null,o.createElement(Wm,null,t,":")," ",o.createElement(Qm,null,Cm(n))))};function of({value:e,defaultExpanded:t,renderer:n=nf,pageSize:r=100,copyable:a=!1,...i}){const[s,u]=o.useState(Boolean(t)),c=o.useCallback((()=>u((e=>!e))),[]);let l=typeof e,p=[];const d=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",p=e.map(((e,t)=>d({label:t.toString(),value:e})))):null!==e&&"object"==typeof e&&(h=e,Symbol.iterator in h)&&"function"==typeof e[Symbol.iterator]?(l="Iterable",p=Array.from(e,((e,t)=>d({label:t.toString(),value:e})))):"object"==typeof e&&null!==e&&(l="object",p=Object.entries(e).map((([e,t])=>d({label:e,value:t}))));const m=function(e,t){if(t<1)return[];let n=0;const o=[];for(;n<e.length;)o.push(e.slice(n,n+t)),n+=t;return o}(p,r);return n({handleEntry:t=>o.createElement(of,eh({key:t.label,value:e,renderer:n,copyable:a},i,t)),type:l,subEntries:p,subEntryPages:m,value:e,expanded:s,copyable:a,toggleExpanded:c,pageSize:r,...i})}function rf(e){return o.createElement("svg",eh({width:"40px",height:"40px",viewBox:"0 0 190 190",version:"1.1"},e),o.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o.createElement("g",{transform:"translate(-33.000000, 0.000000)"},o.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) "}),o.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"}),o.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 af=(e,t,n=!1)=>Sd.useSyncExternalStore(o.useCallback((t=>n?()=>{}:e.subscribe(id.batchCalls(t))),[e,n]),t,t),sf=o.forwardRef((function(e,t){const{isOpen:n=!0,styleNonce:r,setIsOpen:a,context:i,onDragStart:s,onPositionChange:u,showCloseButton:c,position:l,closeButtonProps:p={},errorTypes:d=[],...h}=e,{onClick:m,...f}=p,g=Ad({context:i}),y=g.getQueryCache(),[b,k]=bh("reactQueryDevtoolsSortFn",Object.keys(Rm)[0]),[v,w]=bh("reactQueryDevtoolsFilter",""),[j,_]=bh("reactQueryDevtoolsBaseSort",1),E=o.useMemo((()=>Rm[b]),[b]),C=af(y,(()=>y.getAll().length),!n),[S,x]=bh("reactQueryDevtoolsActiveQueryHash",""),R=o.useMemo((()=>{const e=y.getAll();if(0===C)return[];const t=v?e.filter((e=>dh(e.queryHash,v).passed)):[...e];return E?t.sort(((e,t)=>E(e,t)*j)):t}),[j,E,v,C,y]),[T,I]=o.useState(!1);return o.createElement(wm,{theme:km},o.createElement(Dm,eh({ref:t,className:"ReactQueryDevtoolsPanel","aria-label":"React Query Devtools Panel",id:"ReactQueryDevtoolsPanel"},h,{style:{height:Tm,position:"relative",...h.style}}),o.createElement("style",{nonce:r,dangerouslySetInnerHTML:{__html:"\n .ReactQueryDevtoolsPanel * {\n scrollbar-color: "+km.backgroundAlt+" "+km.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: "+km.backgroundAlt+";\n }\n\n .ReactQueryDevtoolsPanel *::-webkit-scrollbar-thumb, .ReactQueryDevtoolsPanel scrollbar-thumb {\n background: "+km.gray+";\n border-radius: .5em;\n border: 3px solid "+km.backgroundAlt+";\n }\n "}}),o.createElement("div",{style:zm(l),onMouseDown:s}),n&&o.createElement("div",{style:{flex:"1 1 500px",minHeight:"40%",maxHeight:"100%",overflow:"auto",borderRight:"1px solid "+km.grayAlt,display:"flex",flexDirection:"column"}},o.createElement("div",{style:{padding:".5em",background:km.backgroundAlt,display:"flex",justifyContent:"space-between",alignItems:"center"}},o.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"}},o.createElement(rf,{"aria-hidden":!0}),o.createElement(Gm,{text:"Close React Query Devtools"})),o.createElement("div",{style:{display:"flex",flexDirection:"column"}},o.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:".5em"}},o.createElement(cf,{queryCache:y}),l&&u?o.createElement(Fm,{"aria-label":"Panel position",value:l,style:{marginInlineStart:".5em"},onChange:e=>u(e.target.value)},o.createElement("option",{value:"left"},"Left"),o.createElement("option",{value:"right"},"Right"),o.createElement("option",{value:"top"},"Top"),o.createElement("option",{value:"bottom"},"Bottom")):null),o.createElement("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5em"}},o.createElement(Bm,{placeholder:"Filter","aria-label":"Filter by queryhash",value:null!=v?v:"",onChange:e=>w(e.target.value),onKeyDown:e=>{"Escape"===e.key&&w("")},style:{flex:"1",width:"100%"}}),o.createElement(Fm,{"aria-label":"Sort queries",value:b,onChange:e=>k(e.target.value),style:{flex:"1",minWidth:75,marginRight:".5em"}},Object.keys(Rm).map((e=>o.createElement("option",{key:e,value:e},"Sort by ",e)))),o.createElement(Nm,{type:"button",onClick:()=>_((e=>-1*e)),style:{padding:".3em .4em",marginRight:".5em"}},1===j?"⬆ Asc":"⬇ Desc"),o.createElement(Nm,{title:"Clear cache","aria-label":"Clear cache",type:"button",onClick:()=>y.clear(),style:{padding:".3em .4em",marginRight:".5em"}},"Clear"),o.createElement(Nm,{type:"button",onClick:()=>{T?(Zp.setOnline(void 0),I(!1),window.dispatchEvent(new Event("online"))):(Zp.setOnline(!1),I(!0))},"aria-label":T?"Restore offline mock":"Mock offline behavior",title:T?"Restore offline mock":"Mock offline behavior",style:{padding:"0",height:"2em"}},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2em",height:"2em",viewBox:"0 0 24 24",stroke:T?km.danger:"currentColor",fill:"none"},T?o.createElement(o.Fragment,null,o.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElement("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"}),o.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),o.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"}),o.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"}),o.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"})):o.createElement(o.Fragment,null,o.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElement("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"}),o.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),o.createElement("path",{d:"M6.343 12.343a8 8 0 0 1 11.314 0"}),o.createElement("path",{d:"M3.515 9.515c4.686 -4.687 12.284 -4.687 17 0"}))),o.createElement(Gm,{text:T?"Restore offline mock":"Mock offline behavior"}))))),o.createElement("div",{style:{overflowY:"auto",flex:"1"}},R.map((e=>o.createElement(lf,{queryKey:e.queryKey,activeQueryHash:S,setActiveQueryHash:x,key:e.queryHash,queryCache:y}))))),S&&n?o.createElement(uf,{activeQueryHash:S,queryCache:y,queryClient:g,errorTypes:d}):null,c?o.createElement(Nm,eh({type:"button","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"true"},f,{style:{position:"absolute",zIndex:99999,margin:".5em",bottom:0,left:0,...f.style},onClick:e=>{a(!1),null==m||m(e)}}),"Close"):null))})),uf=({queryCache:e,activeQueryHash:n,queryClient:r,errorTypes:a})=>{var i,s;const u=af(e,(()=>e.getAll().find((e=>e.queryHash===n)))),c=af(e,(()=>{var t;return null==(t=e.getAll().find((e=>e.queryHash===n)))?void 0:t.state})),l=null!=(i=af(e,(()=>{var t;return null==(t=e.getAll().find((e=>e.queryHash===n)))?void 0:t.isStale()})))&&i,p=null!=(s=af(e,(()=>{var t;return null==(t=e.getAll().find((e=>e.queryHash===n)))?void 0:t.getObserversCount()})))?s:0,d=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"),o=u.options;u.setState({status:"error",error:n,fetchMeta:{...u.state.fetchMeta,__previousQueryOptions:o}})};return o.createElement(Lm,null,o.createElement("div",{style:{padding:".5em",background:km.backgroundAlt,position:"sticky",top:0,zIndex:1}},"Query Details"),o.createElement("div",{style:{padding:".5em"}},o.createElement("div",{style:{marginBottom:".5em",display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},o.createElement(Um,{style:{lineHeight:"1.8em"}},o.createElement("pre",{style:{margin:0,padding:0,overflow:"auto"}},Cm(u.queryKey,!0))),o.createElement("span",{style:{padding:"0.3em .6em",borderRadius:"0.4em",fontWeight:"bold",textShadow:"0 2px 10px black",background:jm({queryState:c,isStale:l,observerCount:p,theme:km}),flexShrink:0}},_m(u))),o.createElement("div",{style:{marginBottom:".5em",display:"flex",alignItems:"center",justifyContent:"space-between"}},"Observers: ",o.createElement(Um,null,p)),o.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},"Last Updated:"," ",o.createElement(Um,null,new Date(c.dataUpdatedAt).toLocaleTimeString()))),o.createElement("div",{style:{background:km.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Actions"),o.createElement("div",{style:{padding:"0.5em",display:"flex",flexWrap:"wrap",gap:"0.5em",alignItems:"flex-end"}},o.createElement(Nm,{type:"button",onClick:()=>{const e=null==u?void 0:u.fetch();null==e||e.catch(pf)},disabled:"fetching"===c.fetchStatus,style:{background:km.active}},"Refetch")," ",o.createElement(Nm,{type:"button",onClick:()=>r.invalidateQueries(u),style:{background:km.warning,color:km.inputTextColor}},"Invalidate")," ",o.createElement(Nm,{type:"button",onClick:()=>r.resetQueries(u),style:{background:km.gray}},"Reset")," ",o.createElement(Nm,{type:"button",onClick:()=>r.removeQueries(u),style:{background:km.danger}},"Remove")," ",o.createElement(Nm,{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:km.paused}},"loading"===u.state.status?"Restore":"Trigger"," ","loading")," ",0===a.length||"error"===u.state.status?o.createElement(Nm,{type:"button",onClick:()=>{u.state.error?r.resetQueries(u):h()},style:{background:km.danger}},"error"===u.state.status?"Restore":"Trigger"," error"):o.createElement("label",null,"Trigger error:",o.createElement(Fm,{value:null!=d?d:"",style:{marginInlineStart:".5em"},onChange:e=>{const t=a.find((t=>t.name===e.target.value));h(t)}},o.createElement("option",{key:"",value:""}),a.map((e=>o.createElement("option",{key:e.name,value:e.name},e.name)))))),o.createElement("div",{style:{background:km.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Data Explorer"),o.createElement("div",{style:{padding:".5em"}},o.createElement(of,{label:"Data",value:c.data,defaultExpanded:{},copyable:!0})),o.createElement("div",{style:{background:km.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Query Explorer"),o.createElement("div",{style:{padding:".5em"}},o.createElement(of,{label:"Query",value:u,defaultExpanded:{queryKey:!0}})))},cf=({queryCache:e})=>{const t=af(e,(()=>e.getAll().filter((e=>"fresh"===_m(e))).length)),n=af(e,(()=>e.getAll().filter((e=>"fetching"===_m(e))).length)),r=af(e,(()=>e.getAll().filter((e=>"paused"===_m(e))).length)),a=af(e,(()=>e.getAll().filter((e=>"stale"===_m(e))).length)),i=af(e,(()=>e.getAll().filter((e=>"inactive"===_m(e))).length));return o.createElement(Mm,null,o.createElement(qm,{style:{background:km.success,opacity:t?1:.3}},"fresh ",o.createElement(Um,null,"(",t,")"))," ",o.createElement(qm,{style:{background:km.active,opacity:n?1:.3}},"fetching ",o.createElement(Um,null,"(",n,")"))," ",o.createElement(qm,{style:{background:km.paused,opacity:r?1:.3}},"paused ",o.createElement(Um,null,"(",r,")"))," ",o.createElement(qm,{style:{background:km.warning,color:"black",textShadow:"0",opacity:a?1:.3}},"stale ",o.createElement(Um,null,"(",a,")"))," ",o.createElement(qm,{style:{background:km.gray,opacity:i?1:.3}},"inactive ",o.createElement(Um,null,"(",i,")")))},lf=o.memo((({queryKey:e,setActiveQueryHash:t,activeQueryHash:n,queryCache:r})=>{var a,i,s,u;const c=null!=(a=af(r,(()=>{var t;return null==(t=r.find(e))?void 0:t.queryHash})))?a:"",l=af(r,(()=>{var t;return null==(t=r.find(e))?void 0:t.state})),p=null!=(i=af(r,(()=>{var t;return null==(t=r.find(e))?void 0:t.isStale()})))&&i,d=null!=(s=af(r,(()=>{var t;return null==(t=r.find(e))?void 0:t.isDisabled()})))&&s,h=null!=(u=af(r,(()=>{var t;return null==(t=r.find(e))?void 0:t.getObserversCount()})))?u:0;return l?o.createElement("div",{role:"button","aria-label":"Open query details for "+c,onClick:()=>t(n===c?"":c),style:{display:"flex",borderBottom:"solid 1px "+km.grayAlt,cursor:"pointer",background:c===n?"rgba(255,255,255,.1)":void 0}},o.createElement("div",{style:{flex:"0 0 auto",width:"2em",height:"2em",background:jm({queryState:l,isStale:p,observerCount:h,theme:km}),display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",textShadow:p?"0":"0 0 10px black",color:p?"black":"white"}},h),d?o.createElement("div",{style:{flex:"0 0 auto",height:"2em",background:km.gray,display:"flex",alignItems:"center",fontWeight:"bold",padding:"0 0.5em"}},"disabled"):null,o.createElement(Um,{style:{padding:".5em"}},""+c)):null}));function pf(){}lf.displayName="QueryRow";const df="development"!==process.env.NODE_ENV?function(){return null}:function({initialIsOpen:e,panelProps:t={},closeButtonProps:n={},toggleButtonProps:r={},position:a="bottom-left",containerElement:i="aside",context:s,styleNonce:u,panelPosition:c="bottom",errorTypes:l=[]}){const p=o.useRef(null),d=o.useRef(null),[h,m]=bh("reactQueryDevtoolsOpen",e),[f,g]=bh("reactQueryDevtoolsHeight",Tm),[y,b]=bh("reactQueryDevtoolsWidth",Tm),[k="bottom",v]=bh("reactQueryDevtoolsPanelPosition",c),[w,j]=o.useState(!1),[_,E]=o.useState(!1),C=function(){const e=o.useRef(!1),t=o.useCallback((()=>e.current),[]);return o.useEffect((()=>(e.current=!0,()=>{e.current=!1})),[]),t}();o.useEffect((()=>{j(null!=h&&h)}),[h,w,j]),o.useEffect((()=>{const e=d.current;if(e){const t=()=>{w&&(e.style.visibility="visible")},n=()=>{w||(e.style.visibility="hidden")};return e.addEventListener("transitionstart",t),e.addEventListener("transitionend",n),()=>{e.removeEventListener("transitionstart",t),e.removeEventListener("transitionend",n)}}}),[w]),o.useEffect((()=>{var e;if(w&&null!=(e=p.current)&&e.parentElement){const{parentElement:e}=p.current,t=Pm("padding",k),n=Am(k),o=(({padding:e,paddingTop:t,paddingBottom:n,paddingLeft:o,paddingRight:r})=>({padding:e,paddingTop:t,paddingBottom:n,paddingLeft:o,paddingRight:r}))(e.style),r=()=>{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:f)+"px"};if(r(),"undefined"!=typeof window)return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),Object.entries(o).forEach((([t,n])=>{e.style[t]=n}))}}}),[w,k,f,y]);const{style:S={},...x}=t,{style:R={},onClick:T,...I}=r,A=function({position:e="bottom",height:t,width:n,devtoolsTheme:o,isOpen:r,isResizing:a,panelStyle:i}){const s=Om(e),u=Pm("border",s),c=Am(e);return{...i,direction:"ltr",position:"fixed",[e]:0,[u]:"1px solid "+o.gray,transformOrigin:s,boxShadow:"0 0 20px rgba(0,0,0,.3)",zIndex:99999,visibility:r?"visible":"hidden",...a?{transition:"none"}:{transition:"all .2s ease"},...r?{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:Tm}:{left:0,width:"100%",maxHeight:"90%",height:"number"==typeof t&&t>=70?t:Tm}}}({position:k,devtoolsTheme:km,isOpen:w,height:f,width:y,isResizing:_,panelStyle:S});return C()?o.createElement(i,{ref:p,className:"ReactQueryDevtools","aria-label":"React Query Devtools"},o.createElement(wm,{theme:km},o.createElement(sf,eh({ref:d,context:s,styleNonce:u,position:k,onPositionChange:v,showCloseButton:!0,closeButtonProps:n},x,{style:A,isOpen:w,setIsOpen:m,onDragStart:e=>((e,t)=>{if(!e)return;if(0!==t.button)return;const n=Am(k);E(!0);const{height:o,width:r}=e.getBoundingClientRect(),a=t.clientX,i=t.clientY;let s=0;const u=e=>{e.preventDefault(),n?(s=r+("right"===k?a-e.clientX:e.clientX-a),b(s)):(s=o+("bottom"===k?i-e.clientY:e.clientY-i),g(s)),m(!(s<70))},c=()=>{_&&E(!1),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseUp",c,!1)};document.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",c,!1)})(d.current,e),errorTypes:l}))),w?null:o.createElement("button",eh({type:"button"},I,{"aria-label":"Open React Query Devtools","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"false",onClick:e=>{m(!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"},...R}}),o.createElement(rf,{"aria-hidden":!0}),o.createElement(Gm,{text:"Open React Query Devtools"}))):null};process.env.NODE_ENV;var hf,mf={backgroundColor:"#fcfcff",width:"100%",zIndex:1e7,height:"100%",position:"absolute"};exports.ApiErrorCodes=void 0,(hf=exports.ApiErrorCodes||(exports.ApiErrorCodes={})).ECONNABORTED="ECONNABORTED",hf.ETIMEDOUT="ETIMEDOUT",hf.ERR_BAD_REQUEST="ERR_BAD_REQUEST";var ff=["LOCAL","DEV","STG"].includes(process.env.ENVIRONMENT||"");"undefined"!=typeof window&&ff&&function(){e.__awaiter(this,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:if(!dr())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,cr.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=Sp,exports.ApiProvider=function(n){var o=this,r=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(o,void 0,void 0,(function(){var n,o,r,a,s;return e.__generator(this,(function(u){switch(u.label){case 0:return n=localStorage.getItem("headers"),o=n&&JSON.parse(n),r=localStorage.getItem("isTesting")&&"OFF"!==localStorage.getItem("isTesting")?"testing":"live",a=localStorage.getItem("x-organization-code"),s=a?JSON.parse(a).value:"",[4,Rp.refreshInstance({headers:e.__assign(e.__assign({},o),{"X-Environment":r||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 p=t.useCallback((function(t){return e.__awaiter(o,void 0,void 0,(function(){var n,o,r,a,s,u,l;return e.__generator(this,(function(p){switch(p.label){case 0:return n=localStorage.getItem("headers"),(o=n&&JSON.parse(n))?(r=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=r?JSON.parse(r).value:"",[4,Rp.refreshInstance({headers:e.__assign(e.__assign({},o),{"X-Environment":t||i,"x-organization-code":u,"x-account-code":s,"X-Content-Type-Options":"nosniff"})})]):[3,2];case 1:p.sent(),Fd.refetchQueries(["fetch-profile","accountsV2","accounts","fetch-all-organizations","fetch-permissions"]),c(!0),p.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?p(n):"token"===t.key&&p(e)}})),p(e)}),[c,p]),u?React.createElement(Od,{client:Fd},r,React.createElement(df,{initialIsOpen:!1})):React.createElement("div",{style:mf})},exports.ApiSingleton=Rp,exports.getQueryKeyGetNameAndIcon=Wd,exports.getQueryKeyRequiredFields=Hd,exports.queryCache=Bd,exports.queryClient=Fd,exports.use3DSExemptions=function(){var t=this;return Nd({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,Rp.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})},exports.useAICreateWorkflow=function(t,n){return void 0===n&&(n={}),Md((function(e){return Rp.getInstance().generateAIWorkflowRoutes(t,e).then((function(e){return null==e?void 0:e.data}))}),e.__assign(e.__assign({},n),{useErrorBoundary:!1}))},exports.useAllFeatureFlags=function(n){var o=this,r=Nd({queryKey:["all-feature-flags",Object.values(n).filter(Boolean)],queryFn:function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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=Ad();return t.useEffect((function(){a.setQueryData(["cached-feature-flags"],r)}),[r,a]),r},exports.useAllowListDetail=function(e,t,n){return Nd(["allow-list-detail",e],(function(){return Rp.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,o,r,a){return Nd(["black-list-detail",e,t,o,r,a],(function(){return Rp.getInstance().getBlacklistDetail(e,t,n,o,r).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&a,cacheTime:0})},exports.useCachedFeatureFlag=function(t){var n,o,r=Ad(),a=r.getQueryState(["cached-feature-flags"]),i=Boolean(!(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.status)||"loading"===(null===(o=null==a?void 0:a.data)||void 0===o?void 0:o.status)),s=Nd({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=r.getQueryData(["cached-feature-flags"]);return(null==e?void 0:e.data)||{}}});return e.__assign(e.__assign({},s),{isLoading:i})},exports.useCancelReport=function(){return Md((function(e){return Rp.getInstance().cancelReport(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useCancelSubscription=function(){return Md(["post-cancel-subscription"],(function(e){var t=e.subscriptionCode;return Rp.getInstance().postCancelSubscription(t).then((function(e){return null==e?void 0:e.data}))}))},exports.useChangePasswordV2=function(){var t=this;return Md((function(n){return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().changePasswordV2(n).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}))},exports.useChangePaymentsWebhook=function(){return Md(["change-payments-webhook"],(function(e){var t=e.status,n=e.paymentCode;return Rp.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 Md(["change-blacklist"],(function(e){return Rp.getInstance().changeBlackListStatus(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useChangeStatusItemBlackList=function(){return Md(["change-blacklist-item"],(function(e){return Rp.getInstance().changeBlackListStatusItem(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useChangeStylingSettings=function(){return Md((function(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n,r=e.payload;return Rp.getInstance().changeStylingSettings({accountCode:t,environment:o,payload:r}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))},exports.useChangeTemplateStatus=function(){var t=this;return Md(["PATCH/template-reporting/report-templates/status"],(function(n){var o=n.templateId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().changeTemplateStatus(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useChargebacksUpload=function(){return Md((function(e){var t=e.payload,n=e.paymentId,o=e.transactionId,r=e.handleSetProgress;return Rp.getInstance().uploadChargebacks(t,n,o,r)}))},exports.useChartAssistantSocket=function(){var e=t.useRef(null),n=t.useRef(null),o=t.useRef(null),r=t.useState(!1),a=r[0],i=r[1],s=t.useState(null),u=s[0],c=s[1],l=t.useState(null),p=l[0],d=l[1],h=t.useCallback((function(){n.current&&(clearInterval(n.current),n.current=null),o.current&&(clearTimeout(o.current),o.current=null)}),[]),m=t.useCallback((function(){if("undefined"==typeof window||"dashboard.dev.y.uno"!==window.location.hostname){n.current&&(clearInterval(n.current),n.current=null),o.current&&(clearTimeout(o.current),o.current=null),d(null);try{var t=new WebSocket("".concat(xp["WS_URL_".concat(xp.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){d("Failed to parse server response")}},t.onerror=function(e){d("Connection error occurred"),i(!1)},t.onclose=function(e){i(!1),h(),e.wasClean||1e3===e.code||(o.current=setTimeout((function(){m()}),5e3))}}catch(e){d("Failed to establish connection")}}}),[]),f=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}))}),[]),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:"unsubscribe",chart_id:t}))}),[]),y=t.useCallback((function(){c(null)}),[]),b=t.useCallback((function(){n.current&&(clearInterval(n.current),n.current=null),o.current&&(clearTimeout(o.current),o.current=null),e.current&&(i(!1),e.current.close(1e3,"Manual disconnect"),e.current=null)}),[]);return t.useEffect((function(){return m(),function(){h(),b()}}),[]),{subscribe:f,unsubscribe:g,disconnect:b,connect:m,clearChartData:y,isConnected:a,chartData:u,connectionError:p}},exports.useChartExecute=function(e){return Nd(["chartgpt-chart-execute",e],(function(){return Rp.getInstance().executeChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e})},exports.useCloneTemplate=function(){var t=this;return Md(["POST/template-reporting/report-templates/clone"],(function(n){var o=n.templateId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().cloneReportTemplate(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useCommunicationDetails=function(e,t){return Nd(["fetch-communication-details",e],(function(){return Rp.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 Nd(["fetch-communications",e],(function(){return Rp.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 Nd(e.__assign({queryKey:["smart-recovery-communications-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,o,r;return e.__generator(this,(function(e){switch(e.label){case 0:return n=Rp.getInstance(),o={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",o)];case 1:return r=e.sent(),[2,(a=r.data,i=o.start_date,s=o.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})),p=u.find((function(e){return"CONVERSION_RATE_LABEL"===e.label})),d=Qd(null==c?void 0:c.rows,i,s),h=Qd(null==l?void 0:l.rows,i,s),m=Qd(null==p?void 0:p.rows,i,s),{communications:{distribution:d.map((function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:$d(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==c?void 0:c.value)||"0")},conversion_rate:{distribution:m.map((function(e){return{key:e.date||"",total:parseFloat(e.value),percentage:parseFloat(e.value)}})),total:parseFloat((null==p?void 0:p.value)||"0")},completed_communications:{distribution:h.map((function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:$d(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==l?void 0:l.value)||"0")}})]}var a,i,s,u,c,l,p,d,h,m}))}))},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useCommunicationsBySubstatus=function(t,n){return Nd(e.__assign({queryKey:["smart-recovery-communications-by-substatus",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,o,r;return e.__generator(this,(function(e){switch(e.label){case 0:return n=Rp.getInstance(),o={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",o)];case 1:return r=e.sent(),[2,Jd(r.data)]}}))}))},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useCommunicationsFilters=function(){return Nd(["fetch-communications-filters"],(function(){return Rp.getInstance().getCommunicationsFilters().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})},exports.useCommunicationsSubstatusByDay=function(t,n){return Nd(e.__assign({queryKey:["smart-recovery-communications-substatus-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,o,r;return e.__generator(this,(function(e){switch(e.label){case 0:return n=Rp.getInstance(),o={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",o)];case 1:return r=e.sent(),[2,Xd(r.data,o.start_date,o.end_date)]}}))}))},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useConfirmedOtpMfa=function(){return Md((function(e){return Rp.getInstance().confirmMfaOtp(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useCountRowsForReport=function(){return Md((function(e){return Rp.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 Md((function(n){return e.__awaiter(t,void 0,void 0,(function(){var t,o,r,a,i;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().createChartGPTChart(n)];case 1:if(t=e.sent(),!(o=null!==(a=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.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:o}]}}))}))}),{useErrorBoundary:!1})},exports.useCreateAndExecuteChartWithTimezone=function(){var t=this;return Md((function(n){return e.__awaiter(t,void 0,void 0,(function(){var t,o,r,a,i;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().createChartGPTChart(n)];case 1:if(t=e.sent(),!(o=null!==(a=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.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:o}]}}))}))}),{useErrorBoundary:!1})},exports.useCreateChart=function(){return Md((function(e){return Rp.getInstance().createChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useCreateChartWithTimezone=function(){return Md((function(e){return Rp.getInstance().createChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useCreateMonitorTemplate=function(e){return Md((function(t){return Rp.getInstance().createMonitorTemplate(t,e).then((function(e){return e.data}))}))},exports.useCreateMonitorThreshold=function(e){return Md((function(t){return Rp.getInstance().createMonitorThreshold(t,e).then((function(e){return e.data}))}))},exports.useCreateOperationTransaction=function(){return Md((function(e){var t=e.payload,n=e.transactionId,o=e.paymentId,r=e.action;return Rp.getInstance().createOperationTransaction(t,n,o,r)}))},exports.useCreatePaymentLinks=function(){return Md(["post-payment-links"],(function(e){var t=e.payload,n=e.accountCode;return Rp.getInstance().postPaymentLinks({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data}))}))},exports.useCreateReconciliationAlert=function(){return Md(["POST/reconciliation/alerts"],(function(e){return Rp.getInstance().postReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){Fd.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useCreateReconciliationReportTemplate=function(t){var n=this;return Md((function(){return Rp.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,o;return e.__generator(this,(function(r){switch(r.label){case 0:return[4,Fd.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return r.sent(),n=null===(o=Fd.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===o?void 0:o.templates,Fd.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){Fd.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){Fd.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})},exports.useCreateReconciliationsReportV2=function(){return Md((function(e){return Rp.getInstance().createReconciliationsReportV2(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useCreateReconciliationsReportV3=function(){return Md((function(e){return Rp.getInstance().createReconciliationsReportV3(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useCreateReportTemplate=function(t){var n=this;return Md((function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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(o){switch(o.label){case 0:return[4,Fd.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return o.sent(),n=Fd.getQueryData(["GET/reports/templates"]),Fd.setQueryData(["GET/reports/templates"],(function(n){return e.__spreadArray(e.__spreadArray([],n,!0),[t],!1)})),[2,{previousTemplates:n}]}}))}))},onError:function(e,t,n){Fd.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){Fd.invalidateQueries({queryKey:["GET/reports/templates"]})}})},exports.useCreateReportV2=function(){return Md((function(e){return Rp.getInstance().createReportV2(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useCreateRoles=function(){return Md((function(e){var t=e.payload,n=e.accountCode;return Rp.getInstance().createRoles(t,n).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useCreateSamlConfig=function(){return Md((function(e){return Rp.getInstance().createSamlConfig(e)}))},exports.useCreateSchedule=function(){var t=this;return Md(["POST/template-reporting/report-schedules"],(function(n){return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().createReportSchedule(n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useCreateScheduledReport=function(){return Md((function(e){var t=e.payload;return Rp.getInstance().postScheduledReport(t).then((function(e){return{data:e.data,status:e.status}})).catch((function(e){return e}))}))},exports.useCreateSubscription=function(){return Md(["post-subscription"],(function(e){return Rp.getInstance().postSubscription(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useCreateTemplate=function(){var t=this;return Md(["POST/template-reporting/report-templates"],(function(n){return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().createTemplateReporting(n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useCreateUserAuth0=function(){return Md((function(e){return Rp.getInstance().createUserAuth0(e)}))},exports.useCreateWorkflow=function(t,n,o){var r=this;return void 0===o&&(o=null),Md((function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().postSmartRoutingCreateWorkflow(t,n).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}),o)},exports.useDeleteAccountsUserMassive=function(){return Md((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Rp.getInstance().deleteAccountsUserMassive(t,n,o)}))},exports.useDeleteAllowlistItem=function(){return Md(["delete-allowlist-item"],(function(e){return Rp.getInstance().deleteAllowlistItem({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.useDeleteBlackListType=function(){return Md(["delete-blacklist"],(function(e){var t=e.black_list_code;return Rp.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 Md(["delete-blacklist-items"],(function(e){var t=e.blocklist_code,n=e.blocklist_item_id,o=e.account_code;return Rp.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useDeleteChart=function(){return Md((function(e){return Rp.getInstance().deleteChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useDeleteCustomizedApiKeys=function(){return Md((function(e){var t=e.code;return Rp.getInstance().deleteCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.useDeletePaymentLink=function(){return Md(["post-delete-payment-link"],(function(e){var t=e.code;return Rp.getInstance().postDeletePaymentLink({code:t}).then((function(e){return null==e?void 0:e.data}))}))},exports.useDeleteReconciliationAlert=function(){return Md(["DELETE/reconciliation/alerts"],(function(e){return Rp.getInstance().deleteReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){Fd.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useDeleteRoles=function(){return Md((function(e){return Rp.getInstance().deleteRoles(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useDeleteSamlConfig=function(){return Md((function(){return Rp.getInstance().deleteSamlConfig()}))},exports.useDeleteSchedule=function(){var t=this;return Md(["DELETE/template-reporting/report-schedules"],(function(n){var o=n.scheduleId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().deleteReportSchedule(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useDeleteScheduledReport=function(){return Md((function(e){return Rp.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 Md(["DELETE/template-reporting/report-templates"],(function(n){var o=n.templateId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().deleteReportTemplate(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useDeleteUserTeamV2=function(){return Md((function(e){var t=e.userCode,n=e.organizationCode;return Rp.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,o=e.accountCode;return void 0===t&&(t=null),Md((function(){return Rp.getInstance().deleteSmartRoutingVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useDeleteWebhookV2=function(e){return Md((function(e){var t=e.code,n=e.accountCode;return Rp.getInstance().deleteWebhookV2(t,n)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useDisableSchedule=function(){var t=this;return Md(["PATCH/template-reporting/report-schedules/disable"],(function(n){var o=n.scheduleId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().disableReportSchedule(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useDuplicateAccount=function(){return Md((function(t){var n=e.__spreadArray([exports.DuplicateSetting.ACCOUNT],t.duplicate_order,!0);return Rp.getInstance().duplicateAccount(e.__assign(e.__assign({},t),{duplicate_order:n}))}))},exports.useDuplicateVersion=function(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Md((function(){return Rp.getInstance().postSmartRoutingDuplicateVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useEditPaymentLinks=function(){return Md(["patch-payment-links"],(function(e){var t=e.payload,n=e.accountCode,o=e.paymentLinkCode;return Rp.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:o}).then((function(e){return null==e?void 0:e.data}))}))},exports.useEditRoles=function(){var t=this;return Md((function(n){var o=n.payload,r=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,Rp.getInstance().editRoles({payload:o,id:r},a)];case 1:return[2,null==(t=e.sent())?void 0:t.data]}}))}))}),{useErrorBoundary:!1})},exports.useEmailVerification=function(e){return Nd(["email-verification",e],(function(){return Rp.getInstance().emailVerification(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})},exports.useExcludeUsers=function(){return Md((function(e){var t=e.payload,n=e.organizationCode;return Rp.getInstance().mfaExcludeUsers(t,n)}))},exports.useExportApiLogs=function(){return Md((function(e){return Rp.getInstance().postExportApiLogs(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useExportWebhooksLogs=function(){return Md((function(e){return Rp.getInstance().postExportWebhooksLogs(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useFeatureFlags=function(t){var n=this,o=Object.values(t).filter(Boolean);return Nd(["feature-flags",o],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getFeatureFlagId(t).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:o.length>1,useErrorBoundary:!1})},exports.useFirebaseUserSubscribe=function(e){return Md((function(e){var t=e.payload;return Rp.getInstance().firebaseUserSubscribe(t)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useGenerateFeedback=function(t){return void 0===t&&(t={}),Md((function(e){return Rp.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=Vd(),o=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return Nd({queryKey:["accounts",o],queryFn:function(){return Rp.getInstance().getAccounts(o).then((function(e){return null==e?void 0:e.data}))},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!o})},exports.useGetAccountsByUser=function(e){return Nd(["accountsV2-by-user",e],(function(){return e?Rp.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 o=this;return Nd({queryKey:["accounts-for-impersonation",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getAccountsForImpersonation(t).then((function(e){var t,o;return(null===(o=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.response)||void 0===o?void 0:o.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 Nd(["accountsV2",e],(function(){return Rp.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 Nd(["config-rules"],(function(){return Rp.getInstance().getAllConfigRules().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0})},exports.useGetAllOrganizations=function(){return Nd(["fetch-all-organizations",Vd()],(function(){return Rp.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,o=e.enabled;return Nd(["GET/reconciliation/advancements/list",t,n],(function(){return Rp.getInstance().getReconciliationAdvancements(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetAllReconciliationsAgenda=function(e){var t=e.body,n=e.params,o=e.enabled;return Nd(["GET/reconciliation/agenda/list",t,n],(function(){return Rp.getInstance().getReconciliationAgenda(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetAllReconciliationsAlerts=function(e){var t=e.body,n=e.params,o=e.enabled;return Nd(["GET/reconciliation/alerts/list",t,n],(function(){return Rp.getInstance().getReconciliationAlerts(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetAllReconciliationsFees=function(e){var t=e.body,n=e.params,o=e.enabled;return Nd(["GET/reconciliation/fees/list",t,n],(function(){return Rp.getInstance().getReconciliationFees(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetAllReconciliationsSales=function(e){var t=e.body,n=e.params,o=e.enabled;return Nd(["GET/reconciliation/sales/list",t,n],(function(){return Rp.getInstance().getReconciliationSales(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetAllTableColumns=function(e){return Nd(["GET/v1/reconciliation/table/".concat(e,"/columns")],(function(){return Rp.getInstance().getAllTableColumns(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.useGetAllowedIps=function(){return Nd(["developers-get-allowed-ips"],(function(){return Rp.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.useGetApiLogsDetailByPaymentCode=function(e){return Nd(["api-logs-detail",e],(function(){return Rp.getInstance().getApiLogsDetailByPaymentCode(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e,cacheTime:0,useErrorBoundary:!1})},exports.useGetAuditEvents=function(e){return Nd(["events",e],(function(){return Rp.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.useGetAuditLogsFilters=function(){return Nd(["/cms/audit-logs-filters"],(function(){return Rp.getInstance().useGetAuditLogsFilters().then((function(e){return lp(e)?fp:null==e?void 0:e.data})).catch((function(){return fp}))}))},exports.useGetAuditMonitorEventDetail=function(e){return Nd(["audit-monitor-event-detail",e],(function(){return Rp.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 Md((function(n){var o=n.batchRefundId,r=n.organizationCode,a=n.accountCode;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getBatchRefundProcessedFileDownload(o,r,a).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})},exports.useGetBatchRefundUserFileDownload=function(){var t=this;return Md((function(n){var o=n.batchRefundId,r=n.organizationCode,a=n.accountCode;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getBatchRefundUserFileDownload(o,r,a).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})},exports.useGetBatchRefunds=function(t,n){var o=this;return void 0===t&&(t=26),void 0===n&&(n=0),Nd(["batch-refunds",t,n],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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){return Nd(["get-black-list",e],(function(){return Rp.getInstance().getBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!e})},exports.useGetBlockListSummary=function(e,t,n){return Nd(["get-block-list-summary",e,t,n],(function(){var o=Rp.getInstance();return n?o.getBlackListSummary(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e})):Promise.resolve({})}),{enabled:!!e&&!!n})},exports.useGetCardBrands=function(){return Nd(["GET/catalog/card-brands"],(function(){return Rp.getInstance().getCardBrands().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useGetChartsByUser=function(){return Nd(["chartgpt-user-charts"],(function(){return Rp.getInstance().getChartsByUser().then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})},exports.useGetChartsByUserWithResults=function(){var t=this;return Nd(["chartgpt-user-charts-with-results"],(function(){return e.__awaiter(t,void 0,void 0,(function(){var t,n,o,r=this;return e.__generator(this,(function(a){switch(a.label){case 0:return[4,(t=Rp.getInstance()).getChartsByUser()];case 1:return n=a.sent(),o=(null==n?void 0:n.data)||[],[4,Promise.all(o.map((function(n){return e.__awaiter(r,void 0,void 0,(function(){var o,r,a,i,s,u,c,l;return e.__generator(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),[4,t.executeChartGPTChart(n.code)];case 1:return o=p.sent(),[2,e.__assign(e.__assign({},n),{user_prompt:null!==(i=null===(a=null==o?void 0:o.data)||void 0===a?void 0:a.user_prompt)&&void 0!==i?i:n.user_prompt,unit_to_display:null!==(u=null===(s=null==o?void 0:o.data)||void 0===s?void 0:s.unit_to_display)&&void 0!==u?u:n.unit_to_display,results:null!==(l=null===(c=null==o?void 0:o.data)||void 0===c?void 0:c.results)&&void 0!==l?l:[]})];case 2:return r=p.sent(),console.error("Failed to execute chart ".concat(n.chart_id,":"),r),[2,e.__assign(e.__assign({},n),{results:[]})];case 3:return[2]}}))}))})))];case 2:return[2,a.sent()]}}))}))}))},exports.useGetCheckoutTemplate=function(e){var t=e.accountCode;return Nd(["checkouts-template"],(function(){return Rp.getInstance().getCheckoutTemplate({accountCode:t}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,enabled:Boolean(t)})},exports.useGetCheckouts=function(e){var t=e.accountCode;return Nd(["checkouts",t],(function(){return Rp.getInstance().getCheckouts({accountCode:t}).then((function(e){return e.data}))}),{cacheTime:0,enabled:Boolean(t)})},exports.useGetConditionalConfigRules=function(){return Md((function(e){return Rp.getInstance().getConditionalConfigRules(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useGetConfigAllowlist=function(e,t){return Nd(["get-cofig-allow-list",e],(function(){return Rp.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 Nd(["connections"],(function(){return Rp.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;return Nd(["fetch-connections-by-payment-method",n,t],(function(){return Rp.getInstance().getConnectionsByPaymentMethod(t,n).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),Nd(["countries",e],(function(){return Rp.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 Nd(["countries-v2",n],(function(){return Rp.getInstance().useGetCountriesConfigV2(n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!0,keepPreviousData:!0})},exports.useGetCredentials=function(t){var n=t.password,o=t.accountCode;return Nd(["developers"],(function(){return Rp.getInstance().getDeveloperCredentials(n,o).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 Md((function(t){var n=t.password,o=t.accountCode;return Rp.getInstance().getDeveloperCredentials(n,o).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}}))}))},exports.useGetCustomizedApiKeys=function(e){return Nd(["fetch-customized-api-keys",e],(function(){return Rp.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 Nd(["fetch-customized-api-keys-accounts"],(function(){return Rp.getInstance().getCustomizedApiKeysAccounts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})},exports.useGetCustomizedApiKeysMembers=function(){return Nd(["fetch-customized-api-keys-members"],(function(){return Rp.getInstance().getCustomizedApiKeysMembers().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})},exports.useGetCustomizedApiKeysProducts=function(){return Nd(["fetch-customized-api-keys-products"],(function(){return Rp.getInstance().getCustomizedApiKeysProducts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{cacheTime:0})},exports.useGetCustomizedApiKeysToken=function(){return Md((function(e){var t=e.code,n=e.password;return Rp.getInstance().getCustomizedApiKeysToken(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))},exports.useGetDashboardStaticContents=function(){return Nd(["/cms/static-contents"],(function(){return Rp.getInstance().getDashboardStaticContents().then((function(e){var t,n;return lp(e)?gp:(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 Nd(["dialogs"],(function(){return Rp.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),Nd(["reports/".concat(e)],(function(){return Rp.getInstance().downloadReports(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:t,onSuccess:n,useErrorBoundary:!1})},exports.useGetEmailOtp=function(){return Md((function(){return Rp.getInstance().getEmailOtp().then((function(e){return null==e?void 0:e.data}))}))},exports.useGetHashPylon=function(){var t=this;return Nd(["fetch-hash-pylon"],(function(){return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getHashPylon()]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})},exports.useGetImpersonationEnabled=function(){return Nd(["fetch-impersonation-enabled"],(function(){return Rp.getInstance().getImpersonationEnabled().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})},exports.useGetImpersonationUsers=function(){return Nd(["fetch-impersonation-users"],(function(){return Rp.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 Nd(["get-insights-reports",e],(function(){return Rp.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 Nd(["get-insights-reports-again",e],(function(){return Rp.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.useGetInstallmentPlans=function(e){return Nd(["installments-plans",e],(function(){return Rp.getInstance().getInstallmentPlans(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(e),useErrorBoundary:!1})},exports.useGetIntegrationByAccountV2=function(e){var t=e.accountCode,n=e.organizationCode,o=Vd();return Nd(["organizations-account-integrations",t,n],(function(){return Rp.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||o}).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,o=e.accountCode;return Nd(["integration-params",t,o],(function(){return t.includes("undefined")?{}:Rp.getInstance().getIntegrationParams({accountCode:o,integration_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,useErrorBoundary:!1})},exports.useGetLanguages=function(){return Nd(["languages"],(function(){return Rp.getInstance().getLanguages().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:300})},exports.useGetLocales=function(){return Nd(["/cms/locales"],(function(){return Rp.getInstance().getLocales().then((function(e){return lp(e)?bp:e.data})).catch((function(){return bp}))}))},exports.useGetLoginMethods=function(){return Nd({queryKey:["get-login-methods"],queryFn:function(){return Rp.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 Nd(["mfa-config",n],(function(){return Rp.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 Nd(["mfa-excluded-users",n],(function(){return Rp.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 Nd(["mfa-enforcement-status",e.accountCode],(function(){return Rp.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 Nd(["menu"],(function(){return Rp.getInstance().getMenu().then((function(e){return lp(e)?yp:null==e?void 0:e.data})).catch((function(){return yp}))}))},exports.useGetMergedNotifications=function(){return Nd(["notifications-merged"],(function(){return Rp.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,o=e.type;return Nd(Wd({paymentMethodType:n,type:o}),(function(){return Rp.getInstance().getNameAndIcon({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useGetNetworkTokensOnboardingByOrganization=function(t){var n=this;return Nd({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,Rp.getInstance().getNetworkTokensOnboardingByOrganization(t)];case 1:return[2,e.sent().data]}}))}))},enabled:!!t,useErrorBoundary:!1,cacheTime:0})},exports.useGetNotificationsCustomer=function(e){return Nd(["notifications-customer",e],(function(){return Rp.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 Md((function(e){return Rp.getInstance().getNotificationsNumber(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useGetOrganization=function(){return Nd(["fetch-organizations"],(function(){return Rp.getInstance().getOrganization().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})},exports.useGetPaymentFilters=function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=exports.PaymentFiltersSection.PAYMENTS),Nd(["payment-filters",e,t],(function(){return Rp.getInstance().getPaymentFilters(t).then((function(e){return null==e?void 0:e.data}))}),{enabled:e,useErrorBoundary:!1,cacheTime:3e5})},exports.useGetPaymentLinkByCode=function(e){return Nd(["payment-link"],(function(){return Rp.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 Nd(["fetch-payment-links",e,t],(function(){return Rp.getInstance().getPaymentLinks(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t,cacheTime:0})},exports.useGetPaymentMethodsAndProviders=function(){return Nd({queryKey:["/payment-methods/providers"],queryFn:function(){return Rp.getInstance().getPaymentMethodsAndProviders().then((function(e){return null==e?void 0:e.data}))},cacheTime:864e5,useErrorBoundary:!1})},exports.useGetPaymentMetricsFilters=function(){return Nd(["payment-metrics-filters"],(function(){return Rp.getInstance().getPaymentMetricsFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useGetPaymentStatusesStyles=function(){return Nd(["/payment/statuses/style"],(function(){return Rp.getInstance().useGetPaymentStatusesStyles().then((function(e){return lp(e)?pp:null==e?void 0:e.data})).catch((function(){return pp}))}))},exports.useGetPaymentTransactionsDetails=function(e){var t=e.transaction_code,n=e.enabled;return Nd(["payment-transaction-details",t],(function(){return Rp.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,o=t.paymentCode,r=t.enabled,a=void 0===r||r,i=Rp.getInstance();return Nd(["get-payment-v2",o],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,i.getPaymentV2(o).then((function(e){return e.data}))]}))}))}),{enabled:a,cacheTime:500,useErrorBoundary:!1})},exports.useGetPaymentsMethodsByCountry=function(e){var t=Vd();return Nd(["payment-methods",e],(function(){return Rp.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 Nd(["GET/payout-detail",JSON.stringify(e)],(function(){var t=Rp.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=Vd();return Nd(["GET/payout-history-detail",JSON.stringify(e)],(function(){return Rp.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.useGetPayoutTransactionDetail=function(e){return Nd(["GET/payout-transaction-detail",JSON.stringify(e)],(function(){return Rp.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 Nd({queryKey:["pending-duplicate-accounts",e],queryFn:function(){return Rp.getInstance().getPendingDuplicateAccounts()},useErrorBoundary:!1,keepPreviousData:!0,refetchInterval:e})},exports.useGetPermissions=function(e,t){return Nd(["fetch-permissions",e,t],(function(){var e,t,n,o=localStorage.getItem("account"),r=localStorage.getItem("user"),a=o&&JSON.parse(o),i=r&&JSON.parse(r);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 Nd(["fetch-permissions-catalog"],(function(){return Rp.getInstance().getPermissionsCatalog().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})},exports.useGetProfile=function(){return Nd(["fetch-profile"],(function(){return Rp.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})},exports.useGetProofOfCancel=function(t,n){var o=this,r=Vd();return Nd(["GET/useGetProofOfCancel",r,t,n],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getProofOfCancel(t,r,n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!t&&!!r&&!!n,cacheTime:0,useErrorBoundary:!1})},exports.useGetProofOfPayment=function(t,n){var o=this,r=Vd();return Nd(["GET/useGetProofOfPayment",r,t,n],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getProofOfPayment(t,r,n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!t&&!!r&&!!n,cacheTime:0,useErrorBoundary:!1})},exports.useGetProviderParams=function(e){var t=Vd();return Nd(["organizations-provider-params",e],(function(e){var n=e.queryKey;return Rp.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.useGetReconciliationActive=function(){return Nd(["GET/v1/reconciliation/active"],(function(){return Rp.getInstance().getReconciliationActive().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.useGetReconciliationAgendaInsightsByKey=function(e){var t=e.body,n=e.params,o=e.enabled;return Nd(["GET/reconciliation/agenda/insights",t,n],(function(){return Rp.getInstance().getReconciliationAgendaInsightByKey(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetReconciliationFilters=function(){return Nd(["GET-reconciliation-filters"],(function(){return Rp.getInstance().getReconciliationFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useGetReconciliationMetrics=function(e,t){return Nd(["fetch-reconciliation-metrics",e],(function(){return Rp.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 Nd(["/reconciliation/transaction/statuses/style"],(function(){return Rp.getInstance().useGetReconciliationTransactionStatusesStyles().then((function(e){return lp(e)?hp:null==e?void 0:e.data})).catch((function(){return hp}))}))},exports.useGetReconciliationTransactions=function(e,t){return Nd(["fetch-reconciliation-transaction",e],(function(){return Rp.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 Nd(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],(function(){return Rp.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 Nd(["GET/reconciliation/reports/templates"],(function(){return Rp.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 o=this,r=Vd();return Nd(["getRefundPdf",t,r,n],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getRefundPdf(t,r,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))]}))}))}),{enabled:!!t&&!!r,useErrorBoundary:!1})},exports.useGetReportColumns=function(t,n,o){var r=this;return Nd(["GET/reports/columns/".concat(n,"/").concat(o)],(function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(t){return[2,Rp.getInstance().getReportColumns(n,o).then((function(t){return n===exports.TemplateType.ALL&&o===exports.ReportType.PAYMENTS?e.__spreadArray(e.__spreadArray([],null==t?void 0:t.data,!0),[Kd],!1):null==t?void 0:t.data})).catch((function(e){return e}))]}))}))}),{enabled:t,useErrorBoundary:!1})},exports.useGetReportTemplates=function(e){return Nd(["GET/reports/templates"],(function(){return Rp.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 Nd(["reports"],(function(){return Rp.getInstance().reportsList().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useGetReportsListMultiEnv=function(e){return void 0===e&&(e=!0),Nd(["reports-multi-env"],(function(){return Rp.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,o=e.type;return Nd(Hd({paymentMethodType:n,type:o}),(function(){return Rp.getInstance().getRequiredFields({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useGetRoles=function(){return Nd(["fetch-roles"],(function(){return Rp.getInstance().getRoles().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useGetRolesPermissions=function(){return Nd(["fetch-rolespermissions"],(function(){return Rp.getInstance().getRolesPermissions().then((function(e){return null==e?void 0:e.data}))}))},exports.useGetRoutingMonitorsTemplate=function(e,t){return Nd(["fetch-routing-monitors-template",e],(function(){return Rp.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 Nd(["fetch-routing-monitors-templates",e],(function(){return Rp.getInstance().getRoutingMonitorsTemplates(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})},exports.useGetRule=function(){return Md((function(e){return Rp.getInstance().getRule(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useGetSamlConfig=function(e){return Nd(["fetch-organization-saml-config",e],(function(){return Rp.getInstance().getSamlConfig().then((function(e){return e.data}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})},exports.useGetScheduledReportsList=function(e){return Nd(["GET/scheduled-reports",e],(function(){return Rp.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 Nd(["fetch-reconciliation-settlements",e],(function(){return Rp.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 Nd(["smart-routing-condition-payment-method",e,t],(function(){return Rp.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){return Nd(["smart-routing-condition-types",e,t],(function(){return Rp.getInstance().getSmartRoutingConditionTypes(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e})},exports.useGetSmartRoutingConditionTypesValues=function(e,t){return Nd(["smart-routing-condition-types-values",t,e],(function(){return Rp.getInstance().getSmartRoutingConditionTypesValues(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&!!e,useErrorBoundary:!1})},exports.useGetSmartRoutingDataReport=function(e){return Nd(["data-report",e],(function(){return Rp.getInstance().getSmartRoutingDataReport(e).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,useErrorBoundary:!1})},exports.useGetSmartRoutingDeclineGroups=function(e){return Nd(["smart-routing-decline-groups",e],(function(){return Rp.getInstance().getSmartRoutingDeclinedGroup(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})},exports.useGetSmartRoutingMethods=function(e){return Nd(["smart-routing-methods",e],(function(){return Rp.getInstance().getSmartRoutingMethods(e).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){return Nd(["smart-routing-next-route",e,n,t],(function(){return Rp.getInstance().getSmartRoutingNextSteps(e,t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})},exports.useGetSmartRoutingPaymentRoute=function(e,t){return Nd(["smart-routing-payment-route",e,t],(function(){return Rp.getInstance().getSmartRoutingPaymentRoute(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&!!t,cacheTime:0})},exports.useGetSmartRoutingSearchConditionValues=function(e){var t=e.text,n=e.conditionType;return Nd(["smart-routing-search-condition-values",t,n],(function(){return Rp.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){return Nd(["smart-routing-simulate-condition-type-values",e],(function(){return Rp.getInstance().getSmartRoutingSimulateConditionTypeValues(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})},exports.useGetSmartRoutingWorkflow=function(e,t){return Nd(["smart-routing-workflow",t,e],(function(){return Rp.getInstance().getSmartRoutingWorkflow(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e,cacheTime:0,retry:!1})},exports.useGetSmartRoutingWorkflowVersion=function(e){var t=e.accountCode,n=e.workflowVersionId;return Nd(["smart-routing-workflow-version",n,t],(function(){return Rp.getInstance().getSmartRoutingWorkflowVersion(t,n).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 Nd(["styling-sdk-dynamic",t],(function(){return Rp.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.useGetStylingSettings=function(e){var t=e.accountCode;return Nd(["styling-settings",t],(function(){return Rp.getInstance().getStylingSettings({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})},exports.useGetStylingSettingsV2=function(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n;return Nd(["styling-settings-v2",t],(function(){return Rp.getInstance().getStylingSettingsV2({accountCode:t,environment:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})},exports.useGetStylingTheme=function(e){var t=e.accountCode;return Nd(["styling-theme",t],(function(){return Rp.getInstance().getStylingTheme({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})},exports.useGetSubscriptionByCode=function(e,t){return void 0===t&&(t=!0),Nd(["subscription",e],(function(){return Rp.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,o){return void 0===o&&(o=!0),Nd(["subscription-payments",e,t,n],(function(){return Rp.getInstance().getSubscriptionPayments(e,t,n).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e&&o,cacheTime:0})},exports.useGetTeamsFiltersMembers=function(){var e=Vd();return Nd(["teams-filters-members"],(function(){return Rp.getInstance().teamsFiltersMembers({organizationCode:e}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})},exports.useGetTimeZoneCatalog=function(){return Nd(["timezone-catalog"],(function(){return Rp.getInstance().useGetTimeZoneCatalog().then((function(e){return lp(e)?mp:null==e?void 0:e.data})).catch((function(){return mp}))}))},exports.useGetTimezonePaymentLink=function(e){return Nd(["timezone"],(function(){return Rp.getInstance().getTimezone(e).then((function(e){return lp(e)?mp:null==e?void 0:e.data})).catch((function(){return mp}))}),{enabled:!0,keepPreviousData:!0})},exports.useGetTokenValidation=function(){return Md((function(e){var t=e.password,n=e.otp;return Rp.getInstance().getMfaTokenValidation(t,n).then((function(e){return null==e?void 0:e.data}))}))},exports.useGetTransactionDetailsV2=function(t){var n=this,o=t.payment_code,r=t.enabled,a=void 0===r||r,i=Rp.getInstance();return Nd(["get-payment-transaction-details-v2",o],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,i.getTransactionDetailsV2({payment_code:o}).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!o&&a,cacheTime:0,useErrorBoundary:!1})},exports.useGetTransactionHistoryByPaymentCode=function(e){var t=e.payment_code,n=e.enabled;return Nd(["transaction-history",t],(function(){return Rp.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,o=t.transaction_code,r=t.enabled,a=void 0===r||r,i=Rp.getInstance();return Nd(["get-payment-transaction-raw-response",o],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,i.getTransactionRawResponse({transaction_code:o})]}))}))}),{enabled:!!o&&a,cacheTime:0,useErrorBoundary:!1})},exports.useGetTransactionStatusesStyles=function(){return Nd(["/transaction/statuses/style"],(function(){return Rp.getInstance().useGetTransactionStatusesStyles().then((function(e){return lp(e)?dp:null==e?void 0:e.data})).catch((function(){return dp}))}),{cacheTime:36e5,useErrorBoundary:!1})},exports.useGetTranslations=function(){var e=localStorage.getItem("lang")||"en";return Nd(["translations",e],(function(){return Rp.getInstance().getTranslations(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:3e4})},exports.useGetUserFull=function(){var t=this;return Nd(["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,Rp.getInstance().getUserFull()];case 1:return[2,e.sent().data]}}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})},exports.useGetUsersToImpersonate=function(t,n,o,r,a){var i=this;return void 0===o&&(o=1),void 0===r&&(r=10),Nd(["get-users-to-impersonate",t,n,o,r,a],(function(){return e.__awaiter(i,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getUsersToImpersonate(t,n,o,r,a).then((function(e){return null==e?void 0:e.data}))]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!t})},exports.useGetValidateOpsgenieKey=function(e){return Nd(["validate-opsgenie-key",e],(function(){return Rp.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 Nd(["params-catalog"],(function(){return Rp.getInstance().getWebhookParamsV2().then((function(e){return null==e?void 0:e.data}))}))},exports.useGetWebhooksV2Detail=function(e){var t=e.accountCode,n=e.enabled;return Nd(["webhooks-detail",t],(function(){return Rp.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 Nd(["webhooks",t,n],(function(){return Rp.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,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-3ds-conversion-rate-and-evolution",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsights3dsConversionRateAndEvolution(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsDeclineReasons=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-3ds-decline-reasons",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsights3dsDeclineReasons(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsFrictionlessVsChallenge=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-3ds-frictionless-vs-challenge",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsights3dsFrictionlessVsChallenge(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsVolumeAndCountTx=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-3ds-volume-and-count-tx",n,t],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsights3dsVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksByCardBrand=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-by-card-brand",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksByCardBrand(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksByProviderAndCardBrand=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksByProviderAndCardBrand(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksDisputed=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-disputed",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksDisputed(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksReasonsDistribution=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-reasons-distribution",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksReasonsDistribution(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksStatusDistribution=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-status-distribution",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksStatusDistribution(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksTotalRateAndEvolution=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-total-rate-and-evolution",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksTotalRateAndEvolution(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksVolumeAndCountTx=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-volume-and-count-tx",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksWinRate=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-win-rate",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksWinRate(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsConversionRateMetricsV2=function(e,t,n,o){var r,a;void 0===n&&(n=!0);var i=null!==(r=null==o?void 0:o.staleTime)&&void 0!==r?r:3e5,s=null!==(a=null==o?void 0:o.cacheTime)&&void 0!==a?a:3e5;return Nd(["get-insights-conversion-rate-metrics-v2",e,t],(function(){return Rp.getInstance().getInsightsMetricsConversionRateV2(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:n&&(!!(null==e?void 0:e.currency_code)&&"Empty"!==(null==e?void 0:e.currency_code)&&"string"==typeof(null==e?void 0:e.currency_code)||Array.isArray(null==e?void 0:e.currency_code)&&0===(null==e?void 0:e.currency_code.length)),staleTime:i,cacheTime:s,useErrorBoundary:!1,retry:1})},exports.useInsightsCustomerPaymentsAndFraudMetrics=function(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Nd(["get-insights-customer-payment-fraud-metrics",t,e],(function(){return Rp.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 Nd(["get-insights-conversion-rate-fallback-metrics",e],(function(){return Rp.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,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-fraud-screening-conversion-rate",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsFraudScreeningConversionRate(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsFraudScreeningVolumeAndCountTx=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-fraud-screening-volume-and-count-tx",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsFraudScreeningVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsHomeMetrics=function(e){return Nd(["get-insights-home-metrics",e],(function(){return Rp.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 Nd(["get-insights-overview",e],(function(){return Rp.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 Nd(["get-insights-overview-v3",e,t],(function(){return Rp.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,Nd(["get-insights-total-payment-fraud-metrics",t,e],(function(){return Rp.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,Nd(["get-insights-volume-metrics",t,e],(function(){return Rp.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,o){return void 0===o&&(o=!0),delete t.account_code,Nd(["get-insights-volume-metrics-v2",t,e,n],(function(){return Rp.getInstance().getInsightsMetricsVolumeV2(e,n,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:o,cacheTime:200,useErrorBoundary:!1})},exports.useInviteUsersMultiaccountMassive=function(){return Md((function(e){return Rp.getInstance().inviteUsersMassive(e,e.organizationCode)}))},exports.useIsTesting=function(){var e=t.useState("ON"===localStorage.getItem("isTesting")),n=e[0],o=e[1];return t.useEffect((function(){window.addEventListener("storage",(function(e){"isTesting"===e.key&&o("ON"===e.newValue)}))}),[]),{isTesting:n}},exports.useListSubscriptions=function(){return Md(["post-list-subscriptions"],(function(e){return Rp.getInstance().postListSubscriptions(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useLoginMethods=function(){return Md((function(e){return Rp.getInstance().changeLoginMethods(e)}))},exports.useNetworkTokensOnboarding=function(){var t=this;return Nd({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,Rp.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})},exports.useNewPostConnectionValidate=function(){return Md(["new-post-connection-validate"],(function(){return Rp.getInstance().postMultiConnectionValidate().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})},exports.usePatchAccountV2=function(){return Md((function(e){var t=e.name,n=e.code,o=e.principal;return Rp.getInstance().patchAccountV2({name:t,code:n,principal:o})}))},exports.usePatchAddAllowlistItems=function(){return Md(["post-add-allowlist-items"],(function(e){var t=e.payload;return Rp.getInstance().patchAddAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePatchAllowedIps=function(){return Md(["developers-patch-allowed-ips"],(function(t){return Rp.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 Md(["patch-allowlist"],(function(e){var t=e.payload;return Rp.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,o){var r=this;return void 0===o&&(o=!0),Nd(["chartgpt-patch-and-execute",t,n],(function(){return e.__awaiter(r,void 0,void 0,(function(){var o,r,a,i,s;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,(o=Rp.getInstance()).patchChartGPTChart(t,n)];case 1:return r=e.sent(),a=null==r?void 0:r.data,[4,o.executeChartGPTChart(t)];case 2:return i=e.sent(),s=null==i?void 0:i.data,[2,{chart:a,execution:s}]}}))}))}),{enabled:o&&!!t,retry:!1})},exports.usePatchApiKeysEditNote=function(){return Md((function(e){var t=e.payload,n=e.code;return Rp.getInstance().patchApiKeysEditNote(t,n).then((function(e){return e.data})).catch((function(e){return e}))}))},exports.usePatchChangeStatusAllowlist=function(){return Md(["patch-change-status-allowlist"],(function(e){var t=e.payload;return Rp.getInstance().patchChangeStatusAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePatchChangeStatusAllowlistItem=function(){return Md(["patch-change-status-allowlist-item"],(function(e){var t=e.payload;return Rp.getInstance().patchChangeStatusAllowlistItem({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePatchChartName=function(){return Md((function(e){var t=e.chart_id,n=e.type,o=e.name,r=e.user_prompt,a=void 0===r?"":r;return Rp.getInstance().patchChartGPTChart(t,{type:n,name:o,user_prompt:a}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.usePatchConnection=function(){return Md(["patch-connection"],(function(e){var t=e.payload,n=e.connectionCode;return Rp.getInstance().patchConnection({payload:t,connectionCode:n}).then((function(e){return null==e?void 0:e.data}))}))},exports.usePathCreateCustomizedApiKeys=function(){return Md((function(e){var t=e.payload,n=e.code;return Rp.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 Md((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,Rp.getInstance().pathNotification(n)];case 1:return[2,null==(t=e.sent())?void 0:t.data]}}))}))}))},exports.usePauseSubscription=function(){return Md(["post-pause-subscription"],(function(e){var t=e.subscriptionCode;return Rp.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 o=Vd();return Nd(["getPayoutsFilters",o],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getPayoutsFilters(o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))]}))}))}),{enabled:t&&!!o})},exports.usePayoutsList=function(e){return Nd(["usePayoutsList",e&&JSON.stringify(e)],(function(){var t=Rp.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 Md((function(e){var t=e.name,n=e.principal;return Rp.getInstance().postAccount(t,n)}))},exports.usePostAllowlistMultiAccount=function(e){return Nd(["query-post-get-allowlist-multi-account",JSON.stringify(e)],(function(){return Rp.getInstance().postGetAllowlist({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})},exports.usePostApiKeysRoll=function(){return Md((function(e){var t=e.payload,n=e.code,o=e.password;return Rp.getInstance().postApiKeysRoll(t,n,o).then((function(e){return e.data})).catch((function(e){return e}))}))},exports.usePostApiLogs=function(e){return Nd(["api-logs",e],(function(){return Rp.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 Md((function(e){var t=e.payload;return Rp.getInstance().postAuditMonitors(t)}),{onMutate:e.onMutate})},exports.usePostBatchRefundByFile=function(){var t=this;return Md((function(n){return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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 Md(["post-blacklist-batch"],(function(e){var n=e.blacklist_code,o=e.expiration_days,r=e.file;return Rp.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:o,file:r,handleSetProgress:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.usePostBlackListItems=function(){return Md(["post-blacklist-items"],(function(e){var t=e.payload;return Rp.getInstance().postBlackListItems({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.usePostBlackListMultiAccount=function(){return Md(["post-blacklist-multi-account"],(function(e){var t=e.payload;return Rp.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,o){var r;return Nd(["post-black-list",e],(function(){return Rp.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=o?o:25).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:(null===(r=e[0])||void 0===r?void 0:r.length)>0&&null!==t,useErrorBoundary:!1})},exports.usePostCall=function(){return Md((function(e){return Rp.getInstance().postCall(e)}))},exports.usePostChangeStatusConnection=function(){return Md(["post-change-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Rp.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.usePostConnectionMultiAccount=function(){return Md(["post-connection"],(function(e){var t=e.payload;return Rp.getInstance().postMultiConnection({payload:t}).then((function(e){return null==e?void 0:e.data}))}))},exports.usePostCreateAllowlistMultiAccount=function(){return Md(["post-create-allowlist-multi-account"],(function(e){var t=e.payload;return Rp.getInstance().postCreateAllowlistMultiAccount({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePostCreateCustomizedApiKeys=function(){return Md((function(e){var t=e.payload;return Rp.getInstance().postCreateCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePostCreateInsightsReport=function(){return Md((function(e){var t=e.payload;return Rp.getInstance().postCreateInsightsReport(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePostCreateRuleMultiAccount=function(){return Md((function(e){var t=e.payload,n=e.accountCode;return Rp.getInstance().postCreateRuleMultiAccount(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePostCredentialsValidatePassword=function(){return Md((function(e){var t=e.passwordOtp;return Rp.getInstance().getDeveloperCredentialsValidatePassword(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))},exports.usePostCredentialsValidatePasswordRegularUser=function(){return Md((function(e){var t=e.password;return Rp.getInstance().getDeveloperCredentialsValidatePasswordRegularUser(t).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))},exports.usePostDefaultRoutes=function(){return Md((function(e){var t=e.payload;return Rp.getInstance().postDefaultRoutes({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))},exports.usePostEditRule=function(){return Md((function(e){var t=e.payload,n=e.ruleId,o=e.accountCode;return Rp.getInstance().postEditRule(t,n,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.usePostFraudTransactions=function(t){var n=this;return Nd(["POST/fraud-transactions",JSON.stringify(t)],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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 Md(["post-get-allowlist-items"],(function(e){var t=e.payload;return Rp.getInstance().postAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePostGetAllowlistMultiAccount=function(){return Md(["post-get-allowlist-multi-account"],(function(e){var t=e.payload;return Rp.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,o=e.search,r=e.status,a=e.roleId,i=e.statuses,s=e.roleIds,u=e.page,c=e.pageSize,l=Vd();return Nd(["fetch-post-members-v2",t,n,o,r,a,i,s,u,c],(function(){return Rp.getInstance().postMembersPaginatedV2({organizationCode:l,accountCodes:n,search:o,status:r,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 Md((function(n){var o=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().postNetworkTokensOnboarding(o)];case 1:return[2,e.sent().data]}}))}))}),{useErrorBoundary:!1})},exports.usePostPaymentsEvaluated=function(e){return Nd(["fetch-payments-evaluated",e],(function(){return Rp.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 Nd(["fetch-payments-lazy",t],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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 Md((function(e){var t=e.payload;return Rp.getInstance().postSlackMessageChannel(t).then((function(e){return null==e?void 0:e.data}))}))},exports.usePostTransactions=function(t){var n=this;return Nd(["POST/transactions",JSON.stringify(t)],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().postTransactions(t).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!t,cacheTime:0,useErrorBoundary:!1})},exports.usePostUserSettings=function(){return Md((function(e){var t=e.payload;return Rp.getInstance().postUserSettings(t)}),{onMutate:function(e){return e}})},exports.usePostUserSettingsPinned=function(e){return Md(["pinned-sections"],(function(e){var t=e.payload;return Rp.getInstance().postUserSettingsPinned(t)}),{onMutate:function(t){var n=t.payload;return e({payload:n})}})},exports.usePostUserSettingsTables=function(){return Md((function(e){var t=e.payload,n=e.section;return Rp.getInstance().postUserSettingsTables(t,n)}),{onMutate:function(e){return e},onSuccess:function(t){var n=Fd.getQueryData(["fetch-profile"]);t.data&&Fd.setQueryData(["fetch-profile"],e.__assign(e.__assign({},n),{settings:t.data}))}})},exports.usePostUserThemeSettings=function(){return Md((function(e){return Rp.getInstance().postUserThemeSettings(e)}))},exports.usePostValideStatusConnection=function(){return Md(["post-validate-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Rp.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 Nd(["velocity-rules",e],(function(){var t=Rp.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 Nd(["webhook-logs",t],(function(){return Rp.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 Md((function(e){var t=e.payload;return Rp.getInstance().postWebhookV2MultiAccount({payload:t})}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useProviderConversionRatesData=function(){return Nd(["smart-routing-conversion-rates"],(function(){return Rp.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 Md((function(e){var t=e.transactionCode,n=e.payload;return Rp.getInstance().postProviderRawResponse(t,n)}))},exports.usePublishVersion=function(t,n){var o=this,r=t.versionCode,a=t.accountCode,i=t.organizationCode;return void 0===n&&(n=null),Md((function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().postSmartRoutingPublishVersion(a,r,i).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}),n)},exports.usePutAccountPrincipal=function(){return Md((function(e){var t=e.account_code;return Rp.getInstance().putAccountPrincipal({account_code:t})}))},exports.usePutAccountsUserMassive=function(){return Md((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Rp.getInstance().putAccountsUserMassive(t,n,o)}))},exports.usePutBlackListType=function(){return Md(["put-blacklist"],(function(e){return Rp.getInstance().putBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.usePutCosts=function(){return Md((function(e){return Rp.getInstance().putCosts(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})},exports.useRecoveredPaymentsByDay=function(t,n){return Nd(e.__assign({queryKey:["smart-recovery-recovered-payments-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,o,r;return e.__generator(this,(function(e){switch(e.label){case 0:return n=Rp.getInstance(),o={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",o)];case 1:return r=e.sent(),[2,Zd(r.data,o.start_date,o.end_date)]}}))}))},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useRecoveredTPVByDay=function(t,n){return Nd(e.__assign({queryKey:["smart-recovery-recovered-tpv-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,o,r;return e.__generator(this,(function(e){switch(e.label){case 0:return n=Rp.getInstance(),o={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",o)];case 1:return r=e.sent(),[2,Yd(r.data,o.start_date,o.end_date)]}}))}))},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useRescheduleSubscription=function(){return Md(["post-reschedule-subscription"],(function(e){var t=e.subscriptionCode;return Rp.getInstance().postRescheduleSubscription(t).then((function(e){return null==e?void 0:e.data}))}))},exports.useResendWebhooks=function(){return Md((function(e){var t=e.codes;return Rp.getInstance().postResendWebhooks({codes:t}).then((function(e){return null==e?void 0:e.data}))}))},exports.useResumeSubscription=function(){return Md(["post-resume-subscription"],(function(e){var t=e.subscriptionCode;return Rp.getInstance().postResumeSubscription(t).then((function(e){return null==e?void 0:e.data}))}))},exports.useRetryDuplicateAccount=function(){return Md((function(e){return Rp.getInstance().retryDuplicateAccount(e)}))},exports.useSaveVersion=function(e,t){var n=e.data,o=e.accountCode;return void 0===t&&(t=null),Md((function(){return Rp.getInstance().putSmartRoutingUpdateWorkflow(o,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),t)},exports.useSearchScheduleById=function(t,n,o){var r=this;return Nd(["POST/template-reporting/schedule-by-id/search",t,n],(function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().searchReportScheduleById(t,n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:o&&!!t,useErrorBoundary:!1,cacheTime:0})},exports.useSearchSchedules=function(t,n){var o=this;return Nd(["POST/template-reporting/schedules/search",t],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().searchReportSchedules(t).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:n,useErrorBoundary:!1,cacheTime:0})},exports.useSearchTemplateById=function(t,n,o){var r=this;return Nd(["POST/template-reporting/template-by-id/search",t,n],(function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().searchReportTemplateById(t,n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:o&&!!t,useErrorBoundary:!1,cacheTime:0})},exports.useSearchTemplates=function(t,n){var o=this;return Nd(["POST/template-reporting/templates/search",t],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().searchReportTemplates(t).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:n,useErrorBoundary:!1,cacheTime:0})},exports.useSendPaymentNotification=function(t,n,o){var r=this,a=Rp.getInstance();return Nd(["send-payment-notification",t,n],(function(){return e.__awaiter(r,void 0,void 0,(function(){var r,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 r=e.sent(),o.onSuccess(),[2,r.data];case 2:throw i=e.sent(),o.onError(),i;case 3:return[2]}}))}))}),{enabled:o.enabled,cacheTime:0,useErrorBoundary:!1})},exports.useSetCustodian=function(){return Md((function(){return Rp.getInstance().setCustodian().then((function(e){return null==e?void 0:e.data}))}))},exports.useSmartRoutingCreateDeclinedGroup=function(e){var t=e.accountCode;return Md((function(e){return void 0===e&&(e=null),Rp.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,o=e.name,r=e.accountCode;return void 0===t&&(t=null),Md((function(){return Rp.getInstance().putSmartRoutingUpdateWorkflowName(r,{code:n,name:o}).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useSmartRoutingMultiAccountDeclinedGroupCreate=function(t,n){return void 0===n&&(n={}),Md((function(e){var n=e.payload;return Rp.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={}),Md((function(e){var n=e.declinedGroupCode;return Rp.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,o=e.workflowVersionCode;return void 0===t&&(t=null),Md((function(e){return Rp.getInstance().simulateSmartRoutingTransaction(n,o,e).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useSmartRoutingToggleFavorite=function(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Md((function(e){return void 0===e&&(e=!1),Rp.getInstance().updateSmartRoutingFavorite(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useSmartRoutingUpdateDeclinedGroup=function(e,t){var n=e.declinedId,o=e.accountCode;return void 0===t&&(t=null),Md((function(e){return void 0===e&&(e=null),Rp.getInstance().updateSmartRoutingDeclinedGroup(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useSmartRoutingUpdateMonitorRedistribution=function(e,t){return void 0===t&&(t=null),Md((function(t){return Rp.getInstance().updateMonitorRedistribution(e,t).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useToggleMethod=function(e,t){var n=e.paymentMethod,o=e.active,r=e.accountCode;return void 0===t&&(t=null),Md((function(){return Rp.getInstance().putSmartRoutingToggleMethod(r,n,o).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useUnInviteUsersV2=function(){return Md((function(e){var t=e.userCode,n=e.organizationCode;return Rp.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})}))},exports.useUnrollUserV2=function(){return Md((function(e){return Rp.getInstance().unrollMfa(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateCheckoutTemplate=function(){return Md((function(e){var t=e.accountCode,n=e.template;return Rp.getInstance().updateCheckoutTemplate({accountCode:t,template:n}).then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateIsActiveCheckout=function(e){return Md((function(e){return Rp.getInstance().updateIsActiveCheckout(e)}),e)},exports.useUpdateMFAConfig=function(){return Md((function(e){var t=e.payload,n=e.organizationCode;return Rp.getInstance().updateMFAConfig(t,n)}))},exports.useUpdateOrganizationStatus=function(){return Md(["patch-organizations"],(function(){return Rp.getInstance().updateOrganizationStatus().then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateProfile=function(e){return Md((function(e){return Rp.getInstance().updateProfile(e)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useUpdateReconciliationAlert=function(){return Md(["UPDATE/reconciliation/alerts"],(function(e){return Rp.getInstance().updateReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){Fd.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useUpdateReconciliationReportTemplate=function(e){return Md((function(){return Rp.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 Md((function(){return Rp.getInstance().updateReportTemplate(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateSamlConfig=function(){return Md((function(e){return Rp.getInstance().updateSamlConfig(e)}))},exports.useUpdateScheduledReport=function(){return Md((function(e){var t=e.reportCode,n=e.payload;return Rp.getInstance().updateScheduledReport(t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useUpdateStylingTheme=function(){return Md((function(e){var t=e.accountCode,n=e.theme;return Rp.getInstance().updateStylingTheme({accountCode:t,theme:n}).then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateSubscription=function(){return Md(["patch-subscription"],(function(e){var t=e.subscriptionCode,n=e.payload;return Rp.getInstance().patchSubscription(t,n).then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateTemplateSelection=function(){var t=this;return Md(["PATCH/template-reporting/report-templates/selection"],(function(n){var o=n.templateId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().updateTemplateSelection(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useUpdateWebhookV2=function(e){return Md((function(e){var t=e.code,n=e.payload,o=e.accountCode;return Rp.getInstance().updateWebhookV2(t,n,o)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useUploadBatchRefundsFileV2=function(e){var n=e.fileName,o=e.onSuccess,r=e.onError,a=t.useState(0),i=a[0],s=a[1],u=t.useRef({cancel:function(){return null}}),c=Md(["upload-file-chargeback",n],(function(e){var t=Rp.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:s}),n=t.promise,a=t.cancel;return u.current.cancel=a,n.then((function(e){return null==o||o(null==e?void 0:e.data),null==e?void 0:e.data})).catch((function(e){throw null==r||r(),e}))}),{useErrorBoundary:!1});return{mutation:c,cancelRequest:u.current.cancel,progress:i}},exports.useUploadBatchRefundsV2=function(){return Md((function(e){return Rp.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=Md(["upload-file"],(function(t){var n=Rp.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),o=n.promise,r=n.cancel;return e.current.cancel=r,o.then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}));return{mutation:n,cancelRequest:e.current.cancel}},exports.useValiateAllowlistItems=function(){return Md(["validate-allowlist-items"],(function(e){return Rp.getInstance().validateAllowlistItems({payload:e}).then((function(e){return e.data})).catch((function(e){return e}))}))},exports.useValidateBlockListItems=function(){return Md(["valiate-blacklist-items"],(function(e){return Rp.getInstance().valiateBlockListItems({payload:e}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useValidateCredentials=function(){return Md((function(e){return Rp.getInstance().postValidateCredentials(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))},exports.useValidateOrgName=function(){return Md((function(e){return Rp.getInstance().getOrgByName(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useValidatePasswordStatus=function(){return Md((function(){return Rp.getInstance().validatePasswordStatus().then((function(e){return null==e?void 0:e.data})).catch((function(e){return{valid:!1}}))}))},exports.useViewMoreMetrics=function(e,t){return Nd(["get-insights-conversion-rate-view-more-metrics",t,e],(function(){return Rp.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})};
233
+ const rh=7,ah=6,ih=5,sh=4,uh=3,ch=2,lh=1,ph=0;function dh(e,t,n){var o;if((n=n||{}).threshold=null!=(o=n.threshold)?o:lh,!n.accessors){const o=hh(e,t,n);return{rankedValue:e,rank:o,accessorIndex:-1,accessorThreshold:n.threshold,passed:o>=n.threshold}}const r=function(e,t){const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],a=yh(r),i=fh(e,r);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:ph,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let e=0;e<r.length;e++){const o=r[e];let i=hh(o.itemValue,t,n);const{minRanking:s,maxRanking:u,threshold:c=n.threshold}=o.attributes;i<s&&i>=lh?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=o.itemValue)}return a}function hh(e,t,n){return e=mh(e,n),(t=mh(t,n)).length>e.length?ph:e===t?rh:(e=e.toLowerCase())===(t=t.toLowerCase())?ah:e.startsWith(t)?ih:e.includes(` ${t}`)?sh:e.includes(t)?uh:1===t.length?ph:function(e){let t="";return e.split(" ").forEach((e=>{e.split("-").forEach((e=>{t+=e.substr(0,1)}))})),t}(e).includes(t)?ch:function(e,t){let n=0,o=0;function r(e,t,o){for(let r=o,a=t.length;r<a;r++){if(t[r]===e)return n+=1,r+1}return-1}function a(e){const o=1/e,r=n/t.length;return lh+r*o}const i=r(t[0],e,0);if(i<0)return ph;o=i;for(let n=1,a=t.length;n<a;n++){o=r(t[n],e,o);if(!(o>-1))return ph}const s=o-i;return a(s)}(e,t)}function mh(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=e.replace(oh,(e=>th[e]))),e}function fh(e,t){let n=t;"object"==typeof t&&(n=t.accessor);const o=n(e);return null==o?[]:Array.isArray(o)?o:[String(o)]}const gh={maxRanking:1/0,minRanking:-1/0};function yh(e){return"function"==typeof e?gh:{...gh,...e}}function bh(e,t){const[n,r]=o.useState();o.useEffect((()=>{const n=(e=>{try{const t=localStorage.getItem(e);return"string"==typeof t?JSON.parse(t):void 0}catch{return}})(e);r(null==n?"function"==typeof t?t():t:n)}),[t,e]);return[n,o.useCallback((t=>{r((n=>{let o=t;"function"==typeof t&&(o=t(n));try{localStorage.setItem(e,JSON.stringify(o))}catch{}return o}))}),[e])]}var kh,vh=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}(),wh=function(){function e(e){this.generateIdentifier=e,this.kv=new vh}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}(),jh=(kh=function(e,t){return kh=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])},kh(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}kh(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),_h=function(e){function t(){var t=e.call(this,(function(e){return e.name}))||this;return t.classToAllowedProps=new Map,t}return jh(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}(wh),Eh=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i};function Ch(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 o=n,r=0;r<o.length;r++){var a=o[r];if(t(a))return a}}function Sh(e,t){Object.entries(e).forEach((function(e){var n=Eh(e,2),o=n[0],r=n[1];return t(r,o)}))}function xh(e,t){return-1!==e.indexOf(t)}function Rh(e,t){for(var n=0;n<e.length;n++){var o=e[n];if(t(o))return o}}var Th=function(){function e(){this.transfomers={}}return e.prototype.register=function(e){this.transfomers[e.name]=e},e.prototype.findApplicable=function(e){return Ch(this.transfomers,(function(t){return t.isApplicable(e)}))},e.prototype.findByName=function(e){return this.transfomers[e]},e}(),Ih=function(e){return void 0===e},Ah=function(e){return"object"==typeof e&&null!==e&&(e!==Object.prototype&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype))},Oh=function(e){return Ah(e)&&0===Object.keys(e).length},Ph=function(e){return Array.isArray(e)},zh=function(e){return e instanceof Map},Dh=function(e){return e instanceof Set},Lh=function(e){return"Symbol"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)},Nh=function(e){return"number"==typeof e&&isNaN(e)},Mh=function(e){return function(e){return"boolean"==typeof e}(e)||function(e){return null===e}(e)||Ih(e)||function(e){return"number"==typeof e&&!isNaN(e)}(e)||function(e){return"string"==typeof e}(e)||Lh(e)},qh=function(e){return e.replace(/\./g,"\\.")},Uh=function(e){return e.map(String).map(qh).join(".")},Bh=function(e){for(var t=[],n="",o=0;o<e.length;o++){var r=e.charAt(o);if("\\"===r&&"."===e.charAt(o+1))n+=".",o++;else"."===r?(t.push(n),n=""):n+=r}var a=n;return t.push(a),t},Fh=function(){return Fh=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Fh.apply(this,arguments)},Gh=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},Vh=function(e,t){for(var n=0,o=t.length,r=e.length;n<o;n++,r++)e[r]=t[n];return e};function Wh(e,t,n,o){return{isApplicable:e,annotation:t,transform:n,untransform:o}}var Hh=[Wh(Ih,"undefined",(function(){return null}),(function(){})),Wh((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)})),Wh((function(e){return e instanceof Date&&!isNaN(e.valueOf())}),"Date",(function(e){return e.toISOString()}),(function(e){return new Date(e)})),Wh((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})),Wh((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)})),Wh(Dh,"set",(function(e){return Vh([],Gh(e.values()))}),(function(e){return new Set(e)})),Wh(zh,"map",(function(e){return Vh([],Gh(e.entries()))}),(function(e){return new Map(e)})),Wh((function(e){return Nh(e)||((t=e)===1/0||t===-1/0);var t}),"number",(function(e){return Nh(e)?"NaN":e>0?"Infinity":"-Infinity"}),Number),Wh((function(e){return 0===e&&1/e==-1/0}),"number",(function(){return"-0"}),Number),Wh((function(e){return e instanceof URL}),"URL",(function(e){return e.toString()}),(function(e){return new URL(e)}))];function Kh(e,t,n,o){return{isApplicable:e,annotation:t,transform:n,untransform:o}}var $h=Kh((function(e,t){return!!Lh(e)&&!!t.symbolRegistry.getIdentifier(e)}),(function(e,t){return["symbol",t.symbolRegistry.getIdentifier(e)]}),(function(e){return e.description}),(function(e,t,n){var o=n.symbolRegistry.getValue(t[1]);if(!o)throw new Error("Trying to deserialize unknown symbol");return o})),Qh=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((function(e,t){return e[t.name]=t,e}),{}),Jh=Kh((function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}),(function(e){return["typed-array",e.constructor.name]}),(function(e){return Vh([],Gh(e))}),(function(e,t){var n=Qh[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)}));function Xh(e,t){return!!(null==e?void 0:e.constructor)&&!!t.classRegistry.getIdentifier(e.constructor)}var Yh=Kh(Xh,(function(e,t){return["class",t.classRegistry.getIdentifier(e.constructor)]}),(function(e,t){var n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return Fh({},e);var o={};return n.forEach((function(t){o[t]=e[t]})),o}),(function(e,t,n){var o=n.classRegistry.getValue(t[1]);if(!o)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(o.prototype),e)})),Zh=Kh((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 o=n.customTransformerRegistry.findByName(t[1]);if(!o)throw new Error("Trying to deserialize unknown custom value");return o.deserialize(e)})),em=[Yh,$h,Zh,Jh],tm=function(e,t){var n=Rh(em,(function(n){return n.isApplicable(e,t)}));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};var o=Rh(Hh,(function(n){return n.isApplicable(e,t)}));return o?{value:o.transform(e,t),type:o.annotation}:void 0},nm={};Hh.forEach((function(e){nm[e.annotation]=e}));var om=function(e,t){for(var n=e.keys();t>0;)n.next(),t--;return n.next().value};function rm(e){if(xh(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(xh(e,"prototype"))throw new Error("prototype is not allowed as a property");if(xh(e,"constructor"))throw new Error("constructor is not allowed as a property")}var am=function(e,t,n){if(rm(t),0===t.length)return n(e);for(var o=e,r=0;r<t.length-1;r++){var a=t[r];if(Ph(o))o=o[+a];else if(Ah(o))o=o[a];else if(Dh(o)){o=om(o,i=+a)}else if(zh(o)){if(r===t.length-2)break;var i=+a,s=0==+t[++r]?"key":"value",u=om(o,i);switch(s){case"key":o=u;break;case"value":o=o.get(u)}}}var c=t[t.length-1];if(Ph(o)?o[+c]=n(o[+c]):Ah(o)&&(o[c]=n(o[c])),Dh(o)){var l=om(o,+c),p=n(l);l!==p&&(o.delete(l),o.add(p))}if(zh(o)){i=+t[t.length-2];var d=om(o,i);switch(s=0==+c?"key":"value"){case"key":var h=n(d);o.set(h,o.get(d)),h!==d&&o.delete(d);break;case"value":o.set(d,n(o.get(d)))}}return e},im=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},sm=function(e,t){for(var n=0,o=t.length,r=e.length;n<o;n++,r++)e[r]=t[n];return e};function um(e,t,n){if(void 0===n&&(n=[]),e)if(Ph(e)){var o=im(e,2),r=o[0],a=o[1];a&&Sh(a,(function(e,o){um(e,t,sm(sm([],im(n)),im(Bh(o))))})),t(r,n)}else Sh(e,(function(e,o){return um(e,t,sm(sm([],im(n)),im(Bh(o))))}))}function cm(e,t,n){return um(t,(function(t,o){e=am(e,o,(function(e){return function(e,t,n){if(!Ph(t)){var o=nm[t];if(!o)throw new Error("Unknown transformation: "+t);return o.untransform(e,n)}switch(t[0]){case"symbol":return $h.untransform(e,t,n);case"class":return Yh.untransform(e,t,n);case"custom":return Zh.untransform(e,t,n);case"typed-array":return Jh.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}}(e,t,n)}))})),e}function lm(e,t){function n(t,n){var o=function(e,t){rm(t);for(var n=0;n<t.length;n++){var o=t[n];if(Dh(e))e=om(e,+o);else if(zh(e)){var r=+o,a=0==+t[++n]?"key":"value",i=om(e,r);switch(a){case"key":e=i;break;case"value":e=e.get(i)}}else e=e[o]}return e}(e,Bh(n));t.map(Bh).forEach((function(t){e=am(e,t,(function(){return o}))}))}if(Ph(t)){var o=im(t,2),r=o[0],a=o[1];r.forEach((function(t){e=am(e,Bh(t),(function(){return e}))})),a&&Sh(a,n)}else Sh(t,n);return e}var pm=function(e,t,n,o,r,a,i){var s;void 0===r&&(r=[]),void 0===a&&(a=[]),void 0===i&&(i=new Map);var u=Mh(e);if(!u){!function(e,t,n){var o=n.get(e);o?o.push(t):n.set(e,[t])}(e,r,t);var c=i.get(e);if(c)return o?{transformedValue:null}:c}if(!function(e,t){return Ah(e)||Ph(e)||zh(e)||Dh(e)||Xh(e,t)}(e,n)){var l=tm(e,n),p=l?{transformedValue:l.value,annotations:[l.type]}:{transformedValue:e};return u||i.set(e,p),p}if(xh(a,e))return{transformedValue:null};var d=tm(e,n),h=null!==(s=null==d?void 0:d.value)&&void 0!==s?s:e,m=Ph(h)?[]:{},f={};Sh(h,(function(s,u){var c=pm(s,t,n,o,sm(sm([],im(r)),[u]),sm(sm([],im(a)),[e]),i);m[u]=c.transformedValue,Ph(c.annotations)?f[u]=c.annotations:Ah(c.annotations)&&Sh(c.annotations,(function(e,t){f[qh(u)+"."+t]=e}))}));var g=Oh(f)?{transformedValue:m,annotations:d?[d.type]:void 0}:{transformedValue:m,annotations:d?[d.type,f]:f};return u||i.set(e,g),g};function dm(e){return Object.prototype.toString.call(e).slice(8,-1)}function hm(e){return"Array"===dm(e)}function mm(e,t={}){if(hm(e))return e.map((e=>mm(e,t)));if(!function(e){if("Object"!==dm(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,o)=>{if(hm(t.props)&&!t.props.includes(o))return n;return function(e,t,n,o,r){const a={}.propertyIsEnumerable.call(o,t)?"enumerable":"nonenumerable";"enumerable"===a&&(e[t]=n),r&&"nonenumerable"===a&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}(n,o,mm(e[o],t),e,t.nonenumerable),n}),{})}var fm=function(){return fm=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},fm.apply(this,arguments)},gm=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},ym=function(e,t){for(var n=0,o=t.length,r=e.length;n<o;n++,r++)e[r]=t[n];return e},bm=function(){function e(e){var t=(void 0===e?{}:e).dedupe,n=void 0!==t&&t;this.classRegistry=new _h,this.symbolRegistry=new wh((function(e){var t;return null!==(t=e.description)&&void 0!==t?t:""})),this.customTransformerRegistry=new Th,this.allowedErrorProps=[],this.dedupe=n}return e.prototype.serialize=function(e){var t=new Map,n=pm(e,t,this,this.dedupe),o={json:n.transformedValue};n.annotations&&(o.meta=fm(fm({},o.meta),{values:n.annotations}));var r,a,i,s,u=(r=t,a=this.dedupe,i={},s=void 0,r.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=im(e),n=t[0],o=t.slice(1);0===n.length?s=o.map(Uh):i[Uh(n)]=o.map(Uh)}})),s?Oh(i)?[s]:[s,i]:Oh(i)?void 0:i);return u&&(o.meta=fm(fm({},o.meta),{referentialEqualities:u})),o},e.prototype.deserialize=function(e){var t=e.json,n=e.meta,o=mm(t);return(null==n?void 0:n.values)&&(o=cm(o,n.values,this)),(null==n?void 0:n.referentialEqualities)&&(o=lm(o,n.referentialEqualities)),o},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(fm({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,ym([],gm(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 km={background:"#0b1521",backgroundAlt:"#132337",foreground:"white",gray:"#3f4e60",grayAlt:"#222e3e",inputBackgroundColor:"#fff",inputTextColor:"#000",success:"#00ab52",danger:"#ff0085",active:"#006bff",paused:"#8c49eb",warning:"#ffb200"},vm=o.createContext(km);function wm({theme:e,...t}){return o.createElement(vm.Provider,eh({value:e},t))}function jm({queryState:e,observerCount:t,isStale:n,theme:o}){return"fetching"===e.fetchStatus?o.active:t?"paused"===e.fetchStatus?o.paused:n?o.warning:o.success:o.gray}function _m(e){return"fetching"===e.state.fetchStatus?"fetching":e.getObserversCount()?"paused"===e.state.fetchStatus?"paused":e.isStale()?"stale":"fresh":"inactive"}function Em(e,t,n={}){return o.forwardRef((({style:r,...a},i)=>{const s=o.useContext(vm),u=Object.entries(n).reduce(((e,[t,n])=>function(e){const[t,n]=o.useState((()=>{if("undefined"!=typeof window)return window.matchMedia(e).matches}));return o.useEffect((()=>{if("undefined"!=typeof window){const t=window.matchMedia(e),o=({matches:e})=>n(e);return t.addListener(o),()=>{t.removeListener(o)}}}),[t,e,n]),t}(t)?{...e,..."function"==typeof n?n(a,s):n}:e),{});return o.createElement(e,{...a,style:{..."function"==typeof t?t(a,s):t,...r,...u},ref:i})}))}const Cm=(e,t=!1)=>{const{json:n}=bm.serialize(e);return JSON.stringify(n,null,t?2:void 0)},Sm=e=>"idle"!==e.state.fetchStatus?0:e.getObserversCount()?e.isStale()?2:1:3,xm=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,Rm={"Status > Last Updated":(e,t)=>Sm(e)===Sm(t)?xm(e,t):Sm(e)>Sm(t)?1:-1,"Query Hash":(e,t)=>e.queryHash.localeCompare(t.queryHash),"Last Updated":xm},Tm=500,Im={top:"bottom",bottom:"top",left:"right",right:"left"};function Am(e){return["left","right"].includes(e)}function Om(e){return Im[e]}function Pm(e,t){return""+e+(t.charAt(0).toUpperCase()+t.slice(1))}function zm(e="bottom"){const t=Am(e),n=Om(e),o=Pm("margin",n);return{position:"absolute",cursor:t?"col-resize":"row-resize",zIndex:1e5,[n]:0,[o]:"-4px",...t?{top:0,height:"100%",width:"4px"}:{width:"100%",height:"4px"}}}const Dm=Em("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"}}),Lm=Em("div",(()=>({flex:"1 1 500px",display:"flex",flexDirection:"column",overflow:"auto",height:"100%"})),{"(max-width: 700px)":(e,t)=>({borderTop:"2px solid "+t.gray})}),Nm=Em("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"}))),Mm=Em("span",{display:"flex",flexWrap:"wrap",gap:"0.5em",fontSize:"0.9em"}),qm=Em("span",{display:"inline-flex",alignItems:"center",padding:".2em .4em",fontWeight:"bold",textShadow:"0 0 10px black",borderRadius:".2em"}),Um=Em("code",{fontSize:".9em",color:"inherit",background:"inherit"}),Bm=Em("input",((e,t)=>({backgroundColor:t.inputBackgroundColor,border:0,borderRadius:".2em",color:t.inputTextColor,fontSize:".9em",lineHeight:"1.3",padding:".3em .4em"}))),Fm=Em("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 Gm({text:e}){return o.createElement("span",{style:{position:"absolute",width:"0.1px",height:"0.1px",overflow:"hidden"}},e)}const Vm=Em("div",{fontFamily:"Menlo, monospace",fontSize:"1em",lineHeight:"1.7",outline:"none",wordBreak:"break-word"}),Wm=Em("span",{color:"white"}),Hm=Em("button",{cursor:"pointer",color:"white"}),Km=Em("button",{cursor:"pointer",color:"inherit",font:"inherit",outline:"inherit",background:"transparent",border:"none",padding:0}),$m=({value:e})=>{const[t,n]=o.useState("NoCopy");return o.createElement("button",{onClick:"NoCopy"===t?()=>{navigator.clipboard.writeText(bm.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?o.createElement(Zm,null):"SuccessCopy"===t?o.createElement(tf,null):o.createElement(ef,null))},Qm=Em("span",((e,t)=>({color:t.danger}))),Jm=Em("div",{marginLeft:".1em",paddingLeft:"1em",borderLeft:"2px solid rgba(0,0,0,.15)"}),Xm=Em("span",{color:"grey",fontSize:".7em"}),Ym=({expanded:e,style:t={}})=>o.createElement("span",{style:{display:"inline-block",transition:"all .1s ease",transform:"rotate("+(e?90:0)+"deg) "+(t.transform||""),...t}},"▶"),Zm=()=>o.createElement("span",{"aria-label":"Copy object to clipboard",title:"Copy object to clipboard",style:{paddingLeft:"1em"}},o.createElement("svg",{height:"12",viewBox:"0 0 16 12",width:"10"},o.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"}),o.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"}))),ef=()=>o.createElement("span",{"aria-label":"Failed copying to clipboard",title:"Failed copying to clipboard",style:{paddingLeft:"1em",display:"flex",alignItems:"center"}},o.createElement("svg",{height:"12",viewBox:"0 0 16 12",width:"10",display:"block"},o.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"})),o.createElement("span",{style:{color:"red",fontSize:"12px",paddingLeft:"4px",position:"relative",top:"2px"}},"See console")),tf=()=>o.createElement("span",{"aria-label":"Object copied to clipboard",title:"Object copied to clipboard",style:{paddingLeft:"1em",display:"inline-block",verticalAlign:"middle"}},o.createElement("svg",{height:"16",viewBox:"0 0 16 16",width:"16",display:"block"},o.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 nf=({handleEntry:e,label:t,value:n,subEntries:r=[],subEntryPages:a=[],type:i,expanded:s=!1,copyable:u=!1,toggleExpanded:c,pageSize:l})=>{const[p,d]=o.useState([]);return o.createElement(Vm,{key:t},a.length?o.createElement(o.Fragment,null,o.createElement(Km,{onClick:()=>c()},o.createElement(Ym,{expanded:s})," ",t," ",o.createElement(Xm,null,"iterable"===String(i).toLowerCase()?"(Iterable) ":"",r.length," ",r.length>1?"items":"item")),u?o.createElement($m,{value:n}):null,s?1===a.length?o.createElement(Jm,null,r.map(e)):o.createElement(Jm,null,a.map(((t,n)=>o.createElement("div",{key:n},o.createElement(Vm,null,o.createElement(Hm,{onClick:()=>d((e=>e.includes(n)?e.filter((e=>e!==n)):[...e,n]))},o.createElement(Ym,{expanded:s})," [",n*l," ..."," ",n*l+l-1,"]"),p.includes(n)?o.createElement(Jm,null,t.map(e)):null))))):null):o.createElement(o.Fragment,null,o.createElement(Wm,null,t,":")," ",o.createElement(Qm,null,Cm(n))))};function of({value:e,defaultExpanded:t,renderer:n=nf,pageSize:r=100,copyable:a=!1,...i}){const[s,u]=o.useState(Boolean(t)),c=o.useCallback((()=>u((e=>!e))),[]);let l=typeof e,p=[];const d=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",p=e.map(((e,t)=>d({label:t.toString(),value:e})))):null!==e&&"object"==typeof e&&(h=e,Symbol.iterator in h)&&"function"==typeof e[Symbol.iterator]?(l="Iterable",p=Array.from(e,((e,t)=>d({label:t.toString(),value:e})))):"object"==typeof e&&null!==e&&(l="object",p=Object.entries(e).map((([e,t])=>d({label:e,value:t}))));const m=function(e,t){if(t<1)return[];let n=0;const o=[];for(;n<e.length;)o.push(e.slice(n,n+t)),n+=t;return o}(p,r);return n({handleEntry:t=>o.createElement(of,eh({key:t.label,value:e,renderer:n,copyable:a},i,t)),type:l,subEntries:p,subEntryPages:m,value:e,expanded:s,copyable:a,toggleExpanded:c,pageSize:r,...i})}function rf(e){return o.createElement("svg",eh({width:"40px",height:"40px",viewBox:"0 0 190 190",version:"1.1"},e),o.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o.createElement("g",{transform:"translate(-33.000000, 0.000000)"},o.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) "}),o.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"}),o.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 af=(e,t,n=!1)=>Sd.useSyncExternalStore(o.useCallback((t=>n?()=>{}:e.subscribe(id.batchCalls(t))),[e,n]),t,t),sf=o.forwardRef((function(e,t){const{isOpen:n=!0,styleNonce:r,setIsOpen:a,context:i,onDragStart:s,onPositionChange:u,showCloseButton:c,position:l,closeButtonProps:p={},errorTypes:d=[],...h}=e,{onClick:m,...f}=p,g=Ad({context:i}),y=g.getQueryCache(),[b,k]=bh("reactQueryDevtoolsSortFn",Object.keys(Rm)[0]),[v,w]=bh("reactQueryDevtoolsFilter",""),[j,_]=bh("reactQueryDevtoolsBaseSort",1),E=o.useMemo((()=>Rm[b]),[b]),C=af(y,(()=>y.getAll().length),!n),[S,x]=bh("reactQueryDevtoolsActiveQueryHash",""),R=o.useMemo((()=>{const e=y.getAll();if(0===C)return[];const t=v?e.filter((e=>dh(e.queryHash,v).passed)):[...e];return E?t.sort(((e,t)=>E(e,t)*j)):t}),[j,E,v,C,y]),[T,I]=o.useState(!1);return o.createElement(wm,{theme:km},o.createElement(Dm,eh({ref:t,className:"ReactQueryDevtoolsPanel","aria-label":"React Query Devtools Panel",id:"ReactQueryDevtoolsPanel"},h,{style:{height:Tm,position:"relative",...h.style}}),o.createElement("style",{nonce:r,dangerouslySetInnerHTML:{__html:"\n .ReactQueryDevtoolsPanel * {\n scrollbar-color: "+km.backgroundAlt+" "+km.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: "+km.backgroundAlt+";\n }\n\n .ReactQueryDevtoolsPanel *::-webkit-scrollbar-thumb, .ReactQueryDevtoolsPanel scrollbar-thumb {\n background: "+km.gray+";\n border-radius: .5em;\n border: 3px solid "+km.backgroundAlt+";\n }\n "}}),o.createElement("div",{style:zm(l),onMouseDown:s}),n&&o.createElement("div",{style:{flex:"1 1 500px",minHeight:"40%",maxHeight:"100%",overflow:"auto",borderRight:"1px solid "+km.grayAlt,display:"flex",flexDirection:"column"}},o.createElement("div",{style:{padding:".5em",background:km.backgroundAlt,display:"flex",justifyContent:"space-between",alignItems:"center"}},o.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"}},o.createElement(rf,{"aria-hidden":!0}),o.createElement(Gm,{text:"Close React Query Devtools"})),o.createElement("div",{style:{display:"flex",flexDirection:"column"}},o.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:".5em"}},o.createElement(cf,{queryCache:y}),l&&u?o.createElement(Fm,{"aria-label":"Panel position",value:l,style:{marginInlineStart:".5em"},onChange:e=>u(e.target.value)},o.createElement("option",{value:"left"},"Left"),o.createElement("option",{value:"right"},"Right"),o.createElement("option",{value:"top"},"Top"),o.createElement("option",{value:"bottom"},"Bottom")):null),o.createElement("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5em"}},o.createElement(Bm,{placeholder:"Filter","aria-label":"Filter by queryhash",value:null!=v?v:"",onChange:e=>w(e.target.value),onKeyDown:e=>{"Escape"===e.key&&w("")},style:{flex:"1",width:"100%"}}),o.createElement(Fm,{"aria-label":"Sort queries",value:b,onChange:e=>k(e.target.value),style:{flex:"1",minWidth:75,marginRight:".5em"}},Object.keys(Rm).map((e=>o.createElement("option",{key:e,value:e},"Sort by ",e)))),o.createElement(Nm,{type:"button",onClick:()=>_((e=>-1*e)),style:{padding:".3em .4em",marginRight:".5em"}},1===j?"⬆ Asc":"⬇ Desc"),o.createElement(Nm,{title:"Clear cache","aria-label":"Clear cache",type:"button",onClick:()=>y.clear(),style:{padding:".3em .4em",marginRight:".5em"}},"Clear"),o.createElement(Nm,{type:"button",onClick:()=>{T?(Zp.setOnline(void 0),I(!1),window.dispatchEvent(new Event("online"))):(Zp.setOnline(!1),I(!0))},"aria-label":T?"Restore offline mock":"Mock offline behavior",title:T?"Restore offline mock":"Mock offline behavior",style:{padding:"0",height:"2em"}},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2em",height:"2em",viewBox:"0 0 24 24",stroke:T?km.danger:"currentColor",fill:"none"},T?o.createElement(o.Fragment,null,o.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElement("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"}),o.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),o.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"}),o.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"}),o.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"})):o.createElement(o.Fragment,null,o.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElement("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"}),o.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),o.createElement("path",{d:"M6.343 12.343a8 8 0 0 1 11.314 0"}),o.createElement("path",{d:"M3.515 9.515c4.686 -4.687 12.284 -4.687 17 0"}))),o.createElement(Gm,{text:T?"Restore offline mock":"Mock offline behavior"}))))),o.createElement("div",{style:{overflowY:"auto",flex:"1"}},R.map((e=>o.createElement(lf,{queryKey:e.queryKey,activeQueryHash:S,setActiveQueryHash:x,key:e.queryHash,queryCache:y}))))),S&&n?o.createElement(uf,{activeQueryHash:S,queryCache:y,queryClient:g,errorTypes:d}):null,c?o.createElement(Nm,eh({type:"button","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"true"},f,{style:{position:"absolute",zIndex:99999,margin:".5em",bottom:0,left:0,...f.style},onClick:e=>{a(!1),null==m||m(e)}}),"Close"):null))})),uf=({queryCache:e,activeQueryHash:n,queryClient:r,errorTypes:a})=>{var i,s;const u=af(e,(()=>e.getAll().find((e=>e.queryHash===n)))),c=af(e,(()=>{var t;return null==(t=e.getAll().find((e=>e.queryHash===n)))?void 0:t.state})),l=null!=(i=af(e,(()=>{var t;return null==(t=e.getAll().find((e=>e.queryHash===n)))?void 0:t.isStale()})))&&i,p=null!=(s=af(e,(()=>{var t;return null==(t=e.getAll().find((e=>e.queryHash===n)))?void 0:t.getObserversCount()})))?s:0,d=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"),o=u.options;u.setState({status:"error",error:n,fetchMeta:{...u.state.fetchMeta,__previousQueryOptions:o}})};return o.createElement(Lm,null,o.createElement("div",{style:{padding:".5em",background:km.backgroundAlt,position:"sticky",top:0,zIndex:1}},"Query Details"),o.createElement("div",{style:{padding:".5em"}},o.createElement("div",{style:{marginBottom:".5em",display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},o.createElement(Um,{style:{lineHeight:"1.8em"}},o.createElement("pre",{style:{margin:0,padding:0,overflow:"auto"}},Cm(u.queryKey,!0))),o.createElement("span",{style:{padding:"0.3em .6em",borderRadius:"0.4em",fontWeight:"bold",textShadow:"0 2px 10px black",background:jm({queryState:c,isStale:l,observerCount:p,theme:km}),flexShrink:0}},_m(u))),o.createElement("div",{style:{marginBottom:".5em",display:"flex",alignItems:"center",justifyContent:"space-between"}},"Observers: ",o.createElement(Um,null,p)),o.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},"Last Updated:"," ",o.createElement(Um,null,new Date(c.dataUpdatedAt).toLocaleTimeString()))),o.createElement("div",{style:{background:km.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Actions"),o.createElement("div",{style:{padding:"0.5em",display:"flex",flexWrap:"wrap",gap:"0.5em",alignItems:"flex-end"}},o.createElement(Nm,{type:"button",onClick:()=>{const e=null==u?void 0:u.fetch();null==e||e.catch(pf)},disabled:"fetching"===c.fetchStatus,style:{background:km.active}},"Refetch")," ",o.createElement(Nm,{type:"button",onClick:()=>r.invalidateQueries(u),style:{background:km.warning,color:km.inputTextColor}},"Invalidate")," ",o.createElement(Nm,{type:"button",onClick:()=>r.resetQueries(u),style:{background:km.gray}},"Reset")," ",o.createElement(Nm,{type:"button",onClick:()=>r.removeQueries(u),style:{background:km.danger}},"Remove")," ",o.createElement(Nm,{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:km.paused}},"loading"===u.state.status?"Restore":"Trigger"," ","loading")," ",0===a.length||"error"===u.state.status?o.createElement(Nm,{type:"button",onClick:()=>{u.state.error?r.resetQueries(u):h()},style:{background:km.danger}},"error"===u.state.status?"Restore":"Trigger"," error"):o.createElement("label",null,"Trigger error:",o.createElement(Fm,{value:null!=d?d:"",style:{marginInlineStart:".5em"},onChange:e=>{const t=a.find((t=>t.name===e.target.value));h(t)}},o.createElement("option",{key:"",value:""}),a.map((e=>o.createElement("option",{key:e.name,value:e.name},e.name)))))),o.createElement("div",{style:{background:km.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Data Explorer"),o.createElement("div",{style:{padding:".5em"}},o.createElement(of,{label:"Data",value:c.data,defaultExpanded:{},copyable:!0})),o.createElement("div",{style:{background:km.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Query Explorer"),o.createElement("div",{style:{padding:".5em"}},o.createElement(of,{label:"Query",value:u,defaultExpanded:{queryKey:!0}})))},cf=({queryCache:e})=>{const t=af(e,(()=>e.getAll().filter((e=>"fresh"===_m(e))).length)),n=af(e,(()=>e.getAll().filter((e=>"fetching"===_m(e))).length)),r=af(e,(()=>e.getAll().filter((e=>"paused"===_m(e))).length)),a=af(e,(()=>e.getAll().filter((e=>"stale"===_m(e))).length)),i=af(e,(()=>e.getAll().filter((e=>"inactive"===_m(e))).length));return o.createElement(Mm,null,o.createElement(qm,{style:{background:km.success,opacity:t?1:.3}},"fresh ",o.createElement(Um,null,"(",t,")"))," ",o.createElement(qm,{style:{background:km.active,opacity:n?1:.3}},"fetching ",o.createElement(Um,null,"(",n,")"))," ",o.createElement(qm,{style:{background:km.paused,opacity:r?1:.3}},"paused ",o.createElement(Um,null,"(",r,")"))," ",o.createElement(qm,{style:{background:km.warning,color:"black",textShadow:"0",opacity:a?1:.3}},"stale ",o.createElement(Um,null,"(",a,")"))," ",o.createElement(qm,{style:{background:km.gray,opacity:i?1:.3}},"inactive ",o.createElement(Um,null,"(",i,")")))},lf=o.memo((({queryKey:e,setActiveQueryHash:t,activeQueryHash:n,queryCache:r})=>{var a,i,s,u;const c=null!=(a=af(r,(()=>{var t;return null==(t=r.find(e))?void 0:t.queryHash})))?a:"",l=af(r,(()=>{var t;return null==(t=r.find(e))?void 0:t.state})),p=null!=(i=af(r,(()=>{var t;return null==(t=r.find(e))?void 0:t.isStale()})))&&i,d=null!=(s=af(r,(()=>{var t;return null==(t=r.find(e))?void 0:t.isDisabled()})))&&s,h=null!=(u=af(r,(()=>{var t;return null==(t=r.find(e))?void 0:t.getObserversCount()})))?u:0;return l?o.createElement("div",{role:"button","aria-label":"Open query details for "+c,onClick:()=>t(n===c?"":c),style:{display:"flex",borderBottom:"solid 1px "+km.grayAlt,cursor:"pointer",background:c===n?"rgba(255,255,255,.1)":void 0}},o.createElement("div",{style:{flex:"0 0 auto",width:"2em",height:"2em",background:jm({queryState:l,isStale:p,observerCount:h,theme:km}),display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",textShadow:p?"0":"0 0 10px black",color:p?"black":"white"}},h),d?o.createElement("div",{style:{flex:"0 0 auto",height:"2em",background:km.gray,display:"flex",alignItems:"center",fontWeight:"bold",padding:"0 0.5em"}},"disabled"):null,o.createElement(Um,{style:{padding:".5em"}},""+c)):null}));function pf(){}lf.displayName="QueryRow";const df="development"!==process.env.NODE_ENV?function(){return null}:function({initialIsOpen:e,panelProps:t={},closeButtonProps:n={},toggleButtonProps:r={},position:a="bottom-left",containerElement:i="aside",context:s,styleNonce:u,panelPosition:c="bottom",errorTypes:l=[]}){const p=o.useRef(null),d=o.useRef(null),[h,m]=bh("reactQueryDevtoolsOpen",e),[f,g]=bh("reactQueryDevtoolsHeight",Tm),[y,b]=bh("reactQueryDevtoolsWidth",Tm),[k="bottom",v]=bh("reactQueryDevtoolsPanelPosition",c),[w,j]=o.useState(!1),[_,E]=o.useState(!1),C=function(){const e=o.useRef(!1),t=o.useCallback((()=>e.current),[]);return o.useEffect((()=>(e.current=!0,()=>{e.current=!1})),[]),t}();o.useEffect((()=>{j(null!=h&&h)}),[h,w,j]),o.useEffect((()=>{const e=d.current;if(e){const t=()=>{w&&(e.style.visibility="visible")},n=()=>{w||(e.style.visibility="hidden")};return e.addEventListener("transitionstart",t),e.addEventListener("transitionend",n),()=>{e.removeEventListener("transitionstart",t),e.removeEventListener("transitionend",n)}}}),[w]),o.useEffect((()=>{var e;if(w&&null!=(e=p.current)&&e.parentElement){const{parentElement:e}=p.current,t=Pm("padding",k),n=Am(k),o=(({padding:e,paddingTop:t,paddingBottom:n,paddingLeft:o,paddingRight:r})=>({padding:e,paddingTop:t,paddingBottom:n,paddingLeft:o,paddingRight:r}))(e.style),r=()=>{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:f)+"px"};if(r(),"undefined"!=typeof window)return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),Object.entries(o).forEach((([t,n])=>{e.style[t]=n}))}}}),[w,k,f,y]);const{style:S={},...x}=t,{style:R={},onClick:T,...I}=r,A=function({position:e="bottom",height:t,width:n,devtoolsTheme:o,isOpen:r,isResizing:a,panelStyle:i}){const s=Om(e),u=Pm("border",s),c=Am(e);return{...i,direction:"ltr",position:"fixed",[e]:0,[u]:"1px solid "+o.gray,transformOrigin:s,boxShadow:"0 0 20px rgba(0,0,0,.3)",zIndex:99999,visibility:r?"visible":"hidden",...a?{transition:"none"}:{transition:"all .2s ease"},...r?{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:Tm}:{left:0,width:"100%",maxHeight:"90%",height:"number"==typeof t&&t>=70?t:Tm}}}({position:k,devtoolsTheme:km,isOpen:w,height:f,width:y,isResizing:_,panelStyle:S});return C()?o.createElement(i,{ref:p,className:"ReactQueryDevtools","aria-label":"React Query Devtools"},o.createElement(wm,{theme:km},o.createElement(sf,eh({ref:d,context:s,styleNonce:u,position:k,onPositionChange:v,showCloseButton:!0,closeButtonProps:n},x,{style:A,isOpen:w,setIsOpen:m,onDragStart:e=>((e,t)=>{if(!e)return;if(0!==t.button)return;const n=Am(k);E(!0);const{height:o,width:r}=e.getBoundingClientRect(),a=t.clientX,i=t.clientY;let s=0;const u=e=>{e.preventDefault(),n?(s=r+("right"===k?a-e.clientX:e.clientX-a),b(s)):(s=o+("bottom"===k?i-e.clientY:e.clientY-i),g(s)),m(!(s<70))},c=()=>{_&&E(!1),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseUp",c,!1)};document.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",c,!1)})(d.current,e),errorTypes:l}))),w?null:o.createElement("button",eh({type:"button"},I,{"aria-label":"Open React Query Devtools","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"false",onClick:e=>{m(!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"},...R}}),o.createElement(rf,{"aria-hidden":!0}),o.createElement(Gm,{text:"Open React Query Devtools"}))):null};process.env.NODE_ENV;var hf,mf={backgroundColor:"#fcfcff",width:"100%",zIndex:1e7,height:"100%",position:"absolute"};exports.ApiErrorCodes=void 0,(hf=exports.ApiErrorCodes||(exports.ApiErrorCodes={})).ECONNABORTED="ECONNABORTED",hf.ETIMEDOUT="ETIMEDOUT",hf.ERR_BAD_REQUEST="ERR_BAD_REQUEST";var ff=["LOCAL","DEV","STG"].includes(process.env.ENVIRONMENT||"");"undefined"!=typeof window&&ff&&function(){e.__awaiter(this,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:if(!dr())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,cr.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=Sp,exports.ApiProvider=function(n){var o=this,r=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(o,void 0,void 0,(function(){var n,o,r,a,s;return e.__generator(this,(function(u){switch(u.label){case 0:return n=localStorage.getItem("headers"),o=n&&JSON.parse(n),r=localStorage.getItem("isTesting")&&"OFF"!==localStorage.getItem("isTesting")?"testing":"live",a=localStorage.getItem("x-organization-code"),s=a?JSON.parse(a).value:"",[4,Rp.refreshInstance({headers:e.__assign(e.__assign({},o),{"X-Environment":r||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 p=t.useCallback((function(t){return e.__awaiter(o,void 0,void 0,(function(){var n,o,r,a,s,u,l;return e.__generator(this,(function(p){switch(p.label){case 0:return n=localStorage.getItem("headers"),(o=n&&JSON.parse(n))?(r=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=r?JSON.parse(r).value:"",[4,Rp.refreshInstance({headers:e.__assign(e.__assign({},o),{"X-Environment":t||i,"x-organization-code":u,"x-account-code":s,"X-Content-Type-Options":"nosniff"})})]):[3,2];case 1:p.sent(),Fd.refetchQueries(["fetch-profile","accountsV2","accounts","fetch-all-organizations","fetch-permissions"]),c(!0),p.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?p(n):"token"===t.key&&p(e)}})),p(e)}),[c,p]),u?React.createElement(Od,{client:Fd},r,React.createElement(df,{initialIsOpen:!1})):React.createElement("div",{style:mf})},exports.ApiSingleton=Rp,exports.getQueryKeyGetNameAndIcon=Wd,exports.getQueryKeyRequiredFields=Hd,exports.queryCache=Bd,exports.queryClient=Fd,exports.use3DSExemptions=function(){var t=this;return Nd({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,Rp.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})},exports.useAICreateWorkflow=function(t,n){return void 0===n&&(n={}),Md((function(e){return Rp.getInstance().generateAIWorkflowRoutes(t,e).then((function(e){return null==e?void 0:e.data}))}),e.__assign(e.__assign({},n),{useErrorBoundary:!1}))},exports.useAllFeatureFlags=function(n){var o=this,r=Nd({queryKey:["all-feature-flags",Object.values(n).filter(Boolean)],queryFn:function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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=Ad();return t.useEffect((function(){a.setQueryData(["cached-feature-flags"],r)}),[r,a]),r},exports.useAllowListDetail=function(e,t,n){return Nd(["allow-list-detail",e],(function(){return Rp.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,o,r,a){return Nd(["black-list-detail",e,t,o,r,a],(function(){return Rp.getInstance().getBlacklistDetail(e,t,n,o,r).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&a,cacheTime:0})},exports.useCachedFeatureFlag=function(t){var n,o,r=Ad(),a=r.getQueryState(["cached-feature-flags"]),i=Boolean(!(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.status)||"loading"===(null===(o=null==a?void 0:a.data)||void 0===o?void 0:o.status)),s=Nd({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=r.getQueryData(["cached-feature-flags"]);return(null==e?void 0:e.data)||{}}});return e.__assign(e.__assign({},s),{isLoading:i})},exports.useCancelReport=function(){return Md((function(e){return Rp.getInstance().cancelReport(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useCancelSubscription=function(){return Md(["post-cancel-subscription"],(function(e){var t=e.subscriptionCode;return Rp.getInstance().postCancelSubscription(t).then((function(e){return null==e?void 0:e.data}))}))},exports.useChangePasswordV2=function(){var t=this;return Md((function(n){return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().changePasswordV2(n).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}))},exports.useChangePaymentsWebhook=function(){return Md(["change-payments-webhook"],(function(e){var t=e.status,n=e.paymentCode;return Rp.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 Md(["change-blacklist"],(function(e){return Rp.getInstance().changeBlackListStatus(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useChangeStatusItemBlackList=function(){return Md(["change-blacklist-item"],(function(e){return Rp.getInstance().changeBlackListStatusItem(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useChangeStylingSettings=function(){return Md((function(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n,r=e.payload;return Rp.getInstance().changeStylingSettings({accountCode:t,environment:o,payload:r}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))},exports.useChangeTemplateStatus=function(){var t=this;return Md(["PATCH/template-reporting/report-templates/status"],(function(n){var o=n.templateId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().changeTemplateStatus(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useChargebacksUpload=function(){return Md((function(e){var t=e.payload,n=e.paymentId,o=e.transactionId,r=e.handleSetProgress;return Rp.getInstance().uploadChargebacks(t,n,o,r)}))},exports.useChartAssistantSocket=function(){var e=t.useRef(null),n=t.useRef(null),o=t.useRef(null),r=t.useState(!1),a=r[0],i=r[1],s=t.useState(null),u=s[0],c=s[1],l=t.useState(null),p=l[0],d=l[1],h=t.useCallback((function(){n.current&&(clearInterval(n.current),n.current=null),o.current&&(clearTimeout(o.current),o.current=null)}),[]),m=t.useCallback((function(){if("undefined"==typeof window||"dashboard.dev.y.uno"!==window.location.hostname){n.current&&(clearInterval(n.current),n.current=null),o.current&&(clearTimeout(o.current),o.current=null),d(null);try{var t=new WebSocket("".concat(xp["WS_URL_".concat(xp.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){d("Failed to parse server response")}},t.onerror=function(e){d("Connection error occurred"),i(!1)},t.onclose=function(e){i(!1),h(),e.wasClean||1e3===e.code||(o.current=setTimeout((function(){m()}),5e3))}}catch(e){d("Failed to establish connection")}}}),[]),f=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}))}),[]),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:"unsubscribe",chart_id:t}))}),[]),y=t.useCallback((function(){c(null)}),[]),b=t.useCallback((function(){n.current&&(clearInterval(n.current),n.current=null),o.current&&(clearTimeout(o.current),o.current=null),e.current&&(i(!1),e.current.close(1e3,"Manual disconnect"),e.current=null)}),[]);return t.useEffect((function(){return m(),function(){h(),b()}}),[]),{subscribe:f,unsubscribe:g,disconnect:b,connect:m,clearChartData:y,isConnected:a,chartData:u,connectionError:p}},exports.useChartExecute=function(e){return Nd(["chartgpt-chart-execute",e],(function(){return Rp.getInstance().executeChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e})},exports.useCloneTemplate=function(){var t=this;return Md(["POST/template-reporting/report-templates/clone"],(function(n){var o=n.templateId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().cloneReportTemplate(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useCommunicationDetails=function(e,t){return Nd(["fetch-communication-details",e],(function(){return Rp.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 Nd(["fetch-communications",e],(function(){return Rp.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 Nd(e.__assign({queryKey:["smart-recovery-communications-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,o,r;return e.__generator(this,(function(e){switch(e.label){case 0:return n=Rp.getInstance(),o={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",o)];case 1:return r=e.sent(),[2,(a=r.data,i=o.start_date,s=o.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})),p=u.find((function(e){return"CONVERSION_RATE_LABEL"===e.label})),d=Qd(null==c?void 0:c.rows,i,s),h=Qd(null==l?void 0:l.rows,i,s),m=Qd(null==p?void 0:p.rows,i,s),{communications:{distribution:d.map((function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:$d(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==c?void 0:c.value)||"0")},conversion_rate:{distribution:m.map((function(e){return{key:e.date||"",total:parseFloat(e.value),percentage:parseFloat(e.value)}})),total:parseFloat((null==p?void 0:p.value)||"0")},completed_communications:{distribution:h.map((function(e){return{key:e.date||"",total:parseFloat(e.value),current_label:$d(e.date||""),current_amount:parseFloat(e.value)}})),total:parseFloat((null==l?void 0:l.value)||"0")}})]}var a,i,s,u,c,l,p,d,h,m}))}))},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useCommunicationsBySubstatus=function(t,n){return Nd(e.__assign({queryKey:["smart-recovery-communications-by-substatus",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,o,r;return e.__generator(this,(function(e){switch(e.label){case 0:return n=Rp.getInstance(),o={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",o)];case 1:return r=e.sent(),[2,Jd(r.data)]}}))}))},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useCommunicationsFilters=function(){return Nd(["fetch-communications-filters"],(function(){return Rp.getInstance().getCommunicationsFilters().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})},exports.useCommunicationsSubstatusByDay=function(t,n){return Nd(e.__assign({queryKey:["smart-recovery-communications-substatus-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,o,r;return e.__generator(this,(function(e){switch(e.label){case 0:return n=Rp.getInstance(),o={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",o)];case 1:return r=e.sent(),[2,Xd(r.data,o.start_date,o.end_date)]}}))}))},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useConfirmedOtpMfa=function(){return Md((function(e){return Rp.getInstance().confirmMfaOtp(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useCountRowsForReport=function(){return Md((function(e){return Rp.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 Md((function(n){return e.__awaiter(t,void 0,void 0,(function(){var t,o,r,a,i;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().createChartGPTChart(n)];case 1:if(t=e.sent(),!(o=null!==(a=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.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:o}]}}))}))}),{useErrorBoundary:!1})},exports.useCreateAndExecuteChartWithTimezone=function(){var t=this;return Md((function(n){return e.__awaiter(t,void 0,void 0,(function(){var t,o,r,a,i;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().createChartGPTChart(n)];case 1:if(t=e.sent(),!(o=null!==(a=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.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:o}]}}))}))}),{useErrorBoundary:!1})},exports.useCreateChart=function(){return Md((function(e){return Rp.getInstance().createChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useCreateChartWithTimezone=function(){return Md((function(e){return Rp.getInstance().createChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useCreateMonitorTemplate=function(e){return Md((function(t){return Rp.getInstance().createMonitorTemplate(t,e).then((function(e){return e.data}))}))},exports.useCreateMonitorThreshold=function(e){return Md((function(t){return Rp.getInstance().createMonitorThreshold(t,e).then((function(e){return e.data}))}))},exports.useCreateOperationTransaction=function(){return Md((function(e){var t=e.payload,n=e.transactionId,o=e.paymentId,r=e.action;return Rp.getInstance().createOperationTransaction(t,n,o,r)}))},exports.useCreatePaymentLinks=function(){return Md(["post-payment-links"],(function(e){var t=e.payload,n=e.accountCode;return Rp.getInstance().postPaymentLinks({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data}))}))},exports.useCreateReconciliationAlert=function(){return Md(["POST/reconciliation/alerts"],(function(e){return Rp.getInstance().postReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){Fd.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useCreateReconciliationReportTemplate=function(t){var n=this;return Md((function(){return Rp.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,o;return e.__generator(this,(function(r){switch(r.label){case 0:return[4,Fd.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return r.sent(),n=null===(o=Fd.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===o?void 0:o.templates,Fd.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){Fd.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){Fd.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})},exports.useCreateReconciliationsReportV2=function(){return Md((function(e){return Rp.getInstance().createReconciliationsReportV2(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useCreateReconciliationsReportV3=function(){return Md((function(e){return Rp.getInstance().createReconciliationsReportV3(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useCreateReportTemplate=function(t){var n=this;return Md((function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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(o){switch(o.label){case 0:return[4,Fd.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return o.sent(),n=Fd.getQueryData(["GET/reports/templates"]),Fd.setQueryData(["GET/reports/templates"],(function(n){return e.__spreadArray(e.__spreadArray([],n,!0),[t],!1)})),[2,{previousTemplates:n}]}}))}))},onError:function(e,t,n){Fd.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){Fd.invalidateQueries({queryKey:["GET/reports/templates"]})}})},exports.useCreateReportV2=function(){return Md((function(e){return Rp.getInstance().createReportV2(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useCreateRoles=function(){return Md((function(e){var t=e.payload,n=e.accountCode;return Rp.getInstance().createRoles(t,n).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useCreateSamlConfig=function(){return Md((function(e){return Rp.getInstance().createSamlConfig(e)}))},exports.useCreateSchedule=function(){var t=this;return Md(["POST/template-reporting/report-schedules"],(function(n){return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().createReportSchedule(n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useCreateScheduledReport=function(){return Md((function(e){var t=e.payload;return Rp.getInstance().postScheduledReport(t).then((function(e){return{data:e.data,status:e.status}})).catch((function(e){return e}))}))},exports.useCreateSubscription=function(){return Md(["post-subscription"],(function(e){return Rp.getInstance().postSubscription(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useCreateTemplate=function(){var t=this;return Md(["POST/template-reporting/report-templates"],(function(n){return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().createTemplateReporting(n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useCreateUserAuth0=function(){return Md((function(e){return Rp.getInstance().createUserAuth0(e)}))},exports.useCreateWorkflow=function(t,n,o){var r=this;return void 0===o&&(o=null),Md((function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().postSmartRoutingCreateWorkflow(t,n).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}),o)},exports.useDeleteAccountsUserMassive=function(){return Md((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Rp.getInstance().deleteAccountsUserMassive(t,n,o)}))},exports.useDeleteAllowlistItem=function(){return Md(["delete-allowlist-item"],(function(e){return Rp.getInstance().deleteAllowlistItem({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.useDeleteBlackListType=function(){return Md(["delete-blacklist"],(function(e){var t=e.black_list_code;return Rp.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 Md(["delete-blacklist-items"],(function(e){var t=e.blocklist_code,n=e.blocklist_item_id,o=e.account_code;return Rp.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useDeleteChart=function(){return Md((function(e){return Rp.getInstance().deleteChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useDeleteCustomizedApiKeys=function(){return Md((function(e){var t=e.code;return Rp.getInstance().deleteCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.useDeletePaymentLink=function(){return Md(["post-delete-payment-link"],(function(e){var t=e.code;return Rp.getInstance().postDeletePaymentLink({code:t}).then((function(e){return null==e?void 0:e.data}))}))},exports.useDeleteReconciliationAlert=function(){return Md(["DELETE/reconciliation/alerts"],(function(e){return Rp.getInstance().deleteReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){Fd.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useDeleteRoles=function(){return Md((function(e){return Rp.getInstance().deleteRoles(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useDeleteSamlConfig=function(){return Md((function(){return Rp.getInstance().deleteSamlConfig()}))},exports.useDeleteSchedule=function(){var t=this;return Md(["DELETE/template-reporting/report-schedules"],(function(n){var o=n.scheduleId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().deleteReportSchedule(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useDeleteScheduledReport=function(){return Md((function(e){return Rp.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 Md(["DELETE/template-reporting/report-templates"],(function(n){var o=n.templateId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().deleteReportTemplate(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useDeleteUserTeamV2=function(){return Md((function(e){var t=e.userCode,n=e.organizationCode;return Rp.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,o=e.accountCode;return void 0===t&&(t=null),Md((function(){return Rp.getInstance().deleteSmartRoutingVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useDeleteWebhookV2=function(e){return Md((function(e){var t=e.code,n=e.accountCode;return Rp.getInstance().deleteWebhookV2(t,n)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useDisableSchedule=function(){var t=this;return Md(["PATCH/template-reporting/report-schedules/disable"],(function(n){var o=n.scheduleId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().disableReportSchedule(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/schedules/search"]})},useErrorBoundary:!1})},exports.useDuplicateAccount=function(){return Md((function(t){var n=e.__spreadArray([exports.DuplicateSetting.ACCOUNT],t.duplicate_order,!0);return Rp.getInstance().duplicateAccount(e.__assign(e.__assign({},t),{duplicate_order:n}))}))},exports.useDuplicateVersion=function(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Md((function(){return Rp.getInstance().postSmartRoutingDuplicateVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useEditPaymentLinks=function(){return Md(["patch-payment-links"],(function(e){var t=e.payload,n=e.accountCode,o=e.paymentLinkCode;return Rp.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:o}).then((function(e){return null==e?void 0:e.data}))}))},exports.useEditRoles=function(){var t=this;return Md((function(n){var o=n.payload,r=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,Rp.getInstance().editRoles({payload:o,id:r},a)];case 1:return[2,null==(t=e.sent())?void 0:t.data]}}))}))}),{useErrorBoundary:!1})},exports.useEmailVerification=function(e){return Nd(["email-verification",e],(function(){return Rp.getInstance().emailVerification(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})},exports.useExcludeUsers=function(){return Md((function(e){var t=e.payload,n=e.organizationCode;return Rp.getInstance().mfaExcludeUsers(t,n)}))},exports.useExportApiLogs=function(){return Md((function(e){return Rp.getInstance().postExportApiLogs(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useExportWebhooksLogs=function(){return Md((function(e){return Rp.getInstance().postExportWebhooksLogs(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useFeatureFlags=function(t){var n=this,o=Object.values(t).filter(Boolean);return Nd(["feature-flags",o],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getFeatureFlagId(t).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:o.length>1,useErrorBoundary:!1})},exports.useFirebaseUserSubscribe=function(e){return Md((function(e){var t=e.payload;return Rp.getInstance().firebaseUserSubscribe(t)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useGenerateFeedback=function(t){return void 0===t&&(t={}),Md((function(e){return Rp.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=Vd(),o=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return Nd({queryKey:["accounts",o],queryFn:function(){return Rp.getInstance().getAccounts(o).then((function(e){return null==e?void 0:e.data}))},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!o})},exports.useGetAccountsByUser=function(e){return Nd(["accountsV2-by-user",e],(function(){return e?Rp.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 o=this;return Nd({queryKey:["accounts-for-impersonation",t,n],queryFn:function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getAccountsForImpersonation(t).then((function(e){var t,o;return(null===(o=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.response)||void 0===o?void 0:o.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 Nd(["accountsV2",e],(function(){return Rp.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 Nd(["config-rules"],(function(){return Rp.getInstance().getAllConfigRules().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0})},exports.useGetAllOrganizations=function(){return Nd(["fetch-all-organizations",Vd()],(function(){return Rp.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,o=e.enabled;return Nd(["GET/reconciliation/advancements/list",t,n],(function(){return Rp.getInstance().getReconciliationAdvancements(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetAllReconciliationsAgenda=function(e){var t=e.body,n=e.params,o=e.enabled;return Nd(["GET/reconciliation/agenda/list",t,n],(function(){return Rp.getInstance().getReconciliationAgenda(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetAllReconciliationsAlerts=function(e){var t=e.body,n=e.params,o=e.enabled;return Nd(["GET/reconciliation/alerts/list",t,n],(function(){return Rp.getInstance().getReconciliationAlerts(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetAllReconciliationsFees=function(e){var t=e.body,n=e.params,o=e.enabled;return Nd(["GET/reconciliation/fees/list",t,n],(function(){return Rp.getInstance().getReconciliationFees(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetAllReconciliationsSales=function(e){var t=e.body,n=e.params,o=e.enabled;return Nd(["GET/reconciliation/sales/list",t,n],(function(){return Rp.getInstance().getReconciliationSales(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetAllTableColumns=function(e){return Nd(["GET/v1/reconciliation/table/".concat(e,"/columns")],(function(){return Rp.getInstance().getAllTableColumns(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.useGetAllowedIps=function(){return Nd(["developers-get-allowed-ips"],(function(){return Rp.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.useGetApiLogsDetailByPaymentCode=function(e){return Nd(["api-logs-detail",e],(function(){return Rp.getInstance().getApiLogsDetailByPaymentCode(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e,cacheTime:0,useErrorBoundary:!1})},exports.useGetAuditEvents=function(e){return Nd(["events",e],(function(){return Rp.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.useGetAuditLogsFilters=function(){return Nd(["/cms/audit-logs-filters"],(function(){return Rp.getInstance().useGetAuditLogsFilters().then((function(e){return lp(e)?fp:null==e?void 0:e.data})).catch((function(){return fp}))}))},exports.useGetAuditMonitorEventDetail=function(e){return Nd(["audit-monitor-event-detail",e],(function(){return Rp.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 Md((function(n){var o=n.batchRefundId,r=n.organizationCode,a=n.accountCode;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getBatchRefundProcessedFileDownload(o,r,a).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})},exports.useGetBatchRefundUserFileDownload=function(){var t=this;return Md((function(n){var o=n.batchRefundId,r=n.organizationCode,a=n.accountCode;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getBatchRefundUserFileDownload(o,r,a).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})},exports.useGetBatchRefunds=function(t,n){var o=this;return void 0===t&&(t=26),void 0===n&&(n=0),Nd(["batch-refunds",t,n],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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){return Nd(["get-black-list",e],(function(){return Rp.getInstance().getBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!e})},exports.useGetBlockListSummary=function(e,t,n){return Nd(["get-block-list-summary",e,t,n],(function(){var o=Rp.getInstance();return n?o.getBlackListSummary(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e})):Promise.resolve({})}),{enabled:!!e&&!!n})},exports.useGetCardBrands=function(){return Nd(["GET/catalog/card-brands"],(function(){return Rp.getInstance().getCardBrands().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useGetChartsByUser=function(){return Nd(["chartgpt-user-charts"],(function(){return Rp.getInstance().getChartsByUser().then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})},exports.useGetChartsByUserWithResults=function(){var t=this;return Nd(["chartgpt-user-charts-with-results"],(function(){return e.__awaiter(t,void 0,void 0,(function(){var t,n,o,r=this;return e.__generator(this,(function(a){switch(a.label){case 0:return[4,(t=Rp.getInstance()).getChartsByUser()];case 1:return n=a.sent(),o=(null==n?void 0:n.data)||[],[4,Promise.all(o.map((function(n){return e.__awaiter(r,void 0,void 0,(function(){var o,r,a,i,s,u,c,l;return e.__generator(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),[4,t.executeChartGPTChart(n.code)];case 1:return o=p.sent(),[2,e.__assign(e.__assign({},n),{user_prompt:null!==(i=null===(a=null==o?void 0:o.data)||void 0===a?void 0:a.user_prompt)&&void 0!==i?i:n.user_prompt,unit_to_display:null!==(u=null===(s=null==o?void 0:o.data)||void 0===s?void 0:s.unit_to_display)&&void 0!==u?u:n.unit_to_display,results:null!==(l=null===(c=null==o?void 0:o.data)||void 0===c?void 0:c.results)&&void 0!==l?l:[]})];case 2:return r=p.sent(),console.error("Failed to execute chart ".concat(n.chart_id,":"),r),[2,e.__assign(e.__assign({},n),{results:[]})];case 3:return[2]}}))}))})))];case 2:return[2,a.sent()]}}))}))}))},exports.useGetCheckoutTemplate=function(e){var t=e.accountCode;return Nd(["checkouts-template"],(function(){return Rp.getInstance().getCheckoutTemplate({accountCode:t}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,enabled:Boolean(t)})},exports.useGetCheckouts=function(e){var t=e.accountCode;return Nd(["checkouts",t],(function(){return Rp.getInstance().getCheckouts({accountCode:t}).then((function(e){return e.data}))}),{cacheTime:0,enabled:Boolean(t)})},exports.useGetConditionalConfigRules=function(){return Md((function(e){return Rp.getInstance().getConditionalConfigRules(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useGetConfigAllowlist=function(e,t){return Nd(["get-cofig-allow-list",e],(function(){return Rp.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 Nd(["connections"],(function(){return Rp.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;return Nd(["fetch-connections-by-payment-method",n,t],(function(){return Rp.getInstance().getConnectionsByPaymentMethod(t,n).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),Nd(["countries",e],(function(){return Rp.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 Nd(["countries-v2",n],(function(){return Rp.getInstance().useGetCountriesConfigV2(n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!0,keepPreviousData:!0})},exports.useGetCredentials=function(t){var n=t.password,o=t.accountCode;return Nd(["developers"],(function(){return Rp.getInstance().getDeveloperCredentials(n,o).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 Md((function(t){var n=t.password,o=t.accountCode;return Rp.getInstance().getDeveloperCredentials(n,o).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}}))}))},exports.useGetCustomizedApiKeys=function(e){return Nd(["fetch-customized-api-keys",e],(function(){return Rp.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 Nd(["fetch-customized-api-keys-accounts"],(function(){return Rp.getInstance().getCustomizedApiKeysAccounts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})},exports.useGetCustomizedApiKeysMembers=function(){return Nd(["fetch-customized-api-keys-members"],(function(){return Rp.getInstance().getCustomizedApiKeysMembers().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})},exports.useGetCustomizedApiKeysProducts=function(){return Nd(["fetch-customized-api-keys-products"],(function(){return Rp.getInstance().getCustomizedApiKeysProducts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{cacheTime:0})},exports.useGetCustomizedApiKeysToken=function(){return Md((function(e){var t=e.code,n=e.password;return Rp.getInstance().getCustomizedApiKeysToken(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))},exports.useGetDashboardStaticContents=function(){return Nd(["/cms/static-contents"],(function(){return Rp.getInstance().getDashboardStaticContents().then((function(e){var t,n;return lp(e)?gp:(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 Nd(["dialogs"],(function(){return Rp.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),Nd(["reports/".concat(e)],(function(){return Rp.getInstance().downloadReports(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:t,onSuccess:n,useErrorBoundary:!1})},exports.useGetEmailOtp=function(){return Md((function(){return Rp.getInstance().getEmailOtp().then((function(e){return null==e?void 0:e.data}))}))},exports.useGetHashPylon=function(){var t=this;return Nd(["fetch-hash-pylon"],(function(){return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getHashPylon()]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})},exports.useGetImpersonationEnabled=function(){return Nd(["fetch-impersonation-enabled"],(function(){return Rp.getInstance().getImpersonationEnabled().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})},exports.useGetImpersonationUsers=function(){return Nd(["fetch-impersonation-users"],(function(){return Rp.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 Nd(["get-insights-reports",e],(function(){return Rp.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 Nd(["get-insights-reports-again",e],(function(){return Rp.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.useGetInstallmentPlans=function(e){return Nd(["installments-plans",e],(function(){return Rp.getInstance().getInstallmentPlans(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(e),useErrorBoundary:!1})},exports.useGetIntegrationByAccountV2=function(e){var t=e.accountCode,n=e.organizationCode,o=Vd();return Nd(["organizations-account-integrations",t,n],(function(){return Rp.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||o}).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,o=e.accountCode;return Nd(["integration-params",t,o],(function(){return t.includes("undefined")?{}:Rp.getInstance().getIntegrationParams({accountCode:o,integration_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,useErrorBoundary:!1})},exports.useGetLanguages=function(){return Nd(["languages"],(function(){return Rp.getInstance().getLanguages().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:300})},exports.useGetLocales=function(){return Nd(["/cms/locales"],(function(){return Rp.getInstance().getLocales().then((function(e){return lp(e)?bp:e.data})).catch((function(){return bp}))}))},exports.useGetLoginMethods=function(){return Nd({queryKey:["get-login-methods"],queryFn:function(){return Rp.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 Nd(["mfa-config",n],(function(){return Rp.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 Nd(["mfa-excluded-users",n],(function(){return Rp.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 Nd(["mfa-enforcement-status",e.accountCode],(function(){return Rp.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 Nd(["menu"],(function(){return Rp.getInstance().getMenu().then((function(e){return lp(e)?yp:null==e?void 0:e.data})).catch((function(){return yp}))}))},exports.useGetMergedNotifications=function(){return Nd(["notifications-merged"],(function(){return Rp.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,o=e.type;return Nd(Wd({paymentMethodType:n,type:o}),(function(){return Rp.getInstance().getNameAndIcon({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useGetNetworkTokensOnboardingByOrganization=function(t){var n=this;return Nd({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,Rp.getInstance().getNetworkTokensOnboardingByOrganization(t)];case 1:return[2,e.sent().data]}}))}))},enabled:!!t,useErrorBoundary:!1,cacheTime:0})},exports.useGetNotificationsCustomer=function(e){return Nd(["notifications-customer",e],(function(){return Rp.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 Md((function(e){return Rp.getInstance().getNotificationsNumber(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useGetOrganization=function(){return Nd(["fetch-organizations"],(function(){return Rp.getInstance().getOrganization().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})},exports.useGetOrganizationConfigs=function(){return Nd({queryKey:["organization-configs"],queryFn:function(){return Rp.getInstance().getOrganizationConfigs().then((function(e){return null==e?void 0:e.data}))},cacheTime:0,useErrorBoundary:!1})},exports.useGetPaymentFilters=function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=exports.PaymentFiltersSection.PAYMENTS),Nd(["payment-filters",e,t],(function(){return Rp.getInstance().getPaymentFilters(t).then((function(e){return null==e?void 0:e.data}))}),{enabled:e,useErrorBoundary:!1,cacheTime:3e5})},exports.useGetPaymentLinkByCode=function(e){return Nd(["payment-link"],(function(){return Rp.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 Nd(["fetch-payment-links",e,t],(function(){return Rp.getInstance().getPaymentLinks(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t,cacheTime:0})},exports.useGetPaymentMethodsAndProviders=function(){return Nd({queryKey:["/payment-methods/providers"],queryFn:function(){return Rp.getInstance().getPaymentMethodsAndProviders().then((function(e){return null==e?void 0:e.data}))},cacheTime:864e5,useErrorBoundary:!1})},exports.useGetPaymentMetricsFilters=function(){return Nd(["payment-metrics-filters"],(function(){return Rp.getInstance().getPaymentMetricsFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useGetPaymentStatusesStyles=function(){return Nd(["/payment/statuses/style"],(function(){return Rp.getInstance().useGetPaymentStatusesStyles().then((function(e){return lp(e)?pp:null==e?void 0:e.data})).catch((function(){return pp}))}))},exports.useGetPaymentTransactionsDetails=function(e){var t=e.transaction_code,n=e.enabled;return Nd(["payment-transaction-details",t],(function(){return Rp.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,o=t.paymentCode,r=t.enabled,a=void 0===r||r,i=Rp.getInstance();return Nd(["get-payment-v2",o],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,i.getPaymentV2(o).then((function(e){return e.data}))]}))}))}),{enabled:a,cacheTime:500,useErrorBoundary:!1})},exports.useGetPaymentsMethodsByCountry=function(e){var t=Vd();return Nd(["payment-methods",e],(function(){return Rp.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 Nd(["GET/payout-detail",JSON.stringify(e)],(function(){var t=Rp.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=Vd();return Nd(["GET/payout-history-detail",JSON.stringify(e)],(function(){return Rp.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.useGetPayoutTransactionDetail=function(e){return Nd(["GET/payout-transaction-detail",JSON.stringify(e)],(function(){return Rp.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 Nd({queryKey:["pending-duplicate-accounts",e],queryFn:function(){return Rp.getInstance().getPendingDuplicateAccounts()},useErrorBoundary:!1,keepPreviousData:!0,refetchInterval:e})},exports.useGetPermissions=function(e,t){return Nd(["fetch-permissions",e,t],(function(){var e,t,n,o=localStorage.getItem("account"),r=localStorage.getItem("user"),a=o&&JSON.parse(o),i=r&&JSON.parse(r);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 Nd(["fetch-permissions-catalog"],(function(){return Rp.getInstance().getPermissionsCatalog().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})},exports.useGetProfile=function(){return Nd(["fetch-profile"],(function(){return Rp.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})},exports.useGetProofOfCancel=function(t,n){var o=this,r=Vd();return Nd(["GET/useGetProofOfCancel",r,t,n],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getProofOfCancel(t,r,n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!t&&!!r&&!!n,cacheTime:0,useErrorBoundary:!1})},exports.useGetProofOfPayment=function(t,n){var o=this,r=Vd();return Nd(["GET/useGetProofOfPayment",r,t,n],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getProofOfPayment(t,r,n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!t&&!!r&&!!n,cacheTime:0,useErrorBoundary:!1})},exports.useGetProviderParams=function(e){var t=Vd();return Nd(["organizations-provider-params",e],(function(e){var n=e.queryKey;return Rp.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.useGetReconciliationActive=function(){return Nd(["GET/v1/reconciliation/active"],(function(){return Rp.getInstance().getReconciliationActive().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.useGetReconciliationAgendaInsightsByKey=function(e){var t=e.body,n=e.params,o=e.enabled;return Nd(["GET/reconciliation/agenda/insights",t,n],(function(){return Rp.getInstance().getReconciliationAgendaInsightByKey(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})},exports.useGetReconciliationFilters=function(){return Nd(["GET-reconciliation-filters"],(function(){return Rp.getInstance().getReconciliationFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useGetReconciliationMetrics=function(e,t){return Nd(["fetch-reconciliation-metrics",e],(function(){return Rp.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 Nd(["/reconciliation/transaction/statuses/style"],(function(){return Rp.getInstance().useGetReconciliationTransactionStatusesStyles().then((function(e){return lp(e)?hp:null==e?void 0:e.data})).catch((function(){return hp}))}))},exports.useGetReconciliationTransactions=function(e,t){return Nd(["fetch-reconciliation-transaction",e],(function(){return Rp.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 Nd(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],(function(){return Rp.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 Nd(["GET/reconciliation/reports/templates"],(function(){return Rp.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 o=this,r=Vd();return Nd(["getRefundPdf",t,r,n],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getRefundPdf(t,r,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))]}))}))}),{enabled:!!t&&!!r,useErrorBoundary:!1})},exports.useGetReportColumns=function(t,n,o){var r=this;return Nd(["GET/reports/columns/".concat(n,"/").concat(o)],(function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(t){return[2,Rp.getInstance().getReportColumns(n,o).then((function(t){return n===exports.TemplateType.ALL&&o===exports.ReportType.PAYMENTS?e.__spreadArray(e.__spreadArray([],null==t?void 0:t.data,!0),[Kd],!1):null==t?void 0:t.data})).catch((function(e){return e}))]}))}))}),{enabled:t,useErrorBoundary:!1})},exports.useGetReportTemplates=function(e){return Nd(["GET/reports/templates"],(function(){return Rp.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 Nd(["reports"],(function(){return Rp.getInstance().reportsList().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useGetReportsListMultiEnv=function(e){return void 0===e&&(e=!0),Nd(["reports-multi-env"],(function(){return Rp.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,o=e.type;return Nd(Hd({paymentMethodType:n,type:o}),(function(){return Rp.getInstance().getRequiredFields({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useGetRoles=function(){return Nd(["fetch-roles"],(function(){return Rp.getInstance().getRoles().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.useGetRolesPermissions=function(){return Nd(["fetch-rolespermissions"],(function(){return Rp.getInstance().getRolesPermissions().then((function(e){return null==e?void 0:e.data}))}))},exports.useGetRoutingMonitorsTemplate=function(e,t){return Nd(["fetch-routing-monitors-template",e],(function(){return Rp.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 Nd(["fetch-routing-monitors-templates",e],(function(){return Rp.getInstance().getRoutingMonitorsTemplates(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})},exports.useGetRule=function(){return Md((function(e){return Rp.getInstance().getRule(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useGetSamlConfig=function(e){return Nd(["fetch-organization-saml-config",e],(function(){return Rp.getInstance().getSamlConfig().then((function(e){return e.data}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})},exports.useGetScheduledReportsList=function(e){return Nd(["GET/scheduled-reports",e],(function(){return Rp.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 Nd(["fetch-reconciliation-settlements",e],(function(){return Rp.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 Nd(["smart-routing-condition-payment-method",e,t],(function(){return Rp.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){return Nd(["smart-routing-condition-types",e,t],(function(){return Rp.getInstance().getSmartRoutingConditionTypes(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e})},exports.useGetSmartRoutingConditionTypesValues=function(e,t){return Nd(["smart-routing-condition-types-values",t,e],(function(){return Rp.getInstance().getSmartRoutingConditionTypesValues(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&!!e,useErrorBoundary:!1})},exports.useGetSmartRoutingDataReport=function(e){return Nd(["data-report",e],(function(){return Rp.getInstance().getSmartRoutingDataReport(e).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,useErrorBoundary:!1})},exports.useGetSmartRoutingDeclineGroups=function(e){return Nd(["smart-routing-decline-groups",e],(function(){return Rp.getInstance().getSmartRoutingDeclinedGroup(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})},exports.useGetSmartRoutingMethods=function(e){return Nd(["smart-routing-methods",e],(function(){return Rp.getInstance().getSmartRoutingMethods(e).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){return Nd(["smart-routing-next-route",e,n,t],(function(){return Rp.getInstance().getSmartRoutingNextSteps(e,t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})},exports.useGetSmartRoutingPaymentRoute=function(e,t){return Nd(["smart-routing-payment-route",e,t],(function(){return Rp.getInstance().getSmartRoutingPaymentRoute(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&!!t,cacheTime:0})},exports.useGetSmartRoutingSearchConditionValues=function(e){var t=e.text,n=e.conditionType;return Nd(["smart-routing-search-condition-values",t,n],(function(){return Rp.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){return Nd(["smart-routing-simulate-condition-type-values",e],(function(){return Rp.getInstance().getSmartRoutingSimulateConditionTypeValues(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})},exports.useGetSmartRoutingWorkflow=function(e,t){return Nd(["smart-routing-workflow",t,e],(function(){return Rp.getInstance().getSmartRoutingWorkflow(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e,cacheTime:0,retry:!1})},exports.useGetSmartRoutingWorkflowVersion=function(e){var t=e.accountCode,n=e.workflowVersionId;return Nd(["smart-routing-workflow-version",n,t],(function(){return Rp.getInstance().getSmartRoutingWorkflowVersion(t,n).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 Nd(["styling-sdk-dynamic",t],(function(){return Rp.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.useGetStylingSettings=function(e){var t=e.accountCode;return Nd(["styling-settings",t],(function(){return Rp.getInstance().getStylingSettings({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})},exports.useGetStylingSettingsV2=function(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n;return Nd(["styling-settings-v2",t],(function(){return Rp.getInstance().getStylingSettingsV2({accountCode:t,environment:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})},exports.useGetStylingTheme=function(e){var t=e.accountCode;return Nd(["styling-theme",t],(function(){return Rp.getInstance().getStylingTheme({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})},exports.useGetSubscriptionByCode=function(e,t){return void 0===t&&(t=!0),Nd(["subscription",e],(function(){return Rp.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,o){return void 0===o&&(o=!0),Nd(["subscription-payments",e,t,n],(function(){return Rp.getInstance().getSubscriptionPayments(e,t,n).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e&&o,cacheTime:0})},exports.useGetTeamsFiltersMembers=function(){var e=Vd();return Nd(["teams-filters-members"],(function(){return Rp.getInstance().teamsFiltersMembers({organizationCode:e}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})},exports.useGetTimeZoneCatalog=function(){return Nd(["timezone-catalog"],(function(){return Rp.getInstance().useGetTimeZoneCatalog().then((function(e){return lp(e)?mp:null==e?void 0:e.data})).catch((function(){return mp}))}))},exports.useGetTimezonePaymentLink=function(e){return Nd(["timezone"],(function(){return Rp.getInstance().getTimezone(e).then((function(e){return lp(e)?mp:null==e?void 0:e.data})).catch((function(){return mp}))}),{enabled:!0,keepPreviousData:!0})},exports.useGetTokenValidation=function(){return Md((function(e){var t=e.password,n=e.otp;return Rp.getInstance().getMfaTokenValidation(t,n).then((function(e){return null==e?void 0:e.data}))}))},exports.useGetTransactionDetailsV2=function(t){var n=this,o=t.payment_code,r=t.enabled,a=void 0===r||r,i=Rp.getInstance();return Nd(["get-payment-transaction-details-v2",o],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,i.getTransactionDetailsV2({payment_code:o}).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!o&&a,cacheTime:0,useErrorBoundary:!1})},exports.useGetTransactionHistoryByPaymentCode=function(e){var t=e.payment_code,n=e.enabled;return Nd(["transaction-history",t],(function(){return Rp.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,o=t.transaction_code,r=t.enabled,a=void 0===r||r,i=Rp.getInstance();return Nd(["get-payment-transaction-raw-response",o],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,i.getTransactionRawResponse({transaction_code:o})]}))}))}),{enabled:!!o&&a,cacheTime:0,useErrorBoundary:!1})},exports.useGetTransactionStatusesStyles=function(){return Nd(["/transaction/statuses/style"],(function(){return Rp.getInstance().useGetTransactionStatusesStyles().then((function(e){return lp(e)?dp:null==e?void 0:e.data})).catch((function(){return dp}))}),{cacheTime:36e5,useErrorBoundary:!1})},exports.useGetTranslations=function(){var e=localStorage.getItem("lang")||"en";return Nd(["translations",e],(function(){return Rp.getInstance().getTranslations(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:3e4})},exports.useGetUserFull=function(){var t=this;return Nd(["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,Rp.getInstance().getUserFull()];case 1:return[2,e.sent().data]}}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})},exports.useGetUsersToImpersonate=function(t,n,o,r,a){var i=this;return void 0===o&&(o=1),void 0===r&&(r=10),Nd(["get-users-to-impersonate",t,n,o,r,a],(function(){return e.__awaiter(i,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getUsersToImpersonate(t,n,o,r,a).then((function(e){return null==e?void 0:e.data}))]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!t})},exports.useGetValidateOpsgenieKey=function(e){return Nd(["validate-opsgenie-key",e],(function(){return Rp.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 Nd(["params-catalog"],(function(){return Rp.getInstance().getWebhookParamsV2().then((function(e){return null==e?void 0:e.data}))}))},exports.useGetWebhooksV2Detail=function(e){var t=e.accountCode,n=e.enabled;return Nd(["webhooks-detail",t],(function(){return Rp.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 Nd(["webhooks",t,n],(function(){return Rp.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,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-3ds-conversion-rate-and-evolution",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsights3dsConversionRateAndEvolution(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsDeclineReasons=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-3ds-decline-reasons",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsights3dsDeclineReasons(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsFrictionlessVsChallenge=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-3ds-frictionless-vs-challenge",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsights3dsFrictionlessVsChallenge(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsights3dsVolumeAndCountTx=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-3ds-volume-and-count-tx",n,t],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsights3dsVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksByCardBrand=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-by-card-brand",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksByCardBrand(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksByProviderAndCardBrand=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksByProviderAndCardBrand(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksDisputed=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-disputed",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksDisputed(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksReasonsDistribution=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-reasons-distribution",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksReasonsDistribution(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksStatusDistribution=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-status-distribution",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksStatusDistribution(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksTotalRateAndEvolution=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-total-rate-and-evolution",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksTotalRateAndEvolution(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksVolumeAndCountTx=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-volume-and-count-tx",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsChargebacksWinRate=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-chargebacks-win-rate",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsChargebacksWinRate(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsConversionRateMetricsV2=function(e,t,n,o){var r,a;void 0===n&&(n=!0);var i=null!==(r=null==o?void 0:o.staleTime)&&void 0!==r?r:3e5,s=null!==(a=null==o?void 0:o.cacheTime)&&void 0!==a?a:3e5;return Nd(["get-insights-conversion-rate-metrics-v2",e,t],(function(){return Rp.getInstance().getInsightsMetricsConversionRateV2(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:n&&(!!(null==e?void 0:e.currency_code)&&"Empty"!==(null==e?void 0:e.currency_code)&&"string"==typeof(null==e?void 0:e.currency_code)||Array.isArray(null==e?void 0:e.currency_code)&&0===(null==e?void 0:e.currency_code.length)),staleTime:i,cacheTime:s,useErrorBoundary:!1,retry:1})},exports.useInsightsCustomerPaymentsAndFraudMetrics=function(e,t,n){return void 0===n&&(n=!0),delete t.account_code,Nd(["get-insights-customer-payment-fraud-metrics",t,e],(function(){return Rp.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 Nd(["get-insights-conversion-rate-fallback-metrics",e],(function(){return Rp.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,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-fraud-screening-conversion-rate",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsFraudScreeningConversionRate(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsFraudScreeningVolumeAndCountTx=function(t,n,o){var r=this;return void 0===o&&(o={enabled:!0}),Nd({queryKey:["post-insights-fraud-screening-volume-and-count-tx",t,n],queryFn:function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().getInsightsFraudScreeningVolumeAndCountTx(t,n)];case 1:return[2,e.sent()]}}))}))},enabled:o.enabled&&void 0!==t.account_codes,cacheTime:200,useErrorBoundary:!1})},exports.useInsightsHomeMetrics=function(e){return Nd(["get-insights-home-metrics",e],(function(){return Rp.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 Nd(["get-insights-overview",e],(function(){return Rp.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 Nd(["get-insights-overview-v3",e,t],(function(){return Rp.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,Nd(["get-insights-total-payment-fraud-metrics",t,e],(function(){return Rp.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,Nd(["get-insights-volume-metrics",t,e],(function(){return Rp.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,o){return void 0===o&&(o=!0),delete t.account_code,Nd(["get-insights-volume-metrics-v2",t,e,n],(function(){return Rp.getInstance().getInsightsMetricsVolumeV2(e,n,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:o,cacheTime:200,useErrorBoundary:!1})},exports.useInviteUsersMultiaccountMassive=function(){return Md((function(e){return Rp.getInstance().inviteUsersMassive(e,e.organizationCode)}))},exports.useIsTesting=function(){var e=t.useState("ON"===localStorage.getItem("isTesting")),n=e[0],o=e[1];return t.useEffect((function(){window.addEventListener("storage",(function(e){"isTesting"===e.key&&o("ON"===e.newValue)}))}),[]),{isTesting:n}},exports.useListSubscriptions=function(){return Md(["post-list-subscriptions"],(function(e){return Rp.getInstance().postListSubscriptions(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useLoginMethods=function(){return Md((function(e){return Rp.getInstance().changeLoginMethods(e)}))},exports.useNetworkTokensOnboarding=function(){var t=this;return Nd({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,Rp.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})},exports.useNewPostConnectionValidate=function(){return Md(["new-post-connection-validate"],(function(){return Rp.getInstance().postMultiConnectionValidate().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})},exports.usePatchAccountV2=function(){return Md((function(e){var t=e.name,n=e.code,o=e.principal;return Rp.getInstance().patchAccountV2({name:t,code:n,principal:o})}))},exports.usePatchAddAllowlistItems=function(){return Md(["post-add-allowlist-items"],(function(e){var t=e.payload;return Rp.getInstance().patchAddAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePatchAllowedIps=function(){return Md(["developers-patch-allowed-ips"],(function(t){return Rp.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 Md(["patch-allowlist"],(function(e){var t=e.payload;return Rp.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,o){var r=this;return void 0===o&&(o=!0),Nd(["chartgpt-patch-and-execute",t,n],(function(){return e.__awaiter(r,void 0,void 0,(function(){var o,r,a,i,s;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,(o=Rp.getInstance()).patchChartGPTChart(t,n)];case 1:return r=e.sent(),a=null==r?void 0:r.data,[4,o.executeChartGPTChart(t)];case 2:return i=e.sent(),s=null==i?void 0:i.data,[2,{chart:a,execution:s}]}}))}))}),{enabled:o&&!!t,retry:!1})},exports.usePatchApiKeysEditNote=function(){return Md((function(e){var t=e.payload,n=e.code;return Rp.getInstance().patchApiKeysEditNote(t,n).then((function(e){return e.data})).catch((function(e){return e}))}))},exports.usePatchChangeStatusAllowlist=function(){return Md(["patch-change-status-allowlist"],(function(e){var t=e.payload;return Rp.getInstance().patchChangeStatusAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePatchChangeStatusAllowlistItem=function(){return Md(["patch-change-status-allowlist-item"],(function(e){var t=e.payload;return Rp.getInstance().patchChangeStatusAllowlistItem({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePatchChartName=function(){return Md((function(e){var t=e.chart_id,n=e.type,o=e.name,r=e.user_prompt,a=void 0===r?"":r;return Rp.getInstance().patchChartGPTChart(t,{type:n,name:o,user_prompt:a}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.usePatchConnection=function(){return Md(["patch-connection"],(function(e){var t=e.payload,n=e.connectionCode;return Rp.getInstance().patchConnection({payload:t,connectionCode:n}).then((function(e){return null==e?void 0:e.data}))}))},exports.usePathCreateCustomizedApiKeys=function(){return Md((function(e){var t=e.payload,n=e.code;return Rp.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 Md((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,Rp.getInstance().pathNotification(n)];case 1:return[2,null==(t=e.sent())?void 0:t.data]}}))}))}))},exports.usePauseSubscription=function(){return Md(["post-pause-subscription"],(function(e){var t=e.subscriptionCode;return Rp.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 o=Vd();return Nd(["getPayoutsFilters",o],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().getPayoutsFilters(o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))]}))}))}),{enabled:t&&!!o})},exports.usePayoutsList=function(e){return Nd(["usePayoutsList",e&&JSON.stringify(e)],(function(){var t=Rp.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 Md((function(e){var t=e.name,n=e.principal;return Rp.getInstance().postAccount(t,n)}))},exports.usePostAllowlistMultiAccount=function(e){return Nd(["query-post-get-allowlist-multi-account",JSON.stringify(e)],(function(){return Rp.getInstance().postGetAllowlist({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})},exports.usePostApiKeysRoll=function(){return Md((function(e){var t=e.payload,n=e.code,o=e.password;return Rp.getInstance().postApiKeysRoll(t,n,o).then((function(e){return e.data})).catch((function(e){return e}))}))},exports.usePostApiLogs=function(e){return Nd(["api-logs",e],(function(){return Rp.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 Md((function(e){var t=e.payload;return Rp.getInstance().postAuditMonitors(t)}),{onMutate:e.onMutate})},exports.usePostBatchRefundByFile=function(){var t=this;return Md((function(n){return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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 Md(["post-blacklist-batch"],(function(e){var n=e.blacklist_code,o=e.expiration_days,r=e.file;return Rp.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:o,file:r,handleSetProgress:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.usePostBlackListItems=function(){return Md(["post-blacklist-items"],(function(e){var t=e.payload;return Rp.getInstance().postBlackListItems({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.usePostBlackListMultiAccount=function(){return Md(["post-blacklist-multi-account"],(function(e){var t=e.payload;return Rp.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,o){var r;return Nd(["post-black-list",e],(function(){return Rp.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=o?o:25).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:(null===(r=e[0])||void 0===r?void 0:r.length)>0&&null!==t,useErrorBoundary:!1})},exports.usePostCall=function(){return Md((function(e){return Rp.getInstance().postCall(e)}))},exports.usePostChangeStatusConnection=function(){return Md(["post-change-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Rp.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})},exports.usePostConnectionMultiAccount=function(){return Md(["post-connection"],(function(e){var t=e.payload;return Rp.getInstance().postMultiConnection({payload:t}).then((function(e){return null==e?void 0:e.data}))}))},exports.usePostCreateAllowlistMultiAccount=function(){return Md(["post-create-allowlist-multi-account"],(function(e){var t=e.payload;return Rp.getInstance().postCreateAllowlistMultiAccount({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePostCreateCustomizedApiKeys=function(){return Md((function(e){var t=e.payload;return Rp.getInstance().postCreateCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePostCreateInsightsReport=function(){return Md((function(e){var t=e.payload;return Rp.getInstance().postCreateInsightsReport(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePostCreateRuleMultiAccount=function(){return Md((function(e){var t=e.payload,n=e.accountCode;return Rp.getInstance().postCreateRuleMultiAccount(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePostCredentialsValidatePassword=function(){return Md((function(e){var t=e.passwordOtp;return Rp.getInstance().getDeveloperCredentialsValidatePassword(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))},exports.usePostCredentialsValidatePasswordRegularUser=function(){return Md((function(e){var t=e.password;return Rp.getInstance().getDeveloperCredentialsValidatePasswordRegularUser(t).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))},exports.usePostDefaultRoutes=function(){return Md((function(e){var t=e.payload;return Rp.getInstance().postDefaultRoutes({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))},exports.usePostEditRule=function(){return Md((function(e){var t=e.payload,n=e.ruleId,o=e.accountCode;return Rp.getInstance().postEditRule(t,n,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.usePostFraudTransactions=function(t){var n=this;return Nd(["POST/fraud-transactions",JSON.stringify(t)],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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 Md(["post-get-allowlist-items"],(function(e){var t=e.payload;return Rp.getInstance().postAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))},exports.usePostGetAllowlistMultiAccount=function(){return Md(["post-get-allowlist-multi-account"],(function(e){var t=e.payload;return Rp.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,o=e.search,r=e.status,a=e.roleId,i=e.statuses,s=e.roleIds,u=e.page,c=e.pageSize,l=Vd();return Nd(["fetch-post-members-v2",t,n,o,r,a,i,s,u,c],(function(){return Rp.getInstance().postMembersPaginatedV2({organizationCode:l,accountCodes:n,search:o,status:r,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 Md((function(n){var o=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().postNetworkTokensOnboarding(o)];case 1:return[2,e.sent().data]}}))}))}),{useErrorBoundary:!1})},exports.usePostOrganizationConfigs=function(){return Md((function(e){return Rp.getInstance().postOrganizationConfigs(e)}))},exports.usePostPaymentsEvaluated=function(e){return Nd(["fetch-payments-evaluated",e],(function(){return Rp.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 Nd(["fetch-payments-lazy",t],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.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 Md((function(e){var t=e.payload;return Rp.getInstance().postSlackMessageChannel(t).then((function(e){return null==e?void 0:e.data}))}))},exports.usePostTransactions=function(t){var n=this;return Nd(["POST/transactions",JSON.stringify(t)],(function(){return e.__awaiter(n,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().postTransactions(t).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!t,cacheTime:0,useErrorBoundary:!1})},exports.usePostUserSettings=function(){return Md((function(e){var t=e.payload;return Rp.getInstance().postUserSettings(t)}),{onMutate:function(e){return e}})},exports.usePostUserSettingsPinned=function(e){return Md(["pinned-sections"],(function(e){var t=e.payload;return Rp.getInstance().postUserSettingsPinned(t)}),{onMutate:function(t){var n=t.payload;return e({payload:n})}})},exports.usePostUserSettingsTables=function(){return Md((function(e){var t=e.payload,n=e.section;return Rp.getInstance().postUserSettingsTables(t,n)}),{onMutate:function(e){return e},onSuccess:function(t){var n=Fd.getQueryData(["fetch-profile"]);t.data&&Fd.setQueryData(["fetch-profile"],e.__assign(e.__assign({},n),{settings:t.data}))}})},exports.usePostUserThemeSettings=function(){return Md((function(e){return Rp.getInstance().postUserThemeSettings(e)}))},exports.usePostValideStatusConnection=function(){return Md(["post-validate-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Rp.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 Nd(["velocity-rules",e],(function(){var t=Rp.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 Nd(["webhook-logs",t],(function(){return Rp.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 Md((function(e){var t=e.payload;return Rp.getInstance().postWebhookV2MultiAccount({payload:t})}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useProviderConversionRatesData=function(){return Nd(["smart-routing-conversion-rates"],(function(){return Rp.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 Md((function(e){var t=e.transactionCode,n=e.payload;return Rp.getInstance().postProviderRawResponse(t,n)}))},exports.usePublishVersion=function(t,n){var o=this,r=t.versionCode,a=t.accountCode,i=t.organizationCode;return void 0===n&&(n=null),Md((function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Rp.getInstance().postSmartRoutingPublishVersion(a,r,i).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}),n)},exports.usePutAccountPrincipal=function(){return Md((function(e){var t=e.account_code;return Rp.getInstance().putAccountPrincipal({account_code:t})}))},exports.usePutAccountsUserMassive=function(){return Md((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Rp.getInstance().putAccountsUserMassive(t,n,o)}))},exports.usePutBlackListType=function(){return Md(["put-blacklist"],(function(e){return Rp.getInstance().putBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.usePutCosts=function(){return Md((function(e){return Rp.getInstance().putCosts(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})},exports.usePutOrganizationConfigsByAccount=function(){return Md((function(e){return Rp.getInstance().putOrganizationConfigsByAccount(e)}))},exports.useRecoveredPaymentsByDay=function(t,n){return Nd(e.__assign({queryKey:["smart-recovery-recovered-payments-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,o,r;return e.__generator(this,(function(e){switch(e.label){case 0:return n=Rp.getInstance(),o={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",o)];case 1:return r=e.sent(),[2,Zd(r.data,o.start_date,o.end_date)]}}))}))},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useRecoveredTPVByDay=function(t,n){return Nd(e.__assign({queryKey:["smart-recovery-recovered-tpv-by-day",t],queryFn:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var n,o,r;return e.__generator(this,(function(e){switch(e.label){case 0:return n=Rp.getInstance(),o={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",o)];case 1:return r=e.sent(),[2,Yd(r.data,o.start_date,o.end_date)]}}))}))},enabled:!!t.organization_code,staleTime:3e5},n))},exports.useRescheduleSubscription=function(){return Md(["post-reschedule-subscription"],(function(e){var t=e.subscriptionCode;return Rp.getInstance().postRescheduleSubscription(t).then((function(e){return null==e?void 0:e.data}))}))},exports.useResendWebhooks=function(){return Md((function(e){var t=e.codes;return Rp.getInstance().postResendWebhooks({codes:t}).then((function(e){return null==e?void 0:e.data}))}))},exports.useResumeSubscription=function(){return Md(["post-resume-subscription"],(function(e){var t=e.subscriptionCode;return Rp.getInstance().postResumeSubscription(t).then((function(e){return null==e?void 0:e.data}))}))},exports.useRetryDuplicateAccount=function(){return Md((function(e){return Rp.getInstance().retryDuplicateAccount(e)}))},exports.useSaveVersion=function(e,t){var n=e.data,o=e.accountCode;return void 0===t&&(t=null),Md((function(){return Rp.getInstance().putSmartRoutingUpdateWorkflow(o,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),t)},exports.useSearchScheduleById=function(t,n,o){var r=this;return Nd(["POST/template-reporting/schedule-by-id/search",t,n],(function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().searchReportScheduleById(t,n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:o&&!!t,useErrorBoundary:!1,cacheTime:0})},exports.useSearchSchedules=function(t,n){var o=this;return Nd(["POST/template-reporting/schedules/search",t],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().searchReportSchedules(t).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:n,useErrorBoundary:!1,cacheTime:0})},exports.useSearchTemplateById=function(t,n,o){var r=this;return Nd(["POST/template-reporting/template-by-id/search",t,n],(function(){return e.__awaiter(r,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().searchReportTemplateById(t,n).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:o&&!!t,useErrorBoundary:!1,cacheTime:0})},exports.useSearchTemplates=function(t,n){var o=this;return Nd(["POST/template-reporting/templates/search",t],(function(){return e.__awaiter(o,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().searchReportTemplates(t).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:n,useErrorBoundary:!1,cacheTime:0})},exports.useSendPaymentNotification=function(t,n,o){var r=this,a=Rp.getInstance();return Nd(["send-payment-notification",t,n],(function(){return e.__awaiter(r,void 0,void 0,(function(){var r,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 r=e.sent(),o.onSuccess(),[2,r.data];case 2:throw i=e.sent(),o.onError(),i;case 3:return[2]}}))}))}),{enabled:o.enabled,cacheTime:0,useErrorBoundary:!1})},exports.useSetCustodian=function(){return Md((function(){return Rp.getInstance().setCustodian().then((function(e){return null==e?void 0:e.data}))}))},exports.useSmartRoutingCreateDeclinedGroup=function(e){var t=e.accountCode;return Md((function(e){return void 0===e&&(e=null),Rp.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,o=e.name,r=e.accountCode;return void 0===t&&(t=null),Md((function(){return Rp.getInstance().putSmartRoutingUpdateWorkflowName(r,{code:n,name:o}).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useSmartRoutingMultiAccountDeclinedGroupCreate=function(t,n){return void 0===n&&(n={}),Md((function(e){var n=e.payload;return Rp.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={}),Md((function(e){var n=e.declinedGroupCode;return Rp.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,o=e.workflowVersionCode;return void 0===t&&(t=null),Md((function(e){return Rp.getInstance().simulateSmartRoutingTransaction(n,o,e).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useSmartRoutingToggleFavorite=function(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Md((function(e){return void 0===e&&(e=!1),Rp.getInstance().updateSmartRoutingFavorite(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useSmartRoutingUpdateDeclinedGroup=function(e,t){var n=e.declinedId,o=e.accountCode;return void 0===t&&(t=null),Md((function(e){return void 0===e&&(e=null),Rp.getInstance().updateSmartRoutingDeclinedGroup(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useSmartRoutingUpdateMonitorRedistribution=function(e,t){return void 0===t&&(t=null),Md((function(t){return Rp.getInstance().updateMonitorRedistribution(e,t).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useToggleMethod=function(e,t){var n=e.paymentMethod,o=e.active,r=e.accountCode;return void 0===t&&(t=null),Md((function(){return Rp.getInstance().putSmartRoutingToggleMethod(r,n,o).then((function(e){return null==e?void 0:e.data}))}),t)},exports.useUnInviteUsersV2=function(){return Md((function(e){var t=e.userCode,n=e.organizationCode;return Rp.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})}))},exports.useUnrollUserV2=function(){return Md((function(e){return Rp.getInstance().unrollMfa(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateCheckoutTemplate=function(){return Md((function(e){var t=e.accountCode,n=e.template;return Rp.getInstance().updateCheckoutTemplate({accountCode:t,template:n}).then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateIsActiveCheckout=function(e){return Md((function(e){return Rp.getInstance().updateIsActiveCheckout(e)}),e)},exports.useUpdateMFAConfig=function(){return Md((function(e){var t=e.payload,n=e.organizationCode;return Rp.getInstance().updateMFAConfig(t,n)}))},exports.useUpdateOrganizationStatus=function(){return Md(["patch-organizations"],(function(){return Rp.getInstance().updateOrganizationStatus().then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateProfile=function(e){return Md((function(e){return Rp.getInstance().updateProfile(e)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useUpdateReconciliationAlert=function(){return Md(["UPDATE/reconciliation/alerts"],(function(e){return Rp.getInstance().updateReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){Fd.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})},exports.useUpdateReconciliationReportTemplate=function(e){return Md((function(){return Rp.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 Md((function(){return Rp.getInstance().updateReportTemplate(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateSamlConfig=function(){return Md((function(e){return Rp.getInstance().updateSamlConfig(e)}))},exports.useUpdateScheduledReport=function(){return Md((function(e){var t=e.reportCode,n=e.payload;return Rp.getInstance().updateScheduledReport(t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useUpdateStylingTheme=function(){return Md((function(e){var t=e.accountCode,n=e.theme;return Rp.getInstance().updateStylingTheme({accountCode:t,theme:n}).then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateSubscription=function(){return Md(["patch-subscription"],(function(e){var t=e.subscriptionCode,n=e.payload;return Rp.getInstance().patchSubscription(t,n).then((function(e){return null==e?void 0:e.data}))}))},exports.useUpdateTemplateSelection=function(){var t=this;return Md(["PATCH/template-reporting/report-templates/selection"],(function(n){var o=n.templateId,r=n.payload;return e.__awaiter(t,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,Rp.getInstance().updateTemplateSelection(o,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onSuccess:function(){Fd.invalidateQueries({queryKey:["POST/template-reporting/templates/search"]})},useErrorBoundary:!1})},exports.useUpdateWebhookV2=function(e){return Md((function(e){var t=e.code,n=e.payload,o=e.accountCode;return Rp.getInstance().updateWebhookV2(t,n,o)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})},exports.useUploadBatchRefundsFileV2=function(e){var n=e.fileName,o=e.onSuccess,r=e.onError,a=t.useState(0),i=a[0],s=a[1],u=t.useRef({cancel:function(){return null}}),c=Md(["upload-file-chargeback",n],(function(e){var t=Rp.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:s}),n=t.promise,a=t.cancel;return u.current.cancel=a,n.then((function(e){return null==o||o(null==e?void 0:e.data),null==e?void 0:e.data})).catch((function(e){throw null==r||r(),e}))}),{useErrorBoundary:!1});return{mutation:c,cancelRequest:u.current.cancel,progress:i}},exports.useUploadBatchRefundsV2=function(){return Md((function(e){return Rp.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=Md(["upload-file"],(function(t){var n=Rp.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),o=n.promise,r=n.cancel;return e.current.cancel=r,o.then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}));return{mutation:n,cancelRequest:e.current.cancel}},exports.useValiateAllowlistItems=function(){return Md(["validate-allowlist-items"],(function(e){return Rp.getInstance().validateAllowlistItems({payload:e}).then((function(e){return e.data})).catch((function(e){return e}))}))},exports.useValidateBlockListItems=function(){return Md(["valiate-blacklist-items"],(function(e){return Rp.getInstance().valiateBlockListItems({payload:e}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))},exports.useValidateCredentials=function(){return Md((function(e){return Rp.getInstance().postValidateCredentials(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))},exports.useValidateOrgName=function(){return Md((function(e){return Rp.getInstance().getOrgByName(e).then((function(e){return null==e?void 0:e.data}))}))},exports.useValidatePasswordStatus=function(){return Md((function(){return Rp.getInstance().validatePasswordStatus().then((function(e){return null==e?void 0:e.data})).catch((function(e){return{valid:!1}}))}))},exports.useViewMoreMetrics=function(e,t){return Nd(["get-insights-conversion-rate-view-more-metrics",t,e],(function(){return Rp.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})};
234
234
  //# sourceMappingURL=index.js.map