PageSourceSearch

https://tidmo.com.br/_next/static/chunks/2bdug0cjlrk2x.js

js tidmo.com.br collected 2026-09-24 13:55:37 UTC 106,389 bytes, 5 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="54948817-1c27-fe09-5da4-b70ed2cde6da")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,929717,e=>{"use strict";var t=e.i(783222),r=e.i(433336),n=e.i(394487),a=e.i(255743),i=e.i(601893),s=e.i(700020);let o=(0,s.forwardRefWithAs)(function(e,o){var l;let c=(0,i.useDisabled)(),{disabled:u=c||!1,autoFocus:d=!1,...h}=e,{isFocusVisible:p,focusProps:f}=(0,t.useFocusRing)({autoFocus:d}),{isHovered:m,hoverProps:y}=(0,r.useHover)({isDisabled:u}),{pressed:v,pressProps:b}=(0,n.useActivePress)({disabled:u}),g=(0,s.mergeProps)({ref:o,type:null!=(l=h.type)?l:"button",disabled:u||void 0,autoFocus:d},f,y,b),w=(0,a.useSlot)({disabled:u,hover:m,focus:p,active:v,autofocus:d});return(0,s.useRender)()({ourProps:g,theirProps:h,slot:w,defaultTag:"button",name:"Button"})});e.s(["Button",0,o])},476481,e=>{"use strict";var t=e.i(783222),r=e.i(433336),n=e.i(271645),a=e.i(394487),i=e.i(255743),s=e.i(700020);let o=n.Fragment,l=(0,s.forwardRefWithAs)(function(e,n){let{...l}=e,{isFocusVisible:c,focusProps:u}=(0,t.useFocusRing)(),{isHovered:d,hoverProps:h}=(0,r.useHover)({isDisabled:!1}),{pressed:p,pressProps:f}=(0,a.useActivePress)({disabled:!1}),m=(0,s.mergeProps)({ref:n},u,h,f),y=(0,i.useSlot)({hover:d,focus:c,active:p});return(0,s.useRender)()({ourProps:m,theirProps:l,slot:y,defaultTag:o,name:"DataInteractive"})});e.s(["DataInteractive",0,l])},273911,e=>{"use strict";let t;var r=e.i(619273),n=(t=()=>r.isServer,{isServer:()=>t(),setIsServer(e){t=e}});e.s(["environmentManager",0,n])},175555,915823,e=>{"use strict";var t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};e.s(["Subscribable",0,t],915823);var r=new class extends t{#e;#t;#r;constructor(){super(),this.#r=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",0,r],175555)},540143,e=>{"use strict";let t,r,n,a,i,s;var o=e.i(180166).systemSetTimeoutZero,l=(t=[],r=0,n=e=>{e()},a=e=>{e()},i=o,{batch:e=>{let s;r++;try{s=e()}finally{let e;--r||(e=t,t=[],e.length&&i(()=>{a(()=>{e.forEach(e=>{n(e)})})}))}return s},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s=e=>{r?t.push(e):i(()=>{n(e)})},setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{a=e},setScheduler:e=>{i=e}});e.s(["notifyManager",0,l])},814448,793803,e=>{"use strict";var t=e.i(915823),r=new class extends t.Subscribable{#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};e.s(["onlineManager",0,r],814448),e.i(619273),e.s(["pendingThenable",0,function(){let e,t,r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}],793803)},286491,992571,e=>{"use strict";var t=e.i(619273),r=e.i(540143),n=e.i(936553),a=e.i(88587);function i(e){return{onFetch:(r,n)=>
2{let a=r.options,i=r.fetchOptions?.meta?.fetchMore?.direction,l=r.state.data?.pages||[],c=r.state.data?.pageParams||[],u={pages:[],pageParams:[]},d=0,h=async()=>{let n=!1,h=(0,t.ensureQueryFn)(r.options,r.fetchOptions),p=async(e,a,i)=>{let s;if(n)return Promise.reject(r.signal.reason);if(null==a&&e.pages.length)return Promise.resolve(e);let o=(s={client:r.client,queryKey:r.queryKey,pageParam:a,direction:i?"backward":"forward",meta:r.options.meta},(0,t.addConsumeAwareSignal)(s,()=>r.signal,()=>n=!0),s),l=await h(o),{maxPages:c}=r.options,u=i?t.addToStart:t.addToEnd;return{pages:u(e.pages,l,c),pageParams:u(e.pageParams,a,c)}};if(i&&l.length){let e="backward"===i,t={pages:l,pageParams:c},r=(e?o:s)(a,t);u=await p(t,r,e)}else{let t=e??l.length;do{let e=0===d?c[0]??a.initialPageParam:s(a,u);if(d>0&&null==e)break;u=await p(u,e),d++}while(d<t)}return u};r.options.persister?r.fetchFn=()=>r.options.persister?.(h,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},n):r.fetchFn=h}}}function s(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function o(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}e.s(["hasNextPage",0,function(e,t){return!!t&&null!=s(e,t)},"hasPreviousPage",0,function(e,t){return!!t&&!!e.getPreviousPageParam&&null!=o(e,t)},"infiniteQueryBehavior",0,i],992571);var l=class extends a.Removable{#a;#i;#s;#o;#l;#c;#u;#d;constructor(e){super(),this.#d=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#l=e.client,this.#o=this.#l.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#i=d(this.options),this.state=e.state??this.#i,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#a}get promise(){return this.#c?.promise}setOptions(e){if(this.options={...this.#u,...e},e?._type&&(this.#a=e._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=d(this.options);void 0!==e.data&&(this.setState(u(e.data,e.dataUpdatedAt)),this.#i=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#o.remove(this)}setData(e,r){let n=(0,t.replaceData)(this.state.data,e,this.options);return this.#h({data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(e){this.#h({type:"setState",state:e})}cancel(e){let r=this.#c?.promise;return this.#c?.cancel(e),r?r.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#i}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveQueryBoolean)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#c&&(this.#d||this.#p()?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#p(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#h({type:"invalidate"})}async fetch(e,r){let a;if("idle"!==this.state.fetchStatus&&this.#c?.status()!=="rejected"){if(void 0!==this.state.data&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let s=new AbortController,o=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#d=!0,s.signal)}
2)},l=()=>{let e,n=(0,t.ensureQueryFn)(this.options,r),a=(o(e={client:this.#l,queryKey:this.queryKey,meta:this.meta}),e);return(this.#d=!1,this.options.persister)?this.options.persister(n,a,this):n(a)},c=(o(a={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:l}),a),u="infinite"===this.#a?i(this.options.pages):this.options.behavior;u?.onFetch(c,this),this.#s=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#h({type:"fetch",meta:c.fetchOptions?.meta}),this.#c=(0,n.createRetryer)({initialPromise:r?.initialPromise,fn:c.fetchFn,onCancel:e=>{e instanceof n.CancelledError&&e.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{let e=await this.#c.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#o.config.onSuccess?.(e,this),this.#o.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof n.CancelledError){if(e.silent)return this.#c.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#h({type:"error",error:e}),this.#o.config.onError?.(e,this),this.#o.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#h(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...c(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...u(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=e.manual?r:void 0,r;case"error":let n=e.error;return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#o.notify({query:this,type:"updated",action:e})})}};function c(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,n.canFetch)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function u(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function d(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",0,l,"fetchState",0,c],286491)},869230,e=>{"use strict";var t=e.i(175555),r=e.i(273911),n=e.i(540143),a=e.i(286491),i=e.i(915823),s=e.i(793803),o=e.i(619273),l=e.i(180166),c=class extends i.Subscribable{constructor(e,t){super(),this.options=t,this.#l=e,this.#f=null,this.#m=(0,s.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#l;#y=void 0;#v=void 0;#b=void 0;#g;#w;#m;#f;#S;#A;#T;#C;#R;#E;#k=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#y.addObserver(this),u(this.#y,this.options)?this.#x():this.updateResult(),this.#D())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#y,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#y,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#P(),this.#M(),this.#y.removeObserver(this)}setOptions(e){let t=this.options,r=this.#y;if(this.options=this.#l.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveQueryBoolean)(this.options.enabled,this.#y))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#y.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#l.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#y,observer:this});let n=this.hasListeners();n&&h(this.#y,r,this.options,t)&&this.#x(),this.updateResult(),n&&(this.#y!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#y)!==(0,o.resolveQueryBoolean)(t.enabled,this.#y)||(0,o.resolveStaleTime)(this.options.staleTime,this.#y)!==(0,o.resolveStaleTime)(t.staleTime,this.#y))&&this.#I();let a=this.#N();n&&(this.#y!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#y)!==(0,o.resolveQueryBoolean)(t.enabled,this.#y)||a!==this.#E)&&this.#j(a)}getOptimisticResult(e){var t,r;let n=this.#l.getQueryCache().build(this.#l,e),a=this.createResult(n,e);return t=this,r=a,(0,o.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#b=a,this.#w=this.options,this.#g=this.#y.state),a}getCurrentResult(){return this.#b}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.#m.status||this.#m.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#k.add(e)}getCurrentQuery(){return this.#y}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#l.defaultQueryOptions(e),r=this.#l.getQueryCache().build(this.#l,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#x({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#b))}#x(e){this.#O();let t=this.#y.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#I(){this.#P();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#y);if(r.environmentManager.isServer()||this.#b.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#b.dataUpdatedAt,e);this.#C=l.timeoutManager.setTimeout(()=>{this.#b.isStale||this.updateResult()},t+1)}#N(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#y):this.options.refetchInterval)??!1}#j(e){this.#M(),this.#E=e,!r.environmentManager.isServer()&&!1!==(0,o.resolveQueryBoolean)(this.options.enabled,this.#y)&&(0,o.isValidTimeout)(this.#E)&&0!==this.#E&&(this.#R=l.timeoutManager.setInterval(()=>
2{(this.options.refetchIntervalInBackground||t.focusManager.isFocused())&&this.#x()},this.#E))}#D(){this.#I(),this.#j(this.#N())}#P(){void 0!==this.#C&&(l.timeoutManager.clearTimeout(this.#C),this.#C=void 0)}#M(){void 0!==this.#R&&(l.timeoutManager.clearInterval(this.#R),this.#R=void 0)}createResult(e,t){let r,n=this.#y,i=this.options,l=this.#b,c=this.#g,d=this.#w,f=e!==n?e.state:this.#v,{state:m}=e,y={...m},v=!1;if(t._optimisticResults){let r=this.hasListeners(),s=!r&&u(e,t),o=r&&h(e,n,t,i);(s||o)&&(y={...y,...(0,a.fetchState)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(y.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:w}=y;r=y.data;let S=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===w){let e;l?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(e=l.data,S=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#T?.state.data,this.#T):t.placeholderData,void 0!==e&&(w="success",r=(0,o.replaceData)(l?.data,e,t),v=!0)}if(t.select&&void 0!==r&&!S)if(l&&r===c?.data&&t.select===this.#S)r=this.#A;else try{this.#S=t.select,r=t.select(r),r=(0,o.replaceData)(l?.data,r,t),this.#A=r,this.#f=null}catch(e){this.#f=e}this.#f&&(b=this.#f,r=this.#A,g=Date.now(),w="error");let A="fetching"===y.fetchStatus,T="pending"===w,C="error"===w,R=T&&A,E=void 0!==r,k={status:w,fetchStatus:y.fetchStatus,isPending:T,isSuccess:"success"===w,isError:C,isInitialLoading:R,isLoading:R,data:r,dataUpdatedAt:y.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:y.dataUpdateCount>f.dataUpdateCount||y.errorUpdateCount>f.errorUpdateCount,isFetching:A,isRefetching:A&&!T,isLoadingError:C&&!E,isPaused:"paused"===y.fetchStatus,isPlaceholderData:v,isRefetchError:C&&E,isStale:p(e,t),refetch:this.refetch,promise:this.#m,isEnabled:!1!==(0,o.resolveQueryBoolean)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==k.data,r="error"===k.status&&!t,a=e=>{r?e.reject(k.error):t&&e.resolve(k.data)},i=()=>{a(this.#m=k.promise=(0,s.pendingThenable)())},o=this.#m;switch(o.status){case"pending":e.queryHash===n.queryHash&&a(o);break;case"fulfilled":(r||k.data!==o.value)&&i();break;case"rejected":r&&k.error===o.reason||i()}}return k}updateResult(){let e=this.#b,t=this.createResult(this.#y,this.options);if(this.#g=this.#y.state,this.#w=this.options,void 0!==this.#g.data&&(this.#T=this.#y),(0,o.shallowEqualObjects)(t,e))return;this.#b=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#k.size)return!0;let n=new Set(r??this.#k);return this.options.throwOnError&&n.add("error"),Object.keys(this.#b).some(t=>this.#b[t]!==e[t]&&n.has(t))};this.#F({listeners:r()})}#O(){let e=this.#l.getQueryCache().build(this.#l,this.options);if(e===this.#y)return;let t=this.#y;this.#y=e,this.#v=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#D()}#F(e){n.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#b)}),this.#l.getQueryCache().notify({query:this.#y,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,o.resolveQueryBoolean)(t.retryOnMount,e))||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&p(e,t)}return!1}function h(e,t,r,n){return(e!==t||!1===(0,o.resolveQueryBoolean)(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&p(e,r)}function p(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",0,c])},88587,e=>{"use strict";var t=e.i(180166),r=e.i(273911),n=e.i(619273),a=class{#q;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.isValidTimeout)(this.gcTime)&&(this.#q=t.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(r.environmentManager.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#q&&(t.timeoutManager.clearTimeout(this.#q),this.#q=void 0)}};e.s(["Removable",0,a])},936553,e=>{"use strict";var t=e.i(175555),r=e.i(814448),n=e.i(793803),a=e.i(273911),i=e.i(619273);function s(e){return Math.min(1e3*2**e,3e4)}function o(e){return(e??"online")!=="online"||r.onlineManager.isOnline()}
2var l=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};e.s(["CancelledError",0,l,"canFetch",0,o,"createRetryer",0,function(e){let c,u=!1,d=0,h=(0,n.pendingThenable)(),p=()=>t.focusManager.isFocused()&&("always"===e.networkMode||r.onlineManager.isOnline())&&e.canRun(),f=()=>o(e.networkMode)&&e.canRun(),m=e=>{"pending"===h.status&&(c?.(),h.resolve(e))},y=e=>{"pending"===h.status&&(c?.(),h.reject(e))},v=()=>new Promise(t=>{c=e=>{("pending"!==h.status||p())&&t(e)},e.onPause?.()}).then(()=>{c=void 0,"pending"===h.status&&e.onContinue?.()}),b=()=>{let t;if("pending"!==h.status)return;let r=0===d?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(m).catch(t=>{if("pending"!==h.status)return;let r=e.retry??3*!a.environmentManager.isServer(),n=e.retryDelay??s,o="function"==typeof n?n(d,t):n,l=!0===r||"number"==typeof r&&d<r||"function"==typeof r&&r(d,t);u||!l?y(t):(d++,e.onFail?.(d,t),(0,i.sleep)(o).then(()=>p()?void 0:v()).then(()=>{u?y(t):b()}))})};return{promise:h,status:()=>h.status,cancel:t=>{if("pending"===h.status){let r=new l(t);y(r),e.onCancel?.(r)}},continue:()=>(c?.(),h),cancelRetry:()=>{u=!0},continueRetry:()=>{u=!1},canStart:f,start:()=>(f()?b():v().then(b),h)}}])},180166,e=>{"use strict";var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#U=t;
2#z=!1;setTimeoutProvider(e){this.#U=e}setTimeout(e,t){return this.#U.setTimeout(e,t)}clearTimeout(e){this.#U.clearTimeout(e)}setInterval(e,t){return this.#U.setInterval(e,t)}clearInterval(e){this.#U.clearInterval(e)}};e.s(["systemSetTimeoutZero",0,function(e){setTimeout(e,0)},"timeoutManager",0,r])},619273,e=>{"use strict";var t=e.i(180166),r="u"<typeof window||"Deno"in globalThis;function n(e,t){return(t?.queryKeyHashFn||a)(e)}function a(e){return JSON.stringify(e,(e,t)=>c(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function i(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(Array.isArray(e)&&Array.isArray(t)){for(let r=0;r<t.length;r++)if(!i(e[r],t[r]))return!1;return!0}for(let r of Object.keys(t))if(!i(e[r],t[r]))return!1;return!0}return!1}var s=Object.prototype.hasOwnProperty;function o(e,t,r=0){if(e===t)return e;if(r>500)return t;let n=l(e)&&l(t);if(!n&&!(c(e)&&c(t)))return t;let a=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),u=i.length,d=n?Array(u):{},h=0;for(let l=0;l<u;l++){let c=n?l:i[l],u=e[c],p=t[c];if(u===p){d[c]=u,(n?l<a:s.call(e,c))&&h++;continue}if(null===u||null===p||"object"!=typeof u||"object"!=typeof p){d[c]=p;continue}let f=o(u,p,r+1);d[c]=f,f===u&&h++}return a===u&&h===a?e:d}function l(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function c(e){if(!u(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!u(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function u(e){return"[object Object]"===Object.prototype.toString.call(e)}var d=Symbol();e.s(["addConsumeAwareSignal",0,function(e,t,r){let n,a=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??=t(),a||(a=!0,n.aborted?r():n.addEventListener("abort",r,{once:!0})),n)}),e},"addToEnd",0,function(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n},"addToStart",0,function(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n},"ensureQueryFn",0,function(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==d?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))},"functionalUpdate",0,function(e,t){return"function"==typeof e?e(t):e},"hashKey",0,a,"hashQueryKeyByOptions",0,n,"isServer",0,r,"isValidTimeout",0,function(e){return"number"==typeof e&&e>=0&&e!==1/0},"matchMutation",0,function(e,t){let{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(a(t.options.mutationKey)!==a(o))return!1}else if(!i(t.options.mutationKey,o))return!1}return(!n||t.state.status===n)&&(!s||!!s(t))},"matchQuery",0,function(e,t){let{type:r="all",exact:a,fetchStatus:s,predicate:o,queryKey:l,stale:c}=e;if(l){if(a){if(t.queryHash!==n(l,t.options))return!1}else if(!i(t.queryKey,l))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof c||t.isStale()===c)&&(!s||s===t.state.fetchStatus)&&(!o||!!o(t))},"noop",0,function(){},"partialMatchKey",0,i,"replaceData",0,function(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?o(e,t):t},"replaceEqualDeep",0,o,"resolveQueryBoolean",0,function(e,t){return"function"==typeof e?e(t):e},"resolveStaleTime",0,function(e,t){return"function"==typeof e?e(t):e},"shallowEqualObjects",0,function(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0},"shouldThrowError",0,function(e,t){return"function"==typeof e?e(...t):!!e},"skipToken",0,d,"sleep",0,function(e){return new Promise(r=>{t.timeoutManager.setTimeout(r,e)})},"timeUntilStale",0,function(e,t){return Math.max(e+(t||0)-Date.now(),0)}])},912598,e=>{"use strict";var t=e.i(271645),r=e.i(843476),n=t.createContext(void 0);e.s(["QueryClientProvider",0,({client:e,children:a})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(n.Provider,{value:e,children:a})),"useQueryClient",0,e=>{let r=t.useContext(n);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r}])},266027,673664,427001,381384,254440,469637,e=>{"use strict";let t;var r=e.i(869230),n=e.i(271645),a=e.i(273911),i=e.i(619273),s=e.i(540143),o=e.i(912598);e.i(843476);var l=n.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),c=()=>n.useContext(l);e.s(["useQueryErrorResetBoundary",0,c],673664);var u=(e,t,r)=>{let n=r?.state.error&&"function"==typeof e.throwOnError?(0,i.shouldThrowError)(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&!t.isReset()&&(e.retryOn
2Mount=!1)},d=e=>{n.useEffect(()=>{e.clearReset()},[e])},h=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&void 0===e.data||(0,i.shouldThrowError)(r,[e.error,n]));e.s(["ensurePreventErrorBoundaryRetry",0,u,"getHasError",0,h,"useClearResetErrorBoundary",0,d],427001);var p=n.createContext(!1),f=()=>n.useContext(p);p.Provider,e.s(["useIsRestoring",0,f],381384);var m=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},y=(e,t)=>e.isLoading&&e.isFetching&&!t,v=(e,t)=>e?.suspense&&t.isPending,b=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function g(e,t,r){let l=f(),p=c(),g=(0,o.useQueryClient)(r),w=g.defaultQueryOptions(e);g.getDefaultOptions().queries?._experimental_beforeQuery?.(w);let S=g.getQueryCache().get(w.queryHash),A=!1!==e.subscribed;w._optimisticResults=l?"isRestoring":A?"optimistic":void 0,m(w),u(w,p,S),d(p);let T=!g.getQueryCache().get(w.queryHash),[C]=n.useState(()=>new t(g,w)),R=C.getOptimisticResult(w),E=!l&&A;if(n.useSyncExternalStore(n.useCallback(e=>{let t=E?C.subscribe(s.notifyManager.batchCalls(e)):i.noop;return C.updateResult(),t},[C,E]),()=>C.getCurrentResult(),()=>C.getCurrentResult()),n.useEffect(()=>{C.setOptions(w)},[w,C]),v(w,R))throw b(w,C,p);if(h({result:R,errorResetBoundary:p,throwOnError:w.throwOnError,query:S,suspense:w.suspense}))throw R.error;if(g.getDefaultOptions().queries?._experimental_afterQuery?.(w,R),w.experimental_prefetchInRender&&!a.environmentManager.isServer()&&y(R,l)){let e=T?b(w,C,p):S?.promise;e?.catch(i.noop).finally(()=>{C.updateResult()})}return w.notifyOnChangeProps?R:C.trackResult(R)}e.s(["ensureSuspenseTimers",0,m,"fetchOptimistic",0,b,"shouldSuspend",0,v,"willFetch",0,y],254440),e.s(["useBaseQuery",0,g],469637),e.s(["useQuery",0,function(e,t){return g(e,r.QueryObserver,t)}],266027)},339417,585310,e=>{"use strict";var t=e.i(843476),r=e.i(500932),n=e.i(929717),a=e.i(207670),i=e.i(271645),s=e.i(818673),o=e.i(476481),l=e.i(522016);let c=(0,i.forwardRef)(function(e,n){let a,i=(0,r.c)(3);return i[0]!==e||i[1]!==n?(a=(0,t.jsx)(o.DataInteractive,{children:(0,t.jsx)(l.default,{...e,ref:n})}),i[0]=e,i[1]=n,i[2]=a):a=i[2],a});e.s(["Link",0,c],585310);let u=["relative isolate inline-flex items-baseline justify-center gap-x-2 rounded-lg border font-semibold","focus:not-data-focus:outline-hidden data-focus:outline-2 data-focus:outline-offset-2 data-focus:outline-blue-500","data-disabled:opacity-50","*:data-[slot=icon]:shrink-0 *:data-[slot=icon]:self-center *:data-[slot=icon]:text-(--btn-icon) forced-colors:[--btn-icon:ButtonText] forced-colors:data-hover:[--btn-icon:ButtonText]"],d={md:["px-[calc(--spacing(3.5)-1px)] py-[calc(--spacing(2.5)-1px)] text-base/6 sm:px-[calc(--spacing(3)-1px)] sm:py-[calc(--spacing(1.5)-1px)] sm:text-sm/6","*:data-[slot=icon]:-mx-0.5 *:data-[slot=icon]:my-0.5 *:data-[slot=icon]:size-5 sm:*:data-[slot=icon]:my-1 sm:*:data-[slot=icon]:size-4"],sm:["px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1.5)-1px)] text-xs/5 sm:px-[calc(--spacing(2)-1px)] sm:py-[calc(--spacing(1)-1px)]","*:data-[slot=icon]:size-4 sm:*:data-[slot=icon]:size-3.5"]},h=["border-transparent bg-(--btn-border)","before:absolute before:inset-0 before:-z-10 before:rounded-[calc(var(--radius-lg)-1px)] before:bg-(--btn-bg)","before:shadow-sm","after:absolute after:inset-0 after:-z-10 after:rounded-[calc(var(--radius-lg)-1px)]","after:shadow-[inset_0_1px_--theme(--color-white/15%)]","data-active:after:bg-(--btn-hover-overlay) data-hover:after:bg-(--btn-hover-overlay)","data-disabled:before:shadow-none data-disabled:after:shadow-none"],p=["border-zinc-950/10 text-zinc-950 data-active:bg-zinc-50 data-hover:bg-zinc-50","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)]"],f=["border-transparent text-zinc-950 data-active:bg-zinc-950/5 data-hover:bg-zinc-950/5","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)]"],m={"dark/zinc":["border-current text-zinc-900 data-active:bg-zinc-950/5 data-hover:bg-zinc-950/5","[--btn-icon:currentColor]"],light:["border-current text-zinc-950 data-active:bg-zinc-950/5 data-hover:bg-zinc-950/5","[--btn-icon:currentColor]"],"dark/white":["border-current text-zinc-900 data-active:bg-zinc-950/5 data-hover:bg-zinc-950/5","[--btn-icon:currentColor]"],dark:["border-current text-zinc-900 data-active:bg-zinc-950/5 data-hover:bg-zinc-950/5","[--btn-icon:currentColor]"],white:["border-current text-white data-active:bg-white/10 data-hover:bg-white/10","[--btn-icon:currentColor]"],zinc:["border-current text-zinc-600 data-active:bg-zinc-50 data-hover:bg-zinc-50","[--btn-icon:currentColor]"],indigo:["border-current text-indigo-600 data-active:bg-indigo-50 data-hover:bg-indigo-50","[--btn-icon:currentColor]"],cyan:["border-current text-cyan-600 data-active:bg-cyan-50 data-hover:bg-cyan-50","[--btn-icon:currentColor]"],red:["border-current text-red-600 data-active:bg-red-50 data-hover:bg-red-50","[--btn-icon:currentColor]"],orange:["border-current text-orange-600 data-active:bg-orange-50 data-hover:bg-orange-50","[--btn-icon:currentColor]"],amber:["border-current text-amber-600 data-active:bg-amber-50 data-hover:bg-amber-50","[--btn-icon:currentColor]"],yellow:["border-current text-yellow-600 data-active:bg-yellow-50 data-hover:bg-yellow-50","[--btn-icon:currentColor]"],lime:["border-current text-lime-600 data-active:bg-lime-50 data-hover:bg-lime-50","[--btn-icon:currentColor]"],green:["border-current text-green-600 data-active:bg-green-50 data-hover:bg-green-50","[--btn-icon:currentColor]"],emerald:["border-current text-emerald-600 data-active:bg-emerald-50 data-hover:bg-emerald-50","[--btn-icon:currentColor]"],teal:["border-current text-teal-600 data-active:bg-teal-50 data-hover:bg-teal-50","[--btn-icon:currentColor]"],sky:["border-current text-sky-500 data-active:bg-sky-50 data-hover:text-white data-hover:bg-sky-500","[--btn-icon:currentColor]"],azure:["border-current text-azure-600 data-active:bg-azure-50 data-hover:bg-azure-50","[--btn-icon:currentColor]"],blue:["border-current text-blue-600 data-active:bg-blue-50 data-hover:bg-blue-50","[--btn-icon:currentColor]"],violet:["border-current text-violet-600 data-active:bg-violet-50 data-hover:bg-violet-50","[--btn-icon:currentColor]"],purple:["border-current text-purple-600 data-active:bg-purple-50 data-hover:bg-purple-50","[--btn-icon:currentColor]"],fuchsia:["border-current text-fuchsia-600 data-active:bg-fuchsia-50 data-hover:bg-fuchsia-50","[--btn-icon:currentColor]"],pink:["border-current text-pink-600 data-active:bg-pink-50 data-hover:bg-pink-50","[--btn-icon:currentColor]"],rose:["border-current text-rose-600 data-active:bg-rose-50 data-hover:bg-rose-50","[--btn-icon:currentColor]"]}
2,y={"dark/zinc":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],light:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","[--btn-icon:var(--color-zinc-500)] data-active:[--btn-icon:var(--color-zinc-700)] data-hover:[--btn-icon:var(--color-zinc-700)]"],"dark/white":["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],dark:["text-white [--btn-bg:var(--color-zinc-900)] [--btn-border:var(--color-zinc-950)]/90 [--btn-hover-overlay:var(--color-white)]/10","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],white:["text-zinc-950 [--btn-bg:white] [--btn-border:var(--color-zinc-950)]/10 [--btn-hover-overlay:var(--color-zinc-950)]/2.5 data-active:[--btn-border:var(--color-zinc-950)]/15 data-hover:[--btn-border:var(--color-zinc-950)]/15","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-500)] data-hover:[--btn-icon:var(--color-zinc-500)]"],zinc:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-zinc-600)] [--btn-border:var(--color-zinc-700)]/90","[--btn-icon:var(--color-zinc-400)] data-active:[--btn-icon:var(--color-zinc-300)] data-hover:[--btn-icon:var(--color-zinc-300)]"],indigo:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-indigo-500)] [--btn-border:var(--color-indigo-600)]/90","[--btn-icon:var(--color-indigo-300)] data-active:[--btn-icon:var(--color-indigo-200)] data-hover:[--btn-icon:var(--color-indigo-200)]"],cyan:["text-cyan-950 [--btn-bg:var(--color-cyan-300)] [--btn-border:var(--color-cyan-400)]/80 [--btn-hover-overlay:var(--color-white)]/25","[--btn-icon:var(--color-cyan-500)]"],red:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-red-600)] [--btn-border:var(--color-red-700)]/90","[--btn-icon:var(--color-red-300)] data-active:[--btn-icon:var(--color-red-200)] data-hover:[--btn-icon:var(--color-red-200)]"],orange:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-orange-500)] [--btn-border:var(--color-orange-600)]/90","[--btn-icon:var(--color-orange-300)] data-active:[--btn-icon:var(--color-orange-200)] data-hover:[--btn-icon:var(--color-orange-200)]"],amber:["text-amber-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-amber-400)] [--btn-border:var(--color-amber-500)]/80","[--btn-icon:var(--color-amber-600)]"],yellow:["text-yellow-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-yellow-300)] [--btn-border:var(--color-yellow-400)]/80","[--btn-icon:var(--color-yellow-600)] data-active:[--btn-icon:var(--color-yellow-700)] data-hover:[--btn-icon:var(--color-yellow-700)]"],lime:["text-lime-950 [--btn-hover-overlay:var(--color-white)]/25 [--btn-bg:var(--color-lime-300)] [--btn-border:var(--color-lime-400)]/80","[--btn-icon:var(--color-lime-600)] data-active:[--btn-icon:var(--color-lime-700)] data-hover:[--btn-icon:var(--color-lime-700)]"],green:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-green-600)] [--btn-border:var(--color-green-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],emerald:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-emerald-600)] [--btn-border:var(--color-emerald-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],teal:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-teal-600)] [--btn-border:var(--color-teal-700)]/90","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],sky:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-sky-500)] [--btn-border:var(--color-sky-600)]/80","[--btn-icon:var(--color-white)]/60 data-active:[--btn-icon:var(--color-white)]/80 data-hover:[--btn-icon:var(--color-white)]/80"],azure:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-azure-600)] [--btn-border:var(--color-azure-700)]/90","[--btn-icon:var(--color-azure-400)] data-active:[--btn-icon:var(--color-azure-300)] data-hover:[--btn-icon:var(--color-azure-300)]"],blue:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-blue-600)] [--btn-border:var(--color-blue-700)]/90","[--btn-icon:var(--color-blue-400)] data-active:[--btn-icon:var(--color-blue-300)] data-hover:[--btn-icon:var(--color-blue-300)]"],violet:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-violet-500)] [--btn-border:var(--color-violet-600)]/90","[--btn-icon:var(--color-violet-300)] data-active:[--btn-icon:var(--color-violet-200)] data-hover:[--btn-icon:var(--color-violet-200)]"],purple:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-purple-500)] [--btn-border:var(--color-purple-600)]/90","[--btn-icon:var(--color-purple-300)] data-active:[--btn-icon:var(--color-purple-200)] data-hover:[--btn-icon:var(--color-purple-200)]"],fuchsia:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-fuchsia-500)] [--btn-border:var(--color-fuchsia-600)]/90","[--btn-icon:var(--color-fuchsia-300)] data-active:[--btn-icon:var(--color-fuchsia-200)] data-hover:[--btn-icon:var(--color-fuchsia-200)]"],pink:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-pink-500)] [--btn-border:var(--color-pink-600)]/90","[--btn-icon:var(--color-pink-300)] data-active:[--btn-icon:var(--color-pink-200)] data-hover:[--btn-icon:var(--color-pink-200)]"],rose:["text-white [--btn-hover-overlay:var(--color-white)]/10 [--btn-bg:var(--color-rose-500)] [--btn-border:var(--color-rose-600)]/90","[--btn-icon:var(--color-rose-300)] data-active:[--btn-icon:var(--color-rose-200)] data-hover:[--btn-icon:var(--color-rose-200)]"]},v=(0,i.forwardRef)(function(e,i){let o,l,v,g,w,S,A,T,C=(0,r.c)(17);C[0]!==e?({size:A,color:v,outline:g,plain:w,className:l,children:o,...S}=e,C[0]=e,C[1]=o,C[2]=l,C[3]=v,C[4]=g,C[5]=w,C[6]=S,C[7]=A):(o=C[1],l=C[2],v=C[3],g=C[4],w=C[5],S=C[6],A=C[7]);let R=void 0===A?"md":A;if(C[8]!==o||C[9]!==l||C[10]!==v||C[11]!==g||C[12]!==w||C[13]!==S||C[14]!==i||C[15]!==R){let e=(0,s.cn)(u,d[R],g?v?m[v]??p:p:w?f:(0,a.default)(h,y[v??"azure"]),l);T="string"==typeof S.href?(0,t.jsx)(c,{...S,className:e,ref:i,children:(0,t.jsx)(b,{children:o})}):(0,t.jsx)(n.Button,{...S,className:(0,s.cn)(e,"cursor-pointer data-disabled:cursor-default"),ref:i,children:(0,t.jsx)(b,{children:o})}),C[8]=o,C[9]=l,C[10]=v,C[11]=g,C[12]=w,C[13]=S,C[14]=i,C[15]=R,C[16]=T}else T=C[16];return T});function b(e){let n,a,i=(0,r.c)(3),{children:s}=e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("span",{className:"absolute top-1/2 left-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 pointer-fine:hidden","aria-hidden":"true"}),i[0]=n):n=i[0],i[1]!==s?(a=(0,t.jsxs)(t.Fragment,{children:[n,s]}),i[1]=s,i[2]=a):a=i[2],a}e.s(["Button",0,v,"TouchTarget",0,b],339417)},986287,875450,321399,937859,599195,304440,798702,397654,250243,11905,67570,629990,167054,e=>{"use strict";e.s(["CalendarDate",()=>tE,"CalendarDateTime",()=>tx,"Time",()=>tk,"ZonedDateTime",()=>tD],67570),e.s(["epochFromDate",()=>eQ,"fromAbsolute",()=>eJ,"fromDate",()=>eG,"possibleAbsolutes",()=>eY,"toAbsolute",()=>eH,"toCalendar",()=>e0,"toCalendarDate",()=>eV,"toCalendarDateTime",()=>eW,"toDate",()=>eK,"toLocalTimeZone",()=>e6,"toTime",()=>eX,"toTimeZone",()=>e3,"toZoned",()=>e1,"zonedToDate",()=>e5],250243),e.s(["GregorianCalendar",()=>eh,"fromExtendedYear",()=>eu,"getExtendedYear",()=>ec,"gregorianToJulianDay",()=>eo,"isLeapYear",()=>el],798702),e.s(["compareDate",()=>eC,"compareTime",()=>eR,"endOfMonth",()=>eM,"endOfWeek",()=>eN,"getDayOfWeek",()=>eS,"getLocalTimeZone",()=>ex,"getWeeksInMonth",()=>eq,"isEqualCalendar",()=>eb,"isEqualDay",()=>ev,"isLocalTimeZoneOverridden",()=>eD,"isSameDay",()=>ef,"isSameMonth",()=>em,"isSameYear",()=>ey,"isToday",()=>eg,"maxDate",()=>ez,"minDate",()=>eU,"now",()=>eA,"startOfMonth",()=>eP,"startOfWeek",()=>eI,"startOfYear",()=>eO,"today",()=>eT],397654),e.s(["dateTimeToString",()=>tA,"dateToString",()=>tS,"parseAbsolute",()=>tb,"parseDate",()=>tm,"parseDateTime",()=>ty,"parseZonedDateTime",()=>tv,"timeToString",()=>tw,"zonedDateTimeToString",()=>tC],11905);var t=e.i(76595),r=e.i(918735);
2class n{constructor(e){this.client=e}}class a extends n{async create(e,{signal:t}={}){let r=await this.client.request("/api/v1/cards/",{method:"POST",signal:t,body:JSON.stringify(e)});if(!r.ok)throw Error(function(e){if(e?.message||e?.detail)return e.message||e.detail;let t=function e(t,r=[]){if(!t)return[];if("string"==typeof t){let e=r.at(-1);return[e?`${e}: ${t}`:t]}return Array.isArray(t)?t.flatMap(t=>e(t,r)):"object"==typeof t?Object.entries(t).flatMap(([t,n])=>e(n,[...r,t])):[]}(e);return t.length>0?t.join("\n"):"Não foi possível cadastrar o cartão."}(await r.json().catch(()=>({}))));return r.json()}}function i(e){let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.trunc(t)):0}function s(e){if(null==e)return null;let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.trunc(t)):null}function o(e){return e?.type&&e?.code?{type:e.type,code:String(e.code)}:null}function l(e){return{code:String(e?.code??""),startsAt:e?.startsAt??null,endsAt:e?.endsAt??null}}function c(e){return{targetType:e?.targetType??null,targetCode:String(e?.targetCode??""),policy:e?.policy??null,calculatedAmountCents:i(e?.calculatedAmountCents),chargedAmountCents:i(e?.chargedAmountCents),eligibleAmbassadorsCount:s(e?.eligibleAmbassadorsCount),consideredServicesCount:s(e?.consideredServicesCount)}}function u(e){return{calculatedAmountCents:i(e?.calculatedAmountCents),chargedAmountCents:i(e?.chargedAmountCents),receivedAmountCents:i(e?.receivedAmountCents),writtenOffAmountCents:i(e?.writtenOffAmountCents),outstandingAmountCents:i(e?.outstandingAmountCents),reservedAmountCents:i(e?.reservedAmountCents)}}function d(e){return e?.scope&&e?.calculationFingerprint?{scope:e.scope,calculationFingerprint:String(e.calculationFingerprint),affectedServices:Array.isArray(e.affectedServices)?e.affectedServices.map(l):[],ongoingServices:Array.isArray(e.ongoingServices)?e.ongoingServices.map(l):[],fees:Array.isArray(e.fees)?e.fees.map(c):[],totals:u(e.totals)}:null}function h(e){return{code:String(e?.code??""),label:e?.label?.trim()||"Outro motivo",scopes:Array.isArray(e?.scopes)?e.scopes:[],secondaryReasonRequired:!!e?.secondaryReasonRequired,commentRequired:!!e?.commentRequired,secondaryReasons:Array.isArray(e?.secondaryReasons)?e.secondaryReasons.map(e=>({code:String(e?.code??""),label:e?.label?.trim()||"Outro motivo"})):[]}}function p(e){return e?.id?{id:String(e.id),brand:e.brand??null,name:e.name??null,last4Digits:e.last4Digits??null,expirationMonth:e.expirationMonth??null,expirationYear:e.expirationYear??null,isDefault:!!e.isDefault}:null}function f(e){return{id:String(e?.id??""),createdAt:e?.createdAt??null,isPayable:e?.isPayable===!0,paymentMethod:e?.paymentMethod??null,status:e?.status??null,amountCents:i(e?.amountCents),allocatedAmountCents:i(e?.allocatedAmountCents),expiresAt:e?.expiresAt??null,pixCopyAndPaste:e?.pixCopyAndPaste??null,pixQrCodeUrl:e?.pixQrCodeUrl??null,pixQrCodeInBase64:e?.pixQrCodeInBase64??null,card:p(e?.card)}}function m(e,t){return"string"==typeof e?.detail?e.detail:t}class y extends Error{constructor(e,{status:t,data:r}){super(e),this.name="CancellationError",this.status=t,this.code=r?.code??null,this.fields=r?.fields??{},this.summary=d(r?.summary),this.data=r}}class v extends n{async getService(e,{signal:t}={}){return this.#Q(`/api/v1/users/self/solicitations/${encodeURIComponent(e)}/cancellation/`,{signal:t})}async getPlan(e,{signal:t}={}){return this.#Q(`/api/v1/users/self/plans/${encodeURIComponent(e)}/cancellation/`,{signal:t})}async executeService(e,t,{idempotencyKey:r,signal:n}={}){return this.#_(`/api/v1/users/self/solicitations/${encodeURIComponent(e)}/cancellation/`,t,{idempotencyKey:r,signal:n})}async executePlan(e,t,{idempotencyKey:r,signal:n}={}){return this.#_(`/api/v1/users/self/plans/${encodeURIComponent(e)}/cancellation/`,t,{idempotencyKey:r,signal:n})}async getById(e,{signal:t}={}){let r=await this.client.request(`/api/v1/users/self/cancellations/${encodeURIComponent(e)}/`,{signal:t});return this.#L(r)}async createPayment(e,t,{idempotencyKey:r,signal:n}={}){if(!r)throw Error("A chave de idempotência é obrigatória.");let a=await this.client.request(`/api/v1/users/self/cancellations/${encodeURIComponent(e)}/payments/`,{method:"POST",signal:n,headers:{"Idempotency-Key":r},body:JSON.stringify(t)});return this.#L(a)}async #Q(e,t){let r=await this.client.request(e,t),n=await r.json().catch(()=>null);if(!r.ok)throw new y(m(n,"Não foi possível carregar o cancelamento."),{status:r.status,data:n});if(!n||"object"!=typeof n||!o(n.target))throw Error("Não foi possível carregar as opções de cancelamento.");return{target:o(n.target),canCancel:!!n.canCancel,blockReason:n.blockReason??null,options:Array.isArray(n.options)?n.options.map(d).filter(
2Boolean):[],unavailableOptions:Array.isArray(n.unavailableOptions)?n.unavailableOptions:[],reasons:Array.isArray(n.reasons)?n.reasons.map(h):[],terms:{url:n.terms?.url||"/termos-de-uso/",version:String(n.terms?.version??"")},currency:n.currency||"BRL"}}async #_(e,t,{idempotencyKey:r,signal:n}){if(!r)throw Error("A chave de idempotência é obrigatória.");let a=await this.client.request(e,{method:"POST",signal:n,headers:{"Idempotency-Key":r},body:JSON.stringify(t)});return this.#L(a)}async #L(e){let t=await e.json().catch(()=>null);if(!e.ok)throw new y(m(t,"Não foi possível concluir o cancelamento."),{status:e.status,data:t});if(!t?.id)throw Error("Não foi possível carregar o cancelamento.");return{id:String(t.id),source:t.source??null,status:t.status??null,createdAt:t.createdAt??null,completedAt:t.completedAt??null,failedAt:t.failedAt??null,reason:t.reason??null,waived:!!t.waived,items:Array.isArray(t.items)?t.items.map(e=>({...e,id:String(e.id),target:o(e.target),...u(e)})):[],totals:u(t.totals),collectionStatus:t.collectionStatus??null,financialActionsStatus:t.financialActionsStatus??null,dueAt:t.dueAt??null,paymentAttempts:Array.isArray(t.paymentAttempts)?t.paymentAttempts.map(f):[],paymentActions:Array.isArray(t.paymentActions)?t.paymentActions:[],availablePaymentMethods:Array.isArray(t.availablePaymentMethods)?t.availablePaymentMethods:[],availableCards:Array.isArray(t.availableCards)?t.availableCards.map(p).filter(Boolean):[],isStable:!!t.isStable,currency:t.currency||"BRL"}}}class b extends n{async list(e,{signal:t}={}){let r,n=await this.client.request((r=new URLSearchParams({latitude:String(e.latitude),longitude:String(e.longitude),state:e.state,ordering:e.ordering??"-rating",limit:String(e.limit),offset:String(e.offset??0)}),e.search?.trim()&&r.set("search",e.search.trim()),`/api/v1/ambassadors/?${r.toString()}`),{signal:t}),a=function(e){let t=Array.isArray(e?.results)?e.results:Array.isArray(e)?e:null;if(!t)return null;let r=Number(e?.count),n=Number.isFinite(r)?r:t.length;return{items:t,total:n,hasMore:!!e?.next}}(await n.json().catch(()=>null));if(!n.ok||!a)throw Error("Não foi possível carregar as Embaixadoras.");return a}async getAvailable(e,{signal:t}={}){let r,n=await this.client.request((r=new URLSearchParams({product_type:String(e.serviceTypeId),home_type:String(e.homeTypeId),latitude:String(e.latitude),longitude:String(e.longitude),state:e.state,city:e.city,neighborhood:e.neighborhood,start_time:e.startTime,end_time:e.endTime,in_group:String(e.requiredAmbassadors>1),only_preferences:String(e.onlyPreferences),gender_preference:e.genderPreference}),e.dates.forEach(e=>r.append("dates",e)),e.optionalIds.forEach(e=>{r.append("optionals",String(e))}),null!==e.ambassadorId&&void 0!==e.ambassadorId&&r.set("ambassador",String(e.ambassadorId)),`/api/v1/ambassadors/available_ambassadors_index/?${r.toString()}`),{signal:t}),a=await n.json().catch(()=>null);if(!n.ok||!a?.kind||!Array.isArray(a.results))throw Error("Não foi possível consultar as Embaixadoras disponíveis.");return a}}class g extends n{async get({signal:e}={}){let t=await this.client.request("/api/v1/config/",{signal:e}),r=await t.json().catch(()=>null);if(!t.ok||!r||"object"!=typeof r)throw Error("Não foi possível carregar as configurações.");return r}}class w extends Error{constructor(e,{status:t,data:r}){super(e),this.name="ContactError",this.status=t,this.data=r}}class S extends n{async create(e,{signal:t}={}){let r,n=await this.client.request("/api/v1/o/contact/",{method:"POST",signal:t,body:((r=new FormData).append("name",e.name),r.append("email",e.email),r.append("title",e.title),r.append("problem_area",e.problemArea),r.append("description",e.description),e.files.forEach(e=>r.append("files",e)),r)}),a=await n.json().catch(()=>null);if(!n.ok)throw new w(a?.message||a?.detail||function e(t){return"string"==typeof t?t.trim()?[t]:[]:Array.isArray(t)?t.flatMap(e):t&&"object"==typeof t?Object.values(t).flatMap(e):[]}(a)[0]||"Não foi possível enviar a mensagem. Tente novamente em instantes.",{status:n.status,data:a});return a}}class A extends n{async uploadAvatar(e,{signal:t}={}){let r=await this.client.request("/api/v1/files/",{method:"POST",signal:t,headers:{"Content-Type":"application/octet-stream"},body:e});if(!r.ok){let e=await r.json().catch(()=>({})),t=Error(e?.message||e?.detail||"Não foi possível atualizar sua foto.");throw t.status=r.status,t.data=e,t}return r.json()}}let T={address:"Endereço",number:"Número",street:"Rua",zipCode:"CEP",z
2ip_code:"CEP",complement:"Complemento",reference:"Referência",district:"Bairro",city:"Cidade",state:"Estado",country:"País",name:"Nome",homeType:"Tipo de lar",home_type:"Tipo de lar"};class C extends n{async create(e,{signal:t}={}){let r=await this.client.request("/api/v1/locations/",{method:"POST",signal:t,body:JSON.stringify(e)});if(!r.ok){let{message:e,fieldErrors:t}=function(e){if(e?.message||e?.detail)return{message:e.message||e.detail,fieldErrors:{}};let t=function e(t,r=[]){if(!t)return[];if("string"==typeof t){let e=r.map(e=>T[e]??e).filter(e=>"Endereço"!==e).join(" > ");return[e?`${e}: ${t}`:t]}return Array.isArray(t)?t.flatMap(t=>e(t,r)):"object"==typeof t?Object.entries(t).flatMap(([t,n])=>e(n,[...r,t])):[]}(e);return t.length>0?{message:t.join("\n"),fieldErrors:function e(t,r=[],n={}){if(!t)return n;if("string"==typeof t){let e=r.at(-1)??"";return e&&(n[e]=n[e]?`${n[e]}
3${t}`:t),n}return Array.isArray(t)?t.forEach(t=>e(t,r,n)):"object"==typeof t&&Object.entries(t).forEach(([t,a])=>e(a,[...r,t],n)),n}(e)}:{message:"Não foi possível cadastrar o endereço.",fieldErrors:{}}}(await r.json().catch(()=>({}))),n=Error(e);throw n.fieldErrors=t,n}return r.json()}}class R extends Error{constructor(e,{status:t,data:r}){super(e),this.name="LeadError",this.status=t,this.data=r}}class E extends n{async create({email:e},{signal:t}={}){let r=await this.client.request("/api/v1/o/lead/",{method:"POST",signal:t,body:JSON.stringify({email:e})});if(!r.ok){let e=await r.json().catch(()=>null);throw new R(e?.message||e?.detail||e?.email?.[0]||"Não foi possível salvar o e-mail informado.",{status:r.status,data:e})}}}function k(e){return e&&"object"==typeof e?{kind:e.kind,current:e.current??null,upcoming:e.upcoming??null,previous:Array.isArray(e.previous)?e.previous:[]}:null}class x extends n{async list({signal:e}={}){let t,r=await this.client.request("/api/v1/o/legal-documents/",{signal:e}),n=await r.json().catch(()=>null);if(!r.ok||!n||"object"!=typeof n){let e=Error(n?.detail??n?.message??"Não foi possível carregar os documentos legais. Tente novamente.");throw e.status=r.status,e.data=n,e}return{terms:(t=Array.isArray(n?.results)?n.results.map(k).filter(Boolean):[]).find(e=>"TERMS"===e.kind)??null,privacyPolicy:t.find(e=>"PRIVACY_POLICY"===e.kind)??null}}}let D=["user","loyalty-program"];function P(e){var t;let r=e?.progress||{},n=e?.reward||{},a=e?.rules||{};return{state:e?.state||"not_enrolled",enrolled:!!e?.enrolled,enrolledAt:e?.enrolledAt||null,rules:{requiredCompletedServices:Number(a.requiredCompletedServices)||0,termsEffectiveDate:a.termsEffectiveDate||null},benefit:(t=e?.benefit)&&"object"==typeof t?{kind:t.kind||null,percentage:null==t.percentage?null:Number(t.percentage),valueCents:null==t.valueCents?null:Number(t.valueCents),currency:t.currency||null,appliesTo:t.appliesTo?{kind:t.appliesTo.kind||null,code:t.appliesTo.code||null}:null}:null,progress:{current:Number(r.current)||0,target:Number(r.target)||0},completedServices:Array.isArray(e?.completedServices)?e.completedServices.map(e=>({id:e.id||null,code:e.code||null,description:e.description||"Faxina concluída",completedAt:e.completedAt||null})):[],reward:{status:n.status||"locked",couponCode:n.couponCode||null,expiresAt:n.expiresAt||null},generatedAt:e?.generatedAt||null}}async function M(e){let t=await e.json().catch(()=>null);if(!e.ok||!t||"object"!=typeof t){let r=Error(t?.message||t?.detail||"Não foi possível carregar o programa.");throw r.status=e.status,r.data=t,r}return P(t)}class O extends n{async get({signal:e}={}){return M(await this.client.request("/api/v1/users/self/loyalty-program/",{signal:e}))}async enroll({signal:e}={}){return M(await this.client.request("/api/v1/users/self/loyalty-program/",{method:"POST",signal:e,body:JSON.stringify({})}))}}function I(e){return{id:null!=e.id?String(e.id):e.name||"",name:e.name||"",avatar:e.avatar||e.avatarUrl||null,initials:e.initials||"",rating:null!=e.rating?Number(e.rating):null,jobsCompleted:e.jobsCompleted??0,acceptedAt:e.acceptedAt||null,status:e.status||null,statusLabel:e.statusLabel||null}}function N(e){return Array.isArray(e)?e.map(e=>({id:null!=e.id?String(e.id):"",professional:I(e.professional||{}),status:e.status||"unknown",statusLabel:e.statusLabel||"Aguardando resposta",invitedAt:e.invitedAt||null,respondedAt:e.respondedAt||null,canInviteAnotherAt:e.canInviteAnotherAt||null})):[]}function j(e){var t,r,n,a,i,s,o;let l,c,u;if(!e)return null;let d=e.service||{},h=e.price||{},p=e.staffing||{},f=e.payment||{},m=e.planLabel||d.planLabel||null,y=function(e,t){if(e&&"object"==typeof e){let t=Number(e.current),r=Number(e.total),n="string"==typeof e.name?e.name.trim():"";if(n&&Number.isFinite(t)&&Number.isFinite(r))return{name:n,current:t,total:r}}if(!t)return null;let r=t.match(/^(.*?)\s*[·•-]\s*(\d+)\s*\/\s*(\d+)$/);return r?{name:r[1].trim(),current:Number(r[2]),total:Number(r[3])}:null}(e.plan||d.plan||null,m),v=y?y?`${y.name} \xb7 ${y.current}/${y.total}`:null:m;return{id:null!=e.id?String(e.id):e.code,code:e.code,scheduledAt:e.scheduledAt,startedAt:e.startedAt||null,durationMinutes:e.durationMinutes??0,status:e.status,needsAttention:e.needsAttention??!1,attentionReason:e.attentionReason??null,service:{i
3d:null!=d.id?String(d.id):null,name:d.name||"",icon:d.icon||null},plan:y,planLabel:v,description:e.description||"",price:{totalCents:h.totalCents??0},staffing:{required:p.required??0,accepted:p.accepted??0,selectionMode:p.selectionMode||"automatic"},professionals:Array.isArray(e.professionals)?e.professionals.map(I):[],professionalInvitations:N(e.professionalInvitations),professionalInvitationHistory:N(e.professionalInvitationHistory),payment:{overallStatus:f.overallStatus||"unpaid"},paymentSummary:(t=e.paymentSummary,{totalDue:c=(l=t||{}).totalDue??h.totalCents??0,captured:l.captured??0,authorized:l.authorized??0,balance:l.balance??c,remaining:l.remaining??l.securedBalance??c}),customerGuidelines:e.customerGuidelines||null,optionals:Array.isArray(r=e.optionals)?r.map(e=>({id:null!=e.id?String(e.id):"",name:e.name||"",quantity:e.quantity??0,quantityLabel:e.quantityLabel||String(e.quantity??"")})):[],address:(n=e.address)&&"object"==typeof n?{street:n.street||"",number:n.number||"",complement:n.complement||"",reference:n.reference||"",neighborhood:n.neighborhood||n.district||"",city:n.city||"",state:n.state||"",zipCode:n.zipCode||"",formatted:n.formatted||""}:null,priceBreakdown:Array.isArray(a=e.priceBreakdown)?a.map(e=>({label:e.label||"",cents:e.cents??e.amountCents??0,reason:e.reason||null})):[],paymentDetail:(i=e.paymentDetail,{overallStatus:(u=i||{}).overallStatus||f.overallStatus||"unpaid",method:u.method||null,methodLabel:u.methodLabel||"A confirmar",statusLabel:u.statusLabel||null,deltaCents:u.deltaCents??null,charges:Array.isArray(u.charges)?u.charges.map(e=>({id:null!=e.id?String(e.id):"",type:e.type||null,typeLabel:e.typeLabel||null,method:e.method||null,methodLabel:e.methodLabel||null,amountCents:e.amountCents??0,status:e.status||"",statusLabel:e.statusLabel||null,createdAt:e.createdAt||null,dueDate:e.dueDate||null,failureReason:e.failureReason||null})):[]}),changeRequest:function(e){if(!e||"object"!=typeof e)return null;let t=e.changes||{};return{id:null!=e.id?String(e.id):null,status:e.status||null,type:e.type||null,proposedBy:e.proposedBy||null,proposedAt:e.proposedAt||null,changes:{scheduledAt:t.scheduledAt||null},note:e.note||null}}(e.changeRequest),events:Array.isArray(s=e.events)?s.map(e=>({id:null!=e.id?String(e.id):`${e.type||"event"}-${e.at||e.occurredAt||""}`,at:e.at||e.occurredAt||null,type:e.type||"event",description:e.description||e.title||""})):[],actions:Array.isArray(o=e.actions)?o.map(e=>({id:null!=e.id?String(e.id):"",label:e.label||"",style:e.style||null,primary:!!e.primary,destructive:!!e.destructive,disabled:!!e.disabled})):[]}}e.s(["LoyaltyProgramResource",0,O,"getUserLoyaltyProgramQueryKey",0,function(e){return[...D,String(e)]},"normalizeLoyaltyProgram",0,P],875450);let F=["user","overview"];class q extends n{async get({signal:e}={}){let t,r,n=await this.client.request("/api/v1/users/self/overview/",{signal:e}),a=await n.json().catch(()=>null);if(!n.ok||!a||"object"!=typeof a){let e=Error(a?.detail||a?.message||"Não foi possível carregar sua visão geral.");throw e.status=n.status,e.data=a,e}return r=(t=a?.services||{}).attention||null,{customer:{firstName:a?.customer?.firstName||""},isFirstTime:!!a?.isFirstTime,services:{current:j(t.current),next:j(t.next),upcoming:Array.isArray(t.upcoming)?t.upcoming.map(j):[],lastCompleted:j(t.lastCompleted),attention:r?{reason:r.reason||null,service:j(r.service)}:null},activePlan:function(e){if(!e||"object"!=typeof e)return null;let t=e.cycle||null;return{code:e.code||null,name:e.name||"",active:!!e.active,recurrent:!!e.recurrent,cycle:t?{current:Number(t.current)||0,total:Number(t.total)||0}:null,renewsAt:e.renewsAt||null}}(a?.activePlan),postService:function(e){if(!e||"object"!=typeof e)return null;let t=e.rebookingSuggestion||{};return{state:e.state||null,completedAt:e.completedAt||null,rating:{pending:!!e.rating?.pending,status:e.rating?.status||"unavailable",available:e.rating?.available===!0,expiresAt:e.rating?.expiresAt||null,editUntil:e.rating?.editUntil||null},rebookingSuggestion:{status:t.status||"cooldown",availableAt:t.availableAt||null},service:j(e.service)}}(a?.postService),referralProgram:function(e){if(!e||"object"!=typeof e)return null;let t=e.coupon,r=t?.discount,n=e.friendDiscount,a=e.progress||{},i=e.reward||{};return{state:e.state||"not_enrolled",enrolled:!!e.enrolled,friendDiscount:n?{kind:n.kind||null,value:Number(n.value)||0}:null,coupon:t?{code:t.code||null,discount:r?{kind:r.kind||null,value:Number(r.value)||0}:null}:null,progress:{current:Number(a.current)||0,target:Number(a.target)||0},reward:{valueCents:Number(i.valueCents)||0,currency:i.currency||"BRL",available:!!i.available,couponCode:i.couponCode||null,expiresAt:i.expiresAt||null}}}(a?.referralProgram),loyaltyProgram:a?.loyaltyProgram?P(a.loyaltyProgram):null,generatedAt:a?.generatedAt||null}}}function U(e,t){return e?.message||e?.detail||t}function z(e){let t=Number(e);return Number.isFinite(t)?t:0}function Q(e){if(null==e||""===e)return null;let t=Number(e);return Number.isFinite(t)?t:null}function _(e){return{requestId:String(e.requestId),code:String(e.code),description:e.description?.trim()||"Serviço Tidmo",kind:e.kind,serviceDate:e.serviceDate??null,dueDate:e.dueDate??null,delayedDays:Math.max(0,Number(e.delayedDays)||0),fineRate:Q(e.fineRate),dailyInterestRate:Q(e.dailyInterestRate),originalAmount:z(e.originalAmount)}}function L(e){if(!e||"object"!=typeof e)throw Error("Não foi possível carregar os pagamentos atrasad
3os.");let t=e.summary??{},r=e.paymentIntent;return{state:e.state,canGeneratePix:!!e.canGeneratePix,summary:{debtCount:Math.max(0,Number(t.debtCount)||0),originalAmount:z(t.originalAmount),outstandingAmount:z(t.outstandingAmount),fineAmount:z(t.fineAmount),interestAmount:z(t.interestAmount),totalDue:z(t.totalDue)},debts:Array.isArray(e.debts)?e.debts.map(_):[],paymentIntent:r?{id:String(r.id),status:r.status,amount:z(r.amount),copyCode:r.copyCode??null,qrCodeUrl:r.qrCodeUrl??null,expiresAt:r.expiresAt??null}:null}}e.s(["OverviewResource",0,q,"USER_OVERVIEW_QUERY_KEY",0,F,"getUserOverviewQueryKey",0,function(e){return[...F,String(e)]}],321399);class B extends n{async get({signal:e}={}){let t=await this.client.request("/api/v1/users/me/overdue-settlement/",{signal:e}),r=await t.json().catch(()=>null);if(!t.ok)throw Error(U(r,"Não foi possível carregar os pagamentos atrasados."));return L(r)}async createPix(){let e=await this.client.request("/api/v1/users/me/overdue-settlement/pix/",{method:"POST"}),t=await e.json().catch(()=>null);if(!e.ok)throw Error(U(t,"Não foi possível gerar o Pix."));return L(t)}}let $=Object.freeze({MONEY:0,TRANSFER:1,BANK_SLIP:2,CREDIT_CARD:3,PIX:4}),Y=Object.freeze({[$.MONEY]:"Dinheiro",[$.TRANSFER]:"Transferência",[$.BANK_SLIP]:"Boleto",[$.CREDIT_CARD]:"Cartão de crédito",[$.PIX]:"Pix"}),Z=Object.freeze({[$.MONEY]:"money",[$.TRANSFER]:"transfer",[$.BANK_SLIP]:"slip",[$.CREDIT_CARD]:"credit_card",[$.PIX]:"pix"}),H=new Set(Object.values($));function K(e){if(null==e||""===e)return null;let t=Number(e);return H.has(t)?t:null}function J(e){let t=e?.code;if(!t)return null;let r=e.payment??{},n=K(r.paymentMethod);return{id:String(e.id??t),code:String(t),description:e.description?.trim()||"Serviço Tidmo",serviceDate:e.serviceDate??null,dueDate:r.dueDate??null,status:e.status,canSettleOverdueBalance:!!e.canSettleOverdueBalance,paymentMethod:n,paymentMethodLabel:Y[n]??"Forma de pagamento",canPay:!!r.canPay,copyCode:r.copyCode??null,copyCodeLabel:n===$.PIX?"Copiar código Pix":"Copiar linha digitável",slipUrl:r.slipUrl??null}}function G(e,t){return e?.message||e?.detail||t}e.s(["PAYMENT_METHOD",0,$,"PAYMENT_METHOD_ANALYTICS_NAMES",0,Z,"PAYMENT_METHOD_LABELS",0,Y,"normalizePaymentMethod",0,K],937859);class V extends n{async list(e={},{signal:t}={}){let r=await this.client.request(function({status:e="all",limit:t=15,offset:r=0}={}){let n=new URLSearchParams;return"all"!==e&&n.set("status",e),n.set("limit",String(t)),n.set("offset",String(r)),`/api/v1/users/me/payments/?${n.toString()}`}(e),{signal:t}),n=await r.json().catch(()=>null);if(!r.ok)throw Error(G(n,"Não foi possível carregar seus pagamentos."));return function(e,{offset:t=0}={}){if(!e||"object"!=typeof e)throw Error("Não foi possível carregar seus pagamentos.");let r=(Array.isArray(e.results)?e.results:[]).map(J).filter(Boolean);return{items:r,total:Number(e.count??r.length),offset:t,nextOffset:function(e){if(!e)return;let t=Number(new URL(e,"http://localhost").searchParams.get("offset"));return Number.isFinite(t)?t:void 0}(e.next)}}(n,e)}async counts({signal:e}={}){let t=await this.client.request("/api/v1/users/me/payments/summary/",{signal:e}),r=await t.json().catch(()=>null);if(!t.ok)throw Error(G(r,"Não foi possível carregar o resumo de pagamentos."));return{opened:Math.max(0,Number(r?.opened)||0),late:Math.max(0,Number(r?.late)||0)}}}function W(e){let t=e.id;return null==t?null:{id:String(t),name:e.nickname?.trim()||"Embaixadora",avatarUrl:e.avatarUrl??null}}function X(e){let t=e.code;if(!t)return null;let r=Array.isArray(e.ambassadors)?e.ambassadors:[];return{code:String(t),description:e.description?.trim()||"Assinatura Tidmo",address:e.fullAddress?.trim()||"",paymentMethod:K(e.paymentMethod),paymentMethodLabel:e.paymentMethodDisplay?.trim()||"Forma de pagamento",ambassadors:r.map(W).filter(Boolean),recurrent:!!e.recurrent}}class ee extends n{async list(e={},{signal:t}={}){let r=await this.client.request(function({status:e="active",limit:t=10,offset:r=0}={}){let n=new URLSearchParams;return"cancelled"===e?n.set("only_cancelled","1"):n.set("only_active","1"),n.set("limit",String(t)),n.set("offset",String(r)),`/api/v1/users/self/plans/?${n.toString()}`}(e),{signal:t}),n=await r.json().catch(()=>null);if(!r.ok)throw Error(n?.message||n?.detail||"Não foi possível carregar suas assinaturas.");return function(e,t){let r=Array.isArray(e)?e:e?.results;if(!Array.isArray(r))throw Error("Não foi possível carregar suas assinaturas.");
3let n=r.map(X).filter(Boolean),a=Number(e?.count??n.length);return{items:n,total:a,hasMore:!!e?.next||t+r.length<a}}(n,e.offset??0)}}let et=["user","referral-program"];function er(e){return e&&"object"==typeof e?{id:e.id||null,code:e.code||null,status:e.status||"pending",valueCents:Number(e.valueCents)||0,currency:e.currency||"BRL",availableAt:e.availableAt||null,expiresAt:e.expiresAt||null,isGiftCard:!!e.isGiftCard}:null}function en(e){return e&&"object"==typeof e?{id:e.id||null,code:e.code||null,clientName:e.clientName||null,description:e.description||null,completedAt:e.completedAt||null}:null}async function ea(e,t){var r;let n,a,i,s=await e.json().catch(()=>null);if(!e.ok||!s||"object"!=typeof s){let r=Error(s?.detail||s?.message||t);throw r.status=e.status,r.data=s,r}return n=s?.rules||{},a=s?.progress||{},i=n.reward||{},{state:s?.state||"not_enrolled",enrolled:!!s?.enrolled,coupon:s?.coupon?{code:s.coupon.code||null,shareUrl:s.coupon.shareUrl||null}:null,rules:{friendDiscount:(r=n.friendDiscount)&&"object"==typeof r?{kind:r.kind||null,value:Number(r.value)||0}:null,recommendationsPerReward:Number(n.recommendationsPerReward)||0,reward:{valueCents:Number(i.valueCents)||0,currency:i.currency||"BRL"},rewardValidityDays:Number(n.rewardValidityDays)||0},progress:{current:Number(a.current)||0,target:Number(a.target)||0,totalCompleted:Number(a.totalCompleted)||0},completedRecommendations:Array.isArray(s?.completedRecommendations)?s.completedRecommendations.map(en).filter(Boolean):[],rewards:Array.isArray(s?.rewards)?s.rewards.map(er).filter(
3Boolean):[],generatedAt:s?.generatedAt||null}}class ei extends n{async get({signal:e}={}){return ea(await this.client.request("/api/v1/users/self/referral-program/",{signal:e}),"Não foi possível carregar o programa de indicação.")}async enroll({signal:e}={}){return ea(await this.client.request("/api/v1/users/self/referral-program/",{method:"POST",signal:e,body:JSON.stringify({})}),"Não foi possível concluir sua participação no programa.")}}function es(e,t){return e-t*Math.floor(e/t)}function eo(e,t,r,n){let a=(t=ec(e,t))-1,i=-2;return r<=2?i=0:el(t)&&(i=-1),1721425+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*r-362)/12+i+n)}function el(e){return e%4==0&&(e%100!=0||e%400==0)}function ec(e,t){return"BC"===e?1-t:t}function eu(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}e.s(["ReferralProgramResource",0,ei,"getUserReferralProgramQueryKey",0,function(e){return[...et,String(e)]}],599195),e.s(["mod",0,es],304440);let ed={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class eh{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=es(t,146097),a=Math.floor(n/36524),i=es(n,36524),s=Math.floor(i/1461),o=Math.floor(es(i,1461)/365),[l,c]=eu(400*r+100*a+4*s+o+ +(4!==a&&4!==o)),u=e-eo(l,c,1,1),d=2;e<eo(l,c,3,1)?d=0:el(c)&&(d=1);let h=Math.floor(((u+d)*12+373)/367),p=e-eo(l,c,h,1)+1;return new tE(l,c,h,p)}toJulianDay(e){return eo(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return ed[el(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return el(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}let ep={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function ef(e,t){return t=e0(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function em(e,t){return t=e0(t,e.calendar),e=eP(e),t=eP(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function ey(e,t){return t=e0(t,e.calendar),e=eO(e),t=eO(t),e.era===t.era&&e.year===t.year}function ev(e,t){return eb(e.calendar,t.calendar)&&ef(e,t)}function eb(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function eg(e,t){return ef(e,eT(t))}let ew={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function eS(e,t,r){let n=Math.ceil(e.calendar.toJulianDay(e)+1-(r?ew[r]:function(e){let t=eF.get(e);if(!t){if(Intl.Locale){let r=new Intl.Locale(e);if("getWeekInfo"in r&&(t=r.getWeekInfo()))return eF.set(e,t),t.firstDay}let r=function(e){if(Intl.Locale){let t=ej.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&ej.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let r=e.split("-fw-")[1].split("-")[0];t="mon"===r?{firstDay:1}:"tue"===r?{firstDay:2}:"wed"===r?{firstDay:3}:"thu"===r?{firstDay:4}:"fri"===r?{firstDay:5}:"sat"===r?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:r&&ep[r]||0};eF.set(e,t)}return t.firstDay}(t)))%7;return n<0&&(n+=7),n}function eA(e){return eJ(Date.now(),e)}function eT(e){return eV(eA(e))}function eC(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function eR(e,t){return eE(e)-eE(t)}function eE(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let ek=null;function ex(){return null==ek&&(ek=new Intl.DateTimeFormat().resolvedOptions().timeZone),ek}function eD(){return!1}function eP(e){return e.subtract({days:e.day-1})}function eM(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function eO(e){return eP(e.subtract({months:e.month-1}))}function eI(e,t,r){let n=eS(e,t,r);return e.subtract({days:n})}function eN(e,t,r){return eI(e,t,r).add({days:6})}let ej=new Map,eF=new Map;function eq(e,t,r){let n=e.calendar.getDaysInMonth(e);return Math.ceil((eS(eP(e),t,r)+n)/7)}function eU(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function ez(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function eQ(e){return e_(ec((e=e0(e,new eh)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function e_(e,t,r,n,a,i,s){let o=new Date;return o.setUTCHours(n,a,i,s),o.setUTCFullYear(e,t-1,r),o.getTime()}function eL(e,t){if("UTC"===t)return 0;if(e>0&&t===ex())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:a,hour:i,minute:s,second:o}=e$(e,t);return e_(r,n,a,i,s,o,0)-1e3*Math.floor(e/1e3)}let eB=new Map;function e$(e,t){let r=eB.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),eB.set(t,r));let n=r.formatToParts(new Date(e)),a={};for(let e of n)"literal"!==e.type&&(a[e.type]=e.value);return{year:"BC"===a.era||"B"===a.era?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:"24"===a.hour?0:+a.hour,minute:+a.minute,second:+a.second}}function eY(e,t){let r=eQ(e),n=r-eL(r-864e5,t),a=r-eL(r+864e5,t);return eZ(e,t,n,a)}function eZ(e,t,r,n){return(r===n?[r]:[r,n]).filter(r=>{var n;let a;return n=e,a=e$(r,t),n.year===a.year&&n.month===a.month&&n.day===a.day&&n.hour===a.hour&&n.minute===a.minute&&n.second===a.second})}function eH(e,t,r="compatible"){let n=eW(e);if("UTC"===t)return eQ(n);if(t===ex()&&"compatible"===r){n=e0(n,new eh);let e=new Date,t=ec(n.era,n.year);return e.setFullYear(t,n.month-1,n.day),e.setHours(n.hour,n.minute,n.second,n.millisecond),e.getTime()}let a=eQ(n),i=eL(a-864e5,t),s=eL(a+864e5,t),o=eZ(n,t,a-i,a-s);if(1===o.length)return o[0];if(o.length>1)switch(r){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(a-i,a-s);case"compatible":case"later":return Math.max(a-i,a-s);case"reject":throw RangeError("No such absolute time found")}}function eK(e,t,r="compatible"){return new Date(eH(e,t,r))}function eJ(e,t){let r=eL(e,t),n=new Date(e+r),a=n.getUTCFullYear();return new tD(a<1?"BC":"AD",a<1?-a+1:a,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function eG(e,t){return eJ(e.getTime(),t)}function eV(e){return new tE(e.calendar,e.era,e.year,e.month,e.day)}function eW(e,t){let r=0,n=0,a=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:a,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:a,millisecond:i}=t),new tx(e.calendar,e.era,e.year,e.month,e.day,r,n,a,i)}function eX(e){return new tk(e.hour,e.minute,e.second,e.millisecond)}function e0(e,t){if(eb(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,e8(n),n}function e1(e,t,r){return e instanceof tD?e.timeZone===t?e:e3(e,t):eJ(eH(e,t,r),t)}function e5(e){return new Date(eQ(e)-e.offset)}function e3(e,t){return e0(eJ(eQ(e)-e.offset,t),e.calendar)}function e6(e){return e3(e,ex())}function e9(e,t){let r=e.copy(),n="hour"in r?ti(r,t):0;e2(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,e4(r),e7(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,e4(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,e4(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let a=r.calendar.getYearsInEra(r);if(r.year>a){let e=r.calendar.isInverseEra?.(r);r.year=a,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let i=r.calendar.getMonthsInYear(r);return r.month>i&&(r.month=i,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function e2(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function e4(e){for(;e.month<1;)e2(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,e2(e,1)}function e7(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function e8(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),e7(e)}function te(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function tt(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),e8(r),r}function tr(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),tn(r),r}function tn(e){e.millisecond=Math.max(0,Math.min(e.millisecond,999)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function ta(e,t){let r=e%t;return r<0&&(r+=t),r}function ti(e,t){let r;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ta(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ta(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ta(e.minute,60),r=Math.floor(e.hour/24),e.hour=ta(e.hour,24),r}function ts(e,t){let r=e.copy();return ti(r,t),r}function to(e,t,r,n){let a=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=tc(i,r,0,t.length-1,n?.round),a.era=t[i],e8(a);break}case"year":a.calendar.isInverseEra?.(a)&&(r=-r),a.year=tc(e.year,r,-1/0,9999,n?.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=tc(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":a.day=tc(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw Error("Unsupported field "+t)}
3return e.calendar.balanceDate&&e.calendar.balanceDate(a),e8(a),a}function tl(e,t,r,n){let a=e.copy();switch(t){case"hour":{let t=e.hour,i=0,s=23;if(n?.hourCycle===12){let e=t>=12;i=12*!!e,s=e?23:11}a.hour=tc(t,r,i,s,n?.round);break}case"minute":a.minute=tc(e.minute,r,0,59,n?.round);break;case"second":a.second=tc(e.second,r,0,59,n?.round);break;case"millisecond":a.millisecond=tc(e.millisecond,r,0,999,n?.round);break;default:throw Error("Unsupported field "+t)}return a}function tc(e,t,r,n,a=!1){if(a){(e+=Math.sign(t))<r&&(e=n);let a=Math.abs(t);(e=t>0?Math.ceil(e/a)*a:Math.floor(e/a)*a)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function tu(e,t){return e0(eJ((null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?eH(e9(eW(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):eQ(e)-e.offset)+(t.milliseconds||0)+1e3*(t.seconds||0)+6e4*(t.minutes||0)+36e5*(t.hours||0),e.timeZone),e.calendar)}let td=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,th=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,tp=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,tf=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function tm(e){let t=e.match(td);if(!t){if(tf.test(e))throw Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`);throw Error("Invalid ISO 8601 date string: "+e)}let r=new tE(tg(t[1],0,9999),tg(t[2],1,12),1);return r.day=tg(t[3],1,r.calendar.getDaysInMonth(r)),r}function ty(e){let t=e.match(th);if(!t){if(tf.test(e))throw Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`);throw Error("Invalid ISO 8601 date time string: "+e)}let r=tg(t[1],-9999,9999),n=new tx(r<1?"BC":"AD",r<1?-r+1:r,tg(t[2],1,12),1,t[4]?tg(t[4],0,23):0,t[5]?tg(t[5],0,59):0,t[6]?tg(t[6],0,59):0,t[7]?1e3*tg(t[7],0,1/0):0);return n.day=tg(t[3],0,n.calendar.getDaysInMonth(n)),n}function tv(e,t){let r,n=e.match(tp);if(!n)throw Error("Invalid ISO 8601 date time string: "+e);let a=tg(n[1],-9999,9999),i=new tD(a<1?"BC":"AD",a<1?-a+1:a,tg(n[2],1,12),1,n[11],0,n[4]?tg(n[4],0,23):0,n[5]?tg(n[5],0,59):0,n[6]?tg(n[6],0,59):0,n[7]?1e3*tg(n[7],0,1/0):0);i.day=tg(n[3],0,i.calendar.getDaysInMonth(i));let s=eW(i);if(n[8]){let e=tg(n[8],-23,23);if(i.offset=Math.sign(e)*(36e5*Math.abs(e)+6e4*tg(n[9]??"0",0,59)+1e3*tg(n[10]??"0",0,59)),r=eQ(i)-i.offset,!eY(s,i.timeZone).includes(r))throw Error(`Offset ${tT(i.offset)} is invalid for ${tA(i)} in ${i.timeZone}`)}else r=eH(eW(s),i.timeZone,t);return eJ(r,i.timeZone)}function tb(e,t){let r=e.match(tf);if(!r)throw Error("Invalid ISO 8601 date time string: "+e);let n=tg(r[1],-9999,9999),a=new tD(n<1?"BC":"AD",n<1?-n+1:n,tg(r[2],1,12),1,t,0,r[4]?tg(r[4],0,23):0,r[5]?tg(r[5],0,59):0,r[6]?tg(r[6],0,59):0,r[7]?1e3*tg(r[7],0,1/0):0);return a.day=tg(r[3],0,a.calendar.getDaysInMonth(a)),r[8]&&(a.offset=36e5*tg(r[8],-23,23)+6e4*tg(r[9]??"0",0,59)),e3(a,t)}function tg(e,t,r){let n=Number(e);if(n<t||n>r)throw RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function tw(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function tS(e){let t,r=e0(e,new eh);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function tA(e){return`${tS(e)}T${tw(e)}`}function tT(e){let t=0>Math.sign(e)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=Math.floor(e%36e5/6e4),a=Math.floor(e%36e5%6e4/1e3),i=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return 0!==a&&(i+=`:${String(a).padStart(2,"0")}`),i}function tC(e){return`${tA(e)}${tT(e.offset)}[${e.timeZone}]`}function tR(e){let t,r="object"==typeof e[0]?e.shift():new eh;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}class tE{#B;constructor(...e){let[t,r,n,a,i]=tR(e);this.calendar=t,this.era=r,this.year=n,this.month=a,this.day=i,e8(this)}copy(){return this.era?new tE(this.calendar,this.era,this.year,this.month,this.day):new tE(this.calendar,this.year,this.month,this.day)}add(e){return e9(this,e)}subtract(e){return e9(this,te(e))}set(e){return tt(this,e)}cycle(e,t,r){return to(this,e,t,r)}toDate(e){return eK(this,e)}toString(){return tS(this)}compare(e){return eC(this,e)}}class tk{#B;constructor(e=0,t=0,r=0,n=0){this.hour=e,this.minute=t,this.second=r,this.millisecond=n,tn(this)}copy(){return new tk(this.hour,this.minute,this.second,this.millisecond)}add(e){return ts(this,e)}subtract(e){return ts(this,te(e))}set(e){return tr(this,e)}cycle(e,t,r){return tl(this,e,t,r)}toString(){return tw(this)}compare(e){return eR(this,e)}}class tx{#B;constructor(...e){let[t,r,n,a,i]=tR(e);this.calendar=t,this.era=r,this.year=n,this.month=a,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,e8(this)}copy(){return this.era?new tx(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new tx(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return e9(this,e)}subtract(e){return e9(this,te(e))}set(e){return tt(tr(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return to(this,e,t,r);default:return tl(this,e,t,r)}}toDate(e,t){return eK(this,e,t)}toString(){return tA(this)}compare(e){let t=eC(this,e);return 0===t?eR(this,eW(e)):t}}class tD{#B;constructor(...e){let[t,r,n,a,i]=tR(e),s=e.shift(),o=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=a,this.day=i,this.timeZone=s,this.offset=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,e8(this)}copy(){return this.era?new tD(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new tD(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return tu(this,e)}subtract(e){return tu(this,te(e))}set(e,t){let r,n;return 0===(n=tr(tt(r=eW(this),e),e)).compare(r)?this:e0(eJ(eH(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,a=23;if(n?.hourCycle===12){let r=e.hour>=12;t=12*!!r,a=r?23:11}let i=eW(e),s=e0(tr(i,{hour:t}),new eh),o=[eH(s,e.timeZone,"earlier"),eH(s,e.timeZone,"later")].filter(t=>eJ(t,e.timeZone).day===s.day)[0],l=e0(tr(i,{hour:a}),new eh),c=[eH(l,e.timeZone,"earlier"),eH(l,e.timeZone,"later")].filter(t=>eJ(t,e.timeZone).day===l.day).pop(),u=eQ(e)-e.offset,d=Math.floor(u/36e5),h=u%36e5;return e0(eJ(u=36e5*tc(d,r,Math.floor(o/36e5),Math.floor(c/36e5),n?.round)+h,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return tl(e,t,r,n);case"era":case"year":case"month":case"day":return e0(eJ(eH(to(eW(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){return e5(this)}toString(){return tC(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-e1(e,this.timeZone).toDate().getTime()}}let tP=new Set(["SP","DF","PB"]),tM=Object.freeze({OB:"Quebra de objetos",D:"Atraso",CQ:"Qualidade da faxina",C:"
3Comunicação",P:"Pagamentos",T:"Furto",A:"Atendimento",LI:"Falta de interesse",RD:"Data do serviço",O:"Outro"}),tO={LAST_MONTH:"last_month",LAST_14_DAYS:"last_14_days",LAST_7_DAYS:"last_7_days",YESTERDAY:"yesterday",TODAY:"today"},tI=new Set(Object.values(tO));function tN(e){return tI.has(e)?e:tO.LAST_MONTH}function tj(e,t){let r=tN(e),n=function(e){if(e instanceof tE)return e;let t=eG(e??new Date,"America/Fortaleza");return new tE(t.year,t.month,t.day)}(t);if(r===tO.TODAY)return{dateFrom:n.toString(),dateUntil:n.add({days:1}).toString()};if(r===tO.YESTERDAY)return{dateFrom:n.subtract({days:1}).toString(),dateUntil:n.toString()};let a={[tO.LAST_7_DAYS]:{days:7},[tO.LAST_14_DAYS]:{days:14},[tO.LAST_MONTH]:{months:1}}[r];return{dateFrom:n.subtract(a).toString(),dateUntil:n.add({days:1}).toString()}}function tF({ratingAvailability:e}={},t=new Date){let r=e?.status||"unavailable",n=e?.editUntil||null;if(!e?.available||!["pending","editable"].includes(r))return{status:["pending","editable"].includes(r)?"unavailable":r,editUntil:n};let a=new Date("pending"===r?e.expiresAt:n),i=t instanceof Date?t:new Date(t);return Number.isFinite(a.getTime())&&Number.isFinite(i.getTime())?{status:("pending"===r?i>=a:i>a)?"pending"===r?"expired":"submitted":r,editUntil:n}:{status:"unavailable",editUntil:n}}function tq(e,t){return["pending","editable"].includes(tF(e,t).status)}function tU(e,t){return tP.has(e)&&[4,5].includes(Number(t))}function tz(e){let t=e?.id;return null==t?null:{id:String(t),name:e.nickname?.trim()||e.name?.trim()||"Embaixadora",avatarUrl:e.avatarUrl??e.avatar??null}}e.s(["RATING_PERIODS",0,tO,"RATING_PROBLEM_AREAS",0,tM,"canOfferProfessionalPreferences",0,tU,"getRatingAvailability",0,tF,"getRatingCompletionStep",0,function({state:e,rating:t,pendingProfessionals:r=[],tipPayment:n}){return tU(e,t)&&r.length>0?"preferences":4===Number(n?.paymentMethod)?"pix-tip":5===Number(t)?"high-rating":4===Number(t)?"medium-rating":"repair"},"getRatingPeriodBounds",0,tj,"isRatingAvailable",0,tq,"normalizeRatingPeriod",0,tN,"validateRatingForm",0,function(e){let t={};return e.rating||(t.rating="Insira uma avaliação de qualidade do serviço."),e.sympathyRating||(t.sympathyRating="Insira uma avaliação de simpatia."),e.punctualityRating||(t.punctualityRating="Insira uma avaliação de pontualidade."),Number(e.rating)>=1&&3>=Number(e.rating)&&!e.publicComment?.trim()&&(t.publicComment="O comentário é obrigatório para notas de 1 a 3."),t},"validateRepairRequest",0,function({problemArea:e,files:t}){let r={};return tM[e]||(r.problemArea="Selecione o tipo de reparo necessário."),["CQ","OB"].includes(e)&&0===t.length&&(r.files="Insira pelo menos uma foto."),t.some(e=>e.size>2097152)&&(r.files="Cada imagem deve ter no máximo 2 MB."),r}],629990);class tQ extends n{async list(e={},{signal:t}={}){let r=await this.client.request(function({period:e,limit:t=10,offset:r=0}={}){let{dateFrom:n,dateUntil:a}=tj(e),i=new URLSearchParams({date__gte:n,date__lt:a,limit:String(t),offset:String(r)});return`/api/v1/users/self/ratings/?${i.toString()}`}(e),{signal:t}),n=await r.json().catch(()=>null);if(!r.ok)throw Error(n?.message||n?.detail||"Não foi possível carregar suas avaliações.");return function(e,{offset:t=0,now:r}={}){let n=Array.isArray(e)?e:e?.results;if(!Array.isArray(n))throw Error("Não foi possível carregar suas avaliações.");let a=n.filter(e=>tq(e,r)).map(e=>(function(e,t){let r=e?.code;if(!r)return null;let n=Array.isArray(e.ambassadors)?e.ambassadors.map(tz).filter(Boolean):[],a=tF(e,t),i=Number(e.rating);return{id:String(e.id??r),code:String(r),description:e.descriptionProductName?.trim()||e.description?.trim()||"Serviço Tidmo",fullDescription:e.fullDescription?.trim()||e.descriptionProductName?.trim()||e.description?.trim()||"Serviço Tidmo",date:e.date??null,endTime:e.endTime??null,dateLabel:e.dateFormatted?.trim()||"",professionals:n,rating:null!==e.rating&&void 0!==e.rating&&Number.isFinite(i)?i:null,availability:a.status,editUntil:a.editUntil,state:e.state??null,paymentMethod:K(e.paymentMethod),clientEmail:e.clientEmail?.trim()||""}}
3)(e,r)).filter(Boolean),i=Math.max(0,Number(e?.count??n.length)||0),s=!!e?.next||t+n.length<i;return{items:a,total:i,hasMore:s,nextOffset:s&&n.length>0?t+n.length:void 0}}(n,{offset:e.offset??0})}async evaluate(e,t,{signal:r}={}){let n=await this.client.request(`/api/v1/requests/${encodeURIComponent(e)}/evaluate/`,{method:"PATCH",signal:r,body:JSON.stringify(t)}),a=await n.json().catch(()=>null);if(!n.ok)throw Error(a?.message||a?.detail||"Não foi possível salvar sua avaliação.");return a}async processTip(e,t,{signal:r}={}){let n=await this.client.request(`/api/v1/requests/${encodeURIComponent(e)}/process-tip/`,{method:"POST",signal:r,body:JSON.stringify({tipAmount:t})}),a=await n.json().catch(()=>null);if(!n.ok){let e=Error(a?.message||a?.detail||"Não foi possível processar a gorjeta.");throw e.status=n.status,e}return a}async listPreferredProfessionals({signal:e}={}){let t=await this.client.request("/api/v1/users/preferred-ambassadors/",{signal:e}),r=await t.json().catch(()=>null);return t.ok&&Array.isArray(r)?r.map(e=>e.id).filter(e=>null!=e).map(String):[]}async updatePreferredProfessionals(e,{signal:t}={}){let r=await this.client.request("/api/v1/users/preferred-ambassadors/",{method:"PATCH",signal:t,body:JSON.stringify({preferred_ambassadors:e})}),n=await r.json().catch(()=>null);if(!r.ok)throw Error(n?.message||n?.detail||"Não foi possível atualizar seus favoritos.");return n}async createRepairTicket(e,{problemArea:t,description:r,files:n},{signal:a}={}){let i=new FormData;i.append("problem_area",t),i.append("description",r||"Sem observações"),n.forEach(e=>i.append("attachments",e));let s=await this.client.request(`/api/v1/requests/${encodeURIComponent(e)}/tickets/`,{method:"POST",signal:a,body:i}),o=await s.json().catch(()=>null);if(!s.ok){let e=Error(413===s.status?"Os arquivos são muito grandes. Tente enviar imagens menores.":o?.message||o?.detail||"Não foi possível solicitar o reparo. Tente novamente.");throw e.status=s.status,e}return o}}function t_(e,t="Não foi possível finalizar a solicitação."){return"string"==typeof e?.detail?e.detail:e?.message||e?.error?e.message||e.error:function e(t){return t?"string"==typeof t?[t]:Array.isArray(t)?t.flatMap(e):"object"==typeof t?Object.values(t).flatMap(e):[]:[]}(e)[0]??t}class tL extends Error{constructor(e,{status:t,data:r}){super(e),this.name="SolicitationError",this.status=t,this.data=r}}class tB extends n{async list(e={},{signal:t}={}){let r,n,a,i=await this.client.request(function({tab:e="upcoming",search:t="",period:r="all",situation:n="active",hideCancelled:a=!1,attentionOnly:i=!1,showFutureCancelled:s=!1,limit:o=20,offset:l=0}={}){let c=new URLSearchParams;return e&&c.set("tab",e),t.trim()&&c.set("search",t.trim()),r&&c.set("period",r),n&&c.set("situation",n),a&&c.set("hideCancelled","true"),i&&c.set("attentionOnly","true"),s&&c.set("showFutureCancelled","true"),c.set("limit",String(o)),c.set("offset",String(l)),`/api/v1/users/self/solicitations/?${c.toString()}`}(e),{signal:t}),s=await i.json().catch(()=>null);if(!i.ok||!s||"object"!=typeof s)throw new tL(t_(s,"Não foi possível carregar as solicitações."),{status:i.status,data:s});return r=Array.isArray(s?.items)?s.items.map(j):[],n=Array.isArray(s?.futureCancelledItems)?s.futureCancelledItems.map(j):[],a=s?.counts||{},{items:r,futureCancelledItems:n,total:s?.total??r.length,hasMore:!!s?.hasMore,counts:{upcoming:a.upcoming??0,attention:a.attention??0,futureCancelled:a.futureCancelled??0},historyYears:s?.historyYears||[]}}async getById(e,{signal:t}={}){let r=await this.client.request(`/api/v1/requests/${encodeURIComponent(e)}/`,{signal:t}),n=await r.json().catch(()=>({}));if(!r.ok)throw new tL(t_(n,"Não foi possível carregar a solicitação."),{status:r.status,data:n});return n}async verifyCoupon({code:e,plan:t,request:r},{signal:n}={}){let a=await this.client.request("/api/v1/requests/verify-coupon/",{method:"POST",signal:n,body:JSON.stringify({code:e,plan:t,request:r})}),i=await a.json().catch(()=>({}));if(!a.ok||i?.error)throw new tL(t_(i,"Não foi possível validar o cupom."),{status:a.status,data:i});return i}async create(e,{signal:t}={}){let r=await this.client.request("/api/v2/solicitations/",{method:"POST",signal:t,body:JSON.stringify(e)}),n=await r.json().catch(()=>({}));if(!r.ok)throw new tL(t_(n),{status:r.status,data:n});return n}}async function t$(e,t){let r=await e.json().catch(()=>({})),n=Error(r?.message||r?.detail||function e(t){if("string"==typeof t&&t.trim())return t;if(!t||"object"!=typeof t)return null;for(let r of Object.values(t)){let t=e(r);if(t)return t}return null}(r)||t);return n.status=e.status,n.data=r,n}class tY extends n{async getMe(){let e=await this.client.request("/api/v1/users/self/");if(!e.ok)throw Error("Failed to get user info");return e.json()}async updateSelf(e,{signal:t}={}){let r=await this.client.request("/api/v1/users/self/",{method:"PATCH",signal:t,body:JSON.stringify(e)});if(!r.ok){let e=await r.json().catch(()=>({})),t=Error(e?.message||e?.detail||"Não foi possível atualizar seu cadastro.");throw t.status=r.status,t.data=e,t}return r.json()}async getDeletionBlockers({signal:e}={}){let t=await this.client.request("/api/v1/users/self/deletion-blockers/",{signal:e});if(!t.ok){let e=await t.json().catch(()=>({}
3)),r=Error(e?.message||e?.detail||"Não foi possível verificar sua conta.");throw r.status=t.status,r.data=e,r}return t.json()}async scheduleDeletion(e,{signal:t}={}){let r=await this.client.request("/api/v1/users/self/schedule-deletion-client/",{method:"POST",signal:t,body:JSON.stringify({reason:e})});if(!r.ok){let e=await r.json().catch(()=>({})),t=Error(e?.message||e?.detail||"Não foi possível solicitar a exclusão.");throw t.status=r.status,t.data=e,t}return r.json()}async getCards({signal:e}={}){let t=await this.client.request("/api/v1/users/self/cards/",{signal:e});if(!t.ok)throw Error("Não foi possível carregar seus cartões.");return t.json()}async getIndicationAwards({signal:e}={}){let t=await this.client.request("/api/v1/users/indication-awards-available/",{signal:e});if(!t.ok)throw Error("Não foi possível carregar seus cupons.");return t.json()}async getAddresses({signal:e}={}){let t=await this.client.request("/api/v1/users/me/locations/",{signal:e});if(!t.ok)throw Error("Não foi possível carregar seus endereços.");return t.json()}async updateAddressName(e,t,{signal:r}={}){let n=await this.client.request(`/api/v1/users/self/addresses/${encodeURIComponent(e)}/`,{method:"PATCH",signal:r,body:JSON.stringify({name:t})});if(!n.ok)throw await t$(n,"Não foi possível atualizar o nome do endereço.");return n.json()}async makeAddressDefault(e,{signal:t}={}){let r=await this.client.request(`/api/v1/users/self/addresses/${encodeURIComponent(e)}/make-default/`,{method:"POST",signal:t});if(!r.ok)throw await t$(r,"Não foi possível tornar este endereço padrão.");return r.json()}async deleteAddress(e,{signal:t}={}){let r=await this.client.request(`/api/v1/users/self/addresses/${encodeURIComponent(e)}/`,{method:"DELETE",signal:t});if(!r.ok)throw await t$(r,"Não foi possível remover este endereço.")}async makeCardDefault(e,{signal:t}={}){let r=await this.client.request(`/api/v1/users/self/cards/${encodeURIComponent(e)}/make-default/`,{method:"POST",signal:t});if(!r.ok)throw await t$(r,"Não foi possível tornar este cartão padrão.");return r.json()}async deleteCard(e,{signal:t}={}){let r=await this.client.request(`/api/v1/users/self/cards/${encodeURIComponent(e)}/`,{method:"DELETE",signal:t});if(!r.ok)throw await t$(r,"Não foi possível remover este cartão.")}}let tZ={"X-App-Version":"0.0.0","X-Platform":"unknown","X-Client-Type":"tidmo-site"};function tH(e={}){return{...!("u">typeof FormData&&e.body instanceof FormData)&&{"Content-Type":"application/json"},...tZ,...e.headers}}let tK="production_test",tJ="tidmo.productionTestToken",tG="tidmo:production-test-change";function tV(){let e=new URL(window.location.href),t=e.searchParams.get(tK);return t&&(window.sessionStorage.setItem(tJ,t),e.searchParams.delete(tK),window.history.replaceState(window.history.state,"",e.toString()),window.dispatchEvent(new CustomEvent(tG,{detail:{active:!0}}))),window.sessionStorage.getItem(tJ)}function tW(){window.sessionStorage.removeItem(tJ),window.dispatchEvent(new CustomEvent(tG,{detail:{active:!1}}))}e.s(["PRODUCTION_TEST_CHANGE_EVENT",0,tG,"clearProductionTest",0,tW,"initializeProductionTest",0,tV],167054);let tX="/api/v1/production-tests/current/";function t0(e,t){return btoa(`${e}:${t}`)}let t1=t0("5fvhl1wmjqpt4hA58GqxZlk6P471nNLw8omAA4of","CI2Wq2LRUn3SIXnwWGUXcBguRRpKtDCZ8hcifgOExOMCSUHvAzI8NQdCumBZIXSX0RLNWc9s6avoU564rjB4kXZlTxViHjGDFiaEibT03p9AliRJH3DSzKoQA8QkX2IF"),t5=t0("XJWzJxvMlD4P8HiFnHkns9suto8ML6S6wejYXr4p","Ud0F15SwG4K2JeIdNdmbBoIPOFpZABaRAPm8TjgwLwVmznvnch4KajJwVhCV69YdDF1b4kh8DJL9JpuUMWbnpqIuHTEQThlRb7r55PJKNakKfJ6YFxXwsx6b2Ra5fphG"),t3={name:"name",phone:"phone",username:"email",email:"email",document:"document",password:"password"};class t6{ambassadors=new b(this);cards=new a(this);cancellations=new v(this);config=new g(this);contacts=new S(this);files=new A(this);locations=new C(this);leads=new E(this);legalDocuments=new x(this);loyaltyProgram=new O(this);overview=new q(this);overdueSettlement=new B(this);payments=new V(this);plans=new ee(this);referralProgram=new ei(this);ratings=new tQ(this);solicitations=new tB(this);users=new tY(this);baseUrl="https://api.tidmo.com.br";publicAccessToken=null;publicTokenPromise=null;isRefreshing=!1;failedQueue=[];productionTestValidationPromise=null;processQueue(e,t){this.failedQueue.forEach(r=>{e?r.reject(e):r.resolve(t)}),this.failedQueue=[]}async request(e,n={},{isRetry:a=!1}={}){await t.init();let i=`${this.baseUrl}${e}`,s=tH(n),o=tV();o&&(s["X-Production-Test-Token"]=o);let l=t.get("session"),c=l?.accessToken??null;c?s.Authorization=`Bearer ${c}`:(this.publicAccessToken||(this.publicAccessToken=l?.publicToken??null),this.publicAccessToken||await this.fetchPublicToken(),s.Authorization=`Bearer ${this.publicAccessToken}`);let u=await fetch(i,{...n,headers:s});if(403===u.status&&o&&e!==tX&&this.validateProductionTest().catch(()=>{}),401===u.status&&a){if(c)throw await r.DEPRECATED_AUTH_COMPAT.clearSession(),Error("Session expired");return u}if(401===u.status)if(!c)return this.publicAccessToken=null,await this.fetchPublicToken(),this.request(e,n,{isRetry:!0});else{if(this.isRefreshing)return new Promise((e,t)=>
3{this.failedQueue.push({resolve:e,reject:t})}).then(()=>this.request(e,n,{isRetry:!0}));this.isRefreshing=!0;try{if(await this.refreshToken())return this.processQueue(null,t.get("session").accessToken),this.isRefreshing=!1,this.request(e,n,{isRetry:!0});throw this.processQueue(Error("Session expired")),await r.DEPRECATED_AUTH_COMPAT.clearSession(),Error("Session expired")}catch(e){throw this.processQueue(e),this.isRefreshing=!1,e}}return u}async validateProductionTest(){if(!tV())return{active:!1};if(this.productionTestValidationPromise)return this.productionTestValidationPromise;this.productionTestValidationPromise=(async()=>{let e=await this.request(tX);if(403===e.status)return tW(),{active:!1};if(!e.ok)throw Error(`Unable to validate production test mode (${e.status})`);let t=await e.json();return t.active||tW(),t})();try{return await this.productionTestValidationPromise}finally{this.productionTestValidationPromise=null}}async login(e,r){await t.init();let n=await fetch(`${this.baseUrl}/api/v1/o/token/`,{method:"POST",headers:{Authorization:`Basic ${t1}`,"Content-Type":"application/json"},body:JSON.stringify({grant_type:"password",username:e,password:r})});if(!n.ok){let e=await n.json().catch(()=>({})),t=e.error_description||"Ocorreu um erro ao tentar fazer login. Tente novamente em instantes.";throw"invalid_grant"===e.error&&(t="E-mail ou senha incorretos. Tente novamente."),"email_not_exists"===e.error&&(t="E-mail não cadastrado. Cadastre-se para continuar."),Error(t)}let a=await n.json();return await this.storeTokens({accessToken:a.access_token||a.accessToken,refreshToken:a.refresh_token||a.refreshToken,expiresIn:a.expires_in||a.expiresIn}),a}async signup({name:e,phone:r,email:n,password:a,document:i,termsVersion:s,termsAccepted:o,turnstileToken:l}){await t.init();let c=await fetch(`${this.baseUrl}/api/v1/o/signup/`,{method:"POST",headers:tH({headers:{Authorization:`Basic ${t1}`}}),body:JSON.stringify({grant_type:"password",name:e,phone:r,username:n,password:a,document:i,termsVersion:s,termsAccepted:o,turnstileToken:l})});if(!c.ok){let e=await c.json().catch(()=>({})),t=function(e){let t={};for(let r of[e,e?.errors].filter(e=>e&&"object"==typeof e&&!Array.isArray(e)))for(let[e,n]of Object.entries(r)){let r=t3[e],a=r?function e(t){return"string"==typeof t?t.trim()?[t]:[]:t&&"object"==typeof t?Object.values(t).flatMap(e):[]}(n):[];a.length>0&&(t[r]=[...t[r]??[],...a])}return t}(e),r=Error(e.error_description||e.message||e.detail||(Object.keys(t).length>0?"Revise os campos destacados e tente novamente.":"Ocorreu um erro ao tentar criar sua conta. Tente novamente em instantes."));throw r.fieldErrors=t,r.status=c.status,r.data=e,r}let u=await c.json();return await this.storeTokens({accessToken:u.access_token||u.accessToken,refreshToken:u.refresh_token||u.refreshToken,expiresIn:u.expires_in||u.expiresIn}),u}async logout(){await t.init();let e=t.get("session");await r.DEPRECATED_AUTH_COMPAT.clearSession(),e?.refreshToken&&await fetch(`${this.baseUrl}/api/v1/o/revoke_token/`,{method:"POST",headers:{Authorization:`Basic ${t1}`,"Content-Type":"application/json"},body:JSON.stringify({token:e.refreshToken,token_type_hint:"refresh_token"})}).catch(()=>{})}async fetchPublicToken(){if(await t.init(),this.publicTokenPromise)return this.publicTokenPromise;this.publicTokenPromise=(async()=>{let e=await fetch(`${this.baseUrl}/api/v1/o/token/`,{method:"POST",headers:{Authorization:`Basic ${t5}`,"Content-Type":"application/json"},body:JSON.stringify({grant_type:"client_credentials"})});if(!e.ok)throw Error("Failed to obtain public token");let r=await e.json();this.publicAccessToken=r.access_token||r.accessToken;let n=t.get("session");return await t.write("session",{accessToken:n?.accessToken??null,refreshToken:n?.refreshToken??null,publicToken:this.publicAccessToken}),this.publicAccessToken})();try{return await this.publicTokenPromise}finally{this.publicTokenPromise=null}}async refreshToken(){await t.init();let e=t.get("session")?.refreshToken;if(!e)return!1;try{let t=await fetch(`${this.baseUrl}/api/v1/o/token/`,{method:"POST",headers:{Authorization:`Basic ${t1}`,"Content-Type":"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:e})});if(!t.ok)return!1;let r=await t.json();return await this.storeTokens({accessToken:r.access_token||r.accessToken,refreshToken:r.refresh_token||r.refreshToken,expiresIn:r.expires_in||r.expires
3In}),!0}catch{return!1}}async storeTokens({accessToken:e,refreshToken:n,expiresIn:a}){let i=t.get("session");await t.write("session",{accessToken:e,refreshToken:n??i?.refreshToken??null,publicToken:i?.publicToken??null}),r.DEPRECATED_AUTH_COMPAT.syncCookie({accessToken:e,expiresIn:a})}}let t9=new t6;e.s(["apiClient",0,t9],986287)},818673,e=>{"use strict";var t=e.i(207670),r=e.i(919056);e.s(["cn",0,function(...e){return(0,r.twMerge)((0,t.default)(e))}])}]);
4
5//# debugId=54948817-1c27-fe09-5da4-b70ed2cde6da

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.