@assembled-brands/frontend 0.4.2 → 0.4.4
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.
- package/dist/pages/finance-docs-accounts-inventory/index.js +5 -5
- package/dist/pages/finance-docs-accounts-inventory/index.js.map +2 -2
- package/dist/pages/finance-docs-ecommerce-performance/index.js +5 -5
- package/dist/pages/finance-docs-ecommerce-performance/index.js.map +2 -2
- package/dist/pages/finance-docs-financial-reports/index.js +5 -5
- package/dist/pages/finance-docs-financial-reports/index.js.map +2 -2
- package/dist/pages/finance-docs-team-ownership/index.js +5 -5
- package/dist/pages/finance-docs-team-ownership/index.js.map +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var gr=Object.defineProperty;var yr=(e,t)=>{for(var r in t)gr(e,r,{get:t[r],enumerable:!0})};function te(e,t){return function(){return e.apply(t,arguments)}}var{toString:br}=Object.prototype,{getPrototypeOf:Fe}=Object,{iterator:ye,toStringTag:dt}=Symbol,be=(e=>t=>{let r=br.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),D=e=>(e=e.toLowerCase(),t=>be(t)===e),xe=e=>t=>typeof t===e,{isArray:J}=Array,V=xe("undefined");function re(e){return e!==null&&!V(e)&&e.constructor!==null&&!V(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var ft=D("ArrayBuffer");function xr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ft(e.buffer),t}var Er=xe("string"),C=xe("function"),mt=xe("number"),oe=e=>e!==null&&typeof e=="object",vr=e=>e===!0||e===!1,ge=e=>{if(be(e)!=="object")return!1;let t=Fe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dt in e)&&!(ye in e)},Rr=e=>{if(!oe(e)||re(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},wr=D("Date"),Ar=D("File"),Sr=D("Blob"),Tr=D("FileList"),Lr=e=>oe(e)&&C(e.pipe),Cr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||C(e.append)&&((t=be(e))==="formdata"||t==="object"&&C(e.toString)&&e.toString()==="[object FormData]"))},Or=D("URLSearchParams"),[_r,Pr,Dr,Ur]=["ReadableStream","Request","Response","Headers"].map(D),Fr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,n;if(typeof e!="object"&&(e=[e]),J(e))for(o=0,n=e.length;o<n;o++)t.call(null,e[o],o,e);else{if(re(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(re(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 z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gt=e=>!V(e)&&e!==z;function Ue(){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]=Ue(r[s],n):ge(n)?r[s]=Ue({},n):J(n)?r[s]=n.slice():(!t||!V(n))&&(r[s]=n)};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&ne(arguments[n],o);return r}var Br=(e,t,r,{allOwnKeys:o}={})=>(ne(t,(n,i)=>{r&&C(n)?e[i]=te(n,r):e[i]=n},{allOwnKeys:o}),e),Mr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kr=(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)},Nr=(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},Ir=(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},Hr=e=>{if(!e)return null;if(J(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},Wr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Fe(Uint8Array)),qr=(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])}},jr=(e,t)=>{let r,o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},zr=D("HTMLFormElement"),$r=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,n){return o.toUpperCase()+n}),pt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Gr=D("RegExp"),yt=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),o={};ne(r,(n,i)=>{let s;(s=t(n,i,e))!==!1&&(o[i]=s||n)}),Object.defineProperties(e,o)},Vr=e=>{yt(e,(t,r)=>{if(C(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let o=e[r];if(C(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+"'")})}})},Jr=(e,t)=>{let r={},o=n=>{n.forEach(i=>{r[i]=!0})};return J(e)?o(e):o(String(e).split(t)),r},Kr=()=>{},Xr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Qr(e){return!!(e&&C(e.append)&&e[dt]==="FormData"&&e[ye])}var Yr=e=>{let t=new Array(10),r=(o,n)=>{if(oe(o)){if(t.indexOf(o)>=0)return;if(re(o))return o;if(!("toJSON"in o)){t[n]=o;let i=J(o)?[]:{};return ne(o,(s,c)=>{let u=r(s,n+1);!V(u)&&(i[c]=u)}),t[n]=void 0,i}}return o};return r(e,0)},Zr=D("AsyncFunction"),eo=e=>e&&(oe(e)||C(e))&&C(e.then)&&C(e.catch),bt=((e,t)=>e?setImmediate:t?((r,o)=>(z.addEventListener("message",({source:n,data:i})=>{n===z&&i===r&&o.length&&o.shift()()},!1),n=>{o.push(n),z.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",C(z.postMessage)),to=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||bt,ro=e=>e!=null&&C(e[ye]),a={isArray:J,isArrayBuffer:ft,isBuffer:re,isFormData:Cr,isArrayBufferView:xr,isString:Er,isNumber:mt,isBoolean:vr,isObject:oe,isPlainObject:ge,isEmptyObject:Rr,isReadableStream:_r,isRequest:Pr,isResponse:Dr,isHeaders:Ur,isUndefined:V,isDate:wr,isFile:Ar,isBlob:Sr,isRegExp:Gr,isFunction:C,isStream:Lr,isURLSearchParams:Or,isTypedArray:Wr,isFileList:Tr,forEach:ne,merge:Ue,extend:Br,trim:Fr,stripBOM:Mr,inherits:kr,toFlatObject:Nr,kindOf:be,kindOfTest:D,endsWith:Ir,toArray:Hr,forEachEntry:qr,matchAll:jr,isHTMLForm:zr,hasOwnProperty:pt,hasOwnProp:pt,reduceDescriptors:yt,freezeMethods:Vr,toObjectSet:Jr,toCamelCase:$r,noop:Kr,toFiniteNumber:Xr,findKey:ht,global:z,isContextDefined:gt,isSpecCompliantForm:Qr,toJSONObject:Yr,isAsyncFn:Zr,isThenable:eo,setImmediate:bt,asap:to,isIterable:ro};function K(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(K,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 xt=K.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(e=>{Et[e]={value:e}});Object.defineProperties(K,Et);Object.defineProperty(xt,"isAxiosError",{value:!0});K.from=(e,t,r,o,n,i)=>{let s=Object.create(xt);a.toFlatObject(e,s,function(p){return p!==Error.prototype},d=>d!=="isAxiosError");let c=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return K.call(s,c,u,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=K;var Ee=null;function Be(e){return a.isPlainObject(e)||a.isArray(e)}function Rt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function vt(e,t,r){return e?e.concat(t).map(function(n,i){return n=Rt(n),!r&&i?"["+n+"]":n}).join(r?".":""):t}function oo(e){return a.isArray(e)&&!e.some(Be)}var no=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function so(e,t,r){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new(Ee||FormData),r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,f){return!a.isUndefined(f[m])});let o=r.metaTokens,n=r.visitor||p,i=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(n))throw new TypeError("visitor must be a function");function d(l){if(l===null)return"";if(a.isDate(l))return l.toISOString();if(a.isBoolean(l))return l.toString();if(!u&&a.isBlob(l))throw new g("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(l)||a.isTypedArray(l)?u&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function p(l,m,f){let x=l;if(l&&!f&&typeof l=="object"){if(a.endsWith(m,"{}"))m=o?m:m.slice(0,-2),l=JSON.stringify(l);else if(a.isArray(l)&&oo(l)||(a.isFileList(l)||a.endsWith(m,"[]"))&&(x=a.toArray(l)))return m=Rt(m),x.forEach(function(E,T){!(a.isUndefined(E)||E===null)&&t.append(s===!0?vt([m],T,i):s===null?m:m+"[]",d(E))}),!1}return Be(l)?!0:(t.append(vt(f,m,i),d(l)),!1)}let h=[],y=Object.assign(no,{defaultVisitor:p,convertValue:d,isVisitable:Be});function S(l,m){if(!a.isUndefined(l)){if(h.indexOf(l)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(l),a.forEach(l,function(x,v){(!(a.isUndefined(x)||x===null)&&n.call(t,x,a.isString(v)?v.trim():v,m,y))===!0&&S(x,m?m.concat(v):[v])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}var q=so;function wt(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&&q(e,this,t)}var St=At.prototype;St.append=function(t,r){this._pairs.push([t,r])};St.toString=function(t){let r=t?function(o){return t.call(this,o,wt)}:wt;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var ve=At;function io(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function se(e,t,r){if(!t)return e;let o=r&&r.encode||io;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 ve(t,r).toString(o),i){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var Me=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)})}},ke=Me;var Re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Tt=typeof URLSearchParams<"u"?URLSearchParams:ve;var Lt=typeof FormData<"u"?FormData:null;var Ct=typeof Blob<"u"?Blob:null;var Ot={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Lt,Blob:Ct},protocols:["http","https","file","blob","url","data"]};var He={};yr(He,{hasBrowserEnv:()=>Ie,hasStandardBrowserEnv:()=>ao,hasStandardBrowserWebWorkerEnv:()=>co,navigator:()=>Ne,origin:()=>lo});var Ie=typeof window<"u"&&typeof document<"u",Ne=typeof navigator=="object"&&navigator||void 0,ao=Ie&&(!Ne||["ReactNative","NativeScript","NS"].indexOf(Ne.product)<0),co=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lo=Ie&&window.location.href||"http://localhost";var R={...He,...Ot};function We(e,t){return q(e,new R.classes.URLSearchParams,{visitor:function(r,o,n,i){return R.isNode&&a.isBuffer(r)?(this.append(o,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function uo(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function po(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 fo(e){function t(r,o,n,i){let s=r[i++];if(s==="__proto__")return!0;let c=Number.isFinite(+s),u=i>=r.length;return s=!s&&a.isArray(n)?n.length:s,u?(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]=po(n[s])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){let r={};return a.forEachEntry(e,(o,n)=>{t(uo(o),n,r,0)}),r}return null}var we=fo;function mo(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 qe={transitional:Re,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(we(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 We(t,this.formSerializer).toString();if((c=a.isFileList(t))||o.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return q(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||n?(r.setContentType("application/json",!1),mo(t)):t}],transformResponse:[function(t){let r=this.transitional||qe.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:R.classes.FormData,Blob:R.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=>{qe.headers[e]={}});var X=qe;var ho=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"]),_t=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]&&
|
|
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=ie(s);o[c]||(xo(n,s),o[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};Q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(Q.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}});a.freezeMethods(Q);var A=Q;function ae(e,t){let r=this||X,o=t||r,n=A.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 ce(e){return!!(e&&e.__CANCEL__)}function Dt(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(Dt,g,{__CANCEL__:!0});var M=Dt;function le(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 ze(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Eo(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(u){let d=Date.now(),p=o[i];s||(s=d),r[n]=u,o[n]=d;let h=i,y=0;for(;h!==n;)y+=r[h++],h=h%e;if(n=(n+1)%e,n===i&&(i=(i+1)%e),d-s<t)return;let S=p&&d-p;return S?Math.round(y*1e3/S):void 0}}var Ut=Eo;function vo(e,t){let r=0,o=1e3/t,n,i,s=(d,p=Date.now())=>{r=p,n=null,i&&(clearTimeout(i),i=null),e(...d)};return[(...d)=>{let p=Date.now(),h=p-r;h>=o?s(d,p):(n=d,i||(i=setTimeout(()=>{i=null,s(n)},o-h)))},()=>n&&s(n)]}var Ft=vo;var Y=(e,t,r=3)=>{let o=0,n=Ut(50,250);return Ft(i=>{let s=i.loaded,c=i.lengthComputable?i.total:void 0,u=s-o,d=n(u),p=s<=c;o=s;let h={loaded:s,total:c,progress:c?s/c:void 0,bytes:u,rate:d||void 0,estimated:d&&c&&p?(c-s)/d:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},r)},$e=(e,t)=>{let r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},Ge=e=>(...t)=>a.asap(()=>e(...t));var Bt=R.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,R.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(R.origin),R.navigator&&/(msie|trident)/i.test(R.navigator.userAgent)):()=>!0;var Mt=R.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 Ve(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Je(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ue(e,t,r){let o=!Ve(t);return e&&(o||r==!1)?Je(e,t):t}var kt=e=>e instanceof A?{...e}:e;function U(e,t){t=t||{};let r={};function o(d,p,h,y){return a.isPlainObject(d)&&a.isPlainObject(p)?a.merge.call({caseless:y},d,p):a.isPlainObject(p)?a.merge({},p):a.isArray(p)?p.slice():p}function n(d,p,h,y){if(a.isUndefined(p)){if(!a.isUndefined(d))return o(void 0,d,h,y)}else return o(d,p,h,y)}function i(d,p){if(!a.isUndefined(p))return o(void 0,p)}function s(d,p){if(a.isUndefined(p)){if(!a.isUndefined(d))return o(void 0,d)}else return o(void 0,p)}function c(d,p,h){if(h in t)return o(d,p);if(h in e)return o(void 0,d)}let u={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:(d,p,h)=>n(kt(d),kt(p),h,!0)};return a.forEach(Object.keys({...e,...t}),function(p){let h=u[p]||n,y=h(e[p],t[p],p);a.isUndefined(y)&&h!==c||(r[p]=y)}),r}var Se=e=>{let t=U({},e),{data:r,withXSRFToken:o,xsrfHeaderName:n,xsrfCookieName:i,headers:s,auth:c}=t;if(t.headers=s=A.from(s),t.url=se(ue(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(R.hasStandardBrowserEnv||R.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(a.isFunction(r.getHeaders)){let u=r.getHeaders(),d=["content-type","content-length"];Object.entries(u).forEach(([p,h])=>{d.includes(p.toLowerCase())&&s.set(p,h)})}}if(R.hasStandardBrowserEnv&&(o&&a.isFunction(o)&&(o=o(t)),o||o!==!1&&Bt(t.url))){let u=n&&i&&Mt.read(i);u&&s.set(n,u)}return t};var Ro=typeof XMLHttpRequest<"u",Nt=Ro&&function(e){return new Promise(function(r,o){let n=Se(e),i=n.data,s=A.from(n.headers).normalize(),{responseType:c,onUploadProgress:u,onDownloadProgress:d}=n,p,h,y,S,l;function m(){S&&S(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(p),n.signal&&n.signal.removeEventListener("abort",p)}let f=new XMLHttpRequest;f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout;function x(){if(!f)return;let E=A.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),O={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:E,config:e,request:f};le(function(L){r(L),m()},function(L){o(L),m()},O),f=null}"onloadend"in f?f.onloadend=x:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(x)},f.onabort=function(){f&&(o(new g("Request aborted",g.ECONNABORTED,e,f)),f=null)},f.onerror=function(T){let O=T&&T.message?T.message:"Network Error",I=new g(O,g.ERR_NETWORK,e,f);I.event=T||null,o(I),f=null},f.ontimeout=function(){let T=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",O=n.transitional||Re;n.timeoutErrorMessage&&(T=n.timeoutErrorMessage),o(new g(T,O.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,f)),f=null},i===void 0&&s.setContentType(null),"setRequestHeader"in f&&a.forEach(s.toJSON(),function(T,O){f.setRequestHeader(O,T)}),a.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),c&&c!=="json"&&(f.responseType=n.responseType),d&&([y,l]=Y(d,!0),f.addEventListener("progress",y)),u&&f.upload&&([h,S]=Y(u),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",S)),(n.cancelToken||n.signal)&&(p=E=>{f&&(o(!E||E.type?new M(null,e,f):E),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(p),n.signal&&(n.signal.aborted?p():n.signal.addEventListener("abort",p)));let v=ze(n.url);if(v&&R.protocols.indexOf(v)===-1){o(new g("Unsupported protocol "+v+":",g.ERR_BAD_REQUEST,e));return}f.send(i||null)})};var wo=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let o=new AbortController,n,i=function(d){if(!n){n=!0,c();let p=d instanceof Error?d:this.reason;o.abort(p instanceof g?p:new M(p instanceof Error?p.message:p))}},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(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));let{signal:u}=o;return u.unsubscribe=()=>a.asap(c),u}},It=wo;var Ao=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},So=async function*(e,t){for await(let r of To(e))yield*Ao(r,t)},To=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()}},Ke=(e,t,r,o)=>{let n=So(e,t),i=0,s,c=u=>{s||(s=!0,o&&o(u))};return new ReadableStream({async pull(u){try{let{done:d,value:p}=await n.next();if(d){c(),u.close();return}let h=p.byteLength;if(r){let y=i+=h;r(y)}u.enqueue(new Uint8Array(p))}catch(d){throw c(d),d}},cancel(u){return c(u),n.return()}},{highWaterMark:2})};var Ht=64*1024,{isFunction:Te}=a,Lo=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:Wt,TextEncoder:qt}=a.global,jt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Co=e=>{e=a.merge.call({skipUndefined:!0},Lo,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(Wt),u=n&&(typeof qt=="function"?(l=>m=>l.encode(m))(new qt):async l=>new Uint8Array(await new r(l).arrayBuffer())),d=i&&c&&jt(()=>{let l=!1,m=new r(R.origin,{body:new Wt,method:"POST",get duplex(){return l=!0,"half"}}).headers.has("Content-Type");return l&&!m}),p=s&&c&&jt(()=>a.isReadableStream(new o("").body)),h={stream:p&&(l=>l.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!h[l]&&(h[l]=(m,f)=>{let x=m&&m[l];if(x)return x.call(m);throw new g(`Response type '${l}' is not supported`,g.ERR_NOT_SUPPORT,f)})});let y=async l=>{if(l==null)return 0;if(a.isBlob(l))return l.size;if(a.isSpecCompliantForm(l))return(await new r(R.origin,{method:"POST",body:l}).arrayBuffer()).byteLength;if(a.isArrayBufferView(l)||a.isArrayBuffer(l))return l.byteLength;if(a.isURLSearchParams(l)&&(l=l+""),a.isString(l))return(await u(l)).byteLength},S=async(l,m)=>{let f=a.toFiniteNumber(l.getContentLength());return f??y(m)};return async l=>{let{url:m,method:f,data:x,signal:v,cancelToken:E,timeout:T,onDownloadProgress:O,onUploadProgress:I,responseType:L,headers:_,withCredentials:F="same-origin",fetchOptions:fe}=Se(l),it=t||fetch;L=L?(L+"").toLowerCase():"text";let me=It([v,E&&E.toAbortSignal()],T),ee=null,j=me&&me.unsubscribe&&(()=>{me.unsubscribe()}),at;try{if(I&&d&&f!=="get"&&f!=="head"&&(at=await S(_,x))!==0){let W=new r(m,{method:"POST",body:x,duplex:"half"}),G;if(a.isFormData(x)&&(G=W.headers.get("content-type"))&&_.setContentType(G),W.body){let[De,he]=$e(at,Y(Ge(I)));x=Ke(W.body,Ht,De,he)}}a.isString(F)||(F=F?"include":"omit");let B=i&&"credentials"in r.prototype,ct={...fe,signal:me,method:f.toUpperCase(),headers:_.normalize().toJSON(),body:x,duplex:"half",credentials:B?F:void 0};ee=i&&new r(m,ct);let H=await(i?it(ee,fe):it(m,ct)),lt=p&&(L==="stream"||L==="response");if(p&&(O||lt&&j)){let W={};["status","statusText","headers"].forEach(ut=>{W[ut]=H[ut]});let G=a.toFiniteNumber(H.headers.get("content-length")),[De,he]=O&&$e(G,Y(Ge(O),!0))||[];H=new o(Ke(H.body,Ht,De,()=>{he&&he(),j&&j()}),W)}L=L||"text";let hr=await h[a.findKey(h,L)||"text"](H,l);return!lt&&j&&j(),await new Promise((W,G)=>{le(W,G,{data:hr,headers:A.from(H.headers),status:H.status,statusText:H.statusText,config:l,request:ee})})}catch(B){throw j&&j(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,l,ee),{cause:B.cause||B}):g.from(B,B&&B.code,l,ee)}}},Oo=new Map,Xe=e=>{let t=e&&e.env||{},{fetch:r,Request:o,Response:n}=t,i=[o,n,r],s=i.length,c=s,u,d,p=Oo;for(;c--;)u=i[c],d=p.get(u),d===void 0&&p.set(u,d=c?new Map:Co(t)),p=d;return d},Qs=Xe();var Qe={http:Ee,xhr:Nt,fetch:{get:Xe}};a.forEach(Qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var zt=e=>`- ${e}`,Po=e=>a.isFunction(e)||e===null||e===!1;function Do(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,!Po(o)&&(n=Qe[(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(([u,d])=>`adapter ${u} `+(d===!1?"is not supported by the environment":"is not available in the build")),c=r?s.length>1?`since :
|
|
1
|
+
var yr=Object.defineProperty;var br=(e,t)=>{for(var r in t)yr(e,r,{get:t[r],enumerable:!0})};function oe(e,t){return function(){return e.apply(t,arguments)}}var{toString:Er}=Object.prototype,{getPrototypeOf:Me}=Object,{iterator:be,toStringTag:dt}=Symbol,Ee=(e=>t=>{let r=Er.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),F=e=>(e=e.toLowerCase(),t=>Ee(t)===e),xe=e=>t=>typeof t===e,{isArray:K}=Array,J=xe("undefined");function ne(e){return e!==null&&!J(e)&&e.constructor!==null&&!J(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var ft=F("ArrayBuffer");function xr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ft(e.buffer),t}var vr=xe("string"),O=xe("function"),mt=xe("number"),se=e=>e!==null&&typeof e=="object",Rr=e=>e===!0||e===!1,ye=e=>{if(Ee(e)!=="object")return!1;let t=Me(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dt in e)&&!(be in e)},wr=e=>{if(!se(e)||ne(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ar=F("Date"),Sr=F("File"),Tr=F("Blob"),Lr=F("FileList"),Cr=e=>se(e)&&O(e.pipe),_r=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||O(e.append)&&((t=Ee(e))==="formdata"||t==="object"&&O(e.toString)&&e.toString()==="[object FormData]"))},Or=F("URLSearchParams"),[Dr,Pr,Ur,Fr]=["ReadableStream","Request","Response","Headers"].map(F),Mr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,n;if(typeof e!="object"&&(e=[e]),K(e))for(o=0,n=e.length;o<n;o++)t.call(null,e[o],o,e);else{if(ne(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(ne(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 z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gt=e=>!J(e)&&e!==z;function Fe(){let{caseless:e,skipUndefined:t}=gt(this)&&this||{},r={},o=(n,i)=>{let s=e&&ht(r,i)||i;ye(r[s])&&ye(n)?r[s]=Fe(r[s],n):ye(n)?r[s]=Fe({},n):K(n)?r[s]=n.slice():(!t||!J(n))&&(r[s]=n)};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&ie(arguments[n],o);return r}var Br=(e,t,r,{allOwnKeys:o}={})=>(ie(t,(n,i)=>{r&&O(n)?e[i]=oe(n,r):e[i]=n},{allOwnKeys:o}),e),kr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nr=(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)},Ir=(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&&Me(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Hr=(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},Wr=e=>{if(!e)return null;if(K(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},qr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Me(Uint8Array)),jr=(e,t)=>{let o=(e&&e[be]).call(e),n;for(;(n=o.next())&&!n.done;){let i=n.value;t.call(e,i[0],i[1])}},zr=(e,t)=>{let r,o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},$r=F("HTMLFormElement"),Gr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,n){return o.toUpperCase()+n}),pt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Vr=F("RegExp"),yt=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),o={};ie(r,(n,i)=>{let s;(s=t(n,i,e))!==!1&&(o[i]=s||n)}),Object.defineProperties(e,o)},Jr=e=>{yt(e,(t,r)=>{if(O(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let o=e[r];if(O(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+"'")})}})},Kr=(e,t)=>{let r={},o=n=>{n.forEach(i=>{r[i]=!0})};return K(e)?o(e):o(String(e).split(t)),r},Xr=()=>{},Qr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yr(e){return!!(e&&O(e.append)&&e[dt]==="FormData"&&e[be])}var Zr=e=>{let t=new Array(10),r=(o,n)=>{if(se(o)){if(t.indexOf(o)>=0)return;if(ne(o))return o;if(!("toJSON"in o)){t[n]=o;let i=K(o)?[]:{};return ie(o,(s,c)=>{let u=r(s,n+1);!J(u)&&(i[c]=u)}),t[n]=void 0,i}}return o};return r(e,0)},eo=F("AsyncFunction"),to=e=>e&&(se(e)||O(e))&&O(e.then)&&O(e.catch),bt=((e,t)=>e?setImmediate:t?((r,o)=>(z.addEventListener("message",({source:n,data:i})=>{n===z&&i===r&&o.length&&o.shift()()},!1),n=>{o.push(n),z.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",O(z.postMessage)),ro=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||bt,oo=e=>e!=null&&O(e[be]),a={isArray:K,isArrayBuffer:ft,isBuffer:ne,isFormData:_r,isArrayBufferView:xr,isString:vr,isNumber:mt,isBoolean:Rr,isObject:se,isPlainObject:ye,isEmptyObject:wr,isReadableStream:Dr,isRequest:Pr,isResponse:Ur,isHeaders:Fr,isUndefined:J,isDate:Ar,isFile:Sr,isBlob:Tr,isRegExp:Vr,isFunction:O,isStream:Cr,isURLSearchParams:Or,isTypedArray:qr,isFileList:Lr,forEach:ie,merge:Fe,extend:Br,trim:Mr,stripBOM:kr,inherits:Nr,toFlatObject:Ir,kindOf:Ee,kindOfTest:F,endsWith:Hr,toArray:Wr,forEachEntry:jr,matchAll:zr,isHTMLForm:$r,hasOwnProperty:pt,hasOwnProp:pt,reduceDescriptors:yt,freezeMethods:Jr,toObjectSet:Kr,toCamelCase:Gr,noop:Xr,toFiniteNumber:Qr,findKey:ht,global:z,isContextDefined:gt,isSpecCompliantForm:Yr,toJSONObject:Zr,isAsyncFn:eo,isThenable:to,setImmediate:bt,asap:ro,isIterable:oo};function X(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(X,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 Et=X.prototype,xt={};["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=>{xt[e]={value:e}});Object.defineProperties(X,xt);Object.defineProperty(Et,"isAxiosError",{value:!0});X.from=(e,t,r,o,n,i)=>{let s=Object.create(Et);a.toFlatObject(e,s,function(l){return l!==Error.prototype},p=>p!=="isAxiosError");let c=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return X.call(s,c,u,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 y=X;var ve=null;function Be(e){return a.isPlainObject(e)||a.isArray(e)}function Rt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function vt(e,t,r){return e?e.concat(t).map(function(n,i){return n=Rt(n),!r&&i?"["+n+"]":n}).join(r?".":""):t}function no(e){return a.isArray(e)&&!e.some(Be)}var so=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function io(e,t,r){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new(ve||FormData),r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,f){return!a.isUndefined(f[g])});let o=r.metaTokens,n=r.visitor||l,i=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(n))throw new TypeError("visitor must be a function");function p(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!u&&a.isBlob(d))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?u&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,g,f){let A=d;if(d&&!f&&typeof d=="object"){if(a.endsWith(g,"{}"))g=o?g:g.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&no(d)||(a.isFileList(d)||a.endsWith(g,"[]"))&&(A=a.toArray(d)))return g=Rt(g),A.forEach(function(b,v){!(a.isUndefined(b)||b===null)&&t.append(s===!0?vt([g],v,i):s===null?g:g+"[]",p(b))}),!1}return Be(d)?!0:(t.append(vt(f,g,i),p(d)),!1)}let m=[],x=Object.assign(so,{defaultVisitor:l,convertValue:p,isVisitable:Be});function w(d,g){if(!a.isUndefined(d)){if(m.indexOf(d)!==-1)throw Error("Circular reference detected in "+g.join("."));m.push(d),a.forEach(d,function(A,h){(!(a.isUndefined(A)||A===null)&&n.call(t,A,a.isString(h)?h.trim():h,g,x))===!0&&w(A,g?g.concat(h):[h])}),m.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return w(e),t}var j=io;function wt(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&&j(e,this,t)}var St=At.prototype;St.append=function(t,r){this._pairs.push([t,r])};St.toString=function(t){let r=t?function(o){return t.call(this,o,wt)}:wt;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var Re=At;function ao(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ae(e,t,r){if(!t)return e;let o=r&&r.encode||ao;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 Re(t,r).toString(o),i){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var ke=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)})}},Ne=ke;var we={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Tt=typeof URLSearchParams<"u"?URLSearchParams:Re;var Lt=typeof FormData<"u"?FormData:null;var Ct=typeof Blob<"u"?Blob:null;var _t={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Lt,Blob:Ct},protocols:["http","https","file","blob","url","data"]};var We={};br(We,{hasBrowserEnv:()=>He,hasStandardBrowserEnv:()=>co,hasStandardBrowserWebWorkerEnv:()=>lo,navigator:()=>Ie,origin:()=>uo});var He=typeof window<"u"&&typeof document<"u",Ie=typeof navigator=="object"&&navigator||void 0,co=He&&(!Ie||["ReactNative","NativeScript","NS"].indexOf(Ie.product)<0),lo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",uo=He&&window.location.href||"http://localhost";var R={...We,..._t};function qe(e,t){return j(e,new R.classes.URLSearchParams,{visitor:function(r,o,n,i){return R.isNode&&a.isBuffer(r)?(this.append(o,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function po(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fo(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 mo(e){function t(r,o,n,i){let s=r[i++];if(s==="__proto__")return!0;let c=Number.isFinite(+s),u=i>=r.length;return s=!s&&a.isArray(n)?n.length:s,u?(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]=fo(n[s])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){let r={};return a.forEachEntry(e,(o,n)=>{t(po(o),n,r,0)}),r}return null}var Ae=mo;function ho(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 je={transitional:we,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(Ae(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 qe(t,this.formSerializer).toString();if((c=a.isFileList(t))||o.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return j(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||n?(r.setContentType("application/json",!1),ho(t)):t}],transformResponse:[function(t){let r=this.transitional||je.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"?y.from(c,y.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:R.classes.FormData,Blob:R.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=>{je.headers[e]={}});var Q=je;var go=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"]),Ot=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]&&go[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t};var Dt=Symbol("internals");function ce(e){return e&&String(e).trim().toLowerCase()}function Se(e){return e===!1||e==null?e:a.isArray(e)?e.map(Se):String(e)}function yo(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 bo=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ze(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 Eo(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function xo(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,u,p){let l=ce(u);if(!l)throw new Error("header name must be a non-empty string");let m=a.findKey(n,l);(!m||n[m]===void 0||p===!0||p===void 0&&n[m]!==!1)&&(n[m||u]=Se(c))}let s=(c,u)=>a.forEach(c,(p,l)=>i(p,l,u));if(a.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(a.isString(t)&&(t=t.trim())&&!bo(t))s(Ot(t),r);else if(a.isObject(t)&&a.isIterable(t)){let c={},u,p;for(let l of t){if(!a.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[p=l[0]]=(u=c[p])?a.isArray(u)?[...u,l[1]]:[u,l[1]]:l[1]}s(c,r)}else t!=null&&i(r,t,o);return this}get(t,r){if(t=ce(t),t){let o=a.findKey(this,t);if(o){let n=this[o];if(!r)return n;if(r===!0)return yo(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=ce(t),t){let o=a.findKey(this,t);return!!(o&&this[o]!==void 0&&(!r||ze(this,this[o],o,r)))}return!1}delete(t,r){let o=this,n=!1;function i(s){if(s=ce(s),s){let c=a.findKey(o,s);c&&(!r||ze(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||ze(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]=Se(n),delete r[i];return}let c=t?Eo(i):String(i).trim();c!==i&&delete r[i],r[c]=Se(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[Dt]=this[Dt]={accessors:{}}).accessors,n=this.prototype;function i(s){let c=ce(s);o[c]||(xo(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 _=Y;function le(e,t){let r=this||Q,o=t||r,n=_.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 ue(e){return!!(e&&e.__CANCEL__)}function Pt(e,t,r){y.call(this,e??"canceled",y.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(Pt,y,{__CANCEL__:!0});var k=Pt;function pe(e,t,r){let o=r.config.validateStatus;!r.status||!o||o(r.status)?e(r):t(new y("Request failed with status code "+r.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function $e(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function vo(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(u){let p=Date.now(),l=o[i];s||(s=p),r[n]=u,o[n]=p;let m=i,x=0;for(;m!==n;)x+=r[m++],m=m%e;if(n=(n+1)%e,n===i&&(i=(i+1)%e),p-s<t)return;let w=l&&p-l;return w?Math.round(x*1e3/w):void 0}}var Ut=vo;function Ro(e,t){let r=0,o=1e3/t,n,i,s=(p,l=Date.now())=>{r=l,n=null,i&&(clearTimeout(i),i=null),e(...p)};return[(...p)=>{let l=Date.now(),m=l-r;m>=o?s(p,l):(n=p,i||(i=setTimeout(()=>{i=null,s(n)},o-m)))},()=>n&&s(n)]}var Ft=Ro;var Z=(e,t,r=3)=>{let o=0,n=Ut(50,250);return Ft(i=>{let s=i.loaded,c=i.lengthComputable?i.total:void 0,u=s-o,p=n(u),l=s<=c;o=s;let m={loaded:s,total:c,progress:c?s/c:void 0,bytes:u,rate:p||void 0,estimated:p&&c&&l?(c-s)/p:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},r)},Ge=(e,t)=>{let r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},Ve=e=>(...t)=>a.asap(()=>e(...t));var Mt=R.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,R.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(R.origin),R.navigator&&/(msie|trident)/i.test(R.navigator.userAgent)):()=>!0;var Bt=R.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 Je(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ke(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function de(e,t,r){let o=!Je(t);return e&&(o||r==!1)?Ke(e,t):t}var kt=e=>e instanceof _?{...e}:e;function M(e,t){t=t||{};let r={};function o(p,l,m,x){return a.isPlainObject(p)&&a.isPlainObject(l)?a.merge.call({caseless:x},p,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function n(p,l,m,x){if(a.isUndefined(l)){if(!a.isUndefined(p))return o(void 0,p,m,x)}else return o(p,l,m,x)}function i(p,l){if(!a.isUndefined(l))return o(void 0,l)}function s(p,l){if(a.isUndefined(l)){if(!a.isUndefined(p))return o(void 0,p)}else return o(void 0,l)}function c(p,l,m){if(m in t)return o(p,l);if(m in e)return o(void 0,p)}let u={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:(p,l,m)=>n(kt(p),kt(l),m,!0)};return a.forEach(Object.keys({...e,...t}),function(l){let m=u[l]||n,x=m(e[l],t[l],l);a.isUndefined(x)&&m!==c||(r[l]=x)}),r}var Te=e=>{let t=M({},e),{data:r,withXSRFToken:o,xsrfHeaderName:n,xsrfCookieName:i,headers:s,auth:c}=t;if(t.headers=s=_.from(s),t.url=ae(de(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(R.hasStandardBrowserEnv||R.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(a.isFunction(r.getHeaders)){let u=r.getHeaders(),p=["content-type","content-length"];Object.entries(u).forEach(([l,m])=>{p.includes(l.toLowerCase())&&s.set(l,m)})}}if(R.hasStandardBrowserEnv&&(o&&a.isFunction(o)&&(o=o(t)),o||o!==!1&&Mt(t.url))){let u=n&&i&&Bt.read(i);u&&s.set(n,u)}return t};var wo=typeof XMLHttpRequest<"u",Nt=wo&&function(e){return new Promise(function(r,o){let n=Te(e),i=n.data,s=_.from(n.headers).normalize(),{responseType:c,onUploadProgress:u,onDownloadProgress:p}=n,l,m,x,w,d;function g(){w&&w(),d&&d(),n.cancelToken&&n.cancelToken.unsubscribe(l),n.signal&&n.signal.removeEventListener("abort",l)}let f=new XMLHttpRequest;f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout;function A(){if(!f)return;let b=_.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),S={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:e,request:f};pe(function(T){r(T),g()},function(T){o(T),g()},S),f=null}"onloadend"in f?f.onloadend=A:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(A)},f.onabort=function(){f&&(o(new y("Request aborted",y.ECONNABORTED,e,f)),f=null)},f.onerror=function(v){let S=v&&v.message?v.message:"Network Error",C=new y(S,y.ERR_NETWORK,e,f);C.event=v||null,o(C),f=null},f.ontimeout=function(){let v=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",S=n.transitional||we;n.timeoutErrorMessage&&(v=n.timeoutErrorMessage),o(new y(v,S.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,f)),f=null},i===void 0&&s.setContentType(null),"setRequestHeader"in f&&a.forEach(s.toJSON(),function(v,S){f.setRequestHeader(S,v)}),a.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),c&&c!=="json"&&(f.responseType=n.responseType),p&&([x,d]=Z(p,!0),f.addEventListener("progress",x)),u&&f.upload&&([m,w]=Z(u),f.upload.addEventListener("progress",m),f.upload.addEventListener("loadend",w)),(n.cancelToken||n.signal)&&(l=b=>{f&&(o(!b||b.type?new k(null,e,f):b),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(l),n.signal&&(n.signal.aborted?l():n.signal.addEventListener("abort",l)));let h=$e(n.url);if(h&&R.protocols.indexOf(h)===-1){o(new y("Unsupported protocol "+h+":",y.ERR_BAD_REQUEST,e));return}f.send(i||null)})};var Ao=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let o=new AbortController,n,i=function(p){if(!n){n=!0,c();let l=p instanceof Error?p:this.reason;o.abort(l instanceof y?l:new k(l instanceof Error?l.message:l))}},s=t&&setTimeout(()=>{s=null,i(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t),c=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(i):p.removeEventListener("abort",i)}),e=null)};e.forEach(p=>p.addEventListener("abort",i));let{signal:u}=o;return u.unsubscribe=()=>a.asap(c),u}},It=Ao;var So=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},To=async function*(e,t){for await(let r of Lo(e))yield*So(r,t)},Lo=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()}},Xe=(e,t,r,o)=>{let n=To(e,t),i=0,s,c=u=>{s||(s=!0,o&&o(u))};return new ReadableStream({async pull(u){try{let{done:p,value:l}=await n.next();if(p){c(),u.close();return}let m=l.byteLength;if(r){let x=i+=m;r(x)}u.enqueue(new Uint8Array(l))}catch(p){throw c(p),p}},cancel(u){return c(u),n.return()}},{highWaterMark:2})};var Ht=64*1024,{isFunction:Le}=a,Co=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:Wt,TextEncoder:qt}=a.global,jt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_o=e=>{e=a.merge.call({skipUndefined:!0},Co,e);let{fetch:t,Request:r,Response:o}=e,n=t?Le(t):typeof fetch=="function",i=Le(r),s=Le(o);if(!n)return!1;let c=n&&Le(Wt),u=n&&(typeof qt=="function"?(d=>g=>d.encode(g))(new qt):async d=>new Uint8Array(await new r(d).arrayBuffer())),p=i&&c&&jt(()=>{let d=!1,g=new r(R.origin,{body:new Wt,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!g}),l=s&&c&&jt(()=>a.isReadableStream(new o("").body)),m={stream:l&&(d=>d.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!m[d]&&(m[d]=(g,f)=>{let A=g&&g[d];if(A)return A.call(g);throw new y(`Response type '${d}' is not supported`,y.ERR_NOT_SUPPORT,f)})});let x=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new r(R.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await u(d)).byteLength},w=async(d,g)=>{let f=a.toFiniteNumber(d.getContentLength());return f??x(g)};return async d=>{let{url:g,method:f,data:A,signal:h,cancelToken:b,timeout:v,onDownloadProgress:S,onUploadProgress:C,responseType:T,headers:te,withCredentials:G="same-origin",fetchOptions:he}=Te(d),re=t||fetch;T=T?(T+"").toLowerCase():"text";let D=It([h,b&&b.toAbortSignal()],v),U=null,H=D&&D.unsubscribe&&(()=>{D.unsubscribe()}),at;try{if(C&&p&&f!=="get"&&f!=="head"&&(at=await w(te,A))!==0){let q=new r(g,{method:"POST",body:A,duplex:"half"}),V;if(a.isFormData(A)&&(V=q.headers.get("content-type"))&&te.setContentType(V),q.body){let[Ue,ge]=Ge(at,Z(Ve(C)));A=Xe(q.body,Ht,Ue,ge)}}a.isString(G)||(G=G?"include":"omit");let B=i&&"credentials"in r.prototype,ct={...he,signal:D,method:f.toUpperCase(),headers:te.normalize().toJSON(),body:A,duplex:"half",credentials:B?G:void 0};U=i&&new r(g,ct);let W=await(i?re(U,he):re(g,ct)),lt=l&&(T==="stream"||T==="response");if(l&&(S||lt&&H)){let q={};["status","statusText","headers"].forEach(ut=>{q[ut]=W[ut]});let V=a.toFiniteNumber(W.headers.get("content-length")),[Ue,ge]=S&&Ge(V,Z(Ve(S),!0))||[];W=new o(Xe(W.body,Ht,Ue,()=>{ge&&ge(),H&&H()}),q)}T=T||"text";let gr=await m[a.findKey(m,T)||"text"](W,d);return!lt&&H&&H(),await new Promise((q,V)=>{pe(q,V,{data:gr,headers:_.from(W.headers),status:W.status,statusText:W.statusText,config:d,request:U})})}catch(B){throw H&&H(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,d,U),{cause:B.cause||B}):y.from(B,B&&B.code,d,U)}}},Oo=new Map,Qe=e=>{let t=e&&e.env||{},{fetch:r,Request:o,Response:n}=t,i=[o,n,r],s=i.length,c=s,u,p,l=Oo;for(;c--;)u=i[c],p=l.get(u),p===void 0&&l.set(u,p=c?new Map:_o(t)),l=p;return p},Ys=Qe();var Ye={http:ve,xhr:Nt,fetch:{get:Qe}};a.forEach(Ye,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var zt=e=>`- ${e}`,Po=e=>a.isFunction(e)||e===null||e===!1;function Uo(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,!Po(o)&&(n=Ye[(c=String(o)).toLowerCase()],n===void 0))throw new y(`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(([u,p])=>`adapter ${u} `+(p===!1?"is not supported by the environment":"is not available in the build")),c=r?s.length>1?`since :
|
|
4
4
|
`+s.map(zt).join(`
|
|
5
|
-
`):" "+zt(s[0]):"as no adapter specified";throw new
|
|
6
|
-
`+i):o.stack=i}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=U(this.defaults,r);let{transitional:o,paramsSerializer:n,headers:i}=r;o!==void 0&&pe.assertOptions(o,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),n!=null&&(a.isFunction(n)?r.paramsSerializer={serialize:n}:pe.assertOptions(n,{encode:k.function,serialize:k.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),pe.assertOptions(r,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.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"],l=>{delete i[l]}),r.headers=A.concat(s,i);let c=[],u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(u=u&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});let d=[];this.interceptors.response.forEach(function(m){d.push(m.fulfilled,m.rejected)});let p,h=0,y;if(!u){let l=[Ce.bind(this),void 0];for(l.unshift(...c),l.push(...d),y=l.length,p=Promise.resolve(r);h<y;)p=p.then(l[h++],l[h++]);return p}y=c.length;let S=r;for(;h<y;){let l=c[h++],m=c[h++];try{S=l(S)}catch(f){m.call(this,f);break}}try{p=Ce.call(this,S)}catch(l){return Promise.reject(l)}for(h=0,y=d.length;h<y;)p=p.then(d[h++],d[h++]);return p}getUri(t){t=U(this.defaults,t);let r=ue(t.baseURL,t.url,t.allowAbsoluteUrls);return se(r,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){Z.prototype[t]=function(r,o){return this.request(U(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(U(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Z.prototype[t]=r(),Z.prototype[t+"Form"]=r(!0)});var de=Z;var Ze=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 M(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}}},Gt=Ze;function et(e){return function(r){return e.apply(null,r)}}function tt(e){return a.isObject(e)&&e.isAxiosError===!0}var rt={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(rt).forEach(([e,t])=>{rt[t]=e});var Vt=rt;function Jt(e){let t=new de(e),r=te(de.prototype.request,t);return a.extend(r,de.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Jt(U(e,n))},r}var w=Jt(X);w.Axios=de;w.CanceledError=M;w.CancelToken=Gt;w.isCancel=ce;w.VERSION=Oe;w.toFormData=q;w.AxiosError=g;w.Cancel=w.CanceledError;w.all=function(t){return Promise.all(t)};w.spread=et;w.isAxiosError=tt;w.mergeConfig=U;w.AxiosHeaders=A;w.formToJSON=e=>we(a.isHTMLForm(e)?new FormData(e):e);w.getAdapter=Le.getAdapter;w.HttpStatusCode=Vt;w.default=w;var Pe=w;var{Axios:Ji,AxiosError:Ki,CanceledError:Xi,isCancel:Qi,CancelToken:Yi,VERSION:Zi,all:ea,Cancel:ta,isAxiosError:ra,spread:oa,toFormData:na,AxiosHeaders:sa,HttpStatusCode:ia,formToJSON:aa,getAdapter:ca,mergeConfig:la}=Pe;var Fo=localStorage.getItem("api-mode"),Bo="http://127.0.0.1:8787",Mo="https://assembled-brands-dev.crystal-e8a.workers.dev",N={apiBaseUrl:Fo==="local"?Bo:Mo,apiVersion:"/api/v1",accessTokenPersistStrategy:"cookie",TOKEN_NAME_IN_STORAGE:"accessToken",TOKEN_TYPE:"Bearer",REQUEST_HEADER_AUTH_KEY:"Authorization"},$=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 ko=(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=/`},ot=e=>{let t=document.cookie.split("; ");for(let r of t){let[o,n]=r.split("=");if(o===e)return decodeURIComponent(n)}return null},nt=e=>{ko(e,"",-1)},Kt=()=>{let e=ot("accessToken");return e||$("/login?error=unauthorized"),e},Xt=()=>{nt("accessToken"),localStorage.removeItem("x-team-id"),localStorage.removeItem("user"),$("/login?error=logged-out")},No=()=>{let e=localStorage.getItem("user"),t=e&&JSON.parse(e);return t&&t?.role},Qt=()=>No()==="admin";var Io=e=>{let t=N.accessTokenPersistStrategy;if(t==="localStorage"||t==="sessionStorage"||t==="cookie"){let o="";t==="localStorage"&&(o=localStorage.getItem(N.TOKEN_NAME_IN_STORAGE)||""),t==="sessionStorage"&&(o=sessionStorage.getItem(N.TOKEN_NAME_IN_STORAGE)||""),t==="cookie"&&(o=ot(N.TOKEN_NAME_IN_STORAGE)||""),o&&(e.headers[N.REQUEST_HEADER_AUTH_KEY]=`${N.TOKEN_TYPE} ${o}`)}let r=localStorage.getItem("x-team-id");return r&&(e.headers["X-Team-Id"]=r),e},Yt=Io;var Ho=[401,419,440],Wo=e=>{let{response:t}=e;if(window.location.pathname.includes("/login"))return Promise.reject(e);t&&Ho.includes(t.status)&&(nt("accessToken"),$("/login?error=unauthorized"))},Zt=Wo;var st=Pe.create({timeout:6e4,baseURL:N.apiBaseUrl+N.apiVersion});st.interceptors.request.use(e=>Yt(e),e=>Promise.reject(e));st.interceptors.response.use(e=>e,e=>(Zt(e),Promise.reject(e)));var er=st;var qo={fetchDataWithAxios(e){return new Promise((t,r)=>{er(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})})})}},P=qo;var tr=e=>P.fetchDataWithAxios({url:"/asset",method:"post",data:e});var rr=e=>P.fetchDataWithAxios({url:"/financial-wizard/document",method:"post",data:e}),or=e=>P.fetchDataWithAxios({url:"/financial-wizard/progress",method:"get",params:e?{user_id:e}:void 0});var nr=()=>P.fetchDataWithAxios({url:"/financial-wizard/applications",method:"get"});async function sr(){return P.fetchDataWithAxios({url:"/user/me",method:"get"})}var ir=()=>P.fetchDataWithAxios({url:"/onboarding-wizard/progress",method:"get"});var ar=()=>P.fetchDataWithAxios({url:"/team/my-teams",method:"get"});var b=(e,t=document)=>t.querySelector(e),cr=(e,t=document)=>{let r=t.querySelectorAll(e);return[...Array.from(r)]};var jo={"/dev/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/dev/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/dev/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/dev/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/dev/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/dev/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"},"/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"},"/invite-team-members":{nav_attr:"nav-team-member-link",nav_class:"is-active-financial"},"/dev/invite-team-members":{nav_attr:"nav-team-member-link",nav_class:"is-active-financial"}};var zo=async e=>{let[t,r,o,n]=await Promise.all([or(e),sr(),ar(),ir()]);return{financialProgress:t,user:r,teams:o,onboardingProgress:n}},lr=async e=>{try{let{financialProgress:t,user:r,teams:o,onboardingProgress:n}=await zo(e),i=t?.percentage||0,s=b('[dev-target="progress-percentage-fill"]'),c=cr('[dev-target="progress-percentage-label"]'),u=b('[dev-target="user-name"]'),d=b('[dev-target="user-email"]'),p=b('[dev-target="logout"]');if(!s||!c||!p||!u||!d){console.error('Ensure [dev-target="progress-percentage-fill"], [dev-target="progress-percentage-label"], [dev-target="user-name"], [dev-target="user-email"], and [dev-target="logout"] are present.');return}return s.style.width=`${i}%`,c[0].textContent=`Progress ${i}%`,c[1].textContent=`${i}%`,p.addEventListener("click",()=>{Xt()}),u.innerText=t.business?.legal_name||(r.first_name||"Full")+" "+(r.last_name||"Name"),d.innerText=t.business?.email||r.email||"hello@company.com",{financialProgress:t,user:r,teams:o,onboardingProgress:n}}catch(t){console.error("Failed to load financial wizard progress:",t)}},ur=()=>{if(!b('[dev-target="sidebar-menu"]')){console.error('Ensure [dev-target="sidebar-menu"] is present.');return}let t=window.location.pathname,r=jo[t],o=document.querySelectorAll('[dev-attr="nav"]');if(r){o.forEach(i=>{i.classList.remove("is-active"),i.classList.remove("is-active-financial")});let n=b(`[dev-target="${r.nav_attr}"]`);n&&n.classList.add(r.nav_class)}else o.forEach(n=>{n.classList.remove("is-active"),n.classList.remove("is-active-financial")})},pr=()=>{let e=b('[dev-target="modal-wrapper"]'),t=b('[dev-target="modal-image"]'),r=b('[dev-target="close-button"]'),o=b('[dev-target="modal-title"]');if(!r){console.error('Ensure [dev-target="close-button"] is present.');return}if(!o){console.error('Ensure [dev-target="modal-title"] is present.');return}if(!e){console.error('Ensure [dev-target="modal-wrapper"] is present.');return}if(!t){console.error('Ensure [dev-target="modal-image"] is present.');return}let{pathname:n}=window.location;r.addEventListener("click",()=>{e.classList.add("hide")});let i={"monthly-balance-sheet":{title:"Monthly Balance Sheets ** Last 2 years of monthly balance sheets",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"monthly-income-statement":{title:"Monthly Income Statements ** Last 2 years of monthly income statements",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"monthly-income-forecast":{title:"Monthly Income Forecast ** 12-month income forecast projection",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"monthly-inventory-reports":{title:"Monthly Inventory Reports ** Please provide inventory reports for at least the last 24 months, or longer if possible",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"ar-aging-reports":{title:"Accounts Receivable Aging Reports ** Please provide AR aging reports for the last 24 months, or longer if available",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"ap-aging-reports":{title:"Accounts Payable Aging Report ** Please provide the accounts payable aging report for the next 24 months, or longer if possible",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"repeat-customer-reports":{title:"Shopify Repeat Customer Reports ** Please provide reports on repeat customers for at least the last 24 months, or longer if possible",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"monthly-sales-reports":{title:"Shopify Monthly Sales Reports ** Please provide monthly sales reports from Shopify for the last 24 months, or longer if available",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"management-bios":{title:"Management Bios ** Please upload the management bios for our team",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"investor-deck":{title:"Investor Deck ** Please provide the most recent investor deck",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"cap-table":{title:"Capitalization Table ** Please provide the most recent capitalization table",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"}},s=c=>{let u=i[c];e.classList.toggle("hide"),t.src=u.imageUrl,o.textContent=u.title};if(n.includes("/dev/finance-docs-financial-reports")||n.includes("/finance-docs-financial-reports")){let c=b('[dev-target="monthly-balance-sheet"]'),u=b('[dev-target="monthly-income-statement"]'),d=b('[dev-target="monthly-income-forecast"]');c?.addEventListener("click",()=>s("monthly-balance-sheet")),u?.addEventListener("click",()=>s("monthly-income-statement")),d?.addEventListener("click",()=>s("monthly-income-forecast"))}if(n.includes("/dev/finance-docs-accounts-and-inventory")||n.includes("/finance-docs-accounts-and-inventory")){let c=b('[dev-target="monthly-inventory-reports"]'),u=b('[dev-target="ar-aging-reports"]'),d=b('[dev-target="ap-aging-reports"]');c?.addEventListener("click",()=>s("monthly-inventory-reports")),u?.addEventListener("click",()=>s("ar-aging-reports")),d?.addEventListener("click",()=>s("ap-aging-reports"))}if(n.includes("/dev/finance-docs-ecommerce-performance")||n.includes("/finance-docs-ecommerce-performance")){let c=b('[dev-target="repeat-customer-reports"]'),u=b('[dev-target="monthly-sales-reports"]');c?.addEventListener("click",()=>s("repeat-customer-reports")),u?.addEventListener("click",()=>s("monthly-sales-reports"))}if(n.includes("/dev/finance-docs-team-and-ownership")||n.includes("/finance-docs-team-and-ownership")){let c=b('[dev-target="management-bios"]'),u=b('[dev-target="investor-deck"]'),d=b('[dev-target="cap-table"]');c?.addEventListener("click",()=>s("management-bios")),u?.addEventListener("click",()=>s("investor-deck")),d?.addEventListener("click",()=>s("cap-table"))}},dr=async e=>{if(Qt()){let r=b('[dev-target="admin-select-wrapper"]'),o=b('[dev-target="admin-select"]');if(r?.classList.remove("hide"),!r||!o){console.error('Ensure [dev-target="admin-select"] and [dev-target="admin-select-wrapper"] is present.');return}let n=await nr();o.innerHTML="",n.forEach(i=>{let s=i.first_name||""+i.last_name||"",c=document.createElement("option");c.value=i.id.toString(),c.textContent=`${s||i.email}`,o.appendChild(c)}),o.addEventListener("change",async i=>{let s=i.target,{value:c}=s;e&&await e(c)})}},fr=e=>new Promise((t,r)=>{let o=new FileReader;o.onload=()=>{let i=o.result.split(",");t(i.length>1?i[1]:i[0])},o.onerror=()=>r(new Error("Failed to read file as base64")),o.readAsDataURL(e)}),mr=()=>{let e=b('[dev-target="sidebar-menu"]'),t=e?.querySelector(".sidebar"),r=b('[dev-target="collapsible-trigger"]');if(!e||!t||!r){console.error('Ensure [dev-target="sidebar-menu"] and [dev-target="collapsible-trigger"] and [dev-target="sidebar-inner"] are present.');return}let o=!1,n=()=>{o=!o;let i=document.querySelectorAll('[sidebar="collapsible-content"], [dev-target="collapsible-content"]'),s=b('[dev-target="sidebar-logo-text-wrapper"]'),c=e.querySelector('[dev-target="sidebar-bottom-collapsed"]'),u=e.querySelector('[dev-target="sidenav-close"]'),d=e.querySelector('[dev-target="sidebar-bottom"]'),p=e.querySelector(".user-profile_wrapper"),h=p?.querySelector(".flex-horizontal_auth.gap-15");o?(e.classList.add("collapsed"),t?.classList.add("mobile"),s?.classList.add("hide"),p?.classList.add("image-overlay"),h?.classList.add("overlay"),d?.classList.add("hide"),c?.classList.remove("hide"),u?.classList.add("is-collapsed"),i.forEach(y=>{y.style.opacity="0",y.style.transition="opacity 0.2s ease",setTimeout(()=>{y.classList.add("hide")},200)}),e.style.width="80px",e.style.width="auto"):(e.classList.remove("collapsed"),t?.classList.remove("mobile"),s?.classList.remove("hide"),p?.classList.remove("image-overlay"),h?.classList.remove("overlay"),d?.classList.remove("hide"),c?.classList.add("hide"),u?.classList.remove("is-collapsed"),i.forEach(y=>{y.classList.remove("hide"),setTimeout(()=>{y.style.opacity="1"},10)}))};r.addEventListener("click",n),e.style.transition="width 0.3s ease"};var $o=async()=>{ur(),Kt(),mr(),pr();let e=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],t=document.querySelector('[dev-target="ecommerce-performance-form"]');if(!t){console.error('E-Commerce Performance form not found. Element: [dev-target="ecommerce-performance-form"] not found');return}let r=b('[dev-target="shopify-repeat-upload-box"]',t),o=b('[dev-target="shopify-repeat-input"]',t),n=b('[dev-target="shopify-repeat-helper"]',t),i=b('[dev-target="shopify-monthly-upload-box"]',t),s=b('[dev-target="shopify-monthly-input"]',t),c=b('[dev-target="shopify-monthly-helper"]',t),u=b('[dev-target="submit-button"]',t);if(!r||!o||!n){console.error('Ensure [dev-target="shopify-repeat-upload-box"] and [dev-target="shopify-repeat-input"] and [dev-target="shopify-repeat-helper"] are present.');return}if(!i||!s||!c){console.error('Ensure [dev-target="shopify-monthly-upload-box"] and [dev-target="shopify-monthly-input"] and [dev-target="shopify-monthly-helper"] are present.');return}if(!u){console.error('Ensure [dev-target="submit-button"] is present.');return}let d=l=>{if(l?.ecommerce_performance){let m=l.ecommerce_performance.find(x=>x.document_type==="shopify_repeat_customers");m?n.textContent=m.asset_name||"Supported formats: sheets. xcel":n.textContent="Supported formats: sheets. xcel";let f=l.ecommerce_performance.find(x=>x.document_type==="shopify_monthly_sales");f?c.textContent=f.asset_name||"Supported formats: sheets. xcel":c.textContent="Supported formats: sheets. xcel"}else n.textContent="Supported formats: sheets. xcel",c.textContent="Supported formats: sheets. xcel"},p,h=async l=>{p=(await lr(l))?.financialProgress,d(p)};await h(),dr(h);let y=(l,m)=>{if(l.files&&l.files.length>0){let f=l.files[0];if(!e.includes(f.type)){l.value="",m.textContent="Invalid file type. Please upload Excel (.xls or .xlsx) files only",m.classList.add("is-error");return}m.textContent=f.name,m.classList.remove("is-error")}else m.textContent="",m.classList.remove("is-error")};r&&o&&n&&(r.addEventListener("click",()=>o.click()),r.addEventListener("dragover",l=>{l.preventDefault(),r.classList.add("drag")}),r.addEventListener("dragleave",()=>{r.classList.remove("drag")}),r.addEventListener("drop",l=>{l.preventDefault(),r.classList.remove("drag"),l.dataTransfer&&l.dataTransfer.files.length>0&&(o.files=l.dataTransfer.files,y(o,n),o.dispatchEvent(new Event("change",{bubbles:!0})))}),o.addEventListener("change",()=>{y(o,n)})),i&&s&&c&&(i.addEventListener("click",()=>s.click()),i.addEventListener("dragover",l=>{l.preventDefault(),i.classList.add("drag")}),i.addEventListener("dragleave",()=>{i.classList.remove("drag")}),i.addEventListener("drop",l=>{l.preventDefault(),i.classList.remove("drag"),l.dataTransfer&&l.dataTransfer.files.length>0&&(s.files=l.dataTransfer.files,y(s,c),s.dispatchEvent(new Event("change",{bubbles:!0})))}),s.addEventListener("change",()=>{y(s,c)}));let S=async(l,m)=>{if(!e.includes(l.type))throw new Error("Invalid file type. Please upload Excel (.xls or .xlsx) files only");let f={fileName:l.name,contentType:l.type,assetType:"document",fileSize:l.size,duration:0},x=await tr(f),v=x.asset.id,{presignedUrl:E}=x;if(!E)throw new Error("Presigned URL not received from server");await new Promise((I,L)=>{let _=new XMLHttpRequest;_.upload.addEventListener("progress",F=>{if(F.lengthComputable){let fe=Math.round(F.loaded/F.total*100);console.log(`Upload progress: ${fe}%`)}}),_.addEventListener("load",()=>{_.status>=200&&_.status<300?I():L(new Error("Failed to upload file to S3"))}),_.addEventListener("error",F=>{console.error(F),L(new Error("Network error during upload"))}),_.open("PUT",E),_.setRequestHeader("Content-Type",l.type),_.send(l)});let T=await fr(l),O={page:"ecommerce-performance",document_type:m,asset_id:v,file_data:T,file_name:l.name,file_mime_type:l.type};await rr(O)};t.addEventListener("submit",async l=>{l.preventDefault(),l.stopPropagation();let m=()=>{r?.classList.remove("is-error"),i?.classList.remove("is-error"),n?.classList.remove("is-error"),c?.classList.remove("is-error"),u.classList.remove("is-error"),u.value="UPLOAD DOCUMENTS"};o?.addEventListener("change",m,{once:!0}),s?.addEventListener("change",m,{once:!0});let f=[];if(o?.files&&o.files[0]){let v=o.files[0];e.includes(v.type)?f.push({file:v,documentType:"shopify_repeat_customers"}):n?.classList.add("is-error")}if(s?.files&&s.files[0]){let v=s.files[0];e.includes(v.type)?f.push({file:v,documentType:"shopify_monthly_sales"}):c?.classList.add("is-error")}if(o?.files&&o.files[0]&&!e.includes(o.files[0].type)||s?.files&&s.files[0]&&!e.includes(s.files[0].type)){u.classList.add("is-error"),u.value="Please upload only Excel (.xls or .xlsx) files";return}if(f.length===0){u.classList.add("is-error"),u.value="Please select at least one file to upload";return}try{u.disabled=!0,u.value="Uploading...",await Promise.all(f.map(({file:v,documentType:E})=>S(v,E))),u.classList.add("is-success"),u.value="Documents uploaded successfully!",o&&(o.value=""),s&&(s.value=""),n&&(n.textContent="",n.classList.remove("is-error")),c&&(c.textContent="",c.classList.remove("is-error")),setTimeout(()=>{u.classList.remove("is-success"),u.value="UPLOAD DOCUMENTS",u.disabled=!1,$("/finance-docs-team-and-ownership")},900)}catch(v){let{message:E}=v;console.error(E),u.classList.add("is-error"),u.value=E||"There was a problem uploading the documents",u.disabled=!1}})};window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{try{$o()}catch(e){console.error(e)}});
|
|
5
|
+
`):" "+zt(s[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return n}var Ce={getAdapter:Uo,adapters:Ye};function Ze(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new k(null,e)}function _e(e){return Ze(e),e.headers=_.from(e.headers),e.data=le.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ce.getAdapter(e.adapter||Q.adapter,e)(e).then(function(o){return Ze(e),o.data=le.call(e,e.transformResponse,o),o.headers=_.from(o.headers),o},function(o){return ue(o)||(Ze(e),o&&o.response&&(o.response.data=le.call(e,e.transformResponse,o.response),o.response.headers=_.from(o.response.headers))),Promise.reject(o)})}var Oe="1.13.2";var De={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{De[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});var $t={};De.transitional=function(t,r,o){function n(i,s){return"[Axios v"+Oe+"] Transitional option '"+i+"'"+s+(o?". "+o:"")}return(i,s,c)=>{if(t===!1)throw new y(n(s," has been removed"+(r?" in "+r:"")),y.ERR_DEPRECATED);return r&&!$t[s]&&($t[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}};De.spelling=function(t){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function Fo(e,t,r){if(typeof e!="object")throw new y("options must be an object",y.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],u=c===void 0||s(c,i,e);if(u!==!0)throw new y("option "+i+" must be "+u,y.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}var fe={assertOptions:Fo,validators:De};var N=fe.validators,ee=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ne,response:new Ne}}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=M(this.defaults,r);let{transitional:o,paramsSerializer:n,headers:i}=r;o!==void 0&&fe.assertOptions(o,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean)},!1),n!=null&&(a.isFunction(n)?r.paramsSerializer={serialize:n}:fe.assertOptions(n,{encode:N.function,serialize:N.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),fe.assertOptions(r,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.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"],d=>{delete i[d]}),r.headers=_.concat(s,i);let c=[],u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(u=u&&g.synchronous,c.unshift(g.fulfilled,g.rejected))});let p=[];this.interceptors.response.forEach(function(g){p.push(g.fulfilled,g.rejected)});let l,m=0,x;if(!u){let d=[_e.bind(this),void 0];for(d.unshift(...c),d.push(...p),x=d.length,l=Promise.resolve(r);m<x;)l=l.then(d[m++],d[m++]);return l}x=c.length;let w=r;for(;m<x;){let d=c[m++],g=c[m++];try{w=d(w)}catch(f){g.call(this,f);break}}try{l=_e.call(this,w)}catch(d){return Promise.reject(d)}for(m=0,x=p.length;m<x;)l=l.then(p[m++],p[m++]);return l}getUri(t){t=M(this.defaults,t);let r=de(t.baseURL,t.url,t.allowAbsoluteUrls);return ae(r,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(r,o){return this.request(M(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(M(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 me=ee;var et=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 k(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}}},Gt=et;function tt(e){return function(r){return e.apply(null,r)}}function rt(e){return a.isObject(e)&&e.isAxiosError===!0}var ot={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ot).forEach(([e,t])=>{ot[t]=e});var Vt=ot;function Jt(e){let t=new me(e),r=oe(me.prototype.request,t);return a.extend(r,me.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Jt(M(e,n))},r}var L=Jt(Q);L.Axios=me;L.CanceledError=k;L.CancelToken=Gt;L.isCancel=ue;L.VERSION=Oe;L.toFormData=j;L.AxiosError=y;L.Cancel=L.CanceledError;L.all=function(t){return Promise.all(t)};L.spread=tt;L.isAxiosError=rt;L.mergeConfig=M;L.AxiosHeaders=_;L.formToJSON=e=>Ae(a.isHTMLForm(e)?new FormData(e):e);L.getAdapter=Ce.getAdapter;L.HttpStatusCode=Vt;L.default=L;var Pe=L;var{Axios:Ki,AxiosError:Xi,CanceledError:Qi,isCancel:Yi,CancelToken:Zi,VERSION:ea,all:ta,Cancel:ra,isAxiosError:oa,spread:na,toFormData:sa,AxiosHeaders:ia,HttpStatusCode:aa,formToJSON:ca,getAdapter:la,mergeConfig:ua}=Pe;var Mo=localStorage.getItem("api-mode"),Bo="http://127.0.0.1:8787",ko="https://assembled-brands-dev.crystal-e8a.workers.dev",I={apiBaseUrl:Mo==="local"?Bo:ko,apiVersion:"/api/v1",accessTokenPersistStrategy:"cookie",TOKEN_NAME_IN_STORAGE:"accessToken",TOKEN_TYPE:"Bearer",REQUEST_HEADER_AUTH_KEY:"Authorization"},$=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 No=(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=/`},nt=e=>{let t=document.cookie.split("; ");for(let r of t){let[o,n]=r.split("=");if(o===e)return decodeURIComponent(n)}return null},st=e=>{No(e,"",-1)},Kt=()=>{let e=nt("accessToken");return e||$("/login?error=unauthorized"),e},Xt=()=>{st("accessToken"),localStorage.removeItem("x-team-id"),localStorage.removeItem("user"),$("/login?error=logged-out")},Io=()=>{let e=localStorage.getItem("user"),t=e&&JSON.parse(e);return t&&t?.role},Qt=()=>Io()==="admin";var Ho=e=>{let t=I.accessTokenPersistStrategy;if(t==="localStorage"||t==="sessionStorage"||t==="cookie"){let o="";t==="localStorage"&&(o=localStorage.getItem(I.TOKEN_NAME_IN_STORAGE)||""),t==="sessionStorage"&&(o=sessionStorage.getItem(I.TOKEN_NAME_IN_STORAGE)||""),t==="cookie"&&(o=nt(I.TOKEN_NAME_IN_STORAGE)||""),o&&(e.headers[I.REQUEST_HEADER_AUTH_KEY]=`${I.TOKEN_TYPE} ${o}`)}let r=localStorage.getItem("x-team-id");return r&&(e.headers["X-Team-Id"]=r),e},Yt=Ho;var Wo=[401,419,440],qo=e=>{let{response:t}=e;if(window.location.pathname.includes("/login"))return Promise.reject(e);t&&Wo.includes(t.status)&&(st("accessToken"),$("/login?error=unauthorized"))},Zt=qo;var it=Pe.create({timeout:6e4,baseURL:I.apiBaseUrl+I.apiVersion});it.interceptors.request.use(e=>Yt(e),e=>Promise.reject(e));it.interceptors.response.use(e=>e,e=>(Zt(e),Promise.reject(e)));var er=it;var jo={fetchDataWithAxios(e){return new Promise((t,r)=>{er(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})})})}},P=jo;var tr=e=>P.fetchDataWithAxios({url:"/asset",method:"post",data:e});var rr=e=>P.fetchDataWithAxios({url:"/financial-wizard/document",method:"post",data:e}),or=e=>P.fetchDataWithAxios({url:"/financial-wizard/progress",method:"get",params:e?{user_id:e}:void 0});var nr=e=>P.fetchDataWithAxios({url:`/financial-wizard/document/${e}`,method:"delete"}),sr=()=>P.fetchDataWithAxios({url:"/financial-wizard/applications",method:"get"});async function ir(){return P.fetchDataWithAxios({url:"/user/me",method:"get"})}var ar=()=>P.fetchDataWithAxios({url:"/onboarding-wizard/progress",method:"get"});var cr=()=>P.fetchDataWithAxios({url:"/team/my-teams",method:"get"});var E=(e,t=document)=>t.querySelector(e),lr=(e,t=document)=>{let r=t.querySelectorAll(e);return[...Array.from(r)]};var zo={"/dev/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/dev/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/dev/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/dev/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/dev/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/dev/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"},"/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"},"/invite-team-members":{nav_attr:"nav-team-member-link",nav_class:"is-active-financial"},"/dev/invite-team-members":{nav_attr:"nav-team-member-link",nav_class:"is-active-financial"}};var $o=async e=>{let[t,r,o,n]=await Promise.all([or(e),ir(),cr(),ar()]);return{financialProgress:t,user:r,teams:o,onboardingProgress:n}},ur=async e=>{try{let{financialProgress:t,user:r,teams:o,onboardingProgress:n}=await $o(e),i=t?.percentage||0,s=E('[dev-target="progress-percentage-fill"]'),c=lr('[dev-target="progress-percentage-label"]'),u=E('[dev-target="user-name"]'),p=E('[dev-target="user-email"]'),l=E('[dev-target="logout"]');if(!s||!c||!l||!u||!p){console.error('Ensure [dev-target="progress-percentage-fill"], [dev-target="progress-percentage-label"], [dev-target="user-name"], [dev-target="user-email"], and [dev-target="logout"] are present.');return}return s.style.width=`${i}%`,c[0].textContent=`Progress ${i}%`,c[1].textContent=`${i}%`,l.addEventListener("click",()=>{Xt()}),u.innerText=t.business?.legal_name||(r.first_name||"Full")+" "+(r.last_name||"Name"),p.innerText=t.business?.email||r.email||"hello@company.com",{financialProgress:t,user:r,teams:o,onboardingProgress:n}}catch(t){console.error("Failed to load financial wizard progress:",t)}},pr=()=>{if(!E('[dev-target="sidebar-menu"]')){console.error('Ensure [dev-target="sidebar-menu"] is present.');return}let t=window.location.pathname,r=zo[t],o=document.querySelectorAll('[dev-attr="nav"]');if(r){o.forEach(i=>{i.classList.remove("is-active"),i.classList.remove("is-active-financial")});let n=E(`[dev-target="${r.nav_attr}"]`);n&&n.classList.add(r.nav_class)}else o.forEach(n=>{n.classList.remove("is-active"),n.classList.remove("is-active-financial")})},dr=()=>{let e=E('[dev-target="modal-wrapper"]'),t=E('[dev-target="modal-image"]'),r=E('[dev-target="close-button"]'),o=E('[dev-target="modal-title"]');if(!r){console.error('Ensure [dev-target="close-button"] is present.');return}if(!o){console.error('Ensure [dev-target="modal-title"] is present.');return}if(!e){console.error('Ensure [dev-target="modal-wrapper"] is present.');return}if(!t){console.error('Ensure [dev-target="modal-image"] is present.');return}let{pathname:n}=window.location;r.addEventListener("click",()=>{e.classList.add("hide")});let i={"monthly-balance-sheet":{title:"Monthly Balance Sheets ** Last 2 years of monthly balance sheets",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"monthly-income-statement":{title:"Monthly Income Statements ** Last 2 years of monthly income statements",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"monthly-income-forecast":{title:"Monthly Income Forecast ** 12-month income forecast projection",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"monthly-inventory-reports":{title:"Monthly Inventory Reports ** Please provide inventory reports for at least the last 24 months, or longer if possible",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"ar-aging-reports":{title:"Accounts Receivable Aging Reports ** Please provide AR aging reports for the last 24 months, or longer if available",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"ap-aging-reports":{title:"Accounts Payable Aging Report ** Please provide the accounts payable aging report for the next 24 months, or longer if possible",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"repeat-customer-reports":{title:"Shopify Repeat Customer Reports ** Please provide reports on repeat customers for at least the last 24 months, or longer if possible",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"monthly-sales-reports":{title:"Shopify Monthly Sales Reports ** Please provide monthly sales reports from Shopify for the last 24 months, or longer if available",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"management-bios":{title:"Management Bios ** Please upload the management bios for our team",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"investor-deck":{title:"Investor Deck ** Please provide the most recent investor deck",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"},"cap-table":{title:"Capitalization Table ** Please provide the most recent capitalization table",imageUrl:"https://cdn.prod.website-files.com/66624bc26087f29222853df8/6975e8a978e87571b90a51a0_image%204.png"}},s=c=>{let u=i[c];e.classList.toggle("hide"),t.src=u.imageUrl,o.textContent=u.title};if(n.includes("/dev/finance-docs-financial-reports")||n.includes("/finance-docs-financial-reports")){let c=E('[dev-target="monthly-balance-sheet"]'),u=E('[dev-target="monthly-income-statement"]'),p=E('[dev-target="monthly-income-forecast"]');c?.addEventListener("click",()=>s("monthly-balance-sheet")),u?.addEventListener("click",()=>s("monthly-income-statement")),p?.addEventListener("click",()=>s("monthly-income-forecast"))}if(n.includes("/dev/finance-docs-accounts-and-inventory")||n.includes("/finance-docs-accounts-and-inventory")){let c=E('[dev-target="monthly-inventory-reports"]'),u=E('[dev-target="ar-aging-reports"]'),p=E('[dev-target="ap-aging-reports"]');c?.addEventListener("click",()=>s("monthly-inventory-reports")),u?.addEventListener("click",()=>s("ar-aging-reports")),p?.addEventListener("click",()=>s("ap-aging-reports"))}if(n.includes("/dev/finance-docs-ecommerce-performance")||n.includes("/finance-docs-ecommerce-performance")){let c=E('[dev-target="repeat-customer-reports"]'),u=E('[dev-target="monthly-sales-reports"]');c?.addEventListener("click",()=>s("repeat-customer-reports")),u?.addEventListener("click",()=>s("monthly-sales-reports"))}if(n.includes("/dev/finance-docs-team-and-ownership")||n.includes("/finance-docs-team-and-ownership")){let c=E('[dev-target="management-bios"]'),u=E('[dev-target="investor-deck"]'),p=E('[dev-target="cap-table"]');c?.addEventListener("click",()=>s("management-bios")),u?.addEventListener("click",()=>s("investor-deck")),p?.addEventListener("click",()=>s("cap-table"))}},fr=async e=>{if(Qt()){let r=E('[dev-target="admin-select-wrapper"]'),o=E('[dev-target="admin-select"]');if(r?.classList.remove("hide"),!r||!o){console.error('Ensure [dev-target="admin-select"] and [dev-target="admin-select-wrapper"] is present.');return}let n=await sr();o.innerHTML="",n.forEach(i=>{let s=i.first_name||""+i.last_name||"",c=document.createElement("option");c.value=i.id.toString(),c.textContent=`${s||i.email}`,o.appendChild(c)}),o.addEventListener("change",async i=>{let s=i.target,{value:c}=s;e&&await e(c)})}},mr=e=>new Promise((t,r)=>{let o=new FileReader;o.onload=()=>{let i=o.result.split(",");t(i.length>1?i[1]:i[0])},o.onerror=()=>r(new Error("Failed to read file as base64")),o.readAsDataURL(e)}),hr=()=>{let e=E('[dev-target="sidebar-menu"]'),t=e?.querySelector(".sidebar"),r=E('[dev-target="collapsible-trigger"]');if(!e||!t||!r){console.error('Ensure [dev-target="sidebar-menu"] and [dev-target="collapsible-trigger"] and [dev-target="sidebar-inner"] are present.');return}let o=!1,n=()=>{o=!o;let i=document.querySelectorAll('[sidebar="collapsible-content"], [dev-target="collapsible-content"]'),s=E('[dev-target="sidebar-logo-text-wrapper"]'),c=e.querySelector('[dev-target="sidebar-bottom-collapsed"]'),u=e.querySelector('[dev-target="sidenav-close"]'),p=e.querySelector('[dev-target="sidebar-bottom"]'),l=e.querySelector(".user-profile_wrapper"),m=l?.querySelector(".flex-horizontal_auth.gap-15");o?(e.classList.add("collapsed"),t?.classList.add("mobile"),s?.classList.add("hide"),l?.classList.add("image-overlay"),m?.classList.add("overlay"),p?.classList.add("hide"),c?.classList.remove("hide"),u?.classList.add("is-collapsed"),i.forEach(x=>{x.style.opacity="0",x.style.transition="opacity 0.2s ease",setTimeout(()=>{x.classList.add("hide")},200)}),e.style.width="80px",e.style.width="auto"):(e.classList.remove("collapsed"),t?.classList.remove("mobile"),s?.classList.remove("hide"),l?.classList.remove("image-overlay"),m?.classList.remove("overlay"),p?.classList.remove("hide"),c?.classList.add("hide"),u?.classList.remove("is-collapsed"),i.forEach(x=>{x.classList.remove("hide"),setTimeout(()=>{x.style.opacity="1"},10)}))};r.addEventListener("click",n),e.style.transition="width 0.3s ease"};var Go=async()=>{pr(),Kt(),hr(),dr();let e=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],t=document.querySelector('[dev-target="ecommerce-performance-form"]');if(!t){console.error('E-Commerce Performance form not found. Element: [dev-target="ecommerce-performance-form"] not found');return}let r=E('[dev-target="shopify-repeat-upload-box"]',t),o=E('[dev-target="shopify-repeat-input"]',t),n=E('[dev-target="shopify-repeat-helper"]',t),i=E('[dev-target="shopify-monthly-upload-box"]',t),s=E('[dev-target="shopify-monthly-input"]',t),c=E('[dev-target="shopify-monthly-helper"]',t),u=E('[dev-target="submit-button"]',t);if(!r||!o||!n){console.error('Ensure [dev-target="shopify-repeat-upload-box"] and [dev-target="shopify-repeat-input"] and [dev-target="shopify-repeat-helper"] are present.');return}if(!i||!s||!c){console.error('Ensure [dev-target="shopify-monthly-upload-box"] and [dev-target="shopify-monthly-input"] and [dev-target="shopify-monthly-helper"] are present.');return}if(!u){console.error('Ensure [dev-target="submit-button"] is present.');return}let p=h=>{if(h?.ecommerce_performance){let b=h.ecommerce_performance.find(S=>S.document_type==="shopify_repeat_customers");b?n.textContent=b.asset_name||"Supported formats: sheets. xcel":n.textContent="Supported formats: sheets. xcel";let v=h.ecommerce_performance.find(S=>S.document_type==="shopify_monthly_sales");v?c.textContent=v.asset_name||"Supported formats: sheets. xcel":c.textContent="Supported formats: sheets. xcel"}else n.textContent="Supported formats: sheets. xcel",c.textContent="Supported formats: sheets. xcel"},l,m=async h=>{l=(await ur(h))?.financialProgress,p(l)},x=h=>{if(l?.ecommerce_performance)return l.ecommerce_performance.find(b=>b.document_type===h)};await m(),fr(m);let w=(h,b)=>{if(h.files&&h.files.length>0){let v=h.files[0];if(!e.includes(v.type)){h.value="",b.textContent="Invalid file type. Please upload Excel (.xls or .xlsx) files only",b.classList.add("is-error");return}b.textContent=v.name,b.classList.remove("is-error")}else b.textContent="",b.classList.remove("is-error")};r&&o&&n&&(r.addEventListener("click",()=>o.click()),r.addEventListener("dragover",h=>{h.preventDefault(),r.classList.add("drag")}),r.addEventListener("dragleave",()=>{r.classList.remove("drag")}),r.addEventListener("drop",h=>{h.preventDefault(),r.classList.remove("drag"),h.dataTransfer&&h.dataTransfer.files.length>0&&(o.files=h.dataTransfer.files,w(o,n),o.dispatchEvent(new Event("change",{bubbles:!0})))}),o.addEventListener("change",()=>{w(o,n)})),i&&s&&c&&(i.addEventListener("click",()=>s.click()),i.addEventListener("dragover",h=>{h.preventDefault(),i.classList.add("drag")}),i.addEventListener("dragleave",()=>{i.classList.remove("drag")}),i.addEventListener("drop",h=>{h.preventDefault(),i.classList.remove("drag"),h.dataTransfer&&h.dataTransfer.files.length>0&&(s.files=h.dataTransfer.files,w(s,c),s.dispatchEvent(new Event("change",{bubbles:!0})))}),s.addEventListener("change",()=>{w(s,c)}));let d=E('[dev-target="shopifiy-repeat-trash-icon"]',t),g=E('[dev-target="shopify-monthly-trash-icon"]',t),f=async(h,b)=>{let v=x(h);if(!v){b&&(b.textContent="Supported formats: sheets. xcel",b.classList.remove("is-error"));return}b&&(b.classList.remove("is-error"),b.textContent="Deleting...");try{await nr(v.id),await m()}catch(S){console.error(S),b&&(b.classList.add("is-error"),b.textContent="Failed to delete file. Please try again.")}};d&&d.addEventListener("click",h=>{h.preventDefault(),h.stopPropagation(),f("shopify_repeat_customers",n)}),g&&g.addEventListener("click",h=>{h.preventDefault(),h.stopPropagation(),f("shopify_monthly_sales",c)});let A=async(h,b)=>{if(!e.includes(h.type))throw new Error("Invalid file type. Please upload Excel (.xls or .xlsx) files only");let v={fileName:h.name,contentType:h.type,assetType:"document",fileSize:h.size,duration:0},S=await tr(v),C=S.asset.id,{presignedUrl:T}=S;if(!T)throw new Error("Presigned URL not received from server");await new Promise((he,re)=>{let D=new XMLHttpRequest;D.upload.addEventListener("progress",U=>{if(U.lengthComputable){let H=Math.round(U.loaded/U.total*100)}}),D.addEventListener("load",()=>{D.status>=200&&D.status<300?he():re(new Error("Failed to upload file to S3"))}),D.addEventListener("error",U=>{console.error(U),re(new Error("Network error during upload"))}),D.open("PUT",T),D.setRequestHeader("Content-Type",h.type),D.send(h)});let te=await mr(h),G={page:"ecommerce-performance",document_type:b,asset_id:C,file_data:te,file_name:h.name,file_mime_type:h.type};await rr(G)};t.addEventListener("submit",async h=>{h.preventDefault(),h.stopPropagation();let b=()=>{r?.classList.remove("is-error"),i?.classList.remove("is-error"),n?.classList.remove("is-error"),c?.classList.remove("is-error"),u.classList.remove("is-error"),u.value="UPLOAD DOCUMENTS"};o?.addEventListener("change",b,{once:!0}),s?.addEventListener("change",b,{once:!0});let v=[];if(o?.files&&o.files[0]){let C=o.files[0];e.includes(C.type)?v.push({file:C,documentType:"shopify_repeat_customers"}):n?.classList.add("is-error")}if(s?.files&&s.files[0]){let C=s.files[0];e.includes(C.type)?v.push({file:C,documentType:"shopify_monthly_sales"}):c?.classList.add("is-error")}if(o?.files&&o.files[0]&&!e.includes(o.files[0].type)||s?.files&&s.files[0]&&!e.includes(s.files[0].type)){u.classList.add("is-error"),u.value="Please upload only Excel (.xls or .xlsx) files";return}if(v.length===0){u.classList.add("is-error"),u.value="Please select at least one file to upload";return}try{u.disabled=!0,u.value="Uploading...",await Promise.all(v.map(({file:C,documentType:T})=>A(C,T))),u.classList.add("is-success"),u.value="Documents uploaded successfully!",o&&(o.value=""),s&&(s.value=""),n&&(n.textContent="",n.classList.remove("is-error")),c&&(c.textContent="",c.classList.remove("is-error")),setTimeout(()=>{u.classList.remove("is-success"),u.value="UPLOAD DOCUMENTS",u.disabled=!1,$("/finance-docs-team-and-ownership")},900)}catch(C){let{message:T}=C;console.error(T),u.classList.add("is-error"),u.value=T||"There was a problem uploading the documents",u.disabled=!1}})};window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{try{Go()}catch(e){console.error(e)}});
|