1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,73340,e=>{"use strict";var t=e.i(79971),r=e.i(14070),a=e.i(65235),n=e.i(84813),i=e.i(95564),o=e.i(92363),s=e.i(56298),u=e.i(74233),c=class extends i.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,o.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#a=void 0;#n=void 0;#i=void 0;#o;#s;#r;#t;#u;#c;#l;#d;#p;#f;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#a.addObserver(this),l(this.#a,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#a,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#a,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#b(),this.#a.removeObserver(this)}setOptions(e){let t=this.options,r=this.#a;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,s.resolveQueryBoolean)(this.options.enabled,this.#a))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#a.setOptions(this.options),t._defaulted&&!(0,s.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#a,observer:this});let a=this.hasListeners();a&&p(this.#a,r,this.options,t)&&this.#m(),this.updateResult(),a&&(this.#a!==r||(0,s.resolveQueryBoolean)(this.options.enabled,this.#a)!==(0,s.resolveQueryBoolean)(t.enabled,this.#a)||(0,s.resolveStaleTime)(this.options.staleTime,this.#a)!==(0,s.resolveStaleTime)(t.staleTime,this.#a))&&this.#w();let n=this.#E();a&&(this.#a!==r||(0,s.resolveQueryBoolean)(this.options.enabled,this.#a)!==(0,s.resolveQueryBoolean)(t.enabled,this.#a)||n!==this.#f)&&this.#S(n)}getOptimisticResult(e){var t,r;let a=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(a,e);return t=this,r=n,(0,s.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#i=n,this.#s=this.options,this.#o=this.#a.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#a}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#m(e){this.#v();let t=this.#a.fetch(this.options,e);return e?.throwOnError||(t=t.catch(s.noop)),t}#w(){this.#g();let e=(0,s.resolveStaleTime)(this.options.staleTime,this.#a);if(r.environmentManager.isServer()||this.#i.isStale||!(0,s.isValidTimeout)(e))return;let t=(0,s.timeUntilStale)(this.#i.dataUpdatedAt,e);this.#d=u.timeoutManager.setTimeout(()=>{this.#i.isStale||this.updateResult()},t+1)}#E(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#a):this.options.refetchInterval)??!1}#S(e){this.#b(),this.#f=e,!r.environmentManager.isServer()&&!1!==(0,s.resolveQueryBoolean)(this.options.enabled,this.#a)&&(0,s.isValidTimeout)(this.#f)&&0!==this.#f&&(this.#p=u.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||t.focusManager.isFocused())&&this.#m()},this.#f))}#y(){this.#w(),this.#S(this.#E())}#g(){void 0!==this.#d&&(u.timeoutManager.clearTimeout(this.#d),this.#d=void 0)}#b(){void 0!==this.#p&&(u.timeoutManager.clearInterval(this.#p),this.#p=void 0)}createResult(e,t){let r,a=this.#a,i=this.options,u=this.#i,c=this.#o,d=this.#s,h=e!==a?e.state:this.#n,{state:m}=e,y={...m},g=!1;if(t._optimisticResults){let r=this.hasListeners(),o=!r&&l(e,t),s=r&&p(e,a,t,i);(o||s)&&(y={...y,...(0,n.fetchState)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(y.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:w}=y;r=y.data;let E=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===w){let e;u?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(e=u.data,E=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,void 0!==e&&(w="success",r=(0,s.replaceData)(u?.data,e,t),g=!0)}if(t.select&&void 0!==r&&!E)if(u&&r===c?.data&&t.select===this.#u)r=this.#c;else try{this.#u=t.select,r=t.select(r),r=(0,s.replaceData)(u?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}this.#t&&(b=this.#t,r=this.#c,v=Date.now(),w="error");let S="fetching"===y.fetchStatus,R="pending"===w,_="error"===w,O=R&&S,C=void 0!==r,A={status:w,fetchStatus:y.fetchStatus,isPending:R,isSuccess:"success"===w,isError:_,isInitialLoading:O,isLoading:O,data:r,dataUpdatedAt:y.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdate
1Count:y.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:y.dataUpdateCount>h.dataUpdateCount||y.errorUpdateCount>h.errorUpdateCount,isFetching:S,isRefetching:S&&!R,isLoadingError:_&&!C,isPaused:"paused"===y.fetchStatus,isPlaceholderData:g,isRefetchError:_&&C,isStale:f(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,s.resolveQueryBoolean)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==A.data,r="error"===A.status&&!t,n=e=>{r?e.reject(A.error):t&&e.resolve(A.data)},i=()=>{n(this.#r=A.promise=(0,o.pendingThenable)())},s=this.#r;switch(s.status){case"pending":e.queryHash===a.queryHash&&n(s);break;case"fulfilled":(r||A.data!==s.value)&&i();break;case"rejected":r&&A.error===s.reason||i()}}return A}updateResult(){let e=this.#i,t=this.createResult(this.#a,this.options);if(this.#o=this.#a.state,this.#s=this.options,void 0!==this.#o.data&&(this.#l=this.#a),(0,s.shallowEqualObjects)(t,e))return;this.#i=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#h.size)return!0;let a=new Set(r??this.#h);return this.options.throwOnError&&a.add("error"),Object.keys(this.#i).some(t=>this.#i[t]!==e[t]&&a.has(t))};this.#R({listeners:r()})}#v(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#a)return;let t=this.#a;this.#a=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#R(e){a.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#e.getQueryCache().notify({query:this.#a,type:"observerResultsUpdated"})})}};function l(e,t){return!1!==(0,s.resolveQueryBoolean)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,s.resolveQueryBoolean)(t.retryOnMount,e))||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,s.resolveQueryBoolean)(t.enabled,e)&&"static"!==(0,s.resolveStaleTime)(t.staleTime,e)){let a="function"==typeof r?r(e):r;return"always"===a||!1!==a&&f(e,t)}return!1}function p(e,t,r,a){return(e!==t||!1===(0,s.resolveQueryBoolean)(a.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&f(e,r)}function f(e,t){return!1!==(0,s.resolveQueryBoolean)(t.enabled,e)&&e.isStaleByTime((0,s.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",0,c])},85700,e=>{"use strict";var t=e.i(91788),r=e.i(91398),a=t.createContext(void 0);e.s(["QueryClientProvider",0,({client:e,children:n})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(a.Provider,{value:e,children:n})),"useQueryClient",0,e=>{let r=t.useContext(a);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r}])},93930,e=>{"use strict";let t;var r=e.i(73340);e.i(50461);var a=e.i(91788),n=e.i(14070),i=e.i(56298),o=e.i(65235),s=e.i(85700);e.i(91398);var u=a.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),c=a.createContext(!1);c.Provider;var l=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});e.s(["useQuery",0,function(e,t){return function(e,t,r){let d,p=a.useContext(c),f=a.useContext(u),h=(0,s.useQueryClient)(r),m=h.defaultQueryOptions(e);h.getDefaultOptions().queries?._experimental_beforeQuery?.(m);let y=h.getQueryCache().get(m.queryHash),g=!1!==e.subscribed;if(m._optimisticResults=p?"isRestoring":g?"optimistic":void 0,m.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=m.staleTime;m.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof m.gcTime&&(m.gcTime=Math.max(m.gcTime,1e3))}d=y?.state.error&&"function"==typeof m.throwOnError?(0,i.shouldThrowError)(m.throwOnError,[y.state.error,y]):m.throwOnError,(m.suspense||m.experimental_prefetchInRender||d)&&!f.isReset()&&(m.retryOn
1Mount=!1),a.useEffect(()=>{f.clearReset()},[f]);let b=!h.getQueryCache().get(m.queryHash),[v]=a.useState(()=>new t(h,m)),w=v.getOptimisticResult(m),E=!p&&g;if(a.useSyncExternalStore(a.useCallback(e=>{let t=E?v.subscribe(o.notifyManager.batchCalls(e)):i.noop;return v.updateResult(),t},[v,E]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),a.useEffect(()=>{v.setOptions(m)},[m,v]),m?.suspense&&w.isPending)throw l(m,v,f);if((({result:e,errorResetBoundary:t,throwOnError:r,query:a,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(n&&void 0===e.data||(0,i.shouldThrowError)(r,[e.error,a])))({result:w,errorResetBoundary:f,throwOnError:m.throwOnError,query:y,suspense:m.suspense}))throw w.error;if(h.getDefaultOptions().queries?._experimental_afterQuery?.(m,w),m.experimental_prefetchInRender&&!n.environmentManager.isServer()&&w.isLoading&&w.isFetching&&!p){let e=b?l(m,v,f):y?.promise;e?.catch(i.noop).finally(()=>{v.updateResult()})}return m.notifyOnChangeProps?w:v.trackResult(w)}(e,r.QueryObserver,t)}],93930)},76042,e=>{"use strict";let t=class{constructor(e={}){this["@class"]="br.com.stoom.kernel.model.persistence.User",this.uuid=e.uuid,this.username=e.username,this.email=e.email,this.active=e.active,this.deleted=e.deleted,this.created=e.created,this.password=e.password,this.blocked=e.blocked,this.score=e.score}},r=class{constructor(e={}){this.externalId=e.externalId,this.created=e.created,this.modified=e.modified,this.active=e.active,this.deleted=e.deleted,this.idCustomer=e.idCustomer,this.firstName=e.firstName,this.lastName=e.lastName,this.entity=e.entity,this.gender=e.gender,this.maritalStatus=e.maritalStatus,this.birthdate=e.birthdate,this.document=e.document,this.phone=e.phone,this.cellphone=e.mobile,this.newsletter=e.newsletter,this.sms=e.sms,this.nameContact=e.nameContact,this.fraudster=e.fraudster,this.ie=e.ie,this.stateIE=e.stateIE,this.mainAddress=e.mainAddress,this.customerType=e.customerType,this.uuid=e.uuid,this.user=new t(e.user),this.stateRegistration=e.stateRegistration,this.exempt=e.exempt,this.verifyEmail=e.verifyEmail,this.photoLink=e.photoLink,this.documentPathName=e.documentPathName,this.documentWithPhotoPathName=e.documentWithPhotoPathName,this.blocked=e.blocked,this.score=e.score,this.fullName=e.fullName,this.gdprOptin=e.gdprOptin,this.tfaDefaultChannel=e.tfaDefaultChannel}};e.s(["default",0,r],76042)},30559,e=>{"use strict";let t,r,a,n;var i,o,s,u,c=e.i(50461);function l(e,t){return function(){return e.apply(t,arguments)}}let{toString:d}=Object.prototype,{getPrototypeOf:p}=Object,{iterator:f,toStringTag:h}=Symbol,m=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),y=(e,t)=>{let r=e,a=[];for(;null!=r&&r!==Object.prototype&&-1===a.indexOf(r);){if(a.push(r),m(r,t))return!0;r=p(r)}return!1},g=(t=Object.create(null),e=>{let r=d.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())}),b=e=>(e=e.toLowerCase(),t=>g(t)===e),v=e=>t=>typeof t===e,{isArray:w}=Array,E=v("undefined");function S(e){return null!==e&&!E(e)&&null!==e.constructor&&!E(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let R=b("ArrayBuffer"),_=v("string"),O=v("function"),C=v("number"),A=e=>null!==e&&"object"==typeof e,T=e=>{if(!A(e))return!1;let t=p(e);return(null===t||t===Object.prototype||null===p(t))&&!y(e,h)&&!y(e,f)},P=b("Date"),x=b("File"),I=b("Blob"),N=b("FileList"),D="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g,L=void 0!==D.FormData?D.FormData:void 0,U=b("URLSearchParams"),[F,k,j,M]=["ReadableStream","Request","Response","Headers"].map(b);function $(e,t,{allOwnKeys:r=!1}={}){let a,n;if(null!=e)if("object"!=typeof e&&(e=[e]),w(e))for(a=0,n=e.length;a<n;a++)t.call(null,e[a],a,e);else{let n;if(S(e))return;let i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;for(a=0;a<o;a++)n=i[a],t.call(null,e[n],n,e)}}function B(e,t){let r;if(S(e))return null;t=t.toLowerCase();let a=Object.keys(e),n=a.length;for(;n-- >0;)if(t===(r=a[n]).toLowerCase())return r;return null}let Q="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g,q=e=>!E(e)&&e!==Q,K=(r="u">typeof Uint8Array&&p(Uint8Array),e=>r&&e instanceof r),z=b("HTMLFormElement"),{propertyIsEnumerable:H}=Object.prototype,V=b("RegExp"),W=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),a={};$(r,(r,n)=>{let i;!1!==(i=t(r,n,e))&&(a[n]=i||r)}),Object.defineProperties(e,a)},G=b("AsyncFunction"),Y=(i="function"==typeof setImmediate,o=O(Q.postMessage),i?setImmediate:o?(s=`axios@${Math.random()}`,u=[],Q.addEventListener("message",({source:e,data:t})=>{e===Q&&t===s&&u.length&&u.shift()()},!1),e=>{u.push(e),Q.postMessage(s,"*")}):e=>setTimeout(e)),J="u">typeof queueMicrotask?queueMicrotask.bind(Q):void 0!==c.default&&c.default.nextTick||Y,X=e=>null!=e&&O(e[f]),Z={isArray:w,isArrayBuffer:R,isBuffer:S,isFormData:e=>{if(!e)return!1;if(L&&e instanceof L)return!0;let t=p(e);if(!t||t===Object.prototype||!O(e.append))return!1;let r=g(e);return"formdata"===r||"object"===r&&O(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&R(e.buffer)},isString:_,isNumber:C,isBoolean:e=>!0===e||!1===e,isObject:A,isPlainObject:T,isEmptyObject:e=>{if(!A(e)||S(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:F,isRequest:k,isResponse:j,isHeaders:M,isUndefined:E,isDate:P,isFile:x,isReactNativeBlob:e=>!!(e&&void 0!==e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:I,isRegExp:V,isFunction:O,isStream:e=>A(e)&&O(e.pipe),isURLSearchParams:U,isTypedArray:K,isFileList:N,forEach:$,merge:function e(...t){let{caseless:r,skipUndefined:a}=q(this)&&this||{},n={},i=(t,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;let o=r&&"string"==typeof i&&B(n,i)||i,s=m(n,o)?n[o]:void 0;T(s)&&T(t)?n[o]=e(s,t):T(t)?n[o]=e({},t):w(t)?n[o]=t.slice():a&&E(t)||(n[o]=t)};for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!r||S(r)||($(r,i),"object"!=typeof r||w(r)))continue;let a=Object.getOwnPropertySymbols(r);for(let e=0;e<a.length;e++){let t=a[e];H.call(r,t)&&i(r[t],t)}}return n},extend:(e,t,r,{allOwnKeys:a}={})=>($(t,(t,a)=>{r&&O(t)?Object.defineProperty(e,a,{__proto__:null,value:l(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:a}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,a)=>{e.prototype=Object.create(t.prototype,a),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,
1configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,a)=>{let n,i,o,s={};if(t=t||{},null==e)return t;do{for(i=(n=Object.getOwnPropertyNames(e)).length;i-- >0;)o=n[i],(!a||a(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=!1!==r&&p(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype)return t},kindOf:g,kindOfTest:b,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let a=e.indexOf(t,r);return -1!==a&&a===r},toArray:e=>{if(!e)return null;if(w(e))return e;let t=e.length;if(!C(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r,a=(e&&e[f]).call(e);for(;(r=a.next())&&!r.done;){let a=r.value;t.call(e,a[0],a[1])}},matchAll:(e,t)=>{let r,a=[];for(;null!==(r=e.exec(t));)a.push(r);return a},isHTMLForm:z,hasOwnProperty:m,hasOwnProp:m,hasOwnInPrototypeChain:y,getSafeProp:(e,t)=>null!=e&&y(e,t)?e[t]:void 0,reduceDescriptors:W,freezeMethods:e=>{W(e,(t,r)=>{if(O(e)&&["arguments","caller","callee"].includes(r))return!1;if(O(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(w(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:B,global:Q,isContextDefined:q,isSpecCompliantForm:function(e){return!!(e&&O(e.append)&&"FormData"===e[h]&&e[f])},toJSONObject:e=>{let t=new WeakSet,r=e=>{if(A(e)){if(t.has(e))return;if(S(e))return e;if(!("toJSON"in e)){t.add(e);let a=w(e)?[]:{};return $(e,(e,t)=>{let n=r(e);E(n)||(a[t]=n)}),t.delete(e),a}}return e};return r(e)},isAsyncFn:G,isThenable:e=>e&&(A(e)||O(e))&&O(e.then)&&O(e.catch),setImmediate:Y,asap:J,isIterable:X,isSafeIterable:e=>null!=e&&y(e,f)&&X(e)};var ee=e.i(21168);let et=Z.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"]),er=RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ea=RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function en(e,t){return Z.isArray(e)?e.map(e=>en(e,t)):function(e){let t=0,r=e.length;for(;t<r;){let r=e.charCodeAt(t);if(9!==r&&32!==r)break;t+=1}for(;r>t;){let t=e.charCodeAt(r-1);if(9!==t&&32!==t)break;r-=1}return 0===t&&r===e.length?e:e.slice(t,r)}(String(e).replace(t,""))}function ei(e){let t=Object.create(null);return Z.forEach(e.toJSON(),(e,r)=>{t[r]=en(e,ea)}),t}let eo=Symbol("internals");function es(e){return e&&String(e).trim().toLowerCase()}function eu(e){return!1===e||null==e?e:Z.isArray(e)?e.map(eu):en(String(e),er)}function ec(e,t,r,a,n){if(Z.isFunction(a))return a.call(this,t,r);if(n&&(t=r),Z.isString(t)){if(Z.isString(a))return -1!==t.indexOf(a);if(Z.isRegExp(a))return a.test(t)}}
1class el{constructor(e){e&&this.set(e)}set(e,t,r){let a=this;function n(e,t,r){let n=es(t);if(!n)return;let i=Z.findKey(a,n);i&&void 0!==a[i]&&!0!==r&&(void 0!==r||!1===a[i])||(a[i||t]=eu(e))}let i=(e,t)=>Z.forEach(e,(e,r)=>n(e,r,t));if(Z.isPlainObject(e)||e instanceof this.constructor)i(e,t);else{let a;if(Z.isString(e)&&(e=e.trim())&&(a=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim()))){var o;let r,a,n,s;i((s={},(o=e)&&o.split("\n").forEach(function(e){n=e.indexOf(":"),r=e.substring(0,n).trim().toLowerCase(),a=e.substring(n+1).trim(),!r||s[r]&&et[r]||("set-cookie"===r?s[r]?s[r].push(a):s[r]=[a]:s[r]=s[r]?s[r]+", "+a:a)}),s),t)}else if(Z.isObject(e)&&Z.isSafeIterable(e)){let r=Object.create(null),a,n;for(let t of e){if(!Z.isArray(t))throw TypeError("Object iterator must return a key-value pair");n=t[0],Z.hasOwnProp(r,n)?(a=r[n],r[n]=Z.isArray(a)?[...a,t[1]]:[a,t[1]]):r[n]=t[1]}i(r,t)}else null!=e&&n(t,e,r)}return this}get(e,t){if(e=es(e)){let r=Z.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1for(;t=a.exec(e);)r[t[1]]=t[2];return r}if(Z.isFunction(t))return t.call(this,e,r);if(Z.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=es(e)){let r=Z.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||ec(this,this[r],r,t)))}return!1}delete(e,t){let r=this,a=!1;function n(e){if(e=es(e)){let n=Z.findKey(r,e);n&&(!t||ec(r,r[n],n,t))&&(delete r[n],a=!0)}}return Z.isArray(e)?e.forEach(n):n(e),a}clear(e){let t=Object.keys(this),r=t.length,a=!1;for(;r--;){let n=t[r];(!e||ec(this,this[n],n,e,!0))&&(delete this[n],a=!0)}return a}normalize(e){let t=this,r={};return Z.forEach(this,(a,n)=>{let i=Z.findKey(r,n);if(i){t[i]=eu(a),delete t[n];return}let o=e?n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(n).trim();o!==n&&delete t[n],t[o]=eu(a),r[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return Z.forEach(this,(r,a)=>{null!=r&&!1!==r&&(t[a]=e&&Z.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[eo]=this[eo]={accessors:{}}).accessors,r=this.prototype;function a(e){let a=es(e);if(!t[a]){let n;n=Z.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(r,t+n,{__proto__:null,value:function(r,a,n){return this[t].call(this,e,r,a,n)},configurable:!0})}),t[a]=!0}}return Z.isArray(e)?e.forEach(a):a(e),this}}el.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Z.reduceDescriptors(el.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Z.freezeMethods(el);
1class ed extends Error{static from(e,t,r,a,n,i){let o=new ed(e.message,t||e.code,r,a,n);return Object.defineProperty(o,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),o.name=e.name,null!=e.status&&null==o.status&&(o.status=e.status),i&&Object.assign(o,i),o}constructor(e,t,r,a,n){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),a&&(this.request=a),n&&(this.response=n,this.status=n.status)}toJSON(){let e,t,r,a=this.config,n=a&&Z.hasOwnProp(a,"redact")?a.redact:void 0,i=Z.isArray(n)&&n.length>0?(e=new Set(n.map(e=>String(e).toLowerCase())),t=[],(r=a=>{let n;if(null===a||"object"!=typeof a||Z.isBuffer(a))return a;if(-1===t.indexOf(a)){if(a instanceof el&&(a=a.toJSON()),t.push(a),Z.isArray(a))n=[],a.forEach((e,t)=>{let a=r(e);Z.isUndefined(a)||(n[t]=a)});else{if(!Z.isPlainObject(a)&&function(e){if(Z.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(a))return t.pop(),a;for(let[t,i]of(n=Object.create(null),Object.entries(a))){let a=e.has(t.toLowerCase())?"[REDACTED ****]":r(i);Z.isUndefined(a)||(n[t]=a)}}return t.pop(),n}})(a)):Z.toJSONObject(a);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:i,code:this.code,status:this.status}}}ed.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ed.ERR_BAD_OPTION="ERR_BAD_OPTION",ed.ECONNABORTED="ECONNABORTED",ed.ETIMEDOUT="ETIMEDOUT",ed.ECONNREFUSED="ECONNREFUSED",ed.ERR_NETWORK="ERR_NETWORK",ed.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ed.ERR_DEPRECATED="ERR_DEPRECATED",ed.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ed.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ed.ERR_CANCELED="ERR_CANCELED",ed.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ed.ERR_INVALID_URL="ERR_INVALID_URL",ed.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";let ep=ed;function ef(e){return Z.isPlainObject(e)||Z.isArray(e)}function eh(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function em(e,t,r){return e?e.concat(t).map(function(e,t){return e=eh(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}let ey=Z.toFlatObject(Z,{},null,function(e){return/^is[A-Z]/.test(e)}),eg=function(e,t,r){if(!Z.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let a=(r=Z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Z.isUndefined(t[e])})).metaTokens,n=r.visitor||f,i=r.dots,o=r.indexes,s=r.Blob||"u">typeof Blob&&Blob,u=void 0===r.maxDepth?100:r.maxDepth,c=s&&Z.isSpecCompliantForm(t),l=[];
1if(!Z.isFunction(n))throw TypeError("visitor must be a function");function d(e){if(null===e)return"";if(Z.isDate(e))return e.toISOString();if(Z.isBoolean(e))return e.toString();if(!c&&Z.isBlob(e))throw new ep("Blob is not supported. Use a Buffer instead.");if(Z.isArrayBuffer(e)||Z.isTypedArray(e)){if(c&&"function"==typeof s)return new s([e]);if(void 0!==ee.Buffer)return ee.Buffer.from(e);throw new ep("Blob is not supported. Use a Buffer instead.",ep.ERR_NOT_SUPPORT)}return e}function p(e){if(e>u)throw new ep("Object is too deeply nested ("+e+" levels). Max depth: "+u,ep.ERR_FORM_DATA_DEPTH_EXCEEDED)}function f(e,r,n){let s=e;if(Z.isReactNative(t)&&Z.isReactNativeBlob(e))return t.append(em(n,r,i),d(e)),!1;if(e&&!n&&"object"==typeof e)if(Z.endsWith(r,"{}"))r=a?r:r.slice(0,-2),e=function(e){if(u===1/0)return JSON.stringify(e);let t=[];return JSON.stringify(e,function(e,r){if(!Z.isObject(r))return r;for(;t.length&&t[t.length-1]!==this;)t.pop();return t.push(r),p(1+t.length-1),r})}(e);else{var c;if(Z.isArray(e)&&(c=e,Z.isArray(c)&&!c.some(ef))||(Z.isFileList(e)||Z.endsWith(r,"[]"))&&(s=Z.toArray(e)))return r=eh(r),s.forEach(function(e,a){Z.isUndefined(e)||null===e||t.append(!0===o?em([r],a,i):null===o?r:r+"[]",d(e))}),!1}return!!ef(e)||(t.append(em(n,r,i),d(e)),!1)}let h=Object.assign(ey,{defaultVisitor:f,convertValue:d,isVisitable:ef});if(!Z.isObject(e))throw TypeError("data must be an object");return!function e(r,a,i=0){if(!Z.isUndefined(r)){if(p(i),-1!==l.indexOf(r))throw Error("Circular reference detected in "+a.join("."));l.push(r),Z.forEach(r,function(r,o){!0===(!(Z.isUndefined(r)||null===r)&&n.call(t,r,Z.isString(o)?o.trim():o,a,h))&&e(r,a?a.concat(o):[o],i+1)}),l.pop()}}(e),t};function eb(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function ev(e,t){this._pairs=[],e&&eg(e,this,t)}let ew=ev.prototype;function eE(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function eS(e,t,r){let a;if(!t)return e;e=e||"";let n=Z.isFunction(r)?{serialize:r}:r,i=Z.getSafeProp(n,"encode")||eE,o=Z.getSafeProp(n,"serialize");if(a=o?o(t,n):Z.isURLSearchParams(t)?t.toString():new ev(t,n).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}ew.append=function(e,t){this._pairs.push([e,t])},ew.toString=function(e){let t=e?t=>e.call(this,t,eb):eb;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let eR=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Z.forEach(this.handlers,function(t){null!==t&&e(t)})}},e_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},eO="u">typeof URLSearchParams?URLSearchParams:ev,eC="u">typeof FormData?FormData:null,eA="u">typeof Blob?Blob:null,eT="u">typeof window&&"u">typeof document,eP="object"==typeof navigator&&navigator||void 0,ex=eT&&(!eP||0>["ReactNative","NativeScript","NS"].indexOf(eP.product)),eI="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eN=eT&&window.location.href||"http://localhost";e.s(["hasBrowserEnv",0,eT,"hasStandardBrowserEnv",0,ex,"hasStandardBrowserWebWorkerEnv",0,eI,"navigator",0,eP,"origin",0,eN],38358);let eD={...e.i(38358),isBrowser:!0,classes:{URLSearchParams:eO,FormData:eC,Blob:eA},protocols:["http","https","file","blob","url","data"]};function eL(e){if(e>100)throw new ep("FormData field is too deeply nested ("+e+" levels). Max depth: 100",ep.ERR_FORM_DATA_DEPTH_EXCEEDED)}let eU=function(e){if(Z.isFormData(e)&&Z.isFunction(e.entries)){let t={};return Z.forEachEntry(e,(e,r)=>{!function e(t,r,a,n){eL(n);let i=t[n++];if("__proto__"===i)return!0;let o=Number.isFinite(+i),s=n>=t.length;return(i=!i&&Z.isArray(a)?a.length:i,s)?Z.hasOwnProp(a,i)?a[i]=Z.isArray(a[i])?a[i].concat(r):[a[i],r]:a[i]=r:(Z.hasOwnProp(a,i)&&Z.isObject(a[i])||(a[i]=[]),e(t,r,a[i],n)&&Z.isArray(a[i])&&(a[i]=function(e){let t,r,a={},n=Object.keys(e),i=n.length;for(t=0;t<i;t++)a[r=n[t]]=e[r];return a}(a[i]))),!o}(function(e){let t,r=[],a=/\w+|\[(\w*)]/g;for(;null!==(t=a.exec(e));)eL(r.length),r.push("[]"===t[0]?"":t[1]||t[0]);return r}(e),r,t,0)}),t}return null},eF=(e,t)=>null!=e&&Z.hasOwnProp(e,t)?e[t]:void 0,ek={transitional:e_,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,a=t.getContentType()||"",n=a.indexOf("application/json")>-1,i=Z.isObject(e);
1if(i&&Z.isHTMLForm(e)&&(e=new FormData(e)),Z.isFormData(e))return n?JSON.stringify(eU(e)):e;if(Z.isArrayBuffer(e)||Z.isBuffer(e)||Z.isStream(e)||Z.isFile(e)||Z.isBlob(e)||Z.isReadableStream(e))return e;if(Z.isArrayBufferView(e))return e.buffer;if(Z.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){let t=eF(this,"formSerializer");if(a.indexOf("application/x-www-form-urlencoded")>-1)return eg(e,new eD.classes.URLSearchParams,{visitor:function(e,t,r,a){return eD.isNode&&Z.isBuffer(e)?(this.append(t,e.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t}).toString();if((r=Z.isFileList(e))||a.indexOf("multipart/form-data")>-1){let a=eF(this,"env"),n=a&&a.FormData;return eg(r?{"files[]":e}:e,n&&new n,t)}}if(i||n){t.setContentType("application/json",!1);var o=e;if(Z.isString(o))try{return(0,JSON.parse)(o),Z.trim(o)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(o)}return e}],transformResponse:[function(e){let t=eF(this,"transitional")||ek.transitional,r=t&&t.forcedJSONParsing,a=eF(this,"responseType"),n="json"===a;if(Z.isResponse(e)||Z.isReadableStream(e))return e;if(e&&Z.isString(e)&&(r&&!a||n)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e,eF(this,"parseReviver"))}catch(e){if(!r&&n){if("SyntaxError"===e.name)throw ep.from(e,ep.ERR_BAD_RESPONSE,this,null,eF(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eD.classes.FormData,Blob:eD.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function ej(e,t){let r=this||ek,a=t||r,n=el.from(a.headers),i=a.data;return Z.forEach(e,function(e){i=e.call(r,i,n.normalize(),t?t.status:void 0)}),n.normalize(),i}function eM(e){return!!(e&&e.__CANCEL__)}Z.forEach(["delete","get","head","post","put","patch","query"],e=>{ek.headers[e]={}});let e$=class extends ep{constructor(e,t,r){super(null==e?"canceled":e,ep.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function eB(e,t,r){let a=r.config.validateStatus;!r.status||!a||a(r.status)?e(r):t(new ep("Request failed with status code "+r.status,r.status>=400&&r.status<500?ep.ERR_BAD_REQUEST:ep.ERR_BAD_RESPONSE,r.config,r.request,r))}let eQ=function(e,t){let r,a=Array(e=e||10),n=Array(e),i=0,o=0;return t=void 0!==t?t:1e3,function(s){let u=Date.now(),c=n[o];r||(r=u),a[i]=s,n[i]=u;let l=o,d=0;for(;l!==i;)d+=a[l++],l%=e;if((i=(i+1)%e)===o&&(o=(o+1)%e),u-r<t)return;let p=c&&u-c;return p?Math.round(1e3*d/p):void 0}},eq=function(e,t){let r,a,n=0,i=1e3/t,o=(t,i=Date.now())=>{n=i,r=null,a&&(clearTimeout(a),a=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=i?o(e,t):(r=e,a||(a=setTimeout(()=>{a=null,o(r)},i-s)))},()=>r&&o(r)]},eK=(e,t,r=3)=>{let a=0,n=eQ(50,250);return eq(r=>{if(!r||"number"!=typeof r.loaded)return;let i=r.loaded,o=r.lengthComputable?r.total:void 0,s=null!=o?Math.min(i,o):i,u=Math.max(0,s-a),c=n(u);a=Math.max(a,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:u,rate:c||void 0,estimated:c&&o?(o-s)/c:void 0,event:r,lengthComputable:null!=o,[t?"download":"upload"]:!0})},r)},ez=(e,t)=>{let r=null!=e;return[a=>t[0]({lengthComputable:r,total:e,loaded:a}),t[1]]},eH=e=>(...t)=>Z.asap(()=>e(...t)),eV=eD.hasStandardBrowserEnv?(a=new URL(eD.origin),n=eD.navigator&&/(msie|trident)/i.test(eD.navigator.userAgent),e=>(e=new URL(e,eD.origin),a.protocol===e.protocol&&a.host===e.host&&(n||a.port===e.port))):()=>!0,eW=eD.hasStandardBrowserEnv?{write(e,t,r,a,n,i,o){if("u"<typeof document)return;let s=[`${e}=${encodeURIComponent(t)}`];Z.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),Z.isString(a)&&s.push(`path=${a}`),Z.isString(n)&&s.push(`domain=${n}`),!0===i&&s.push("secure"),Z.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join("; ")},read(e){if("u"<typeof document)return null;let t=document.cookie.split(";");for(let r=0;r<t.length;r++){let a=t[r].replace(/^\s+/,""),n=a.indexOf("=");if(-1!==n&&a.slice(0,n)===e)try{return decodeURIComponent(a.slice(n+1))}catch(e){return a.slice(n+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}},eG=/^https?:(?!\/\/)/i,eY=/[\t\n\r]/g;function eJ(e,t){if("string"==typeof e&&eG.test((function(e){let t=0;for(;t<e.length&&32>=e.charCodeAt(t);)t++;return e.slice(t)})(e).replace(eY,"")))throw new ep('Invalid URL: missing "//" after protocol',ep.ERR_INVALID_URL,t)}function eX(e,t,r,a){eJ(t,a);let n=!("string"==typeof t&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t));return e&&(n||!1===r)?(eJ(e,a),t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e):t}let eZ=e=>e instanceof el?{...e}:e;function e0(e,t){e=e||{},t=t||{};let r=Object.create(null);function a(e,t,r,a){return Z.isPlainObject(e)&&Z.isPlainObject(t)?Z.merge.call({caseless:a},e,t):Z.isPlainObject(t)?Z.merge({},t):Z.isArray(t)?t.slice():t}function n(e,t,r,n){return Z.isUndefined(t)?Z.isUndefined(e)?void 0:a(void 0,e,r,n):a(e,t,r,n)}function i(e,t){if(!Z.isUndefined(t))return a(void 0,t)}function o(e,t){return Z.isUndefined(t)?Z.isUndefined(e)?void 0:a(void 0,e):a(void 0,t)}function s(r,n,i){return Z.hasOwnProp(t,i)?a(r,n):Z.hasOwnProp(e,i)?a(void 0,r):void 0}Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});let u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBo
1dyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,r)=>n(eZ(e),eZ(t),r,!0)};return Z.forEach(Object.keys({...e,...t}),function(a){if("__proto__"===a||"constructor"===a||"prototype"===a)return;let i=Z.hasOwnProp(u,a)?u[a]:n,o=i(Z.hasOwnProp(e,a)?e[a]:void 0,Z.hasOwnProp(t,a)?t[a]:void 0,a);Z.isUndefined(o)&&i!==s||(r[a]=o)}),Z.hasOwnProp(t,"validateStatus")&&Z.isUndefined(t.validateStatus)&&!1===function(r){let a=Z.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Z.isUndefined(a)){if(!Z.isPlainObject(a))return;else if(Z.hasOwnProp(a,r))return a[r]}let n=Z.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Z.isPlainObject(n)&&Z.hasOwnProp(n,r))return n[r]}("validateStatusUndefinedResolves")&&(Z.hasOwnProp(e,"validateStatus")?r.validateStatus=a(void 0,e.validateStatus):delete r.validateStatus),r}let e1=["content-type","content-length"],e2=function(e){let t=e0({},e),r=e=>Z.hasOwnProp(t,e)?t[e]:void 0,a=r("data"),n=r("withXSRFToken"),i=r("xsrfHeaderName"),o=r("xsrfCookieName"),s=r("headers"),u=r("auth"),c=r("baseURL"),l=r("allowAbsoluteUrls"),d=r("url");if(t.headers=s=el.from(s),t.url=eS(eX(c,d,l,t),r("params"),r("paramsSerializer")),u){let t=Z.getSafeProp(u,"username")||"",r=Z.getSafeProp(u,"password")||"";try{s.set("Authorization","Basic "+btoa(t+":"+(r?encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))):"")))}catch(t){throw ep.from(t,ep.ERR_BAD_OPTION_VALUE,e)}}if(Z.isFormData(a))if(eD.hasStandardBrowserEnv||eD.hasStandardBrowserWebWorkerEnv||Z.isReactNative(a))s.setContentType(void 0);else{var p,f;Z.isFunction(a.getHeaders)&&(p=s,f=a.getHeaders(),"content-only"!==r("formDataHeaderPolicy")?p.set(f):Object.entries(f||{}).forEach(([e,t])=>{e1.includes(e.toLowerCase())&&p.set(e,t)}))}if(eD.hasStandardBrowserEnv&&(Z.isFunction(n)&&(n=n(t)),!0===n||null==n&&eV(t.url))){let e=i&&o&&eW.read(o);e&&s.set(i,e)}return t},e5="u">typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var a;let n,i,o,s,u,c,l=e2(e),d=l.data,p=el.from(l.headers).normalize(),{responseType:f,onUploadProgress:h,onDownloadProgress:m}=l;function y(){s&&s(),u&&u(),l.cancelToken&&l.cancelToken.unsubscribe(n),l.signal&&l.signal.removeEventListener("abort",n)}let g=new XMLHttpRequest;function b(){if(!g)return;let a=el.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());eB(function(e){t(e),y()},function(e){r(e),y()},{data:f&&"text"!==f&&"json"!==f?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:a,config:e,request:g}),g=null}g.open(l.method.toUpperCase(),l.url,!0),g.timeout=l.timeout,"onloadend"in g?g.onloadend=b:g.onreadystatechange=function(){!g||4!==g.readyState||(0!==g.status||g.responseURL&&g.responseURL.startsWith("file:"))&&setTimeout(b)},g.onabort=function(){g&&(r(new ep("Request aborted",ep.ECONNABORTED,e,g)),y(),g=null)},g.onerror=function(t){let a=new ep(t&&t.message?t.message:"Network Error",ep.ERR_NETWORK,e,g);a.event=t||null,r(a),y(),g=null},g.ontimeout=function(){let t=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",a=l.transitional||e_;l.timeoutErrorMessage&&(t=l.timeoutErrorMessage),r(new ep(t,a.clarifyTimeoutError?ep.ETIMEDOUT:ep.ECONNABORTED,e,g)),y(),g=null},void 0===d&&p.setContentType(null),"setRequestHeader"in g&&Z.forEach(ei(p),function(e,t){g.setRequestHeader(t,e)}),Z.isUndefined(l.withCredentials)||(g.withCredentials=!!l.withCredentials),f&&"json"!==f&&(g.responseType=l.responseType),m&&([o,u]=eK(m,!0),g.addEventListener("progress",o)),h&&g.upload&&([i,s]=eK(h),g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",s)),(l.cancelToken||l.signal)&&(n=t=>{g&&(r(!t||t.type?new e$(null,e,g):t),g.abort(),y(),g=null)},l.cancelToken&&l.cancelToken.subscribe(n),l.signal&&(l.signal.aborted?n():l.signal.addEventListener("abort",n)));let v=(a=l.url,(c=/^([-+\w]{1,25}):(?:\/\/)?/.exec(a))&&c[1]||"");if(v&&!eD.protocols.includes(v)){r(new ep("Unsupported protocol "+v+":",ep.ERR_BAD_REQUEST,e)),y();return}g.send(d||null)})},e4=function*(e,t){let r,a=e.byteLength;if(!t||a<t)return void(yield e);let n=0;for(;n<a;)r=n+t,yield e.slice(n,r),n=r},e3=async function*(e,t){for await(let r of e6(e))yield*e4(r,t)},e6=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},e8=(e,t,r,a)=>{let n,i=e3(e,t),o=0,s=e=>{!n&&(n=!0,a&&a(e))};return new ReadableStream({async pull(e){try{let{done:t,value:a}=await i.next();if(t){s(),e.close();return}let n=a.byteLength;if(r){let e=o+=n;r(e)}e.enqueue(new Uint8Array(a))}catch(e){throw s(e),e}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},e9=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,e7=(e,t,r)=>t+2<r&&e9(e.charCodeAt(t+1))&&e9(e.charCodeAt(t+2)),te="1.18.1",{isFunction:tt}=Z,tr=e=>{if(!Z.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},ta=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},tn=e=>{let t,r=void 0!==Z.global&&null!==Z.global?Z.global:globalThis,{ReadableStream:a,TextEncoder:n}=r,{fetch:i,Request:o,Response:s}=e=Z.merge.call({skipUndefined:!0},{Request:r.Request,Response:r.Response},e),u=i?tt(i):"function"==typeof fetch,c=tt(o),l=tt(s);if(!u)return!1;
1let d=u&&tt(a),p=u&&("function"==typeof n?(t=new n,e=>t.encode(e)):async e=>new Uint8Array(await new o(e).arrayBuffer())),f=c&&d&&ta(()=>{let e=!1,t=new o(eD.origin,{body:new a,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),h=l&&d&&ta(()=>Z.isReadableStream(new s("").body)),m={stream:h&&(e=>e.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{m[e]||(m[e]=(t,r)=>{let a=t&&t[e];if(a)return a.call(t);throw new ep(`Response type '${e}' is not supported`,ep.ERR_NOT_SUPPORT,r)})});let y=async e=>{if(null==e)return 0;if(Z.isBlob(e))return e.size;if(Z.isSpecCompliantForm(e)){let t=new o(eD.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Z.isArrayBufferView(e)||Z.isArrayBuffer(e)?e.byteLength:(Z.isURLSearchParams(e)&&(e+=""),Z.isString(e))?(await p(e)).byteLength:void 0},g=async(e,t)=>{let r=Z.toFiniteNumber(e.getContentLength());return null==r?y(t):r};return async e=>{let t,{url:r,method:a,data:u,signal:l,cancelToken:p,timeout:b,onDownloadProgress:v,onUploadProgress:w,responseType:E,headers:S,withCredentials:R="same-origin",fetchOptions:_,maxContentLength:O,maxBodyLength:C}=e2(e),A=Z.isNumber(O)&&O>-1,T=Z.isNumber(C)&&C>-1,P=i||fetch;E=E?(E+"").toLowerCase():"text";let x=((e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let r=new AbortController,a=!1,n=function(e){if(!a){a=!0,o();let t=e instanceof Error?e:this.reason;r.abort(t instanceof ep?t:new e$(t instanceof Error?t.message:t))}},i=t&&setTimeout(()=>{i=null,n(new ep(`timeout of ${t}ms exceeded`,ep.ETIMEDOUT))},t),o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(n):e.removeEventListener("abort",n)}),e=null)};e.forEach(e=>e.addEventListener("abort",n,{once:!0}));let{signal:s}=r;return s.unsubscribe=()=>Z.asap(o),s})([l,p&&p.toAbortSignal()],b),I=null,N=x&&x.unsubscribe&&(()=>{x.unsubscribe()}),D=null,L=()=>new ep("Request body larger than maxBodyLength limit",ep.ERR_BAD_REQUEST,e,I);try{var U;let i,l,p,b,F=(l="auth",Z.hasOwnProp(e,l)?e[l]:void 0);if(F){let e=Z.getSafeProp(F,"username")||"",t=Z.getSafeProp(F,"password")||"";i={username:e,password:t}}if(p=(U=r).indexOf("://"),b=U,-1!==p&&(b=b.slice(p+3)),b.includes("@")||b.includes(":")){let e=new URL(r,eD.origin);if(!i&&(e.username||e.password)){let t=tr(e.username),r=tr(e.password);i={username:t,password:r}}(e.username||e.password)&&(e.username="",e.password="",r=e.href)}if(i){let e;S.delete("authorization"),S.set("Authorization","Basic "+btoa((e=(i.username||"")+":"+(i.password||""),encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))}if(A&&"string"==typeof r&&r.startsWith("data:")&&function(e){if(!e||"string"!=typeof e||!e.startsWith("data:"))return 0;let t=e.indexOf(",");if(t<0)return 0;let r=e.slice(5,t),a=e.slice(t+1);if(/;base64/i.test(r)){let e=a.length,t=a.length;for(let r=0;r<t;r++)if(37===a.charCodeAt(r)&&r+2<t){let t=a.charCodeAt(r+1),n=a.charCodeAt(r+2);e9(t)&&e9(n)&&(e-=2,r+=2)}let r=0,n=t-1,i=e=>e>=2&&37===a.charCodeAt(e-2)&&51===a.charCodeAt(e-1)&&(68===a.charCodeAt(e)||100===a.charCodeAt(e));n>=0&&(61===a.charCodeAt(n)?(r++,n--):i(n)&&(r++,n-=3)),1===r&&n>=0&&(61===a.charCodeAt(n)?r++:i(n)&&r++);let o=3*Math.floor(e/4)-(r||0);return o>0?o:0}let n=0;for(let e=0,t=a.length;e<t;
1e++){let r=a.charCodeAt(e);if(37===r&&e7(a,e,t))n+=1,e+=2;else if(r<128)n+=1;else if(r<2048)n+=2;else if(r>=55296&&r<=56319&&e+1<t){let t=a.charCodeAt(e+1);t>=56320&&t<=57343?(n+=4,e++):n+=3}else n+=3}return n}(r)>O)throw new ep("maxContentLength size of "+O+" exceeded",ep.ERR_BAD_RESPONSE,e,I);if(T&&"get"!==a&&"head"!==a){let e=await y(u);if("number"==typeof e&&isFinite(e)&&(t=e,e>C))throw L()}let k=T&&(Z.isReadableStream(u)||Z.isStream(u)),j=(e,t,r)=>e8(e,65536,e=>{if(T&&e>C)throw D=L();t&&t(e)},r);if(f&&"get"!==a&&"head"!==a&&(w||k)){if(t=null==t?await g(S,u):t,0!==t||k){let e,a=new o(r,{method:"POST",body:u,duplex:"half"});if(Z.isFormData(u)&&(e=a.headers.get("content-type"))&&S.setContentType(e),a.body){let[e,r]=w&&ez(t,eK(eH(w)))||[];u=j(a.body,e,r)}}}else if(k&&!c&&d&&"get"!==a&&"head"!==a)u=j(u);else if(k&&c&&!f&&"get"!==a&&"head"!==a)throw new ep("Stream request bodies are not supported by the current fetch implementation",ep.ERR_NOT_SUPPORT,e,I);Z.isString(R)||(R=R?"include":"omit");let M=c&&"credentials"in o.prototype;if(Z.isFormData(u)){let e=S.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&S.delete("content-type")}S.set("User-Agent","axios/"+te,!1);let $={..._,signal:x,method:a.toUpperCase(),headers:ei(S.normalize()),body:u,duplex:"half",credentials:M?R:void 0};I=c&&new o(r,$);let B=await (c?P(I,_):P(r,$)),Q=el.from(B.headers);if(A){let t=Z.toFiniteNumber(Q.getContentLength());if(null!=t&&t>O)throw new ep("maxContentLength size of "+O+" exceeded",ep.ERR_BAD_RESPONSE,e,I)}let q=h&&("stream"===E||"response"===E);if(h&&B.body&&(v||A||q&&N)){let t={};["status","statusText","headers"].forEach(e=>{t[e]=B[e]});let r=Z.toFiniteNumber(Q.getContentLength()),[a,n]=v&&ez(r,eK(eH(v),!0))||[];B=new s(e8(B.body,65536,t=>{if(A&&t>O)throw new ep("maxContentLength size of "+O+" exceeded",ep.ERR_BAD_RESPONSE,e,I);a&&a(t)},()=>{n&&n(),N&&N()}),t)}E=E||"text";let K=await m[Z.findKey(m,E)||"text"](B,e);if(A&&!h&&!q){let t;if(null!=K&&("number"==typeof K.byteLength?t=K.byteLength:"number"==typeof K.size?t=K.size:"string"==typeof K&&(t="function"==typeof n?new n().encode(K).byteLength:K.length)),"number"==typeof t&&t>O)throw new ep("maxContentLength size of "+O+" exceeded",ep.ERR_BAD_RESPONSE,e,I)}return!q&&N&&N(),await new Promise((t,r)=>{eB(t,r,{data:K,headers:el.from(B.headers),status:B.status,statusText:B.statusText,config:e,request:I})})}catch(t){if(N&&N(),x&&x.aborted&&x.reason instanceof ep){let r=x.reason;throw r.config=e,I&&(r.request=I),t!==r&&Object.defineProperty(r,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),r}if(D)throw I&&!D.request&&(D.request=I),D;if(t instanceof ep)throw I&&!t.request&&(t.request=I),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){let r=new ep("Network Error",ep.ERR_NETWORK,e,I,t&&t.response);throw Object.defineProperty(r,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),r}throw ep.from(t,t&&t.code,e,I,t&&t.response)}}},ti=new Map,to=e=>{let t=e&&e.env||{},{fetch:r,Request:a,Response:n}=t,i=[a,n,r],o=i.length,s,u,c=ti;for(;o--;)s=i[o],void 0===(u=c.get(s))&&c.set(s,u=o?new Map:tn(t)),c=u;return u};to();let ts={http:null,xhr:e5,fetch:{get:to}};Z.forEach(ts,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});let tu=e=>`- ${e}`,tc=e=>Z.isFunction(e)||null===e||!1===e,tl=function(e,t){let r,a,{length:n}=e=Z.isArray(e)?e:[e],i={};for(let o=0;o<n;o++){let n;if(a=r=e[o],!tc(r)&&void 0===(a=ts[(n=String(r)).toLowerCase()]))throw new ep(`Unknown adapter '${n}'`);
1if(a&&(Z.isFunction(a)||(a=a.get(t))))break;i[n||"#"+o]=a}if(!a){let e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new ep("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(tu).join("\n"):" "+tu(e[0]):"as no adapter specified"),ep.ERR_NOT_SUPPORT)}return a};function td(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new e$(null,e)}function tp(e){return td(e),e.headers=el.from(e.headers),e.data=ej.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tl(e.adapter||ek.adapter,e)(e).then(function(t){td(e),e.response=t;try{t.data=ej.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=el.from(t.headers),t},function(t){if(!eM(t)&&(td(e),t&&t.response)){e.response=t.response;try{t.response.data=ej.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=el.from(t.response.headers)}return Promise.reject(t)})}let tf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let th={};tf.transitional=function(e,t,r){function a(e,t){return"[Axios v"+te+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,i)=>{if(!1===e)throw new ep(a(n," has been removed"+(t?" in "+t:"")),ep.ERR_DEPRECATED);return t&&!th[n]&&(th[n]=!0,console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,i)}},tf.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};let tm=function(e,t,r){if("object"!=typeof e||null===e)throw new ep("options must be an object",ep.ERR_BAD_OPTION_VALUE);let a=Object.keys(e),n=a.length;for(;n-- >0;){let i=a[n],o=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(o){let t=e[i],r=void 0===t||o(t,i,e);if(!0!==r)throw new ep("option "+i+" must be "+r,ep.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new ep("Unknown option "+i,ep.ERR_BAD_OPTION)}};class ty{constructor(e){this.defaults=e||{},this.interceptors={request:new eR,response:new eR}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=(()=>{if(!t.stack)return"";let e=t.stack.indexOf("\n");return -1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(r){let t=r.indexOf("\n"),a=-1===t?-1:r.indexOf("\n",t+1),n=-1===a?"":r.slice(a+1);String(e.stack).endsWith(n)||(e.stack+="\n"+r)}}else e.stack=r}catch(e){}}throw e}}_request(e,t){let r,a;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:n,paramsSerializer:i,headers:o}=t=e0(this.defaults,t);void 0!==n&&tm(n,{silentJSONParsing:tf.transitional(tf.boolean),forcedJSONParsing:tf.transitional(tf.boolean),clarifyTimeoutError:tf.transitional(tf.boolean),legacyInterceptorReqResOrdering:tf.transitional(tf.boolean),advertiseZstdAcceptEncoding:tf.transitional(tf.boolean),validateStatusUndefinedResolves:tf.transitional(tf.boolean)},!1),null!=i&&(Z.isFunction(i)?t.paramsSerializer={serialize:i}:tm(i,{encode:tf.function,serialize:tf.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),tm(t,{baseUrl:tf.spelling("baseURL"),withXsrfToken:tf.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&Z.merge(o.common,o[t.method]);o&&Z.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=el.concat(s,o);let u=[],c=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;c=c&&e.synchronous;let r=t.transitional||e_;r&&r.legacyInterceptorReqResOrdering?u.unshift(e.fulfilled,e.rejected):u.push(e.fulfilled,e.rejected)});let l=[];this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let d=0;if(!c){let e=[tp.bind(this),void 0];for(e.unshift(...u),e.push(...l),a=e.length,r=Promise.resolve(t);d<a;)r=r.then(e[d++],e[d++]);return r}a=u.length;let p=t;for(;d<a;){let e=u[d++],t=u[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{r=tp.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,a=l.length;d<a;)r=r.then(l[d++],l[d++]);return r}getUri(e){return eS(eX((e=e0(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}}
1Z.forEach(["delete","get","head","options"],function(e){ty.prototype[e]=function(t,r){return this.request(e0(r||{},{method:e,url:t,data:r&&Z.hasOwnProp(r,"data")?r.data:void 0}))}}),Z.forEach(["post","put","patch","query"],function(e){function t(t){return function(r,a,n){return this.request(e0(n||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}ty.prototype[e]=t(),"query"!==e&&(ty.prototype[e+"Form"]=t(!0))});class tg{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,a=new Promise(e=>{r.subscribe(e),t=e}).then(e);return a.cancel=function(){r.unsubscribe(t)},a},e(function(e,a,n){r.reason||(r.reason=new e$(e,a,n),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new tg(function(t){e=t}),cancel:e}}}let tb={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
1alContent: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(tb).forEach(([e,t])=>{tb[t]=e});let tv=function e(t){let r=new ty(t),a=l(ty.prototype.request,r);return Z.extend(a,ty.prototype,r,{allOwnKeys:!0}),Z.extend(a,r,null,{allOwnKeys:!0}),a.create=function(r){return e(e0(t,r))},a}(ek);tv.Axios=ty,tv.CanceledError=e$,tv.CancelToken=tg,tv.isCancel=eM,tv.VERSION=te,tv.toFormData=eg,tv.AxiosError=ep,tv.Cancel=tv.CanceledError,tv.all=function(e){return Promise.all(e)},tv.spread=function(e){return function(t){return e.apply(null,t)}},tv.isAxiosError=function(e){return Z.isObject(e)&&!0===e.isAxiosError},tv.mergeConfig=e0,tv.AxiosHeaders=el,tv.formToJSON=e=>eU(Z.isHTMLForm(e)?new FormData(e):e),tv.getAdapter=tl,tv.HttpStatusCode=tb,tv.default=tv,e.s(["default",0,tv],30559)},39256,e=>{"use strict";e.s(["default",()=>a]);var t=e.i(86158),r=e.i(61657);let a=class{static _getClientId(){return""}static _getClientSecurity(){return""}static async login(e,a){try{let n=await r.default.post(r.URLS.LOGIN,{username:e,password:a});if(202===n.status&&n.data&&n.data.twoFactorRequired)return t.default.setItem(t.KEYS.USER_KEY,e),t.default.setItem(t.KEYS.AUTH_TOKEN,n.data.challengeToken),{twoFactorRequired:!0,type:n.data.type,channels:n.data.channels||[],message:n.data.message};if(200===n.status)return t.default.setItem(t.KEYS.USER_KEY,e),t.default.setItem(t.KEYS.AUTH_TOKEN,n.headers.authorization.replace("Bearer ","")),!0;return n}catch(e){return{error:"Não autenticado"}}}static async initTwoFactor(e){try{let t=await r.default.post("auth/login-2fa",e?{channel:e}:{});if(200===t.status)return t.data;return t}catch(e){return{error:e?.response?.data?.error||"Erro ao iniciar a verificação"}}}static async verifyTwoFactor(e,a=!1){try{let n=await r.default.post("auth/verify-2fa",{code:e,backupCode:a});if(200===n.status)return n.headers&&n.headers.authorization&&t.default.setItem(t.KEYS.AUTH_TOKEN,n.headers.authorization.replace("Bearer ","")),{success:!0,backupCodes:n.data&&n.data.backupCodes,enrolled:n.data&&n.data.enrolled};return n}catch(e){return{error:e?.response?.data?.error||"Código inválido ou expirado"}}}static async getTwoFactorStatus(){try{return(await r.default.get("/auth/2fa/status")).data}catch(e){return{error:"Erro ao consultar a verificação em 2 fatores"}}}static async enableTwoFactor(e){try{return(await r.default.post("/auth/2fa/enable",{channel:e})).data}catch(e){return{error:e?.response?.data?.error||"Erro ao ativar a verificação em 2 fatores"}}}static async disableTwoFactor(){try{return(await r.default.post("/auth/2fa/disable",{})).data}catch(e){return{error:e?.response?.data?.error||"Erro ao desativar a verificação em 2 fatores"}}}static async logout(){return t.default.cleanAll(),!0}static async linkCartWithUser(e){try{let t=await r.default.post(`customers/orders/${e}`);if(201===t.status)return t.data;return(0,r.exception)(t,"Falha ao associar carrinho anônimo com usuário logado")}
1catch(e){return(0,r.exception)(e,"Falha ao associar carrinho anônimo com usuário logado")}}}},71556,e=>{"use strict";e.s(["clearHeaderCep",()=>l,"fetchAddressInfoNoAuth",()=>s,"headerCepQueryKey",()=>n,"readHeaderCep",()=>o,"setHeaderCep",()=>c]);var t=e.i(86158),r=e.i(63524),a=e.i(11912);let n=["user","headerCep"];function i(e){return e?{zipCode:String(e.zipCode??"").replace(/\D/g,""),block:e.block,city:e.city,street:e.street,state:e.state}:null}function o(){let e=t.default.getItem(t.KEYS.USER_ADDRESS);if(!e)return null;try{let t="object"==typeof e?e:JSON.parse(e);return i(t)}catch(e){return console.error("Erro ao ler CEP do header:",e),null}}async function s(e){if(!e)return null;try{return await r.default.getAddressInfoNoAuth(e)}catch(e){return console.error("Erro ao buscar CEP:",e),{error:"Falha ao obter endereço"}}}async function u(e){let a=String(e??"").replace(/\D/g,"");if(a)try{let e=await r.default.getShippingRulesByZipCode(a);Array.isArray(e)?t.default.setItem(t.KEYS.SHIPPING_RULES,JSON.stringify(e)):t.default.remove(t.KEYS.SHIPPING_RULES)}catch(e){console.error("Erro ao buscar regras de frete por CEP:",e)}}async function c(e){let r=i(e);r?(r?t.default.setItem(t.KEYS.USER_ADDRESS,JSON.stringify(r)):t.default.remove(t.KEYS.USER_ADDRESS),(0,a.getQueryClient)().setQueryData(n,r),r.zipCode&&await u(r.zipCode)):l()}function l(){t.default.remove(t.KEYS.USER_ADDRESS);let e=(0,a.getQueryClient)();e.removeQueries({queryKey:n}),e.setQueryData(n,null)}},78088,30024,21592,e=>{"use strict";e.s(["ORDERS_MKT_QUERY_KEY",0,["orders","mkt"],"PAYMENT_LAST_RESULT_KEY",0,["payment","lastResult"],"orderMktQueryKey",0,function(e){return["orders","mkt",e]}],78088);var t=e.i(86158),r=e.i(99720),a=e.i(11912);let n=["auctionCarts"];function i(e){return["auctionCart",e]}e.s(["AUCTION_CARTS_QUERY_KEY",0,n,"auctionCartQueryKey",0,i],30024);let o=new r.default;function s(){t.default.cleanAuctionCart()}function u(){s();let e=(0,a.getQueryClient)();e.removeQueries({queryKey:n}),e.removeQueries({queryKey:["auctionCart"]})}e.s(["clearAuctionCart",0,u,"clearAuctionCartCookie",0,s,"normalizeAuctionCarts",0,function(e){return!e||e.error?[]:Array.isArray(e)?e:[]},"selectAuctionCartForCheckout",0,function(e){e&&t.default.setItem(t.KEYS.AUCTION_CART_ID,e)},"setAuctionCartFromResponse",0,function(e){if(!e||e.error)return void u();e.orderMerchants&&!e.orderMerchantsResponse&&(e.orderMerchantsResponse=e.orderMerchants),e?.messages?.length&&e.messages.forEach(e=>o.notifyError(e,!1));let r=(0,a.getQueryClient)();e.uuid&&(t.default.setItem(t.KEYS.AUCTION_CART_ID,e.uuid),r.setQueryData(i(e.uuid),e))},"updateAuctionCartTotal",0,function(e){if(!e)return null;let t=0;return(e.orderMerchants||e.orderMerchantsResponse||[]).forEach(e=>{e?.orderItems?.forEach(e=>{t+=e.amount}),e?.orderKits?.forEach(e=>{t+=e.amount})}),t}],21592)},3585,e=>{"use strict";var t=e.i(48123),r=e.i(65235),a=e.i(95564),n=e.i(56298),i=class extends a.Subscribable{#e;#i=void 0;#_;#O;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#C()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,n.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#_,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,n.hashKey)(t.mutationKey)!==(0,n.hashKey)(this.options.mutationKey)?this.reset():this.#_?.state.status==="pending"&&this.#_.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#_?.removeObserver(this)}onMutationUpdate(e){this.#C(),this.#R(e)}getCurrentResult(){return this.#i}reset(){this.#_?.removeObserver(this),this.#_=void 0,this.#C(),this.#R()}mutate(e,t){return this.#O=t,this.#_?.removeObserver(this),this.#_=this.#e.getMutationCache().build(this.#e,this.options),this.#_.addObserver(this),this.#_.execute(e)}#C(){let e=this.#_?.state??(0,t.getDefaultState)();this.#i={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#R(e){r.notifyManager.batch(()=>
1{if(this.#O&&this.hasListeners()){let t=this.#i.variables,r=this.#i.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#O.onSuccess?.(e.data,t,r,a)}catch(e){Promise.reject(e)}try{this.#O.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#O.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#O.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#i)})})}};e.s(["MutationObserver",0,i])},92905,e=>{"use strict";var t=e.i(91788),r=e.i(3585),a=e.i(56298),n=e.i(65235),i=e.i(85700);e.s(["useMutation",0,function(e,o){let s=(0,i.useQueryClient)(o),[u]=t.useState(()=>new r.MutationObserver(s,e));t.useEffect(()=>{u.setOptions(e)},[u,e]);let c=t.useSyncExternalStore(t.useCallback(e=>u.subscribe(n.notifyManager.batchCalls(e)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),l=t.useCallback((e,t)=>{u.mutate(e,t).catch(a.noop)},[u]);if(c.error&&(0,a.shouldThrowError)(u.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:l,mutateAsync:c.mutate}}])},86889,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=function(){for(var e,t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];"u">typeof window&&(void 0===window.gtag&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(e=window).gtag.apply(e,r))}},61866,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=r||"";return n&&(o=r.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(e,t,r){return t>0&&t+e.length!==r.length&&e.search(a)>-1&&":"!==r.charAt(t-2)&&("-"!==r.charAt(t+e.length)||"-"===r.charAt(t-1))&&0>r.charAt(t-1).search(/[^\s-]/)?e.toLowerCase():e.substr(1).search(/[A-Z]|\../)>-1?e:e.charAt(0).toUpperCase()+e.substr(1)})),i&&(o="string"==typeof(t=e=o)&&-1!==t.indexOf("@")?(console.warn("This arg looks like an email address, redacting."),"REDACTED (Potential Email Address)"):e),o};var a=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i},75551,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.GA4=void 0;var a=u(e.r(86889)),n=u(e.r(61866)),i=["eventCategory","eventAction","eventLabel","eventValue","hitType"],o=["title","location"],s=["page","hitType"];function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){y(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=function(e,t){if("object"!==l(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==l(a))return a;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===l(t)?t:String(t)}var b=function(){var e;function t(){var e=this;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");y(this,"reset",function(){e.isInitialized=!1,e._testMode=!1,e._currentMeasurementId,e._hasLoadedGA=!1,e._isQueuing=!1,e._queueGtag=[]}),y(this,"_gtag",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];e._testMode||e._isQueuing?e._queueGtag.push(r):a.default.apply(void 0,r)}),y(this,"_loadGA",function(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"https://www.googletagmanager.com/gtag/js";if("u">typeof window&&"u">typeof document&&!e._hasLoadedGA){var n=document.createElement("script");n.async=!0,n.src="".concat(a,"?id=").concat(t),r&&n.setAttribute("nonce",r),document.body.appendChild(n),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},e._hasLoadedGA=!0}}),y(this,"_toGtagOptions",function(e){if(e){var t={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"};return Object.entries(e).reduce(function(e,r){var a=function(e){if(Array.isArray(e))return e}(r)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,n,i,o=[],s=!0,u=!1;try{n=(t=t.call(e)).next,!1;for(;!(s=(r=n.call(t)).done)&&(o.push(r.value),2!==o.length);s=!0);}catch(e){u=!0,a=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw a}}return o}}(r)||h(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=a[0],i=a[1];return t[n]?e[t[n]]=i:e[n]=i,e},{})}}),y(this,"initialize",function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)throw Error("Require GA_MEASUREMENT_ID");var a="string"==typeof t?[{trackingId:t}]:t;e._currentMeasurementId=a[0].trackingId;var n=r.gaOptions,i=r.gtagOptions,o=r.nonce,s=r.testMode,u=void 0!==s&&s,c=r.gtagUrl;if(e._testMode=u,u||e._loadGA(e._currentMeasurementId,o,c),e.isInitialized||(e._gtag("js",new Date),a.forEach(function(t){var r=f(f(f({},e._toGtagOptions(f(f({},n),t.gaOptions))),i),t.gtagOptions);Object.keys(r).length?e._gtag("config",t.trackingId,r):e._gtag("config",t.trackingId)})),e.isInitialized=!0,!u){var l=d(e._queueGtag);for(e._queueGtag=[],e._isQueuing=!1;l.length;){var p=l.shift();e._gtag.apply(e,d(p)),"get"===p[0]&&(e._isQueuing=!0)}}}),y(this,"set",function(t){t?"object"!==l(t)?console.warn("Expected `fieldsObject` arg to be an Object"):(0===Object.keys(t).length&&console.warn("empty `fieldsObject` given to .set()"),e._gaCommand("set",t)):console.warn("`fieldsObject` is required in .set()")}
1),y(this,"_gaCommandSendEvent",function(t,r,a,n,i){e._gtag("event",r,f(f({event_category:t,event_label:a,value:n},i&&{non_interaction:i.nonInteraction}),e._toGtagOptions(i)))}),y(this,"_gaCommandSendEventParameters",function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];if("string"==typeof r[0])e._gaCommandSendEvent.apply(e,d(r.slice(1)));else{var n=r[0],o=n.eventCategory,s=n.eventAction,u=n.eventLabel,l=n.eventValue,p=(n.hitType,c(n,i));e._gaCommandSendEvent(o,s,u,l,p)}}),y(this,"_gaCommandSendTiming",function(t,r,a,n){e._gtag("event","timing_complete",{name:r,value:a,event_category:t,event_label:n})}),y(this,"_gaCommandSendPageview",function(t,r){if(r&&Object.keys(r).length){var a=e._toGtagOptions(r),n=a.title,i=a.location,s=c(a,o);e._gtag("event","page_view",f(f(f(f({},t&&{page_path:t}),n&&{page_title:n}),i&&{page_location:i}),s))}else t?e._gtag("event","page_view",{page_path:t}):e._gtag("event","page_view")}),y(this,"_gaCommandSendPageviewParameters",function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];if("string"==typeof r[0])e._gaCommandSendPageview.apply(e,d(r.slice(1)));else{var n=r[0],i=n.page,o=(n.hitType,c(n,s));e._gaCommandSendPageview(i,o)}}),y(this,"_gaCommandSend",function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];var n="string"==typeof r[0]?r[0]:r[0].hitType;switch(n){case"event":e._gaCommandSendEventParameters.apply(e,r);break;case"pageview":e._gaCommandSendPageviewParameters.apply(e,r);break;case"timing":e._gaCommandSendTiming.apply(e,d(r.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(n));break;default:console.warn("Send command doesn't exist: ".concat(n))}}),y(this,"_gaCommandSet",function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];"string"==typeof r[0]&&(r[0]=y({},r[0],r[1])),e._gtag("set",e._toGtagOptions(r[0]))}),y(this,"_gaCommand",function(t){for(var r=arguments.length,a=Array(r>1?r-1:0),n=1;n<r;n++)a[n-1]=arguments[n];switch(t){case"send":e._gaCommandSend.apply(e,a);break;case"set":e._gaCommandSet.apply(e,a);break;default:console.warn("Command doesn't exist: ".concat(t))}}),y(this,"ga",function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];if("string"==typeof r[0])e._gaCommand.apply(e,r);else{var n=r[0];e._gtag("get",e._currentMeasurementId,"client_id",function(t){e._isQueuing=!1;var r=e._queueGtag;for(n({get:function(r){return"clientId"===r?t:"trackingId"===r?e._currentMeasurementId:"apiVersion"===r?"1":void 0}});r.length;){var a=r.shift();e._gtag.apply(e,d(a))}}),e._isQueuing=!0}return e.ga}),y(this,"event",function(t,r){if("string"==typeof t)e._gtag("event",t,e._toGtagOptions(r));else{var a=t.action,i=t.category,o=t.label,s=t.value,u=t.nonInteraction,c=t.transport;if(!i||!a)return void console.warn("args.category AND args.action are required in event()");var l={hitType:"event",eventCategory:(0,n.default)(i),eventAction:(0,n.default)(a)};o&&(l.eventLabel=(0,n.default)(o)),void 0!==s&&("number"!=typeof s?console.warn("Expected `args.value` arg to be a Number."):l.eventValue=s),void 0!==u&&("boolean"!=typeof u?console.warn("`args.nonInteraction` must be a boolean."):l.nonInteraction=u),void 0!==c&&("string"!=typeof c?console.warn("`args.transport` must be a string."):(-1===["beacon","xhr","image"].indexOf(c)&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),l.transport=c)),e._gaCommand("send",l)}}),y(this,"send",function(t){e._gaCommand("send",t)}),this.reset()}return e=[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}],function(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,g(a.key),a)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();r.GA4=b,r.default=new b},13825,(e,t,r)=>{"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
1Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ReactGAImplementation=void 0;var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=i(void 0);if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=n?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}(e.r(75551));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}r.ReactGAImplementation=n.GA4,r.default=n.default},47300,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){console.warn("[react-gtm]",e)}},56003,(e,t,r)=>{"use strict";var a,n=(a=e.r(47300))&&a.__esModule?a:{default:a};t.exports={tags:function(e){var t=e.id,r=e.events,a=e.dataLayer,i=e.dataLayerName,o=e.preview,s=">m_auth="+e.auth,u=">m_preview="+o;t||(0,n.default)("GTM Id is required");var c="\n (function(w,d,s,l,i){w[l]=w[l]||[];\n w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', "+JSON.stringify(r).slice(1,-1)+"});\n var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';\n j.async=true;
1j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'"+s+u+">m_cookies_win=x';\n f.parentNode.insertBefore(j,f);\n })(window,document,'script','"+i+"','"+t+"');";return{iframe:'\n <iframe src="https://www.googletagmanager.com/ns.html?id='+t+s+u+'>m_cookies_win=x"\n height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>',script:c,dataLayerVar:this.dataLayer(a,i)}},dataLayer:function(e,t){return"\n window."+t+" = window."+t+" || [];\n window."+t+".push("+JSON.stringify(e)+")"}}},21663,(e,t,r)=>{"use strict";var a,n=(a=e.r(56003))&&a.__esModule?a:{default:a};t.exports={dataScript:function(e){var t=document.createElement("script");return t.innerHTML=e,t},gtm:function(e){var t=n.default.tags(e);return{noScript:function(){var e=document.createElement("noscript");return e.innerHTML=t.iframe,e},script:function(){var e=document.createElement("script");return e.innerHTML=t.script,e},dataScript:this.dataScript(t.dataLayerVar)}},initialize:function(e){var t=e.gtmId,r=e.events,a=e.dataLayer,n=e.dataLayerName,i=e.auth,o=e.preview,s=this.gtm({id:t,events:void 0===r?{}:r,dataLayer:a||void 0,dataLayerName:void 0===n?"dataLayer":n,auth:void 0===i?"":i,preview:void 0===o?"":o});a&&document.head.appendChild(s.dataScript),document.head.insertBefore(s.script(),document.head.childNodes[0]),document.body.insertBefore(s.noScript(),document.body.childNodes[0])},dataLayer:function(e){var t=e.dataLayer,r=e.dataLayerName,a=void 0===r?"dataLayer":r;if(window[a])return window[a].push(t);var i=n.default.dataLayer(t,a),o=this.dataScript(i);document.head.insertBefore(o,document.head.childNodes[0])}}},30746,(e,t,r)=>{"use strict";var a;t.exports=((a=e.r(21663))&&a.__esModule?a:{default:a}).default},16640,e=>{"use strict";var t=e.i(30746),r=e.i(58557),a=e.i(61638);let n={};e.s(["DataLayerHelper",0,{setDataLayer(e){a.isServer||JSON.stringify(e)!==JSON.stringify(n)&&(n={...e},t.default.dataLayer({dataLayer:e}))},clearDataLayer(){this.setDataLayer({ecommerce:null})},signup(e){this.setDataLayer({event:"signUpView",data:{customer_id:e}})},signOut(e){this.setDataLayer({event:"signOutView",data:{customer_id:e}})},productView(e,t,a){let n=(0,r.getInsiderTaxonomy)(e?.breadcrumbs||[]),i={name:e.name,SKU:e.skucode||t?.skuCode,uuid:e.uuid||t?.uuid,price:e.price||t?.price,category:e?.breadcrumbs[0]?.categoryUrl||"kit",seller:e.merchant?.name||e?.kitProducts[0]?.product?.merchant?.name,description:e.description,id_variant:t?.shortHash||t?.uuid||e?.shortHash,item_variant:t?.name};n.slice(0,5).forEach((e,t)=>{i[0===t?"item_category":`item_category${t+1}`]=e}),this.setDataLayer({event:"productPageView",ecommerce:{detail:{products:[i]}}})},kitView(e,t){let r={event:"kitPageView",ecommerce:{detail:{kit:{name:t.name,price:t.price,uuid:t.uuid,products:e}}}};this.setDataLayer(r)},addToCart(e,t){Object.assign(e,{quantityItems:t});let a=(0,r.getInsiderTaxonomy)(e?.breadcrumbs||[]),n={name:e?.name,sku:e?.sku,price:e?.price,id:e?.id,quantity:t,brand:e?.brand,item_variant:e?.variant,category:e?.category,id_variant:e?.id_variant};a.slice(0,5).forEach((e,t)=>{n[0===t?"item_category":`item_category${t+1}`]=e}),this.setDataLayer({event:"addToCart",ecommerce:{currencyCode:"BRL",add:{products:[n]}}})},removeFromCart(e,t){Object.assign(e,{quantity:t});let a=(0,r.getInsiderTaxonomy)(e?.breadcrumbs||[]),n={name:e?.name,sku:e?.sku,price:e?.price,id:e?.id,brand:e?.brand,item_variant:e?.variant,category:e?.category,id_variant:e?.id_variant};a.slice(0,5).forEach((e,t)=>{n[0===t?"item_category":`item_category${t+1}`]=e}),this.setDataLayer({event:"removeFromCart",ecommerce:{currencyCode:"BRL",remove:{products:[n]}}})},cartView(e){this.setDataLayer({event:"cartView",ecommerce:{cart:e.map(({breadcrumbs:e,...t})=>{let a=(0,r.getInsiderTaxonomy)(e||[]).slice(0,5).reduce((e,t,r)=>({...e,[0===r?"item_category":`item_category${r+1}`]:t}),{});return{...t,...a}})}})},checkoutIdentity(e,t,r,a){let n={event:"checkout",ecommerce:{currencyCode:"BRL",checkout:{actionField:{step:1,option:"Identificacao"},adress:{zipCode:e?.zipCode,street:e?.street,city:e?.city},idOrder:t,created:r?.created,modified:r?.modified,total:r?.totalValue,username:a}}};this.setDataLayer(n)},checkoutPayment(e){this.setDataLayer(e)},purchase(e){let t={event:"purchase",ecommerce:{purchase:{actionField:{id:e.order.id,affiliation:e.order.affiliation,revenue:e.order.revenue,totalProducts:e.order.totalProducts,shipping:e.order.shipping,coupon:e.order.coupon},products:e.products}}};this.setDataLayer(t)},productClick(e){let t={event:"productClick",ecommerce:{click:{products:[{name:e.name,id:e.id,price:e.price,brand:e.brand,category:e.category,variant:e.variant,position:e.position}]}}};this.setDataLayer(t)}
1,categoryView(e){let t={event:"categoryView",ecommerce:{detail:{category:e?.slug,categoryName:e?.categoryName,description:e?.shortDescription,path:`/${e?.slug}`}}};this.setDataLayer(t)},pageView(e,t=""){this.setDataLayer({event:"pageView",location:e,title:t})},addShippingInfo(e,t){let r={event:"add_shipping_info",ecommerce:{currency:"BRL",name:e.orderMerchantShippingOptions.carrier.name,value:e.orderMerchantShippingOptions.final_price,items:t}};this.setDataLayer(r)},addPaymentInfo(e,t,r){this.setDataLayer({event:"add_payment_info",ecommerce:{currency:"BRL",value:r,payment_type:e,items:t}})},searchTerm(e,t,r=""){this.setDataLayer({event:"search",search_term:e,location:t,title:r})},searchTermFromUser(e,t,r="",a,n,i,o){this.setDataLayer({event:"pesquisa_site",search_term:e,location:t,title:r,searchOrigin:a||"external_link",isInternalSearch:n||!1,productQuantity:i||0,page:o||null})}}])},75446,e=>{"use strict";e.s(["DataLayerHelperGA4",()=>i]);var t=e.i(13825),r=e.i(16640),a=e.i(58557),n=e.i(97830);let i={clearDataLayer(){t.default.reset()},signIn(e){t.default.event("sign_up",{customer_id:e})},signup(e,r){t.default.event("login",{customer_id:e})},signOut(e){t.default.event("logout",{customer_id:e})},productView(e,r){this.clearDataLayer();let n=(0,a.getInsiderTaxonomy)(e?.breadcrumbs||[]),i={item_name:e?.name,item_id:e?.uuid,price:e?.price||r?.price,item_uuid:e?.uuid,affiliation:e?.merchant?.name||e?.kitProducts[0]?.product?.merchant?.name,description:e?.description,category:e?.breadcrumbs[0]?.categoryUrl,id_variant:r?.shortHash||r?.uuid||e?.shortHash,item_variant:r?.name};n.slice(0,5).forEach((e,t)=>{i[0===t?"item_category":`item_category${t+1}`]=e}),t.default.event("view_item",{items:[i]})},kitView(e,r){t.default.event("view_kit_page",{item_name:r.name,price:r.price,item_uuid:r.uuid,items:e})},addToCart(e,r){Object.assign(e,{quantity:r}),this.clearDataLayer();let n=(0,a.getInsiderTaxonomy)(e?.breadcrumbs||[]),i={item_id:e?.id,item_name:e?.name,price:e?.price,quantity:e?.quantity,item_brand:e?.brand,item_uuid:e?.id,item_variant:e?.variant,category:e?.breadcrumbs[0]?.categoryUrl,id_variant:e?.id_variant};n.slice(0,5).forEach((e,t)=>{i[0===t?"item_category":`item_category${t+1}`]=e}),t.default.event("add_to_cart",{currencyCode:"BRL",items:[i]})},removeFromCart(e,r){Object.assign(e,{quantity:r}),this.clearDataLayer();let n=(0,a.getInsiderTaxonomy)(e?.breadcrumbs||[]),i={item_id:e?.id,item_name:e?.name,price:e?.price,quantity:e?.quantity,item_brand:e?.brand,item_uuid:e?.id,item_variant:e?.variant,category:e?.breadcrumbs[0]?.categoryUrl,id_variant:e?.id_variant};n.slice(0,5).forEach((e,t)=>{i[0===t?"item_category":`item_category${t+1}`]=e}),t.default.event("remove_from_cart",{currencyCode:"BRL",value:e.price,items:[i]})},cartView(e,r){let n=e.map(e=>{let t=(0,a.getInsiderTaxonomy)(e?.breadcrumbs||[]),r=e.kit?{item_name:e?.name,quantity:e?.amount,price:e?.total,item_id:e?.id_variant,item_uuid:e?.uuid,itemAmount:e?.itemAmount,kit:e.kit,id_variant:e?.id_variant,item_variant:e?.variant}:{quantity:e?.amount,price:e?.price,item_name:e?.name,kit:e?.kit,item_uuid:e?.uuid,item_id:e?.uuid,item_variant:e?.variant,id_variant:e?.id_variant},n=t.slice(0,5).reduce((e,t,r)=>({...e,[0===r?"item_category":`item_category${r+1}`]:t}),{});return{...r,...n}});t.default.event("view_cart",{currencyCode:"BRL",value:r.totalValue,items:n})},setProductsData(e){let t=[];return e.map(e=>{let r={name:e?.name,variant:e?.variant,price:e?.price,uuid:e?.uuid,index:e?.index,quantity:e?.quantity,breadcrumbs:e?.breadcrumbs,category:e?.category,id_variant:e?.id_variant};t.push(r)}),t},checkout(e,t,a){let i=[];if(e?.totalValue!==void 0){let o=a?.user?.username??(0,n.getSessionUser)()?.user?.username;r.DataLayerHelper.checkoutIdentity(t,e.idOrder,e,o),e?.orderMerchants?.length>0&&e?.orderMerchants.map(e=>{e.orderItems.length>0&&e.orderItems.map((e,t)=>{let r={name:e?.product?.baseProduct?.name,variant:e?.product?.name,price:e?.product?.price,uuid:e?.product?.baseProduct?.uuid,index:t,quantity:e?.amount,breadcrumbs:e?.product?.breadcrumbs,category:e?.product?.breadcrumbs[0]?.categoryUrl,i
1d_variant:e?.product?.shortHash||e?.product?.uuid};i.push(r)}),e.orderKits.length>0&&e.orderKits.map((e,t)=>{e?.orderItems?.forEach(r=>{let a={name:e?.kit?.name,price:e?.total,uuid:e?.kit?.shortHash||e?.kit?.uuid,quantity:e?.amount,index:t,variant:r.product.name,breadcrumbs:e?.kit?.breadcrumbs,category:e?.kit?.breadcrumbs[0]?.categoryUrl,id_variant:r?.product?.shortHash||r?.product?.uuid};i.push(a)})})}),this.checkoutIdentity(e,this.setProductsData(i))}},checkoutIdentity(e,r){let n=r.map(e=>{let t={item_name:e?.name,item_variant:e?.variant,price:e?.price,item_id:e?.uuid,index:e?.index,quantity:e?.quantity,category:e?.category,id_variant:e?.id_variant};return(0,a.getInsiderTaxonomy)(e?.breadcrumbs||[]).slice(0,5).forEach((e,r)=>{t[0===r?"item_category":`item_category${r+1}`]=e}),t});this.clearDataLayer(),t.default.event("begin_checkout",{items:n,currencyCode:"BRL",value:e?.totalValue})},checkoutPayment(e){t.default.event("checkoutPayment",e)},purchase(e){t.default.event("purchase",{currency:"BRL",transaction_id:e.order.transaction_id,value:e.order?.value,items:e.order?.items})},productClick(e){t.default.event("productClick",{item_name:e?.name,item_id:e?.id,price:e?.price,item_brand:e?.brand,item_category:e?.category,item_variant:e?.variant,position:e?.position})},categoryView(e){t.default.event("view_category",{category:e?.slug,categoryName:e?.categoryName,path:`/${e?.slug}`})},pageView(e){t.default.event("page_view",{page:e})},addShippingInfo(e,r){t.default.event("add_shipping_info",{currency:"BRL",name:e?.orderMerchantShippingOptions?.carrier?.name,value:e?.orderMerchantShippingOptions?.final_price,items:r})},addPaymentInfo(e,r,a){t.default.event("add_payment_info",{currency:"BRL",value:a,payment_type:e,items:r})},handleShippingEvent(e,t){let a=[];t.map(t=>{e.orderMerchantUuid===t.uuid&&(t.orderItems.length>0&&t.orderItems.map(e=>{let t={item_id:e?.product?.skuCode,item_name:e?.product?.name};a.push(t)}),t.orderKits.length>0&&t.orderKits.map(e=>{let t={item_id:e?.kit?.skuCode,item_name:e?.kit?.name};a.push(t)}),i.addShippingInfo(e,a),r.DataLayerHelper.addShippingInfo(e,a))})},searchTerm(e,r){t.default.event("search",{search_term:e,page:r})},searchTermFromUser(e,r,a,n,i){t.default.event("pesquisa_site",{search_term:e,search_method:a,product_quantity:n,page:i})}}},99529,62862,33875,47042,69462,82119,5433,64593,e=>{"use strict";e.s(["authSessionInitKey",()=>ep,"autoLogin",()=>eh,"initTwoFactor",()=>eb,"login",()=>eg,"logout",()=>eS,"triggerSessionExpired",()=>ew,"verifyTwoFactor",()=>ev],99529);var t=e.i(86158),r=e.i(61638),a=e.i(3828),n=e.i(39256),i=e.i(99720),o=e.i(13496),s=e.i(11912),u=e.i(2848),c=e.i(71556),l=e.i(97830),d=e.i(78088),p=e.i(21592);e.s(["resetCheckoutShippingCache",()=>et,"useCheckoutShipping",()=>ea],5433);var f=e.i(91788),h=e.i(92905),m=e.i(93930),y=e.i(85700),g=e.i(75446);e.s(["applyUnifiedCoupon",()=>S,"getCouponsByOrder",()=>R,"removeOrderCoupon",()=>E,"removeSellerCoupon",()=>w],33875),e.s(["default",()=>v],62862);var b=e.i(61657);let v=class{static async createPaymentOrder(e,t,r){try{let a={...t,token:r},n=await b.default.post(`${b.URLS.CLIENT}/${e}/payment?source=web`,a);if(200===n.status)return n.data;return(0,b.exception)(n,"Algo deu errado no pagamento. Por favor, confira os seus dados.")}catch(e){if(e.response?.status===400)return(0,b.exception)(e,e.response.message);if(e.response?.status===500)return{status:e.response.status,error:e.response.data.message||"Erro interno do servidor"};if(e.response?.status===401||e.response?.status===403)return{sessionExpired:!0};return(0,b.exception)(e,"Algo deu errado no pagamento. Por favor, confira os seus dados.")}}static async calculateInstallmentsCheckout(e){try{let t=await b.default.post(`${b.URLS.INSTALLMENTS}`,e);if(200===t.status)return t.data;return(0,b.exception)(t,"Falha ao efetuar o cálculo do parcelamento")}catch(e){return(0,b.exception)(e,"Falha ao efetuar o cálculo do parcelamento")}}static async calculateInstallmentsCheckoutAll(e){try{let t=await b.default.post(`${b.URLS.INSTALLMENTSALL}`,e);if(200===t.status)return t.data;return(0,b.exception)(t,"Falha ao efetuar o cálculo do parcelamento")}catch(e){return(0,b.exception)(e,"Falha ao efetuar o cálculo do parcelamento")}}static async getAllByUser(e,t,r){try{let a=await b.default.get(`customers/${e}/orders?page=${t}&size=${r}&sort=created,desc`);if(200===a.status)return a.data;return(0,b.exception)(a,"Falha ao carregar os pedidos")}catch(e){return(0,b.exception)(e,"Falha ao carregar os pedidos")}}static async getOrder(e,t){try{let r=await b.default.get(`customers/${t}/orders/${e}`);
1if(200===r.status)return r.data;return(0,b.exception)(r,"Falha ao carregar os pedido")}catch(e){return(0,b.exception)(e,"Falha ao carregar os pedido")}}static async setOrderAddress(e,t,r){try{let a=await b.default.put(`/customers/${e}/orders/${t}/address/${r}`);if(200===a.status)return a.data;return a.error="Erro ao associar endereço ao pedido",a}catch(e){return{error:"Erro ao associar endereço ao pedido"}}}static async setOrderShipping(e,t,r,a){try{let n=await b.default.post(`customers/${e}/sportbayOrder/${t}/address/${a}/shipping/details/freteRapido`,r);if(200===n.status)return n.data;return n.error="Erro ao associar endereço ao pedido",n}catch(e){return{error:"Erro ao associar endereço ao pedido"}}}static async deleteOrderShipping(e,t){try{let r=await b.default.delete(`customers/${e}/sportbayOrder/${t}/shipping/details`);if(200===r.status)return r.data;return r.error="Erro ao desassociar endereço ao pedido",r}catch(e){return{error:"Erro ao desassociar endereço ao pedido"}}}static async applyCoupon(e,t){try{let r=await b.default.post(`/customers/orders/anon/${e}/promotion?identifier=${t}`);if(200===r.status)return r.data;if(404===r.status)return r.error="Cupom não encontrado",r;if(409===r.status)return r.error="Cupom não atende os requisitos",r;return(0,b.exception)(r,"Falha aplicar Cupom")}catch(e){return(0,b.exception)(e,"Falha ao aplicar Cupom")}}static async applyCouponMerchant(e,t,r){try{let a=await b.default.post(`/customers/orders/${e}/merchant/${t}/promotion?identifier=${r}`);if(200===a.status)return a.data;return(0,b.exception)(a,"Falha aplicar Cupom")}catch(e){return 404===e.response.status&&(e.response.data.message="Cupom não encontrado"),(0,b.exception)(e,"Falha ao aplicar Cupom")}}static async deleteCouponMerchant(e,t,r){try{let a=await b.default.delete(`/customers/orders/${e}/merchant/${t}/promotion?identifier=${r}`);if(200===a.status)return a.data}catch(e){return(0,b.exception)(e,"Falha ao remover Cupom")}}static async removeCoupon(e){try{let t=await b.default.put(`/customers/orders/anon/${e}/promotion`);if(200===t.status)return t.data;if(404===t.status)return t.error="Pedido não encontrado",t;return(0,b.exception)(t,"Falha remover Cupom")}catch(e){return(0,b.exception)(e,"Falha ao remover Cupom")}}static async getAllByUserMKT(e,t,r){try{let r=await b.default.get(`customers/${e}/sportbayOrder?page=${t}&size=5&sort=created,desc`);if(200===r.status)return r.data;return(0,b.exception)(r,"Falha ao carregar os pedidos")}catch(e){return(0,b.exception)(e,"Falha ao carregar os pedidos")}}static async getOrderMKT(e,t){try{let r=await b.default.get(`customers/${t}/ordersmerchants/${e}`);if(200===r.status)return r.data;return(0,b.exception)(r,"Falha ao carregar os pedido")}catch(e){return(0,b.exception)(e,"Falha ao carregar os pedido")}}static async getCoupons(){try{let e=await b.default.get("/store/cupoms");if(200===e.status)return e.data;return(0,b.exception)(e,"Falha ao carregar os cupons")}catch(e){return(0,b.exception)(e,"Falha ao carregar os cupons")}}static async getCouponsByMerchantUuid(e="sportbay-marketplace"){try{let t=await b.default.get("/store/cupoms/merchant/"+e);if(200===t.status)return t.data;return(0,b.exception)(t,"Falha ao carregar os cupons")}catch(e){return(0,b.exception)(e,"Falha ao carregar os cupons")}}static async applyCouponAllMerchants(e,t){try{let r=await b.default.post(`/customers/orders/${e}/all/promotion?identifier=${t}`);if(200===r.status)return r.data;return(0,b.exception)(r,"Falha aplicar Cupom")}catch(e){return 404===e.response.status&&(e.response.data.message="Cupom não encontrado"),(0,b.exception)(e,"Falha ao aplicar Cupom")}}static async getCouponsByOrder(e){try{let t=await b.default.get("/store/cupoms/order/"+e);if(200===t.status)return t.data;return(0,b.exception)(t,"Falha aplicar Cupom")}catch(e){return 404===e.response.status&&(e.response.data.message="Cupom não encontrado"),(0,b.exception)(e,"Falha ao aplicar Cupom")}}static async applyUnifiedCoupon(e,t,r={}){try{let a=new URLSearchParams({identifier:t});r.orderMerchantUuid&&a.append("orderMerchantUuid",r.orderMerchantUuid),r.scope&&a.append("scope",r.scope);let n=await b.default.post(`/customers/orders/${e}/cupom?${a.toString()}`);
1if(200===n.status)return n.data;return(0,b.exception)(n,"Falha aplicar Cupom")}catch(e){return e.response?.status===404&&(e.response.data.message="Cupom não encontrado"),(0,b.exception)(e,"Falha ao aplicar Cupom")}}static async deleteCouponAllMerchant(e,t){try{let r=await b.default.delete(`/customers/orders/${e}/merchant/all/promotion?identifier=${t}`);if(200===r.status)return r.data}catch(e){return(0,b.exception)(e,"Falha ao remover Cupom")}}static async handleLogEmptyMerchant(e){try{await b.default.post("/customers/log/empty-merchant",e)}catch(e){return(0,b.exception)(e,"falha ao registrar log")}}};async function w(e,t,r){return v.deleteCouponMerchant(e,t,r)}async function E(e,t){return v.deleteCouponAllMerchant(e,t)}async function S(e,t,r={}){var a;return a=await v.applyUnifiedCoupon(e,t,r),a?.error&&("cpf ou cnpj não está participando desta promoção"===a.error?a.error="cupom não aplicável à sua conta":"total da compra não atinge o mÃnimo para aplicação do cupom"===a.error&&(a.error="valor mÃnimo do pedido não atingido")),a}async function R(e){return v.getCouponsByOrder(e)}e.s(["CheckoutProvider",()=>T,"useCheckoutAddress",()=>D,"useCheckoutPayment",()=>x,"useCheckoutSteps",()=>P,"useCouponLoading",()=>I,"useRunCoupon",()=>N],47042);var _=e.i(91398),O=e.i(16664);let C=(0,f.createContext)({stepCheckout:"",completedSteps:[],nextStep:()=>{},setCompletedSteps:()=>{},resetStep:()=>{},setCheckoutInitialStep:()=>{},couponLoading:!1,runCoupon:async e=>e(),paymentSelected:"PIX",installments:1,cvv:"",brand:null,newCard:{},shippingDetailReset:!1,setShippingDetailReset:()=>{},paymentProcessing:!1,setPaymentProcessing:()=>{},changePaymentOrder:()=>{},changePaymentInstallments:()=>{},changeNewCard:()=>{},setCvv:()=>{},setBrand:()=>{},validateCvv:()=>!0,resetPaymentState:()=>{},selectedAddress:null,setSelectedAddress:()=>{},resetCheckoutShipping:()=>{}}),A={};function T({children:e}){let t=(0,y.useQueryClient)(),[r,a]=(0,f.useState)(""),[n,i]=(0,f.useState)([]),[o,s]=(0,f.useState)(0),[u,c]=(0,f.useState)(null),[l,d]=(0,f.useState)("PIX"),[p,h]=(0,f.useState)(1),[m,g]=(0,f.useState)(""),[b,v]=(0,f.useState)(null),[w,E]=(0,f.useState)(A),[S,R]=(0,f.useState)(!1),[P,x]=(0,f.useState)(!1),I=(0,f.useCallback)(e=>{i(t=>t.includes(e)?t:[...t,e])},[]),N=(0,f.useCallback)(e=>{a(e),I(e)},[I]),D=(0,f.useCallback)(()=>{i([])},[]),L=(0,f.useCallback)(({needsEmailVerification:e,isAuthenticated:t,user:r})=>{let n=function({needsEmailVerification:e,isAuthenticated:t,user:r}){return!t||e?O.STEPS.USERIDENTIFICATION:r?.mainAddress?O.STEPS.PAYMENTAREA:O.STEPS.ADDRESSAREA}({needsEmailVerification:e,isAuthenticated:t,user:r});a(n),r?.mainAddress&&c(r.mainAddress),n===O.STEPS.PAYMENTAREA&&i(e=>{let t=new Set(e);return t.add(O.STEPS.ADDRESSAREA),t.add(O.STEPS.REVIEWITEMS),t.add(O.STEPS.PAYMENTAREA),[...t]})},[]),U=(0,f.useCallback)(async e=>{s(e=>e+1);try{return await e()}finally{s(e=>e-1)}},[]),F=(0,f.useCallback)(e=>{d(e)},[]),k=(0,f.useCallback)(e=>{h(e)},[]),j=(0,f.useCallback)((e,t)=>{E(r=>({...r,[e]:t}))},[]),M=(0,f.useCallback)(e=>{g(e)},[]),$=(0,f.useCallback)(e=>{v(e)},[]),B=(0,f.useCallback)(()=>"CREDIT_CARD"!==l||!!m&&!(m.length<3)&&!(m.length>4),[l,m]),Q=(0,f.useCallback)(()=>{d("PIX"),h(1),g(""),v(null),E(A),R(!1)},[]),q=(0,f.useCallback)(e=>{c(e??null)},[]),K=(0,f.useCallback)(()=>{et(t),c(null)},[t]),z=(0,f.useMemo)(()=>({stepCheckout:r,completedSteps:n,nextStep:N,setCompletedSteps:I,resetStep:D,setCheckoutInitialStep:L,couponLoading:o>0,runCoupon:U,paymentSelected:l,installments:p,cvv:m,brand:b,newCard:w,shippingDetailReset:S,setShippingDetailReset:R,paymentProcessing:P,setPaymentProcessing:x,changePaymentOrder:F,changePaymentInstallments:k,changeNewCard:j,setCvv:M,setBrand:$,validateCvv:B,resetPaymentState:Q,selectedAddress:u,setSelectedAddress:q,resetCheckoutShipping:K}),[r,n,N,I,D,L,o,U,l,p,m,b,w,S,P,F,k,j,M,$,B,Q,u,q,K]);return(0,_.jsx)(C.Provider,{value:z,children:e})}function P(){let e=(0,f.useContext)(C);return{stepCheckout:e.stepCheckout,completedSteps:e.completedSteps,nextStep:e.nextStep,setCompletedSteps:e.setCompletedSteps,resetStep:e.resetStep,setCheckoutInitialStep:e.setCheckoutInitialStep}}function x(){let e=(0,f.useContext)(C);return{paymentSelected:e.paymentSelected,installments:e.installments,cvv:e.cvv,brand:e.brand,newCard:e.newCard,shippingDetailReset:e.shippingDetailReset,setShippingDetailReset:e.setShippingDetailReset,paymentProcessing:e.paymentProcessing,setPaymentProcessing:e.setPaymentProcessing,changePaymentOrder:e.changePaymentOrder,changePaymentInstallments:e.changePaymentInstallments,changeNewCard:e.changeNewCard,setCvv:e.setCvv,setBrand:e.setBrand,validateCvv:e.validateCvv,resetPaymentState:e.resetPaymentState}}function I(){return(0,f.useContext)(C).couponLoading}function N(){return(0,f.useContext)(C).runCoupon}function D(){let e=(0,f.useContext)(C);return{selectedAddress:e.selectedAddress,setSelectedAddress:e.setSelectedAddress,resetCheckoutShipping:e.resetCheckoutShipping}}e.s(["CHECKOUT_SHIPPING_OPTIONS_KEY",()=>U,"buildSelection",()=>J,"buildUnifiedOffers",()=>W,"canAutoApplyDelivery",()=>K,"canUnifyShipping",()=>H,"cheapestDelivery",()=>j,"currentShippingType",()=>$,"fetchCheckoutShippingOptions",()=>X,"getCartMerchants",()=>q,"getOffers",()=>k,"getValidMerchants",()=>B,"isCheckoutShippingReady",()=>z,"isPickupOffer",()=>F,"pickupOfferFrom",()=>M,"setCheckoutShipping",()=>Z,"unifiedShippingDiscount",()=>Y,"unifiedShippingType",()=>G],82119),e.s(["default",()=>L],69462);let L=class{static async getShippingOptionsFreteRapido(e,t,r){try{let a=await b.default.post(`${b.URLS.SHIPPING_FRETERAPIDO}?allShippingOptions=${r}`,{targetZipCode:e,products:t});if(200===a.status)return a.data;return(0,b.exception)(a,"Falha ao buscar formas de entregas da frete Rapido")}catch(e){return(0,b.exception)(e,"Falha ao buscar meios de entrega da frete Rapido")}}static async getShippingOptions(e,t,r){try{let a=await b.default.post(`${b.URLS.SHIPPING}?allShippingOptions=${r}`,{targetZipCode:e,products:t});if(200===a.status)return a.data;return(0,b.exception)(a,"Falha ao buscar formas de entrega")}catch(e){return(0,b.exception)(e,"Falha ao buscar meios de entrega")}}static async getShippingCheckout(e,t){try{let r=await b.default.get(`/store/shipping/order/${e}`,t);
1if(200===r.status)return r.data;return(0,b.exception)(r,"Falha ao buscar formas de entrega")}catch(e){return(0,b.exception)(e,"Falha ao buscar meios de entrega")}}static async getShippingCheckoutFreteRapido(e,t){try{let r=await b.default.get(`/store/shipping/order/${e}/freteRapido`,t);if(200===r.status)return r.data;return(0,b.exception)(r,"Falha ao buscar formas de entrega")}catch(e){if(e?.response?.status===500)return{status:e.response.status,error:e.response.data.message};return(0,b.exception)(e,"Falha ao buscar meios de entrega")}}},U="checkout-shipping-options";function F(e){return!!(e?.carrier?.name==="Retira na Loja"||e?.service?.includes?.("Retira na Loja"))}function k(e){return e?.dispatchersResponse?.dispatchers?.[0]?.offers||[]}function j(e=[]){let t=e.filter(e=>!F(e));return t.length?t.reduce((e,t)=>(e.final_price??e.offer)<(t.final_price??t.offer)?e:t):null}function M(e=[]){return e.find(F)||null}function $(e){let t;return e?.shippingDetails?.shippingType==="PICKUP"?"PICKUP":null!=(t=e?.shippingDetails?.shippingCompany)&&("string"!=typeof t||t.trim().length>0)?"DELIVERY":null}function B(e){return q(e).filter(e=>{let t=e?.orderItems?.length>0,r=e?.orderKits?.length>0;return t||r?e.total>0:(v.handleLogEmptyMerchant({idOrderMerchant:e.idOrderMerchant,idOrder:e.idOrder}),!1)})}function Q(e){return{orderMerchantUuid:e}}function q(e){return e?.orderMerchants||e?.orderMerchantsResponse||[]}function K(e){return!!e?.length&&e.some(e=>j(k(e)))}function z({cart:e,options:t,merchants:r}){let a=r?.length?r:q(e);return!!t&&!!a.length&&!(function(e,t=[]){return e&&t.length?t.filter(t=>0===k(e.find(e=>e.orderUuid===t.uuid)).length):[]}(t,a).length>0)&&a.every(e=>null!==$(e))}function H({merchants:e=[],options:t}={}){return!!t?.length&&!(e.length<2)&&e.every(e=>{if(e?.merchant?.ownDistributionCenter!==!0)return!1;let r=t.find(t=>t.orderUuid===e.uuid);return!!r&&!r.error&&!!j(k(r))})}function V(e,{offerKey:t,carrierName:r}){return{offer:t,service:r,final_price:e.reduce((e,t)=>e+(t.final_price??t.offer??0),0),delivery_time:{days:e.reduce((e,t)=>Math.max(e,t?.delivery_time?.days??0),0)||null},carrier:{name:r}}}function W(e,t=[]){let r=t.map(t=>e?.find(e=>e.orderUuid===t.uuid)).filter(Boolean);if(!r.length)return[];let a=r.map(e=>j(k(e))).filter(Boolean),n=r.map(e=>M(k(e))).filter(Boolean),i=[];return a.length===r.length&&i.push(V(a,{offerKey:"UNIFIED_DELIVERY",carrierName:"Sportbay envios"})),n.length===r.length&&i.push(V(n,{offerKey:"UNIFIED_PICKUP",carrierName:"Retira na Loja"})),i}function G(e=[]){if(!e.length)return null;let t=e.map($);return t.every(e=>"PICKUP"===e)?"PICKUP":t.every(e=>"DELIVERY"===e)?"DELIVERY":null}function Y(e=[]){return e.reduce((e,t)=>e+(t?.shippingDetails?.shippingDiscount||0),0)}function J(e,t,{merchants:r=[],changedMerchantUuid:a,cart:n}={}){let i=e||[],o=r.length?r:q(n),s=function(e=[],t=[]){let r=new Set;return e?.forEach(e=>{e?.orderUuid&&r.add(e.orderUuid)}),t.forEach(e=>{e?.uuid&&r.add(e.uuid)}),[...r]}(i,o);if(!s.length)return[];let u=new Map(i.map(e=>[e.orderUuid,e]));return s.map(e=>{let r,n=u.get(e),i=k(n);if(!n||!i.length)return Q(e);let s=$(o.find(t=>t.uuid===e)),c=t;a&&(c=e===a?t:s||"DELIVERY");let l="PICKUP"===c?M(i):j(i);return l?(r=n?.dispatchersResponse?.dispatchers?.[0])&&l?{orderMerchantUuid:n.orderUuid,id:r.id,request_id:r.request_id,registered_number_dispatcher:r.registered_number_dispatcher,orderMerchantShippingOptions:l}:null:Q(e)})}async function X(e,t){let r=await L.getShippingCheckoutFreteRapido(t,{targetZipCode:e});return r?.error?{error:r.error,options:null}:{error:!1,options:r?.length>0?r:null}}async function Z({userUuid:e,orderUuid:t,selection:r,addressUuid:a}){try{return await v.setOrderShipping(e,t,r,a)}catch{return{error:"falha ao vincular transportadora no pedido"}}}function ee(e){return String(e??"").replace(/\D/g,"")}function et(e){e.removeQueries({queryKey:[U]})}function er(e,t){"auction"===e?(0,p.setAuctionCartFromResponse)(t):(0,u.setCartFromResponse)(t)}function ea({zipCode:e,orderUuid:t,cart:r,cartKind:a="cart",merchants:n,enabled:i=!0}={}){let o=(0,y.useQueryClient)(),s=ee(e),[u,c]=(0,f.useState)(!1),l=n||q(r),d=(0,f.useRef)(null),p=N(),b=(0,m.useQuery)({queryKey:[U,t,ee(s)],queryFn:()=>X(s,t),enabled:!!(i&&8===s.length&&t)}),v=(0,h.useMutation)({mutationFn:async({userUuid:e,selection:r,addressUuid:a})=>{let n=await Z({userUuid:e,orderUuid:t,selection:r,addressUuid:a});if(n?.error)throw Error(n.error);return{cart:n,selection:r}},onSuccess:({cart:e})=>{er(a,e)}}),w=(0,f.useCallback)(async({type:e,merchantUuid:t,userUuid:n,addressUuid:i})=>{let o=J(b.data?.options,e,{merchants:l,changedMerchantUuid:t,cart:r});if(!o.length)return{error:!0};let s=await v.mutateAsync({userUuid:n,selection:o,addressUuid:i});
1c(!0),s.selection.forEach(e=>{if(e.orderMerchantShippingOptions){let t=q(s.cart);g.DataLayerHelperGA4.handleShippingEvent(e,t)}});let u=s.cart;if("PICKUP"===e){let e=u?.promotion;if(e?.identifier){d.current=e.identifier;let t=await p(()=>E(u.uuid,e.identifier));t?.error||(er(a,t),u=t)}}if("DELIVERY"===e&&d.current){u?.promotion?.identifier&&await p(()=>E(u.uuid,u.promotion.identifier));let e=await p(()=>S(u.uuid,d.current,{scope:"marketplace"}));e?.error||(er(a,e),u=e),d.current=null}return u},[r,a,l,v,b.data?.options]),R=(0,f.useCallback)(async({address:e,userUuid:n})=>{if(!e||!t||!n)return{error:!0};c(!1);let i=ee(e.zipCode),s=await X(i,t);if(o.setQueryData([U,t,ee(i)],s),s.error||!K(s.options))return s;let u=J(s.options,"DELIVERY",{merchants:l,cart:r}),f=await Z({userUuid:n,orderUuid:t,selection:u,addressUuid:e.uuid});if(f?.error)return f;er(a,f),c(!0),u.forEach(e=>{e.orderMerchantShippingOptions&&g.DataLayerHelperGA4.handleShippingEvent(e,q(f))});let h=f;if(d?.current){let e=await p(()=>S(h.uuid,d.current,{scope:"marketplace"}));e?.error||(er(a,e),h=e),d.current=null}return h},[r,a,l,t,o]),_=b.data?.options??null;return{options:_,error:b.data?.error||b.error,isFetching:b.isFetching,isPending:v.isPending,isShippingBusy:b.isFetching||v.isPending,isShippingReady:z({cart:r,options:_,merchants:l})&&(!!K(_)||u),applyType:w,syncForAddress:R}}let en=["auth","sessionExpired"],ei=["auth","twoFactor"];function eo(){return(0,s.getQueryClient)().getQueryData(en)??!1}function es(e){(0,s.getQueryClient)().setQueryData(en,!!e)}function eu(){return(0,s.getQueryClient)().getQueryData(ei)??null}function ec(e){(0,s.getQueryClient)().setQueryData(ei,e??null)}function el(){es(!1),ec(null)}e.s(["authSessionExpiredKey",0,en,"authTwoFactorKey",0,ei,"getSessionExpired",0,eo,"getTwoFactor",0,eu,"resetAuthFlags",0,el,"setSessionExpired",0,es,"setTwoFactor",0,ec],64593);let ed=new i.default,ep=["auth","session"];async function ef(e){let t=await (0,l.fetchUser)(e);return!!(t&&!t?.error&&t?.uuid)&&(es(!1),t?.mainAddress?.zipCode&&!(0,c.readHeaderCep)()&&await (0,c.setHeaderCep)(t.mainAddress),o.DataLayerHelperInsider.user((0,l.getSessionUser)()),"function"==typeof window.clarity&&window.clarity("identify",t.uuid),!0)}async function eh(){if(r.isServer)return null;let e=t.default.getItem(t.KEYS.USER_KEY);return e&&(await ef(e)||t.default.cleanAll()),(0,l.getSessionUser)()}async function em(e){let t=await n.default.linkCartWithUser(e);return t.error?ed.notify(i.STATUS_HELPER.ERROR):(0,u.setCartFromResponse)(t),t}async function ey(){let e,r=!!t.default.getItem(t.KEYS.CART_ID);("/checkout"===(e=a.default.pathname||"")||e.startsWith("/checkout"))&&r||await (0,s.getQueryClient)().invalidateQueries({queryKey:["cart"]})}async function eg(e,r){let i=await n.default.login(e,r);if(i&&i.twoFactorRequired)return ec({required:!0,type:i.type,channels:i.channels||[],tempUsername:e}),es(!1),await a.default.push("/autenticacao-2fa"),i;let o=t.default.getItem(t.KEYS.CART_ID);if(i.error&&!o&&t.default.cleanAll(),!i.error){await ef(e);let t=(0,s.getQueryClient)().getQueryData(["cart"]);t?.uuid&&await em(t.uuid),await ey()}return i}async function eb(e){return n.default.initTwoFactor(e)}async function ev(e,t=!1){let r=await n.default.verifyTwoFactor(e,t);if(r&&r.success){let e=eu()?.tempUsername;await ef(e),ec(null);let t=(0,s.getQueryClient)().getQueryData(["cart"]);t?.uuid&&await em(t.uuid),await ey()}return r}function ew(){if(!eo()){try{t.default.remove(t.KEYS.AUTH_TOKEN)}catch(e){}es(!0)}}let eE=!1;async function eS(){if(!eE){eE=!0;try{let e=(0,s.getQueryClient)();await e.cancelQueries({queryKey:u.CART_QUERY_KEY}),el(),(0,l.setSessionUser)(null),(0,c.clearHeaderCep)(),t.default.cleanAll(),(0,u.clearCart)(),(0,p.clearAuctionCart)(),et(e),await n.default.logout(),e.removeQueries({queryKey:["user","addresses"]}),e.removeQueries({queryKey:d.ORDERS_MKT_QUERY_KEY}),e.removeQueries({queryKey:l.userSessionQueryKey}),e.removeQueries({queryKey:ep}),await a.default.push("/")}finally{eE=!1}}}},61657,e=>{"use strict";e.s(["URLS",()=>o,"default",()=>u,"exception",()=>s]);var t=e.i(30559),r=e.i(61638),a=e.i(86158),n=e.i(99529);
1let i=t.default.create({baseURL:"https://api-v1.sportbay.com.br",withCredentials:!0,validateStatus:function(e){return e>=200&&e<=302}});i.interceptors.request.use(async e=>{if(e.headers={...e.headers||{}},"u">typeof FormData&&e.data instanceof FormData||e.headers["Content-Type"]||(e.headers["Content-Type"]="application/json; charset=utf-8"),e.url.startsWith("/public")||r.isServer)return e;let t=a.default.getItem(a.KEYS.AUTH_TOKEN);return t&&(a.default.getItem(a.KEYS.REMEMBER),e.headers.Authorization=`${t}`),e},e=>(e.response&&e?.response?.data?.message&&e?.response?.data?.message.slice(4),Promise.reject(e))),i.interceptors.response.use(async e=>e,async e=>{if(e.response&&(401===e.response.status||403===e.response.status)){let t=e.config&&e.config.url||"";if(!(t.includes("/login")||t.includes("auth/")))try{(0,n.triggerSessionExpired)()}catch(e){try{a.default.remove(a.KEYS.AUTH_TOKEN)}catch(e){}}}if(e.response){let t=500===e.response.status;e?.response?.data?.message&&!t&&e?.response?.data?.message}return Promise.reject(e)});let o={LOGIN:"/login",DEPARTMENTS:"/categories/menus",CATEGORY:"/categories",REGISTER:"/customers",UPDATE_USER:"/customers/update",BRAND:"/public/store/brand",CATEGORIES:"/public/store/all-categories",ADDRESS:"/address",SEARCH:"/public/store/search",PRODUCT:"/public/store/product",STORES:"/public/branch",BRANDS:"public/store/brands",RECOMMEND:"/recommendations",SHOPPINGCART:"/order/create",FINISH_ORDER:"/order",SHOPPING_LIST:"/shopping-list",GETCARD:"/customers/",CLIENT:"/customers",ANONYMOUS:"/customers/orders/anon",COMPONENTS:"/public/component",PRODUCTS:"/products",MENUS:"/categories/menus",HOME:"/categories/home",REDEMAGIC:"/client/rede-magic",SUBSCRIPTION:"/subscription/convert",SUBSCRIPTIONS:"/subscription/all",SUBSCRIPTIONDETAILS:"/subscription",CANCELSUBSCRIPTION:"/subscription/cancel",SUBSCRIPTIONFREQUENCIES:"/subscription/frequencies",SUBSCRIPTIONCANCELREASONS:"/subscription/cancelReasons",STATUSAPI:"/public/status-api/",RECOVERY:"/forget_password/access",RECOVERY_PASSWORD:"/forget_password",RECOVERY_PASSWORD_NEW_PASSWORD:"/forget_password/new-password",ZIPCODE:"/customers/zipcode",PASSWORD:"/password",BANNERS:"/store/banners",FEATURES:"features",SHIPPING:"/store/shipping/products",SHIPPING_FRETERAPIDO:"/store/shipping/products/freteRapido",ZIPCODESTORE:"/store/zipcode",KITS:"/store/kits",CONTACT:"/store/contacts",INSTALLMENTS:"/store/installments",INSTALLMENTSALL:"/store/installments/all",HOME_COMPONENTS:"/store/homes",HOME_COMPONENTS_REDIS:"/store/homes/redis",UNSUBSCRIBE_NEWSLETTER:"customers/newsletters/unsubscribe",PROMOTION:"/promotions",VALIDATEEMAIL:"/customers/verify",SELLERS:"/pub/sellers",AUCTIONS:"/auctions",AUCTIONSPUB:"pub/auctions",LANDING:"/landing",BRAND_NEW:"/brands",DEPARTMENTS:"/departments",DEVOLUTION:"/devolutions",BIO:"/store/bio",INSTITUCIONAL:"/store/institucional",CANCELLATION:"/store/cancellations"},s=(e,t="")=>{if(!e.response||!e.response.data)return{error:`${t}`};let r=e.response.data.result&&e.response.data.result.error||e.response.data.error||e.response.data.message;return{error:`${r}`}},u=class{static async get(e,t={}){return await i.get(e,{params:t})}static async post(e,t={}){return await i.post(e,t)}static async put(e,t={}){return await i.put(e,t)}static async patch(e,t={}){return await i.patch(e,t)}static async delete(e,t={}){return await i.delete(e,{data:t})}}},63524,e=>{"use strict";e.s(["default",()=>a]),e.i(86158);var t=e.i(61657);let r=new(e.i(99720)).default,a=class{static async updateGdprOptin(e,r){try{let a=await t.default.patch(`/customers/${e}/gdpr-optin/${r}`);if(200!==a.status)return{error:"Falha ao atualizar GDPR opt-in"};return a.data}catch(e){return(0,t.exception)(e,"Falha ao atualizar GDPR opt-in")}}static async getUser(e){try{let r=await t.default.get(`${t.URLS.CLIENT}/${e}`);if(200!==r.status)return{error:"Falha ao buscar usuário"};return r.data}catch(e){if(e?.response){let{status:t,data:r}=e?.response;return{status:t,error:r?.message||r?.error||"Erro ao obter usuário."}}return(0,t.exception)(e,"Falha ao obter usuario.")}}static async getUserByEmail(e){try{let r=await t.default.get(`${t.URLS.CLIENT}/${e}`);if(200!==r.status)return{error:"Falha ao buscar usuário"};return r.data}catch(e){if(e.response?.status===500||e.response?.status===403)return{status:e.response.status,error:e.response.data.message};return(0,t.exception)(e,"Falha ao obter usuario.")}}static async getAddress(e){try{let r=await t.default.get(`customers/${e}${t.URLS.ADDRESS}`);
1if(200!==r.status)return{error:"Falha ao buscar endereços"};return r.data}catch(e){return(0,t.exception)(e,"Falha ao buscar endereços")}}static async saveAddress(e,r){try{let a=await t.default.put(`customers/${e}${t.URLS.ADDRESS}`,r);if(200!==a.status)return(0,t.exception)(a,"Falha ao salvar endereço para o cliente");return a.data}catch(e){return(0,t.exception)(e,"Falha ao salvar endereço para o cliente")}}static async updateMainAddress(e,r){try{let a=await t.default.post(`customers/${e}/main_address`,r);if(200!==a.status)return(0,t.exception)(a,"Falha ao salvar endereço para o cliente");return a.data}catch(e){return(0,t.exception)(e,"Falha ao salvar endereço para o cliente")}}static async updateAddress(e,r){try{let a=await t.default.put(`customers/${e}/address`,r);if(200!==a.status)return(0,t.exception)(a,"Falha ao salvar endereço para o cliente");return a.data}catch(e){return(0,t.exception)(e,"Falha ao salvar endereço para o cliente")}}static async getAddressInfo(e){try{let r=await t.default.get(`${t.URLS.ZIPCODE}/${e}`);if(200!==r.status)return{error:"Falha ao obter endereço"};return r.data}catch(e){if(e.response?.status===500)return{status:e.response.status,error:e.response.data.message};return(0,t.exception)(e,"Falha ao adicionar produto.")}}static async deleteAddress(e,r){try{let a=await t.default.delete(`customers/${e}/address/${r}`);if(204!==a.status)return{error:"Falha ao deletar endereço"};return a.data}catch(e){return(0,t.exception)(e,"Erro ao deletar endereço")}}static async createNewUser(e){try{let r=await t.default.post(t.URLS.CLIENT,e);if(200!==r.status&&201!==r.status)return{status:r.status,error:"Falha ao criar usuário"};return r.data}catch(e){if(e.response?.status===409)return(0,t.exception)(e,"As credenciais já estão sendo utilizadas");if(e.response?.status===500)return(0,t.exception)(e,"Não foi possÃvel cadastrar o usuário, tente novamente. Caso o erro persista entre em contato com o suporte");return(0,t.exception)(e,"Falha ao cadastrar usuário")}}static async updateClient(e,r){try{let a=await t.default.put(`${t.URLS.CLIENT}/${e}`,r);if(200===a.status)return a.data;return{error:"Falha ao editar usuário"}}catch(e){if(500===e.response.status||400===e.response.status)return{status:e.response.status,error:e.response.data.message};return(0,t.exception)(e,"Erro ao editar cliente")}}static async updateSms(e,r){try{let a=await t.default.put(`mensage/${e}?sms=${r}`,r);if(200===a.status)return a.data;return{error:"Falhaa ao enviar status"}}catch(e){return(0,t.exception)(e,"Falha ao enviar status")}}static async validateEmail(e){try{await t.default.post(`${t.URLS.VALIDATEEMAIL}/${e}`)}catch(e){return(0,t.exception)(e,"Falha ao enviar e-mail.")}}static async validateCode(e,r){try{let a=await t.default.post(`${t.URLS.CLIENT}/${e}/verify/${r}`);if(200===a.status)return a;return{error:"Falha ao enviar código."}}catch(e){return(0,t.exception)(e,"Falha ao enviar código.")}}static async updatePassword(e,r){try{let a=await t.default.patch(`${t.URLS.CLIENT}/${e}${t.URLS.PASSWORD}`,r);if(204===a.status||200===a.status)return a.data;return{error:"Falha ao editar a senha"}}catch(e){if(500===e.response.status||400===e.response.status)return{status:e.response.status,error:e.response.data.message};if(409===e.response.status)return{status:e.response.status,error:"Senha atual incorreta."};return(0,t.exception)(e,"Erro ao editar a senha")}}static async checkToken(e){try{return(await t.default.get(`${t.URLS.RECOVERY_PASSWORD}/${e}`)).data}catch(e){return(0,t.exception)(e,"Erro ao validar o token")}}static async forgotPasswordNewPassword(e){try{let r=e.token?{token:e.token,newPassword:e.newPassword}:{email:e.email,codigo:e.codigo,newPassword:e.newPassword},a=await t.default.post(`${t.URLS.RECOVERY_PASSWORD}/redefinir`,r);if(200!==a.status)return{error:"Falha ao atualizar a senha"};return a.data}catch(r){let e=r?.response?.data?.mensagem;if(e)return(0,t.exception)("",e);if(r?.response?.status==417)return(0,t.exception)("","Código para alteração de senha inválido!");return(0,t.exception)(r,"Erro ao atualizar a senha")}}static async recoveryPasswordAccessCode(e){try{let r=await t.default.post(`${t.URLS.RECOVERY_PASSWORD}`,e);if(200!==r.status)return{error:"Falha ao obter informações"};return r.data}catch(e){if(e&&e.response&&404==e.response.status)return(0,t.exception)("","Email não encontrado");return(0,t.exception)(e,"Erro ao obter informações")}}static async getAllAddressByCustomer(e){try{let r=await t.default.get(`customers/${e}/address`);if(200!==r.status)return{error:"Falha ao buscar os endereços do usuário"};return r.data}catch(e){return(0,t.exception)(e,"Falha ao buscar os endereços do usuário")}}static async getAddressInfoNoAuth(e){try{let r=await t.default.get(`${t.URLS.ZIPCODESTORE}/${e}`);if(200!==r.status)return{error:"Falha ao obter endereço"};return r.data}catch(e){if(e.response?.status===500)return{status:e.response.status,error:e.response.data.message};return(0,t.exception)(e,"Falha ao adicionar produto.")}}static async saveCard(e,r){try{let a=await t.default.post(`customers/${r}/creditCard`,e);if(200===a.status||201===a.status)return a.data;return(0,t.exception)(a,"Cartão salvo com sucesso.")}catch(e){return(0,t.exception)(e,"Falha ao salvar cartão.")}}static async getCards(e){try{let r=await t.default.get(`customers/${e}/creditCard`);
1if(200===r.status)return r.data;return(0,t.exception)(r,"Falha ao buscar cartões.")}catch(e){return(0,t.exception)(e,"Falha ao buscar cartões.")}}static async deleteCard(e,r){try{return(await t.default.delete(`customers/${e}/creditCard/${r}`)).data}catch(e){return(0,t.exception)(e,"Falha ao remover cartão.")}}static async uploadUserPhoto(e,r){try{let a=new FormData;a.append("file",e);let n=await t.default.post(`customers/${r}/photo`,a);if(200===n.status)return n.data}catch(e){return(0,t.exception)(e,"Falha ao enviar foto.")}}static async uploadUserDocument(e,r){try{let a=new FormData;a.append("file",e);let n=await t.default.post(`customers/${r}/document`,a);if(200===n.status)return n.data}catch(e){return(0,t.exception)(e,"Erro no envio do documento.")}}static async uploadUserDocumentWithPhoto(e,r){try{let a=new FormData;a.append("file",e);let n=await t.default.post(`customers/${r}/documentWithPhoto`,a);if(200===n.status)return n.data}catch(e){return(0,t.exception)(e,"Erro no envio da foto segurando o documento .")}}static async postProfileCustomers(e,a){try{let n=await t.default.post(`profile/${a}`,e);if(200===n.status)return r.notifySuccess("Sucesso ao cadastrar perfil"),n.data;return r.notifyError("Erro ao cadastrar perfil"),(0,t.exception)(n,"Falha ao enviar perfil")}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async getProfileCustomers(e){try{let r=await t.default.get(`profile/${e}`);if(204===r.status)return{error:"Não há perfis"};if(200!==r.status)return{error:"Falha ao buscar perfil do usuário"};return r.data}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async deleteProfile(e){try{let a=await t.default.delete(`profile/${e}`);if(200!==a.status)return{error:"Falha ao buscar perfil do usuário"};return r.notifySuccess("Sucesso ao deletar perfil"),a.data}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async updateProfileCustomers(e,a){try{let n=await t.default.put(`profile/${e}`,a);if(200===n.status)return r.notifySuccess("Sucesso ao atualizar perfil"),n.data;return r.notifyError("Erro ao atualizar perfil"),(0,t.exception)(n,"Falha ao atualizar perfil")}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async getMotorcyclesCustomers(e){try{let r=await t.default.get(`motorcycle/${e}`);if(200!==r.status)return{error:"Falha ao buscar perfil do usuário"};return r.data}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async postMotorycleCustomer(e,a){try{let n=await t.default.post(`motorcycle/${e}`,a);if(200===n.status)return r.notifySuccess("Sucesso ao cadastrar perfil moto"),n.data;return(0,t.exception)(n,"Falha ao cadastrar moto")}catch(e){return(0,t.exception)(e,"Error inesperado")}}static async updateMotorcycleCustomer(e,a){try{let n=await t.default.put(`motorcycle/${e}`,a);if(200===n.status)return r.notifySuccess("Sucesso ao atualizar perfil moto"),n.data;return(0,t.exception)(n,"Erro ao atualizar moto")}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async deleteMotorcycleCustomer(e){try{let a=await t.default.delete(`motorcycle/${e}`);if(200===a.status)return r.notifySuccess("Sucesso ao deletar perfil moto"),a.data;return(0,t.exception)(a,"falha ao excluir moto")}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async postProductArrived(e,a){try{let r=await t.default.post(`product-arrived/${e}/${a}`);if(200===r.status)return r.data}catch(e){return r.notifyError("Erro inesperado"),(0,t.exception)(e,"Erro inesperado")}}static async postFavoriteProduct(e,a){try{let r=await t.default.post(`/favorite-product/${e}/${a}`);if(200===r.status)return r.data}catch(e){return r.notifyError("Erro ao favoritar produto"),(0,t.exception)(e,"Erro inesperado")}}static async getFavoriteProduct(e,r,a){try{let n=await t.default.get(`/favorite-product/customer/${e}/page?page=${r}&size=${a}`);if(200===n.status)return n.data;return{error:"Falha ao buscar usuário"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async getFavorite(e,r){try{let a=await t.default.get(`/favorite-product/customer/${e}/${r}`);if(200===a.status)return a.data;return{error:"Falha ao produto favorito"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async getArrived(e,r){try{let a=await t.default.get(`/product-arrived/${e}/${r}`);if(200===a.status)return a.data;return{error:"Falha ao produto favorito"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async getOrdersNotify(e,r,a){try{let n=await t.default.get(`/orders-notification/customers/${e}?size=${r}&page=${a}`);
1if(200===n.status)return n.data;return{error:"Falha ao produto favorito"}}catch(e){return(0,t.exception)(e,"Erro ao buscar notificações")}}static async readUpdate(e,r){try{let a=await t.default.patch(`/orders-notification/customers/${e}/${r}`);if(200===a.status)return a.data}catch(e){return(0,t.exception)(e,"Erro ao atualizar status")}}static async getIsRead(e){try{let r=await t.default.get(`/orders-notification/${e}/total`);if(200===r.status)return r.data}catch(e){return(0,t.exception)(e,"Erro ao puxar dados")}}static async getAllNotificationsUsers(e,r,a){try{let n=await t.default.get(`notifications/${a}?page=${e}&size=${r}`);if(200===n.status)return n.data;return{error:"Falha ao buscar notificações"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async readNotification(e,r){try{let a=await t.default.patch(`notifications/${e}/${r}`);if(200===a.status)return a.data;return{error:"Falha ao ler notificação"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async getNotificationPromotion(e,r,a){try{let n=await t.default.get(`promotion-notification/${e}?page=${a}&size=${r}`);if(200===n.status)return n.data;return{error:"Falha ao buscar notificações"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async readNotificationPromotion(e,r){try{let a=await t.default.patch(`promotion-notification/read-notification/${e}/${r}`);if(200===a.status)return a.data;return{error:"Falha ao ler notificação"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async getTotalNotifications(e){try{let r=await t.default.get(`/notifications/getTotalNotifications/${e}`);if(200===r.status)return r.data;return{error:"Falha ao buscar notificações "}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async notificationIsOpen(e,r){try{let a=await t.default.patch(`/notifications/open/${e}/${r}`);if(200===a.status)return a.data;return{error:"Notificação não foi aberta"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async showNotification(e,r){try{let a=await t.default.patch(`/notifications/show-notification/${e}/${r}`);if(200===a.status)return a.data;return{error:"Não foi possÃvel remover notificação"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async refreshOpenListNotificationPromotion(e,r){try{let a=await t.default.post(`/promotion-notification/saveNotificationWhenOpen/${e}`,r);if(200===a.status)return a.data;return{error:"Não foi possÃvel atualziar as notificações"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async refreshOpenListNotificationsOthers(e,r){try{let a=await t.default.post(`/notifications/saveNotificationWhenOpen/${e}`,r);if(200===a.status)return a.data;return{error:"Não foi possÃvel atualizar as notificações"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async refreshOpenNotificationOrders(e){try{let r=await t.default.patch(`/orders-notification/saveNotificationWhenOpen/${e}`);if(200===r.status)return r.data;return{error:"Não foi possÃvel atualizar as notificações"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async getAllNotificationsTypes(e){try{let r=await t.default.get(`/notifications/getNotifications/${e}`);if(200===r.status)return r.data;return{error:"Não foi possÃvel buscar as notificações"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async readNotificationWhenNotOpenedPromotion(e,r){try{let a=await t.default.post(`/promotion-notification/readNotificationWhenNotOpened/${e}/${r}`);if(200===a.status)return a.data;return{error:"Não foi possÃvel atualizar as notificações"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async readNotificationWhenNotOpened(e,r){try{let a=await t.default.post(`/notifications/readNotificationWhenNotOpened/${e}/${r}`);if(200===a.status)return a.data;return{error:"Não foi possÃvel atualizar as notificações"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}static async getShippingRulesByZipCode(e){try{let r=await t.default.get(`/store/shipping-rules/${e}`);if(200===r.status)return r.data;if(204===r.status)return[];return{error:"Não foi possÃvel atualizar as notificações"}}catch(e){return(0,t.exception)(e,"Erro inesperado")}}}},97830,e=>{"use strict";e.s(["fetchUser",()=>u,"getSessionUser",()=>o,"setSessionUser",()=>s,"userSessionQueryKey",()=>i]);var t=e.i(86158),r=e.i(76042),a=e.i(63524),n=e.i(11912);let i=["user","session"];function o(){return(0,n.getQueryClient)().getQueryData(i)??null}function s(e){(0,n.getQueryClient)().setQueryData(i,e??null)}async function u(n){if(n||(n=o()?.user?.username),!n)return{error:!0};let i=await a.default.getUser(n);if(!i.error){t.default.setItem(t.KEYS.USER_INFO,JSON.stringify(i.uuid)),t.default.setItem(t.KEYS.SHIPPING_RULES,JSON.stringify(i?.shippingRules));let e=new r.default(i);return s(e),e}if(i?.error||403===i.status||404===i.status){let{logout:t}=await e.A(94239);await t()}return i}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.