UNPKG

@mkody/twitch-emoticons

Version:

Gets Twitch, BTTV, FFZ and 7TV emotes as well as parsing text to emotes!

6 lines 365 kB
var za=Object.defineProperty;var ow=Object.getOwnPropertyDescriptor;var lw=Object.getOwnPropertyNames;var uw=Object.prototype.hasOwnProperty;var n=(i,e)=>za(i,"name",{value:e,configurable:!0});var cw=(i,e)=>()=>(i&&(e=i(i=0)),e);var u=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),dw=(i,e)=>{for(var t in e)za(i,t,{get:e[t],enumerable:!0})},hw=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of lw(e))!uw.call(i,a)&&a!==t&&za(i,a,{get:()=>e[a],enumerable:!(r=ow(e,a))||r.enumerable});return i};var b=i=>hw(za({},"__esModule",{value:!0}),i);var fr=u(($R,Gm)=>{var Uu=class i{static{n(this,"Emote")}constructor(e,t,r){if(new.target.name===i.name)throw new Error("Base Emote class cannot be used");this.fetcher=e.fetcher,this.channel=e,this.id=t,this.type=null,this._setup(r)}_setup(e){this.code=e.code}toLink(){return null}toString(){return this.code}toObject(){return{code:this.code,id:this.id,channel_id:this.channel.channel_id}}};Gm.exports=Uu});var qt=u((KR,Wm)=>{Wm.exports={Twitch:{CDN:n((i,e)=>`https://static-cdn.jtvnw.net/emoticons/v2/${i}/default/dark/${e+1}.0`,"CDN")},BTTV:{Global:"https://api.betterttv.net/3/cached/emotes/global",Channel:n(i=>`https://api.betterttv.net/3/cached/users/twitch/${i}`,"Channel"),CDN:n((i,e)=>`https://cdn.betterttv.net/emote/${i}/${e+1}x.webp`,"CDN")},SevenTV:{Global:"https://7tv.io/v3/emote-sets/global",Channel:n(i=>`https://7tv.io/v3/users/twitch/${i}`,"Channel"),CDN:n((i,e)=>`https://cdn.7tv.app/emote/${i}/${e}`,"CDN")},FFZ:{sets:{Global:3,Modifiers:1532818},Set:n(i=>`https://api.frankerfacez.com/v1/set/${i}`,"Set"),Channel:n(i=>`https://api.frankerfacez.com/v1/room/id/${i}`,"Channel"),CDN:n((i,e)=>`https://cdn.frankerfacez.com/emote/${i}/${e}`,"CDN"),CDNAnimated:n((i,e)=>`https://cdn.frankerfacez.com/emote/${i}/animated/${e}.webp`,"CDNAnimated")},Templates:{html:'<img alt="{name}" title="{name}" class="twitch-emote twitch-emote-{size}" src="{link}">',markdown:'![{name}]({link} "{name}")',bbcode:"[img]{link}[/img]",plain:"{link}"}}});var Ou=u((ZR,Vm)=>{var pw=fr(),mw=qt(),Bu=class i extends pw{static{n(this,"BTTVEmote")}constructor(e,t,r){super(e,t,r),this.type="bttv"}get owner(){return this.fetcher.channels.get(this.ownerName)}_setup(e){super._setup(e),this.ownerName="user"in e?e.user.name:null,this.animated=e.animated,this.imageType="webp"}toLink(e=0){return mw.BTTV.CDN(this.id,e)}toObject(){return Object.assign({},super.toObject(),{animated:this.animated,ownerName:this.ownerName,type:this.type})}static fromObject(e,t=null){return new i(t,e.id,{code:e.code,animated:e.animated,user:{name:e.ownerName}})}};Vm.exports=Bu});var Ka=u((YR,$m)=>{var ju=class extends Map{static{n(this,"Collection")}find(e,t){if(typeof e=="string"){if(typeof t>"u")return null;for(let r of this.values())if(r[e]===t)return r;return null}if(typeof e=="function"){let r=0;for(let a of this.values()){if(e(a,r,this))return a;r++}return null}return null}filter(e,t){t&&(e=e.bind(t));let r=new this.constructor,a=0;for(let[s,o]of this)e(o,a,this)&&r.set(s,o),a++;return r}map(e,t){t&&(e=e.bind(t));let r=new Array(this.size),a=0;for(let s of this.values())r[a]=e(s,a,this),a++;return r}};$m.exports=ju});var Mu=u((tU,zm)=>{var _w=Ka(),ku=class{static{n(this,"Channel")}constructor(e,t){this.fetcher=e,this.channel_id=t,this.emotes=new _w}fetchBTTVEmotes(){return this.fetcher.fetchBTTVEmotes(this.id)}fetchFFZEmotes(){return this.fetcher.fetchFFZEmotes(this.id)}fetchSevenTVEmotes(){return this.fetcher.fetchSevenTVEmotes(this.id)}};zm.exports=ku});var Fu=u((iU,Jm)=>{var yw=fr(),Km=qt(),Lu=class i extends yw{static{n(this,"FFZEmote")}constructor(e,t,r){super(e,t,r),this.type="ffz"}get owner(){return this.fetcher.channels.get(this.ownerName)}_setup(e){super._setup(e),this.code=e.name,this.ownerName="owner"in e?e.owner.name:null,this.sizes="animated"in e?Object.keys(e.animated):Object.keys(e.urls),this.animated="animated"in e,this.imageType="animated"in e?"webp":"png",this.modifier=e.modifier&&(e.modifier_flags&1)!==0}toLink(e=0){return e=this.sizes[e],this.animated?Km.FFZ.CDNAnimated(this.id,e):Km.FFZ.CDN(this.id,e)}toObject(){return Object.assign({},super.toObject(),{animated:this.animated,sizes:this.sizes,ownerName:this.ownerName,type:this.type,modifier:this.modifier})}static fromObject(e,t=null){let r=e.sizes.reduce((a,s)=>(a[s]=s,a),{});return new i(t,e.id,{code:e.code,name:e.code,urls:r,...e.animated?{animated:r}:{},owner:{name:e.ownerName},modifier:e.modifier,modifier_flags:e.modifier})}};Jm.exports=Lu});var Qu=u((aU,Zm)=>{var fw=fr(),gw=qt(),Nu=class i extends fw{static{n(this,"SevenTVEmote")}constructor(e,t,r){super(e,t,r),this.type="7tv"}get owner(){return this.fetcher.channels.get(this.ownerName)}_setup(e){super._setup(e),this.code=e.name,this.ownerName="owner"in e.data?e.data.owner.display_name:null,this.sizes=e.data.host.files.filter(t=>t.format===this.channel.format.toUpperCase()).map(t=>t.name),this.animated=e.data.animated,this.imageType=this.channel.format}toLink(e=0){return e=this.sizes[e],gw.SevenTV.CDN(this.id,e)}toObject(){return Object.assign({},super.toObject(),{animated:this.animated,sizes:this.sizes,ownerName:this.ownerName,type:this.type,imageType:this.imageType})}static fromObject(e,t){let r=e.sizes.map(a=>({format:t.format.toUpperCase(),name:a}));return new i(t,e.id,{code:e.code,name:e.code,data:{animated:e.animated,owner:{display_name:e.ownerName},host:{files:r}}})}};Zm.exports=Nu});var Wu=u((oU,Xm)=>{var bw=fr(),xw=qt(),Gu=class i extends bw{static{n(this,"TwitchEmote")}constructor(e,t,r){super(e,t,r),this.type="twitch"}get owner(){return this.channel}_setup(e){super._setup(e),this.set=e.emoticon_set,this.animated="animated"in e.formats,this.imageType="animated"in e.formats?"gif":"png"}toLink(e=0){return xw.Twitch.CDN(this.id,e)}toObject(){return Object.assign({},super.toObject(),{animated:this.animated,set:this.set,type:this.type})}static fromObject(e,t=null){return new i(t,e.id,{code:e.code,animated:e.animated,emoticon_set:e.set,formats:e.animated?{animated:e.animated}:{}})}};Xm.exports=Gu});var j_=u((uU,O_)=>{"use strict";function h_(i,e){return n(function(){return i.apply(e,arguments)},"wrap")}n(h_,"bind");var{toString:ww}=Object.prototype,{getPrototypeOf:ic}=Object,{iterator:rs,toStringTag:p_}=Symbol,is=(i=>e=>{let t=ww.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Ke=n(i=>(i=i.toLowerCase(),e=>is(e)===i),"kindOfTest"),ns=n(i=>e=>typeof e===i,"typeOfTest"),{isArray:xr}=Array,li=ns("undefined");function vw(i){return i!==null&&!li(i)&&i.constructor!==null&&!li(i.constructor)&&Ce(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}n(vw,"isBuffer");var m_=Ke("ArrayBuffer");function Sw(i){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(i):e=i&&i.buffer&&m_(i.buffer),e}n(Sw,"isArrayBufferView");var Hw=ns("string"),Ce=ns("function"),__=ns("number"),as=n(i=>i!==null&&typeof i=="object","isObject"),Cw=n(i=>i===!0||i===!1,"isBoolean"),Ja=n(i=>{if(is(i)!=="object")return!1;let e=ic(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(p_ in i)&&!(rs in i)},"isPlainObject"),qw=Ke("Date"),Ew=Ke("File"),Pw=Ke("Blob"),Aw=Ke("FileList"),Dw=n(i=>as(i)&&Ce(i.pipe),"isStream"),Iw=n(i=>{let e;return i&&(typeof FormData=="function"&&i instanceof FormData||Ce(i.append)&&((e=is(i))==="formdata"||e==="object"&&Ce(i.toString)&&i.toString()==="[object FormData]"))},"isFormData"),Tw=Ke("URLSearchParams"),[Rw,Uw,Bw,Ow]=["ReadableStream","Request","Response","Headers"].map(Ke),jw=n(i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function ui(i,e,{allOwnKeys:t=!1}={}){if(i===null||typeof i>"u")return;let r,a;if(typeof i!="object"&&(i=[i]),xr(i))for(r=0,a=i.length;r<a;r++)e.call(null,i[r],r,i);else{let s=t?Object.getOwnPropertyNames(i):Object.keys(i),o=s.length,l;for(r=0;r<o;r++)l=s[r],e.call(null,i[l],l,i)}}n(ui,"forEach");function y_(i,e){e=e.toLowerCase();let t=Object.keys(i),r=t.length,a;for(;r-- >0;)if(a=t[r],e===a.toLowerCase())return a;return null}n(y_,"findKey");var Kt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,f_=n(i=>!li(i)&&i!==Kt,"isContextDefined");function Ku(){let{caseless:i}=f_(this)&&this||{},e={},t=n((r,a)=>{let s=i&&y_(e,a)||a;Ja(e[s])&&Ja(r)?e[s]=Ku(e[s],r):Ja(r)?e[s]=Ku({},r):xr(r)?e[s]=r.slice():e[s]=r},"assignValue");for(let r=0,a=arguments.length;r<a;r++)arguments[r]&&ui(arguments[r],t);return e}n(Ku,"merge");var kw=n((i,e,t,{allOwnKeys:r}={})=>(ui(e,(a,s)=>{t&&Ce(a)?i[s]=h_(a,t):i[s]=a},{allOwnKeys:r}),i),"extend"),Mw=n(i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),"stripBOM"),Lw=n((i,e,t,r)=>{i.prototype=Object.create(e.prototype,r),i.prototype.constructor=i,Object.defineProperty(i,"super",{value:e.prototype}),t&&Object.assign(i.prototype,t)},"inherits"),Fw=n((i,e,t,r)=>{let a,s,o,l={};if(e=e||{},i==null)return e;do{for(a=Object.getOwnPropertyNames(i),s=a.length;s-- >0;)o=a[s],(!r||r(o,i,e))&&!l[o]&&(e[o]=i[o],l[o]=!0);i=t!==!1&&ic(i)}while(i&&(!t||t(i,e))&&i!==Object.prototype);return e},"toFlatObject"),Nw=n((i,e,t)=>{i=String(i),(t===void 0||t>i.length)&&(t=i.length),t-=e.length;let r=i.indexOf(e,t);return r!==-1&&r===t},"endsWith"),Qw=n(i=>{if(!i)return null;if(xr(i))return i;let e=i.length;if(!__(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=i[e];return t},"toArray"),Gw=(i=>e=>i&&e instanceof i)(typeof Uint8Array<"u"&&ic(Uint8Array)),Ww=n((i,e)=>{let r=(i&&i[rs]).call(i),a;for(;(a=r.next())&&!a.done;){let s=a.value;e.call(i,s[0],s[1])}},"forEachEntry"),Vw=n((i,e)=>{let t,r=[];for(;(t=i.exec(e))!==null;)r.push(t);return r},"matchAll"),$w=Ke("HTMLFormElement"),zw=n(i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,n(function(t,r,a){return r.toUpperCase()+a},"replacer")),"toCamelCase"),Ym=(({hasOwnProperty:i})=>(e,t)=>i.call(e,t))(Object.prototype),Kw=Ke("RegExp"),g_=n((i,e)=>{let t=Object.getOwnPropertyDescriptors(i),r={};ui(t,(a,s)=>{let o;(o=e(a,s,i))!==!1&&(r[s]=o||a)}),Object.defineProperties(i,r)},"reduceDescriptors"),Jw=n(i=>{g_(i,(e,t)=>{if(Ce(i)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let r=i[t];if(Ce(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},"freezeMethods"),Zw=n((i,e)=>{let t={},r=n(a=>{a.forEach(s=>{t[s]=!0})},"define");return xr(i)?r(i):r(String(i).split(e)),t},"toObjectSet"),Xw=n(()=>{},"noop"),Yw=n((i,e)=>i!=null&&Number.isFinite(i=+i)?i:e,"toFiniteNumber");function ev(i){return!!(i&&Ce(i.append)&&i[p_]==="FormData"&&i[rs])}n(ev,"isSpecCompliantForm");var tv=n(i=>{let e=new Array(10),t=n((r,a)=>{if(as(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[a]=r;let s=xr(r)?[]:{};return ui(r,(o,l)=>{let d=t(o,a+1);!li(d)&&(s[l]=d)}),e[a]=void 0,s}}return r},"visit");return t(i,0)},"toJSONObject"),rv=Ke("AsyncFunction"),iv=n(i=>i&&(as(i)||Ce(i))&&Ce(i.then)&&Ce(i.catch),"isThenable"),b_=((i,e)=>i?setImmediate:e?((t,r)=>(Kt.addEventListener("message",({source:a,data:s})=>{a===Kt&&s===t&&r.length&&r.shift()()},!1),a=>{r.push(a),Kt.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ce(Kt.postMessage)),nv=typeof queueMicrotask<"u"?queueMicrotask.bind(Kt):typeof process<"u"&&process.nextTick||b_,av=n(i=>i!=null&&Ce(i[rs]),"isIterable"),_={isArray:xr,isArrayBuffer:m_,isBuffer:vw,isFormData:Iw,isArrayBufferView:Sw,isString:Hw,isNumber:__,isBoolean:Cw,isObject:as,isPlainObject:Ja,isReadableStream:Rw,isRequest:Uw,isResponse:Bw,isHeaders:Ow,isUndefined:li,isDate:qw,isFile:Ew,isBlob:Pw,isRegExp:Kw,isFunction:Ce,isStream:Dw,isURLSearchParams:Tw,isTypedArray:Gw,isFileList:Aw,forEach:ui,merge:Ku,extend:kw,trim:jw,stripBOM:Mw,inherits:Lw,toFlatObject:Fw,kindOf:is,kindOfTest:Ke,endsWith:Nw,toArray:Qw,forEachEntry:Ww,matchAll:Vw,isHTMLForm:$w,hasOwnProperty:Ym,hasOwnProp:Ym,reduceDescriptors:g_,freezeMethods:Jw,toObjectSet:Zw,toCamelCase:zw,noop:Xw,toFiniteNumber:Yw,findKey:y_,global:Kt,isContextDefined:f_,isSpecCompliantForm:ev,toJSONObject:tv,isAsyncFn:rv,isThenable:iv,setImmediate:b_,asap:nv,isIterable:av};function I(i,e,t,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=i,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}n(I,"AxiosError");_.inherits(I,Error,{toJSON:n(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:_.toJSONObject(this.config),code:this.code,status:this.status}},"toJSON")});var x_=I.prototype,w_={};["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(i=>{w_[i]={value:i}});Object.defineProperties(I,w_);Object.defineProperty(x_,"isAxiosError",{value:!0});I.from=(i,e,t,r,a,s)=>{let o=Object.create(x_);return _.toFlatObject(i,o,n(function(d){return d!==Error.prototype},"filter"),l=>l!=="isAxiosError"),I.call(o,i.message,e,t,r,a),o.cause=i,o.name=i.name,s&&Object.assign(o,s),o};var sv=null;function Ju(i){return _.isPlainObject(i)||_.isArray(i)}n(Ju,"isVisitable");function v_(i){return _.endsWith(i,"[]")?i.slice(0,-2):i}n(v_,"removeBrackets");function e_(i,e,t){return i?i.concat(e).map(n(function(a,s){return a=v_(a),!t&&s?"["+a+"]":a},"each")).join(t?".":""):e}n(e_,"renderKey");function ov(i){return _.isArray(i)&&!i.some(Ju)}n(ov,"isFlatArray");var lv=_.toFlatObject(_,{},null,n(function(e){return/^is[A-Z]/.test(e)},"filter"));function ss(i,e,t){if(!_.isObject(i))throw new TypeError("target must be an object");e=e||new FormData,t=_.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,n(function(P,v){return!_.isUndefined(v[P])},"defined"));let r=t.metaTokens,a=t.visitor||p,s=t.dots,o=t.indexes,d=(t.Blob||typeof Blob<"u"&&Blob)&&_.isSpecCompliantForm(e);if(!_.isFunction(a))throw new TypeError("visitor must be a function");function h(w){if(w===null)return"";if(_.isDate(w))return w.toISOString();if(!d&&_.isBlob(w))throw new I("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(w)||_.isTypedArray(w)?d&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}n(h,"convertValue");function p(w,P,v){let B=w;if(w&&!v&&typeof w=="object"){if(_.endsWith(P,"{}"))P=r?P:P.slice(0,-2),w=JSON.stringify(w);else if(_.isArray(w)&&ov(w)||(_.isFileList(w)||_.endsWith(P,"[]"))&&(B=_.toArray(w)))return P=v_(P),B.forEach(n(function($,z){!(_.isUndefined($)||$===null)&&e.append(o===!0?e_([P],z,s):o===null?P:P+"[]",h($))},"each")),!1}return Ju(w)?!0:(e.append(e_(v,P,s),h(w)),!1)}n(p,"defaultVisitor");let x=[],E=Object.assign(lv,{defaultVisitor:p,convertValue:h,isVisitable:Ju});function q(w,P){if(!_.isUndefined(w)){if(x.indexOf(w)!==-1)throw Error("Circular reference detected in "+P.join("."));x.push(w),_.forEach(w,n(function(B,V){(!(_.isUndefined(B)||B===null)&&a.call(e,B,_.isString(V)?V.trim():V,P,E))===!0&&q(B,P?P.concat(V):[V])},"each")),x.pop()}}if(n(q,"build"),!_.isObject(i))throw new TypeError("data must be an object");return q(i),e}n(ss,"toFormData");function t_(i){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,n(function(r){return e[r]},"replacer"))}n(t_,"encode$1");function nc(i,e){this._pairs=[],i&&ss(i,this,e)}n(nc,"AxiosURLSearchParams");var S_=nc.prototype;S_.append=n(function(e,t){this._pairs.push([e,t])},"append");S_.toString=n(function(e){let t=e?function(r){return e.call(this,r,t_)}:t_;return this._pairs.map(n(function(a){return t(a[0])+"="+t(a[1])},"each"),"").join("&")},"toString");function uv(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}n(uv,"encode");function H_(i,e,t){if(!e)return i;let r=t&&t.encode||uv;_.isFunction(t)&&(t={serialize:t});let a=t&&t.serialize,s;if(a?s=a(e,t):s=_.isURLSearchParams(e)?e.toString():new nc(e,t).toString(r),s){let o=i.indexOf("#");o!==-1&&(i=i.slice(0,o)),i+=(i.indexOf("?")===-1?"?":"&")+s}return i}n(H_,"buildURL");var Zu=class{static{n(this,"InterceptorManager")}constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_.forEach(this.handlers,n(function(r){r!==null&&e(r)},"forEachHandler"))}},r_=Zu,C_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cv=typeof URLSearchParams<"u"?URLSearchParams:nc,dv=typeof FormData<"u"?FormData:null,hv=typeof Blob<"u"?Blob:null,pv={isBrowser:!0,classes:{URLSearchParams:cv,FormData:dv,Blob:hv},protocols:["http","https","file","blob","url","data"]},ac=typeof window<"u"&&typeof document<"u",Xu=typeof navigator=="object"&&navigator||void 0,mv=ac&&(!Xu||["ReactNative","NativeScript","NS"].indexOf(Xu.product)<0),_v=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yv=ac&&window.location.href||"http://localhost",fv=Object.freeze({__proto__:null,hasBrowserEnv:ac,hasStandardBrowserWebWorkerEnv:_v,hasStandardBrowserEnv:mv,navigator:Xu,origin:yv}),ve={...fv,...pv};function gv(i,e){return ss(i,new ve.classes.URLSearchParams,Object.assign({visitor:n(function(t,r,a,s){return ve.isNode&&_.isBuffer(t)?(this.append(r,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},"visitor")},e))}n(gv,"toURLEncodedForm");function bv(i){return _.matchAll(/\w+|\[(\w*)]/g,i).map(e=>e[0]==="[]"?"":e[1]||e[0])}n(bv,"parsePropPath");function xv(i){let e={},t=Object.keys(i),r,a=t.length,s;for(r=0;r<a;r++)s=t[r],e[s]=i[s];return e}n(xv,"arrayToObject");function q_(i){function e(t,r,a,s){let o=t[s++];if(o==="__proto__")return!0;let l=Number.isFinite(+o),d=s>=t.length;return o=!o&&_.isArray(a)?a.length:o,d?(_.hasOwnProp(a,o)?a[o]=[a[o],r]:a[o]=r,!l):((!a[o]||!_.isObject(a[o]))&&(a[o]=[]),e(t,r,a[o],s)&&_.isArray(a[o])&&(a[o]=xv(a[o])),!l)}if(n(e,"buildPath"),_.isFormData(i)&&_.isFunction(i.entries)){let t={};return _.forEachEntry(i,(r,a)=>{e(bv(r),a,t,0)}),t}return null}n(q_,"formDataToJSON");function wv(i,e,t){if(_.isString(i))try{return(e||JSON.parse)(i),_.trim(i)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(i)}n(wv,"stringifySafely");var sc={transitional:C_,adapter:["xhr","http","fetch"],transformRequest:[n(function(e,t){let r=t.getContentType()||"",a=r.indexOf("application/json")>-1,s=_.isObject(e);if(s&&_.isHTMLForm(e)&&(e=new FormData(e)),_.isFormData(e))return a?JSON.stringify(q_(e)):e;if(_.isArrayBuffer(e)||_.isBuffer(e)||_.isStream(e)||_.isFile(e)||_.isBlob(e)||_.isReadableStream(e))return e;if(_.isArrayBufferView(e))return e.buffer;if(_.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return gv(e,this.formSerializer).toString();if((l=_.isFileList(e))||r.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return ss(l?{"files[]":e}:e,d&&new d,this.formSerializer)}}return s||a?(t.setContentType("application/json",!1),wv(e)):e},"transformRequest")],transformResponse:[n(function(e){let t=this.transitional||sc.transitional,r=t&&t.forcedJSONParsing,a=this.responseType==="json";if(_.isResponse(e)||_.isReadableStream(e))return e;if(e&&_.isString(e)&&(r&&!this.responseType||a)){let o=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(l){if(o)throw l.name==="SyntaxError"?I.from(l,I.ERR_BAD_RESPONSE,this,null,this.response):l}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ve.classes.FormData,Blob:ve.classes.Blob},validateStatus:n(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch"],i=>{sc.headers[i]={}});var oc=sc,vv=_.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"]),Sv=n(i=>{let e={},t,r,a;return i&&i.split(` `).forEach(n(function(o){a=o.indexOf(":"),t=o.substring(0,a).trim().toLowerCase(),r=o.substring(a+1).trim(),!(!t||e[t]&&vv[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)},"parser")),e},"parseHeaders"),i_=Symbol("internals");function oi(i){return i&&String(i).trim().toLowerCase()}n(oi,"normalizeHeader");function Za(i){return i===!1||i==null?i:_.isArray(i)?i.map(Za):String(i)}n(Za,"normalizeValue");function Hv(i){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=t.exec(i);)e[r[1]]=r[2];return e}n(Hv,"parseTokens");var Cv=n(i=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim()),"isValidHeaderName");function Vu(i,e,t,r,a){if(_.isFunction(r))return r.call(this,e,t);if(a&&(e=t),!!_.isString(e)){if(_.isString(r))return e.indexOf(r)!==-1;if(_.isRegExp(r))return r.test(e)}}n(Vu,"matchHeaderValue");function qv(i){return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}n(qv,"formatHeader");function Ev(i,e){let t=_.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(i,r+t,{value:n(function(a,s,o){return this[r].call(this,e,a,s,o)},"value"),configurable:!0})})}n(Ev,"buildAccessors");var gr=class{static{n(this,"AxiosHeaders")}constructor(e){e&&this.set(e)}set(e,t,r){let a=this;function s(l,d,h){let p=oi(d);if(!p)throw new Error("header name must be a non-empty string");let x=_.findKey(a,p);(!x||a[x]===void 0||h===!0||h===void 0&&a[x]!==!1)&&(a[x||d]=Za(l))}n(s,"setHeader");let o=n((l,d)=>_.forEach(l,(h,p)=>s(h,p,d)),"setHeaders");if(_.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(_.isString(e)&&(e=e.trim())&&!Cv(e))o(Sv(e),t);else if(_.isObject(e)&&_.isIterable(e)){let l={},d,h;for(let p of e){if(!_.isArray(p))throw TypeError("Object iterator must return a key-value pair");l[h=p[0]]=(d=l[h])?_.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}o(l,t)}else e!=null&&s(t,e,r);return this}get(e,t){if(e=oi(e),e){let r=_.findKey(this,e);if(r){let a=this[r];if(!t)return a;if(t===!0)return Hv(a);if(_.isFunction(t))return t.call(this,a,r);if(_.isRegExp(t))return t.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=oi(e),e){let r=_.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Vu(this,this[r],r,t)))}return!1}delete(e,t){let r=this,a=!1;function s(o){if(o=oi(o),o){let l=_.findKey(r,o);l&&(!t||Vu(r,r[l],l,t))&&(delete r[l],a=!0)}}return n(s,"deleteHeader"),_.isArray(e)?e.forEach(s):s(e),a}clear(e){let t=Object.keys(this),r=t.length,a=!1;for(;r--;){let s=t[r];(!e||Vu(this,this[s],s,e,!0))&&(delete this[s],a=!0)}return a}normalize(e){let t=this,r={};return _.forEach(this,(a,s)=>{let o=_.findKey(r,s);if(o){t[o]=Za(a),delete t[s];return}let l=e?qv(s):String(s).trim();l!==s&&delete t[s],t[l]=Za(a),r[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return _.forEach(this,(r,a)=>{r!=null&&r!==!1&&(t[a]=e&&_.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).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,...t){let r=new this(e);return t.forEach(a=>r.set(a)),r}static accessor(e){let r=(this[i_]=this[i_]={accessors:{}}).accessors,a=this.prototype;function s(o){let l=oi(o);r[l]||(Ev(a,o),r[l]=!0)}return n(s,"defineAccessor"),_.isArray(e)?e.forEach(s):s(e),this}};gr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(gr.prototype,({value:i},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:n(()=>i,"get"),set(r){this[t]=r}}});_.freezeMethods(gr);var ze=gr;function $u(i,e){let t=this||oc,r=e||t,a=ze.from(r.headers),s=r.data;return _.forEach(i,n(function(l){s=l.call(t,s,a.normalize(),e?e.status:void 0)},"transform")),a.normalize(),s}n($u,"transformData");function E_(i){return!!(i&&i.__CANCEL__)}n(E_,"isCancel");function wr(i,e,t){I.call(this,i??"canceled",I.ERR_CANCELED,e,t),this.name="CanceledError"}n(wr,"CanceledError");_.inherits(wr,I,{__CANCEL__:!0});function P_(i,e,t){let r=t.config.validateStatus;!t.status||!r||r(t.status)?i(t):e(new I("Request failed with status code "+t.status,[I.ERR_BAD_REQUEST,I.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}n(P_,"settle");function Pv(i){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return e&&e[1]||""}n(Pv,"parseProtocol");function Av(i,e){i=i||10;let t=new Array(i),r=new Array(i),a=0,s=0,o;return e=e!==void 0?e:1e3,n(function(d){let h=Date.now(),p=r[s];o||(o=h),t[a]=d,r[a]=h;let x=s,E=0;for(;x!==a;)E+=t[x++],x=x%i;if(a=(a+1)%i,a===s&&(s=(s+1)%i),h-o<e)return;let q=p&&h-p;return q?Math.round(E*1e3/q):void 0},"push")}n(Av,"speedometer");function Dv(i,e){let t=0,r=1e3/e,a,s,o=n((h,p=Date.now())=>{t=p,a=null,s&&(clearTimeout(s),s=null),i.apply(null,h)},"invoke");return[n((...h)=>{let p=Date.now(),x=p-t;x>=r?o(h,p):(a=h,s||(s=setTimeout(()=>{s=null,o(a)},r-x)))},"throttled"),n(()=>a&&o(a),"flush")]}n(Dv,"throttle");var es=n((i,e,t=3)=>{let r=0,a=Av(50,250);return Dv(s=>{let o=s.loaded,l=s.lengthComputable?s.total:void 0,d=o-r,h=a(d),p=o<=l;r=o;let x={loaded:o,total:l,progress:l?o/l:void 0,bytes:d,rate:h||void 0,estimated:h&&l&&p?(l-o)/h:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};i(x)},t)},"progressEventReducer"),n_=n((i,e)=>{let t=i!=null;return[r=>e[0]({lengthComputable:t,total:i,loaded:r}),e[1]]},"progressEventDecorator"),a_=n(i=>(...e)=>_.asap(()=>i(...e)),"asyncDecorator"),Iv=ve.hasStandardBrowserEnv?((i,e)=>t=>(t=new URL(t,ve.origin),i.protocol===t.protocol&&i.host===t.host&&(e||i.port===t.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,Tv=ve.hasStandardBrowserEnv?{write(i,e,t,r,a,s){let o=[i+"="+encodeURIComponent(e)];_.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),_.isString(r)&&o.push("path="+r),_.isString(a)&&o.push("domain="+a),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(i){let e=document.cookie.match(new RegExp("(^|;\\s*)("+i+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(i){this.write(i,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Rv(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}n(Rv,"isAbsoluteURL");function Uv(i,e){return e?i.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):i}n(Uv,"combineURLs");function A_(i,e,t){let r=!Rv(e);return i&&(r||t==!1)?Uv(i,e):e}n(A_,"buildFullPath");var s_=n(i=>i instanceof ze?{...i}:i,"headersToObject");function Jt(i,e){e=e||{};let t={};function r(h,p,x,E){return _.isPlainObject(h)&&_.isPlainObject(p)?_.merge.call({caseless:E},h,p):_.isPlainObject(p)?_.merge({},p):_.isArray(p)?p.slice():p}n(r,"getMergedValue");function a(h,p,x,E){if(_.isUndefined(p)){if(!_.isUndefined(h))return r(void 0,h,x,E)}else return r(h,p,x,E)}n(a,"mergeDeepProperties");function s(h,p){if(!_.isUndefined(p))return r(void 0,p)}n(s,"valueFromConfig2");function o(h,p){if(_.isUndefined(p)){if(!_.isUndefined(h))return r(void 0,h)}else return r(void 0,p)}n(o,"defaultToConfig2");function l(h,p,x){if(x in e)return r(h,p);if(x in i)return r(void 0,h)}n(l,"mergeDirectKeys");let d={url:s,method:s,data:s,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:l,headers:n((h,p,x)=>a(s_(h),s_(p),x,!0),"headers")};return _.forEach(Object.keys(Object.assign({},i,e)),n(function(p){let x=d[p]||a,E=x(i[p],e[p],p);_.isUndefined(E)&&x!==l||(t[p]=E)},"computeConfigValue")),t}n(Jt,"mergeConfig");var D_=n(i=>{let e=Jt({},i),{data:t,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:s,headers:o,auth:l}=e;e.headers=o=ze.from(o),e.url=H_(A_(e.baseURL,e.url,e.allowAbsoluteUrls),i.params,i.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(_.isFormData(t)){if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){let[h,...p]=d?d.split(";").map(x=>x.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...p].join("; "))}}if(ve.hasStandardBrowserEnv&&(r&&_.isFunction(r)&&(r=r(e)),r||r!==!1&&Iv(e.url))){let h=a&&s&&Tv.read(s);h&&o.set(a,h)}return e},"resolveConfig"),Bv=typeof XMLHttpRequest<"u",Ov=Bv&&function(i){return new Promise(n(function(t,r){let a=D_(i),s=a.data,o=ze.from(a.headers).normalize(),{responseType:l,onUploadProgress:d,onDownloadProgress:h}=a,p,x,E,q,w;function P(){q&&q(),w&&w(),a.cancelToken&&a.cancelToken.unsubscribe(p),a.signal&&a.signal.removeEventListener("abort",p)}n(P,"done");let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function B(){if(!v)return;let $=ze.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),xe={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:$,config:i,request:v};P_(n(function(he){t(he),P()},"_resolve"),n(function(he){r(he),P()},"_reject"),xe),v=null}n(B,"onloadend"),"onloadend"in v?v.onloadend=B:v.onreadystatechange=n(function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(B)},"handleLoad"),v.onabort=n(function(){v&&(r(new I("Request aborted",I.ECONNABORTED,i,v)),v=null)},"handleAbort"),v.onerror=n(function(){r(new I("Network Error",I.ERR_NETWORK,i,v)),v=null},"handleError"),v.ontimeout=n(function(){let z=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",xe=a.transitional||C_;a.timeoutErrorMessage&&(z=a.timeoutErrorMessage),r(new I(z,xe.clarifyTimeoutError?I.ETIMEDOUT:I.ECONNABORTED,i,v)),v=null},"handleTimeout"),s===void 0&&o.setContentType(null),"setRequestHeader"in v&&_.forEach(o.toJSON(),n(function(z,xe){v.setRequestHeader(xe,z)},"setRequestHeader")),_.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),l&&l!=="json"&&(v.responseType=a.responseType),h&&([E,w]=es(h,!0),v.addEventListener("progress",E)),d&&v.upload&&([x,q]=es(d),v.upload.addEventListener("progress",x),v.upload.addEventListener("loadend",q)),(a.cancelToken||a.signal)&&(p=n($=>{v&&(r(!$||$.type?new wr(null,i,v):$),v.abort(),v=null)},"onCanceled"),a.cancelToken&&a.cancelToken.subscribe(p),a.signal&&(a.signal.aborted?p():a.signal.addEventListener("abort",p)));let V=Pv(a.url);if(V&&ve.protocols.indexOf(V)===-1){r(new I("Unsupported protocol "+V+":",I.ERR_BAD_REQUEST,i));return}v.send(s||null)},"dispatchXhrRequest"))},jv=n((i,e)=>{let{length:t}=i=i?i.filter(Boolean):[];if(e||t){let r=new AbortController,a,s=n(function(h){if(!a){a=!0,l();let p=h instanceof Error?h:this.reason;r.abort(p instanceof I?p:new wr(p instanceof Error?p.message:p))}},"onabort"),o=e&&setTimeout(()=>{o=null,s(new I(`timeout ${e} of ms exceeded`,I.ETIMEDOUT))},e),l=n(()=>{i&&(o&&clearTimeout(o),o=null,i.forEach(h=>{h.unsubscribe?h.unsubscribe(s):h.removeEventListener("abort",s)}),i=null)},"unsubscribe");i.forEach(h=>h.addEventListener("abort",s));let{signal:d}=r;return d.unsubscribe=()=>_.asap(l),d}},"composeSignals"),kv=jv,Mv=n(function*(i,e){let t=i.byteLength;if(!e||t<e){yield i;return}let r=0,a;for(;r<t;)a=r+e,yield i.slice(r,a),r=a},"streamChunk"),Lv=n(async function*(i,e){for await(let t of Fv(i))yield*Mv(t,e)},"readBytes"),Fv=n(async function*(i){if(i[Symbol.asyncIterator]){yield*i;return}let e=i.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},"readStream"),o_=n((i,e,t,r)=>{let a=Lv(i,e),s=0,o,l=n(d=>{o||(o=!0,r&&r(d))},"_onFinish");return new ReadableStream({async pull(d){try{let{done:h,value:p}=await a.next();if(h){l(),d.close();return}let x=p.byteLength;if(t){let E=s+=x;t(E)}d.enqueue(new Uint8Array(p))}catch(h){throw l(h),h}},cancel(d){return l(d),a.return()}},{highWaterMark:2})},"trackStream"),os=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",I_=os&&typeof ReadableStream=="function",Nv=os&&(typeof TextEncoder=="function"?(i=>e=>i.encode(e))(new TextEncoder):async i=>new Uint8Array(await new Response(i).arrayBuffer())),T_=n((i,...e)=>{try{return!!i(...e)}catch{return!1}},"test"),Qv=I_&&T_(()=>{let i=!1,e=new Request(ve.origin,{body:new ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!e}),l_=64*1024,Yu=I_&&T_(()=>_.isReadableStream(new Response("").body)),ts={stream:Yu&&(i=>i.body)};os&&(i=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ts[e]&&(ts[e]=_.isFunction(i[e])?t=>t[e]():(t,r)=>{throw new I(`Response type '${e}' is not supported`,I.ERR_NOT_SUPPORT,r)})})})(new Response);var Gv=n(async i=>{if(i==null)return 0;if(_.isBlob(i))return i.size;if(_.isSpecCompliantForm(i))return(await new Request(ve.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(_.isArrayBufferView(i)||_.isArrayBuffer(i))return i.byteLength;if(_.isURLSearchParams(i)&&(i=i+""),_.isString(i))return(await Nv(i)).byteLength},"getBodyLength"),Wv=n(async(i,e)=>{let t=_.toFiniteNumber(i.getContentLength());return t??Gv(e)},"resolveBodyLength"),Vv=os&&(async i=>{let{url:e,method:t,data:r,signal:a,cancelToken:s,timeout:o,onDownloadProgress:l,onUploadProgress:d,responseType:h,headers:p,withCredentials:x="same-origin",fetchOptions:E}=D_(i);h=h?(h+"").toLowerCase():"text";let q=kv([a,s&&s.toAbortSignal()],o),w,P=q&&q.unsubscribe&&(()=>{q.unsubscribe()}),v;try{if(d&&Qv&&t!=="get"&&t!=="head"&&(v=await Wv(p,r))!==0){let xe=new Request(e,{method:"POST",body:r,duplex:"half"}),it;if(_.isFormData(r)&&(it=xe.headers.get("content-type"))&&p.setContentType(it),xe.body){let[he,_r]=n_(v,es(a_(d)));r=o_(xe.body,l_,he,_r)}}_.isString(x)||(x=x?"include":"omit");let B="credentials"in Request.prototype;w=new Request(e,{...E,signal:q,method:t.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:B?x:void 0});let V=await fetch(w),$=Yu&&(h==="stream"||h==="response");if(Yu&&(l||$&&P)){let xe={};["status","statusText","headers"].forEach(yr=>{xe[yr]=V[yr]});let it=_.toFiniteNumber(V.headers.get("content-length")),[he,_r]=l&&n_(it,es(a_(l),!0))||[];V=new Response(o_(V.body,l_,he,()=>{_r&&_r(),P&&P()}),xe)}h=h||"text";let z=await ts[_.findKey(ts,h)||"text"](V,i);return!$&&P&&P(),await new Promise((xe,it)=>{P_(xe,it,{data:z,headers:ze.from(V.headers),status:V.status,statusText:V.statusText,config:i,request:w})})}catch(B){throw P&&P(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new I("Network Error",I.ERR_NETWORK,i,w),{cause:B.cause||B}):I.from(B,B&&B.code,i,w)}}),ec={http:sv,xhr:Ov,fetch:Vv};_.forEach(ec,(i,e)=>{if(i){try{Object.defineProperty(i,"name",{value:e})}catch{}Object.defineProperty(i,"adapterName",{value:e})}});var u_=n(i=>`- ${i}`,"renderReason"),$v=n(i=>_.isFunction(i)||i===null||i===!1,"isResolvedHandle"),R_={getAdapter:n(i=>{i=_.isArray(i)?i:[i];let{length:e}=i,t,r,a={};for(let s=0;s<e;s++){t=i[s];let o;if(r=t,!$v(t)&&(r=ec[(o=String(t)).toLowerCase()],r===void 0))throw new I(`Unknown adapter '${o}'`);if(r)break;a[o||"#"+s]=r}if(!r){let s=Object.entries(a).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build")),o=e?s.length>1?`since : `+s.map(u_).join(` `):" "+u_(s[0]):"as no adapter specified";throw new I("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},"getAdapter"),adapters:ec};function zu(i){if(i.cancelToken&&i.cancelToken.throwIfRequested(),i.signal&&i.signal.aborted)throw new wr(null,i)}n(zu,"throwIfCancellationRequested");function c_(i){return zu(i),i.headers=ze.from(i.headers),i.data=$u.call(i,i.transformRequest),["post","put","patch"].indexOf(i.method)!==-1&&i.headers.setContentType("application/x-www-form-urlencoded",!1),R_.getAdapter(i.adapter||oc.adapter)(i).then(n(function(r){return zu(i),r.data=$u.call(i,i.transformResponse,r),r.headers=ze.from(r.headers),r},"onAdapterResolution"),n(function(r){return E_(r)||(zu(i),r&&r.response&&(r.response.data=$u.call(i,i.transformResponse,r.response),r.response.headers=ze.from(r.response.headers))),Promise.reject(r)},"onAdapterRejection"))}n(c_,"dispatchRequest");var U_="1.9.0",ls={};["object","boolean","number","function","string","symbol"].forEach((i,e)=>{ls[i]=n(function(r){return typeof r===i||"a"+(e<1?"n ":" ")+i},"validator")});var d_={};ls.transitional=n(function(e,t,r){function a(s,o){return"[Axios v"+U_+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return n(a,"formatMessage"),(s,o,l)=>{if(e===!1)throw new I(a(o," has been removed"+(t?" in "+t:"")),I.ERR_DEPRECATED);return t&&!d_[o]&&(d_[o]=!0,console.warn(a(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,l):!0}},"transitional");ls.spelling=n(function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)},"spelling");function zv(i,e,t){if(typeof i!="object")throw new I("options must be an object",I.ERR_BAD_OPTION_VALUE);let r=Object.keys(i),a=r.length;for(;a-- >0;){let s=r[a],o=e[s];if(o){let l=i[s],d=l===void 0||o(l,s,i);if(d!==!0)throw new I("option "+s+" must be "+d,I.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new I("Unknown option "+s,I.ERR_BAD_OPTION)}}n(zv,"assertOptions");var Xa={assertOptions:zv,validators:ls},nt=Xa.validators,br=class{static{n(this,"Axios")}constructor(e){this.defaults=e||{},this.interceptors={request:new r_,response:new r_}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;let s=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+s):r.stack=s}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Jt(this.defaults,t);let{transitional:r,paramsSerializer:a,headers:s}=t;r!==void 0&&Xa.assertOptions(r,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),a!=null&&(_.isFunction(a)?t.paramsSerializer={serialize:a}:Xa.assertOptions(a,{encode:nt.function,serialize:nt.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Xa.assertOptions(t,{baseUrl:nt.spelling("baseURL"),withXsrfToken:nt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&_.merge(s.common,s[t.method]);s&&_.forEach(["delete","get","head","post","put","patch","common"],w=>{delete s[w]}),t.headers=ze.concat(o,s);let l=[],d=!0;this.interceptors.request.forEach(n(function(P){typeof P.runWhen=="function"&&P.runWhen(t)===!1||(d=d&&P.synchronous,l.unshift(P.fulfilled,P.rejected))},"unshiftRequestInterceptors"));let h=[];this.interceptors.response.forEach(n(function(P){h.push(P.fulfilled,P.rejected)},"pushResponseInterceptors"));let p,x=0,E;if(!d){let w=[c_.bind(this),void 0];for(w.unshift.apply(w,l),w.push.apply(w,h),E=w.length,p=Promise.resolve(t);x<E;)p=p.then(w[x++],w[x++]);return p}E=l.length;let q=t;for(x=0;x<E;){let w=l[x++],P=l[x++];try{q=w(q)}catch(v){P.call(this,v);break}}try{p=c_.call(this,q)}catch(w){return Promise.reject(w)}for(x=0,E=h.length;x<E;)p=p.then(h[x++],h[x++]);return p}getUri(e){e=Jt(this.defaults,e);let t=A_(e.baseURL,e.url,e.allowAbsoluteUrls);return H_(t,e.params,e.paramsSerializer)}};_.forEach(["delete","get","head","options"],n(function(e){br.prototype[e]=function(t,r){return this.request(Jt(r||{},{method:e,url:t,data:(r||{}).data}))}},"forEachMethodNoData"));_.forEach(["post","put","patch"],n(function(e){function t(r){return n(function(s,o,l){return this.request(Jt(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))},"httpMethod")}n(t,"generateHTTPMethod"),br.prototype[e]=t(),br.prototype[e+"Form"]=t(!0)},"forEachMethodWithData"));var Ya=br,tc=class i{static{n(this,"CancelToken")}constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(n(function(s){t=s},"promiseExecutor"));let r=this;this.promise.then(a=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](a);r._listeners=null}),this.promise.then=a=>{let s,o=new Promise(l=>{r.subscribe(l),s=l}).then(a);return o.cancel=n(function(){r.unsubscribe(s)},"reject"),o},e(n(function(s,o,l){r.reason||(r.reason=new wr(s,o,l),t(r.reason))},"cancel"))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=n(r=>{e.abort(r)},"abort");return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new i(n(function(a){e=a},"executor")),cancel:e}}},Kv=tc;function Jv(i){return n(function(t){return i.apply(null,t)},"wrap")}n(Jv,"spread");function Zv(i){return _.isObject(i)&&i.isAxiosError===!0}n(Zv,"isAxiosError");var rc={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(rc).forEach(([i,e])=>{rc[e]=i});var Xv=rc;function B_(i){let e=new Ya(i),t=h_(Ya.prototype.request,e);return _.extend(t,Ya.prototype,e,{allOwnKeys:!0}),_.extend(t,e,null,{allOwnKeys:!0}),t.create=n(function(a){return B_(Jt(i,a))},"create"),t}n(B_,"createInstance");var ie=B_(oc);ie.Axios=Ya;ie.CanceledError=wr;ie.CancelToken=Kv;ie.isCancel=E_;ie.VERSION=U_;ie.toFormData=ss;ie.AxiosError=I;ie.Cancel=ie.CanceledError;ie.all=n(function(e){return Promise.all(e)},"all");ie.spread=Jv;ie.isAxiosError=Zv;ie.mergeConfig=Jt;ie.AxiosHeaders=ze;ie.formToJSON=i=>q_(_.isHTMLForm(i)?new FormData(i):i);ie.getAdapter=R_.getAdapter;ie.HttpStatusCode=Xv;ie.default=ie;O_.exports=ie});var y={};dw(y,{__addDisposableResource:()=>ly,__assign:()=>us,__asyncDelegator:()=>ey,__asyncGenerator:()=>Y_,__asyncValues:()=>ty,__await:()=>vr,__awaiter:()=>$_,__classPrivateFieldGet:()=>ay,__classPrivateFieldIn:()=>oy,__classPrivateFieldSet:()=>sy,__createBinding:()=>ds,__decorate:()=>L_,__disposeResources:()=>uy,__esDecorate:()=>N_,__exportStar:()=>K_,__extends:()=>k_,__generator:()=>z_,__importDefault:()=>ny,__importStar:()=>iy,__makeTemplateObject:()=>ry,__metadata:()=>V_,__param:()=>F_,__propKey:()=>G_,__read:()=>cc,__rest:()=>M_,__rewriteRelativeImportExtension:()=>cy,__runInitializers:()=>Q_,__setFunctionName:()=>W_,__spread:()=>J_,__spreadArray:()=>X_,__spreadArrays:()=>Z_,__values:()=>cs,default:()=>tS});function k_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");lc(i,e);function t(){this.constructor=i}n(t,"__"),i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function M_(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(i);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(i,r[a])&&(t[r[a]]=i[r[a]]);return t}function L_(i,e,t,r){var a=arguments.length,s=a<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,r);else for(var l=i.length-1;l>=0;l--)(o=i[l])&&(s=(a<3?o(s):a>3?o(e,t,s):o(e,t))||s);return a>3&&s&&Object.defineProperty(e,t,s),s}function F_(i,e){return function(t,r){e(t,r,i)}}function N_(i,e,t,r,a,s){function o(B){if(B!==void 0&&typeof B!="function")throw new TypeError("Function expected");return B}n(o,"accept");for(var l=r.kind,d=l==="getter"?"get":l==="setter"?"set":"value",h=!e&&i?r.static?i:i.prototype:null,p=e||(h?Object.getOwnPropertyDescriptor(h,r.name):{}),x,E=!1,q=t.length-1;q>=0;q--){var w={};for(var P in r)w[P]=P==="access"?{}:r[P];for(var P in r.access)w.access[P]=r.access[P];w.addInitializer=function(B){if(E)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(B||null))};var v=(0,t[q])(l==="accessor"?{get:p.get,set:p.set}:p[d],w);if(l==="accessor"){if(v===void 0)continue;if(v===null||typeof v!="object")throw new TypeError("Object expected");(x=o(v.get))&&(p.get=x),(x=o(v.set))&&(p.set=x),(x=o(v.init))&&a.unshift(x)}else(x=o(v))&&(l==="field"?a.unshift(x):p[d]=x)}h&&Object.defineProperty(h,r.name,p),E=!0}function Q_(i,e,t){for(var r=arguments.length>2,a=0;a<e.length;a++)t=r?e[a].call(i,t):e[a].call(i);return r?t:void 0}function G_(i){return typeof i=="symbol"?i:"".concat(i)}function W_(i,e,t){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(i,"name",{configurable:!0,value:t?"".concat(t," ",e):e})}function V_(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}function $_(i,e,t,r){function a(s){return s instanceof t?s:new t(function(o){o(s)})}return n(a,"adopt"),new(t||(t=Promise))(function(s,o){function l(p){try{h(r.next(p))}catch(x){o(x)}}n(l,"fulfilled");function d(p){try{h(r.throw(p))}catch(x){o(x)}}n(d,"rejected");function h(p){p.done?s(p.value):a(p.value).then(l,d)}n(h,"step"),h((r=r.apply(i,e||[])).next())})}function z_(i,e){var t={label:0,sent:n(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},r,a,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(h){return function(p){return d([h,p])}}function d(h){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(t=0)),t;)try{if(r=1,a&&(s=h[0]&2?a.return:h[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,h[1])).done)return s;switch(a=0,s&&(h=[h[0]&2,s.value]),h[0]){case 0:case 1:s=h;break;case 4:return t.label++,{value:h[1],done:!1};case 5:t.label++,a=h[1],h=[0];continue;case 7:h=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1]<s[3])){t.label=h[1];break}if(h[0]===6&&t.label<s[1]){t.label=s[1],s=h;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(h);break}s[2]&&t.ops.pop(),t.trys.pop();continue}h=e.call(i,t)}catch(p){h=[6,p],a=0}finally{r=s=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function K_(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ds(e,i,t)}function cs(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],r=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:n(function(){return i&&r>=i.length&&(i=void 0),{value:i&&i[r++],done:!i}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function cc(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var r=t.call(i),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=r.next()).done;)s.push(a.value)}catch(l){o={error:l}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return s}function J_(){for(var i=[],e=0;e<arguments.length;e++)i=i.concat(cc(arguments[e]));return i}function Z_(){for(var i=0,e=0,t=arguments.length;e<t;e++)i+=arguments[e].length;for(var r=Array(i),a=0,e=0;e<t;e++)for(var s=arguments[e],o=0,l=s.length;o<l;o++,a++)r[a]=s[o];return r}function X_(i,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,s;r<a;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return i.concat(s||Array.prototype.slice.call(e))}function vr(i){return this instanceof vr?(this.v=i,this):new vr(i)}function Y_(i,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t.apply(i,e||[]),a,s=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator