@articles-media/articles-dev-box 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ "use strict";const x=require("react");function Qt(e,t){return function(){return e.apply(t,arguments)}}const{toString:In}=Object.prototype,{getPrototypeOf:ht}=Object,{iterator:Be,toStringTag:Zt}=Symbol,je=(e=>t=>{const n=In.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),X=e=>(e=e.toLowerCase(),t=>je(t)===e),qe=e=>t=>typeof t===e,{isArray:we}=Array,ye=qe("undefined");function Oe(e){return e!==null&&!ye(e)&&e.constructor!==null&&!ye(e.constructor)&&q(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const en=X("ArrayBuffer");function kn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&en(e.buffer),t}const Bn=qe("string"),q=qe("function"),tn=qe("number"),Te=e=>e!==null&&typeof e=="object",jn=e=>e===!0||e===!1,ve=e=>{if(je(e)!=="object")return!1;const t=ht(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Zt in e)&&!(Be in e)},qn=e=>{if(!Te(e)||Oe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Mn=X("Date"),Hn=X("File"),Vn=X("Blob"),$n=X("FileList"),Wn=e=>Te(e)&&q(e.pipe),zn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||q(e.append)&&((t=je(e))==="formdata"||t==="object"&&q(e.toString)&&e.toString()==="[object FormData]"))},Jn=X("URLSearchParams"),[Kn,Gn,Xn,Yn]=["ReadableStream","Request","Response","Headers"].map(X),Qn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ae(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),we(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Oe(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function nn(e,t){if(Oe(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const fe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rn=e=>!ye(e)&&e!==fe;function nt(){const{caseless:e,skipUndefined:t}=rn(this)&&this||{},n={},r=(s,i)=>{const o=e&&nn(n,i)||i;ve(n[o])&&ve(s)?n[o]=nt(n[o],s):ve(s)?n[o]=nt({},s):we(s)?n[o]=s.slice():(!t||!ye(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Ae(arguments[s],r);return n}const Zn=(e,t,n,{allOwnKeys:r}={})=>(Ae(t,(s,i)=>{n&&q(s)?e[i]=Qt(s,n):e[i]=s},{allOwnKeys:r}),e),er=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},nr=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&ht(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},sr=e=>{if(!e)return null;if(we(e))return e;let t=e.length;if(!tn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},or=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ht(Uint8Array)),ir=(e,t)=>{const r=(e&&e[Be]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},ar=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cr=X("HTMLFormElement"),ur=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),_t=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),lr=X("RegExp"),sn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ae(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},fr=e=>{sn(e,(t,n)=>{if(q(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(q(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dr=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return we(e)?r(e):r(String(e).split(t)),n},pr=()=>{},hr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mr(e){return!!(e&&q(e.append)&&e[Zt]==="FormData"&&e[Be])}const Er=e=>{const t=new Array(10),n=(r,s)=>{if(Te(r)){if(t.indexOf(r)>=0)return;if(Oe(r))return r;if(!("toJSON"in r)){t[s]=r;const i=we(r)?[]:{};return Ae(r,(o,a)=>{const d=n(o,s+1);!ye(d)&&(i[a]=d)}),t[s]=void 0,i}}return r};return n(e,0)},yr=X("AsyncFunction"),wr=e=>e&&(Te(e)||q(e))&&q(e.then)&&q(e.catch),on=((e,t)=>e?setImmediate:t?((n,r)=>(fe.addEventListener("message",({source:s,data:i})=>{s===fe&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),fe.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",q(fe.postMessage)),Sr=typeof queueMicrotask<"u"?queueMicrotask.bind(fe):typeof process<"u"&&process.nextTick||on,br=e=>e!=null&&q(e[Be]),c={isArray:we,isArrayBuffer:en,isBuffer:Oe,isFormData:zn,isArrayBufferView:kn,isString:Bn,isNumber:tn,isBoolean:jn,isObject:Te,isPlainObject:ve,isEmptyObject:qn,isReadableStream:Kn,isRequest:Gn,isResponse:Xn,isHeaders:Yn,isUndefined:ye,isDate:Mn,isFile:Hn,isBlob:Vn,isRegExp:lr,isFunction:q,isStream:Wn,isURLSearchParams:Jn,isTypedArray:or,isFileList:$n,forEach:Ae,merge:nt,extend:Zn,trim:Qn,stripBOM:er,inherits:tr,toFlatObject:nr,kindOf:je,kindOfTest:X,endsWith:rr,toArray:sr,forEachEntry:ir,matchAll:ar,isHTMLForm:cr,hasOwnProperty:_t,hasOwnProp:_t,reduceDescriptors:sn,freezeMethods:fr,toObjectSet:dr,toCamelCase:ur,noop:pr,toFiniteNumber:hr,findKey:nn,global:fe,isContextDefined:rn,isSpecCompliantForm:mr,toJSONObject:Er,isAsyncFn:yr,isThenable:wr,setImmediate:on,asap:Sr,isIterable:br};function S(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}c.inherits(S,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:c.toJSONObject(this.config),code:this.code,status:this.status}}});const an=S.prototype,cn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{cn[e]={value:e}});Object.defineProperties(S,cn);Object.defineProperty(an,"isAxiosError",{value:!0});S.from=(e,t,n,r,s,i)=>{const o=Object.create(an);c.toFlatObject(e,o,function(l){return l!==Error.prototype},f=>f!=="isAxiosError");const a=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return S.call(o,a,d,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const gr=null;function rt(e){return c.isPlainObject(e)||c.isArray(e)}function un(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Ct(e,t,n){return e?e.concat(t).map(function(s,i){return s=un(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function Rr(e){return c.isArray(e)&&!e.some(rt)}const Or=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Me(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,h){return!c.isUndefined(h[m])});const r=n.metaTokens,s=n.visitor||l,i=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function f(u){if(u===null)return"";if(c.isDate(u))return u.toISOString();if(c.isBoolean(u))return u.toString();if(!d&&c.isBlob(u))throw new S("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(u)||c.isTypedArray(u)?d&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,m,h){let b=u;if(u&&!h&&typeof u=="object"){if(c.endsWith(m,"{}"))m=r?m:m.slice(0,-2),u=JSON.stringify(u);else if(c.isArray(u)&&Rr(u)||(c.isFileList(u)||c.endsWith(m,"[]"))&&(b=c.toArray(u)))return m=un(m),b.forEach(function(A,D){!(c.isUndefined(A)||A===null)&&t.append(o===!0?Ct([m],D,i):o===null?m:m+"[]",f(A))}),!1}return rt(u)?!0:(t.append(Ct(h,m,i),f(u)),!1)}const p=[],E=Object.assign(Or,{defaultVisitor:l,convertValue:f,isVisitable:rt});function y(u,m){if(!c.isUndefined(u)){if(p.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(u),c.forEach(u,function(b,w){(!(c.isUndefined(b)||b===null)&&s.call(t,b,c.isString(w)?w.trim():w,m,E))===!0&&y(b,m?m.concat(w):[w])}),p.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return y(e),t}function xt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function mt(e,t){this._pairs=[],e&&Me(e,this,t)}const ln=mt.prototype;ln.append=function(t,n){this._pairs.push([t,n])};ln.toString=function(t){const n=t?function(r){return t.call(this,r,xt)}:xt;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Tr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function fn(e,t,n){if(!t)return e;const r=n&&n.encode||Tr;c.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=c.isURLSearchParams(t)?t.toString():new mt(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Dt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(r){r!==null&&t(r)})}}const dn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ar=typeof URLSearchParams<"u"?URLSearchParams:mt,_r=typeof FormData<"u"?FormData:null,Cr=typeof Blob<"u"?Blob:null,xr={isBrowser:!0,classes:{URLSearchParams:Ar,FormData:_r,Blob:Cr},protocols:["http","https","file","blob","url","data"]},Et=typeof window<"u"&&typeof document<"u",st=typeof navigator=="object"&&navigator||void 0,Dr=Et&&(!st||["ReactNative","NativeScript","NS"].indexOf(st.product)<0),Lr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Nr=Et&&window.location.href||"http://localhost",Fr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Et,hasStandardBrowserEnv:Dr,hasStandardBrowserWebWorkerEnv:Lr,navigator:st,origin:Nr},Symbol.toStringTag,{value:"Module"})),k={...Fr,...xr};function Pr(e,t){return Me(e,new k.classes.URLSearchParams,{visitor:function(n,r,s,i){return k.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function vr(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ur(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function pn(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),d=i>=n.length;return o=!o&&c.isArray(s)?s.length:o,d?(c.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!c.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&c.isArray(s[o])&&(s[o]=Ur(s[o])),!a)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(r,s)=>{t(vr(r),s,n,0)}),n}return null}function Ir(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _e={transitional:dn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=c.isObject(t);if(i&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(pn(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Pr(t,this.formSerializer).toString();if((a=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Me(a?{"files[]":t}:t,d&&new d,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Ir(t)):t}],transformResponse:[function(t){const n=this.transitional||_e.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?S.from(a,S.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:k.classes.FormData,Blob:k.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{_e.headers[e]={}});const kr=c.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"]),Br=e=>{const t={};let n,r,s;return e&&e.split(`
2
+ `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&kr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Lt=Symbol("internals");function Re(e){return e&&String(e).trim().toLowerCase()}function Ue(e){return e===!1||e==null?e:c.isArray(e)?e.map(Ue):String(e)}function jr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const qr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function We(e,t,n,r,s){if(c.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!c.isString(t)){if(c.isString(r))return t.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(t)}}function Mr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Hr(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let M=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,d,f){const l=Re(d);if(!l)throw new Error("header name must be a non-empty string");const p=c.findKey(s,l);(!p||s[p]===void 0||f===!0||f===void 0&&s[p]!==!1)&&(s[p||d]=Ue(a))}const o=(a,d)=>c.forEach(a,(f,l)=>i(f,l,d));if(c.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(c.isString(t)&&(t=t.trim())&&!qr(t))o(Br(t),n);else if(c.isObject(t)&&c.isIterable(t)){let a={},d,f;for(const l of t){if(!c.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[f=l[0]]=(d=a[f])?c.isArray(d)?[...d,l[1]]:[d,l[1]]:l[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Re(t),t){const r=c.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return jr(s);if(c.isFunction(n))return n.call(this,s,r);if(c.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Re(t),t){const r=c.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||We(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Re(o),o){const a=c.findKey(r,o);a&&(!n||We(r,r[a],a,n))&&(delete r[a],s=!0)}}return c.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||We(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return c.forEach(this,(s,i)=>{const o=c.findKey(r,i);if(o){n[o]=Ue(s),delete n[i];return}const a=t?Mr(i):String(i).trim();a!==i&&delete n[i],n[a]=Ue(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Lt]=this[Lt]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Re(o);r[a]||(Hr(s,o),r[a]=!0)}return c.isArray(t)?t.forEach(i):i(t),this}};M.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(M.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});c.freezeMethods(M);function ze(e,t){const n=this||_e,r=t||n,s=M.from(r.headers);let i=r.data;return c.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function hn(e){return!!(e&&e.__CANCEL__)}function Se(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(Se,S,{__CANCEL__:!0});function mn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Vr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function $r(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),l=r[i];o||(o=f),n[s]=d,r[s]=f;let p=i,E=0;for(;p!==s;)E+=n[p++],p=p%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),f-o<t)return;const y=l&&f-l;return y?Math.round(E*1e3/y):void 0}}function Wr(e,t){let n=0,r=1e3/t,s,i;const o=(f,l=Date.now())=>{n=l,s=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{const l=Date.now(),p=l-n;p>=r?o(f,l):(s=f,i||(i=setTimeout(()=>{i=null,o(s)},r-p)))},()=>s&&o(s)]}const ke=(e,t,n=3)=>{let r=0;const s=$r(50,250);return Wr(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,d=o-r,f=s(d),l=o<=a;r=o;const p={loaded:o,total:a,progress:a?o/a:void 0,bytes:d,rate:f||void 0,estimated:f&&a&&l?(a-o)/f:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(p)},n)},Nt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ft=e=>(...t)=>c.asap(()=>e(...t)),zr=k.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,k.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(k.origin),k.navigator&&/(msie|trident)/i.test(k.navigator.userAgent)):()=>!0,Jr=k.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];c.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),c.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Kr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function En(e,t,n){let r=!Kr(t);return e&&(r||n==!1)?Gr(e,t):t}const Pt=e=>e instanceof M?{...e}:e;function pe(e,t){t=t||{};const n={};function r(f,l,p,E){return c.isPlainObject(f)&&c.isPlainObject(l)?c.merge.call({caseless:E},f,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}function s(f,l,p,E){if(c.isUndefined(l)){if(!c.isUndefined(f))return r(void 0,f,p,E)}else return r(f,l,p,E)}function i(f,l){if(!c.isUndefined(l))return r(void 0,l)}function o(f,l){if(c.isUndefined(l)){if(!c.isUndefined(f))return r(void 0,f)}else return r(void 0,l)}function a(f,l,p){if(p in t)return r(f,l);if(p in e)return r(void 0,f)}const d={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(f,l,p)=>s(Pt(f),Pt(l),p,!0)};return c.forEach(Object.keys({...e,...t}),function(l){const p=d[l]||s,E=p(e[l],t[l],l);c.isUndefined(E)&&p!==a||(n[l]=E)}),n}const yn=e=>{const t=pe({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=M.from(o),t.url=fn(En(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(n)){if(k.hasStandardBrowserEnv||k.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(c.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([l,p])=>{f.includes(l.toLowerCase())&&o.set(l,p)})}}if(k.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(t)),r||r!==!1&&zr(t.url))){const d=s&&i&&Jr.read(i);d&&o.set(s,d)}return t},Xr=typeof XMLHttpRequest<"u",Yr=Xr&&function(e){return new Promise(function(n,r){const s=yn(e);let i=s.data;const o=M.from(s.headers).normalize();let{responseType:a,onUploadProgress:d,onDownloadProgress:f}=s,l,p,E,y,u;function m(){y&&y(),u&&u(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function b(){if(!h)return;const A=M.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:A,config:e,request:h};mn(function(_){n(_),m()},function(_){r(_),m()},R),h=null}"onloadend"in h?h.onloadend=b:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(b)},h.onabort=function(){h&&(r(new S("Request aborted",S.ECONNABORTED,e,h)),h=null)},h.onerror=function(D){const R=D&&D.message?D.message:"Network Error",v=new S(R,S.ERR_NETWORK,e,h);v.event=D||null,r(v),h=null},h.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||dn;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new S(D,R.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,e,h)),h=null},i===void 0&&o.setContentType(null),"setRequestHeader"in h&&c.forEach(o.toJSON(),function(D,R){h.setRequestHeader(R,D)}),c.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),a&&a!=="json"&&(h.responseType=s.responseType),f&&([E,u]=ke(f,!0),h.addEventListener("progress",E)),d&&h.upload&&([p,y]=ke(d),h.upload.addEventListener("progress",p),h.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(l=A=>{h&&(r(!A||A.type?new Se(null,e,h):A),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const w=Vr(s.url);if(w&&k.protocols.indexOf(w)===-1){r(new S("Unsupported protocol "+w+":",S.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Qr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(f){if(!s){s=!0,a();const l=f instanceof Error?f:this.reason;r.abort(l instanceof S?l:new Se(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,i(new S(`timeout ${t} of ms exceeded`,S.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>f.addEventListener("abort",i));const{signal:d}=r;return d.unsubscribe=()=>c.asap(a),d}},Zr=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},es=async function*(e,t){for await(const n of ts(e))yield*Zr(n,t)},ts=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},vt=(e,t,n,r)=>{const s=es(e,t);let i=0,o,a=d=>{o||(o=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:l}=await s.next();if(f){a(),d.close();return}let p=l.byteLength;if(n){let E=i+=p;n(E)}d.enqueue(new Uint8Array(l))}catch(f){throw a(f),f}},cancel(d){return a(d),s.return()}},{highWaterMark:2})},Ut=64*1024,{isFunction:Le}=c,ns=(({Request:e,Response:t})=>({Request:e,Response:t}))(c.global),{ReadableStream:It,TextEncoder:kt}=c.global,Bt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},rs=e=>{e=c.merge.call({skipUndefined:!0},ns,e);const{fetch:t,Request:n,Response:r}=e,s=t?Le(t):typeof fetch=="function",i=Le(n),o=Le(r);if(!s)return!1;const a=s&&Le(It),d=s&&(typeof kt=="function"?(u=>m=>u.encode(m))(new kt):async u=>new Uint8Array(await new n(u).arrayBuffer())),f=i&&a&&Bt(()=>{let u=!1;const m=new n(k.origin,{body:new It,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!m}),l=o&&a&&Bt(()=>c.isReadableStream(new r("").body)),p={stream:l&&(u=>u.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!p[u]&&(p[u]=(m,h)=>{let b=m&&m[u];if(b)return b.call(m);throw new S(`Response type '${u}' is not supported`,S.ERR_NOT_SUPPORT,h)})});const E=async u=>{if(u==null)return 0;if(c.isBlob(u))return u.size;if(c.isSpecCompliantForm(u))return(await new n(k.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(c.isArrayBufferView(u)||c.isArrayBuffer(u))return u.byteLength;if(c.isURLSearchParams(u)&&(u=u+""),c.isString(u))return(await d(u)).byteLength},y=async(u,m)=>{const h=c.toFiniteNumber(u.getContentLength());return h??E(m)};return async u=>{let{url:m,method:h,data:b,signal:w,cancelToken:A,timeout:D,onDownloadProgress:R,onUploadProgress:v,responseType:_,headers:Y,withCredentials:O="same-origin",fetchOptions:te}=yn(u),H=t||fetch;_=_?(_+"").toLowerCase():"text";let z=Qr([w,A&&A.toAbortSignal()],D),V=null;const P=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let ne;try{if(v&&f&&h!=="get"&&h!=="head"&&(ne=await y(Y,b))!==0){let Q=new n(m,{method:"POST",body:b,duplex:"half"}),$;if(c.isFormData(b)&&($=Q.headers.get("content-type"))&&Y.setContentType($),Q.body){const[K,se]=Nt(ne,ke(Ft(v)));b=vt(Q.body,Ut,K,se)}}c.isString(O)||(O=O?"include":"omit");const B=i&&"credentials"in n.prototype,be={...te,signal:z,method:h.toUpperCase(),headers:Y.normalize().toJSON(),body:b,duplex:"half",credentials:B?O:void 0};V=i&&new n(m,be);let J=await(i?H(V,te):H(m,be));const re=l&&(_==="stream"||_==="response");if(l&&(R||re&&P)){const Q={};["status","statusText","headers"].forEach(he=>{Q[he]=J[he]});const $=c.toFiniteNumber(J.headers.get("content-length")),[K,se]=R&&Nt($,ke(Ft(R),!0))||[];J=new r(vt(J.body,Ut,K,()=>{se&&se(),P&&P()}),Q)}_=_||"text";let xe=await p[c.findKey(p,_)||"text"](J,u);return!re&&P&&P(),await new Promise((Q,$)=>{mn(Q,$,{data:xe,headers:M.from(J.headers),status:J.status,statusText:J.statusText,config:u,request:V})})}catch(B){throw P&&P(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,u,V),{cause:B.cause||B}):S.from(B,B&&B.code,u,V)}}},ss=new Map,wn=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,d,f,l=ss;for(;a--;)d=i[a],f=l.get(d),f===void 0&&l.set(d,f=a?new Map:rs(t)),l=f;return f};wn();const yt={http:gr,xhr:Yr,fetch:{get:wn}};c.forEach(yt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jt=e=>`- ${e}`,os=e=>c.isFunction(e)||e===null||e===!1;function is(e,t){e=c.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let a;if(s=r,!os(r)&&(s=yt[(a=String(r)).toLowerCase()],s===void 0))throw new S(`Unknown adapter '${a}'`);if(s&&(c.isFunction(s)||(s=s.get(t))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
4
+ `+o.map(jt).join(`
5
+ `):" "+jt(o[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const Sn={getAdapter:is,adapters:yt};function Je(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Se(null,e)}function qt(e){return Je(e),e.headers=M.from(e.headers),e.data=ze.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Sn.getAdapter(e.adapter||_e.adapter,e)(e).then(function(r){return Je(e),r.data=ze.call(e,e.transformResponse,r),r.headers=M.from(r.headers),r},function(r){return hn(r)||(Je(e),r&&r.response&&(r.response.data=ze.call(e,e.transformResponse,r.response),r.response.headers=M.from(r.response.headers))),Promise.reject(r)})}const bn="1.13.2",He={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{He[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Mt={};He.transitional=function(t,n,r){function s(i,o){return"[Axios v"+bn+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new S(s(o," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!Mt[o]&&(Mt[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};He.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function as(e,t,n){if(typeof e!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],d=a===void 0||o(a,i,e);if(d!==!0)throw new S("option "+i+" must be "+d,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+i,S.ERR_BAD_OPTION)}}const Ie={assertOptions:as,validators:He},Z=Ie.validators;let de=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Dt,response:new Dt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=pe(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Ie.assertOptions(r,{silentJSONParsing:Z.transitional(Z.boolean),forcedJSONParsing:Z.transitional(Z.boolean),clarifyTimeoutError:Z.transitional(Z.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:Ie.assertOptions(s,{encode:Z.function,serialize:Z.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ie.assertOptions(n,{baseUrl:Z.spelling("baseURL"),withXsrfToken:Z.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&c.merge(i.common,i[n.method]);i&&c.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),n.headers=M.concat(o,i);const a=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let l,p=0,E;if(!d){const u=[qt.bind(this),void 0];for(u.unshift(...a),u.push(...f),E=u.length,l=Promise.resolve(n);p<E;)l=l.then(u[p++],u[p++]);return l}E=a.length;let y=n;for(;p<E;){const u=a[p++],m=a[p++];try{y=u(y)}catch(h){m.call(this,h);break}}try{l=qt.call(this,y)}catch(u){return Promise.reject(u)}for(p=0,E=f.length;p<E;)l=l.then(f[p++],f[p++]);return l}getUri(t){t=pe(this.defaults,t);const n=En(t.baseURL,t.url,t.allowAbsoluteUrls);return fn(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){de.prototype[t]=function(n,r){return this.request(pe(r||{},{method:t,url:n,data:(r||{}).data}))}});c.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(pe(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}de.prototype[t]=n(),de.prototype[t+"Form"]=n(!0)});let cs=class gn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Se(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new gn(function(s){t=s}),cancel:t}}};function us(e){return function(n){return e.apply(null,n)}}function ls(e){return c.isObject(e)&&e.isAxiosError===!0}const ot={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ot).forEach(([e,t])=>{ot[t]=e});function Rn(e){const t=new de(e),n=Qt(de.prototype.request,t);return c.extend(n,de.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Rn(pe(e,s))},n}const N=Rn(_e);N.Axios=de;N.CanceledError=Se;N.CancelToken=cs;N.isCancel=hn;N.VERSION=bn;N.toFormData=Me;N.AxiosError=S;N.Cancel=N.CanceledError;N.all=function(t){return Promise.all(t)};N.spread=us;N.isAxiosError=ls;N.mergeConfig=pe;N.AxiosHeaders=M;N.formToJSON=e=>pn(c.isHTMLForm(e)?new FormData(e):e);N.getAdapter=Sn.getAdapter;N.HttpStatusCode=ot;N.default=N;const{Axios:Js,AxiosError:Ks,CanceledError:Gs,isCancel:Xs,CancelToken:Ys,VERSION:Qs,all:Zs,Cancel:eo,isAxiosError:to,spread:no,toFormData:ro,AxiosHeaders:so,HttpStatusCode:oo,formToJSON:io,getAdapter:ao,mergeConfig:co}=N;var Ne={exports:{}},Ke={};var Ht;function fs(){if(Ht)return Ke;Ht=1;var e=x;function t(p,E){return p===E&&(p!==0||1/p===1/E)||p!==p&&E!==E}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function a(p,E){var y=E(),u=r({inst:{value:y,getSnapshot:E}}),m=u[0].inst,h=u[1];return i(function(){m.value=y,m.getSnapshot=E,d(m)&&h({inst:m})},[p,y,E]),s(function(){return d(m)&&h({inst:m}),p(function(){d(m)&&h({inst:m})})},[p]),o(y),y}function d(p){var E=p.getSnapshot;p=p.value;try{var y=E();return!n(p,y)}catch{return!0}}function f(p,E){return E()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:a;return Ke.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,Ke}var Ge={};var Vt;function ds(){return Vt||(Vt=1,process.env.NODE_ENV!=="production"&&(function(){function e(y,u){return y===u&&(y!==0||1/y===1/u)||y!==y&&u!==u}function t(y,u){l||s.startTransition===void 0||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=u();if(!p){var h=u();i(m,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}h=o({inst:{value:m,getSnapshot:u}});var b=h[0].inst,w=h[1];return d(function(){b.value=m,b.getSnapshot=u,n(b)&&w({inst:b})},[y,m,u]),a(function(){return n(b)&&w({inst:b}),y(function(){n(b)&&w({inst:b})})},[y]),f(m),m}function n(y){var u=y.getSnapshot;y=y.value;try{var m=u();return!i(y,m)}catch{return!0}}function r(y,u){return u()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=x,i=typeof Object.is=="function"?Object.is:e,o=s.useState,a=s.useEffect,d=s.useLayoutEffect,f=s.useDebugValue,l=!1,p=!1,E=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Ge.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:E,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ge}var $t;function ps(){return $t||($t=1,process.env.NODE_ENV==="production"?Ne.exports=fs():Ne.exports=ds()),Ne.exports}var Wt=ps();const On=0,Tn=1,An=2,zt=3;var Jt=Object.prototype.hasOwnProperty;function it(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&it(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Jt.call(e,n)&&++r&&!Jt.call(t,n)||!(n in t)||!it(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const ae=new WeakMap,ce=()=>{},I=ce(),at=Object,g=e=>e===I,ee=e=>typeof e=="function",ue=(e,t)=>({...e,...t}),_n=e=>ee(e.then),Xe={},Fe={},wt="undefined",Ce=typeof window!=wt,ct=typeof document!=wt,hs=Ce&&"Deno"in window,ms=()=>Ce&&typeof window.requestAnimationFrame!=wt,Cn=(e,t)=>{const n=ae.get(e);return[()=>!g(t)&&e.get(t)||Xe,r=>{if(!g(t)){const s=e.get(t);t in Fe||(Fe[t]=s),n[5](t,ue(s,r),s||Xe)}},n[6],()=>!g(t)&&t in Fe?Fe[t]:!g(t)&&e.get(t)||Xe]};let ut=!0;const Es=()=>ut,[lt,ft]=Ce&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ce,ce],ys=()=>{const e=ct&&document.visibilityState;return g(e)||e!=="hidden"},ws=e=>(ct&&document.addEventListener("visibilitychange",e),lt("focus",e),()=>{ct&&document.removeEventListener("visibilitychange",e),ft("focus",e)}),Ss=e=>{const t=()=>{ut=!0,e()},n=()=>{ut=!1};return lt("online",t),lt("offline",n),()=>{ft("online",t),ft("offline",n)}},bs={isOnline:Es,isVisible:ys},gs={initFocus:ws,initReconnect:Ss},Kt=!x.useId,Ee=!Ce||hs,Rs=e=>ms()?window.requestAnimationFrame(e):setTimeout(e,1),Ye=Ee?x.useEffect:x.useLayoutEffect,Qe=typeof navigator<"u"&&navigator.connection,Gt=!Ee&&Qe&&(["slow-2g","2g"].includes(Qe.effectiveType)||Qe.saveData),Pe=new WeakMap,Os=e=>at.prototype.toString.call(e),Ze=(e,t)=>e===`[object ${t}]`;let Ts=0;const dt=e=>{const t=typeof e,n=Os(e),r=Ze(n,"Date"),s=Ze(n,"RegExp"),i=Ze(n,"Object");let o,a;if(at(e)===e&&!r&&!s){if(o=Pe.get(e),o)return o;if(o=++Ts+"~",Pe.set(e,o),Array.isArray(e)){for(o="@",a=0;a<e.length;a++)o+=dt(e[a])+",";Pe.set(e,o)}if(i){o="#";const d=at.keys(e).sort();for(;!g(a=d.pop());)g(e[a])||(o+=a+":"+dt(e[a])+",");Pe.set(e,o)}}else o=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},St=e=>{if(ee(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?dt(e):"",[e,t]};let As=0;const pt=()=>++As;async function xn(...e){const[t,n,r,s]=e,i=ue({populateCache:!0,throwOnError:!0},typeof s=="boolean"?{revalidate:s}:s||{});let o=i.populateCache;const a=i.rollbackOnError;let d=i.optimisticData;const f=E=>typeof a=="function"?a(E):a!==!1,l=i.throwOnError;if(ee(n)){const E=n,y=[],u=t.keys();for(const m of u)!/^\$(inf|sub)\$/.test(m)&&E(t.get(m)._k)&&y.push(m);return Promise.all(y.map(p))}return p(n);async function p(E){const[y]=St(E);if(!y)return;const[u,m]=Cn(t,y),[h,b,w,A]=ae.get(t),D=()=>{const P=h[y];return(ee(i.revalidate)?i.revalidate(u().data,E):i.revalidate!==!1)&&(delete w[y],delete A[y],P&&P[0])?P[0](An).then(()=>u().data):u().data};if(e.length<3)return D();let R=r,v,_=!1;const Y=pt();b[y]=[Y,0];const O=!g(d),te=u(),H=te.data,z=te._c,V=g(z)?H:z;if(O&&(d=ee(d)?d(V,H):d,m({data:d,_c:V})),ee(R))try{R=R(V)}catch(P){v=P,_=!0}if(R&&_n(R))if(R=await R.catch(P=>{v=P,_=!0}),Y!==b[y][0]){if(_)throw v;return R}else _&&O&&f(v)&&(o=!0,m({data:V,_c:I}));if(o&&!_)if(ee(o)){const P=o(R,V);m({data:P,error:I,_c:I})}else m({data:R,error:I,_c:I});if(b[y][1]=pt(),Promise.resolve(D()).then(()=>{m({_c:I})}),_){if(l)throw v;return}return R}}const Xt=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},_s=(e,t)=>{if(!ae.has(e)){const n=ue(gs,t),r=Object.create(null),s=xn.bind(I,e);let i=ce;const o=Object.create(null),a=(l,p)=>{const E=o[l]||[];return o[l]=E,E.push(p),()=>E.splice(E.indexOf(p),1)},d=(l,p,E)=>{e.set(l,p);const y=o[l];if(y)for(const u of y)u(p,E)},f=()=>{if(!ae.has(e)&&(ae.set(e,[r,Object.create(null),Object.create(null),Object.create(null),s,d,a]),!Ee)){const l=n.initFocus(setTimeout.bind(I,Xt.bind(I,r,On))),p=n.initReconnect(setTimeout.bind(I,Xt.bind(I,r,Tn)));i=()=>{l&&l(),p&&p(),ae.delete(e)}}};return f(),[e,s,f,i]}return[e,ae.get(e)[4]]},Cs=(e,t,n,r,s)=>{const i=n.errorRetryCount,o=s.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!g(i)&&o>i||setTimeout(r,a,s)},xs=it,[Dn,Ds]=_s(new Map),Ls=ue({onLoadingSlow:ce,onSuccess:ce,onError:ce,onErrorRetry:Cs,onDiscarded:ce,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Gt?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Gt?5e3:3e3,compare:xs,isPaused:()=>!1,cache:Dn,mutate:Ds,fallback:{}},bs),Ns=(e,t)=>{const n=ue(e,t);if(t){const{use:r,fallback:s}=e,{use:i,fallback:o}=t;r&&i&&(n.use=r.concat(i)),s&&o&&(n.fallback=ue(s,o))}return n},Fs=x.createContext({}),Ps="$inf$",Ln=Ce&&window.__SWR_DEVTOOLS_USE__,vs=Ln?window.__SWR_DEVTOOLS_USE__:[],Us=()=>{Ln&&(window.__SWR_DEVTOOLS_REACT__=x)},Nn=e=>ee(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Is=()=>{const e=x.useContext(Fs);return x.useMemo(()=>ue(Ls,e),[e])},ks=e=>(t,n,r)=>e(t,n&&((...i)=>{const[o]=St(t),[,,,a]=ae.get(Dn);if(o.startsWith(Ps))return n(...i);const d=a[o];return g(d)?n(...i):(delete a[o],d)}),r),Bs=vs.concat(ks),js=e=>function(...n){const r=Is(),[s,i,o]=Nn(n),a=Ns(r,o);let d=e;const{use:f}=a,l=(f||[]).concat(Bs);for(let p=l.length;p--;)d=l[p](d);return d(s,i||a.fetcher||null,a)},qs=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const s=r.indexOf(n);s>=0&&(r[s]=r[r.length-1],r.pop())}},Ms=(e,t)=>(...n)=>{const[r,s,i]=Nn(n),o=(i.use||[]).concat(t);return e(r,s,{...i,use:o})};Us();const et=x.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),tt={dedupe:!0},Yt=Promise.resolve(I),Hs=(e,t,n)=>{const{cache:r,compare:s,suspense:i,fallbackData:o,revalidateOnMount:a,revalidateIfStale:d,refreshInterval:f,refreshWhenHidden:l,refreshWhenOffline:p,keepPreviousData:E,strictServerPrefetchWarning:y}=n,[u,m,h,b]=ae.get(r),[w,A]=St(e),D=x.useRef(!1),R=x.useRef(!1),v=x.useRef(w),_=x.useRef(t),Y=x.useRef(n),O=()=>Y.current,te=()=>O().isVisible()&&O().isOnline(),[H,z,V,P]=Cn(r,w),ne=x.useRef({}).current,B=g(o)?g(n.fallback)?I:n.fallback[w]:o,be=(T,C)=>{for(const F in ne){const L=F;if(L==="data"){if(!s(T[L],C[L])&&(!g(T[L])||!s(De,C[L])))return!1}else if(C[L]!==T[L])return!1}return!0},J=x.useMemo(()=>{const T=!w||!t?!1:g(a)?O().isPaused()||i?!1:d!==!1:a,C=j=>{const oe=ue(j);return delete oe._k,T?{isValidating:!0,isLoading:!0,...oe}:oe},F=H(),L=P(),G=C(F),me=F===L?G:C(L);let U=G;return[()=>{const j=C(H());return be(j,U)?(U.data=j.data,U.isLoading=j.isLoading,U.isValidating=j.isValidating,U.error=j.error,U):(U=j,j)},()=>me]},[r,w]),re=Wt.useSyncExternalStore(x.useCallback(T=>V(w,(C,F)=>{be(F,C)||T()}),[r,w]),J[0],J[1]),xe=!D.current,Q=u[w]&&u[w].length>0,$=re.data,K=g($)?B&&_n(B)?et(B):B:$,se=re.error,he=x.useRef(K),De=E?g($)?g(he.current)?K:he.current:$:K,le=w&&g(K),Fn=!Ee&&Wt.useSyncExternalStore(()=>ce,()=>!1,()=>!0);y&&Fn&&!i&&le&&console.warn(`Missing pre-initiated data for serialized key "${w}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const bt=Q&&!g(se)?!1:xe&&!g(a)?a:O().isPaused()?!1:i?g(K)?!1:d:g(K)||d,gt=!!(w&&t&&xe&&bt),Pn=g(re.isValidating)?gt:re.isValidating,vn=g(re.isLoading)?gt:re.isLoading,ge=x.useCallback(async T=>{const C=_.current;if(!w||!C||R.current||O().isPaused())return!1;let F,L,G=!0;const me=T||{},U=!h[w]||!me.dedupe,j=()=>Kt?!R.current&&w===v.current&&D.current:w===v.current,oe={isValidating:!1,isLoading:!1},Ot=()=>{z(oe)},Tt=()=>{const W=h[w];W&&W[1]===L&&delete h[w]},At={isValidating:!0};g(H().data)&&(At.isLoading=!0);try{if(U&&(z(At),n.loadingTimeout&&g(H().data)&&setTimeout(()=>{G&&j()&&O().onLoadingSlow(w,n)},n.loadingTimeout),h[w]=[C(A),pt()]),[F,L]=h[w],F=await F,U&&setTimeout(Tt,n.dedupingInterval),!h[w]||h[w][1]!==L)return U&&j()&&O().onDiscarded(w),!1;oe.error=I;const W=m[w];if(!g(W)&&(L<=W[0]||L<=W[1]||W[1]===0))return Ot(),U&&j()&&O().onDiscarded(w),!1;const ie=H().data;oe.data=s(ie,F)?ie:F,U&&j()&&O().onSuccess(F,w,n)}catch(W){Tt();const ie=O(),{shouldRetryOnError:Ve}=ie;ie.isPaused()||(oe.error=W,U&&j()&&(ie.onError(W,w,ie),(Ve===!0||ee(Ve)&&Ve(W))&&(!O().revalidateOnFocus||!O().revalidateOnReconnect||te())&&ie.onErrorRetry(W,w,ie,Un=>{const $e=u[w];$e&&$e[0]&&$e[0](zt,Un)},{retryCount:(me.retryCount||0)+1,dedupe:!0})))}return G=!1,Ot(),!0},[w,r]),Rt=x.useCallback((...T)=>xn(r,v.current,...T),[]);if(Ye(()=>{_.current=t,Y.current=n,g($)||(he.current=$)}),Ye(()=>{if(!w)return;const T=ge.bind(I,tt);let C=0;O().revalidateOnFocus&&(C=Date.now()+O().focusThrottleInterval);const L=qs(w,u,(G,me={})=>{if(G==On){const U=Date.now();O().revalidateOnFocus&&U>C&&te()&&(C=U+O().focusThrottleInterval,T())}else if(G==Tn)O().revalidateOnReconnect&&te()&&T();else{if(G==An)return ge();if(G==zt)return ge(me)}});return R.current=!1,v.current=w,D.current=!0,z({_k:A}),bt&&(h[w]||(g(K)||Ee?T():Rs(T))),()=>{R.current=!0,L()}},[w]),Ye(()=>{let T;function C(){const L=ee(f)?f(H().data):f;L&&T!==-1&&(T=setTimeout(F,L))}function F(){!H().error&&(l||O().isVisible())&&(p||O().isOnline())?ge(tt).then(C):C()}return C(),()=>{T&&(clearTimeout(T),T=-1)}},[f,l,p,w]),x.useDebugValue(De),i){if(!Kt&&Ee&&le)throw new Error("Fallback data is required when using Suspense in SSR.");le&&(_.current=t,Y.current=n,R.current=!1);const T=b[w],C=!g(T)&&le?Rt(T):Yt;if(et(C),!g(se)&&le)throw se;const F=le?ge(tt):Yt;!g(De)&&le&&(F.status="fulfilled",F.value=!0),et(F)}return{mutate:Rt,get data(){return ne.data=!0,De},get error(){return ne.error=!0,se},get isValidating(){return ne.isValidating=!0,Pn},get isLoading(){return ne.isLoading=!0,vn}}},Vs=js(Hs);exports.axios=N;exports.useSWR=Vs;exports.withMiddleware=Ms;
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ReturnToLauncherButton.cjs"),r=require("./ArticlesAd.cjs"),o=require("./Ad.cjs"),t=require("./GameScoreboard.cjs"),u=require("./GlobalHead.cjs"),a=require("./GlobalBody.cjs");exports.ReturnToLauncherButton=e;exports.ArticlesAd=r;exports.Ad=o;exports.GameScoreboard=t;exports.GlobalHead=u;exports.GlobalBody=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ReturnToLauncherButton.cjs"),r=require("./ArticlesAd.cjs"),o=require("./Ad.cjs"),s=require("./GameScoreboard.cjs"),t=require("./GlobalHead.cjs"),u=require("./GlobalBody.cjs"),n=require("./ViewUserModal.cjs"),a=require("./useUserDetails.cjs"),i=require("./useUserToken.cjs");exports.ReturnToLauncherButton=e;exports.ArticlesAd=r;exports.Ad=o;exports.GameScoreboard=s;exports.GlobalHead=t;exports.GlobalBody=u;exports.ViewUserModal=n;exports.useUserDetails=a;exports.useUserToken=i;
package/dist/index.js CHANGED
@@ -1,14 +1,20 @@
1
- import { default as e } from "./ReturnToLauncherButton.js";
1
+ import { default as a } from "./ReturnToLauncherButton.js";
2
2
  import { default as t } from "./ArticlesAd.js";
3
- import { default as d } from "./Ad.js";
4
- import { default as u } from "./GameScoreboard.js";
5
- import { default as s } from "./GlobalHead.js";
3
+ import { default as l } from "./Ad.js";
4
+ import { default as d } from "./GameScoreboard.js";
5
+ import { default as m } from "./GlobalHead.js";
6
6
  import { default as x } from "./GlobalBody.js";
7
+ import { default as b } from "./ViewUserModal.js";
8
+ import { default as i } from "./useUserDetails.js";
9
+ import { default as G } from "./useUserToken.js";
7
10
  export {
8
- d as Ad,
11
+ l as Ad,
9
12
  t as ArticlesAd,
10
- u as GameScoreboard,
13
+ d as GameScoreboard,
11
14
  x as GlobalBody,
12
- s as GlobalHead,
13
- e as ReturnToLauncherButton
15
+ m as GlobalHead,
16
+ a as ReturnToLauncherButton,
17
+ b as ViewUserModal,
18
+ i as useUserDetails,
19
+ G as useUserToken
14
20
  };
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./jsx-runtime-nZSsnGb7.cjs");function u(n){const{href:o,children:e,newPage:s,...c}=n;return i.jsxRuntimeExports.jsx("a",{href:o,...c,...s&&{target:"_blank",rel:"noopener noreferrer"},children:e})}const l=6048e5,f=864e5,m=6e4,t=Symbol.for("constructDateFrom");function r(n,o){return typeof n=="function"?n(o):n&&typeof n=="object"&&t in n?n[t](o):n instanceof Date?new n.constructor(o):new Date(o)}function D(n,o){return r(o||n,n)}exports.Link=u;exports.constructFrom=r;exports.millisecondsInDay=f;exports.millisecondsInMinute=m;exports.millisecondsInWeek=l;exports.toDate=D;
@@ -0,0 +1,28 @@
1
+ import { j as c } from "./jsx-runtime-tc70JA_2.js";
2
+ function u(n) {
3
+ const { href: o, children: t, newPage: s, ...e } = n;
4
+ return /* @__PURE__ */ c.jsx(
5
+ "a",
6
+ {
7
+ href: o,
8
+ ...e,
9
+ ...s && { target: "_blank", rel: "noopener noreferrer" },
10
+ children: t
11
+ }
12
+ );
13
+ }
14
+ const m = 6048e5, l = 864e5, a = 6e4, r = /* @__PURE__ */ Symbol.for("constructDateFrom");
15
+ function i(n, o) {
16
+ return typeof n == "function" ? n(o) : n && typeof n == "object" && r in n ? n[r](o) : n instanceof Date ? new n.constructor(o) : new Date(o);
17
+ }
18
+ function p(n, o) {
19
+ return i(o || n, n);
20
+ }
21
+ export {
22
+ u as L,
23
+ l as a,
24
+ m as b,
25
+ i as c,
26
+ a as m,
27
+ p as t
28
+ };
@@ -0,0 +1 @@
1
+ "use strict";const s=require("./index-Ddv_TnxK.cjs"),a=e=>s.axios.get(e.url,{params:{token:e.token}}).then(t=>t.data),l=e=>{const{data:t,error:n,isLoading:o,mutate:r}=s.useSWR(e.token?{url:(process.env.NODE_ENV==="development"?"http://localhost:3012":"https://accounts.articles.media")+"/api/auth/session",token:e.token}:null,a,{revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1});return{data:t,error:n,isLoading:o,mutate:r}};module.exports=l;
@@ -0,0 +1,33 @@
1
+ import { u as n, a as r } from "./index-DLYx67wi.js";
2
+ const l = (e) => r.get(e.url, {
3
+ // headers: {
4
+ // Authorization: `Bearer ${params.token}`
5
+ // },
6
+ params: {
7
+ token: e.token
8
+ }
9
+ }).then((t) => t.data), c = (e) => {
10
+ const { data: t, error: s, isLoading: a, mutate: o } = n(
11
+ e.token ? {
12
+ // url: "/api/details",
13
+ // url: "http://localhost:3012/api/auth/session",
14
+ url: (process.env.NODE_ENV === "development" ? "http://localhost:3012" : "https://accounts.articles.media") + "/api/auth/session",
15
+ token: e.token
16
+ } : null,
17
+ l,
18
+ {
19
+ revalidateOnFocus: !1,
20
+ revalidateOnReconnect: !1,
21
+ shouldRetryOnError: !1
22
+ }
23
+ );
24
+ return {
25
+ data: t,
26
+ error: s,
27
+ isLoading: a,
28
+ mutate: o
29
+ };
30
+ };
31
+ export {
32
+ c as default
33
+ };
@@ -0,0 +1 @@
1
+ "use strict";const s=require("./index-Ddv_TnxK.cjs"),r=e=>s.axios.get(e).then(t=>t.data),c=e=>{const{data:t,error:a,isLoading:o,mutate:n}=s.useSWR(process.env.NODE_ENV==="development"?`http://localhost:${e}/api/token`:"https://accounts.articles.media/api/token",r,{revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1});return{data:t,error:a,isLoading:o,mutate:n}};module.exports=c;
@@ -0,0 +1,22 @@
1
+ import { u as r, a as n } from "./index-DLYx67wi.js";
2
+ const c = (e) => n.get(e).then((t) => t.data), i = (e) => {
3
+ const { data: t, error: a, isLoading: s, mutate: o } = r(
4
+ // "http://localhost:3012/api/auth/session",
5
+ process.env.NODE_ENV === "development" ? `http://localhost:${e}/api/token` : "https://accounts.articles.media/api/token",
6
+ c,
7
+ {
8
+ revalidateOnFocus: !1,
9
+ revalidateOnReconnect: !1,
10
+ shouldRetryOnError: !1
11
+ }
12
+ );
13
+ return {
14
+ data: t,
15
+ error: a,
16
+ isLoading: s,
17
+ mutate: o
18
+ };
19
+ };
20
+ export {
21
+ i as default
22
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@articles-media/articles-dev-box",
3
3
  "description": "Shared code, functions, and components for different Articles Media projects.",
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "type": "module",
6
6
  "imports": {
7
7
  "#root/src/*": "./src/*"
@@ -44,10 +44,24 @@
44
44
  "import": "./dist/GlobalBody.js",
45
45
  "require": "./dist/GlobalBody.cjs"
46
46
  },
47
- "./dist/style.css": "./dist/articles-dev-box.css"
47
+ "./ViewUserModal": {
48
+ "import": "./dist/ViewUserModal.js",
49
+ "require": "./dist/ViewUserModal.cjs"
50
+ },
51
+ "./useUserDetails": {
52
+ "import": "./dist/useUserDetails.js",
53
+ "require": "./dist/useUserDetails.cjs"
54
+ },
55
+ "./useUserToken": {
56
+ "import": "./dist/useUserToken.js",
57
+ "require": "./dist/useUserToken.cjs"
58
+ },
59
+ "./dist/style.css": "./dist/articles-dev-box.css",
60
+ "./dist/articles-dev-box.css": "./dist/articles-dev-box.css"
48
61
  },
49
62
  "scripts": {
50
- "dev": "vite",
63
+ "dev-unknown": "vite dev",
64
+ "dev": "nodemon --watch src --ext js,ts,css,scss,jsx,json --ignore dist --exec \"npm run build\"",
51
65
  "build": "vite build",
52
66
  "preview": "vite preview",
53
67
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -62,6 +76,7 @@
62
76
  "devDependencies": {
63
77
  "@vitejs/plugin-react": "^5.1.2",
64
78
  "classnames": "^2.5.1",
79
+ "nodemon": "^3.1.11",
65
80
  "react-bootstrap": "^2.10.10",
66
81
  "sass": "^1.97.2",
67
82
  "vite": "^7.3.1"
@@ -1,6 +0,0 @@
1
- "use strict";const jn=require("./jsx-runtime-nZSsnGb7.cjs"),x=require("react");function Bn(e){const{href:t,children:n,newPage:r,...s}=e;return jn.jsxRuntimeExports.jsx("a",{href:t,...s,...r&&{target:"_blank",rel:"noopener noreferrer"},children:n})}function Zt(e,t){return function(){return e.apply(t,arguments)}}const{toString:qn}=Object.prototype,{getPrototypeOf:ht}=Object,{iterator:je,toStringTag:en}=Symbol,Be=(e=>t=>{const n=qn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),X=e=>(e=e.toLowerCase(),t=>Be(t)===e),qe=e=>t=>typeof t===e,{isArray:we}=Array,Ee=qe("undefined");function Oe(e){return e!==null&&!Ee(e)&&e.constructor!==null&&!Ee(e.constructor)&&q(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tn=X("ArrayBuffer");function Mn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tn(e.buffer),t}const Hn=qe("string"),q=qe("function"),nn=qe("number"),Te=e=>e!==null&&typeof e=="object",Vn=e=>e===!0||e===!1,ve=e=>{if(Be(e)!=="object")return!1;const t=ht(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(en in e)&&!(je in e)},$n=e=>{if(!Te(e)||Oe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Wn=X("Date"),zn=X("File"),Jn=X("Blob"),Kn=X("FileList"),Gn=e=>Te(e)&&q(e.pipe),Xn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||q(e.append)&&((t=Be(e))==="formdata"||t==="object"&&q(e.toString)&&e.toString()==="[object FormData]"))},Yn=X("URLSearchParams"),[Qn,Zn,er,tr]=["ReadableStream","Request","Response","Headers"].map(X),nr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ae(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),we(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Oe(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function rn(e,t){if(Oe(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const fe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sn=e=>!Ee(e)&&e!==fe;function nt(){const{caseless:e,skipUndefined:t}=sn(this)&&this||{},n={},r=(s,i)=>{const o=e&&rn(n,i)||i;ve(n[o])&&ve(s)?n[o]=nt(n[o],s):ve(s)?n[o]=nt({},s):we(s)?n[o]=s.slice():(!t||!Ee(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Ae(arguments[s],r);return n}const rr=(e,t,n,{allOwnKeys:r}={})=>(Ae(t,(s,i)=>{n&&q(s)?e[i]=Zt(s,n):e[i]=s},{allOwnKeys:r}),e),sr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),or=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ir=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&ht(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ar=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},cr=e=>{if(!e)return null;if(we(e))return e;let t=e.length;if(!nn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ur=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ht(Uint8Array)),lr=(e,t)=>{const r=(e&&e[je]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},fr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},dr=X("HTMLFormElement"),pr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),_t=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),hr=X("RegExp"),on=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ae(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},mr=e=>{on(e,(t,n)=>{if(q(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(q(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},yr=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return we(e)?r(e):r(String(e).split(t)),n},Er=()=>{},wr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Sr(e){return!!(e&&q(e.append)&&e[en]==="FormData"&&e[je])}const br=e=>{const t=new Array(10),n=(r,s)=>{if(Te(r)){if(t.indexOf(r)>=0)return;if(Oe(r))return r;if(!("toJSON"in r)){t[s]=r;const i=we(r)?[]:{};return Ae(r,(o,a)=>{const d=n(o,s+1);!Ee(d)&&(i[a]=d)}),t[s]=void 0,i}}return r};return n(e,0)},gr=X("AsyncFunction"),Rr=e=>e&&(Te(e)||q(e))&&q(e.then)&&q(e.catch),an=((e,t)=>e?setImmediate:t?((n,r)=>(fe.addEventListener("message",({source:s,data:i})=>{s===fe&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),fe.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",q(fe.postMessage)),Or=typeof queueMicrotask<"u"?queueMicrotask.bind(fe):typeof process<"u"&&process.nextTick||an,Tr=e=>e!=null&&q(e[je]),c={isArray:we,isArrayBuffer:tn,isBuffer:Oe,isFormData:Xn,isArrayBufferView:Mn,isString:Hn,isNumber:nn,isBoolean:Vn,isObject:Te,isPlainObject:ve,isEmptyObject:$n,isReadableStream:Qn,isRequest:Zn,isResponse:er,isHeaders:tr,isUndefined:Ee,isDate:Wn,isFile:zn,isBlob:Jn,isRegExp:hr,isFunction:q,isStream:Gn,isURLSearchParams:Yn,isTypedArray:ur,isFileList:Kn,forEach:Ae,merge:nt,extend:rr,trim:nr,stripBOM:sr,inherits:or,toFlatObject:ir,kindOf:Be,kindOfTest:X,endsWith:ar,toArray:cr,forEachEntry:lr,matchAll:fr,isHTMLForm:dr,hasOwnProperty:_t,hasOwnProp:_t,reduceDescriptors:on,freezeMethods:mr,toObjectSet:yr,toCamelCase:pr,noop:Er,toFiniteNumber:wr,findKey:rn,global:fe,isContextDefined:sn,isSpecCompliantForm:Sr,toJSONObject:br,isAsyncFn:gr,isThenable:Rr,setImmediate:an,asap:Or,isIterable:Tr};function S(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}c.inherits(S,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:c.toJSONObject(this.config),code:this.code,status:this.status}}});const cn=S.prototype,un={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{un[e]={value:e}});Object.defineProperties(S,un);Object.defineProperty(cn,"isAxiosError",{value:!0});S.from=(e,t,n,r,s,i)=>{const o=Object.create(cn);c.toFlatObject(e,o,function(l){return l!==Error.prototype},f=>f!=="isAxiosError");const a=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return S.call(o,a,d,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const Ar=null;function rt(e){return c.isPlainObject(e)||c.isArray(e)}function ln(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Ct(e,t,n){return e?e.concat(t).map(function(s,i){return s=ln(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function _r(e){return c.isArray(e)&&!e.some(rt)}const Cr=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Me(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,h){return!c.isUndefined(h[m])});const r=n.metaTokens,s=n.visitor||l,i=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function f(u){if(u===null)return"";if(c.isDate(u))return u.toISOString();if(c.isBoolean(u))return u.toString();if(!d&&c.isBlob(u))throw new S("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(u)||c.isTypedArray(u)?d&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,m,h){let b=u;if(u&&!h&&typeof u=="object"){if(c.endsWith(m,"{}"))m=r?m:m.slice(0,-2),u=JSON.stringify(u);else if(c.isArray(u)&&_r(u)||(c.isFileList(u)||c.endsWith(m,"[]"))&&(b=c.toArray(u)))return m=ln(m),b.forEach(function(A,D){!(c.isUndefined(A)||A===null)&&t.append(o===!0?Ct([m],D,i):o===null?m:m+"[]",f(A))}),!1}return rt(u)?!0:(t.append(Ct(h,m,i),f(u)),!1)}const p=[],y=Object.assign(Cr,{defaultVisitor:l,convertValue:f,isVisitable:rt});function E(u,m){if(!c.isUndefined(u)){if(p.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(u),c.forEach(u,function(b,w){(!(c.isUndefined(b)||b===null)&&s.call(t,b,c.isString(w)?w.trim():w,m,y))===!0&&E(b,m?m.concat(w):[w])}),p.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return E(e),t}function xt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function mt(e,t){this._pairs=[],e&&Me(e,this,t)}const fn=mt.prototype;fn.append=function(t,n){this._pairs.push([t,n])};fn.toString=function(t){const n=t?function(r){return t.call(this,r,xt)}:xt;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function xr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dn(e,t,n){if(!t)return e;const r=n&&n.encode||xr;c.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=c.isURLSearchParams(t)?t.toString():new mt(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Dt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(r){r!==null&&t(r)})}}const pn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Dr=typeof URLSearchParams<"u"?URLSearchParams:mt,Lr=typeof FormData<"u"?FormData:null,Nr=typeof Blob<"u"?Blob:null,Fr={isBrowser:!0,classes:{URLSearchParams:Dr,FormData:Lr,Blob:Nr},protocols:["http","https","file","blob","url","data"]},yt=typeof window<"u"&&typeof document<"u",st=typeof navigator=="object"&&navigator||void 0,Pr=yt&&(!st||["ReactNative","NativeScript","NS"].indexOf(st.product)<0),vr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ur=yt&&window.location.href||"http://localhost",Ir=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:yt,hasStandardBrowserEnv:Pr,hasStandardBrowserWebWorkerEnv:vr,navigator:st,origin:Ur},Symbol.toStringTag,{value:"Module"})),k={...Ir,...Fr};function kr(e,t){return Me(e,new k.classes.URLSearchParams,{visitor:function(n,r,s,i){return k.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function jr(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Br(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function hn(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),d=i>=n.length;return o=!o&&c.isArray(s)?s.length:o,d?(c.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!c.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&c.isArray(s[o])&&(s[o]=Br(s[o])),!a)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(r,s)=>{t(jr(r),s,n,0)}),n}return null}function qr(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _e={transitional:pn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=c.isObject(t);if(i&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(hn(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return kr(t,this.formSerializer).toString();if((a=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Me(a?{"files[]":t}:t,d&&new d,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),qr(t)):t}],transformResponse:[function(t){const n=this.transitional||_e.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?S.from(a,S.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:k.classes.FormData,Blob:k.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{_e.headers[e]={}});const Mr=c.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"]),Hr=e=>{const t={};let n,r,s;return e&&e.split(`
2
- `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&Mr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Lt=Symbol("internals");function Re(e){return e&&String(e).trim().toLowerCase()}function Ue(e){return e===!1||e==null?e:c.isArray(e)?e.map(Ue):String(e)}function Vr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const $r=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function We(e,t,n,r,s){if(c.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!c.isString(t)){if(c.isString(r))return t.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(t)}}function Wr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zr(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let M=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,d,f){const l=Re(d);if(!l)throw new Error("header name must be a non-empty string");const p=c.findKey(s,l);(!p||s[p]===void 0||f===!0||f===void 0&&s[p]!==!1)&&(s[p||d]=Ue(a))}const o=(a,d)=>c.forEach(a,(f,l)=>i(f,l,d));if(c.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(c.isString(t)&&(t=t.trim())&&!$r(t))o(Hr(t),n);else if(c.isObject(t)&&c.isIterable(t)){let a={},d,f;for(const l of t){if(!c.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[f=l[0]]=(d=a[f])?c.isArray(d)?[...d,l[1]]:[d,l[1]]:l[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Re(t),t){const r=c.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Vr(s);if(c.isFunction(n))return n.call(this,s,r);if(c.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Re(t),t){const r=c.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||We(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Re(o),o){const a=c.findKey(r,o);a&&(!n||We(r,r[a],a,n))&&(delete r[a],s=!0)}}return c.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||We(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return c.forEach(this,(s,i)=>{const o=c.findKey(r,i);if(o){n[o]=Ue(s),delete n[i];return}const a=t?Wr(i):String(i).trim();a!==i&&delete n[i],n[a]=Ue(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Lt]=this[Lt]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Re(o);r[a]||(zr(s,o),r[a]=!0)}return c.isArray(t)?t.forEach(i):i(t),this}};M.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(M.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});c.freezeMethods(M);function ze(e,t){const n=this||_e,r=t||n,s=M.from(r.headers);let i=r.data;return c.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function mn(e){return!!(e&&e.__CANCEL__)}function Se(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(Se,S,{__CANCEL__:!0});function yn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Jr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Kr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),l=r[i];o||(o=f),n[s]=d,r[s]=f;let p=i,y=0;for(;p!==s;)y+=n[p++],p=p%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),f-o<t)return;const E=l&&f-l;return E?Math.round(y*1e3/E):void 0}}function Gr(e,t){let n=0,r=1e3/t,s,i;const o=(f,l=Date.now())=>{n=l,s=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{const l=Date.now(),p=l-n;p>=r?o(f,l):(s=f,i||(i=setTimeout(()=>{i=null,o(s)},r-p)))},()=>s&&o(s)]}const ke=(e,t,n=3)=>{let r=0;const s=Kr(50,250);return Gr(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,d=o-r,f=s(d),l=o<=a;r=o;const p={loaded:o,total:a,progress:a?o/a:void 0,bytes:d,rate:f||void 0,estimated:f&&a&&l?(a-o)/f:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(p)},n)},Nt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ft=e=>(...t)=>c.asap(()=>e(...t)),Xr=k.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,k.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(k.origin),k.navigator&&/(msie|trident)/i.test(k.navigator.userAgent)):()=>!0,Yr=k.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];c.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),c.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Qr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Zr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function En(e,t,n){let r=!Qr(t);return e&&(r||n==!1)?Zr(e,t):t}const Pt=e=>e instanceof M?{...e}:e;function pe(e,t){t=t||{};const n={};function r(f,l,p,y){return c.isPlainObject(f)&&c.isPlainObject(l)?c.merge.call({caseless:y},f,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}function s(f,l,p,y){if(c.isUndefined(l)){if(!c.isUndefined(f))return r(void 0,f,p,y)}else return r(f,l,p,y)}function i(f,l){if(!c.isUndefined(l))return r(void 0,l)}function o(f,l){if(c.isUndefined(l)){if(!c.isUndefined(f))return r(void 0,f)}else return r(void 0,l)}function a(f,l,p){if(p in t)return r(f,l);if(p in e)return r(void 0,f)}const d={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(f,l,p)=>s(Pt(f),Pt(l),p,!0)};return c.forEach(Object.keys({...e,...t}),function(l){const p=d[l]||s,y=p(e[l],t[l],l);c.isUndefined(y)&&p!==a||(n[l]=y)}),n}const wn=e=>{const t=pe({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=M.from(o),t.url=dn(En(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(n)){if(k.hasStandardBrowserEnv||k.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(c.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([l,p])=>{f.includes(l.toLowerCase())&&o.set(l,p)})}}if(k.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(t)),r||r!==!1&&Xr(t.url))){const d=s&&i&&Yr.read(i);d&&o.set(s,d)}return t},es=typeof XMLHttpRequest<"u",ts=es&&function(e){return new Promise(function(n,r){const s=wn(e);let i=s.data;const o=M.from(s.headers).normalize();let{responseType:a,onUploadProgress:d,onDownloadProgress:f}=s,l,p,y,E,u;function m(){E&&E(),u&&u(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function b(){if(!h)return;const A=M.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:A,config:e,request:h};yn(function(_){n(_),m()},function(_){r(_),m()},R),h=null}"onloadend"in h?h.onloadend=b:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(b)},h.onabort=function(){h&&(r(new S("Request aborted",S.ECONNABORTED,e,h)),h=null)},h.onerror=function(D){const R=D&&D.message?D.message:"Network Error",v=new S(R,S.ERR_NETWORK,e,h);v.event=D||null,r(v),h=null},h.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||pn;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new S(D,R.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,e,h)),h=null},i===void 0&&o.setContentType(null),"setRequestHeader"in h&&c.forEach(o.toJSON(),function(D,R){h.setRequestHeader(R,D)}),c.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),a&&a!=="json"&&(h.responseType=s.responseType),f&&([y,u]=ke(f,!0),h.addEventListener("progress",y)),d&&h.upload&&([p,E]=ke(d),h.upload.addEventListener("progress",p),h.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(l=A=>{h&&(r(!A||A.type?new Se(null,e,h):A),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const w=Jr(s.url);if(w&&k.protocols.indexOf(w)===-1){r(new S("Unsupported protocol "+w+":",S.ERR_BAD_REQUEST,e));return}h.send(i||null)})},ns=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(f){if(!s){s=!0,a();const l=f instanceof Error?f:this.reason;r.abort(l instanceof S?l:new Se(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,i(new S(`timeout ${t} of ms exceeded`,S.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>f.addEventListener("abort",i));const{signal:d}=r;return d.unsubscribe=()=>c.asap(a),d}},rs=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},ss=async function*(e,t){for await(const n of os(e))yield*rs(n,t)},os=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},vt=(e,t,n,r)=>{const s=ss(e,t);let i=0,o,a=d=>{o||(o=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:l}=await s.next();if(f){a(),d.close();return}let p=l.byteLength;if(n){let y=i+=p;n(y)}d.enqueue(new Uint8Array(l))}catch(f){throw a(f),f}},cancel(d){return a(d),s.return()}},{highWaterMark:2})},Ut=64*1024,{isFunction:Le}=c,is=(({Request:e,Response:t})=>({Request:e,Response:t}))(c.global),{ReadableStream:It,TextEncoder:kt}=c.global,jt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},as=e=>{e=c.merge.call({skipUndefined:!0},is,e);const{fetch:t,Request:n,Response:r}=e,s=t?Le(t):typeof fetch=="function",i=Le(n),o=Le(r);if(!s)return!1;const a=s&&Le(It),d=s&&(typeof kt=="function"?(u=>m=>u.encode(m))(new kt):async u=>new Uint8Array(await new n(u).arrayBuffer())),f=i&&a&&jt(()=>{let u=!1;const m=new n(k.origin,{body:new It,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!m}),l=o&&a&&jt(()=>c.isReadableStream(new r("").body)),p={stream:l&&(u=>u.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!p[u]&&(p[u]=(m,h)=>{let b=m&&m[u];if(b)return b.call(m);throw new S(`Response type '${u}' is not supported`,S.ERR_NOT_SUPPORT,h)})});const y=async u=>{if(u==null)return 0;if(c.isBlob(u))return u.size;if(c.isSpecCompliantForm(u))return(await new n(k.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(c.isArrayBufferView(u)||c.isArrayBuffer(u))return u.byteLength;if(c.isURLSearchParams(u)&&(u=u+""),c.isString(u))return(await d(u)).byteLength},E=async(u,m)=>{const h=c.toFiniteNumber(u.getContentLength());return h??y(m)};return async u=>{let{url:m,method:h,data:b,signal:w,cancelToken:A,timeout:D,onDownloadProgress:R,onUploadProgress:v,responseType:_,headers:Y,withCredentials:O="same-origin",fetchOptions:te}=wn(u),H=t||fetch;_=_?(_+"").toLowerCase():"text";let z=ns([w,A&&A.toAbortSignal()],D),V=null;const P=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let ne;try{if(v&&f&&h!=="get"&&h!=="head"&&(ne=await E(Y,b))!==0){let Q=new n(m,{method:"POST",body:b,duplex:"half"}),$;if(c.isFormData(b)&&($=Q.headers.get("content-type"))&&Y.setContentType($),Q.body){const[K,se]=Nt(ne,ke(Ft(v)));b=vt(Q.body,Ut,K,se)}}c.isString(O)||(O=O?"include":"omit");const j=i&&"credentials"in n.prototype,be={...te,signal:z,method:h.toUpperCase(),headers:Y.normalize().toJSON(),body:b,duplex:"half",credentials:j?O:void 0};V=i&&new n(m,be);let J=await(i?H(V,te):H(m,be));const re=l&&(_==="stream"||_==="response");if(l&&(R||re&&P)){const Q={};["status","statusText","headers"].forEach(he=>{Q[he]=J[he]});const $=c.toFiniteNumber(J.headers.get("content-length")),[K,se]=R&&Nt($,ke(Ft(R),!0))||[];J=new r(vt(J.body,Ut,K,()=>{se&&se(),P&&P()}),Q)}_=_||"text";let xe=await p[c.findKey(p,_)||"text"](J,u);return!re&&P&&P(),await new Promise((Q,$)=>{yn(Q,$,{data:xe,headers:M.from(J.headers),status:J.status,statusText:J.statusText,config:u,request:V})})}catch(j){throw P&&P(),j&&j.name==="TypeError"&&/Load failed|fetch/i.test(j.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,u,V),{cause:j.cause||j}):S.from(j,j&&j.code,u,V)}}},cs=new Map,Sn=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,d,f,l=cs;for(;a--;)d=i[a],f=l.get(d),f===void 0&&l.set(d,f=a?new Map:as(t)),l=f;return f};Sn();const Et={http:Ar,xhr:ts,fetch:{get:Sn}};c.forEach(Et,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Bt=e=>`- ${e}`,us=e=>c.isFunction(e)||e===null||e===!1;function ls(e,t){e=c.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let a;if(s=r,!us(r)&&(s=Et[(a=String(r)).toLowerCase()],s===void 0))throw new S(`Unknown adapter '${a}'`);if(s&&(c.isFunction(s)||(s=s.get(t))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
4
- `+o.map(Bt).join(`
5
- `):" "+Bt(o[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const bn={getAdapter:ls,adapters:Et};function Je(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Se(null,e)}function qt(e){return Je(e),e.headers=M.from(e.headers),e.data=ze.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bn.getAdapter(e.adapter||_e.adapter,e)(e).then(function(r){return Je(e),r.data=ze.call(e,e.transformResponse,r),r.headers=M.from(r.headers),r},function(r){return mn(r)||(Je(e),r&&r.response&&(r.response.data=ze.call(e,e.transformResponse,r.response),r.response.headers=M.from(r.response.headers))),Promise.reject(r)})}const gn="1.13.2",He={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{He[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Mt={};He.transitional=function(t,n,r){function s(i,o){return"[Axios v"+gn+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new S(s(o," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!Mt[o]&&(Mt[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};He.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function fs(e,t,n){if(typeof e!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],d=a===void 0||o(a,i,e);if(d!==!0)throw new S("option "+i+" must be "+d,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+i,S.ERR_BAD_OPTION)}}const Ie={assertOptions:fs,validators:He},Z=Ie.validators;let de=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Dt,response:new Dt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=pe(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Ie.assertOptions(r,{silentJSONParsing:Z.transitional(Z.boolean),forcedJSONParsing:Z.transitional(Z.boolean),clarifyTimeoutError:Z.transitional(Z.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:Ie.assertOptions(s,{encode:Z.function,serialize:Z.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ie.assertOptions(n,{baseUrl:Z.spelling("baseURL"),withXsrfToken:Z.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&c.merge(i.common,i[n.method]);i&&c.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),n.headers=M.concat(o,i);const a=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let l,p=0,y;if(!d){const u=[qt.bind(this),void 0];for(u.unshift(...a),u.push(...f),y=u.length,l=Promise.resolve(n);p<y;)l=l.then(u[p++],u[p++]);return l}y=a.length;let E=n;for(;p<y;){const u=a[p++],m=a[p++];try{E=u(E)}catch(h){m.call(this,h);break}}try{l=qt.call(this,E)}catch(u){return Promise.reject(u)}for(p=0,y=f.length;p<y;)l=l.then(f[p++],f[p++]);return l}getUri(t){t=pe(this.defaults,t);const n=En(t.baseURL,t.url,t.allowAbsoluteUrls);return dn(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){de.prototype[t]=function(n,r){return this.request(pe(r||{},{method:t,url:n,data:(r||{}).data}))}});c.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(pe(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}de.prototype[t]=n(),de.prototype[t+"Form"]=n(!0)});let ds=class Rn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Se(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Rn(function(s){t=s}),cancel:t}}};function ps(e){return function(n){return e.apply(null,n)}}function hs(e){return c.isObject(e)&&e.isAxiosError===!0}const ot={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ot).forEach(([e,t])=>{ot[t]=e});function On(e){const t=new de(e),n=Zt(de.prototype.request,t);return c.extend(n,de.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return On(pe(e,s))},n}const N=On(_e);N.Axios=de;N.CanceledError=Se;N.CancelToken=ds;N.isCancel=mn;N.VERSION=gn;N.toFormData=Me;N.AxiosError=S;N.Cancel=N.CanceledError;N.all=function(t){return Promise.all(t)};N.spread=ps;N.isAxiosError=hs;N.mergeConfig=pe;N.AxiosHeaders=M;N.formToJSON=e=>hn(c.isHTMLForm(e)?new FormData(e):e);N.getAdapter=bn.getAdapter;N.HttpStatusCode=ot;N.default=N;const{Axios:to,AxiosError:no,CanceledError:ro,isCancel:so,CancelToken:oo,VERSION:io,all:ao,Cancel:co,isAxiosError:uo,spread:lo,toFormData:fo,AxiosHeaders:po,HttpStatusCode:ho,formToJSON:mo,getAdapter:yo,mergeConfig:Eo}=N;var Ne={exports:{}},Ke={};var Ht;function ms(){if(Ht)return Ke;Ht=1;var e=x;function t(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function a(p,y){var E=y(),u=r({inst:{value:E,getSnapshot:y}}),m=u[0].inst,h=u[1];return i(function(){m.value=E,m.getSnapshot=y,d(m)&&h({inst:m})},[p,E,y]),s(function(){return d(m)&&h({inst:m}),p(function(){d(m)&&h({inst:m})})},[p]),o(E),E}function d(p){var y=p.getSnapshot;p=p.value;try{var E=y();return!n(p,E)}catch{return!0}}function f(p,y){return y()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:a;return Ke.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,Ke}var Ge={};var Vt;function ys(){return Vt||(Vt=1,process.env.NODE_ENV!=="production"&&(function(){function e(E,u){return E===u&&(E!==0||1/E===1/u)||E!==E&&u!==u}function t(E,u){l||s.startTransition===void 0||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=u();if(!p){var h=u();i(m,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}h=o({inst:{value:m,getSnapshot:u}});var b=h[0].inst,w=h[1];return d(function(){b.value=m,b.getSnapshot=u,n(b)&&w({inst:b})},[E,m,u]),a(function(){return n(b)&&w({inst:b}),E(function(){n(b)&&w({inst:b})})},[E]),f(m),m}function n(E){var u=E.getSnapshot;E=E.value;try{var m=u();return!i(E,m)}catch{return!0}}function r(E,u){return u()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=x,i=typeof Object.is=="function"?Object.is:e,o=s.useState,a=s.useEffect,d=s.useLayoutEffect,f=s.useDebugValue,l=!1,p=!1,y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Ge.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ge}var $t;function Es(){return $t||($t=1,process.env.NODE_ENV==="production"?Ne.exports=ms():Ne.exports=ys()),Ne.exports}var Wt=Es();const Tn=0,An=1,_n=2,zt=3;var Jt=Object.prototype.hasOwnProperty;function it(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&it(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Jt.call(e,n)&&++r&&!Jt.call(t,n)||!(n in t)||!it(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const ae=new WeakMap,ce=()=>{},I=ce(),at=Object,g=e=>e===I,ee=e=>typeof e=="function",ue=(e,t)=>({...e,...t}),Cn=e=>ee(e.then),Xe={},Fe={},wt="undefined",Ce=typeof window!=wt,ct=typeof document!=wt,ws=Ce&&"Deno"in window,Ss=()=>Ce&&typeof window.requestAnimationFrame!=wt,xn=(e,t)=>{const n=ae.get(e);return[()=>!g(t)&&e.get(t)||Xe,r=>{if(!g(t)){const s=e.get(t);t in Fe||(Fe[t]=s),n[5](t,ue(s,r),s||Xe)}},n[6],()=>!g(t)&&t in Fe?Fe[t]:!g(t)&&e.get(t)||Xe]};let ut=!0;const bs=()=>ut,[lt,ft]=Ce&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ce,ce],gs=()=>{const e=ct&&document.visibilityState;return g(e)||e!=="hidden"},Rs=e=>(ct&&document.addEventListener("visibilitychange",e),lt("focus",e),()=>{ct&&document.removeEventListener("visibilitychange",e),ft("focus",e)}),Os=e=>{const t=()=>{ut=!0,e()},n=()=>{ut=!1};return lt("online",t),lt("offline",n),()=>{ft("online",t),ft("offline",n)}},Ts={isOnline:bs,isVisible:gs},As={initFocus:Rs,initReconnect:Os},Kt=!x.useId,ye=!Ce||ws,_s=e=>Ss()?window.requestAnimationFrame(e):setTimeout(e,1),Ye=ye?x.useEffect:x.useLayoutEffect,Qe=typeof navigator<"u"&&navigator.connection,Gt=!ye&&Qe&&(["slow-2g","2g"].includes(Qe.effectiveType)||Qe.saveData),Pe=new WeakMap,Cs=e=>at.prototype.toString.call(e),Ze=(e,t)=>e===`[object ${t}]`;let xs=0;const dt=e=>{const t=typeof e,n=Cs(e),r=Ze(n,"Date"),s=Ze(n,"RegExp"),i=Ze(n,"Object");let o,a;if(at(e)===e&&!r&&!s){if(o=Pe.get(e),o)return o;if(o=++xs+"~",Pe.set(e,o),Array.isArray(e)){for(o="@",a=0;a<e.length;a++)o+=dt(e[a])+",";Pe.set(e,o)}if(i){o="#";const d=at.keys(e).sort();for(;!g(a=d.pop());)g(e[a])||(o+=a+":"+dt(e[a])+",");Pe.set(e,o)}}else o=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},St=e=>{if(ee(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?dt(e):"",[e,t]};let Ds=0;const pt=()=>++Ds;async function Dn(...e){const[t,n,r,s]=e,i=ue({populateCache:!0,throwOnError:!0},typeof s=="boolean"?{revalidate:s}:s||{});let o=i.populateCache;const a=i.rollbackOnError;let d=i.optimisticData;const f=y=>typeof a=="function"?a(y):a!==!1,l=i.throwOnError;if(ee(n)){const y=n,E=[],u=t.keys();for(const m of u)!/^\$(inf|sub)\$/.test(m)&&y(t.get(m)._k)&&E.push(m);return Promise.all(E.map(p))}return p(n);async function p(y){const[E]=St(y);if(!E)return;const[u,m]=xn(t,E),[h,b,w,A]=ae.get(t),D=()=>{const P=h[E];return(ee(i.revalidate)?i.revalidate(u().data,y):i.revalidate!==!1)&&(delete w[E],delete A[E],P&&P[0])?P[0](_n).then(()=>u().data):u().data};if(e.length<3)return D();let R=r,v,_=!1;const Y=pt();b[E]=[Y,0];const O=!g(d),te=u(),H=te.data,z=te._c,V=g(z)?H:z;if(O&&(d=ee(d)?d(V,H):d,m({data:d,_c:V})),ee(R))try{R=R(V)}catch(P){v=P,_=!0}if(R&&Cn(R))if(R=await R.catch(P=>{v=P,_=!0}),Y!==b[E][0]){if(_)throw v;return R}else _&&O&&f(v)&&(o=!0,m({data:V,_c:I}));if(o&&!_)if(ee(o)){const P=o(R,V);m({data:P,error:I,_c:I})}else m({data:R,error:I,_c:I});if(b[E][1]=pt(),Promise.resolve(D()).then(()=>{m({_c:I})}),_){if(l)throw v;return}return R}}const Xt=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Ls=(e,t)=>{if(!ae.has(e)){const n=ue(As,t),r=Object.create(null),s=Dn.bind(I,e);let i=ce;const o=Object.create(null),a=(l,p)=>{const y=o[l]||[];return o[l]=y,y.push(p),()=>y.splice(y.indexOf(p),1)},d=(l,p,y)=>{e.set(l,p);const E=o[l];if(E)for(const u of E)u(p,y)},f=()=>{if(!ae.has(e)&&(ae.set(e,[r,Object.create(null),Object.create(null),Object.create(null),s,d,a]),!ye)){const l=n.initFocus(setTimeout.bind(I,Xt.bind(I,r,Tn))),p=n.initReconnect(setTimeout.bind(I,Xt.bind(I,r,An)));i=()=>{l&&l(),p&&p(),ae.delete(e)}}};return f(),[e,s,f,i]}return[e,ae.get(e)[4]]},Ns=(e,t,n,r,s)=>{const i=n.errorRetryCount,o=s.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!g(i)&&o>i||setTimeout(r,a,s)},Fs=it,[Ln,Ps]=Ls(new Map),vs=ue({onLoadingSlow:ce,onSuccess:ce,onError:ce,onErrorRetry:Ns,onDiscarded:ce,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Gt?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Gt?5e3:3e3,compare:Fs,isPaused:()=>!1,cache:Ln,mutate:Ps,fallback:{}},Ts),Us=(e,t)=>{const n=ue(e,t);if(t){const{use:r,fallback:s}=e,{use:i,fallback:o}=t;r&&i&&(n.use=r.concat(i)),s&&o&&(n.fallback=ue(s,o))}return n},Is=x.createContext({}),ks="$inf$",Nn=Ce&&window.__SWR_DEVTOOLS_USE__,js=Nn?window.__SWR_DEVTOOLS_USE__:[],Bs=()=>{Nn&&(window.__SWR_DEVTOOLS_REACT__=x)},Fn=e=>ee(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],qs=()=>{const e=x.useContext(Is);return x.useMemo(()=>ue(vs,e),[e])},Ms=e=>(t,n,r)=>e(t,n&&((...i)=>{const[o]=St(t),[,,,a]=ae.get(Ln);if(o.startsWith(ks))return n(...i);const d=a[o];return g(d)?n(...i):(delete a[o],d)}),r),Hs=js.concat(Ms),Vs=e=>function(...n){const r=qs(),[s,i,o]=Fn(n),a=Us(r,o);let d=e;const{use:f}=a,l=(f||[]).concat(Hs);for(let p=l.length;p--;)d=l[p](d);return d(s,i||a.fetcher||null,a)},$s=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const s=r.indexOf(n);s>=0&&(r[s]=r[r.length-1],r.pop())}},Ws=(e,t)=>(...n)=>{const[r,s,i]=Fn(n),o=(i.use||[]).concat(t);return e(r,s,{...i,use:o})};Bs();const et=x.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),tt={dedupe:!0},Yt=Promise.resolve(I),zs=(e,t,n)=>{const{cache:r,compare:s,suspense:i,fallbackData:o,revalidateOnMount:a,revalidateIfStale:d,refreshInterval:f,refreshWhenHidden:l,refreshWhenOffline:p,keepPreviousData:y,strictServerPrefetchWarning:E}=n,[u,m,h,b]=ae.get(r),[w,A]=St(e),D=x.useRef(!1),R=x.useRef(!1),v=x.useRef(w),_=x.useRef(t),Y=x.useRef(n),O=()=>Y.current,te=()=>O().isVisible()&&O().isOnline(),[H,z,V,P]=xn(r,w),ne=x.useRef({}).current,j=g(o)?g(n.fallback)?I:n.fallback[w]:o,be=(T,C)=>{for(const F in ne){const L=F;if(L==="data"){if(!s(T[L],C[L])&&(!g(T[L])||!s(De,C[L])))return!1}else if(C[L]!==T[L])return!1}return!0},J=x.useMemo(()=>{const T=!w||!t?!1:g(a)?O().isPaused()||i?!1:d!==!1:a,C=B=>{const oe=ue(B);return delete oe._k,T?{isValidating:!0,isLoading:!0,...oe}:oe},F=H(),L=P(),G=C(F),me=F===L?G:C(L);let U=G;return[()=>{const B=C(H());return be(B,U)?(U.data=B.data,U.isLoading=B.isLoading,U.isValidating=B.isValidating,U.error=B.error,U):(U=B,B)},()=>me]},[r,w]),re=Wt.useSyncExternalStore(x.useCallback(T=>V(w,(C,F)=>{be(F,C)||T()}),[r,w]),J[0],J[1]),xe=!D.current,Q=u[w]&&u[w].length>0,$=re.data,K=g($)?j&&Cn(j)?et(j):j:$,se=re.error,he=x.useRef(K),De=y?g($)?g(he.current)?K:he.current:$:K,le=w&&g(K),vn=!ye&&Wt.useSyncExternalStore(()=>ce,()=>!1,()=>!0);E&&vn&&!i&&le&&console.warn(`Missing pre-initiated data for serialized key "${w}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const bt=Q&&!g(se)?!1:xe&&!g(a)?a:O().isPaused()?!1:i?g(K)?!1:d:g(K)||d,gt=!!(w&&t&&xe&&bt),Un=g(re.isValidating)?gt:re.isValidating,In=g(re.isLoading)?gt:re.isLoading,ge=x.useCallback(async T=>{const C=_.current;if(!w||!C||R.current||O().isPaused())return!1;let F,L,G=!0;const me=T||{},U=!h[w]||!me.dedupe,B=()=>Kt?!R.current&&w===v.current&&D.current:w===v.current,oe={isValidating:!1,isLoading:!1},Ot=()=>{z(oe)},Tt=()=>{const W=h[w];W&&W[1]===L&&delete h[w]},At={isValidating:!0};g(H().data)&&(At.isLoading=!0);try{if(U&&(z(At),n.loadingTimeout&&g(H().data)&&setTimeout(()=>{G&&B()&&O().onLoadingSlow(w,n)},n.loadingTimeout),h[w]=[C(A),pt()]),[F,L]=h[w],F=await F,U&&setTimeout(Tt,n.dedupingInterval),!h[w]||h[w][1]!==L)return U&&B()&&O().onDiscarded(w),!1;oe.error=I;const W=m[w];if(!g(W)&&(L<=W[0]||L<=W[1]||W[1]===0))return Ot(),U&&B()&&O().onDiscarded(w),!1;const ie=H().data;oe.data=s(ie,F)?ie:F,U&&B()&&O().onSuccess(F,w,n)}catch(W){Tt();const ie=O(),{shouldRetryOnError:Ve}=ie;ie.isPaused()||(oe.error=W,U&&B()&&(ie.onError(W,w,ie),(Ve===!0||ee(Ve)&&Ve(W))&&(!O().revalidateOnFocus||!O().revalidateOnReconnect||te())&&ie.onErrorRetry(W,w,ie,kn=>{const $e=u[w];$e&&$e[0]&&$e[0](zt,kn)},{retryCount:(me.retryCount||0)+1,dedupe:!0})))}return G=!1,Ot(),!0},[w,r]),Rt=x.useCallback((...T)=>Dn(r,v.current,...T),[]);if(Ye(()=>{_.current=t,Y.current=n,g($)||(he.current=$)}),Ye(()=>{if(!w)return;const T=ge.bind(I,tt);let C=0;O().revalidateOnFocus&&(C=Date.now()+O().focusThrottleInterval);const L=$s(w,u,(G,me={})=>{if(G==Tn){const U=Date.now();O().revalidateOnFocus&&U>C&&te()&&(C=U+O().focusThrottleInterval,T())}else if(G==An)O().revalidateOnReconnect&&te()&&T();else{if(G==_n)return ge();if(G==zt)return ge(me)}});return R.current=!1,v.current=w,D.current=!0,z({_k:A}),bt&&(h[w]||(g(K)||ye?T():_s(T))),()=>{R.current=!0,L()}},[w]),Ye(()=>{let T;function C(){const L=ee(f)?f(H().data):f;L&&T!==-1&&(T=setTimeout(F,L))}function F(){!H().error&&(l||O().isVisible())&&(p||O().isOnline())?ge(tt).then(C):C()}return C(),()=>{T&&(clearTimeout(T),T=-1)}},[f,l,p,w]),x.useDebugValue(De),i){if(!Kt&&ye&&le)throw new Error("Fallback data is required when using Suspense in SSR.");le&&(_.current=t,Y.current=n,R.current=!1);const T=b[w],C=!g(T)&&le?Rt(T):Yt;if(et(C),!g(se)&&le)throw se;const F=le?ge(tt):Yt;!g(De)&&le&&(F.status="fulfilled",F.value=!0),et(F)}return{mutate:Rt,get data(){return ne.data=!0,De},get error(){return ne.error=!0,se},get isValidating(){return ne.isValidating=!0,Un},get isLoading(){return ne.isLoading=!0,In}}},Js=Vs(zs),Ks=6048e5,Gs=864e5,Xs=6e4,Qt=Symbol.for("constructDateFrom");function Pn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Qt in e?e[Qt](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ys(e,t){return Pn(t||e,e)}exports.Link=Bn;exports.axios=N;exports.constructFrom=Pn;exports.millisecondsInDay=Gs;exports.millisecondsInMinute=Xs;exports.millisecondsInWeek=Ks;exports.toDate=Ys;exports.useSWR=Js;exports.withMiddleware=Ws;