@kadoa/node-sdk 0.20.2 → 0.22.0

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 Ys=Object.create;var $t=Object.defineProperty;var Xs=Object.getOwnPropertyDescriptor;var Zs=Object.getOwnPropertyNames;var ea=Object.getPrototypeOf,ta=Object.prototype.hasOwnProperty;var oa=(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 zt=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),sa=(o,e)=>{for(var t in e)$t(o,t,{get:e[t],enumerable:true});},aa=(o,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Zs(e))!ta.call(o,a)&&a!==t&&$t(o,a,{get:()=>e[a],enumerable:!(s=Xs(e,a))||s.enumerable});return o};var ia=(o,e,t)=>(t=o!=null?Ys(ea(o)):{},aa(!o||!o.__esModule?$t(t,"default",{value:o,enumerable:true}):t,o));var Ss=zt((Xc,vs)=>{var Ne=1e3,Ge=Ne*60,Te=Ge*60,ye=Te*24,Wi=ye*7,bi=ye*365.25;vs.exports=function(o,e){e=e||{};var t=typeof o;if(t==="string"&&o.length>0)return Di(o);if(t==="number"&&isFinite(o))return e.long?Ei(o):Oi(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function Di(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*bi;case "weeks":case "week":case "w":return t*Wi;case "days":case "day":case "d":return t*ye;case "hours":case "hour":case "hrs":case "hr":case "h":return t*Te;case "minutes":case "minute":case "mins":case "min":case "m":return t*Ge;case "seconds":case "second":case "secs":case "sec":case "s":return t*Ne;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return t;default:return}}}}function Oi(o){var e=Math.abs(o);return e>=ye?Math.round(o/ye)+"d":e>=Te?Math.round(o/Te)+"h":e>=Ge?Math.round(o/Ge)+"m":e>=Ne?Math.round(o/Ne)+"s":o+"ms"}function Ei(o){var e=Math.abs(o);return e>=ye?Ft(o,e,ye,"day"):e>=Te?Ft(o,e,Te,"hour"):e>=Ge?Ft(o,e,Ge,"minute"):e>=Ne?Ft(o,e,Ne,"second"):o+" ms"}function Ft(o,e,t,s){var a=e>=t*1.5;return Math.round(o/t)+" "+s+(a?"s":"")}});var Ws=zt((Zc,Ps)=>{function qi(o){t.debug=t,t.default=t,t.coerce=l,t.disable=n,t.enable=a,t.enabled=r,t.humanize=Ss(),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,R,f;function w(...h){if(!w.enabled)return;let b=w,O=Number(new Date),N=O-(p||O);b.diff=N,b.prev=p,b.curr=O,p=O,h[0]=t.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");let q=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,(Z,J)=>{if(Z==="%%")return "%";q++;let Ie=t.formatters[J];if(typeof Ie=="function"){let ke=h[q];Z=Ie.call(b,ke),h.splice(q,1),q--;}return Z}),t.formatArgs.call(b,h),(b.log||t.log).apply(b,h);}return w.namespace=c,w.useColors=t.useColors(),w.color=t.selectColor(c),w.extend=s,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:true,configurable:false,get:()=>m!==null?m:(R!==t.namespaces&&(R=t.namespaces,f=t.enabled(c)),f),set:h=>{m=h;}}),typeof t.init=="function"&&t.init(w),w}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,R=0,f=-1,w=0;for(;m<c.length;)if(R<p.length&&(p[R]===c[m]||p[R]==="*"))p[R]==="*"?(f=R,w=m,R++):(m++,R++);else if(f!==-1)R=f+1,w++,m=w;else return false;for(;R<p.length&&p[R]==="*";)R++;return R===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}Ps.exports=qi;});var bs=zt(($,Ut)=>{$.formatArgs=Gi;$.save=Ti;$.load=Fi;$.useColors=Ni;$.storage=Ui();$.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 Ni(){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 Gi(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+Ut.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 Ti(o){try{o?$.storage.setItem("debug",o):$.storage.removeItem("debug");}catch{}}function Fi(){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 Ui(){try{return localStorage}catch{}}Ut.exports=Ws()($);var{formatters:Bi}=Ut.exports;Bi.j=function(o){try{return JSON.stringify(o)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};});function Le(o,e){return function(){return o.apply(e,arguments)}}var{toString:na}=Object.prototype,{getPrototypeOf:Yt}=Object,{iterator:xt,toStringTag:Bo}=Symbol,It=(o=>e=>{let t=na.call(e);return o[t]||(o[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ee=o=>(o=o.toLowerCase(),e=>It(e)===o),kt=o=>e=>typeof e===o,{isArray:Se}=Array,ve=kt("undefined");function _e(o){return o!==null&&!ve(o)&&o.constructor!==null&&!ve(o.constructor)&&H(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}var Lo=ee("ArrayBuffer");function ra(o){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(o):e=o&&o.buffer&&Lo(o.buffer),e}var la=kt("string"),H=kt("function"),_o=kt("number"),je=o=>o!==null&&typeof o=="object",da=o=>o===true||o===false,At=o=>{if(It(o)!=="object")return false;let e=Yt(o);return (e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Bo in o)&&!(xt in o)},ca=o=>{if(!je(o)||_e(o))return false;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return false}},pa=ee("Date"),ua=ee("File"),fa=ee("Blob"),ma=ee("FileList"),wa=o=>je(o)&&H(o.pipe),ha=o=>{let e;return o&&(typeof FormData=="function"&&o instanceof FormData||H(o.append)&&((e=It(o))==="formdata"||e==="object"&&H(o.toString)&&o.toString()==="[object FormData]"))},Ra=ee("URLSearchParams"),[ga,Ca,ya,Aa]=["ReadableStream","Request","Response","Headers"].map(ee),xa=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Me(o,e,{allOwnKeys:t=false}={}){if(o===null||typeof o>"u")return;let s,a;if(typeof o!="object"&&(o=[o]),Se(o))for(s=0,a=o.length;s<a;s++)e.call(null,o[s],s,o);else {if(_e(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 jo(o,e){if(_e(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,Mo=o=>!ve(o)&&o!==Ce;function Qt(){let{caseless:o,skipUndefined:e}=Mo(this)&&this||{},t={},s=(a,i)=>{let n=o&&jo(t,i)||i;At(t[n])&&At(a)?t[n]=Qt(t[n],a):At(a)?t[n]=Qt({},a):Se(a)?t[n]=a.slice():(!e||!ve(a))&&(t[n]=a);};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Me(arguments[a],s);return t}var Ia=(o,e,t,{allOwnKeys:s}={})=>(Me(e,(a,i)=>{t&&H(a)?o[i]=Le(a,t):o[i]=a;},{allOwnKeys:s}),o),ka=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),Va=(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);},va=(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&&Yt(o);}while(o&&(!t||t(o,e))&&o!==Object.prototype);return e},Sa=(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},Pa=o=>{if(!o)return null;if(Se(o))return o;let e=o.length;if(!_o(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=o[e];return t},Wa=(o=>e=>o&&e instanceof o)(typeof Uint8Array<"u"&&Yt(Uint8Array)),ba=(o,e)=>{let s=(o&&o[xt]).call(o),a;for(;(a=s.next())&&!a.done;){let i=a.value;e.call(o,i[0],i[1]);}},Da=(o,e)=>{let t,s=[];for(;(t=o.exec(e))!==null;)s.push(t);return s},Oa=ee("HTMLFormElement"),Ea=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,s,a){return s.toUpperCase()+a}),Uo=(({hasOwnProperty:o})=>(e,t)=>o.call(e,t))(Object.prototype),qa=ee("RegExp"),Jo=(o,e)=>{let t=Object.getOwnPropertyDescriptors(o),s={};Me(t,(a,i)=>{let n;(n=e(a,i,o))!==false&&(s[i]=n||a);}),Object.defineProperties(o,s);},Na=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+"'")});}});},Ga=(o,e)=>{let t={},s=a=>{a.forEach(i=>{t[i]=true;});};return Se(o)?s(o):s(String(o).split(e)),t},Ta=()=>{},Fa=(o,e)=>o!=null&&Number.isFinite(o=+o)?o:e;function Ua(o){return !!(o&&H(o.append)&&o[Bo]==="FormData"&&o[xt])}var Ba=o=>{let e=new Array(10),t=(s,a)=>{if(je(s)){if(e.indexOf(s)>=0)return;if(_e(s))return s;if(!("toJSON"in s)){e[a]=s;let i=Se(s)?[]:{};return Me(s,(n,r)=>{let l=t(n,a+1);!ve(l)&&(i[r]=l);}),e[a]=void 0,i}}return s};return t(o,0)},La=ee("AsyncFunction"),_a=o=>o&&(je(o)||H(o))&&H(o.then)&&H(o.catch),Ho=((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)),ja=typeof queueMicrotask<"u"?queueMicrotask.bind(Ce):typeof process<"u"&&process.nextTick||Ho,Ma=o=>o!=null&&H(o[xt]),u={isArray:Se,isArrayBuffer:Lo,isBuffer:_e,isFormData:ha,isArrayBufferView:ra,isString:la,isNumber:_o,isBoolean:da,isObject:je,isPlainObject:At,isEmptyObject:ca,isReadableStream:ga,isRequest:Ca,isResponse:ya,isHeaders:Aa,isUndefined:ve,isDate:pa,isFile:ua,isBlob:fa,isRegExp:qa,isFunction:H,isStream:wa,isURLSearchParams:Ra,isTypedArray:Wa,isFileList:ma,forEach:Me,merge:Qt,extend:Ia,trim:xa,stripBOM:ka,inherits:Va,toFlatObject:va,kindOf:It,kindOfTest:ee,endsWith:Sa,toArray:Pa,forEachEntry:ba,matchAll:Da,isHTMLForm:Oa,hasOwnProperty:Uo,hasOwnProp:Uo,reduceDescriptors:Jo,freezeMethods:Na,toObjectSet:Ga,toCamelCase:Ea,noop:Ta,toFiniteNumber:Fa,findKey:jo,global:Ce,isContextDefined:Mo,isSpecCompliantForm:Ua,toJSONObject:Ba,isAsyncFn:La,isThenable:_a,setImmediate:Ho,asap:ja,isIterable:Ma};function Pe(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(Pe,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 Ko=Pe.prototype,$o={};["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=>{$o[o]={value:o};});Object.defineProperties(Pe,$o);Object.defineProperty(Ko,"isAxiosError",{value:true});Pe.from=(o,e,t,s,a,i)=>{let n=Object.create(Ko);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 Pe.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=Pe;var Vt=null;function Xt(o){return u.isPlainObject(o)||u.isArray(o)}function Qo(o){return u.endsWith(o,"[]")?o.slice(0,-2):o}function zo(o,e,t){return o?o.concat(e).map(function(a,i){return a=Qo(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function Ja(o){return u.isArray(o)&&!o.some(Xt)}var Ha=u.toFlatObject(u,{},null,function(e){return /^is[A-Z]/.test(e)});function Ka(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(w,h){return !u.isUndefined(h[w])});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,w,h){let b=f;if(f&&!h&&typeof f=="object"){if(u.endsWith(w,"{}"))w=s?w:w.slice(0,-2),f=JSON.stringify(f);else if(u.isArray(f)&&Ja(f)||(u.isFileList(f)||u.endsWith(w,"[]"))&&(b=u.toArray(f)))return w=Qo(w),b.forEach(function(N,q){!(u.isUndefined(N)||N===null)&&e.append(n===true?zo([w],q,i):n===null?w:w+"[]",d(N));}),false}return Xt(f)?true:(e.append(zo(h,w,i),d(f)),false)}let p=[],m=Object.assign(Ha,{defaultVisitor:c,convertValue:d,isVisitable:Xt});function R(f,w){if(!u.isUndefined(f)){if(p.indexOf(f)!==-1)throw Error("Circular reference detected in "+w.join("."));p.push(f),u.forEach(f,function(b,O){(!(u.isUndefined(b)||b===null)&&a.call(e,b,u.isString(O)?O.trim():O,w,m))===true&&R(b,w?w.concat(O):[O]);}),p.pop();}}if(!u.isObject(o))throw new TypeError("data must be an object");return R(o),e}var fe=Ka;function Yo(o){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Xo(o,e){this._pairs=[],o&&fe(o,this,e);}var Zo=Xo.prototype;Zo.append=function(e,t){this._pairs.push([e,t]);};Zo.toString=function(e){let t=e?function(s){return e.call(this,s,Yo)}:Yo;return this._pairs.map(function(a){return t(a[0])+"="+t(a[1])},"").join("&")};var vt=Xo;function $a(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Je(o,e,t){if(!e)return o;let s=t&&t.encode||$a;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 vt(e,t).toString(s),i){let n=o.indexOf("#");n!==-1&&(o=o.slice(0,n)),o+=(o.indexOf("?")===-1?"?":"&")+i;}return o}var Zt=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);});}},eo=Zt;var St={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var es=typeof URLSearchParams<"u"?URLSearchParams:vt;var ts=typeof FormData<"u"?FormData:null;var os=typeof Blob<"u"?Blob:null;var ss={isBrowser:true,classes:{URLSearchParams:es,FormData:ts,Blob:os},protocols:["http","https","file","blob","url","data"]};var so={};sa(so,{hasBrowserEnv:()=>oo,hasStandardBrowserEnv:()=>za,hasStandardBrowserWebWorkerEnv:()=>Qa,navigator:()=>to,origin:()=>Ya});var oo=typeof window<"u"&&typeof document<"u",to=typeof navigator=="object"&&navigator||void 0,za=oo&&(!to||["ReactNative","NativeScript","NS"].indexOf(to.product)<0),Qa=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ya=oo&&window.location.href||"http://localhost";var G={...so,...ss};function ao(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 Xa(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 ei(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(Xa(s),a,t,0);}),t}return null}var Pt=ei;function ti(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 io={transitional:St,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(Pt(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 ao(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),ti(e)):e}],transformResponse:[function(e){let t=this.transitional||io.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=>{io.headers[o]={};});var We=io;var oi=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"]),as=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]&&oi[t])&&(t==="set-cookie"?e[t]?e[t].push(s):e[t]=[s]:e[t]=e[t]?e[t]+", "+s:s);}),e};var is=Symbol("internals");function He(o){return o&&String(o).trim().toLowerCase()}function Wt(o){return o===false||o==null?o:u.isArray(o)?o.map(Wt):String(o)}function si(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 ai=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function no(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 ii(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,s)=>t.toUpperCase()+s)}function ni(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 be=class{constructor(e){e&&this.set(e);}set(e,t,s){let a=this;function i(r,l,d){let c=He(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]=Wt(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())&&!ai(e))n(as(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=He(e),e){let s=u.findKey(this,e);if(s){let a=this[s];if(!t)return a;if(t===true)return si(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=He(e),e){let s=u.findKey(this,e);return !!(s&&this[s]!==void 0&&(!t||no(this,this[s],s,t)))}return false}delete(e,t){let s=this,a=false;function i(n){if(n=He(n),n){let r=u.findKey(s,n);r&&(!t||no(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||no(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]=Wt(a),delete t[i];return}let r=e?ii(i):String(i).trim();r!==i&&delete t[i],t[r]=Wt(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[is]=this[is]={accessors:{}}).accessors,a=this.prototype;function i(n){let r=He(n);s[r]||(ni(a,n),s[r]=true);}return u.isArray(e)?e.forEach(i):i(e),this}};be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);u.reduceDescriptors(be.prototype,({value:o},e)=>{let t=e[0].toUpperCase()+e.slice(1);return {get:()=>o,set(s){this[t]=s;}}});u.freezeMethods(be);var B=be;function Ke(o,e){let t=this||We,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 $e(o){return !!(o&&o.__CANCEL__)}function ns(o,e,t){W.call(this,o??"canceled",W.ERR_CANCELED,e,t),this.name="CanceledError";}u.inherits(ns,W,{__CANCEL__:true});var se=ns;function ze(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 ro(o){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return e&&e[1]||""}function ri(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 R=c&&d-c;return R?Math.round(m*1e3/R):void 0}}var rs=ri;function li(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 ls=li;var De=(o,e,t=3)=>{let s=0,a=rs(50,250);return ls(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)},lo=(o,e)=>{let t=o!=null;return [s=>e[0]({lengthComputable:t,total:o,loaded:s}),e[1]]},co=o=>(...e)=>u.asap(()=>o(...e));var ds=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 cs=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 po(o){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function uo(o,e){return e?o.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):o}function Qe(o,e,t){let s=!po(e);return o&&(s||t==false)?uo(o,e):e}var ps=o=>o instanceof B?{...o}:o;function te(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(ps(d),ps(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 bt=o=>{let e=te({},o),{data:t,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:i,headers:n,auth:r}=e;if(e.headers=n=B.from(n),e.url=Je(Qe(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&&ds(e.url))){let l=a&&i&&cs.read(i);l&&n.set(a,l);}return e};var di=typeof XMLHttpRequest<"u",us=di&&function(o){return new Promise(function(t,s){let a=bt(o),i=a.data,n=B.from(a.headers).normalize(),{responseType:r,onUploadProgress:l,onDownloadProgress:d}=a,c,p,m,R,f;function w(){R&&R(),f&&f(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c);}let h=new XMLHttpRequest;h.open(a.method.toUpperCase(),a.url,true),h.timeout=a.timeout;function b(){if(!h)return;let N=B.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),M={data:!r||r==="text"||r==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:N,config:o,request:h};ze(function(J){t(J),w();},function(J){s(J),w();},M),h=null;}"onloadend"in h?h.onloadend=b:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(b);},h.onabort=function(){h&&(s(new W("Request aborted",W.ECONNABORTED,o,h)),h=null);},h.onerror=function(q){let M=q&&q.message?q.message:"Network Error",Z=new W(M,W.ERR_NETWORK,o,h);Z.event=q||null,s(Z),h=null;},h.ontimeout=function(){let q=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",M=a.transitional||St;a.timeoutErrorMessage&&(q=a.timeoutErrorMessage),s(new W(q,M.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,o,h)),h=null;},i===void 0&&n.setContentType(null),"setRequestHeader"in h&&u.forEach(n.toJSON(),function(q,M){h.setRequestHeader(M,q);}),u.isUndefined(a.withCredentials)||(h.withCredentials=!!a.withCredentials),r&&r!=="json"&&(h.responseType=a.responseType),d&&([m,f]=De(d,true),h.addEventListener("progress",m)),l&&h.upload&&([p,R]=De(l),h.upload.addEventListener("progress",p),h.upload.addEventListener("loadend",R)),(a.cancelToken||a.signal)&&(c=N=>{h&&(s(!N||N.type?new se(null,o,h):N),h.abort(),h=null);},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));let O=ro(a.url);if(O&&G.protocols.indexOf(O)===-1){s(new W("Unsupported protocol "+O+":",W.ERR_BAD_REQUEST,o));return}h.send(i||null);})};var ci=(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 se(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}},fs=ci;var pi=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;},ui=async function*(o,e){for await(let t of fi(o))yield*pi(t,e);},fi=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();}},fo=(o,e,t,s)=>{let a=ui(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 ms=64*1024,{isFunction:Dt}=u,mi=(({Request:o,Response:e})=>({Request:o,Response:e}))(u.global),{ReadableStream:ws,TextEncoder:hs}=u.global,Rs=(o,...e)=>{try{return !!o(...e)}catch{return false}},wi=o=>{o=u.merge.call({skipUndefined:true},mi,o);let{fetch:e,Request:t,Response:s}=o,a=e?Dt(e):typeof fetch=="function",i=Dt(t),n=Dt(s);if(!a)return false;let r=a&&Dt(ws),l=a&&(typeof hs=="function"?(f=>w=>f.encode(w))(new hs):async f=>new Uint8Array(await new t(f).arrayBuffer())),d=i&&r&&Rs(()=>{let f=!1,w=new t(G.origin,{body:new ws,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!w}),c=n&&r&&Rs(()=>u.isReadableStream(new s("").body)),p={stream:c&&(f=>f.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!p[f]&&(p[f]=(w,h)=>{let b=w&&w[f];if(b)return b.call(w);throw new W(`Response type '${f}' is not supported`,W.ERR_NOT_SUPPORT,h)});});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},R=async(f,w)=>{let h=u.toFiniteNumber(f.getContentLength());return h??m(w)};return async f=>{let{url:w,method:h,data:b,signal:O,cancelToken:N,timeout:q,onDownloadProgress:M,onUploadProgress:Z,responseType:J,headers:Ie,withCredentials:ke="same-origin",fetchOptions:Eo}=bt(f),qo=e||fetch;J=J?(J+"").toLowerCase():"text";let Ct=fs([O,N&&N.toAbortSignal()],q),Be=null,ge=Ct&&Ct.unsubscribe&&(()=>{Ct.unsubscribe();}),No;try{if(Z&&d&&h!=="get"&&h!=="head"&&(No=await R(Ie,b))!==0){let ue=new t(w,{method:"POST",body:b,duplex:"half"}),Ve;if(u.isFormData(b)&&(Ve=ue.headers.get("content-type"))&&Ie.setContentType(Ve),ue.body){let[Kt,yt]=lo(No,De(co(Z)));b=fo(ue.body,ms,Kt,yt);}}u.isString(ke)||(ke=ke?"include":"omit");let oe=i&&"credentials"in t.prototype,Go={...Eo,signal:Ct,method:h.toUpperCase(),headers:Ie.normalize().toJSON(),body:b,duplex:"half",credentials:oe?ke:void 0};Be=i&&new t(w,Go);let pe=await(i?qo(Be,Eo):qo(w,Go)),To=c&&(J==="stream"||J==="response");if(c&&(M||To&&ge)){let ue={};["status","statusText","headers"].forEach(Fo=>{ue[Fo]=pe[Fo];});let Ve=u.toFiniteNumber(pe.headers.get("content-length")),[Kt,yt]=M&&lo(Ve,De(co(M),!0))||[];pe=new s(fo(pe.body,ms,Kt,()=>{yt&&yt(),ge&&ge();}),ue);}J=J||"text";let Qs=await p[u.findKey(p,J)||"text"](pe,f);return !To&&ge&&ge(),await new Promise((ue,Ve)=>{ze(ue,Ve,{data:Qs,headers:B.from(pe.headers),status:pe.status,statusText:pe.statusText,config:f,request:Be});})}catch(oe){throw ge&&ge(),oe&&oe.name==="TypeError"&&/Load failed|fetch/i.test(oe.message)?Object.assign(new W("Network Error",W.ERR_NETWORK,f,Be),{cause:oe.cause||oe}):W.from(oe,oe&&oe.code,f,Be)}}},hi=new Map,mo=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=hi;for(;r--;)l=i[r],d=c.get(l),d===void 0&&c.set(l,d=r?new Map:wi(e)),c=d;return d};mo();var wo={http:Vt,xhr:us,fetch:{get:mo}};u.forEach(wo,(o,e)=>{if(o){try{Object.defineProperty(o,"name",{value:e});}catch{}Object.defineProperty(o,"adapterName",{value:e});}});var gs=o=>`- ${o}`,gi=o=>u.isFunction(o)||o===null||o===false;function Ci(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,!gi(s)&&(a=wo[(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
- `+n.map(gs).join(`
5
- `):" "+gs(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 Ot={getAdapter:Ci,adapters:wo};function ho(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new se(null,o)}function Et(o){return ho(o),o.headers=B.from(o.headers),o.data=Ke.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",false),Ot.getAdapter(o.adapter||We.adapter,o)(o).then(function(s){return ho(o),s.data=Ke.call(o,o.transformResponse,s),s.headers=B.from(s.headers),s},function(s){return $e(s)||(ho(o),s&&s.response&&(s.response.data=Ke.call(o,o.transformResponse,s.response),s.response.headers=B.from(s.response.headers))),Promise.reject(s)})}var qt="1.13.2";var Nt={};["object","boolean","number","function","string","symbol"].forEach((o,e)=>{Nt[o]=function(s){return typeof s===o||"a"+(e<1?"n ":" ")+o};});var Cs={};Nt.transitional=function(e,t,s){function a(i,n){return "[Axios v"+qt+"] 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&&!Cs[n]&&(Cs[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}};Nt.spelling=function(e){return (t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),true)};function yi(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 Ye={assertOptions:yi,validators:Nt};var ae=Ye.validators,Oe=class{constructor(e){this.defaults=e||{},this.interceptors={request:new eo,response:new eo};}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=te(this.defaults,t);let{transitional:s,paramsSerializer:a,headers:i}=t;s!==void 0&&Ye.assertOptions(s,{silentJSONParsing:ae.transitional(ae.boolean),forcedJSONParsing:ae.transitional(ae.boolean),clarifyTimeoutError:ae.transitional(ae.boolean)},false),a!=null&&(u.isFunction(a)?t.paramsSerializer={serialize:a}:Ye.assertOptions(a,{encode:ae.function,serialize:ae.function},true)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=true),Ye.assertOptions(t,{baseUrl:ae.spelling("baseURL"),withXsrfToken:ae.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(w){typeof w.runWhen=="function"&&w.runWhen(t)===false||(l=l&&w.synchronous,r.unshift(w.fulfilled,w.rejected));});let d=[];this.interceptors.response.forEach(function(w){d.push(w.fulfilled,w.rejected);});let c,p=0,m;if(!l){let f=[Et.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 R=t;for(;p<m;){let f=r[p++],w=r[p++];try{R=f(R);}catch(h){w.call(this,h);break}}try{c=Et.call(this,R);}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=te(this.defaults,e);let t=Qe(e.baseURL,e.url,e.allowAbsoluteUrls);return Je(t,e.params,e.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(e){Oe.prototype[e]=function(t,s){return this.request(te(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(te(r||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}Oe.prototype[e]=t(),Oe.prototype[e+"Form"]=t(true);});var Xe=Oe;var Ro=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 se(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}}},ys=Ro;function go(o){return function(t){return o.apply(null,t)}}function Co(o){return u.isObject(o)&&o.isAxiosError===true}var yo={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(yo).forEach(([o,e])=>{yo[e]=o;});var As=yo;function xs(o){let e=new Xe(o),t=Le(Xe.prototype.request,e);return u.extend(t,Xe.prototype,e,{allOwnKeys:true}),u.extend(t,e,null,{allOwnKeys:true}),t.create=function(a){return xs(te(o,a))},t}var F=xs(We);F.Axios=Xe;F.CanceledError=se;F.CancelToken=ys;F.isCancel=$e;F.VERSION=qt;F.toFormData=fe;F.AxiosError=W;F.Cancel=F.CanceledError;F.all=function(e){return Promise.all(e)};F.spread=go;F.isAxiosError=Co;F.mergeConfig=te;F.AxiosHeaders=B;F.formToJSON=o=>Pt(u.isHTMLForm(o)?new FormData(o):o);F.getAdapter=Ot.getAdapter;F.HttpStatusCode=As;F.default=F;var g=F;var{Axios:od,AxiosError:Is,CanceledError:sd,isCancel:ad,CancelToken:id,VERSION:nd,all:rd,Cancel:ld,isAxiosError:ks,spread:dd,toFormData:cd,AxiosHeaders:pd,HttpStatusCode:ud,formToJSON:fd,getAdapter:md,mergeConfig:wd}=g;var y=globalThis.URL,Vs=globalThis.URLSearchParams;var C="https://api.kadoa.com".replace(/\/+$/,"");var X=class{constructor(e,t=C,s=g){this.basePath=t;this.axios=s;e&&(this.configuration=e,this.basePath=e.basePath??t);}},Gt=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 Gt(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 Ao(o,e,t=""){e!=null&&(typeof e=="object"?Array.isArray(e)?e.forEach(s=>Ao(o,s,t)):Object.keys(e).forEach(s=>Ao(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 Vs(o.search);Ao(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 Ai=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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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=Ai(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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,o)(r,n||l)}}};var Ze=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 xi=function(o){return {v4DataValidationRulesActionsBulkApprovePost:async(e,t={})=>{let s="/v4/data-validation/rules/actions/bulk-approve",a=new y(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 y(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 y(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 y(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 y(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 y(l,x),c;o&&(c=o.baseOptions);let p={method:"GET",...c,...r},m={},R={};if(await I(m,"x-api-key",o),e!==void 0&&(R.groupId=e),t!==void 0&&(R.workflowId=t),s!==void 0&&(R.status=s),a!==void 0&&(R.page=a),i!==void 0&&(R.pageSize=i),n!==void 0)for(let[w,h]of Object.entries(n))R[w]=h;k(d,R);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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 R=d&&d.headers?d.headers:{};return c.headers={...p,...R,...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 y(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 y(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 y(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 y(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 y(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=xi(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,C,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,C,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,C,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,C,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,C,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,R)=>v(d,g,C,o)(m,p||R)},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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,o)(l,r||d)}}};var et=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 Ii=function(o){return {v5NotificationsChannelsChannelIdDelete:async(e,t={})=>{S("v5NotificationsChannelsChannelIdDelete","channelId",e);let s="/v5/notifications/channels/{channelId}".replace("{channelId}",encodeURIComponent(String(e))),a=new y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(l,x),c;o&&(c=o.baseOptions);let p={method:"GET",...c,...r},m={},R={};await I(m,"x-api-key",o),e!==void 0&&(R.workflowId=e),t!==void 0&&(R.eventType=t),s!==void 0&&(R.startDate=s instanceof Date?s.toISOString():s),a!==void 0&&(R.endDate=a instanceof Date?a.toISOString():a),i!==void 0&&(R.limit=i),n!==void 0&&(R.offset=n),k(d,R);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 y(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 y(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 y(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 y(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 y(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 y(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=Ii(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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,R)=>v(d,g,C,o)(m,p||R)},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,C,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,C,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,C,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,C,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,C,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,C,o)(r,n||l)}}};var Ee=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))}},Tt={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 ki=function(o){return {v4SchemasGet:async(e={})=>{let t="/v4/schemas/",s=new y(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 y(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 y(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 y(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 y(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}}}},tt=function(o){let e=ki(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,C,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,C,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,C,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,C,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,C,o)(l,r||d)}}};var ot=class extends X{v4SchemasGet(e){return tt(this.configuration).v4SchemasGet(e).then(t=>t(this.axios,this.basePath))}v4SchemasPost(e={},t){return tt(this.configuration).v4SchemasPost(e.createSchemaBody,t).then(s=>s(this.axios,this.basePath))}v4SchemasSchemaIdDelete(e,t){return tt(this.configuration).v4SchemasSchemaIdDelete(e.schemaId,t).then(s=>s(this.axios,this.basePath))}v4SchemasSchemaIdGet(e,t){return tt(this.configuration).v4SchemasSchemaIdGet(e.schemaId,t).then(s=>s(this.axios,this.basePath))}v4SchemasSchemaIdPut(e,t){return tt(this.configuration).v4SchemasSchemaIdPut(e.schemaId,e.updateSchemaBody,t).then(s=>s(this.axios,this.basePath))}};var Vi=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 y(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 y(c,x),m;o&&(m=o.baseOptions);let R={method:"GET",...m,...d},f={},w={};await I(f,"x-api-key",o),await me(f,o),s!==void 0&&(w.workflowIds=s),a!==void 0&&(w.startDate=a instanceof Date?a.toISOString():a),i!==void 0&&(w.endDate=i instanceof Date?i.toISOString():i),n!==void 0&&(w.skip=n),r!==void 0&&(w.limit=r),l!==void 0&&(w.exclude=l),e!=null&&(f["x-api-key"]=String(e)),t!=null&&(f.Authorization=String(t)),k(p,w);let h=m&&m.headers?m.headers:{};return R.headers={...f,...h,...d.headers},{url:V(p),options:R}},v4WorkflowsGet:async(e,t,s,a,i,n,r,l,d,c,p,m={})=>{let R="/v4/workflows",f=new y(R,x),w;o&&(w=o.baseOptions);let h={method:"GET",...w,...m},b={},O={};await I(b,"x-api-key",o),e!==void 0&&(O.search=e),t!==void 0&&(O.skip=t),s!==void 0&&(O.limit=s),a!==void 0&&(O.state=a),i&&(O.tags=i),n!==void 0&&(O.userId=n),r!==void 0&&(O.monitoring=r),l!==void 0&&(O.updateInterval=l),d!==void 0&&(O.templateId=d),c!==void 0&&(O.includeDeleted=c),p!==void 0&&(O.format=p),k(f,O);let N=w&&w.headers?w.headers:{};return h.headers={...b,...N,...m.headers},{url:V(f),options:h}},v4WorkflowsPost:async(e,t={})=>{let s="/v4/workflows/",a=new y(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 y(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 R=d&&d.headers?d.headers:{};return c.headers={...p,...R,...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 y(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 y(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,R,f={})=>{S("v4WorkflowsWorkflowIdDataGet","workflowId",e);let w="/v4/workflows/{workflowId}/data".replace("{workflowId}",encodeURIComponent(String(e))),h=new y(w,x),b;o&&(b=o.baseOptions);let O={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),R!==void 0&&(q.includeAnomalies=R),t!=null&&(N["x-api-key"]=String(t)),s!=null&&(N.Authorization=String(s)),k(h,q);let M=b&&b.headers?b.headers:{};return O.headers={...N,...M,...f.headers},{url:V(h),options:O}},v4WorkflowsWorkflowIdDelete:async(e,t={})=>{S("v4WorkflowsWorkflowIdDelete","workflowId",e);let s="/v4/workflows/{workflowId}".replace("{workflowId}",encodeURIComponent(String(e))),a=new y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(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 y(d,x),p;o&&(p=o.baseOptions);let m={method:"GET",...p,...l},R={},f={};await I(R,"x-api-key",o),await me(R,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&&(R["x-api-key"]=String(e)),t!=null&&(R.Authorization=String(t)),k(c,f);let w=p&&p.headers?p.headers:{};return m.headers={...R,...w,...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 y(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 R=d&&d.headers?d.headers:{};return c.headers={...p,...R,...n.headers},{url:V(l),options:c}}}},U=function(o){let e=Vi(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,C,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,R=A["WorkflowsApi.v4ChangesGet"]?.[m]?.url;return (f,w)=>v(p,g,C,o)(f,R||w)},async v4WorkflowsGet(t,s,a,i,n,r,l,d,c,p,m,R){let f=await e.v4WorkflowsGet(t,s,a,i,n,r,l,d,c,p,m,R),w=o?.serverIndex??0,h=A["WorkflowsApi.v4WorkflowsGet"]?.[w]?.url;return (b,O)=>v(f,g,C,o)(b,h||O)},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,C,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,C,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,C,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,C,o)(c,d||p)},async v4WorkflowsWorkflowIdDataGet(t,s,a,i,n,r,l,d,c,p,m,R,f,w){let h=await e.v4WorkflowsWorkflowIdDataGet(t,s,a,i,n,r,l,d,c,p,m,R,f,w),b=o?.serverIndex??0,O=A["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[b]?.url;return (N,q)=>v(h,g,C,o)(N,O||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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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,C,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 (R,f)=>v(c,g,C,o)(R,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,C,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 vi={Done:"DONE",Crawling:"CRAWLING",Pending:"PENDING"};var it=class{constructor(e){this.client=e;}get api(){return this.client.apis.crawler}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 nt=class{constructor(e){this.client=e;}get api(){return this.client.apis.crawler}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 xo(o){return {config:new it(o),session:new nt(o)}}var Io=class{},Si={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},Pi={...Si,Text:Y.String,Url:Y.Link};var qe=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 rt=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 qe(s=>this.fetchData({...e,...s})).fetchAll({limit:e.limit??this.defaultLimit})}async*fetchDataPages(e){let t=new qe(s=>this.fetchData({...e,...s}));for await(let s of t.pages({limit:e.limit??this.defaultLimit}))yield s;}};var le={VALIDATION_ERROR:"VALIDATION_ERROR",BAD_REQUEST:"BAD_REQUEST",NOT_FOUND:"NOT_FOUND",INTERNAL_ERROR:"INTERNAL_ERROR"},re=class re 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,re);}static from(e,t){if(e instanceof re)return e;let s=e instanceof Error?e.message:typeof e=="string"?e:"Unexpected error";return new re(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 re}static wrap(e,t){if(e instanceof re)return e;let s=t?.message||(e instanceof Error?e.message:typeof e=="string"?e:"Unexpected error");return new re(s,{code:"UNKNOWN",details:t?.details,cause:e})}};re.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=re,_=P.ERROR_MESSAGES;var D=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})}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:ks(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 Ds=ia(bs()),de=o=>(0, Ds.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 ko(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 Os(o){return o==="__proto__"}function ie(o,e){let t=Object.keys(e);for(let s=0;s<t.length;s++){let a=t[s];if(Os(a))continue;let i=e[a],n=o[a];Array.isArray(i)?Array.isArray(n)?o[a]=ie(n,i):o[a]=ie([],i):ko(i)?ko(n)?o[a]=ie(n,i):o[a]=ie({},i):(n===void 0||i!==void 0)&&(o[a]=i);}return o}function Es(o){return o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()}var Li=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function qs(o){return Array.from(o.match(Li)??[])}function Vo(o){let e=qs(o);if(e.length===0)return "";let[t,...s]=e;return `${t.toLowerCase()}${s.map(a=>Es(a)).join("")}`}function vo(o){return o.substring(0,1).toUpperCase()+o.substring(1)}var Fe=class Fe{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),Fe.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${vo(Vo(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(!Fe.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}})}};Fe.FIELD_NAME_PATTERN=/^[A-Za-z0-9]+$/,Fe.TYPES_REQUIRING_EXAMPLE=["STRING","IMAGE","LINK","OBJECT","ARRAY"];var Ae=Fe;var Bt=z.schemas,xe=class{constructor(e){this.client=e;}get schemasApi(){return this.client.apis.schemas}builder(e){let t=this;return new class extends Ae{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){Bt("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:le.NOT_FOUND,details:{schemaId:e}});return s}async listSchemas(){return (await this.schemasApi.v4SchemasGet()).data.data}async createSchema(e){Bt("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:le.INTERNAL_ERROR});return this.getSchema(s)}async updateSchema(e,t){return Bt("Updating schema with ID: %s",e),await this.schemasApi.v4SchemasSchemaIdPut({schemaId:e,updateSchemaBody:t}),this.getSchema(e)}async deleteSchema(e){Bt("Deleting schema with ID: %s",e),await this.schemasApi.v4SchemasSchemaIdDelete({schemaId:e});}};var _i="/v4/entity",lt=class{constructor(e){this.client=e;this.schemasService=new xe(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}${_i}`,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 ji=z.extraction,Mi=new Set(["FINISHED","SUCCESS"]),So={mode:"run",pollingInterval:5e3,maxWaitTime:3e5,navigationMode:"single-page",location:{type:"auto"},bypassPreview:true,autoStart:true},dt=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=ie(So,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});ji("Notifications setup: %O",f.map(w=>({id:w.id,eventType:w.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:So.pollingInterval,timeoutMs:So.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?Mi.has(e.toUpperCase()):false}};var Po=z.extraction,ct=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 R=i(new Ae);if("schemaId"in R)m={schemaId:R.schemaId};else {let f=R.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=typeof i=="object"&&"schemaId"in i&&i.schemaId,p=await this.workflowsCoreService.create({urls:e,name:t,description:s,navigationMode:a,monitoring:this._monitoringOptions,...c?{schemaId:i.schemaId,entity:d.entity,fields:d.fields}:{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:p.id}),this._workflowId=p.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"),Po("Job started: %O",t),this._jobId=t.jobId;let s=await this.workflowsCoreService.waitForJobCompletion(this._workflowId,t.jobId);return Po("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"),Po("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 we={EMAIL:"EMAIL",SLACK:"SLACK",WEBHOOK:"WEBHOOK",WEBSOCKET:"WEBSOCKET"};var Ns=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Ji(o){let e=[];if(!o.recipients?.length)e.push({message:"Recipients are required for email channel"});else for(let t of o.recipients)Ns.test(t)||e.push({message:`Invalid email address: ${t}`});if(o.from!==void 0&&(Ns.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:le.VALIDATION_ERROR,details:{issues:e}});return o}var Lt=class Lt{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 D.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 D.wrap(t,{message:"Failed to delete channel"})}async createChannel(e,t){let s=await this.buildPayload(ie({name:Lt.DEFAULT_CHANNEL_NAME,channelType:e,config:{}},t||{})),a=await this.api.v5NotificationsChannelsPost({v5NotificationsChannelsPostRequest:s});if(a.status===201){let i=a.data.data?.channel;if(!i)throw D.wrap(a,{message:"Failed to create default channels"});return i}throw D.wrap(a,{message:"Failed to create default channels"})}async buildPayload(e){let t;switch(e.channelType){case we.EMAIL:t=await this.buildEmailChannelConfig(e.config);break;case we.SLACK:t=await this.buildSlackChannelConfig(e.config);break;case we.WEBHOOK:t=await this.buildWebhookChannelConfig(e.config);break;case we.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=ie(e,{recipients:t});return Ji(s)}async buildSlackChannelConfig(e){return e}async buildWebhookChannelConfig(e){return e}async buildWebsocketChannelConfig(e){return e}};Lt.DEFAULT_CHANNEL_NAME="default";var ce=Lt;var pt=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 D.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 D.wrap(t,{message:"Failed to list notification settings"});return s}async listAllEvents(){return Object.values(Tt)}async updateSettings(e,t){let s=await this.api.v5NotificationsSettingsSettingsIdPut({settingsId:e,v5NotificationsSettingsSettingsIdPutRequest:t}),a=s.data.data?.settings;if(!a)throw D.wrap(s,{message:"Failed to update notification settings"});return a}async deleteSettings(e){let t=await this.api.v5NotificationsSettingsSettingsIdDelete({settingsId:e});if(t.status!==200)throw D.wrap(t,{message:"Failed to delete notification settings"})}};var he=z.notifications,ut=class{constructor(e,t){this.channelsService=e;this.settingsService=t;}async setupForWorkflow(e){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:le.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(l=>l.id).filter(Boolean);he("Creating notification settings for workflow %s: %O",e.workflowId,{events:a,channels:i});let n=await this.settingsService.listSettings({workflowId:e.workflowId}),r=await Promise.all(a.map(async l=>{let d=n.find(c=>c.eventType===l);if(d?.id){let c=(d.channels||[]).map(m=>m.id).filter(Boolean),p=[...new Set([...c,...i])];return await this.settingsService.updateSettings(d.id,{channelIds:p,enabled:d.enabled??true})}return await this.settingsService.createSettings({workflowId:e.workflowId,channelIds:i,eventType:l,enabled:true,eventConfiguration:{}})}));return he(e.workflowId?"Successfully setup notifications for workflow %s":"Successfully setup notifications for workspace",e.workflowId),r}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:le.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===we.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(m=>m.channelType===i&&(m.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{name:d,...c}=n,p=await this.channelsService.createChannel(i,{name:r,config:c});return he("Created channel with custom config %O",{workflowId:s,channelType:i,channelName:r,channel:p}),p}))}};var _t="https://api.kadoa.com",Gs="wss://realtime.kadoa.com";process.env.KADOA_WSS_NEO_API_URI??"wss://events.kadoa.com/events/ws";var Ts="https://realtime.kadoa.com";var Re="0.20.2",jt="kadoa-node-sdk",Fs="node";var ne=z.wss;typeof WebSocket>"u"&&(window.WebSocket=oa("ws"));var ft=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;}async connect(){if(!this.isConnecting){this.isConnecting=true;try{let e=await fetch(`${_t}/v4/oauth2/token`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":`${this.apiKey}`,"x-sdk-version":Re}}),{access_token:t,team_id:s}=await e.json();await new Promise((a,i)=>{this.socket=new WebSocket(`${Gs}?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})),ne("Connected to WebSocket"),this.notifyConnectionListeners(!0)),this.startHeartbeatCheck(),a();},this.socket.onmessage=n=>{try{let r=JSON.parse(n.data);r.type==="heartbeat"?this.handleHeartbeat():(r?.id&&fetch(`${Ts}/api/v1/events/ack`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:r.id})}),this.notifyEventListeners(r));}catch(r){ne("Failed to parse incoming message: %O",r);}},this.socket.onclose=()=>{ne("WebSocket disconnected. Attempting to reconnect..."),this.isConnecting=!1,this.stopHeartbeatCheck(),this.notifyConnectionListeners(!1,"Connection closed"),setTimeout(()=>this.connect(),this.reconnectDelay);},this.socket.onerror=n=>{ne("WebSocket error: %O",n),this.isConnecting=!1,this.notifyErrorListeners(n),i(n);};});}catch(e){ne("Failed to connect: %O",e),this.isConnecting=false,setTimeout(()=>this.connect(),this.reconnectDelay);}}}handleHeartbeat(){ne("Heartbeat received"),this.lastHeartbeat=Date.now();}notifyEventListeners(e){this.eventListeners.forEach(t=>{try{t(e);}catch(s){ne("Error in event listener: %O",s);}});}notifyConnectionListeners(e,t){this.connectionListeners.forEach(s=>{try{s(e,t);}catch(a){ne("Error in connection listener: %O",a);}});}notifyErrorListeners(e){this.errorListeners.forEach(t=>{try{t(e);}catch(s){ne("Error in error listener: %O",s);}});}startHeartbeatCheck(){this.missedHeartbeatCheckTimer=setInterval(()=>{Date.now()-this.lastHeartbeat>this.missedHeartbeatsLimit&&(ne("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 mt=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 Hi={pollIntervalMs:1e4,timeoutMs:300*1e3},Us={ABORTED:"ABORTED",TIMEOUT:"TIMEOUT"};async function Ue(o,e,t={}){let s={...Hi,...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:Us.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:Us.TIMEOUT,details:{timeoutMs:i,attempts:r,duration:Date.now()-n}})}function Mt(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 Ki="https://registry.npmjs.org",Bs="@kadoa/node-sdk";async function Ls(){try{let o=await fetch(`${Ki}/${Bs}`,{headers:{Accept:"application/json"}});if(!o.ok)return;let t=(await o.json())["dist-tags"]?.latest;if(!t)return;$i(t,Re)&&console.warn(`\u26A0\uFE0F A new version of ${jt} is available: ${t} (current: ${Re}). Update with: npm install ${Bs}@latest`);}catch{}}function $i(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 wt=class{constructor(e){this.client=e;}get validationApi(){return this.client.apis.validation}async listWorkflowValidations(e){let t=await this.validationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(e);if(t.status!==200)throw D.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 D.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 D.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 D.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 D.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 D.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 D.wrap(s.data,{message:"Failed to get validation anomalies by rule"});return s.data}async waitUntilCompleted(e,t){return await new Promise(a=>setTimeout(a,1e3)),(await Ue(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 ht=class{constructor(e){this.client=e;}get validationApi(){return this.client.apis.validation}async listRules(e){let t=await this.validationApi.v4DataValidationRulesGet(e);if(t.status!==200||t.data.error)throw D.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 D.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 D.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 D.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 D.wrap(s.data.data,{message:s.data.message||"Failed to update validation rule"});return s.data.data}async deleteRule(e){let t=await this.validationApi.v4DataValidationRulesRuleIdDelete({ruleId:e.ruleId,...e.workflowId!=null&&{deleteRuleWithReason:{workflowId:e.workflowId,...e.reason!=null&&{reason:e.reason}}}});if(t.status!==200||t.data.error)throw D.wrap(t.data,{message:t.data.message||"Failed to delete validation rule"});return t.data}async disableRule(e){let t=await this.validationApi.v4DataValidationRulesRuleIdDisablePost(e);if(t.status!==200||t.data.error)throw D.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 D.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 D.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 D.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 D.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 D.wrap(t.data.data,{message:t.data.message||"Failed to delete all validation rules"});return t.data.data}};var Rt={Finished:"FINISHED",Failed:"FAILED",NotSupported:"NOT_SUPPORTED",FailedInsufficientFunds:"FAILED_INSUFFICIENT_FUNDS"};var js=new Set([Rt.Finished,Rt.Failed,Rt.NotSupported,Rt.FailedInsufficientFunds]),Ms=new Set(["FINISHED","SUCCESS","FAILED","ERROR","STOPPED","CANCELLED"]),_s=z.workflow,gt=class{constructor(e){this.workflowsApi=e;}async create(e){Mt(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,limit:e.limit},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,...e.entity!=null&&{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,limit:e.limit},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 Mt(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 Ue(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&&Ms.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 Ue(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&&js.has(i.state)),s)).result}};var Jt=class{constructor(e,t,s,a){this.baseUrl=t;this.axios=s;this.cache=new Map;this.configuration=new at({apiKey:e,basePath:t,baseOptions:{headers:a}});}get(e){return this.cache.has(e)||this.cache.set(e,new e(this.configuration,this.baseUrl,this.axios)),this.cache.get(e)}get schemas(){return this.get(ot)}get validation(){return this.get(et)}get crawler(){return this.get(Ze)}get workflows(){return this.get(st)}get notifications(){return this.get(Ee)}};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 Wo,zi=new Uint8Array(16);function bo(){if(!Wo){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Wo=crypto.getRandomValues.bind(crypto);}return Wo(zi)}var Qi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Do={randomUUID:Qi};function Yi(o,e,t){o=o||{};let s=o.random??o.rng?.()??bo();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 Xi(o,e,t){return Do.randomUUID&&!e&&!o?Do.randomUUID():Yi(o,e,t)}var Oo=Xi;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)}}function Ks(){return {"User-Agent":`${jt}/${Re}`,"X-SDK-Version":Re,"X-SDK-Language":Fs}}function $s(o){let e=g.create({timeout:o.timeout,headers:o.headers});return e.interceptors.request.use(t=>(t.headers["x-request-id"]=Oo(),t)),e.interceptors.response.use(t=>t,t=>{if(t instanceof Is){let s=t.response?.status;if(s===401||s===403)throw D.wrap(t,{message:"Unauthorized"})}throw D.wrap(t)}),e}function zs(o){let{client:e}=o,t=new mt(e),s=new rt(e.apis.workflows),a=new ce(e.apis.notifications,t),i=new pt(e.apis.notifications),n=new lt(e),r=new gt(e.apis.workflows),l=new xe(e),d=new ut(a,i),c=new wt(e),p=new ht(e),m=new dt(r,s,n,d,a,i),R=new ct(r,n,s,d),f=Zi({notificationsApi:e.apis.notifications,channelsService:a,settingsService:i,channelSetupService:d}),w=Hs(c,p),h=xo(e);return {extractionBuilderService:R,extraction:m,workflow:r,notification:f,schema:l,user:t,validation:w,crawler:h}}function Zi(o){let{notificationsApi:e,channelsService:t,settingsService:s,channelSetupService:a}=o;return {channels:t,settings:s,setup:a,configure:i=>a.setup(i),setupForWorkflow:i=>a.setupForWorkflow(i),setupForWorkspace:i=>a.setupForWorkspace(i),testNotification:async i=>{let n=await e.v5NotificationsTestPost({v5NotificationsTestPostRequest:{eventType:i.eventType,...i.workflowId!=null&&{workflowId:i.workflowId}}}),r=n.data.data;if(!r?.eventId||!r?.eventType)throw D.wrap(n,{message:"Failed to test notification"});return {eventId:r.eventId,eventType:r.eventType,...r.workflowId!=null&&{workflowId:r.workflowId}}}}}var Ht=class{constructor(e){this._baseUrl=e.baseUrl??_t,this._apiKey=e.apiKey;let t=e.timeout??3e4,s=Ks();this._axiosInstance=$s({timeout:t,headers:s}),this.apis=new Jt(this._apiKey,this._baseUrl,this._axiosInstance,s);let a=zs({client:this});this.user=a.user,this.extraction=a.extraction,this.workflow=a.workflow,this.schema=a.schema,this.notification=a.notification,this.validation=a.validation,this.crawler=a.crawler,this._extractionBuilderService=a.extractionBuilderService,Ls().catch(()=>{});}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}get apiKey(){return this._apiKey}get realtime(){return this._realtime}extract(e){return this._extractionBuilderService.extract(e)}async connectRealtime(e){return this._realtime||(this._realtime=new ft({apiKey:this._apiKey,...e}),await 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();}close(){this.dispose();}};
9
- exports.CrawlerConfigService=it;exports.CrawlerSessionService=nt;exports.DataFetcherService=rt;exports.ERROR_MESSAGES=_;exports.EntityResolverService=lt;exports.ExtractionBuilderService=ct;exports.ExtractionService=dt;exports.FetchDataOptions=Io;exports.KadoaClient=Ht;exports.KadoaHttpException=D;exports.KadoaSdkException=P;exports.NotificationChannelType=we;exports.NotificationChannelsService=ce;exports.NotificationSettingsEventTypeEnum=Tt;exports.NotificationSettingsService=pt;exports.NotificationSetupService=ut;exports.PageStatus=vi;exports.Realtime=ft;exports.SchemaBuilder=Ae;exports.SchemaFieldDataType=Pi;exports.SchemasService=xe;exports.TERMINAL_JOB_STATES=js;exports.TERMINAL_RUN_STATES=Ms;exports.UserService=mt;exports.ValidationCoreService=wt;exports.ValidationRulesService=ht;exports.WorkflowsCoreService=gt;exports.createCrawlerDomain=xo;exports.pollUntil=Ue;exports.validateAdditionalData=Mt;return exports;})({},L);//# sourceMappingURL=index.global.js.map
1
+ var KadoaSDK=(function(exports,_){'use strict';function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ___default=/*#__PURE__*/_interopDefault(_);var Qs=Object.create;var $t=Object.defineProperty;var Ys=Object.getOwnPropertyDescriptor;var Xs=Object.getOwnPropertyNames;var Zs=Object.getPrototypeOf,ea=Object.prototype.hasOwnProperty;var ta=(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 zt=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),oa=(o,e)=>{for(var t in e)$t(o,t,{get:e[t],enumerable:true});},sa=(o,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Xs(e))!ea.call(o,a)&&a!==t&&$t(o,a,{get:()=>e[a],enumerable:!(s=Ys(e,a))||s.enumerable});return o};var aa=(o,e,t)=>(t=o!=null?Qs(Zs(o)):{},sa(!o||!o.__esModule?$t(t,"default",{value:o,enumerable:true}):t,o));var Vs=zt((sp,ks)=>{var Ge=1e3,Te=Ge*60,Fe=Te*60,Ae=Fe*24,Wi=Ae*7,bi=Ae*365.25;ks.exports=function(o,e){e=e||{};var t=typeof o;if(t==="string"&&o.length>0)return Di(o);if(t==="number"&&isFinite(o))return e.long?Oi(o):Ei(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function Di(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*bi;case "weeks":case "week":case "w":return t*Wi;case "days":case "day":case "d":return t*Ae;case "hours":case "hour":case "hrs":case "hr":case "h":return t*Fe;case "minutes":case "minute":case "mins":case "min":case "m":return t*Te;case "seconds":case "second":case "secs":case "sec":case "s":return t*Ge;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return t;default:return}}}}function Ei(o){var e=Math.abs(o);return e>=Ae?Math.round(o/Ae)+"d":e>=Fe?Math.round(o/Fe)+"h":e>=Te?Math.round(o/Te)+"m":e>=Ge?Math.round(o/Ge)+"s":o+"ms"}function Oi(o){var e=Math.abs(o);return e>=Ae?Ft(o,e,Ae,"day"):e>=Fe?Ft(o,e,Fe,"hour"):e>=Te?Ft(o,e,Te,"minute"):e>=Ge?Ft(o,e,Ge,"second"):o+" ms"}function Ft(o,e,t,s){var a=e>=t*1.5;return Math.round(o/t)+" "+s+(a?"s":"")}});var Ss=zt((ap,vs)=>{function qi(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,R,u;function w(...h){if(!w.enabled)return;let b=w,G=Number(new Date),q=G-(p||G);b.diff=q,b.prev=p,b.curr=G,p=G,h[0]=t.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");let D=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,(X,H)=>{if(X==="%%")return "%";D++;let ke=t.formatters[H];if(typeof ke=="function"){let Ve=h[D];X=ke.call(b,Ve),h.splice(D,1),D--;}return X}),t.formatArgs.call(b,h),(b.log||t.log).apply(b,h);}return w.namespace=c,w.useColors=t.useColors(),w.color=t.selectColor(c),w.extend=s,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:true,configurable:false,get:()=>m!==null?m:(R!==t.namespaces&&(R=t.namespaces,u=t.enabled(c)),u),set:h=>{m=h;}}),typeof t.init=="function"&&t.init(w),w}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,R=0,u=-1,w=0;for(;m<c.length;)if(R<p.length&&(p[R]===c[m]||p[R]==="*"))p[R]==="*"?(u=R,w=m,R++):(m++,R++);else if(u!==-1)R=u+1,w++,m=w;else return false;for(;R<p.length&&p[R]==="*";)R++;return R===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=qi;});var Ps=zt((Q,Bt)=>{Q.formatArgs=Gi;Q.save=Ti;Q.load=Fi;Q.useColors=Ni;Q.storage=Bi();Q.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`."));}})();Q.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 Ni(){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 Gi(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+Bt.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);}Q.log=console.debug||console.log||(()=>{});function Ti(o){try{o?Q.storage.setItem("debug",o):Q.storage.removeItem("debug");}catch{}}function Fi(){let o;try{o=Q.storage.getItem("debug")||Q.storage.getItem("DEBUG");}catch{}return !o&&typeof process<"u"&&"env"in process&&(o=process.env.DEBUG),o}function Bi(){try{return localStorage}catch{}}Bt.exports=Ss()(Q);var{formatters:Ui}=Bt.exports;Ui.j=function(o){try{return JSON.stringify(o)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};});function _e(o,e){return function(){return o.apply(e,arguments)}}var{toString:ia}=Object.prototype,{getPrototypeOf:Yt}=Object,{iterator:It,toStringTag:Lo}=Symbol,kt=(o=>e=>{let t=ia.call(e);return o[t]||(o[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),se=o=>(o=o.toLowerCase(),e=>kt(e)===o),Vt=o=>e=>typeof e===o,{isArray:Pe}=Array,Se=Vt("undefined");function je(o){return o!==null&&!Se(o)&&o.constructor!==null&&!Se(o.constructor)&&$(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}var _o=se("ArrayBuffer");function na(o){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(o):e=o&&o.buffer&&_o(o.buffer),e}var ra=Vt("string"),$=Vt("function"),jo=Vt("number"),Me=o=>o!==null&&typeof o=="object",la=o=>o===true||o===false,xt=o=>{if(kt(o)!=="object")return false;let e=Yt(o);return (e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Lo in o)&&!(It in o)},da=o=>{if(!Me(o)||je(o))return false;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return false}},ca=se("Date"),pa=se("File"),fa=se("Blob"),ua=se("FileList"),ma=o=>Me(o)&&$(o.pipe),wa=o=>{let e;return o&&(typeof FormData=="function"&&o instanceof FormData||$(o.append)&&((e=kt(o))==="formdata"||e==="object"&&$(o.toString)&&o.toString()==="[object FormData]"))},ha=se("URLSearchParams"),[Ra,ga,ya,Ca]=["ReadableStream","Request","Response","Headers"].map(se),Aa=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Je(o,e,{allOwnKeys:t=false}={}){if(o===null||typeof o>"u")return;let s,a;if(typeof o!="object"&&(o=[o]),Pe(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 Mo(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,Jo=o=>!Se(o)&&o!==Ce;function Qt(){let{caseless:o,skipUndefined:e}=Jo(this)&&this||{},t={},s=(a,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let n=o&&Mo(t,i)||i;xt(t[n])&&xt(a)?t[n]=Qt(t[n],a):xt(a)?t[n]=Qt({},a):Pe(a)?t[n]=a.slice():(!e||!Se(a))&&(t[n]=a);};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Je(arguments[a],s);return t}var xa=(o,e,t,{allOwnKeys:s}={})=>(Je(e,(a,i)=>{t&&$(a)?Object.defineProperty(o,i,{value:_e(a,t),writable:true,enumerable:true,configurable:true}):Object.defineProperty(o,i,{value:a,writable:true,enumerable:true,configurable:true});},{allOwnKeys:s}),o),Ia=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),ka=(o,e,t,s)=>{o.prototype=Object.create(e.prototype,s),Object.defineProperty(o.prototype,"constructor",{value:o,writable:true,enumerable:false,configurable:true}),Object.defineProperty(o,"super",{value:e.prototype}),t&&Object.assign(o.prototype,t);},Va=(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&&Yt(o);}while(o&&(!t||t(o,e))&&o!==Object.prototype);return e},va=(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},Sa=o=>{if(!o)return null;if(Pe(o))return o;let e=o.length;if(!jo(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=o[e];return t},Pa=(o=>e=>o&&e instanceof o)(typeof Uint8Array<"u"&&Yt(Uint8Array)),Wa=(o,e)=>{let s=(o&&o[It]).call(o),a;for(;(a=s.next())&&!a.done;){let i=a.value;e.call(o,i[0],i[1]);}},ba=(o,e)=>{let t,s=[];for(;(t=o.exec(e))!==null;)s.push(t);return s},Da=se("HTMLFormElement"),Ea=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,s,a){return s.toUpperCase()+a}),Uo=(({hasOwnProperty:o})=>(e,t)=>o.call(e,t))(Object.prototype),Oa=se("RegExp"),Ho=(o,e)=>{let t=Object.getOwnPropertyDescriptors(o),s={};Je(t,(a,i)=>{let n;(n=e(a,i,o))!==false&&(s[i]=n||a);}),Object.defineProperties(o,s);},qa=o=>{Ho(o,(e,t)=>{if($(o)&&["arguments","caller","callee"].indexOf(t)!==-1)return false;let s=o[t];if($(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+"'")});}});},Na=(o,e)=>{let t={},s=a=>{a.forEach(i=>{t[i]=true;});};return Pe(o)?s(o):s(String(o).split(e)),t},Ga=()=>{},Ta=(o,e)=>o!=null&&Number.isFinite(o=+o)?o:e;function Fa(o){return !!(o&&$(o.append)&&o[Lo]==="FormData"&&o[It])}var Ba=o=>{let e=new Array(10),t=(s,a)=>{if(Me(s)){if(e.indexOf(s)>=0)return;if(je(s))return s;if(!("toJSON"in s)){e[a]=s;let i=Pe(s)?[]:{};return Je(s,(n,r)=>{let l=t(n,a+1);!Se(l)&&(i[r]=l);}),e[a]=void 0,i}}return s};return t(o,0)},Ua=se("AsyncFunction"),La=o=>o&&(Me(o)||$(o))&&$(o.then)&&$(o.catch),Ko=((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",$(Ce.postMessage)),_a=typeof queueMicrotask<"u"?queueMicrotask.bind(Ce):typeof process<"u"&&process.nextTick||Ko,ja=o=>o!=null&&$(o[It]),f={isArray:Pe,isArrayBuffer:_o,isBuffer:je,isFormData:wa,isArrayBufferView:na,isString:ra,isNumber:jo,isBoolean:la,isObject:Me,isPlainObject:xt,isEmptyObject:da,isReadableStream:Ra,isRequest:ga,isResponse:ya,isHeaders:Ca,isUndefined:Se,isDate:ca,isFile:pa,isBlob:fa,isRegExp:Oa,isFunction:$,isStream:ma,isURLSearchParams:ha,isTypedArray:Pa,isFileList:ua,forEach:Je,merge:Qt,extend:xa,trim:Aa,stripBOM:Ia,inherits:ka,toFlatObject:Va,kindOf:kt,kindOfTest:se,endsWith:va,toArray:Sa,forEachEntry:Wa,matchAll:ba,isHTMLForm:Da,hasOwnProperty:Uo,hasOwnProp:Uo,reduceDescriptors:Ho,freezeMethods:qa,toObjectSet:Na,toCamelCase:Ea,noop:Ga,toFiniteNumber:Ta,findKey:Mo,global:Ce,isContextDefined:Jo,isSpecCompliantForm:Fa,toJSONObject:Ba,isAsyncFn:Ua,isThenable:La,setImmediate:Ko,asap:_a,isIterable:ja};var J=class o extends Error{static from(e,t,s,a,i,n){let r=new o(e.message,t||e.code,s,a,i);return r.cause=e,r.name=e.name,n&&Object.assign(r,n),r}constructor(e,t,s,a,i){super(e),this.name="AxiosError",this.isAxiosError=true,t&&(this.code=t),s&&(this.config=s),a&&(this.request=a),i&&(this.response=i,this.status=i.status);}toJSON(){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:f.toJSONObject(this.config),code:this.code,status:this.status}}};J.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";J.ERR_BAD_OPTION="ERR_BAD_OPTION";J.ECONNABORTED="ECONNABORTED";J.ETIMEDOUT="ETIMEDOUT";J.ERR_NETWORK="ERR_NETWORK";J.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";J.ERR_DEPRECATED="ERR_DEPRECATED";J.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";J.ERR_BAD_REQUEST="ERR_BAD_REQUEST";J.ERR_CANCELED="ERR_CANCELED";J.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";J.ERR_INVALID_URL="ERR_INVALID_URL";var W=J;var vt=null;function Xt(o){return f.isPlainObject(o)||f.isArray(o)}function zo(o){return f.endsWith(o,"[]")?o.slice(0,-2):o}function $o(o,e,t){return o?o.concat(e).map(function(a,i){return a=zo(a),!t&&i?"["+a+"]":a}).join(t?".":""):e}function Ma(o){return f.isArray(o)&&!o.some(Xt)}var Ja=f.toFlatObject(f,{},null,function(e){return /^is[A-Z]/.test(e)});function Ha(o,e,t){if(!f.isObject(o))throw new TypeError("target must be an object");e=e||new(FormData),t=f.toFlatObject(t,{metaTokens:true,dots:false,indexes:false},false,function(w,h){return !f.isUndefined(h[w])});let s=t.metaTokens,a=t.visitor||c,i=t.dots,n=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(a))throw new TypeError("visitor must be a function");function d(u){if(u===null)return "";if(f.isDate(u))return u.toISOString();if(f.isBoolean(u))return u.toString();if(!l&&f.isBlob(u))throw new W("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(u)||f.isTypedArray(u)?l&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function c(u,w,h){let b=u;if(u&&!h&&typeof u=="object"){if(f.endsWith(w,"{}"))w=s?w:w.slice(0,-2),u=JSON.stringify(u);else if(f.isArray(u)&&Ma(u)||(f.isFileList(u)||f.endsWith(w,"[]"))&&(b=f.toArray(u)))return w=zo(w),b.forEach(function(q,D){!(f.isUndefined(q)||q===null)&&e.append(n===true?$o([w],D,i):n===null?w:w+"[]",d(q));}),false}return Xt(u)?true:(e.append($o(h,w,i),d(u)),false)}let p=[],m=Object.assign(Ja,{defaultVisitor:c,convertValue:d,isVisitable:Xt});function R(u,w){if(!f.isUndefined(u)){if(p.indexOf(u)!==-1)throw Error("Circular reference detected in "+w.join("."));p.push(u),f.forEach(u,function(b,G){(!(f.isUndefined(b)||b===null)&&a.call(e,b,f.isString(G)?G.trim():G,w,m))===true&&R(b,w?w.concat(G):[G]);}),p.pop();}}if(!f.isObject(o))throw new TypeError("data must be an object");return R(o),e}var we=Ha;function Qo(o){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Yo(o,e){this._pairs=[],o&&we(o,this,e);}var Xo=Yo.prototype;Xo.append=function(e,t){this._pairs.push([e,t]);};Xo.toString=function(e){let t=e?function(s){return e.call(this,s,Qo)}:Qo;return this._pairs.map(function(a){return t(a[0])+"="+t(a[1])},"").join("&")};var St=Yo;function Ka(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function He(o,e,t){if(!e)return o;let s=t&&t.encode||Ka,a=f.isFunction(t)?{serialize:t}:t,i=a&&a.serialize,n;if(i?n=i(e,a):n=f.isURLSearchParams(e)?e.toString():new St(e,a).toString(s),n){let r=o.indexOf("#");r!==-1&&(o=o.slice(0,r)),o+=(o.indexOf("?")===-1?"?":"&")+n;}return o}var Zt=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){f.forEach(this.handlers,function(s){s!==null&&e(s);});}},eo=Zt;var We={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false,legacyInterceptorReqResOrdering:true};var Zo=typeof URLSearchParams<"u"?URLSearchParams:St;var es=typeof FormData<"u"?FormData:null;var ts=typeof Blob<"u"?Blob:null;var os={isBrowser:true,classes:{URLSearchParams:Zo,FormData:es,Blob:ts},protocols:["http","https","file","blob","url","data"]};var so={};oa(so,{hasBrowserEnv:()=>oo,hasStandardBrowserEnv:()=>$a,hasStandardBrowserWebWorkerEnv:()=>za,navigator:()=>to,origin:()=>Qa});var oo=typeof window<"u"&&typeof document<"u",to=typeof navigator=="object"&&navigator||void 0,$a=oo&&(!to||["ReactNative","NativeScript","NS"].indexOf(to.product)<0),za=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Qa=oo&&window.location.href||"http://localhost";var T={...so,...os};function ao(o,e){return we(o,new T.classes.URLSearchParams,{visitor:function(t,s,a,i){return T.isNode&&f.isBuffer(t)?(this.append(s,t.toString("base64")),false):i.defaultVisitor.apply(this,arguments)},...e})}function Ya(o){return f.matchAll(/\w+|\[(\w*)]/g,o).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Xa(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 Za(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&&f.isArray(a)?a.length:n,l?(f.hasOwnProp(a,n)?a[n]=[a[n],s]:a[n]=s,!r):((!a[n]||!f.isObject(a[n]))&&(a[n]=[]),e(t,s,a[n],i)&&f.isArray(a[n])&&(a[n]=Xa(a[n])),!r)}if(f.isFormData(o)&&f.isFunction(o.entries)){let t={};return f.forEachEntry(o,(s,a)=>{e(Ya(s),a,t,0);}),t}return null}var Pt=Za;function ei(o,e,t){if(f.isString(o))try{return (e||JSON.parse)(o),f.trim(o)}catch(s){if(s.name!=="SyntaxError")throw s}return (t||JSON.stringify)(o)}var io={transitional:We,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let s=t.getContentType()||"",a=s.indexOf("application/json")>-1,i=f.isObject(e);if(i&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return a?JSON.stringify(Pt(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.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 ao(e,this.formSerializer).toString();if((r=f.isFileList(e))||s.indexOf("multipart/form-data")>-1){let l=this.env&&this.env.FormData;return we(r?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||a?(t.setContentType("application/json",false),ei(e)):e}],transformResponse:[function(e){let t=this.transitional||io.transitional,s=t&&t.forcedJSONParsing,a=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.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:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],o=>{io.headers[o]={};});var be=io;var ti=f.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"]),ss=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]&&ti[t])&&(t==="set-cookie"?e[t]?e[t].push(s):e[t]=[s]:e[t]=e[t]?e[t]+", "+s:s);}),e};var as=Symbol("internals");function Ke(o){return o&&String(o).trim().toLowerCase()}function Wt(o){return o===false||o==null?o:f.isArray(o)?o.map(Wt):String(o)}function oi(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 si=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function no(o,e,t,s,a){if(f.isFunction(s))return s.call(this,e,t);if(a&&(e=t),!!f.isString(e)){if(f.isString(s))return e.indexOf(s)!==-1;if(f.isRegExp(s))return s.test(e)}}function ai(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,s)=>t.toUpperCase()+s)}function ii(o,e){let t=f.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 De=class{constructor(e){e&&this.set(e);}set(e,t,s){let a=this;function i(r,l,d){let c=Ke(l);if(!c)throw new Error("header name must be a non-empty string");let p=f.findKey(a,c);(!p||a[p]===void 0||d===true||d===void 0&&a[p]!==false)&&(a[p||l]=Wt(r));}let n=(r,l)=>f.forEach(r,(d,c)=>i(d,c,l));if(f.isPlainObject(e)||e instanceof this.constructor)n(e,t);else if(f.isString(e)&&(e=e.trim())&&!si(e))n(ss(e),t);else if(f.isObject(e)&&f.isIterable(e)){let r={},l,d;for(let c of e){if(!f.isArray(c))throw TypeError("Object iterator must return a key-value pair");r[d=c[0]]=(l=r[d])?f.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=Ke(e),e){let s=f.findKey(this,e);if(s){let a=this[s];if(!t)return a;if(t===true)return oi(a);if(f.isFunction(t))return t.call(this,a,s);if(f.isRegExp(t))return t.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ke(e),e){let s=f.findKey(this,e);return !!(s&&this[s]!==void 0&&(!t||no(this,this[s],s,t)))}return false}delete(e,t){let s=this,a=false;function i(n){if(n=Ke(n),n){let r=f.findKey(s,n);r&&(!t||no(s,s[r],r,t))&&(delete s[r],a=true);}}return f.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||no(this,this[i],i,e,true))&&(delete this[i],a=true);}return a}normalize(e){let t=this,s={};return f.forEach(this,(a,i)=>{let n=f.findKey(s,i);if(n){t[n]=Wt(a),delete t[i];return}let r=e?ai(i):String(i).trim();r!==i&&delete t[i],t[r]=Wt(a),s[r]=true;}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return f.forEach(this,(s,a)=>{s!=null&&s!==false&&(t[a]=e&&f.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[as]=this[as]={accessors:{}}).accessors,a=this.prototype;function i(n){let r=Ke(n);s[r]||(ii(a,n),s[r]=true);}return f.isArray(e)?e.forEach(i):i(e),this}};De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(De.prototype,({value:o},e)=>{let t=e[0].toUpperCase()+e.slice(1);return {get:()=>o,set(s){this[t]=s;}}});f.freezeMethods(De);var L=De;function $e(o,e){let t=this||be,s=e||t,a=L.from(s.headers),i=s.data;return f.forEach(o,function(r){i=r.call(t,i,a.normalize(),e?e.status:void 0);}),a.normalize(),i}function ze(o){return !!(o&&o.__CANCEL__)}var ro=class extends W{constructor(e,t,s){super(e??"canceled",W.ERR_CANCELED,t,s),this.name="CanceledError",this.__CANCEL__=true;}},ie=ro;function Qe(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 lo(o){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return e&&e[1]||""}function ni(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 R=c&&d-c;return R?Math.round(m*1e3/R):void 0}}var is=ni;function ri(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=ri;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)},co=(o,e)=>{let t=o!=null;return [s=>e[0]({lengthComputable:t,total:o,loaded:s}),e[1]]},po=o=>(...e)=>f.asap(()=>o(...e));var rs=T.hasStandardBrowserEnv?((o,e)=>t=>(t=new URL(t,T.origin),o.protocol===t.protocol&&o.host===t.host&&(e||o.port===t.port)))(new URL(T.origin),T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent)):()=>true;var ls=T.hasStandardBrowserEnv?{write(o,e,t,s,a,i,n){if(typeof document>"u")return;let r=[`${o}=${encodeURIComponent(e)}`];f.isNumber(t)&&r.push(`expires=${new Date(t).toUTCString()}`),f.isString(s)&&r.push(`path=${s}`),f.isString(a)&&r.push(`domain=${a}`),i===true&&r.push("secure"),f.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 fo(o){return typeof o!="string"?false:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function uo(o,e){return e?o.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):o}function Ye(o,e,t){let s=!fo(e);return o&&(s||t==false)?uo(o,e):e}var ds=o=>o instanceof L?{...o}:o;function ae(o,e){e=e||{};let t={};function s(d,c,p,m){return f.isPlainObject(d)&&f.isPlainObject(c)?f.merge.call({caseless:m},d,c):f.isPlainObject(c)?f.merge({},c):f.isArray(c)?c.slice():c}function a(d,c,p,m){if(f.isUndefined(c)){if(!f.isUndefined(d))return s(void 0,d,p,m)}else return s(d,c,p,m)}function i(d,c){if(!f.isUndefined(c))return s(void 0,c)}function n(d,c){if(f.isUndefined(c)){if(!f.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 f.forEach(Object.keys({...o,...e}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;let p=f.hasOwnProp(l,c)?l[c]:a,m=p(o[c],e[c],c);f.isUndefined(m)&&p!==r||(t[c]=m);}),t}var bt=o=>{let e=ae({},o),{data:t,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:i,headers:n,auth:r}=e;if(e.headers=n=L.from(n),e.url=He(Ye(e.baseURL,e.url,e.allowAbsoluteUrls),o.params,o.paramsSerializer),r&&n.set("Authorization","Basic "+btoa((r.username||"")+":"+(r.password?unescape(encodeURIComponent(r.password)):""))),f.isFormData(t)){if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if(f.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(T.hasStandardBrowserEnv&&(s&&f.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 li=typeof XMLHttpRequest<"u",cs=li&&function(o){return new Promise(function(t,s){let a=bt(o),i=a.data,n=L.from(a.headers).normalize(),{responseType:r,onUploadProgress:l,onDownloadProgress:d}=a,c,p,m,R,u;function w(){R&&R(),u&&u(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c);}let h=new XMLHttpRequest;h.open(a.method.toUpperCase(),a.url,true),h.timeout=a.timeout;function b(){if(!h)return;let q=L.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),N={data:!r||r==="text"||r==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:q,config:o,request:h};Qe(function(H){t(H),w();},function(H){s(H),w();},N),h=null;}"onloadend"in h?h.onloadend=b:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(b);},h.onabort=function(){h&&(s(new W("Request aborted",W.ECONNABORTED,o,h)),h=null);},h.onerror=function(D){let N=D&&D.message?D.message:"Network Error",X=new W(N,W.ERR_NETWORK,o,h);X.event=D||null,s(X),h=null;},h.ontimeout=function(){let D=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",N=a.transitional||We;a.timeoutErrorMessage&&(D=a.timeoutErrorMessage),s(new W(D,N.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,o,h)),h=null;},i===void 0&&n.setContentType(null),"setRequestHeader"in h&&f.forEach(n.toJSON(),function(D,N){h.setRequestHeader(N,D);}),f.isUndefined(a.withCredentials)||(h.withCredentials=!!a.withCredentials),r&&r!=="json"&&(h.responseType=a.responseType),d&&([m,u]=Ee(d,true),h.addEventListener("progress",m)),l&&h.upload&&([p,R]=Ee(l),h.upload.addEventListener("progress",p),h.upload.addEventListener("loadend",R)),(a.cancelToken||a.signal)&&(c=q=>{h&&(s(!q||q.type?new ie(null,o,h):q),h.abort(),h=null);},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));let G=lo(a.url);if(G&&T.protocols.indexOf(G)===-1){s(new W("Unsupported protocol "+G+":",W.ERR_BAD_REQUEST,o));return}h.send(i||null);})};var di=(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 ie(c instanceof Error?c.message:c));}},n=e&&setTimeout(()=>{n=null,i(new W(`timeout of ${e}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=()=>f.asap(r),l}},ps=di;var ci=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;},pi=async function*(o,e){for await(let t of fi(o))yield*ci(t,e);},fi=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();}},mo=(o,e,t,s)=>{let a=pi(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 fs=64*1024,{isFunction:Dt}=f,ui=(({Request:o,Response:e})=>({Request:o,Response:e}))(f.global),{ReadableStream:us,TextEncoder:ms}=f.global,ws=(o,...e)=>{try{return !!o(...e)}catch{return false}},mi=o=>{o=f.merge.call({skipUndefined:true},ui,o);let{fetch:e,Request:t,Response:s}=o,a=e?Dt(e):typeof fetch=="function",i=Dt(t),n=Dt(s);if(!a)return false;let r=a&&Dt(us),l=a&&(typeof ms=="function"?(u=>w=>u.encode(w))(new ms):async u=>new Uint8Array(await new t(u).arrayBuffer())),d=i&&r&&ws(()=>{let u=!1,w=new t(T.origin,{body:new us,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!w}),c=n&&r&&ws(()=>f.isReadableStream(new s("").body)),p={stream:c&&(u=>u.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!p[u]&&(p[u]=(w,h)=>{let b=w&&w[u];if(b)return b.call(w);throw new W(`Response type '${u}' is not supported`,W.ERR_NOT_SUPPORT,h)});});let m=async u=>{if(u==null)return 0;if(f.isBlob(u))return u.size;if(f.isSpecCompliantForm(u))return (await new t(T.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(f.isArrayBufferView(u)||f.isArrayBuffer(u))return u.byteLength;if(f.isURLSearchParams(u)&&(u=u+""),f.isString(u))return (await l(u)).byteLength},R=async(u,w)=>{let h=f.toFiniteNumber(u.getContentLength());return h??m(w)};return async u=>{let{url:w,method:h,data:b,signal:G,cancelToken:q,timeout:D,onDownloadProgress:N,onUploadProgress:X,responseType:H,headers:ke,withCredentials:Ve="same-origin",fetchOptions:qo}=bt(u),No=e||fetch;H=H?(H+"").toLowerCase():"text";let Ct=ps([G,q&&q.toAbortSignal()],D),Le=null,ye=Ct&&Ct.unsubscribe&&(()=>{Ct.unsubscribe();}),Go;try{if(X&&d&&h!=="get"&&h!=="head"&&(Go=await R(ke,b))!==0){let me=new t(w,{method:"POST",body:b,duplex:"half"}),ve;if(f.isFormData(b)&&(ve=me.headers.get("content-type"))&&ke.setContentType(ve),me.body){let[Kt,At]=co(Go,Ee(po(X)));b=mo(me.body,fs,Kt,At);}}f.isString(Ve)||(Ve=Ve?"include":"omit");let K=i&&"credentials"in t.prototype,To={...qo,signal:Ct,method:h.toUpperCase(),headers:ke.normalize().toJSON(),body:b,duplex:"half",credentials:K?Ve:void 0};Le=i&&new t(w,To);let ue=await(i?No(Le,qo):No(w,To)),Fo=c&&(H==="stream"||H==="response");if(c&&(N||Fo&&ye)){let me={};["status","statusText","headers"].forEach(Bo=>{me[Bo]=ue[Bo];});let ve=f.toFiniteNumber(ue.headers.get("content-length")),[Kt,At]=N&&co(ve,Ee(po(N),!0))||[];ue=new s(mo(ue.body,fs,Kt,()=>{At&&At(),ye&&ye();}),me);}H=H||"text";let zs=await p[f.findKey(p,H)||"text"](ue,u);return !Fo&&ye&&ye(),await new Promise((me,ve)=>{Qe(me,ve,{data:zs,headers:L.from(ue.headers),status:ue.status,statusText:ue.statusText,config:u,request:Le});})}catch(K){throw ye&&ye(),K&&K.name==="TypeError"&&/Load failed|fetch/i.test(K.message)?Object.assign(new W("Network Error",W.ERR_NETWORK,u,Le,K&&K.response),{cause:K.cause||K}):W.from(K,K&&K.code,u,Le,K&&K.response)}}},wi=new Map,wo=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=wi;for(;r--;)l=i[r],d=c.get(l),d===void 0&&c.set(l,d=r?new Map:mi(e)),c=d;return d};wo();var ho={http:vt,xhr:cs,fetch:{get:wo}};f.forEach(ho,(o,e)=>{if(o){try{Object.defineProperty(o,"name",{value:e});}catch{}Object.defineProperty(o,"adapterName",{value:e});}});var hs=o=>`- ${o}`,Ri=o=>f.isFunction(o)||o===null||o===false;function gi(o,e){o=f.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,!Ri(s)&&(a=ho[(r=String(s)).toLowerCase()],a===void 0))throw new W(`Unknown adapter '${r}'`);if(a&&(f.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
+ `+n.map(hs).join(`
5
+ `):" "+hs(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 Et={getAdapter:gi,adapters:ho};function Ro(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new ie(null,o)}function Ot(o){return Ro(o),o.headers=L.from(o.headers),o.data=$e.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",false),Et.getAdapter(o.adapter||be.adapter,o)(o).then(function(s){return Ro(o),s.data=$e.call(o,o.transformResponse,s),s.headers=L.from(s.headers),s},function(s){return ze(s)||(Ro(o),s&&s.response&&(s.response.data=$e.call(o,o.transformResponse,s.response),s.response.headers=L.from(s.response.headers))),Promise.reject(s)})}var qt="1.13.5";var Nt={};["object","boolean","number","function","string","symbol"].forEach((o,e)=>{Nt[o]=function(s){return typeof s===o||"a"+(e<1?"n ":" ")+o};});var Rs={};Nt.transitional=function(e,t,s){function a(i,n){return "[Axios v"+qt+"] 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&&!Rs[n]&&(Rs[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}};Nt.spelling=function(e){return (t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),true)};function yi(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 Xe={assertOptions:yi,validators:Nt};var te=Xe.validators,Oe=class{constructor(e){this.defaults=e||{},this.interceptors={request:new eo,response:new eo};}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=ae(this.defaults,t);let{transitional:s,paramsSerializer:a,headers:i}=t;s!==void 0&&Xe.assertOptions(s,{silentJSONParsing:te.transitional(te.boolean),forcedJSONParsing:te.transitional(te.boolean),clarifyTimeoutError:te.transitional(te.boolean),legacyInterceptorReqResOrdering:te.transitional(te.boolean)},false),a!=null&&(f.isFunction(a)?t.paramsSerializer={serialize:a}:Xe.assertOptions(a,{encode:te.function,serialize:te.function},true)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=true),Xe.assertOptions(t,{baseUrl:te.spelling("baseURL"),withXsrfToken:te.spelling("withXSRFToken")},true),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=i&&f.merge(i.common,i[t.method]);i&&f.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u];}),t.headers=L.concat(n,i);let r=[],l=true;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(t)===false)return;l=l&&w.synchronous;let h=t.transitional||We;h&&h.legacyInterceptorReqResOrdering?r.unshift(w.fulfilled,w.rejected):r.push(w.fulfilled,w.rejected);});let d=[];this.interceptors.response.forEach(function(w){d.push(w.fulfilled,w.rejected);});let c,p=0,m;if(!l){let u=[Ot.bind(this),void 0];for(u.unshift(...r),u.push(...d),m=u.length,c=Promise.resolve(t);p<m;)c=c.then(u[p++],u[p++]);return c}m=r.length;let R=t;for(;p<m;){let u=r[p++],w=r[p++];try{R=u(R);}catch(h){w.call(this,h);break}}try{c=Ot.call(this,R);}catch(u){return Promise.reject(u)}for(p=0,m=d.length;p<m;)c=c.then(d[p++],d[p++]);return c}getUri(e){e=ae(this.defaults,e);let t=Ye(e.baseURL,e.url,e.allowAbsoluteUrls);return He(t,e.params,e.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(e){Oe.prototype[e]=function(t,s){return this.request(ae(s||{},{method:e,url:t,data:(s||{}).data}))};});f.forEach(["post","put","patch"],function(e){function t(s){return function(i,n,r){return this.request(ae(r||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}Oe.prototype[e]=t(),Oe.prototype[e+"Form"]=t(true);});var Ze=Oe;var go=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 ie(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=go;function yo(o){return function(t){return o.apply(null,t)}}function Co(o){return f.isObject(o)&&o.isAxiosError===true}var Ao={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(Ao).forEach(([o,e])=>{Ao[e]=o;});var ys=Ao;function Cs(o){let e=new Ze(o),t=_e(Ze.prototype.request,e);return f.extend(t,Ze.prototype,e,{allOwnKeys:true}),f.extend(t,e,null,{allOwnKeys:true}),t.create=function(a){return Cs(ae(o,a))},t}var B=Cs(be);B.Axios=Ze;B.CanceledError=ie;B.CancelToken=gs;B.isCancel=ze;B.VERSION=qt;B.toFormData=we;B.AxiosError=W;B.Cancel=B.CanceledError;B.all=function(e){return Promise.all(e)};B.spread=yo;B.isAxiosError=Co;B.mergeConfig=ae;B.AxiosHeaders=L;B.formToJSON=o=>Pt(f.isHTMLForm(o)?new FormData(o):o);B.getAdapter=Et.getAdapter;B.HttpStatusCode=ys;B.default=B;var g=B;var{Axios:od,AxiosError:As,CanceledError:sd,isCancel:ad,CancelToken:id,VERSION:nd,all:rd,Cancel:ld,isAxiosError:xs,spread:dd,toFormData:cd,AxiosHeaders:pd,HttpStatusCode:fd,formToJSON:ud,getAdapter:md,mergeConfig:wd}=g;var C=globalThis.URL,Is=globalThis.URLSearchParams;var y="https://api.kadoa.com".replace(/\/+$/,"");var oe=class{constructor(e,t=y,s=g){this.basePath=t;this.axios=s;e&&(this.configuration=e,this.basePath=e.basePath??t);}},Gt=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 Gt(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 re=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 xo(o,e,t=""){e!=null&&(typeof e=="object"?Array.isArray(e)||e instanceof Set?e.forEach(s=>xo(o,s,t)):Object.keys(e).forEach(s=>xo(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);xo(t,e),o.search=t.toString();},Ci=function(o,e){return e instanceof Set?Array.from(e):e},O=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:{},Ci):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 Ai=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),d.Accept="application/json",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),r.Accept="application/json",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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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),l.Accept="application/json",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),d.Accept="application/json",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),d.Accept="application/json",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),r.Accept="application/json",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),d.Accept="application/json",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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(e,n,o),{url:V(a),options:n}}}},Z=function(o){let e=Ai(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 et=class extends oe{v4CrawlBucketDataFilenameb64Get(e,t){return Z(this.configuration).v4CrawlBucketDataFilenameb64Get(e.filenameb64,e.contentType,e.cacheControl,t).then(s=>s(this.axios,this.basePath))}v4CrawlConfigConfigIdGet(e,t){return Z(this.configuration).v4CrawlConfigConfigIdGet(e.configId,t).then(s=>s(this.axios,this.basePath))}v4CrawlConfigDelete(e={},t){return Z(this.configuration).v4CrawlConfigDelete(e.deleteCrawlerConfigRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlConfigPost(e={},t){return Z(this.configuration).v4CrawlConfigPost(e.createCrawlerConfigRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlPausePost(e={},t){return Z(this.configuration).v4CrawlPausePost(e.pauseCrawlerSessionRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlPost(e={},t){return Z(this.configuration).v4CrawlPost(e.startCrawlerSessionRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlResumePost(e={},t){return Z(this.configuration).v4CrawlResumePost(e.resumeCrawlerSessionRequest,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdListGet(e,t){return Z(this.configuration).v4CrawlSessionIdListGet(e.sessionId,e.includeAll,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdPagesGet(e,t){return Z(this.configuration).v4CrawlSessionIdPagesGet(e.sessionId,e.currentPage,e.pageSize,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdPagesPageIdGet(e,t){return Z(this.configuration).v4CrawlSessionIdPagesPageIdGet(e.sessionId,e.pageId,e.format,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionIdStatusGet(e,t){return Z(this.configuration).v4CrawlSessionIdStatusGet(e.sessionId,t).then(s=>s(this.axios,this.basePath))}v4CrawlSessionsGet(e={},t){return Z(this.configuration).v4CrawlSessionsGet(e.page,e.pageSize,e.userId,t).then(s=>s(this.axios,this.basePath))}v4CrawlStartPost(e={},t){return Z(this.configuration).v4CrawlStartPost(e.startSessionWithConfigRequest,t).then(s=>s(this.axios,this.basePath))}};var xi=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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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={},R={};if(await I(m,"x-api-key",o),e!==void 0&&(R.groupId=e),t!==void 0&&(R.workflowId=t),s!==void 0&&(R.status=s),a!==void 0&&(R.page=a),i!==void 0&&(R.pageSize=i),n!==void 0)for(let[w,h]of Object.entries(n))R[w]=h;m.Accept="application/json",k(d,R);let u=c&&c.headers?c.headers:{};return p.headers={...m,...u,...r.headers},{url:V(d),options:p}},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",l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=O(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",l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=O(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),l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{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),d.Accept="application/json",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),c.Accept="application/json",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),l.Accept="application/json",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",d.Accept="application/json",k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},l.data=O(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",d.Accept="application/json",k(n,c);let p=r&&r.headers?r.headers:{};return l.headers={...d,...p,...a.headers},l.data=O(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),p.Accept="application/json",k(l,m);let R=d&&d.headers?d.headers:{};return c.headers={...p,...R,...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),d.Accept="application/json",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),r.Accept="application/json",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",l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=O(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",l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=O(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),l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},{url:V(i),options:r}}}},U=function(o){let e=xi(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,R)=>v(d,g,y,o)(m,p||R)},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 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 tt=class extends oe{v4DataValidationRulesActionsBulkApprovePost(e={},t){return U(this.configuration).v4DataValidationRulesActionsBulkApprovePost(e.bulkApproveRules,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsBulkDeletePost(e={},t){return U(this.configuration).v4DataValidationRulesActionsBulkDeletePost(e.bulkDeleteRules,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsDeleteAllDelete(e={},t){return U(this.configuration).v4DataValidationRulesActionsDeleteAllDelete(e.deleteRuleWithReason,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsGeneratePost(e={},t){return U(this.configuration).v4DataValidationRulesActionsGeneratePost(e.generateRule,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesActionsGenerateRulesPost(e={},t){return U(this.configuration).v4DataValidationRulesActionsGenerateRulesPost(e.generateRules,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesGet(e={},t){return U(this.configuration).v4DataValidationRulesGet(e.groupId,e.workflowId,e.status,e.page,e.pageSize,e.includeDeleted,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdDelete(e,t){return U(this.configuration).v4DataValidationRulesRuleIdDelete(e.ruleId,e.deleteRuleWithReason,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdDisablePost(e,t){return U(this.configuration).v4DataValidationRulesRuleIdDisablePost(e.ruleId,e.disableRule,t).then(s=>s(this.axios,this.basePath))}v4DataValidationRulesRuleIdGet(e,t){return U(this.configuration).v4DataValidationRulesRuleIdGet(e.ruleId,e.includeDeleted,t).then(s=>s(this.axios,this.basePath))}v4DataValidationValidationsValidationIdAnomaliesGet(e,t){return U(this.configuration).v4DataValidationValidationsValidationIdAnomaliesGet(e.validationId,e.page,e.pageSize,t).then(s=>s(this.axios,this.basePath))}v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(e,t){return U(this.configuration).v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(e.validationId,e.ruleName,e.page,e.pageSize,t).then(s=>s(this.axios,this.basePath))}v4DataValidationValidationsValidationIdGet(e,t){return U(this.configuration).v4DataValidationValidationsValidationIdGet(e.validationId,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowIdJobsJobIdValidatePost(e,t){return U(this.configuration).v4DataValidationWorkflowIdJobsJobIdValidatePost(e.workflowId,e.jobId,e.dataValidationRequestBody,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(e,t){return U(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(e.workflowId,e.jobId,e.dataValidationRequestBody,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(e,t){return U(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 U(this.configuration).v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(e.workflowId,e.jobId,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationConfigGet(e,t){return U(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationConfigGet(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationConfigPut(e,t){return U(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationConfigPut(e.workflowId,e.v4DataValidationWorkflowsWorkflowIdValidationConfigPutRequest,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationTogglePut(e,t){return U(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationTogglePut(e.workflowId,e.v4DataValidationWorkflowsWorkflowIdValidationTogglePutRequest,t).then(s=>s(this.axios,this.basePath))}v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(e,t){return U(this.configuration).v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(e.workflowId,e.includeDryRun,t).then(s=>s(this.axios,this.basePath))}};var Ii=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),r.Accept="application/json",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),l.Accept="application/json",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",l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=O(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),l.Accept="application/json",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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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),r.Accept="application/json",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),n.Accept="application/json",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={},R={};await I(m,"x-api-key",o),e!==void 0&&(R.workflowId=e),t!==void 0&&(R.eventType=t),s!==void 0&&(R.startDate=s instanceof Date?s.toISOString():s),a!==void 0&&(R.endDate=a instanceof Date?a.toISOString():a),i!==void 0&&(R.limit=i),n!==void 0&&(R.offset=n),m.Accept="application/json",k(d,R);let u=c&&c.headers?c.headers:{};return p.headers={...m,...u,...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),l.Accept="application/json",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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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),r.Accept="application/json",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),r.Accept="application/json",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",l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=O(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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(e,n,o),{url:V(a),options:n}}}},z=function(o){let e=Ii(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,R)=>v(d,g,y,o)(m,p||R)},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 qe=class extends oe{v5NotificationsChannelsChannelIdDelete(e,t){return z(this.configuration).v5NotificationsChannelsChannelIdDelete(e.channelId,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsChannelIdGet(e,t){return z(this.configuration).v5NotificationsChannelsChannelIdGet(e.channelId,e.includeConfigurations,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsChannelIdPut(e,t){return z(this.configuration).v5NotificationsChannelsChannelIdPut(e.channelId,e.v5NotificationsChannelsPostRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsGet(e={},t){return z(this.configuration).v5NotificationsChannelsGet(e.workflowId,e.includeConfigurations,t).then(s=>s(this.axios,this.basePath))}v5NotificationsChannelsPost(e,t){return z(this.configuration).v5NotificationsChannelsPost(e.v5NotificationsChannelsPostRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsEventTypesEventTypeGet(e,t){return z(this.configuration).v5NotificationsEventTypesEventTypeGet(e.eventType,t).then(s=>s(this.axios,this.basePath))}v5NotificationsEventTypesGet(e){return z(this.configuration).v5NotificationsEventTypesGet(e).then(t=>t(this.axios,this.basePath))}v5NotificationsLogsGet(e={},t){return z(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 z(this.configuration).v5NotificationsSettingsGet(e.workflowId,e.eventType,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsPost(e,t){return z(this.configuration).v5NotificationsSettingsPost(e.v5NotificationsSettingsPostRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdDelete(e,t){return z(this.configuration).v5NotificationsSettingsSettingsIdDelete(e.settingsId,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdGet(e,t){return z(this.configuration).v5NotificationsSettingsSettingsIdGet(e.settingsId,t).then(s=>s(this.axios,this.basePath))}v5NotificationsSettingsSettingsIdPut(e,t){return z(this.configuration).v5NotificationsSettingsSettingsIdPut(e.settingsId,e.v5NotificationsSettingsSettingsIdPutRequest,t).then(s=>s(this.axios,this.basePath))}v5NotificationsTestPost(e,t){return z(this.configuration).v5NotificationsTestPost(e.v5NotificationsTestPostRequest,t).then(s=>s(this.axios,this.basePath))}},Tt={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 ki=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),n.Accept="application/json",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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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),r.Accept="application/json",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),r.Accept="application/json",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",l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=O(t,r,o),{url:V(i),options:r}}}},ot=function(o){let e=ki(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 st=class extends oe{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 Vi=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 re(d,o),d.Accept="application/json",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}},v4ChangesFilesEncodedPathGet:async(e,t,s,a={})=>{S("v4ChangesFilesEncodedPathGet","encodedPath",e);let i="/v4/changes/files/{encodedPath}".replace("{encodedPath}",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 re(d,o),d.Accept="application/pdf",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 R={method:"GET",...m,...d},u={},w={};await I(u,"x-api-key",o),await re(u,o),s!==void 0&&(w.workflowIds=s),a!==void 0&&(w.startDate=a instanceof Date?a.toISOString():a),i!==void 0&&(w.endDate=i instanceof Date?i.toISOString():i),n!==void 0&&(w.skip=n),r!==void 0&&(w.limit=r),l!==void 0&&(w.exclude=l),u.Accept="application/json",e!=null&&(u["x-api-key"]=String(e)),t!=null&&(u.Authorization=String(t)),k(p,w);let h=m&&m.headers?m.headers:{};return R.headers={...u,...h,...d.headers},{url:V(p),options:R}},v4WorkflowsBulkPost:async(e,t={})=>{S("v4WorkflowsBulkPost","v4WorkflowsBulkPostRequest",e);let s="/v4/workflows/bulk",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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(e,n,o),{url:V(a),options:n}},v4WorkflowsGet:async(e,t,s,a,i,n,r,l,d,c,p,m,R,u,w={})=>{let h="/v4/workflows",b=new C(h,x),G;o&&(G=o.baseOptions);let q={method:"GET",...G,...w},D={},N={};await I(D,"x-api-key",o),e!==void 0&&(N.search=e),t!==void 0&&(N.skip=t),s!==void 0&&(N.limit=s),a!==void 0&&(N.state=a),i!==void 0&&(N.runState=i),n!==void 0&&(N.displayState=n),r!==void 0&&(N.inSupport=r),l&&(N.tags=l),d!==void 0&&(N.userId=d),c!==void 0&&(N.monitoring=c),p!==void 0&&(N.updateInterval=p),m!==void 0&&(N.templateId=m),R!==void 0&&(N.includeDeleted=R),u!==void 0&&(N.format=u),D.Accept="application/json",k(b,N);let X=G&&G.headers?G.headers:{};return q.headers={...D,...X,...w.headers},{url:V(b),options:q}},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",r.Accept="application/json",k(a,l);let d=i&&i.headers?i.headers:{};return n.headers={...r,...d,...t.headers},n.data=O(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 re(p,o),a!==void 0&&(m.page=a),i!==void 0&&(m.limit=i),p.Accept="application/json",t!=null&&(p["x-api-key"]=String(t)),s!=null&&(p.Authorization=String(s)),k(l,m);let R=d&&d.headers?d.headers:{};return c.headers={...p,...R,...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),d.Accept="application/json",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",c.Accept="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=O(t,d,o),{url:V(r),options:d}},v4WorkflowsWorkflowIdDataGet:async(e,t,s,a,i,n,r,l,d,c,p,m,R,u={})=>{S("v4WorkflowsWorkflowIdDataGet","workflowId",e);let w="/v4/workflows/{workflowId}/data".replace("{workflowId}",encodeURIComponent(String(e))),h=new C(w,x),b;o&&(b=o.baseOptions);let G={method:"GET",...b,...u},q={},D={};await I(q,"x-api-key",o),await re(q,o),a!==void 0&&(D.runId=a),i!==void 0&&(D.format=i),n!==void 0&&(D.sortBy=n),r!==void 0&&(D.order=r),l!==void 0&&(D.filters=l),d!==void 0&&(D.page=d),c!==void 0&&(D.limit=c),p!==void 0&&(D.gzip=p),m!==void 0&&(D.rowIds=m),R!==void 0&&(D.includeAnomalies=R),q.Accept="application/json,text/csv",t!=null&&(q["x-api-key"]=String(t)),s!=null&&(q.Authorization=String(s)),k(h,D);let N=b&&b.headers?b.headers:{};return G.headers={...q,...N,...u.headers},{url:V(h),options:G}},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),r.Accept="text/plain",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),r.Accept="application/json",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),r.Accept="application/json",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),l.Accept="application/json",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",l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=O(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),r.Accept="text/plain",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),r.Accept="application/json",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",l.Accept="application/json",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=O(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",l.Accept="text/plain",k(i,d);let c=n&&n.headers?n.headers:{};return r.headers={...l,...c,...s.headers},r.data=O(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 re(d,o),d.Accept="application/json",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},R={},u={};await I(R,"x-api-key",o),await re(R,o),s!==void 0&&(u.workflowIds=s),a!==void 0&&(u.startDate=a instanceof Date?a.toISOString():a),i!==void 0&&(u.endDate=i instanceof Date?i.toISOString():i),n!==void 0&&(u.skip=n),r!==void 0&&(u.limit=r),R.Accept="application/json",e!=null&&(R["x-api-key"]=String(e)),t!=null&&(R.Authorization=String(t)),k(c,u);let w=p&&p.headers?p.headers:{};return m.headers={...R,...w,...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 re(p,o),a!==void 0&&(m.page=a),i!==void 0&&(m.limit=i),p.Accept="application/json",t!=null&&(p["x-api-key"]=String(t)),s!=null&&(p.Authorization=String(s)),k(l,m);let R=d&&d.headers?d.headers:{};return c.headers={...p,...R,...n.headers},{url:V(l),options:c}}}},F=function(o){let e=Vi(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 v4ChangesFilesEncodedPathGet(t,s,a,i){let n=await e.v4ChangesFilesEncodedPathGet(t,s,a,i),r=o?.serverIndex??0,l=A["WorkflowsApi.v4ChangesFilesEncodedPathGet"]?.[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,R=A["WorkflowsApi.v4ChangesGet"]?.[m]?.url;return (u,w)=>v(p,g,y,o)(u,R||w)},async v4WorkflowsBulkPost(t,s){let a=await e.v4WorkflowsBulkPost(t,s),i=o?.serverIndex??0,n=A["WorkflowsApi.v4WorkflowsBulkPost"]?.[i]?.url;return (r,l)=>v(a,g,y,o)(r,n||l)},async v4WorkflowsGet(t,s,a,i,n,r,l,d,c,p,m,R,u,w,h){let b=await e.v4WorkflowsGet(t,s,a,i,n,r,l,d,c,p,m,R,u,w,h),G=o?.serverIndex??0,q=A["WorkflowsApi.v4WorkflowsGet"]?.[G]?.url;return (D,N)=>v(b,g,y,o)(D,q||N)},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,R,u,w){let h=await e.v4WorkflowsWorkflowIdDataGet(t,s,a,i,n,r,l,d,c,p,m,R,u,w),b=o?.serverIndex??0,G=A["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[b]?.url;return (q,D)=>v(h,g,y,o)(q,G||D)},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 (R,u)=>v(c,g,y,o)(R,m||u)},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 at=class extends oe{v4ChangesChangeIdGet(e,t){return F(this.configuration).v4ChangesChangeIdGet(e.changeId,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v4ChangesFilesEncodedPathGet(e,t){return F(this.configuration).v4ChangesFilesEncodedPathGet(e.encodedPath,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v4ChangesGet(e={},t){return F(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))}v4WorkflowsBulkPost(e,t){return F(this.configuration).v4WorkflowsBulkPost(e.v4WorkflowsBulkPostRequest,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsGet(e={},t){return F(this.configuration).v4WorkflowsGet(e.search,e.skip,e.limit,e.state,e.runState,e.displayState,e.inSupport,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 F(this.configuration).v4WorkflowsPost(e.createWorkflowBody,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdAuditlogGet(e,t){return F(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 F(this.configuration).v4WorkflowsWorkflowIdComplianceApprovePut(e.workflowId,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdComplianceRejectPut(e,t){return F(this.configuration).v4WorkflowsWorkflowIdComplianceRejectPut(e.workflowId,e.v4WorkflowsWorkflowIdComplianceRejectPutRequest,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdDataGet(e,t){return F(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 F(this.configuration).v4WorkflowsWorkflowIdDelete(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdGet(e,t){return F(this.configuration).v4WorkflowsWorkflowIdGet(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdHistoryGet(e,t){return F(this.configuration).v4WorkflowsWorkflowIdHistoryGet(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdJobsJobIdGet(e,t){return F(this.configuration).v4WorkflowsWorkflowIdJobsJobIdGet(e.workflowId,e.jobId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdMetadataPut(e,t){return F(this.configuration).v4WorkflowsWorkflowIdMetadataPut(e.workflowId,e.v4WorkflowsWorkflowIdMetadataPutRequest,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdPausePut(e,t){return F(this.configuration).v4WorkflowsWorkflowIdPausePut(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdResumePut(e,t){return F(this.configuration).v4WorkflowsWorkflowIdResumePut(e.workflowId,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdRunPut(e,t){return F(this.configuration).v4WorkflowsWorkflowIdRunPut(e.workflowId,e.v4WorkflowsWorkflowIdRunPutRequest,t).then(s=>s(this.axios,this.basePath))}v4WorkflowsWorkflowIdSchedulePut(e,t){return F(this.configuration).v4WorkflowsWorkflowIdSchedulePut(e.workflowId,e.v4WorkflowsWorkflowIdSchedulePutRequest,t).then(s=>s(this.axios,this.basePath))}v5ChangesChangeIdGet(e,t){return F(this.configuration).v5ChangesChangeIdGet(e.changeId,e.xApiKey,e.authorization,t).then(s=>s(this.axios,this.basePath))}v5ChangesGet(e={},t){return F(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 F(this.configuration).v5WorkflowsWorkflowIdAuditlogGet(e.workflowId,e.xApiKey,e.authorization,e.page,e.limit,t).then(s=>s(this.axios,this.basePath))}};var it=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 ee={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Date:"DATE",Datetime:"DATETIME",Money:"MONEY",Image:"IMAGE",Link:"LINK",Object:"OBJECT",Array:"ARRAY"};var vi={Done:"DONE",Crawling:"CRAWLING",Pending:"PENDING"};var nt=class{constructor(e){this.client=e;}get api(){return this.client.apis.crawler}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 rt=class{constructor(e){this.client=e;}get api(){return this.client.apis.crawler}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 Io(o){return {config:new nt(o),session:new rt(o)}}var ko=class{},Si={String:ee.String,Number:ee.Number,Boolean:ee.Boolean,Date:ee.Date,Datetime:ee.Datetime,Money:ee.Money,Image:ee.Image,Link:ee.Link,Object:ee.Object,Array:ee.Array},Pi={...Si,Text:ee.String,Url:ee.Link};var Ne=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 lt=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 Ne(s=>this.fetchData({...e,...s})).fetchAll({limit:e.limit??this.defaultLimit})}async*fetchDataPages(e){let t=new Ne(s=>this.fetchData({...e,...s}));for await(let s of t.pages({limit:e.limit??this.defaultLimit}))yield s;}};var de={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,j=P.ERROR_MESSAGES;var E=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})}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=aa(Ps()),ce=o=>(0, Ws.default)(`kadoa:${o}`),Y={client:ce("client"),wss:ce("wss"),extraction:ce("extraction"),http:ce("http"),workflow:ce("workflow"),crawl:ce("crawl"),notifications:ce("notifications"),schemas:ce("schemas"),validation:ce("validation")};function Vo(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 pe(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];Ds(i)&&Ds(n)?o[a]=pe(n,i):Array.isArray(i)?o[a]=pe([],i):Vo(i)?o[a]=pe({},i):(n===void 0||i!==void 0)&&(o[a]=i);}return o}function Ds(o){return Vo(o)||Array.isArray(o)}function Es(o){return o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()}var Li=/\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(Li)??[])}function vo(o){let e=Os(o);if(e.length===0)return "";let[t,...s]=e;return `${t.toLowerCase()}${s.map(a=>Es(a)).join("")}`}function So(o){return o.substring(0,1).toUpperCase()+o.substring(1)}var Be=class Be{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),Be.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${So(vo(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(!Be.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}})}};Be.FIELD_NAME_PATTERN=/^[A-Za-z0-9]+$/,Be.TYPES_REQUIRING_EXAMPLE=["STRING","IMAGE","LINK","OBJECT","ARRAY"];var xe=Be;var Ut=Y.schemas,Ie=class{constructor(e){this.client=e;}get schemasApi(){return this.client.apis.schemas}builder(e){let t=this;return new class extends xe{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){Ut("Fetching schema with ID: %s",e);let s=(await this.schemasApi.v4SchemasSchemaIdGet({schemaId:e})).data.data;if(!s)throw new P(`${j.SCHEMA_NOT_FOUND}: ${e}`,{code:de.NOT_FOUND,details:{schemaId:e}});return s}async listSchemas(){return (await this.schemasApi.v4SchemasGet()).data.data}async createSchema(e){Ut("Creating schema with name: %s",e.name);let s=(await this.schemasApi.v4SchemasPost({createSchemaBody:e})).data.schemaId;if(!s)throw new P(j.SCHEMA_CREATE_FAILED,{code:de.INTERNAL_ERROR});return this.getSchema(s)}async updateSchema(e,t){return Ut("Updating schema with ID: %s",e),await this.schemasApi.v4SchemasSchemaIdPut({schemaId:e,updateSchemaBody:t}),this.getSchema(e)}async deleteSchema(e){Ut("Deleting schema with ID: %s",e),await this.schemasApi.v4SchemasSchemaIdDelete({schemaId:e});}};var _i="/v4/entity",dt=class{constructor(e){this.client=e;this.schemasService=new Ie(e);}async resolveEntity(e,t){if(e==="ai-detection"){if(!t?.link)throw new P(j.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(j.ENTITY_INVARIANT_VIOLATION,{details:{entity:e}})}async fetchEntityFields(e){this.validateEntityOptions(e);let t=`${this.client.baseUrl}${_i}`,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(j.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(j.LINK_REQUIRED,{code:"VALIDATION_ERROR",details:{options:e}})}};var ji=Y.extraction,Mi=new Set(["FINISHED","SUCCESS"]),Po={mode:"run",pollingInterval:5e3,maxWaitTime:3e5,navigationMode:"single-page",location:{type:"auto"},bypassPreview:true,autoStart:true},ct=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=pe(Po,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 u=e.entity||"ai-detection";n={entity:typeof u=="object"&&"name"in u?u.name:void 0,fields:typeof u=="object"&&"fields"in u?u.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 u=await this.notificationSetupService.setup({workflowId:a,events:t.notifications?.events,channels:t.notifications?.channels});ji("Notifications setup: %O",u.map(w=>({id:w.id,eventType:w.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 u=await this.dataFetcherService.fetchData({workflowId:a});p=u.data,m=u.pagination;}else throw new P(`${j.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(j.NO_URLS,{code:"VALIDATION_ERROR"})}async resumeWorkflow(e){await this.workflowsCoreService.resume(e);let t=await this.workflowsCoreService.wait(e,{pollIntervalMs:Po.pollingInterval,timeoutMs:Po.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(`${j.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?Mi.has(e.toUpperCase()):false}};var Wo=Y.extraction,pt=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 R=i(new xe);if("schemaId"in R)m={schemaId:R.schemaId};else {let u=R.build();m=u.entityName?{name:u.entityName,fields:u.fields}:{fields:u.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=typeof i=="object"&&"schemaId"in i&&i.schemaId,p=await this.workflowsCoreService.create({urls:e,name:t,description:s,navigationMode:a,monitoring:this._monitoringOptions,...c?{schemaId:i.schemaId,entity:d.entity,fields:d.fields}:{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:p.id}),this._workflowId=p.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"),Wo("Job started: %O",t),this._jobId=t.jobId;let s=await this.workflowsCoreService.waitForJobCompletion(this._workflowId,t.jobId);return Wo("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"),Wo("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 he={EMAIL:"EMAIL",SLACK:"SLACK",WEBHOOK:"WEBHOOK",WEBSOCKET:"WEBSOCKET"};var qs=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Ji(o){let e=[];if(!o.recipients?.length)e.push({message:"Recipients are required for email channel"});else for(let t of o.recipients)qs.test(t)||e.push({message:`Invalid email address: ${t}`});if(o.from!==void 0&&(qs.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:de.VALIDATION_ERROR,details:{issues:e}});return o}var Lt=class Lt{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 E.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 E.wrap(t,{message:"Failed to delete channel"})}async createChannel(e,t){let s=await this.buildPayload(pe({name:Lt.DEFAULT_CHANNEL_NAME,channelType:e,config:{}},t||{})),a=await this.api.v5NotificationsChannelsPost({v5NotificationsChannelsPostRequest:s});if(a.status===201){let i=a.data.data?.channel;if(!i)throw E.wrap(a,{message:"Failed to create default channels"});return i}throw E.wrap(a,{message:"Failed to create default channels"})}async buildPayload(e){let t;switch(e.channelType){case he.EMAIL:t=await this.buildEmailChannelConfig(e.config);break;case he.SLACK:t=await this.buildSlackChannelConfig(e.config);break;case he.WEBHOOK:t=await this.buildWebhookChannelConfig(e.config);break;case he.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=pe(e,{recipients:t});return Ji(s)}async buildSlackChannelConfig(e){return e}async buildWebhookChannelConfig(e){return e}async buildWebsocketChannelConfig(e){return e}};Lt.DEFAULT_CHANNEL_NAME="default";var fe=Lt;var ft=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 E.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 E.wrap(t,{message:"Failed to list notification settings"});return s}async listAllEvents(){return Object.values(Tt)}async updateSettings(e,t){let s=await this.api.v5NotificationsSettingsSettingsIdPut({settingsId:e,v5NotificationsSettingsSettingsIdPutRequest:t}),a=s.data.data?.settings;if(!a)throw E.wrap(s,{message:"Failed to update notification settings"});return a}async deleteSettings(e){let t=await this.api.v5NotificationsSettingsSettingsIdDelete({settingsId:e});if(t.status!==200)throw E.wrap(t,{message:"Failed to delete notification settings"})}};var Re=Y.notifications,ut=class{constructor(e,t){this.channelsService=e;this.settingsService=t;}async setupForWorkflow(e){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:de.BAD_REQUEST});return this.setup({events:e.events,channels:e.channels})}async setup(e){e.workflowId?Re("Setting up notifications for workflow %s",e.workflowId):Re("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(l=>l.id).filter(Boolean);Re("Creating notification settings for workflow %s: %O",e.workflowId,{events:a,channels:i});let n=await this.settingsService.listSettings({workflowId:e.workflowId}),r=await Promise.all(a.map(async l=>{let d=n.find(c=>c.eventType===l);if(d?.id){let c=(d.channels||[]).map(m=>m.id).filter(Boolean),p=[...new Set([...c,...i])];return await this.settingsService.updateSettings(d.id,{channelIds:p,enabled:d.enabled??true})}return await this.settingsService.createSettings({workflowId:e.workflowId,channelIds:i,eventType:l,enabled:true,eventConfiguration:{}})}));return Re(e.workflowId?"Successfully setup notifications for workflow %s":"Successfully setup notifications for workspace",e.workflowId),r}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:de.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===he.WEBSOCKET?t.find(l=>l.channelType===i):t.find(l=>l.channelType===i&&l.name===fe.DEFAULT_CHANNEL_NAME);if(n)return Re("Using existing default channel: %O",{workflowId:s,channelType:i,channelId:n.id}),n;let r=await this.channelsService.createChannel(i);return Re("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||fe.DEFAULT_CHANNEL_NAME,l=t.find(m=>m.channelType===i&&(m.name||fe.DEFAULT_CHANNEL_NAME)===r);if(l)return Re("Using existing channel: %O",{workflowId:s,channelType:i,channelName:r,channelId:l.id}),l;let{name:d,...c}=n,p=await this.channelsService.createChannel(i,{name:r,config:c});return Re("Created channel with custom config %O",{workflowId:s,channelType:i,channelName:r,channel:p}),p}))}};var _t="https://api.kadoa.com",Ns="wss://realtime.kadoa.com";process.env.KADOA_WSS_NEO_API_URI??"wss://events.kadoa.com/events/ws";var Gs="https://realtime.kadoa.com";var ge="0.22.0",jt="kadoa-node-sdk",Ts="node";var ne=Y.wss;typeof WebSocket>"u"&&(window.WebSocket=ta("ws"));var mt=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;}async connect(){if(!this.isConnecting){this.isConnecting=true;try{let e=await fetch(`${_t}/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();await new Promise((a,i)=>{this.socket=new WebSocket(`${Ns}?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})),ne("Connected to WebSocket"),this.notifyConnectionListeners(!0)),this.startHeartbeatCheck(),a();},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){ne("Failed to parse incoming message: %O",r);}},this.socket.onclose=()=>{ne("WebSocket disconnected. Attempting to reconnect..."),this.isConnecting=!1,this.stopHeartbeatCheck(),this.notifyConnectionListeners(!1,"Connection closed"),setTimeout(()=>this.connect(),this.reconnectDelay);},this.socket.onerror=n=>{ne("WebSocket error: %O",n),this.isConnecting=!1,this.notifyErrorListeners(n),i(n);};});}catch(e){ne("Failed to connect: %O",e),this.isConnecting=false,setTimeout(()=>this.connect(),this.reconnectDelay);}}}handleHeartbeat(){ne("Heartbeat received"),this.lastHeartbeat=Date.now();}notifyEventListeners(e){this.eventListeners.forEach(t=>{try{t(e);}catch(s){ne("Error in event listener: %O",s);}});}notifyConnectionListeners(e,t){this.connectionListeners.forEach(s=>{try{s(e,t);}catch(a){ne("Error in connection listener: %O",a);}});}notifyErrorListeners(e){this.errorListeners.forEach(t=>{try{t(e);}catch(s){ne("Error in error listener: %O",s);}});}startHeartbeatCheck(){this.missedHeartbeatCheckTimer=setInterval(()=>{Date.now()-this.lastHeartbeat>this.missedHeartbeatsLimit&&(ne("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 wt=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 Hi={pollIntervalMs:1e4,timeoutMs:300*1e3},Fs={ABORTED:"ABORTED",TIMEOUT:"TIMEOUT"};async function Ue(o,e,t={}){let s={...Hi,...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 Mt(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 Ki="https://registry.npmjs.org",Bs="@kadoa/node-sdk";async function Us(){try{let o=await fetch(`${Ki}/${Bs}`,{headers:{Accept:"application/json"}});if(!o.ok)return;let t=(await o.json())["dist-tags"]?.latest;if(!t)return;$i(t,ge)&&console.warn(`\u26A0\uFE0F A new version of ${jt} is available: ${t} (current: ${ge}). Update with: npm install ${Bs}@latest`);}catch{}}function $i(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 ht=class{constructor(e){this.client=e;}get validationApi(){return this.client.apis.validation}async listWorkflowValidations(e){let t=await this.validationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(e);if(t.status!==200)throw E.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 E.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 E.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 E.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 E.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 E.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 E.wrap(s.data,{message:"Failed to get validation anomalies by rule"});return s.data}async waitUntilCompleted(e,t){return await new Promise(a=>setTimeout(a,1e3)),(await Ue(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 Rt=class{constructor(e){this.client=e;}get validationApi(){return this.client.apis.validation}async listRules(e){let t=await this.validationApi.v4DataValidationRulesGet(e);if(t.status!==200||t.data.error)throw E.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 E.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 E.wrap(t.data.data,{message:"Failed to get validation rule by name"});return t.data.data?.find(s=>s.name===e)}async deleteRule(e){let t=await this.validationApi.v4DataValidationRulesRuleIdDelete({ruleId:e.ruleId,...e.workflowId!=null&&{deleteRuleWithReason:{workflowId:e.workflowId,...e.reason!=null&&{reason:e.reason}}}});if(t.status!==200||t.data.error)throw E.wrap(t.data,{message:t.data.message||"Failed to delete validation rule"});return t.data}async disableRule(e){let t=await this.validationApi.v4DataValidationRulesRuleIdDisablePost(e);if(t.status!==200||t.data.error)throw E.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 E.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 E.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 E.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 E.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 E.wrap(t.data.data,{message:t.data.message||"Failed to delete all validation rules"});return t.data.data}};var gt={Finished:"FINISHED",Failed:"FAILED",NotSupported:"NOT_SUPPORTED",FailedInsufficientFunds:"FAILED_INSUFFICIENT_FUNDS"};var _s=new Set([gt.Finished,gt.Failed,gt.NotSupported,gt.FailedInsufficientFunds]),js=new Set(["FINISHED","SUCCESS","FAILED","ERROR","STOPPED","CANCELLED"]),Ls=Y.workflow,yt=class{constructor(e){this.workflowsApi=e;}async create(e){Mt(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,limit:e.limit},r=await this.workflowsApi.v4WorkflowsPost({createWorkflowBody:n}),l=r.data?.workflowId;if(!l)throw new P(j.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,...e.entity!=null&&{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,limit:e.limit},a=await this.workflowsApi.v4WorkflowsPost({createWorkflowBody:s}),i=a.data?.workflowId;if(!i)throw new P(j.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 Mt(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 Ue(async()=>{let a=await this.get(e);return Ls("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(j.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 Ue(async()=>{let i=await this.getJobStatus(e,t);return Ls("workflow run %s state: %s",t,i.state),i},i=>!!(s?.targetStatus&&i.state===s.targetStatus||i.state&&_s.has(i.state)),s)).result}};var Jt=class{constructor(e,t,s,a){this.baseUrl=t;this.axios=s;this.cache=new Map;this.configuration=new it({apiKey:e,basePath:t,baseOptions:{headers:a}});}get(e){return this.cache.has(e)||this.cache.set(e,new e(this.configuration,this.baseUrl,this.axios)),this.cache.get(e)}get schemas(){return this.get(st)}get validation(){return this.get(tt)}get crawler(){return this.get(et)}get workflows(){return this.get(at)}get notifications(){return this.get(qe)}};var M=[];for(let o=0;o<256;++o)M.push((o+256).toString(16).slice(1));function Ms(o,e=0){return (M[o[e+0]]+M[o[e+1]]+M[o[e+2]]+M[o[e+3]]+"-"+M[o[e+4]]+M[o[e+5]]+"-"+M[o[e+6]]+M[o[e+7]]+"-"+M[o[e+8]]+M[o[e+9]]+"-"+M[o[e+10]]+M[o[e+11]]+M[o[e+12]]+M[o[e+13]]+M[o[e+14]]+M[o[e+15]]).toLowerCase()}var bo,zi=new Uint8Array(16);function Do(){if(!bo){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");bo=crypto.getRandomValues.bind(crypto);}return bo(zi)}var Qi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Eo={randomUUID:Qi};function Yi(o,e,t){o=o||{};let s=o.random??o.rng?.()??Do();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 Xi(o,e,t){return Eo.randomUUID&&!e&&!o?Eo.randomUUID():Yi(o,e,t)}var Oo=Xi;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)}}function Hs(){return {"User-Agent":`${jt}/${ge}`,"X-SDK-Version":ge,"X-SDK-Language":Ts}}function Ks(o){let e=g.create({timeout:o.timeout,headers:o.headers});return e.interceptors.request.use(t=>(t.headers["x-request-id"]=Oo(),t)),e.interceptors.response.use(t=>t,t=>{if(t instanceof As){let s=t.response?.status;if(s===401||s===403)throw E.wrap(t,{message:"Unauthorized"})}throw E.wrap(t)}),e}function $s(o){let{client:e}=o,t=new wt(e),s=new lt(e.apis.workflows),a=new fe(e.apis.notifications,t),i=new ft(e.apis.notifications),n=new dt(e),r=new yt(e.apis.workflows),l=new Ie(e),d=new ut(a,i),c=new ht(e),p=new Rt(e),m=new ct(r,s,n,d,a,i),R=new pt(r,n,s,d),u=Zi({notificationsApi:e.apis.notifications,channelsService:a,settingsService:i,channelSetupService:d}),w=Js(c,p),h=Io(e);return {extractionBuilderService:R,extraction:m,workflow:r,notification:u,schema:l,user:t,validation:w,crawler:h}}function Zi(o){let{notificationsApi:e,channelsService:t,settingsService:s,channelSetupService:a}=o;return {channels:t,settings:s,setup:a,configure:i=>a.setup(i),setupForWorkflow:i=>a.setupForWorkflow(i),setupForWorkspace:i=>a.setupForWorkspace(i),testNotification:async i=>{let n=await e.v5NotificationsTestPost({v5NotificationsTestPostRequest:{eventType:i.eventType,...i.workflowId!=null&&{workflowId:i.workflowId}}}),r=n.data.data;if(!r?.eventId||!r?.eventType)throw E.wrap(n,{message:"Failed to test notification"});return {eventId:r.eventId,eventType:r.eventType,...r.workflowId!=null&&{workflowId:r.workflowId}}}}}var Ht=class{constructor(e){this._baseUrl=e.baseUrl??_t,this._apiKey=e.apiKey;let t=e.timeout??3e4,s=Hs();this._axiosInstance=Ks({timeout:t,headers:s}),this.apis=new Jt(this._apiKey,this._baseUrl,this._axiosInstance,s);let a=$s({client:this});this.user=a.user,this.extraction=a.extraction,this.workflow=a.workflow,this.schema=a.schema,this.notification=a.notification,this.validation=a.validation,this.crawler=a.crawler,this._extractionBuilderService=a.extractionBuilderService,Us().catch(()=>{});}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}get apiKey(){return this._apiKey}get realtime(){return this._realtime}extract(e){return this._extractionBuilderService.extract(e)}async connectRealtime(e){return this._realtime||(this._realtime=new mt({apiKey:this._apiKey,...e}),await 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();}close(){this.dispose();}};
9
+ exports.CrawlerConfigService=nt;exports.CrawlerSessionService=rt;exports.DataFetcherService=lt;exports.ERROR_MESSAGES=j;exports.EntityResolverService=dt;exports.ExtractionBuilderService=pt;exports.ExtractionService=ct;exports.FetchDataOptions=ko;exports.KadoaClient=Ht;exports.KadoaHttpException=E;exports.KadoaSdkException=P;exports.NotificationChannelType=he;exports.NotificationChannelsService=fe;exports.NotificationSettingsEventTypeEnum=Tt;exports.NotificationSettingsService=ft;exports.NotificationSetupService=ut;exports.PageStatus=vi;exports.Realtime=mt;exports.SchemaBuilder=xe;exports.SchemaFieldDataType=Pi;exports.SchemasService=Ie;exports.TERMINAL_JOB_STATES=_s;exports.TERMINAL_RUN_STATES=js;exports.UserService=wt;exports.ValidationCoreService=ht;exports.ValidationRulesService=Rt;exports.WorkflowsCoreService=yt;exports.createCrawlerDomain=Io;exports.pollUntil=Ue;exports.validateAdditionalData=Mt;return exports;})({},_);//# sourceMappingURL=index.global.js.map
10
10
  //# sourceMappingURL=index.global.js.map