@ezpaarse-project/ezreeport-sdk-js 1.0.0-beta.2 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/ezreeport-sdk-js.mjs +486 -486
- package/dist/browser/ezreeport-sdk-js.mjs.map +1 -1
- package/dist/browser/ezreeport-sdk-js.umd.js +3 -3
- package/dist/browser/ezreeport-sdk-js.umd.js.map +1 -1
- package/dist/node/package.json +7 -7
- package/dist/node/src/lib/utils.js.map +1 -1
- package/dist/node/src/modules/auth.js +1 -1
- package/dist/node/src/modules/auth.js.map +1 -1
- package/dist/node/src/modules/namespaces.js +0 -1
- package/dist/node/src/modules/namespaces.js.map +1 -1
- package/dist/node/src/modules/tasks.base.js +1 -1
- package/dist/node/src/modules/tasks.base.js.map +1 -1
- package/dist/node/src/modules/tasks.js.map +1 -1
- package/dist/node/src/modules/templates.js.map +1 -1
- package/dist/types/lib/utils.d.ts +5 -0
- package/dist/types/modules/auth.d.ts +4 -4
- package/dist/types/modules/namespaces.d.ts +10 -0
- package/dist/types/modules/tasks.d.ts +2 -1
- package/dist/types/modules/templates.d.ts +1 -6
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(O,U){typeof exports=="object"&&typeof module<"u"?U(exports):typeof define=="function"&&define.amd?define(["exports"],U):(O=typeof globalThis<"u"?globalThis:O||self,U(O.ezReeportSDK={}))})(this,function(O){"use strict";function U(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 _t(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}var Re=6e4,Ae=36e5;function g(e,t){var n;_t(1,arguments);var r=U((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=$t(i.restDateString,i.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var c=o.getTime(),f=0,u;if(s.time&&(f=kt(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),p=new Date(0);return p.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),p.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),p}return new Date(c+f+u)}var J={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Lt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ct=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,xt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Pt(e){var t={},n=e.split(J.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],J.timeZoneDelimiter.test(t.date)&&(t.date=e.split(J.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var s=J.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 $t(e,t){if(t===null)return new Date(NaN);var n=e.match(Lt);if(!n)return new Date(NaN);var r=!!n[4],s=F(n[1]),o=F(n[2])-1,i=F(n[3]),c=F(n[4]),f=F(n[5])-1;if(r)return It(t,c,f)?Ft(t,c,f):new Date(NaN);var u=new Date(0);return!Bt(t,o,i)||!Mt(t,s)?new Date(NaN):(u.setUTCFullYear(t,o,Math.max(s,i)),u)}function F(e){return e?parseInt(e):1}function kt(e){var t=e.match(Ct);if(!t)return NaN;var n=oe(t[1]),r=oe(t[2]),s=oe(t[3]);return Ht(n,r,s)?n*Ae+r*Re+s*1e3:NaN}function oe(e){return e&&parseFloat(e.replace(",","."))||0}function Ut(e){if(e==="Z")return 0;var t=e.match(xt);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return zt(r,s)?n*(r*Ae+s*Re):NaN}function Ft(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 jt=[31,null,31,30,31,30,31,31,30,31,30,31];function Se(e){return e%400===0||e%4===0&&e%100!==0}function Bt(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(jt[t]||(Se(e)?29:28))}function Mt(e,t){return t>=1&&t<=(Se(e)?366:365)}function It(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Ht(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function zt(e,t){return t>=0&&t<=59}function Te(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ne}=Object.prototype,{getPrototypeOf:ie}=Object,ae=(e=>t=>{const n=Ne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),S=e=>(e=e.toLowerCase(),t=>ae(t)===e),W=e=>t=>typeof t===e,{isArray:x}=Array,j=W("undefined");function qt(e){return e!==null&&!j(e)&&e.constructor!==null&&!j(e.constructor)&&L(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _e=S("ArrayBuffer");function Jt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_e(e.buffer),t}const Wt=W("string"),L=W("function"),Le=W("number"),ce=e=>e!==null&&typeof e=="object",Kt=e=>e===!0||e===!1,K=e=>{if(ae(e)!=="object")return!1;const t=ie(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Vt=S("Date"),Yt=S("File"),Gt=S("Blob"),Qt=S("FileList"),Xt=e=>ce(e)&&L(e.pipe),Zt=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Ne.call(e)===t||L(e.toString)&&e.toString()===t)},en=S("URLSearchParams"),tn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function B(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 Ce(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 xe=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Pe=e=>!j(e)&&e!==xe;function ue(){const{caseless:e}=Pe(this)&&this||{},t={},n=(r,s)=>{const o=e&&Ce(t,s)||s;K(t[o])&&K(r)?t[o]=ue(t[o],r):K(r)?t[o]=ue({},r):x(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&B(arguments[r],n);return t}const nn=(e,t,n,{allOwnKeys:r}={})=>(B(t,(s,o)=>{n&&L(s)?e[o]=Te(s,n):e[o]=s},{allOwnKeys:r}),e),rn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),sn=(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)},on=(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&&ie(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},an=(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},cn=e=>{if(!e)return null;if(x(e))return e;let t=e.length;if(!Le(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},un=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ie(Uint8Array)),ln=(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])}},fn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},dn=S("HTMLFormElement"),pn=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),hn=S("RegExp"),$e=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};B(n,(s,o)=>{t(s,o,e)!==!1&&(r[o]=s)}),Object.defineProperties(e,r)},mn=e=>{$e(e,(t,n)=>{if(L(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(L(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+"'")})}})},yn=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return x(e)?r(e):r(String(e).split(t)),n},wn=()=>{},bn=(e,t)=>(e=+e,Number.isFinite(e)?e:t),le="abcdefghijklmnopqrstuvwxyz",ke="0123456789",Ue={DIGIT:ke,ALPHA:le,ALPHA_DIGIT:le+le.toUpperCase()+ke},gn=(e=16,t=Ue.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function En(e){return!!(e&&L(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const a={isArray:x,isArrayBuffer:_e,isBuffer:qt,isFormData:Zt,isArrayBufferView:Jt,isString:Wt,isNumber:Le,isBoolean:Kt,isObject:ce,isPlainObject:K,isUndefined:j,isDate:Vt,isFile:Yt,isBlob:Gt,isRegExp:hn,isFunction:L,isStream:Xt,isURLSearchParams:en,isTypedArray:un,isFileList:Qt,forEach:B,merge:ue,extend:nn,trim:tn,stripBOM:rn,inherits:sn,toFlatObject:on,kindOf:ae,kindOfTest:S,endsWith:an,toArray:cn,forEachEntry:ln,matchAll:fn,isHTMLForm:dn,hasOwnProperty:De,hasOwnProp:De,reduceDescriptors:$e,freezeMethods:mn,toObjectSet:yn,toCamelCase:pn,noop:wn,toFiniteNumber:bn,findKey:Ce,global:xe,isContextDefined:Pe,ALPHABET:Ue,generateString:gn,isSpecCompliantForm:En,toJSONObject:e=>{const t=new Array(10),n=(r,s)=>{if(ce(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=x(r)?[]:{};return B(r,(i,c)=>{const f=n(i,s+1);!j(f)&&(o[c]=f)}),t[s]=void 0,o}}return r};return n(e,0)}};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 Fe=y.prototype,je={};["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=>{je[e]={value:e}}),Object.defineProperties(y,je),Object.defineProperty(Fe,"isAxiosError",{value:!0}),y.from=(e,t,n,r,s,o)=>{const i=Object.create(Fe);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 vn=null;function fe(e){return a.isPlainObject(e)||a.isArray(e)}function Be(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Me(e,t,n){return e?e.concat(t).map(function(s,o){return s=Be(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function On(e){return a.isArray(e)&&!e.some(fe)}const Rn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function V(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(h,_){return!a.isUndefined(_[h])});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,h,_){let R=d;if(d&&!_&&typeof d=="object"){if(a.endsWith(h,"{}"))h=r?h:h.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&On(d)||(a.isFileList(d)||a.endsWith(h,"[]"))&&(R=a.toArray(d)))return h=Be(h),R.forEach(function(se,Mr){!(a.isUndefined(se)||se===null)&&t.append(i===!0?Me([h],Mr,o):i===null?h:h+"[]",u(se))}),!1}return fe(d)?!0:(t.append(Me(_,h,o),u(d)),!1)}const p=[],v=Object.assign(Rn,{defaultVisitor:l,convertValue:u,isVisitable:fe});function b(d,h){if(!a.isUndefined(d)){if(p.indexOf(d)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(d),a.forEach(d,function(R,k){(!(a.isUndefined(R)||R===null)&&s.call(t,R,a.isString(k)?k.trim():k,h,v))===!0&&b(R,h?h.concat(k):[k])}),p.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Ie(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function de(e,t){this._pairs=[],e&&V(e,this,t)}const He=de.prototype;He.append=function(t,n){this._pairs.push([t,n])},He.toString=function(t){const n=t?function(r){return t.call(this,r,Ie)}:Ie;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function An(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ze(e,t,n){if(!t)return e;const r=n&&n.encode||An,s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new de(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Sn{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=Sn,Je={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tn=typeof URLSearchParams<"u"?URLSearchParams:de,Nn=typeof FormData<"u"?FormData:null,_n=typeof Blob<"u"?Blob:null,Ln=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Cn=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),A={isBrowser:!0,classes:{URLSearchParams:Tn,FormData:Nn,Blob:_n},isStandardBrowserEnv:Ln,isStandardBrowserWebWorkerEnv:Cn,protocols:["http","https","file","blob","url","data"]};function xn(e,t){return V(e,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return A.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Pn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dn(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 We(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]=Dn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Pn(r),s,n,0)}),n}return null}const $n={"Content-Type":void 0};function kn(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 Y={transitional:Je,adapter:["xhr","http"],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(We(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 xn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return V(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),kn(t)):t}],transformResponse:[function(t){const n=this.transitional||Y.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:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],function(t){Y.headers[t]={}}),a.forEach(["post","put","patch"],function(t){Y.headers[t]=a.merge($n)});const pe=Y,Un=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"]),Fn=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]&&Un[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},
|
|
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[Ke]=this[Ke]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=M(i);r[c]||(In(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};Q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.freezeMethods(Q.prototype),a.freezeMethods(Q);const T=Q;function me(e,t){const n=this||pe,r=t||n,s=T.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 Ve(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 Hn(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 zn=A.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 qn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Jn(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ye(e,t){return e&&!qn(t)?Jn(e,t):t}const Wn=A.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 Kn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vn(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 p=o,v=0;for(;p!==s;)v+=n[p++],p=p%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const b=l&&u-l;return b?Math.round(v*1e3/b):void 0}}function Ge(e,t){let n=0;const r=Vn(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 X={http:vn,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let s=e.data;const o=T.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)&&(A.isStandardBrowserEnv||A.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let u=new XMLHttpRequest;if(e.auth){const b=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(b+":"+d))}const l=Ye(e.baseURL,e.url);u.open(e.method.toUpperCase(),ze(l,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function p(){if(!u)return;const b=T.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),h={data:!i||i==="text"||i==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:b,config:e,request:u};Hn(function(R){n(R),f()},function(R){r(R),f()},h),u=null}if("onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(p)},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 h=e.transitional||Je;e.timeoutErrorMessage&&(d=e.timeoutErrorMessage),r(new y(d,h.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,u)),u=null},A.isStandardBrowserEnv){const b=(e.withCredentials||Wn(l))&&e.xsrfCookieName&&zn.read(e.xsrfCookieName);b&&o.set(e.xsrfHeaderName,b)}s===void 0&&o.setContentType(null),"setRequestHeader"in u&&a.forEach(o.toJSON(),function(d,h){u.setRequestHeader(h,d)}),a.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),i&&i!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",Ge(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Ge(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=b=>{u&&(r(!b||b.type?new I(null,e,u):b),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const v=Kn(l);if(v&&A.protocols.indexOf(v)===-1){r(new y("Unsupported protocol "+v+":",y.ERR_BAD_REQUEST,e));return}u.send(s||null)})}};a.forEach(X,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Yn={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)?X[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(X,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:X};function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new I(null,e)}function Qe(e){return ye(e),e.headers=T.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),Yn.getAdapter(e.adapter||pe.adapter)(e).then(function(r){return ye(e),r.data=me.call(e,e.transformResponse,r),r.headers=T.from(r.headers),r},function(r){return Ve(r)||(ye(e),r&&r.response&&(r.response.data=me.call(e,e.transformResponse,r.response),r.response.headers=T.from(r.response.headers))),Promise.reject(r)})}const Xe=e=>e instanceof T?e.toJSON():e;function P(e,t){t=t||{};const n={};function r(u,l,p){return a.isPlainObject(u)&&a.isPlainObject(l)?a.merge.call({caseless:p},u,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(u,l,p){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u,p)}else return r(u,l,p)}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,p){if(p in t)return r(u,l);if(p 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(Xe(u),Xe(l),!0)};return a.forEach(Object.keys(e).concat(Object.keys(t)),function(l){const p=f[l]||s,v=p(e[l],t[l],l);a.isUndefined(v)&&p!==c||(n[l]=v)}),n}const Ze="1.3.5",we={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{we[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const et={};we.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Ze+"] 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&&!et[i]&&(et[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 Gn(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 be={assertOptions:Gn,validators:we},C=be.validators;let Z=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=P(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&be.assertOptions(r,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:be.assertOptions(s,{encode:C.function,serialize:C.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i;i=o&&a.merge(o.common,o[n.method]),i&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=T.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(f=f&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let l,p=0,v;if(!f){const d=[Qe.bind(this),void 0];for(d.unshift.apply(d,c),d.push.apply(d,u),v=d.length,l=Promise.resolve(n);p<v;)l=l.then(d[p++],d[p++]);return l}v=c.length;let b=n;for(p=0;p<v;){const d=c[p++],h=c[p++];try{b=d(b)}catch(_){h.call(this,_);break}}try{l=Qe.call(this,b)}catch(d){return Promise.reject(d)}for(p=0,v=u.length;p<v;)l=l.then(u[p++],u[p++]);return l}getUri(t){t=P(this.defaults,t);const n=Ye(t.baseURL,t.url);return ze(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){Z.prototype[t]=function(n,r){return this.request(P(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(P(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}Z.prototype[t]=n(),Z.prototype[t+"Form"]=n(!0)});const ee=Z,Qn=class Nt{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 Nt(function(s){t=s}),cancel:t}}};function Xn(e){return function(n){return e.apply(null,n)}}function Zn(e){return a.isObject(e)&&e.isAxiosError===!0}const ge={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(ge).forEach(([e,t])=>{ge[t]=e});const er=ge;function tt(e){const t=new ee(e),n=Te(ee.prototype.request,t);return a.extend(n,ee.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return tt(P(e,s))},n}const E=tt(pe);E.Axios=ee,E.CanceledError=I,E.CancelToken=Qn,E.isCancel=Ve,E.VERSION=Ze,E.toFormData=V,E.AxiosError=y,E.Cancel=E.CanceledError,E.all=function(t){return Promise.all(t)},E.spread=Xn,E.isAxiosError=Zn,E.mergeConfig=P,E.AxiosHeaders=T,E.formToJSON=e=>We(a.isHTMLForm(e)?new FormData(e):e),E.HttpStatusCode=er,E.default=E;const nt=E,{Axios:Jr,AxiosError:tr,CanceledError:Wr,isCancel:Kr,CancelToken:Vr,VERSION:Yr,all:Gr,Cancel:Qr,isAxiosError:Xr,spread:Zr,toFormData:es,AxiosHeaders:ts,HttpStatusCode:ns,formToJSON:rs,mergeConfig:ss}=nt,rt=nt.create({}),N=async(e,...t)=>{try{return await rt[e](...t)}catch(n){if(!(n instanceof tr)||!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)}},m=Object.assign(rt,{$get:async(...e)=>(await N("get",...e)).data,$post:async(...e)=>(await N("post",...e)).data,$put:async(...e)=>(await N("put",...e)).data,$patch:async(...e)=>(await N("patch",...e)).data,$delete:async(...e)=>(await N("delete",...e)).data}),st=e=>({...e,createdAt:g(e.createdAt),updatedAt:e.updatedAt?g(e.updatedAt):void 0}),nr=e=>({...e,namespace:st(e.namespace),createdAt:g(e.createdAt),updatedAt:e.updatedAt?g(e.updatedAt):void 0}),rr=e=>({...e,memberships:e.memberships.map(nr),createdAt:g(e.createdAt),updatedAt:e.updatedAt?g(e.updatedAt):void 0}),ot=e=>{m.defaults.headers.common.authorization=`Bearer ${e}`},it=()=>{m.defaults.headers.common.authorization=void 0},at=()=>{const e=m.defaults.headers.common.authorization;if(!e||typeof e!="string")return!1;const[,t]=e.split("Bearer ");return!!t},sr=Object.freeze(Object.defineProperty({__proto__:null,getCurrentNamespaces:()=>m.$get("/me/namespaces"),getCurrentPermissions:()=>m.$get("/me/permissions"),getCurrentUser:async()=>{const{content:e,...t}=await m.$get("/me");return{...t,content:rr(e)}},isLogged:at,login:ot,logout:it},Symbol.toStringTag,{value:"Module"})),H=e=>({...e,nextRun:e.nextRun?g(e.nextRun):void 0,lastRun:e.lastRun?g(e.lastRun):void 0}),or=Object.freeze(Object.defineProperty({__proto__:null,forceCron:async e=>{const{content:t,...n}=await m.$post(`/crons/${e}/force`);return{...n,content:H(t)}},getAllCrons:async()=>{const{content:e,...t}=await m.$get("/crons");return{...t,content:e.map(H)}},getCron:async e=>{const{content:t,...n}=await m.$get(`/crons/${e}`);return{...n,content:H(t)}},startCron:async e=>{const{content:t,...n}=await m.$put(`/crons/${e}/start`);return{...n,content:H(t)}},stopCron:async e=>{const{content:t,...n}=await m.$put(`/crons/${e}/stop`);return{...n,content:H(t)}}},Symbol.toStringTag,{value:"Module"})),ct=()=>m.$get("/health"),ir=()=>m.$get("/health/all"),ut=e=>m.$get(`/health/${e}`),ar=Object.freeze(Object.defineProperty({__proto__:null,checkAllConnectedService:ir,checkConnectedService:ut,checkCurrentService:async()=>{const{content:{current:e}}=await ct();return ut(e)},getAllConnectedServices:ct},Symbol.toStringTag,{value:"Module"}));var lt=(e=>(e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.QUARTERLY="QUARTERLY",e.BIENNIAL="BIENNIAL",e.YEARLY="YEARLY",e))(lt||{});const ft=e=>({...e,nextRun:g(e.nextRun),lastRun:e.lastRun?g(e.lastRun):void 0,createdAt:g(e.createdAt),updatedAt:e.updatedAt?g(e.updatedAt):void 0}),dt=e=>{const{namespace:t,...n}=e,{namespaceId:r,...s}=ft({namespaceId:t.id,...n});return{...s,namespace:st(t)}},cr=e=>({...e,createdAt:g(e.createdAt)}),ur=e=>({...e,task:dt(e.task),createdAt:g(e.createdAt)}),lr=Object.freeze(Object.defineProperty({__proto__:null,getAllEntries:async(e,t)=>{const{data:{content:n,...r}}=await N("get","/history",{params:{namespaces:t,...e??{}}});return{...r,content:n.map(ur)}}},Symbol.toStringTag,{value:"Module"})),fr=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Ee=e=>({...e,added:g(e.added),started:e.started?g(e.started):void 0,ended:e.ended?g(e.ended):void 0}),dr=()=>m.$get("/queues"),pr=async e=>m.$put(`/queues/${e}/pause`),hr=async e=>m.$put(`/queues/${e}/resume`),mr=async(e,t)=>{const{data:{content:n,...r}}=await N("get",`/queues/${e}/jobs`,{params:t});return{...r,content:n.map(Ee)}},z=async(e,t,n)=>{const{content:r,...s}=await m.$get(`/queues/${e}/jobs/${t}`,{params:{namespaces:n}});return{...s,content:Ee(r)}},yr=Object.freeze(Object.defineProperty({__proto__:null,getAllQueues:dr,getJob:z,getQueueJobs:mr,pauseQueue:pr,resumeQueue:hr,retryJob:async(e,t,n)=>{const{content:r,...s}=await m.$post(`/queues/${e}/jobs/${t}/retry`,{params:{namespaces:n}});return{...s,content:Ee(r)}}},Symbol.toStringTag,{value:"Module"}));var te={},wr={get exports(){return te},set exports(e){te=e}},D=typeof Reflect=="object"?Reflect:null,pt=D&&typeof D.apply=="function"?D.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},ne;D&&typeof D.ownKeys=="function"?ne=D.ownKeys:Object.getOwnPropertySymbols?ne=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:ne=function(t){return Object.getOwnPropertyNames(t)};function br(e){console&&console.warn&&console.warn(e)}var ht=Number.isNaN||function(t){return t!==t};function w(){w.init.call(this)}wr.exports=w,te.once=Or,w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var mt=10;function re(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return mt},set:function(e){if(typeof e!="number"||e<0||ht(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");mt=e}}),w.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},w.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||ht(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 yt(e){return e._maxListeners===void 0?w.defaultMaxListeners:e._maxListeners}w.prototype.getMaxListeners=function(){return yt(this)},w.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")pt(f,this,n);else for(var u=f.length,l=vt(f,u),r=0;r<u;++r)pt(l[r],this,n);return!0};function wt(e,t,n,r){var s,o,i;if(re(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=yt(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,br(c)}return e}w.prototype.addListener=function(t,n){return wt(this,t,n,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(t,n){return wt(this,t,n,!0)};function gr(){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 bt(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},s=gr.bind(r);return s.listener=n,r.wrapFn=s,s}w.prototype.once=function(t,n){return re(n),this.on(t,bt(this,t,n)),this},w.prototype.prependOnceListener=function(t,n){return re(n),this.prependListener(t,bt(this,t,n)),this},w.prototype.removeListener=function(t,n){var r,s,o,i,c;if(re(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():Er(r,o),r.length===1&&(s[t]=r[0]),s.removeListener!==void 0&&this.emit("removeListener",t,c||n)}return this},w.prototype.off=w.prototype.removeListener,w.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 gt(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?vr(s):vt(s,s.length)}w.prototype.listeners=function(t){return gt(this,t,!0)},w.prototype.rawListeners=function(t){return gt(this,t,!1)},w.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Et.call(e,t)},w.prototype.listenerCount=Et;function Et(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}w.prototype.eventNames=function(){return this._eventsCount>0?ne(this._events):[]};function vt(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function Er(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function vr(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function Or(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))}Ot(e,t,o,{once:!0}),t!=="error"&&Rr(e,s,{once:!0})})}function Rr(e,t,n){typeof e.on=="function"&&Ot(e,"error",t,n)}function Ot(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)}const Ar=(e,t=new te)=>{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},Sr=e=>new Promise(t=>{setTimeout(t,e)}),Tr=e=>({start:g(e.start),end:g(e.end)}),Nr=e=>({...e,createdAt:g(e.createdAt),destroyAt:g(e.destroyAt),period:e.period?Tr(e.period):void 0}),ve=e=>({...e,detail:Nr(e.detail)}),Rt=(e,t,n)=>{var r,s;return m.$post(`/tasks/${e}/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:(s=t==null?void 0:t.period)==null?void 0:s.end,namespaces:n}})},_r=(...e)=>Ar(async t=>{const{content:{id:n,queue:r}}=await Rt(...e);t.emit("started",{id:n,queue:r});let s;do{const{content:{progress:o,status:i,result:c}}=await z(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 Sr(f)}while(["completed","failed","stuck"].includes(s.status)===!1);if(!s.result)throw new Error("Generation failed with weird error");return ve(s.result)}),$=async(e,t,n)=>(await N("get",`/reports/${e}`,{responseType:n,params:{namespaces:t}})).data,Lr=Object.freeze(Object.defineProperty({__proto__:null,getReportDebugByJob:async(e,t,n,r)=>{var o;const{content:{result:s}}=await z(e,t,n);if(!s)throw new Error("Job have no result");return $(((o=s.detail)==null?void 0:o.files.debug)??"",n,r)},getReportDebugByName:(e,t,n)=>$(`${e}.deb.json`,t,n),getReportDetailByJob:async(e,t,n,r)=>{var i;const{content:{result:s}}=await z(e,t,n);if(!s)throw new Error("Job have no result");const o=await $(((i=s.detail)==null?void 0:i.files.detail)??"",n,r);return!r||r==="json"?ve(o):o},getReportDetailByName:async(e,t,n)=>{const r=await $(`${e}.det.json`,t,n);return!n||n==="json"?ve(r):r},getReportFileByJob:async(e,t,n,r)=>{var o;const{content:{result:s}}=await z(e,t,n);if(!s)throw new Error("Job have no result");return $(((o=s.detail)==null?void 0:o.files.report)??"",n,r)},getReportFileByName:(e,t,n,r="pdf")=>$(`${e}.rep.${r}`,t,n),startAndListenGeneration:_r,startGeneration:Rt},Symbol.toStringTag,{value:"Module"})),Cr=Object.freeze(Object.defineProperty({__proto__:null,isLogged:at,isURLset:()=>!!m.defaults.baseURL,login:ot,logout:it,setURL:e=>{m.defaults.baseURL=e},unsetURL:()=>{m.defaults.baseURL=void 0}},Symbol.toStringTag,{value:"Module"})),q=e=>{const{history:t,template:n,targets:r,...s}=e;return{...dt(s),history:t.map(cr),template:n,targets:r}},xr=async(e,t)=>{const{data:{content:n,...r}}=await N("get","/tasks",{params:{namespaces:t,...e??{}}});return{...r,content:n.map(ft)}},Pr=async(e,t)=>{const{content:n,...r}=await m.$post("/tasks",e,{params:{namespaces:t}});return{...r,content:q(n)}},Dr=async(e,t)=>{const{content:n,...r}=await m.$get(`/tasks/${e}`,{params:{namespaces:t}});return{...r,content:q(n)}},At=async(e,t,n)=>{const{content:r,...s}=await m.$put(`/tasks/${e}`,t,{params:{namespaces:n}});return{...s,content:q(r)}},$r=Object.freeze(Object.defineProperty({__proto__:null,Recurrence:lt,createTask:Pr,deleteTask:async(e,t)=>{await m.$delete(`/tasks/${e}`,{params:{namespaces:t}})},disableTask:async(e,t)=>{const{content:n,...r}=await m.$put(`/tasks/${e}/disable`,void 0,{params:{namespaces:t}});return{...r,content:q(n)}},enableTask:async(e,t)=>{const{content:n,...r}=await m.$put(`/tasks/${e}/enable`,void 0,{params:{namespaces:t}});return{...r,content:q(n)}},getAllTasks:xr,getTask:Dr,updateTask:At,upsertTask:At},Symbol.toStringTag,{value:"Module"})),St=e=>({...e,createdAt:g(e.createdAt),updatedAt:e.updatedAt?g(e.updatedAt):void 0}),Oe=e=>{const{body:t,...n}=e;return{...St(n),body:t}},kr=async()=>{const{content:e,...t}=await m.$get("/templates");return{...t,content:e.map(St)}},Ur=async e=>{const{content:t,...n}=await m.$get(`/templates/${e}`);return{...n,content:Oe(t)}},Fr=async e=>{const{content:t,...n}=await m.$post("/templates",e);return{...n,content:Oe(t)}},Tt=async(e,t)=>{const{content:n,...r}=await m.$put(`/templates/${e}`,t);return{...r,content:Oe(n)}},jr=Object.freeze(Object.defineProperty({__proto__:null,createTemplate:Fr,deleteTemplate:async e=>{await m.$delete(`/templates/${e}`)},getAllTemplates:kr,getTemplate:Ur,updateTemplate:Tt,upsertTemplate:Tt},Symbol.toStringTag,{value:"Module"})),Br="1.0.0-beta.2";O.auth=sr,O.crons=or,O.health=ar,O.history=lr,O.namespaces=fr,O.queues=yr,O.reports=Lr,O.setup=Cr,O.tasks=$r,O.templates=jr,O.version=Br,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(A,F){typeof exports=="object"&&typeof module<"u"?F(exports):typeof define=="function"&&define.amd?define(["exports"],F):(A=typeof globalThis<"u"?globalThis:A||self,F(A.ezReeportSDK={}))})(this,function(A){"use strict";function F(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 _t(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}var Oe=6e4,Re=36e5;function g(e,t){var n;_t(1,arguments);var r=F((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=xt(e),o;if(s.date){var i=Pt(s.date,r);o=Dt(i.restDateString,i.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var c=o.getTime(),f=0,u;if(s.time&&(f=$t(s.time),isNaN(f)))return new Date(NaN);if(s.timezone){if(u=kt(s.timezone),isNaN(u))return new Date(NaN)}else{var l=new Date(c+f),p=new Date(0);return p.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),p.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),p}return new Date(c+f+u)}var J={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Nt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Lt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ct=/^([+-])(\d{2})(?::?(\d{2}))?$/;function xt(e){var t={},n=e.split(J.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],J.timeZoneDelimiter.test(t.date)&&(t.date=e.split(J.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var s=J.timezone.exec(r);s?(t.time=r.replace(s[1],""),t.timezone=s[1]):t.time=r}return t}function Pt(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 Dt(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=j(n[1]),o=j(n[2])-1,i=j(n[3]),c=j(n[4]),f=j(n[5])-1;if(r)return Mt(t,c,f)?Ft(t,c,f):new Date(NaN);var u=new Date(0);return!Ut(t,o,i)||!Bt(t,s)?new Date(NaN):(u.setUTCFullYear(t,o,Math.max(s,i)),u)}function j(e){return e?parseInt(e):1}function $t(e){var t=e.match(Lt);if(!t)return NaN;var n=ie(t[1]),r=ie(t[2]),s=ie(t[3]);return It(n,r,s)?n*Re+r*Oe+s*1e3:NaN}function ie(e){return e&&parseFloat(e.replace(",","."))||0}function kt(e){if(e==="Z")return 0;var t=e.match(Ct);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return Ht(r,s)?n*(r*Re+s*Oe):NaN}function Ft(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 jt=[31,null,31,30,31,30,31,31,30,31,30,31];function Te(e){return e%400===0||e%4===0&&e%100!==0}function Ut(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(jt[t]||(Te(e)?29:28))}function Bt(e,t){return t>=1&&t<=(Te(e)?366:365)}function Mt(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 Ht(e,t){return t>=0&&t<=59}function Se(e,t){return function(){return e.apply(t,arguments)}}const{toString:zt}=Object.prototype,{getPrototypeOf:ae}=Object,W=(e=>t=>{const n=zt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),T=e=>(e=e.toLowerCase(),t=>W(t)===e),K=e=>t=>typeof t===e,{isArray:x}=Array,U=K("undefined");function qt(e){return e!==null&&!U(e)&&e.constructor!==null&&!U(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _e=T("ArrayBuffer");function Jt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_e(e.buffer),t}const Wt=K("string"),O=K("function"),Ne=K("number"),V=e=>e!==null&&typeof e=="object",Kt=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)},Vt=T("Date"),Yt=T("File"),Gt=T("Blob"),Qt=T("FileList"),Xt=e=>V(e)&&O(e.pipe),Zt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||O(e.append)&&((t=W(e))==="formdata"||t==="object"&&O(e.toString)&&e.toString()==="[object FormData]"))},en=T("URLSearchParams"),tn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function B(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 Le(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 Ce=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),xe=e=>!U(e)&&e!==Ce;function ce(){const{caseless:e}=xe(this)&&this||{},t={},n=(r,s)=>{const o=e&&Le(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]&&B(arguments[r],n);return t}const nn=(e,t,n,{allOwnKeys:r}={})=>(B(t,(s,o)=>{n&&O(s)?e[o]=Se(s,n):e[o]=s},{allOwnKeys:r}),e),rn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),sn=(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)},on=(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},an=(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},cn=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},un=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ae(Uint8Array)),ln=(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])}},fn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},dn=T("HTMLFormElement"),pn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Pe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),hn=T("RegExp"),De=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};B(n,(s,o)=>{t(s,o,e)!==!1&&(r[o]=s)}),Object.defineProperties(e,r)},mn=e=>{De(e,(t,n)=>{if(O(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(O(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+"'")})}})},yn=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return x(e)?r(e):r(String(e).split(t)),n},wn=()=>{},bn=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ue="abcdefghijklmnopqrstuvwxyz",$e="0123456789",ke={DIGIT:$e,ALPHA:ue,ALPHA_DIGIT:ue+ue.toUpperCase()+$e},gn=(e=16,t=ke.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function En(e){return!!(e&&O(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const vn=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 B(r,(i,c)=>{const f=n(i,s+1);!U(f)&&(o[c]=f)}),t[s]=void 0,o}}return r};return n(e,0)},An=T("AsyncFunction"),a={isArray:x,isArrayBuffer:_e,isBuffer:qt,isFormData:Zt,isArrayBufferView:Jt,isString:Wt,isNumber:Ne,isBoolean:Kt,isObject:V,isPlainObject:Y,isUndefined:U,isDate:Vt,isFile:Yt,isBlob:Gt,isRegExp:hn,isFunction:O,isStream:Xt,isURLSearchParams:en,isTypedArray:un,isFileList:Qt,forEach:B,merge:ce,extend:nn,trim:tn,stripBOM:rn,inherits:sn,toFlatObject:on,kindOf:W,kindOfTest:T,endsWith:an,toArray:cn,forEachEntry:ln,matchAll:fn,isHTMLForm:dn,hasOwnProperty:Pe,hasOwnProp:Pe,reduceDescriptors:De,freezeMethods:mn,toObjectSet:yn,toCamelCase:pn,noop:wn,toFiniteNumber:bn,findKey:Le,global:Ce,isContextDefined:xe,ALPHABET:ke,generateString:gn,isSpecCompliantForm:En,toJSONObject:vn,isAsyncFn:An,isThenable:e=>e&&(V(e)||O(e))&&O(e.then)&&O(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 Fe=y.prototype,je={};["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=>{je[e]={value:e}}),Object.defineProperties(y,je),Object.defineProperty(Fe,"isAxiosError",{value:!0}),y.from=(e,t,n,r,s,o)=>{const i=Object.create(Fe);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 On=null;function le(e){return a.isPlainObject(e)||a.isArray(e)}function Ue(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Be(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ue(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Rn(e){return a.isArray(e)&&!e.some(le)}const Tn=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(h,L){return!a.isUndefined(L[h])});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,h,L){let R=d;if(d&&!L&&typeof d=="object"){if(a.endsWith(h,"{}"))h=r?h:h.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&Rn(d)||(a.isFileList(d)||a.endsWith(h,"[]"))&&(R=a.toArray(d)))return h=Ue(h),R.forEach(function(oe,qr){!(a.isUndefined(oe)||oe===null)&&t.append(i===!0?Be([h],qr,o):i===null?h:h+"[]",u(oe))}),!1}return le(d)?!0:(t.append(Be(L,h,o),u(d)),!1)}const p=[],v=Object.assign(Tn,{defaultVisitor:l,convertValue:u,isVisitable:le});function b(d,h){if(!a.isUndefined(d)){if(p.indexOf(d)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(d),a.forEach(d,function(R,k){(!(a.isUndefined(R)||R===null)&&s.call(t,R,a.isString(k)?k.trim():k,h,v))===!0&&b(R,h?h.concat(k):[k])}),p.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Me(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,Me)}:Me;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Sn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function He(e,t,n){if(!t)return e;const r=n&&n.encode||Sn,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 _n{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 ze=_n,qe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nn=typeof URLSearchParams<"u"?URLSearchParams:fe,Ln=typeof FormData<"u"?FormData:null,Cn=typeof Blob<"u"?Blob:null,xn=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Pn=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),S={isBrowser:!0,classes:{URLSearchParams:Nn,FormData:Ln,Blob:Cn},isStandardBrowserEnv:xn,isStandardBrowserWebWorkerEnv:Pn,protocols:["http","https","file","blob","url","data"]};function Dn(e,t){return G(e,new S.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return S.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function $n(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kn(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 Je(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]=kn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t($n(r),s,n,0)}),n}return null}const Fn={"Content-Type":void 0};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 Q={transitional:qe,adapter:["xhr","http"],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(Je(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 Dn(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||Q.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:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],function(t){Q.headers[t]={}}),a.forEach(["post","put","patch"],function(t){Q.headers[t]=a.merge(Fn)});const de=Q,Un=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"]),Bn=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]&&Un[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},We=Symbol("internals");function M(e){return e&&String(e).trim().toLowerCase()}function X(e){return e===!1||e==null?e:a.isArray(e)?e.map(X):String(e)}function Mn(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 In=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pe(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 Hn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zn(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 Z=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,f,u){const l=M(f);if(!l)throw new Error("header name must be a non-empty string");const p=a.findKey(s,l);(!p||s[p]===void 0||u===!0||u===void 0&&s[p]!==!1)&&(s[p||f]=X(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())&&!In(t)?i(Bn(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=M(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Mn(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=M(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=M(i),i){const c=a.findKey(r,i);c&&(!n||pe(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||pe(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]=X(s),delete n[o];return}const c=t?Hn(o):String(o).trim();c!==o&&delete n[o],n[c]=X(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[We]=this[We]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=M(i);r[c]||(zn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};Z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.freezeMethods(Z.prototype),a.freezeMethods(Z);const _=Z;function he(e,t){const n=this||de,r=t||n,s=_.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 Ke(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 Jn=S.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 Wn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Kn(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ve(e,t){return e&&!Wn(t)?Kn(e,t):t}const Vn=S.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 Yn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Gn(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 p=o,v=0;for(;p!==s;)v+=n[p++],p=p%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const b=l&&u-l;return b?Math.round(v*1e3/b):void 0}}function Ye(e,t){let n=0;const r=Gn(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 ee={http:On,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let s=e.data;const o=_.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)&&(S.isStandardBrowserEnv||S.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const b=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(b+":"+d))}const l=Ve(e.baseURL,e.url);u.open(e.method.toUpperCase(),He(l,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function p(){if(!u)return;const b=_.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),h={data:!i||i==="text"||i==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:b,config:e,request:u};qn(function(R){n(R),f()},function(R){r(R),f()},h),u=null}if("onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(p)},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 h=e.transitional||qe;e.timeoutErrorMessage&&(d=e.timeoutErrorMessage),r(new y(d,h.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,u)),u=null},S.isStandardBrowserEnv){const b=(e.withCredentials||Vn(l))&&e.xsrfCookieName&&Jn.read(e.xsrfCookieName);b&&o.set(e.xsrfHeaderName,b)}s===void 0&&o.setContentType(null),"setRequestHeader"in u&&a.forEach(o.toJSON(),function(d,h){u.setRequestHeader(h,d)}),a.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),i&&i!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",Ye(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Ye(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=b=>{u&&(r(!b||b.type?new I(null,e,u):b),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const v=Yn(l);if(v&&S.protocols.indexOf(v)===-1){r(new y("Unsupported protocol "+v+":",y.ERR_BAD_REQUEST,e));return}u.send(s||null)})}};a.forEach(ee,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Qn={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)?ee[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(ee,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:ee};function me(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new I(null,e)}function Ge(e){return me(e),e.headers=_.from(e.headers),e.data=he.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Qn.getAdapter(e.adapter||de.adapter)(e).then(function(r){return me(e),r.data=he.call(e,e.transformResponse,r),r.headers=_.from(r.headers),r},function(r){return Ke(r)||(me(e),r&&r.response&&(r.response.data=he.call(e,e.transformResponse,r.response),r.response.headers=_.from(r.response.headers))),Promise.reject(r)})}const Qe=e=>e instanceof _?e.toJSON():e;function P(e,t){t=t||{};const n={};function r(u,l,p){return a.isPlainObject(u)&&a.isPlainObject(l)?a.merge.call({caseless:p},u,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(u,l,p){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u,p)}else return r(u,l,p)}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,p){if(p in t)return r(u,l);if(p 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(Qe(u),Qe(l),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(l){const p=f[l]||s,v=p(e[l],t[l],l);a.isUndefined(v)&&p!==c||(n[l]=v)}),n}const Xe="1.4.0",ye={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ye[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ze={};ye.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Xe+"] 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&&!Ze[i]&&(Ze[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:ye},C=we.validators;let te=class{constructor(t){this.defaults=t,this.interceptors={request:new ze,response:new ze}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=P(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&we.assertOptions(r,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:we.assertOptions(s,{encode:C.function,serialize:C.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i;i=o&&a.merge(o.common,o[n.method]),i&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=_.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(f=f&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let l,p=0,v;if(!f){const d=[Ge.bind(this),void 0];for(d.unshift.apply(d,c),d.push.apply(d,u),v=d.length,l=Promise.resolve(n);p<v;)l=l.then(d[p++],d[p++]);return l}v=c.length;let b=n;for(p=0;p<v;){const d=c[p++],h=c[p++];try{b=d(b)}catch(L){h.call(this,L);break}}try{l=Ge.call(this,b)}catch(d){return Promise.reject(d)}for(p=0,v=u.length;p<v;)l=l.then(u[p++],u[p++]);return l}getUri(t){t=P(this.defaults,t);const n=Ve(t.baseURL,t.url);return He(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){te.prototype[t]=function(n,r){return this.request(P(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(P(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}te.prototype[t]=n(),te.prototype[t+"Form"]=n(!0)});const ne=te,Zn=class St{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 St(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 et(e){const t=new ne(e),n=Se(ne.prototype.request,t);return a.extend(n,ne.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return et(P(e,s))},n}const E=et(de);E.Axios=ne,E.CanceledError=I,E.CancelToken=Zn,E.isCancel=Ke,E.VERSION=Xe,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=P,E.AxiosHeaders=_,E.formToJSON=e=>Je(a.isHTMLForm(e)?new FormData(e):e),E.HttpStatusCode=nr,E.default=E;const tt=E,{Axios:Yr,AxiosError:rr,CanceledError:Gr,isCancel:Qr,CancelToken:Xr,VERSION:Zr,all:es,Cancel:ts,isAxiosError:ns,spread:rs,toFormData:ss,AxiosHeaders:os,HttpStatusCode:is,formToJSON:as,mergeConfig:cs}=tt,nt=tt.create({}),N=async(e,...t)=>{try{return await nt[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)}},m=Object.assign(nt,{$get:async(...e)=>(await N("get",...e)).data,$post:async(...e)=>(await N("post",...e)).data,$put:async(...e)=>(await N("put",...e)).data,$patch:async(...e)=>(await N("patch",...e)).data,$delete:async(...e)=>(await N("delete",...e)).data}),rt=e=>({...e,createdAt:g(e.createdAt),updatedAt:e.updatedAt?g(e.updatedAt):void 0}),sr=e=>({...e,namespace:rt(e.namespace),createdAt:g(e.createdAt),updatedAt:e.updatedAt?g(e.updatedAt):void 0}),or=e=>({...e,memberships:e.memberships.map(sr),createdAt:g(e.createdAt),updatedAt:e.updatedAt?g(e.updatedAt):void 0}),st=e=>{m.defaults.headers.common.authorization=`Bearer ${e}`},ot=()=>{m.defaults.headers.common.authorization=void 0},it=()=>{const e=m.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:()=>m.$get("/me/namespaces"),getCurrentPermissions:()=>m.$get("/me/permissions"),getCurrentUser:async()=>{const{content:e,...t}=await m.$get("/me");return{...t,content:or(e)}},isLogged:it,login:st,logout:ot},Symbol.toStringTag,{value:"Module"})),H=e=>({...e,nextRun:e.nextRun?g(e.nextRun):void 0,lastRun:e.lastRun?g(e.lastRun):void 0}),ar=Object.freeze(Object.defineProperty({__proto__:null,forceCron:async e=>{const{content:t,...n}=await m.$post(`/crons/${e}/force`);return{...n,content:H(t)}},getAllCrons:async()=>{const{content:e,...t}=await m.$get("/crons");return{...t,content:e.map(H)}},getCron:async e=>{const{content:t,...n}=await m.$get(`/crons/${e}`);return{...n,content:H(t)}},startCron:async e=>{const{content:t,...n}=await m.$put(`/crons/${e}/start`);return{...n,content:H(t)}},stopCron:async e=>{const{content:t,...n}=await m.$put(`/crons/${e}/stop`);return{...n,content:H(t)}}},Symbol.toStringTag,{value:"Module"})),at=()=>m.$get("/health"),cr=()=>m.$get("/health/all"),ct=e=>m.$get(`/health/${e}`),ur=Object.freeze(Object.defineProperty({__proto__:null,checkAllConnectedService:cr,checkConnectedService:ct,checkCurrentService:async()=>{const{content:{current:e}}=await at();return ct(e)},getAllConnectedServices:at},Symbol.toStringTag,{value:"Module"}));var ut=(e=>(e.DAILY="DAILY",e.WEEKLY="WEEKLY",e.MONTHLY="MONTHLY",e.QUARTERLY="QUARTERLY",e.BIENNIAL="BIENNIAL",e.YEARLY="YEARLY",e))(ut||{});const lt=e=>({...e,nextRun:g(e.nextRun),lastRun:e.lastRun?g(e.lastRun):void 0,createdAt:g(e.createdAt),updatedAt:e.updatedAt?g(e.updatedAt):void 0}),ft=e=>{const{namespace:t,...n}=e,{namespaceId:r,...s}=lt({namespaceId:t.id,...n});return{...s,namespace:rt(t)}},lr=e=>({...e,createdAt:g(e.createdAt)}),fr=e=>({...e,task:ft(e.task),createdAt:g(e.createdAt)}),dr=Object.freeze(Object.defineProperty({__proto__:null,getAllEntries:async(e,t)=>{const{data:{content:n,...r}}=await N("get","/history",{params:{namespaces:t,...e??{}}});return{...r,content:n.map(fr)}}},Symbol.toStringTag,{value:"Module"})),pr=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),ge=e=>({...e,added:g(e.added),started:e.started?g(e.started):void 0,ended:e.ended?g(e.ended):void 0}),hr=()=>m.$get("/queues"),mr=async e=>m.$put(`/queues/${e}/pause`),yr=async e=>m.$put(`/queues/${e}/resume`),wr=async(e,t)=>{const{data:{content:n,...r}}=await N("get",`/queues/${e}/jobs`,{params:t});return{...r,content:n.map(ge)}},z=async(e,t,n)=>{const{content:r,...s}=await m.$get(`/queues/${e}/jobs/${t}`,{params:{namespaces:n}});return{...s,content:ge(r)}},br=Object.freeze(Object.defineProperty({__proto__:null,getAllQueues:hr,getJob:z,getQueueJobs:wr,pauseQueue:mr,resumeQueue:yr,retryJob:async(e,t,n)=>{const{content:r,...s}=await m.$post(`/queues/${e}/jobs/${t}/retry`,{params:{namespaces:n}});return{...s,content:ge(r)}}},Symbol.toStringTag,{value:"Module"}));function gr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ee={exports:{}},D=typeof Reflect=="object"?Reflect:null,dt=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 Er(e){console&&console.warn&&console.warn(e)}var pt=Number.isNaN||function(t){return t!==t};function w(){w.init.call(this)}Ee.exports=w,Ee.exports.once=Rr,w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var ht=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(w,"defaultMaxListeners",{enumerable:!0,get:function(){return ht},set:function(e){if(typeof e!="number"||e<0||pt(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ht=e}}),w.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},w.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||pt(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 mt(e){return e._maxListeners===void 0?w.defaultMaxListeners:e._maxListeners}w.prototype.getMaxListeners=function(){return mt(this)},w.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")dt(f,this,n);else for(var u=f.length,l=Et(f,u),r=0;r<u;++r)dt(l[r],this,n);return!0};function yt(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=mt(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,Er(c)}return e}w.prototype.addListener=function(t,n){return yt(this,t,n,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(t,n){return yt(this,t,n,!0)};function vr(){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 wt(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},s=vr.bind(r);return s.listener=n,r.wrapFn=s,s}w.prototype.once=function(t,n){return se(n),this.on(t,wt(this,t,n)),this},w.prototype.prependOnceListener=function(t,n){return se(n),this.prependListener(t,wt(this,t,n)),this},w.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():Ar(r,o),r.length===1&&(s[t]=r[0]),s.removeListener!==void 0&&this.emit("removeListener",t,c||n)}return this},w.prototype.off=w.prototype.removeListener,w.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 bt(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?Or(s):Et(s,s.length)}w.prototype.listeners=function(t){return bt(this,t,!0)},w.prototype.rawListeners=function(t){return bt(this,t,!1)},w.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):gt.call(e,t)},w.prototype.listenerCount=gt;function gt(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}w.prototype.eventNames=function(){return this._eventsCount>0?re(this._events):[]};function Et(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function Ar(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function Or(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function Rr(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))}vt(e,t,o,{once:!0}),t!=="error"&&Tr(e,s,{once:!0})})}function Tr(e,t,n){typeof e.on=="function"&&vt(e,"error",t,n)}function vt(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 Sr=Ee.exports;const _r=gr(Sr),Nr=(e,t=new _r)=>{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},Lr=e=>new Promise(t=>{setTimeout(t,e)}),Cr=e=>({start:g(e.start),end:g(e.end)}),xr=e=>({...e,createdAt:g(e.createdAt),destroyAt:g(e.destroyAt),period:e.period?Cr(e.period):void 0}),ve=e=>({...e,detail:xr(e.detail)}),At=(e,t,n)=>{var r,s;return m.$post(`/tasks/${e}/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:(s=t==null?void 0:t.period)==null?void 0:s.end,namespaces:n}})},Pr=(...e)=>Nr(async t=>{const{content:{id:n,queue:r}}=await At(...e);t.emit("started",{id:n,queue:r});let s;do{const{content:{progress:o,status:i,result:c}}=await z(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 Lr(f)}while(["completed","failed","stuck"].includes(s.status)===!1);if(!s.result)throw new Error("Generation failed with weird error");return ve(s.result)}),$=async(e,t,n)=>(await N("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 z(e,t,n);if(!s)throw new Error("Job have no result");return $(((o=s.detail)==null?void 0:o.files.debug)??"",n,r)},getReportDebugByName:(e,t,n)=>$(`${e}.deb.json`,t,n),getReportDetailByJob:async(e,t,n,r)=>{var i;const{content:{result:s}}=await z(e,t,n);if(!s)throw new Error("Job have no result");const o=await $(((i=s.detail)==null?void 0:i.files.detail)??"",n,r);return!r||r==="json"?ve(o):o},getReportDetailByName:async(e,t,n)=>{const r=await $(`${e}.det.json`,t,n);return!n||n==="json"?ve(r):r},getReportFileByJob:async(e,t,n,r)=>{var o;const{content:{result:s}}=await z(e,t,n);if(!s)throw new Error("Job have no result");return $(((o=s.detail)==null?void 0:o.files.report)??"",n,r)},getReportFileByName:(e,t,n,r="pdf")=>$(`${e}.rep.${r}`,t,n),startAndListenGeneration:Pr,startGeneration:At},Symbol.toStringTag,{value:"Module"})),$r=Object.freeze(Object.defineProperty({__proto__:null,isLogged:it,isURLset:()=>!!m.defaults.baseURL,login:st,logout:ot,setURL:e=>{m.defaults.baseURL=e},unsetURL:()=>{m.defaults.baseURL=void 0}},Symbol.toStringTag,{value:"Module"})),q=e=>{const{history:t,template:n,targets:r,...s}=e;return{...ft(s),history:t.map(lr),template:n,targets:r}},kr=async(e,t)=>{const{data:{content:n,...r}}=await N("get","/tasks",{params:{namespaces:t,...e??{}}});return{...r,content:n.map(lt)}},Fr=async(e,t)=>{const{content:n,...r}=await m.$post("/tasks",e,{params:{namespaces:t}});return{...r,content:q(n)}},jr=async(e,t)=>{const{content:n,...r}=await m.$get(`/tasks/${e}`,{params:{namespaces:t}});return{...r,content:q(n)}},Ot=async(e,t,n)=>{const{content:r,...s}=await m.$put(`/tasks/${e}`,t,{params:{namespaces:n}});return{...s,content:q(r)}},Ur=Object.freeze(Object.defineProperty({__proto__:null,Recurrence:ut,createTask:Fr,deleteTask:async(e,t)=>{await m.$delete(`/tasks/${e}`,{params:{namespaces:t}})},disableTask:async(e,t)=>{const{content:n,...r}=await m.$put(`/tasks/${e}/disable`,void 0,{params:{namespaces:t}});return{...r,content:q(n)}},enableTask:async(e,t)=>{const{content:n,...r}=await m.$put(`/tasks/${e}/enable`,void 0,{params:{namespaces:t}});return{...r,content:q(n)}},getAllTasks:kr,getTask:jr,updateTask:Ot,upsertTask:Ot},Symbol.toStringTag,{value:"Module"})),Rt=e=>({...e,createdAt:g(e.createdAt),updatedAt:e.updatedAt?g(e.updatedAt):void 0}),Ae=e=>{const{body:t,...n}=e;return{...Rt(n),body:t}},Br=async()=>{const{content:e,...t}=await m.$get("/templates");return{...t,content:e.map(Rt)}},Mr=async e=>{const{content:t,...n}=await m.$get(`/templates/${e}`);return{...n,content:Ae(t)}},Ir=async e=>{const{content:t,...n}=await m.$post("/templates",e);return{...n,content:Ae(t)}},Tt=async(e,t)=>{const{content:n,...r}=await m.$put(`/templates/${e}`,t);return{...r,content:Ae(n)}},Hr=Object.freeze(Object.defineProperty({__proto__:null,createTemplate:Ir,deleteTemplate:async e=>{await m.$delete(`/templates/${e}`)},getAllTemplates:Br,getTemplate:Mr,updateTemplate:Tt,upsertTemplate:Tt},Symbol.toStringTag,{value:"Module"})),zr="1.0.0-beta.4";A.auth=ir,A.crons=ar,A.health=ur,A.history=dr,A.namespaces=pr,A.queues=br,A.reports=Dr,A.setup=$r,A.tasks=Ur,A.templates=Hr,A.version=zr,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
4
4
|
//# sourceMappingURL=ezreeport-sdk-js.umd.js.map
|