Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads
"use strict";(()=>{var nr=Object.defineProperty;var or=(t,e)=>{for(var r in e)nr(t,r,{get:e[r],enumerable:!0})};function lt(t){let e=document.cookie.split("; ");for(let r of e){let[n,o]=r.split("=");if(n===t)return decodeURIComponent(o)}return null}function ke(t,e,r={}){let n=`${encodeURIComponent(t)}=${encodeURIComponent(e)}`;if(r.expires){let o=r.expires instanceof Date?r.expires.toUTCString():r.expires;n+=`; expires=${o}`}r.path&&(n+=`; path=${r.path}`),r.domain&&(n+=`; domain=${r.domain}`),r.secure&&(n+="; secure"),document.cookie=n}var R=class{static{this.UserID=null}static{this.SessionToken=null}static getSessionId(){return lt("sessionId")}static setSessionId(e,r){ke("sessionId",e,{expires:r})}static clearSessionId(){ke("sessionId","",{expires:new Date(0)})}static login(e,r){this.setSessionId(e,r)}static logout(){this.clearSessionId()}static isLoggedIn(){let e=this.getSessionId();return e!=null&&e!==""}};var sr=t=>{if(!t){console.error("Invalid URL");return}window.location.href=t},P=sr;var Be=class{constructor(){this.API_URL="http://87.106.224.51:5010/api";this.ProdOrDebug="production";this.IsProduction=()=>this.ProdOrDebug==="production";this.IsDebug=()=>this.ProdOrDebug==="development";this.RequestStability=500}},ir=new Be,$=ir;var I=class{static log(e){console.log(e)}static error(e){console.log("[ERROR] "+e)}static warn(e){console.log("[WARN] "+e)}static debug(e){$.IsDebug()&&console.log("[DEBUG] "+e)}static info(e){console.log("[INFO] "+e)}};var _e=class{constructor(){this.topBar=document.getElementById("top-bar");this.topBarLeft=document.getElementById("top-bar-left");this.topBarRight=document.getElementById("top-bar-right");this.topbar_MyLists=document.getElementById("topbar-MyLists");this.topbar_Logout=document.getElementById("topbar-Logout");this.topbar_Login=document.getElementById("topbar-Login");this.topbar_Register=document.getElementById("topbar-Register");this.topbar_Profile=document.getElementById("topbar-Profile");I.debug("TopBarModule scaffolded.")}async Init(e){this.addEventListeners(),!(e===void 0||await e!==!0)&&(this.topbar_MyLists.style.display="block",this.topbar_Profile.style.display="block",this.topbar_Logout.style.display="block",this.topbar_Login.style.display="none",this.topbar_Register.style.display="none")}async render(){}addEventListeners(){this.topbar_Logout.addEventListener("click",async()=>{confirm("Are you sure you want to log out?")&&(R.logout(),P("./index.html"))}),this.topbar_Login.addEventListener("click",async()=>{P("./login.html")}),this.topbar_Register.addEventListener("click",async()=>{P("./register.html")}),this.topbar_Profile.addEventListener("click",async()=>{P("./accountPage.html")}),this.topbar_MyLists.addEventListener("click",async()=>{P("./myLists.html")})}},ut=_e;function G(t,e){return function(){return t.apply(e,arguments)}}var{toString:ar}=Object.prototype,{getPrototypeOf:He}=Object,{iterator:pe,toStringTag:ft}=Symbol,me=(t=>e=>{let r=ar.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),D=t=>(t=t.toLowerCase(),e=>me(e)===t),he=t=>e=>typeof e===t,{isArray:j}=Array,K=he("undefined");function cr(t){return t!==null&&!K(t)&&t.constructor!==null&&!K(t.constructor)&&O(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var pt=D("ArrayBuffer");function lr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&pt(t.buffer),e}var ur=he("string"),O=he("function"),mt=he("number"),be=t=>t!==null&&typeof t=="object",dr=t=>t===!0||t===!1,fe=t=>{if(me(t)!=="object")return!1;let e=He(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ft in t)&&!(pe in t)},fr=D("Date"),pr=D("File"),mr=D("Blob"),hr=D("FileList"),br=t=>be(t)&&O(t.pipe),gr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||O(t.append)&&((e=me(t))==="formdata"||e==="object"&&O(t.toString)&&t.toString()==="[object FormData]"))},yr=D("URLSearchParams"),[wr,Er,xr,Sr]=["ReadableStream","Request","Response","Headers"].map(D),Lr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function X(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),j(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{let s=r?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length,c;for(n=0;n<i;n++)c=s[n],e.call(null,t[c],c,t)}}function ht(t,e){e=e.toLowerCase();let r=Object.keys(t),n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}var W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bt=t=>!K(t)&&t!==W;function Me(){let{caseless:t}=bt(this)&&this||{},e={},r=(n,o)=>{let s=t&&ht(e,o)||o;fe(e[s])&&fe(n)?e[s]=Me(e[s],n):fe(n)?e[s]=Me({},n):j(n)?e[s]=n.slice():e[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&X(arguments[n],r);return e}var Rr=(t,e,r,{allOwnKeys:n}={})=>(X(e,(o,s)=>{r&&O(o)?t[s]=G(o,r):t[s]=o},{allOwnKeys:n}),t),Tr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Cr=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Ar=(t,e,r,n)=>{let o,s,i,c={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)i=o[s],(!n||n(i,t,e))&&!c[i]&&(e[i]=t[i],c[i]=!0);t=r!==!1&&He(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Or=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},Ir=t=>{if(!t)return null;if(j(t))return t;let e=t.length;if(!mt(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Pr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&He(Uint8Array)),Dr=(t,e)=>{let n=(t&&t[pe]).call(t),o;for(;(o=n.next())&&!o.done;){let s=o.value;e.call(t,s[0],s[1])}},Nr=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Fr=D("HTMLFormElement"),Ur=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),dt=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),kr=D("RegExp"),gt=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};X(r,(o,s)=>{let i;(i=e(o,s,t))!==!1&&(n[s]=i||o)}),Object.defineProperties(t,n)},Br=t=>{gt(t,(e,r)=>{if(O(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=t[r];if(O(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},_r=(t,e)=>{let r={},n=o=>{o.forEach(s=>{r[s]=!0})};return j(t)?n(t):n(String(t).split(e)),r},Mr=()=>{},Hr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Wr(t){return!!(t&&O(t.append)&&t[ft]==="FormData"&&t[pe])}var jr=t=>{let e=new Array(10),r=(n,o)=>{if(be(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;let s=j(n)?[]:{};return X(n,(i,c)=>{let d=r(i,o+1);!K(d)&&(s[c]=d)}),e[o]=void 0,s}}return n};return r(t,0)},vr=D("AsyncFunction"),qr=t=>t&&(be(t)||O(t))&&O(t.then)&&O(t.catch),yt=((t,e)=>t?setImmediate:e?((r,n)=>(W.addEventListener("message",({source:o,data:s})=>{o===W&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),W.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",O(W.postMessage)),zr=typeof queueMicrotask<"u"?queueMicrotask.bind(W):typeof process<"u"&&process.nextTick||yt,Jr=t=>t!=null&&O(t[pe]),a={isArray:j,isArrayBuffer:pt,isBuffer:cr,isFormData:gr,isArrayBufferView:lr,isString:ur,isNumber:mt,isBoolean:dr,isObject:be,isPlainObject:fe,isReadableStream:wr,isRequest:Er,isResponse:xr,isHeaders:Sr,isUndefined:K,isDate:fr,isFile:pr,isBlob:mr,isRegExp:kr,isFunction:O,isStream:br,isURLSearchParams:yr,isTypedArray:Pr,isFileList:hr,forEach:X,merge:Me,extend:Rr,trim:Lr,stripBOM:Tr,inherits:Cr,toFlatObject:Ar,kindOf:me,kindOfTest:D,endsWith:Or,toArray:Ir,forEachEntry:Dr,matchAll:Nr,isHTMLForm:Fr,hasOwnProperty:dt,hasOwnProp:dt,reduceDescriptors:gt,freezeMethods:Br,toObjectSet:_r,toCamelCase:Ur,noop:Mr,toFiniteNumber:Hr,findKey:ht,global:W,isContextDefined:bt,isSpecCompliantForm:Wr,toJSONObject:jr,isAsyncFn:vr,isThenable:qr,setImmediate:yt,asap:zr,isIterable:Jr};function v(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}a.inherits(v,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});var wt=v.prototype,Et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Et[t]={value:t}});Object.defineProperties(v,Et);Object.defineProperty(wt,"isAxiosError",{value:!0});v.from=(t,e,r,n,o,s)=>{let i=Object.create(wt);return a.toFlatObject(t,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),v.call(i,t.message,e,r,n,o),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};var h=v;var ge=null;function We(t){return a.isPlainObject(t)||a.isArray(t)}function St(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function xt(t,e,r){return t?t.concat(e).map(function(o,s){return o=St(o),!r&&s?"["+o+"]":o}).join(r?".":""):e}function Vr(t){return a.isArray(t)&&!t.some(We)}var $r=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function Gr(t,e,r){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new(ge||FormData),r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,m){return!a.isUndefined(m[b])});let n=r.metaTokens,o=r.visitor||u,s=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(o))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!d&&a.isBlob(p))throw new h("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?d&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,b,m){let w=p;if(p&&!m&&typeof p=="object"){if(a.endsWith(b,"{}"))b=n?b:b.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&Vr(p)||(a.isFileList(p)||a.endsWith(b,"[]"))&&(w=a.toArray(p)))return b=St(b),w.forEach(function(C,B){!(a.isUndefined(C)||C===null)&&e.append(i===!0?xt([b],B,s):i===null?b:b+"[]",l(C))}),!1}return We(p)?!0:(e.append(xt(m,b,s),l(p)),!1)}let f=[],g=Object.assign($r,{defaultVisitor:u,convertValue:l,isVisitable:We});function S(p,b){if(!a.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+b.join("."));f.push(p),a.forEach(p,function(w,L){(!(a.isUndefined(w)||w===null)&&o.call(e,w,a.isString(L)?L.trim():L,b,g))===!0&&S(w,b?b.concat(L):[L])}),f.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return S(t),e}var M=Gr;function Lt(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Rt(t,e){this._pairs=[],t&&M(t,this,e)}var Tt=Rt.prototype;Tt.append=function(e,r){this._pairs.push([e,r])};Tt.toString=function(e){let r=e?function(n){return e.call(this,n,Lt)}:Lt;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};var ye=Rt;function Kr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Q(t,e,r){if(!e)return t;let n=r&&r.encode||Kr;a.isFunction(r)&&(r={serialize:r});let o=r&&r.serialize,s;if(o?s=o(e,r):s=a.isURLSearchParams(e)?e.toString():new ye(e,r).toString(n),s){let i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var je=class{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(n){n!==null&&e(n)})}},ve=je;var we={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Ct=typeof URLSearchParams<"u"?URLSearchParams:ye;var At=typeof FormData<"u"?FormData:null;var Ot=typeof Blob<"u"?Blob:null;var It={isBrowser:!0,classes:{URLSearchParams:Ct,FormData:At,Blob:Ot},protocols:["http","https","file","blob","url","data"]};var Je={};or(Je,{hasBrowserEnv:()=>ze,hasStandardBrowserEnv:()=>Xr,hasStandardBrowserWebWorkerEnv:()=>Qr,navigator:()=>qe,origin:()=>Zr});var ze=typeof window<"u"&&typeof document<"u",qe=typeof navigator=="object"&&navigator||void 0,Xr=ze&&(!qe||["ReactNative","NativeScript","NS"].indexOf(qe.product)<0),Qr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Zr=ze&&window.location.href||"http://localhost";var y={...Je,...It};function Ve(t,e){return M(t,new y.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,s){return y.isNode&&a.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Yr(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function en(t){let e={},r=Object.keys(t),n,o=r.length,s;for(n=0;n<o;n++)s=r[n],e[s]=t[s];return e}function tn(t){function e(r,n,o,s){let i=r[s++];if(i==="__proto__")return!0;let c=Number.isFinite(+i),d=s>=r.length;return i=!i&&a.isArray(o)?o.length:i,d?(a.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!c):((!o[i]||!a.isObject(o[i]))&&(o[i]=[]),e(r,n,o[i],s)&&a.isArray(o[i])&&(o[i]=en(o[i])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){let r={};return a.forEachEntry(t,(n,o)=>{e(Yr(n),o,r,0)}),r}return null}var Ee=tn;function rn(t,e,r){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var $e={transitional:we,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=a.isObject(e);if(s&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return o?JSON.stringify(Ee(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Ve(e,this.formSerializer).toString();if((c=a.isFileList(e))||n.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return M(c?{"files[]":e}:e,d&&new d,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),rn(e)):e}],transformResponse:[function(e){let r=this.transitional||$e.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(n&&!this.responseType||o)){let i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(c){if(i)throw c.name==="SyntaxError"?h.from(c,h.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:y.classes.FormData,Blob:y.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{$e.headers[t]={}});var q=$e;var nn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Pt=t=>{let e={},r,n,o;return t&&t.split(`
`).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||e[r]&&nn[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};var Dt=Symbol("internals");function Z(t){return t&&String(t).trim().toLowerCase()}function xe(t){return t===!1||t==null?t:a.isArray(t)?t.map(xe):String(t)}function on(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}var sn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ge(t,e,r,n,o){if(a.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!a.isString(e)){if(a.isString(n))return e.indexOf(n)!==-1;if(a.isRegExp(n))return n.test(e)}}function an(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function cn(t,e){let r=a.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(o,s,i){return this[n].call(this,e,o,s,i)},configurable:!0})})}var z=class{constructor(e){e&&this.set(e)}set(e,r,n){let o=this;function s(c,d,l){let u=Z(d);if(!u)throw new Error("header name must be a non-empty string");let f=a.findKey(o,u);(!f||o[f]===void 0||l===!0||l===void 0&&o[f]!==!1)&&(o[f||d]=xe(c))}let i=(c,d)=>a.forEach(c,(l,u)=>s(l,u,d));if(a.isPlainObject(e)||e instanceof this.constructor)i(e,r);else if(a.isString(e)&&(e=e.trim())&&!sn(e))i(Pt(e),r);else if(a.isObject(e)&&a.isIterable(e)){let c={},d,l;for(let u of e){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(d=c[l])?a.isArray(d)?[...d,u[1]]:[d,u[1]]:u[1]}i(c,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=Z(e),e){let n=a.findKey(this,e);if(n){let o=this[n];if(!r)return o;if(r===!0)return on(o);if(a.isFunction(r))return r.call(this,o,n);if(a.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Z(e),e){let n=a.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Ge(this,this[n],n,r)))}return!1}delete(e,r){let n=this,o=!1;function s(i){if(i=Z(i),i){let c=a.findKey(n,i);c&&(!r||Ge(n,n[c],c,r))&&(delete n[c],o=!0)}}return a.isArray(e)?e.forEach(s):s(e),o}clear(e){let r=Object.keys(this),n=r.length,o=!1;for(;n--;){let s=r[n];(!e||Ge(this,this[s],s,e,!0))&&(delete this[s],o=!0)}return o}normalize(e){let r=this,n={};return a.forEach(this,(o,s)=>{let i=a.findKey(n,s);if(i){r[i]=xe(o),delete r[s];return}let c=e?an(s):String(s).trim();c!==s&&delete r[s],r[c]=xe(o),n[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return a.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&a.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){let n=(this[Dt]=this[Dt]={accessors:{}}).accessors,o=this.prototype;function s(i){let c=Z(i);n[c]||(cn(o,i),n[c]=!0)}return a.isArray(e)?e.forEach(s):s(e),this}};z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(z.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});a.freezeMethods(z);var T=z;function Y(t,e){let r=this||q,n=e||r,o=T.from(n.headers),s=n.data;return a.forEach(t,function(c){s=c.call(r,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function ee(t){return!!(t&&t.__CANCEL__)}function Nt(t,e,r){h.call(this,t??"canceled",h.ERR_CANCELED,e,r),this.name="CanceledError"}a.inherits(Nt,h,{__CANCEL__:!0});var U=Nt;function te(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new h("Request failed with status code "+r.status,[h.ERR_BAD_REQUEST,h.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ke(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ln(t,e){t=t||10;let r=new Array(t),n=new Array(t),o=0,s=0,i;return e=e!==void 0?e:1e3,function(d){let l=Date.now(),u=n[s];i||(i=l),r[o]=d,n[o]=l;let f=s,g=0;for(;f!==o;)g+=r[f++],f=f%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),l-i<e)return;let S=u&&l-u;return S?Math.round(g*1e3/S):void 0}}var Ft=ln;function un(t,e){let r=0,n=1e3/e,o,s,i=(l,u=Date.now())=>{r=u,o=null,s&&(clearTimeout(s),s=null),t.apply(null,l)};return[(...l)=>{let u=Date.now(),f=u-r;f>=n?i(l,u):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},n-f)))},()=>o&&i(o)]}var Ut=un;var J=(t,e,r=3)=>{let n=0,o=Ft(50,250);return Ut(s=>{let i=s.loaded,c=s.lengthComputable?s.total:void 0,d=i-n,l=o(d),u=i<=c;n=i;let f={loaded:i,total:c,progress:c?i/c:void 0,bytes:d,rate:l||void 0,estimated:l&&c&&u?(c-i)/l:void 0,event:s,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(f)},r)},Xe=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Qe=t=>(...e)=>a.asap(()=>t(...e));var kt=y.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,y.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(y.origin),y.navigator&&/(msie|trident)/i.test(y.navigator.userAgent)):()=>!0;var Bt=y.hasStandardBrowserEnv?{write(t,e,r,n,o,s){let i=[t+"="+encodeURIComponent(e)];a.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),a.isString(n)&&i.push("path="+n),a.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){let e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ze(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ye(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function re(t,e,r){let n=!Ze(e);return t&&(n||r==!1)?Ye(t,e):e}var _t=t=>t instanceof T?{...t}:t;function N(t,e){e=e||{};let r={};function n(l,u,f,g){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:g},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function o(l,u,f,g){if(a.isUndefined(u)){if(!a.isUndefined(l))return n(void 0,l,f,g)}else return n(l,u,f,g)}function s(l,u){if(!a.isUndefined(u))return n(void 0,u)}function i(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function c(l,u,f){if(f in e)return n(l,u);if(f in t)return n(void 0,l)}let d={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(l,u,f)=>o(_t(l),_t(u),f,!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(u){let f=d[u]||o,g=f(t[u],e[u],u);a.isUndefined(g)&&f!==c||(r[u]=g)}),r}var Se=t=>{let e=N({},t),{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:c}=e;e.headers=i=T.from(i),e.url=Q(re(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let d;if(a.isFormData(r)){if(y.hasStandardBrowserEnv||y.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){let[l,...u]=d?d.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if(y.hasStandardBrowserEnv&&(n&&a.isFunction(n)&&(n=n(e)),n||n!==!1&&kt(e.url))){let l=o&&s&&Bt.read(s);l&&i.set(o,l)}return e};var dn=typeof XMLHttpRequest<"u",Mt=dn&&function(t){return new Promise(function(r,n){let o=Se(t),s=o.data,i=T.from(o.headers).normalize(),{responseType:c,onUploadProgress:d,onDownloadProgress:l}=o,u,f,g,S,p;function b(){S&&S(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout;function w(){if(!m)return;let C=T.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),A={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:C,config:t,request:m};te(function(H){r(H),b()},function(H){n(H),b()},A),m=null}"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(w)},m.onabort=function(){m&&(n(new h("Request aborted",h.ECONNABORTED,t,m)),m=null)},m.onerror=function(){n(new h("Network Error",h.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let B=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",A=o.transitional||we;o.timeoutErrorMessage&&(B=o.timeoutErrorMessage),n(new h(B,A.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,m)),m=null},s===void 0&&i.setContentType(null),"setRequestHeader"in m&&a.forEach(i.toJSON(),function(B,A){m.setRequestHeader(A,B)}),a.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),c&&c!=="json"&&(m.responseType=o.responseType),l&&([g,p]=J(l,!0),m.addEventListener("progress",g)),d&&m.upload&&([f,S]=J(d),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",S)),(o.cancelToken||o.signal)&&(u=C=>{m&&(n(!C||C.type?new U(null,t,m):C),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));let L=Ke(o.url);if(L&&y.protocols.indexOf(L)===-1){n(new h("Unsupported protocol "+L+":",h.ERR_BAD_REQUEST,t));return}m.send(s||null)})};var fn=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,o,s=function(l){if(!o){o=!0,c();let u=l instanceof Error?l:this.reason;n.abort(u instanceof h?u:new U(u instanceof Error?u.message:u))}},i=e&&setTimeout(()=>{i=null,s(new h(`timeout ${e} of ms exceeded`,h.ETIMEDOUT))},e),c=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),t=null)};t.forEach(l=>l.addEventListener("abort",s));let{signal:d}=n;return d.unsubscribe=()=>a.asap(c),d}},Ht=fn;var pn=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},mn=async function*(t,e){for await(let r of hn(t))yield*pn(r,e)},hn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},et=(t,e,r,n)=>{let o=mn(t,e),s=0,i,c=d=>{i||(i=!0,n&&n(d))};return new ReadableStream({async pull(d){try{let{done:l,value:u}=await o.next();if(l){c(),d.close();return}let f=u.byteLength;if(r){let g=s+=f;r(g)}d.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(d){return c(d),o.return()}},{highWaterMark:2})};var Re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",jt=Re&&typeof ReadableStream=="function",bn=Re&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),vt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},gn=jt&&vt(()=>{let t=!1,e=new Request(y.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Wt=64*1024,tt=jt&&vt(()=>a.isReadableStream(new Response("").body)),Le={stream:tt&&(t=>t.body)};Re&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Le[e]&&(Le[e]=a.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new h(`Response type '${e}' is not supported`,h.ERR_NOT_SUPPORT,n)})})})(new Response);var yn=async t=>{if(t==null)return 0;if(a.isBlob(t))return t.size;if(a.isSpecCompliantForm(t))return(await new Request(y.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(a.isArrayBufferView(t)||a.isArrayBuffer(t))return t.byteLength;if(a.isURLSearchParams(t)&&(t=t+""),a.isString(t))return(await bn(t)).byteLength},wn=async(t,e)=>{let r=a.toFiniteNumber(t.getContentLength());return r??yn(e)},qt=Re&&(async t=>{let{url:e,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:d,responseType:l,headers:u,withCredentials:f="same-origin",fetchOptions:g}=Se(t);l=l?(l+"").toLowerCase():"text";let S=Ht([o,s&&s.toAbortSignal()],i),p,b=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),m;try{if(d&&gn&&r!=="get"&&r!=="head"&&(m=await wn(u,n))!==0){let A=new Request(e,{method:"POST",body:n,duplex:"half"}),_;if(a.isFormData(n)&&(_=A.headers.get("content-type"))&&u.setContentType(_),A.body){let[H,de]=Xe(m,J(Qe(d)));n=et(A.body,Wt,H,de)}}a.isString(f)||(f=f?"include":"omit");let w="credentials"in Request.prototype;p=new Request(e,{...g,signal:S,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:w?f:void 0});let L=await fetch(p),C=tt&&(l==="stream"||l==="response");if(tt&&(c||C&&b)){let A={};["status","statusText","headers"].forEach(ct=>{A[ct]=L[ct]});let _=a.toFiniteNumber(L.headers.get("content-length")),[H,de]=c&&Xe(_,J(Qe(c),!0))||[];L=new Response(et(L.body,Wt,H,()=>{de&&de(),b&&b()}),A)}l=l||"text";let B=await Le[a.findKey(Le,l)||"text"](L,t);return!C&&b&&b(),await new Promise((A,_)=>{te(A,_,{data:B,headers:T.from(L.headers),status:L.status,statusText:L.statusText,config:t,request:p})})}catch(w){throw b&&b(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new h("Network Error",h.ERR_NETWORK,t,p),{cause:w.cause||w}):h.from(w,w&&w.code,t,p)}});var rt={http:ge,xhr:Mt,fetch:qt};a.forEach(rt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});var zt=t=>`- ${t}`,En=t=>a.isFunction(t)||t===null||t===!1,Te={getAdapter:t=>{t=a.isArray(t)?t:[t];let{length:e}=t,r,n,o={};for(let s=0;s<e;s++){r=t[s];let i;if(n=r,!En(r)&&(n=rt[(i=String(r)).toLowerCase()],n===void 0))throw new h(`Unknown adapter '${i}'`);if(n)break;o[i||"#"+s]=n}if(!n){let s=Object.entries(o).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build")),i=e?s.length>1?`since :
`+s.map(zt).join(`
`):" "+zt(s[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:rt};function nt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new U(null,t)}function Ce(t){return nt(t),t.headers=T.from(t.headers),t.data=Y.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Te.getAdapter(t.adapter||q.adapter)(t).then(function(n){return nt(t),n.data=Y.call(t,t.transformResponse,n),n.headers=T.from(n.headers),n},function(n){return ee(n)||(nt(t),n&&n.response&&(n.response.data=Y.call(t,t.transformResponse,n.response),n.response.headers=T.from(n.response.headers))),Promise.reject(n)})}var Ae="1.9.0";var Oe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Oe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Jt={};Oe.transitional=function(e,r,n){function o(s,i){return"[Axios v"+Ae+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,c)=>{if(e===!1)throw new h(o(i," has been removed"+(r?" in "+r:"")),h.ERR_DEPRECATED);return r&&!Jt[i]&&(Jt[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,i,c):!0}};Oe.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function xn(t,e,r){if(typeof t!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),o=n.length;for(;o-- >0;){let s=n[o],i=e[s];if(i){let c=t[s],d=c===void 0||i(c,s,t);if(d!==!0)throw new h("option "+s+" must be "+d,h.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new h("Unknown option "+s,h.ERR_BAD_OPTION)}}var ne={assertOptions:xn,validators:Oe};var k=ne.validators,V=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ve,response:new ve}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;let s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=N(this.defaults,r);let{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&ne.assertOptions(n,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),o!=null&&(a.isFunction(o)?r.paramsSerializer={serialize:o}:ne.assertOptions(o,{encode:k.function,serialize:k.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ne.assertOptions(r,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&a.merge(s.common,s[r.method]);s&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),r.headers=T.concat(i,s);let c=[],d=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(d=d&&b.synchronous,c.unshift(b.fulfilled,b.rejected))});let l=[];this.interceptors.response.forEach(function(b){l.push(b.fulfilled,b.rejected)});let u,f=0,g;if(!d){let p=[Ce.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,l),g=p.length,u=Promise.resolve(r);f<g;)u=u.then(p[f++],p[f++]);return u}g=c.length;let S=r;for(f=0;f<g;){let p=c[f++],b=c[f++];try{S=p(S)}catch(m){b.call(this,m);break}}try{u=Ce.call(this,S)}catch(p){return Promise.reject(p)}for(f=0,g=l.length;f<g;)u=u.then(l[f++],l[f++]);return u}getUri(e){e=N(this.defaults,e);let r=re(e.baseURL,e.url,e.allowAbsoluteUrls);return Q(r,e.params,e.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(e){V.prototype[e]=function(r,n){return this.request(N(n||{},{method:e,url:r,data:(n||{}).data}))}});a.forEach(["post","put","patch"],function(e){function r(n){return function(s,i,c){return this.request(N(c||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}V.prototype[e]=r(),V.prototype[e+"Form"]=r(!0)});var oe=V;var ot=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s,i=new Promise(c=>{n.subscribe(c),s=c}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},e(function(s,i,c){n.reason||(n.reason=new U(s,i,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(o){e=o}),cancel:e}}},Vt=ot;function st(t){return function(r){return t.apply(null,r)}}function it(t){return a.isObject(t)&&t.isAxiosError===!0}var at={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(at).forEach(([t,e])=>{at[e]=t});var $t=at;function Gt(t){let e=new oe(t),r=G(oe.prototype.request,e);return a.extend(r,oe.prototype,e,{allOwnKeys:!0}),a.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return Gt(N(t,o))},r}var x=Gt(q);x.Axios=oe;x.CanceledError=U;x.CancelToken=Vt;x.isCancel=ee;x.VERSION=Ae;x.toFormData=M;x.AxiosError=h;x.Cancel=x.CanceledError;x.all=function(e){return Promise.all(e)};x.spread=st;x.isAxiosError=it;x.mergeConfig=N;x.AxiosHeaders=T;x.formToJSON=t=>Ee(a.isHTMLForm(t)?new FormData(t):t);x.getAdapter=Te.getAdapter;x.HttpStatusCode=$t;x.default=x;var se=x;var{Axios:Hi,AxiosError:Wi,CanceledError:ji,isCancel:vi,CancelToken:qi,VERSION:zi,all:Ji,Cancel:Vi,isAxiosError:$i,spread:Gi,toFormData:Ki,AxiosHeaders:Xi,HttpStatusCode:Qi,formToJSON:Zi,getAdapter:Yi,mergeConfig:ea}=se;var E=class{static async POST(e,r){let n=R.getSessionId()||"";return r=r||{},(await se.post($.API_URL+e,r,{headers:{sessiontoken:n||"","Content-Type":"application/json",Accept:"application/json"}})).data}static async GET(e){let r=R.getSessionId()||"";return(await se.get($.API_URL+e,{headers:{sessiontoken:r||"","Content-Type":"application/json",Accept:"application/json"}})).data}};var Kt=async(t,e)=>{let r="/login/login",n={Email:t,Password:e};try{let o=await E.POST(r,n);if(o&&o.Token&&o.ExpirationDate){let s=new Date(o.ExpirationDate);R.login(o.Token,s)}else throw new Error("Login failed: No session ID returned")}catch(o){throw console.error("Login failed:",o),new Error("Login failed: "+o.message)}},Xt=async(t,e,r)=>{let n="/login/register";try{let o={Username:t,Email:e,Password:r},s=await E.POST(n,o);if(s&&s.Token&&s.ExpirationDate){let i=new Date(s.ExpirationDate);R.login(s.Token,i)}else throw new Error("Registration failed: No session ID returned")}catch(o){throw console.error("Registration failed:",o),new Error("Registration failed: "+o.message)}},Qt=async t=>{let e="/login/checksession";try{let r=await E.POST(e);if(!r||!r.message||r.message!=="ok")throw new Error("Invalid session ID");return r}catch(r){console.error("Session check failed:",r);return}};var F=class{static async GetLists(e,r,n,o){let c={page:e,length:r,filters:n||{},sort:o||{}};return await E.POST("/lists/getLists",c)}static async GetMyLists(e,r,n,o){let c={page:e,length:r,filters:n||{},sort:o||{}};return await E.POST("/lists/getMyLists",c)}static async GetSpecificList(e){let r={ListID:e};return await E.POST("/lists/getspecificlist",r)}static async UpdateList(e,r,n,o){let s={ListID:e,Name:r,IsPublic:n,Words:o.map(c=>({Word_EN:c.Word_EN,Word_NL:c.Word_NL,Word_ID:c.Word_ID,WordIndex:c.WordIndex}))};return await E.POST("/lists/updateList",s)}static async DeleteList(e){let r={ListID:e};return await E.POST("/lists/deletelist",r)}static async CreateList(e){let r={Name:e};return await E.POST("/lists/createlist",r)}};var ie=class{static async GetUserInfo(){let e=await E.POST("/account/getuserinfo");if(e===void 0){I.error("Failed to fetch user info");return}return e}};var Ie=class{constructor(e,r,n){this.Correct=e,this.Finished=r,this.WordIndex=n}};var Pe=class{constructor(e,r,n,o){this.Question=e,this.Answer=r,this.CorrectAnswer=n,this.Correct=o}},ae=class{constructor(e,r,n,o,s,i,c,d,l){this.ListID=e,this.Name=r,this.Description=n,this.WordCount=o,this.PracticeCount=s,this.CreatedAt=i,this.UpdatedAt=c,this.Owner=d,this.IsPublic=l}},De=class{constructor(e,r,n,o,s,i,c,d){this.Orientation=e,this.StartTime=r,this.Duration=n,this.Score=o,this.Words=s,this.CurrentWordIndex=i,this.IsFinished=c,this.ListInfo=d}};var Ne=class{constructor(e,r,n,o,s,i,c,d){this.ListID=e,this.Name=r,this.Description=n,this.WordCount=o,this.CreatedAt=s,this.UpdatedAt=i,this.Owner=c,this.IsPublic=d}},Fe=class{constructor(e,r,n,o,s){this.Word=e,this.WordIndex=r,this.Orientation=n,this.ListInfo=o,this.ExerciseStartedAt=s}};var Zt=async(t,e)=>{let r="/exercise/startexercise",n={listID:t,orientation:e};I.debug("Starting exercise with body: "+JSON.stringify(n));try{if(!await E.POST(r,n))throw new Error("Failed to start exercise: No session ID returned");return}catch(o){throw console.error("Failed to start exercise:",o),new Error("Failed to start exercise: "+o.message)}},Yt=async()=>{let t="/exercise/getword";try{let e=await E.POST(t);if(!e||!e.Word)throw new Error("Failed to get word: No word returned");let r=new Ne(e.ListInfo.ListID,e.ListInfo.Name,e.ListInfo.Description,e.ListInfo.WordCount,new Date(e.ListInfo.CreatedAt),new Date(e.ListInfo.UpdatedAt),e.ListInfo.Owner,e.ListInfo.IsPublic);return new Fe(e.Word,e.WordIndex,e.Orientation,r,new Date(e.ExerciseStartTime))}catch(e){throw console.error("Failed to get word:",e),new Error("Failed to get word: "+e.message)}},er=async()=>{let t="/exercise/getresult";try{let e=await E.POST(t);if(!e||!e)throw new Error("Failed to get exercise result: No result returned");let r=[];e&&e.Words&&(r=e.Words.map(s=>new Pe(s.Question,s.Answer,s.CorrectAnswer,s.Correct)));let n;return e&&e.ListInfo?n=new ae(e.ListInfo.ListID,e.ListInfo.Name,e.ListInfo.Description,e.ListInfo.WordCount,e.ListInfo.PracticeCount,new Date(e.ListInfo.CreatedAt),new Date(e.ListInfo.UpdatedAt),e.ListInfo.Owner,e.ListInfo.IsPublic):n=new ae(0,"","",0,0,new Date,new Date,"",!1),new De(e.Orientation,new Date(e.StartTime),e.Duration,e.Score,r,e.CurrentWordIndex,e.IsFinished,n)}catch(e){throw console.error("Failed to get exercise result:",e),new Error("Failed to get exercise result: "+e.message)}},tr=async t=>{let e="/exercise/checkanswer",r={answer:t};try{let n=await E.POST(e,r);if(!n)throw new Error("Failed to check answer: No result returned");return new Ie(n.Correct,n.Finished,n.WordIndex)}catch(n){throw console.error("Failed to check answer:",n),new Error("Failed to check answer: "+n.message)}};var rr={Login:{Login:Kt,Register:Xt,CheckSession:Qt},GetLists:{GetLists:F.GetLists,GetSpecificList:F.GetSpecificList,UpdateList:F.UpdateList,DeleteList:F.DeleteList},Exercise:{StartExercise:Zt,GetWord:Yt,getResult:er,CheckAnswer:tr},Account:{GetUserInfo:ie.GetUserInfo}};var ce=class t{static async isLoggedIn(){if(!R.isLoggedIn())return!1;let e=R.getSessionId()||"",r=await rr.Login.CheckSession(e);return r?(R.UserID=r.UserID,!0):!1}static async checkSession(){return await t.isLoggedIn()||P("./login.html"),!0}};var le=class{};var Ue=class{constructor(e,r){this.field=e.toString(),this.ascending=r}};var ue=class{constructor(){this.page=1;this.pageSize=10;this.filters=new le;this.sortField=new Ue("PracticeCount",!1);this.pageCount=0;this.listsContainer=document.getElementById("lists-container");this.prevPageBtn=document.getElementById("prev-page-btn");this.nextPageBtn=document.getElementById("next-page-btn");this.pageInfo=document.getElementById("page-info");this.createListBTN=document.getElementById("create-list-btn")}async Init(e){this.AddEventListeners(),!(e===void 0||await e!==!0)&&(this.filters.UserID=R.UserID?parseInt(R.UserID):void 0,I.debug("UserID: "+R.UserID),this.updateLists())}async updateLists(){try{let e=await F.GetLists(this.page,this.pageSize,this.filters,this.sortField);this.listsContainer&&(this.listsContainer.innerHTML="",e.Lists.forEach(r=>{let n=document.createElement("div");n.className="list-item";let o=document.createElement("div");o.className="list-name-block";let s=document.createElement("p");s.className="list-name",s.innerText=r.Name,o.appendChild(s),n.appendChild(o);let i=document.createElement("div");i.className="list-stats";let c=document.createElement("div");c.className="list-stats-block";let d=document.createElement("div");d.className="list-stats-block";let l=document.createElement("p");l.className="list-stats-item",l.innerText=`Owner: ${r.Owner}`,c.appendChild(l);let u=document.createElement("p");u.className="list-stats-item",u.innerText=`Uploaded at: ${new Date(r.CreatedAt).toLocaleDateString()}`,c.appendChild(u);let f=document.createElement("p");f.className="list-stats-item",f.innerText=`Word Count: ${r.WordCount}`,d.appendChild(f);let g=document.createElement("p");g.className="list-stats-item",g.innerText=`Practice Count: ${r.PracticeCount}`,d.appendChild(g),i.appendChild(c),i.appendChild(d),n.appendChild(i),r.Owning&&n.classList.add("owning-list-item"),n.addEventListener("click",()=>{P(`./list.html?listID=${r.ID}`)}),this.listsContainer.appendChild(n)})),this.pageCount=Math.ceil(e.TotalItems/this.pageSize),this.page=e.Page,this.pageInfo&&(this.pageInfo.innerText=`Page ${this.page} of ${this.pageCount}`)}catch(e){I.error("Error fetching lists: "+e)}}AddEventListeners(){this.prevPageBtn.addEventListener("click",()=>{this.page>1&&(this.page--,this.updateLists())}),this.nextPageBtn.addEventListener("click",()=>{this.page<this.pageCount&&(this.page++,this.updateLists())}),this.createListBTN.addEventListener("click",async()=>{let e=window.prompt("Enter the name of the new list:","New List"),r=await F.CreateList(e||"New List");P(`./list.html?listID=${r.ListID}&orientation=NL-EN`)})}};var Sn=new ut,Ln=new ue;async function Rn(){let t=ce.checkSession();Sn.Init(t),Ln.Init(t),!(t===void 0||await t!==!0)&&I.debug("User is logged in, loading personal content...")}Rn();})();