dcode-chat-vue
Version:
Frontend vue components for the dcode-chat package
6 lines • 64.4 kB
JavaScript
(function(D,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(D=typeof globalThis<"u"?globalThis:D||self,a(D["dcode-chat-vue"]={},D.Vue))})(this,function(D,a){"use strict";const jt={class:"flex items-center border border-gray-300 rounded-lg px-3 py-2 w-full max-w-md"},De=a.defineComponent({name:"DCodeChatSearch",__name:"DCodeChatSearch",props:{searchRoute:{default:()=>"dcode-chat.search.index"}},emits:["searchUpdated"],setup(t,{emit:e}){const r=e,n=s=>{r("searchUpdated",s)};return(s,o)=>(a.openBlock(),a.createElementBlock("div",jt,[o[1]||(o[1]=a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.9 14.32a8 8 0 111.414-1.414l4.387 4.387a1 1 0 01-1.414 1.414l-4.387-4.387zM14 8a6 6 0 11-12 0 6 6 0 0112 0z","clip-rule":"evenodd"})],-1)),a.createElementVNode("input",{onKeyup:o[0]||(o[0]=a.withKeys(i=>n(i.target.value),["enter"])),type:"text",placeholder:"Search chats",class:"ml-2 w-full outline-none bg-transparent text-gray-600 placeholder-gray-400"},null,32)]))}}),Ut={class:"flex items-center space-x-3 dcode-chat__listing cursor-default"},Lt={class:"relative"},$t=["src","alt"],qt={key:0,class:"absolute top-0 left-0 w-3 h-3 rounded-full border-2 border-red-500 bg-red-500"},Mt={class:"text-sm font-semibold text-gray-900"},Vt={class:"text-sm text-gray-500"},fe=a.defineComponent({name:"DCodeChatListing",__name:"DCodeChatListing",props:{chat:{},selected:{type:Boolean},ignoreUnread:{type:Boolean}},setup(t){return(e,r)=>{var n,s,o,i,d,g,h,u,b,E,y,p,c,l;return a.openBlock(),a.createElementBlock("div",Ut,[a.createElementVNode("div",Lt,[a.createElementVNode("div",{class:a.normalizeClass(["w-10 h-10 rounded-full border dcode-chat__listing-avatar flex items-center justify-center",{"border-green-500":e.selected,"border-gray-300":!e.selected}])},[(s=(n=e.chat)==null?void 0:n.pivot)!=null&&s.chat_avatar?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["w-10 h-10",{"fill-green-500":e.selected,"fill-gray-300":!e.selected}])},r[0]||(r[0]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentFill",viewBox:"0 0 24 24"},[a.createElementVNode("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})],-1)]),2)),(i=(o=e.chat)==null?void 0:o.pivot)!=null&&i.chat_avatar?(a.openBlock(),a.createElementBlock("img",{key:1,src:((g=(d=e.chat)==null?void 0:d.pivot)==null?void 0:g.chat_avatar)+"?selected="+(e.selected?"selected":""),alt:(u=(h=e.chat)==null?void 0:h.pivot)==null?void 0:u.chat_title,class:"w-full h-full rounded-full object-cover"},null,8,$t)):a.createCommentVNode("",!0)],2),(E=(b=e.chat)==null?void 0:b.pivot)!=null&&E.has_new_messages&&!e.ignoreUnread?(a.openBlock(),a.createElementBlock("div",qt)):a.createCommentVNode("",!0)]),a.createElementVNode("div",null,[a.createElementVNode("div",Mt,a.toDisplayString((p=(y=e.chat)==null?void 0:y.pivot)==null?void 0:p.chat_title),1),a.createElementVNode("div",Vt,a.toDisplayString((l=(c=e.chat)==null?void 0:c.pivot)==null?void 0:l.chat_subtitle),1)])])}}});function je(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ht}=Object.prototype,{getPrototypeOf:de}=Object,{iterator:G,toStringTag:Ue}=Symbol,Y=(t=>e=>{const r=Ht.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),U=t=>(t=t.toLowerCase(),e=>Y(e)===t),ee=t=>e=>typeof e===t,{isArray:H}=Array,J=ee("undefined");function zt(t){return t!==null&&!J(t)&&t.constructor!==null&&!J(t.constructor)&&P(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Le=U("ArrayBuffer");function It(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Le(t.buffer),e}const Jt=ee("string"),P=ee("function"),$e=ee("number"),te=t=>t!==null&&typeof t=="object",Kt=t=>t===!0||t===!1,re=t=>{if(Y(t)!=="object")return!1;const e=de(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Ue in t)&&!(G in t)},Wt=U("Date"),Qt=U("File"),Xt=U("Blob"),Zt=U("FileList"),Gt=t=>te(t)&&P(t.pipe),Yt=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||P(t.append)&&((e=Y(t))==="formdata"||e==="object"&&P(t.toString)&&t.toString()==="[object FormData]"))},er=U("URLSearchParams"),[tr,rr,nr,sr]=["ReadableStream","Request","Response","Headers"].map(U),or=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function K(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),H(t))for(n=0,s=t.length;n<s;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let d;for(n=0;n<i;n++)d=o[n],e.call(null,t[d],d,t)}}function qe(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,s;for(;n-- >0;)if(s=r[n],e===s.toLowerCase())return s;return null}const $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Me=t=>!J(t)&&t!==$;function he(){const{caseless:t}=Me(this)&&this||{},e={},r=(n,s)=>{const o=t&&qe(e,s)||s;re(e[o])&&re(n)?e[o]=he(e[o],n):re(n)?e[o]=he({},n):H(n)?e[o]=n.slice():e[o]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&K(arguments[n],r);return e}const ir=(t,e,r,{allOwnKeys:n}={})=>(K(e,(s,o)=>{r&&P(s)?t[o]=je(s,r):t[o]=s},{allOwnKeys:n}),t),ar=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),lr=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},cr=(t,e,r,n)=>{let s,o,i;const d={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!n||n(i,t,e))&&!d[i]&&(e[i]=t[i],d[i]=!0);t=r!==!1&&de(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},ur=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},fr=t=>{if(!t)return null;if(H(t))return t;let e=t.length;if(!$e(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},dr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&de(Uint8Array)),hr=(t,e)=>{const n=(t&&t[G]).call(t);let s;for(;(s=n.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},pr=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},mr=U("HTMLFormElement"),yr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Ve=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),gr=U("RegExp"),He=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};K(r,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(n[o]=i||s)}),Object.defineProperties(t,n)},br=t=>{He(t,(e,r)=>{if(P(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(P(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+"'")})}})},wr=(t,e)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return H(t)?n(t):n(String(t).split(e)),r},Er=()=>{},Sr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Rr(t){return!!(t&&P(t.append)&&t[Ue]==="FormData"&&t[G])}const Cr=t=>{const e=new Array(10),r=(n,s)=>{if(te(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[s]=n;const o=H(n)?[]:{};return K(n,(i,d)=>{const g=r(i,s+1);!J(g)&&(o[d]=g)}),e[s]=void 0,o}}return n};return r(t,0)},xr=U("AsyncFunction"),Or=t=>t&&(te(t)||P(t))&&P(t.then)&&P(t.catch),ze=((t,e)=>t?setImmediate:e?((r,n)=>($.addEventListener("message",({source:s,data:o})=>{s===$&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),$.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",P($.postMessage)),_r=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||ze,f={isArray:H,isArrayBuffer:Le,isBuffer:zt,isFormData:Yt,isArrayBufferView:It,isString:Jt,isNumber:$e,isBoolean:Kt,isObject:te,isPlainObject:re,isReadableStream:tr,isRequest:rr,isResponse:nr,isHeaders:sr,isUndefined:J,isDate:Wt,isFile:Qt,isBlob:Xt,isRegExp:gr,isFunction:P,isStream:Gt,isURLSearchParams:er,isTypedArray:dr,isFileList:Zt,forEach:K,merge:he,extend:ir,trim:or,stripBOM:ar,inherits:lr,toFlatObject:cr,kindOf:Y,kindOfTest:U,endsWith:ur,toArray:fr,forEachEntry:hr,matchAll:pr,isHTMLForm:mr,hasOwnProperty:Ve,hasOwnProp:Ve,reduceDescriptors:He,freezeMethods:br,toObjectSet:wr,toCamelCase:yr,noop:Er,toFiniteNumber:Sr,findKey:qe,global:$,isContextDefined:Me,isSpecCompliantForm:Rr,toJSONObject:Cr,isAsyncFn:xr,isThenable:Or,setImmediate:ze,asap:_r,isIterable:t=>t!=null&&P(t[G])};function _(t,e,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}f.inherits(_,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:f.toJSONObject(this.config),code:this.code,status:this.status}}});const Ie=_.prototype,Je={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Je[t]={value:t}}),Object.defineProperties(_,Je),Object.defineProperty(Ie,"isAxiosError",{value:!0}),_.from=(t,e,r,n,s,o)=>{const i=Object.create(Ie);return f.toFlatObject(t,i,function(g){return g!==Error.prototype},d=>d!=="isAxiosError"),_.call(i,t.message,e,r,n,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};const Nr=null;function pe(t){return f.isPlainObject(t)||f.isArray(t)}function Ke(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function We(t,e,r){return t?t.concat(e).map(function(s,o){return s=Ke(s),!r&&o?"["+s+"]":s}).join(r?".":""):e}function Tr(t){return f.isArray(t)&&!t.some(pe)}const Ar=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function ne(t,e,r){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=f.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,l){return!f.isUndefined(l[c])});const n=r.metaTokens,s=r.visitor||u,o=r.dots,i=r.indexes,g=(r.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(s))throw new TypeError("visitor must be a function");function h(p){if(p===null)return"";if(f.isDate(p))return p.toISOString();if(!g&&f.isBlob(p))throw new _("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(p)||f.isTypedArray(p)?g&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,c,l){let m=p;if(p&&!l&&typeof p=="object"){if(f.endsWith(c,"{}"))c=n?c:c.slice(0,-2),p=JSON.stringify(p);else if(f.isArray(p)&&Tr(p)||(f.isFileList(p)||f.endsWith(c,"[]"))&&(m=f.toArray(p)))return c=Ke(c),m.forEach(function(R,S){!(f.isUndefined(R)||R===null)&&e.append(i===!0?We([c],S,o):i===null?c:c+"[]",h(R))}),!1}return pe(p)?!0:(e.append(We(l,c,o),h(p)),!1)}const b=[],E=Object.assign(Ar,{defaultVisitor:u,convertValue:h,isVisitable:pe});function y(p,c){if(!f.isUndefined(p)){if(b.indexOf(p)!==-1)throw Error("Circular reference detected in "+c.join("."));b.push(p),f.forEach(p,function(m,w){(!(f.isUndefined(m)||m===null)&&s.call(e,m,f.isString(w)?w.trim():w,c,E))===!0&&y(m,c?c.concat(w):[w])}),b.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return y(t),e}function Qe(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function me(t,e){this._pairs=[],t&&ne(t,this,e)}const Xe=me.prototype;Xe.append=function(e,r){this._pairs.push([e,r])},Xe.toString=function(e){const r=e?function(n){return e.call(this,n,Qe)}:Qe;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function vr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ze(t,e,r){if(!e)return t;const n=r&&r.encode||vr;f.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let o;if(s?o=s(e,r):o=f.isURLSearchParams(e)?e.toString():new me(e,r).toString(n),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Ge{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){f.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Ye={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:me,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ye=typeof window<"u"&&typeof document<"u",ge=typeof navigator=="object"&&navigator||void 0,Br=ye&&(!ge||["ReactNative","NativeScript","NS"].indexOf(ge.product)<0),Pr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fr=ye&&window.location.href||"http://localhost",B={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ye,hasStandardBrowserEnv:Br,hasStandardBrowserWebWorkerEnv:Pr,navigator:ge,origin:Fr},Symbol.toStringTag,{value:"Module"})),...kr};function Dr(t,e){return ne(t,new B.classes.URLSearchParams,Object.assign({visitor:function(r,n,s,o){return B.isNode&&f.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function jr(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ur(t){const e={},r=Object.keys(t);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],e[o]=t[o];return e}function et(t){function e(r,n,s,o){let i=r[o++];if(i==="__proto__")return!0;const d=Number.isFinite(+i),g=o>=r.length;return i=!i&&f.isArray(s)?s.length:i,g?(f.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!d):((!s[i]||!f.isObject(s[i]))&&(s[i]=[]),e(r,n,s[i],o)&&f.isArray(s[i])&&(s[i]=Ur(s[i])),!d)}if(f.isFormData(t)&&f.isFunction(t.entries)){const r={};return f.forEachEntry(t,(n,s)=>{e(jr(n),s,r,0)}),r}return null}function Lr(t,e,r){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const W={transitional:Ye,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=f.isObject(e);if(o&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return s?JSON.stringify(et(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Dr(e,this.formSerializer).toString();if((d=f.isFileList(e))||n.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return ne(d?{"files[]":e}:e,g&&new g,this.formSerializer)}}return o||s?(r.setContentType("application/json",!1),Lr(e)):e}],transformResponse:[function(e){const r=this.transitional||W.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(d){if(i)throw d.name==="SyntaxError"?_.from(d,_.ERR_BAD_RESPONSE,this,null,this.response):d}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{W.headers[t]={}});const $r=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qr=t=>{const e={};let r,n,s;return t&&t.split(`
`).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+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},tt=Symbol("internals");function Q(t){return t&&String(t).trim().toLowerCase()}function se(t){return t===!1||t==null?t:f.isArray(t)?t.map(se):String(t)}function Mr(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Vr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function be(t,e,r,n,s){if(f.isFunction(n))return n.call(this,e,r);if(s&&(e=r),!!f.isString(e)){if(f.isString(n))return e.indexOf(n)!==-1;if(f.isRegExp(n))return n.test(e)}}function Hr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function zr(t,e){const r=f.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(s,o,i){return this[n].call(this,e,s,o,i)},configurable:!0})})}let F=class{constructor(e){e&&this.set(e)}set(e,r,n){const s=this;function o(d,g,h){const u=Q(g);if(!u)throw new Error("header name must be a non-empty string");const b=f.findKey(s,u);(!b||s[b]===void 0||h===!0||h===void 0&&s[b]!==!1)&&(s[b||g]=se(d))}const i=(d,g)=>f.forEach(d,(h,u)=>o(h,u,g));if(f.isPlainObject(e)||e instanceof this.constructor)i(e,r);else if(f.isString(e)&&(e=e.trim())&&!Vr(e))i(qr(e),r);else if(f.isObject(e)&&f.isIterable(e)){let d={},g,h;for(const u of e){if(!f.isArray(u))throw TypeError("Object iterator must return a key-value pair");d[h=u[0]]=(g=d[h])?f.isArray(g)?[...g,u[1]]:[g,u[1]]:u[1]}i(d,r)}else e!=null&&o(r,e,n);return this}get(e,r){if(e=Q(e),e){const n=f.findKey(this,e);if(n){const s=this[n];if(!r)return s;if(r===!0)return Mr(s);if(f.isFunction(r))return r.call(this,s,n);if(f.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Q(e),e){const n=f.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||be(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let s=!1;function o(i){if(i=Q(i),i){const d=f.findKey(n,i);d&&(!r||be(n,n[d],d,r))&&(delete n[d],s=!0)}}return f.isArray(e)?e.forEach(o):o(e),s}clear(e){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!e||be(this,this[o],o,e,!0))&&(delete this[o],s=!0)}return s}normalize(e){const r=this,n={};return f.forEach(this,(s,o)=>{const i=f.findKey(n,o);if(i){r[i]=se(s),delete r[o];return}const d=e?Hr(o):String(o).trim();d!==o&&delete r[o],r[d]=se(s),n[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return f.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=e&&f.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(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[tt]=this[tt]={accessors:{}}).accessors,s=this.prototype;function o(i){const d=Q(i);n[d]||(zr(s,i),n[d]=!0)}return f.isArray(e)?e.forEach(o):o(e),this}};F.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),f.reduceDescriptors(F.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}}),f.freezeMethods(F);function we(t,e){const r=this||W,n=e||r,s=F.from(n.headers);let o=n.data;return f.forEach(t,function(d){o=d.call(r,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function rt(t){return!!(t&&t.__CANCEL__)}function z(t,e,r){_.call(this,t??"canceled",_.ERR_CANCELED,e,r),this.name="CanceledError"}f.inherits(z,_,{__CANCEL__:!0});function nt(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new _("Request failed with status code "+r.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ir(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Jr(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(g){const h=Date.now(),u=n[o];i||(i=h),r[s]=g,n[s]=h;let b=o,E=0;for(;b!==s;)E+=r[b++],b=b%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),h-i<e)return;const y=u&&h-u;return y?Math.round(E*1e3/y):void 0}}function Kr(t,e){let r=0,n=1e3/e,s,o;const i=(h,u=Date.now())=>{r=u,s=null,o&&(clearTimeout(o),o=null),t.apply(null,h)};return[(...h)=>{const u=Date.now(),b=u-r;b>=n?i(h,u):(s=h,o||(o=setTimeout(()=>{o=null,i(s)},n-b)))},()=>s&&i(s)]}const oe=(t,e,r=3)=>{let n=0;const s=Jr(50,250);return Kr(o=>{const i=o.loaded,d=o.lengthComputable?o.total:void 0,g=i-n,h=s(g),u=i<=d;n=i;const b={loaded:i,total:d,progress:d?i/d:void 0,bytes:g,rate:h||void 0,estimated:h&&d&&u?(d-i)/h:void 0,event:o,lengthComputable:d!=null,[e?"download":"upload"]:!0};t(b)},r)},st=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},ot=t=>(...e)=>f.asap(()=>t(...e)),Wr=B.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,B.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0,Qr=B.hasStandardBrowserEnv?{write(t,e,r,n,s,o){const i=[t+"="+encodeURIComponent(e)];f.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),f.isString(n)&&i.push("path="+n),f.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Xr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Zr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function it(t,e,r){let n=!Xr(e);return t&&(n||r==!1)?Zr(t,e):e}const at=t=>t instanceof F?{...t}:t;function q(t,e){e=e||{};const r={};function n(h,u,b,E){return f.isPlainObject(h)&&f.isPlainObject(u)?f.merge.call({caseless:E},h,u):f.isPlainObject(u)?f.merge({},u):f.isArray(u)?u.slice():u}function s(h,u,b,E){if(f.isUndefined(u)){if(!f.isUndefined(h))return n(void 0,h,b,E)}else return n(h,u,b,E)}function o(h,u){if(!f.isUndefined(u))return n(void 0,u)}function i(h,u){if(f.isUndefined(u)){if(!f.isUndefined(h))return n(void 0,h)}else return n(void 0,u)}function d(h,u,b){if(b in e)return n(h,u);if(b in t)return n(void 0,h)}const g={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:d,headers:(h,u,b)=>s(at(h),at(u),b,!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(u){const b=g[u]||s,E=b(t[u],e[u],u);f.isUndefined(E)&&b!==d||(r[u]=E)}),r}const lt=t=>{const e=q({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:d}=e;e.headers=i=F.from(i),e.url=Ze(it(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),d&&i.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let g;if(f.isFormData(r)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((g=i.getContentType())!==!1){const[h,...u]=g?g.split(";").map(b=>b.trim()).filter(Boolean):[];i.setContentType([h||"multipart/form-data",...u].join("; "))}}if(B.hasStandardBrowserEnv&&(n&&f.isFunction(n)&&(n=n(e)),n||n!==!1&&Wr(e.url))){const h=s&&o&&Qr.read(o);h&&i.set(s,h)}return e},Gr=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,n){const s=lt(t);let o=s.data;const i=F.from(s.headers).normalize();let{responseType:d,onUploadProgress:g,onDownloadProgress:h}=s,u,b,E,y,p;function c(){y&&y(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let l=new XMLHttpRequest;l.open(s.method.toUpperCase(),s.url,!0),l.timeout=s.timeout;function m(){if(!l)return;const R=F.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),C={data:!d||d==="text"||d==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:R,config:t,request:l};nt(function(N){r(N),c()},function(N){n(N),c()},C),l=null}"onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){l&&(n(new _("Request aborted",_.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new _("Network Error",_.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let S=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const C=s.transitional||Ye;s.timeoutErrorMessage&&(S=s.timeoutErrorMessage),n(new _(S,C.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,t,l)),l=null},o===void 0&&i.setContentType(null),"setRequestHeader"in l&&f.forEach(i.toJSON(),function(S,C){l.setRequestHeader(C,S)}),f.isUndefined(s.withCredentials)||(l.withCredentials=!!s.withCredentials),d&&d!=="json"&&(l.responseType=s.responseType),h&&([E,p]=oe(h,!0),l.addEventListener("progress",E)),g&&l.upload&&([b,y]=oe(g),l.upload.addEventListener("progress",b),l.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(u=R=>{l&&(n(!R||R.type?new z(null,t,l):R),l.abort(),l=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const w=Ir(s.url);if(w&&B.protocols.indexOf(w)===-1){n(new _("Unsupported protocol "+w+":",_.ERR_BAD_REQUEST,t));return}l.send(o||null)})},Yr=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,s;const o=function(h){if(!s){s=!0,d();const u=h instanceof Error?h:this.reason;n.abort(u instanceof _?u:new z(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{i=null,o(new _(`timeout ${e} of ms exceeded`,_.ETIMEDOUT))},e);const d=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(h=>{h.unsubscribe?h.unsubscribe(o):h.removeEventListener("abort",o)}),t=null)};t.forEach(h=>h.addEventListener("abort",o));const{signal:g}=n;return g.unsubscribe=()=>f.asap(d),g}},en=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,s;for(;n<r;)s=n+e,yield t.slice(n,s),n=s},tn=async function*(t,e){for await(const r of rn(t))yield*en(r,e)},rn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},ct=(t,e,r,n)=>{const s=tn(t,e);let o=0,i,d=g=>{i||(i=!0,n&&n(g))};return new ReadableStream({async pull(g){try{const{done:h,value:u}=await s.next();if(h){d(),g.close();return}let b=u.byteLength;if(r){let E=o+=b;r(E)}g.enqueue(new Uint8Array(u))}catch(h){throw d(h),h}},cancel(g){return d(g),s.return()}},{highWaterMark:2})},ie=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ut=ie&&typeof ReadableStream=="function",nn=ie&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ft=(t,...e)=>{try{return!!t(...e)}catch{return!1}},sn=ut&&ft(()=>{let t=!1;const e=new Request(B.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),dt=64*1024,Ee=ut&&ft(()=>f.isReadableStream(new Response("").body)),ae={stream:Ee&&(t=>t.body)};ie&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ae[e]&&(ae[e]=f.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new _(`Response type '${e}' is not supported`,_.ERR_NOT_SUPPORT,n)})})})(new Response);const on=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request(B.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await nn(t)).byteLength},an=async(t,e)=>{const r=f.toFiniteNumber(t.getContentLength());return r??on(e)},Se={http:Nr,xhr:Gr,fetch:ie&&(async t=>{let{url:e,method:r,data:n,signal:s,cancelToken:o,timeout:i,onDownloadProgress:d,onUploadProgress:g,responseType:h,headers:u,withCredentials:b="same-origin",fetchOptions:E}=lt(t);h=h?(h+"").toLowerCase():"text";let y=Yr([s,o&&o.toAbortSignal()],i),p;const c=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let l;try{if(g&&sn&&r!=="get"&&r!=="head"&&(l=await an(u,n))!==0){let C=new Request(e,{method:"POST",body:n,duplex:"half"}),O;if(f.isFormData(n)&&(O=C.headers.get("content-type"))&&u.setContentType(O),C.body){const[N,x]=st(l,oe(ot(g)));n=ct(C.body,dt,N,x)}}f.isString(b)||(b=b?"include":"omit");const m="credentials"in Request.prototype;p=new Request(e,{...E,signal:y,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:m?b:void 0});let w=await fetch(p);const R=Ee&&(h==="stream"||h==="response");if(Ee&&(d||R&&c)){const C={};["status","statusText","headers"].forEach(T=>{C[T]=w[T]});const O=f.toFiniteNumber(w.headers.get("content-length")),[N,x]=d&&st(O,oe(ot(d),!0))||[];w=new Response(ct(w.body,dt,N,()=>{x&&x(),c&&c()}),C)}h=h||"text";let S=await ae[f.findKey(ae,h)||"text"](w,t);return!R&&c&&c(),await new Promise((C,O)=>{nt(C,O,{data:S,headers:F.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:p})})}catch(m){throw c&&c(),m&&m.name==="TypeError"&&/Load failed|fetch/i.test(m.message)?Object.assign(new _("Network Error",_.ERR_NETWORK,t,p),{cause:m.cause||m}):_.from(m,m&&m.code,t,p)}})};f.forEach(Se,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ht=t=>`- ${t}`,ln=t=>f.isFunction(t)||t===null||t===!1,pt={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let r,n;const s={};for(let o=0;o<e;o++){r=t[o];let i;if(n=r,!ln(r)&&(n=Se[(i=String(r)).toLowerCase()],n===void 0))throw new _(`Unknown adapter '${i}'`);if(n)break;s[i||"#"+o]=n}if(!n){const o=Object.entries(s).map(([d,g])=>`adapter ${d} `+(g===!1?"is not supported by the environment":"is not available in the build"));let i=e?o.length>1?`since :
`+o.map(ht).join(`
`):" "+ht(o[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:Se};function Re(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new z(null,t)}function mt(t){return Re(t),t.headers=F.from(t.headers),t.data=we.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),pt.getAdapter(t.adapter||W.adapter)(t).then(function(n){return Re(t),n.data=we.call(t,t.transformResponse,n),n.headers=F.from(n.headers),n},function(n){return rt(n)||(Re(t),n&&n.response&&(n.response.data=we.call(t,t.transformResponse,n.response),n.response.headers=F.from(n.response.headers))),Promise.reject(n)})}const yt="1.9.0",le={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{le[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const gt={};le.transitional=function(e,r,n){function s(o,i){return"[Axios v"+yt+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,d)=>{if(e===!1)throw new _(s(i," has been removed"+(r?" in "+r:"")),_.ERR_DEPRECATED);return r&&!gt[i]&&(gt[i]=!0,console.warn(s(i," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,i,d):!0}},le.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function cn(t,e,r){if(typeof t!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let s=n.length;for(;s-- >0;){const o=n[s],i=e[o];if(i){const d=t[o],g=d===void 0||i(d,o,t);if(g!==!0)throw new _("option "+o+" must be "+g,_.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new _("Unknown option "+o,_.ERR_BAD_OPTION)}}const ce={assertOptions:cn,validators:le},L=ce.validators;let M=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ge,response:new Ge}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+o):n.stack=o}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=q(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:o}=r;n!==void 0&&ce.assertOptions(n,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1),s!=null&&(f.isFunction(s)?r.paramsSerializer={serialize:s}:ce.assertOptions(s,{encode:L.function,serialize:L.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ce.assertOptions(r,{baseUrl:L.spelling("baseURL"),withXsrfToken:L.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=o&&f.merge(o.common,o[r.method]);o&&f.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),r.headers=F.concat(i,o);const d=[];let g=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(r)===!1||(g=g&&c.synchronous,d.unshift(c.fulfilled,c.rejected))});const h=[];this.interceptors.response.forEach(function(c){h.push(c.fulfilled,c.rejected)});let u,b=0,E;if(!g){const p=[mt.bind(this),void 0];for(p.unshift.apply(p,d),p.push.apply(p,h),E=p.length,u=Promise.resolve(r);b<E;)u=u.then(p[b++],p[b++]);return u}E=d.length;let y=r;for(b=0;b<E;){const p=d[b++],c=d[b++];try{y=p(y)}catch(l){c.call(this,l);break}}try{u=mt.call(this,y)}catch(p){return Promise.reject(p)}for(b=0,E=h.length;b<E;)u=u.then(h[b++],h[b++]);return u}getUri(e){e=q(this.defaults,e);const r=it(e.baseURL,e.url,e.allowAbsoluteUrls);return Ze(r,e.params,e.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(e){M.prototype[e]=function(r,n){return this.request(q(n||{},{method:e,url:r,data:(n||{}).data}))}}),f.forEach(["post","put","patch"],function(e){function r(n){return function(o,i,d){return this.request(q(d||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}M.prototype[e]=r(),M.prototype[e+"Form"]=r(!0)});let un=class Dt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(d=>{n.subscribe(d),o=d}).then(s);return i.cancel=function(){n.unsubscribe(o)},i},e(function(o,i,d){n.reason||(n.reason=new z(o,i,d),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)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Dt(function(s){e=s}),cancel:e}}};function fn(t){return function(r){return t.apply(null,r)}}function dn(t){return f.isObject(t)&&t.isAxiosError===!0}const Ce={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(Ce).forEach(([t,e])=>{Ce[e]=t});function bt(t){const e=new M(t),r=je(M.prototype.request,e);return f.extend(r,M.prototype,e,{allOwnKeys:!0}),f.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return bt(q(t,s))},r}const A=bt(W);A.Axios=M,A.CanceledError=z,A.CancelToken=un,A.isCancel=rt,A.VERSION=yt,A.toFormData=ne,A.AxiosError=_,A.Cancel=A.CanceledError,A.all=function(e){return Promise.all(e)},A.spread=fn,A.isAxiosError=dn,A.mergeConfig=q,A.AxiosHeaders=F,A.formToJSON=t=>et(f.isHTMLForm(t)?new FormData(t):t),A.getAdapter=pt.getAdapter,A.HttpStatusCode=Ce,A.default=A;const{Axios:Hn,AxiosError:zn,CanceledError:In,isCancel:Jn,CancelToken:Kn,VERSION:Wn,all:Qn,Cancel:Xn,isAxiosError:Zn,spread:Gn,toFormData:Yn,AxiosHeaders:es,HttpStatusCode:ts,formToJSON:rs,getAdapter:ns,mergeConfig:ss}=A;var xe,wt;function Oe(){if(wt)return xe;wt=1;var t=String.prototype.replace,e=/%20/g,r={RFC1738:"RFC1738",RFC3986:"RFC3986"};return xe={default:r.RFC3986,formatters:{RFC1738:function(n){return t.call(n,e,"+")},RFC3986:function(n){return String(n)}},RFC1738:r.RFC1738,RFC3986:r.RFC3986},xe}var _e,Et;function St(){if(Et)return _e;Et=1;var t=Oe(),e=Object.prototype.hasOwnProperty,r=Array.isArray,n=function(){for(var c=[],l=0;l<256;++l)c.push("%"+((l<16?"0":"")+l.toString(16)).toUpperCase());return c}(),s=function(l){for(;l.length>1;){var m=l.pop(),w=m.obj[m.prop];if(r(w)){for(var R=[],S=0;S<w.length;++S)typeof w[S]<"u"&&R.push(w[S]);m.obj[m.prop]=R}}},o=function(l,m){for(var w=m&&m.plainObjects?Object.create(null):{},R=0;R<l.length;++R)typeof l[R]<"u"&&(w[R]=l[R]);return w},i=function c(l,m,w){if(!m)return l;if(typeof m!="object"){if(r(l))l.push(m);else if(l&&typeof l=="object")(w&&(w.plainObjects||w.allowPrototypes)||!e.call(Object.prototype,m))&&(l[m]=!0);else return[l,m];return l}if(!l||typeof l!="object")return[l].concat(m);var R=l;return r(l)&&!r(m)&&(R=o(l,w)),r(l)&&r(m)?(m.forEach(function(S,C){if(e.call(l,C)){var O=l[C];O&&typeof O=="object"&&S&&typeof S=="object"?l[C]=c(O,S,w):l.push(S)}else l[C]=S}),l):Object.keys(m).reduce(function(S,C){var O=m[C];return e.call(S,C)?S[C]=c(S[C],O,w):S[C]=O,S},R)},d=function(l,m){return Object.keys(m).reduce(function(w,R){return w[R]=m[R],w},l)},g=function(c,l,m){var w=c.replace(/\+/g," ");if(m==="iso-8859-1")return w.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(w)}catch{return w}},h=function(l,m,w,R,S){if(l.length===0)return l;var C=l;if(typeof l=="symbol"?C=Symbol.prototype.toString.call(l):typeof l!="string"&&(C=String(l)),w==="iso-8859-1")return escape(C).replace(/%u[0-9a-f]{4}/gi,function(T){return"%26%23"+parseInt(T.slice(2),16)+"%3B"});for(var O="",N=0;N<C.length;++N){var x=C.charCodeAt(N);if(x===45||x===46||x===95||x===126||x>=48&&x<=57||x>=65&&x<=90||x>=97&&x<=122||S===t.RFC1738&&(x===40||x===41)){O+=C.charAt(N);continue}if(x<128){O=O+n[x];continue}if(x<2048){O=O+(n[192|x>>6]+n[128|x&63]);continue}if(x<55296||x>=57344){O=O+(n[224|x>>12]+n[128|x>>6&63]+n[128|x&63]);continue}N+=1,x=65536+((x&1023)<<10|C.charCodeAt(N)&1023),O+=n[240|x>>18]+n[128|x>>12&63]+n[128|x>>6&63]+n[128|x&63]}return O},u=function(l){for(var m=[{obj:{o:l},prop:"o"}],w=[],R=0;R<m.length;++R)for(var S=m[R],C=S.obj[S.prop],O=Object.keys(C),N=0;N<O.length;++N){var x=O[N],T=C[x];typeof T=="object"&&T!==null&&w.indexOf(T)===-1&&(m.push({obj:C,prop:x}),w.push(T))}return s(m),l},b=function(l){return Object.prototype.toString.call(l)==="[object RegExp]"},E=function(l){return!l||typeof l!="object"?!1:!!(l.constructor&&l.constructor.isBuffer&&l.constructor.isBuffer(l))},y=function(l,m){return[].concat(l,m)},p=function(l,m){if(r(l)){for(var w=[],R=0;R<l.length;R+=1)w.push(m(l[R]));return w}return m(l)};return _e={arrayToObject:o,assign:d,combine:y,compact:u,decode:g,encode:h,isBuffer:E,isRegExp:b,maybeMap:p,merge:i},_e}var Ne,Rt;function hn(){if(Rt)return Ne;Rt=1;var t=St(),e=Oe(),r=Object.prototype.hasOwnProperty,n={brackets:function(c){return c+"[]"},comma:"comma",indices:function(c,l){return c+"["+l+"]"},repeat:function(c){return c}},s=Array.isArray,o=String.prototype.split,i=Array.prototype.push,d=function(p,c){i.apply(p,s(c)?c:[c])},g=Date.prototype.toISOString,h=e.default,u={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:t.encode,encodeValuesOnly:!1,format:h,formatter:e.formatters[h],indices:!1,serializeDate:function(c){return g.call(c)},skipNulls:!1,strictNullHandling:!1},b=function(c){return typeof c=="string"||typeof c=="number"||typeof c=="boolean"||typeof c=="symbol"||typeof c=="bigint"},E=function p(c,l,m,w,R,S,C,O,N,x,T,v,I,X){var k=c;if(typeof C=="function"?k=C(l,k):k instanceof Date?k=x(k):m==="comma"&&s(k)&&(k=t.maybeMap(k,function(Fe){return Fe instanceof Date?x(Fe):Fe})),k===null){if(w)return S&&!I?S(l,u.encoder,X,"key",T):l;k=""}if(b(k)||t.isBuffer(k)){if(S){var vt=I?l:S(l,u.encoder,X,"key",T);if(m==="comma"&&I){for(var kt=o.call(String(k),","),Bt="",ue=0;ue<kt.length;++ue)Bt+=(ue===0?"":",")+v(S(kt[ue],u.encoder,X,"value",T));return[v(vt)+"="+Bt]}return[v(vt)+"="+v(S(k,u.encoder,X,"value",T))]}return[v(l)+"="+v(String(k))]}var Be=[];if(typeof k>"u")return Be;var Z;if(m==="comma"&&s(k))Z=[{value:k.length>0?k.join(",")||null:void 0}];else if(s(C))Z=C;else{var Pt=Object.keys(k);Z=O?Pt.sort(O):Pt}for(var Pe=0;Pe<Z.length;++Pe){var V=Z[Pe],Ft=typeof V=="object"&&typeof V.value<"u"?V.value:k[V];if(!(R&&Ft===null)){var Dn=s(k)?typeof m=="function"?m(l,V):l:l+(N?"."+V:"["+V+"]");d(Be,p(Ft,Dn,m,w,R,S,C,O,N,x,T,v,I,X))}}return Be},y=function(c){if(!c)return u;if(c.encoder!==null&&typeof c.encoder<"u"&&typeof c.encoder!="function")throw new TypeError("Encoder has to be a function.");var l=c.charset||u.charset;if(typeof c.charset<"u"&&c.charset!=="utf-8"&&c.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var m=e.default;if(typeof c.format<"u"){if(!r.call(e.formatters,c.format))throw new TypeError("Unknown format option provided.");m=c.format}var w=e.formatters[m],R=u.filter;return(typeof c.filter=="function"||s(c.filter))&&(R=c.filter),{addQueryPrefix:typeof c.addQueryPrefix=="boolean"?c.addQueryPrefix:u.addQueryPrefix,allowDots:typeof c.allowDots>"u"?u.allowDots:!!c.allowDots,charset:l,charsetSentinel:typeof c.charsetSentinel=="boolean"?c.charsetSentinel:u.charsetSentinel,delimiter:typeof c.delimiter>"u"?u.delimiter:c.delimiter,encode:typeof c.encode=="boolean"?c.encode:u.encode,encoder:typeof c.encoder=="function"?c.encoder:u.encoder,encodeValuesOnly:typeof c.encodeValuesOnly=="boolean"?c.encodeValuesOnly:u.encodeValuesOnly,filter:R,format:m,formatter:w,serializeDate:typeof c.serializeDate=="function"?c.serializeDate:u.serializeDate,skipNulls:typeof c.skipNulls=="boolean"?c.skipNulls:u.skipNulls,sort:typeof c.sort=="function"?c.sort:null,strictNullHandling:typeof c.strictNullHandling=="boolean"?c.strictNullHandling:u.strictNullHandling}};return Ne=function(p,c){var l=p,m=y(c),w,R;typeof m.filter=="function"?(R=m.filter,l=R("",l)):s(m.filter)&&(R=m.filter,w=R);var S=[];if(typeof l!="object"||l===null)return"";var C;c&&c.arrayFormat in n?C=c.arrayFormat:c&&"indices"in c?C=c.indices?"indices":"repeat":C="indices";var O=n[C];w||(w=Object.keys(l)),m.sort&&w.sort(m.sort);for(var N=0;N<w.length;++N){var x=w[N];m.skipNulls&&l[x]===null||d(S,E(l[x],x,O,m.strictNullHandling,m.skipNulls,m.encode?m.encoder:null,m.filter,m.sort,m.allowDots,m.serializeDate,m.format,m.formatter,m.encodeValuesOnly,m.charset))}var T=S.join(m.delimiter),v=m.addQueryPrefix===!0?"?":"";return m.charsetSentinel&&(m.charset==="iso-8859-1"?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),T.length>0?v+T:""},Ne}var Te,Ct;function pn(){if(Ct)return Te;Ct=1;var t=St(),e=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:t.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(E){return E.replace(/&#(\d+);/g,function(y,p){return String.fromCharCode(parseInt(p,10))})},o=function(E,y){return E&&typeof E=="string"&&y.comma&&E.indexOf(",")>-1?E.split(","):E},i="utf8=%26%2310003%3B",d="utf8=%E2%9C%93",g=function(y,p){var c={},l=p.ignoreQueryPrefix?y.replace(/^\?/,""):y,m=p.parameterLimit===1/0?void 0:p.parameterLimit,w=l.split(p.delimiter,m),R=-1,S,C=p.charset;if(p.charsetSentinel)for(S=0;S<w.length;++S)w[S].indexOf("utf8=")===0&&(w[S]===d?C="utf-8":w[S]===i&&(C="iso-8859-1"),R=S,S=w.length);for(S=0;S<w.length;++S)if(S!==R){var O=w[S],N=O.indexOf("]="),x=N===-1?O.indexOf("="):N+1,T,v;x===-1?(T=p.decoder(O,n.decoder,C,"key"),v=p.strictNullHandling?null:""):(T=p.decoder(O.slice(0,x),n.decoder,C,"key"),v=t.maybeMap(o(O.slice(x+1),p),function(I){return p.decoder(I,n.decoder,C,"value")})),v&&p.interpretNumericEntities&&C==="iso-8859-1"&&(v=s(v)),O.indexOf("[]=")>-1&&(v=r(v)?[v]:v),e.call(c,T)?c[T]=t.combine(c[T],v):c[T]=v}return c},h=function(E,y,p,c){for(var l=c?y:o(y,p),m=E.length-1;m>=0;--m){var w,R=E[m];if(R==="[]"&&p.parseArrays)w=[].concat(l);else{w=p.plainObjects?Object.create(null):{};var S=R.charAt(0)==="["&&R.charAt(R.length-1)==="]"?R.slice(1,-1):R,C=parseInt(S,10);!p.parseArrays&&S===""?w={0:l}:!isNaN(C)&&R!==S&&String(C)===S&&C>=0&&p.parseArrays&&C<=p.arrayLimit?(w=[],w[C]=l):S!=="__proto__"&&(w[S]=l)}l=w}return l},u=function(y,p,c,l){if(y){var m=c.allowDots?y.replace(/\.([^.[]+)/g,"[$1]"):y,w=/(\[[^[\]]*])/,R=/(\[[^[\]]*])/g,S=c.depth>0&&w.exec(m),C=S?m.slice(0,S.index):m,O=[];if(C){if(!c.plainObjects&&e.call(Object.prototype,C)&&!c.allowPrototypes)return;O.push(C)}for(var N=0;c.depth>0&&(S=R.exec(m))!==null&&N<c.depth;){if(N+=1,!c.plainObjects&&e.call(Object.prototype,S[1].slice(1,-1))&&!c.allowPrototypes)return;O.push(S[1])}return S&&O.push("["+m.slice(S.index)+"]"),h(O,p,c,l)}},b=function(y){if(!y)return n;if(y.decoder!==null&&y.decoder!==void 0&&typeof y.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof y.charset<"u"&&y.charset!=="utf-8"&&y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var p=typeof y.charset>"u"?n.charset:y.charset;return{allowDots:typeof y.allowDots>"u"?n.allowDots:!!y.allowDots,allowPrototypes:typeof y.allowPrototypes=="boolean"?y.allowPrototypes:n.allowPrototypes,arrayLimit:typeof y.arrayLimit=="number"?y.arrayLimit:n.arrayLimit,charset:p,charsetSentinel:typeof y.charsetSentinel=="boolean"?y.charsetSentinel:n.charsetSentinel,comma:typeof y.comma=="boolean"?y.comma:n.comma,decoder:typeof y.decoder=="function"?y.decoder:n.decoder,delimiter:typeof y.delimiter=="string"||t.isRegExp(y.delimiter)?y.delimiter:n.delimiter,depth:typeof y.depth=="number"||y.depth===!1?+y.depth:n.depth,ignoreQueryPrefix:y.ignoreQueryPrefix===!0,interpretNumericEntities:typeof y.interpretNumericEntities=="boolean"?y.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof y.parameterLimit=="number"?y.parameterLimit:n.parameterLimit,parseArrays:y.parseArrays!==!1,plainObjects:typeof y.plainObjects=="boolean"?y.plainObjects:n.plainObjects,strictNullHandling:typeof y.strictNullHandling=="boolean"?y.strictNullHandling:n.strictNullHandling}};return Te=function(E,y){var p=b(y);if(E===""||E===null||typeof E>"u")return p.plainObjects?Object.create(null):{};for(var c=typeof E=="string"?g(E,p):E,l=p.plainObjects?Object.create(null):{},m=Object.keys(c),w=0;w<m.length;++w){var R=m[w],S=u(R,c[R],p,typeof E=="string");l=t.merge(l,S,p)}return t.compact(l)},Te}var Ae,xt;function mn(){if(xt)return Ae;xt=1;var t=hn(),e=pn(),r=Oe();return Ae={formats:r,parse:e,stringify:t},Ae}var Ot=mn();function j(){return j=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},j.apply(null,arguments)}class ve{constructor(e,r,n){var s,o;this.name=e,this.definition=r,this.bindings=(s=r.bindings)!=null?s:{},this.wheres=(o=r.wheres)!=null?o:{},this.config=n}get template(){const e=`${this.origin}/${this.definition.uri}`.replace(/\/+$/,"");return e===""?"/":e}get origin(){return this.config.absolute?this.definition.domain?`${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${this.config.