@ezpaarse-project/ezreeport-sdk-js 1.0.0-beta.9 → 1.0.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.
Files changed (100) hide show
  1. package/dist/browser/ezreeport-sdk-js.mjs +597 -1968
  2. package/dist/browser/ezreeport-sdk-js.mjs.map +1 -1
  3. package/dist/browser/ezreeport-sdk-js.umd.js +1 -3
  4. package/dist/browser/ezreeport-sdk-js.umd.js.map +1 -1
  5. package/dist/node/ezreeport-sdk-js.js +2 -0
  6. package/dist/node/ezreeport-sdk-js.js.map +1 -0
  7. package/dist/node/ezreeport-sdk-js.mjs +978 -0
  8. package/dist/node/ezreeport-sdk-js.mjs.map +1 -0
  9. package/dist/types/{src/index.d.ts → index.d.ts} +4 -2
  10. package/dist/types/{src/lib → lib}/axios.d.ts +2 -2
  11. package/dist/types/{src/lib → lib}/utils.d.ts +5 -0
  12. package/dist/types/{src/modules → modules}/queues.d.ts +2 -4
  13. package/dist/types/{src/modules → modules}/tasks.d.ts +26 -4
  14. package/dist/types/modules/tasks.public.d.ts +2 -0
  15. package/dist/types/{src/modules → modules}/tasksActivity.d.ts +2 -4
  16. package/dist/types/modules/tasksPresets.d.ts +83 -0
  17. package/dist/types/modules/tasksPresets.public.d.ts +1 -0
  18. package/package.json +17 -14
  19. package/dist/node/package.json +0 -58
  20. package/dist/node/src/index.js +0 -42
  21. package/dist/node/src/index.js.map +0 -1
  22. package/dist/node/src/lib/axios.js +0 -95
  23. package/dist/node/src/lib/axios.js.map +0 -1
  24. package/dist/node/src/lib/promises.js +0 -41
  25. package/dist/node/src/lib/promises.js.map +0 -1
  26. package/dist/node/src/lib/utils.js +0 -24
  27. package/dist/node/src/lib/utils.js.map +0 -1
  28. package/dist/node/src/modules/auth.js +0 -111
  29. package/dist/node/src/modules/auth.js.map +0 -1
  30. package/dist/node/src/modules/auth.public.js +0 -11
  31. package/dist/node/src/modules/auth.public.js.map +0 -1
  32. package/dist/node/src/modules/crons.js +0 -128
  33. package/dist/node/src/modules/crons.js.map +0 -1
  34. package/dist/node/src/modules/crons.public.js +0 -11
  35. package/dist/node/src/modules/crons.public.js.map +0 -1
  36. package/dist/node/src/modules/elastic.js +0 -31
  37. package/dist/node/src/modules/elastic.js.map +0 -1
  38. package/dist/node/src/modules/elastic.public.js +0 -7
  39. package/dist/node/src/modules/elastic.public.js.map +0 -1
  40. package/dist/node/src/modules/health.js +0 -60
  41. package/dist/node/src/modules/health.js.map +0 -1
  42. package/dist/node/src/modules/health.public.js +0 -9
  43. package/dist/node/src/modules/health.public.js.map +0 -1
  44. package/dist/node/src/modules/history.js +0 -62
  45. package/dist/node/src/modules/history.js.map +0 -1
  46. package/dist/node/src/modules/history.public.js +0 -6
  47. package/dist/node/src/modules/history.public.js.map +0 -1
  48. package/dist/node/src/modules/namespaces.js +0 -15
  49. package/dist/node/src/modules/namespaces.js.map +0 -1
  50. package/dist/node/src/modules/namespaces.public.js +0 -3
  51. package/dist/node/src/modules/namespaces.public.js.map +0 -1
  52. package/dist/node/src/modules/queues.js +0 -179
  53. package/dist/node/src/modules/queues.js.map +0 -1
  54. package/dist/node/src/modules/queues.public.js +0 -13
  55. package/dist/node/src/modules/queues.public.js.map +0 -1
  56. package/dist/node/src/modules/reports.js +0 -267
  57. package/dist/node/src/modules/reports.js.map +0 -1
  58. package/dist/node/src/modules/reports.public.js +0 -13
  59. package/dist/node/src/modules/reports.public.js.map +0 -1
  60. package/dist/node/src/modules/setup.js +0 -35
  61. package/dist/node/src/modules/setup.js.map +0 -1
  62. package/dist/node/src/modules/setup.public.js +0 -12
  63. package/dist/node/src/modules/setup.public.js.map +0 -1
  64. package/dist/node/src/modules/tasks.base.js +0 -51
  65. package/dist/node/src/modules/tasks.base.js.map +0 -1
  66. package/dist/node/src/modules/tasks.js +0 -264
  67. package/dist/node/src/modules/tasks.js.map +0 -1
  68. package/dist/node/src/modules/tasks.public.js +0 -20
  69. package/dist/node/src/modules/tasks.public.js.map +0 -1
  70. package/dist/node/src/modules/tasksActivity.js +0 -62
  71. package/dist/node/src/modules/tasksActivity.js.map +0 -1
  72. package/dist/node/src/modules/tasksActivity.public.js +0 -6
  73. package/dist/node/src/modules/tasksActivity.public.js.map +0 -1
  74. package/dist/node/src/modules/templates.js +0 -136
  75. package/dist/node/src/modules/templates.js.map +0 -1
  76. package/dist/node/src/modules/templates.public.js +0 -11
  77. package/dist/node/src/modules/templates.public.js.map +0 -1
  78. package/dist/types/src/modules/history.d.ts +0 -38
  79. package/dist/types/src/modules/history.public.d.ts +0 -1
  80. package/dist/types/src/modules/tasks.public.d.ts +0 -2
  81. /package/dist/types/{src/lib → lib}/promises.d.ts +0 -0
  82. /package/dist/types/{src/modules → modules}/auth.d.ts +0 -0
  83. /package/dist/types/{src/modules → modules}/auth.public.d.ts +0 -0
  84. /package/dist/types/{src/modules → modules}/crons.d.ts +0 -0
  85. /package/dist/types/{src/modules → modules}/crons.public.d.ts +0 -0
  86. /package/dist/types/{src/modules → modules}/elastic.d.ts +0 -0
  87. /package/dist/types/{src/modules → modules}/elastic.public.d.ts +0 -0
  88. /package/dist/types/{src/modules → modules}/health.d.ts +0 -0
  89. /package/dist/types/{src/modules → modules}/health.public.d.ts +0 -0
  90. /package/dist/types/{src/modules → modules}/namespaces.d.ts +0 -0
  91. /package/dist/types/{src/modules → modules}/namespaces.public.d.ts +0 -0
  92. /package/dist/types/{src/modules → modules}/queues.public.d.ts +0 -0
  93. /package/dist/types/{src/modules → modules}/reports.d.ts +0 -0
  94. /package/dist/types/{src/modules → modules}/reports.public.d.ts +0 -0
  95. /package/dist/types/{src/modules → modules}/setup.d.ts +0 -0
  96. /package/dist/types/{src/modules → modules}/setup.public.d.ts +0 -0
  97. /package/dist/types/{src/modules → modules}/tasks.base.d.ts +0 -0
  98. /package/dist/types/{src/modules → modules}/tasksActivity.public.d.ts +0 -0
  99. /package/dist/types/{src/modules → modules}/templates.d.ts +0 -0
  100. /package/dist/types/{src/modules → modules}/templates.public.d.ts +0 -0
@@ -1,4 +1,2 @@
1
- (function(v,j){typeof exports=="object"&&typeof module<"u"?j(exports):typeof define=="function"&&define.amd?define(["exports"],j):(v=typeof globalThis<"u"?globalThis:v||self,j(v.ezReeportSDK={}))})(this,function(v){"use strict";function j(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Lt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}var Se=6e4,_e=36e5;function b(e,t){var n;Lt(1,arguments);var r=j((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var s=Pt(e),o;if(s.date){var i=Dt(s.date,r);o=kt(i.restDateString,i.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var c=o.getTime(),f=0,u;if(s.time&&(f=Ft(s.time),isNaN(f)))return new Date(NaN);if(s.timezone){if(u=Ut(s.timezone),isNaN(u))return new Date(NaN)}else{var l=new Date(c+f),h=new Date(0);return h.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),h.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),h}return new Date(c+f+u)}var q={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Nt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,xt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,$t=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Pt(e){var t={},n=e.split(q.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],q.timeZoneDelimiter.test(t.date)&&(t.date=e.split(q.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var s=q.timezone.exec(r);s?(t.time=r.replace(s[1],""),t.timezone=s[1]):t.time=r}return t}function Dt(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var s=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?s:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function kt(e,t){if(t===null)return new Date(NaN);var n=e.match(Nt);if(!n)return new Date(NaN);var r=!!n[4],s=B(n[1]),o=B(n[2])-1,i=B(n[3]),c=B(n[4]),f=B(n[5])-1;if(r)return Ht(t,c,f)?jt(t,c,f):new Date(NaN);var u=new Date(0);return!Mt(t,o,i)||!zt(t,s)?new Date(NaN):(u.setUTCFullYear(t,o,Math.max(s,i)),u)}function B(e){return e?parseInt(e):1}function Ft(e){var t=e.match(xt);if(!t)return NaN;var n=ie(t[1]),r=ie(t[2]),s=ie(t[3]);return It(n,r,s)?n*_e+r*Se+s*1e3:NaN}function ie(e){return e&&parseFloat(e.replace(",","."))||0}function Ut(e){if(e==="Z")return 0;var t=e.match($t);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return Jt(r,s)?n*(r*_e+s*Se):NaN}function jt(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var s=r.getUTCDay()||7,o=(t-1)*7+n+1-s;return r.setUTCDate(r.getUTCDate()+o),r}var Bt=[31,null,31,30,31,30,31,31,30,31,30,31];function Ce(e){return e%400===0||e%4===0&&e%100!==0}function Mt(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Bt[t]||(Ce(e)?29:28))}function zt(e,t){return t>=1&&t<=(Ce(e)?366:365)}function Ht(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function It(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Jt(e,t){return t>=0&&t<=59}function Oe(e,t){return function(){return e.apply(t,arguments)}}const{toString:qt}=Object.prototype,{getPrototypeOf:ae}=Object,W=(e=>t=>{const n=qt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),_=e=>(e=e.toLowerCase(),t=>W(t)===e),K=e=>t=>typeof t===e,{isArray:x}=Array,M=K("undefined");function Wt(e){return e!==null&&!M(e)&&e.constructor!==null&&!M(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Le=_("ArrayBuffer");function Kt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Le(e.buffer),t}const Vt=K("string"),T=K("function"),Ne=K("number"),V=e=>e!==null&&typeof e=="object",Yt=e=>e===!0||e===!1,Y=e=>{if(W(e)!=="object")return!1;const t=ae(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Gt=_("Date"),Qt=_("File"),Xt=_("Blob"),Zt=_("FileList"),en=e=>V(e)&&T(e.pipe),tn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=W(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},nn=_("URLSearchParams"),rn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function z(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),x(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function xe(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const $e=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Pe=e=>!M(e)&&e!==$e;function ce(){const{caseless:e}=Pe(this)&&this||{},t={},n=(r,s)=>{const o=e&&xe(t,s)||s;Y(t[o])&&Y(r)?t[o]=ce(t[o],r):Y(r)?t[o]=ce({},r):x(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&z(arguments[r],n);return t}const sn=(e,t,n,{allOwnKeys:r}={})=>(z(t,(s,o)=>{n&&T(s)?e[o]=Oe(s,n):e[o]=s},{allOwnKeys:r}),e),on=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),an=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},cn=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&ae(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},un=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ln=e=>{if(!e)return null;if(x(e))return e;let t=e.length;if(!Ne(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},fn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ae(Uint8Array)),dn=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},pn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},hn=_("HTMLFormElement"),mn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),De=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),yn=_("RegExp"),ke=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};z(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},gn=e=>{ke(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wn=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return x(e)?r(e):r(String(e).split(t)),n},bn=()=>{},En=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ue="abcdefghijklmnopqrstuvwxyz",Fe="0123456789",Ue={DIGIT:Fe,ALPHA:ue,ALPHA_DIGIT:ue+ue.toUpperCase()+Fe},vn=(e=16,t=Ue.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function An(e){return!!(e&&T(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Tn=e=>{const t=new Array(10),n=(r,s)=>{if(V(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=x(r)?[]:{};return z(r,(i,c)=>{const f=n(i,s+1);!M(f)&&(o[c]=f)}),t[s]=void 0,o}}return r};return n(e,0)},Rn=_("AsyncFunction"),a={isArray:x,isArrayBuffer:Le,isBuffer:Wt,isFormData:tn,isArrayBufferView:Kt,isString:Vt,isNumber:Ne,isBoolean:Yt,isObject:V,isPlainObject:Y,isUndefined:M,isDate:Gt,isFile:Qt,isBlob:Xt,isRegExp:yn,isFunction:T,isStream:en,isURLSearchParams:nn,isTypedArray:fn,isFileList:Zt,forEach:z,merge:ce,extend:sn,trim:rn,stripBOM:on,inherits:an,toFlatObject:cn,kindOf:W,kindOfTest:_,endsWith:un,toArray:ln,forEachEntry:dn,matchAll:pn,isHTMLForm:hn,hasOwnProperty:De,hasOwnProp:De,reduceDescriptors:ke,freezeMethods:gn,toObjectSet:wn,toCamelCase:mn,noop:bn,toFiniteNumber:En,findKey:xe,global:$e,isContextDefined:Pe,ALPHABET:Ue,generateString:vn,isSpecCompliantForm:An,toJSONObject:Tn,isAsyncFn:Rn,isThenable:e=>e&&(V(e)||T(e))&&T(e.then)&&T(e.catch)};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}a.inherits(y,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:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const je=y.prototype,Be={};["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(e=>{Be[e]={value:e}}),Object.defineProperties(y,Be),Object.defineProperty(je,"isAxiosError",{value:!0}),y.from=(e,t,n,r,s,o)=>{const i=Object.create(je);return a.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),y.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const Sn=null;function le(e){return a.isPlainObject(e)||a.isArray(e)}function Me(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function ze(e,t,n){return e?e.concat(t).map(function(s,o){return s=Me(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function _n(e){return a.isArray(e)&&!e.some(le)}const Cn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function G(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,L){return!a.isUndefined(L[m])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(!f&&a.isBlob(d))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,m,L){let S=d;if(d&&!L&&typeof d=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&_n(d)||(a.isFileList(d)||a.endsWith(m,"[]"))&&(S=a.toArray(d)))return m=Me(m),S.forEach(function(oe,Qr){!(a.isUndefined(oe)||oe===null)&&t.append(i===!0?ze([m],Qr,o):i===null?m:m+"[]",u(oe))}),!1}return le(d)?!0:(t.append(ze(L,m,o),u(d)),!1)}const h=[],A=Object.assign(Cn,{defaultVisitor:l,convertValue:u,isVisitable:le});function w(d,m){if(!a.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(d),a.forEach(d,function(S,U){(!(a.isUndefined(S)||S===null)&&s.call(t,S,a.isString(U)?U.trim():U,m,A))===!0&&w(S,m?m.concat(U):[U])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return w(e),t}function He(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function fe(e,t){this._pairs=[],e&&G(e,this,t)}const Ie=fe.prototype;Ie.append=function(t,n){this._pairs.push([t,n])},Ie.toString=function(t){const n=t?function(r){return t.call(this,r,He)}:He;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function On(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Je(e,t,n){if(!t)return e;const r=n&&n.encode||On,s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new fe(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Ln{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const qe=Ln,We={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nn=typeof URLSearchParams<"u"?URLSearchParams:fe,xn=typeof FormData<"u"?FormData:null,$n=typeof Blob<"u"?Blob:null,Pn=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Dn=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),R={isBrowser:!0,classes:{URLSearchParams:Nn,FormData:xn,Blob:$n},isStandardBrowserEnv:Pn,isStandardBrowserWebWorkerEnv:Dn,protocols:["http","https","file","blob","url","data"]};function kn(e,t){return G(e,new R.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return R.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Fn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Un(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Ke(e){function t(n,r,s,o){let i=n[o++];const c=Number.isFinite(+i),f=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,f?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Un(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Fn(r),s,n,0)}),n}return null}function jn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const de={transitional:We,adapter:R.isNode?"http":"xhr",transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s&&s?JSON.stringify(Ke(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return kn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return G(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),jn(t)):t}],transformResponse:[function(t){const n=this.transitional||de.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:R.classes.FormData,Blob:R.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{de.headers[e]={}});const pe=de,Bn=a.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"]),Mn=e=>{const t={};let n,r,s;return e&&e.split(`
2
- `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Bn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ve=Symbol("internals");function H(e){return e&&String(e).trim().toLowerCase()}function Q(e){return e===!1||e==null?e:a.isArray(e)?e.map(Q):String(e)}function zn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Hn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function he(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function In(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Jn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let X=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,f,u){const l=H(f);if(!l)throw new Error("header name must be a non-empty string");const h=a.findKey(s,l);(!h||s[h]===void 0||u===!0||u===void 0&&s[h]!==!1)&&(s[h||f]=Q(c))}const i=(c,f)=>a.forEach(c,(u,l)=>o(u,l,f));return a.isPlainObject(t)||t instanceof this.constructor?i(t,n):a.isString(t)&&(t=t.trim())&&!Hn(t)?i(Mn(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=H(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return zn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=H(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||he(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=H(i),i){const c=a.findKey(r,i);c&&(!n||he(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||he(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=Q(s),delete n[o];return}const c=t?In(o):String(o).trim();c!==o&&delete n[o],n[c]=Q(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Ve]=this[Ve]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=H(i);r[c]||(Jn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};X.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(X.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),a.freezeMethods(X);const C=X;function me(e,t){const n=this||pe,r=t||n,s=C.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ye(e){return!!(e&&e.__CANCEL__)}function I(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(I,y,{__CANCEL__:!0});function qn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Wn=R.isStandardBrowserEnv?function(){return{write:function(n,r,s,o,i,c){const f=[];f.push(n+"="+encodeURIComponent(r)),a.isNumber(s)&&f.push("expires="+new Date(s).toGMTString()),a.isString(o)&&f.push("path="+o),a.isString(i)&&f.push("domain="+i),c===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Kn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Vn(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ge(e,t){return e&&!Kn(t)?Vn(e,t):t}const Yn=R.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=a.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function Gn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Qn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(f){const u=Date.now(),l=r[o];i||(i=u),n[s]=f,r[s]=u;let h=o,A=0;for(;h!==s;)A+=n[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const w=l&&u-l;return w?Math.round(A*1e3/w):void 0}}function Qe(e,t){let n=0;const r=Qn(50,250);return s=>{const o=s.loaded,i=s.lengthComputable?s.total:void 0,c=o-n,f=r(c),u=o<=i;n=o;const l={loaded:o,total:i,progress:i?o/i:void 0,bytes:c,rate:f||void 0,estimated:f&&i&&u?(i-o)/f:void 0,event:s};l[t?"download":"upload"]=!0,e(l)}}const Z={http:Sn,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let s=e.data;const o=C.from(e.headers).normalize(),i=e.responseType;let c;function f(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}a.isFormData(s)&&(R.isStandardBrowserEnv||R.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const w=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(w+":"+d))}const l=Ge(e.baseURL,e.url);u.open(e.method.toUpperCase(),Je(l,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function h(){if(!u)return;const w=C.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),m={data:!i||i==="text"||i==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:w,config:e,request:u};qn(function(S){n(S),f()},function(S){r(S),f()},m),u=null}if("onloadend"in u?u.onloadend=h:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(h)},u.onabort=function(){u&&(r(new y("Request aborted",y.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new y("Network Error",y.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let d=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||We;e.timeoutErrorMessage&&(d=e.timeoutErrorMessage),r(new y(d,m.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,u)),u=null},R.isStandardBrowserEnv){const w=(e.withCredentials||Yn(l))&&e.xsrfCookieName&&Wn.read(e.xsrfCookieName);w&&o.set(e.xsrfHeaderName,w)}s===void 0&&o.setContentType(null),"setRequestHeader"in u&&a.forEach(o.toJSON(),function(d,m){u.setRequestHeader(m,d)}),a.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),i&&i!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",Qe(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Qe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=w=>{u&&(r(!w||w.type?new I(null,e,u):w),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const A=Gn(l);if(A&&R.protocols.indexOf(A)===-1){r(new y("Unsupported protocol "+A+":",y.ERR_BAD_REQUEST,e));return}u.send(s||null)})}};a.forEach(Z,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Xe={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let s=0;s<t&&(n=e[s],!(r=a.isString(n)?Z[n.toLowerCase()]:n));s++);if(!r)throw r===!1?new y(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(a.hasOwnProp(Z,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!a.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Z};function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new I(null,e)}function Ze(e){return ye(e),e.headers=C.from(e.headers),e.data=me.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Xe.getAdapter(e.adapter||pe.adapter)(e).then(function(r){return ye(e),r.data=me.call(e,e.transformResponse,r),r.headers=C.from(r.headers),r},function(r){return Ye(r)||(ye(e),r&&r.response&&(r.response.data=me.call(e,e.transformResponse,r.response),r.response.headers=C.from(r.response.headers))),Promise.reject(r)})}const et=e=>e instanceof C?e.toJSON():e;function $(e,t){t=t||{};const n={};function r(u,l,h){return a.isPlainObject(u)&&a.isPlainObject(l)?a.merge.call({caseless:h},u,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(u,l,h){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u,h)}else return r(u,l,h)}function o(u,l){if(!a.isUndefined(l))return r(void 0,l)}function i(u,l){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function c(u,l,h){if(h in t)return r(u,l);if(h in e)return r(void 0,u)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(u,l)=>s(et(u),et(l),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(l){const h=f[l]||s,A=h(e[l],t[l],l);a.isUndefined(A)&&h!==c||(n[l]=A)}),n}const tt="1.5.0",ge={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ge[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const nt={};ge.transitional=function(t,n,r){function s(o,i){return"[Axios v"+tt+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new y(s(i," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!nt[i]&&(nt[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};function Xn(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],f=c===void 0||i(c,o,e);if(f!==!0)throw new y("option "+o+" must be "+f,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+o,y.ERR_BAD_OPTION)}}const we={assertOptions:Xn,validators:ge},N=we.validators;let ee=class{constructor(t){this.defaults=t,this.interceptors={request:new qe,response:new qe}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&we.assertOptions(r,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:we.assertOptions(s,{encode:N.function,serialize:N.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=C.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(f=f&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let l,h=0,A;if(!f){const d=[Ze.bind(this),void 0];for(d.unshift.apply(d,c),d.push.apply(d,u),A=d.length,l=Promise.resolve(n);h<A;)l=l.then(d[h++],d[h++]);return l}A=c.length;let w=n;for(h=0;h<A;){const d=c[h++],m=c[h++];try{w=d(w)}catch(L){m.call(this,L);break}}try{l=Ze.call(this,w)}catch(d){return Promise.reject(d)}for(h=0,A=u.length;h<A;)l=l.then(u[h++],u[h++]);return l}getUri(t){t=$(this.defaults,t);const n=Ge(t.baseURL,t.url);return Je(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(n,r){return this.request($(r||{},{method:t,url:n,data:(r||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request($(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}ee.prototype[t]=n(),ee.prototype[t+"Form"]=n(!0)});const te=ee,Zn=class Ot{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new I(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ot(function(s){t=s}),cancel:t}}};function er(e){return function(n){return e.apply(null,n)}}function tr(e){return a.isObject(e)&&e.isAxiosError===!0}const be={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};Object.entries(be).forEach(([e,t])=>{be[t]=e});const nr=be;function rt(e){const t=new te(e),n=Oe(te.prototype.request,t);return a.extend(n,te.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return rt($(e,s))},n}const E=rt(pe);E.Axios=te,E.CanceledError=I,E.CancelToken=Zn,E.isCancel=Ye,E.VERSION=tt,E.toFormData=G,E.AxiosError=y,E.Cancel=E.CanceledError,E.all=function(t){return Promise.all(t)},E.spread=er,E.isAxiosError=tr,E.mergeConfig=$,E.AxiosHeaders=C,E.formToJSON=e=>Ke(a.isHTMLForm(e)?new FormData(e):e),E.getAdapter=Xe.getAdapter,E.HttpStatusCode=nr,E.default=E;const st=E,{Axios:ns,AxiosError:rr,CanceledError:rs,isCancel:ss,CancelToken:os,VERSION:is,all:as,Cancel:cs,isAxiosError:us,spread:ls,toFormData:fs,AxiosHeaders:ds,HttpStatusCode:ps,formToJSON:hs,getAdapter:ms,mergeConfig:ys}=st,ot=st.create({headers:{"Content-Type":"application/json"}}),O=async(e,...t)=>{try{return await ot[e](...t)}catch(n){if(!(n instanceof rr)||!n.response)throw n;const r=n.response;let s="";switch(r.status){case 400:s="Check parameters or API token";break;case 401:s="You must be logged before using this function, use `auth.login(token)`";break;case 403:s="You dont have enough permissions";break;case 404:s="Check parameters";break;case 409:s="Request conflit with current state";break;case 500:s="Something went wrong with server";break}throw s=`${n.code} (${r.status}) - ${s}: ${r.data.content.message}`,new Error(s)}},p=Object.assign(ot,{$get:async(...e)=>(await O("get",...e)).data,$post:async(...e)=>(await O("post",...e)).data,$put:async(...e)=>(await O("put",...e)).data,$patch:async(...e)=>(await O("patch",...e)).data,$delete:async(...e)=>(await O("delete",...e)).data}),it=e=>({...e,createdAt:b(e.createdAt),updatedAt:e.updatedAt?b(e.updatedAt):void 0}),sr=e=>({...e,namespace:it(e.namespace),createdAt:b(e.createdAt),updatedAt:e.updatedAt?b(e.updatedAt):void 0}),or=e=>({...e,memberships:e.memberships.map(sr),createdAt:b(e.createdAt),updatedAt:e.updatedAt?b(e.updatedAt):void 0}),at=e=>{p.defaults.headers.common.authorization=`Bearer ${e}`},ct=()=>{p.defaults.headers.common.authorization=void 0},ut=()=>{const e=p.defaults.headers.common.authorization;if(!e||typeof e!="string")return!1;const[,t]=e.split("Bearer ");return!!t},ir=Object.freeze(Object.defineProperty({__proto__:null,getCurrentNamespaces:()=>p.$get("/me/namespaces"),getCurrentPermissions:()=>p.$get("/me/permissions"),getCurrentUser:async()=>{const{content:e,...t}=await p.$get("/me");return{...t,content:or(e)}},isLogged:ut,login:at,logout:ct},Symbol.toStringTag,{value:"Module"})),P=e=>({...e,nextRun:e.nextRun?b(e.nextRun):void 0,lastRun:e.lastRun?b(e.lastRun):void 0}),ar=Object.freeze(Object.defineProperty({__proto__:null,forceCron:async e=>{const t=typeof e=="string"?e:e.name,{content:n,...r}=await p.$post(`/crons/${t}/force`,{});return{...r,content:P(n)}},getAllCrons:async()=>{const{content:e,...t}=await p.$get("/crons");return{...t,content:e.map(P)}},getCron:async e=>{const t=typeof e=="string"?e:e.name,{content:n,...r}=await p.$get(`/crons/${t}`);return{...r,content:P(n)}},startCron:async e=>{const t=typeof e=="string"?e:e.name,{content:n,...r}=await p.$put(`/crons/${t}/start`,{});return{...r,content:P(n)}},stopCron:async e=>{const t=typeof e=="string"?e:e.name,{content:n,...r}=await p.$put(`/crons/${t}/stop`,{});return{...r,content:P(n)}},updateCron:async e=>{const{name:t,...n}=e,{content:r,...s}=await p.$patch(`/crons/${t}`,n);return{...s,content:P(r)}}},Symbol.toStringTag,{value:"Module"})),lt=()=>p.$get("/health"),cr=()=>p.$get("/health/all"),ft=e=>p.$get(`/health/${e}`),ur=Object.freeze(Object.defineProperty({__proto__:null,checkAllConnectedService:cr,checkConnectedService:ft,checkCurrentService:async()=>{const{content:{current:e}}=await lt();return ft(e)},getAllConnectedServices:lt},Symbol.toStringTag,{value:"Module"}));var dt=(e=>(e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.QUARTERLY="QUARTERLY",e.BIENNIAL="BIENNIAL",e.YEARLY="YEARLY",e))(dt||{});const ne=e=>({...e,nextRun:b(e.nextRun),lastRun:e.lastRun?b(e.lastRun):void 0,createdAt:b(e.createdAt),updatedAt:e.updatedAt?b(e.updatedAt):void 0}),pt=e=>{const{namespace:t,...n}=e,{namespaceId:r,...s}=ne({namespaceId:t.id,...n});return{...s,namespace:it(t)}},lr=e=>({...e,createdAt:b(e.createdAt)}),fr=e=>({...e,task:pt(e.task),createdAt:b(e.createdAt)}),ht=Object.freeze(Object.defineProperty({__proto__:null,getAllEntries:async(e,t)=>{const{data:{content:n,...r}}=await O("get","/tasks-activity",{params:{namespaces:t,...e??{}}});return{...r,content:n.map(fr)}}},Symbol.toStringTag,{value:"Module"})),dr=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Ee=e=>({...e,added:b(e.added),started:e.started?b(e.started):void 0,ended:e.ended?b(e.ended):void 0}),pr=()=>p.$get("/queues"),hr=async e=>{const t=typeof e=="string"?e:e.name;return p.$get(`/queues/${t}`)},mr=async e=>{const{name:t,...n}=e;return p.$patch(`/queues/${t}`,n)},yr=async e=>{const t=typeof e=="string"?e:e.name;return p.$put(`/queues/${t}/pause`)},gr=async e=>{const t=typeof e=="string"?e:e.name;return p.$put(`/queues/${t}/resume`)},wr=async(e,t)=>{const n=typeof e=="string"?e:e.name,{data:{content:r,...s}}=await O("get",`/queues/${n}/jobs`,{params:t});return{...s,content:r.map(Ee)}},J=async(e,t,n)=>{const r=typeof e=="string"?e:e.name,s=typeof t=="string"||typeof t=="number"?t:t.id,{content:o,...i}=await p.$get(`/queues/${r}/jobs/${s}`,{params:{namespaces:n}});return{...i,content:Ee(o)}},br=Object.freeze(Object.defineProperty({__proto__:null,getAllQueues:pr,getJob:J,getQueue:hr,getQueueJobs:wr,pauseQueue:yr,resumeQueue:gr,retryJob:async(e,t,n)=>{const r=typeof e=="string"?e:e.name,s=typeof t=="string"||typeof t=="number"?t:t.id,{content:o,...i}=await p.$post(`/queues/${r}/jobs/${s}/retry`,{params:{namespaces:n}});return{...i,content:Ee(o)}},updateQueue:mr},Symbol.toStringTag,{value:"Module"}));function Er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ve={exports:{}},D=typeof Reflect=="object"?Reflect:null,mt=D&&typeof D.apply=="function"?D.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},re;D&&typeof D.ownKeys=="function"?re=D.ownKeys:Object.getOwnPropertySymbols?re=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:re=function(t){return Object.getOwnPropertyNames(t)};function vr(e){console&&console.warn&&console.warn(e)}var yt=Number.isNaN||function(t){return t!==t};function g(){g.init.call(this)}ve.exports=g,ve.exports.once=Sr,g.EventEmitter=g,g.prototype._events=void 0,g.prototype._eventsCount=0,g.prototype._maxListeners=void 0;var gt=10;function se(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(g,"defaultMaxListeners",{enumerable:!0,get:function(){return gt},set:function(e){if(typeof e!="number"||e<0||yt(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");gt=e}}),g.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},g.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||yt(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function wt(e){return e._maxListeners===void 0?g.defaultMaxListeners:e._maxListeners}g.prototype.getMaxListeners=function(){return wt(this)},g.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var s=t==="error",o=this._events;if(o!==void 0)s=s&&o.error===void 0;else if(!s)return!1;if(s){var i;if(n.length>0&&(i=n[0]),i instanceof Error)throw i;var c=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw c.context=i,c}var f=o[t];if(f===void 0)return!1;if(typeof f=="function")mt(f,this,n);else for(var u=f.length,l=Tt(f,u),r=0;r<u;++r)mt(l[r],this,n);return!0};function bt(e,t,n,r){var s,o,i;if(se(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),i===void 0)i=o[t]=n,++e._eventsCount;else if(typeof i=="function"?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),s=wt(e),s>0&&i.length>s&&!i.warned){i.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=i.length,vr(c)}return e}g.prototype.addListener=function(t,n){return bt(this,t,n,!1)},g.prototype.on=g.prototype.addListener,g.prototype.prependListener=function(t,n){return bt(this,t,n,!0)};function Ar(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Et(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},s=Ar.bind(r);return s.listener=n,r.wrapFn=s,s}g.prototype.once=function(t,n){return se(n),this.on(t,Et(this,t,n)),this},g.prototype.prependOnceListener=function(t,n){return se(n),this.prependListener(t,Et(this,t,n)),this},g.prototype.removeListener=function(t,n){var r,s,o,i,c;if(se(n),s=this._events,s===void 0)return this;if(r=s[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete s[t],s.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===n||r[i].listener===n){c=r[i].listener,o=i;break}if(o<0)return this;o===0?r.shift():Tr(r,o),r.length===1&&(s[t]=r[0]),s.removeListener!==void 0&&this.emit("removeListener",t,c||n)}return this},g.prototype.off=g.prototype.removeListener,g.prototype.removeAllListeners=function(t){var n,r,s;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var o=Object.keys(r),i;for(s=0;s<o.length;++s)i=o[s],i!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(s=n.length-1;s>=0;s--)this.removeListener(t,n[s]);return this};function vt(e,t,n){var r=e._events;if(r===void 0)return[];var s=r[t];return s===void 0?[]:typeof s=="function"?n?[s.listener||s]:[s]:n?Rr(s):Tt(s,s.length)}g.prototype.listeners=function(t){return vt(this,t,!0)},g.prototype.rawListeners=function(t){return vt(this,t,!1)},g.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):At.call(e,t)},g.prototype.listenerCount=At;function At(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}g.prototype.eventNames=function(){return this._eventsCount>0?re(this._events):[]};function Tt(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function Tr(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function Rr(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function Sr(e,t){return new Promise(function(n,r){function s(i){e.removeListener(t,o),r(i)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",s),n([].slice.call(arguments))}Rt(e,t,o,{once:!0}),t!=="error"&&_r(e,s,{once:!0})})}function _r(e,t,n){typeof e.on=="function"&&Rt(e,"error",t,n)}function Rt(e,t,n,r){if(typeof e.on=="function")r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function s(o){r.once&&e.removeEventListener(t,s),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Cr=ve.exports;const Or=Er(Cr),Lr=(e,t=new Or)=>{const n={emit:(o,...i)=>(t.emit(o.toString(),...i),n)},r=e(n),s=Object.assign(r,{on:(o,i)=>(t.on(o.toString(),(...c)=>i(...c)),s),once:(o,i)=>(t.once(o.toString(),(...c)=>i(...c)),s),off:(o,i)=>(t.off(o.toString(),(...c)=>i(...c)),s)});return s},Nr=e=>new Promise(t=>{setTimeout(t,e)}),xr=e=>({start:b(e.start),end:b(e.end)}),$r=e=>({...e,createdAt:b(e.createdAt),destroyAt:b(e.destroyAt),period:e.period?xr(e.period):void 0}),Ae=e=>({...e,detail:$r(e.detail)}),St=(e,t,n)=>{var s,o;const r=typeof e=="string"?e:e.id;return p.$post(`/tasks/${r}/_run`,null,{params:{test_emails:t==null?void 0:t.testEmails,period_start:(s=t==null?void 0:t.period)==null?void 0:s.start,period_end:(o=t==null?void 0:t.period)==null?void 0:o.end,namespaces:n}})},Pr=(...e)=>Lr(async t=>{const{content:{id:n,queue:r}}=await St(...e);t.emit("started",{id:n,queue:r});let s;do{const{content:{progress:o,status:i,result:c}}=await J(r,n,e[2]);s={progress:o,status:i,result:c},t.emit("progress",{progress:o,status:i});let f=1e3;s.status==="active"&&(f=250),await Nr(f)}while(["completed","failed","stuck"].includes(s.status)===!1);if(!s.result)throw new Error("Generation failed with weird error");return Ae(s.result)}),k=async(e,t,n)=>(await O("get",`/reports/${e}`,{responseType:n,params:{namespaces:t}})).data,Dr=Object.freeze(Object.defineProperty({__proto__:null,getReportDebugByJob:async(e,t,n,r)=>{var o;const{content:{result:s}}=await J(e,t,n);if(!s)throw new Error("Job have no result");return k(((o=s.detail)==null?void 0:o.files.debug)??"",n,r)},getReportDebugByName:(e,t,n)=>k(`${e}.deb.json`,t,n),getReportDetailByJob:async(e,t,n,r)=>{var i;const{content:{result:s}}=await J(e,t,n);if(!s)throw new Error("Job have no result");const o=await k(((i=s.detail)==null?void 0:i.files.detail)??"",n,r);return!r||r==="json"?Ae(o):o},getReportDetailByName:async(e,t,n)=>{const r=await k(`${e}.det.json`,t,n);return!n||n==="json"?Ae(r):r},getReportFileByJob:async(e,t,n,r)=>{var o;const{content:{result:s}}=await J(e,t,n);if(!s)throw new Error("Job have no result");return k(((o=s.detail)==null?void 0:o.files.report)??"",n,r)},getReportFileByName:(e,t,n,r="pdf")=>k(`${e}.rep.${r}`,t,n),startAndListenGeneration:Pr,startGeneration:St},Symbol.toStringTag,{value:"Module"})),kr=Object.freeze(Object.defineProperty({__proto__:null,isLogged:ut,isURLset:()=>!!p.defaults.baseURL,login:at,logout:ct,setURL:e=>{p.defaults.baseURL=e},unsetURL:()=>{p.defaults.baseURL=void 0}},Symbol.toStringTag,{value:"Module"})),Te=e=>({...e,createdAt:b(e.createdAt),updatedAt:e.updatedAt?b(e.updatedAt):void 0}),Re=e=>{const{body:t,tasks:n,...r}=e;return{...Te(r),tasks:n.map(ne),body:t}},Fr=async()=>{const{content:e,...t}=await p.$get("/templates");return{...t,content:e.map(Te)}},Ur=async e=>{const t=typeof e=="string"?e:e.id,{content:n,...r}=await p.$get(`/templates/${t}`);return{...r,content:Re(n)}},jr=async e=>{const{content:t,...n}=await p.$post("/templates",e);return{...n,content:Re(t)}},_t=async e=>{const{id:t,...n}=e,{content:r,...s}=await p.$put(`/templates/${t}`,n);return{...s,content:Re(r)}},Br=_t,Mr=async e=>{const t=typeof e=="string"?e:e.id;await p.$delete(`/templates/${t}`)},F=e=>{const{activity:t,template:n,targets:r,extends:s,...o}=e;return{...pt(o),extends:Te(s),activity:t.map(lr),template:n,targets:r}},zr=async(e,t)=>{const{data:{content:n,...r}}=await O("get","/tasks",{params:{namespaces:t,...e??{}}});return{...r,content:n.map(({tags:s,...o})=>({tags:s,...ne(o)}))}},Hr=e=>p.$get("/tasks/_targets",{params:{namespaces:e}}),Ir=async(e,t)=>{const{content:n,...r}=await p.$get(`/tasks/_targets/${e}/tasks`,{params:{namespaces:t}});return{...r,content:n.map(({tags:s,...o})=>({tags:s,...ne(o)}))}},Jr=async(e,t,n)=>{const r=typeof t=="string"?t:t.id;await p.$delete(`/tasks/_targets/${e}/tasks/${r}`,{params:{namespaces:n}})},qr=async(e,t)=>{const{content:n,...r}=await p.$post("/tasks",e,{params:{namespaces:t}});return{...r,content:F(n)}},Wr=async(e,t)=>{const n=typeof e=="string"?e:e.id,{content:r,...s}=await p.$get(`/tasks/${n}`,{params:{namespaces:t}});return{...s,content:F(r)}},Ct=async(e,t)=>{const{id:n,...r}=e,{content:s,...o}=await p.$put(`/tasks/${n}`,r,{params:{namespaces:t}});return{...o,content:F(s)}},Kr=Object.freeze(Object.defineProperty({__proto__:null,Recurrence:dt,createTask:qr,deleteTask:async(e,t)=>{const n=typeof e=="string"?e:e.id;await p.$delete(`/tasks/${n}`,{params:{namespaces:t}})},disableTask:async(e,t)=>{const n=typeof e=="string"?e:e.id,{content:r,...s}=await p.$put(`/tasks/${n}/_disable`,void 0,{params:{namespaces:t}});return{...s,content:F(r)}},enableTask:async(e,t)=>{const n=typeof e=="string"?e:e.id,{content:r,...s}=await p.$put(`/tasks/${n}/_enable`,void 0,{params:{namespaces:t}});return{...s,content:F(r)}},getAllTargets:Hr,getAllTasks:zr,getTask:Wr,getTasksOfTarget:Ir,linkTaskToTemplate:async(e,t,n)=>{const r=typeof e=="string"?e:e.id,s=typeof t=="string"?t:t.id,{content:o,...i}=await p.$put(`/tasks/${r}/_link/${s}`,void 0,{params:{namespaces:n}});return{...i,content:F(o)}},unlinkTaskToTemplate:async(e,t,n)=>{const r=typeof e=="string"?e:e.id,s=typeof t=="string"?t:t.id;await p.$delete(`/tasks/${r}/_link/${s}`,{params:{namespaces:n}})},unsubTargetOfTask:Jr,updateTask:Ct,upsertTask:Ct},Symbol.toStringTag,{value:"Module"})),Vr=Object.freeze(Object.defineProperty({__proto__:null,createTemplate:jr,deleteTemplate:Mr,getAllTemplates:Fr,getTemplate:Ur,updateTemplate:Br,upsertTemplate:_t},Symbol.toStringTag,{value:"Module"})),Yr=Object.freeze(Object.defineProperty({__proto__:null,getAllIndices:e=>p.$get("/elastic/indices",{params:{namespace:e}}),getIndexMapping:(e,t)=>p.$get(`/elastic/indices/${e}`,{params:{namespace:t}})},Symbol.toStringTag,{value:"Module"})),Gr="1.0.0-beta.9";v.auth=ir,v.crons=ar,v.elastic=Yr,v.health=ur,v.history=ht,v.namespaces=dr,v.queues=br,v.reports=Dr,v.setup=kr,v.tasks=Kr,v.tasksActivity=ht,v.templates=Vr,v.version=Gr,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
1
+ (function(p,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],m):(p=typeof globalThis<"u"?globalThis:p||self,m(p.ezReeportSDK={},p.axios))})(this,function(p,m){"use strict";const se="1.0.0";function u(e,t){const n=(t==null?void 0:t.additionalDigits)??2,s=ie(e);let r;if(s.date){const d=ce(s.date,n);r=ue(d.restDateString,d.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);const o=r.getTime();let a=0,l;if(s.time&&(a=le(s.time),isNaN(a)))return new Date(NaN);if(s.timezone){if(l=de(s.timezone),isNaN(l))return new Date(NaN)}else{const d=new Date(o+a),g=new Date(0);return g.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),g.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),g}return new Date(o+a+l)}const T={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},re=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,oe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ae=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ie(e){const t={},n=e.split(T.dateTimeDelimiter);let s;if(n.length>2)return t;if(/:/.test(n[0])?s=n[0]:(t.date=n[0],s=n[1],T.timeZoneDelimiter.test(t.date)&&(t.date=e.split(T.timeZoneDelimiter)[0],s=e.substr(t.date.length,e.length))),s){const r=T.timezone.exec(s);r?(t.time=s.replace(r[1],""),t.timezone=r[1]):t.time=s}return t}function ce(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),s=e.match(n);if(!s)return{year:NaN,restDateString:""};const r=s[1]?parseInt(s[1]):null,o=s[2]?parseInt(s[2]):null;return{year:o===null?r:o*100,restDateString:e.slice((s[1]||s[2]).length)}}function ue(e,t){if(t===null)return new Date(NaN);const n=e.match(re);if(!n)return new Date(NaN);const s=!!n[4],r=w(n[1]),o=w(n[2])-1,a=w(n[3]),l=w(n[4]),d=w(n[5])-1;if(s)return me(t,l,d)?pe(t,l,d):new Date(NaN);{const g=new Date(0);return!ge(t,o,a)||!ye(t,r)?new Date(NaN):(g.setUTCFullYear(t,o,Math.max(r,a)),g)}}function w(e){return e?parseInt(e):1}function le(e){const t=e.match(oe);if(!t)return NaN;const n=k(t[1]),s=k(t[2]),r=k(t[3]);return ve(n,s,r)?n*36e5+s*6e4+r*1e3:NaN}function k(e){return e&&parseFloat(e.replace(",","."))||0}function de(e){if(e==="Z")return 0;const t=e.match(ae);if(!t)return 0;const n=t[1]==="+"?-1:1,s=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return he(s,r)?n*(s*36e5+r*6e4):NaN}function pe(e,t,n){const s=new Date(0);s.setUTCFullYear(e,0,4);const r=s.getUTCDay()||7,o=(t-1)*7+n+1-r;return s.setUTCDate(s.getUTCDate()+o),s}const fe=[31,null,31,30,31,30,31,31,30,31,30,31];function j(e){return e%400===0||e%4===0&&e%100!==0}function ge(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(fe[t]||(j(e)?29:28))}function ye(e,t){return t>=1&&t<=(j(e)?366:365)}function me(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function ve(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function he(e,t){return t>=0&&t<=59}const N=m.create({headers:{"Content-Type":"application/json"}}),f=async(e,...t)=>{try{return await N[e](...t)}catch(n){if(!(n instanceof m.AxiosError)||!n.response)throw n;const s=n.response;let r="";switch(s.status){case 400:r="Check parameters or API token";break;case 401:r="You must be logged before using this function, use `auth.login(token)`";break;case 403:r="You dont have enough permissions";break;case 404:r="Check parameters";break;case 409:r="Request conflit with current state";break;case 500:r="Something went wrong with server";break}throw r=`${n.code} (${s.status}) - ${r}: ${s.data.content.message}`,new Error(r)}},i=Object.assign(N,{$get:async(...e)=>(await f("get",...e)).data,$post:async(...e)=>(await f("post",...e)).data,$put:async(...e)=>(await f("put",...e)).data,$patch:async(...e)=>(await f("patch",...e)).data,$delete:async(...e)=>(await f("delete",...e)).data}),M=e=>({...e,createdAt:u(e.createdAt),updatedAt:e.updatedAt?u(e.updatedAt):void 0}),be=e=>({...e,namespace:M(e.namespace),createdAt:u(e.createdAt),updatedAt:e.updatedAt?u(e.updatedAt):void 0}),we=e=>({...e,memberships:(e==null?void 0:e.memberships.map(be))??[],createdAt:u(e.createdAt),updatedAt:e!=null&&e.updatedAt?u(e.updatedAt):void 0}),x=e=>{i.defaults.headers.common.authorization=`Bearer ${e}`},U=()=>{i.defaults.headers.common.authorization=void 0},z=()=>{const e=i.defaults.headers.common.authorization;if(!e||typeof e!="string")return!1;const[,t]=e.split("Bearer ");return!!t},_e=Object.freeze(Object.defineProperty({__proto__:null,getCurrentNamespaces:()=>i.$get("/me/namespaces"),getCurrentPermissions:()=>i.$get("/me/permissions"),getCurrentUser:async()=>{const{content:e,...t}=await i.$get("/me");return{...t,content:we(e)}},isLogged:z,login:x,logout:U},Symbol.toStringTag,{value:"Module"})),v=e=>({...e,nextRun:e.nextRun?u(e.nextRun):void 0,lastRun:e.lastRun?u(e.lastRun):void 0}),Te=Object.freeze(Object.defineProperty({__proto__:null,forceCron:async e=>{const t=typeof e=="string"?e:e.name,{content:n,...s}=await i.$post(`/crons/${t}/_force`,{});return{...s,content:v(n)}},getAllCrons:async()=>{const{content:e,...t}=await i.$get("/crons");return{...t,content:e.map(v)}},getCron:async e=>{const t=typeof e=="string"?e:e.name,{content:n,...s}=await i.$get(`/crons/${t}`);return{...s,content:v(n)}},startCron:async e=>{const t=typeof e=="string"?e:e.name,{content:n,...s}=await i.$put(`/crons/${t}/start`,{});return{...s,content:v(n)}},stopCron:async e=>{const t=typeof e=="string"?e:e.name,{content:n,...s}=await i.$put(`/crons/${t}/stop`,{});return{...s,content:v(n)}},updateCron:async e=>{const{name:t,...n}=e,{content:s,...r}=await i.$patch(`/crons/${t}`,n);return{...r,content:v(s)}}},Symbol.toStringTag,{value:"Module"})),Y=()=>i.$get("/health"),$e=()=>i.$get("/health/_all"),F=e=>i.$get(`/health/${e}`),Ae=Object.freeze(Object.defineProperty({__proto__:null,checkAllConnectedService:$e,checkConnectedService:F,checkCurrentService:async()=>{const{content:{current:e}}=await Y();return F(e)},getAllConnectedServices:Y},Symbol.toStringTag,{value:"Module"}));var B=(e=>(e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.QUARTERLY="QUARTERLY",e.BIENNIAL="BIENNIAL",e.YEARLY="YEARLY",e))(B||{});const $=e=>({...e,nextRun:u(e.nextRun),lastRun:e.lastRun?u(e.lastRun):void 0,createdAt:u(e.createdAt),updatedAt:e.updatedAt?u(e.updatedAt):void 0}),J=e=>{const{namespace:t,...n}=e,{namespaceId:s,...r}=$({namespaceId:t.id,...n});return{...r,namespace:M(t)}},Le=e=>({...e,createdAt:u(e.createdAt)}),ke=e=>({...e,task:J(e.task),createdAt:u(e.createdAt)}),W=Object.freeze(Object.defineProperty({__proto__:null,getAllEntries:async(e,t)=>{const{data:{content:n,...s}}=await f("get","/tasks-activity",{params:{namespaces:t,...e??{}}});return{...s,content:n.map(ke)}}},Symbol.toStringTag,{value:"Module"})),Re=e=>({...e,createdAt:u(e.createdAt),updatedAt:e.updatedAt?u(e.updatedAt):void 0}),R=e=>({...e,createdAt:u(e.createdAt),updatedAt:e.updatedAt?u(e.updatedAt):void 0}),Ce=Object.freeze(Object.defineProperty({__proto__:null,createTasksPreset:async e=>{const{content:t,...n}=await i.$post("/tasks-presets/",e);return{...n,content:R(t)}},deleteTasksPreset:async e=>{const t=typeof e=="string"?e:e.id;await i.$delete(`/tasks-presets/${t}`)},getAllTasksPresets:async()=>{const{content:e,...t}=await i.$get("/tasks-presets");return{...t,content:e.map(Re)}},getTasksPreset:async e=>{const t=typeof e=="string"?e:e.id,{content:n,...s}=await i.$get(`/tasks-presets/${t}`);return{...s,content:R(n)}},upsertTasksPreset:async e=>{const{id:t,...n}=e,{content:s,...r}=await i.$put(`/tasks-presets/${t}`,n);return{...r,content:R(s)}}},Symbol.toStringTag,{value:"Module"})),Ee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),C=e=>({...e,added:u(e.added),started:e.started?u(e.started):void 0,ended:e.ended?u(e.ended):void 0}),De=()=>i.$get("/queues"),Se=async e=>{const t=typeof e=="string"?e:e.name;return i.$get(`/queues/${t}`)},Pe=async e=>{const{name:t,...n}=e;return i.$patch(`/queues/${t}`,n)},je=async e=>{const t=typeof e=="string"?e:e.name;return i.$put(`/queues/${t}/pause`)},Ne=async e=>{const t=typeof e=="string"?e:e.name;return i.$put(`/queues/${t}/resume`)},Me=async(e,t)=>{const n=typeof e=="string"?e:e.name,{data:{content:s,...r}}=await f("get",`/queues/${n}/jobs`,{params:t});return{...r,content:s.map(C)}},_=async(e,t,n)=>{const s=typeof e=="string"?e:e.name,r=typeof t=="string"||typeof t=="number"?t:t.id,{content:o,...a}=await i.$get(`/queues/${s}/jobs/${r}`,{params:{namespaces:n}});return{...a,content:C(o)}},xe=Object.freeze(Object.defineProperty({__proto__:null,getAllQueues:De,getJob:_,getQueue:Se,getQueueJobs:Me,pauseQueue:je,resumeQueue:Ne,retryJob:async(e,t,n)=>{const s=typeof e=="string"?e:e.name,r=typeof t=="string"||typeof t=="number"?t:t.id,{content:o,...a}=await i.$post(`/queues/${s}/jobs/${r}/_retry`,{params:{namespaces:n}});return{...a,content:C(o)}},updateQueue:Pe},Symbol.toStringTag,{value:"Module"}));function Ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E={exports:{}},h=typeof Reflect=="object"?Reflect:null,O=h&&typeof h.apply=="function"?h.apply:function(t,n,s){return Function.prototype.apply.call(t,n,s)},A;h&&typeof h.ownKeys=="function"?A=h.ownKeys:Object.getOwnPropertySymbols?A=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:A=function(t){return Object.getOwnPropertyNames(t)};function ze(e){console&&console.warn&&console.warn(e)}var H=Number.isNaN||function(t){return t!==t};function c(){c.init.call(this)}E.exports=c,E.exports.once=Je,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var K=10;function L(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return K},set:function(e){if(typeof e!="number"||e<0||H(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");K=e}}),c.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||H(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Q(e){return e._maxListeners===void 0?c.defaultMaxListeners:e._maxListeners}c.prototype.getMaxListeners=function(){return Q(this)},c.prototype.emit=function(t){for(var n=[],s=1;s<arguments.length;s++)n.push(arguments[s]);var r=t==="error",o=this._events;if(o!==void 0)r=r&&o.error===void 0;else if(!r)return!1;if(r){var a;if(n.length>0&&(a=n[0]),a instanceof Error)throw a;var l=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw l.context=a,l}var d=o[t];if(d===void 0)return!1;if(typeof d=="function")O(d,this,n);else for(var g=d.length,yt=V(d,g),s=0;s<g;++s)O(yt[s],this,n);return!0};function q(e,t,n,s){var r,o,a;if(L(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),a===void 0)a=o[t]=n,++e._eventsCount;else if(typeof a=="function"?a=o[t]=s?[n,a]:[a,n]:s?a.unshift(n):a.push(n),r=Q(e),r>0&&a.length>r&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,ze(l)}return e}c.prototype.addListener=function(t,n){return q(this,t,n,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(t,n){return q(this,t,n,!0)};function Ye(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Z(e,t,n){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=Ye.bind(s);return r.listener=n,s.wrapFn=r,r}c.prototype.once=function(t,n){return L(n),this.on(t,Z(this,t,n)),this},c.prototype.prependOnceListener=function(t,n){return L(n),this.prependListener(t,Z(this,t,n)),this},c.prototype.removeListener=function(t,n){var s,r,o,a,l;if(L(n),r=this._events,r===void 0)return this;if(s=r[t],s===void 0)return this;if(s===n||s.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,s.listener||n));else if(typeof s!="function"){for(o=-1,a=s.length-1;a>=0;a--)if(s[a]===n||s[a].listener===n){l=s[a].listener,o=a;break}if(o<0)return this;o===0?s.shift():Fe(s,o),s.length===1&&(r[t]=s[0]),r.removeListener!==void 0&&this.emit("removeListener",t,l||n)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(t){var n,s,r;if(s=this._events,s===void 0)return this;if(s.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):s[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete s[t]),this;if(arguments.length===0){var o=Object.keys(s),a;for(r=0;r<o.length;++r)a=o[r],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=s[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(r=n.length-1;r>=0;r--)this.removeListener(t,n[r]);return this};function I(e,t,n){var s=e._events;if(s===void 0)return[];var r=s[t];return r===void 0?[]:typeof r=="function"?n?[r.listener||r]:[r]:n?Be(r):V(r,r.length)}c.prototype.listeners=function(t){return I(this,t,!0)},c.prototype.rawListeners=function(t){return I(this,t,!1)},c.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):G.call(e,t)},c.prototype.listenerCount=G;function G(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?A(this._events):[]};function V(e,t){for(var n=new Array(t),s=0;s<t;++s)n[s]=e[s];return n}function Fe(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function Be(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function Je(e,t){return new Promise(function(n,s){function r(a){e.removeListener(t,o),s(a)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",r),n([].slice.call(arguments))}X(e,t,o,{once:!0}),t!=="error"&&We(e,r,{once:!0})})}function We(e,t,n){typeof e.on=="function"&&X(e,"error",t,n)}function X(e,t,n,s){if(typeof e.on=="function")s.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function r(o){s.once&&e.removeEventListener(t,r),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Oe=E.exports;const He=Ue(Oe),Ke=(e,t=new He)=>{const n={emit:(o,...a)=>(t.emit(o.toString(),...a),n)},s=e(n),r=Object.assign(s,{on:(o,a)=>(t.on(o.toString(),(...l)=>a(...l)),r),once:(o,a)=>(t.once(o.toString(),(...l)=>a(...l)),r),off:(o,a)=>(t.off(o.toString(),(...l)=>a(...l)),r)});return r},Qe=e=>new Promise(t=>{setTimeout(t,e)}),qe=e=>({start:u(e.start),end:u(e.end)}),Ze=e=>({...e,createdAt:u(e.createdAt),destroyAt:u(e.destroyAt),period:e.period?qe(e.period):void 0}),D=e=>({...e,detail:Ze(e.detail)}),ee=(e,t,n)=>{var r,o;const s=typeof e=="string"?e:e.id;return i.$post(`/tasks/${s}/_run`,null,{params:{test_emails:t==null?void 0:t.testEmails,period_start:(r=t==null?void 0:t.period)==null?void 0:r.start,period_end:(o=t==null?void 0:t.period)==null?void 0:o.end,namespaces:n}})},Ie=(...e)=>Ke(async t=>{const{content:{id:n,queue:s}}=await ee(...e);t.emit("started",{id:n,queue:s});let r;do{const{content:{progress:o,status:a,result:l}}=await _(s,n,e[2]);r={progress:o,status:a,result:l},t.emit("progress",{progress:o,status:a});let d=1e3;r.status==="active"&&(d=250),await Qe(d)}while(["completed","failed","stuck"].includes(r.status)===!1);if(!r.result)throw new Error("Generation failed with weird error");return D(r.result)}),b=async(e,t,n)=>(await f("get",`/reports/${e}`,{responseType:n,params:{namespaces:t}})).data,Ge=Object.freeze(Object.defineProperty({__proto__:null,getReportDebugByJob:async(e,t,n,s)=>{var o;const{content:{result:r}}=await _(e,t,n);if(!r)throw new Error("Job have no result");return b(((o=r.detail)==null?void 0:o.files.debug)??"",n,s)},getReportDebugByName:(e,t,n)=>b(`${e}.deb.json`,t,n),getReportDetailByJob:async(e,t,n,s)=>{var a;const{content:{result:r}}=await _(e,t,n);if(!r)throw new Error("Job have no result");const o=await b(((a=r.detail)==null?void 0:a.files.detail)??"",n,s);return!s||s==="json"?D(o):o},getReportDetailByName:async(e,t,n)=>{const s=await b(`${e}.det.json`,t,n);return!n||n==="json"?D(s):s},getReportFileByJob:async(e,t,n,s)=>{var o;const{content:{result:r}}=await _(e,t,n);if(!r)throw new Error("Job have no result");return b(((o=r.detail)==null?void 0:o.files.report)??"",n,s)},getReportFileByName:(e,t,n,s="pdf")=>b(`${e}.rep.${s}`,t,n),startAndListenGeneration:Ie,startGeneration:ee},Symbol.toStringTag,{value:"Module"})),Ve=Object.freeze(Object.defineProperty({__proto__:null,isLogged:z,isURLset:()=>!!i.defaults.baseURL,login:x,logout:U,setURL:e=>{i.defaults.baseURL=e},unsetURL:()=>{i.defaults.baseURL=void 0}},Symbol.toStringTag,{value:"Module"})),S=e=>({...e,createdAt:u(e.createdAt),updatedAt:e.updatedAt?u(e.updatedAt):void 0}),P=e=>{const{body:t,tasks:n,...s}=e;return{...S(s),tasks:n.map($),body:t}},Xe=async()=>{const{content:e,...t}=await i.$get("/templates");return{...t,content:e.map(S)}},et=async e=>{const t=typeof e=="string"?e:e.id,{content:n,...s}=await i.$get(`/templates/${t}`);return{...s,content:P(n)}},tt=async e=>{const{content:t,...n}=await i.$post("/templates",e);return{...n,content:P(t)}},te=async e=>{const{id:t,...n}=e,{content:s,...r}=await i.$put(`/templates/${t}`,n);return{...r,content:P(s)}},nt=te,st=async e=>{const t=typeof e=="string"?e:e.id;await i.$delete(`/templates/${t}`)},y=e=>{const{activity:t,template:n,targets:s,extends:r,...o}=e;return{...J(o),extends:S(r),activity:t.map(Le),template:n,targets:s}},rt=async(e,t)=>{const{data:{content:n,...s}}=await f("get","/tasks",{params:{namespaces:t,...e??{}}});return{...s,content:n.map(({tags:r,_count:o,...a})=>({tags:r,_count:o,...$(a)}))}},ot=e=>i.$get("/tasks/_targets",{params:{namespaces:e}}),at=async(e,t)=>{const{content:n,...s}=await i.$get(`/tasks/_targets/${e}/tasks`,{params:{namespaces:t}});return{...s,content:n.map(({tags:r,...o})=>({tags:r,...$(o)}))}},it=async(e,t,n)=>{const s=typeof t=="string"?t:t.id;await i.$delete(`/tasks/_targets/${e}/tasks/${s}`,{params:{namespaces:n}})},ct=async(e,t)=>{const{content:n,...s}=await i.$post("/tasks",e,{params:{namespaces:t}});return{...s,content:y(n)}},ut=async(e,t,n)=>{const{content:s,...r}=await i.$post(`/tasks/_from-preset/${e}`,t,{params:{namespaces:n}});return{...r,content:y(s)}},lt=async(e,t)=>{const n=typeof e=="string"?e:e.id,{content:s,...r}=await i.$get(`/tasks/${n}`,{params:{namespaces:t}});return{...r,content:y(s)}},ne=async(e,t)=>{const{id:n,...s}=e,{content:r,...o}=await i.$put(`/tasks/${n}`,s,{params:{namespaces:t}});return{...o,content:y(r)}},dt=Object.freeze(Object.defineProperty({__proto__:null,Recurrence:B,createTask:ct,createTaskFromPreset:ut,deleteTask:async(e,t)=>{const n=typeof e=="string"?e:e.id;await i.$delete(`/tasks/${n}`,{params:{namespaces:t}})},disableTask:async(e,t)=>{const n=typeof e=="string"?e:e.id,{content:s,...r}=await i.$put(`/tasks/${n}/_disable`,void 0,{params:{namespaces:t}});return{...r,content:y(s)}},enableTask:async(e,t)=>{const n=typeof e=="string"?e:e.id,{content:s,...r}=await i.$put(`/tasks/${n}/_enable`,void 0,{params:{namespaces:t}});return{...r,content:y(s)}},getAllTargets:ot,getAllTasks:rt,getTask:lt,getTasksOfTarget:at,linkTaskToTemplate:async(e,t,n)=>{const s=typeof e=="string"?e:e.id,r=typeof t=="string"?t:t.id,{content:o,...a}=await i.$put(`/tasks/${s}/_link/${r}`,void 0,{params:{namespaces:n}});return{...a,content:y(o)}},unlinkTaskToTemplate:async(e,t,n)=>{const s=typeof e=="string"?e:e.id,r=typeof t=="string"?t:t.id;await i.$delete(`/tasks/${s}/_link/${r}`,{params:{namespaces:n}})},unsubTargetOfTask:it,updateTask:ne,upsertTask:ne},Symbol.toStringTag,{value:"Module"})),pt=Object.freeze(Object.defineProperty({__proto__:null,createTemplate:tt,deleteTemplate:st,getAllTemplates:Xe,getTemplate:et,updateTemplate:nt,upsertTemplate:te},Symbol.toStringTag,{value:"Module"})),ft=Object.freeze(Object.defineProperty({__proto__:null,getAllIndices:e=>i.$get("/elastic/indices",{params:{namespace:e}}),getIndexMapping:(e,t)=>i.$get(`/elastic/indices/${e}`,{params:{namespace:t}})},Symbol.toStringTag,{value:"Module"})),gt=se;p.auth=_e,p.crons=Te,p.elastic=ft,p.health=Ae,p.history=W,p.namespaces=Ee,p.queues=xe,p.reports=Ge,p.setup=Ve,p.tasks=dt,p.tasksActivity=W,p.tasksPresets=Ce,p.templates=pt,p.version=gt,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
4
2
  //# sourceMappingURL=ezreeport-sdk-js.umd.js.map