vendor: 9,105 bytes, line 1
1import{Y as X,Z as L,$ as f,a0 as j,a1 as x,a2 as _,a3 as Q,a4 as N,a5 as Z,a6 as T,a7 as q,a8 as ee,a9 as B,aa as G,r as p,ab as J,ac as te,ad as z,k as se,j as o,X as ie,ae as re,af as ne}from"./index-CX8MQMhI.js";var ae=class extends X{constructor(e,t){super(),this.options=t,this.#s=e,this.#r=null,this.#i=L(),this.bindMethods(),this.setOptions(t)}#s;#e=void 0;#p=void 0;#t=void 0;#a;#c;#i;#r;#g;#u;#d;#o;#h;#n;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),W(this.#e,this.options)?this.#l():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return P(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return P(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#x(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,i=this.#e;if(this.options=this.#s.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof f(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#e.setOptions(this.options),t._defaulted&&!j(this.options,t)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const s=this.hasListeners();s&&H(this.#e,i,this.options,t)&&this.#l(),this.updateResult(),s&&(this.#e!==i||f(this.options.enabled,this.#e)!==f(t.enabled,this.#e)||x(this.options.staleTime,this.#e)!==x(t.staleTime,this.#e))&&this.#b();const a=this.#m();s&&(this.#e!==i||f(this.options.enabled,this.#e)!==f(t.enabled,this.#e)||a!==this.#n)&&this.#y(a)}getOptimisticResult(e){const t=this.#s.getQueryCache().build(this.#s,e),i=this.createResult(t,e);return he(this,i)&&(this.#t=i,this.#c=this.options,this.#a=this.#e.state),i}getCurrentResult(){return this.#t}trackResult(e,t){return new Proxy(e,{get:(i,s)=>(this.trackProp(s),t?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,s))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#s.defaultQueryOptions(e),i=this.#s.getQueryCache().build(this.#s,t);return i.fetch().then(()=>this.createResult(i,t))}fetch(e){return this.#l({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#t))}#l(e){this.#S();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(_)),t}#b(){this.#R();const e=x(this.options.staleTime,this.#e);if(Q.isServer()||this.#t.isStale||!N(e))return;const i=Z(this.#t.dataUpdatedAt,e)+1;this.#o=T.setTimeout(()=>{this.#t.isStale||this.updateResult()},i)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#y(e){this.#x(),this.#n=e,!(Q.isServer()||f(this.options.enabled,this.#e)===!1||!N(this.#n)||this.#n===0)&&(this.#h=T.setInterval(()=>{(this.options.refetchIntervalInBackground||q.isFocused())&&this.#l()},this.#n))}#v(){this.#b(),this.#y(this.#m())}#R(){this.#o!==void 0&&(T.clearTimeout(this.#o),this.#o=void 0)}#x(){this.#h!==void 0&&(T.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){const i=this.#e,s=this.options,a=this.#t,c=this.#a,h=this.#c,g=e!==i?e.state:this.#p,{state:m}=e;let n={...m},r=!1,l;if(t._optimisticResults){const d=this.hasListeners(),R=!d&&W(e,t),E=d&&H(e,i,t,s);(R||E)&&(n={...n,...ee(m.data,e.options)}),t._optimisticResults==="isRestoring"&&(n.fetchStatus="idle")}let{error:v,errorUpdatedAt:S,status:y}=n;l=n.data;let k=!1;if(t.placeholderData!==void 0&&l===void 0&&y==="pending"){let d;a?.isPlaceholderData&&t.placeholderData===h?.placeholderData?(d=a.data,k=!0):d=typeof t.placeholderData=="function"?t.placeholderData(this.#d?.state.data,this.#d):t.placeholderData,d!==void 0&&(y="success",l=B(a?.data,d,t),r=!0)}if(t.select&&l!==void 0&&!k)if(a&&l===c?.data&&t.select===this.#g)l=this.#u;else try{this.#g=t.select,l=t.select(l),l=B(a?.data,l,t),this.#u=l,this.#r=null}catch(d){this.#r=d}this.#r&&(v=this.#r,l=this.#u,S=Date.now(),y="error");const w=n.fetchStatus==="fetching",I=y==="pending",M=y==="error",D=I&&w,F=l!==void 0,b={status:y,fetchStatus:n.fetchStatus,isPending:I,isSuccess:y==="success",isError:M,isInitialLoading:D,isLoading:D,data:l,dataUpdatedAt:n.dataUpdatedAt,error:v,errorUpdatedAt:S,failureCount:n.fetchFailureCount,failureReason:n.fetchFailureReason,errorUpdateCount:n.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:n.dataUpdateCount>g.dataUpdateCount||n.errorUpdateCount>g.errorUpdateCount,isFetching:w,isRefetching:w&&!I,isLoadingError:M&&!F,isPaused:n.fetchStatus==="paused",isPlaceholderData:r,isRefetchError:M&&F,isStale:U(e,t),refetch:this.refetch,promise:this.#i,isEnabled:f(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const d=b.data!==void 0,R=b.status==="error"&&!d,E=C=>{R?C.reject(b.error):d&&C.resolve(b.data)},A=()=>{const C=this.#i=b.promise=L();E(C)},O=this.#i;switch(O.status){case"pending":e.queryHash===i.queryHash&&E(O);break;case"fulfilled":(R||b.data!==O.value)&&A();break;case"rejected":(!R||b.error!==O.reason)&&A();break}}return b}updateResult(){const e=this.#t,t=this.createResult(this.#e,this.options);if(this.#a=this.#e.state,this.#c=this.options,this.#a.data!==void 0&&(this.#d=this.#e),j(t,e))return;this.#t=t;const i=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!this.#f.size)return!0;const c=new Set(a??this.#f);return this.options.throwOnError&&c.add("error"),Object.keys(this.#t).some(h=>{const u=h;return this.#t[u]!==e[u]&&c.has(u)})};this.#E({listeners:i()})}#S(){const e=this.#s.getQueryCache().build(this.#s,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#p=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#E(e){G.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#t)}),this.#s.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function oe(e,t){return f(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&f(t.retryOnMount,e)===!1)}function W(e,t){return oe(e,t)||e.state.data!==void 0&&P(e,t,t.refetchOnMount)}function P(e,t,i){if(f(t.enabled,e)!==!1&&x(t.staleTime,e)!=="static"){const s=typeof i=="function"?i(e):i;return s==="always"||s!==!1&&U(e,t)}return!1}function H(e,t,i,s){return(e!==t||f(s.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&U(e,i)}function U(e,t){return f(t.enabled,e)!==!1&&e.isStaleByTime(x(t.staleTime,e))}function he(e,t){return!j(e.getCurrentResult(),t)}var K=p.createContext(!1),le=()=>p.useContext(K);K.Provider;function ce(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ue=p.createContext(ce()),de=()=>p.useContext(ue),fe=(e,t,i)=>{const s=i?.state.error&&typeof e.throwOnError=="function"?J(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},pe=e=>{p.useEffect(()=>{e.clearReset()},[e])},ge=({result:e,errorResetBoundary:t,throwOnError:i,query:s,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(a&&e.data===void 0||J(i,[e.error,s])),be=(e,t)=>t.state.data===void 0,me=e=>{if(e.suspense){const i=a=>a==="static"?a:Math.max(a??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...a)=>i(s(...a)):i(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},ye=(e,t)=>e.isLoading&&e.isFetching&&!t,ve=(e,t)=>e?.suspense&&t.isPending,Y=(e,t,i)=>t.fetchOptimistic(e).catch(()=>{i.clearReset()});function Re(e,t,i){const s=le(),a=de(),c=te(),h=c.defaultQueryOptions(e);c.getDefaultOptions().queries?._experimental_beforeQuery?.(h);const u=c.getQueryCache().get(h.queryHash),g=e.subscribed!==!1;h._optimisticResults=s?"isRestoring":g?"optimistic":void 0,me(h),fe(h,a,u),pe(a);const m=!c.getQueryCache().get(h.queryHash),[n]=p.useState(()=>new t(c,h)),r=n.getOptimisticResult(h),l=!s&&g;if(p.useSyncExternalStore(p.useCallback(v=>{const S=l?n.subscribe(G.batchCalls(v)):_;return n.updateResult(),S},[n,l]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),p.useEffect(()=>{n.setOptions(h)},[h,n]),ve(h,r))throw Y(h,n,a);if(ge({result:r,errorResetBoundary:a,throwOnError:h.throwOnError,query:u,suspense:h.suspense}))throw r.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(h,r),h.experimental_prefetchInRender&&!Q.isServer()&&ye(r,s)&&(m?Y(h,n,a):u?.promise)?.catch(_).finally(()=>{n.updateResult()}),h.notifyOnChangeProps?r:n.trackResult(r)}function xe(e,t){return Re({...e,enabled:!0,suspense:!0,throwOnError:be,placeholderData:void 0},ae)}const Se=["JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"],$=e=>
1"$"+Math.round(e).toLocaleString("en-US");function Ce(){const{y:e,m:t}=z.useSearch(),i=se({from:z.fullPath}),{data:s}=xe(ne(e,t)),[a,c]=p.useState(!1);if(p.useEffect(()=>c(!0),[]),!s)return null;const h=s.months.findIndex(r=>r.year===s.year&&r.month===s.month),u=h>=0?s.months[h+1]:s.months[0],g=h>0?s.months[h-1]:void 0,m=r=>{r&&i({search:{y:r.year,m:r.month}})},n=Math.max(1,...s.rows.map(r=>r.alp));return o.jsxs(ie,{children:[o.jsxs("div",{style:{border:"1px solid rgba(217,173,92,0.18)",borderRadius:18,background:"linear-gradient(180deg, rgba(33,36,41,0.96) 0%, rgba(22,24,28,0.96) 100%)",boxShadow:"0 24px 60px rgba(0,0,0,0.45)",padding:"22px 24px 26px"},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[o.jsx("span",{style:{color:"#9aa1ad",fontSize:11,letterSpacing:"0.18em",fontWeight:600},children:"MONTHLY LEADERBOARD"}),o.jsx("span",{style:{color:"#7fb4ff",fontSize:11,letterSpacing:"0.05em"},children:"â Live"})]}),o.jsxs("div",{style:{marginTop:18,display:"grid",gridTemplateColumns:"32px 1fr 32px",alignItems:"center"},children:[o.jsx("button",{type:"button","aria-label":"Previous month",disabled:!u,onClick:()=>m(u),style:V(!!u),children:"â¹"}),o.jsxs("div",{style:{textAlign:"center"},children:[o.jsxs("div",{style:{color:"#d9ad5c",fontSize:12,letterSpacing:"0.22em",fontWeight:600},children:[Se[s.month-1]," ",s.year]}),o.jsx("h1",{style:{margin:"10px 0 0",color:"#e8c987",fontSize:42,fontWeight:400,letterSpacing:"0.01em",fontFamily:"Georgia, 'Times New Roman', serif"},children:$(s.total_alp)}),o.jsxs("div",{style:{color:"#8b929d",fontSize:12,marginTop:6},children:[s.producer_count," producer",s.producer_count===1?"":"s",a&&o.jsxs(o.Fragment,{children:[" · updated ",new Date(s.updated_at).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})]})]})]}),o.jsx("button",{type:"button","aria-label":"Next month",disabled:!g,onClick:()=>m(g),style:V(!!g),children:"âº"})]}),o.jsxs("ol",{style:{listStyle:"none",margin:"26px 0 0",padding:0},children:[s.rows.map(r=>o.jsxs("li",{style:{display:"flex",gap:14,alignItems:"flex-start",marginBottom:16},children:[o.jsx("span",{style:{color:r.rank<=3?"#d9ad5c":"#6f7681",fontFamily:"Georgia, serif",fontSize:16,width:18,textAlign:"right",paddingTop:1},children:r.rank}),o.jsxs("span",{style:{flex:1},children:[o.jsxs("span",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[o.jsx("span",{style:{color:"#f3f0ea",fontSize:14,fontWeight:500},children:r.agent_name}),o.jsxs("span",{style:{whiteSpace:"nowrap"},children:[o.jsxs("span",{style:{color:"#8b929d",fontSize:12,marginRight:10},children:[r.deals," deal",r.deals===1?"":"s"]}),o.jsx("span",{style:{color:"#f3f0ea",fontSize:14,fontWeight:600},children:$(r.alp)})]})]}),o.jsx("span",{style:{display:"block",marginTop:7,height:3,borderRadius:2,background:"rgba(255,255,255,0.07)"},children:o.jsx("span",{style:{display:"block",height:3,borderRadius:2,width:`${Math.max(4,r.alp/n*100)}%`,background:r.rank===1?"linear-gradient(90deg,#d9ad5c,#f0d9a0)":"linear-gradient(90deg,#3f5c86,#5b82b8)"}})})]})]},`${r.rank}-${r.agent_name}`)),s.rows.length===0&&o.jsx("li",{style:{color:"#8b929d",fontSize:13,textAlign:"center",padding:"18px 0"},children:"No deals posted for this month yet."})]})]}),o.jsx("div",{style:{textAlign:"center",marginTop:18},children:o.jsx(re,{to:"/",style:{color:"#6f7681",fontSize:12,textDecoration:"none"},children:"â Mob Website"})})]})}function V(e){return{width:32,height:32,borderRadius:"50%",border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.03)",color:e?"#c7ccd4":"#4a5058",cursor:e?"pointer":"default",fontSize:16,lineHeight:1}}export{Ce as component};
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.