@solidtime/api 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,17 @@
1
- (function(ne,le){typeof exports=="object"&&typeof module<"u"?le(exports):typeof define=="function"&&define.amd?define(["exports"],le):(ne=typeof globalThis<"u"?globalThis:ne||self,le(ne.SolidtimeApi={}))})(this,function(ne){"use strict";function le(s,e){return function(){return s.apply(e,arguments)}}const{toString:Ws}=Object.prototype,{getPrototypeOf:dt}=Object,De=(s=>e=>{const r=Ws.call(e);return s[r]||(s[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),D=s=>(s=s.toLowerCase(),e=>De(e)===s),Fe=s=>e=>typeof e===s,{isArray:he}=Array,je=Fe("undefined");function Qs(s){return s!==null&&!je(s)&&s.constructor!==null&&!je(s.constructor)&&Z(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Mt=D("ArrayBuffer");function Js(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&Mt(s.buffer),e}const Ks=Fe("string"),Z=Fe("function"),Lt=Fe("number"),$e=s=>s!==null&&typeof s=="object",Gs=s=>s===!0||s===!1,Ve=s=>{if(De(s)!=="object")return!1;const e=dt(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},Xs=D("Date"),Ys=D("File"),er=D("Blob"),tr=D("FileList"),sr=s=>$e(s)&&Z(s.pipe),rr=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||Z(s.append)&&((e=De(s))==="formdata"||e==="object"&&Z(s.toString)&&s.toString()==="[object FormData]"))},nr=D("URLSearchParams"),[ar,ir,or,cr]=["ReadableStream","Request","Response","Headers"].map(D),ur=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function we(s,e,{allOwnKeys:r=!1}={}){if(s===null||typeof s>"u")return;let n,a;if(typeof s!="object"&&(s=[s]),he(s))for(n=0,a=s.length;n<a;n++)e.call(null,s[n],n,s);else{const i=r?Object.getOwnPropertyNames(s):Object.keys(s),o=i.length;let c;for(n=0;n<o;n++)c=i[n],e.call(null,s[c],c,s)}}function Bt(s,e){e=e.toLowerCase();const r=Object.keys(s);let n=r.length,a;for(;n-- >0;)if(a=r[n],e===a.toLowerCase())return a;return null}const ae=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Dt=s=>!je(s)&&s!==ae;function lt(){const{caseless:s}=Dt(this)&&this||{},e={},r=(n,a)=>{const i=s&&Bt(e,a)||a;Ve(e[i])&&Ve(n)?e[i]=lt(e[i],n):Ve(n)?e[i]=lt({},n):he(n)?e[i]=n.slice():e[i]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&we(arguments[n],r);return e}const dr=(s,e,r,{allOwnKeys:n}={})=>(we(e,(a,i)=>{r&&Z(a)?s[i]=le(a,r):s[i]=a},{allOwnKeys:n}),s),lr=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),hr=(s,e,r,n)=>{s.prototype=Object.create(e.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),r&&Object.assign(s.prototype,r)},pr=(s,e,r,n)=>{let a,i,o;const c={};if(e=e||{},s==null)return e;do{for(a=Object.getOwnPropertyNames(s),i=a.length;i-- >0;)o=a[i],(!n||n(o,s,e))&&!c[o]&&(e[o]=s[o],c[o]=!0);s=r!==!1&&dt(s)}while(s&&(!r||r(s,e))&&s!==Object.prototype);return e},mr=(s,e,r)=>{s=String(s),(r===void 0||r>s.length)&&(r=s.length),r-=e.length;const n=s.indexOf(e,r);return n!==-1&&n===r},fr=s=>{if(!s)return null;if(he(s))return s;let e=s.length;if(!Lt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=s[e];return r},gr=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&dt(Uint8Array)),yr=(s,e)=>{const n=(s&&s[Symbol.iterator]).call(s);let a;for(;(a=n.next())&&!a.done;){const i=a.value;e.call(s,i[0],i[1])}},br=(s,e)=>{let r;const n=[];for(;(r=s.exec(e))!==null;)n.push(r);return n},_r=D("HTMLFormElement"),vr=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Ft=(({hasOwnProperty:s})=>(e,r)=>s.call(e,r))(Object.prototype),jr=D("RegExp"),$t=(s,e)=>{const r=Object.getOwnPropertyDescriptors(s),n={};we(r,(a,i)=>{let o;(o=e(a,i,s))!==!1&&(n[i]=o||a)}),Object.defineProperties(s,n)},wr=s=>{$t(s,(e,r)=>{if(Z(s)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=s[r];if(Z(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},xr=(s,e)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return he(s)?n(s):n(String(s).split(e)),r},kr=()=>{},Tr=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,ht="abcdefghijklmnopqrstuvwxyz",Vt="0123456789",Ht={DIGIT:Vt,ALPHA:ht,ALPHA_DIGIT:ht+ht.toUpperCase()+Vt},Er=(s=16,e=Ht.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;s--;)r+=e[Math.random()*n|0];return r};function Rr(s){return!!(s&&Z(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const Sr=s=>{const e=new Array(10),r=(n,a)=>{if($e(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[a]=n;const i=he(n)?[]:{};return we(n,(o,c)=>{const d=r(o,a+1);!je(d)&&(i[c]=d)}),e[a]=void 0,i}}return n};return r(s,0)},Ar=D("AsyncFunction"),Pr=s=>s&&($e(s)||Z(s))&&Z(s.then)&&Z(s.catch),Wt=((s,e)=>s?setImmediate:e?((r,n)=>(ae.addEventListener("message",({source:a,data:i})=>{a===ae&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),ae.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Z(ae.postMessage)),Or=typeof queueMicrotask<"u"?queueMicrotask.bind(ae):typeof process<"u"&&process.nextTick||Wt,l={isArray:he,isArrayBuffer:Mt,isBuffer:Qs,isFormData:rr,isArrayBufferView:Js,isString:Ks,isNumber:Lt,isBoolean:Gs,isObject:$e,isPlainObject:Ve,isReadableStream:ar,isRequest:ir,isResponse:or,isHeaders:cr,isUndefined:je,isDate:Xs,isFile:Ys,isBlob:er,isRegExp:jr,isFunction:Z,isStream:sr,isURLSearchParams:nr,isTypedArray:gr,isFileList:tr,forEach:we,merge:lt,extend:dr,trim:ur,stripBOM:lr,inherits:hr,toFlatObject:pr,kindOf:De,kindOfTest:D,endsWith:mr,toArray:fr,forEachEntry:yr,matchAll:br,isHTMLForm:_r,hasOwnProperty:Ft,hasOwnProp:Ft,reduceDescriptors:$t,freezeMethods:wr,toObjectSet:xr,toCamelCase:vr,noop:kr,toFiniteNumber:Tr,findKey:Bt,global:ae,isContextDefined:Dt,ALPHABET:Ht,generateString:Er,isSpecCompliantForm:Rr,toJSONObject:Sr,isAsyncFn:Ar,isThenable:Pr,setImmediate:Wt,asap:Or};function x(s,e,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}l.inherits(x,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:l.toJSONObject(this.config),code:this.code,status:this.status}}});const Qt=x.prototype,Jt={};["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(s=>{Jt[s]={value:s}}),Object.defineProperties(x,Jt),Object.defineProperty(Qt,"isAxiosError",{value:!0}),x.from=(s,e,r,n,a,i)=>{const o=Object.create(Qt);return l.toFlatObject(s,o,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),x.call(o,s.message,e,r,n,a),o.cause=s,o.name=s.name,i&&Object.assign(o,i),o};const Nr=null;function pt(s){return l.isPlainObject(s)||l.isArray(s)}function Kt(s){return l.endsWith(s,"[]")?s.slice(0,-2):s}function Gt(s,e,r){return s?s.concat(e).map(function(a,i){return a=Kt(a),!r&&i?"["+a+"]":a}).join(r?".":""):e}function zr(s){return l.isArray(s)&&!s.some(pt)}const Cr=l.toFlatObject(l,{},null,function(e){return/^is[A-Z]/.test(e)});function He(s,e,r){if(!l.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,r=l.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,y){return!l.isUndefined(y[E])});const n=r.metaTokens,a=r.visitor||h,i=r.dots,o=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(e);if(!l.isFunction(a))throw new TypeError("visitor must be a function");function u(_){if(_===null)return"";if(l.isDate(_))return _.toISOString();if(!d&&l.isBlob(_))throw new x("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(_)||l.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function h(_,E,y){let U=_;if(_&&!y&&typeof _=="object"){if(l.endsWith(E,"{}"))E=n?E:E.slice(0,-2),_=JSON.stringify(_);else if(l.isArray(_)&&zr(_)||(l.isFileList(_)||l.endsWith(E,"[]"))&&(U=l.toArray(_)))return E=Kt(E),U.forEach(function(A,z){!(l.isUndefined(A)||A===null)&&e.append(o===!0?Gt([E],z,i):o===null?E:E+"[]",u(A))}),!1}return pt(_)?!0:(e.append(Gt(y,E,i),u(_)),!1)}const m=[],w=Object.assign(Cr,{defaultVisitor:h,convertValue:u,isVisitable:pt});function S(_,E){if(!l.isUndefined(_)){if(m.indexOf(_)!==-1)throw Error("Circular reference detected in "+E.join("."));m.push(_),l.forEach(_,function(U,L){(!(l.isUndefined(U)||U===null)&&a.call(e,U,l.isString(L)?L.trim():L,E,w))===!0&&S(U,E?E.concat(L):[L])}),m.pop()}}if(!l.isObject(s))throw new TypeError("data must be an object");return S(s),e}function Xt(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function mt(s,e){this._pairs=[],s&&He(s,this,e)}const Yt=mt.prototype;Yt.append=function(e,r){this._pairs.push([e,r])},Yt.toString=function(e){const r=e?function(n){return e.call(this,n,Xt)}:Xt;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function Ir(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function es(s,e,r){if(!e)return s;const n=r&&r.encode||Ir,a=r&&r.serialize;let i;if(a?i=a(e,r):i=l.isURLSearchParams(e)?e.toString():new mt(e,r).toString(n),i){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+i}return s}class ts{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){l.forEach(this.handlers,function(n){n!==null&&e(n)})}}const ss={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ur={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:mt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ft=typeof window<"u"&&typeof document<"u",gt=typeof navigator=="object"&&navigator||void 0,Zr=ft&&(!gt||["ReactNative","NativeScript","NS"].indexOf(gt.product)<0),qr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Mr=ft&&window.location.href||"http://localhost",q={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ft,hasStandardBrowserEnv:Zr,hasStandardBrowserWebWorkerEnv:qr,navigator:gt,origin:Mr},Symbol.toStringTag,{value:"Module"})),...Ur};function Lr(s,e){return He(s,new q.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return q.isNode&&l.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Br(s){return l.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Dr(s){const e={},r=Object.keys(s);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],e[i]=s[i];return e}function rs(s){function e(r,n,a,i){let o=r[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),d=i>=r.length;return o=!o&&l.isArray(a)?a.length:o,d?(l.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!c):((!a[o]||!l.isObject(a[o]))&&(a[o]=[]),e(r,n,a[o],i)&&l.isArray(a[o])&&(a[o]=Dr(a[o])),!c)}if(l.isFormData(s)&&l.isFunction(s.entries)){const r={};return l.forEachEntry(s,(n,a)=>{e(Br(n),a,r,0)}),r}return null}function Fr(s,e,r){if(l.isString(s))try{return(e||JSON.parse)(s),l.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(s)}const xe={transitional:ss,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=l.isObject(e);if(i&&l.isHTMLForm(e)&&(e=new FormData(e)),l.isFormData(e))return a?JSON.stringify(rs(e)):e;if(l.isArrayBuffer(e)||l.isBuffer(e)||l.isStream(e)||l.isFile(e)||l.isBlob(e)||l.isReadableStream(e))return e;if(l.isArrayBufferView(e))return e.buffer;if(l.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Lr(e,this.formSerializer).toString();if((c=l.isFileList(e))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return He(c?{"files[]":e}:e,d&&new d,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),Fr(e)):e}],transformResponse:[function(e){const r=this.transitional||xe.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(l.isResponse(e)||l.isReadableStream(e))return e;if(e&&l.isString(e)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(c){if(o)throw c.name==="SyntaxError"?x.from(c,x.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:q.classes.FormData,Blob:q.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],s=>{xe.headers[s]={}});const $r=l.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"]),Vr=s=>{const e={};let r,n,a;return s&&s.split(`
2
- `).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||e[r]&&$r[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},ns=Symbol("internals");function ke(s){return s&&String(s).trim().toLowerCase()}function We(s){return s===!1||s==null?s:l.isArray(s)?s.map(We):String(s)}function Hr(s){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(s);)e[n[1]]=n[2];return e}const Wr=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function yt(s,e,r,n,a){if(l.isFunction(n))return n.call(this,e,r);if(a&&(e=r),!!l.isString(e)){if(l.isString(n))return e.indexOf(n)!==-1;if(l.isRegExp(n))return n.test(e)}}function Qr(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Jr(s,e){const r=l.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(s,n+r,{value:function(a,i,o){return this[n].call(this,e,a,i,o)},configurable:!0})})}class I{constructor(e){e&&this.set(e)}set(e,r,n){const a=this;function i(c,d,u){const h=ke(d);if(!h)throw new Error("header name must be a non-empty string");const m=l.findKey(a,h);(!m||a[m]===void 0||u===!0||u===void 0&&a[m]!==!1)&&(a[m||d]=We(c))}const o=(c,d)=>l.forEach(c,(u,h)=>i(u,h,d));if(l.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(l.isString(e)&&(e=e.trim())&&!Wr(e))o(Vr(e),r);else if(l.isHeaders(e))for(const[c,d]of e.entries())i(d,c,n);else e!=null&&i(r,e,n);return this}get(e,r){if(e=ke(e),e){const n=l.findKey(this,e);if(n){const a=this[n];if(!r)return a;if(r===!0)return Hr(a);if(l.isFunction(r))return r.call(this,a,n);if(l.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=ke(e),e){const n=l.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||yt(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let a=!1;function i(o){if(o=ke(o),o){const c=l.findKey(n,o);c&&(!r||yt(n,n[c],c,r))&&(delete n[c],a=!0)}}return l.isArray(e)?e.forEach(i):i(e),a}clear(e){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!e||yt(this,this[i],i,e,!0))&&(delete this[i],a=!0)}return a}normalize(e){const r=this,n={};return l.forEach(this,(a,i)=>{const o=l.findKey(n,i);if(o){r[o]=We(a),delete r[i];return}const c=e?Qr(i):String(i).trim();c!==i&&delete r[i],r[c]=We(a),n[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return l.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=e&&l.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
3
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(a=>n.set(a)),n}static accessor(e){const n=(this[ns]=this[ns]={accessors:{}}).accessors,a=this.prototype;function i(o){const c=ke(o);n[c]||(Jr(a,o),n[c]=!0)}return l.isArray(e)?e.forEach(i):i(e),this}}I.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(I.prototype,({value:s},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(n){this[r]=n}}}),l.freezeMethods(I);function bt(s,e){const r=this||xe,n=e||r,a=I.from(n.headers);let i=n.data;return l.forEach(s,function(c){i=c.call(r,i,a.normalize(),e?e.status:void 0)}),a.normalize(),i}function as(s){return!!(s&&s.__CANCEL__)}function pe(s,e,r){x.call(this,s??"canceled",x.ERR_CANCELED,e,r),this.name="CanceledError"}l.inherits(pe,x,{__CANCEL__:!0});function is(s,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?s(r):e(new x("Request failed with status code "+r.status,[x.ERR_BAD_REQUEST,x.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Kr(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function Gr(s,e){s=s||10;const r=new Array(s),n=new Array(s);let a=0,i=0,o;return e=e!==void 0?e:1e3,function(d){const u=Date.now(),h=n[i];o||(o=u),r[a]=d,n[a]=u;let m=i,w=0;for(;m!==a;)w+=r[m++],m=m%s;if(a=(a+1)%s,a===i&&(i=(i+1)%s),u-o<e)return;const S=h&&u-h;return S?Math.round(w*1e3/S):void 0}}function Xr(s,e){let r=0,n=1e3/e,a,i;const o=(u,h=Date.now())=>{r=h,a=null,i&&(clearTimeout(i),i=null),s.apply(null,u)};return[(...u)=>{const h=Date.now(),m=h-r;m>=n?o(u,h):(a=u,i||(i=setTimeout(()=>{i=null,o(a)},n-m)))},()=>a&&o(a)]}const Qe=(s,e,r=3)=>{let n=0;const a=Gr(50,250);return Xr(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,d=o-n,u=a(d),h=o<=c;n=o;const m={loaded:o,total:c,progress:c?o/c:void 0,bytes:d,rate:u||void 0,estimated:u&&c&&h?(c-o)/u:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};s(m)},r)},os=(s,e)=>{const r=s!=null;return[n=>e[0]({lengthComputable:r,total:s,loaded:n}),e[1]]},cs=s=>(...e)=>l.asap(()=>s(...e)),Yr=q.hasStandardBrowserEnv?function(){const e=q.navigator&&/(msie|trident)/i.test(q.navigator.userAgent),r=document.createElement("a");let n;function a(i){let o=i;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){const c=l.isString(o)?a(o):o;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}(),en=q.hasStandardBrowserEnv?{write(s,e,r,n,a,i){const o=[s+"="+encodeURIComponent(e)];l.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),l.isString(n)&&o.push("path="+n),l.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(s){const e=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function tn(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function sn(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function us(s,e){return s&&!tn(e)?sn(s,e):e}const ds=s=>s instanceof I?{...s}:s;function ie(s,e){e=e||{};const r={};function n(u,h,m){return l.isPlainObject(u)&&l.isPlainObject(h)?l.merge.call({caseless:m},u,h):l.isPlainObject(h)?l.merge({},h):l.isArray(h)?h.slice():h}function a(u,h,m){if(l.isUndefined(h)){if(!l.isUndefined(u))return n(void 0,u,m)}else return n(u,h,m)}function i(u,h){if(!l.isUndefined(h))return n(void 0,h)}function o(u,h){if(l.isUndefined(h)){if(!l.isUndefined(u))return n(void 0,u)}else return n(void 0,h)}function c(u,h,m){if(m in e)return n(u,h);if(m in s)return n(void 0,u)}const d={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(u,h)=>a(ds(u),ds(h),!0)};return l.forEach(Object.keys(Object.assign({},s,e)),function(h){const m=d[h]||a,w=m(s[h],e[h],h);l.isUndefined(w)&&m!==c||(r[h]=w)}),r}const ls=s=>{const e=ie({},s);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:c}=e;e.headers=o=I.from(o),e.url=es(us(e.baseURL,e.url),s.params,s.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let d;if(l.isFormData(r)){if(q.hasStandardBrowserEnv||q.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){const[u,...h]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...h].join("; "))}}if(q.hasStandardBrowserEnv&&(n&&l.isFunction(n)&&(n=n(e)),n||n!==!1&&Yr(e.url))){const u=a&&i&&en.read(i);u&&o.set(a,u)}return e},rn=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(r,n){const a=ls(s);let i=a.data;const o=I.from(a.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:u}=a,h,m,w,S,_;function E(){S&&S(),_&&_(),a.cancelToken&&a.cancelToken.unsubscribe(h),a.signal&&a.signal.removeEventListener("abort",h)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function U(){if(!y)return;const A=I.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),G={data:!c||c==="text"||c==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:A,config:s,request:y};is(function(B){r(B),E()},function(B){n(B),E()},G),y=null}"onloadend"in y?y.onloadend=U:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(U)},y.onabort=function(){y&&(n(new x("Request aborted",x.ECONNABORTED,s,y)),y=null)},y.onerror=function(){n(new x("Network Error",x.ERR_NETWORK,s,y)),y=null},y.ontimeout=function(){let z=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const G=a.transitional||ss;a.timeoutErrorMessage&&(z=a.timeoutErrorMessage),n(new x(z,G.clarifyTimeoutError?x.ETIMEDOUT:x.ECONNABORTED,s,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&l.forEach(o.toJSON(),function(z,G){y.setRequestHeader(G,z)}),l.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),c&&c!=="json"&&(y.responseType=a.responseType),u&&([w,_]=Qe(u,!0),y.addEventListener("progress",w)),d&&y.upload&&([m,S]=Qe(d),y.upload.addEventListener("progress",m),y.upload.addEventListener("loadend",S)),(a.cancelToken||a.signal)&&(h=A=>{y&&(n(!A||A.type?new pe(null,s,y):A),y.abort(),y=null)},a.cancelToken&&a.cancelToken.subscribe(h),a.signal&&(a.signal.aborted?h():a.signal.addEventListener("abort",h)));const L=Kr(a.url);if(L&&q.protocols.indexOf(L)===-1){n(new x("Unsupported protocol "+L+":",x.ERR_BAD_REQUEST,s));return}y.send(i||null)})},nn=(s,e)=>{let r=new AbortController,n;const a=function(d){if(!n){n=!0,o();const u=d instanceof Error?d:this.reason;r.abort(u instanceof x?u:new pe(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{a(new x(`timeout ${e} of ms exceeded`,x.ETIMEDOUT))},e);const o=()=>{s&&(i&&clearTimeout(i),i=null,s.forEach(d=>{d&&(d.removeEventListener?d.removeEventListener("abort",a):d.unsubscribe(a))}),s=null)};s.forEach(d=>d&&d.addEventListener&&d.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=o,[c,()=>{i&&clearTimeout(i),i=null}]},an=function*(s,e){let r=s.byteLength;if(!e||r<e){yield s;return}let n=0,a;for(;n<r;)a=n+e,yield s.slice(n,a),n=a},on=async function*(s,e,r){for await(const n of s)yield*an(ArrayBuffer.isView(n)?n:await r(String(n)),e)},hs=(s,e,r,n,a)=>{const i=on(s,e,a);let o=0,c,d=u=>{c||(c=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:h,value:m}=await i.next();if(h){d(),u.close();return}let w=m.byteLength;if(r){let S=o+=w;r(S)}u.enqueue(new Uint8Array(m))}catch(h){throw d(h),h}},cancel(u){return d(u),i.return()}},{highWaterMark:2})},Je=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ps=Je&&typeof ReadableStream=="function",_t=Je&&(typeof TextEncoder=="function"?(s=>e=>s.encode(e))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),ms=(s,...e)=>{try{return!!s(...e)}catch{return!1}},cn=ps&&ms(()=>{let s=!1;const e=new Request(q.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!e}),fs=64*1024,vt=ps&&ms(()=>l.isReadableStream(new Response("").body)),Ke={stream:vt&&(s=>s.body)};Je&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ke[e]&&(Ke[e]=l.isFunction(s[e])?r=>r[e]():(r,n)=>{throw new x(`Response type '${e}' is not supported`,x.ERR_NOT_SUPPORT,n)})})})(new Response);const un=async s=>{if(s==null)return 0;if(l.isBlob(s))return s.size;if(l.isSpecCompliantForm(s))return(await new Request(s).arrayBuffer()).byteLength;if(l.isArrayBufferView(s)||l.isArrayBuffer(s))return s.byteLength;if(l.isURLSearchParams(s)&&(s=s+""),l.isString(s))return(await _t(s)).byteLength},dn=async(s,e)=>{const r=l.toFiniteNumber(s.getContentLength());return r??un(e)},jt={http:Nr,xhr:rn,fetch:Je&&(async s=>{let{url:e,method:r,data:n,signal:a,cancelToken:i,timeout:o,onDownloadProgress:c,onUploadProgress:d,responseType:u,headers:h,withCredentials:m="same-origin",fetchOptions:w}=ls(s);u=u?(u+"").toLowerCase():"text";let[S,_]=a||i||o?nn([a,i],o):[],E,y;const U=()=>{!E&&setTimeout(()=>{S&&S.unsubscribe()}),E=!0};let L;try{if(d&&cn&&r!=="get"&&r!=="head"&&(L=await dn(h,n))!==0){let B=new Request(e,{method:"POST",body:n,duplex:"half"}),ve;if(l.isFormData(n)&&(ve=B.headers.get("content-type"))&&h.setContentType(ve),B.body){const[qt,ut]=os(L,Qe(cs(d)));n=hs(B.body,fs,qt,ut,_t)}}l.isString(m)||(m=m?"include":"omit");const A="credentials"in Request.prototype;y=new Request(e,{...w,signal:S,method:r.toUpperCase(),headers:h.normalize().toJSON(),body:n,duplex:"half",credentials:A?m:void 0});let z=await fetch(y);const G=vt&&(u==="stream"||u==="response");if(vt&&(c||G)){const B={};["status","statusText","headers"].forEach(Hs=>{B[Hs]=z[Hs]});const ve=l.toFiniteNumber(z.headers.get("content-length")),[qt,ut]=c&&os(ve,Qe(cs(c),!0))||[];z=new Response(hs(z.body,fs,qt,()=>{ut&&ut(),G&&U()},_t),B)}u=u||"text";let Zt=await Ke[l.findKey(Ke,u)||"text"](z,s);return!G&&U(),_&&_(),await new Promise((B,ve)=>{is(B,ve,{data:Zt,headers:I.from(z.headers),status:z.status,statusText:z.statusText,config:s,request:y})})}catch(A){throw U(),A&&A.name==="TypeError"&&/fetch/i.test(A.message)?Object.assign(new x("Network Error",x.ERR_NETWORK,s,y),{cause:A.cause||A}):x.from(A,A&&A.code,s,y)}})};l.forEach(jt,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const gs=s=>`- ${s}`,ln=s=>l.isFunction(s)||s===null||s===!1,ys={getAdapter:s=>{s=l.isArray(s)?s:[s];const{length:e}=s;let r,n;const a={};for(let i=0;i<e;i++){r=s[i];let o;if(n=r,!ln(r)&&(n=jt[(o=String(r)).toLowerCase()],n===void 0))throw new x(`Unknown adapter '${o}'`);if(n)break;a[o||"#"+i]=n}if(!n){const i=Object.entries(a).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=e?i.length>1?`since :
4
- `+i.map(gs).join(`
5
- `):" "+gs(i[0]):"as no adapter specified";throw new x("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:jt};function wt(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new pe(null,s)}function bs(s){return wt(s),s.headers=I.from(s.headers),s.data=bt.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),ys.getAdapter(s.adapter||xe.adapter)(s).then(function(n){return wt(s),n.data=bt.call(s,s.transformResponse,n),n.headers=I.from(n.headers),n},function(n){return as(n)||(wt(s),n&&n.response&&(n.response.data=bt.call(s,s.transformResponse,n.response),n.response.headers=I.from(n.response.headers))),Promise.reject(n)})}const _s="1.7.5",xt={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{xt[s]=function(n){return typeof n===s||"a"+(e<1?"n ":" ")+s}});const vs={};xt.transitional=function(e,r,n){function a(i,o){return"[Axios v"+_s+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,c)=>{if(e===!1)throw new x(a(o," has been removed"+(r?" in "+r:"")),x.ERR_DEPRECATED);return r&&!vs[o]&&(vs[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,o,c):!0}};function hn(s,e,r){if(typeof s!="object")throw new x("options must be an object",x.ERR_BAD_OPTION_VALUE);const n=Object.keys(s);let a=n.length;for(;a-- >0;){const i=n[a],o=e[i];if(o){const c=s[i],d=c===void 0||o(c,i,s);if(d!==!0)throw new x("option "+i+" must be "+d,x.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new x("Unknown option "+i,x.ERR_BAD_OPTION)}}const kt={assertOptions:hn,validators:xt},X=kt.validators;class oe{constructor(e){this.defaults=e,this.interceptors={request:new ts,response:new ts}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=ie(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&kt.assertOptions(n,{silentJSONParsing:X.transitional(X.boolean),forcedJSONParsing:X.transitional(X.boolean),clarifyTimeoutError:X.transitional(X.boolean)},!1),a!=null&&(l.isFunction(a)?r.paramsSerializer={serialize:a}:kt.assertOptions(a,{encode:X.function,serialize:X.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&l.merge(i.common,i[r.method]);i&&l.forEach(["delete","get","head","post","put","patch","common"],_=>{delete i[_]}),r.headers=I.concat(o,i);const c=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(d=d&&E.synchronous,c.unshift(E.fulfilled,E.rejected))});const u=[];this.interceptors.response.forEach(function(E){u.push(E.fulfilled,E.rejected)});let h,m=0,w;if(!d){const _=[bs.bind(this),void 0];for(_.unshift.apply(_,c),_.push.apply(_,u),w=_.length,h=Promise.resolve(r);m<w;)h=h.then(_[m++],_[m++]);return h}w=c.length;let S=r;for(m=0;m<w;){const _=c[m++],E=c[m++];try{S=_(S)}catch(y){E.call(this,y);break}}try{h=bs.call(this,S)}catch(_){return Promise.reject(_)}for(m=0,w=u.length;m<w;)h=h.then(u[m++],u[m++]);return h}getUri(e){e=ie(this.defaults,e);const r=us(e.baseURL,e.url);return es(r,e.params,e.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(e){oe.prototype[e]=function(r,n){return this.request(ie(n||{},{method:e,url:r,data:(n||{}).data}))}}),l.forEach(["post","put","patch"],function(e){function r(n){return function(i,o,c){return this.request(ie(c||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}oe.prototype[e]=r(),oe.prototype[e+"Form"]=r(!0)});class Tt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(c=>{n.subscribe(c),i=c}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},e(function(i,o,c){n.reason||(n.reason=new pe(i,o,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new Tt(function(a){e=a}),cancel:e}}}function pn(s){return function(r){return s.apply(null,r)}}function mn(s){return l.isObject(s)&&s.isAxiosError===!0}const Et={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(Et).forEach(([s,e])=>{Et[e]=s});function js(s){const e=new oe(s),r=le(oe.prototype.request,e);return l.extend(r,oe.prototype,e,{allOwnKeys:!0}),l.extend(r,e,null,{allOwnKeys:!0}),r.create=function(a){return js(ie(s,a))},r}const O=js(xe);O.Axios=oe,O.CanceledError=pe,O.CancelToken=Tt,O.isCancel=as,O.VERSION=_s,O.toFormData=He,O.AxiosError=x,O.Cancel=O.CanceledError,O.all=function(e){return Promise.all(e)},O.spread=pn,O.isAxiosError=mn,O.mergeConfig=ie,O.AxiosHeaders=I,O.formToJSON=s=>rs(l.isHTMLForm(s)?new FormData(s):s),O.getAdapter=ys.getAdapter,O.HttpStatusCode=Et,O.default=O;var R;(function(s){s.assertEqual=a=>a;function e(a){}s.assertIs=e;function r(a){throw new Error}s.assertNever=r,s.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},s.getValidEnumValues=a=>{const i=s.objectKeys(a).filter(c=>typeof a[a[c]]!="number"),o={};for(const c of i)o[c]=a[c];return s.objectValues(o)},s.objectValues=a=>s.objectKeys(a).map(function(i){return a[i]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},s.find=(a,i)=>{for(const o of a)if(i(o))return o},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}s.joinValues=n,s.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(R||(R={}));var Rt;(function(s){s.mergeShapes=(e,r)=>({...e,...r})})(Rt||(Rt={}));const g=R.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Y=s=>{switch(typeof s){case"undefined":return g.undefined;case"string":return g.string;case"number":return isNaN(s)?g.nan:g.number;case"boolean":return g.boolean;case"function":return g.function;case"bigint":return g.bigint;case"symbol":return g.symbol;case"object":return Array.isArray(s)?g.array:s===null?g.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?g.promise:typeof Map<"u"&&s instanceof Map?g.map:typeof Set<"u"&&s instanceof Set?g.set:typeof Date<"u"&&s instanceof Date?g.date:g.object;default:return g.unknown}},p=R.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),fn=s=>JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:");class M extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(i){return i.message},n={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let c=n,d=0;for(;d<o.path.length;){const u=o.path[d];d===o.path.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(r(o))):c[u]=c[u]||{_errors:[]},c=c[u],d++}}};return a(this),n}static assert(e){if(!(e instanceof M))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,R.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):n.push(e(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}M.create=s=>new M(s);const me=(s,e)=>{let r;switch(s.code){case p.invalid_type:s.received===g.undefined?r="Required":r=`Expected ${s.expected}, received ${s.received}`;break;case p.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(s.expected,R.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:r=`Unrecognized key(s) in object: ${R.joinValues(s.keys,", ")}`;break;case p.invalid_union:r="Invalid input";break;case p.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${R.joinValues(s.options)}`;break;case p.invalid_enum_value:r=`Invalid enum value. Expected ${R.joinValues(s.options)}, received '${s.received}'`;break;case p.invalid_arguments:r="Invalid function arguments";break;case p.invalid_return_type:r="Invalid function return type";break;case p.invalid_date:r="Invalid date";break;case p.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(r=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?r=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?r=`Invalid input: must end with "${s.validation.endsWith}"`:R.assertNever(s.validation):s.validation!=="regex"?r=`Invalid ${s.validation}`:r="Invalid";break;case p.too_small:s.type==="array"?r=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?r=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?r=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?r=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:r="Invalid input";break;case p.too_big:s.type==="array"?r=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?r=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?r=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?r=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?r=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:r="Invalid input";break;case p.custom:r="Invalid input";break;case p.invalid_intersection_types:r="Intersection results could not be merged";break;case p.not_multiple_of:r=`Number must be a multiple of ${s.multipleOf}`;break;case p.not_finite:r="Number must be finite";break;default:r=e.defaultError,R.assertNever(s)}return{message:r}};let ws=me;function gn(s){ws=s}function Ge(){return ws}const Xe=s=>{const{data:e,path:r,errorMaps:n,issueData:a}=s,i=[...r,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let c="";const d=n.filter(u=>!!u).slice().reverse();for(const u of d)c=u(o,{data:e,defaultError:c}).message;return{...a,path:i,message:c}},yn=[];function f(s,e){const r=Ge(),n=Xe({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,r,r===me?void 0:me].filter(a=>!!a)});s.common.issues.push(n)}class N{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const a of r){if(a.status==="aborted")return j;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const a of r){const i=await a.key,o=await a.value;n.push({key:i,value:o})}return N.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const a of r){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return j;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}}const j=Object.freeze({status:"aborted"}),fe=s=>({status:"dirty",value:s}),C=s=>({status:"valid",value:s}),St=s=>s.status==="aborted",At=s=>s.status==="dirty",Te=s=>s.status==="valid",Ee=s=>typeof Promise<"u"&&s instanceof Promise;function Ye(s,e,r,n){if(typeof e=="function"?s!==e||!n:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(s)}function xs(s,e,r,n,a){if(typeof e=="function"?s!==e||!a:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(s,r),r}typeof SuppressedError=="function"&&SuppressedError;var b;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(b||(b={}));var Re,Se;class H{constructor(e,r,n,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ks=(s,e)=>{if(Te(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new M(s.common.issues);return this._error=r,this._error}}};function k(s){if(!s)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:a}=s;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,c)=>{var d,u;const{message:h}=s;return o.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:(d=h??n)!==null&&d!==void 0?d:c.defaultError}:o.code!=="invalid_type"?{message:c.defaultError}:{message:(u=h??r)!==null&&u!==void 0?u:c.defaultError}},description:a}}class T{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Y(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Y(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new N,ctx:{common:e.parent.common,data:e.data,parsedType:Y(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Ee(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const a={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Y(e)},i=this._parseSync({data:e,path:a.path,parent:a});return ks(a,i)}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Y(e)},a=this._parse({data:e,path:n.path,parent:n}),i=await(Ee(a)?a:Promise.resolve(a));return ks(n,i)}refine(e,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,i)=>{const o=e(a),c=()=>i.addIssue({code:p.custom,...n(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(d=>d?!0:(c(),!1)):o?!0:(c(),!1)})}refinement(e,r){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(e){return new V({schema:this,typeName:v.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Q.create(this,this._def)}nullable(){return re.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $.create(this,this._def)}promise(){return _e.create(this,this._def)}or(e){return Ne.create([this,e],this._def)}and(e){return ze.create(this,e,this._def)}transform(e){return new V({...k(this._def),schema:this,typeName:v.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new qe({...k(this._def),innerType:this,defaultValue:r,typeName:v.ZodDefault})}brand(){return new Nt({typeName:v.ZodBranded,type:this,...k(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Me({...k(this._def),innerType:this,catchValue:r,typeName:v.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Le.create(this,e)}readonly(){return Be.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const bn=/^c[^\s-]{8,}$/i,_n=/^[0-9a-z]+$/,vn=/^[0-9A-HJKMNP-TV-Z]{26}$/,jn=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,wn=/^[a-z0-9_-]{21}$/i,xn=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,kn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Tn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Pt;const En=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Rn=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Sn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ts="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",An=new RegExp(`^${Ts}$`);function Es(s){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Pn(s){return new RegExp(`^${Es(s)}$`)}function Rs(s){let e=`${Ts}T${Es(s)}`;const r=[];return r.push(s.local?"Z?":"Z"),s.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function On(s,e){return!!((e==="v4"||!e)&&En.test(s)||(e==="v6"||!e)&&Rn.test(s))}class F extends T{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==g.string){const i=this._getOrReturnCtx(e);return f(i,{code:p.invalid_type,expected:g.string,received:i.parsedType}),j}const n=new N;let a;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),f(a,{code:p.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),f(a,{code:p.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,c=e.data.length<i.value;(o||c)&&(a=this._getOrReturnCtx(e,a),o?f(a,{code:p.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&f(a,{code:p.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")kn.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"email",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Pt||(Pt=new RegExp(Tn,"u")),Pt.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"emoji",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")jn.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"uuid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")wn.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"nanoid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")bn.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"cuid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")_n.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"cuid2",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")vn.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"ulid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),f(a,{validation:"url",code:p.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"regex",code:p.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),f(a,{code:p.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),f(a,{code:p.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),f(a,{code:p.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Rs(i).test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{code:p.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?An.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{code:p.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?Pn(i).test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{code:p.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?xn.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"duration",code:p.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?On(e.data,i.version)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"ip",code:p.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Sn.test(e.data)||(a=this._getOrReturnCtx(e,a),f(a,{validation:"base64",code:p.invalid_string,message:i.message}),n.dirty()):R.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(a=>e.test(a),{validation:r,code:p.invalid_string,...b.errToObj(n)})}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...b.errToObj(e)})}url(e){return this._addCheck({kind:"url",...b.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...b.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...b.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...b.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...b.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...b.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...b.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...b.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...b.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...b.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...b.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...b.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...b.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...b.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...b.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...b.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...b.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...b.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...b.errToObj(r)})}nonempty(e){return this.min(1,b.errToObj(e))}trim(){return new F({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new F({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new F({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}F.create=s=>{var e;return new F({checks:[],typeName:v.ZodString,coerce:(e=s==null?void 0:s.coerce)!==null&&e!==void 0?e:!1,...k(s)})};function Nn(s,e){const r=(s.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=r>n?r:n,i=parseInt(s.toFixed(a).replace(".","")),o=parseInt(e.toFixed(a).replace(".",""));return i%o/Math.pow(10,a)}class ee extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==g.number){const i=this._getOrReturnCtx(e);return f(i,{code:p.invalid_type,expected:g.number,received:i.parsedType}),j}let n;const a=new N;for(const i of this._def.checks)i.kind==="int"?R.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:p.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:p.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:p.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?Nn(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),f(n,{code:p.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),f(n,{code:p.not_finite,message:i.message}),a.dirty()):R.assertNever(i);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,b.toString(r))}gt(e,r){return this.setLimit("min",e,!1,b.toString(r))}lte(e,r){return this.setLimit("max",e,!0,b.toString(r))}lt(e,r){return this.setLimit("max",e,!1,b.toString(r))}setLimit(e,r,n,a){return new ee({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:b.toString(a)}]})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:b.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:b.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:b.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:b.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:b.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&R.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}ee.create=s=>new ee({checks:[],typeName:v.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...k(s)});class te extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==g.bigint){const i=this._getOrReturnCtx(e);return f(i,{code:p.invalid_type,expected:g.bigint,received:i.parsedType}),j}let n;const a=new N;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:p.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),f(n,{code:p.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),f(n,{code:p.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):R.assertNever(i);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,b.toString(r))}gt(e,r){return this.setLimit("min",e,!1,b.toString(r))}lte(e,r){return this.setLimit("max",e,!0,b.toString(r))}lt(e,r){return this.setLimit("max",e,!1,b.toString(r))}setLimit(e,r,n,a){return new te({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:b.toString(a)}]})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:b.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}te.create=s=>{var e;return new te({checks:[],typeName:v.ZodBigInt,coerce:(e=s==null?void 0:s.coerce)!==null&&e!==void 0?e:!1,...k(s)})};class Ae extends T{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==g.boolean){const n=this._getOrReturnCtx(e);return f(n,{code:p.invalid_type,expected:g.boolean,received:n.parsedType}),j}return C(e.data)}}Ae.create=s=>new Ae({typeName:v.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...k(s)});class ce extends T{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==g.date){const i=this._getOrReturnCtx(e);return f(i,{code:p.invalid_type,expected:g.date,received:i.parsedType}),j}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return f(i,{code:p.invalid_date}),j}const n=new N;let a;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),f(a,{code:p.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),f(a,{code:p.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):R.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ce({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:b.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:b.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}ce.create=s=>new ce({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:v.ZodDate,...k(s)});class et extends T{_parse(e){if(this._getType(e)!==g.symbol){const n=this._getOrReturnCtx(e);return f(n,{code:p.invalid_type,expected:g.symbol,received:n.parsedType}),j}return C(e.data)}}et.create=s=>new et({typeName:v.ZodSymbol,...k(s)});class Pe extends T{_parse(e){if(this._getType(e)!==g.undefined){const n=this._getOrReturnCtx(e);return f(n,{code:p.invalid_type,expected:g.undefined,received:n.parsedType}),j}return C(e.data)}}Pe.create=s=>new Pe({typeName:v.ZodUndefined,...k(s)});class Oe extends T{_parse(e){if(this._getType(e)!==g.null){const n=this._getOrReturnCtx(e);return f(n,{code:p.invalid_type,expected:g.null,received:n.parsedType}),j}return C(e.data)}}Oe.create=s=>new Oe({typeName:v.ZodNull,...k(s)});class ge extends T{constructor(){super(...arguments),this._any=!0}_parse(e){return C(e.data)}}ge.create=s=>new ge({typeName:v.ZodAny,...k(s)});class ue extends T{constructor(){super(...arguments),this._unknown=!0}_parse(e){return C(e.data)}}ue.create=s=>new ue({typeName:v.ZodUnknown,...k(s)});class J extends T{_parse(e){const r=this._getOrReturnCtx(e);return f(r,{code:p.invalid_type,expected:g.never,received:r.parsedType}),j}}J.create=s=>new J({typeName:v.ZodNever,...k(s)});class tt extends T{_parse(e){if(this._getType(e)!==g.undefined){const n=this._getOrReturnCtx(e);return f(n,{code:p.invalid_type,expected:g.void,received:n.parsedType}),j}return C(e.data)}}tt.create=s=>new tt({typeName:v.ZodVoid,...k(s)});class $ extends T{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),a=this._def;if(r.parsedType!==g.array)return f(r,{code:p.invalid_type,expected:g.array,received:r.parsedType}),j;if(a.exactLength!==null){const o=r.data.length>a.exactLength.value,c=r.data.length<a.exactLength.value;(o||c)&&(f(r,{code:o?p.too_big:p.too_small,minimum:c?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(f(r,{code:p.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(f(r,{code:p.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,c)=>a.type._parseAsync(new H(r,o,r.path,c)))).then(o=>N.mergeArray(n,o));const i=[...r.data].map((o,c)=>a.type._parseSync(new H(r,o,r.path,c)));return N.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new $({...this._def,minLength:{value:e,message:b.toString(r)}})}max(e,r){return new $({...this._def,maxLength:{value:e,message:b.toString(r)}})}length(e,r){return new $({...this._def,exactLength:{value:e,message:b.toString(r)}})}nonempty(e){return this.min(1,e)}}$.create=(s,e)=>new $({type:s,minLength:null,maxLength:null,exactLength:null,typeName:v.ZodArray,...k(e)});function ye(s){if(s instanceof P){const e={};for(const r in s.shape){const n=s.shape[r];e[r]=Q.create(ye(n))}return new P({...s._def,shape:()=>e})}else return s instanceof $?new $({...s._def,type:ye(s.element)}):s instanceof Q?Q.create(ye(s.unwrap())):s instanceof re?re.create(ye(s.unwrap())):s instanceof W?W.create(s.items.map(e=>ye(e))):s}class P extends T{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=R.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==g.object){const u=this._getOrReturnCtx(e);return f(u,{code:p.invalid_type,expected:g.object,received:u.parsedType}),j}const{status:n,ctx:a}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),c=[];if(!(this._def.catchall instanceof J&&this._def.unknownKeys==="strip"))for(const u in a.data)o.includes(u)||c.push(u);const d=[];for(const u of o){const h=i[u],m=a.data[u];d.push({key:{status:"valid",value:u},value:h._parse(new H(a,m,a.path,u)),alwaysSet:u in a.data})}if(this._def.catchall instanceof J){const u=this._def.unknownKeys;if(u==="passthrough")for(const h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:a.data[h]}});else if(u==="strict")c.length>0&&(f(a,{code:p.unrecognized_keys,keys:c}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const h of c){const m=a.data[h];d.push({key:{status:"valid",value:h},value:u._parse(new H(a,m,a.path,h)),alwaysSet:h in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const u=[];for(const h of d){const m=await h.key,w=await h.value;u.push({key:m,value:w,alwaysSet:h.alwaysSet})}return u}).then(u=>N.mergeObjectSync(n,u)):N.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return b.errToObj,new P({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var a,i,o,c;const d=(o=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(c=b.errToObj(e).message)!==null&&c!==void 0?c:d}:{message:d}}}:{}})}strip(){return new P({...this._def,unknownKeys:"strip"})}passthrough(){return new P({...this._def,unknownKeys:"passthrough"})}extend(e){return new P({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new P({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:v.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new P({...this._def,catchall:e})}pick(e){const r={};return R.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new P({...this._def,shape:()=>r})}omit(e){const r={};return R.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new P({...this._def,shape:()=>r})}deepPartial(){return ye(this)}partial(e){const r={};return R.objectKeys(this.shape).forEach(n=>{const a=this.shape[n];e&&!e[n]?r[n]=a:r[n]=a.optional()}),new P({...this._def,shape:()=>r})}required(e){const r={};return R.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Q;)i=i._def.innerType;r[n]=i}}),new P({...this._def,shape:()=>r})}keyof(){return Ss(R.objectKeys(this.shape))}}P.create=(s,e)=>new P({shape:()=>s,unknownKeys:"strip",catchall:J.create(),typeName:v.ZodObject,...k(e)}),P.strictCreate=(s,e)=>new P({shape:()=>s,unknownKeys:"strict",catchall:J.create(),typeName:v.ZodObject,...k(e)}),P.lazycreate=(s,e)=>new P({shape:s,unknownKeys:"strip",catchall:J.create(),typeName:v.ZodObject,...k(e)});class Ne extends T{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function a(i){for(const c of i)if(c.result.status==="valid")return c.result;for(const c of i)if(c.result.status==="dirty")return r.common.issues.push(...c.ctx.common.issues),c.result;const o=i.map(c=>new M(c.ctx.common.issues));return f(r,{code:p.invalid_union,unionErrors:o}),j}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const d of n){const u={...r,common:{...r.common,issues:[]},parent:null},h=d._parseSync({data:r.data,path:r.path,parent:u});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const c=o.map(d=>new M(d));return f(r,{code:p.invalid_union,unionErrors:c}),j}}get options(){return this._def.options}}Ne.create=(s,e)=>new Ne({options:s,typeName:v.ZodUnion,...k(e)});const K=s=>s instanceof Ie?K(s.schema):s instanceof V?K(s.innerType()):s instanceof Ue?[s.value]:s instanceof se?s.options:s instanceof Ze?R.objectValues(s.enum):s instanceof qe?K(s._def.innerType):s instanceof Pe?[void 0]:s instanceof Oe?[null]:s instanceof Q?[void 0,...K(s.unwrap())]:s instanceof re?[null,...K(s.unwrap())]:s instanceof Nt||s instanceof Be?K(s.unwrap()):s instanceof Me?K(s._def.innerType):[];class st extends T{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==g.object)return f(r,{code:p.invalid_type,expected:g.object,received:r.parsedType}),j;const n=this.discriminator,a=r.data[n],i=this.optionsMap.get(a);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(f(r,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),j)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const a=new Map;for(const i of r){const o=K(i.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of o){if(a.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);a.set(c,i)}}return new st({typeName:v.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...k(n)})}}function Ot(s,e){const r=Y(s),n=Y(e);if(s===e)return{valid:!0,data:s};if(r===g.object&&n===g.object){const a=R.objectKeys(e),i=R.objectKeys(s).filter(c=>a.indexOf(c)!==-1),o={...s,...e};for(const c of i){const d=Ot(s[c],e[c]);if(!d.valid)return{valid:!1};o[c]=d.data}return{valid:!0,data:o}}else if(r===g.array&&n===g.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let i=0;i<s.length;i++){const o=s[i],c=e[i],d=Ot(o,c);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return r===g.date&&n===g.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class ze extends T{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=(i,o)=>{if(St(i)||St(o))return j;const c=Ot(i.value,o.value);return c.valid?((At(i)||At(o))&&r.dirty(),{status:r.value,value:c.data}):(f(n,{code:p.invalid_intersection_types}),j)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ze.create=(s,e,r)=>new ze({left:s,right:e,typeName:v.ZodIntersection,...k(r)});class W extends T{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.array)return f(n,{code:p.invalid_type,expected:g.array,received:n.parsedType}),j;if(n.data.length<this._def.items.length)return f(n,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),j;!this._def.rest&&n.data.length>this._def.items.length&&(f(n,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new H(n,o,n.path,c)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>N.mergeArray(r,o)):N.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new W({...this._def,rest:e})}}W.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new W({items:s,typeName:v.ZodTuple,rest:null,...k(e)})};class Ce extends T{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.object)return f(n,{code:p.invalid_type,expected:g.object,received:n.parsedType}),j;const a=[],i=this._def.keyType,o=this._def.valueType;for(const c in n.data)a.push({key:i._parse(new H(n,c,n.path,c)),value:o._parse(new H(n,n.data[c],n.path,c)),alwaysSet:c in n.data});return n.common.async?N.mergeObjectAsync(r,a):N.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof T?new Ce({keyType:e,valueType:r,typeName:v.ZodRecord,...k(n)}):new Ce({keyType:F.create(),valueType:e,typeName:v.ZodRecord,...k(r)})}}class rt extends T{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.map)return f(n,{code:p.invalid_type,expected:g.map,received:n.parsedType}),j;const a=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([c,d],u)=>({key:a._parse(new H(n,c,n.path,[u,"key"])),value:i._parse(new H(n,d,n.path,[u,"value"]))}));if(n.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const d of o){const u=await d.key,h=await d.value;if(u.status==="aborted"||h.status==="aborted")return j;(u.status==="dirty"||h.status==="dirty")&&r.dirty(),c.set(u.value,h.value)}return{status:r.value,value:c}})}else{const c=new Map;for(const d of o){const u=d.key,h=d.value;if(u.status==="aborted"||h.status==="aborted")return j;(u.status==="dirty"||h.status==="dirty")&&r.dirty(),c.set(u.value,h.value)}return{status:r.value,value:c}}}}rt.create=(s,e,r)=>new rt({valueType:e,keyType:s,typeName:v.ZodMap,...k(r)});class de extends T{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==g.set)return f(n,{code:p.invalid_type,expected:g.set,received:n.parsedType}),j;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(f(n,{code:p.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(f(n,{code:p.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const i=this._def.valueType;function o(d){const u=new Set;for(const h of d){if(h.status==="aborted")return j;h.status==="dirty"&&r.dirty(),u.add(h.value)}return{status:r.value,value:u}}const c=[...n.data.values()].map((d,u)=>i._parse(new H(n,d,n.path,u)));return n.common.async?Promise.all(c).then(d=>o(d)):o(c)}min(e,r){return new de({...this._def,minSize:{value:e,message:b.toString(r)}})}max(e,r){return new de({...this._def,maxSize:{value:e,message:b.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}de.create=(s,e)=>new de({valueType:s,minSize:null,maxSize:null,typeName:v.ZodSet,...k(e)});class be extends T{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==g.function)return f(r,{code:p.invalid_type,expected:g.function,received:r.parsedType}),j;function n(c,d){return Xe({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ge(),me].filter(u=>!!u),issueData:{code:p.invalid_arguments,argumentsError:d}})}function a(c,d){return Xe({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ge(),me].filter(u=>!!u),issueData:{code:p.invalid_return_type,returnTypeError:d}})}const i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof _e){const c=this;return C(async function(...d){const u=new M([]),h=await c._def.args.parseAsync(d,i).catch(S=>{throw u.addIssue(n(d,S)),u}),m=await Reflect.apply(o,this,h);return await c._def.returns._def.type.parseAsync(m,i).catch(S=>{throw u.addIssue(a(m,S)),u})})}else{const c=this;return C(function(...d){const u=c._def.args.safeParse(d,i);if(!u.success)throw new M([n(d,u.error)]);const h=Reflect.apply(o,this,u.data),m=c._def.returns.safeParse(h,i);if(!m.success)throw new M([a(h,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new be({...this._def,args:W.create(e).rest(ue.create())})}returns(e){return new be({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new be({args:e||W.create([]).rest(ue.create()),returns:r||ue.create(),typeName:v.ZodFunction,...k(n)})}}class Ie extends T{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Ie.create=(s,e)=>new Ie({getter:s,typeName:v.ZodLazy,...k(e)});class Ue extends T{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return f(r,{received:r.data,code:p.invalid_literal,expected:this._def.value}),j}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ue.create=(s,e)=>new Ue({value:s,typeName:v.ZodLiteral,...k(e)});function Ss(s,e){return new se({values:s,typeName:v.ZodEnum,...k(e)})}class se extends T{constructor(){super(...arguments),Re.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return f(r,{expected:R.joinValues(n),received:r.parsedType,code:p.invalid_type}),j}if(Ye(this,Re)||xs(this,Re,new Set(this._def.values)),!Ye(this,Re).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return f(r,{received:r.data,code:p.invalid_enum_value,options:n}),j}return C(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return se.create(e,{...this._def,...r})}exclude(e,r=this._def){return se.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Re=new WeakMap,se.create=Ss;class Ze extends T{constructor(){super(...arguments),Se.set(this,void 0)}_parse(e){const r=R.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==g.string&&n.parsedType!==g.number){const a=R.objectValues(r);return f(n,{expected:R.joinValues(a),received:n.parsedType,code:p.invalid_type}),j}if(Ye(this,Se)||xs(this,Se,new Set(R.getValidEnumValues(this._def.values))),!Ye(this,Se).has(e.data)){const a=R.objectValues(r);return f(n,{received:n.data,code:p.invalid_enum_value,options:a}),j}return C(e.data)}get enum(){return this._def.values}}Se=new WeakMap,Ze.create=(s,e)=>new Ze({values:s,typeName:v.ZodNativeEnum,...k(e)});class _e extends T{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==g.promise&&r.common.async===!1)return f(r,{code:p.invalid_type,expected:g.promise,received:r.parsedType}),j;const n=r.parsedType===g.promise?r.data:Promise.resolve(r.data);return C(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}_e.create=(s,e)=>new _e({type:s,typeName:v.ZodPromise,...k(e)});class V extends T{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===v.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:o=>{f(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async c=>{if(r.value==="aborted")return j;const d=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});return d.status==="aborted"?j:d.status==="dirty"||r.value==="dirty"?fe(d.value):d});{if(r.value==="aborted")return j;const c=this._def.schema._parseSync({data:o,path:n.path,parent:n});return c.status==="aborted"?j:c.status==="dirty"||r.value==="dirty"?fe(c.value):c}}if(a.type==="refinement"){const o=c=>{const d=a.refinement(c,i);if(n.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(n.common.async===!1){const c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?j:(c.status==="dirty"&&r.dirty(),o(c.value),{status:r.value,value:c.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>c.status==="aborted"?j:(c.status==="dirty"&&r.dirty(),o(c.value).then(()=>({status:r.value,value:c.value}))))}if(a.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Te(o))return o;const c=a.transform(o.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Te(o)?Promise.resolve(a.transform(o.value,i)).then(c=>({status:r.value,value:c})):o);R.assertNever(a)}}V.create=(s,e,r)=>new V({schema:s,typeName:v.ZodEffects,effect:e,...k(r)}),V.createWithPreprocess=(s,e,r)=>new V({schema:e,effect:{type:"preprocess",transform:s},typeName:v.ZodEffects,...k(r)});class Q extends T{_parse(e){return this._getType(e)===g.undefined?C(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Q.create=(s,e)=>new Q({innerType:s,typeName:v.ZodOptional,...k(e)});class re extends T{_parse(e){return this._getType(e)===g.null?C(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}re.create=(s,e)=>new re({innerType:s,typeName:v.ZodNullable,...k(e)});class qe extends T{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===g.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}qe.create=(s,e)=>new qe({innerType:s,typeName:v.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...k(e)});class Me extends T{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ee(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new M(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new M(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Me.create=(s,e)=>new Me({innerType:s,typeName:v.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...k(e)});class nt extends T{_parse(e){if(this._getType(e)!==g.nan){const n=this._getOrReturnCtx(e);return f(n,{code:p.invalid_type,expected:g.nan,received:n.parsedType}),j}return{status:"valid",value:e.data}}}nt.create=s=>new nt({typeName:v.ZodNaN,...k(s)});const zn=Symbol("zod_brand");class Nt extends T{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Le extends T{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?j:i.status==="dirty"?(r.dirty(),fe(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?j:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,r){return new Le({in:e,out:r,typeName:v.ZodPipeline})}}class Be extends T{_parse(e){const r=this._def.innerType._parse(e),n=a=>(Te(a)&&(a.value=Object.freeze(a.value)),a);return Ee(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}Be.create=(s,e)=>new Be({innerType:s,typeName:v.ZodReadonly,...k(e)});function As(s,e={},r){return s?ge.create().superRefine((n,a)=>{var i,o;if(!s(n)){const c=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,d=(o=(i=c.fatal)!==null&&i!==void 0?i:r)!==null&&o!==void 0?o:!0,u=typeof c=="string"?{message:c}:c;a.addIssue({code:"custom",...u,fatal:d})}}):ge.create()}const Cn={object:P.lazycreate};var v;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(v||(v={}));const In=(s,e={message:`Input not instance of ${s.name}`})=>As(r=>r instanceof s,e),Ps=F.create,Os=ee.create,Un=nt.create,Zn=te.create,Ns=Ae.create,qn=ce.create,Mn=et.create,Ln=Pe.create,Bn=Oe.create,Dn=ge.create,Fn=ue.create,$n=J.create,Vn=tt.create,Hn=$.create,Wn=P.create,Qn=P.strictCreate,Jn=Ne.create,Kn=st.create,Gn=ze.create,Xn=W.create,Yn=Ce.create,ea=rt.create,ta=de.create,sa=be.create,ra=Ie.create,na=Ue.create,aa=se.create,ia=Ze.create,oa=_e.create,zs=V.create,ca=Q.create,ua=re.create,da=V.createWithPreprocess,la=Le.create;var t=Object.freeze({__proto__:null,defaultErrorMap:me,setErrorMap:gn,getErrorMap:Ge,makeIssue:Xe,EMPTY_PATH:yn,addIssueToContext:f,ParseStatus:N,INVALID:j,DIRTY:fe,OK:C,isAborted:St,isDirty:At,isValid:Te,isAsync:Ee,get util(){return R},get objectUtil(){return Rt},ZodParsedType:g,getParsedType:Y,ZodType:T,datetimeRegex:Rs,ZodString:F,ZodNumber:ee,ZodBigInt:te,ZodBoolean:Ae,ZodDate:ce,ZodSymbol:et,ZodUndefined:Pe,ZodNull:Oe,ZodAny:ge,ZodUnknown:ue,ZodNever:J,ZodVoid:tt,ZodArray:$,ZodObject:P,ZodUnion:Ne,ZodDiscriminatedUnion:st,ZodIntersection:ze,ZodTuple:W,ZodRecord:Ce,ZodMap:rt,ZodSet:de,ZodFunction:be,ZodLazy:Ie,ZodLiteral:Ue,ZodEnum:se,ZodNativeEnum:Ze,ZodPromise:_e,ZodEffects:V,ZodTransformer:V,ZodOptional:Q,ZodNullable:re,ZodDefault:qe,ZodCatch:Me,ZodNaN:nt,BRAND:zn,ZodBranded:Nt,ZodPipeline:Le,ZodReadonly:Be,custom:As,Schema:T,ZodSchema:T,late:Cn,get ZodFirstPartyTypeKind(){return v},coerce:{string:s=>F.create({...s,coerce:!0}),number:s=>ee.create({...s,coerce:!0}),boolean:s=>Ae.create({...s,coerce:!0}),bigint:s=>te.create({...s,coerce:!0}),date:s=>ce.create({...s,coerce:!0})},any:Dn,array:Hn,bigint:Zn,boolean:Ns,date:qn,discriminatedUnion:Kn,effect:zs,enum:aa,function:sa,instanceof:In,intersection:Gn,lazy:ra,literal:na,map:ea,nan:Un,nativeEnum:ia,never:$n,null:Bn,nullable:ua,number:Os,object:Wn,oboolean:()=>Ns().optional(),onumber:()=>Os().optional(),optional:ca,ostring:()=>Ps().optional(),pipeline:la,preprocess:da,promise:oa,record:Yn,set:ta,strictObject:Qn,string:Ps,symbol:Mn,transformer:zs,tuple:Xn,undefined:Ln,union:Jn,unknown:Fn,void:Vn,NEVER:j,ZodIssueCode:p,quotelessJson:fn,ZodError:M});function ha(s,e){let r={...s};for(let n of e)delete r[n];return r}var pa=/:([a-zA-Z_][a-zA-Z0-9_]*)/g;function ma(s){let e=s.url,r=s.params;return r&&(e=e.replace(pa,(n,a)=>a in r?`${r[a]}`:n)),e}function Cs(s,e,r){return s.find(n=>n.method===e&&n.path===r)}function fa(s){let e=new FormData;for(let r in s)e.append(r,s[r]);return{data:e}}var at=class extends Error{constructor(s,e,r,n){super(s),this.config=e,this.data=r,this.cause=n}},ga={name:"form-data",request:async(s,e)=>{if(typeof e.data!="object"||Array.isArray(e.data))throw new at("Zodios: multipart/form-data body must be an object",e);let r=fa(e.data);return{...e,data:r.data,headers:{...e.headers,...r.headers}}}};function ya(){return ga}var ba={name:"form-url",request:async(s,e)=>{if(typeof e.data!="object"||Array.isArray(e.data))throw new at("Zodios: application/x-www-form-urlencoded body must be an object",e);return{...e,data:new URLSearchParams(e.data).toString(),headers:{...e.headers,"Content-Type":"application/x-www-form-urlencoded"}}}};function _a(){return ba}function Is(s,e){return{request:async(r,n)=>({...n,headers:{...n.headers,[s]:e}})}}function Us(s){return[!0,"response","all"].includes(s)}function Zs(s){return[!0,"request","all"].includes(s)}function va({validate:s,transform:e,sendDefaults:r}){return{name:"zod-validation",request:Zs(s)?async(n,a)=>{let i=Cs(n,a.method,a.url);if(!i)throw new Error(`No endpoint found for ${a.method} ${a.url}`);let{parameters:o}=i;if(!o)return a;let c={...a,queries:{...a.queries},headers:{...a.headers},params:{...a.params}},d={Query:m=>{var w;return(w=c.queries)==null?void 0:w[m]},Body:m=>c.data,Header:m=>{var w;return(w=c.headers)==null?void 0:w[m]},Path:m=>{var w;return(w=c.params)==null?void 0:w[m]}},u={Query:(m,w)=>c.queries[m]=w,Body:(m,w)=>c.data=w,Header:(m,w)=>c.headers[m]=w,Path:(m,w)=>c.params[m]=w},h=Zs(e);for(let m of o){let{name:w,schema:S,type:_}=m,E=d[_](w);if(r||E!==void 0){let y=await S.safeParseAsync(E);if(!y.success)throw new at(`Zodios: Invalid ${_} parameter '${w}'`,a,E,y.error);h&&u[_](w,y.data)}}return c}:void 0,response:Us(s)?async(n,a,i)=>{var o,c,d,u;let h=Cs(n,a.method,a.url);if(!h)throw new Error(`No endpoint found for ${a.method} ${a.url}`);if((c=(o=i.headers)==null?void 0:o["content-type"])!=null&&c.includes("application/json")||(u=(d=i.headers)==null?void 0:d["content-type"])!=null&&u.includes("application/vnd.api+json")){let m=await h.response.safeParseAsync(i.data);if(!m.success)throw new at(`Zodios: Invalid response from endpoint '${h.method} ${h.path}'
1
+ (function(oe,fe){typeof exports=="object"&&typeof module<"u"?fe(exports):typeof define=="function"&&define.amd?define(["exports"],fe):(oe=typeof globalThis<"u"?globalThis:oe||self,fe(oe.SolidtimeApi={}))})(this,function(oe){"use strict";function fe(s,t){return function(){return s.apply(t,arguments)}}const{toString:fr}=Object.prototype,{getPrototypeOf:wt}=Object,{iterator:Ke,toStringTag:Yt}=Symbol,Xe=(s=>t=>{const r=fr.call(t);return s[r]||(s[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),B=s=>(s=s.toLowerCase(),t=>Xe(t)===s),Ge=s=>t=>typeof t===s,{isArray:ye}=Array,be=Ge("undefined");function Ee(s){return s!==null&&!be(s)&&s.constructor!==null&&!be(s.constructor)&&I(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const es=B("ArrayBuffer");function yr(s){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(s):t=s&&s.buffer&&es(s.buffer),t}const br=Ge("string"),I=Ge("function"),ts=Ge("number"),Ae=s=>s!==null&&typeof s=="object",_r=s=>s===!0||s===!1,Ye=s=>{if(Xe(s)!=="object")return!1;const t=wt(s);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Yt in s)&&!(Ke in s)},vr=s=>{if(!Ae(s)||Ee(s))return!1;try{return Object.keys(s).length===0&&Object.getPrototypeOf(s)===Object.prototype}catch{return!1}},jr=B("Date"),wr=B("File"),xr=B("Blob"),kr=B("FileList"),Tr=s=>Ae(s)&&I(s.pipe),zr=s=>{let t;return s&&(typeof FormData=="function"&&s instanceof FormData||I(s.append)&&((t=Xe(s))==="formdata"||t==="object"&&I(s.toString)&&s.toString()==="[object FormData]"))},Er=B("URLSearchParams"),[Ar,Rr,Sr,Pr]=["ReadableStream","Request","Response","Headers"].map(B),Nr=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Re(s,t,{allOwnKeys:r=!1}={}){if(s===null||typeof s>"u")return;let n,a;if(typeof s!="object"&&(s=[s]),ye(s))for(n=0,a=s.length;n<a;n++)t.call(null,s[n],n,s);else{if(Ee(s))return;const i=r?Object.getOwnPropertyNames(s):Object.keys(s),o=i.length;let u;for(n=0;n<o;n++)u=i[n],t.call(null,s[u],u,s)}}function ss(s,t){if(Ee(s))return null;t=t.toLowerCase();const r=Object.keys(s);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const ue=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rs=s=>!be(s)&&s!==ue;function xt(){const{caseless:s,skipUndefined:t}=rs(this)&&this||{},r={},n=(a,i)=>{const o=s&&ss(r,i)||i;Ye(r[o])&&Ye(a)?r[o]=xt(r[o],a):Ye(a)?r[o]=xt({},a):ye(a)?r[o]=a.slice():(!t||!be(a))&&(r[o]=a)};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Re(arguments[a],n);return r}const Or=(s,t,r,{allOwnKeys:n}={})=>(Re(t,(a,i)=>{r&&I(a)?s[i]=fe(a,r):s[i]=a},{allOwnKeys:n}),s),Cr=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),Ur=(s,t,r,n)=>{s.prototype=Object.create(t.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:t.prototype}),r&&Object.assign(s.prototype,r)},Ir=(s,t,r,n)=>{let a,i,o;const u={};if(t=t||{},s==null)return t;do{for(a=Object.getOwnPropertyNames(s),i=a.length;i-- >0;)o=a[i],(!n||n(o,s,t))&&!u[o]&&(t[o]=s[o],u[o]=!0);s=r!==!1&&wt(s)}while(s&&(!r||r(s,t))&&s!==Object.prototype);return t},qr=(s,t,r)=>{s=String(s),(r===void 0||r>s.length)&&(r=s.length),r-=t.length;const n=s.indexOf(t,r);return n!==-1&&n===r},Fr=s=>{if(!s)return null;if(ye(s))return s;let t=s.length;if(!ts(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=s[t];return r},Zr=(s=>t=>s&&t instanceof s)(typeof Uint8Array<"u"&&wt(Uint8Array)),Mr=(s,t)=>{const n=(s&&s[Ke]).call(s);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(s,i[0],i[1])}},Dr=(s,t)=>{let r;const n=[];for(;(r=s.exec(t))!==null;)n.push(r);return n},Br=B("HTMLFormElement"),Lr=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),ns=(({hasOwnProperty:s})=>(t,r)=>s.call(t,r))(Object.prototype),$r=B("RegExp"),as=(s,t)=>{const r=Object.getOwnPropertyDescriptors(s),n={};Re(r,(a,i)=>{let o;(o=t(a,i,s))!==!1&&(n[i]=o||a)}),Object.defineProperties(s,n)},Vr=s=>{as(s,(t,r)=>{if(I(s)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=s[r];if(I(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Qr=(s,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return ye(s)?n(s):n(String(s).split(t)),r},Hr=()=>{},Wr=(s,t)=>s!=null&&Number.isFinite(s=+s)?s:t;function Jr(s){return!!(s&&I(s.append)&&s[Yt]==="FormData"&&s[Ke])}const Kr=s=>{const t=new Array(10),r=(n,a)=>{if(Ae(n)){if(t.indexOf(n)>=0)return;if(Ee(n))return n;if(!("toJSON"in n)){t[a]=n;const i=ye(n)?[]:{};return Re(n,(o,u)=>{const h=r(o,a+1);!be(h)&&(i[u]=h)}),t[a]=void 0,i}}return n};return r(s,0)},Xr=B("AsyncFunction"),Gr=s=>s&&(Ae(s)||I(s))&&I(s.then)&&I(s.catch),is=((s,t)=>s?setImmediate:t?((r,n)=>(ue.addEventListener("message",({source:a,data:i})=>{a===ue&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),ue.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",I(ue.postMessage)),Yr=typeof queueMicrotask<"u"?queueMicrotask.bind(ue):typeof process<"u"&&process.nextTick||is,l={isArray:ye,isArrayBuffer:es,isBuffer:Ee,isFormData:zr,isArrayBufferView:yr,isString:br,isNumber:ts,isBoolean:_r,isObject:Ae,isPlainObject:Ye,isEmptyObject:vr,isReadableStream:Ar,isRequest:Rr,isResponse:Sr,isHeaders:Pr,isUndefined:be,isDate:jr,isFile:wr,isBlob:xr,isRegExp:$r,isFunction:I,isStream:Tr,isURLSearchParams:Er,isTypedArray:Zr,isFileList:kr,forEach:Re,merge:xt,extend:Or,trim:Nr,stripBOM:Cr,inherits:Ur,toFlatObject:Ir,kindOf:Xe,kindOfTest:B,endsWith:qr,toArray:Fr,forEachEntry:Mr,matchAll:Dr,isHTMLForm:Br,hasOwnProperty:ns,hasOwnProp:ns,reduceDescriptors:as,freezeMethods:Vr,toObjectSet:Qr,toCamelCase:Lr,noop:Hr,toFiniteNumber:Wr,findKey:ss,global:ue,isContextDefined:rs,isSpecCompliantForm:Jr,toJSONObject:Kr,isAsyncFn:Xr,isThenable:Gr,setImmediate:is,asap:Yr,isIterable:s=>s!=null&&I(s[Ke])};function k(s,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}l.inherits(k,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:l.toJSONObject(this.config),code:this.code,status:this.status}}});const os=k.prototype,us={};["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(s=>{us[s]={value:s}}),Object.defineProperties(k,us),Object.defineProperty(os,"isAxiosError",{value:!0}),k.from=(s,t,r,n,a,i)=>{const o=Object.create(os);l.toFlatObject(s,o,function(d){return d!==Error.prototype},c=>c!=="isAxiosError");const u=s&&s.message?s.message:"Error",h=t==null&&s?s.code:t;return k.call(o,u,h,r,n,a),s&&o.cause==null&&Object.defineProperty(o,"cause",{value:s,configurable:!0}),o.name=s&&s.name||"Error",i&&Object.assign(o,i),o};const en=null;function kt(s){return l.isPlainObject(s)||l.isArray(s)}function cs(s){return l.endsWith(s,"[]")?s.slice(0,-2):s}function ls(s,t,r){return s?s.concat(t).map(function(a,i){return a=cs(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function tn(s){return l.isArray(s)&&!s.some(kt)}const sn=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function et(s,t,r){if(!l.isObject(s))throw new TypeError("target must be an object");t=t||new FormData,r=l.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!l.isUndefined(b[v])});const n=r.metaTokens,a=r.visitor||d,i=r.dots,o=r.indexes,h=(r.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(a))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(l.isDate(g))return g.toISOString();if(l.isBoolean(g))return g.toString();if(!h&&l.isBlob(g))throw new k("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(g)||l.isTypedArray(g)?h&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,v,b){let P=g;if(g&&!b&&typeof g=="object"){if(l.endsWith(v,"{}"))v=n?v:v.slice(0,-2),g=JSON.stringify(g);else if(l.isArray(g)&&tn(g)||(l.isFileList(g)||l.endsWith(v,"[]"))&&(P=l.toArray(g)))return v=cs(v),P.forEach(function(N,F){!(l.isUndefined(N)||N===null)&&t.append(o===!0?ls([v],F,i):o===null?v:v+"[]",c(N))}),!1}return kt(g)?!0:(t.append(ls(b,v,i),c(g)),!1)}const m=[],j=Object.assign(sn,{defaultVisitor:d,convertValue:c,isVisitable:kt});function R(g,v){if(!l.isUndefined(g)){if(m.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));m.push(g),l.forEach(g,function(P,M){(!(l.isUndefined(P)||P===null)&&a.call(t,P,l.isString(M)?M.trim():M,v,j))===!0&&R(P,v?v.concat(M):[M])}),m.pop()}}if(!l.isObject(s))throw new TypeError("data must be an object");return R(s),t}function ds(s){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Tt(s,t){this._pairs=[],s&&et(s,this,t)}const hs=Tt.prototype;hs.append=function(t,r){this._pairs.push([t,r])},hs.toString=function(t){const r=t?function(n){return t.call(this,n,ds)}:ds;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function rn(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ps(s,t,r){if(!t)return s;const n=r&&r.encode||rn;l.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let i;if(a?i=a(t,r):i=l.isURLSearchParams(t)?t.toString():new Tt(t,r).toString(n),i){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+i}return s}class ms{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(n){n!==null&&t(n)})}}const gs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Tt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},zt=typeof window<"u"&&typeof document<"u",Et=typeof navigator=="object"&&navigator||void 0,an=zt&&(!Et||["ReactNative","NativeScript","NS"].indexOf(Et.product)<0),on=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",un=zt&&window.location.href||"http://localhost",O={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zt,hasStandardBrowserEnv:an,hasStandardBrowserWebWorkerEnv:on,navigator:Et,origin:un},Symbol.toStringTag,{value:"Module"})),...nn};function cn(s,t){return et(s,new O.classes.URLSearchParams,{visitor:function(r,n,a,i){return O.isNode&&l.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function ln(s){return l.matchAll(/\w+|\[(\w*)]/g,s).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dn(s){const t={},r=Object.keys(s);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],t[i]=s[i];return t}function fs(s){function t(r,n,a,i){let o=r[i++];if(o==="__proto__")return!0;const u=Number.isFinite(+o),h=i>=r.length;return o=!o&&l.isArray(a)?a.length:o,h?(l.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!u):((!a[o]||!l.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&l.isArray(a[o])&&(a[o]=dn(a[o])),!u)}if(l.isFormData(s)&&l.isFunction(s.entries)){const r={};return l.forEachEntry(s,(n,a)=>{t(ln(n),a,r,0)}),r}return null}function hn(s,t,r){if(l.isString(s))try{return(t||JSON.parse)(s),l.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(s)}const Se={transitional:gs,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=l.isObject(t);if(i&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return a?JSON.stringify(fs(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return cn(t,this.formSerializer).toString();if((u=l.isFileList(t))||n.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return et(u?{"files[]":t}:t,h&&new h,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),hn(t)):t}],transformResponse:[function(t){const r=this.transitional||Se.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(u){if(o)throw u.name==="SyntaxError"?k.from(u,k.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],s=>{Se.headers[s]={}});const pn=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mn=s=>{const t={};let r,n,a;return s&&s.split(`
2
+ `).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&pn[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},ys=Symbol("internals");function Pe(s){return s&&String(s).trim().toLowerCase()}function tt(s){return s===!1||s==null?s:l.isArray(s)?s.map(tt):String(s)}function gn(s){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(s);)t[n[1]]=n[2];return t}const fn=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function At(s,t,r,n,a){if(l.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!l.isString(t)){if(l.isString(n))return t.indexOf(n)!==-1;if(l.isRegExp(n))return n.test(t)}}function yn(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function bn(s,t){const r=l.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(s,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}class q{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(u,h,c){const d=Pe(h);if(!d)throw new Error("header name must be a non-empty string");const m=l.findKey(a,d);(!m||a[m]===void 0||c===!0||c===void 0&&a[m]!==!1)&&(a[m||h]=tt(u))}const o=(u,h)=>l.forEach(u,(c,d)=>i(c,d,h));if(l.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(l.isString(t)&&(t=t.trim())&&!fn(t))o(mn(t),r);else if(l.isObject(t)&&l.isIterable(t)){let u={},h,c;for(const d of t){if(!l.isArray(d))throw TypeError("Object iterator must return a key-value pair");u[c=d[0]]=(h=u[c])?l.isArray(h)?[...h,d[1]]:[h,d[1]]:d[1]}o(u,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=Pe(t),t){const n=l.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return gn(a);if(l.isFunction(r))return r.call(this,a,n);if(l.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Pe(t),t){const n=l.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||At(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(o){if(o=Pe(o),o){const u=l.findKey(n,o);u&&(!r||At(n,n[u],u,r))&&(delete n[u],a=!0)}}return l.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||At(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return l.forEach(this,(a,i)=>{const o=l.findKey(n,i);if(o){r[o]=tt(a),delete r[i];return}const u=t?yn(i):String(i).trim();u!==i&&delete r[i],r[u]=tt(a),n[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return l.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&l.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[ys]=this[ys]={accessors:{}}).accessors,a=this.prototype;function i(o){const u=Pe(o);n[u]||(bn(a,o),n[u]=!0)}return l.isArray(t)?t.forEach(i):i(t),this}}q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(q.prototype,({value:s},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>s,set(n){this[r]=n}}}),l.freezeMethods(q);function Rt(s,t){const r=this||Se,n=t||r,a=q.from(n.headers);let i=n.data;return l.forEach(s,function(u){i=u.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function bs(s){return!!(s&&s.__CANCEL__)}function _e(s,t,r){k.call(this,s??"canceled",k.ERR_CANCELED,t,r),this.name="CanceledError"}l.inherits(_e,k,{__CANCEL__:!0});function _s(s,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?s(r):t(new k("Request failed with status code "+r.status,[k.ERR_BAD_REQUEST,k.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function _n(s){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return t&&t[1]||""}function vn(s,t){s=s||10;const r=new Array(s),n=new Array(s);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(h){const c=Date.now(),d=n[i];o||(o=c),r[a]=h,n[a]=c;let m=i,j=0;for(;m!==a;)j+=r[m++],m=m%s;if(a=(a+1)%s,a===i&&(i=(i+1)%s),c-o<t)return;const R=d&&c-d;return R?Math.round(j*1e3/R):void 0}}function jn(s,t){let r=0,n=1e3/t,a,i;const o=(c,d=Date.now())=>{r=d,a=null,i&&(clearTimeout(i),i=null),s(...c)};return[(...c)=>{const d=Date.now(),m=d-r;m>=n?o(c,d):(a=c,i||(i=setTimeout(()=>{i=null,o(a)},n-m)))},()=>a&&o(a)]}const st=(s,t,r=3)=>{let n=0;const a=vn(50,250);return jn(i=>{const o=i.loaded,u=i.lengthComputable?i.total:void 0,h=o-n,c=a(h),d=o<=u;n=o;const m={loaded:o,total:u,progress:u?o/u:void 0,bytes:h,rate:c||void 0,estimated:c&&u&&d?(u-o)/c:void 0,event:i,lengthComputable:u!=null,[t?"download":"upload"]:!0};s(m)},r)},vs=(s,t)=>{const r=s!=null;return[n=>t[0]({lengthComputable:r,total:s,loaded:n}),t[1]]},js=s=>(...t)=>l.asap(()=>s(...t)),wn=O.hasStandardBrowserEnv?((s,t)=>r=>(r=new URL(r,O.origin),s.protocol===r.protocol&&s.host===r.host&&(t||s.port===r.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,xn=O.hasStandardBrowserEnv?{write(s,t,r,n,a,i,o){if(typeof document>"u")return;const u=[`${s}=${encodeURIComponent(t)}`];l.isNumber(r)&&u.push(`expires=${new Date(r).toUTCString()}`),l.isString(n)&&u.push(`path=${n}`),l.isString(a)&&u.push(`domain=${a}`),i===!0&&u.push("secure"),l.isString(o)&&u.push(`SameSite=${o}`),document.cookie=u.join("; ")},read(s){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+s+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(s){this.write(s,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function kn(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Tn(s,t){return t?s.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):s}function ws(s,t,r){let n=!kn(t);return s&&(n||r==!1)?Tn(s,t):t}const xs=s=>s instanceof q?{...s}:s;function ce(s,t){t=t||{};const r={};function n(c,d,m,j){return l.isPlainObject(c)&&l.isPlainObject(d)?l.merge.call({caseless:j},c,d):l.isPlainObject(d)?l.merge({},d):l.isArray(d)?d.slice():d}function a(c,d,m,j){if(l.isUndefined(d)){if(!l.isUndefined(c))return n(void 0,c,m,j)}else return n(c,d,m,j)}function i(c,d){if(!l.isUndefined(d))return n(void 0,d)}function o(c,d){if(l.isUndefined(d)){if(!l.isUndefined(c))return n(void 0,c)}else return n(void 0,d)}function u(c,d,m){if(m in t)return n(c,d);if(m in s)return n(void 0,c)}const h={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(c,d,m)=>a(xs(c),xs(d),m,!0)};return l.forEach(Object.keys({...s,...t}),function(d){const m=h[d]||a,j=m(s[d],t[d],d);l.isUndefined(j)&&m!==u||(r[d]=j)}),r}const ks=s=>{const t=ce({},s);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:u}=t;if(t.headers=o=q.from(o),t.url=ps(ws(t.baseURL,t.url,t.allowAbsoluteUrls),s.params,s.paramsSerializer),u&&o.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),l.isFormData(r)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(l.isFunction(r.getHeaders)){const h=r.getHeaders(),c=["content-type","content-length"];Object.entries(h).forEach(([d,m])=>{c.includes(d.toLowerCase())&&o.set(d,m)})}}if(O.hasStandardBrowserEnv&&(n&&l.isFunction(n)&&(n=n(t)),n||n!==!1&&wn(t.url))){const h=a&&i&&xn.read(i);h&&o.set(a,h)}return t},zn=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(r,n){const a=ks(s);let i=a.data;const o=q.from(a.headers).normalize();let{responseType:u,onUploadProgress:h,onDownloadProgress:c}=a,d,m,j,R,g;function v(){R&&R(),g&&g(),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function P(){if(!b)return;const N=q.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),Q={data:!u||u==="text"||u==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:N,config:s,request:b};_s(function(D){r(D),v()},function(D){n(D),v()},Q),b=null}"onloadend"in b?b.onloadend=P:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(P)},b.onabort=function(){b&&(n(new k("Request aborted",k.ECONNABORTED,s,b)),b=null)},b.onerror=function(F){const Q=F&&F.message?F.message:"Network Error",me=new k(Q,k.ERR_NETWORK,s,b);me.event=F||null,n(me),b=null},b.ontimeout=function(){let F=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const Q=a.transitional||gs;a.timeoutErrorMessage&&(F=a.timeoutErrorMessage),n(new k(F,Q.clarifyTimeoutError?k.ETIMEDOUT:k.ECONNABORTED,s,b)),b=null},i===void 0&&o.setContentType(null),"setRequestHeader"in b&&l.forEach(o.toJSON(),function(F,Q){b.setRequestHeader(Q,F)}),l.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),u&&u!=="json"&&(b.responseType=a.responseType),c&&([j,g]=st(c,!0),b.addEventListener("progress",j)),h&&b.upload&&([m,R]=st(h),b.upload.addEventListener("progress",m),b.upload.addEventListener("loadend",R)),(a.cancelToken||a.signal)&&(d=N=>{b&&(n(!N||N.type?new _e(null,s,b):N),b.abort(),b=null)},a.cancelToken&&a.cancelToken.subscribe(d),a.signal&&(a.signal.aborted?d():a.signal.addEventListener("abort",d)));const M=_n(a.url);if(M&&O.protocols.indexOf(M)===-1){n(new k("Unsupported protocol "+M+":",k.ERR_BAD_REQUEST,s));return}b.send(i||null)})},En=(s,t)=>{const{length:r}=s=s?s.filter(Boolean):[];if(t||r){let n=new AbortController,a;const i=function(c){if(!a){a=!0,u();const d=c instanceof Error?c:this.reason;n.abort(d instanceof k?d:new _e(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,i(new k(`timeout ${t} of ms exceeded`,k.ETIMEDOUT))},t);const u=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),s=null)};s.forEach(c=>c.addEventListener("abort",i));const{signal:h}=n;return h.unsubscribe=()=>l.asap(u),h}},An=function*(s,t){let r=s.byteLength;if(r<t){yield s;return}let n=0,a;for(;n<r;)a=n+t,yield s.slice(n,a),n=a},Rn=async function*(s,t){for await(const r of Sn(s))yield*An(r,t)},Sn=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const t=s.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Ts=(s,t,r,n)=>{const a=Rn(s,t);let i=0,o,u=h=>{o||(o=!0,n&&n(h))};return new ReadableStream({async pull(h){try{const{done:c,value:d}=await a.next();if(c){u(),h.close();return}let m=d.byteLength;if(r){let j=i+=m;r(j)}h.enqueue(new Uint8Array(d))}catch(c){throw u(c),c}},cancel(h){return u(h),a.return()}},{highWaterMark:2})},zs=64*1024,{isFunction:rt}=l,Pn=(({Request:s,Response:t})=>({Request:s,Response:t}))(l.global),{ReadableStream:Es,TextEncoder:As}=l.global,Rs=(s,...t)=>{try{return!!s(...t)}catch{return!1}},Nn=s=>{s=l.merge.call({skipUndefined:!0},Pn,s);const{fetch:t,Request:r,Response:n}=s,a=t?rt(t):typeof fetch=="function",i=rt(r),o=rt(n);if(!a)return!1;const u=a&&rt(Es),h=a&&(typeof As=="function"?(g=>v=>g.encode(v))(new As):async g=>new Uint8Array(await new r(g).arrayBuffer())),c=i&&u&&Rs(()=>{let g=!1;const v=new r(O.origin,{body:new Es,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!v}),d=o&&u&&Rs(()=>l.isReadableStream(new n("").body)),m={stream:d&&(g=>g.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!m[g]&&(m[g]=(v,b)=>{let P=v&&v[g];if(P)return P.call(v);throw new k(`Response type '${g}' is not supported`,k.ERR_NOT_SUPPORT,b)})});const j=async g=>{if(g==null)return 0;if(l.isBlob(g))return g.size;if(l.isSpecCompliantForm(g))return(await new r(O.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(l.isArrayBufferView(g)||l.isArrayBuffer(g))return g.byteLength;if(l.isURLSearchParams(g)&&(g=g+""),l.isString(g))return(await h(g)).byteLength},R=async(g,v)=>{const b=l.toFiniteNumber(g.getContentLength());return b??j(v)};return async g=>{let{url:v,method:b,data:P,signal:M,cancelToken:N,timeout:F,onDownloadProgress:Q,onUploadProgress:me,responseType:D,headers:Xt,withCredentials:_t="same-origin",fetchOptions:lr}=ks(g),dr=t||fetch;D=D?(D+"").toLowerCase():"text";let vt=En([M,N&&N.toAbortSignal()],F),Je=null;const ge=vt&&vt.unsubscribe&&(()=>{vt.unsubscribe()});let hr;try{if(me&&c&&b!=="get"&&b!=="head"&&(hr=await R(Xt,P))!==0){let ie=new r(v,{method:"POST",body:P,duplex:"half"}),ze;if(l.isFormData(P)&&(ze=ie.headers.get("content-type"))&&Xt.setContentType(ze),ie.body){const[Gt,jt]=vs(hr,st(js(me)));P=Ts(ie.body,zs,Gt,jt)}}l.isString(_t)||(_t=_t?"include":"omit");const X=i&&"credentials"in r.prototype,pr={...lr,signal:vt,method:b.toUpperCase(),headers:Xt.normalize().toJSON(),body:P,duplex:"half",credentials:X?_t:void 0};Je=i&&new r(v,pr);let ae=await(i?dr(Je,lr):dr(v,pr));const mr=d&&(D==="stream"||D==="response");if(d&&(Q||mr&&ge)){const ie={};["status","statusText","headers"].forEach(gr=>{ie[gr]=ae[gr]});const ze=l.toFiniteNumber(ae.headers.get("content-length")),[Gt,jt]=Q&&vs(ze,st(js(Q),!0))||[];ae=new n(Ts(ae.body,zs,Gt,()=>{jt&&jt(),ge&&ge()}),ie)}D=D||"text";let Si=await m[l.findKey(m,D)||"text"](ae,g);return!mr&&ge&&ge(),await new Promise((ie,ze)=>{_s(ie,ze,{data:Si,headers:q.from(ae.headers),status:ae.status,statusText:ae.statusText,config:g,request:Je})})}catch(X){throw ge&&ge(),X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)?Object.assign(new k("Network Error",k.ERR_NETWORK,g,Je),{cause:X.cause||X}):k.from(X,X&&X.code,g,Je)}}},On=new Map,Ss=s=>{let t=s&&s.env||{};const{fetch:r,Request:n,Response:a}=t,i=[n,a,r];let o=i.length,u=o,h,c,d=On;for(;u--;)h=i[u],c=d.get(h),c===void 0&&d.set(h,c=u?new Map:Nn(t)),d=c;return c};Ss();const St={http:en,xhr:zn,fetch:{get:Ss}};l.forEach(St,(s,t)=>{if(s){try{Object.defineProperty(s,"name",{value:t})}catch{}Object.defineProperty(s,"adapterName",{value:t})}});const Ps=s=>`- ${s}`,Cn=s=>l.isFunction(s)||s===null||s===!1;function Un(s,t){s=l.isArray(s)?s:[s];const{length:r}=s;let n,a;const i={};for(let o=0;o<r;o++){n=s[o];let u;if(a=n,!Cn(n)&&(a=St[(u=String(n)).toLowerCase()],a===void 0))throw new k(`Unknown adapter '${u}'`);if(a&&(l.isFunction(a)||(a=a.get(t))))break;i[u||"#"+o]=a}if(!a){const o=Object.entries(i).map(([h,c])=>`adapter ${h} `+(c===!1?"is not supported by the environment":"is not available in the build"));let u=r?o.length>1?`since :
4
+ `+o.map(Ps).join(`
5
+ `):" "+Ps(o[0]):"as no adapter specified";throw new k("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return a}const Ns={getAdapter:Un,adapters:St};function Pt(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new _e(null,s)}function Os(s){return Pt(s),s.headers=q.from(s.headers),s.data=Rt.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),Ns.getAdapter(s.adapter||Se.adapter,s)(s).then(function(n){return Pt(s),n.data=Rt.call(s,s.transformResponse,n),n.headers=q.from(n.headers),n},function(n){return bs(n)||(Pt(s),n&&n.response&&(n.response.data=Rt.call(s,s.transformResponse,n.response),n.response.headers=q.from(n.response.headers))),Promise.reject(n)})}const Cs="1.13.2",nt={};["object","boolean","number","function","string","symbol"].forEach((s,t)=>{nt[s]=function(n){return typeof n===s||"a"+(t<1?"n ":" ")+s}});const Us={};nt.transitional=function(t,r,n){function a(i,o){return"[Axios v"+Cs+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,u)=>{if(t===!1)throw new k(a(o," has been removed"+(r?" in "+r:"")),k.ERR_DEPRECATED);return r&&!Us[o]&&(Us[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,u):!0}},nt.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function In(s,t,r){if(typeof s!="object")throw new k("options must be an object",k.ERR_BAD_OPTION_VALUE);const n=Object.keys(s);let a=n.length;for(;a-- >0;){const i=n[a],o=t[i];if(o){const u=s[i],h=u===void 0||o(u,i,s);if(h!==!0)throw new k("option "+i+" must be "+h,k.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new k("Unknown option "+i,k.ERR_BAD_OPTION)}}const at={assertOptions:In,validators:nt},H=at.validators;class le{constructor(t){this.defaults=t||{},this.interceptors={request:new ms,response:new ms}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
+ `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ce(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&at.assertOptions(n,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),a!=null&&(l.isFunction(a)?r.paramsSerializer={serialize:a}:at.assertOptions(a,{encode:H.function,serialize:H.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),at.assertOptions(r,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&l.merge(i.common,i[r.method]);i&&l.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),r.headers=q.concat(o,i);const u=[];let h=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(h=h&&v.synchronous,u.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let d,m=0,j;if(!h){const g=[Os.bind(this),void 0];for(g.unshift(...u),g.push(...c),j=g.length,d=Promise.resolve(r);m<j;)d=d.then(g[m++],g[m++]);return d}j=u.length;let R=r;for(;m<j;){const g=u[m++],v=u[m++];try{R=g(R)}catch(b){v.call(this,b);break}}try{d=Os.call(this,R)}catch(g){return Promise.reject(g)}for(m=0,j=c.length;m<j;)d=d.then(c[m++],c[m++]);return d}getUri(t){t=ce(this.defaults,t);const r=ws(t.baseURL,t.url,t.allowAbsoluteUrls);return ps(r,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){le.prototype[t]=function(r,n){return this.request(ce(n||{},{method:t,url:r,data:(n||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function r(n){return function(i,o,u){return this.request(ce(u||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}le.prototype[t]=r(),le.prototype[t+"Form"]=r(!0)});class Nt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(u=>{n.subscribe(u),i=u}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,u){n.reason||(n.reason=new _e(i,o,u),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Nt(function(a){t=a}),cancel:t}}}function qn(s){return function(r){return s.apply(null,r)}}function Fn(s){return l.isObject(s)&&s.isAxiosError===!0}const Ot={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ot).forEach(([s,t])=>{Ot[t]=s});function Is(s){const t=new le(s),r=fe(le.prototype.request,t);return l.extend(r,le.prototype,t,{allOwnKeys:!0}),l.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return Is(ce(s,a))},r}const S=Is(Se);S.Axios=le,S.CanceledError=_e,S.CancelToken=Nt,S.isCancel=bs,S.VERSION=Cs,S.toFormData=et,S.AxiosError=k,S.Cancel=S.CanceledError,S.all=function(t){return Promise.all(t)},S.spread=qn,S.isAxiosError=Fn,S.mergeConfig=ce,S.AxiosHeaders=q,S.formToJSON=s=>fs(l.isHTMLForm(s)?new FormData(s):s),S.getAdapter=Ns.getAdapter,S.HttpStatusCode=Ot,S.default=S;var E;(function(s){s.assertEqual=a=>a;function t(a){}s.assertIs=t;function r(a){throw new Error}s.assertNever=r,s.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},s.getValidEnumValues=a=>{const i=s.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),o={};for(const u of i)o[u]=a[u];return s.objectValues(o)},s.objectValues=a=>s.objectKeys(a).map(function(i){return a[i]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},s.find=(a,i)=>{for(const o of a)if(i(o))return o},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}s.joinValues=n,s.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(E||(E={}));var Ct;(function(s){s.mergeShapes=(t,r)=>({...t,...r})})(Ct||(Ct={}));const y=E.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ee=s=>{switch(typeof s){case"undefined":return y.undefined;case"string":return y.string;case"number":return isNaN(s)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(s)?y.array:s===null?y.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?y.promise:typeof Map<"u"&&s instanceof Map?y.map:typeof Set<"u"&&s instanceof Set?y.set:typeof Date<"u"&&s instanceof Date?y.date:y.object;default:return y.unknown}},p=E.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Zn=s=>JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:");class Z extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(i){return i.message},n={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let u=n,h=0;for(;h<o.path.length;){const c=o.path[h];h===o.path.length-1?(u[c]=u[c]||{_errors:[]},u[c]._errors.push(r(o))):u[c]=u[c]||{_errors:[]},u=u[c],h++}}};return a(this),n}static assert(t){if(!(t instanceof Z))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,E.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(t(a))):n.push(t(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Z.create=s=>new Z(s);const ve=(s,t)=>{let r;switch(s.code){case p.invalid_type:s.received===y.undefined?r="Required":r=`Expected ${s.expected}, received ${s.received}`;break;case p.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(s.expected,E.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:r=`Unrecognized key(s) in object: ${E.joinValues(s.keys,", ")}`;break;case p.invalid_union:r="Invalid input";break;case p.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${E.joinValues(s.options)}`;break;case p.invalid_enum_value:r=`Invalid enum value. Expected ${E.joinValues(s.options)}, received '${s.received}'`;break;case p.invalid_arguments:r="Invalid function arguments";break;case p.invalid_return_type:r="Invalid function return type";break;case p.invalid_date:r="Invalid date";break;case p.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(r=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?r=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?r=`Invalid input: must end with "${s.validation.endsWith}"`:E.assertNever(s.validation):s.validation!=="regex"?r=`Invalid ${s.validation}`:r="Invalid";break;case p.too_small:s.type==="array"?r=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?r=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?r=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?r=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:r="Invalid input";break;case p.too_big:s.type==="array"?r=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?r=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?r=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?r=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?r=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:r="Invalid input";break;case p.custom:r="Invalid input";break;case p.invalid_intersection_types:r="Intersection results could not be merged";break;case p.not_multiple_of:r=`Number must be a multiple of ${s.multipleOf}`;break;case p.not_finite:r="Number must be finite";break;default:r=t.defaultError,E.assertNever(s)}return{message:r}};let qs=ve;function Mn(s){qs=s}function it(){return qs}const ot=s=>{const{data:t,path:r,errorMaps:n,issueData:a}=s,i=[...r,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let u="";const h=n.filter(c=>!!c).slice().reverse();for(const c of h)u=c(o,{data:t,defaultError:u}).message;return{...a,path:i,message:u}},Dn=[];function f(s,t){const r=it(),n=ot({issueData:t,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,r,r===ve?void 0:ve].filter(a=>!!a)});s.common.issues.push(n)}class C{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const a of r){if(a.status==="aborted")return x;a.status==="dirty"&&t.dirty(),n.push(a.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const a of r){const i=await a.key,o=await a.value;n.push({key:i,value:o})}return C.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const a of r){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return x;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}}const x=Object.freeze({status:"aborted"}),je=s=>({status:"dirty",value:s}),U=s=>({status:"valid",value:s}),Ut=s=>s.status==="aborted",It=s=>s.status==="dirty",Ne=s=>s.status==="valid",Oe=s=>typeof Promise<"u"&&s instanceof Promise;function ut(s,t,r,n){if(typeof t=="function"?s!==t||!n:!t.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(s)}function Fs(s,t,r,n,a){if(typeof t=="function"?s!==t||!a:!t.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(s,r),r}typeof SuppressedError=="function"&&SuppressedError;var _;(function(s){s.errToObj=t=>typeof t=="string"?{message:t}:t||{},s.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_||(_={}));var Ce,Ue;class W{constructor(t,r,n,a){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Zs=(s,t)=>{if(Ne(t))return{success:!0,data:t.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Z(s.common.issues);return this._error=r,this._error}}};function T(s){if(!s)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:a}=s;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(o,u)=>{var h,c;const{message:d}=s;return o.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:(h=d??n)!==null&&h!==void 0?h:u.defaultError}:o.code!=="invalid_type"?{message:u.defaultError}:{message:(c=d??r)!==null&&c!==void 0?c:u.defaultError}},description:a}}class z{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ee(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ee(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new C,ctx:{common:t.parent.common,data:t.data,parsedType:ee(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Oe(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const a={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ee(t)},i=this._parseSync({data:t,path:a.path,parent:a});return Zs(a,i)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ee(t)},a=this._parse({data:t,path:n.path,parent:n}),i=await(Oe(a)?a:Promise.resolve(a));return Zs(n,i)}refine(t,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,i)=>{const o=t(a),u=()=>i.addIssue({code:p.custom,...n(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(h=>h?!0:(u(),!1)):o?!0:(u(),!1)})}refinement(t,r){return this._refinement((n,a)=>t(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(t){return new V({schema:this,typeName:w.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return K.create(this,this._def)}nullable(){return ne.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $.create(this,this._def)}promise(){return Te.create(this,this._def)}or(t){return Ze.create([this,t],this._def)}and(t){return Me.create(this,t,this._def)}transform(t){return new V({...T(this._def),schema:this,typeName:w.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Ve({...T(this._def),innerType:this,defaultValue:r,typeName:w.ZodDefault})}brand(){return new Zt({typeName:w.ZodBranded,type:this,...T(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Qe({...T(this._def),innerType:this,catchValue:r,typeName:w.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return He.create(this,t)}readonly(){return We.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Bn=/^c[^\s-]{8,}$/i,Ln=/^[0-9a-z]+$/,$n=/^[0-9A-HJKMNP-TV-Z]{26}$/,Vn=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Qn=/^[a-z0-9_-]{21}$/i,Hn=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Wn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Jn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let qt;const Kn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Xn=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Gn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ms="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Yn=new RegExp(`^${Ms}$`);function Ds(s){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return s.precision?t=`${t}\\.\\d{${s.precision}}`:s.precision==null&&(t=`${t}(\\.\\d+)?`),t}function ea(s){return new RegExp(`^${Ds(s)}$`)}function Bs(s){let t=`${Ms}T${Ds(s)}`;const r=[];return r.push(s.local?"Z?":"Z"),s.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function ta(s,t){return!!((t==="v4"||!t)&&Kn.test(s)||(t==="v6"||!t)&&Xn.test(s))}class L extends z{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==y.string){const i=this._getOrReturnCtx(t);return f(i,{code:p.invalid_type,expected:y.string,received:i.parsedType}),x}const n=new C;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),f(a,{code:p.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),f(a,{code:p.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,u=t.data.length<i.value;(o||u)&&(a=this._getOrReturnCtx(t,a),o?f(a,{code:p.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&f(a,{code:p.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")Wn.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"email",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")qt||(qt=new RegExp(Jn,"u")),qt.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"emoji",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Vn.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"uuid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")Qn.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"nanoid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Bn.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"cuid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Ln.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"cuid2",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")$n.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"ulid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),f(a,{validation:"url",code:p.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"regex",code:p.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),f(a,{code:p.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),f(a,{code:p.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),f(a,{code:p.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Bs(i).test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{code:p.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?Yn.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{code:p.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?ea(i).test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{code:p.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?Hn.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"duration",code:p.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?ta(t.data,i.version)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"ip",code:p.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Gn.test(t.data)||(a=this._getOrReturnCtx(t,a),f(a,{validation:"base64",code:p.invalid_string,message:i.message}),n.dirty()):E.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(a=>t.test(a),{validation:r,code:p.invalid_string,..._.errToObj(n)})}_addCheck(t){return new L({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",..._.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",..._.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,..._.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,..._.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",..._.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._.errToObj(r)})}nonempty(t){return this.min(1,_.errToObj(t))}trim(){return new L({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new L({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new L({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}L.create=s=>{var t;return new L({checks:[],typeName:w.ZodString,coerce:(t=s==null?void 0:s.coerce)!==null&&t!==void 0?t:!1,...T(s)})};function sa(s,t){const r=(s.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,a=r>n?r:n,i=parseInt(s.toFixed(a).replace(".","")),o=parseInt(t.toFixed(a).replace(".",""));return i%o/Math.pow(10,a)}class te extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==y.number){const i=this._getOrReturnCtx(t);return f(i,{code:p.invalid_type,expected:y.number,received:i.parsedType}),x}let n;const a=new C;for(const i of this._def.checks)i.kind==="int"?E.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),f(n,{code:p.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),f(n,{code:p.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),f(n,{code:p.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?sa(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),f(n,{code:p.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),f(n,{code:p.not_finite,message:i.message}),a.dirty()):E.assertNever(i);return{status:a.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,a){return new te({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(a)}]})}_addCheck(t){return new te({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&E.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}te.create=s=>new te({checks:[],typeName:w.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...T(s)});class se extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==y.bigint){const i=this._getOrReturnCtx(t);return f(i,{code:p.invalid_type,expected:y.bigint,received:i.parsedType}),x}let n;const a=new C;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),f(n,{code:p.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),f(n,{code:p.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),f(n,{code:p.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):E.assertNever(i);return{status:a.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_.toString(r))}setLimit(t,r,n,a){return new se({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_.toString(a)}]})}_addCheck(t){return new se({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}se.create=s=>{var t;return new se({checks:[],typeName:w.ZodBigInt,coerce:(t=s==null?void 0:s.coerce)!==null&&t!==void 0?t:!1,...T(s)})};class Ie extends z{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==y.boolean){const n=this._getOrReturnCtx(t);return f(n,{code:p.invalid_type,expected:y.boolean,received:n.parsedType}),x}return U(t.data)}}Ie.create=s=>new Ie({typeName:w.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...T(s)});class de extends z{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==y.date){const i=this._getOrReturnCtx(t);return f(i,{code:p.invalid_type,expected:y.date,received:i.parsedType}),x}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return f(i,{code:p.invalid_date}),x}const n=new C;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),f(a,{code:p.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),f(a,{code:p.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):E.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new de({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}de.create=s=>new de({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:w.ZodDate,...T(s)});class ct extends z{_parse(t){if(this._getType(t)!==y.symbol){const n=this._getOrReturnCtx(t);return f(n,{code:p.invalid_type,expected:y.symbol,received:n.parsedType}),x}return U(t.data)}}ct.create=s=>new ct({typeName:w.ZodSymbol,...T(s)});class qe extends z{_parse(t){if(this._getType(t)!==y.undefined){const n=this._getOrReturnCtx(t);return f(n,{code:p.invalid_type,expected:y.undefined,received:n.parsedType}),x}return U(t.data)}}qe.create=s=>new qe({typeName:w.ZodUndefined,...T(s)});class Fe extends z{_parse(t){if(this._getType(t)!==y.null){const n=this._getOrReturnCtx(t);return f(n,{code:p.invalid_type,expected:y.null,received:n.parsedType}),x}return U(t.data)}}Fe.create=s=>new Fe({typeName:w.ZodNull,...T(s)});class we extends z{constructor(){super(...arguments),this._any=!0}_parse(t){return U(t.data)}}we.create=s=>new we({typeName:w.ZodAny,...T(s)});class he extends z{constructor(){super(...arguments),this._unknown=!0}_parse(t){return U(t.data)}}he.create=s=>new he({typeName:w.ZodUnknown,...T(s)});class G extends z{_parse(t){const r=this._getOrReturnCtx(t);return f(r,{code:p.invalid_type,expected:y.never,received:r.parsedType}),x}}G.create=s=>new G({typeName:w.ZodNever,...T(s)});class lt extends z{_parse(t){if(this._getType(t)!==y.undefined){const n=this._getOrReturnCtx(t);return f(n,{code:p.invalid_type,expected:y.void,received:n.parsedType}),x}return U(t.data)}}lt.create=s=>new lt({typeName:w.ZodVoid,...T(s)});class $ extends z{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),a=this._def;if(r.parsedType!==y.array)return f(r,{code:p.invalid_type,expected:y.array,received:r.parsedType}),x;if(a.exactLength!==null){const o=r.data.length>a.exactLength.value,u=r.data.length<a.exactLength.value;(o||u)&&(f(r,{code:o?p.too_big:p.too_small,minimum:u?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(f(r,{code:p.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(f(r,{code:p.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,u)=>a.type._parseAsync(new W(r,o,r.path,u)))).then(o=>C.mergeArray(n,o));const i=[...r.data].map((o,u)=>a.type._parseSync(new W(r,o,r.path,u)));return C.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new $({...this._def,minLength:{value:t,message:_.toString(r)}})}max(t,r){return new $({...this._def,maxLength:{value:t,message:_.toString(r)}})}length(t,r){return new $({...this._def,exactLength:{value:t,message:_.toString(r)}})}nonempty(t){return this.min(1,t)}}$.create=(s,t)=>new $({type:s,minLength:null,maxLength:null,exactLength:null,typeName:w.ZodArray,...T(t)});function xe(s){if(s instanceof A){const t={};for(const r in s.shape){const n=s.shape[r];t[r]=K.create(xe(n))}return new A({...s._def,shape:()=>t})}else return s instanceof $?new $({...s._def,type:xe(s.element)}):s instanceof K?K.create(xe(s.unwrap())):s instanceof ne?ne.create(xe(s.unwrap())):s instanceof J?J.create(s.items.map(t=>xe(t))):s}class A extends z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=E.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==y.object){const c=this._getOrReturnCtx(t);return f(c,{code:p.invalid_type,expected:y.object,received:c.parsedType}),x}const{status:n,ctx:a}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),u=[];if(!(this._def.catchall instanceof G&&this._def.unknownKeys==="strip"))for(const c in a.data)o.includes(c)||u.push(c);const h=[];for(const c of o){const d=i[c],m=a.data[c];h.push({key:{status:"valid",value:c},value:d._parse(new W(a,m,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof G){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of u)h.push({key:{status:"valid",value:d},value:{status:"valid",value:a.data[d]}});else if(c==="strict")u.length>0&&(f(a,{code:p.unrecognized_keys,keys:u}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of u){const m=a.data[d];h.push({key:{status:"valid",value:d},value:c._parse(new W(a,m,a.path,d)),alwaysSet:d in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of h){const m=await d.key,j=await d.value;c.push({key:m,value:j,alwaysSet:d.alwaysSet})}return c}).then(c=>C.mergeObjectSync(n,c)):C.mergeObjectSync(n,h)}get shape(){return this._def.shape()}strict(t){return _.errToObj,new A({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var a,i,o,u;const h=(o=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(u=_.errToObj(t).message)!==null&&u!==void 0?u:h}:{message:h}}}:{}})}strip(){return new A({...this._def,unknownKeys:"strip"})}passthrough(){return new A({...this._def,unknownKeys:"passthrough"})}extend(t){return new A({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new A({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:w.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new A({...this._def,catchall:t})}pick(t){const r={};return E.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new A({...this._def,shape:()=>r})}omit(t){const r={};return E.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new A({...this._def,shape:()=>r})}deepPartial(){return xe(this)}partial(t){const r={};return E.objectKeys(this.shape).forEach(n=>{const a=this.shape[n];t&&!t[n]?r[n]=a:r[n]=a.optional()}),new A({...this._def,shape:()=>r})}required(t){const r={};return E.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof K;)i=i._def.innerType;r[n]=i}}),new A({...this._def,shape:()=>r})}keyof(){return Ls(E.objectKeys(this.shape))}}A.create=(s,t)=>new A({shape:()=>s,unknownKeys:"strip",catchall:G.create(),typeName:w.ZodObject,...T(t)}),A.strictCreate=(s,t)=>new A({shape:()=>s,unknownKeys:"strict",catchall:G.create(),typeName:w.ZodObject,...T(t)}),A.lazycreate=(s,t)=>new A({shape:s,unknownKeys:"strip",catchall:G.create(),typeName:w.ZodObject,...T(t)});class Ze extends z{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function a(i){for(const u of i)if(u.result.status==="valid")return u.result;for(const u of i)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;const o=i.map(u=>new Z(u.ctx.common.issues));return f(r,{code:p.invalid_union,unionErrors:o}),x}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const h of n){const c={...r,common:{...r.common,issues:[]},parent:null},d=h._parseSync({data:r.data,path:r.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const u=o.map(h=>new Z(h));return f(r,{code:p.invalid_union,unionErrors:u}),x}}get options(){return this._def.options}}Ze.create=(s,t)=>new Ze({options:s,typeName:w.ZodUnion,...T(t)});const Y=s=>s instanceof Be?Y(s.schema):s instanceof V?Y(s.innerType()):s instanceof Le?[s.value]:s instanceof re?s.options:s instanceof $e?E.objectValues(s.enum):s instanceof Ve?Y(s._def.innerType):s instanceof qe?[void 0]:s instanceof Fe?[null]:s instanceof K?[void 0,...Y(s.unwrap())]:s instanceof ne?[null,...Y(s.unwrap())]:s instanceof Zt||s instanceof We?Y(s.unwrap()):s instanceof Qe?Y(s._def.innerType):[];class dt extends z{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==y.object)return f(r,{code:p.invalid_type,expected:y.object,received:r.parsedType}),x;const n=this.discriminator,a=r.data[n],i=this.optionsMap.get(a);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(f(r,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),x)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const a=new Map;for(const i of r){const o=Y(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of o){if(a.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);a.set(u,i)}}return new dt({typeName:w.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:a,...T(n)})}}function Ft(s,t){const r=ee(s),n=ee(t);if(s===t)return{valid:!0,data:s};if(r===y.object&&n===y.object){const a=E.objectKeys(t),i=E.objectKeys(s).filter(u=>a.indexOf(u)!==-1),o={...s,...t};for(const u of i){const h=Ft(s[u],t[u]);if(!h.valid)return{valid:!1};o[u]=h.data}return{valid:!0,data:o}}else if(r===y.array&&n===y.array){if(s.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<s.length;i++){const o=s[i],u=t[i],h=Ft(o,u);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return r===y.date&&n===y.date&&+s==+t?{valid:!0,data:s}:{valid:!1}}class Me extends z{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=(i,o)=>{if(Ut(i)||Ut(o))return x;const u=Ft(i.value,o.value);return u.valid?((It(i)||It(o))&&r.dirty(),{status:r.value,value:u.data}):(f(n,{code:p.invalid_intersection_types}),x)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Me.create=(s,t,r)=>new Me({left:s,right:t,typeName:w.ZodIntersection,...T(r)});class J extends z{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==y.array)return f(n,{code:p.invalid_type,expected:y.array,received:n.parsedType}),x;if(n.data.length<this._def.items.length)return f(n,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;!this._def.rest&&n.data.length>this._def.items.length&&(f(n,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,u)=>{const h=this._def.items[u]||this._def.rest;return h?h._parse(new W(n,o,n.path,u)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>C.mergeArray(r,o)):C.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new J({...this._def,rest:t})}}J.create=(s,t)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new J({items:s,typeName:w.ZodTuple,rest:null,...T(t)})};class De extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==y.object)return f(n,{code:p.invalid_type,expected:y.object,received:n.parsedType}),x;const a=[],i=this._def.keyType,o=this._def.valueType;for(const u in n.data)a.push({key:i._parse(new W(n,u,n.path,u)),value:o._parse(new W(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?C.mergeObjectAsync(r,a):C.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof z?new De({keyType:t,valueType:r,typeName:w.ZodRecord,...T(n)}):new De({keyType:L.create(),valueType:t,typeName:w.ZodRecord,...T(r)})}}class ht extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==y.map)return f(n,{code:p.invalid_type,expected:y.map,received:n.parsedType}),x;const a=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([u,h],c)=>({key:a._parse(new W(n,u,n.path,[c,"key"])),value:i._parse(new W(n,h,n.path,[c,"value"]))}));if(n.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const h of o){const c=await h.key,d=await h.value;if(c.status==="aborted"||d.status==="aborted")return x;(c.status==="dirty"||d.status==="dirty")&&r.dirty(),u.set(c.value,d.value)}return{status:r.value,value:u}})}else{const u=new Map;for(const h of o){const c=h.key,d=h.value;if(c.status==="aborted"||d.status==="aborted")return x;(c.status==="dirty"||d.status==="dirty")&&r.dirty(),u.set(c.value,d.value)}return{status:r.value,value:u}}}}ht.create=(s,t,r)=>new ht({valueType:t,keyType:s,typeName:w.ZodMap,...T(r)});class pe extends z{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==y.set)return f(n,{code:p.invalid_type,expected:y.set,received:n.parsedType}),x;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(f(n,{code:p.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(f(n,{code:p.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const i=this._def.valueType;function o(h){const c=new Set;for(const d of h){if(d.status==="aborted")return x;d.status==="dirty"&&r.dirty(),c.add(d.value)}return{status:r.value,value:c}}const u=[...n.data.values()].map((h,c)=>i._parse(new W(n,h,n.path,c)));return n.common.async?Promise.all(u).then(h=>o(h)):o(u)}min(t,r){return new pe({...this._def,minSize:{value:t,message:_.toString(r)}})}max(t,r){return new pe({...this._def,maxSize:{value:t,message:_.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}pe.create=(s,t)=>new pe({valueType:s,minSize:null,maxSize:null,typeName:w.ZodSet,...T(t)});class ke extends z{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==y.function)return f(r,{code:p.invalid_type,expected:y.function,received:r.parsedType}),x;function n(u,h){return ot({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,it(),ve].filter(c=>!!c),issueData:{code:p.invalid_arguments,argumentsError:h}})}function a(u,h){return ot({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,it(),ve].filter(c=>!!c),issueData:{code:p.invalid_return_type,returnTypeError:h}})}const i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Te){const u=this;return U(async function(...h){const c=new Z([]),d=await u._def.args.parseAsync(h,i).catch(R=>{throw c.addIssue(n(h,R)),c}),m=await Reflect.apply(o,this,d);return await u._def.returns._def.type.parseAsync(m,i).catch(R=>{throw c.addIssue(a(m,R)),c})})}else{const u=this;return U(function(...h){const c=u._def.args.safeParse(h,i);if(!c.success)throw new Z([n(h,c.error)]);const d=Reflect.apply(o,this,c.data),m=u._def.returns.safeParse(d,i);if(!m.success)throw new Z([a(d,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ke({...this._def,args:J.create(t).rest(he.create())})}returns(t){return new ke({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new ke({args:t||J.create([]).rest(he.create()),returns:r||he.create(),typeName:w.ZodFunction,...T(n)})}}class Be extends z{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Be.create=(s,t)=>new Be({getter:s,typeName:w.ZodLazy,...T(t)});class Le extends z{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return f(r,{received:r.data,code:p.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:t.data}}get value(){return this._def.value}}Le.create=(s,t)=>new Le({value:s,typeName:w.ZodLiteral,...T(t)});function Ls(s,t){return new re({values:s,typeName:w.ZodEnum,...T(t)})}class re extends z{constructor(){super(...arguments),Ce.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return f(r,{expected:E.joinValues(n),received:r.parsedType,code:p.invalid_type}),x}if(ut(this,Ce)||Fs(this,Ce,new Set(this._def.values)),!ut(this,Ce).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return f(r,{received:r.data,code:p.invalid_enum_value,options:n}),x}return U(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return re.create(t,{...this._def,...r})}exclude(t,r=this._def){return re.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Ce=new WeakMap,re.create=Ls;class $e extends z{constructor(){super(...arguments),Ue.set(this,void 0)}_parse(t){const r=E.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==y.string&&n.parsedType!==y.number){const a=E.objectValues(r);return f(n,{expected:E.joinValues(a),received:n.parsedType,code:p.invalid_type}),x}if(ut(this,Ue)||Fs(this,Ue,new Set(E.getValidEnumValues(this._def.values))),!ut(this,Ue).has(t.data)){const a=E.objectValues(r);return f(n,{received:n.data,code:p.invalid_enum_value,options:a}),x}return U(t.data)}get enum(){return this._def.values}}Ue=new WeakMap,$e.create=(s,t)=>new $e({values:s,typeName:w.ZodNativeEnum,...T(t)});class Te extends z{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==y.promise&&r.common.async===!1)return f(r,{code:p.invalid_type,expected:y.promise,received:r.parsedType}),x;const n=r.parsedType===y.promise?r.data:Promise.resolve(r.data);return U(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Te.create=(s,t)=>new Te({type:s,typeName:w.ZodPromise,...T(t)});class V extends z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===w.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:o=>{f(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async u=>{if(r.value==="aborted")return x;const h=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return h.status==="aborted"?x:h.status==="dirty"||r.value==="dirty"?je(h.value):h});{if(r.value==="aborted")return x;const u=this._def.schema._parseSync({data:o,path:n.path,parent:n});return u.status==="aborted"?x:u.status==="dirty"||r.value==="dirty"?je(u.value):u}}if(a.type==="refinement"){const o=u=>{const h=a.refinement(u,i);if(n.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===!1){const u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?x:(u.status==="dirty"&&r.dirty(),o(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?x:(u.status==="dirty"&&r.dirty(),o(u.value).then(()=>({status:r.value,value:u.value}))))}if(a.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ne(o))return o;const u=a.transform(o.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Ne(o)?Promise.resolve(a.transform(o.value,i)).then(u=>({status:r.value,value:u})):o);E.assertNever(a)}}V.create=(s,t,r)=>new V({schema:s,typeName:w.ZodEffects,effect:t,...T(r)}),V.createWithPreprocess=(s,t,r)=>new V({schema:t,effect:{type:"preprocess",transform:s},typeName:w.ZodEffects,...T(r)});class K extends z{_parse(t){return this._getType(t)===y.undefined?U(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}K.create=(s,t)=>new K({innerType:s,typeName:w.ZodOptional,...T(t)});class ne extends z{_parse(t){return this._getType(t)===y.null?U(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ne.create=(s,t)=>new ne({innerType:s,typeName:w.ZodNullable,...T(t)});class Ve extends z{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===y.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Ve.create=(s,t)=>new Ve({innerType:s,typeName:w.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...T(t)});class Qe extends z{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Oe(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Z(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Z(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Qe.create=(s,t)=>new Qe({innerType:s,typeName:w.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...T(t)});class pt extends z{_parse(t){if(this._getType(t)!==y.nan){const n=this._getOrReturnCtx(t);return f(n,{code:p.invalid_type,expected:y.nan,received:n.parsedType}),x}return{status:"valid",value:t.data}}}pt.create=s=>new pt({typeName:w.ZodNaN,...T(s)});const ra=Symbol("zod_brand");class Zt extends z{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class He extends z{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?x:i.status==="dirty"?(r.dirty(),je(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?x:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(t,r){return new He({in:t,out:r,typeName:w.ZodPipeline})}}class We extends z{_parse(t){const r=this._def.innerType._parse(t),n=a=>(Ne(a)&&(a.value=Object.freeze(a.value)),a);return Oe(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}We.create=(s,t)=>new We({innerType:s,typeName:w.ZodReadonly,...T(t)});function $s(s,t={},r){return s?we.create().superRefine((n,a)=>{var i,o;if(!s(n)){const u=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,h=(o=(i=u.fatal)!==null&&i!==void 0?i:r)!==null&&o!==void 0?o:!0,c=typeof u=="string"?{message:u}:u;a.addIssue({code:"custom",...c,fatal:h})}}):we.create()}const na={object:A.lazycreate};var w;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(w||(w={}));const aa=(s,t={message:`Input not instance of ${s.name}`})=>$s(r=>r instanceof s,t),Vs=L.create,Qs=te.create,ia=pt.create,oa=se.create,Hs=Ie.create,ua=de.create,ca=ct.create,la=qe.create,da=Fe.create,ha=we.create,pa=he.create,ma=G.create,ga=lt.create,fa=$.create,ya=A.create,ba=A.strictCreate,_a=Ze.create,va=dt.create,ja=Me.create,wa=J.create,xa=De.create,ka=ht.create,Ta=pe.create,za=ke.create,Ea=Be.create,Aa=Le.create,Ra=re.create,Sa=$e.create,Pa=Te.create,Ws=V.create,Na=K.create,Oa=ne.create,Ca=V.createWithPreprocess,Ua=He.create;var e=Object.freeze({__proto__:null,defaultErrorMap:ve,setErrorMap:Mn,getErrorMap:it,makeIssue:ot,EMPTY_PATH:Dn,addIssueToContext:f,ParseStatus:C,INVALID:x,DIRTY:je,OK:U,isAborted:Ut,isDirty:It,isValid:Ne,isAsync:Oe,get util(){return E},get objectUtil(){return Ct},ZodParsedType:y,getParsedType:ee,ZodType:z,datetimeRegex:Bs,ZodString:L,ZodNumber:te,ZodBigInt:se,ZodBoolean:Ie,ZodDate:de,ZodSymbol:ct,ZodUndefined:qe,ZodNull:Fe,ZodAny:we,ZodUnknown:he,ZodNever:G,ZodVoid:lt,ZodArray:$,ZodObject:A,ZodUnion:Ze,ZodDiscriminatedUnion:dt,ZodIntersection:Me,ZodTuple:J,ZodRecord:De,ZodMap:ht,ZodSet:pe,ZodFunction:ke,ZodLazy:Be,ZodLiteral:Le,ZodEnum:re,ZodNativeEnum:$e,ZodPromise:Te,ZodEffects:V,ZodTransformer:V,ZodOptional:K,ZodNullable:ne,ZodDefault:Ve,ZodCatch:Qe,ZodNaN:pt,BRAND:ra,ZodBranded:Zt,ZodPipeline:He,ZodReadonly:We,custom:$s,Schema:z,ZodSchema:z,late:na,get ZodFirstPartyTypeKind(){return w},coerce:{string:s=>L.create({...s,coerce:!0}),number:s=>te.create({...s,coerce:!0}),boolean:s=>Ie.create({...s,coerce:!0}),bigint:s=>se.create({...s,coerce:!0}),date:s=>de.create({...s,coerce:!0})},any:ha,array:fa,bigint:oa,boolean:Hs,date:ua,discriminatedUnion:va,effect:Ws,enum:Ra,function:za,instanceof:aa,intersection:ja,lazy:Ea,literal:Aa,map:ka,nan:ia,nativeEnum:Sa,never:ma,null:da,nullable:Oa,number:Qs,object:ya,oboolean:()=>Hs().optional(),onumber:()=>Qs().optional(),optional:Na,ostring:()=>Vs().optional(),pipeline:Ua,preprocess:Ca,promise:Pa,record:xa,set:Ta,strictObject:ba,string:Vs,symbol:ca,transformer:Ws,tuple:wa,undefined:la,union:_a,unknown:pa,void:ga,NEVER:x,ZodIssueCode:p,quotelessJson:Zn,ZodError:Z});function Ia(s,t){let r={...s};for(let n of t)delete r[n];return r}var qa=/:([a-zA-Z_][a-zA-Z0-9_]*)/g;function Fa(s){let t=s.url,r=s.params;return r&&(t=t.replace(qa,(n,a)=>a in r?`${r[a]}`:n)),t}function Js(s,t,r){return s.find(n=>n.method===t&&n.path===r)}function Za(s){let t=new FormData;for(let r in s)t.append(r,s[r]);return{data:t}}var mt=class extends Error{constructor(s,t,r,n){super(s),this.config=t,this.data=r,this.cause=n}},Ma={name:"form-data",request:async(s,t)=>{if(typeof t.data!="object"||Array.isArray(t.data))throw new mt("Zodios: multipart/form-data body must be an object",t);let r=Za(t.data);return{...t,data:r.data,headers:{...t.headers,...r.headers}}}};function Da(){return Ma}var Ba={name:"form-url",request:async(s,t)=>{if(typeof t.data!="object"||Array.isArray(t.data))throw new mt("Zodios: application/x-www-form-urlencoded body must be an object",t);return{...t,data:new URLSearchParams(t.data).toString(),headers:{...t.headers,"Content-Type":"application/x-www-form-urlencoded"}}}};function La(){return Ba}function Ks(s,t){return{request:async(r,n)=>({...n,headers:{...n.headers,[s]:t}})}}function Xs(s){return[!0,"response","all"].includes(s)}function Gs(s){return[!0,"request","all"].includes(s)}function $a({validate:s,transform:t,sendDefaults:r}){return{name:"zod-validation",request:Gs(s)?async(n,a)=>{let i=Js(n,a.method,a.url);if(!i)throw new Error(`No endpoint found for ${a.method} ${a.url}`);let{parameters:o}=i;if(!o)return a;let u={...a,queries:{...a.queries},headers:{...a.headers},params:{...a.params}},h={Query:m=>{var j;return(j=u.queries)==null?void 0:j[m]},Body:m=>u.data,Header:m=>{var j;return(j=u.headers)==null?void 0:j[m]},Path:m=>{var j;return(j=u.params)==null?void 0:j[m]}},c={Query:(m,j)=>u.queries[m]=j,Body:(m,j)=>u.data=j,Header:(m,j)=>u.headers[m]=j,Path:(m,j)=>u.params[m]=j},d=Gs(t);for(let m of o){let{name:j,schema:R,type:g}=m,v=h[g](j);if(r||v!==void 0){let b=await R.safeParseAsync(v);if(!b.success)throw new mt(`Zodios: Invalid ${g} parameter '${j}'`,a,v,b.error);d&&c[g](j,b.data)}}return u}:void 0,response:Xs(s)?async(n,a,i)=>{var o,u,h,c;let d=Js(n,a.method,a.url);if(!d)throw new Error(`No endpoint found for ${a.method} ${a.url}`);if((u=(o=i.headers)==null?void 0:o["content-type"])!=null&&u.includes("application/json")||(c=(h=i.headers)==null?void 0:h["content-type"])!=null&&c.includes("application/vnd.api+json")){let m=await d.response.safeParseAsync(i.data);if(!m.success)throw new mt(`Zodios: Invalid response from endpoint '${d.method} ${d.path}'
7
7
  status: ${i.status} ${i.statusText}
8
8
  cause:
9
9
  ${m.error.message}
10
10
  received:
11
- ${JSON.stringify(i.data,null,2)}`,a,i.data,m.error);Us(e)&&(i.data=m.data)}return i}:void 0}}var qs=class{constructor(s,e){this.plugins=[],this.key=`${s}-${e}`}indexOf(s){return this.plugins.findIndex(e=>(e==null?void 0:e.name)===s)}use(s){if(s.name){let e=this.indexOf(s.name);if(e!==-1)return this.plugins[e]=s,{key:this.key,value:e}}return this.plugins.push(s),{key:this.key,value:this.plugins.length-1}}eject(s){if(typeof s=="string"){let e=this.indexOf(s);if(e===-1)throw new Error(`Plugin with name '${s}' not found`);this.plugins[e]=void 0}else{if(s.key!==this.key)throw new Error(`Plugin with key '${s.key}' is not registered for endpoint '${this.key}'`);this.plugins[s.value]=void 0}}async interceptRequest(s,e){let r=e;for(let n of this.plugins)n!=null&&n.request&&(r=await n.request(s,r));return r}async interceptResponse(s,e,r){let n=r;for(let a=this.plugins.length-1;a>=0;a--){let i=this.plugins[a];i&&(n=n.then(i!=null&&i.response?o=>i.response(s,e,o):void 0,i!=null&&i.error?o=>i.error(s,e,o):void 0))}return n}count(){return this.plugins.reduce((s,e)=>e?s+1:s,0)}};function Ms(s){let e=new Set;for(let n of s){let a=`${n.method} ${n.path}`;if(e.has(a))throw new Error(`Zodios: Duplicate path '${a}'`);e.add(a)}let r=new Set;for(let n of s)if(n.alias){if(r.has(n.alias))throw new Error(`Zodios: Duplicate alias '${n.alias}'`);r.add(n.alias)}for(let n of s)if(n.parameters&&n.parameters.filter(a=>a.type==="Body").length>1)throw new Error(`Zodios: Multiple body parameters in endpoint '${n.path}'`)}function ja(s){return Ms(s),s}var wa=class{constructor(s,e,r){this.endpointPlugins=new Map;let n;if(!s)throw Array.isArray(e)?new Error("Zodios: missing base url"):new Error("Zodios: missing api description");let a;if(typeof s=="string"&&Array.isArray(e))a=s,this.api=e,n=r||{};else if(Array.isArray(s)&&!Array.isArray(e))this.api=s,n=e||{};else throw new Error("Zodios: api must be an array");Ms(this.api),this.options={validate:!0,transform:!0,sendDefaults:!1,...n},this.options.axiosInstance?this.axiosInstance=this.options.axiosInstance:this.axiosInstance=O.create({...this.options.axiosConfig}),a&&(this.axiosInstance.defaults.baseURL=a),this.injectAliasEndpoints(),this.initPlugins(),[!0,"all","request","response"].includes(this.options.validate)&&this.use(va(this.options))}initPlugins(){this.endpointPlugins.set("any-any",new qs("any","any")),this.api.forEach(s=>{let e=new qs(s.method,s.path);switch(s.requestFormat){case"binary":e.use(Is("Content-Type","application/octet-stream"));break;case"form-data":e.use(ya());break;case"form-url":e.use(_a());break;case"text":e.use(Is("Content-Type","text/plain"));break}this.endpointPlugins.set(`${s.method}-${s.path}`,e)})}getAnyEndpointPlugins(){return this.endpointPlugins.get("any-any")}findAliasEndpointPlugins(s){let e=this.api.find(r=>r.alias===s);if(e)return this.endpointPlugins.get(`${e.method}-${e.path}`)}findEnpointPlugins(s,e){return this.endpointPlugins.get(`${s}-${e}`)}get baseURL(){return this.axiosInstance.defaults.baseURL}get axios(){return this.axiosInstance}use(...s){if(typeof s[0]=="object")return this.getAnyEndpointPlugins().use(s[0]);if(typeof s[0]=="string"&&typeof s[1]=="object"){let e=this.findAliasEndpointPlugins(s[0]);if(!e)throw new Error(`Zodios: no alias '${s[0]}' found to register plugin`);return e.use(s[1])}else if(typeof s[0]=="string"&&typeof s[1]=="string"&&typeof s[2]=="object"){let e=this.findEnpointPlugins(s[0],s[1]);if(!e)throw new Error(`Zodios: no endpoint '${s[0]} ${s[1]}' found to register plugin`);return e.use(s[2])}throw new Error("Zodios: invalid plugin registration")}eject(s){var e;if(typeof s=="string"){this.getAnyEndpointPlugins().eject(s);return}(e=this.endpointPlugins.get(s.key))==null||e.eject(s)}injectAliasEndpoints(){this.api.forEach(s=>{s.alias&&(["post","put","patch","delete"].includes(s.method)?this[s.alias]=(e,r)=>this.request({...r,method:s.method,url:s.path,data:e}):this[s.alias]=e=>this.request({...e,method:s.method,url:s.path}))})}async request(s){let e=s,r=this.getAnyEndpointPlugins(),n=this.findEnpointPlugins(e.method,e.url);e=await r.interceptRequest(this.api,e),n&&(e=await n.interceptRequest(this.api,e));let a=this.axiosInstance.request({...ha(e,["params","queries"]),url:ma(e),params:e.queries});return n&&(a=n.interceptResponse(this.api,e,a)),a=r.interceptResponse(this.api,e,a),(await a).data}async get(s,...[e]){return this.request({...e,method:"get",url:s})}async post(s,e,...[r]){return this.request({...r,method:"post",url:s,data:e})}async put(s,e,...[r]){return this.request({...r,method:"put",url:s,data:e})}async patch(s,e,...[r]){return this.request({...r,method:"patch",url:s,data:e})}async delete(s,e,...[r]){return this.request({...r,method:"delete",url:s,data:e})}},Ls=wa;const zt=t.object({id:t.string(),name:t.string(),is_archived:t.boolean(),created_at:t.string(),updated_at:t.string()}).passthrough(),xa=t.array(zt);t.object({name:t.string().min(1).max(255)}).passthrough();const ka=t.object({name:t.string().min(1).max(255),is_archived:t.boolean().optional()}).passthrough(),Ta=t.object({type:t.string(),data:t.string()}).passthrough(),Ea=t.object({id:t.string(),email:t.string(),role:t.string()}).passthrough(),Bs=t.enum(["owner","admin","manager","employee","placeholder"]),Ra=t.object({email:t.string().email(),role:Bs}).passthrough(),Ds=t.object({id:t.string(),user_id:t.string(),name:t.string(),email:t.string(),role:t.string(),is_placeholder:t.boolean(),billable_rate:t.union([t.number(),t.null()])}).passthrough(),Sa=t.object({role:Bs,billable_rate:t.union([t.number(),t.null()])}).partial().passthrough(),Fs=t.object({id:t.string(),name:t.string(),is_personal:t.boolean(),billable_rate:t.union([t.number(),t.null()]),employees_can_see_billable_rates:t.boolean()}).passthrough(),Aa=t.object({name:t.string().max(255),billable_rate:t.union([t.number(),t.null()]).optional(),employees_can_see_billable_rates:t.boolean().optional()}).passthrough(),it=t.object({id:t.string(),name:t.string(),color:t.string(),client_id:t.union([t.string(),t.null()]),is_archived:t.boolean(),billable_rate:t.union([t.number(),t.null()]),is_billable:t.boolean(),estimated_time:t.union([t.number(),t.null()]),spent_time:t.number().int()}).passthrough(),Pa=t.object({name:t.string().min(1).max(255),color:t.string().max(255),is_billable:t.boolean(),billable_rate:t.union([t.number(),t.null()]).optional(),client_id:t.union([t.string(),t.null()]).optional(),estimated_time:t.union([t.number(),t.null()]).optional()}).passthrough(),Oa=t.object({name:t.string().max(255),color:t.string().max(255),is_billable:t.boolean(),is_archived:t.boolean().optional(),client_id:t.union([t.string(),t.null()]).optional(),billable_rate:t.union([t.number(),t.null()]).optional(),estimated_time:t.union([t.number(),t.null()]).optional()}).passthrough(),Ct=t.object({id:t.string(),billable_rate:t.union([t.number(),t.null()]),member_id:t.string(),project_id:t.string()}).passthrough(),Na=t.object({member_id:t.string().uuid(),billable_rate:t.union([t.number(),t.null()]).optional()}).passthrough(),za=t.object({billable_rate:t.union([t.number(),t.null()])}).partial().passthrough(),It=t.object({id:t.string(),name:t.string(),created_at:t.string(),updated_at:t.string()}).passthrough(),Ca=t.array(It);t.object({name:t.string().min(1).max(255)}).passthrough(),t.object({name:t.string().min(1).max(255)}).passthrough();const Ut=t.object({id:t.string(),name:t.string(),is_done:t.boolean(),project_id:t.string(),estimated_time:t.union([t.number(),t.null()]),spent_time:t.number().int(),created_at:t.string(),updated_at:t.string()}).passthrough(),Ia=t.object({name:t.string().min(1).max(255),project_id:t.string(),estimated_time:t.union([t.number(),t.null()]).optional()}).passthrough(),Ua=t.object({name:t.string().min(1).max(255),is_done:t.boolean().optional(),estimated_time:t.union([t.number(),t.null()]).optional()}).passthrough(),ot=t.union([t.string(),t.null()]).optional(),ct=t.object({id:t.string(),start:t.string(),end:t.union([t.string(),t.null()]),duration:t.union([t.number(),t.null()]),description:t.union([t.string(),t.null()]),task_id:t.union([t.string(),t.null()]),project_id:t.union([t.string(),t.null()]),organization_id:t.string(),user_id:t.string(),tags:t.array(t.string()),billable:t.boolean()}).passthrough(),Za=t.object({member_id:t.string().uuid(),project_id:t.union([t.string(),t.null()]).optional(),task_id:t.union([t.string(),t.null()]).optional(),start:t.string(),end:t.union([t.string(),t.null()]).optional(),billable:t.boolean(),description:t.union([t.string(),t.null()]).optional(),tags:t.union([t.array(t.string().uuid()),t.null()]).optional()}).passthrough(),qa=t.object({ids:t.array(t.string().uuid()),changes:t.object({member_id:t.string().uuid(),project_id:t.union([t.string(),t.null()]),task_id:t.union([t.string(),t.null()]),billable:t.boolean(),description:t.union([t.string(),t.null()]),tags:t.union([t.array(t.string().uuid()),t.null()])}).partial().passthrough()}).passthrough(),Ma=t.object({member_id:t.string().uuid(),project_id:t.union([t.string(),t.null()]),task_id:t.union([t.string(),t.null()]),start:t.string(),end:t.union([t.string(),t.null()]),billable:t.boolean(),description:t.union([t.string(),t.null()]),tags:t.union([t.array(t.string().uuid()),t.null()])}).partial().passthrough(),La=t.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),Ba=t.object({id:t.string(),name:t.string(),email:t.string(),profile_photo_url:t.string(),timezone:t.string(),week_start:La}).passthrough(),Da=t.object({id:t.string(),organization:t.object({id:t.string(),name:t.string()}).passthrough(),role:t.string()}).passthrough(),Fa=t.array(Da),$s=ja([{method:"get",path:"/v1/organizations/:organization",alias:"getOrganization",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:Fs}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization",alias:"updateOrganization",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Aa},{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:Fs}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/clients",alias:"getClients",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"page",type:"Query",schema:t.number().int().gte(1).optional()},{name:"archived",type:"Query",schema:t.enum(["true","false","all"]).optional()}],response:t.object({data:xa}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/clients",alias:"createClient",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:t.object({name:t.string().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:zt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/clients/:client",alias:"updateClient",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ka},{name:"organization",type:"Path",schema:t.string()},{name:"client",type:"Path",schema:t.string()}],response:t.object({data:zt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/clients/:client",alias:"deleteClient",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"client",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/export",alias:"exportOrganization",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:t.object({}).partial().passthrough()},{name:"organization",type:"Path",schema:t.string()}],response:t.object({success:t.boolean(),download_url:t.string()}).passthrough(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/import",alias:"importData",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ta},{name:"organization",type:"Path",schema:t.string()}],response:t.object({report:t.object({clients:t.object({created:t.number().int()}).passthrough(),projects:t.object({created:t.number().int()}).passthrough(),tasks:t.object({created:t.number().int()}).passthrough(),time_entries:t.object({created:t.number().int()}).passthrough(),tags:t.object({created:t.number().int()}).passthrough(),users:t.object({created:t.number().int()}).passthrough()}).passthrough()}).passthrough(),errors:[{status:400,schema:t.union([t.object({message:t.string()}).passthrough(),t.object({message:t.string()}).passthrough()])},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/importers",alias:"getImporters",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:t.array(t.object({key:t.string(),name:t.string(),description:t.string()}).passthrough())}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invitations",alias:"getInvitations",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:t.array(Ea),links:t.object({first:t.union([t.string(),t.null()]),last:t.union([t.string(),t.null()]),prev:t.union([t.string(),t.null()]),next:t.union([t.string(),t.null()])}).passthrough(),meta:t.object({current_page:t.number().int(),from:t.union([t.number(),t.null()]),last_page:t.number().int(),links:t.array(t.object({url:t.union([t.string(),t.null()]),label:t.string(),active:t.boolean()}).passthrough()),path:t.union([t.string(),t.null()]),per_page:t.number().int(),to:t.union([t.number(),t.null()]),total:t.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invitations",alias:"invite",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ra},{name:"organization",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/invitations/:invitation",alias:"removeInvitation",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"invitation",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invitations/:invitation/resend",alias:"resendInvitationEmail",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:t.object({}).partial().passthrough()},{name:"organization",type:"Path",schema:t.string()},{name:"invitation",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/members",alias:"getMembers",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:t.array(Ds),links:t.object({first:t.union([t.string(),t.null()]),last:t.union([t.string(),t.null()]),prev:t.union([t.string(),t.null()]),next:t.union([t.string(),t.null()])}).passthrough(),meta:t.object({current_page:t.number().int(),from:t.union([t.number(),t.null()]),last_page:t.number().int(),links:t.array(t.object({url:t.union([t.string(),t.null()]),label:t.string(),active:t.boolean()}).passthrough()),path:t.union([t.string(),t.null()]),per_page:t.number().int(),to:t.union([t.number(),t.null()]),total:t.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/members/:member",alias:"updateMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Sa},{name:"organization",type:"Path",schema:t.string()},{name:"member",type:"Path",schema:t.string()}],response:t.object({data:Ds}).passthrough(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/members/:member",alias:"removeMember",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"member",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/members/:member/invite-placeholder",alias:"invitePlaceholder",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:t.object({}).partial().passthrough()},{name:"organization",type:"Path",schema:t.string()},{name:"member",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/members/:member/make-placeholder",alias:"v1.members.make-placeholder",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:t.object({}).partial().passthrough()},{name:"organization",type:"Path",schema:t.string()},{name:"member",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/project-members/:projectMember",alias:"updateProjectMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:za},{name:"organization",type:"Path",schema:t.string()},{name:"projectMember",type:"Path",schema:t.string()}],response:t.object({data:Ct}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/project-members/:projectMember",alias:"deleteProjectMember",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"projectMember",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects",alias:"getProjects",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"page",type:"Query",schema:t.number().int().gte(1).optional()},{name:"archived",type:"Query",schema:t.enum(["true","false","all"]).optional()}],response:t.object({data:t.array(it),links:t.object({first:t.union([t.string(),t.null()]),last:t.union([t.string(),t.null()]),prev:t.union([t.string(),t.null()]),next:t.union([t.string(),t.null()])}).passthrough(),meta:t.object({current_page:t.number().int(),from:t.union([t.number(),t.null()]),last_page:t.number().int(),links:t.array(t.object({url:t.union([t.string(),t.null()]),label:t.string(),active:t.boolean()}).passthrough()),path:t.union([t.string(),t.null()]),per_page:t.number().int(),to:t.union([t.number(),t.null()]),total:t.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/projects",alias:"createProject",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Pa},{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:it}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects/:project",alias:"getProject",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"project",type:"Path",schema:t.string()}],response:t.object({data:it}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/projects/:project",alias:"updateProject",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Oa},{name:"organization",type:"Path",schema:t.string()},{name:"project",type:"Path",schema:t.string()}],response:t.object({data:it}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/projects/:project",alias:"deleteProject",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"project",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects/:project/project-members",alias:"getProjectMembers",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"project",type:"Path",schema:t.string()}],response:t.object({data:t.array(Ct),links:t.object({first:t.union([t.string(),t.null()]),last:t.union([t.string(),t.null()]),prev:t.union([t.string(),t.null()]),next:t.union([t.string(),t.null()])}).passthrough(),meta:t.object({current_page:t.number().int(),from:t.union([t.number(),t.null()]),last_page:t.number().int(),links:t.array(t.object({url:t.union([t.string(),t.null()]),label:t.string(),active:t.boolean()}).passthrough()),path:t.union([t.string(),t.null()]),per_page:t.number().int(),to:t.union([t.number(),t.null()]),total:t.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/projects/:project/project-members",alias:"createProjectMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Na},{name:"organization",type:"Path",schema:t.string()},{name:"project",type:"Path",schema:t.string()}],response:t.object({data:Ct}).passthrough(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/tags",alias:"getTags",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:Ca}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/tags",alias:"createTag",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:t.object({name:t.string().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:It}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/tags/:tag",alias:"updateTag",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:t.object({name:t.string().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:t.string()},{name:"tag",type:"Path",schema:t.string()}],response:t.object({data:It}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/tags/:tag",alias:"deleteTag",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"tag",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/tasks",alias:"getTasks",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"project_id",type:"Query",schema:t.string().uuid().optional()},{name:"done",type:"Query",schema:t.enum(["true","false","all"]).optional()}],response:t.object({data:t.array(Ut),links:t.object({first:t.union([t.string(),t.null()]),last:t.union([t.string(),t.null()]),prev:t.union([t.string(),t.null()]),next:t.union([t.string(),t.null()])}).passthrough(),meta:t.object({current_page:t.number().int(),from:t.union([t.number(),t.null()]),last_page:t.number().int(),links:t.array(t.object({url:t.union([t.string(),t.null()]),label:t.string(),active:t.boolean()}).passthrough()),path:t.union([t.string(),t.null()]),per_page:t.number().int(),to:t.union([t.number(),t.null()]),total:t.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/tasks",alias:"createTask",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ia},{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:Ut}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/tasks/:task",alias:"updateTask",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ua},{name:"organization",type:"Path",schema:t.string()},{name:"task",type:"Path",schema:t.string()}],response:t.object({data:Ut}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/tasks/:task",alias:"deleteTask",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"task",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries",alias:"getTimeEntries",description:`If you only need time entries for a specific user, you can filter by &#x60;user_id&#x60;.
12
- Users with the permission &#x60;time-entries:view:own&#x60; can only use this endpoint with their own user ID in the user_id filter.`,requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"member_id",type:"Query",schema:t.string().uuid().optional()},{name:"start",type:"Query",schema:ot},{name:"end",type:"Query",schema:ot},{name:"active",type:"Query",schema:t.enum(["true","false"]).optional()},{name:"billable",type:"Query",schema:t.enum(["true","false"]).optional()},{name:"limit",type:"Query",schema:t.number().int().gte(1).lte(500).optional()},{name:"offset",type:"Query",schema:t.number().int().gte(0).optional()},{name:"only_full_dates",type:"Query",schema:t.enum(["true","false"]).optional()},{name:"member_ids",type:"Query",schema:t.array(t.string().uuid()).min(1).optional()},{name:"client_ids",type:"Query",schema:t.array(t.string().uuid()).min(1).optional()},{name:"project_ids",type:"Query",schema:t.array(t.string().uuid()).min(1).optional()},{name:"tag_ids",type:"Query",schema:t.array(t.string().uuid()).min(1).optional()},{name:"task_ids",type:"Query",schema:t.array(t.string().uuid()).min(1).optional()},{name:"user_id",type:"Query",schema:t.string().optional()}],response:t.object({data:t.array(ct),meta:t.object({total:t.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/time-entries",alias:"createTimeEntry",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Za},{name:"organization",type:"Path",schema:t.string()}],response:t.object({data:ct}).passthrough(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"patch",path:"/v1/organizations/:organization/time-entries",alias:"updateMultipleTimeEntries",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:qa},{name:"organization",type:"Path",schema:t.string()}],response:t.object({success:t.string(),error:t.string()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/time-entries",alias:"deleteTimeEntries",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"ids",type:"Query",schema:t.array(t.string().uuid())}],response:t.object({success:t.string(),error:t.string()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/time-entries/:timeEntry",alias:"updateTimeEntry",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ma},{name:"organization",type:"Path",schema:t.string()},{name:"timeEntry",type:"Path",schema:t.string()}],response:t.object({data:ct}).passthrough(),errors:[{status:400,description:"API exception",schema:t.object({error:t.boolean(),key:t.string(),message:t.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/time-entries/:timeEntry",alias:"deleteTimeEntry",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"timeEntry",type:"Path",schema:t.string()}],response:t.null(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries/aggregate",alias:"getAggregatedTimeEntries",description:`This endpoint allows you to filter time entries and aggregate them by different criteria.
11
+ ${JSON.stringify(i.data,null,2)}`,a,i.data,m.error);Xs(t)&&(i.data=m.data)}return i}:void 0}}var Ys=class{constructor(s,t){this.plugins=[],this.key=`${s}-${t}`}indexOf(s){return this.plugins.findIndex(t=>(t==null?void 0:t.name)===s)}use(s){if(s.name){let t=this.indexOf(s.name);if(t!==-1)return this.plugins[t]=s,{key:this.key,value:t}}return this.plugins.push(s),{key:this.key,value:this.plugins.length-1}}eject(s){if(typeof s=="string"){let t=this.indexOf(s);if(t===-1)throw new Error(`Plugin with name '${s}' not found`);this.plugins[t]=void 0}else{if(s.key!==this.key)throw new Error(`Plugin with key '${s.key}' is not registered for endpoint '${this.key}'`);this.plugins[s.value]=void 0}}async interceptRequest(s,t){let r=t;for(let n of this.plugins)n!=null&&n.request&&(r=await n.request(s,r));return r}async interceptResponse(s,t,r){let n=r;for(let a=this.plugins.length-1;a>=0;a--){let i=this.plugins[a];i&&(n=n.then(i!=null&&i.response?o=>i.response(s,t,o):void 0,i!=null&&i.error?o=>i.error(s,t,o):void 0))}return n}count(){return this.plugins.reduce((s,t)=>t?s+1:s,0)}};function er(s){let t=new Set;for(let n of s){let a=`${n.method} ${n.path}`;if(t.has(a))throw new Error(`Zodios: Duplicate path '${a}'`);t.add(a)}let r=new Set;for(let n of s)if(n.alias){if(r.has(n.alias))throw new Error(`Zodios: Duplicate alias '${n.alias}'`);r.add(n.alias)}for(let n of s)if(n.parameters&&n.parameters.filter(a=>a.type==="Body").length>1)throw new Error(`Zodios: Multiple body parameters in endpoint '${n.path}'`)}function Va(s){return er(s),s}var Qa=class{constructor(s,t,r){this.endpointPlugins=new Map;let n;if(!s)throw Array.isArray(t)?new Error("Zodios: missing base url"):new Error("Zodios: missing api description");let a;if(typeof s=="string"&&Array.isArray(t))a=s,this.api=t,n=r||{};else if(Array.isArray(s)&&!Array.isArray(t))this.api=s,n=t||{};else throw new Error("Zodios: api must be an array");er(this.api),this.options={validate:!0,transform:!0,sendDefaults:!1,...n},this.options.axiosInstance?this.axiosInstance=this.options.axiosInstance:this.axiosInstance=S.create({...this.options.axiosConfig}),a&&(this.axiosInstance.defaults.baseURL=a),this.injectAliasEndpoints(),this.initPlugins(),[!0,"all","request","response"].includes(this.options.validate)&&this.use($a(this.options))}initPlugins(){this.endpointPlugins.set("any-any",new Ys("any","any")),this.api.forEach(s=>{let t=new Ys(s.method,s.path);switch(s.requestFormat){case"binary":t.use(Ks("Content-Type","application/octet-stream"));break;case"form-data":t.use(Da());break;case"form-url":t.use(La());break;case"text":t.use(Ks("Content-Type","text/plain"));break}this.endpointPlugins.set(`${s.method}-${s.path}`,t)})}getAnyEndpointPlugins(){return this.endpointPlugins.get("any-any")}findAliasEndpointPlugins(s){let t=this.api.find(r=>r.alias===s);if(t)return this.endpointPlugins.get(`${t.method}-${t.path}`)}findEnpointPlugins(s,t){return this.endpointPlugins.get(`${s}-${t}`)}get baseURL(){return this.axiosInstance.defaults.baseURL}get axios(){return this.axiosInstance}use(...s){if(typeof s[0]=="object")return this.getAnyEndpointPlugins().use(s[0]);if(typeof s[0]=="string"&&typeof s[1]=="object"){let t=this.findAliasEndpointPlugins(s[0]);if(!t)throw new Error(`Zodios: no alias '${s[0]}' found to register plugin`);return t.use(s[1])}else if(typeof s[0]=="string"&&typeof s[1]=="string"&&typeof s[2]=="object"){let t=this.findEnpointPlugins(s[0],s[1]);if(!t)throw new Error(`Zodios: no endpoint '${s[0]} ${s[1]}' found to register plugin`);return t.use(s[2])}throw new Error("Zodios: invalid plugin registration")}eject(s){var t;if(typeof s=="string"){this.getAnyEndpointPlugins().eject(s);return}(t=this.endpointPlugins.get(s.key))==null||t.eject(s)}injectAliasEndpoints(){this.api.forEach(s=>{s.alias&&(["post","put","patch","delete"].includes(s.method)?this[s.alias]=(t,r)=>this.request({...r,method:s.method,url:s.path,data:t}):this[s.alias]=t=>this.request({...t,method:s.method,url:s.path}))})}async request(s){let t=s,r=this.getAnyEndpointPlugins(),n=this.findEnpointPlugins(t.method,t.url);t=await r.interceptRequest(this.api,t),n&&(t=await n.interceptRequest(this.api,t));let a=this.axiosInstance.request({...Ia(t,["params","queries"]),url:Fa(t),params:t.queries});return n&&(a=n.interceptResponse(this.api,t,a)),a=r.interceptResponse(this.api,t,a),(await a).data}async get(s,...[t]){return this.request({...t,method:"get",url:s})}async post(s,t,...[r]){return this.request({...r,method:"post",url:s,data:t})}async put(s,t,...[r]){return this.request({...r,method:"put",url:s,data:t})}async patch(s,t,...[r]){return this.request({...r,method:"patch",url:s,data:t})}async delete(s,t,...[r]){return this.request({...r,method:"delete",url:s,data:t})}},tr=Qa;const Ha=e.object({id:e.string(),name:e.string(),revoked:e.boolean(),scopes:e.array(e.string()),created_at:e.string(),expires_at:e.union([e.string(),e.null()])}).passthrough(),Wa=e.array(Ha);e.object({name:e.string().min(1).max(255)}).passthrough();const Ja=e.object({id:e.string(),name:e.string(),revoked:e.boolean(),scopes:e.array(e.string()),created_at:e.string(),expires_at:e.union([e.string(),e.null()]),access_token:e.string()}).passthrough(),Mt=e.object({id:e.string(),name:e.string(),is_archived:e.boolean(),created_at:e.string(),updated_at:e.string()}).passthrough(),Ka=e.array(Mt);e.object({name:e.string().min(1).max(255)}).passthrough();const Xa=e.object({name:e.string().min(1).max(255),is_archived:e.boolean().optional()}).passthrough(),Ga=e.object({type:e.string(),data:e.string()}).passthrough(),Ya=e.object({id:e.string(),email:e.string(),role:e.string()}).passthrough(),ei=e.object({email:e.string().email(),role:e.enum(["admin","manager","employee"])}).passthrough(),ti=e.object({id:e.string(),organization_id:e.string(),reference:e.string(),seller_name:e.string(),buyer_name:e.string(),status:e.string(),date:e.string(),due_at:e.string(),paid_date:e.string(),created_at:e.union([e.string(),e.null()]),updated_at:e.union([e.string(),e.null()])}).passthrough(),si=e.array(ti),sr=e.enum(["percentage","fixed"]),ri=e.object({due_at:e.union([e.string(),e.null()]).optional(),paid_date:e.union([e.string(),e.null()]).optional(),seller_name:e.string(),seller_vatin:e.union([e.string(),e.null()]).optional(),seller_address_line_1:e.union([e.string(),e.null()]).optional(),seller_address_line_2:e.union([e.string(),e.null()]).optional(),seller_address_line_3:e.union([e.string(),e.null()]).optional(),seller_address_post_code:e.union([e.string(),e.null()]).optional(),seller_address_city:e.union([e.string(),e.null()]).optional(),seller_address_country:e.union([e.string(),e.null()]).optional(),seller_phone:e.union([e.string(),e.null()]).optional(),seller_email:e.union([e.string(),e.null()]).optional(),buyer_name:e.string(),buyer_vatin:e.union([e.string(),e.null()]).optional(),buyer_address_line_1:e.union([e.string(),e.null()]).optional(),buyer_address_line_2:e.union([e.string(),e.null()]).optional(),buyer_address_line_3:e.union([e.string(),e.null()]).optional(),buyer_address_post_code:e.union([e.string(),e.null()]).optional(),buyer_address_city:e.union([e.string(),e.null()]).optional(),buyer_address_country:e.union([e.string(),e.null()]).optional(),buyer_phone:e.union([e.string(),e.null()]).optional(),buyer_email:e.union([e.string(),e.null()]).optional(),date:e.string(),billing_period_start:e.union([e.string(),e.null()]).optional(),billing_period_end:e.union([e.string(),e.null()]).optional(),reference:e.string(),currency:e.string(),payment_iban:e.union([e.string(),e.null()]).optional(),tax_rate:e.number().int().gte(0).lte(2147483647).optional(),discount_amount:e.number().int().gte(0).lte(9223372036854776e3).optional(),discount_type:sr.optional(),footer:e.union([e.string(),e.null()]).optional(),notes:e.union([e.string(),e.null()]).optional(),payment_terms:e.union([e.string(),e.null()]).optional(),is_eu_reverse_charge:e.boolean().optional(),entries:e.array(e.object({name:e.string(),description:e.union([e.string(),e.null()]).optional(),unit_price:e.number().int().gte(0).lte(9223372036854776e3),quantity:e.number().gte(0).lte(99999999)}).passthrough()).optional()}).passthrough(),ni=e.object({id:e.string(),invoice_id:e.string(),name:e.string(),description:e.union([e.string(),e.null()]),unit_price:e.number().int(),quantity:e.number(),order_index:e.number().int(),created_at:e.union([e.string(),e.null()]),updated_at:e.union([e.string(),e.null()])}).passthrough(),Dt=e.object({id:e.string(),organization_id:e.string(),reference:e.string(),seller_name:e.string(),seller_vatin:e.string(),seller_address_line_1:e.string(),seller_address_line_2:e.string(),seller_address_line_3:e.string(),seller_address_post_code:e.string(),seller_address_city:e.string(),seller_address_country:e.string(),seller_phone:e.string(),seller_email:e.string(),buyer_name:e.string(),buyer_vatin:e.string(),buyer_address_line_1:e.string(),buyer_address_line_2:e.string(),buyer_address_line_3:e.string(),buyer_address_post_code:e.string(),buyer_address_city:e.string(),buyer_address_country:e.string(),buyer_phone:e.string(),buyer_email:e.string(),paid_date:e.string(),due_at:e.string(),discount_type:e.string(),discount_amount:e.number().int(),tax_rate:e.number().int(),payment_iban:e.string(),status:e.string(),currency:e.string(),date:e.string(),footer:e.string(),notes:e.string(),payment_terms:e.string(),is_eu_reverse_charge:e.string(),billing_period_start:e.string(),billing_period_end:e.string(),created_at:e.union([e.string(),e.null()]),updated_at:e.union([e.string(),e.null()]),entries:e.array(ni)}).passthrough(),ai=e.enum(["draft","sent","cancelled"]),ii=e.object({status:ai,due_at:e.union([e.string(),e.null()]),paid_date:e.union([e.string(),e.null()]),seller_name:e.string(),seller_vatin:e.union([e.string(),e.null()]),seller_address_line_1:e.union([e.string(),e.null()]),seller_address_line_2:e.union([e.string(),e.null()]),seller_address_line_3:e.union([e.string(),e.null()]),seller_address_post_code:e.union([e.string(),e.null()]),seller_address_city:e.union([e.string(),e.null()]),seller_address_country:e.union([e.string(),e.null()]),seller_phone:e.union([e.string(),e.null()]),seller_email:e.union([e.string(),e.null()]),buyer_name:e.string(),buyer_vatin:e.union([e.string(),e.null()]),buyer_address_line_1:e.union([e.string(),e.null()]),buyer_address_line_2:e.union([e.string(),e.null()]),buyer_address_line_3:e.union([e.string(),e.null()]),buyer_address_post_code:e.union([e.string(),e.null()]),buyer_address_city:e.union([e.string(),e.null()]),buyer_address_country:e.union([e.string(),e.null()]),buyer_phone:e.union([e.string(),e.null()]),buyer_email:e.union([e.string(),e.null()]),date:e.string(),billing_period_start:e.union([e.string(),e.null()]),billing_period_end:e.union([e.string(),e.null()]),reference:e.string(),currency:e.string(),payment_iban:e.union([e.string(),e.null()]),tax_rate:e.number().int().gte(0).lte(2147483647),discount_amount:e.number().int().gte(0).lte(9223372036854776e3),discount_type:sr,footer:e.union([e.string(),e.null()]),notes:e.union([e.string(),e.null()]),payment_terms:e.union([e.string(),e.null()]),is_eu_reverse_charge:e.boolean(),entries:e.array(e.object({id:e.union([e.string(),e.null()]).optional(),name:e.string(),description:e.union([e.string(),e.null()]).optional(),unit_price:e.number().int().gte(0).lte(9223372036854776e3),quantity:e.number().gte(0).lte(99999999)}).passthrough())}).partial().passthrough();e.object({with_e_invoice:e.boolean()}).passthrough();const rr=e.object({seller_name:e.union([e.string(),e.null()]),seller_vatin:e.union([e.string(),e.null()]),seller_address_line_1:e.union([e.string(),e.null()]),seller_address_line_2:e.union([e.string(),e.null()]),seller_address_line_3:e.union([e.string(),e.null()]),seller_address_post_code:e.union([e.string(),e.null()]),seller_address_city:e.union([e.string(),e.null()]),seller_address_country:e.union([e.string(),e.null()]),seller_phone:e.union([e.string(),e.null()]),seller_email:e.union([e.string(),e.null()]),footer_default:e.union([e.string(),e.null()]),notes_default:e.union([e.string(),e.null()]),tax_rate_default:e.union([e.number(),e.null()]),e_invoicing_enabled:e.boolean(),organization_id:e.string()}).passthrough(),oi=e.object({seller_name:e.union([e.string(),e.null()]),seller_vatin:e.union([e.string(),e.null()]),seller_address_line_1:e.union([e.string(),e.null()]),seller_address_line_2:e.union([e.string(),e.null()]),seller_address_line_3:e.union([e.string(),e.null()]),seller_address_post_code:e.union([e.string(),e.null()]),seller_address_city:e.union([e.string(),e.null()]),seller_address_country:e.union([e.string(),e.null()]),seller_phone:e.union([e.string(),e.null()]),seller_email:e.union([e.string(),e.null()]),footer_default:e.union([e.string(),e.null()]),notes_default:e.union([e.string(),e.null()]),tax_rate_default:e.union([e.number(),e.null()]),e_invoicing_enabled:e.boolean()}).partial().passthrough(),nr=e.object({id:e.string(),user_id:e.string(),name:e.string(),email:e.string(),role:e.string(),is_placeholder:e.boolean(),billable_rate:e.union([e.number(),e.null()])}).passthrough(),ui=e.enum(["owner","admin","manager","employee","placeholder"]),ci=e.object({role:ui,billable_rate:e.union([e.number(),e.null()])}).partial().passthrough();e.object({member_id:e.string()}).partial().passthrough();const Bt=e.enum(["point-comma","comma-point","space-comma","space-point","apostrophe-point"]),Lt=e.enum(["iso-code-before-with-space","iso-code-after-with-space","symbol-before","symbol-after","symbol-before-with-space","symbol-after-with-space"]),$t=e.enum(["point-separated-d-m-yyyy","slash-separated-mm-dd-yyyy","slash-separated-dd-mm-yyyy","hyphen-separated-dd-mm-yyyy","hyphen-separated-mm-dd-yyyy","hyphen-separated-yyyy-mm-dd"]),Vt=e.enum(["decimal","hours-minutes","hours-minutes-colon-separated","hours-minutes-seconds-colon-separated"]),Qt=e.enum(["12-hours","24-hours"]),ar=e.object({id:e.string(),name:e.string(),is_personal:e.boolean(),billable_rate:e.union([e.number(),e.null()]),employees_can_see_billable_rates:e.boolean(),employees_can_manage_tasks:e.boolean(),prevent_overlapping_time_entries:e.boolean(),currency:e.string(),currency_symbol:e.string(),number_format:Bt,currency_format:Lt,date_format:$t,interval_format:Vt,time_format:Qt}).passthrough(),li=e.object({name:e.string().max(255),billable_rate:e.union([e.number(),e.null()]),employees_can_see_billable_rates:e.boolean(),employees_can_manage_tasks:e.boolean(),prevent_overlapping_time_entries:e.boolean(),number_format:Bt,currency_format:Lt,date_format:$t,interval_format:Vt,time_format:Qt}).partial().passthrough(),gt=e.object({id:e.string(),name:e.string(),color:e.string(),client_id:e.union([e.string(),e.null()]),is_archived:e.boolean(),billable_rate:e.union([e.number(),e.null()]),is_billable:e.boolean(),estimated_time:e.union([e.number(),e.null()]),spent_time:e.number().int(),is_public:e.boolean()}).passthrough(),di=e.object({name:e.string().min(1).max(255),color:e.string().max(255),is_billable:e.boolean(),billable_rate:e.union([e.number(),e.null()]).optional(),client_id:e.union([e.string(),e.null()]).optional(),estimated_time:e.union([e.number(),e.null()]).optional(),is_public:e.boolean().optional()}).passthrough(),hi=e.object({name:e.string().max(255),color:e.string().max(255),is_billable:e.boolean(),is_archived:e.boolean().optional(),is_public:e.boolean().optional(),client_id:e.union([e.string(),e.null()]).optional(),billable_rate:e.union([e.number(),e.null()]).optional(),estimated_time:e.union([e.number(),e.null()]).optional()}).passthrough(),Ht=e.object({id:e.string(),billable_rate:e.union([e.number(),e.null()]),member_id:e.string(),project_id:e.string()}).passthrough(),pi=e.object({member_id:e.string(),billable_rate:e.union([e.number(),e.null()]).optional()}).passthrough(),mi=e.object({billable_rate:e.union([e.number(),e.null()])}).partial().passthrough(),gi=e.object({id:e.string(),name:e.string(),description:e.union([e.string(),e.null()]),is_public:e.boolean(),public_until:e.union([e.string(),e.null()]),shareable_link:e.union([e.string(),e.null()]),created_at:e.string(),updated_at:e.string()}).passthrough(),ir=e.enum(["day","week","month","year","user","project","task","client","billable","description","tag"]),fi=e.enum(["day","week","month","year"]),or=e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),yi=e.enum(["up","down","nearest"]),bi=e.object({name:e.string().max(255),description:e.union([e.string(),e.null()]).optional(),is_public:e.boolean(),public_until:e.union([e.string(),e.null()]).optional(),properties:e.object({start:e.string(),end:e.string(),active:e.union([e.boolean(),e.null()]).optional(),member_ids:e.union([e.array(e.string().uuid()),e.null()]).optional(),billable:e.union([e.boolean(),e.null()]).optional(),client_ids:e.union([e.array(e.string().uuid()),e.null()]).optional(),project_ids:e.union([e.array(e.string().uuid()),e.null()]).optional(),tag_ids:e.union([e.array(e.string().uuid()),e.null()]).optional(),task_ids:e.union([e.array(e.string().uuid()),e.null()]).optional(),group:ir,sub_group:ir,history_group:fi,week_start:or.optional(),timezone:e.union([e.string(),e.null()]).optional(),rounding_type:yi.optional(),rounding_minutes:e.union([e.number(),e.null()]).optional()}).passthrough()}).passthrough(),Wt=e.object({id:e.string(),name:e.string(),description:e.union([e.string(),e.null()]),is_public:e.boolean(),public_until:e.union([e.string(),e.null()]),shareable_link:e.union([e.string(),e.null()]),properties:e.object({group:e.string(),sub_group:e.string(),history_group:e.string(),start:e.string(),end:e.string(),active:e.union([e.boolean(),e.null()]),member_ids:e.union([e.array(e.string()),e.null()]),billable:e.union([e.boolean(),e.null()]),client_ids:e.union([e.array(e.string()),e.null()]),project_ids:e.union([e.array(e.string()),e.null()]),tag_ids:e.union([e.array(e.string()),e.null()]),task_ids:e.union([e.array(e.string()),e.null()]),rounding_type:e.union([e.string(),e.null()]),rounding_minutes:e.union([e.number(),e.null()])}).passthrough(),created_at:e.string(),updated_at:e.string()}).passthrough(),_i=e.object({name:e.string().max(255),description:e.union([e.string(),e.null()]),is_public:e.boolean(),public_until:e.union([e.string(),e.null()])}).partial().passthrough(),vi=e.object({name:e.string(),description:e.union([e.string(),e.null()]),public_until:e.union([e.string(),e.null()]),currency:e.string(),number_format:Bt,currency_format:Lt,currency_symbol:e.string(),date_format:$t,interval_format:Vt,time_format:Qt,properties:e.object({group:e.string(),sub_group:e.string(),history_group:e.string(),start:e.string(),end:e.string()}).passthrough(),data:e.object({grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),description:e.union([e.string(),e.null()]),color:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.number().int(),grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),description:e.union([e.string(),e.null()]),color:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.number().int(),grouped_type:e.null(),grouped_data:e.null()}).passthrough()),e.null()])}).passthrough()),e.null()]),seconds:e.number().int(),cost:e.number().int()}).passthrough(),history_data:e.object({grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),description:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.number().int(),grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),description:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.number().int(),grouped_type:e.null(),grouped_data:e.null()}).passthrough()),e.null()])}).passthrough()),e.null()]),seconds:e.number().int(),cost:e.number().int()}).passthrough()}).passthrough(),Jt=e.object({id:e.string(),name:e.string(),created_at:e.string(),updated_at:e.string()}).passthrough(),ji=e.array(Jt);e.object({name:e.string().min(1).max(255)}).passthrough(),e.object({name:e.string().min(1).max(255)}).passthrough();const Kt=e.object({id:e.string(),name:e.string(),is_done:e.boolean(),project_id:e.string(),estimated_time:e.union([e.number(),e.null()]),spent_time:e.number().int(),created_at:e.string(),updated_at:e.string()}).passthrough(),wi=e.object({name:e.string().min(1).max(255),project_id:e.string(),estimated_time:e.union([e.number(),e.null()]).optional()}).passthrough(),xi=e.object({name:e.string().min(1).max(255),is_done:e.boolean().optional(),estimated_time:e.union([e.number(),e.null()]).optional()}).passthrough(),ft=e.union([e.string(),e.null()]).optional(),yt=e.union([e.number(),e.null()]).optional(),bt=e.object({id:e.string(),start:e.string(),end:e.union([e.string(),e.null()]),duration:e.union([e.number(),e.null()]),description:e.union([e.string(),e.null()]),task_id:e.union([e.string(),e.null()]),project_id:e.union([e.string(),e.null()]),organization_id:e.string(),user_id:e.string(),tags:e.array(e.string()),billable:e.boolean()}).passthrough(),ki=e.object({member_id:e.string(),project_id:e.union([e.string(),e.null()]).optional(),task_id:e.union([e.string(),e.null()]).optional(),start:e.string(),end:e.union([e.string(),e.null()]).optional(),billable:e.boolean(),description:e.union([e.string(),e.null()]).optional(),tags:e.union([e.array(e.string()),e.null()]).optional()}).passthrough(),Ti=e.object({ids:e.array(e.string().uuid()),changes:e.object({member_id:e.string(),project_id:e.union([e.string(),e.null()]),task_id:e.union([e.string(),e.null()]),billable:e.boolean(),description:e.union([e.string(),e.null()]),tags:e.union([e.array(e.string()),e.null()])}).partial().passthrough()}).passthrough(),zi=e.object({member_id:e.string(),project_id:e.union([e.string(),e.null()]),task_id:e.union([e.string(),e.null()]),start:e.string(),end:e.union([e.string(),e.null()]),billable:e.boolean(),description:e.union([e.string(),e.null()]),tags:e.union([e.array(e.string()),e.null()])}).partial().passthrough(),Ei=e.object({id:e.string(),name:e.string(),email:e.string(),profile_photo_url:e.string(),timezone:e.string(),week_start:or}).passthrough(),Ai=e.object({id:e.string(),organization:e.object({id:e.string(),name:e.string(),currency:e.string()}).passthrough(),role:e.string()}).passthrough(),ur=Va([{method:"get",path:"/v1/countries",alias:"getCountries",requestFormat:"json",response:e.array(e.object({code:e.string(),name:e.string()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/currencies",alias:"getCurrencies",requestFormat:"json",response:e.array(e.object({code:e.string(),name:e.string(),symbol:e.string()}).passthrough())},{method:"get",path:"/v1/organizations/:organization",alias:"getOrganization",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:ar}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization",alias:"updateOrganization",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:li},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:ar}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/daily-tracked-hours",alias:"dailyTrackedHours",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({date:e.string(),duration:e.number().int()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/last-seven-days",alias:"lastSevenDays",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({date:e.string(),duration:e.number().int(),history:e.array(e.number().int())}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/latest-tasks",alias:"latestTasks",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({task_id:e.string(),name:e.string(),description:e.union([e.string(),e.null()]),status:e.boolean(),time_entry_id:e.union([e.string(),e.null()])}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/latest-team-activity",alias:"latestTeamActivity",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({member_id:e.string(),name:e.string(),description:e.union([e.string(),e.null()]),time_entry_id:e.string(),task_id:e.union([e.string(),e.null()]),status:e.boolean()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/total-weekly-billable-amount",alias:"totalWeeklyBillableAmount",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({value:e.number().int(),currency:e.string()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/total-weekly-billable-time",alias:"totalWeeklyBillableTime",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.number().int(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/total-weekly-time",alias:"totalWeeklyTime",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.number().int(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/weekly-history",alias:"weeklyHistory",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({date:e.string(),duration:e.number().int()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/weekly-project-overview",alias:"weeklyProjectOverview",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({value:e.number().int(),name:e.string(),color:e.string()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/clients",alias:"getClients",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"page",type:"Query",schema:e.number().int().gte(1).lte(2147483647).optional()},{name:"archived",type:"Query",schema:e.enum(["true","false","all"]).optional()}],response:e.object({data:Ka}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/clients",alias:"createClient",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({name:e.string().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Mt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/clients/:client",alias:"updateClient",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Xa},{name:"organization",type:"Path",schema:e.string()},{name:"client",type:"Path",schema:e.string()}],response:e.object({data:Mt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/clients/:client",alias:"deleteClient",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"client",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/export",alias:"exportOrganization",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({success:e.boolean(),download_url:e.string()}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/import",alias:"importData",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ga},{name:"organization",type:"Path",schema:e.string()}],response:e.object({report:e.object({clients:e.object({created:e.number().int()}).passthrough(),projects:e.object({created:e.number().int()}).passthrough(),tasks:e.object({created:e.number().int()}).passthrough(),time_entries:e.object({created:e.number().int()}).passthrough(),tags:e.object({created:e.number().int()}).passthrough(),users:e.object({created:e.number().int()}).passthrough()}).passthrough()}).passthrough(),errors:[{status:400,schema:e.union([e.object({message:e.string()}).passthrough(),e.object({message:e.literal("Invalid base64 encoded data")}).passthrough()])},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/importers",alias:"getImporters",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:e.array(e.object({key:e.string(),name:e.string(),description:e.string()}).passthrough())}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invitations",alias:"getInvitations",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:e.array(Ya),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invitations",alias:"invite",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ei},{name:"organization",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/invitations/:invitation",alias:"removeInvitation",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"invitation",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invitations/:invitation/resend",alias:"resendInvitationEmail",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"invitation",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invoice-settings",alias:"getInvoiceSettings",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:rr}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/invoice-settings",alias:"updateInvoiceSettings",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:oi},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:rr}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invoices",alias:"getInvoices",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"page",type:"Query",schema:e.number().int().gte(1).lte(2147483647).optional()}],response:e.object({data:si}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invoices",alias:"createInvoice",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ri},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Dt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invoices/:invoice",alias:"getInvoice",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"invoice",type:"Path",schema:e.string()}],response:e.object({data:Dt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/invoices/:invoice",alias:"updateInvoice",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ii},{name:"organization",type:"Path",schema:e.string()},{name:"invoice",type:"Path",schema:e.string()}],response:e.object({data:Dt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/invoices/:invoice",alias:"deleteInvoice",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"invoice",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invoices/:invoice/download",alias:"downloadInvoice",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({with_e_invoice:e.boolean()}).passthrough()},{name:"organization",type:"Path",schema:e.string()},{name:"invoice",type:"Path",schema:e.string()}],response:e.object({download_link:e.string()}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invoices/:invoice/download-e-invoice",alias:"downloadEInvoice",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"invoice",type:"Path",schema:e.string()}],response:e.object({download_link:e.string()}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/member/:member/merge-into",alias:"mergeMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({member_id:e.string()}).partial().passthrough()},{name:"organization",type:"Path",schema:e.string()},{name:"member",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/members",alias:"getMembers",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:e.array(nr),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/members/:member",alias:"updateMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ci},{name:"organization",type:"Path",schema:e.string()},{name:"member",type:"Path",schema:e.string()}],response:e.object({data:nr}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/members/:member",alias:"removeMember",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"member",type:"Path",schema:e.string()},{name:"delete_related",type:"Query",schema:e.enum(["true","false"]).optional()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/members/:member/invite-placeholder",alias:"invitePlaceholder",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"member",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/members/:member/make-placeholder",alias:"makePlaceholder",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"member",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/project-members/:projectMember",alias:"updateProjectMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:mi},{name:"organization",type:"Path",schema:e.string()},{name:"projectMember",type:"Path",schema:e.string()}],response:e.object({data:Ht}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/project-members/:projectMember",alias:"deleteProjectMember",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"projectMember",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects",alias:"getProjects",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"page",type:"Query",schema:e.number().int().gte(1).lte(2147483647).optional()},{name:"archived",type:"Query",schema:e.enum(["true","false","all"]).optional()}],response:e.object({data:e.array(gt),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/projects",alias:"createProject",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:di},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:gt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects/:project",alias:"getProject",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"project",type:"Path",schema:e.string()}],response:e.object({data:gt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/projects/:project",alias:"updateProject",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:hi},{name:"organization",type:"Path",schema:e.string()},{name:"project",type:"Path",schema:e.string()}],response:e.object({data:gt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/projects/:project",alias:"deleteProject",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"project",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects/:project/project-members",alias:"getProjectMembers",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"project",type:"Path",schema:e.string()}],response:e.object({data:e.array(Ht),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/projects/:project/project-members",alias:"createProjectMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:pi},{name:"organization",type:"Path",schema:e.string()},{name:"project",type:"Path",schema:e.string()}],response:e.object({data:Ht}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/reports",alias:"getReports",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:e.array(gi),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/reports",alias:"createReport",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:bi},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Wt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/reports/:report",alias:"getReport",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"report",type:"Path",schema:e.string()}],response:e.object({data:Wt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/reports/:report",alias:"updateReport",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:_i},{name:"organization",type:"Path",schema:e.string()},{name:"report",type:"Path",schema:e.string()}],response:e.object({data:Wt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/reports/:report",alias:"deleteReport",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"report",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/tags",alias:"getTags",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:ji}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/tags",alias:"createTag",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({name:e.string().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Jt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/tags/:tag",alias:"updateTag",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({name:e.string().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:e.string()},{name:"tag",type:"Path",schema:e.string()}],response:e.object({data:Jt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/tags/:tag",alias:"deleteTag",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"tag",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/tasks",alias:"getTasks",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"project_id",type:"Query",schema:e.string().optional()},{name:"done",type:"Query",schema:e.enum(["true","false","all"]).optional()}],response:e.object({data:e.array(Kt),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/tasks",alias:"createTask",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:wi},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Kt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/tasks/:task",alias:"updateTask",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:xi},{name:"organization",type:"Path",schema:e.string()},{name:"task",type:"Path",schema:e.string()}],response:e.object({data:Kt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/tasks/:task",alias:"deleteTask",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"task",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries",alias:"getTimeEntries",description:`If you only need time entries for a specific user, you can filter by &#x60;user_id&#x60;.
12
+ Users with the permission &#x60;time-entries:view:own&#x60; can only use this endpoint with their own user ID in the user_id filter.`,requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"member_id",type:"Query",schema:e.string().optional()},{name:"start",type:"Query",schema:ft},{name:"end",type:"Query",schema:ft},{name:"active",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"billable",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"limit",type:"Query",schema:e.number().int().gte(1).lte(500).optional()},{name:"offset",type:"Query",schema:e.number().int().gte(0).lte(2147483647).optional()},{name:"only_full_dates",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:e.enum(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:yt},{name:"user_id",type:"Query",schema:e.string().optional()},{name:"member_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"client_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"project_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"tag_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"task_ids",type:"Query",schema:e.array(e.string()).min(1).optional()}],response:e.object({data:e.array(bt),meta:e.object({total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/time-entries",alias:"createTimeEntry",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ki},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:bt}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"patch",path:"/v1/organizations/:organization/time-entries",alias:"updateMultipleTimeEntries",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ti},{name:"organization",type:"Path",schema:e.string()}],response:e.object({success:e.string(),error:e.string()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/time-entries",alias:"deleteTimeEntries",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"ids",type:"Query",schema:e.array(e.string().uuid())}],response:e.object({success:e.string(),error:e.string()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/time-entries/:timeEntry",alias:"updateTimeEntry",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:zi},{name:"organization",type:"Path",schema:e.string()},{name:"timeEntry",type:"Path",schema:e.string()}],response:e.object({data:bt}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/time-entries/:timeEntry",alias:"deleteTimeEntry",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"timeEntry",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries/aggregate",alias:"getAggregatedTimeEntries",description:`This endpoint allows you to filter time entries and aggregate them by different criteria.
13
13
  The parameters &#x60;group&#x60; and &#x60;sub_group&#x60; allow you to group the time entries by different criteria.
14
- If the group parameters are all set to &#x60;null&#x60; or are all missing, the endpoint will aggregate all filtered time entries.`,requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t.string()},{name:"group",type:"Query",schema:t.enum(["day","week","month","year","user","project","task","client","billable","description"]).optional()},{name:"sub_group",type:"Query",schema:t.enum(["day","week","month","year","user","project","task","client","billable","description"]).optional()},{name:"member_id",type:"Query",schema:t.string().uuid().optional()},{name:"user_id",type:"Query",schema:t.string().uuid().optional()},{name:"start",type:"Query",schema:ot},{name:"end",type:"Query",schema:ot},{name:"active",type:"Query",schema:t.enum(["true","false"]).optional()},{name:"billable",type:"Query",schema:t.enum(["true","false"]).optional()},{name:"fill_gaps_in_time_groups",type:"Query",schema:t.enum(["true","false"]).optional()},{name:"member_ids",type:"Query",schema:t.array(t.string().uuid()).min(1).optional()},{name:"project_ids",type:"Query",schema:t.array(t.string().uuid()).min(1).optional()},{name:"client_ids",type:"Query",schema:t.array(t.string().uuid()).min(1).optional()},{name:"tag_ids",type:"Query",schema:t.array(t.string().uuid()).min(1).optional()},{name:"task_ids",type:"Query",schema:t.array(t.string().uuid()).min(1).optional()}],response:t.object({data:t.object({grouped_type:t.union([t.string(),t.null()]),grouped_data:t.union([t.array(t.object({key:t.union([t.string(),t.null()]),seconds:t.number().int(),cost:t.number().int(),grouped_type:t.union([t.string(),t.null()]),grouped_data:t.union([t.array(t.object({key:t.union([t.string(),t.null()]),seconds:t.number().int(),cost:t.number().int(),grouped_type:t.null(),grouped_data:t.null()}).passthrough()),t.null()])}).passthrough()),t.null()]),seconds:t.number().int(),cost:t.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()},{status:422,description:"Validation error",schema:t.object({message:t.string(),errors:t.record(t.array(t.string()))}).passthrough()}]},{method:"get",path:"/v1/users/me",alias:"getMe",description:"This endpoint is independent of organization.",requestFormat:"json",response:t.object({data:Ba}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()}]},{method:"get",path:"/v1/users/me/memberships",alias:"getMyMemberships",description:"This endpoint is independent of organization.",requestFormat:"json",response:t.object({data:Fa}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:403,description:"Authorization error",schema:t.object({message:t.string()}).passthrough()}]},{method:"get",path:"/v1/users/me/time-entries/active",alias:"getMyActiveTimeEntry",description:"This endpoint is independent of organization.",requestFormat:"json",response:t.object({data:ct}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:t.object({message:t.string()}).passthrough()},{status:404,description:"Not found",schema:t.object({message:t.string()}).passthrough()}]}]);new Ls("/api",$s);function Vs(s,e){return new Ls(s,$s,e)}const $a=Vs("/api",{validate:"none"});ne.api=$a,ne.createApiClient=Vs,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
14
+ If the group parameters are all set to &#x60;null&#x60; or are all missing, the endpoint will aggregate all filtered time entries.`,requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"group",type:"Query",schema:e.enum(["day","week","month","year","user","project","task","client","billable","description","tag"]).optional()},{name:"sub_group",type:"Query",schema:e.enum(["day","week","month","year","user","project","task","client","billable","description","tag"]).optional()},{name:"member_id",type:"Query",schema:e.string().optional()},{name:"user_id",type:"Query",schema:e.string().optional()},{name:"start",type:"Query",schema:ft},{name:"end",type:"Query",schema:ft},{name:"active",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"billable",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"fill_gaps_in_time_groups",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:e.enum(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:yt},{name:"member_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"project_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"client_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"tag_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"task_ids",type:"Query",schema:e.array(e.string()).min(1).optional()}],response:e.object({data:e.object({grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.union([e.number(),e.null()]),grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.union([e.number(),e.null()]),grouped_type:e.null(),grouped_data:e.null()}).passthrough()),e.null()])}).passthrough()),e.null()]),seconds:e.number().int(),cost:e.union([e.number(),e.null()])}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries/aggregate/export",alias:"exportAggregatedTimeEntries",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"format",type:"Query",schema:e.enum(["csv","pdf","xlsx","ods"])},{name:"group",type:"Query",schema:e.enum(["day","week","month","year","user","project","task","client","billable","description","tag"])},{name:"sub_group",type:"Query",schema:e.enum(["day","week","month","year","user","project","task","client","billable","description","tag"])},{name:"history_group",type:"Query",schema:e.enum(["day","week","month","year"])},{name:"member_id",type:"Query",schema:e.string().optional()},{name:"user_id",type:"Query",schema:e.string().optional()},{name:"start",type:"Query",schema:e.string()},{name:"end",type:"Query",schema:e.string()},{name:"active",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"billable",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"fill_gaps_in_time_groups",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"debug",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:e.enum(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:yt},{name:"member_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"project_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"client_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"tag_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"task_ids",type:"Query",schema:e.array(e.string()).min(1).optional()}],response:e.union([e.object({download_url:e.string()}).passthrough(),e.object({html:e.string(),footer_html:e.string()}).passthrough()]),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries/export",alias:"exportTimeEntries",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"format",type:"Query",schema:e.enum(["csv","pdf","xlsx","ods"])},{name:"member_id",type:"Query",schema:e.string().uuid().optional()},{name:"start",type:"Query",schema:e.string()},{name:"end",type:"Query",schema:e.string()},{name:"active",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"billable",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"limit",type:"Query",schema:e.number().int().gte(1).lte(500).optional()},{name:"only_full_dates",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"debug",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:e.enum(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:yt},{name:"member_ids",type:"Query",schema:e.array(e.string().uuid()).min(1).optional()},{name:"project_ids",type:"Query",schema:e.array(e.string().uuid()).min(1).optional()},{name:"tag_ids",type:"Query",schema:e.array(e.string().uuid()).min(1).optional()},{name:"task_ids",type:"Query",schema:e.array(e.string().uuid()).min(1).optional()}],response:e.union([e.object({download_url:e.string()}).passthrough(),e.object({html:e.string(),footer_html:e.string()}).passthrough()]),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/public/reports",alias:"getPublicReport",description:`This endpoint is public and does not require authentication. The report must be public and not expired.
15
+ The report is considered expired if the &#x60;public_until&#x60; field is set and the date is in the past.
16
+ The report is considered public if the &#x60;is_public&#x60; field is set to &#x60;true&#x60;.`,requestFormat:"json",response:vi,errors:[{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/users/me",alias:"getMe",description:"This endpoint is independent of organization.",requestFormat:"json",response:e.object({data:Ei}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/users/me/api-tokens",alias:"getApiTokens",description:"This endpoint is independent of organization.",requestFormat:"json",response:e.object({data:Wa}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/users/me/api-tokens",alias:"createApiToken",description:`The response will contain the access token that can be used to send authenticated API requests.
17
+ Please note that the access token is only shown in this response and cannot be retrieved later.`,requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({name:e.string().min(1).max(255)}).passthrough()}],response:e.object({data:Ja}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/users/me/api-tokens/:apiToken",alias:"deleteApiToken",requestFormat:"json",parameters:[{name:"apiToken",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/users/me/api-tokens/:apiToken/revoke",alias:"revokeApiToken",requestFormat:"json",parameters:[{name:"apiToken",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/users/me/memberships",alias:"getMyMemberships",description:"This endpoint is independent of organization.",requestFormat:"json",response:e.object({data:e.array(Ai)}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/users/me/time-entries/active",alias:"getMyActiveTimeEntry",description:"This endpoint is independent of organization.",requestFormat:"json",response:e.object({data:bt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]}]);new tr("/api",ur);function cr(s,t){return new tr(s,ur,t)}const Ri=cr("/api",{validate:"none"});oe.api=Ri,oe.createApiClient=cr,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});