diff --git a/dist/composables.cjs b/dist/composables.cjs index ecb8943..62f423a 100644 --- a/dist/composables.cjs +++ b/dist/composables.cjs @@ -3,4 +3,4 @@ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const r=(this[Se]=this[Se]={accessors:{}}).accessors,n=this.prototype;function o(s){const i=k(s);r[i]||(ur(n,s),r[i]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}}O.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(O.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});a.freezeMethods(O);function ee(e,t){const r=this||I,n=t||r,o=O.from(n.headers);let s=n.data;return a.forEach(e,function(i){s=i.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Ve(e){return!!(e&&e.__CANCEL__)}function U(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(U,g,{__CANCEL__:!0});function We(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function lr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fr(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=n[s];i||(i=l),r[o]=c,n[o]=l;let f=s,p=0;for(;f!==o;)p+=r[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i{r=l,o=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const l=Date.now(),u=l-r;u>=n?i(c,l):(o=c,s||(s=setTimeout(()=>{s=null,i(o)},n-u)))},()=>o&&i(o)]}const J=(e,t,r=3)=>{let n=0;const o=fr(50,250);return dr(s=>{const i=s.loaded,c=s.lengthComputable?s.total:void 0,l=i-n,u=o(l),f=i<=c;n=i;const p={loaded:i,total:c,progress:c?i/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&f?(c-i)/u:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},r)},Oe=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Re=e=>(...t)=>a.asap(()=>e(...t)),pr=A.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(o){let s=o;return e&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(o){const s=a.isString(o)?n(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),hr=A.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+"="+encodeURIComponent(t)];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(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function mr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ke(e,t){return e&&!mr(t)?gr(e,t):t}const Te=e=>e instanceof O?{...e}:e;function L(e,t){t=t||{};const r={};function n(u,f,p){return a.isPlainObject(u)&&a.isPlainObject(f)?a.merge.call({caseless:p},u,f):a.isPlainObject(f)?a.merge({},f):a.isArray(f)?f.slice():f}function o(u,f,p){if(a.isUndefined(f)){if(!a.isUndefined(u))return n(void 0,u,p)}else return n(u,f,p)}function s(u,f){if(!a.isUndefined(f))return n(void 0,f)}function i(u,f){if(a.isUndefined(f)){if(!a.isUndefined(u))return n(void 0,u)}else return n(void 0,f)}function c(u,f,p){if(p in t)return n(u,f);if(p in e)return n(void 0,u)}const l={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:(u,f)=>o(Te(u),Te(f),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=l[u]||o,p=f(e[u],t[u],u);a.isUndefined(p)&&f!==c||(r[u]=p)}),r}const $e=e=>{const t=L({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:c}=t;t.headers=i=O.from(i),t.url=ze(Ke(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(a.isFormData(r)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[u,...f]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...f].join("; "))}}if(A.hasStandardBrowserEnv&&(n&&a.isFunction(n)&&(n=n(t)),n||n!==!1&&pr(t.url))){const u=o&&s&&hr.read(s);u&&i.set(o,u)}return t},yr=typeof XMLHttpRequest<"u",br=yr&&function(e){return new Promise(function(t,r){const n=$e(e);let o=n.data;const s=O.from(n.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=n,u,f,p,b,m;function h(){b&&b(),m&&m(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let d=new XMLHttpRequest;d.open(n.method.toUpperCase(),n.url,!0),d.timeout=n.timeout;function E(){if(!d)return;const S=O.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),y={data:!i||i==="text"||i==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:S,config:e,request:d};We(function(N){t(N),h()},function(N){r(N),h()},y),d=null}"onloadend"in d?d.onloadend=E:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(E)},d.onabort=function(){d&&(r(new g("Request aborted",g.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new g("Network Error",g.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let S=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const y=n.transitional||He;n.timeoutErrorMessage&&(S=n.timeoutErrorMessage),r(new g(S,y.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,d)),d=null},o===void 0&&s.setContentType(null),"setRequestHeader"in d&&a.forEach(s.toJSON(),function(S,y){d.setRequestHeader(y,S)}),a.isUndefined(n.withCredentials)||(d.withCredentials=!!n.withCredentials),i&&i!=="json"&&(d.responseType=n.responseType),l&&([p,m]=J(l,!0),d.addEventListener("progress",p)),c&&d.upload&&([f,b]=J(c),d.upload.addEventListener("progress",f),d.upload.addEventListener("loadend",b)),(n.cancelToken||n.signal)&&(u=S=>{d&&(r(!S||S.type?new U(null,e,d):S),d.abort(),d=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));const T=lr(n.url);if(T&&A.protocols.indexOf(T)===-1){r(new g("Unsupported protocol "+T+":",g.ERR_BAD_REQUEST,e));return}d.send(o||null)})},wr=(e,t)=>{let r=new AbortController,n;const o=function(l){if(!n){n=!0,i();const u=l instanceof Error?l:this.reason;r.abort(u instanceof g?u:new U(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{o(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",o):l.unsubscribe(o))}),e=null)};e.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=i,[c,()=>{s&&clearTimeout(s),s=null}]},Er=function*(e,t){let r=e.byteLength;if(r{const s=Sr(e,t,o);let i=0,c,l=u=>{c||(c=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:f,value:p}=await s.next();if(f){l(),u.close();return}let b=p.byteLength;if(r){let m=i+=b;r(m)}u.enqueue(new Uint8Array(p))}catch(f){throw l(f),f}},cancel(u){return l(u),s.return()}},{highWaterMark:2})},X=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ge=X&&typeof ReadableStream=="function",se=X&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Xe=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Or=Ge&&Xe(()=>{let e=!1;const t=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),xe=64*1024,ie=Ge&&Xe(()=>a.isReadableStream(new Response("").body)),V={stream:ie&&(e=>e.body)};X&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!V[t]&&(V[t]=a.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new g(`Response type '${t}' is not supported`,g.ERR_NOT_SUPPORT,n)})})})(new Response);const Rr=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await se(e)).byteLength},Tr=async(e,t)=>a.toFiniteNumber(e.getContentLength())??Rr(t),Ar=X&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:f,withCredentials:p="same-origin",fetchOptions:b}=$e(e);u=u?(u+"").toLowerCase():"text";let[m,h]=o||s||i?wr([o,s],i):[],d,E;const T=()=>{!d&&setTimeout(()=>{m&&m.unsubscribe()}),d=!0};let S;try{if(l&&Or&&r!=="get"&&r!=="head"&&(S=await Tr(f,n))!==0){let v=new Request(t,{method:"POST",body:n,duplex:"half"}),B;if(a.isFormData(n)&&(B=v.headers.get("content-type"))&&f.setContentType(B),v.body){const[Q,M]=Oe(S,J(Re(l)));n=Ae(v.body,xe,Q,M,se)}}a.isString(p)||(p=p?"include":"omit"),E=new Request(t,{...b,signal:m,method:r.toUpperCase(),headers:f.normalize().toJSON(),body:n,duplex:"half",credentials:p});let y=await fetch(E);const N=ie&&(u==="stream"||u==="response");if(ie&&(c||N)){const v={};["status","statusText","headers"].forEach(me=>{v[me]=y[me]});const B=a.toFiniteNumber(y.headers.get("content-length")),[Q,M]=c&&Oe(B,J(Re(c),!0))||[];y=new Response(Ae(y.body,xe,Q,()=>{M&&M(),N&&T()},se),v)}u=u||"text";let tt=await V[a.findKey(V,u)||"text"](y,e);return!N&&T(),h&&h(),await new Promise((v,B)=>{We(v,B,{data:tt,headers:O.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:E})})}catch(y){throw T(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,e,E),{cause:y.cause||y}):g.from(y,y&&y.code,e,E)}}),ae={http:zt,xhr:br,fetch:Ar};a.forEach(ae,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ve=e=>`- ${e}`,xr=e=>a.isFunction(e)||e===null||e===!1,Qe={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since : `+s.map(ve).join(` `):" "+ve(s[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:ae};function te(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new U(null,e)}function je(e){return te(e),e.headers=O.from(e.headers),e.data=ee.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Qe.getAdapter(e.adapter||I.adapter)(e).then(function(t){return te(e),t.data=ee.call(e,e.transformResponse,t),t.headers=O.from(t.headers),t},function(t){return Ve(t)||(te(e),t&&t.response&&(t.response.data=ee.call(e,e.transformResponse,t.response),t.response.headers=O.from(t.response.headers))),Promise.reject(t)})}const Ze="1.7.3",pe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pe[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ce={};pe.transitional=function(e,t,r){function n(o,s){return"[Axios v"+Ze+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,i)=>{if(e===!1)throw new g(n(s," has been removed"+(t?" in "+t:"")),g.ERR_DEPRECATED);return t&&!Ce[s]&&(Ce[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(o,s,i):!0}};function vr(e,t,r){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const c=e[s],l=c===void 0||i(c,s,e);if(l!==!0)throw new g("option "+s+" must be "+l,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+s,g.ERR_BAD_OPTION)}}const ce={assertOptions:vr,validators:pe},j=ce.validators;class _{constructor(t){this.defaults=t,this.interceptors={request:new Ee,response:new Ee}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const 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(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=L(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&ce.assertOptions(n,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),o!=null&&(a.isFunction(o)?r.paramsSerializer={serialize:o}:ce.assertOptions(o,{encode:j.function,serialize:j.function},!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"],h=>{delete s[h]}),r.headers=O.concat(i,s);const c=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(l=l&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let f,p=0,b;if(!l){const h=[je.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,u),b=h.length,f=Promise.resolve(r);p{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;const i=new Promise(c=>{n.subscribe(c),s=c}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},t(function(o,s,i){n.reason||(n.reason=new U(o,s,i),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new he(function(r){t=r}),cancel:t}}}function jr(e){return function(t){return e.apply(null,t)}}function Cr(e){return a.isObject(e)&&e.isAxiosError===!0}const ue={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(ue).forEach(([e,t])=>{ue[t]=e});function Ye(e){const t=new _(e),r=Ne(_.prototype.request,t);return a.extend(r,_.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Ye(L(e,n))},r}const w=Ye(I);w.Axios=_;w.CanceledError=U;w.CancelToken=he;w.isCancel=Ve;w.VERSION=Ze;w.toFormData=G;w.AxiosError=g;w.Cancel=w.CanceledError;w.all=function(e){return Promise.all(e)};w.spread=jr;w.isAxiosError=Cr;w.mergeConfig=L;w.AxiosHeaders=O;w.formToJSON=e=>Je(a.isHTMLForm(e)?new FormData(e):e);w.getAdapter=Qe.getAdapter;w.HttpStatusCode=ue;w.default=w;const Nr=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")},re=new Set(["__proto__","prototype","constructor"]),Pr=new Set("0123456789");function _r(e){const t=[];let r="",n="start",o=!1;for(const s of e)switch(s){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");o&&(r+=s),n="property",o=!o;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(o){o=!1,r+=s;break}if(re.has(r))return[];t.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(o){o=!1,r+=s;break}if(n==="property"){if(re.has(r))return[];t.push(r),r=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!Pr.has(s))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),o&&(o=!1,r+="\\"),r+=s}}switch(o&&(r+="\\"),n){case"property":{if(re.has(r))return[];t.push(r);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function Lr(e,t){if(typeof t!="number"&&Array.isArray(e)){const r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function Br(e,t,r){if(!Nr(e)||typeof t!="string")return r===void 0?e:r;const n=_r(t);if(n.length===0)return r;for(let o=0;o({config:{}}),getters:{get:e=>(t,r)=>Br(e.config,t,r)},actions:{async load(){w.get("/api/config").then(e=>{this.config=e.data})}}});function Fr(){return{first_name:"",last_name:"",email:"",user_name:"",password:"",passwordc:"",locale:et().get("site.registration.user_defaults.locale","en_US"),captcha:"",spiderbro:"http://"}}function Ur(){return et().get("locales.available")}function kr(){return"/account/captcha"}async function Dr(e){return C.axios.post("/account/register",e).then(t=>t.data).catch(t=>{throw{description:"An error as occurred",style:C.a.Danger,closeBtn:!0,...t.response.data}})}const qr=Object.freeze(Object.defineProperty({__proto__:null,doRegister:Dr,getAvailableLocales:Ur,getCaptchaUrl:kr,getDefaultForm:Fr},Symbol.toStringTag,{value:"Module"}));async function Ir(e){return C.axios.post("/account/forgot-password",e).then(t=>({description:t.data.message,style:C.a.Success,closeBtn:!0})).catch(t=>{throw{description:"An error as occurred",style:C.a.Danger,closeBtn:!0,...t.response.data}})}async function Mr(e){return C.axios.post("/account/resend-verification",e).then(t=>({description:t.data.message,style:C.a.Success,closeBtn:!0})).catch(t=>{throw{description:"An error as occurred",style:C.a.Danger,closeBtn:!0,...t.response.data}})}exports.Register=qr;exports.forgotPassword=Ir;exports.resendVerification=Mr; +`+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=L(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&ce.assertOptions(n,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),o!=null&&(a.isFunction(o)?r.paramsSerializer={serialize:o}:ce.assertOptions(o,{encode:j.function,serialize:j.function},!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"],h=>{delete s[h]}),r.headers=O.concat(i,s);const c=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(l=l&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let f,p=0,b;if(!l){const h=[je.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,u),b=h.length,f=Promise.resolve(r);p{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;const i=new Promise(c=>{n.subscribe(c),s=c}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},t(function(o,s,i){n.reason||(n.reason=new U(o,s,i),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new he(function(r){t=r}),cancel:t}}}function jr(e){return function(t){return e.apply(null,t)}}function Cr(e){return a.isObject(e)&&e.isAxiosError===!0}const ue={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(ue).forEach(([e,t])=>{ue[t]=e});function Ye(e){const t=new _(e),r=Ne(_.prototype.request,t);return a.extend(r,_.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Ye(L(e,n))},r}const w=Ye(I);w.Axios=_;w.CanceledError=U;w.CancelToken=he;w.isCancel=Ve;w.VERSION=Ze;w.toFormData=G;w.AxiosError=g;w.Cancel=w.CanceledError;w.all=function(e){return Promise.all(e)};w.spread=jr;w.isAxiosError=Cr;w.mergeConfig=L;w.AxiosHeaders=O;w.formToJSON=e=>Je(a.isHTMLForm(e)?new FormData(e):e);w.getAdapter=Qe.getAdapter;w.HttpStatusCode=ue;w.default=w;const Nr=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")},re=new Set(["__proto__","prototype","constructor"]),Pr=new Set("0123456789");function _r(e){const t=[];let r="",n="start",o=!1;for(const s of e)switch(s){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");o&&(r+=s),n="property",o=!o;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(o){o=!1,r+=s;break}if(re.has(r))return[];t.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(o){o=!1,r+=s;break}if(n==="property"){if(re.has(r))return[];t.push(r),r=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!Pr.has(s))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),o&&(o=!1,r+="\\"),r+=s}}switch(o&&(r+="\\"),n){case"property":{if(re.has(r))return[];t.push(r);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}function Lr(e,t){if(typeof t!="number"&&Array.isArray(e)){const r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function Br(e,t,r){if(!Nr(e)||typeof t!="string")return r===void 0?e:r;const n=_r(t);if(n.length===0)return r;for(let o=0;o({config:{}}),getters:{get:e=>(t,r)=>Br(e.config,t,r)},actions:{async load(){w.get("/api/config").then(e=>{this.config=e.data})}}});function Fr(){return{first_name:"",last_name:"",email:"",user_name:"",password:"",passwordc:"",locale:et().get("site.registration.user_defaults.locale","en_US"),captcha:"",spiderbro:"http://"}}function Ur(){return et().get("locales.available")}function kr(){return"/account/captcha"}async function Dr(e){return C.axios.post("/account/register",e).then(t=>t.data).catch(t=>{throw{description:"An error as occurred",style:C.a.Danger,closeBtn:!0,...t.response.data}})}const qr=Object.freeze(Object.defineProperty({__proto__:null,doRegister:Dr,getAvailableLocales:Ur,getCaptchaUrl:kr,getDefaultForm:Fr},Symbol.toStringTag,{value:"Module"}));async function Ir(e){return C.axios.post("/account/forgot-password",{email:e}).then(t=>({description:t.data.message,style:C.a.Success,closeBtn:!0})).catch(t=>{throw{description:"An error as occurred",style:C.a.Danger,closeBtn:!0,...t.response.data}})}async function Mr(e){return C.axios.post("/account/resend-verification",{email:e}).then(t=>({description:t.data.message,style:C.a.Success,closeBtn:!0})).catch(t=>{throw{description:"An error as occurred",style:C.a.Danger,closeBtn:!0,...t.response.data}})}exports.Register=qr;exports.forgotPassword=Ir;exports.resendVerification=Mr; diff --git a/dist/composables.js b/dist/composables.js index 0ef1c87..48a95ad 100644 --- a/dist/composables.js +++ b/dist/composables.js @@ -1835,7 +1835,7 @@ const zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ getDefaultForm: Ur }, Symbol.toStringTag, { value: "Module" })); async function Hr(e) { - return le.post("/account/forgot-password", e).then((t) => ({ + return le.post("/account/forgot-password", { email: e }).then((t) => ({ description: t.data.message, style: k.Success, closeBtn: !0 @@ -1849,7 +1849,7 @@ async function Hr(e) { }); } async function Jr(e) { - return le.post("/account/resend-verification", e).then((t) => ({ + return le.post("/account/resend-verification", { email: e }).then((t) => ({ description: t.data.message, style: k.Success, closeBtn: !0