@assembled-brands/frontend 0.3.7 → 0.3.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
+ var nr=Object.defineProperty;var sr=(e,t)=>{for(var r in t)nr(e,r,{get:t[r],enumerable:!0})};function re(e,t){return function(){return e.apply(t,arguments)}}var{toString:ir}=Object.prototype,{getPrototypeOf:Fe}=Object,{iterator:ye,toStringTag:dt}=Symbol,Ee=(e=>t=>{let r=ir.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>Ee(t)===e),be=e=>t=>typeof t===e,{isArray:X}=Array,K=be("undefined");function oe(e){return e!==null&&!K(e)&&e.constructor!==null&&!K(e.constructor)&&N(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var pt=U("ArrayBuffer");function ar(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&pt(e.buffer),t}var cr=be("string"),N=be("function"),mt=be("number"),ne=e=>e!==null&&typeof e=="object",lr=e=>e===!0||e===!1,ge=e=>{if(Ee(e)!=="object")return!1;let t=Fe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dt in e)&&!(ye in e)},ur=e=>{if(!ne(e)||oe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},fr=U("Date"),dr=U("File"),pr=U("Blob"),mr=U("FileList"),hr=e=>ne(e)&&N(e.pipe),gr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||N(e.append)&&((t=Ee(e))==="formdata"||t==="object"&&N(e.toString)&&e.toString()==="[object FormData]"))},yr=U("URLSearchParams"),[Er,br,Sr,wr]=["ReadableStream","Request","Response","Headers"].map(U),xr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function se(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,n;if(typeof e!="object"&&(e=[e]),X(e))for(o=0,n=e.length;o<n;o++)t.call(null,e[o],o,e);else{if(oe(e))return;let i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length,c;for(o=0;o<s;o++)c=i[o],t.call(null,e[c],c,e)}}function ht(e,t){if(oe(e))return null;t=t.toLowerCase();let r=Object.keys(e),o=r.length,n;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}var V=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gt=e=>!K(e)&&e!==V;function De(){let{caseless:e,skipUndefined:t}=gt(this)&&this||{},r={},o=(n,i)=>{let s=e&&ht(r,i)||i;ge(r[s])&&ge(n)?r[s]=De(r[s],n):ge(n)?r[s]=De({},n):X(n)?r[s]=n.slice():(!t||!K(n))&&(r[s]=n)};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&se(arguments[n],o);return r}var Rr=(e,t,r,{allOwnKeys:o}={})=>(se(t,(n,i)=>{r&&N(n)?e[i]=re(n,r):e[i]=n},{allOwnKeys:o}),e),Ar=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Or=(e,t,r,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Tr=(e,t,r,o)=>{let n,i,s,c={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),i=n.length;i-- >0;)s=n[i],(!o||o(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=r!==!1&&Fe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Lr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let o=e.indexOf(t,r);return o!==-1&&o===r},Cr=e=>{if(!e)return null;if(X(e))return e;let t=e.length;if(!mt(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},vr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Fe(Uint8Array)),Nr=(e,t)=>{let o=(e&&e[ye]).call(e),n;for(;(n=o.next())&&!n.done;){let i=n.value;t.call(e,i[0],i[1])}},Pr=(e,t)=>{let r,o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},_r=U("HTMLFormElement"),Ur=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,n){return o.toUpperCase()+n}),ft=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),kr=U("RegExp"),yt=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),o={};se(r,(n,i)=>{let s;(s=t(n,i,e))!==!1&&(o[i]=s||n)}),Object.defineProperties(e,o)},Dr=e=>{yt(e,(t,r)=>{if(N(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let o=e[r];if(N(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Fr=(e,t)=>{let r={},o=n=>{n.forEach(i=>{r[i]=!0})};return X(e)?o(e):o(String(e).split(t)),r},Br=()=>{},Ir=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hr(e){return!!(e&&N(e.append)&&e[dt]==="FormData"&&e[ye])}var qr=e=>{let t=new Array(10),r=(o,n)=>{if(ne(o)){if(t.indexOf(o)>=0)return;if(oe(o))return o;if(!("toJSON"in o)){t[n]=o;let i=X(o)?[]:{};return se(o,(s,c)=>{let d=r(s,n+1);!K(d)&&(i[c]=d)}),t[n]=void 0,i}}return o};return r(e,0)},Mr=U("AsyncFunction"),jr=e=>e&&(ne(e)||N(e))&&N(e.then)&&N(e.catch),Et=((e,t)=>e?setImmediate:t?((r,o)=>(V.addEventListener("message",({source:n,data:i})=>{n===V&&i===r&&o.length&&o.shift()()},!1),n=>{o.push(n),V.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",N(V.postMessage)),zr=typeof queueMicrotask<"u"?queueMicrotask.bind(V):typeof process<"u"&&process.nextTick||Et,Wr=e=>e!=null&&N(e[ye]),a={isArray:X,isArrayBuffer:pt,isBuffer:oe,isFormData:gr,isArrayBufferView:ar,isString:cr,isNumber:mt,isBoolean:lr,isObject:ne,isPlainObject:ge,isEmptyObject:ur,isReadableStream:Er,isRequest:br,isResponse:Sr,isHeaders:wr,isUndefined:K,isDate:fr,isFile:dr,isBlob:pr,isRegExp:kr,isFunction:N,isStream:hr,isURLSearchParams:yr,isTypedArray:vr,isFileList:mr,forEach:se,merge:De,extend:Rr,trim:xr,stripBOM:Ar,inherits:Or,toFlatObject:Tr,kindOf:Ee,kindOfTest:U,endsWith:Lr,toArray:Cr,forEachEntry:Nr,matchAll:Pr,isHTMLForm:_r,hasOwnProperty:ft,hasOwnProp:ft,reduceDescriptors:yt,freezeMethods:Dr,toObjectSet:Fr,toCamelCase:Ur,noop:Br,toFiniteNumber:Ir,findKey:ht,global:V,isContextDefined:gt,isSpecCompliantForm:Hr,toJSONObject:qr,isAsyncFn:Mr,isThenable:jr,setImmediate:Et,asap:zr,isIterable:Wr};function G(e,t,r,o,n){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),r&&(this.config=r),o&&(this.request=o),n&&(this.response=n,this.status=n.status?n.status:null)}a.inherits(G,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 bt=G.prototype,St={};["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=>{St[e]={value:e}});Object.defineProperties(G,St);Object.defineProperty(bt,"isAxiosError",{value:!0});G.from=(e,t,r,o,n,i)=>{let s=Object.create(bt);a.toFlatObject(e,s,function(l){return l!==Error.prototype},f=>f!=="isAxiosError");let c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return G.call(s,c,d,r,o,n),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};var g=G;var Se=null;function Be(e){return a.isPlainObject(e)||a.isArray(e)}function xt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function wt(e,t,r){return e?e.concat(t).map(function(n,i){return n=xt(n),!r&&i?"["+n+"]":n}).join(r?".":""):t}function Jr(e){return a.isArray(e)&&!e.some(Be)}var Vr=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function $r(e,t,r){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new(Se||FormData),r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,p){return!a.isUndefined(p[h])});let o=r.metaTokens,n=r.visitor||l,i=r.dots,s=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(n))throw new TypeError("visitor must be a function");function f(u){if(u===null)return"";if(a.isDate(u))return u.toISOString();if(a.isBoolean(u))return u.toString();if(!d&&a.isBlob(u))throw new g("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(u)||a.isTypedArray(u)?d&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,h,p){let x=u;if(u&&!p&&typeof u=="object"){if(a.endsWith(h,"{}"))h=o?h:h.slice(0,-2),u=JSON.stringify(u);else if(a.isArray(u)&&Jr(u)||(a.isFileList(u)||a.endsWith(h,"[]"))&&(x=a.toArray(u)))return h=xt(h),x.forEach(function(S,L){!(a.isUndefined(S)||S===null)&&t.append(s===!0?wt([h],L,i):s===null?h:h+"[]",f(S))}),!1}return Be(u)?!0:(t.append(wt(p,h,i),f(u)),!1)}let m=[],E=Object.assign(Vr,{defaultVisitor:l,convertValue:f,isVisitable:Be});function R(u,h){if(!a.isUndefined(u)){if(m.indexOf(u)!==-1)throw Error("Circular reference detected in "+h.join("."));m.push(u),a.forEach(u,function(x,O){(!(a.isUndefined(x)||x===null)&&n.call(t,x,a.isString(O)?O.trim():O,h,E))===!0&&R(x,h?h.concat(O):[O])}),m.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return R(e),t}var z=$r;function Rt(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function At(e,t){this._pairs=[],e&&z(e,this,t)}var Ot=At.prototype;Ot.append=function(t,r){this._pairs.push([t,r])};Ot.toString=function(t){let r=t?function(o){return t.call(this,o,Rt)}:Rt;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var we=At;function Kr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,r){if(!t)return e;let o=r&&r.encode||Kr;a.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,i;if(n?i=n(t,r):i=a.isURLSearchParams(t)?t.toString():new we(t,r).toString(o),i){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var Ie=class{constructor(){this.handlers=[]}use(t,r,o){return this.handlers.push({fulfilled:t,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(o){o!==null&&t(o)})}},He=Ie;var xe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Tt=typeof URLSearchParams<"u"?URLSearchParams:we;var Lt=typeof FormData<"u"?FormData:null;var Ct=typeof Blob<"u"?Blob:null;var vt={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Lt,Blob:Ct},protocols:["http","https","file","blob","url","data"]};var je={};sr(je,{hasBrowserEnv:()=>Me,hasStandardBrowserEnv:()=>Xr,hasStandardBrowserWebWorkerEnv:()=>Gr,navigator:()=>qe,origin:()=>Qr});var Me=typeof window<"u"&&typeof document<"u",qe=typeof navigator=="object"&&navigator||void 0,Xr=Me&&(!qe||["ReactNative","NativeScript","NS"].indexOf(qe.product)<0),Gr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Qr=Me&&window.location.href||"http://localhost";var w={...je,...vt};function ze(e,t){return z(e,new w.classes.URLSearchParams,{visitor:function(r,o,n,i){return w.isNode&&a.isBuffer(r)?(this.append(o,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function Yr(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Zr(e){let t={},r=Object.keys(e),o,n=r.length,i;for(o=0;o<n;o++)i=r[o],t[i]=e[i];return t}function eo(e){function t(r,o,n,i){let s=r[i++];if(s==="__proto__")return!0;let c=Number.isFinite(+s),d=i>=r.length;return s=!s&&a.isArray(n)?n.length:s,d?(a.hasOwnProp(n,s)?n[s]=[n[s],o]:n[s]=o,!c):((!n[s]||!a.isObject(n[s]))&&(n[s]=[]),t(r,o,n[s],i)&&a.isArray(n[s])&&(n[s]=Zr(n[s])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){let r={};return a.forEachEntry(e,(o,n)=>{t(Yr(o),n,r,0)}),r}return null}var Re=eo;function to(e,t,r){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(e)}var We={transitional:xe,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let o=r.getContentType()||"",n=o.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return n?JSON.stringify(Re(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(o.indexOf("application/x-www-form-urlencoded")>-1)return ze(t,this.formSerializer).toString();if((c=a.isFileList(t))||o.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return z(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return i||n?(r.setContentType("application/json",!1),to(t)):t}],transformResponse:[function(t){let r=this.transitional||We.transitional,o=r&&r.forcedJSONParsing,n=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(o&&!this.responseType||n)){let s=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(c){if(s)throw c.name==="SyntaxError"?g.from(c,g.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:w.classes.FormData,Blob:w.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{We.headers[e]={}});var Q=We;var ro=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"]),Nt=e=>{let t={},r,o,n;return e&&e.split(`
2
+ `).forEach(function(s){n=s.indexOf(":"),r=s.substring(0,n).trim().toLowerCase(),o=s.substring(n+1).trim(),!(!r||t[r]&&ro[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t};var Pt=Symbol("internals");function ae(e){return e&&String(e).trim().toLowerCase()}function Ae(e){return e===!1||e==null?e:a.isArray(e)?e.map(Ae):String(e)}function oo(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,o;for(;o=r.exec(e);)t[o[1]]=o[2];return t}var no=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Je(e,t,r,o,n){if(a.isFunction(o))return o.call(this,t,r);if(n&&(t=r),!!a.isString(t)){if(a.isString(o))return t.indexOf(o)!==-1;if(a.isRegExp(o))return o.test(t)}}function so(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function io(e,t){let r=a.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+r,{value:function(n,i,s){return this[o].call(this,t,n,i,s)},configurable:!0})})}var Y=class{constructor(t){t&&this.set(t)}set(t,r,o){let n=this;function i(c,d,f){let l=ae(d);if(!l)throw new Error("header name must be a non-empty string");let m=a.findKey(n,l);(!m||n[m]===void 0||f===!0||f===void 0&&n[m]!==!1)&&(n[m||d]=Ae(c))}let s=(c,d)=>a.forEach(c,(f,l)=>i(f,l,d));if(a.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(a.isString(t)&&(t=t.trim())&&!no(t))s(Nt(t),r);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,f;for(let l of t){if(!a.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[f=l[0]]=(d=c[f])?a.isArray(d)?[...d,l[1]]:[d,l[1]]:l[1]}s(c,r)}else t!=null&&i(r,t,o);return this}get(t,r){if(t=ae(t),t){let o=a.findKey(this,t);if(o){let n=this[o];if(!r)return n;if(r===!0)return oo(n);if(a.isFunction(r))return r.call(this,n,o);if(a.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ae(t),t){let o=a.findKey(this,t);return!!(o&&this[o]!==void 0&&(!r||Je(this,this[o],o,r)))}return!1}delete(t,r){let o=this,n=!1;function i(s){if(s=ae(s),s){let c=a.findKey(o,s);c&&(!r||Je(o,o[c],c,r))&&(delete o[c],n=!0)}}return a.isArray(t)?t.forEach(i):i(t),n}clear(t){let r=Object.keys(this),o=r.length,n=!1;for(;o--;){let i=r[o];(!t||Je(this,this[i],i,t,!0))&&(delete this[i],n=!0)}return n}normalize(t){let r=this,o={};return a.forEach(this,(n,i)=>{let s=a.findKey(o,i);if(s){r[s]=Ae(n),delete r[i];return}let c=t?so(i):String(i).trim();c!==i&&delete r[i],r[c]=Ae(n),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return a.forEach(this,(o,n)=>{o!=null&&o!==!1&&(r[n]=t&&a.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).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,...r){let o=new this(t);return r.forEach(n=>o.set(n)),o}static accessor(t){let o=(this[Pt]=this[Pt]={accessors:{}}).accessors,n=this.prototype;function i(s){let c=ae(s);o[c]||(io(n,s),o[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};Y.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(Y.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}});a.freezeMethods(Y);var T=Y;function ce(e,t){let r=this||Q,o=t||r,n=T.from(o.headers),i=o.data;return a.forEach(e,function(c){i=c.call(r,i,n.normalize(),t?t.status:void 0)}),n.normalize(),i}function le(e){return!!(e&&e.__CANCEL__)}function _t(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(_t,g,{__CANCEL__:!0});var B=_t;function ue(e,t,r){let o=r.config.validateStatus;!r.status||!o||o(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 Ve(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ao(e,t){e=e||10;let r=new Array(e),o=new Array(e),n=0,i=0,s;return t=t!==void 0?t:1e3,function(d){let f=Date.now(),l=o[i];s||(s=f),r[n]=d,o[n]=f;let m=i,E=0;for(;m!==n;)E+=r[m++],m=m%e;if(n=(n+1)%e,n===i&&(i=(i+1)%e),f-s<t)return;let R=l&&f-l;return R?Math.round(E*1e3/R):void 0}}var Ut=ao;function co(e,t){let r=0,o=1e3/t,n,i,s=(f,l=Date.now())=>{r=l,n=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{let l=Date.now(),m=l-r;m>=o?s(f,l):(n=f,i||(i=setTimeout(()=>{i=null,s(n)},o-m)))},()=>n&&s(n)]}var kt=co;var Z=(e,t,r=3)=>{let o=0,n=Ut(50,250);return kt(i=>{let s=i.loaded,c=i.lengthComputable?i.total:void 0,d=s-o,f=n(d),l=s<=c;o=s;let m={loaded:s,total:c,progress:c?s/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&l?(c-s)/f:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},r)},$e=(e,t)=>{let r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},Ke=e=>(...t)=>a.asap(()=>e(...t));var Dt=w.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,w.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(w.origin),w.navigator&&/(msie|trident)/i.test(w.navigator.userAgent)):()=>!0;var Ft=w.hasStandardBrowserEnv?{write(e,t,r,o,n,i,s){if(typeof document>"u")return;let c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),a.isString(o)&&c.push(`path=${o}`),a.isString(n)&&c.push(`domain=${n}`),i===!0&&c.push("secure"),a.isString(s)&&c.push(`SameSite=${s}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;let 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 Xe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ge(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function fe(e,t,r){let o=!Xe(t);return e&&(o||r==!1)?Ge(e,t):t}var Bt=e=>e instanceof T?{...e}:e;function k(e,t){t=t||{};let r={};function o(f,l,m,E){return a.isPlainObject(f)&&a.isPlainObject(l)?a.merge.call({caseless:E},f,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function n(f,l,m,E){if(a.isUndefined(l)){if(!a.isUndefined(f))return o(void 0,f,m,E)}else return o(f,l,m,E)}function i(f,l){if(!a.isUndefined(l))return o(void 0,l)}function s(f,l){if(a.isUndefined(l)){if(!a.isUndefined(f))return o(void 0,f)}else return o(void 0,l)}function c(f,l,m){if(m in t)return o(f,l);if(m in e)return o(void 0,f)}let d={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(f,l,m)=>n(Bt(f),Bt(l),m,!0)};return a.forEach(Object.keys({...e,...t}),function(l){let m=d[l]||n,E=m(e[l],t[l],l);a.isUndefined(E)&&m!==c||(r[l]=E)}),r}var Oe=e=>{let t=k({},e),{data:r,withXSRFToken:o,xsrfHeaderName:n,xsrfCookieName:i,headers:s,auth:c}=t;if(t.headers=s=T.from(s),t.url=ie(fe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(r)){if(w.hasStandardBrowserEnv||w.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(a.isFunction(r.getHeaders)){let d=r.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([l,m])=>{f.includes(l.toLowerCase())&&s.set(l,m)})}}if(w.hasStandardBrowserEnv&&(o&&a.isFunction(o)&&(o=o(t)),o||o!==!1&&Dt(t.url))){let d=n&&i&&Ft.read(i);d&&s.set(n,d)}return t};var lo=typeof XMLHttpRequest<"u",It=lo&&function(e){return new Promise(function(r,o){let n=Oe(e),i=n.data,s=T.from(n.headers).normalize(),{responseType:c,onUploadProgress:d,onDownloadProgress:f}=n,l,m,E,R,u;function h(){R&&R(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(l),n.signal&&n.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(n.method.toUpperCase(),n.url,!0),p.timeout=n.timeout;function x(){if(!p)return;let S=T.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),P={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:e,request:p};ue(function(y){r(y),h()},function(y){o(y),h()},P),p=null}"onloadend"in p?p.onloadend=x:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(x)},p.onabort=function(){p&&(o(new g("Request aborted",g.ECONNABORTED,e,p)),p=null)},p.onerror=function(L){let P=L&&L.message?L.message:"Network Error",q=new g(P,g.ERR_NETWORK,e,p);q.event=L||null,o(q),p=null},p.ontimeout=function(){let L=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",P=n.transitional||xe;n.timeoutErrorMessage&&(L=n.timeoutErrorMessage),o(new g(L,P.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,p)),p=null},i===void 0&&s.setContentType(null),"setRequestHeader"in p&&a.forEach(s.toJSON(),function(L,P){p.setRequestHeader(P,L)}),a.isUndefined(n.withCredentials)||(p.withCredentials=!!n.withCredentials),c&&c!=="json"&&(p.responseType=n.responseType),f&&([E,u]=Z(f,!0),p.addEventListener("progress",E)),d&&p.upload&&([m,R]=Z(d),p.upload.addEventListener("progress",m),p.upload.addEventListener("loadend",R)),(n.cancelToken||n.signal)&&(l=S=>{p&&(o(!S||S.type?new B(null,e,p):S),p.abort(),p=null)},n.cancelToken&&n.cancelToken.subscribe(l),n.signal&&(n.signal.aborted?l():n.signal.addEventListener("abort",l)));let O=Ve(n.url);if(O&&w.protocols.indexOf(O)===-1){o(new g("Unsupported protocol "+O+":",g.ERR_BAD_REQUEST,e));return}p.send(i||null)})};var uo=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let o=new AbortController,n,i=function(f){if(!n){n=!0,c();let l=f instanceof Error?f:this.reason;o.abort(l instanceof g?l:new B(l instanceof Error?l.message:l))}},s=t&&setTimeout(()=>{s=null,i(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t),c=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>f.addEventListener("abort",i));let{signal:d}=o;return d.unsubscribe=()=>a.asap(c),d}},Ht=uo;var fo=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let o=0,n;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},po=async function*(e,t){for await(let r of mo(e))yield*fo(r,t)},mo=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:o}=await t.read();if(r)break;yield o}}finally{await t.cancel()}},Qe=(e,t,r,o)=>{let n=po(e,t),i=0,s,c=d=>{s||(s=!0,o&&o(d))};return new ReadableStream({async pull(d){try{let{done:f,value:l}=await n.next();if(f){c(),d.close();return}let m=l.byteLength;if(r){let E=i+=m;r(E)}d.enqueue(new Uint8Array(l))}catch(f){throw c(f),f}},cancel(d){return c(d),n.return()}},{highWaterMark:2})};var qt=64*1024,{isFunction:Te}=a,ho=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:Mt,TextEncoder:jt}=a.global,zt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},go=e=>{e=a.merge.call({skipUndefined:!0},ho,e);let{fetch:t,Request:r,Response:o}=e,n=t?Te(t):typeof fetch=="function",i=Te(r),s=Te(o);if(!n)return!1;let c=n&&Te(Mt),d=n&&(typeof jt=="function"?(u=>h=>u.encode(h))(new jt):async u=>new Uint8Array(await new r(u).arrayBuffer())),f=i&&c&&zt(()=>{let u=!1,h=new r(w.origin,{body:new Mt,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!h}),l=s&&c&&zt(()=>a.isReadableStream(new o("").body)),m={stream:l&&(u=>u.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!m[u]&&(m[u]=(h,p)=>{let x=h&&h[u];if(x)return x.call(h);throw new g(`Response type '${u}' is not supported`,g.ERR_NOT_SUPPORT,p)})});let E=async u=>{if(u==null)return 0;if(a.isBlob(u))return u.size;if(a.isSpecCompliantForm(u))return(await new r(w.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(a.isArrayBufferView(u)||a.isArrayBuffer(u))return u.byteLength;if(a.isURLSearchParams(u)&&(u=u+""),a.isString(u))return(await d(u)).byteLength},R=async(u,h)=>{let p=a.toFiniteNumber(u.getContentLength());return p??E(h)};return async u=>{let{url:h,method:p,data:x,signal:O,cancelToken:S,timeout:L,onDownloadProgress:P,onUploadProgress:q,responseType:y,headers:C,withCredentials:D="same-origin",fetchOptions:b}=Oe(u),_=t||fetch;y=y?(y+"").toLowerCase():"text";let me=Ht([O,S&&S.toAbortSignal()],L),te=null,J=me&&me.unsubscribe&&(()=>{me.unsubscribe()}),at;try{if(q&&f&&p!=="get"&&p!=="head"&&(at=await R(C,x))!==0){let j=new r(h,{method:"POST",body:x,duplex:"half"}),$;if(a.isFormData(x)&&($=j.headers.get("content-type"))&&C.setContentType($),j.body){let[ke,he]=$e(at,Z(Ke(q)));x=Qe(j.body,qt,ke,he)}}a.isString(D)||(D=D?"include":"omit");let F=i&&"credentials"in r.prototype,ct={...b,signal:me,method:p.toUpperCase(),headers:C.normalize().toJSON(),body:x,duplex:"half",credentials:F?D:void 0};te=i&&new r(h,ct);let M=await(i?_(te,b):_(h,ct)),lt=l&&(y==="stream"||y==="response");if(l&&(P||lt&&J)){let j={};["status","statusText","headers"].forEach(ut=>{j[ut]=M[ut]});let $=a.toFiniteNumber(M.headers.get("content-length")),[ke,he]=P&&$e($,Z(Ke(P),!0))||[];M=new o(Qe(M.body,qt,ke,()=>{he&&he(),J&&J()}),j)}y=y||"text";let or=await m[a.findKey(m,y)||"text"](M,u);return!lt&&J&&J(),await new Promise((j,$)=>{ue(j,$,{data:or,headers:T.from(M.headers),status:M.status,statusText:M.statusText,config:u,request:te})})}catch(F){throw J&&J(),F&&F.name==="TypeError"&&/Load failed|fetch/i.test(F.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,u,te),{cause:F.cause||F}):g.from(F,F&&F.code,u,te)}}},yo=new Map,Ye=e=>{let t=e&&e.env||{},{fetch:r,Request:o,Response:n}=t,i=[o,n,r],s=i.length,c=s,d,f,l=yo;for(;c--;)d=i[c],f=l.get(d),f===void 0&&l.set(d,f=c?new Map:go(t)),l=f;return f},Fs=Ye();var Ze={http:Se,xhr:It,fetch:{get:Ye}};a.forEach(Ze,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Wt=e=>`- ${e}`,bo=e=>a.isFunction(e)||e===null||e===!1;function So(e,t){e=a.isArray(e)?e:[e];let{length:r}=e,o,n,i={};for(let s=0;s<r;s++){o=e[s];let c;if(n=o,!bo(o)&&(n=Ze[(c=String(o)).toLowerCase()],n===void 0))throw new g(`Unknown adapter '${c}'`);if(n&&(a.isFunction(n)||(n=n.get(t))))break;i[c||"#"+s]=n}if(!n){let s=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build")),c=r?s.length>1?`since :
4
+ `+s.map(Wt).join(`
5
+ `):" "+Wt(s[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return n}var Le={getAdapter:So,adapters:Ze};function et(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new B(null,e)}function Ce(e){return et(e),e.headers=T.from(e.headers),e.data=ce.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Le.getAdapter(e.adapter||Q.adapter,e)(e).then(function(o){return et(e),o.data=ce.call(e,e.transformResponse,o),o.headers=T.from(o.headers),o},function(o){return le(o)||(et(e),o&&o.response&&(o.response.data=ce.call(e,e.transformResponse,o.response),o.response.headers=T.from(o.response.headers))),Promise.reject(o)})}var ve="1.13.2";var Ne={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ne[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});var Jt={};Ne.transitional=function(t,r,o){function n(i,s){return"[Axios v"+ve+"] Transitional option '"+i+"'"+s+(o?". "+o:"")}return(i,s,c)=>{if(t===!1)throw new g(n(s," has been removed"+(r?" in "+r:"")),g.ERR_DEPRECATED);return r&&!Jt[s]&&(Jt[s]=!0,console.warn(n(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,c):!0}};Ne.spelling=function(t){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function wo(e,t,r){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);let o=Object.keys(e),n=o.length;for(;n-- >0;){let i=o[n],s=t[i];if(s){let c=e[i],d=c===void 0||s(c,i,e);if(d!==!0)throw new g("option "+i+" must be "+d,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+i,g.ERR_BAD_OPTION)}}var de={assertOptions:wo,validators:Ne};var I=de.validators,ee=class{constructor(t){this.defaults=t||{},this.interceptors={request:new He,response:new He}}async request(t,r){try{return await this._request(t,r)}catch(o){if(o instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;let i=n.stack?n.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+=`
6
+ `+i):o.stack=i}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=k(this.defaults,r);let{transitional:o,paramsSerializer:n,headers:i}=r;o!==void 0&&de.assertOptions(o,{silentJSONParsing:I.transitional(I.boolean),forcedJSONParsing:I.transitional(I.boolean),clarifyTimeoutError:I.transitional(I.boolean)},!1),n!=null&&(a.isFunction(n)?r.paramsSerializer={serialize:n}:de.assertOptions(n,{encode:I.function,serialize:I.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),de.assertOptions(r,{baseUrl:I.spelling("baseURL"),withXsrfToken:I.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&a.merge(i.common,i[r.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),r.headers=T.concat(s,i);let c=[],d=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(d=d&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});let f=[];this.interceptors.response.forEach(function(h){f.push(h.fulfilled,h.rejected)});let l,m=0,E;if(!d){let u=[Ce.bind(this),void 0];for(u.unshift(...c),u.push(...f),E=u.length,l=Promise.resolve(r);m<E;)l=l.then(u[m++],u[m++]);return l}E=c.length;let R=r;for(;m<E;){let u=c[m++],h=c[m++];try{R=u(R)}catch(p){h.call(this,p);break}}try{l=Ce.call(this,R)}catch(u){return Promise.reject(u)}for(m=0,E=f.length;m<E;)l=l.then(f[m++],f[m++]);return l}getUri(t){t=k(this.defaults,t);let r=fe(t.baseURL,t.url,t.allowAbsoluteUrls);return ie(r,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(r,o){return this.request(k(o||{},{method:t,url:r,data:(o||{}).data}))}});a.forEach(["post","put","patch"],function(t){function r(o){return function(i,s,c){return this.request(k(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}ee.prototype[t]=r(),ee.prototype[t+"Form"]=r(!0)});var pe=ee;var tt=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});let o=this;this.promise.then(n=>{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](n);o._listeners=null}),this.promise.then=n=>{let i,s=new Promise(c=>{o.subscribe(c),i=c}).then(n);return s.cancel=function(){o.unsubscribe(i)},s},t(function(i,s,c){o.reason||(o.reason=new B(i,s,c),r(o.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;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(n){t=n}),cancel:t}}},Vt=tt;function rt(e){return function(r){return e.apply(null,r)}}function ot(e){return a.isObject(e)&&e.isAxiosError===!0}var nt={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(nt).forEach(([e,t])=>{nt[t]=e});var $t=nt;function Kt(e){let t=new pe(e),r=re(pe.prototype.request,t);return a.extend(r,pe.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Kt(k(e,n))},r}var A=Kt(Q);A.Axios=pe;A.CanceledError=B;A.CancelToken=Vt;A.isCancel=le;A.VERSION=ve;A.toFormData=z;A.AxiosError=g;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=rt;A.isAxiosError=ot;A.mergeConfig=k;A.AxiosHeaders=T;A.formToJSON=e=>Re(a.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Le.getAdapter;A.HttpStatusCode=$t;A.default=A;var Pe=A;var{Axios:Ui,AxiosError:ki,CanceledError:Di,isCancel:Fi,CancelToken:Bi,VERSION:Ii,all:Hi,Cancel:qi,isAxiosError:Mi,spread:ji,toFormData:zi,AxiosHeaders:Wi,HttpStatusCode:Ji,formToJSON:Vi,getAdapter:$i,mergeConfig:Ki}=Pe;var xo=localStorage.getItem("api-mode"),Ro="http://127.0.0.1:8787",Ao="https://assembled-brands-dev.crystal-e8a.workers.dev",H={apiBaseUrl:xo==="local"?Ro:Ao,apiVersion:"/api/v1",accessTokenPersistStrategy:"cookie",TOKEN_NAME_IN_STORAGE:"accessToken",TOKEN_TYPE:"Bearer",REQUEST_HEADER_AUTH_KEY:"Authorization"},W=e=>{if(!e){console.error("navigateToPath: path is empty or undefined");return}let t=e.replace(/^\/+/,""),r=t;r=`dev/${t}`;let o=`${window.location.origin}/${r}`;window.location.assign(o)};var Oo=(e,t,r)=>{let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n="expires="+o.toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; ${n}; path=/`},st=e=>{let t=document.cookie.split("; ");for(let r of t){let[o,n]=r.split("=");if(o===e)return decodeURIComponent(n)}return null},Xt=e=>{Oo(e,"",-1)},Gt=()=>{let e=st("accessToken");return e||W("/login?error=unauthorized"),e};var To=e=>{let t=H.accessTokenPersistStrategy;if(t==="localStorage"||t==="sessionStorage"||t==="cookie"){let o="";t==="localStorage"&&(o=localStorage.getItem(H.TOKEN_NAME_IN_STORAGE)||""),t==="sessionStorage"&&(o=sessionStorage.getItem(H.TOKEN_NAME_IN_STORAGE)||""),t==="cookie"&&(o=st(H.TOKEN_NAME_IN_STORAGE)||""),o&&(e.headers[H.REQUEST_HEADER_AUTH_KEY]=`${H.TOKEN_TYPE} ${o}`)}let r=localStorage.getItem("x-team-id");return r&&(e.headers["X-Team-Id"]=r),e},Qt=To;var Lo=[401,419,440],Co=e=>{let{response:t}=e;if(window.location.pathname.includes("/login"))return Promise.reject(e);t&&Lo.includes(t.status)&&(Xt("accessToken"),W("/login?error=unauthorized"))},Yt=Co;var it=Pe.create({timeout:6e4,baseURL:H.apiBaseUrl+H.apiVersion});it.interceptors.request.use(e=>Qt(e),e=>Promise.reject(e));it.interceptors.response.use(e=>e,e=>(Yt(e),Promise.reject(e)));var Zt=it;var vo={fetchDataWithAxios(e){return new Promise((t,r)=>{Zt(e).then(o=>{t(o.data)}).catch(o=>{let n="An unknown error occurred";if(o.response&&o.response.data){let i=o.response.data;typeof i.message=="string"?n=i.message:typeof i.error=="string"?n=i.error:n=JSON.stringify(i)}else o.message&&(n=o.message);r({...o,message:n})})})}},_e=vo;var er=e=>_e.fetchDataWithAxios({url:"/onboarding-wizard/step1",method:"post",data:e}),tr=e=>_e.fetchDataWithAxios({url:"/onboarding-wizard/step2",method:"post",data:e}),rr=e=>_e.fetchDataWithAxios({url:"/onboarding-wizard/step3",method:"post",data:e});var v=(e,t=document)=>t.querySelector(e),Ue=(e,t=document)=>{let r=t.querySelectorAll(e);return[...Array.from(r)]};var No=()=>{Gt();let e=document.querySelector('[dev-target="onboarding-step1-form"]');if(!e){console.error('Onboarding Step 1 form not found. Element: [dev-target="onboarding-step1-form"] not found');return}let t=1,r=v('[dev-target="step-1"]',e),o=v('[dev-target="step-2"]',e),n=v('[dev-target="step-3"]',e),i=v('[dev-target="step-indicator"]'),s=v('[dev-target="step-text"]'),c=v('[dev-target="submit-button"]',e),d=v('[dev-target="back-button"]',e),f=v('[dev-target="legal-name-input"]',e),l=Ue('input[name="employee_options"]',e),m=v('[dev-target="website-input"]',e),E=v('[dev-target="years-in-business-input"]',e),R=Ue('input[name="asset_type"]',e),u=v('[dev-target="desired-loan-amount-input"]',e),h=Ue('input[name="company_type"]',e),p=v('[dev-target="company-type-other-input"]',e),x=v('[dev-target="company-type-other-input-wrapper"]',e),O=v('[dev-target="revenue-qualification-input"]',e);if(!r||!o||!n){console.error("Step wrappers not found");return}if(!c||!d){console.error("Navigation buttons not found");return}if(!s){console.error("Step text element not found");return}h.forEach(y=>{y.addEventListener("change",()=>{y.value==="other"?x?.classList.remove("hide"):x?.classList.add("hide")})});let S=y=>{if(r.classList.remove("is-active"),o.classList.remove("is-active"),n.classList.remove("is-active"),y===1&&r.classList.add("is-active"),y===2&&o.classList.add("is-active"),y===3&&n.classList.add("is-active"),i){let C=y/3*100;i.style.width=`${C}%`}s&&(s.textContent=`Step ${y} of 3`),c.value=y===3?"FINISH":"NEXT",t=y};S(1),d.addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),t===1?W("/login"):S(t-1)}),e.addEventListener("submit",async y=>{y.preventDefault(),y.stopPropagation(),t===1?await L():t===2?await P():t===3&&await q()});let L=async()=>{let y=()=>{f?.classList.remove("is-error"),l.forEach(b=>b.classList.remove("is-error")),m?.classList.remove("is-error"),c.classList.remove("is-error"),c.value="NEXT"};if(f?.addEventListener("input",y,{once:!0}),l.forEach(b=>b.addEventListener("change",y,{once:!0})),m?.addEventListener("input",y,{once:!0}),!f?.value){f?.classList.add("is-error"),c.classList.add("is-error"),c.value="Legal name is required";return}let C=l.find(b=>b.checked);if(!C){c.classList.add("is-error"),c.value="Employee count is required";return}if(!m?.value){m?.classList.add("is-error"),c.classList.add("is-error"),c.value="Website is required";return}let D={legal_name:f.value,employee_count:C.value,website:m.value};try{await er(D),c.classList.add("is-success"),c.value="Saved!",setTimeout(()=>{c.classList.remove("is-success"),S(2)},300)}catch(b){let{message:_}=b;console.error(_),c.classList.add("is-error"),c.value=_||"There was a problem saving your information"}},P=async()=>{let y=()=>{E?.classList.remove("is-error"),R.forEach(b=>b.classList.remove("is-error")),u?.classList.remove("is-error"),c.classList.remove("is-error"),c.value="NEXT"};if(E?.addEventListener("input",y,{once:!0}),R.forEach(b=>b.addEventListener("change",y,{once:!0})),u?.addEventListener("input",y,{once:!0}),!E?.value){E?.classList.add("is-error"),c.classList.add("is-error"),c.value="Years in business is required";return}let C=R.find(b=>b.checked);if(!C){c.classList.add("is-error"),c.value="Asset type is required";return}if(!u?.value){u?.classList.add("is-error"),c.classList.add("is-error"),c.value="Desired loan amount is required";return}let D={years_in_business:E.value,asset_type:C.value,desired_loan_amount:u.value};try{await tr(D),c.classList.add("is-success"),c.value="Saved!",setTimeout(()=>{c.classList.remove("is-success"),S(3)},300)}catch(b){let{message:_}=b;console.error(_),c.classList.add("is-error"),c.value=_||"There was a problem saving your information"}},q=async()=>{let y=()=>{h.forEach(b=>b.classList.remove("is-error")),p?.classList.remove("is-error"),O?.classList.remove("is-error"),c.classList.remove("is-error"),c.value="FINISH"};h.forEach(b=>b.addEventListener("change",y,{once:!0})),p?.addEventListener("input",y,{once:!0}),O?.addEventListener("change",y,{once:!0});let C=h.find(b=>b.checked);if(!C){c.classList.add("is-error"),c.value="Company type is required";return}if(C.value==="other"&&!p?.value){p?.classList.add("is-error"),c.classList.add("is-error"),c.value="Please specify the company type";return}if(!O?.value){O?.classList.add("is-error"),c.classList.add("is-error"),c.value="Revenue qualification is required";return}if(O.value==="no"){W("/onboarding-step-not-fit");return}let D={company_type:C.value,revenue_qualification:O.value,...C.value==="other"&&p?.value?{company_type_other:p.value}:{}};try{await rr(D),c.classList.add("is-success"),c.value="Complete!",setTimeout(()=>{W("/finance-company-profile")},500)}catch(b){let{message:_}=b;console.error(_),c.classList.add("is-error"),c.value=_||"There was a problem saving your information"}}};window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{try{No()}catch(e){console.error(e)}});