@kadoa/node-sdk 0.19.4-beta.2 → 0.19.4-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.
@@ -1,10 +1,10 @@
1
- var KadoaSDK=(function(exports,L){'use strict';function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var L__default=/*#__PURE__*/_interopDefault(L);var Ks=Object.create;var Ht=Object.defineProperty;var $s=Object.getOwnPropertyDescriptor;var zs=Object.getOwnPropertyNames;var Qs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var Xs=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var Kt=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Zs=(o,e)=>{for(var t in e)Ht(o,t,{get:e[t],enumerable:true});},ea=(o,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of zs(e))!Ys.call(o,a)&&a!==t&&Ht(o,a,{get:()=>e[a],enumerable:!(s=$s(e,a))||s.enumerable});return o};var ta=(o,e,t)=>(t=o!=null?Ks(Qs(o)):{},ea(!o||!o.__esModule?Ht(t,"default",{value:o,enumerable:true}):t,o));var Vs=Kt((qc,ks)=>{var Fe=1e3,Ue=Fe*60,Be=Ue*60,xe=Be*24,ki=xe*7,Vi=xe*365.25;ks.exports=function(o,e){e=e||{};var t=typeof o;if(t==="string"&&o.length>0)return vi(o);if(t==="number"&&isFinite(o))return e.long?Pi(o):Si(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function vi(o){if(o=String(o),!(o.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(e){var t=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case "years":case "year":case "yrs":case "yr":case "y":return t*Vi;case "weeks":case "week":case "w":return t*ki;case "days":case "day":case "d":return t*xe;case "hours":case "hour":case "hrs":case "hr":case "h":return t*Be;case "minutes":case "minute":case "mins":case "min":case "m":return t*Ue;case "seconds":case "second":case "secs":case "sec":case "s":return t*Fe;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return t;default:return}}}}function Si(o){var e=Math.abs(o);return e>=xe?Math.round(o/xe)+"d":e>=Be?Math.round(o/Be)+"h":e>=Ue?Math.round(o/Ue)+"m":e>=Fe?Math.round(o/Fe)+"s":o+"ms"}function Pi(o){var e=Math.abs(o);return e>=xe?Gt(o,e,xe,"day"):e>=Be?Gt(o,e,Be,"hour"):e>=Ue?Gt(o,e,Ue,"minute"):e>=Fe?Gt(o,e,Fe,"second"):o+" ms"}function Gt(o,e,t,s){var a=e>=t*1.5;return Math.round(o/t)+" "+s+(a?"s":"")}});var Ss=Kt((Nc,vs)=>{function Wi(o){t.debug=t,t.default=t,t.coerce=l,t.disable=n,t.enable=a,t.enabled=r,t.humanize=Vs(),t.destroy=d,Object.keys(o).forEach(c=>{t[c]=o[c];}),t.names=[],t.skips=[],t.formatters={};function e(c){let p=0;for(let m=0;m<c.length;m++)p=(p<<5)-p+c.charCodeAt(m),p|=0;return t.colors[Math.abs(p)%t.colors.length]}t.selectColor=e;function t(c){let p,m=null,h,f;function R(...w){if(!R.enabled)return;let b=R,D=Number(new Date),N=D-(p||D);b.diff=N,b.prev=p,b.curr=D,p=D,w[0]=t.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let q=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(ee,J)=>{if(ee==="%%")return "%";q++;let Ve=t.formatters[J];if(typeof Ve=="function"){let ve=w[q];ee=Ve.call(b,ve),w.splice(q,1),q--;}return ee}),t.formatArgs.call(b,w),(b.log||t.log).apply(b,w);}return R.namespace=c,R.useColors=t.useColors(),R.color=t.selectColor(c),R.extend=s,R.destroy=t.destroy,Object.defineProperty(R,"enabled",{enumerable:true,configurable:false,get:()=>m!==null?m:(h!==t.namespaces&&(h=t.namespaces,f=t.enabled(c)),f),set:w=>{m=w;}}),typeof t.init=="function"&&t.init(R),R}function s(c,p){let m=t(this.namespace+(typeof p>"u"?":":p)+c);return m.log=this.log,m}function a(c){t.save(c),t.namespaces=c,t.names=[],t.skips=[];let p=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of p)m[0]==="-"?t.skips.push(m.slice(1)):t.names.push(m);}function i(c,p){let m=0,h=0,f=-1,R=0;for(;m<c.length;)if(h<p.length&&(p[h]===c[m]||p[h]==="*"))p[h]==="*"?(f=h,R=m,h++):(m++,h++);else if(f!==-1)h=f+1,R++,m=R;else return false;for(;h<p.length&&p[h]==="*";)h++;return h===p.length}function n(){let c=[...t.names,...t.skips.map(p=>"-"+p)].join(",");return t.enable(""),c}function r(c){for(let p of t.skips)if(i(c,p))return false;for(let p of t.names)if(i(c,p))return true;return false}function l(c){return c instanceof Error?c.stack||c.message:c}function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");}return t.enable(t.load()),t}vs.exports=Wi;});var Ps=Kt(($,Tt)=>{$.formatArgs=Di;$.save=Oi;$.load=Ei;$.useColors=bi;$.storage=qi();$.destroy=(()=>{let o=false;return ()=>{o||(o=true,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})();$.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function bi(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return true;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return false;let o;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(o=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(o[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Di(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+Tt.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;o.splice(1,0,e,"color: inherit");let t=0,s=0;o[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(t++,a==="%c"&&(s=t));}),o.splice(s,0,e);}$.log=console.debug||console.log||(()=>{});function Oi(o){try{o?$.storage.setItem("debug",o):$.storage.removeItem("debug");}catch{}}function Ei(){let o;try{o=$.storage.getItem("debug")||$.storage.getItem("DEBUG");}catch{}return !o&&typeof process<"u"&&"env"in process&&(o=process.env.DEBUG),o}function qi(){try{return localStorage}catch{}}Tt.exports=Ss()($);var{formatters:Ni}=Tt.exports;Ni.j=function(o){try{return JSON.stringify(o)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};});function Me(o,e){return function(){return o.apply(e,arguments)}}var{toString:oa}=Object.prototype,{getPrototypeOf:zt}=Object,{iterator:Ct,toStringTag:Fo}=Symbol,At=(o=>e=>{let t=oa.call(e);return o[t]||(o[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),te=o=>(o=o.toLowerCase(),e=>At(e)===o),xt=o=>e=>typeof e===o,{isArray:We}=Array,Pe=xt("undefined");function Je(o){return o!==null&&!Pe(o)&&o.constructor!==null&&!Pe(o.constructor)&&H(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}var Uo=te("ArrayBuffer");function sa(o){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(o):e=o&&o.buffer&&Uo(o.buffer),e}var aa=xt("string"),H=xt("function"),Bo=xt("number"),He=o=>o!==null&&typeof o=="object",ia=o=>o===true||o===false,yt=o=>{if(At(o)!=="object")return false;let e=zt(o);return (e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Fo in o)&&!(Ct in o)},na=o=>{if(!He(o)||Je(o))return false;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return false}},ra=te("Date"),la=te("File"),da=te("Blob"),ca=te("FileList"),pa=o=>He(o)&&H(o.pipe),ua=o=>{let e;return o&&(typeof FormData=="function"&&o instanceof FormData||H(o.append)&&((e=At(o))==="formdata"||e==="object"&&H(o.toString)&&o.toString()==="[object FormData]"))},fa=te("URLSearchParams"),[ma,wa,Ra,ha]=["ReadableStream","Request","Response","Headers"].map(te),ga=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ke(o,e,{allOwnKeys:t=false}={}){if(o===null||typeof o>"u")return;let s,a;if(typeof o!="object"&&(o=[o]),We(o))for(s=0,a=o.length;s<a;s++)e.call(null,o[s],s,o);else {if(Je(o))return;let i=t?Object.getOwnPropertyNames(o):Object.keys(o),n=i.length,r;for(s=0;s<n;s++)r=i[s],e.call(null,o[r],r,o);}}function Lo(o,e){if(Je(o))return null;e=e.toLowerCase();let t=Object.keys(o),s=t.length,a;for(;s-- >0;)if(a=t[s],e===a.toLowerCase())return a;return null}var Ce=typeof globalThis<"u"?globalThis:typeof self<"u"?self:window,_o=o=>!Pe(o)&&o!==Ce;function $t(){let{caseless:o,skipUndefined:e}=_o(this)&&this||{},t={},s=(a,i)=>{let n=o&&Lo(t,i)||i;yt(t[n])&&yt(a)?t[n]=$t(t[n],a):yt(a)?t[n]=$t({},a):We(a)?t[n]=a.slice():(!e||!Pe(a))&&(t[n]=a);};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Ke(arguments[a],s);return t}var ya=(o,e,t,{allOwnKeys:s}={})=>(Ke(e,(a,i)=>{t&&H(a)?o[i]=Me(a,t):o[i]=a;},{allOwnKeys:s}),o),Ca=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),Aa=(o,e,t,s)=>{o.prototype=Object.create(e.prototype,s),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:e.prototype}),t&&Object.assign(o.prototype,t);},xa=(o,e,t,s)=>{let a,i,n,r={};if(e=e||{},o==null)return e;do{for(a=Object.getOwnPropertyNames(o),i=a.length;i-- >0;)n=a[i],(!s||s(n,o,e))&&!r[n]&&(e[n]=o[n],r[n]=true);o=t!==false&&zt(o);}while(o&&(!t||t(o,e))&&o!==Object.prototype);return e},Ia=(o,e,t)=>{o=String(o),(t===void 0||t>o.length)&&(t=o.length),t-=e.length;let s=o.indexOf(e,t);return s!==-1&&s===t},ka=o=>{if(!o)return null;if(We(o))return o;let e=o.length;if(!Bo(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=o[e];return t},Va=(o=>e=>o&&e instanceof o)(typeof Uint8Array<"u"&&zt(Uint8Array)),va=(o,e)=>{let s=(o&&o[Ct]).call(o),a;for(;(a=s.next())&&!a.done;){let i=a.value;e.call(o,i[0],i[1]);}},Sa=(o,e)=>{let t,s=[];for(;(t=o.exec(e))!==null;)s.push(t);return s},Pa=te("HTMLFormElement"),Wa=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,s,a){return s.toUpperCase()+a}),To=(({hasOwnProperty:o})=>(e,t)=>o.call(e,t))(Object.prototype),ba=te("RegExp"),jo=(o,e)=>{let t=Object.getOwnPropertyDescriptors(o),s={};Ke(t,(a,i)=>{let n;(n=e(a,i,o))!==false&&(s[i]=n||a);}),Object.defineProperties(o,s);},Da=o=>{jo(o,(e,t)=>{if(H(o)&&["arguments","caller","callee"].indexOf(t)!==-1)return false;let s=o[t];if(H(s)){if(e.enumerable=false,"writable"in e){e.writable=false;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")});}});},Oa=(o,e)=>{let t={},s=a=>{a.forEach(i=>{t[i]=true;});};return We(o)?s(o):s(String(o).split(e)),t},Ea=()=>{},qa=(o,e)=>o!=null&&Number.isFinite(o=+o)?o:e;function Na(o){return !!(o&&H(o.append)&&o[Fo]==="FormData"&&o[Ct])}var Ga=o=>{let e=new Array(10),t=(s,a)=>{if(He(s)){if(e.indexOf(s)>=0)return;if(Je(s))return s;if(!("toJSON"in s)){e[a]=s;let i=We(s)?[]:{};return Ke(s,(n,r)=>{let l=t(n,a+1);!Pe(l)&&(i[r]=l);}),e[a]=void 0,i}}return s};return t(o,0)},Ta=te("AsyncFunction"),Fa=o=>o&&(He(o)||H(o))&&H(o.then)&&H(o.catch),Mo=((o,e)=>o?setImmediate:e?((t,s)=>(Ce.addEventListener("message",({source:a,data:i})=>{a===Ce&&i===t&&s.length&&s.shift()();},false),a=>{s.push(a),Ce.postMessage(t,"*");}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",H(Ce.postMessage)),Ua=typeof queueMicrotask<"u"?queueMicrotask.bind(Ce):typeof process<"u"&&process.nextTick||Mo,Ba=o=>o!=null&&H(o[Ct]),u={isArray:We,isArrayBuffer:Uo,isBuffer:Je,isFormData:ua,isArrayBufferView:sa,isString:aa,isNumber:Bo,isBoolean:ia,isObject:He,isPlainObject:yt,isEmptyObject:na,isReadableStream:ma,isRequest:wa,isResponse:Ra,isHeaders:ha,isUndefined:Pe,isDate:ra,isFile:la,isBlob:da,isRegExp:ba,isFunction:H,isStream:pa,isURLSearchParams:fa,isTypedArray:Va,isFileList:ca,forEach:Ke,merge:$t,extend:ya,trim:ga,stripBOM:Ca,inherits:Aa,toFlatObject:xa,kindOf:At,kindOfTest:te,endsWith:Ia,toArray:ka,forEachEntry:va,matchAll:Sa,isHTMLForm:Pa,hasOwnProperty:To,hasOwnProp:To,reduceDescriptors:jo,freezeMethods:Da,toObjectSet:Oa,toCamelCase:Wa,noop:Ea,toFiniteNumber:qa,findKey:Lo,global:Ce,isContextDefined:_o,isSpecCompliantForm:Na,toJSONObject:Ga,isAsyncFn:Ta,isThenable:Fa,setImmediate:Mo,asap:Ua,isIterable:Ba};function be(o,e,t,s,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),s&&(this.request=s),a&&(this.response=a,this.status=a.status?a.status:null);}u.inherits(be,Error,{toJSON:function(){return {message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.status}}});var Jo=be.prototype,Ho={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(o=>{Ho[o]={value:o};});Object.defineProperties(be,Ho);Object.defineProperty(Jo,"isAxiosError",{value:true});be.from=(o,e,t,s,a,i)=>{let n=Object.create(Jo);u.toFlatObject(o,n,function(c){return c!==Error.prototype},d=>d!=="isAxiosError");let r=o&&o.message?o.message:"Error",l=e==null&&o?o.code:e;return be.call(n,r,l,t,s,a),o&&n.cause==null&&Object.defineProperty(n,"cause",{value:o,configurable:true}),n.name=o&&o.name||"Error",i&&Object.assign(n,i),n};var W=be;var It=null;function Qt(o){return u.isPlainObject(o)||u.isArray(o)}function $o(o){return u.endsWith(o,"[]")?o.slice(0,-2):o}function Ko(o,e,t){return o?o.concat(e).map(function(a,i){return a=$o(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function La(o){return u.isArray(o)&&!o.some(Qt)}var _a=u.toFlatObject(u,{},null,function(e){return /^is[A-Z]/.test(e)});function ja(o,e,t){if(!u.isObject(o))throw new TypeError("target must be an object");e=e||new(FormData),t=u.toFlatObject(t,{metaTokens:true,dots:false,indexes:false},false,function(R,w){return !u.isUndefined(w[R])});let s=t.metaTokens,a=t.visitor||c,i=t.dots,n=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(e);if(!u.isFunction(a))throw new TypeError("visitor must be a function");function d(f){if(f===null)return "";if(u.isDate(f))return f.toISOString();if(u.isBoolean(f))return f.toString();if(!l&&u.isBlob(f))throw new W("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(f)||u.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function c(f,R,w){let b=f;if(f&&!w&&typeof f=="object"){if(u.endsWith(R,"{}"))R=s?R:R.slice(0,-2),f=JSON.stringify(f);else if(u.isArray(f)&&La(f)||(u.isFileList(f)||u.endsWith(R,"[]"))&&(b=u.toArray(f)))return R=$o(R),b.forEach(function(N,q){!(u.isUndefined(N)||N===null)&&e.append(n===true?Ko([R],q,i):n===null?R:R+"[]",d(N));}),false}return Qt(f)?true:(e.append(Ko(w,R,i),d(f)),false)}let p=[],m=Object.assign(_a,{defaultVisitor:c,convertValue:d,isVisitable:Qt});function h(f,R){if(!u.isUndefined(f)){if(p.indexOf(f)!==-1)throw Error("Circular reference detected in "+R.join("."));p.push(f),u.forEach(f,function(b,D){(!(u.isUndefined(b)||b===null)&&a.call(e,b,u.isString(D)?D.trim():D,R,m))===true&&h(b,R?R.concat(D):[D]);}),p.pop();}}if(!u.isObject(o))throw new TypeError("data must be an object");return h(o),e}var fe=ja;function zo(o){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Qo(o,e){this._pairs=[],o&&fe(o,this,e);}var Yo=Qo.prototype;Yo.append=function(e,t){this._pairs.push([e,t]);};Yo.toString=function(e){let t=e?function(s){return e.call(this,s,zo)}:zo;return this._pairs.map(function(a){return t(a[0])+"="+t(a[1])},"").join("&")};var kt=Qo;function Ma(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function $e(o,e,t){if(!e)return o;let s=t&&t.encode||Ma;u.isFunction(t)&&(t={serialize:t});let a=t&&t.serialize,i;if(a?i=a(e,t):i=u.isURLSearchParams(e)?e.toString():new kt(e,t).toString(s),i){let n=o.indexOf("#");n!==-1&&(o=o.slice(0,n)),o+=(o.indexOf("?")===-1?"?":"&")+i;}return o}var Yt=class{constructor(){this.handlers=[];}use(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:s?s.synchronous:false,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null);}clear(){this.handlers&&(this.handlers=[]);}forEach(e){u.forEach(this.handlers,function(s){s!==null&&e(s);});}},Xt=Yt;var Vt={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Xo=typeof URLSearchParams<"u"?URLSearchParams:kt;var Zo=typeof FormData<"u"?FormData:null;var es=typeof Blob<"u"?Blob:null;var ts={isBrowser:true,classes:{URLSearchParams:Xo,FormData:Zo,Blob:es},protocols:["http","https","file","blob","url","data"]};var to={};Zs(to,{hasBrowserEnv:()=>eo,hasStandardBrowserEnv:()=>Ja,hasStandardBrowserWebWorkerEnv:()=>Ha,navigator:()=>Zt,origin:()=>Ka});var eo=typeof window<"u"&&typeof document<"u",Zt=typeof navigator=="object"&&navigator||void 0,Ja=eo&&(!Zt||["ReactNative","NativeScript","NS"].indexOf(Zt.product)<0),Ha=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ka=eo&&window.location.href||"http://localhost";var G={...to,...ts};function oo(o,e){return fe(o,new G.classes.URLSearchParams,{visitor:function(t,s,a,i){return G.isNode&&u.isBuffer(t)?(this.append(s,t.toString("base64")),false):i.defaultVisitor.apply(this,arguments)},...e})}function $a(o){return u.matchAll(/\w+|\[(\w*)]/g,o).map(e=>e[0]==="[]"?"":e[1]||e[0])}function za(o){let e={},t=Object.keys(o),s,a=t.length,i;for(s=0;s<a;s++)i=t[s],e[i]=o[i];return e}function Qa(o){function e(t,s,a,i){let n=t[i++];if(n==="__proto__")return true;let r=Number.isFinite(+n),l=i>=t.length;return n=!n&&u.isArray(a)?a.length:n,l?(u.hasOwnProp(a,n)?a[n]=[a[n],s]:a[n]=s,!r):((!a[n]||!u.isObject(a[n]))&&(a[n]=[]),e(t,s,a[n],i)&&u.isArray(a[n])&&(a[n]=za(a[n])),!r)}if(u.isFormData(o)&&u.isFunction(o.entries)){let t={};return u.forEachEntry(o,(s,a)=>{e($a(s),a,t,0);}),t}return null}var vt=Qa;function Ya(o,e,t){if(u.isString(o))try{return (e||JSON.parse)(o),u.trim(o)}catch(s){if(s.name!=="SyntaxError")throw s}return (t||JSON.stringify)(o)}var so={transitional:Vt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let s=t.getContentType()||"",a=s.indexOf("application/json")>-1,i=u.isObject(e);if(i&&u.isHTMLForm(e)&&(e=new FormData(e)),u.isFormData(e))return a?JSON.stringify(vt(e)):e;if(u.isArrayBuffer(e)||u.isBuffer(e)||u.isStream(e)||u.isFile(e)||u.isBlob(e)||u.isReadableStream(e))return e;if(u.isArrayBufferView(e))return e.buffer;if(u.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",false),e.toString();let r;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return oo(e,this.formSerializer).toString();if((r=u.isFileList(e))||s.indexOf("multipart/form-data")>-1){let l=this.env&&this.env.FormData;return fe(r?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||a?(t.setContentType("application/json",false),Ya(e)):e}],transformResponse:[function(e){let t=this.transitional||so.transitional,s=t&&t.forcedJSONParsing,a=this.responseType==="json";if(u.isResponse(e)||u.isReadableStream(e))return e;if(e&&u.isString(e)&&(s&&!this.responseType||a)){let n=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e,this.parseReviver)}catch(r){if(n)throw r.name==="SyntaxError"?W.from(r,W.ERR_BAD_RESPONSE,this,null,this.response):r}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:G.classes.FormData,Blob:G.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],o=>{so.headers[o]={};});var De=so;var Xa=u.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),os=o=>{let e={},t,s,a;return o&&o.split(`
2
- `).forEach(function(n){a=n.indexOf(":"),t=n.substring(0,a).trim().toLowerCase(),s=n.substring(a+1).trim(),!(!t||e[t]&&Xa[t])&&(t==="set-cookie"?e[t]?e[t].push(s):e[t]=[s]:e[t]=e[t]?e[t]+", "+s:s);}),e};var ss=Symbol("internals");function ze(o){return o&&String(o).trim().toLowerCase()}function St(o){return o===false||o==null?o:u.isArray(o)?o.map(St):String(o)}function Za(o){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,s;for(;s=t.exec(o);)e[s[1]]=s[2];return e}var ei=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function ao(o,e,t,s,a){if(u.isFunction(s))return s.call(this,e,t);if(a&&(e=t),!!u.isString(e)){if(u.isString(s))return e.indexOf(s)!==-1;if(u.isRegExp(s))return s.test(e)}}function ti(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,s)=>t.toUpperCase()+s)}function oi(o,e){let t=u.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(o,s+t,{value:function(a,i,n){return this[s].call(this,e,a,i,n)},configurable:true});});}var Oe=class{constructor(e){e&&this.set(e);}set(e,t,s){let a=this;function i(r,l,d){let c=ze(l);if(!c)throw new Error("header name must be a non-empty string");let p=u.findKey(a,c);(!p||a[p]===void 0||d===true||d===void 0&&a[p]!==false)&&(a[p||l]=St(r));}let n=(r,l)=>u.forEach(r,(d,c)=>i(d,c,l));if(u.isPlainObject(e)||e instanceof this.constructor)n(e,t);else if(u.isString(e)&&(e=e.trim())&&!ei(e))n(os(e),t);else if(u.isObject(e)&&u.isIterable(e)){let r={},l,d;for(let c of e){if(!u.isArray(c))throw TypeError("Object iterator must return a key-value pair");r[d=c[0]]=(l=r[d])?u.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1];}n(r,t);}else e!=null&&i(t,e,s);return this}get(e,t){if(e=ze(e),e){let s=u.findKey(this,e);if(s){let a=this[s];if(!t)return a;if(t===true)return Za(a);if(u.isFunction(t))return t.call(this,a,s);if(u.isRegExp(t))return t.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ze(e),e){let s=u.findKey(this,e);return !!(s&&this[s]!==void 0&&(!t||ao(this,this[s],s,t)))}return false}delete(e,t){let s=this,a=false;function i(n){if(n=ze(n),n){let r=u.findKey(s,n);r&&(!t||ao(s,s[r],r,t))&&(delete s[r],a=true);}}return u.isArray(e)?e.forEach(i):i(e),a}clear(e){let t=Object.keys(this),s=t.length,a=false;for(;s--;){let i=t[s];(!e||ao(this,this[i],i,e,true))&&(delete this[i],a=true);}return a}normalize(e){let t=this,s={};return u.forEach(this,(a,i)=>{let n=u.findKey(s,i);if(n){t[n]=St(a),delete t[i];return}let r=e?ti(i):String(i).trim();r!==i&&delete t[i],t[r]=St(a),s[r]=true;}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return u.forEach(this,(s,a)=>{s!=null&&s!==false&&(t[a]=e&&u.isArray(s)?s.join(", "):s);}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return "AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let s=new this(e);return t.forEach(a=>s.set(a)),s}static accessor(e){let s=(this[ss]=this[ss]={accessors:{}}).accessors,a=this.prototype;function i(n){let r=ze(n);s[r]||(oi(a,n),s[r]=true);}return u.isArray(e)?e.forEach(i):i(e),this}};Oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);u.reduceDescriptors(Oe.prototype,({value:o},e)=>{let t=e[0].toUpperCase()+e.slice(1);return {get:()=>o,set(s){this[t]=s;}}});u.freezeMethods(Oe);var B=Oe;function Qe(o,e){let t=this||De,s=e||t,a=B.from(s.headers),i=s.data;return u.forEach(o,function(r){i=r.call(t,i,a.normalize(),e?e.status:void 0);}),a.normalize(),i}function Ye(o){return !!(o&&o.__CANCEL__)}function as(o,e,t){W.call(this,o??"canceled",W.ERR_CANCELED,e,t),this.name="CanceledError";}u.inherits(as,W,{__CANCEL__:true});var ae=as;function Xe(o,e,t){let s=t.config.validateStatus;!t.status||!s||s(t.status)?o(t):e(new W("Request failed with status code "+t.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t));}function io(o){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return e&&e[1]||""}function si(o,e){o=o||10;let t=new Array(o),s=new Array(o),a=0,i=0,n;return e=e!==void 0?e:1e3,function(l){let d=Date.now(),c=s[i];n||(n=d),t[a]=l,s[a]=d;let p=i,m=0;for(;p!==a;)m+=t[p++],p=p%o;if(a=(a+1)%o,a===i&&(i=(i+1)%o),d-n<e)return;let h=c&&d-c;return h?Math.round(m*1e3/h):void 0}}var is=si;function ai(o,e){let t=0,s=1e3/e,a,i,n=(d,c=Date.now())=>{t=c,a=null,i&&(clearTimeout(i),i=null),o(...d);};return [(...d)=>{let c=Date.now(),p=c-t;p>=s?n(d,c):(a=d,i||(i=setTimeout(()=>{i=null,n(a);},s-p)));},()=>a&&n(a)]}var ns=ai;var Ee=(o,e,t=3)=>{let s=0,a=is(50,250);return ns(i=>{let n=i.loaded,r=i.lengthComputable?i.total:void 0,l=n-s,d=a(l),c=n<=r;s=n;let p={loaded:n,total:r,progress:r?n/r:void 0,bytes:l,rate:d||void 0,estimated:d&&r&&c?(r-n)/d:void 0,event:i,lengthComputable:r!=null,[e?"download":"upload"]:true};o(p);},t)},no=(o,e)=>{let t=o!=null;return [s=>e[0]({lengthComputable:t,total:o,loaded:s}),e[1]]},ro=o=>(...e)=>u.asap(()=>o(...e));var rs=G.hasStandardBrowserEnv?((o,e)=>t=>(t=new URL(t,G.origin),o.protocol===t.protocol&&o.host===t.host&&(e||o.port===t.port)))(new URL(G.origin),G.navigator&&/(msie|trident)/i.test(G.navigator.userAgent)):()=>true;var ls=G.hasStandardBrowserEnv?{write(o,e,t,s,a,i,n){if(typeof document>"u")return;let r=[`${o}=${encodeURIComponent(e)}`];u.isNumber(t)&&r.push(`expires=${new Date(t).toUTCString()}`),u.isString(s)&&r.push(`path=${s}`),u.isString(a)&&r.push(`domain=${a}`),i===true&&r.push("secure"),u.isString(n)&&r.push(`SameSite=${n}`),document.cookie=r.join("; ");},read(o){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+o+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(o){this.write(o,"",Date.now()-864e5,"/");}}:{write(){},read(){return null},remove(){}};function lo(o){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function co(o,e){return e?o.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):o}function Ze(o,e,t){let s=!lo(e);return o&&(s||t==false)?co(o,e):e}var ds=o=>o instanceof B?{...o}:o;function oe(o,e){e=e||{};let t={};function s(d,c,p,m){return u.isPlainObject(d)&&u.isPlainObject(c)?u.merge.call({caseless:m},d,c):u.isPlainObject(c)?u.merge({},c):u.isArray(c)?c.slice():c}function a(d,c,p,m){if(u.isUndefined(c)){if(!u.isUndefined(d))return s(void 0,d,p,m)}else return s(d,c,p,m)}function i(d,c){if(!u.isUndefined(c))return s(void 0,c)}function n(d,c){if(u.isUndefined(c)){if(!u.isUndefined(d))return s(void 0,d)}else return s(void 0,c)}function r(d,c,p){if(p in e)return s(d,c);if(p in o)return s(void 0,d)}let l={url:i,method:i,data:i,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:r,headers:(d,c,p)=>a(ds(d),ds(c),p,true)};return u.forEach(Object.keys({...o,...e}),function(c){let p=l[c]||a,m=p(o[c],e[c],c);u.isUndefined(m)&&p!==r||(t[c]=m);}),t}var Pt=o=>{let e=oe({},o),{data:t,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:i,headers:n,auth:r}=e;if(e.headers=n=B.from(n),e.url=$e(Ze(e.baseURL,e.url,e.allowAbsoluteUrls),o.params,o.paramsSerializer),r&&n.set("Authorization","Basic "+btoa((r.username||"")+":"+(r.password?unescape(encodeURIComponent(r.password)):""))),u.isFormData(t)){if(G.hasStandardBrowserEnv||G.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if(u.isFunction(t.getHeaders)){let l=t.getHeaders(),d=["content-type","content-length"];Object.entries(l).forEach(([c,p])=>{d.includes(c.toLowerCase())&&n.set(c,p);});}}if(G.hasStandardBrowserEnv&&(s&&u.isFunction(s)&&(s=s(e)),s||s!==false&&rs(e.url))){let l=a&&i&&ls.read(i);l&&n.set(a,l);}return e};var ii=typeof XMLHttpRequest<"u",cs=ii&&function(o){return new Promise(function(t,s){let a=Pt(o),i=a.data,n=B.from(a.headers).normalize(),{responseType:r,onUploadProgress:l,onDownloadProgress:d}=a,c,p,m,h,f;function R(){h&&h(),f&&f(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c);}let w=new XMLHttpRequest;w.open(a.method.toUpperCase(),a.url,true),w.timeout=a.timeout;function b(){if(!w)return;let N=B.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),M={data:!r||r==="text"||r==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:N,config:o,request:w};Xe(function(J){t(J),R();},function(J){s(J),R();},M),w=null;}"onloadend"in w?w.onloadend=b:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(b);},w.onabort=function(){w&&(s(new W("Request aborted",W.ECONNABORTED,o,w)),w=null);},w.onerror=function(q){let M=q&&q.message?q.message:"Network Error",ee=new W(M,W.ERR_NETWORK,o,w);ee.event=q||null,s(ee),w=null;},w.ontimeout=function(){let q=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",M=a.transitional||Vt;a.timeoutErrorMessage&&(q=a.timeoutErrorMessage),s(new W(q,M.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,o,w)),w=null;},i===void 0&&n.setContentType(null),"setRequestHeader"in w&&u.forEach(n.toJSON(),function(q,M){w.setRequestHeader(M,q);}),u.isUndefined(a.withCredentials)||(w.withCredentials=!!a.withCredentials),r&&r!=="json"&&(w.responseType=a.responseType),d&&([m,f]=Ee(d,true),w.addEventListener("progress",m)),l&&w.upload&&([p,h]=Ee(l),w.upload.addEventListener("progress",p),w.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(c=N=>{w&&(s(!N||N.type?new ae(null,o,w):N),w.abort(),w=null);},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));let D=io(a.url);if(D&&G.protocols.indexOf(D)===-1){s(new W("Unsupported protocol "+D+":",W.ERR_BAD_REQUEST,o));return}w.send(i||null);})};var ni=(o,e)=>{let{length:t}=o=o?o.filter(Boolean):[];if(e||t){let s=new AbortController,a,i=function(d){if(!a){a=true,r();let c=d instanceof Error?d:this.reason;s.abort(c instanceof W?c:new ae(c instanceof Error?c.message:c));}},n=e&&setTimeout(()=>{n=null,i(new W(`timeout ${e} of ms exceeded`,W.ETIMEDOUT));},e),r=()=>{o&&(n&&clearTimeout(n),n=null,o.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i);}),o=null);};o.forEach(d=>d.addEventListener("abort",i));let{signal:l}=s;return l.unsubscribe=()=>u.asap(r),l}},ps=ni;var ri=function*(o,e){let t=o.byteLength;if(t<e){yield o;return}let s=0,a;for(;s<t;)a=s+e,yield o.slice(s,a),s=a;},li=async function*(o,e){for await(let t of di(o))yield*ri(t,e);},di=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}let e=o.getReader();try{for(;;){let{done:t,value:s}=await e.read();if(t)break;yield s;}}finally{await e.cancel();}},po=(o,e,t,s)=>{let a=li(o,e),i=0,n,r=l=>{n||(n=true,s&&s(l));};return new ReadableStream({async pull(l){try{let{done:d,value:c}=await a.next();if(d){r(),l.close();return}let p=c.byteLength;if(t){let m=i+=p;t(m);}l.enqueue(new Uint8Array(c));}catch(d){throw r(d),d}},cancel(l){return r(l),a.return()}},{highWaterMark:2})};var us=64*1024,{isFunction:Wt}=u,ci=(({Request:o,Response:e})=>({Request:o,Response:e}))(u.global),{ReadableStream:fs,TextEncoder:ms}=u.global,ws=(o,...e)=>{try{return !!o(...e)}catch{return false}},pi=o=>{o=u.merge.call({skipUndefined:true},ci,o);let{fetch:e,Request:t,Response:s}=o,a=e?Wt(e):typeof fetch=="function",i=Wt(t),n=Wt(s);if(!a)return false;let r=a&&Wt(fs),l=a&&(typeof ms=="function"?(f=>R=>f.encode(R))(new ms):async f=>new Uint8Array(await new t(f).arrayBuffer())),d=i&&r&&ws(()=>{let f=!1,R=new t(G.origin,{body:new fs,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!R}),c=n&&r&&ws(()=>u.isReadableStream(new s("").body)),p={stream:c&&(f=>f.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!p[f]&&(p[f]=(R,w)=>{let b=R&&R[f];if(b)return b.call(R);throw new W(`Response type '${f}' is not supported`,W.ERR_NOT_SUPPORT,w)});});let m=async f=>{if(f==null)return 0;if(u.isBlob(f))return f.size;if(u.isSpecCompliantForm(f))return (await new t(G.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(u.isArrayBufferView(f)||u.isArrayBuffer(f))return f.byteLength;if(u.isURLSearchParams(f)&&(f=f+""),u.isString(f))return (await l(f)).byteLength},h=async(f,R)=>{let w=u.toFiniteNumber(f.getContentLength());return w??m(R)};return async f=>{let{url:R,method:w,data:b,signal:D,cancelToken:N,timeout:q,onDownloadProgress:M,onUploadProgress:ee,responseType:J,headers:Ve,withCredentials:ve="same-origin",fetchOptions:Do}=Pt(f),Oo=e||fetch;J=J?(J+"").toLowerCase():"text";let ht=ps([D,N&&N.toAbortSignal()],q),je=null,ye=ht&&ht.unsubscribe&&(()=>{ht.unsubscribe();}),Eo;try{if(ee&&d&&w!=="get"&&w!=="head"&&(Eo=await h(Ve,b))!==0){let ue=new t(R,{method:"POST",body:b,duplex:"half"}),Se;if(u.isFormData(b)&&(Se=ue.headers.get("content-type"))&&Ve.setContentType(Se),ue.body){let[Jt,gt]=no(Eo,Ee(ro(ee)));b=po(ue.body,us,Jt,gt);}}u.isString(ve)||(ve=ve?"include":"omit");let se=i&&"credentials"in t.prototype,qo={...Do,signal:ht,method:w.toUpperCase(),headers:Ve.normalize().toJSON(),body:b,duplex:"half",credentials:se?ve:void 0};je=i&&new t(R,qo);let pe=await(i?Oo(je,Do):Oo(R,qo)),No=c&&(J==="stream"||J==="response");if(c&&(M||No&&ye)){let ue={};["status","statusText","headers"].forEach(Go=>{ue[Go]=pe[Go];});let Se=u.toFiniteNumber(pe.headers.get("content-length")),[Jt,gt]=M&&no(Se,Ee(ro(M),!0))||[];pe=new s(po(pe.body,us,Jt,()=>{gt&&gt(),ye&&ye();}),ue);}J=J||"text";let Hs=await p[u.findKey(p,J)||"text"](pe,f);return !No&&ye&&ye(),await new Promise((ue,Se)=>{Xe(ue,Se,{data:Hs,headers:B.from(pe.headers),status:pe.status,statusText:pe.statusText,config:f,request:je});})}catch(se){throw ye&&ye(),se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)?Object.assign(new W("Network Error",W.ERR_NETWORK,f,je),{cause:se.cause||se}):W.from(se,se&&se.code,f,je)}}},ui=new Map,uo=o=>{let e=o&&o.env||{},{fetch:t,Request:s,Response:a}=e,i=[s,a,t],n=i.length,r=n,l,d,c=ui;for(;r--;)l=i[r],d=c.get(l),d===void 0&&c.set(l,d=r?new Map:pi(e)),c=d;return d};uo();var fo={http:It,xhr:cs,fetch:{get:uo}};u.forEach(fo,(o,e)=>{if(o){try{Object.defineProperty(o,"name",{value:e});}catch{}Object.defineProperty(o,"adapterName",{value:e});}});var Rs=o=>`- ${o}`,mi=o=>u.isFunction(o)||o===null||o===false;function wi(o,e){o=u.isArray(o)?o:[o];let{length:t}=o,s,a,i={};for(let n=0;n<t;n++){s=o[n];let r;if(a=s,!mi(s)&&(a=fo[(r=String(s)).toLowerCase()],a===void 0))throw new W(`Unknown adapter '${r}'`);if(a&&(u.isFunction(a)||(a=a.get(e))))break;i[r||"#"+n]=a;}if(!a){let n=Object.entries(i).map(([l,d])=>`adapter ${l} `+(d===false?"is not supported by the environment":"is not available in the build")),r=t?n.length>1?`since :
1
+ var KadoaSDK=(function(exports,_){'use strict';function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ___default=/*#__PURE__*/_interopDefault(_);var $s=Object.create;var Ht=Object.defineProperty;var zs=Object.getOwnPropertyDescriptor;var Qs=Object.getOwnPropertyNames;var Ys=Object.getPrototypeOf,Xs=Object.prototype.hasOwnProperty;var Zs=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var Kt=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),ea=(o,e)=>{for(var t in e)Ht(o,t,{get:e[t],enumerable:true});},ta=(o,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Qs(e))!Xs.call(o,a)&&a!==t&&Ht(o,a,{get:()=>e[a],enumerable:!(s=zs(e,a))||s.enumerable});return o};var oa=(o,e,t)=>(t=o!=null?$s(Ys(o)):{},ta(!o||!o.__esModule?Ht(t,"default",{value:o,enumerable:true}):t,o));var Vs=Kt((Nc,ks)=>{var Fe=1e3,Ue=Fe*60,Be=Ue*60,xe=Be*24,Vi=xe*7,vi=xe*365.25;ks.exports=function(o,e){e=e||{};var t=typeof o;if(t==="string"&&o.length>0)return Si(o);if(t==="number"&&isFinite(o))return e.long?Wi(o):Pi(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function Si(o){if(o=String(o),!(o.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(e){var t=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case "years":case "year":case "yrs":case "yr":case "y":return t*vi;case "weeks":case "week":case "w":return t*Vi;case "days":case "day":case "d":return t*xe;case "hours":case "hour":case "hrs":case "hr":case "h":return t*Be;case "minutes":case "minute":case "mins":case "min":case "m":return t*Ue;case "seconds":case "second":case "secs":case "sec":case "s":return t*Fe;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return t;default:return}}}}function Pi(o){var e=Math.abs(o);return e>=xe?Math.round(o/xe)+"d":e>=Be?Math.round(o/Be)+"h":e>=Ue?Math.round(o/Ue)+"m":e>=Fe?Math.round(o/Fe)+"s":o+"ms"}function Wi(o){var e=Math.abs(o);return e>=xe?Gt(o,e,xe,"day"):e>=Be?Gt(o,e,Be,"hour"):e>=Ue?Gt(o,e,Ue,"minute"):e>=Fe?Gt(o,e,Fe,"second"):o+" ms"}function Gt(o,e,t,s){var a=e>=t*1.5;return Math.round(o/t)+" "+s+(a?"s":"")}});var Ss=Kt((Gc,vs)=>{function bi(o){t.debug=t,t.default=t,t.coerce=l,t.disable=n,t.enable=a,t.enabled=r,t.humanize=Vs(),t.destroy=d,Object.keys(o).forEach(c=>{t[c]=o[c];}),t.names=[],t.skips=[],t.formatters={};function e(c){let p=0;for(let m=0;m<c.length;m++)p=(p<<5)-p+c.charCodeAt(m),p|=0;return t.colors[Math.abs(p)%t.colors.length]}t.selectColor=e;function t(c){let p,m=null,h,f;function R(...w){if(!R.enabled)return;let b=R,D=Number(new Date),N=D-(p||D);b.diff=N,b.prev=p,b.curr=D,p=D,w[0]=t.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let q=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(ee,J)=>{if(ee==="%%")return "%";q++;let Ve=t.formatters[J];if(typeof Ve=="function"){let ve=w[q];ee=Ve.call(b,ve),w.splice(q,1),q--;}return ee}),t.formatArgs.call(b,w),(b.log||t.log).apply(b,w);}return R.namespace=c,R.useColors=t.useColors(),R.color=t.selectColor(c),R.extend=s,R.destroy=t.destroy,Object.defineProperty(R,"enabled",{enumerable:true,configurable:false,get:()=>m!==null?m:(h!==t.namespaces&&(h=t.namespaces,f=t.enabled(c)),f),set:w=>{m=w;}}),typeof t.init=="function"&&t.init(R),R}function s(c,p){let m=t(this.namespace+(typeof p>"u"?":":p)+c);return m.log=this.log,m}function a(c){t.save(c),t.namespaces=c,t.names=[],t.skips=[];let p=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of p)m[0]==="-"?t.skips.push(m.slice(1)):t.names.push(m);}function i(c,p){let m=0,h=0,f=-1,R=0;for(;m<c.length;)if(h<p.length&&(p[h]===c[m]||p[h]==="*"))p[h]==="*"?(f=h,R=m,h++):(m++,h++);else if(f!==-1)h=f+1,R++,m=R;else return false;for(;h<p.length&&p[h]==="*";)h++;return h===p.length}function n(){let c=[...t.names,...t.skips.map(p=>"-"+p)].join(",");return t.enable(""),c}function r(c){for(let p of t.skips)if(i(c,p))return false;for(let p of t.names)if(i(c,p))return true;return false}function l(c){return c instanceof Error?c.stack||c.message:c}function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");}return t.enable(t.load()),t}vs.exports=bi;});var Ps=Kt(($,Tt)=>{$.formatArgs=Oi;$.save=Ei;$.load=qi;$.useColors=Di;$.storage=Ni();$.destroy=(()=>{let o=false;return ()=>{o||(o=true,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})();$.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Di(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return true;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return false;let o;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(o=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(o[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Oi(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+Tt.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;o.splice(1,0,e,"color: inherit");let t=0,s=0;o[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(t++,a==="%c"&&(s=t));}),o.splice(s,0,e);}$.log=console.debug||console.log||(()=>{});function Ei(o){try{o?$.storage.setItem("debug",o):$.storage.removeItem("debug");}catch{}}function qi(){let o;try{o=$.storage.getItem("debug")||$.storage.getItem("DEBUG");}catch{}return !o&&typeof process<"u"&&"env"in process&&(o=process.env.DEBUG),o}function Ni(){try{return localStorage}catch{}}Tt.exports=Ss()($);var{formatters:Gi}=Tt.exports;Gi.j=function(o){try{return JSON.stringify(o)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};});function Me(o,e){return function(){return o.apply(e,arguments)}}var{toString:sa}=Object.prototype,{getPrototypeOf:zt}=Object,{iterator:Ct,toStringTag:Fo}=Symbol,At=(o=>e=>{let t=sa.call(e);return o[t]||(o[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),te=o=>(o=o.toLowerCase(),e=>At(e)===o),xt=o=>e=>typeof e===o,{isArray:We}=Array,Pe=xt("undefined");function Je(o){return o!==null&&!Pe(o)&&o.constructor!==null&&!Pe(o.constructor)&&H(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}var Uo=te("ArrayBuffer");function aa(o){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(o):e=o&&o.buffer&&Uo(o.buffer),e}var ia=xt("string"),H=xt("function"),Bo=xt("number"),He=o=>o!==null&&typeof o=="object",na=o=>o===true||o===false,yt=o=>{if(At(o)!=="object")return false;let e=zt(o);return (e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Fo in o)&&!(Ct in o)},ra=o=>{if(!He(o)||Je(o))return false;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return false}},la=te("Date"),da=te("File"),ca=te("Blob"),pa=te("FileList"),ua=o=>He(o)&&H(o.pipe),fa=o=>{let e;return o&&(typeof FormData=="function"&&o instanceof FormData||H(o.append)&&((e=At(o))==="formdata"||e==="object"&&H(o.toString)&&o.toString()==="[object FormData]"))},ma=te("URLSearchParams"),[wa,Ra,ha,ga]=["ReadableStream","Request","Response","Headers"].map(te),ya=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ke(o,e,{allOwnKeys:t=false}={}){if(o===null||typeof o>"u")return;let s,a;if(typeof o!="object"&&(o=[o]),We(o))for(s=0,a=o.length;s<a;s++)e.call(null,o[s],s,o);else {if(Je(o))return;let i=t?Object.getOwnPropertyNames(o):Object.keys(o),n=i.length,r;for(s=0;s<n;s++)r=i[s],e.call(null,o[r],r,o);}}function _o(o,e){if(Je(o))return null;e=e.toLowerCase();let t=Object.keys(o),s=t.length,a;for(;s-- >0;)if(a=t[s],e===a.toLowerCase())return a;return null}var Ce=typeof globalThis<"u"?globalThis:typeof self<"u"?self:window,Lo=o=>!Pe(o)&&o!==Ce;function $t(){let{caseless:o,skipUndefined:e}=Lo(this)&&this||{},t={},s=(a,i)=>{let n=o&&_o(t,i)||i;yt(t[n])&&yt(a)?t[n]=$t(t[n],a):yt(a)?t[n]=$t({},a):We(a)?t[n]=a.slice():(!e||!Pe(a))&&(t[n]=a);};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Ke(arguments[a],s);return t}var Ca=(o,e,t,{allOwnKeys:s}={})=>(Ke(e,(a,i)=>{t&&H(a)?o[i]=Me(a,t):o[i]=a;},{allOwnKeys:s}),o),Aa=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),xa=(o,e,t,s)=>{o.prototype=Object.create(e.prototype,s),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:e.prototype}),t&&Object.assign(o.prototype,t);},Ia=(o,e,t,s)=>{let a,i,n,r={};if(e=e||{},o==null)return e;do{for(a=Object.getOwnPropertyNames(o),i=a.length;i-- >0;)n=a[i],(!s||s(n,o,e))&&!r[n]&&(e[n]=o[n],r[n]=true);o=t!==false&&zt(o);}while(o&&(!t||t(o,e))&&o!==Object.prototype);return e},ka=(o,e,t)=>{o=String(o),(t===void 0||t>o.length)&&(t=o.length),t-=e.length;let s=o.indexOf(e,t);return s!==-1&&s===t},Va=o=>{if(!o)return null;if(We(o))return o;let e=o.length;if(!Bo(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=o[e];return t},va=(o=>e=>o&&e instanceof o)(typeof Uint8Array<"u"&&zt(Uint8Array)),Sa=(o,e)=>{let s=(o&&o[Ct]).call(o),a;for(;(a=s.next())&&!a.done;){let i=a.value;e.call(o,i[0],i[1]);}},Pa=(o,e)=>{let t,s=[];for(;(t=o.exec(e))!==null;)s.push(t);return s},Wa=te("HTMLFormElement"),ba=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,s,a){return s.toUpperCase()+a}),To=(({hasOwnProperty:o})=>(e,t)=>o.call(e,t))(Object.prototype),Da=te("RegExp"),jo=(o,e)=>{let t=Object.getOwnPropertyDescriptors(o),s={};Ke(t,(a,i)=>{let n;(n=e(a,i,o))!==false&&(s[i]=n||a);}),Object.defineProperties(o,s);},Oa=o=>{jo(o,(e,t)=>{if(H(o)&&["arguments","caller","callee"].indexOf(t)!==-1)return false;let s=o[t];if(H(s)){if(e.enumerable=false,"writable"in e){e.writable=false;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")});}});},Ea=(o,e)=>{let t={},s=a=>{a.forEach(i=>{t[i]=true;});};return We(o)?s(o):s(String(o).split(e)),t},qa=()=>{},Na=(o,e)=>o!=null&&Number.isFinite(o=+o)?o:e;function Ga(o){return !!(o&&H(o.append)&&o[Fo]==="FormData"&&o[Ct])}var Ta=o=>{let e=new Array(10),t=(s,a)=>{if(He(s)){if(e.indexOf(s)>=0)return;if(Je(s))return s;if(!("toJSON"in s)){e[a]=s;let i=We(s)?[]:{};return Ke(s,(n,r)=>{let l=t(n,a+1);!Pe(l)&&(i[r]=l);}),e[a]=void 0,i}}return s};return t(o,0)},Fa=te("AsyncFunction"),Ua=o=>o&&(He(o)||H(o))&&H(o.then)&&H(o.catch),Mo=((o,e)=>o?setImmediate:e?((t,s)=>(Ce.addEventListener("message",({source:a,data:i})=>{a===Ce&&i===t&&s.length&&s.shift()();},false),a=>{s.push(a),Ce.postMessage(t,"*");}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",H(Ce.postMessage)),Ba=typeof queueMicrotask<"u"?queueMicrotask.bind(Ce):typeof process<"u"&&process.nextTick||Mo,_a=o=>o!=null&&H(o[Ct]),u={isArray:We,isArrayBuffer:Uo,isBuffer:Je,isFormData:fa,isArrayBufferView:aa,isString:ia,isNumber:Bo,isBoolean:na,isObject:He,isPlainObject:yt,isEmptyObject:ra,isReadableStream:wa,isRequest:Ra,isResponse:ha,isHeaders:ga,isUndefined:Pe,isDate:la,isFile:da,isBlob:ca,isRegExp:Da,isFunction:H,isStream:ua,isURLSearchParams:ma,isTypedArray:va,isFileList:pa,forEach:Ke,merge:$t,extend:Ca,trim:ya,stripBOM:Aa,inherits:xa,toFlatObject:Ia,kindOf:At,kindOfTest:te,endsWith:ka,toArray:Va,forEachEntry:Sa,matchAll:Pa,isHTMLForm:Wa,hasOwnProperty:To,hasOwnProp:To,reduceDescriptors:jo,freezeMethods:Oa,toObjectSet:Ea,toCamelCase:ba,noop:qa,toFiniteNumber:Na,findKey:_o,global:Ce,isContextDefined:Lo,isSpecCompliantForm:Ga,toJSONObject:Ta,isAsyncFn:Fa,isThenable:Ua,setImmediate:Mo,asap:Ba,isIterable:_a};function be(o,e,t,s,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),s&&(this.request=s),a&&(this.response=a,this.status=a.status?a.status:null);}u.inherits(be,Error,{toJSON:function(){return {message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.status}}});var Jo=be.prototype,Ho={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(o=>{Ho[o]={value:o};});Object.defineProperties(be,Ho);Object.defineProperty(Jo,"isAxiosError",{value:true});be.from=(o,e,t,s,a,i)=>{let n=Object.create(Jo);u.toFlatObject(o,n,function(c){return c!==Error.prototype},d=>d!=="isAxiosError");let r=o&&o.message?o.message:"Error",l=e==null&&o?o.code:e;return be.call(n,r,l,t,s,a),o&&n.cause==null&&Object.defineProperty(n,"cause",{value:o,configurable:true}),n.name=o&&o.name||"Error",i&&Object.assign(n,i),n};var W=be;var It=null;function Qt(o){return u.isPlainObject(o)||u.isArray(o)}function $o(o){return u.endsWith(o,"[]")?o.slice(0,-2):o}function Ko(o,e,t){return o?o.concat(e).map(function(a,i){return a=$o(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function La(o){return u.isArray(o)&&!o.some(Qt)}var ja=u.toFlatObject(u,{},null,function(e){return /^is[A-Z]/.test(e)});function Ma(o,e,t){if(!u.isObject(o))throw new TypeError("target must be an object");e=e||new(FormData),t=u.toFlatObject(t,{metaTokens:true,dots:false,indexes:false},false,function(R,w){return !u.isUndefined(w[R])});let s=t.metaTokens,a=t.visitor||c,i=t.dots,n=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(e);if(!u.isFunction(a))throw new TypeError("visitor must be a function");function d(f){if(f===null)return "";if(u.isDate(f))return f.toISOString();if(u.isBoolean(f))return f.toString();if(!l&&u.isBlob(f))throw new W("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(f)||u.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function c(f,R,w){let b=f;if(f&&!w&&typeof f=="object"){if(u.endsWith(R,"{}"))R=s?R:R.slice(0,-2),f=JSON.stringify(f);else if(u.isArray(f)&&La(f)||(u.isFileList(f)||u.endsWith(R,"[]"))&&(b=u.toArray(f)))return R=$o(R),b.forEach(function(N,q){!(u.isUndefined(N)||N===null)&&e.append(n===true?Ko([R],q,i):n===null?R:R+"[]",d(N));}),false}return Qt(f)?true:(e.append(Ko(w,R,i),d(f)),false)}let p=[],m=Object.assign(ja,{defaultVisitor:c,convertValue:d,isVisitable:Qt});function h(f,R){if(!u.isUndefined(f)){if(p.indexOf(f)!==-1)throw Error("Circular reference detected in "+R.join("."));p.push(f),u.forEach(f,function(b,D){(!(u.isUndefined(b)||b===null)&&a.call(e,b,u.isString(D)?D.trim():D,R,m))===true&&h(b,R?R.concat(D):[D]);}),p.pop();}}if(!u.isObject(o))throw new TypeError("data must be an object");return h(o),e}var fe=Ma;function zo(o){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Qo(o,e){this._pairs=[],o&&fe(o,this,e);}var Yo=Qo.prototype;Yo.append=function(e,t){this._pairs.push([e,t]);};Yo.toString=function(e){let t=e?function(s){return e.call(this,s,zo)}:zo;return this._pairs.map(function(a){return t(a[0])+"="+t(a[1])},"").join("&")};var kt=Qo;function Ja(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function $e(o,e,t){if(!e)return o;let s=t&&t.encode||Ja;u.isFunction(t)&&(t={serialize:t});let a=t&&t.serialize,i;if(a?i=a(e,t):i=u.isURLSearchParams(e)?e.toString():new kt(e,t).toString(s),i){let n=o.indexOf("#");n!==-1&&(o=o.slice(0,n)),o+=(o.indexOf("?")===-1?"?":"&")+i;}return o}var Yt=class{constructor(){this.handlers=[];}use(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:s?s.synchronous:false,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null);}clear(){this.handlers&&(this.handlers=[]);}forEach(e){u.forEach(this.handlers,function(s){s!==null&&e(s);});}},Xt=Yt;var Vt={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Xo=typeof URLSearchParams<"u"?URLSearchParams:kt;var Zo=typeof FormData<"u"?FormData:null;var es=typeof Blob<"u"?Blob:null;var ts={isBrowser:true,classes:{URLSearchParams:Xo,FormData:Zo,Blob:es},protocols:["http","https","file","blob","url","data"]};var to={};ea(to,{hasBrowserEnv:()=>eo,hasStandardBrowserEnv:()=>Ha,hasStandardBrowserWebWorkerEnv:()=>Ka,navigator:()=>Zt,origin:()=>$a});var eo=typeof window<"u"&&typeof document<"u",Zt=typeof navigator=="object"&&navigator||void 0,Ha=eo&&(!Zt||["ReactNative","NativeScript","NS"].indexOf(Zt.product)<0),Ka=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$a=eo&&window.location.href||"http://localhost";var G={...to,...ts};function oo(o,e){return fe(o,new G.classes.URLSearchParams,{visitor:function(t,s,a,i){return G.isNode&&u.isBuffer(t)?(this.append(s,t.toString("base64")),false):i.defaultVisitor.apply(this,arguments)},...e})}function za(o){return u.matchAll(/\w+|\[(\w*)]/g,o).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Qa(o){let e={},t=Object.keys(o),s,a=t.length,i;for(s=0;s<a;s++)i=t[s],e[i]=o[i];return e}function Ya(o){function e(t,s,a,i){let n=t[i++];if(n==="__proto__")return true;let r=Number.isFinite(+n),l=i>=t.length;return n=!n&&u.isArray(a)?a.length:n,l?(u.hasOwnProp(a,n)?a[n]=[a[n],s]:a[n]=s,!r):((!a[n]||!u.isObject(a[n]))&&(a[n]=[]),e(t,s,a[n],i)&&u.isArray(a[n])&&(a[n]=Qa(a[n])),!r)}if(u.isFormData(o)&&u.isFunction(o.entries)){let t={};return u.forEachEntry(o,(s,a)=>{e(za(s),a,t,0);}),t}return null}var vt=Ya;function Xa(o,e,t){if(u.isString(o))try{return (e||JSON.parse)(o),u.trim(o)}catch(s){if(s.name!=="SyntaxError")throw s}return (t||JSON.stringify)(o)}var so={transitional:Vt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let s=t.getContentType()||"",a=s.indexOf("application/json")>-1,i=u.isObject(e);if(i&&u.isHTMLForm(e)&&(e=new FormData(e)),u.isFormData(e))return a?JSON.stringify(vt(e)):e;if(u.isArrayBuffer(e)||u.isBuffer(e)||u.isStream(e)||u.isFile(e)||u.isBlob(e)||u.isReadableStream(e))return e;if(u.isArrayBufferView(e))return e.buffer;if(u.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",false),e.toString();let r;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return oo(e,this.formSerializer).toString();if((r=u.isFileList(e))||s.indexOf("multipart/form-data")>-1){let l=this.env&&this.env.FormData;return fe(r?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||a?(t.setContentType("application/json",false),Xa(e)):e}],transformResponse:[function(e){let t=this.transitional||so.transitional,s=t&&t.forcedJSONParsing,a=this.responseType==="json";if(u.isResponse(e)||u.isReadableStream(e))return e;if(e&&u.isString(e)&&(s&&!this.responseType||a)){let n=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e,this.parseReviver)}catch(r){if(n)throw r.name==="SyntaxError"?W.from(r,W.ERR_BAD_RESPONSE,this,null,this.response):r}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:G.classes.FormData,Blob:G.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],o=>{so.headers[o]={};});var De=so;var Za=u.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),os=o=>{let e={},t,s,a;return o&&o.split(`
2
+ `).forEach(function(n){a=n.indexOf(":"),t=n.substring(0,a).trim().toLowerCase(),s=n.substring(a+1).trim(),!(!t||e[t]&&Za[t])&&(t==="set-cookie"?e[t]?e[t].push(s):e[t]=[s]:e[t]=e[t]?e[t]+", "+s:s);}),e};var ss=Symbol("internals");function ze(o){return o&&String(o).trim().toLowerCase()}function St(o){return o===false||o==null?o:u.isArray(o)?o.map(St):String(o)}function ei(o){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,s;for(;s=t.exec(o);)e[s[1]]=s[2];return e}var ti=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function ao(o,e,t,s,a){if(u.isFunction(s))return s.call(this,e,t);if(a&&(e=t),!!u.isString(e)){if(u.isString(s))return e.indexOf(s)!==-1;if(u.isRegExp(s))return s.test(e)}}function oi(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,s)=>t.toUpperCase()+s)}function si(o,e){let t=u.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(o,s+t,{value:function(a,i,n){return this[s].call(this,e,a,i,n)},configurable:true});});}var Oe=class{constructor(e){e&&this.set(e);}set(e,t,s){let a=this;function i(r,l,d){let c=ze(l);if(!c)throw new Error("header name must be a non-empty string");let p=u.findKey(a,c);(!p||a[p]===void 0||d===true||d===void 0&&a[p]!==false)&&(a[p||l]=St(r));}let n=(r,l)=>u.forEach(r,(d,c)=>i(d,c,l));if(u.isPlainObject(e)||e instanceof this.constructor)n(e,t);else if(u.isString(e)&&(e=e.trim())&&!ti(e))n(os(e),t);else if(u.isObject(e)&&u.isIterable(e)){let r={},l,d;for(let c of e){if(!u.isArray(c))throw TypeError("Object iterator must return a key-value pair");r[d=c[0]]=(l=r[d])?u.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1];}n(r,t);}else e!=null&&i(t,e,s);return this}get(e,t){if(e=ze(e),e){let s=u.findKey(this,e);if(s){let a=this[s];if(!t)return a;if(t===true)return ei(a);if(u.isFunction(t))return t.call(this,a,s);if(u.isRegExp(t))return t.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ze(e),e){let s=u.findKey(this,e);return !!(s&&this[s]!==void 0&&(!t||ao(this,this[s],s,t)))}return false}delete(e,t){let s=this,a=false;function i(n){if(n=ze(n),n){let r=u.findKey(s,n);r&&(!t||ao(s,s[r],r,t))&&(delete s[r],a=true);}}return u.isArray(e)?e.forEach(i):i(e),a}clear(e){let t=Object.keys(this),s=t.length,a=false;for(;s--;){let i=t[s];(!e||ao(this,this[i],i,e,true))&&(delete this[i],a=true);}return a}normalize(e){let t=this,s={};return u.forEach(this,(a,i)=>{let n=u.findKey(s,i);if(n){t[n]=St(a),delete t[i];return}let r=e?oi(i):String(i).trim();r!==i&&delete t[i],t[r]=St(a),s[r]=true;}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return u.forEach(this,(s,a)=>{s!=null&&s!==false&&(t[a]=e&&u.isArray(s)?s.join(", "):s);}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return "AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let s=new this(e);return t.forEach(a=>s.set(a)),s}static accessor(e){let s=(this[ss]=this[ss]={accessors:{}}).accessors,a=this.prototype;function i(n){let r=ze(n);s[r]||(si(a,n),s[r]=true);}return u.isArray(e)?e.forEach(i):i(e),this}};Oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);u.reduceDescriptors(Oe.prototype,({value:o},e)=>{let t=e[0].toUpperCase()+e.slice(1);return {get:()=>o,set(s){this[t]=s;}}});u.freezeMethods(Oe);var B=Oe;function Qe(o,e){let t=this||De,s=e||t,a=B.from(s.headers),i=s.data;return u.forEach(o,function(r){i=r.call(t,i,a.normalize(),e?e.status:void 0);}),a.normalize(),i}function Ye(o){return !!(o&&o.__CANCEL__)}function as(o,e,t){W.call(this,o??"canceled",W.ERR_CANCELED,e,t),this.name="CanceledError";}u.inherits(as,W,{__CANCEL__:true});var ae=as;function Xe(o,e,t){let s=t.config.validateStatus;!t.status||!s||s(t.status)?o(t):e(new W("Request failed with status code "+t.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t));}function io(o){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return e&&e[1]||""}function ai(o,e){o=o||10;let t=new Array(o),s=new Array(o),a=0,i=0,n;return e=e!==void 0?e:1e3,function(l){let d=Date.now(),c=s[i];n||(n=d),t[a]=l,s[a]=d;let p=i,m=0;for(;p!==a;)m+=t[p++],p=p%o;if(a=(a+1)%o,a===i&&(i=(i+1)%o),d-n<e)return;let h=c&&d-c;return h?Math.round(m*1e3/h):void 0}}var is=ai;function ii(o,e){let t=0,s=1e3/e,a,i,n=(d,c=Date.now())=>{t=c,a=null,i&&(clearTimeout(i),i=null),o(...d);};return [(...d)=>{let c=Date.now(),p=c-t;p>=s?n(d,c):(a=d,i||(i=setTimeout(()=>{i=null,n(a);},s-p)));},()=>a&&n(a)]}var ns=ii;var Ee=(o,e,t=3)=>{let s=0,a=is(50,250);return ns(i=>{let n=i.loaded,r=i.lengthComputable?i.total:void 0,l=n-s,d=a(l),c=n<=r;s=n;let p={loaded:n,total:r,progress:r?n/r:void 0,bytes:l,rate:d||void 0,estimated:d&&r&&c?(r-n)/d:void 0,event:i,lengthComputable:r!=null,[e?"download":"upload"]:true};o(p);},t)},no=(o,e)=>{let t=o!=null;return [s=>e[0]({lengthComputable:t,total:o,loaded:s}),e[1]]},ro=o=>(...e)=>u.asap(()=>o(...e));var rs=G.hasStandardBrowserEnv?((o,e)=>t=>(t=new URL(t,G.origin),o.protocol===t.protocol&&o.host===t.host&&(e||o.port===t.port)))(new URL(G.origin),G.navigator&&/(msie|trident)/i.test(G.navigator.userAgent)):()=>true;var ls=G.hasStandardBrowserEnv?{write(o,e,t,s,a,i,n){if(typeof document>"u")return;let r=[`${o}=${encodeURIComponent(e)}`];u.isNumber(t)&&r.push(`expires=${new Date(t).toUTCString()}`),u.isString(s)&&r.push(`path=${s}`),u.isString(a)&&r.push(`domain=${a}`),i===true&&r.push("secure"),u.isString(n)&&r.push(`SameSite=${n}`),document.cookie=r.join("; ");},read(o){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+o+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(o){this.write(o,"",Date.now()-864e5,"/");}}:{write(){},read(){return null},remove(){}};function lo(o){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function co(o,e){return e?o.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):o}function Ze(o,e,t){let s=!lo(e);return o&&(s||t==false)?co(o,e):e}var ds=o=>o instanceof B?{...o}:o;function oe(o,e){e=e||{};let t={};function s(d,c,p,m){return u.isPlainObject(d)&&u.isPlainObject(c)?u.merge.call({caseless:m},d,c):u.isPlainObject(c)?u.merge({},c):u.isArray(c)?c.slice():c}function a(d,c,p,m){if(u.isUndefined(c)){if(!u.isUndefined(d))return s(void 0,d,p,m)}else return s(d,c,p,m)}function i(d,c){if(!u.isUndefined(c))return s(void 0,c)}function n(d,c){if(u.isUndefined(c)){if(!u.isUndefined(d))return s(void 0,d)}else return s(void 0,c)}function r(d,c,p){if(p in e)return s(d,c);if(p in o)return s(void 0,d)}let l={url:i,method:i,data:i,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:r,headers:(d,c,p)=>a(ds(d),ds(c),p,true)};return u.forEach(Object.keys({...o,...e}),function(c){let p=l[c]||a,m=p(o[c],e[c],c);u.isUndefined(m)&&p!==r||(t[c]=m);}),t}var Pt=o=>{let e=oe({},o),{data:t,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:i,headers:n,auth:r}=e;if(e.headers=n=B.from(n),e.url=$e(Ze(e.baseURL,e.url,e.allowAbsoluteUrls),o.params,o.paramsSerializer),r&&n.set("Authorization","Basic "+btoa((r.username||"")+":"+(r.password?unescape(encodeURIComponent(r.password)):""))),u.isFormData(t)){if(G.hasStandardBrowserEnv||G.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if(u.isFunction(t.getHeaders)){let l=t.getHeaders(),d=["content-type","content-length"];Object.entries(l).forEach(([c,p])=>{d.includes(c.toLowerCase())&&n.set(c,p);});}}if(G.hasStandardBrowserEnv&&(s&&u.isFunction(s)&&(s=s(e)),s||s!==false&&rs(e.url))){let l=a&&i&&ls.read(i);l&&n.set(a,l);}return e};var ni=typeof XMLHttpRequest<"u",cs=ni&&function(o){return new Promise(function(t,s){let a=Pt(o),i=a.data,n=B.from(a.headers).normalize(),{responseType:r,onUploadProgress:l,onDownloadProgress:d}=a,c,p,m,h,f;function R(){h&&h(),f&&f(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c);}let w=new XMLHttpRequest;w.open(a.method.toUpperCase(),a.url,true),w.timeout=a.timeout;function b(){if(!w)return;let N=B.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),M={data:!r||r==="text"||r==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:N,config:o,request:w};Xe(function(J){t(J),R();},function(J){s(J),R();},M),w=null;}"onloadend"in w?w.onloadend=b:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(b);},w.onabort=function(){w&&(s(new W("Request aborted",W.ECONNABORTED,o,w)),w=null);},w.onerror=function(q){let M=q&&q.message?q.message:"Network Error",ee=new W(M,W.ERR_NETWORK,o,w);ee.event=q||null,s(ee),w=null;},w.ontimeout=function(){let q=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",M=a.transitional||Vt;a.timeoutErrorMessage&&(q=a.timeoutErrorMessage),s(new W(q,M.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,o,w)),w=null;},i===void 0&&n.setContentType(null),"setRequestHeader"in w&&u.forEach(n.toJSON(),function(q,M){w.setRequestHeader(M,q);}),u.isUndefined(a.withCredentials)||(w.withCredentials=!!a.withCredentials),r&&r!=="json"&&(w.responseType=a.responseType),d&&([m,f]=Ee(d,true),w.addEventListener("progress",m)),l&&w.upload&&([p,h]=Ee(l),w.upload.addEventListener("progress",p),w.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(c=N=>{w&&(s(!N||N.type?new ae(null,o,w):N),w.abort(),w=null);},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));let D=io(a.url);if(D&&G.protocols.indexOf(D)===-1){s(new W("Unsupported protocol "+D+":",W.ERR_BAD_REQUEST,o));return}w.send(i||null);})};var ri=(o,e)=>{let{length:t}=o=o?o.filter(Boolean):[];if(e||t){let s=new AbortController,a,i=function(d){if(!a){a=true,r();let c=d instanceof Error?d:this.reason;s.abort(c instanceof W?c:new ae(c instanceof Error?c.message:c));}},n=e&&setTimeout(()=>{n=null,i(new W(`timeout ${e} of ms exceeded`,W.ETIMEDOUT));},e),r=()=>{o&&(n&&clearTimeout(n),n=null,o.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i);}),o=null);};o.forEach(d=>d.addEventListener("abort",i));let{signal:l}=s;return l.unsubscribe=()=>u.asap(r),l}},ps=ri;var li=function*(o,e){let t=o.byteLength;if(t<e){yield o;return}let s=0,a;for(;s<t;)a=s+e,yield o.slice(s,a),s=a;},di=async function*(o,e){for await(let t of ci(o))yield*li(t,e);},ci=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}let e=o.getReader();try{for(;;){let{done:t,value:s}=await e.read();if(t)break;yield s;}}finally{await e.cancel();}},po=(o,e,t,s)=>{let a=di(o,e),i=0,n,r=l=>{n||(n=true,s&&s(l));};return new ReadableStream({async pull(l){try{let{done:d,value:c}=await a.next();if(d){r(),l.close();return}let p=c.byteLength;if(t){let m=i+=p;t(m);}l.enqueue(new Uint8Array(c));}catch(d){throw r(d),d}},cancel(l){return r(l),a.return()}},{highWaterMark:2})};var us=64*1024,{isFunction:Wt}=u,pi=(({Request:o,Response:e})=>({Request:o,Response:e}))(u.global),{ReadableStream:fs,TextEncoder:ms}=u.global,ws=(o,...e)=>{try{return !!o(...e)}catch{return false}},ui=o=>{o=u.merge.call({skipUndefined:true},pi,o);let{fetch:e,Request:t,Response:s}=o,a=e?Wt(e):typeof fetch=="function",i=Wt(t),n=Wt(s);if(!a)return false;let r=a&&Wt(fs),l=a&&(typeof ms=="function"?(f=>R=>f.encode(R))(new ms):async f=>new Uint8Array(await new t(f).arrayBuffer())),d=i&&r&&ws(()=>{let f=!1,R=new t(G.origin,{body:new fs,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!R}),c=n&&r&&ws(()=>u.isReadableStream(new s("").body)),p={stream:c&&(f=>f.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!p[f]&&(p[f]=(R,w)=>{let b=R&&R[f];if(b)return b.call(R);throw new W(`Response type '${f}' is not supported`,W.ERR_NOT_SUPPORT,w)});});let m=async f=>{if(f==null)return 0;if(u.isBlob(f))return f.size;if(u.isSpecCompliantForm(f))return (await new t(G.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(u.isArrayBufferView(f)||u.isArrayBuffer(f))return f.byteLength;if(u.isURLSearchParams(f)&&(f=f+""),u.isString(f))return (await l(f)).byteLength},h=async(f,R)=>{let w=u.toFiniteNumber(f.getContentLength());return w??m(R)};return async f=>{let{url:R,method:w,data:b,signal:D,cancelToken:N,timeout:q,onDownloadProgress:M,onUploadProgress:ee,responseType:J,headers:Ve,withCredentials:ve="same-origin",fetchOptions:Do}=Pt(f),Oo=e||fetch;J=J?(J+"").toLowerCase():"text";let ht=ps([D,N&&N.toAbortSignal()],q),je=null,ye=ht&&ht.unsubscribe&&(()=>{ht.unsubscribe();}),Eo;try{if(ee&&d&&w!=="get"&&w!=="head"&&(Eo=await h(Ve,b))!==0){let ue=new t(R,{method:"POST",body:b,duplex:"half"}),Se;if(u.isFormData(b)&&(Se=ue.headers.get("content-type"))&&Ve.setContentType(Se),ue.body){let[Jt,gt]=no(Eo,Ee(ro(ee)));b=po(ue.body,us,Jt,gt);}}u.isString(ve)||(ve=ve?"include":"omit");let se=i&&"credentials"in t.prototype,qo={...Do,signal:ht,method:w.toUpperCase(),headers:Ve.normalize().toJSON(),body:b,duplex:"half",credentials:se?ve:void 0};je=i&&new t(R,qo);let pe=await(i?Oo(je,Do):Oo(R,qo)),No=c&&(J==="stream"||J==="response");if(c&&(M||No&&ye)){let ue={};["status","statusText","headers"].forEach(Go=>{ue[Go]=pe[Go];});let Se=u.toFiniteNumber(pe.headers.get("content-length")),[Jt,gt]=M&&no(Se,Ee(ro(M),!0))||[];pe=new s(po(pe.body,us,Jt,()=>{gt&&gt(),ye&&ye();}),ue);}J=J||"text";let Ks=await p[u.findKey(p,J)||"text"](pe,f);return !No&&ye&&ye(),await new Promise((ue,Se)=>{Xe(ue,Se,{data:Ks,headers:B.from(pe.headers),status:pe.status,statusText:pe.statusText,config:f,request:je});})}catch(se){throw ye&&ye(),se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)?Object.assign(new W("Network Error",W.ERR_NETWORK,f,je),{cause:se.cause||se}):W.from(se,se&&se.code,f,je)}}},fi=new Map,uo=o=>{let e=o&&o.env||{},{fetch:t,Request:s,Response:a}=e,i=[s,a,t],n=i.length,r=n,l,d,c=fi;for(;r--;)l=i[r],d=c.get(l),d===void 0&&c.set(l,d=r?new Map:ui(e)),c=d;return d};uo();var fo={http:It,xhr:cs,fetch:{get:uo}};u.forEach(fo,(o,e)=>{if(o){try{Object.defineProperty(o,"name",{value:e});}catch{}Object.defineProperty(o,"adapterName",{value:e});}});var Rs=o=>`- ${o}`,wi=o=>u.isFunction(o)||o===null||o===false;function Ri(o,e){o=u.isArray(o)?o:[o];let{length:t}=o,s,a,i={};for(let n=0;n<t;n++){s=o[n];let r;if(a=s,!wi(s)&&(a=fo[(r=String(s)).toLowerCase()],a===void 0))throw new W(`Unknown adapter '${r}'`);if(a&&(u.isFunction(a)||(a=a.get(e))))break;i[r||"#"+n]=a;}if(!a){let n=Object.entries(i).map(([l,d])=>`adapter ${l} `+(d===false?"is not supported by the environment":"is not available in the build")),r=t?n.length>1?`since :
4
4
  `+n.map(Rs).join(`
5
- `):" "+Rs(n[0]):"as no adapter specified";throw new W("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return a}var bt={getAdapter:wi,adapters:fo};function mo(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new ae(null,o)}function Dt(o){return mo(o),o.headers=B.from(o.headers),o.data=Qe.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",false),bt.getAdapter(o.adapter||De.adapter,o)(o).then(function(s){return mo(o),s.data=Qe.call(o,o.transformResponse,s),s.headers=B.from(s.headers),s},function(s){return Ye(s)||(mo(o),s&&s.response&&(s.response.data=Qe.call(o,o.transformResponse,s.response),s.response.headers=B.from(s.response.headers))),Promise.reject(s)})}var Ot="1.13.2";var Et={};["object","boolean","number","function","string","symbol"].forEach((o,e)=>{Et[o]=function(s){return typeof s===o||"a"+(e<1?"n ":" ")+o};});var hs={};Et.transitional=function(e,t,s){function a(i,n){return "[Axios v"+Ot+"] Transitional option '"+i+"'"+n+(s?". "+s:"")}return (i,n,r)=>{if(e===false)throw new W(a(n," has been removed"+(t?" in "+t:"")),W.ERR_DEPRECATED);return t&&!hs[n]&&(hs[n]=true,console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,n,r):true}};Et.spelling=function(e){return (t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),true)};function Ri(o,e,t){if(typeof o!="object")throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);let s=Object.keys(o),a=s.length;for(;a-- >0;){let i=s[a],n=e[i];if(n){let r=o[i],l=r===void 0||n(r,i,o);if(l!==true)throw new W("option "+i+" must be "+l,W.ERR_BAD_OPTION_VALUE);continue}if(t!==true)throw new W("Unknown option "+i,W.ERR_BAD_OPTION)}}var et={assertOptions:Ri,validators:Et};var ie=et.validators,qe=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Xt,response:new Xt};}async request(e,t){try{return await this._request(e,t)}catch(s){if(s instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;let i=a.stack?a.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
6
- `+i):s.stack=i;}catch{}}throw s}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=oe(this.defaults,t);let{transitional:s,paramsSerializer:a,headers:i}=t;s!==void 0&&et.assertOptions(s,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},false),a!=null&&(u.isFunction(a)?t.paramsSerializer={serialize:a}:et.assertOptions(a,{encode:ie.function,serialize:ie.function},true)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=true),et.assertOptions(t,{baseUrl:ie.spelling("baseURL"),withXsrfToken:ie.spelling("withXSRFToken")},true),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=i&&u.merge(i.common,i[t.method]);i&&u.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f];}),t.headers=B.concat(n,i);let r=[],l=true;this.interceptors.request.forEach(function(R){typeof R.runWhen=="function"&&R.runWhen(t)===false||(l=l&&R.synchronous,r.unshift(R.fulfilled,R.rejected));});let d=[];this.interceptors.response.forEach(function(R){d.push(R.fulfilled,R.rejected);});let c,p=0,m;if(!l){let f=[Dt.bind(this),void 0];for(f.unshift(...r),f.push(...d),m=f.length,c=Promise.resolve(t);p<m;)c=c.then(f[p++],f[p++]);return c}m=r.length;let h=t;for(;p<m;){let f=r[p++],R=r[p++];try{h=f(h);}catch(w){R.call(this,w);break}}try{c=Dt.call(this,h);}catch(f){return Promise.reject(f)}for(p=0,m=d.length;p<m;)c=c.then(d[p++],d[p++]);return c}getUri(e){e=oe(this.defaults,e);let t=Ze(e.baseURL,e.url,e.allowAbsoluteUrls);return $e(t,e.params,e.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(e){qe.prototype[e]=function(t,s){return this.request(oe(s||{},{method:e,url:t,data:(s||{}).data}))};});u.forEach(["post","put","patch"],function(e){function t(s){return function(i,n,r){return this.request(oe(r||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}qe.prototype[e]=t(),qe.prototype[e+"Form"]=t(true);});var tt=qe;var wo=class o{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i;});let s=this;this.promise.then(a=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](a);s._listeners=null;}),this.promise.then=a=>{let i,n=new Promise(r=>{s.subscribe(r),i=r;}).then(a);return n.cancel=function(){s.unsubscribe(i);},n},e(function(i,n,r){s.reason||(s.reason=new ae(i,n,r),t(s.reason));});}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e];}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1);}toAbortSignal(){let e=new AbortController,t=s=>{e.abort(s);};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return {token:new o(function(a){e=a;}),cancel:e}}},gs=wo;function Ro(o){return function(t){return o.apply(null,t)}}function ho(o){return u.isObject(o)&&o.isAxiosError===true}var go={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(go).forEach(([o,e])=>{go[e]=o;});var ys=go;function Cs(o){let e=new tt(o),t=Me(tt.prototype.request,e);return u.extend(t,tt.prototype,e,{allOwnKeys:true}),u.extend(t,e,null,{allOwnKeys:true}),t.create=function(a){return Cs(oe(o,a))},t}var F=Cs(De);F.Axios=tt;F.CanceledError=ae;F.CancelToken=gs;F.isCancel=Ye;F.VERSION=Ot;F.toFormData=fe;F.AxiosError=W;F.Cancel=F.CanceledError;F.all=function(e){return Promise.all(e)};F.spread=Ro;F.isAxiosError=ho;F.mergeConfig=oe;F.AxiosHeaders=B;F.formToJSON=o=>vt(u.isHTMLForm(o)?new FormData(o):o);F.getAdapter=bt.getAdapter;F.HttpStatusCode=ys;F.default=F;var g=F;var{Axios:Ql,AxiosError:As,CanceledError:Yl,isCancel:Xl,CancelToken:Zl,VERSION:ed,all:td,Cancel:od,isAxiosError:xs,spread:sd,toFormData:ad,AxiosHeaders:id,HttpStatusCode:nd,formToJSON:rd,getAdapter:ld,mergeConfig:dd}=g;var C=globalThis.URL,Is=globalThis.URLSearchParams;var y="https://api.kadoa.com".replace(/\/+$/,"");var X=class{constructor(e,t=y,s=g){this.basePath=t;this.axios=s;e&&(this.configuration=e,this.basePath=e.basePath??t);}},qt=class extends Error{constructor(t,s){super(s);this.field=t;this.name="RequiredError";}},A={};var x="https://example.com",S=function(o,e,t){if(t==null)throw new qt(e,`Required parameter ${e} was null or undefined when calling ${o}.`)},I=async function(o,e,t){if(t&&t.apiKey){let s=typeof t.apiKey=="function"?await t.apiKey(e):await t.apiKey;o[e]=s;}};var me=async function(o,e){if(e&&e.accessToken){let t=typeof e.accessToken=="function"?await e.accessToken():await e.accessToken;o.Authorization="Bearer "+t;}};function yo(o,e,t=""){e!=null&&(typeof e=="object"?Array.isArray(e)?e.forEach(s=>yo(o,s,t)):Object.keys(e).forEach(s=>yo(o,e[s],`${t}${t!==""?".":""}${s}`)):o.has(t)?o.append(t,e):o.set(t,e));}var k=function(o,...e){let t=new Is(o.search);yo(t,e),o.search=t.toString();},E=function(o,e,t){let s=typeof o!="string";return (s&&t&&t.isJsonMime?t.isJsonMime(e.headers["Content-Type"]):s)?JSON.stringify(o!==void 0?o:{}):o||""},V=function(o){return o.pathname+o.search+o.hash},v=function(o,e,t,s){return (a=e,i=t)=>{let n={...o.options,url:(a.defaults.baseURL?"":s?.basePath??i)+o.url};return a.request(n)}};var hi=function(o){return {v4CrawlBucketDataFilenameb64Get:async(e,t,s,a={})=>{S("v4CrawlBucketDataFilenameb64Get","filenameb64",e);let i="/v4/crawl/bucket/data/{filenameb64}".replace("{filenameb64}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),t!=null&&(d["Content-Type"]=String(t)),s!=null&&(d["Cache-Control"]=String(s)),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4CrawlConfigConfigIdGet:async(e,t={})=>{S("v4CrawlConfigConfigIdGet","configId",e);let s="/v4/crawl/config/{configId}".replace("{configId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4CrawlConfigDelete:async(e,t={})=>{let s="/v4/crawl/config",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4CrawlConfigPost:async(e,t={})=>{let s="/v4/crawl/config",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4CrawlPausePost:async(e,t={})=>{let s="/v4/crawl/pause",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4CrawlPost:async(e,t={})=>{let s="/v4/crawl/",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4CrawlResumePost:async(e,t={})=>{let s="/v4/crawl/resume",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4CrawlSessionIdListGet:async(e,t,s={})=>{S("v4CrawlSessionIdListGet","sessionId",e);let a="/v4/crawl/{sessionId}/list".replace("{sessionId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),t!==void 0&&(d.includeAll=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v4CrawlSessionIdPagesGet:async(e,t,s,a={})=>{S("v4CrawlSessionIdPagesGet","sessionId",e);let i="/v4/crawl/{sessionId}/pages".replace("{sessionId}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),t!==void 0&&(c.currentPage=t),s!==void 0&&(c.pageSize=s),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4CrawlSessionIdPagesPageIdGet:async(e,t,s,a={})=>{S("v4CrawlSessionIdPagesPageIdGet","sessionId",e),S("v4CrawlSessionIdPagesPageIdGet","pageId",t);let i="/v4/crawl/{sessionId}/pages/{pageId}".replace("{sessionId}",encodeURIComponent(String(e))).replace("{pageId}",encodeURIComponent(String(t))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),s!==void 0&&(c.format=s),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4CrawlSessionIdStatusGet:async(e,t={})=>{S("v4CrawlSessionIdStatusGet","sessionId",e);let s="/v4/crawl/{sessionId}/status".replace("{sessionId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4CrawlSessionsGet:async(e,t,s,a={})=>{let i="/v4/crawl/sessions",n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),e!==void 0&&(c.page=e),t!==void 0&&(c.pageSize=t),s!==void 0&&(c.userId=s),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4CrawlStartPost:async(e,t={})=>{let s="/v4/crawl/start",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}}}},Q=function(o){let e=hi(o);return {async v4CrawlBucketDataFilenameb64Get(t,s,a,i){let n=await e.v4CrawlBucketDataFilenameb64Get(t,s,a,i),r=o?.serverIndex??0,l=A["CrawlerApi.v4CrawlBucketDataFilenameb64Get"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4CrawlConfigConfigIdGet(t,s){let a=await e.v4CrawlConfigConfigIdGet(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlConfigConfigIdGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlConfigDelete(t,s){let a=await e.v4CrawlConfigDelete(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlConfigDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlConfigPost(t,s){let a=await e.v4CrawlConfigPost(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlConfigPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlPausePost(t,s){let a=await e.v4CrawlPausePost(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlPausePost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlPost(t,s){let a=await e.v4CrawlPost(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlResumePost(t,s){let a=await e.v4CrawlResumePost(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlResumePost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlSessionIdListGet(t,s,a){let i=await e.v4CrawlSessionIdListGet(t,s,a),n=o?.serverIndex??0,r=A["CrawlerApi.v4CrawlSessionIdListGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4CrawlSessionIdPagesGet(t,s,a,i){let n=await e.v4CrawlSessionIdPagesGet(t,s,a,i),r=o?.serverIndex??0,l=A["CrawlerApi.v4CrawlSessionIdPagesGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4CrawlSessionIdPagesPageIdGet(t,s,a,i){let n=await e.v4CrawlSessionIdPagesPageIdGet(t,s,a,i),r=o?.serverIndex??0,l=A["CrawlerApi.v4CrawlSessionIdPagesPageIdGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4CrawlSessionIdStatusGet(t,s){let a=await e.v4CrawlSessionIdStatusGet(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlSessionIdStatusGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlSessionsGet(t,s,a,i){let n=await e.v4CrawlSessionsGet(t,s,a,i),r=o?.serverIndex??0,l=A["CrawlerApi.v4CrawlSessionsGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4CrawlStartPost(t,s){let a=await e.v4CrawlStartPost(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlStartPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)}}};var Ae=class extends X{v4CrawlBucketDataFilenameb64Get(e,t){return Q(this.configuration).v4CrawlBucketDataFilenameb64Get(e.filenameb64,e.contentType,e.cacheControl,t).then(s=>s(this.axios,this.basePath))}v4CrawlConfigConfigIdGet(e,t){return Q(this.configuration).v4CrawlConfigConfigIdGet(e.configId,t).then(s=>s(this.axios,this.basePath))}v4CrawlConfigDelete(e={},t){return Q(this.configuration).v4CrawlConfigDelete(e.deleteCrawlerConfigRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlConfigPost(e={},t){return Q(this.configuration).v4CrawlConfigPost(e.createCrawlerConfigRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlPausePost(e={},t){return Q(this.configuration).v4CrawlPausePost(e.pauseCrawlerSessionRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlPost(e={},t){return Q(this.configuration).v4CrawlPost(e.startCrawlerSessionRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlResumePost(e={},t){return Q(this.configuration).v4CrawlResumePost(e.resumeCrawlerSessionRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdListGet(e,t){return Q(this.configuration).v4CrawlSessionIdListGet(e.sessionId,e.includeAll,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdPagesGet(e,t){return Q(this.configuration).v4CrawlSessionIdPagesGet(e.sessionId,e.currentPage,e.pageSize,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdPagesPageIdGet(e,t){return Q(this.configuration).v4CrawlSessionIdPagesPageIdGet(e.sessionId,e.pageId,e.format,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdStatusGet(e,t){return Q(this.configuration).v4CrawlSessionIdStatusGet(e.sessionId,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionsGet(e={},t){return Q(this.configuration).v4CrawlSessionsGet(e.page,e.pageSize,e.userId,t).then(s=>s(this.axios,this.basePath))}v4CrawlStartPost(e={},t){return Q(this.configuration).v4CrawlStartPost(e.startSessionWithConfigRequest,t).then(s=>s(this.axios,this.basePath))}};var gi=function(o){return {v4DataValidationRulesActionsBulkApprovePost:async(e,t={})=>{let s="/v4/data-validation/rules/actions/bulk-approve",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesActionsBulkDeletePost:async(e,t={})=>{let s="/v4/data-validation/rules/actions/bulk-delete",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesActionsDeleteAllDelete:async(e,t={})=>{let s="/v4/data-validation/rules/actions/delete-all",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesActionsGeneratePost:async(e,t={})=>{let s="/v4/data-validation/rules/actions/generate",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesActionsGenerateRulesPost:async(e,t={})=>{let s="/v4/data-validation/rules/actions/generate-rules",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesGet:async(e,t,s,a,i,n,r={})=>{let l="/v4/data-validation/rules",d=new C(l,x),c;o&&(c=o.baseOptions);let p={method:"GET",...c,...r},m={},h={};if(await I(m,"x-api-key",o),e!==void 0&&(h.groupId=e),t!==void 0&&(h.workflowId=t),s!==void 0&&(h.status=s),a!==void 0&&(h.page=a),i!==void 0&&(h.pageSize=i),n!==void 0)for(let[R,w]of Object.entries(n))h[R]=w;k(d,h);let f=c&&c.headers?c.headers:{};return p.headers={...m,...f,...r.headers},{url:V(d),options:p}},v4DataValidationRulesPost:async(e,t={})=>{let s="/v4/data-validation/rules",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesRuleIdDelete:async(e,t,s={})=>{S("v4DataValidationRulesRuleIdDelete","ruleId",e);let a="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"DELETE",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4DataValidationRulesRuleIdDisablePost:async(e,t,s={})=>{S("v4DataValidationRulesRuleIdDisablePost","ruleId",e);let a="/v4/data-validation/rules/{ruleId}/disable".replace("{ruleId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"POST",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4DataValidationRulesRuleIdGet:async(e,t,s={})=>{S("v4DataValidationRulesRuleIdGet","ruleId",e);let a="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),t!==void 0&&(d.includeDeleted=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v4DataValidationRulesRuleIdPut:async(e,t,s={})=>{S("v4DataValidationRulesRuleIdPut","ruleId",e);let a="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4DataValidationValidationsValidationIdAnomaliesGet:async(e,t,s,a={})=>{S("v4DataValidationValidationsValidationIdAnomaliesGet","validationId",e);let i="/v4/data-validation/validations/{validationId}/anomalies".replace("{validationId}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),t!==void 0&&(c.page=t),s!==void 0&&(c.pageSize=s),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet:async(e,t,s,a,i={})=>{S("v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet","validationId",e),S("v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet","ruleName",t);let n="/v4/data-validation/validations/{validationId}/anomalies/rules/{ruleName}".replace("{validationId}",encodeURIComponent(String(e))).replace("{ruleName}",encodeURIComponent(String(t))),r=new C(n,x),l;o&&(l=o.baseOptions);let d={method:"GET",...l,...i},c={},p={};await I(c,"x-api-key",o),s!==void 0&&(p.page=s),a!==void 0&&(p.pageSize=a),k(r,p);let m=l&&l.headers?l.headers:{};return d.headers={...c,...m,...i.headers},{url:V(r),options:d}},v4DataValidationValidationsValidationIdGet:async(e,t,s={})=>{S("v4DataValidationValidationsValidationIdGet","validationId",e);let a="/v4/data-validation/validations/{validationId}".replace("{validationId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),t!==void 0&&(d.includeDryRun=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v4DataValidationWorkflowIdJobsJobIdValidatePost:async(e,t,s,a={})=>{S("v4DataValidationWorkflowIdJobsJobIdValidatePost","workflowId",e),S("v4DataValidationWorkflowIdJobsJobIdValidatePost","jobId",t);let i="/v4/data-validation/{workflowId}/jobs/{jobId}/validate".replace("{workflowId}",encodeURIComponent(String(e))).replace("{jobId}",encodeURIComponent(String(t))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"POST",...r,...a},d={},c={};await I(d,"x-api-key",o),d["Content-Type"]="application/json",k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},l.data=E(s,l,o),{url:V(n),options:l}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost:async(e,t,s,a={})=>{S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost","workflowId",e),S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost","jobId",t);let i="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validate".replace("{workflowId}",encodeURIComponent(String(e))).replace("{jobId}",encodeURIComponent(String(t))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"POST",...r,...a},d={},c={};await I(d,"x-api-key",o),d["Content-Type"]="application/json",k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},l.data=E(s,l,o),{url:V(n),options:l}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet:async(e,t,s,a,i,n={})=>{S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet","workflowId",e),S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet","jobId",t);let r="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validations".replace("{workflowId}",encodeURIComponent(String(e))).replace("{jobId}",encodeURIComponent(String(t))),l=new C(r,x),d;o&&(d=o.baseOptions);let c={method:"GET",...d,...n},p={},m={};await I(p,"x-api-key",o),s!==void 0&&(m.page=s),a!==void 0&&(m.pageSize=a),i!==void 0&&(m.includeDryRun=i),k(l,m);let h=d&&d.headers?d.headers:{};return c.headers={...p,...h,...n.headers},{url:V(l),options:c}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet:async(e,t,s,a={})=>{S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet","workflowId",e),S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet","jobId",t);let i="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validations/latest".replace("{workflowId}",encodeURIComponent(String(e))).replace("{jobId}",encodeURIComponent(String(t))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),s!==void 0&&(c.includeDryRun=s),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4DataValidationWorkflowsWorkflowIdValidationConfigGet:async(e,t={})=>{S("v4DataValidationWorkflowsWorkflowIdValidationConfigGet","workflowId",e);let s="/v4/data-validation/workflows/{workflowId}/validation/config".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4DataValidationWorkflowsWorkflowIdValidationConfigPut:async(e,t,s={})=>{S("v4DataValidationWorkflowsWorkflowIdValidationConfigPut","workflowId",e);let a="/v4/data-validation/workflows/{workflowId}/validation/config".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4DataValidationWorkflowsWorkflowIdValidationTogglePut:async(e,t,s={})=>{S("v4DataValidationWorkflowsWorkflowIdValidationTogglePut","workflowId",e);let a="/v4/data-validation/workflows/{workflowId}/validation/toggle".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4DataValidationWorkflowsWorkflowIdValidationsLatestGet:async(e,t,s={})=>{S("v4DataValidationWorkflowsWorkflowIdValidationsLatestGet","workflowId",e);let a="/v4/data-validation/workflows/{workflowId}/validations/latest".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),t!==void 0&&(d.includeDryRun=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}}}},T=function(o){let e=gi(o);return {async v4DataValidationRulesActionsBulkApprovePost(t,s){let a=await e.v4DataValidationRulesActionsBulkApprovePost(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesActionsBulkApprovePost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesActionsBulkDeletePost(t,s){let a=await e.v4DataValidationRulesActionsBulkDeletePost(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesActionsBulkDeletePost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesActionsDeleteAllDelete(t,s){let a=await e.v4DataValidationRulesActionsDeleteAllDelete(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesActionsDeleteAllDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesActionsGeneratePost(t,s){let a=await e.v4DataValidationRulesActionsGeneratePost(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesActionsGeneratePost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesActionsGenerateRulesPost(t,s){let a=await e.v4DataValidationRulesActionsGenerateRulesPost(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesActionsGenerateRulesPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesGet(t,s,a,i,n,r,l){let d=await e.v4DataValidationRulesGet(t,s,a,i,n,r,l),c=o?.serverIndex??0,p=A["DataValidationApi.v4DataValidationRulesGet"]?.[c]?.url;return (m,h)=>v(d,g,y,o)(m,p||h)},async v4DataValidationRulesPost(t,s){let a=await e.v4DataValidationRulesPost(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesRuleIdDelete(t,s,a){let i=await e.v4DataValidationRulesRuleIdDelete(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationRulesRuleIdDelete"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationRulesRuleIdDisablePost(t,s,a){let i=await e.v4DataValidationRulesRuleIdDisablePost(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationRulesRuleIdDisablePost"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationRulesRuleIdGet(t,s,a){let i=await e.v4DataValidationRulesRuleIdGet(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationRulesRuleIdGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationRulesRuleIdPut(t,s,a){let i=await e.v4DataValidationRulesRuleIdPut(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationRulesRuleIdPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationValidationsValidationIdAnomaliesGet(t,s,a,i){let n=await e.v4DataValidationValidationsValidationIdAnomaliesGet(t,s,a,i),r=o?.serverIndex??0,l=A["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(t,s,a,i,n){let r=await e.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(t,s,a,i,n),l=o?.serverIndex??0,d=A["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet"]?.[l]?.url;return (c,p)=>v(r,g,y,o)(c,d||p)},async v4DataValidationValidationsValidationIdGet(t,s,a){let i=await e.v4DataValidationValidationsValidationIdGet(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationValidationsValidationIdGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationWorkflowIdJobsJobIdValidatePost(t,s,a,i){let n=await e.v4DataValidationWorkflowIdJobsJobIdValidatePost(t,s,a,i),r=o?.serverIndex??0,l=A["DataValidationApi.v4DataValidationWorkflowIdJobsJobIdValidatePost"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(t,s,a,i){let n=await e.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(t,s,a,i),r=o?.serverIndex??0,l=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(t,s,a,i,n,r){let l=await e.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(t,s,a,i,n,r),d=o?.serverIndex??0,c=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet"]?.[d]?.url;return (p,m)=>v(l,g,y,o)(p,c||m)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(t,s,a,i){let n=await e.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(t,s,a,i),r=o?.serverIndex??0,l=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4DataValidationWorkflowsWorkflowIdValidationConfigGet(t,s){let a=await e.v4DataValidationWorkflowsWorkflowIdValidationConfigGet(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationWorkflowsWorkflowIdValidationConfigPut(t,s,a){let i=await e.v4DataValidationWorkflowsWorkflowIdValidationConfigPut(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationWorkflowsWorkflowIdValidationTogglePut(t,s,a){let i=await e.v4DataValidationWorkflowsWorkflowIdValidationTogglePut(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationTogglePut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(t,s,a){let i=await e.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)}}};var we=class extends X{v4DataValidationRulesActionsBulkApprovePost(e={},t){return T(this.configuration).v4DataValidationRulesActionsBulkApprovePost(e.bulkApproveRules,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsBulkDeletePost(e={},t){return T(this.configuration).v4DataValidationRulesActionsBulkDeletePost(e.bulkDeleteRules,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsDeleteAllDelete(e={},t){return T(this.configuration).v4DataValidationRulesActionsDeleteAllDelete(e.deleteRuleWithReason,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsGeneratePost(e={},t){return T(this.configuration).v4DataValidationRulesActionsGeneratePost(e.generateRule,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsGenerateRulesPost(e={},t){return T(this.configuration).v4DataValidationRulesActionsGenerateRulesPost(e.generateRules,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesGet(e={},t){return T(this.configuration).v4DataValidationRulesGet(e.groupId,e.workflowId,e.status,e.page,e.pageSize,e.includeDeleted,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesPost(e={},t){return T(this.configuration).v4DataValidationRulesPost(e.createRule,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdDelete(e,t){return T(this.configuration).v4DataValidationRulesRuleIdDelete(e.ruleId,e.deleteRuleWithReason,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdDisablePost(e,t){return T(this.configuration).v4DataValidationRulesRuleIdDisablePost(e.ruleId,e.disableRule,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdGet(e,t){return T(this.configuration).v4DataValidationRulesRuleIdGet(e.ruleId,e.includeDeleted,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdPut(e,t){return T(this.configuration).v4DataValidationRulesRuleIdPut(e.ruleId,e.updateRule,t).then(s=>s(this.axios,this.basePath))}v4DataValidationValidationsValidationIdAnomaliesGet(e,t){return T(this.configuration).v4DataValidationValidationsValidationIdAnomaliesGet(e.validationId,e.page,e.pageSize,t).then(s=>s(this.axios,this.basePath))}v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(e,t){return T(this.configuration).v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(e.validationId,e.ruleName,e.page,e.pageSize,t).then(s=>s(this.axios,this.basePath))}v4DataValidationValidationsValidationIdGet(e,t){return T(this.configuration).v4DataValidationValidationsValidationIdGet(e.validationId,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowIdJobsJobIdValidatePost(e,t){return T(this.configuration).v4DataValidationWorkflowIdJobsJobIdValidatePost(e.workflowId,e.jobId,e.dataValidationRequestBody,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(e.workflowId,e.jobId,e.dataValidationRequestBody,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(e.workflowId,e.jobId,e.page,e.pageSize,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(e.workflowId,e.jobId,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationConfigGet(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationConfigGet(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationConfigPut(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationConfigPut(e.workflowId,e.v4DataValidationWorkflowsWorkflowIdValidationConfigPutRequest,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationTogglePut(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationTogglePut(e.workflowId,e.v4DataValidationWorkflowsWorkflowIdValidationTogglePutRequest,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(e.workflowId,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}};var yi=function(o){return {v5NotificationsChannelsChannelIdDelete:async(e,t={})=>{S("v5NotificationsChannelsChannelIdDelete","channelId",e);let s="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v5NotificationsChannelsChannelIdGet:async(e,t,s={})=>{S("v5NotificationsChannelsChannelIdGet","channelId",e);let a="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),t!==void 0&&(d.includeConfigurations=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v5NotificationsChannelsChannelIdPut:async(e,t,s={})=>{S("v5NotificationsChannelsChannelIdPut","channelId",e),S("v5NotificationsChannelsChannelIdPut","v5NotificationsChannelsPostRequest",t);let a="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v5NotificationsChannelsGet:async(e,t,s={})=>{let a="/v5/notifications/channels",i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),e!==void 0&&(d.workflowId=e),t!==void 0&&(d.includeConfigurations=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v5NotificationsChannelsPost:async(e,t={})=>{S("v5NotificationsChannelsPost","v5NotificationsChannelsPostRequest",e);let s="/v5/notifications/channels",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v5NotificationsEventTypesEventTypeGet:async(e,t={})=>{S("v5NotificationsEventTypesEventTypeGet","eventType",e);let s="/v5/notifications/event-types/{eventType}".replace("{eventType}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v5NotificationsEventTypesGet:async(e={})=>{let t="/v5/notifications/event-types",s=new C(t,x),a;o&&(a=o.baseOptions);let i={method:"GET",...a,...e},n={},r={};await I(n,"x-api-key",o),k(s,r);let l=a&&a.headers?a.headers:{};return i.headers={...n,...l,...e.headers},{url:V(s),options:i}},v5NotificationsLogsGet:async(e,t,s,a,i,n,r={})=>{let l="/v5/notifications/logs",d=new C(l,x),c;o&&(c=o.baseOptions);let p={method:"GET",...c,...r},m={},h={};await I(m,"x-api-key",o),e!==void 0&&(h.workflowId=e),t!==void 0&&(h.eventType=t),s!==void 0&&(h.startDate=s instanceof Date?s.toISOString():s),a!==void 0&&(h.endDate=a instanceof Date?a.toISOString():a),i!==void 0&&(h.limit=i),n!==void 0&&(h.offset=n),k(d,h);let f=c&&c.headers?c.headers:{};return p.headers={...m,...f,...r.headers},{url:V(d),options:p}},v5NotificationsSettingsGet:async(e,t,s={})=>{let a="/v5/notifications/settings",i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),e!==void 0&&(d.workflowId=e),t!==void 0&&(d.eventType=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v5NotificationsSettingsPost:async(e,t={})=>{S("v5NotificationsSettingsPost","v5NotificationsSettingsPostRequest",e);let s="/v5/notifications/settings",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v5NotificationsSettingsSettingsIdDelete:async(e,t={})=>{S("v5NotificationsSettingsSettingsIdDelete","settingsId",e);let s="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v5NotificationsSettingsSettingsIdGet:async(e,t={})=>{S("v5NotificationsSettingsSettingsIdGet","settingsId",e);let s="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v5NotificationsSettingsSettingsIdPut:async(e,t,s={})=>{S("v5NotificationsSettingsSettingsIdPut","settingsId",e),S("v5NotificationsSettingsSettingsIdPut","v5NotificationsSettingsSettingsIdPutRequest",t);let a="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v5NotificationsTestPost:async(e,t={})=>{S("v5NotificationsTestPost","v5NotificationsTestPostRequest",e);let s="/v5/notifications/test",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}}}},K=function(o){let e=yi(o);return {async v5NotificationsChannelsChannelIdDelete(t,s){let a=await e.v5NotificationsChannelsChannelIdDelete(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsChannelsChannelIdDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsChannelsChannelIdGet(t,s,a){let i=await e.v5NotificationsChannelsChannelIdGet(t,s,a),n=o?.serverIndex??0,r=A["NotificationsApi.v5NotificationsChannelsChannelIdGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5NotificationsChannelsChannelIdPut(t,s,a){let i=await e.v5NotificationsChannelsChannelIdPut(t,s,a),n=o?.serverIndex??0,r=A["NotificationsApi.v5NotificationsChannelsChannelIdPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5NotificationsChannelsGet(t,s,a){let i=await e.v5NotificationsChannelsGet(t,s,a),n=o?.serverIndex??0,r=A["NotificationsApi.v5NotificationsChannelsGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5NotificationsChannelsPost(t,s){let a=await e.v5NotificationsChannelsPost(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsChannelsPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsEventTypesEventTypeGet(t,s){let a=await e.v5NotificationsEventTypesEventTypeGet(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsEventTypesEventTypeGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsEventTypesGet(t){let s=await e.v5NotificationsEventTypesGet(t),a=o?.serverIndex??0,i=A["NotificationsApi.v5NotificationsEventTypesGet"]?.[a]?.url;return (n,r)=>v(s,g,y,o)(n,i||r)},async v5NotificationsLogsGet(t,s,a,i,n,r,l){let d=await e.v5NotificationsLogsGet(t,s,a,i,n,r,l),c=o?.serverIndex??0,p=A["NotificationsApi.v5NotificationsLogsGet"]?.[c]?.url;return (m,h)=>v(d,g,y,o)(m,p||h)},async v5NotificationsSettingsGet(t,s,a){let i=await e.v5NotificationsSettingsGet(t,s,a),n=o?.serverIndex??0,r=A["NotificationsApi.v5NotificationsSettingsGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5NotificationsSettingsPost(t,s){let a=await e.v5NotificationsSettingsPost(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsSettingsPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsSettingsSettingsIdDelete(t,s){let a=await e.v5NotificationsSettingsSettingsIdDelete(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsSettingsSettingsIdDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsSettingsSettingsIdGet(t,s){let a=await e.v5NotificationsSettingsSettingsIdGet(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsSettingsSettingsIdGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsSettingsSettingsIdPut(t,s,a){let i=await e.v5NotificationsSettingsSettingsIdPut(t,s,a),n=o?.serverIndex??0,r=A["NotificationsApi.v5NotificationsSettingsSettingsIdPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5NotificationsTestPost(t,s){let a=await e.v5NotificationsTestPost(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsTestPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)}}};var Ne=class extends X{v5NotificationsChannelsChannelIdDelete(e,t){return K(this.configuration).v5NotificationsChannelsChannelIdDelete(e.channelId,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsChannelIdGet(e,t){return K(this.configuration).v5NotificationsChannelsChannelIdGet(e.channelId,e.includeConfigurations,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsChannelIdPut(e,t){return K(this.configuration).v5NotificationsChannelsChannelIdPut(e.channelId,e.v5NotificationsChannelsPostRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsGet(e={},t){return K(this.configuration).v5NotificationsChannelsGet(e.workflowId,e.includeConfigurations,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsPost(e,t){return K(this.configuration).v5NotificationsChannelsPost(e.v5NotificationsChannelsPostRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsEventTypesEventTypeGet(e,t){return K(this.configuration).v5NotificationsEventTypesEventTypeGet(e.eventType,t).then(s=>s(this.axios,this.basePath))}v5NotificationsEventTypesGet(e){return K(this.configuration).v5NotificationsEventTypesGet(e).then(t=>t(this.axios,this.basePath))}v5NotificationsLogsGet(e={},t){return K(this.configuration).v5NotificationsLogsGet(e.workflowId,e.eventType,e.startDate,e.endDate,e.limit,e.offset,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsGet(e={},t){return K(this.configuration).v5NotificationsSettingsGet(e.workflowId,e.eventType,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsPost(e,t){return K(this.configuration).v5NotificationsSettingsPost(e.v5NotificationsSettingsPostRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdDelete(e,t){return K(this.configuration).v5NotificationsSettingsSettingsIdDelete(e.settingsId,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdGet(e,t){return K(this.configuration).v5NotificationsSettingsSettingsIdGet(e.settingsId,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdPut(e,t){return K(this.configuration).v5NotificationsSettingsSettingsIdPut(e.settingsId,e.v5NotificationsSettingsSettingsIdPutRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsTestPost(e,t){return K(this.configuration).v5NotificationsTestPost(e.v5NotificationsTestPostRequest,t).then(s=>s(this.axios,this.basePath))}},Nt={WorkflowStarted:"workflow_started",WorkflowFinished:"workflow_finished",WorkflowFailed:"workflow_failed",WorkflowSampleFinished:"workflow_sample_finished",WorkflowDataChange:"workflow_data_change",SystemMaintenance:"system_maintenance",ServiceDegradation:"service_degradation",CreditsLow:"credits_low",FreeTrialEnding:"free_trial_ending"};var Ci=function(o){return {v4SchemasGet:async(e={})=>{let t="/v4/schemas/",s=new C(t,x),a;o&&(a=o.baseOptions);let i={method:"GET",...a,...e},n={},r={};await I(n,"x-api-key",o),k(s,r);let l=a&&a.headers?a.headers:{};return i.headers={...n,...l,...e.headers},{url:V(s),options:i}},v4SchemasPost:async(e,t={})=>{let s="/v4/schemas/",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4SchemasSchemaIdDelete:async(e,t={})=>{S("v4SchemasSchemaIdDelete","schemaId",e);let s="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4SchemasSchemaIdGet:async(e,t={})=>{S("v4SchemasSchemaIdGet","schemaId",e);let s="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4SchemasSchemaIdPut:async(e,t,s={})=>{S("v4SchemasSchemaIdPut","schemaId",e);let a="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}}}},ot=function(o){let e=Ci(o);return {async v4SchemasGet(t){let s=await e.v4SchemasGet(t),a=o?.serverIndex??0,i=A["SchemasApi.v4SchemasGet"]?.[a]?.url;return (n,r)=>v(s,g,y,o)(n,i||r)},async v4SchemasPost(t,s){let a=await e.v4SchemasPost(t,s),i=o?.serverIndex??0,n=A["SchemasApi.v4SchemasPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4SchemasSchemaIdDelete(t,s){let a=await e.v4SchemasSchemaIdDelete(t,s),i=o?.serverIndex??0,n=A["SchemasApi.v4SchemasSchemaIdDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4SchemasSchemaIdGet(t,s){let a=await e.v4SchemasSchemaIdGet(t,s),i=o?.serverIndex??0,n=A["SchemasApi.v4SchemasSchemaIdGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4SchemasSchemaIdPut(t,s,a){let i=await e.v4SchemasSchemaIdPut(t,s,a),n=o?.serverIndex??0,r=A["SchemasApi.v4SchemasSchemaIdPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)}}};var Ge=class extends X{v4SchemasGet(e){return ot(this.configuration).v4SchemasGet(e).then(t=>t(this.axios,this.basePath))}v4SchemasPost(e={},t){return ot(this.configuration).v4SchemasPost(e.createSchemaBody,t).then(s=>s(this.axios,this.basePath))}v4SchemasSchemaIdDelete(e,t){return ot(this.configuration).v4SchemasSchemaIdDelete(e.schemaId,t).then(s=>s(this.axios,this.basePath))}v4SchemasSchemaIdGet(e,t){return ot(this.configuration).v4SchemasSchemaIdGet(e.schemaId,t).then(s=>s(this.axios,this.basePath))}v4SchemasSchemaIdPut(e,t){return ot(this.configuration).v4SchemasSchemaIdPut(e.schemaId,e.updateSchemaBody,t).then(s=>s(this.axios,this.basePath))}};var Ai=function(o){return {v4ChangesChangeIdGet:async(e,t,s,a={})=>{S("v4ChangesChangeIdGet","changeId",e);let i="/v4/changes/{changeId}".replace("{changeId}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),await me(d,o),t!=null&&(d["x-api-key"]=String(t)),s!=null&&(d.Authorization=String(s)),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4ChangesGet:async(e,t,s,a,i,n,r,l,d={})=>{let c="/v4/changes",p=new C(c,x),m;o&&(m=o.baseOptions);let h={method:"GET",...m,...d},f={},R={};await I(f,"x-api-key",o),await me(f,o),s!==void 0&&(R.workflowIds=s),a!==void 0&&(R.startDate=a instanceof Date?a.toISOString():a),i!==void 0&&(R.endDate=i instanceof Date?i.toISOString():i),n!==void 0&&(R.skip=n),r!==void 0&&(R.limit=r),l!==void 0&&(R.exclude=l),e!=null&&(f["x-api-key"]=String(e)),t!=null&&(f.Authorization=String(t)),k(p,R);let w=m&&m.headers?m.headers:{};return h.headers={...f,...w,...d.headers},{url:V(p),options:h}},v4WorkflowsGet:async(e,t,s,a,i,n,r,l,d,c,p,m={})=>{let h="/v4/workflows",f=new C(h,x),R;o&&(R=o.baseOptions);let w={method:"GET",...R,...m},b={},D={};await I(b,"x-api-key",o),e!==void 0&&(D.search=e),t!==void 0&&(D.skip=t),s!==void 0&&(D.limit=s),a!==void 0&&(D.state=a),i&&(D.tags=i),n!==void 0&&(D.userId=n),r!==void 0&&(D.monitoring=r),l!==void 0&&(D.updateInterval=l),d!==void 0&&(D.templateId=d),c!==void 0&&(D.includeDeleted=c),p!==void 0&&(D.format=p),k(f,D);let N=R&&R.headers?R.headers:{};return w.headers={...b,...N,...m.headers},{url:V(f),options:w}},v4WorkflowsPost:async(e,t={})=>{let s="/v4/workflows/",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4WorkflowsWorkflowIdAuditlogGet:async(e,t,s,a,i,n={})=>{S("v4WorkflowsWorkflowIdAuditlogGet","workflowId",e);let r="/v4/workflows/{workflowId}/auditlog".replace("{workflowId}",encodeURIComponent(String(e))),l=new C(r,x),d;o&&(d=o.baseOptions);let c={method:"GET",...d,...n},p={},m={};await I(p,"x-api-key",o),await me(p,o),a!==void 0&&(m.page=a),i!==void 0&&(m.limit=i),t!=null&&(p["x-api-key"]=String(t)),s!=null&&(p.Authorization=String(s)),k(l,m);let h=d&&d.headers?d.headers:{};return c.headers={...p,...h,...n.headers},{url:V(l),options:c}},v4WorkflowsWorkflowIdComplianceApprovePut:async(e,t,s,a={})=>{S("v4WorkflowsWorkflowIdComplianceApprovePut","workflowId",e);let i="/v4/workflows/{workflowId}/compliance-approve".replace("{workflowId}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"PUT",...r,...a},d={},c={};await I(d,"x-api-key",o),t!=null&&(d["x-api-key"]=String(t)),s!=null&&(d.Authorization=String(s)),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4WorkflowsWorkflowIdComplianceRejectPut:async(e,t,s,a,i={})=>{S("v4WorkflowsWorkflowIdComplianceRejectPut","workflowId",e),S("v4WorkflowsWorkflowIdComplianceRejectPut","v4WorkflowsWorkflowIdComplianceRejectPutRequest",t);let n="/v4/workflows/{workflowId}/compliance-reject".replace("{workflowId}",encodeURIComponent(String(e))),r=new C(n,x),l;o&&(l=o.baseOptions);let d={method:"PUT",...l,...i},c={},p={};await I(c,"x-api-key",o),c["Content-Type"]="application/json",s!=null&&(c["x-api-key"]=String(s)),a!=null&&(c.Authorization=String(a)),k(r,p);let m=l&&l.headers?l.headers:{};return d.headers={...c,...m,...i.headers},d.data=E(t,d,o),{url:V(r),options:d}},v4WorkflowsWorkflowIdDataGet:async(e,t,s,a,i,n,r,l,d,c,p,m,h,f={})=>{S("v4WorkflowsWorkflowIdDataGet","workflowId",e);let R="/v4/workflows/{workflowId}/data".replace("{workflowId}",encodeURIComponent(String(e))),w=new C(R,x),b;o&&(b=o.baseOptions);let D={method:"GET",...b,...f},N={},q={};await I(N,"x-api-key",o),await me(N,o),a!==void 0&&(q.runId=a),i!==void 0&&(q.format=i),n!==void 0&&(q.sortBy=n),r!==void 0&&(q.order=r),l!==void 0&&(q.filters=l),d!==void 0&&(q.page=d),c!==void 0&&(q.limit=c),p!==void 0&&(q.gzip=p),m!==void 0&&(q.rowIds=m),h!==void 0&&(q.includeAnomalies=h),t!=null&&(N["x-api-key"]=String(t)),s!=null&&(N.Authorization=String(s)),k(w,q);let M=b&&b.headers?b.headers:{};return D.headers={...N,...M,...f.headers},{url:V(w),options:D}},v4WorkflowsWorkflowIdDelete:async(e,t={})=>{S("v4WorkflowsWorkflowIdDelete","workflowId",e);let s="/v4/workflows/{workflowId}".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4WorkflowsWorkflowIdGet:async(e,t={})=>{S("v4WorkflowsWorkflowIdGet","workflowId",e);let s="/v4/workflows/{workflowId}".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4WorkflowsWorkflowIdHistoryGet:async(e,t={})=>{S("v4WorkflowsWorkflowIdHistoryGet","workflowId",e);let s="/v4/workflows/{workflowId}/history".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4WorkflowsWorkflowIdJobsJobIdGet:async(e,t,s={})=>{S("v4WorkflowsWorkflowIdJobsJobIdGet","workflowId",e),S("v4WorkflowsWorkflowIdJobsJobIdGet","jobId",t);let a="/v4/workflows/{workflowId}/jobs/{jobId}".replace("{workflowId}",encodeURIComponent(String(e))).replace("{jobId}",encodeURIComponent(String(t))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v4WorkflowsWorkflowIdMetadataPut:async(e,t,s={})=>{S("v4WorkflowsWorkflowIdMetadataPut","workflowId",e),S("v4WorkflowsWorkflowIdMetadataPut","v4WorkflowsWorkflowIdMetadataPutRequest",t);let a="/v4/workflows/{workflowId}/metadata".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4WorkflowsWorkflowIdPausePut:async(e,t={})=>{S("v4WorkflowsWorkflowIdPausePut","workflowId",e);let s="/v4/workflows/{workflowId}/pause".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"PUT",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4WorkflowsWorkflowIdResumePut:async(e,t={})=>{S("v4WorkflowsWorkflowIdResumePut","workflowId",e);let s="/v4/workflows/{workflowId}/resume".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"PUT",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4WorkflowsWorkflowIdRunPut:async(e,t,s={})=>{S("v4WorkflowsWorkflowIdRunPut","workflowId",e);let a="/v4/workflows/{workflowId}/run".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4WorkflowsWorkflowIdSchedulePut:async(e,t,s={})=>{S("v4WorkflowsWorkflowIdSchedulePut","workflowId",e),S("v4WorkflowsWorkflowIdSchedulePut","v4WorkflowsWorkflowIdSchedulePutRequest",t);let a="/v4/workflows/{workflowId}/schedule".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v5ChangesChangeIdGet:async(e,t,s,a={})=>{S("v5ChangesChangeIdGet","changeId",e);let i="/v5/changes/{changeId}".replace("{changeId}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),await me(d,o),t!=null&&(d["x-api-key"]=String(t)),s!=null&&(d.Authorization=String(s)),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v5ChangesGet:async(e,t,s,a,i,n,r,l={})=>{let d="/v5/changes",c=new C(d,x),p;o&&(p=o.baseOptions);let m={method:"GET",...p,...l},h={},f={};await I(h,"x-api-key",o),await me(h,o),s!==void 0&&(f.workflowIds=s),a!==void 0&&(f.startDate=a instanceof Date?a.toISOString():a),i!==void 0&&(f.endDate=i instanceof Date?i.toISOString():i),n!==void 0&&(f.skip=n),r!==void 0&&(f.limit=r),e!=null&&(h["x-api-key"]=String(e)),t!=null&&(h.Authorization=String(t)),k(c,f);let R=p&&p.headers?p.headers:{};return m.headers={...h,...R,...l.headers},{url:V(c),options:m}},v5WorkflowsWorkflowIdAuditlogGet:async(e,t,s,a,i,n={})=>{S("v5WorkflowsWorkflowIdAuditlogGet","workflowId",e);let r="/v5/workflows/{workflowId}/auditlog".replace("{workflowId}",encodeURIComponent(String(e))),l=new C(r,x),d;o&&(d=o.baseOptions);let c={method:"GET",...d,...n},p={},m={};await I(p,"x-api-key",o),await me(p,o),a!==void 0&&(m.page=a),i!==void 0&&(m.limit=i),t!=null&&(p["x-api-key"]=String(t)),s!=null&&(p.Authorization=String(s)),k(l,m);let h=d&&d.headers?d.headers:{};return c.headers={...p,...h,...n.headers},{url:V(l),options:c}}}},U=function(o){let e=Ai(o);return {async v4ChangesChangeIdGet(t,s,a,i){let n=await e.v4ChangesChangeIdGet(t,s,a,i),r=o?.serverIndex??0,l=A["WorkflowsApi.v4ChangesChangeIdGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4ChangesGet(t,s,a,i,n,r,l,d,c){let p=await e.v4ChangesGet(t,s,a,i,n,r,l,d,c),m=o?.serverIndex??0,h=A["WorkflowsApi.v4ChangesGet"]?.[m]?.url;return (f,R)=>v(p,g,y,o)(f,h||R)},async v4WorkflowsGet(t,s,a,i,n,r,l,d,c,p,m,h){let f=await e.v4WorkflowsGet(t,s,a,i,n,r,l,d,c,p,m,h),R=o?.serverIndex??0,w=A["WorkflowsApi.v4WorkflowsGet"]?.[R]?.url;return (b,D)=>v(f,g,y,o)(b,w||D)},async v4WorkflowsPost(t,s){let a=await e.v4WorkflowsPost(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdAuditlogGet(t,s,a,i,n,r){let l=await e.v4WorkflowsWorkflowIdAuditlogGet(t,s,a,i,n,r),d=o?.serverIndex??0,c=A["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[d]?.url;return (p,m)=>v(l,g,y,o)(p,c||m)},async v4WorkflowsWorkflowIdComplianceApprovePut(t,s,a,i){let n=await e.v4WorkflowsWorkflowIdComplianceApprovePut(t,s,a,i),r=o?.serverIndex??0,l=A["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4WorkflowsWorkflowIdComplianceRejectPut(t,s,a,i,n){let r=await e.v4WorkflowsWorkflowIdComplianceRejectPut(t,s,a,i,n),l=o?.serverIndex??0,d=A["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[l]?.url;return (c,p)=>v(r,g,y,o)(c,d||p)},async v4WorkflowsWorkflowIdDataGet(t,s,a,i,n,r,l,d,c,p,m,h,f,R){let w=await e.v4WorkflowsWorkflowIdDataGet(t,s,a,i,n,r,l,d,c,p,m,h,f,R),b=o?.serverIndex??0,D=A["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[b]?.url;return (N,q)=>v(w,g,y,o)(N,D||q)},async v4WorkflowsWorkflowIdDelete(t,s){let a=await e.v4WorkflowsWorkflowIdDelete(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdGet(t,s){let a=await e.v4WorkflowsWorkflowIdGet(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdHistoryGet(t,s){let a=await e.v4WorkflowsWorkflowIdHistoryGet(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdJobsJobIdGet(t,s,a){let i=await e.v4WorkflowsWorkflowIdJobsJobIdGet(t,s,a),n=o?.serverIndex??0,r=A["WorkflowsApi.v4WorkflowsWorkflowIdJobsJobIdGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4WorkflowsWorkflowIdMetadataPut(t,s,a){let i=await e.v4WorkflowsWorkflowIdMetadataPut(t,s,a),n=o?.serverIndex??0,r=A["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4WorkflowsWorkflowIdPausePut(t,s){let a=await e.v4WorkflowsWorkflowIdPausePut(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdResumePut(t,s){let a=await e.v4WorkflowsWorkflowIdResumePut(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdRunPut(t,s,a){let i=await e.v4WorkflowsWorkflowIdRunPut(t,s,a),n=o?.serverIndex??0,r=A["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4WorkflowsWorkflowIdSchedulePut(t,s,a){let i=await e.v4WorkflowsWorkflowIdSchedulePut(t,s,a),n=o?.serverIndex??0,r=A["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5ChangesChangeIdGet(t,s,a,i){let n=await e.v5ChangesChangeIdGet(t,s,a,i),r=o?.serverIndex??0,l=A["WorkflowsApi.v5ChangesChangeIdGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v5ChangesGet(t,s,a,i,n,r,l,d){let c=await e.v5ChangesGet(t,s,a,i,n,r,l,d),p=o?.serverIndex??0,m=A["WorkflowsApi.v5ChangesGet"]?.[p]?.url;return (h,f)=>v(c,g,y,o)(h,m||f)},async v5WorkflowsWorkflowIdAuditlogGet(t,s,a,i,n,r){let l=await e.v5WorkflowsWorkflowIdAuditlogGet(t,s,a,i,n,r),d=o?.serverIndex??0,c=A["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[d]?.url;return (p,m)=>v(l,g,y,o)(p,c||m)}}};var st=class extends X{v4ChangesChangeIdGet(e,t){return U(this.configuration).v4ChangesChangeIdGet(e.changeId,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v4ChangesGet(e={},t){return U(this.configuration).v4ChangesGet(e.xApiKey,e.authorization,e.workflowIds,e.startDate,e.endDate,e.skip,e.limit,e.exclude,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsGet(e={},t){return U(this.configuration).v4WorkflowsGet(e.search,e.skip,e.limit,e.state,e.tags,e.userId,e.monitoring,e.updateInterval,e.templateId,e.includeDeleted,e.format,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsPost(e={},t){return U(this.configuration).v4WorkflowsPost(e.createWorkflowBody,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdAuditlogGet(e,t){return U(this.configuration).v4WorkflowsWorkflowIdAuditlogGet(e.workflowId,e.xApiKey,e.authorization,e.page,e.limit,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdComplianceApprovePut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdComplianceApprovePut(e.workflowId,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdComplianceRejectPut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdComplianceRejectPut(e.workflowId,e.v4WorkflowsWorkflowIdComplianceRejectPutRequest,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdDataGet(e,t){return U(this.configuration).v4WorkflowsWorkflowIdDataGet(e.workflowId,e.xApiKey,e.authorization,e.runId,e.format,e.sortBy,e.order,e.filters,e.page,e.limit,e.gzip,e.rowIds,e.includeAnomalies,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdDelete(e,t){return U(this.configuration).v4WorkflowsWorkflowIdDelete(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdGet(e,t){return U(this.configuration).v4WorkflowsWorkflowIdGet(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdHistoryGet(e,t){return U(this.configuration).v4WorkflowsWorkflowIdHistoryGet(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdJobsJobIdGet(e,t){return U(this.configuration).v4WorkflowsWorkflowIdJobsJobIdGet(e.workflowId,e.jobId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdMetadataPut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdMetadataPut(e.workflowId,e.v4WorkflowsWorkflowIdMetadataPutRequest,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdPausePut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdPausePut(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdResumePut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdResumePut(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdRunPut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdRunPut(e.workflowId,e.v4WorkflowsWorkflowIdRunPutRequest,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdSchedulePut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdSchedulePut(e.workflowId,e.v4WorkflowsWorkflowIdSchedulePutRequest,t).then(s=>s(this.axios,this.basePath))}v5ChangesChangeIdGet(e,t){return U(this.configuration).v5ChangesChangeIdGet(e.changeId,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v5ChangesGet(e={},t){return U(this.configuration).v5ChangesGet(e.xApiKey,e.authorization,e.workflowIds,e.startDate,e.endDate,e.skip,e.limit,t).then(s=>s(this.axios,this.basePath))}v5WorkflowsWorkflowIdAuditlogGet(e,t){return U(this.configuration).v5WorkflowsWorkflowIdAuditlogGet(e.workflowId,e.xApiKey,e.authorization,e.page,e.limit,t).then(s=>s(this.axios,this.basePath))}};var at=class{constructor(e={}){this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.awsv4=e.awsv4,this.basePath=e.basePath,this.serverIndex=e.serverIndex,this.baseOptions={...e.baseOptions,headers:{...e.baseOptions?.headers}},this.formDataCtor=e.formDataCtor;}isJsonMime(e){let t=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return e!==null&&(t.test(e)||e.toLowerCase()==="application/json-patch+json")}};var Y={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Date:"DATE",Datetime:"DATETIME",Money:"MONEY",Image:"IMAGE",Link:"LINK",Object:"OBJECT",Array:"ARRAY"};var Co=class{},xi={String:Y.String,Number:Y.Number,Boolean:Y.Boolean,Date:Y.Date,Datetime:Y.Datetime,Money:Y.Money,Image:Y.Image,Link:Y.Link,Object:Y.Object,Array:Y.Array},Ii={...xi,Text:Y.String,Url:Y.Link};var Te=class{constructor(e){this.fetchPage=e;}async fetchAll(e={}){let t=[],s=1,a=true;for(;a;){let i=await this.fetchPage({...e,page:s});t.push(...i.data);let n=i.pagination;a=n.page!==void 0&&n.totalPages!==void 0&&n.page<n.totalPages,s++;}return t}async*pages(e={}){let t=1,s=true;for(;s;){let a=await this.fetchPage({...e,page:t});yield a;let i=a.pagination;s=i.page!==void 0&&i.totalPages!==void 0&&i.page<i.totalPages,t++;}}async*items(e={}){for await(let t of this.pages(e))for(let s of t.data)yield s;}};var it=class{constructor(e){this.workflowsApi=e;this.defaultLimit=100;}async fetchData(e){return (await this.workflowsApi.v4WorkflowsWorkflowIdDataGet({...e,page:e.page??1,limit:e.limit??this.defaultLimit})).data}async fetchAllData(e){return new Te(s=>this.fetchData({...e,...s})).fetchAll({limit:e.limit??this.defaultLimit})}async*fetchDataPages(e){let t=new Te(s=>this.fetchData({...e,...s}));for await(let s of t.pages({limit:e.limit??this.defaultLimit}))yield s;}};var Z={AUTH_ERROR:"AUTH_ERROR",VALIDATION_ERROR:"VALIDATION_ERROR",BAD_REQUEST:"BAD_REQUEST",NOT_FOUND:"NOT_FOUND",INTERNAL_ERROR:"INTERNAL_ERROR"},le=class le extends Error{constructor(e,t){super(e),this.name="KadoaSdkException",this.code=t?.code??"UNKNOWN",this.details=t?.details,t&&"cause"in t&&(this.cause=t.cause),Error.captureStackTrace?.(this,le);}static from(e,t){if(e instanceof le)return e;let s=e instanceof Error?e.message:typeof e=="string"?e:"Unexpected error";return new le(s,{code:"UNKNOWN",details:t,cause:e})}toJSON(){return {name:this.name,message:this.message,code:this.code,details:this.details}}toString(){return [this.name,this.code,this.message].filter(Boolean).join(": ")}toDetailedString(){let e=[`${this.name}: ${this.message}`,`Code: ${this.code}`];return this.details&&Object.keys(this.details).length>0&&e.push(`Details: ${JSON.stringify(this.details,null,2)}`),this.cause&&e.push(`Cause: ${this.cause}`),e.join(`
7
- `)}static isInstance(e){return e instanceof le}static wrap(e,t){if(e instanceof le)return e;let s=t?.message||(e instanceof Error?e.message:typeof e=="string"?e:"Unexpected error");return new le(s,{code:"UNKNOWN",details:t?.details,cause:e})}};le.ERROR_MESSAGES={CONFIG_ERROR:"Invalid configuration provided",AUTH_FAILED:"Authentication failed. Please check your API key",RATE_LIMITED:"Rate limit exceeded. Please try again later",NETWORK_ERROR:"Network error occurred",SERVER_ERROR:"Server error occurred",PARSE_ERROR:"Failed to parse response",BAD_REQUEST:"Bad request",ABORTED:"Aborted",NOT_FOUND:"Not found",NO_WORKFLOW_ID:"Failed to start extraction process - no ID received",WORKFLOW_CREATE_FAILED:"Failed to create workflow",WORKFLOW_TIMEOUT:"Workflow processing timed out",WORKFLOW_UNEXPECTED_STATUS:"Extraction completed with unexpected status",PROGRESS_CHECK_FAILED:"Failed to check extraction progress",DATA_FETCH_FAILED:"Failed to retrieve extracted data from workflow",NO_URLS:"At least one URL is required for extraction",NO_API_KEY:"API key is required for entity detection",LINK_REQUIRED:"Link is required for entity field detection",NO_PREDICTIONS:"No entity predictions returned from the API",EXTRACTION_FAILED:"Data extraction failed for the provided URLs",ENTITY_FETCH_FAILED:"Failed to fetch entity fields",ENTITY_INVARIANT_VIOLATION:"No valid entity provided",SCHEMA_NOT_FOUND:"Schema not found",SCHEMA_FETCH_ERROR:"Failed to fetch schema",SCHEMAS_FETCH_ERROR:"Failed to fetch schemas",SCHEMA_CREATE_FAILED:"Failed to create schema",SCHEMA_UPDATE_FAILED:"Failed to update schema",SCHEMA_DELETE_FAILED:"Failed to delete schema"};var P=le,_=P.ERROR_MESSAGES;var O=class o extends P{constructor(e,t){super(e,{code:t?.code,details:t?.details,cause:t?.cause}),this.name="KadoaHttpException",this.httpStatus=t?.httpStatus,this.requestId=t?.requestId,this.endpoint=t?.endpoint,this.method=t?.method,this.responseBody=t?.responseBody;}static fromAxiosError(e,t){let s=e.response?.status,a=e.response?.headers?.["x-request-id"]||e.response?.headers?.["x-amzn-requestid"],i=e.config?.method?.toUpperCase(),n=e.config?.url;return new o(t?.message||e.message,{code:o.mapStatusToCode(e),httpStatus:s,requestId:a,endpoint:n,method:i,responseBody:e.response?.data,details:t?.details,cause:e})}toJSON(){return {...super.toJSON(),httpStatus:this.httpStatus,requestId:this.requestId,endpoint:this.endpoint,method:this.method,responseBody:this.responseBody}}toDetailedString(){let e=[`${this.name}: ${this.message}`,`Code: ${this.code}`];return this.httpStatus&&e.push(`HTTP Status: ${this.httpStatus}`),this.method&&this.endpoint&&e.push(`Request: ${this.method} ${this.endpoint}`),this.requestId&&e.push(`Request ID: ${this.requestId}`),this.responseBody&&e.push(`Response Body: ${JSON.stringify(this.responseBody,null,2)}`),this.details&&Object.keys(this.details).length>0&&e.push(`Details: ${JSON.stringify(this.details,null,2)}`),this.cause&&e.push(`Cause: ${this.cause}`),e.join(`
8
- `)}static wrap(e,t){return e instanceof o||e instanceof P?e:xs(e)?o.fromAxiosError(e,t):P.wrap(e,t)}static mapStatusToCode(e){let t=typeof e=="number"?e:e.response?.status;return t?t===401||t===403?"AUTH_ERROR":t===404?"NOT_FOUND":t===408?"TIMEOUT":t===429?"RATE_LIMITED":t>=400&&t<500?"VALIDATION_ERROR":t>=500?"HTTP_ERROR":"UNKNOWN":typeof e=="number"?"UNKNOWN":e.code==="ECONNABORTED"?"TIMEOUT":e.request?"NETWORK_ERROR":"UNKNOWN"}};var Ws=ta(Ps()),de=o=>(0, Ws.default)(`kadoa:${o}`),z={client:de("client"),wss:de("wss"),extraction:de("extraction"),http:de("http"),workflow:de("workflow"),crawl:de("crawl"),notifications:de("notifications"),schemas:de("schemas"),validation:de("validation")};function Ao(o){if(!o||typeof o!="object")return false;let e=Object.getPrototypeOf(o);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(o)==="[object Object]":false}function bs(o){return o==="__proto__"}function ne(o,e){let t=Object.keys(e);for(let s=0;s<t.length;s++){let a=t[s];if(bs(a))continue;let i=e[a],n=o[a];Array.isArray(i)?Array.isArray(n)?o[a]=ne(n,i):o[a]=ne([],i):Ao(i)?Ao(n)?o[a]=ne(n,i):o[a]=ne({},i):(n===void 0||i!==void 0)&&(o[a]=i);}return o}function Ds(o){return o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()}var Gi=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function Os(o){return Array.from(o.match(Gi)??[])}function xo(o){let e=Os(o);if(e.length===0)return "";let[t,...s]=e;return `${t.toLowerCase()}${s.map(a=>Ds(a)).join("")}`}function Io(o){return o.substring(0,1).toUpperCase()+o.substring(1)}var Le=class Le{constructor(){this.fields=[];}hasSchemaFields(){return this.fields.some(e=>e.fieldType==="SCHEMA")}entity(e){return this.entityName=e,this}field(e,t,s,a){if(this.validateFieldName(e),Le.TYPES_REQUIRING_EXAMPLE.includes(s)&&!a?.example)throw new P(`Field "${e}" with type ${s} requires an example`,{code:"VALIDATION_ERROR",details:{name:e,dataType:s}});return this.fields.push({name:e,description:t,dataType:s,fieldType:"SCHEMA",example:a?.example,isKey:a?.isKey}),this}classify(e,t,s){return this.validateFieldName(e),this.fields.push({name:e,description:t,fieldType:"CLASSIFICATION",categories:s}),this}raw(e){let t=Array.isArray(e)?e:[e];for(let s of t){let a=`raw${Io(xo(s))}`;this.fields.some(i=>i.name===a)||this.fields.push({name:a,description:`Raw page content in ${s.toUpperCase()} format`,fieldType:"METADATA",metadataKey:s});}return this}build(){if(this.hasSchemaFields()&&!this.entityName)throw new P("Entity name is required when schema fields are present",{code:"VALIDATION_ERROR",details:{entityName:this.entityName}});return {entityName:this.entityName,fields:this.fields}}validateFieldName(e){if(!Le.FIELD_NAME_PATTERN.test(e))throw new P(`Field name "${e}" must be alphanumeric only (no underscores or special characters)`,{code:"VALIDATION_ERROR",details:{name:e,pattern:"^[A-Za-z0-9]+$"}});let t=e.toLowerCase();if(this.fields.some(s=>s.name.toLowerCase()===t))throw new P(`Duplicate field name: "${e}"`,{code:"VALIDATION_ERROR",details:{name:e}})}};Le.FIELD_NAME_PATTERN=/^[A-Za-z0-9]+$/,Le.TYPES_REQUIRING_EXAMPLE=["STRING","IMAGE","LINK","OBJECT","ARRAY"];var Ie=Le;var Ft=z.schemas,ke=class{constructor(e){this.schemasApi=new Ge(e.configuration);}builder(e){let t=this;return new class extends Ie{constructor(){super(),e&&this.entity(e);}async create(s){let a=this.build(),i=s??a.entityName;if(!i)throw new P("Schema name is required when entity name is not provided",{code:"VALIDATION_ERROR",details:{name:s}});let n={name:i,fields:a.fields,...a.entityName?{entity:a.entityName}:{}};return t.createSchema(n)}}}async getSchema(e){Ft("Fetching schema with ID: %s",e);let s=(await this.schemasApi.v4SchemasSchemaIdGet({schemaId:e})).data.data;if(!s)throw new P(`${_.SCHEMA_NOT_FOUND}: ${e}`,{code:Z.NOT_FOUND,details:{schemaId:e}});return s}async listSchemas(){return (await this.schemasApi.v4SchemasGet()).data.data}async createSchema(e){Ft("Creating schema with name: %s",e.name);let s=(await this.schemasApi.v4SchemasPost({createSchemaBody:e})).data.schemaId;if(!s)throw new P(_.SCHEMA_CREATE_FAILED,{code:Z.INTERNAL_ERROR});return this.getSchema(s)}async updateSchema(e,t){return Ft("Updating schema with ID: %s",e),await this.schemasApi.v4SchemasSchemaIdPut({schemaId:e,updateSchemaBody:t}),this.getSchema(e)}async deleteSchema(e){Ft("Deleting schema with ID: %s",e),await this.schemasApi.v4SchemasSchemaIdDelete({schemaId:e});}};var Ti="/v4/entity",nt=class{constructor(e){this.client=e;this.schemasService=new ke(e);}async resolveEntity(e,t){if(e==="ai-detection"){if(!t?.link)throw new P(_.LINK_REQUIRED,{code:"VALIDATION_ERROR",details:{entityConfig:e,options:t}});let s=await this.fetchEntityFields({link:t.link,location:t.location,navigationMode:t.navigationMode,selectorMode:t.selectorMode??false});return {entity:s.entity,fields:s.fields}}else if(e){if("schemaId"in e){let s=await this.schemasService.getSchema(e.schemaId);return {entity:s.entity??void 0,fields:s.schema}}else if("fields"in e)return {entity:e.name,fields:e.fields}}throw new P(_.ENTITY_INVARIANT_VIOLATION,{details:{entity:e}})}async fetchEntityFields(e){this.validateEntityOptions(e);let t=`${this.client.baseUrl}${Ti}`,s=e,i=(await this.client.axiosInstance.post(t,s,{headers:{"Content-Type":"application/json",Accept:"application/json","x-api-key":this.client.apiKey}})).data;if(!i.success||!i.entityPrediction||i.entityPrediction.length===0)throw new P(_.NO_PREDICTIONS,{code:"NOT_FOUND",details:{success:i.success,hasPredictions:!!i.entityPrediction,predictionCount:i.entityPrediction?.length||0,link:e.link}});return i.entityPrediction[0]}validateEntityOptions(e){if(!e.link)throw new P(_.LINK_REQUIRED,{code:"VALIDATION_ERROR",details:{options:e}})}};var Fi=z.extraction,Ui=new Set(["FINISHED","SUCCESS"]),ko={mode:"run",pollingInterval:5e3,maxWaitTime:3e5,navigationMode:"single-page",location:{type:"auto"},bypassPreview:true,autoStart:true},rt=class{constructor(e,t,s,a,i,n){this.workflowsCoreService=e;this.dataFetcherService=t;this.entityResolverService=s;this.notificationSetupService=a;this.notificationChannelsService=i;this.notificationSettingsService=n;}async run(e){return await this.executeExtraction({...e,mode:"run"})}async submit(e){return await this.executeExtraction({...e,mode:"submit"})}async runJob(e,t){return await this.workflowsCoreService.runWorkflow(e,t)}async runJobAndWait(e,t){let s=await this.workflowsCoreService.runWorkflow(e,t);return await this.workflowsCoreService.waitForJobCompletion(e,s.jobId||"")}async fetchData(e){return await this.dataFetcherService.fetchData(e)}async fetchAllData(e){return await this.dataFetcherService.fetchAllData(e)}fetchDataPages(e){return this.dataFetcherService.fetchDataPages(e)}async getNotificationChannels(e){return await this.notificationChannelsService.listChannels({workflowId:e})}async getNotificationSettings(e){return await this.notificationSettingsService.listSettings({workflowId:e})}async executeExtraction(e){this.validateOptions(e);let t=ne(ko,e);if(t.interval==="REAL_TIME")throw new P("extraction.run()/submit() are not supported for real-time workflows. Use the builder API, call waitForReady(), and subscribe via client.realtime.onEvent(...).",{code:"BAD_REQUEST",details:{interval:"REAL_TIME"}});let a,i=t.navigationMode==="agentic-navigation";if(i&&!t.userPrompt)throw new P("userPrompt is required when navigationMode is 'agentic-navigation'",{code:"VALIDATION_ERROR",details:{navigationMode:t.navigationMode}});let n;if(i){let f=e.entity||"ai-detection";n={entity:typeof f=="object"&&"name"in f?f.name:void 0,fields:typeof f=="object"&&"fields"in f?f.fields:[]};}else n=await this.entityResolverService.resolveEntity(e.entity||"ai-detection",{link:t.urls[0],location:t.location,navigationMode:t.navigationMode});let r=!!t.notifications,l={...t,fields:n.fields,...n.entity!==void 0?{entity:n.entity}:{},...t.userPrompt?{userPrompt:t.userPrompt}:{}};if(a=(await this.workflowsCoreService.create(l)).id,r){let f=await this.notificationSetupService.setup({workflowId:a,events:t.notifications?.events,channels:t.notifications?.channels});Fi("Notifications setup: %O",f.map(R=>({id:R.id,eventType:R.eventType})));}if(t.mode==="submit")return {workflowId:a};let c=await this.workflowsCoreService.wait(a,{pollIntervalMs:t.pollingInterval,timeoutMs:t.maxWaitTime}),p,m;if(this.isExtractionSuccessful(c.runState)){let f=await this.dataFetcherService.fetchData({workflowId:a});p=f.data,m=f.pagination;}else throw new P(`${_.WORKFLOW_UNEXPECTED_STATUS}: ${c.runState}`,{code:"INTERNAL_ERROR",details:{workflowId:a,runState:c.runState,state:c.state}});return {workflowId:a,workflow:c,data:p,pagination:m}}validateOptions(e){if(!e.urls||e.urls.length===0)throw new P(_.NO_URLS,{code:"VALIDATION_ERROR"})}async resumeWorkflow(e){await this.workflowsCoreService.resume(e);let t=await this.workflowsCoreService.wait(e,{pollIntervalMs:ko.pollingInterval,timeoutMs:ko.maxWaitTime}),s,a;if(this.isExtractionSuccessful(t.runState)){let n=await this.dataFetcherService.fetchData({workflowId:e});s=n.data,a=n.pagination;}else throw new P(`${_.WORKFLOW_UNEXPECTED_STATUS}: ${t.runState}`,{code:"INTERNAL_ERROR",details:{workflowId:e,runState:t.runState,state:t.state}});return {workflowId:e,workflow:t,data:s,pagination:a}}isExtractionSuccessful(e){return e?Ui.has(e.toUpperCase()):false}};var Vo=z.extraction,lt=class{constructor(e,t,s,a){this.workflowsCoreService=e;this.entityResolverService=t;this.dataFetcherService=s;this.notificationSetupService=a;}get options(){return L__default.default(this._options,"Options are not set"),this._options}get notificationOptions(){return this._notificationOptions}get monitoringOptions(){return this._monitoringOptions}get workflowId(){return L__default.default(this._workflowId,"Workflow ID is not set"),this._workflowId}get jobId(){return L__default.default(this._jobId,"Job ID is not set"),this._jobId}extract({urls:e,name:t,description:s,navigationMode:a,extraction:i,additionalData:n,bypassPreview:r,userPrompt:l,interval:d,schedules:c,location:p}){let m="ai-detection";if(i){let h=i(new Ie);if("schemaId"in h)m={schemaId:h.schemaId};else {let f=h.build();m=f.entityName?{name:f.entityName,fields:f.fields}:{fields:f.fields};}}return l&&(this._userPrompt=l),this._options={urls:e,name:t,description:s,navigationMode:a||"single-page",entity:m,bypassPreview:r??false,additionalData:n,userPrompt:l,interval:d,schedules:c,location:p},this}withNotifications(e){return this._notificationOptions=e,this}withMonitoring(e){return this._monitoringOptions=e,this}bypassPreview(){return L__default.default(this._options,"Options are not set"),this._options.bypassPreview=true,this}setInterval(e){return L__default.default(this._options,"Options are not set"),"interval"in e?this._options.interval=e.interval:(this._options.interval="CUSTOM",this._options.schedules=e.schedules),this}setLocation(e){return L__default.default(this._options,"Options are not set"),this._options.location=e,this}withPrompt(e){return L__default.default(this._options,"Options are not set"),this._userPrompt=e,this._options.userPrompt=e,this}async create(){L__default.default(this._options,"Options are not set");let{urls:e,name:t,description:s,navigationMode:a,entity:i}=this.options,n=a==="agentic-navigation";if(n&&!this._userPrompt)throw new P("userPrompt is required when navigationMode is 'agentic-navigation'",{code:"VALIDATION_ERROR",details:{navigationMode:a}});let l=this._options.interval==="REAL_TIME"&&i==="ai-detection",d;n?d={entity:typeof i=="object"&&"name"in i?i.name:void 0,fields:typeof i=="object"&&"fields"in i?i.fields:[]}:d=await this.entityResolverService.resolveEntity(i,{link:e[0],location:this._options.location,navigationMode:a,selectorMode:l});let c=await this.workflowsCoreService.create({urls:e,name:t,description:s,navigationMode:a,monitoring:this._monitoringOptions,schemaId:typeof i=="object"&&"schemaId"in i?i.schemaId:void 0,entity:d.entity,fields:d.fields,autoStart:false,interval:this._options.interval,schedules:this._options.schedules,additionalData:this._options.additionalData,bypassPreview:this._options.bypassPreview,userPrompt:this._userPrompt});return this._notificationOptions&&await this.notificationSetupService.setup({...this._notificationOptions,workflowId:c.id}),this._workflowId=c.id,this}async waitForReady(e){L__default.default(this._workflowId,"Workflow ID is not set");let t=e?.targetState??"PREVIEW",s=await this.workflowsCoreService.get(this._workflowId);return s.state===t||t==="PREVIEW"&&s.state==="ACTIVE"?s:await this.workflowsCoreService.wait(this._workflowId,{targetState:t,pollIntervalMs:e?.pollIntervalMs,timeoutMs:e?.timeoutMs})}async run(e){if(L__default.default(this._options,"Options are not set"),L__default.default(this._workflowId,"Workflow ID is not set"),this._options.interval==="REAL_TIME")throw new P("run() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",{code:"BAD_REQUEST",details:{interval:"REAL_TIME",workflowId:this._workflowId}});let t=await this.workflowsCoreService.runWorkflow(this._workflowId,{variables:e?.variables,limit:e?.limit});L__default.default(t.jobId,"Job ID is not set"),Vo("Job started: %O",t),this._jobId=t.jobId;let s=await this.workflowsCoreService.waitForJobCompletion(this._workflowId,t.jobId);return Vo("Job finished: %O",s),this}async submit(e){if(L__default.default(this._options,"Options are not set"),L__default.default(this._workflowId,"Workflow ID is not set"),this._options.interval==="REAL_TIME")throw new P("submit() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",{code:"BAD_REQUEST",details:{interval:"REAL_TIME",workflowId:this._workflowId}});let t=await this.workflowsCoreService.runWorkflow(this._workflowId,{variables:e?.variables,limit:e?.limit});return L__default.default(t.jobId,"Job ID is not set"),Vo("Job submitted: %O",t),this._jobId=t.jobId,{workflowId:this._workflowId,jobId:this._jobId}}async fetchData(e){return L__default.default(this._workflowId,"Workflow ID is not set"),L__default.default(this._jobId,"Job ID is not set"),this.dataFetcherService.fetchData({workflowId:this._workflowId,runId:this._jobId,page:e.page??1,limit:e.limit??100,...e})}async fetchAllData(e){return L__default.default(this._jobId,"Job ID is not set"),L__default.default(this._workflowId,"Workflow ID is not set"),this.dataFetcherService.fetchAllData({workflowId:this._workflowId,runId:this._jobId,...e})}};var Re={EMAIL:"EMAIL",SLACK:"SLACK",WEBHOOK:"WEBHOOK",WEBSOCKET:"WEBSOCKET"};var Es=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Bi(o){let e=[];if(!o.recipients?.length)e.push({message:"Recipients are required for email channel"});else for(let t of o.recipients)Es.test(t)||e.push({message:`Invalid email address: ${t}`});if(o.from!==void 0&&(Es.test(o.from)?o.from.endsWith("@kadoa.com")||e.push({message:"From email address must end with @kadoa.com"}):e.push({message:`Invalid from email address: ${o.from}`})),e.length>0)throw new P("Invalid email channel config",{code:Z.VALIDATION_ERROR,details:{issues:e}});return o}var Ut=class Ut{constructor(e,t){this.api=e,this.userService=t;}async listChannels(e){let t=await this.api.v5NotificationsChannelsGet(e),s=t.data.data?.channels;if(!s)throw O.wrap(t,{message:"Failed to list channels"});return s}async listAllChannels(e){if(!e)return this.listChannels({});let[t,s]=await Promise.all([this.listChannels({workflowId:e}),this.listChannels({})]),a=[...t];return s.forEach(i=>{a.find(n=>n.id===i.id)||a.push(i);}),a}async deleteChannel(e){let t=await this.api.v5NotificationsChannelsChannelIdDelete({channelId:e});if(t.status!==200)throw O.wrap(t,{message:"Failed to delete channel"})}async createChannel(e,t){let s=await this.buildPayload(ne(t||{},{name:Ut.DEFAULT_CHANNEL_NAME,channelType:e,config:{}})),a=await this.api.v5NotificationsChannelsPost({v5NotificationsChannelsPostRequest:s});if(a.status===201){let i=a.data.data?.channel;if(!i)throw O.wrap(a,{message:"Failed to create default channels"});return i}throw O.wrap(a,{message:"Failed to create default channels"})}async buildPayload(e){let t;switch(e.channelType){case Re.EMAIL:t=await this.buildEmailChannelConfig(e.config);break;case Re.SLACK:t=await this.buildSlackChannelConfig(e.config);break;case Re.WEBHOOK:t=await this.buildWebhookChannelConfig(e.config);break;case Re.WEBSOCKET:t=await this.buildWebsocketChannelConfig(e.config);break;default:t={};}return {name:e.name||"Default Channel",channelType:e.channelType,config:t}}async buildEmailChannelConfig(e){let t=e.recipients;e.recipients?.length||(t=[(await this.userService.getCurrentUser()).email]);let s=ne(e,{recipients:t});return Bi(s)}async buildSlackChannelConfig(e){return e}async buildWebhookChannelConfig(e){return e}async buildWebsocketChannelConfig(e){return e}};Ut.DEFAULT_CHANNEL_NAME="default";var ce=Ut;var dt=class{constructor(e){this.api=e;}async createSettings(e){let t=await this.api.v5NotificationsSettingsPost({v5NotificationsSettingsPostRequest:e}),s=t.data.data?.settings;if(!s)throw O.wrap(t,{message:"Failed to create notification settings"});return s}async listSettings(e){let t=await this.api.v5NotificationsSettingsGet(e),s=t.data.data?.settings;if(!s)throw O.wrap(t,{message:"Failed to list notification settings"});return s}async listAllEvents(){return Object.values(Nt)}async deleteSettings(e){let t=await this.api.v5NotificationsSettingsSettingsIdDelete({settingsId:e});if(t.status!==200)throw O.wrap(t,{message:"Failed to delete notification settings"})}};var he=z.notifications,ct=class{constructor(e,t){this.channelsService=e;this.settingsService=t;}async setupForWorkflow(e){if((await this.settingsService.listSettings({workflowId:e.workflowId})).length>0)throw new P("Settings already exist",{code:Z.BAD_REQUEST,details:{workflowId:e.workflowId}});return this.setup({workflowId:e.workflowId,events:e.events,channels:e.channels})}async setupForWorkspace(e){if((await this.settingsService.listSettings({})).length>0)throw new P("Workspace settings already exist",{code:Z.BAD_REQUEST});return this.setup({events:e.events,channels:e.channels})}async setup(e){e.workflowId?he("Setting up notifications for workflow %s",e.workflowId):he("Setting up notifications for workspace");let t=await this.setupChannels({workflowId:e.workflowId,channels:e.channels||{}}),s=e.events||"all",a=s==="all"?await this.settingsService.listAllEvents():s,i=t.map(r=>r.id).filter(Boolean);he("Creating notification settings for workflow %s: %O",e.workflowId,{events:a,channels:i});let n=await Promise.all(a.map(async r=>await this.settingsService.createSettings({workflowId:e.workflowId,channelIds:i,eventType:r,enabled:true,eventConfiguration:{}})));return he(e.workflowId?"Successfully setup notifications for workflow %s":"Successfully setup notifications for workspace",e.workflowId),n}async setupChannels(e){let t=await this.channelsService.listAllChannels(e.workflowId),s=Object.entries(e.channels).filter(([,d])=>d===true),a=Object.entries(e.channels).filter(([d,c])=>typeof c=="object"&&"channelId"in c),i=Object.entries(e.channels).filter(([,d])=>typeof d=="object"&&!("channelId"in d)),n=await this.handleChannelsById({channelsById:a,existingChannels:t,workflowId:e.workflowId}),r=await this.handleDefaultChannels({channelsByName:s,existingChannels:t,workflowId:e.workflowId}),l=await this.handleChannelsByConfig({channelsByConfig:i,existingChannels:t,workflowId:e.workflowId});return [...n,...r,...l]}async handleChannelsById({channelsById:e,existingChannels:t,workflowId:s}){let a=e.map(([l,d])=>d.channelId),i=t.filter(l=>l.id&&a.includes(l.id)),n=i.map(l=>l.id),r=a.filter(l=>!n.includes(l));if(r.length>0)throw new P(`Channels not found: ${r.join(", ")}`,{code:Z.NOT_FOUND,details:{workflowId:s,missingChannelIds:r}});return i}async handleDefaultChannels({channelsByName:e,existingChannels:t,workflowId:s}){return await Promise.all(e.map(async([i])=>{let n=i===Re.WEBSOCKET?t.find(l=>l.channelType===i):t.find(l=>l.channelType===i&&l.name===ce.DEFAULT_CHANNEL_NAME);if(n)return he("Using existing default channel: %O",{workflowId:s,channelType:i,channelId:n.id}),n;let r=await this.channelsService.createChannel(i);return he("Created default channel %O",{workflowId:s,channelType:i,channel:r}),r}))}async handleChannelsByConfig({channelsByConfig:e,existingChannels:t,workflowId:s}){return e.length===0?[]:await Promise.all(e.map(async([i,n])=>{let r=n.name||ce.DEFAULT_CHANNEL_NAME,l=t.find(c=>c.channelType===i&&(c.name||ce.DEFAULT_CHANNEL_NAME)===r);if(l)return he("Using existing channel: %O",{workflowId:s,channelType:i,channelName:r,channelId:l.id}),l;let d=await this.channelsService.createChannel(i,{name:r,config:n});return he("Created channel with custom config %O",{workflowId:s,channelType:i,channelName:r,channel:d}),d}))}};var Bt="https://api.kadoa.com",qs="wss://realtime.kadoa.com",Ns="https://realtime.kadoa.com";var ge="0.19.3",Lt="kadoa-node-sdk",Gs="node";var re=z.wss;typeof WebSocket>"u"&&(window.WebSocket=Xs("ws"));var pt=class{constructor(e){this.lastHeartbeat=Date.now();this.isConnecting=false;this.eventListeners=new Set;this.connectionListeners=new Set;this.errorListeners=new Set;this.apiKey=e.apiKey,this.heartbeatInterval=e.heartbeatInterval||1e4,this.reconnectDelay=e.reconnectDelay||5e3,this.missedHeartbeatsLimit=e.missedHeartbeatsLimit||3e4,this.source=e.source;}async connect(){if(!this.isConnecting){this.isConnecting=true;try{let e=await fetch(`${Bt}/v4/oauth2/token`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":`${this.apiKey}`,"x-sdk-version":ge}}),{access_token:t,team_id:s}=await e.json();this.socket=new WebSocket(`${qs}?access_token=${t}`),this.socket.onopen=()=>{this.isConnecting=!1,this.lastHeartbeat=Date.now(),this.socket?.readyState===WebSocket.OPEN&&(this.socket.send(JSON.stringify({action:"subscribe",channel:s,...this.source&&{source:this.source}})),re("Connected to WebSocket"),this.notifyConnectionListeners(!0)),this.startHeartbeatCheck();},this.socket.onmessage=a=>{try{let i=JSON.parse(a.data);i.type==="heartbeat"?this.handleHeartbeat():(i?.id&&fetch(`${Ns}/api/v1/events/ack`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:i.id})}),this.notifyEventListeners(i));}catch(i){re("Failed to parse incoming message: %O",i);}},this.socket.onclose=()=>{re("WebSocket disconnected. Attempting to reconnect..."),this.isConnecting=!1,this.stopHeartbeatCheck(),this.notifyConnectionListeners(!1,"Connection closed"),setTimeout(()=>this.connect(),this.reconnectDelay);},this.socket.onerror=a=>{re("WebSocket error: %O",a),this.isConnecting=!1,this.notifyErrorListeners(a);};}catch(e){re("Failed to connect: %O",e),this.isConnecting=false,setTimeout(()=>this.connect(),this.reconnectDelay);}}}handleHeartbeat(){re("Heartbeat received"),this.lastHeartbeat=Date.now();}notifyEventListeners(e){this.eventListeners.forEach(t=>{try{t(e);}catch(s){re("Error in event listener: %O",s);}});}notifyConnectionListeners(e,t){this.connectionListeners.forEach(s=>{try{s(e,t);}catch(a){re("Error in connection listener: %O",a);}});}notifyErrorListeners(e){this.errorListeners.forEach(t=>{try{t(e);}catch(s){re("Error in error listener: %O",s);}});}startHeartbeatCheck(){this.missedHeartbeatCheckTimer=setInterval(()=>{Date.now()-this.lastHeartbeat>this.missedHeartbeatsLimit&&(re("No heartbeat received in 30 seconds! Closing connection."),this.socket?.close());},this.heartbeatInterval);}stopHeartbeatCheck(){this.missedHeartbeatCheckTimer&&clearInterval(this.missedHeartbeatCheckTimer);}onEvent(e){return this.eventListeners.add(e),()=>{this.eventListeners.delete(e);}}onConnection(e){return this.connectionListeners.add(e),()=>{this.connectionListeners.delete(e);}}onError(e){return this.errorListeners.add(e),()=>{this.errorListeners.delete(e);}}close(){this.socket&&(this.stopHeartbeatCheck(),this.socket.close(),this.socket=void 0),this.eventListeners.clear(),this.connectionListeners.clear(),this.errorListeners.clear();}isConnected(){return this.socket?.readyState===WebSocket.OPEN}};var ut=class{constructor(e){this.client=e;}async getCurrentUser(){let t=(await this.client.axiosInstance.get("/v5/user",{baseURL:this.client.baseUrl,headers:{"x-api-key":this.client.apiKey,"Content-Type":"application/json"}})).data;if(!t||!t.userId)throw new P("Invalid user data received");return {userId:t.userId,email:t.email,featureFlags:t.featureFlags||[]}}};var Li={pollIntervalMs:1e4,timeoutMs:300*1e3},Ts={ABORTED:"ABORTED",TIMEOUT:"TIMEOUT"};async function _e(o,e,t={}){let s={...Li,...t},a=Math.max(1e4,s.pollIntervalMs),i=s.timeoutMs,n=Date.now(),r=0;for(;Date.now()-n<i;){if(s.abortSignal?.aborted)throw new P("Polling operation was aborted",{code:Ts.ABORTED});r++;let l=await o();if(e(l))return {result:l,attempts:r,duration:Date.now()-n};await new Promise(d=>setTimeout(d,a));}throw new P(`Polling operation timed out after ${i}ms`,{code:Ts.TIMEOUT,details:{timeoutMs:i,attempts:r,duration:Date.now()-n}})}function _t(o){if(o!==void 0){if(o===null||typeof o!="object"||Array.isArray(o))throw new P("additionalData must be a plain object",{code:"VALIDATION_ERROR"});try{JSON.stringify(o).length>100*1024&&console.warn("[Kadoa SDK] additionalData exceeds 100KB, consider reducing size");}catch{throw new P("additionalData must be JSON-serializable",{code:"VALIDATION_ERROR"})}}}var _i="https://registry.npmjs.org",Fs="@kadoa/node-sdk";async function Us(){try{let o=await fetch(`${_i}/${Fs}`,{headers:{Accept:"application/json"}});if(!o.ok)return;let t=(await o.json())["dist-tags"]?.latest;if(!t)return;ji(t,ge)&&console.warn(`\u26A0\uFE0F A new version of ${Lt} is available: ${t} (current: ${ge}). Update with: npm install ${Fs}@latest`);}catch{}}function ji(o,e){let t=o.split(".").map(Number),s=e.split(".").map(Number);for(let a=0;a<Math.max(t.length,s.length);a++){let i=t[a]||0,n=s[a]||0;if(i>n)return true;if(i<n)return false}return false}var ft=class{constructor(e){this.validationApi=new we(e.configuration,e.baseUrl,e.axiosInstance);}async listWorkflowValidations(e){let t=await this.validationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(e);if(t.status!==200)throw O.wrap(t.data,{message:"Failed to list workflow validations"});return t.data}async getValidationDetails(e){let t=await this.validationApi.v4DataValidationValidationsValidationIdGet({validationId:e});if(t.status!==200||t.data.error)throw O.wrap(t.data,{message:"Failed to get validation details"});return t.data}async scheduleValidation(e,t){let s=await this.validationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost({workflowId:e,jobId:t});if(s.status!==200||s.data.error)throw O.wrap(s.data,{message:s.data.message||"Failed to schedule validation"});return s.data}async toggleValidationEnabled(e){let t=await this.validationApi.v4DataValidationWorkflowsWorkflowIdValidationTogglePut({workflowId:e});if(t.status!==200||t.data.error)throw O.wrap(t.data,{message:t.data.message||"Failed to toggle validation"});return t.data}async getLatestValidation(e,t){let s;if(t?s=await this.validationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet({workflowId:e,jobId:t}):s=await this.validationApi.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet({workflowId:e}),s.status!==200||s.data?.error)throw O.wrap(s.data,{message:"Failed to get latest validation"});return s.data}async getValidationAnomalies(e){let t=await this.validationApi.v4DataValidationValidationsValidationIdAnomaliesGet({validationId:e});if(t.status!==200)throw O.wrap(t.data,{message:"Failed to get validation anomalies"});return t.data}async getValidationAnomaliesByRule(e,t){let s=await this.validationApi.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet({validationId:e,ruleName:t});if(s.status!==200)throw O.wrap(s.data,{message:"Failed to get validation anomalies by rule"});return s.data}async waitUntilCompleted(e,t){return (await _e(async()=>{let a=await this.getValidationDetails(e);if(a.error)throw new P(`Validation failed: ${a.error}`,{code:"VALIDATION_ERROR",details:{validationId:e,error:a.error}});return a},a=>a.completedAt!=null,t)).result}};var mt=class{constructor(e){this.validationApi=new we(e.configuration,e.baseUrl,e.axiosInstance);}async listRules(e){let t=await this.validationApi.v4DataValidationRulesGet(e);if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:"Failed to list validation rules"});return t.data}async getRuleById(e){let t=await this.validationApi.v4DataValidationRulesRuleIdGet({ruleId:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:"Failed to get validation rule by id"});return t.data.data}async getRuleByName(e){let t=await this.validationApi.v4DataValidationRulesGet();if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:"Failed to get validation rule by name"});return t.data.data?.find(s=>s.name===e)}async createRule(e){let t=await this.validationApi.v4DataValidationRulesPost({createRule:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to create validation rule"});return t.data.data}async updateRule(e,t){let s=await this.validationApi.v4DataValidationRulesRuleIdPut({ruleId:e,updateRule:t});if(s.status!==200||s.data.error)throw O.wrap(s.data.data,{message:s.data.message||"Failed to update validation rule"});return s.data.data}async disableRule(e){let t=await this.validationApi.v4DataValidationRulesRuleIdDisablePost(e);if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to disable validation rule"});return t.data.data}async generateRule(e){let t=await this.validationApi.v4DataValidationRulesActionsGeneratePost({generateRule:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to generate validation rule"});return t.data.data}async generateRules(e){let t=await this.validationApi.v4DataValidationRulesActionsGenerateRulesPost({generateRules:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to generate validation rules"});return t.data.data}async bulkApproveRules(e){let t=await this.validationApi.v4DataValidationRulesActionsBulkApprovePost({bulkApproveRules:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to bulk approve validation rules"});return t.data.data}async bulkDeleteRules(e){let t=await this.validationApi.v4DataValidationRulesActionsBulkDeletePost({bulkDeleteRules:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to bulk delete validation rules"});return t.data.data}async deleteAllRules(e){let t=await this.validationApi.v4DataValidationRulesActionsDeleteAllDelete({deleteRuleWithReason:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to delete all validation rules"});return t.data.data}};var wt={Finished:"FINISHED",Failed:"FAILED",NotSupported:"NOT_SUPPORTED",FailedInsufficientFunds:"FAILED_INSUFFICIENT_FUNDS"};var Ls=new Set([wt.Finished,wt.Failed,wt.NotSupported,wt.FailedInsufficientFunds]),_s=new Set(["FINISHED","SUCCESS","FAILED","ERROR","STOPPED","CANCELLED"]),Bs=z.workflow,Rt=class{constructor(e){this.workflowsApi=e;}async create(e){_t(e.additionalData);let t=new URL(e.urls[0]).hostname;if(e.navigationMode==="agentic-navigation"){if(!e.userPrompt)throw new P("userPrompt is required when navigationMode is 'agentic-navigation'",{code:"VALIDATION_ERROR",details:{navigationMode:e.navigationMode}});let n={urls:e.urls,navigationMode:"agentic-navigation",name:e.name??t,description:e.description,userPrompt:e.userPrompt,schemaId:e.schemaId,entity:e.entity,fields:e.fields,bypassPreview:e.bypassPreview??true,tags:e.tags,interval:e.interval,monitoring:e.monitoring,location:e.location,autoStart:e.autoStart,schedules:e.schedules,additionalData:e.additionalData},r=await this.workflowsApi.v4WorkflowsPost({createWorkflowBody:n}),l=r.data?.workflowId;if(!l)throw new P(_.NO_WORKFLOW_ID,{code:"INTERNAL_ERROR",details:{response:r.data}});return {id:l}}let s={urls:e.urls,name:e.name??t,schemaId:e.schemaId,description:e.description,navigationMode:e.navigationMode,entity:e.entity??"",fields:e.fields,bypassPreview:e.bypassPreview??true,tags:e.tags,interval:e.interval,monitoring:e.monitoring,location:e.location,autoStart:e.autoStart,schedules:e.schedules,additionalData:e.additionalData},a=await this.workflowsApi.v4WorkflowsPost({createWorkflowBody:s}),i=a.data?.workflowId;if(!i)throw new P(_.NO_WORKFLOW_ID,{code:"INTERNAL_ERROR",details:{response:a.data}});return {id:i}}async get(e){return (await this.workflowsApi.v4WorkflowsWorkflowIdGet({workflowId:e})).data}async list(e){return (await this.workflowsApi.v4WorkflowsGet(e)).data?.workflows??[]}async getByName(e){return (await this.workflowsApi.v4WorkflowsGet({search:e})).data?.workflows?.[0]}async delete(e){await this.workflowsApi.v4WorkflowsWorkflowIdDelete({workflowId:e});}async update(e,t){return _t(t.additionalData),(await this.workflowsApi.v4WorkflowsWorkflowIdMetadataPut({workflowId:e,v4WorkflowsWorkflowIdMetadataPutRequest:t})).data}async resume(e){await this.workflowsApi.v4WorkflowsWorkflowIdResumePut({workflowId:e});}async wait(e,t){return (await _e(async()=>{let a=await this.get(e);return Bs("workflow %s state: %s",e,a.runState),a},a=>!!(t?.targetState&&a.state===t.targetState||a.runState&&_s.has(a.runState.toUpperCase())&&a.state!=="QUEUED"),t)).result}async runWorkflow(e,t){let s=await this.workflowsApi.v4WorkflowsWorkflowIdRunPut({workflowId:e,v4WorkflowsWorkflowIdRunPutRequest:{variables:t.variables,limit:t.limit}}),a=s.data?.jobId;if(!a)throw new P(_.NO_WORKFLOW_ID,{code:"INTERNAL_ERROR",details:{response:s.data}});return {jobId:a,message:s.data?.message,status:s.data?.status}}async getJobStatus(e,t){return (await this.workflowsApi.v4WorkflowsWorkflowIdJobsJobIdGet({workflowId:e,jobId:t})).data}async waitForJobCompletion(e,t,s){return (await _e(async()=>{let i=await this.getJobStatus(e,t);return Bs("workflow run %s state: %s",t,i.state),i},i=>!!(s?.targetStatus&&i.state===s.targetStatus||i.state&&Ls.has(i.state)),s)).result}};var j=[];for(let o=0;o<256;++o)j.push((o+256).toString(16).slice(1));function js(o,e=0){return (j[o[e+0]]+j[o[e+1]]+j[o[e+2]]+j[o[e+3]]+"-"+j[o[e+4]]+j[o[e+5]]+"-"+j[o[e+6]]+j[o[e+7]]+"-"+j[o[e+8]]+j[o[e+9]]+"-"+j[o[e+10]]+j[o[e+11]]+j[o[e+12]]+j[o[e+13]]+j[o[e+14]]+j[o[e+15]]).toLowerCase()}var vo,Mi=new Uint8Array(16);function So(){if(!vo){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");vo=crypto.getRandomValues.bind(crypto);}return vo(Mi)}var Ji=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Po={randomUUID:Ji};function Hi(o,e,t){o=o||{};let s=o.random??o.rng?.()??So();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[t+a]=s[a];return e}return js(s)}function Ki(o,e,t){return Po.randomUUID&&!e&&!o?Po.randomUUID():Hi(o,e,t)}var Wo=Ki;var jt=class{constructor(e){this.client=e;this._api=null;}get api(){return this._api||(this._api=new Ae(this.client.configuration,this.client.baseUrl,this.client.axiosInstance)),this._api}async createConfig(e){return (await this.api.v4CrawlConfigPost({createCrawlerConfigRequest:e})).data}async getConfig(e){return (await this.api.v4CrawlConfigConfigIdGet({configId:e})).data}async deleteConfig(e){return (await this.api.v4CrawlConfigDelete({deleteCrawlerConfigRequest:{configId:e}})).data}};var Mt=class{constructor(e){this.client=e;this._api=null;}get api(){return this._api||(this._api=new Ae(this.client.configuration,this.client.baseUrl,this.client.axiosInstance)),this._api}async start(e){return (await this.api.v4CrawlPost({startCrawlerSessionRequest:e})).data}async startWithConfig(e){return (await this.api.v4CrawlStartPost({startSessionWithConfigRequest:e})).data}async pause(e){return (await this.api.v4CrawlPausePost({pauseCrawlerSessionRequest:{sessionId:e}})).data}async resume(e){return (await this.api.v4CrawlResumePost({resumeCrawlerSessionRequest:{sessionId:e}})).data}async listSessions(e){return (await this.api.v4CrawlSessionsGet({page:e?.page,pageSize:e?.pageSize,userId:e?.userId})).data.data??[]}async getSessionStatus(e){return (await this.api.v4CrawlSessionIdStatusGet({sessionId:e})).data}async getPages(e,t){return (await this.api.v4CrawlSessionIdPagesGet({sessionId:e,currentPage:t?.currentPage,pageSize:t?.pageSize})).data}async getPage(e,t,s){return (await this.api.v4CrawlSessionIdPagesPageIdGet({sessionId:e,pageId:t,format:s?.format})).data}async getAllSessionData(e,t){return (await this.api.v4CrawlSessionIdListGet({sessionId:e,includeAll:t?.includeAll})).data}async getBucketFile(e){return (await this.api.v4CrawlBucketDataFilenameb64Get({filenameb64:e})).data}};function Ms(o){return {config:new jt(o),session:new Mt(o)}}function Js(o,e){return {rules:e,schedule:(t,s)=>o.scheduleValidation(t,s),listWorkflowValidations:t=>o.listWorkflowValidations(t),getValidationDetails:t=>o.getValidationDetails(t),toggleEnabled:t=>o.toggleValidationEnabled(t),getLatest:(t,s)=>o.getLatestValidation(t,s),getAnomalies:t=>o.getValidationAnomalies(t),getAnomaliesByRule:(t,s)=>o.getValidationAnomaliesByRule(t,s),waitUntilCompleted:(t,s)=>o.waitUntilCompleted(t,s)}}var bo=class{constructor(e){this._baseUrl=Bt,this._timeout=e.timeout||3e4,this._apiKey=e.apiKey;let t={"User-Agent":`${Lt}/${ge}`,"X-SDK-Version":ge,"X-SDK-Language":Gs};this._configuration=new at({apiKey:this._apiKey,basePath:this._baseUrl,baseOptions:{headers:t}}),this._axiosInstance=g.create({timeout:this._timeout,headers:t}),this._axiosInstance.interceptors.request.use(w=>(w.headers["x-request-id"]=Wo(),w)),this._axiosInstance.interceptors.response.use(w=>{if(w.status===401)throw new O("Unauthorized",{code:Z.AUTH_ERROR,httpStatus:401});return w},w=>{throw w instanceof As&&w.response?.status===400?O.wrap(w):O.wrap(w)});let s=new st(this.configuration,this.baseUrl,this.axiosInstance),a=new Ne(this.configuration,this.baseUrl,this.axiosInstance),i=new ut(this),n=new it(s),r=new ce(a,i),l=new dt(a),d=new nt(this),c=new Rt(s),p=new ke(this),m=new ct(r,l),h=new ft(this),f=new mt(this),R=new rt(c,n,d,m,r,l);this._extractionBuilderService=new lt(c,d,n,m),this.user=i,this.extraction=R,this.workflow=c,this.schema=p,this.notification={channels:r,settings:l,setup:m,configure:w=>m.setup(w),setupForWorkflow:w=>m.setupForWorkflow(w),setupForWorkspace:w=>m.setupForWorkspace(w)},this.validation=Js(h,f),this.crawler=Ms(this),e.enableRealtime&&e.realtimeConfig?.autoConnect!==false&&this.connectRealtime(),Us().catch(()=>{});}get configuration(){return this._configuration}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}get apiKey(){return this._apiKey}get timeout(){return this._timeout}get realtime(){return this._realtime}extract(e){return this._extractionBuilderService.extract(e)}connectRealtime(){return this._realtime||(this._realtime=new pt({apiKey:this._apiKey}),this._realtime.connect()),this._realtime}disconnectRealtime(){this._realtime&&(this._realtime.close(),this._realtime=void 0);}isRealtimeConnected(){return this._realtime?.isConnected()??false}async status(){return {baseUrl:this._baseUrl,user:await this.user.getCurrentUser(),realtimeConnected:this.isRealtimeConnected()}}dispose(){this.disconnectRealtime();}};
9
- exports.DataFetcherService=it;exports.ERROR_MESSAGES=_;exports.EntityResolverService=nt;exports.ExtractionBuilderService=lt;exports.ExtractionService=rt;exports.FetchDataOptions=Co;exports.KadoaClient=bo;exports.KadoaHttpException=O;exports.KadoaSdkException=P;exports.NotificationChannelType=Re;exports.NotificationChannelsService=ce;exports.NotificationSettingsEventTypeEnum=Nt;exports.NotificationSettingsService=dt;exports.NotificationSetupService=ct;exports.Realtime=pt;exports.SchemaBuilder=Ie;exports.SchemaFieldDataType=Ii;exports.SchemasService=ke;exports.TERMINAL_JOB_STATES=Ls;exports.TERMINAL_RUN_STATES=_s;exports.UserService=ut;exports.ValidationCoreService=ft;exports.ValidationRulesService=mt;exports.WorkflowsCoreService=Rt;exports.pollUntil=_e;exports.validateAdditionalData=_t;return exports;})({},L);//# sourceMappingURL=index.global.js.map
5
+ `):" "+Rs(n[0]):"as no adapter specified";throw new W("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return a}var bt={getAdapter:Ri,adapters:fo};function mo(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new ae(null,o)}function Dt(o){return mo(o),o.headers=B.from(o.headers),o.data=Qe.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",false),bt.getAdapter(o.adapter||De.adapter,o)(o).then(function(s){return mo(o),s.data=Qe.call(o,o.transformResponse,s),s.headers=B.from(s.headers),s},function(s){return Ye(s)||(mo(o),s&&s.response&&(s.response.data=Qe.call(o,o.transformResponse,s.response),s.response.headers=B.from(s.response.headers))),Promise.reject(s)})}var Ot="1.13.2";var Et={};["object","boolean","number","function","string","symbol"].forEach((o,e)=>{Et[o]=function(s){return typeof s===o||"a"+(e<1?"n ":" ")+o};});var hs={};Et.transitional=function(e,t,s){function a(i,n){return "[Axios v"+Ot+"] Transitional option '"+i+"'"+n+(s?". "+s:"")}return (i,n,r)=>{if(e===false)throw new W(a(n," has been removed"+(t?" in "+t:"")),W.ERR_DEPRECATED);return t&&!hs[n]&&(hs[n]=true,console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,n,r):true}};Et.spelling=function(e){return (t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),true)};function hi(o,e,t){if(typeof o!="object")throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);let s=Object.keys(o),a=s.length;for(;a-- >0;){let i=s[a],n=e[i];if(n){let r=o[i],l=r===void 0||n(r,i,o);if(l!==true)throw new W("option "+i+" must be "+l,W.ERR_BAD_OPTION_VALUE);continue}if(t!==true)throw new W("Unknown option "+i,W.ERR_BAD_OPTION)}}var et={assertOptions:hi,validators:Et};var ie=et.validators,qe=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Xt,response:new Xt};}async request(e,t){try{return await this._request(e,t)}catch(s){if(s instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;let i=a.stack?a.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
6
+ `+i):s.stack=i;}catch{}}throw s}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=oe(this.defaults,t);let{transitional:s,paramsSerializer:a,headers:i}=t;s!==void 0&&et.assertOptions(s,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},false),a!=null&&(u.isFunction(a)?t.paramsSerializer={serialize:a}:et.assertOptions(a,{encode:ie.function,serialize:ie.function},true)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=true),et.assertOptions(t,{baseUrl:ie.spelling("baseURL"),withXsrfToken:ie.spelling("withXSRFToken")},true),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=i&&u.merge(i.common,i[t.method]);i&&u.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f];}),t.headers=B.concat(n,i);let r=[],l=true;this.interceptors.request.forEach(function(R){typeof R.runWhen=="function"&&R.runWhen(t)===false||(l=l&&R.synchronous,r.unshift(R.fulfilled,R.rejected));});let d=[];this.interceptors.response.forEach(function(R){d.push(R.fulfilled,R.rejected);});let c,p=0,m;if(!l){let f=[Dt.bind(this),void 0];for(f.unshift(...r),f.push(...d),m=f.length,c=Promise.resolve(t);p<m;)c=c.then(f[p++],f[p++]);return c}m=r.length;let h=t;for(;p<m;){let f=r[p++],R=r[p++];try{h=f(h);}catch(w){R.call(this,w);break}}try{c=Dt.call(this,h);}catch(f){return Promise.reject(f)}for(p=0,m=d.length;p<m;)c=c.then(d[p++],d[p++]);return c}getUri(e){e=oe(this.defaults,e);let t=Ze(e.baseURL,e.url,e.allowAbsoluteUrls);return $e(t,e.params,e.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(e){qe.prototype[e]=function(t,s){return this.request(oe(s||{},{method:e,url:t,data:(s||{}).data}))};});u.forEach(["post","put","patch"],function(e){function t(s){return function(i,n,r){return this.request(oe(r||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}qe.prototype[e]=t(),qe.prototype[e+"Form"]=t(true);});var tt=qe;var wo=class o{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i;});let s=this;this.promise.then(a=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](a);s._listeners=null;}),this.promise.then=a=>{let i,n=new Promise(r=>{s.subscribe(r),i=r;}).then(a);return n.cancel=function(){s.unsubscribe(i);},n},e(function(i,n,r){s.reason||(s.reason=new ae(i,n,r),t(s.reason));});}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e];}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1);}toAbortSignal(){let e=new AbortController,t=s=>{e.abort(s);};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return {token:new o(function(a){e=a;}),cancel:e}}},gs=wo;function Ro(o){return function(t){return o.apply(null,t)}}function ho(o){return u.isObject(o)&&o.isAxiosError===true}var go={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(go).forEach(([o,e])=>{go[e]=o;});var ys=go;function Cs(o){let e=new tt(o),t=Me(tt.prototype.request,e);return u.extend(t,tt.prototype,e,{allOwnKeys:true}),u.extend(t,e,null,{allOwnKeys:true}),t.create=function(a){return Cs(oe(o,a))},t}var F=Cs(De);F.Axios=tt;F.CanceledError=ae;F.CancelToken=gs;F.isCancel=Ye;F.VERSION=Ot;F.toFormData=fe;F.AxiosError=W;F.Cancel=F.CanceledError;F.all=function(e){return Promise.all(e)};F.spread=Ro;F.isAxiosError=ho;F.mergeConfig=oe;F.AxiosHeaders=B;F.formToJSON=o=>vt(u.isHTMLForm(o)?new FormData(o):o);F.getAdapter=bt.getAdapter;F.HttpStatusCode=ys;F.default=F;var g=F;var{Axios:Yl,AxiosError:As,CanceledError:Xl,isCancel:Zl,CancelToken:ed,VERSION:td,all:od,Cancel:sd,isAxiosError:xs,spread:ad,toFormData:id,AxiosHeaders:nd,HttpStatusCode:rd,formToJSON:ld,getAdapter:dd,mergeConfig:cd}=g;var C=globalThis.URL,Is=globalThis.URLSearchParams;var y="https://api.kadoa.com".replace(/\/+$/,"");var X=class{constructor(e,t=y,s=g){this.basePath=t;this.axios=s;e&&(this.configuration=e,this.basePath=e.basePath??t);}},qt=class extends Error{constructor(t,s){super(s);this.field=t;this.name="RequiredError";}},A={};var x="https://example.com",S=function(o,e,t){if(t==null)throw new qt(e,`Required parameter ${e} was null or undefined when calling ${o}.`)},I=async function(o,e,t){if(t&&t.apiKey){let s=typeof t.apiKey=="function"?await t.apiKey(e):await t.apiKey;o[e]=s;}};var me=async function(o,e){if(e&&e.accessToken){let t=typeof e.accessToken=="function"?await e.accessToken():await e.accessToken;o.Authorization="Bearer "+t;}};function yo(o,e,t=""){e!=null&&(typeof e=="object"?Array.isArray(e)?e.forEach(s=>yo(o,s,t)):Object.keys(e).forEach(s=>yo(o,e[s],`${t}${t!==""?".":""}${s}`)):o.has(t)?o.append(t,e):o.set(t,e));}var k=function(o,...e){let t=new Is(o.search);yo(t,e),o.search=t.toString();},E=function(o,e,t){let s=typeof o!="string";return (s&&t&&t.isJsonMime?t.isJsonMime(e.headers["Content-Type"]):s)?JSON.stringify(o!==void 0?o:{}):o||""},V=function(o){return o.pathname+o.search+o.hash},v=function(o,e,t,s){return (a=e,i=t)=>{let n={...o.options,url:(a.defaults.baseURL?"":s?.basePath??i)+o.url};return a.request(n)}};var gi=function(o){return {v4CrawlBucketDataFilenameb64Get:async(e,t,s,a={})=>{S("v4CrawlBucketDataFilenameb64Get","filenameb64",e);let i="/v4/crawl/bucket/data/{filenameb64}".replace("{filenameb64}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),t!=null&&(d["Content-Type"]=String(t)),s!=null&&(d["Cache-Control"]=String(s)),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4CrawlConfigConfigIdGet:async(e,t={})=>{S("v4CrawlConfigConfigIdGet","configId",e);let s="/v4/crawl/config/{configId}".replace("{configId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4CrawlConfigDelete:async(e,t={})=>{let s="/v4/crawl/config",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4CrawlConfigPost:async(e,t={})=>{let s="/v4/crawl/config",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4CrawlPausePost:async(e,t={})=>{let s="/v4/crawl/pause",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4CrawlPost:async(e,t={})=>{let s="/v4/crawl/",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4CrawlResumePost:async(e,t={})=>{let s="/v4/crawl/resume",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4CrawlSessionIdListGet:async(e,t,s={})=>{S("v4CrawlSessionIdListGet","sessionId",e);let a="/v4/crawl/{sessionId}/list".replace("{sessionId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),t!==void 0&&(d.includeAll=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v4CrawlSessionIdPagesGet:async(e,t,s,a={})=>{S("v4CrawlSessionIdPagesGet","sessionId",e);let i="/v4/crawl/{sessionId}/pages".replace("{sessionId}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),t!==void 0&&(c.currentPage=t),s!==void 0&&(c.pageSize=s),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4CrawlSessionIdPagesPageIdGet:async(e,t,s,a={})=>{S("v4CrawlSessionIdPagesPageIdGet","sessionId",e),S("v4CrawlSessionIdPagesPageIdGet","pageId",t);let i="/v4/crawl/{sessionId}/pages/{pageId}".replace("{sessionId}",encodeURIComponent(String(e))).replace("{pageId}",encodeURIComponent(String(t))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),s!==void 0&&(c.format=s),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4CrawlSessionIdStatusGet:async(e,t={})=>{S("v4CrawlSessionIdStatusGet","sessionId",e);let s="/v4/crawl/{sessionId}/status".replace("{sessionId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4CrawlSessionsGet:async(e,t,s,a={})=>{let i="/v4/crawl/sessions",n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),e!==void 0&&(c.page=e),t!==void 0&&(c.pageSize=t),s!==void 0&&(c.userId=s),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4CrawlStartPost:async(e,t={})=>{let s="/v4/crawl/start",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}}}},Q=function(o){let e=gi(o);return {async v4CrawlBucketDataFilenameb64Get(t,s,a,i){let n=await e.v4CrawlBucketDataFilenameb64Get(t,s,a,i),r=o?.serverIndex??0,l=A["CrawlerApi.v4CrawlBucketDataFilenameb64Get"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4CrawlConfigConfigIdGet(t,s){let a=await e.v4CrawlConfigConfigIdGet(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlConfigConfigIdGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlConfigDelete(t,s){let a=await e.v4CrawlConfigDelete(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlConfigDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlConfigPost(t,s){let a=await e.v4CrawlConfigPost(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlConfigPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlPausePost(t,s){let a=await e.v4CrawlPausePost(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlPausePost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlPost(t,s){let a=await e.v4CrawlPost(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlResumePost(t,s){let a=await e.v4CrawlResumePost(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlResumePost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlSessionIdListGet(t,s,a){let i=await e.v4CrawlSessionIdListGet(t,s,a),n=o?.serverIndex??0,r=A["CrawlerApi.v4CrawlSessionIdListGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4CrawlSessionIdPagesGet(t,s,a,i){let n=await e.v4CrawlSessionIdPagesGet(t,s,a,i),r=o?.serverIndex??0,l=A["CrawlerApi.v4CrawlSessionIdPagesGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4CrawlSessionIdPagesPageIdGet(t,s,a,i){let n=await e.v4CrawlSessionIdPagesPageIdGet(t,s,a,i),r=o?.serverIndex??0,l=A["CrawlerApi.v4CrawlSessionIdPagesPageIdGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4CrawlSessionIdStatusGet(t,s){let a=await e.v4CrawlSessionIdStatusGet(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlSessionIdStatusGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4CrawlSessionsGet(t,s,a,i){let n=await e.v4CrawlSessionsGet(t,s,a,i),r=o?.serverIndex??0,l=A["CrawlerApi.v4CrawlSessionsGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4CrawlStartPost(t,s){let a=await e.v4CrawlStartPost(t,s),i=o?.serverIndex??0,n=A["CrawlerApi.v4CrawlStartPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)}}};var Ae=class extends X{v4CrawlBucketDataFilenameb64Get(e,t){return Q(this.configuration).v4CrawlBucketDataFilenameb64Get(e.filenameb64,e.contentType,e.cacheControl,t).then(s=>s(this.axios,this.basePath))}v4CrawlConfigConfigIdGet(e,t){return Q(this.configuration).v4CrawlConfigConfigIdGet(e.configId,t).then(s=>s(this.axios,this.basePath))}v4CrawlConfigDelete(e={},t){return Q(this.configuration).v4CrawlConfigDelete(e.deleteCrawlerConfigRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlConfigPost(e={},t){return Q(this.configuration).v4CrawlConfigPost(e.createCrawlerConfigRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlPausePost(e={},t){return Q(this.configuration).v4CrawlPausePost(e.pauseCrawlerSessionRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlPost(e={},t){return Q(this.configuration).v4CrawlPost(e.startCrawlerSessionRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlResumePost(e={},t){return Q(this.configuration).v4CrawlResumePost(e.resumeCrawlerSessionRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdListGet(e,t){return Q(this.configuration).v4CrawlSessionIdListGet(e.sessionId,e.includeAll,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdPagesGet(e,t){return Q(this.configuration).v4CrawlSessionIdPagesGet(e.sessionId,e.currentPage,e.pageSize,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdPagesPageIdGet(e,t){return Q(this.configuration).v4CrawlSessionIdPagesPageIdGet(e.sessionId,e.pageId,e.format,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdStatusGet(e,t){return Q(this.configuration).v4CrawlSessionIdStatusGet(e.sessionId,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionsGet(e={},t){return Q(this.configuration).v4CrawlSessionsGet(e.page,e.pageSize,e.userId,t).then(s=>s(this.axios,this.basePath))}v4CrawlStartPost(e={},t){return Q(this.configuration).v4CrawlStartPost(e.startSessionWithConfigRequest,t).then(s=>s(this.axios,this.basePath))}};var yi=function(o){return {v4DataValidationRulesActionsBulkApprovePost:async(e,t={})=>{let s="/v4/data-validation/rules/actions/bulk-approve",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesActionsBulkDeletePost:async(e,t={})=>{let s="/v4/data-validation/rules/actions/bulk-delete",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesActionsDeleteAllDelete:async(e,t={})=>{let s="/v4/data-validation/rules/actions/delete-all",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesActionsGeneratePost:async(e,t={})=>{let s="/v4/data-validation/rules/actions/generate",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesActionsGenerateRulesPost:async(e,t={})=>{let s="/v4/data-validation/rules/actions/generate-rules",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesGet:async(e,t,s,a,i,n,r={})=>{let l="/v4/data-validation/rules",d=new C(l,x),c;o&&(c=o.baseOptions);let p={method:"GET",...c,...r},m={},h={};if(await I(m,"x-api-key",o),e!==void 0&&(h.groupId=e),t!==void 0&&(h.workflowId=t),s!==void 0&&(h.status=s),a!==void 0&&(h.page=a),i!==void 0&&(h.pageSize=i),n!==void 0)for(let[R,w]of Object.entries(n))h[R]=w;k(d,h);let f=c&&c.headers?c.headers:{};return p.headers={...m,...f,...r.headers},{url:V(d),options:p}},v4DataValidationRulesPost:async(e,t={})=>{let s="/v4/data-validation/rules",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4DataValidationRulesRuleIdDelete:async(e,t,s={})=>{S("v4DataValidationRulesRuleIdDelete","ruleId",e);let a="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"DELETE",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4DataValidationRulesRuleIdDisablePost:async(e,t,s={})=>{S("v4DataValidationRulesRuleIdDisablePost","ruleId",e);let a="/v4/data-validation/rules/{ruleId}/disable".replace("{ruleId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"POST",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4DataValidationRulesRuleIdGet:async(e,t,s={})=>{S("v4DataValidationRulesRuleIdGet","ruleId",e);let a="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),t!==void 0&&(d.includeDeleted=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v4DataValidationRulesRuleIdPut:async(e,t,s={})=>{S("v4DataValidationRulesRuleIdPut","ruleId",e);let a="/v4/data-validation/rules/{ruleId}".replace("{ruleId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4DataValidationValidationsValidationIdAnomaliesGet:async(e,t,s,a={})=>{S("v4DataValidationValidationsValidationIdAnomaliesGet","validationId",e);let i="/v4/data-validation/validations/{validationId}/anomalies".replace("{validationId}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),t!==void 0&&(c.page=t),s!==void 0&&(c.pageSize=s),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet:async(e,t,s,a,i={})=>{S("v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet","validationId",e),S("v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet","ruleName",t);let n="/v4/data-validation/validations/{validationId}/anomalies/rules/{ruleName}".replace("{validationId}",encodeURIComponent(String(e))).replace("{ruleName}",encodeURIComponent(String(t))),r=new C(n,x),l;o&&(l=o.baseOptions);let d={method:"GET",...l,...i},c={},p={};await I(c,"x-api-key",o),s!==void 0&&(p.page=s),a!==void 0&&(p.pageSize=a),k(r,p);let m=l&&l.headers?l.headers:{};return d.headers={...c,...m,...i.headers},{url:V(r),options:d}},v4DataValidationValidationsValidationIdGet:async(e,t,s={})=>{S("v4DataValidationValidationsValidationIdGet","validationId",e);let a="/v4/data-validation/validations/{validationId}".replace("{validationId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),t!==void 0&&(d.includeDryRun=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v4DataValidationWorkflowIdJobsJobIdValidatePost:async(e,t,s,a={})=>{S("v4DataValidationWorkflowIdJobsJobIdValidatePost","workflowId",e),S("v4DataValidationWorkflowIdJobsJobIdValidatePost","jobId",t);let i="/v4/data-validation/{workflowId}/jobs/{jobId}/validate".replace("{workflowId}",encodeURIComponent(String(e))).replace("{jobId}",encodeURIComponent(String(t))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"POST",...r,...a},d={},c={};await I(d,"x-api-key",o),d["Content-Type"]="application/json",k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},l.data=E(s,l,o),{url:V(n),options:l}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost:async(e,t,s,a={})=>{S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost","workflowId",e),S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost","jobId",t);let i="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validate".replace("{workflowId}",encodeURIComponent(String(e))).replace("{jobId}",encodeURIComponent(String(t))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"POST",...r,...a},d={},c={};await I(d,"x-api-key",o),d["Content-Type"]="application/json",k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},l.data=E(s,l,o),{url:V(n),options:l}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet:async(e,t,s,a,i,n={})=>{S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet","workflowId",e),S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet","jobId",t);let r="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validations".replace("{workflowId}",encodeURIComponent(String(e))).replace("{jobId}",encodeURIComponent(String(t))),l=new C(r,x),d;o&&(d=o.baseOptions);let c={method:"GET",...d,...n},p={},m={};await I(p,"x-api-key",o),s!==void 0&&(m.page=s),a!==void 0&&(m.pageSize=a),i!==void 0&&(m.includeDryRun=i),k(l,m);let h=d&&d.headers?d.headers:{};return c.headers={...p,...h,...n.headers},{url:V(l),options:c}},v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet:async(e,t,s,a={})=>{S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet","workflowId",e),S("v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet","jobId",t);let i="/v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validations/latest".replace("{workflowId}",encodeURIComponent(String(e))).replace("{jobId}",encodeURIComponent(String(t))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),s!==void 0&&(c.includeDryRun=s),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4DataValidationWorkflowsWorkflowIdValidationConfigGet:async(e,t={})=>{S("v4DataValidationWorkflowsWorkflowIdValidationConfigGet","workflowId",e);let s="/v4/data-validation/workflows/{workflowId}/validation/config".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4DataValidationWorkflowsWorkflowIdValidationConfigPut:async(e,t,s={})=>{S("v4DataValidationWorkflowsWorkflowIdValidationConfigPut","workflowId",e);let a="/v4/data-validation/workflows/{workflowId}/validation/config".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4DataValidationWorkflowsWorkflowIdValidationTogglePut:async(e,t,s={})=>{S("v4DataValidationWorkflowsWorkflowIdValidationTogglePut","workflowId",e);let a="/v4/data-validation/workflows/{workflowId}/validation/toggle".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4DataValidationWorkflowsWorkflowIdValidationsLatestGet:async(e,t,s={})=>{S("v4DataValidationWorkflowsWorkflowIdValidationsLatestGet","workflowId",e);let a="/v4/data-validation/workflows/{workflowId}/validations/latest".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),t!==void 0&&(d.includeDryRun=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}}}},T=function(o){let e=yi(o);return {async v4DataValidationRulesActionsBulkApprovePost(t,s){let a=await e.v4DataValidationRulesActionsBulkApprovePost(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesActionsBulkApprovePost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesActionsBulkDeletePost(t,s){let a=await e.v4DataValidationRulesActionsBulkDeletePost(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesActionsBulkDeletePost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesActionsDeleteAllDelete(t,s){let a=await e.v4DataValidationRulesActionsDeleteAllDelete(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesActionsDeleteAllDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesActionsGeneratePost(t,s){let a=await e.v4DataValidationRulesActionsGeneratePost(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesActionsGeneratePost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesActionsGenerateRulesPost(t,s){let a=await e.v4DataValidationRulesActionsGenerateRulesPost(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesActionsGenerateRulesPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesGet(t,s,a,i,n,r,l){let d=await e.v4DataValidationRulesGet(t,s,a,i,n,r,l),c=o?.serverIndex??0,p=A["DataValidationApi.v4DataValidationRulesGet"]?.[c]?.url;return (m,h)=>v(d,g,y,o)(m,p||h)},async v4DataValidationRulesPost(t,s){let a=await e.v4DataValidationRulesPost(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationRulesPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationRulesRuleIdDelete(t,s,a){let i=await e.v4DataValidationRulesRuleIdDelete(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationRulesRuleIdDelete"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationRulesRuleIdDisablePost(t,s,a){let i=await e.v4DataValidationRulesRuleIdDisablePost(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationRulesRuleIdDisablePost"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationRulesRuleIdGet(t,s,a){let i=await e.v4DataValidationRulesRuleIdGet(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationRulesRuleIdGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationRulesRuleIdPut(t,s,a){let i=await e.v4DataValidationRulesRuleIdPut(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationRulesRuleIdPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationValidationsValidationIdAnomaliesGet(t,s,a,i){let n=await e.v4DataValidationValidationsValidationIdAnomaliesGet(t,s,a,i),r=o?.serverIndex??0,l=A["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(t,s,a,i,n){let r=await e.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(t,s,a,i,n),l=o?.serverIndex??0,d=A["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet"]?.[l]?.url;return (c,p)=>v(r,g,y,o)(c,d||p)},async v4DataValidationValidationsValidationIdGet(t,s,a){let i=await e.v4DataValidationValidationsValidationIdGet(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationValidationsValidationIdGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationWorkflowIdJobsJobIdValidatePost(t,s,a,i){let n=await e.v4DataValidationWorkflowIdJobsJobIdValidatePost(t,s,a,i),r=o?.serverIndex??0,l=A["DataValidationApi.v4DataValidationWorkflowIdJobsJobIdValidatePost"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(t,s,a,i){let n=await e.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(t,s,a,i),r=o?.serverIndex??0,l=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(t,s,a,i,n,r){let l=await e.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(t,s,a,i,n,r),d=o?.serverIndex??0,c=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet"]?.[d]?.url;return (p,m)=>v(l,g,y,o)(p,c||m)},async v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(t,s,a,i){let n=await e.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(t,s,a,i),r=o?.serverIndex??0,l=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4DataValidationWorkflowsWorkflowIdValidationConfigGet(t,s){let a=await e.v4DataValidationWorkflowsWorkflowIdValidationConfigGet(t,s),i=o?.serverIndex??0,n=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4DataValidationWorkflowsWorkflowIdValidationConfigPut(t,s,a){let i=await e.v4DataValidationWorkflowsWorkflowIdValidationConfigPut(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationWorkflowsWorkflowIdValidationTogglePut(t,s,a){let i=await e.v4DataValidationWorkflowsWorkflowIdValidationTogglePut(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationTogglePut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(t,s,a){let i=await e.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(t,s,a),n=o?.serverIndex??0,r=A["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)}}};var we=class extends X{v4DataValidationRulesActionsBulkApprovePost(e={},t){return T(this.configuration).v4DataValidationRulesActionsBulkApprovePost(e.bulkApproveRules,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsBulkDeletePost(e={},t){return T(this.configuration).v4DataValidationRulesActionsBulkDeletePost(e.bulkDeleteRules,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsDeleteAllDelete(e={},t){return T(this.configuration).v4DataValidationRulesActionsDeleteAllDelete(e.deleteRuleWithReason,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsGeneratePost(e={},t){return T(this.configuration).v4DataValidationRulesActionsGeneratePost(e.generateRule,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsGenerateRulesPost(e={},t){return T(this.configuration).v4DataValidationRulesActionsGenerateRulesPost(e.generateRules,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesGet(e={},t){return T(this.configuration).v4DataValidationRulesGet(e.groupId,e.workflowId,e.status,e.page,e.pageSize,e.includeDeleted,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesPost(e={},t){return T(this.configuration).v4DataValidationRulesPost(e.createRule,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdDelete(e,t){return T(this.configuration).v4DataValidationRulesRuleIdDelete(e.ruleId,e.deleteRuleWithReason,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdDisablePost(e,t){return T(this.configuration).v4DataValidationRulesRuleIdDisablePost(e.ruleId,e.disableRule,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdGet(e,t){return T(this.configuration).v4DataValidationRulesRuleIdGet(e.ruleId,e.includeDeleted,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdPut(e,t){return T(this.configuration).v4DataValidationRulesRuleIdPut(e.ruleId,e.updateRule,t).then(s=>s(this.axios,this.basePath))}v4DataValidationValidationsValidationIdAnomaliesGet(e,t){return T(this.configuration).v4DataValidationValidationsValidationIdAnomaliesGet(e.validationId,e.page,e.pageSize,t).then(s=>s(this.axios,this.basePath))}v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(e,t){return T(this.configuration).v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(e.validationId,e.ruleName,e.page,e.pageSize,t).then(s=>s(this.axios,this.basePath))}v4DataValidationValidationsValidationIdGet(e,t){return T(this.configuration).v4DataValidationValidationsValidationIdGet(e.validationId,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowIdJobsJobIdValidatePost(e,t){return T(this.configuration).v4DataValidationWorkflowIdJobsJobIdValidatePost(e.workflowId,e.jobId,e.dataValidationRequestBody,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(e.workflowId,e.jobId,e.dataValidationRequestBody,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(e.workflowId,e.jobId,e.page,e.pageSize,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(e.workflowId,e.jobId,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationConfigGet(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationConfigGet(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationConfigPut(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationConfigPut(e.workflowId,e.v4DataValidationWorkflowsWorkflowIdValidationConfigPutRequest,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationTogglePut(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationTogglePut(e.workflowId,e.v4DataValidationWorkflowsWorkflowIdValidationTogglePutRequest,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(e,t){return T(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(e.workflowId,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}};var Ci=function(o){return {v5NotificationsChannelsChannelIdDelete:async(e,t={})=>{S("v5NotificationsChannelsChannelIdDelete","channelId",e);let s="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v5NotificationsChannelsChannelIdGet:async(e,t,s={})=>{S("v5NotificationsChannelsChannelIdGet","channelId",e);let a="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),t!==void 0&&(d.includeConfigurations=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v5NotificationsChannelsChannelIdPut:async(e,t,s={})=>{S("v5NotificationsChannelsChannelIdPut","channelId",e),S("v5NotificationsChannelsChannelIdPut","v5NotificationsChannelsPostRequest",t);let a="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v5NotificationsChannelsGet:async(e,t,s={})=>{let a="/v5/notifications/channels",i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),e!==void 0&&(d.workflowId=e),t!==void 0&&(d.includeConfigurations=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v5NotificationsChannelsPost:async(e,t={})=>{S("v5NotificationsChannelsPost","v5NotificationsChannelsPostRequest",e);let s="/v5/notifications/channels",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v5NotificationsEventTypesEventTypeGet:async(e,t={})=>{S("v5NotificationsEventTypesEventTypeGet","eventType",e);let s="/v5/notifications/event-types/{eventType}".replace("{eventType}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v5NotificationsEventTypesGet:async(e={})=>{let t="/v5/notifications/event-types",s=new C(t,x),a;o&&(a=o.baseOptions);let i={method:"GET",...a,...e},n={},r={};await I(n,"x-api-key",o),k(s,r);let l=a&&a.headers?a.headers:{};return i.headers={...n,...l,...e.headers},{url:V(s),options:i}},v5NotificationsLogsGet:async(e,t,s,a,i,n,r={})=>{let l="/v5/notifications/logs",d=new C(l,x),c;o&&(c=o.baseOptions);let p={method:"GET",...c,...r},m={},h={};await I(m,"x-api-key",o),e!==void 0&&(h.workflowId=e),t!==void 0&&(h.eventType=t),s!==void 0&&(h.startDate=s instanceof Date?s.toISOString():s),a!==void 0&&(h.endDate=a instanceof Date?a.toISOString():a),i!==void 0&&(h.limit=i),n!==void 0&&(h.offset=n),k(d,h);let f=c&&c.headers?c.headers:{};return p.headers={...m,...f,...r.headers},{url:V(d),options:p}},v5NotificationsSettingsGet:async(e,t,s={})=>{let a="/v5/notifications/settings",i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),e!==void 0&&(d.workflowId=e),t!==void 0&&(d.eventType=t),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v5NotificationsSettingsPost:async(e,t={})=>{S("v5NotificationsSettingsPost","v5NotificationsSettingsPostRequest",e);let s="/v5/notifications/settings",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v5NotificationsSettingsSettingsIdDelete:async(e,t={})=>{S("v5NotificationsSettingsSettingsIdDelete","settingsId",e);let s="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v5NotificationsSettingsSettingsIdGet:async(e,t={})=>{S("v5NotificationsSettingsSettingsIdGet","settingsId",e);let s="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v5NotificationsSettingsSettingsIdPut:async(e,t,s={})=>{S("v5NotificationsSettingsSettingsIdPut","settingsId",e),S("v5NotificationsSettingsSettingsIdPut","v5NotificationsSettingsSettingsIdPutRequest",t);let a="/v5/notifications/settings/{settingsId}".replace("{settingsId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v5NotificationsTestPost:async(e,t={})=>{S("v5NotificationsTestPost","v5NotificationsTestPostRequest",e);let s="/v5/notifications/test",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}}}},K=function(o){let e=Ci(o);return {async v5NotificationsChannelsChannelIdDelete(t,s){let a=await e.v5NotificationsChannelsChannelIdDelete(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsChannelsChannelIdDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsChannelsChannelIdGet(t,s,a){let i=await e.v5NotificationsChannelsChannelIdGet(t,s,a),n=o?.serverIndex??0,r=A["NotificationsApi.v5NotificationsChannelsChannelIdGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5NotificationsChannelsChannelIdPut(t,s,a){let i=await e.v5NotificationsChannelsChannelIdPut(t,s,a),n=o?.serverIndex??0,r=A["NotificationsApi.v5NotificationsChannelsChannelIdPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5NotificationsChannelsGet(t,s,a){let i=await e.v5NotificationsChannelsGet(t,s,a),n=o?.serverIndex??0,r=A["NotificationsApi.v5NotificationsChannelsGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5NotificationsChannelsPost(t,s){let a=await e.v5NotificationsChannelsPost(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsChannelsPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsEventTypesEventTypeGet(t,s){let a=await e.v5NotificationsEventTypesEventTypeGet(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsEventTypesEventTypeGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsEventTypesGet(t){let s=await e.v5NotificationsEventTypesGet(t),a=o?.serverIndex??0,i=A["NotificationsApi.v5NotificationsEventTypesGet"]?.[a]?.url;return (n,r)=>v(s,g,y,o)(n,i||r)},async v5NotificationsLogsGet(t,s,a,i,n,r,l){let d=await e.v5NotificationsLogsGet(t,s,a,i,n,r,l),c=o?.serverIndex??0,p=A["NotificationsApi.v5NotificationsLogsGet"]?.[c]?.url;return (m,h)=>v(d,g,y,o)(m,p||h)},async v5NotificationsSettingsGet(t,s,a){let i=await e.v5NotificationsSettingsGet(t,s,a),n=o?.serverIndex??0,r=A["NotificationsApi.v5NotificationsSettingsGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5NotificationsSettingsPost(t,s){let a=await e.v5NotificationsSettingsPost(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsSettingsPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsSettingsSettingsIdDelete(t,s){let a=await e.v5NotificationsSettingsSettingsIdDelete(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsSettingsSettingsIdDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsSettingsSettingsIdGet(t,s){let a=await e.v5NotificationsSettingsSettingsIdGet(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsSettingsSettingsIdGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v5NotificationsSettingsSettingsIdPut(t,s,a){let i=await e.v5NotificationsSettingsSettingsIdPut(t,s,a),n=o?.serverIndex??0,r=A["NotificationsApi.v5NotificationsSettingsSettingsIdPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5NotificationsTestPost(t,s){let a=await e.v5NotificationsTestPost(t,s),i=o?.serverIndex??0,n=A["NotificationsApi.v5NotificationsTestPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)}}};var Ne=class extends X{v5NotificationsChannelsChannelIdDelete(e,t){return K(this.configuration).v5NotificationsChannelsChannelIdDelete(e.channelId,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsChannelIdGet(e,t){return K(this.configuration).v5NotificationsChannelsChannelIdGet(e.channelId,e.includeConfigurations,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsChannelIdPut(e,t){return K(this.configuration).v5NotificationsChannelsChannelIdPut(e.channelId,e.v5NotificationsChannelsPostRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsGet(e={},t){return K(this.configuration).v5NotificationsChannelsGet(e.workflowId,e.includeConfigurations,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsPost(e,t){return K(this.configuration).v5NotificationsChannelsPost(e.v5NotificationsChannelsPostRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsEventTypesEventTypeGet(e,t){return K(this.configuration).v5NotificationsEventTypesEventTypeGet(e.eventType,t).then(s=>s(this.axios,this.basePath))}v5NotificationsEventTypesGet(e){return K(this.configuration).v5NotificationsEventTypesGet(e).then(t=>t(this.axios,this.basePath))}v5NotificationsLogsGet(e={},t){return K(this.configuration).v5NotificationsLogsGet(e.workflowId,e.eventType,e.startDate,e.endDate,e.limit,e.offset,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsGet(e={},t){return K(this.configuration).v5NotificationsSettingsGet(e.workflowId,e.eventType,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsPost(e,t){return K(this.configuration).v5NotificationsSettingsPost(e.v5NotificationsSettingsPostRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdDelete(e,t){return K(this.configuration).v5NotificationsSettingsSettingsIdDelete(e.settingsId,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdGet(e,t){return K(this.configuration).v5NotificationsSettingsSettingsIdGet(e.settingsId,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdPut(e,t){return K(this.configuration).v5NotificationsSettingsSettingsIdPut(e.settingsId,e.v5NotificationsSettingsSettingsIdPutRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsTestPost(e,t){return K(this.configuration).v5NotificationsTestPost(e.v5NotificationsTestPostRequest,t).then(s=>s(this.axios,this.basePath))}},Nt={WorkflowStarted:"workflow_started",WorkflowFinished:"workflow_finished",WorkflowFailed:"workflow_failed",WorkflowSampleFinished:"workflow_sample_finished",WorkflowDataChange:"workflow_data_change",SystemMaintenance:"system_maintenance",ServiceDegradation:"service_degradation",CreditsLow:"credits_low",FreeTrialEnding:"free_trial_ending"};var Ai=function(o){return {v4SchemasGet:async(e={})=>{let t="/v4/schemas/",s=new C(t,x),a;o&&(a=o.baseOptions);let i={method:"GET",...a,...e},n={},r={};await I(n,"x-api-key",o),k(s,r);let l=a&&a.headers?a.headers:{};return i.headers={...n,...l,...e.headers},{url:V(s),options:i}},v4SchemasPost:async(e,t={})=>{let s="/v4/schemas/",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4SchemasSchemaIdDelete:async(e,t={})=>{S("v4SchemasSchemaIdDelete","schemaId",e);let s="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4SchemasSchemaIdGet:async(e,t={})=>{S("v4SchemasSchemaIdGet","schemaId",e);let s="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4SchemasSchemaIdPut:async(e,t,s={})=>{S("v4SchemasSchemaIdPut","schemaId",e);let a="/v4/schemas/{schemaId}".replace("{schemaId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}}}},ot=function(o){let e=Ai(o);return {async v4SchemasGet(t){let s=await e.v4SchemasGet(t),a=o?.serverIndex??0,i=A["SchemasApi.v4SchemasGet"]?.[a]?.url;return (n,r)=>v(s,g,y,o)(n,i||r)},async v4SchemasPost(t,s){let a=await e.v4SchemasPost(t,s),i=o?.serverIndex??0,n=A["SchemasApi.v4SchemasPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4SchemasSchemaIdDelete(t,s){let a=await e.v4SchemasSchemaIdDelete(t,s),i=o?.serverIndex??0,n=A["SchemasApi.v4SchemasSchemaIdDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4SchemasSchemaIdGet(t,s){let a=await e.v4SchemasSchemaIdGet(t,s),i=o?.serverIndex??0,n=A["SchemasApi.v4SchemasSchemaIdGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4SchemasSchemaIdPut(t,s,a){let i=await e.v4SchemasSchemaIdPut(t,s,a),n=o?.serverIndex??0,r=A["SchemasApi.v4SchemasSchemaIdPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)}}};var Ge=class extends X{v4SchemasGet(e){return ot(this.configuration).v4SchemasGet(e).then(t=>t(this.axios,this.basePath))}v4SchemasPost(e={},t){return ot(this.configuration).v4SchemasPost(e.createSchemaBody,t).then(s=>s(this.axios,this.basePath))}v4SchemasSchemaIdDelete(e,t){return ot(this.configuration).v4SchemasSchemaIdDelete(e.schemaId,t).then(s=>s(this.axios,this.basePath))}v4SchemasSchemaIdGet(e,t){return ot(this.configuration).v4SchemasSchemaIdGet(e.schemaId,t).then(s=>s(this.axios,this.basePath))}v4SchemasSchemaIdPut(e,t){return ot(this.configuration).v4SchemasSchemaIdPut(e.schemaId,e.updateSchemaBody,t).then(s=>s(this.axios,this.basePath))}};var xi=function(o){return {v4ChangesChangeIdGet:async(e,t,s,a={})=>{S("v4ChangesChangeIdGet","changeId",e);let i="/v4/changes/{changeId}".replace("{changeId}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),await me(d,o),t!=null&&(d["x-api-key"]=String(t)),s!=null&&(d.Authorization=String(s)),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4ChangesGet:async(e,t,s,a,i,n,r,l,d={})=>{let c="/v4/changes",p=new C(c,x),m;o&&(m=o.baseOptions);let h={method:"GET",...m,...d},f={},R={};await I(f,"x-api-key",o),await me(f,o),s!==void 0&&(R.workflowIds=s),a!==void 0&&(R.startDate=a instanceof Date?a.toISOString():a),i!==void 0&&(R.endDate=i instanceof Date?i.toISOString():i),n!==void 0&&(R.skip=n),r!==void 0&&(R.limit=r),l!==void 0&&(R.exclude=l),e!=null&&(f["x-api-key"]=String(e)),t!=null&&(f.Authorization=String(t)),k(p,R);let w=m&&m.headers?m.headers:{};return h.headers={...f,...w,...d.headers},{url:V(p),options:h}},v4WorkflowsGet:async(e,t,s,a,i,n,r,l,d,c,p,m={})=>{let h="/v4/workflows",f=new C(h,x),R;o&&(R=o.baseOptions);let w={method:"GET",...R,...m},b={},D={};await I(b,"x-api-key",o),e!==void 0&&(D.search=e),t!==void 0&&(D.skip=t),s!==void 0&&(D.limit=s),a!==void 0&&(D.state=a),i&&(D.tags=i),n!==void 0&&(D.userId=n),r!==void 0&&(D.monitoring=r),l!==void 0&&(D.updateInterval=l),d!==void 0&&(D.templateId=d),c!==void 0&&(D.includeDeleted=c),p!==void 0&&(D.format=p),k(f,D);let N=R&&R.headers?R.headers:{};return w.headers={...b,...N,...m.headers},{url:V(f),options:w}},v4WorkflowsPost:async(e,t={})=>{let s="/v4/workflows/",a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"POST",...i,...t},r={},l={};await I(r,"x-api-key",o),r["Content-Type"]="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=E(e,n,o),{url:V(a),options:n}},v4WorkflowsWorkflowIdAuditlogGet:async(e,t,s,a,i,n={})=>{S("v4WorkflowsWorkflowIdAuditlogGet","workflowId",e);let r="/v4/workflows/{workflowId}/auditlog".replace("{workflowId}",encodeURIComponent(String(e))),l=new C(r,x),d;o&&(d=o.baseOptions);let c={method:"GET",...d,...n},p={},m={};await I(p,"x-api-key",o),await me(p,o),a!==void 0&&(m.page=a),i!==void 0&&(m.limit=i),t!=null&&(p["x-api-key"]=String(t)),s!=null&&(p.Authorization=String(s)),k(l,m);let h=d&&d.headers?d.headers:{};return c.headers={...p,...h,...n.headers},{url:V(l),options:c}},v4WorkflowsWorkflowIdComplianceApprovePut:async(e,t,s,a={})=>{S("v4WorkflowsWorkflowIdComplianceApprovePut","workflowId",e);let i="/v4/workflows/{workflowId}/compliance-approve".replace("{workflowId}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"PUT",...r,...a},d={},c={};await I(d,"x-api-key",o),t!=null&&(d["x-api-key"]=String(t)),s!=null&&(d.Authorization=String(s)),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v4WorkflowsWorkflowIdComplianceRejectPut:async(e,t,s,a,i={})=>{S("v4WorkflowsWorkflowIdComplianceRejectPut","workflowId",e),S("v4WorkflowsWorkflowIdComplianceRejectPut","v4WorkflowsWorkflowIdComplianceRejectPutRequest",t);let n="/v4/workflows/{workflowId}/compliance-reject".replace("{workflowId}",encodeURIComponent(String(e))),r=new C(n,x),l;o&&(l=o.baseOptions);let d={method:"PUT",...l,...i},c={},p={};await I(c,"x-api-key",o),c["Content-Type"]="application/json",s!=null&&(c["x-api-key"]=String(s)),a!=null&&(c.Authorization=String(a)),k(r,p);let m=l&&l.headers?l.headers:{};return d.headers={...c,...m,...i.headers},d.data=E(t,d,o),{url:V(r),options:d}},v4WorkflowsWorkflowIdDataGet:async(e,t,s,a,i,n,r,l,d,c,p,m,h,f={})=>{S("v4WorkflowsWorkflowIdDataGet","workflowId",e);let R="/v4/workflows/{workflowId}/data".replace("{workflowId}",encodeURIComponent(String(e))),w=new C(R,x),b;o&&(b=o.baseOptions);let D={method:"GET",...b,...f},N={},q={};await I(N,"x-api-key",o),await me(N,o),a!==void 0&&(q.runId=a),i!==void 0&&(q.format=i),n!==void 0&&(q.sortBy=n),r!==void 0&&(q.order=r),l!==void 0&&(q.filters=l),d!==void 0&&(q.page=d),c!==void 0&&(q.limit=c),p!==void 0&&(q.gzip=p),m!==void 0&&(q.rowIds=m),h!==void 0&&(q.includeAnomalies=h),t!=null&&(N["x-api-key"]=String(t)),s!=null&&(N.Authorization=String(s)),k(w,q);let M=b&&b.headers?b.headers:{};return D.headers={...N,...M,...f.headers},{url:V(w),options:D}},v4WorkflowsWorkflowIdDelete:async(e,t={})=>{S("v4WorkflowsWorkflowIdDelete","workflowId",e);let s="/v4/workflows/{workflowId}".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"DELETE",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4WorkflowsWorkflowIdGet:async(e,t={})=>{S("v4WorkflowsWorkflowIdGet","workflowId",e);let s="/v4/workflows/{workflowId}".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4WorkflowsWorkflowIdHistoryGet:async(e,t={})=>{S("v4WorkflowsWorkflowIdHistoryGet","workflowId",e);let s="/v4/workflows/{workflowId}/history".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"GET",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4WorkflowsWorkflowIdJobsJobIdGet:async(e,t,s={})=>{S("v4WorkflowsWorkflowIdJobsJobIdGet","workflowId",e),S("v4WorkflowsWorkflowIdJobsJobIdGet","jobId",t);let a="/v4/workflows/{workflowId}/jobs/{jobId}".replace("{workflowId}",encodeURIComponent(String(e))).replace("{jobId}",encodeURIComponent(String(t))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"GET",...n,...s},l={},d={};await I(l,"x-api-key",o),k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}},v4WorkflowsWorkflowIdMetadataPut:async(e,t,s={})=>{S("v4WorkflowsWorkflowIdMetadataPut","workflowId",e),S("v4WorkflowsWorkflowIdMetadataPut","v4WorkflowsWorkflowIdMetadataPutRequest",t);let a="/v4/workflows/{workflowId}/metadata".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4WorkflowsWorkflowIdPausePut:async(e,t={})=>{S("v4WorkflowsWorkflowIdPausePut","workflowId",e);let s="/v4/workflows/{workflowId}/pause".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"PUT",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4WorkflowsWorkflowIdResumePut:async(e,t={})=>{S("v4WorkflowsWorkflowIdResumePut","workflowId",e);let s="/v4/workflows/{workflowId}/resume".replace("{workflowId}",encodeURIComponent(String(e))),a=new C(s,x),i;o&&(i=o.baseOptions);let n={method:"PUT",...i,...t},r={},l={};await I(r,"x-api-key",o),k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},{url:V(a),options:n}},v4WorkflowsWorkflowIdRunPut:async(e,t,s={})=>{S("v4WorkflowsWorkflowIdRunPut","workflowId",e);let a="/v4/workflows/{workflowId}/run".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v4WorkflowsWorkflowIdSchedulePut:async(e,t,s={})=>{S("v4WorkflowsWorkflowIdSchedulePut","workflowId",e),S("v4WorkflowsWorkflowIdSchedulePut","v4WorkflowsWorkflowIdSchedulePutRequest",t);let a="/v4/workflows/{workflowId}/schedule".replace("{workflowId}",encodeURIComponent(String(e))),i=new C(a,x),n;o&&(n=o.baseOptions);let r={method:"PUT",...n,...s},l={},d={};await I(l,"x-api-key",o),l["Content-Type"]="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=E(t,r,o),{url:V(i),options:r}},v5ChangesChangeIdGet:async(e,t,s,a={})=>{S("v5ChangesChangeIdGet","changeId",e);let i="/v5/changes/{changeId}".replace("{changeId}",encodeURIComponent(String(e))),n=new C(i,x),r;o&&(r=o.baseOptions);let l={method:"GET",...r,...a},d={},c={};await I(d,"x-api-key",o),await me(d,o),t!=null&&(d["x-api-key"]=String(t)),s!=null&&(d.Authorization=String(s)),k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},{url:V(n),options:l}},v5ChangesGet:async(e,t,s,a,i,n,r,l={})=>{let d="/v5/changes",c=new C(d,x),p;o&&(p=o.baseOptions);let m={method:"GET",...p,...l},h={},f={};await I(h,"x-api-key",o),await me(h,o),s!==void 0&&(f.workflowIds=s),a!==void 0&&(f.startDate=a instanceof Date?a.toISOString():a),i!==void 0&&(f.endDate=i instanceof Date?i.toISOString():i),n!==void 0&&(f.skip=n),r!==void 0&&(f.limit=r),e!=null&&(h["x-api-key"]=String(e)),t!=null&&(h.Authorization=String(t)),k(c,f);let R=p&&p.headers?p.headers:{};return m.headers={...h,...R,...l.headers},{url:V(c),options:m}},v5WorkflowsWorkflowIdAuditlogGet:async(e,t,s,a,i,n={})=>{S("v5WorkflowsWorkflowIdAuditlogGet","workflowId",e);let r="/v5/workflows/{workflowId}/auditlog".replace("{workflowId}",encodeURIComponent(String(e))),l=new C(r,x),d;o&&(d=o.baseOptions);let c={method:"GET",...d,...n},p={},m={};await I(p,"x-api-key",o),await me(p,o),a!==void 0&&(m.page=a),i!==void 0&&(m.limit=i),t!=null&&(p["x-api-key"]=String(t)),s!=null&&(p.Authorization=String(s)),k(l,m);let h=d&&d.headers?d.headers:{};return c.headers={...p,...h,...n.headers},{url:V(l),options:c}}}},U=function(o){let e=xi(o);return {async v4ChangesChangeIdGet(t,s,a,i){let n=await e.v4ChangesChangeIdGet(t,s,a,i),r=o?.serverIndex??0,l=A["WorkflowsApi.v4ChangesChangeIdGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4ChangesGet(t,s,a,i,n,r,l,d,c){let p=await e.v4ChangesGet(t,s,a,i,n,r,l,d,c),m=o?.serverIndex??0,h=A["WorkflowsApi.v4ChangesGet"]?.[m]?.url;return (f,R)=>v(p,g,y,o)(f,h||R)},async v4WorkflowsGet(t,s,a,i,n,r,l,d,c,p,m,h){let f=await e.v4WorkflowsGet(t,s,a,i,n,r,l,d,c,p,m,h),R=o?.serverIndex??0,w=A["WorkflowsApi.v4WorkflowsGet"]?.[R]?.url;return (b,D)=>v(f,g,y,o)(b,w||D)},async v4WorkflowsPost(t,s){let a=await e.v4WorkflowsPost(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdAuditlogGet(t,s,a,i,n,r){let l=await e.v4WorkflowsWorkflowIdAuditlogGet(t,s,a,i,n,r),d=o?.serverIndex??0,c=A["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[d]?.url;return (p,m)=>v(l,g,y,o)(p,c||m)},async v4WorkflowsWorkflowIdComplianceApprovePut(t,s,a,i){let n=await e.v4WorkflowsWorkflowIdComplianceApprovePut(t,s,a,i),r=o?.serverIndex??0,l=A["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v4WorkflowsWorkflowIdComplianceRejectPut(t,s,a,i,n){let r=await e.v4WorkflowsWorkflowIdComplianceRejectPut(t,s,a,i,n),l=o?.serverIndex??0,d=A["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[l]?.url;return (c,p)=>v(r,g,y,o)(c,d||p)},async v4WorkflowsWorkflowIdDataGet(t,s,a,i,n,r,l,d,c,p,m,h,f,R){let w=await e.v4WorkflowsWorkflowIdDataGet(t,s,a,i,n,r,l,d,c,p,m,h,f,R),b=o?.serverIndex??0,D=A["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[b]?.url;return (N,q)=>v(w,g,y,o)(N,D||q)},async v4WorkflowsWorkflowIdDelete(t,s){let a=await e.v4WorkflowsWorkflowIdDelete(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdGet(t,s){let a=await e.v4WorkflowsWorkflowIdGet(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdHistoryGet(t,s){let a=await e.v4WorkflowsWorkflowIdHistoryGet(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdJobsJobIdGet(t,s,a){let i=await e.v4WorkflowsWorkflowIdJobsJobIdGet(t,s,a),n=o?.serverIndex??0,r=A["WorkflowsApi.v4WorkflowsWorkflowIdJobsJobIdGet"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4WorkflowsWorkflowIdMetadataPut(t,s,a){let i=await e.v4WorkflowsWorkflowIdMetadataPut(t,s,a),n=o?.serverIndex??0,r=A["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4WorkflowsWorkflowIdPausePut(t,s){let a=await e.v4WorkflowsWorkflowIdPausePut(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdResumePut(t,s){let a=await e.v4WorkflowsWorkflowIdResumePut(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsWorkflowIdRunPut(t,s,a){let i=await e.v4WorkflowsWorkflowIdRunPut(t,s,a),n=o?.serverIndex??0,r=A["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v4WorkflowsWorkflowIdSchedulePut(t,s,a){let i=await e.v4WorkflowsWorkflowIdSchedulePut(t,s,a),n=o?.serverIndex??0,r=A["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[n]?.url;return (l,d)=>v(i,g,y,o)(l,r||d)},async v5ChangesChangeIdGet(t,s,a,i){let n=await e.v5ChangesChangeIdGet(t,s,a,i),r=o?.serverIndex??0,l=A["WorkflowsApi.v5ChangesChangeIdGet"]?.[r]?.url;return (d,c)=>v(n,g,y,o)(d,l||c)},async v5ChangesGet(t,s,a,i,n,r,l,d){let c=await e.v5ChangesGet(t,s,a,i,n,r,l,d),p=o?.serverIndex??0,m=A["WorkflowsApi.v5ChangesGet"]?.[p]?.url;return (h,f)=>v(c,g,y,o)(h,m||f)},async v5WorkflowsWorkflowIdAuditlogGet(t,s,a,i,n,r){let l=await e.v5WorkflowsWorkflowIdAuditlogGet(t,s,a,i,n,r),d=o?.serverIndex??0,c=A["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[d]?.url;return (p,m)=>v(l,g,y,o)(p,c||m)}}};var st=class extends X{v4ChangesChangeIdGet(e,t){return U(this.configuration).v4ChangesChangeIdGet(e.changeId,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v4ChangesGet(e={},t){return U(this.configuration).v4ChangesGet(e.xApiKey,e.authorization,e.workflowIds,e.startDate,e.endDate,e.skip,e.limit,e.exclude,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsGet(e={},t){return U(this.configuration).v4WorkflowsGet(e.search,e.skip,e.limit,e.state,e.tags,e.userId,e.monitoring,e.updateInterval,e.templateId,e.includeDeleted,e.format,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsPost(e={},t){return U(this.configuration).v4WorkflowsPost(e.createWorkflowBody,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdAuditlogGet(e,t){return U(this.configuration).v4WorkflowsWorkflowIdAuditlogGet(e.workflowId,e.xApiKey,e.authorization,e.page,e.limit,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdComplianceApprovePut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdComplianceApprovePut(e.workflowId,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdComplianceRejectPut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdComplianceRejectPut(e.workflowId,e.v4WorkflowsWorkflowIdComplianceRejectPutRequest,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdDataGet(e,t){return U(this.configuration).v4WorkflowsWorkflowIdDataGet(e.workflowId,e.xApiKey,e.authorization,e.runId,e.format,e.sortBy,e.order,e.filters,e.page,e.limit,e.gzip,e.rowIds,e.includeAnomalies,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdDelete(e,t){return U(this.configuration).v4WorkflowsWorkflowIdDelete(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdGet(e,t){return U(this.configuration).v4WorkflowsWorkflowIdGet(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdHistoryGet(e,t){return U(this.configuration).v4WorkflowsWorkflowIdHistoryGet(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdJobsJobIdGet(e,t){return U(this.configuration).v4WorkflowsWorkflowIdJobsJobIdGet(e.workflowId,e.jobId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdMetadataPut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdMetadataPut(e.workflowId,e.v4WorkflowsWorkflowIdMetadataPutRequest,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdPausePut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdPausePut(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdResumePut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdResumePut(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdRunPut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdRunPut(e.workflowId,e.v4WorkflowsWorkflowIdRunPutRequest,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdSchedulePut(e,t){return U(this.configuration).v4WorkflowsWorkflowIdSchedulePut(e.workflowId,e.v4WorkflowsWorkflowIdSchedulePutRequest,t).then(s=>s(this.axios,this.basePath))}v5ChangesChangeIdGet(e,t){return U(this.configuration).v5ChangesChangeIdGet(e.changeId,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v5ChangesGet(e={},t){return U(this.configuration).v5ChangesGet(e.xApiKey,e.authorization,e.workflowIds,e.startDate,e.endDate,e.skip,e.limit,t).then(s=>s(this.axios,this.basePath))}v5WorkflowsWorkflowIdAuditlogGet(e,t){return U(this.configuration).v5WorkflowsWorkflowIdAuditlogGet(e.workflowId,e.xApiKey,e.authorization,e.page,e.limit,t).then(s=>s(this.axios,this.basePath))}};var at=class{constructor(e={}){this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.awsv4=e.awsv4,this.basePath=e.basePath,this.serverIndex=e.serverIndex,this.baseOptions={...e.baseOptions,headers:{...e.baseOptions?.headers}},this.formDataCtor=e.formDataCtor;}isJsonMime(e){let t=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return e!==null&&(t.test(e)||e.toLowerCase()==="application/json-patch+json")}};var Y={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Date:"DATE",Datetime:"DATETIME",Money:"MONEY",Image:"IMAGE",Link:"LINK",Object:"OBJECT",Array:"ARRAY"};var Co=class{},Ii={String:Y.String,Number:Y.Number,Boolean:Y.Boolean,Date:Y.Date,Datetime:Y.Datetime,Money:Y.Money,Image:Y.Image,Link:Y.Link,Object:Y.Object,Array:Y.Array},ki={...Ii,Text:Y.String,Url:Y.Link};var Te=class{constructor(e){this.fetchPage=e;}async fetchAll(e={}){let t=[],s=1,a=true;for(;a;){let i=await this.fetchPage({...e,page:s});t.push(...i.data);let n=i.pagination;a=n.page!==void 0&&n.totalPages!==void 0&&n.page<n.totalPages,s++;}return t}async*pages(e={}){let t=1,s=true;for(;s;){let a=await this.fetchPage({...e,page:t});yield a;let i=a.pagination;s=i.page!==void 0&&i.totalPages!==void 0&&i.page<i.totalPages,t++;}}async*items(e={}){for await(let t of this.pages(e))for(let s of t.data)yield s;}};var it=class{constructor(e){this.workflowsApi=e;this.defaultLimit=100;}async fetchData(e){return (await this.workflowsApi.v4WorkflowsWorkflowIdDataGet({...e,page:e.page??1,limit:e.limit??this.defaultLimit})).data}async fetchAllData(e){return new Te(s=>this.fetchData({...e,...s})).fetchAll({limit:e.limit??this.defaultLimit})}async*fetchDataPages(e){let t=new Te(s=>this.fetchData({...e,...s}));for await(let s of t.pages({limit:e.limit??this.defaultLimit}))yield s;}};var Z={AUTH_ERROR:"AUTH_ERROR",VALIDATION_ERROR:"VALIDATION_ERROR",BAD_REQUEST:"BAD_REQUEST",NOT_FOUND:"NOT_FOUND",INTERNAL_ERROR:"INTERNAL_ERROR"},le=class le extends Error{constructor(e,t){super(e),this.name="KadoaSdkException",this.code=t?.code??"UNKNOWN",this.details=t?.details,t&&"cause"in t&&(this.cause=t.cause),Error.captureStackTrace?.(this,le);}static from(e,t){if(e instanceof le)return e;let s=e instanceof Error?e.message:typeof e=="string"?e:"Unexpected error";return new le(s,{code:"UNKNOWN",details:t,cause:e})}toJSON(){return {name:this.name,message:this.message,code:this.code,details:this.details}}toString(){return [this.name,this.code,this.message].filter(Boolean).join(": ")}toDetailedString(){let e=[`${this.name}: ${this.message}`,`Code: ${this.code}`];return this.details&&Object.keys(this.details).length>0&&e.push(`Details: ${JSON.stringify(this.details,null,2)}`),this.cause&&e.push(`Cause: ${this.cause}`),e.join(`
7
+ `)}static isInstance(e){return e instanceof le}static wrap(e,t){if(e instanceof le)return e;let s=t?.message||(e instanceof Error?e.message:typeof e=="string"?e:"Unexpected error");return new le(s,{code:"UNKNOWN",details:t?.details,cause:e})}};le.ERROR_MESSAGES={CONFIG_ERROR:"Invalid configuration provided",AUTH_FAILED:"Authentication failed. Please check your API key",RATE_LIMITED:"Rate limit exceeded. Please try again later",NETWORK_ERROR:"Network error occurred",SERVER_ERROR:"Server error occurred",PARSE_ERROR:"Failed to parse response",BAD_REQUEST:"Bad request",ABORTED:"Aborted",NOT_FOUND:"Not found",NO_WORKFLOW_ID:"Failed to start extraction process - no ID received",WORKFLOW_CREATE_FAILED:"Failed to create workflow",WORKFLOW_TIMEOUT:"Workflow processing timed out",WORKFLOW_UNEXPECTED_STATUS:"Extraction completed with unexpected status",PROGRESS_CHECK_FAILED:"Failed to check extraction progress",DATA_FETCH_FAILED:"Failed to retrieve extracted data from workflow",NO_URLS:"At least one URL is required for extraction",NO_API_KEY:"API key is required for entity detection",LINK_REQUIRED:"Link is required for entity field detection",NO_PREDICTIONS:"No entity predictions returned from the API",EXTRACTION_FAILED:"Data extraction failed for the provided URLs",ENTITY_FETCH_FAILED:"Failed to fetch entity fields",ENTITY_INVARIANT_VIOLATION:"No valid entity provided",SCHEMA_NOT_FOUND:"Schema not found",SCHEMA_FETCH_ERROR:"Failed to fetch schema",SCHEMAS_FETCH_ERROR:"Failed to fetch schemas",SCHEMA_CREATE_FAILED:"Failed to create schema",SCHEMA_UPDATE_FAILED:"Failed to update schema",SCHEMA_DELETE_FAILED:"Failed to delete schema"};var P=le,L=P.ERROR_MESSAGES;var O=class o extends P{constructor(e,t){super(e,{code:t?.code,details:t?.details,cause:t?.cause}),this.name="KadoaHttpException",this.httpStatus=t?.httpStatus,this.requestId=t?.requestId,this.endpoint=t?.endpoint,this.method=t?.method,this.responseBody=t?.responseBody;}static fromAxiosError(e,t){let s=e.response?.status,a=e.response?.headers?.["x-request-id"]||e.response?.headers?.["x-amzn-requestid"],i=e.config?.method?.toUpperCase(),n=e.config?.url;return new o(t?.message||e.message,{code:o.mapStatusToCode(e),httpStatus:s,requestId:a,endpoint:n,method:i,responseBody:e.response?.data,details:t?.details,cause:e})}toJSON(){return {...super.toJSON(),httpStatus:this.httpStatus,requestId:this.requestId,endpoint:this.endpoint,method:this.method,responseBody:this.responseBody}}toDetailedString(){let e=[`${this.name}: ${this.message}`,`Code: ${this.code}`];return this.httpStatus&&e.push(`HTTP Status: ${this.httpStatus}`),this.method&&this.endpoint&&e.push(`Request: ${this.method} ${this.endpoint}`),this.requestId&&e.push(`Request ID: ${this.requestId}`),this.responseBody&&e.push(`Response Body: ${JSON.stringify(this.responseBody,null,2)}`),this.details&&Object.keys(this.details).length>0&&e.push(`Details: ${JSON.stringify(this.details,null,2)}`),this.cause&&e.push(`Cause: ${this.cause}`),e.join(`
8
+ `)}static wrap(e,t){return e instanceof o||e instanceof P?e:xs(e)?o.fromAxiosError(e,t):P.wrap(e,t)}static mapStatusToCode(e){let t=typeof e=="number"?e:e.response?.status;return t?t===401||t===403?"AUTH_ERROR":t===404?"NOT_FOUND":t===408?"TIMEOUT":t===429?"RATE_LIMITED":t>=400&&t<500?"VALIDATION_ERROR":t>=500?"HTTP_ERROR":"UNKNOWN":typeof e=="number"?"UNKNOWN":e.code==="ECONNABORTED"?"TIMEOUT":e.request?"NETWORK_ERROR":"UNKNOWN"}};var Ws=oa(Ps()),de=o=>(0, Ws.default)(`kadoa:${o}`),z={client:de("client"),wss:de("wss"),extraction:de("extraction"),http:de("http"),workflow:de("workflow"),crawl:de("crawl"),notifications:de("notifications"),schemas:de("schemas"),validation:de("validation")};function Ao(o){if(!o||typeof o!="object")return false;let e=Object.getPrototypeOf(o);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(o)==="[object Object]":false}function bs(o){return o==="__proto__"}function ne(o,e){let t=Object.keys(e);for(let s=0;s<t.length;s++){let a=t[s];if(bs(a))continue;let i=e[a],n=o[a];Array.isArray(i)?Array.isArray(n)?o[a]=ne(n,i):o[a]=ne([],i):Ao(i)?Ao(n)?o[a]=ne(n,i):o[a]=ne({},i):(n===void 0||i!==void 0)&&(o[a]=i);}return o}function Ds(o){return o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()}var Ti=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function Os(o){return Array.from(o.match(Ti)??[])}function xo(o){let e=Os(o);if(e.length===0)return "";let[t,...s]=e;return `${t.toLowerCase()}${s.map(a=>Ds(a)).join("")}`}function Io(o){return o.substring(0,1).toUpperCase()+o.substring(1)}var _e=class _e{constructor(){this.fields=[];}hasSchemaFields(){return this.fields.some(e=>e.fieldType==="SCHEMA")}entity(e){return this.entityName=e,this}field(e,t,s,a){if(this.validateFieldName(e),_e.TYPES_REQUIRING_EXAMPLE.includes(s)&&!a?.example)throw new P(`Field "${e}" with type ${s} requires an example`,{code:"VALIDATION_ERROR",details:{name:e,dataType:s}});return this.fields.push({name:e,description:t,dataType:s,fieldType:"SCHEMA",example:a?.example,isKey:a?.isKey}),this}classify(e,t,s){return this.validateFieldName(e),this.fields.push({name:e,description:t,fieldType:"CLASSIFICATION",categories:s}),this}raw(e){let t=Array.isArray(e)?e:[e];for(let s of t){let a=`raw${Io(xo(s))}`;this.fields.some(i=>i.name===a)||this.fields.push({name:a,description:`Raw page content in ${s.toUpperCase()} format`,fieldType:"METADATA",metadataKey:s});}return this}build(){if(this.hasSchemaFields()&&!this.entityName)throw new P("Entity name is required when schema fields are present",{code:"VALIDATION_ERROR",details:{entityName:this.entityName}});return {entityName:this.entityName,fields:this.fields}}validateFieldName(e){if(!_e.FIELD_NAME_PATTERN.test(e))throw new P(`Field name "${e}" must be alphanumeric only (no underscores or special characters)`,{code:"VALIDATION_ERROR",details:{name:e,pattern:"^[A-Za-z0-9]+$"}});let t=e.toLowerCase();if(this.fields.some(s=>s.name.toLowerCase()===t))throw new P(`Duplicate field name: "${e}"`,{code:"VALIDATION_ERROR",details:{name:e}})}};_e.FIELD_NAME_PATTERN=/^[A-Za-z0-9]+$/,_e.TYPES_REQUIRING_EXAMPLE=["STRING","IMAGE","LINK","OBJECT","ARRAY"];var Ie=_e;var Ft=z.schemas,ke=class{constructor(e){this.schemasApi=new Ge(e.configuration);}builder(e){let t=this;return new class extends Ie{constructor(){super(),e&&this.entity(e);}async create(s){let a=this.build(),i=s??a.entityName;if(!i)throw new P("Schema name is required when entity name is not provided",{code:"VALIDATION_ERROR",details:{name:s}});let n={name:i,fields:a.fields,...a.entityName?{entity:a.entityName}:{}};return t.createSchema(n)}}}async getSchema(e){Ft("Fetching schema with ID: %s",e);let s=(await this.schemasApi.v4SchemasSchemaIdGet({schemaId:e})).data.data;if(!s)throw new P(`${L.SCHEMA_NOT_FOUND}: ${e}`,{code:Z.NOT_FOUND,details:{schemaId:e}});return s}async listSchemas(){return (await this.schemasApi.v4SchemasGet()).data.data}async createSchema(e){Ft("Creating schema with name: %s",e.name);let s=(await this.schemasApi.v4SchemasPost({createSchemaBody:e})).data.schemaId;if(!s)throw new P(L.SCHEMA_CREATE_FAILED,{code:Z.INTERNAL_ERROR});return this.getSchema(s)}async updateSchema(e,t){return Ft("Updating schema with ID: %s",e),await this.schemasApi.v4SchemasSchemaIdPut({schemaId:e,updateSchemaBody:t}),this.getSchema(e)}async deleteSchema(e){Ft("Deleting schema with ID: %s",e),await this.schemasApi.v4SchemasSchemaIdDelete({schemaId:e});}};var Fi="/v4/entity",nt=class{constructor(e){this.client=e;this.schemasService=new ke(e);}async resolveEntity(e,t){if(e==="ai-detection"){if(!t?.link)throw new P(L.LINK_REQUIRED,{code:"VALIDATION_ERROR",details:{entityConfig:e,options:t}});let s=await this.fetchEntityFields({link:t.link,location:t.location,navigationMode:t.navigationMode,selectorMode:t.selectorMode??false});return {entity:s.entity,fields:s.fields}}else if(e){if("schemaId"in e){let s=await this.schemasService.getSchema(e.schemaId);return {entity:s.entity??void 0,fields:s.schema}}else if("fields"in e)return {entity:e.name,fields:e.fields}}throw new P(L.ENTITY_INVARIANT_VIOLATION,{details:{entity:e}})}async fetchEntityFields(e){this.validateEntityOptions(e);let t=`${this.client.baseUrl}${Fi}`,s=e,i=(await this.client.axiosInstance.post(t,s,{headers:{"Content-Type":"application/json",Accept:"application/json","x-api-key":this.client.apiKey}})).data;if(!i.success||!i.entityPrediction||i.entityPrediction.length===0)throw new P(L.NO_PREDICTIONS,{code:"NOT_FOUND",details:{success:i.success,hasPredictions:!!i.entityPrediction,predictionCount:i.entityPrediction?.length||0,link:e.link}});return i.entityPrediction[0]}validateEntityOptions(e){if(!e.link)throw new P(L.LINK_REQUIRED,{code:"VALIDATION_ERROR",details:{options:e}})}};var Ui=z.extraction,Bi=new Set(["FINISHED","SUCCESS"]),ko={mode:"run",pollingInterval:5e3,maxWaitTime:3e5,navigationMode:"single-page",location:{type:"auto"},bypassPreview:true,autoStart:true},rt=class{constructor(e,t,s,a,i,n){this.workflowsCoreService=e;this.dataFetcherService=t;this.entityResolverService=s;this.notificationSetupService=a;this.notificationChannelsService=i;this.notificationSettingsService=n;}async run(e){return await this.executeExtraction({...e,mode:"run"})}async submit(e){return await this.executeExtraction({...e,mode:"submit"})}async runJob(e,t){return await this.workflowsCoreService.runWorkflow(e,t)}async runJobAndWait(e,t){let s=await this.workflowsCoreService.runWorkflow(e,t);return await this.workflowsCoreService.waitForJobCompletion(e,s.jobId||"")}async fetchData(e){return await this.dataFetcherService.fetchData(e)}async fetchAllData(e){return await this.dataFetcherService.fetchAllData(e)}fetchDataPages(e){return this.dataFetcherService.fetchDataPages(e)}async getNotificationChannels(e){return await this.notificationChannelsService.listChannels({workflowId:e})}async getNotificationSettings(e){return await this.notificationSettingsService.listSettings({workflowId:e})}async executeExtraction(e){this.validateOptions(e);let t=ne(ko,e);if(t.interval==="REAL_TIME")throw new P("extraction.run()/submit() are not supported for real-time workflows. Use the builder API, call waitForReady(), and subscribe via client.realtime.onEvent(...).",{code:"BAD_REQUEST",details:{interval:"REAL_TIME"}});let a,i=t.navigationMode==="agentic-navigation";if(i&&!t.userPrompt)throw new P("userPrompt is required when navigationMode is 'agentic-navigation'",{code:"VALIDATION_ERROR",details:{navigationMode:t.navigationMode}});let n;if(i){let f=e.entity||"ai-detection";n={entity:typeof f=="object"&&"name"in f?f.name:void 0,fields:typeof f=="object"&&"fields"in f?f.fields:[]};}else n=await this.entityResolverService.resolveEntity(e.entity||"ai-detection",{link:t.urls[0],location:t.location,navigationMode:t.navigationMode});let r=!!t.notifications,l={...t,fields:n.fields,...n.entity!==void 0?{entity:n.entity}:{},...t.userPrompt?{userPrompt:t.userPrompt}:{}};if(a=(await this.workflowsCoreService.create(l)).id,r){let f=await this.notificationSetupService.setup({workflowId:a,events:t.notifications?.events,channels:t.notifications?.channels});Ui("Notifications setup: %O",f.map(R=>({id:R.id,eventType:R.eventType})));}if(t.mode==="submit")return {workflowId:a};let c=await this.workflowsCoreService.wait(a,{pollIntervalMs:t.pollingInterval,timeoutMs:t.maxWaitTime}),p,m;if(this.isExtractionSuccessful(c.runState)){let f=await this.dataFetcherService.fetchData({workflowId:a});p=f.data,m=f.pagination;}else throw new P(`${L.WORKFLOW_UNEXPECTED_STATUS}: ${c.runState}`,{code:"INTERNAL_ERROR",details:{workflowId:a,runState:c.runState,state:c.state}});return {workflowId:a,workflow:c,data:p,pagination:m}}validateOptions(e){if(!e.urls||e.urls.length===0)throw new P(L.NO_URLS,{code:"VALIDATION_ERROR"})}async resumeWorkflow(e){await this.workflowsCoreService.resume(e);let t=await this.workflowsCoreService.wait(e,{pollIntervalMs:ko.pollingInterval,timeoutMs:ko.maxWaitTime}),s,a;if(this.isExtractionSuccessful(t.runState)){let n=await this.dataFetcherService.fetchData({workflowId:e});s=n.data,a=n.pagination;}else throw new P(`${L.WORKFLOW_UNEXPECTED_STATUS}: ${t.runState}`,{code:"INTERNAL_ERROR",details:{workflowId:e,runState:t.runState,state:t.state}});return {workflowId:e,workflow:t,data:s,pagination:a}}isExtractionSuccessful(e){return e?Bi.has(e.toUpperCase()):false}};var Vo=z.extraction,lt=class{constructor(e,t,s,a){this.workflowsCoreService=e;this.entityResolverService=t;this.dataFetcherService=s;this.notificationSetupService=a;}get options(){return ___default.default(this._options,"Options are not set"),this._options}get notificationOptions(){return this._notificationOptions}get monitoringOptions(){return this._monitoringOptions}get workflowId(){return ___default.default(this._workflowId,"Workflow ID is not set"),this._workflowId}get jobId(){return ___default.default(this._jobId,"Job ID is not set"),this._jobId}extract({urls:e,name:t,description:s,navigationMode:a,extraction:i,additionalData:n,bypassPreview:r,userPrompt:l,interval:d,schedules:c,location:p}){let m="ai-detection";if(i){let h=i(new Ie);if("schemaId"in h)m={schemaId:h.schemaId};else {let f=h.build();m=f.entityName?{name:f.entityName,fields:f.fields}:{fields:f.fields};}}return l&&(this._userPrompt=l),this._options={urls:e,name:t,description:s,navigationMode:a||"single-page",entity:m,bypassPreview:r??false,additionalData:n,userPrompt:l,interval:d,schedules:c,location:p},this}withNotifications(e){return this._notificationOptions=e,this}withMonitoring(e){return this._monitoringOptions=e,this}bypassPreview(){return ___default.default(this._options,"Options are not set"),this._options.bypassPreview=true,this}setInterval(e){return ___default.default(this._options,"Options are not set"),"interval"in e?this._options.interval=e.interval:(this._options.interval="CUSTOM",this._options.schedules=e.schedules),this}setLocation(e){return ___default.default(this._options,"Options are not set"),this._options.location=e,this}withPrompt(e){return ___default.default(this._options,"Options are not set"),this._userPrompt=e,this._options.userPrompt=e,this}async create(){___default.default(this._options,"Options are not set");let{urls:e,name:t,description:s,navigationMode:a,entity:i}=this.options,n=a==="agentic-navigation";if(n&&!this._userPrompt)throw new P("userPrompt is required when navigationMode is 'agentic-navigation'",{code:"VALIDATION_ERROR",details:{navigationMode:a}});let l=this._options.interval==="REAL_TIME"&&i==="ai-detection",d;n?d={entity:typeof i=="object"&&"name"in i?i.name:void 0,fields:typeof i=="object"&&"fields"in i?i.fields:[]}:d=await this.entityResolverService.resolveEntity(i,{link:e[0],location:this._options.location,navigationMode:a,selectorMode:l});let c=await this.workflowsCoreService.create({urls:e,name:t,description:s,navigationMode:a,monitoring:this._monitoringOptions,schemaId:typeof i=="object"&&"schemaId"in i?i.schemaId:void 0,entity:d.entity,fields:d.fields,autoStart:false,interval:this._options.interval,schedules:this._options.schedules,additionalData:this._options.additionalData,bypassPreview:this._options.bypassPreview,userPrompt:this._userPrompt});return this._notificationOptions&&await this.notificationSetupService.setup({...this._notificationOptions,workflowId:c.id}),this._workflowId=c.id,this}async waitForReady(e){___default.default(this._workflowId,"Workflow ID is not set");let t=e?.targetState??"PREVIEW",s=await this.workflowsCoreService.get(this._workflowId);return s.state===t||t==="PREVIEW"&&s.state==="ACTIVE"?s:await this.workflowsCoreService.wait(this._workflowId,{targetState:t,pollIntervalMs:e?.pollIntervalMs,timeoutMs:e?.timeoutMs})}async run(e){if(___default.default(this._options,"Options are not set"),___default.default(this._workflowId,"Workflow ID is not set"),this._options.interval==="REAL_TIME")throw new P("run() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",{code:"BAD_REQUEST",details:{interval:"REAL_TIME",workflowId:this._workflowId}});let t=await this.workflowsCoreService.runWorkflow(this._workflowId,{variables:e?.variables,limit:e?.limit});___default.default(t.jobId,"Job ID is not set"),Vo("Job started: %O",t),this._jobId=t.jobId;let s=await this.workflowsCoreService.waitForJobCompletion(this._workflowId,t.jobId);return Vo("Job finished: %O",s),this}async submit(e){if(___default.default(this._options,"Options are not set"),___default.default(this._workflowId,"Workflow ID is not set"),this._options.interval==="REAL_TIME")throw new P("submit() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",{code:"BAD_REQUEST",details:{interval:"REAL_TIME",workflowId:this._workflowId}});let t=await this.workflowsCoreService.runWorkflow(this._workflowId,{variables:e?.variables,limit:e?.limit});return ___default.default(t.jobId,"Job ID is not set"),Vo("Job submitted: %O",t),this._jobId=t.jobId,{workflowId:this._workflowId,jobId:this._jobId}}async fetchData(e){return ___default.default(this._workflowId,"Workflow ID is not set"),___default.default(this._jobId,"Job ID is not set"),this.dataFetcherService.fetchData({workflowId:this._workflowId,runId:this._jobId,page:e.page??1,limit:e.limit??100,...e})}async fetchAllData(e){return ___default.default(this._jobId,"Job ID is not set"),___default.default(this._workflowId,"Workflow ID is not set"),this.dataFetcherService.fetchAllData({workflowId:this._workflowId,runId:this._jobId,...e})}};var Re={EMAIL:"EMAIL",SLACK:"SLACK",WEBHOOK:"WEBHOOK",WEBSOCKET:"WEBSOCKET"};var Es=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function _i(o){let e=[];if(!o.recipients?.length)e.push({message:"Recipients are required for email channel"});else for(let t of o.recipients)Es.test(t)||e.push({message:`Invalid email address: ${t}`});if(o.from!==void 0&&(Es.test(o.from)?o.from.endsWith("@kadoa.com")||e.push({message:"From email address must end with @kadoa.com"}):e.push({message:`Invalid from email address: ${o.from}`})),e.length>0)throw new P("Invalid email channel config",{code:Z.VALIDATION_ERROR,details:{issues:e}});return o}var Ut=class Ut{constructor(e,t){this.api=e,this.userService=t;}async listChannels(e){let t=await this.api.v5NotificationsChannelsGet(e),s=t.data.data?.channels;if(!s)throw O.wrap(t,{message:"Failed to list channels"});return s}async listAllChannels(e){if(!e)return this.listChannels({});let[t,s]=await Promise.all([this.listChannels({workflowId:e}),this.listChannels({})]),a=[...t];return s.forEach(i=>{a.find(n=>n.id===i.id)||a.push(i);}),a}async deleteChannel(e){let t=await this.api.v5NotificationsChannelsChannelIdDelete({channelId:e});if(t.status!==200)throw O.wrap(t,{message:"Failed to delete channel"})}async createChannel(e,t){let s=await this.buildPayload(ne(t||{},{name:Ut.DEFAULT_CHANNEL_NAME,channelType:e,config:{}})),a=await this.api.v5NotificationsChannelsPost({v5NotificationsChannelsPostRequest:s});if(a.status===201){let i=a.data.data?.channel;if(!i)throw O.wrap(a,{message:"Failed to create default channels"});return i}throw O.wrap(a,{message:"Failed to create default channels"})}async buildPayload(e){let t;switch(e.channelType){case Re.EMAIL:t=await this.buildEmailChannelConfig(e.config);break;case Re.SLACK:t=await this.buildSlackChannelConfig(e.config);break;case Re.WEBHOOK:t=await this.buildWebhookChannelConfig(e.config);break;case Re.WEBSOCKET:t=await this.buildWebsocketChannelConfig(e.config);break;default:t={};}return {name:e.name||"Default Channel",channelType:e.channelType,config:t}}async buildEmailChannelConfig(e){let t=e.recipients;e.recipients?.length||(t=[(await this.userService.getCurrentUser()).email]);let s=ne(e,{recipients:t});return _i(s)}async buildSlackChannelConfig(e){return e}async buildWebhookChannelConfig(e){return e}async buildWebsocketChannelConfig(e){return e}};Ut.DEFAULT_CHANNEL_NAME="default";var ce=Ut;var dt=class{constructor(e){this.api=e;}async createSettings(e){let t=await this.api.v5NotificationsSettingsPost({v5NotificationsSettingsPostRequest:e}),s=t.data.data?.settings;if(!s)throw O.wrap(t,{message:"Failed to create notification settings"});return s}async listSettings(e){let t=await this.api.v5NotificationsSettingsGet(e),s=t.data.data?.settings;if(!s)throw O.wrap(t,{message:"Failed to list notification settings"});return s}async listAllEvents(){return Object.values(Nt)}async deleteSettings(e){let t=await this.api.v5NotificationsSettingsSettingsIdDelete({settingsId:e});if(t.status!==200)throw O.wrap(t,{message:"Failed to delete notification settings"})}};var he=z.notifications,ct=class{constructor(e,t){this.channelsService=e;this.settingsService=t;}async setupForWorkflow(e){if((await this.settingsService.listSettings({workflowId:e.workflowId})).length>0)throw new P("Settings already exist",{code:Z.BAD_REQUEST,details:{workflowId:e.workflowId}});return this.setup({workflowId:e.workflowId,events:e.events,channels:e.channels})}async setupForWorkspace(e){if((await this.settingsService.listSettings({})).length>0)throw new P("Workspace settings already exist",{code:Z.BAD_REQUEST});return this.setup({events:e.events,channels:e.channels})}async setup(e){e.workflowId?he("Setting up notifications for workflow %s",e.workflowId):he("Setting up notifications for workspace");let t=await this.setupChannels({workflowId:e.workflowId,channels:e.channels||{}}),s=e.events||"all",a=s==="all"?await this.settingsService.listAllEvents():s,i=t.map(r=>r.id).filter(Boolean);he("Creating notification settings for workflow %s: %O",e.workflowId,{events:a,channels:i});let n=await Promise.all(a.map(async r=>await this.settingsService.createSettings({workflowId:e.workflowId,channelIds:i,eventType:r,enabled:true,eventConfiguration:{}})));return he(e.workflowId?"Successfully setup notifications for workflow %s":"Successfully setup notifications for workspace",e.workflowId),n}async setupChannels(e){let t=await this.channelsService.listAllChannels(e.workflowId),s=Object.entries(e.channels).filter(([,d])=>d===true),a=Object.entries(e.channels).filter(([d,c])=>typeof c=="object"&&"channelId"in c),i=Object.entries(e.channels).filter(([,d])=>typeof d=="object"&&!("channelId"in d)),n=await this.handleChannelsById({channelsById:a,existingChannels:t,workflowId:e.workflowId}),r=await this.handleDefaultChannels({channelsByName:s,existingChannels:t,workflowId:e.workflowId}),l=await this.handleChannelsByConfig({channelsByConfig:i,existingChannels:t,workflowId:e.workflowId});return [...n,...r,...l]}async handleChannelsById({channelsById:e,existingChannels:t,workflowId:s}){let a=e.map(([l,d])=>d.channelId),i=t.filter(l=>l.id&&a.includes(l.id)),n=i.map(l=>l.id),r=a.filter(l=>!n.includes(l));if(r.length>0)throw new P(`Channels not found: ${r.join(", ")}`,{code:Z.NOT_FOUND,details:{workflowId:s,missingChannelIds:r}});return i}async handleDefaultChannels({channelsByName:e,existingChannels:t,workflowId:s}){return await Promise.all(e.map(async([i])=>{let n=i===Re.WEBSOCKET?t.find(l=>l.channelType===i):t.find(l=>l.channelType===i&&l.name===ce.DEFAULT_CHANNEL_NAME);if(n)return he("Using existing default channel: %O",{workflowId:s,channelType:i,channelId:n.id}),n;let r=await this.channelsService.createChannel(i);return he("Created default channel %O",{workflowId:s,channelType:i,channel:r}),r}))}async handleChannelsByConfig({channelsByConfig:e,existingChannels:t,workflowId:s}){return e.length===0?[]:await Promise.all(e.map(async([i,n])=>{let r=n.name||ce.DEFAULT_CHANNEL_NAME,l=t.find(c=>c.channelType===i&&(c.name||ce.DEFAULT_CHANNEL_NAME)===r);if(l)return he("Using existing channel: %O",{workflowId:s,channelType:i,channelName:r,channelId:l.id}),l;let d=await this.channelsService.createChannel(i,{name:r,config:n});return he("Created channel with custom config %O",{workflowId:s,channelType:i,channelName:r,channel:d}),d}))}};var Bt="https://api.kadoa.com",qs="wss://realtime.kadoa.com",Ns=process.env.KADOA_WSS_NEO_API_URI??"wss://events.kadoa.com/events/ws",Gs="https://realtime.kadoa.com";var ge="0.19.3",_t="kadoa-node-sdk",Ts="node";var re=z.wss;typeof WebSocket>"u"&&(window.WebSocket=Zs("ws"));var pt=class{constructor(e){this.lastHeartbeat=Date.now();this.isConnecting=false;this.eventListeners=new Set;this.connectionListeners=new Set;this.errorListeners=new Set;this.apiKey=e.apiKey,this.heartbeatInterval=e.heartbeatInterval||1e4,this.reconnectDelay=e.reconnectDelay||5e3,this.missedHeartbeatsLimit=e.missedHeartbeatsLimit||3e4,this.source=e.source;}async connect(){if(!this.isConnecting){this.isConnecting=true;try{let e=await fetch(`${Bt}/v4/oauth2/token`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":`${this.apiKey}`,"x-sdk-version":ge}}),{access_token:t,team_id:s}=await e.json(),a=this.source==="stream"?Ns:qs,i=this.source==="stream"?"token":"access_token";this.socket=new WebSocket(`${a}?${i}=${t}`),this.socket.onopen=()=>{this.isConnecting=!1,this.lastHeartbeat=Date.now(),this.socket?.readyState===WebSocket.OPEN&&(this.socket.send(JSON.stringify({action:"subscribe",channel:s,...this.source&&{source:this.source}})),re("Connected to WebSocket"),this.notifyConnectionListeners(!0)),this.startHeartbeatCheck();},this.socket.onmessage=n=>{try{let r=JSON.parse(n.data);r.type==="heartbeat"?this.handleHeartbeat():(r?.id&&fetch(`${Gs}/api/v1/events/ack`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r.id})}),this.notifyEventListeners(r));}catch(r){re("Failed to parse incoming message: %O",r);}},this.socket.onclose=()=>{re("WebSocket disconnected. Attempting to reconnect..."),this.isConnecting=!1,this.stopHeartbeatCheck(),this.notifyConnectionListeners(!1,"Connection closed"),setTimeout(()=>this.connect(),this.reconnectDelay);},this.socket.onerror=n=>{re("WebSocket error: %O",n),this.isConnecting=!1,this.notifyErrorListeners(n);};}catch(e){re("Failed to connect: %O",e),this.isConnecting=false,setTimeout(()=>this.connect(),this.reconnectDelay);}}}handleHeartbeat(){re("Heartbeat received"),this.lastHeartbeat=Date.now();}notifyEventListeners(e){this.eventListeners.forEach(t=>{try{t(e);}catch(s){re("Error in event listener: %O",s);}});}notifyConnectionListeners(e,t){this.connectionListeners.forEach(s=>{try{s(e,t);}catch(a){re("Error in connection listener: %O",a);}});}notifyErrorListeners(e){this.errorListeners.forEach(t=>{try{t(e);}catch(s){re("Error in error listener: %O",s);}});}startHeartbeatCheck(){this.missedHeartbeatCheckTimer=setInterval(()=>{Date.now()-this.lastHeartbeat>this.missedHeartbeatsLimit&&(re("No heartbeat received in 30 seconds! Closing connection."),this.socket?.close());},this.heartbeatInterval);}stopHeartbeatCheck(){this.missedHeartbeatCheckTimer&&clearInterval(this.missedHeartbeatCheckTimer);}onEvent(e){return this.eventListeners.add(e),()=>{this.eventListeners.delete(e);}}onConnection(e){return this.connectionListeners.add(e),()=>{this.connectionListeners.delete(e);}}onError(e){return this.errorListeners.add(e),()=>{this.errorListeners.delete(e);}}close(){this.socket&&(this.stopHeartbeatCheck(),this.socket.close(),this.socket=void 0),this.eventListeners.clear(),this.connectionListeners.clear(),this.errorListeners.clear();}isConnected(){return this.socket?.readyState===WebSocket.OPEN}};var ut=class{constructor(e){this.client=e;}async getCurrentUser(){let t=(await this.client.axiosInstance.get("/v5/user",{baseURL:this.client.baseUrl,headers:{"x-api-key":this.client.apiKey,"Content-Type":"application/json"}})).data;if(!t||!t.userId)throw new P("Invalid user data received");return {userId:t.userId,email:t.email,featureFlags:t.featureFlags||[]}}};var Li={pollIntervalMs:1e4,timeoutMs:300*1e3},Fs={ABORTED:"ABORTED",TIMEOUT:"TIMEOUT"};async function Le(o,e,t={}){let s={...Li,...t},a=Math.max(1e4,s.pollIntervalMs),i=s.timeoutMs,n=Date.now(),r=0;for(;Date.now()-n<i;){if(s.abortSignal?.aborted)throw new P("Polling operation was aborted",{code:Fs.ABORTED});r++;let l=await o();if(e(l))return {result:l,attempts:r,duration:Date.now()-n};await new Promise(d=>setTimeout(d,a));}throw new P(`Polling operation timed out after ${i}ms`,{code:Fs.TIMEOUT,details:{timeoutMs:i,attempts:r,duration:Date.now()-n}})}function Lt(o){if(o!==void 0){if(o===null||typeof o!="object"||Array.isArray(o))throw new P("additionalData must be a plain object",{code:"VALIDATION_ERROR"});try{JSON.stringify(o).length>100*1024&&console.warn("[Kadoa SDK] additionalData exceeds 100KB, consider reducing size");}catch{throw new P("additionalData must be JSON-serializable",{code:"VALIDATION_ERROR"})}}}var ji="https://registry.npmjs.org",Us="@kadoa/node-sdk";async function Bs(){try{let o=await fetch(`${ji}/${Us}`,{headers:{Accept:"application/json"}});if(!o.ok)return;let t=(await o.json())["dist-tags"]?.latest;if(!t)return;Mi(t,ge)&&console.warn(`\u26A0\uFE0F A new version of ${_t} is available: ${t} (current: ${ge}). Update with: npm install ${Us}@latest`);}catch{}}function Mi(o,e){let t=o.split(".").map(Number),s=e.split(".").map(Number);for(let a=0;a<Math.max(t.length,s.length);a++){let i=t[a]||0,n=s[a]||0;if(i>n)return true;if(i<n)return false}return false}var ft=class{constructor(e){this.validationApi=new we(e.configuration,e.baseUrl,e.axiosInstance);}async listWorkflowValidations(e){let t=await this.validationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(e);if(t.status!==200)throw O.wrap(t.data,{message:"Failed to list workflow validations"});return t.data}async getValidationDetails(e){let t=await this.validationApi.v4DataValidationValidationsValidationIdGet({validationId:e});if(t.status!==200||t.data.error)throw O.wrap(t.data,{message:"Failed to get validation details"});return t.data}async scheduleValidation(e,t){let s=await this.validationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost({workflowId:e,jobId:t});if(s.status!==200||s.data.error)throw O.wrap(s.data,{message:s.data.message||"Failed to schedule validation"});return s.data}async toggleValidationEnabled(e){let t=await this.validationApi.v4DataValidationWorkflowsWorkflowIdValidationTogglePut({workflowId:e});if(t.status!==200||t.data.error)throw O.wrap(t.data,{message:t.data.message||"Failed to toggle validation"});return t.data}async getLatestValidation(e,t){let s;if(t?s=await this.validationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet({workflowId:e,jobId:t}):s=await this.validationApi.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet({workflowId:e}),s.status!==200||s.data?.error)throw O.wrap(s.data,{message:"Failed to get latest validation"});return s.data}async getValidationAnomalies(e){let t=await this.validationApi.v4DataValidationValidationsValidationIdAnomaliesGet({validationId:e});if(t.status!==200)throw O.wrap(t.data,{message:"Failed to get validation anomalies"});return t.data}async getValidationAnomaliesByRule(e,t){let s=await this.validationApi.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet({validationId:e,ruleName:t});if(s.status!==200)throw O.wrap(s.data,{message:"Failed to get validation anomalies by rule"});return s.data}async waitUntilCompleted(e,t){return (await Le(async()=>{let a=await this.getValidationDetails(e);if(a.error)throw new P(`Validation failed: ${a.error}`,{code:"VALIDATION_ERROR",details:{validationId:e,error:a.error}});return a},a=>a.completedAt!=null,t)).result}};var mt=class{constructor(e){this.validationApi=new we(e.configuration,e.baseUrl,e.axiosInstance);}async listRules(e){let t=await this.validationApi.v4DataValidationRulesGet(e);if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:"Failed to list validation rules"});return t.data}async getRuleById(e){let t=await this.validationApi.v4DataValidationRulesRuleIdGet({ruleId:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:"Failed to get validation rule by id"});return t.data.data}async getRuleByName(e){let t=await this.validationApi.v4DataValidationRulesGet();if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:"Failed to get validation rule by name"});return t.data.data?.find(s=>s.name===e)}async createRule(e){let t=await this.validationApi.v4DataValidationRulesPost({createRule:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to create validation rule"});return t.data.data}async updateRule(e,t){let s=await this.validationApi.v4DataValidationRulesRuleIdPut({ruleId:e,updateRule:t});if(s.status!==200||s.data.error)throw O.wrap(s.data.data,{message:s.data.message||"Failed to update validation rule"});return s.data.data}async disableRule(e){let t=await this.validationApi.v4DataValidationRulesRuleIdDisablePost(e);if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to disable validation rule"});return t.data.data}async generateRule(e){let t=await this.validationApi.v4DataValidationRulesActionsGeneratePost({generateRule:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to generate validation rule"});return t.data.data}async generateRules(e){let t=await this.validationApi.v4DataValidationRulesActionsGenerateRulesPost({generateRules:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to generate validation rules"});return t.data.data}async bulkApproveRules(e){let t=await this.validationApi.v4DataValidationRulesActionsBulkApprovePost({bulkApproveRules:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to bulk approve validation rules"});return t.data.data}async bulkDeleteRules(e){let t=await this.validationApi.v4DataValidationRulesActionsBulkDeletePost({bulkDeleteRules:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to bulk delete validation rules"});return t.data.data}async deleteAllRules(e){let t=await this.validationApi.v4DataValidationRulesActionsDeleteAllDelete({deleteRuleWithReason:e});if(t.status!==200||t.data.error)throw O.wrap(t.data.data,{message:t.data.message||"Failed to delete all validation rules"});return t.data.data}};var wt={Finished:"FINISHED",Failed:"FAILED",NotSupported:"NOT_SUPPORTED",FailedInsufficientFunds:"FAILED_INSUFFICIENT_FUNDS"};var Ls=new Set([wt.Finished,wt.Failed,wt.NotSupported,wt.FailedInsufficientFunds]),js=new Set(["FINISHED","SUCCESS","FAILED","ERROR","STOPPED","CANCELLED"]),_s=z.workflow,Rt=class{constructor(e){this.workflowsApi=e;}async create(e){Lt(e.additionalData);let t=new URL(e.urls[0]).hostname;if(e.navigationMode==="agentic-navigation"){if(!e.userPrompt)throw new P("userPrompt is required when navigationMode is 'agentic-navigation'",{code:"VALIDATION_ERROR",details:{navigationMode:e.navigationMode}});let n={urls:e.urls,navigationMode:"agentic-navigation",name:e.name??t,description:e.description,userPrompt:e.userPrompt,schemaId:e.schemaId,entity:e.entity,fields:e.fields,bypassPreview:e.bypassPreview??true,tags:e.tags,interval:e.interval,monitoring:e.monitoring,location:e.location,autoStart:e.autoStart,schedules:e.schedules,additionalData:e.additionalData},r=await this.workflowsApi.v4WorkflowsPost({createWorkflowBody:n}),l=r.data?.workflowId;if(!l)throw new P(L.NO_WORKFLOW_ID,{code:"INTERNAL_ERROR",details:{response:r.data}});return {id:l}}let s={urls:e.urls,name:e.name??t,schemaId:e.schemaId,description:e.description,navigationMode:e.navigationMode,entity:e.entity??"",fields:e.fields,bypassPreview:e.bypassPreview??true,tags:e.tags,interval:e.interval,monitoring:e.monitoring,location:e.location,autoStart:e.autoStart,schedules:e.schedules,additionalData:e.additionalData},a=await this.workflowsApi.v4WorkflowsPost({createWorkflowBody:s}),i=a.data?.workflowId;if(!i)throw new P(L.NO_WORKFLOW_ID,{code:"INTERNAL_ERROR",details:{response:a.data}});return {id:i}}async get(e){return (await this.workflowsApi.v4WorkflowsWorkflowIdGet({workflowId:e})).data}async list(e){return (await this.workflowsApi.v4WorkflowsGet(e)).data?.workflows??[]}async getByName(e){return (await this.workflowsApi.v4WorkflowsGet({search:e})).data?.workflows?.[0]}async delete(e){await this.workflowsApi.v4WorkflowsWorkflowIdDelete({workflowId:e});}async update(e,t){return Lt(t.additionalData),(await this.workflowsApi.v4WorkflowsWorkflowIdMetadataPut({workflowId:e,v4WorkflowsWorkflowIdMetadataPutRequest:t})).data}async resume(e){await this.workflowsApi.v4WorkflowsWorkflowIdResumePut({workflowId:e});}async wait(e,t){return (await Le(async()=>{let a=await this.get(e);return _s("workflow %s state: %s",e,a.runState),a},a=>!!(t?.targetState&&a.state===t.targetState||a.runState&&js.has(a.runState.toUpperCase())&&a.state!=="QUEUED"),t)).result}async runWorkflow(e,t){let s=await this.workflowsApi.v4WorkflowsWorkflowIdRunPut({workflowId:e,v4WorkflowsWorkflowIdRunPutRequest:{variables:t.variables,limit:t.limit}}),a=s.data?.jobId;if(!a)throw new P(L.NO_WORKFLOW_ID,{code:"INTERNAL_ERROR",details:{response:s.data}});return {jobId:a,message:s.data?.message,status:s.data?.status}}async getJobStatus(e,t){return (await this.workflowsApi.v4WorkflowsWorkflowIdJobsJobIdGet({workflowId:e,jobId:t})).data}async waitForJobCompletion(e,t,s){return (await Le(async()=>{let i=await this.getJobStatus(e,t);return _s("workflow run %s state: %s",t,i.state),i},i=>!!(s?.targetStatus&&i.state===s.targetStatus||i.state&&Ls.has(i.state)),s)).result}};var j=[];for(let o=0;o<256;++o)j.push((o+256).toString(16).slice(1));function Ms(o,e=0){return (j[o[e+0]]+j[o[e+1]]+j[o[e+2]]+j[o[e+3]]+"-"+j[o[e+4]]+j[o[e+5]]+"-"+j[o[e+6]]+j[o[e+7]]+"-"+j[o[e+8]]+j[o[e+9]]+"-"+j[o[e+10]]+j[o[e+11]]+j[o[e+12]]+j[o[e+13]]+j[o[e+14]]+j[o[e+15]]).toLowerCase()}var vo,Ji=new Uint8Array(16);function So(){if(!vo){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");vo=crypto.getRandomValues.bind(crypto);}return vo(Ji)}var Hi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Po={randomUUID:Hi};function Ki(o,e,t){o=o||{};let s=o.random??o.rng?.()??So();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[t+a]=s[a];return e}return Ms(s)}function $i(o,e,t){return Po.randomUUID&&!e&&!o?Po.randomUUID():Ki(o,e,t)}var Wo=$i;var jt=class{constructor(e){this.client=e;this._api=null;}get api(){return this._api||(this._api=new Ae(this.client.configuration,this.client.baseUrl,this.client.axiosInstance)),this._api}async createConfig(e){return (await this.api.v4CrawlConfigPost({createCrawlerConfigRequest:e})).data}async getConfig(e){return (await this.api.v4CrawlConfigConfigIdGet({configId:e})).data}async deleteConfig(e){return (await this.api.v4CrawlConfigDelete({deleteCrawlerConfigRequest:{configId:e}})).data}};var Mt=class{constructor(e){this.client=e;this._api=null;}get api(){return this._api||(this._api=new Ae(this.client.configuration,this.client.baseUrl,this.client.axiosInstance)),this._api}async start(e){return (await this.api.v4CrawlPost({startCrawlerSessionRequest:e})).data}async startWithConfig(e){return (await this.api.v4CrawlStartPost({startSessionWithConfigRequest:e})).data}async pause(e){return (await this.api.v4CrawlPausePost({pauseCrawlerSessionRequest:{sessionId:e}})).data}async resume(e){return (await this.api.v4CrawlResumePost({resumeCrawlerSessionRequest:{sessionId:e}})).data}async listSessions(e){return (await this.api.v4CrawlSessionsGet({page:e?.page,pageSize:e?.pageSize,userId:e?.userId})).data.data??[]}async getSessionStatus(e){return (await this.api.v4CrawlSessionIdStatusGet({sessionId:e})).data}async getPages(e,t){return (await this.api.v4CrawlSessionIdPagesGet({sessionId:e,currentPage:t?.currentPage,pageSize:t?.pageSize})).data}async getPage(e,t,s){return (await this.api.v4CrawlSessionIdPagesPageIdGet({sessionId:e,pageId:t,format:s?.format})).data}async getAllSessionData(e,t){return (await this.api.v4CrawlSessionIdListGet({sessionId:e,includeAll:t?.includeAll})).data}async getBucketFile(e){return (await this.api.v4CrawlBucketDataFilenameb64Get({filenameb64:e})).data}};function Js(o){return {config:new jt(o),session:new Mt(o)}}function Hs(o,e){return {rules:e,schedule:(t,s)=>o.scheduleValidation(t,s),listWorkflowValidations:t=>o.listWorkflowValidations(t),getValidationDetails:t=>o.getValidationDetails(t),toggleEnabled:t=>o.toggleValidationEnabled(t),getLatest:(t,s)=>o.getLatestValidation(t,s),getAnomalies:t=>o.getValidationAnomalies(t),getAnomaliesByRule:(t,s)=>o.getValidationAnomaliesByRule(t,s),waitUntilCompleted:(t,s)=>o.waitUntilCompleted(t,s)}}var bo=class{constructor(e){this._baseUrl=Bt,this._timeout=e.timeout||3e4,this._apiKey=e.apiKey;let t={"User-Agent":`${_t}/${ge}`,"X-SDK-Version":ge,"X-SDK-Language":Ts};this._configuration=new at({apiKey:this._apiKey,basePath:this._baseUrl,baseOptions:{headers:t}}),this._axiosInstance=g.create({timeout:this._timeout,headers:t}),this._axiosInstance.interceptors.request.use(w=>(w.headers["x-request-id"]=Wo(),w)),this._axiosInstance.interceptors.response.use(w=>{if(w.status===401)throw new O("Unauthorized",{code:Z.AUTH_ERROR,httpStatus:401});return w},w=>{throw w instanceof As&&w.response?.status===400?O.wrap(w):O.wrap(w)});let s=new st(this.configuration,this.baseUrl,this.axiosInstance),a=new Ne(this.configuration,this.baseUrl,this.axiosInstance),i=new ut(this),n=new it(s),r=new ce(a,i),l=new dt(a),d=new nt(this),c=new Rt(s),p=new ke(this),m=new ct(r,l),h=new ft(this),f=new mt(this),R=new rt(c,n,d,m,r,l);this._extractionBuilderService=new lt(c,d,n,m),this.user=i,this.extraction=R,this.workflow=c,this.schema=p,this.notification={channels:r,settings:l,setup:m,configure:w=>m.setup(w),setupForWorkflow:w=>m.setupForWorkflow(w),setupForWorkspace:w=>m.setupForWorkspace(w)},this.validation=Hs(h,f),this.crawler=Js(this),this._realtimeConfig=e.realtimeConfig,e.enableRealtime&&e.realtimeConfig?.autoConnect!==false&&this.connectRealtime(),Bs().catch(()=>{});}get configuration(){return this._configuration}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}get apiKey(){return this._apiKey}get timeout(){return this._timeout}get realtime(){return this._realtime}extract(e){return this._extractionBuilderService.extract(e)}connectRealtime(){return this._realtime||(this._realtime=new pt({apiKey:this._apiKey,...this._realtimeConfig?.reconnectDelay!=null&&{reconnectDelay:this._realtimeConfig.reconnectDelay},...this._realtimeConfig?.heartbeatInterval!=null&&{heartbeatInterval:this._realtimeConfig.heartbeatInterval},...this._realtimeConfig?.source&&{source:this._realtimeConfig.source}}),this._realtime.connect()),this._realtime}disconnectRealtime(){this._realtime&&(this._realtime.close(),this._realtime=void 0);}isRealtimeConnected(){return this._realtime?.isConnected()??false}async status(){return {baseUrl:this._baseUrl,user:await this.user.getCurrentUser(),realtimeConnected:this.isRealtimeConnected()}}dispose(){this.disconnectRealtime();}};
9
+ exports.DataFetcherService=it;exports.ERROR_MESSAGES=L;exports.EntityResolverService=nt;exports.ExtractionBuilderService=lt;exports.ExtractionService=rt;exports.FetchDataOptions=Co;exports.KadoaClient=bo;exports.KadoaHttpException=O;exports.KadoaSdkException=P;exports.NotificationChannelType=Re;exports.NotificationChannelsService=ce;exports.NotificationSettingsEventTypeEnum=Nt;exports.NotificationSettingsService=dt;exports.NotificationSetupService=ct;exports.Realtime=pt;exports.SchemaBuilder=Ie;exports.SchemaFieldDataType=ki;exports.SchemasService=ke;exports.TERMINAL_JOB_STATES=Ls;exports.TERMINAL_RUN_STATES=js;exports.UserService=ut;exports.ValidationCoreService=ft;exports.ValidationRulesService=mt;exports.WorkflowsCoreService=Rt;exports.pollUntil=Le;exports.validateAdditionalData=Lt;return exports;})({},_);//# sourceMappingURL=index.global.js.map
10
10
  //# sourceMappingURL=index.global.js.map