@xcpcio/board-app 0.52.0 → 0.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/404.html +1 -1
- package/dist/assets/Board-b5bf1828.js +1 -0
- package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-11e5a08c.js → DataSourceInput.vue_vue_type_script_setup_true_lang-47ff726d.js} +1 -1
- package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-9cc92a14.js +1 -0
- package/dist/assets/{_...all_-905784b3.js → _...all_-80d9c58d.js} +1 -1
- package/dist/assets/{_...all_-85910c2a.js → _...all_-efc1d81f.js} +2 -2
- package/dist/assets/{_name_-203db09f.js → _name_-5f588c5c.js} +1 -1
- package/dist/assets/{about-d9d865e0.js → about-86489903.js} +1 -1
- package/dist/assets/board-428898fa.js +1 -0
- package/dist/assets/{board-layout-967802f4.js → board-layout-f4b42426.js} +1 -1
- package/dist/assets/{headless-f3f3253c.js → headless-464cd216.js} +1 -1
- package/dist/assets/{home-3d9e3102.js → home-1c2da293.js} +1 -1
- package/dist/assets/{index-b97b2d45.js → index-1426f0a6.js} +1 -1
- package/dist/assets/{index-c827bc8f.css → index-5271d2f0.css} +1 -1
- package/dist/assets/index-8a3db893.js +1 -0
- package/dist/assets/{index-43f8e0d3.css → index-ae8b398e.css} +1 -1
- package/dist/assets/index-c4a296e0.js +25 -0
- package/dist/assets/{index-1e2a1259.js → index-f813b721.js} +3 -3
- package/dist/assets/{index-0095f855.js → index-fe6090d1.js} +1 -1
- package/dist/assets/{index-layout-5a67cc99.js → index-layout-6dbef8c0.js} +1 -1
- package/dist/assets/{pagination-6eac914a.js → pagination-959b8075.js} +1 -1
- package/dist/assets/{query-ff21040c.js → query-8d6474f1.js} +1 -1
- package/dist/assets/{test-5dd32cac.js → test-ce57205f.js} +1 -1
- package/dist/assets/{user-cd9a56f6.js → user-5e4a4fb1.js} +1 -1
- package/dist/assets/{virtual_pwa-register-ff5720d1.js → virtual_pwa-register-ab60e448.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +4 -3
- package/src/components/Resolver.vue +109 -24
- package/dist/assets/Board-04b0589d.js +0 -1
- package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-f91fd6e0.js +0 -1
- package/dist/assets/board-3f91f491.js +0 -1
- package/dist/assets/index-86ef642b.js +0 -1
- package/dist/assets/index-d51c6c02.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var q=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var s=(i,t,e)=>(q(i,t,"read from private field"),e?e.call(i):t.get(i)),u=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},l=(i,t,e,n)=>(q(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e);var f=(i,t,e)=>(q(i,t,"access private method"),e);import{ax as It,ay as O,az as tt,aA as Y,aB as Qt,aC as ft,aD as pt,aE as Et,aF as Dt,aG as Ft,aH as bt,aI as Tt,aJ as Ut,aK as jt,aL as xt,h as Ot,aM as Pt,aN as Mt,v as H,aO as yt,aP as At,aQ as vt,aR as Lt,aS as $t,al as St}from"./index-1e2a1259.js";var y,a,N,b,E,P,g,W,M,A,D,F,w,L,T,$,_,et,B,st,k,it,V,nt,z,at,K,rt,G,ot,J,Ct,gt,Nt=(gt=class extends It{constructor(t,e){super();u(this,T);u(this,_);u(this,B);u(this,k);u(this,V);u(this,z);u(this,K);u(this,G);u(this,J);u(this,y,void 0);u(this,a,void 0);u(this,N,void 0);u(this,b,void 0);u(this,E,void 0);u(this,P,void 0);u(this,g,void 0);u(this,W,void 0);u(this,M,void 0);u(this,A,void 0);u(this,D,void 0);u(this,F,void 0);u(this,w,void 0);u(this,L,new Set);this.options=e,l(this,y,t),l(this,g,null),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(s(this,a).addObserver(this),mt(s(this,a),this.options)?f(this,T,$).call(this):this.updateResult(),f(this,V,nt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ht(s(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ht(s(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,f(this,z,at).call(this),f(this,K,rt).call(this),s(this,a).removeObserver(this)}setOptions(t,e){const n=this.options,o=s(this,a);if(this.options=s(this,y).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof O(this.options.enabled,s(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");f(this,G,ot).call(this),s(this,a).setOptions(this.options),n._defaulted&&!tt(this.options,n)&&s(this,y).getQueryCache().notify({type:"observerOptionsUpdated",query:s(this,a),observer:this});const r=this.hasListeners();r&&Rt(s(this,a),o,this.options,n)&&f(this,T,$).call(this),this.updateResult(e),r&&(s(this,a)!==o||O(this.options.enabled,s(this,a))!==O(n.enabled,s(this,a))||Y(this.options.staleTime,s(this,a))!==Y(n.staleTime,s(this,a)))&&f(this,_,et).call(this);const c=f(this,B,st).call(this);r&&(s(this,a)!==o||O(this.options.enabled,s(this,a))!==O(n.enabled,s(this,a))||c!==s(this,w))&&f(this,k,it).call(this,c)}getOptimisticResult(t){const e=s(this,y).getQueryCache().build(s(this,y),t),n=this.createResult(e,t);return _t(this,n)&&(l(this,b,n),l(this,P,this.options),l(this,E,s(this,a).state)),n}getCurrentResult(){return s(this,b)}trackResult(t,e){const n={};return Object.keys(t).forEach(o=>{Object.defineProperty(n,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),e==null||e(o),t[o])})}),n}trackProp(t){s(this,L).add(t)}getCurrentQuery(){return s(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=s(this,y).defaultQueryOptions(t),n=s(this,y).getQueryCache().build(s(this,y),e);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,e))}fetch(t){return f(this,T,$).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),s(this,b)))}createResult(t,e){var dt;const n=s(this,a),o=this.options,r=s(this,b),c=s(this,E),p=s(this,P),I=t!==n?t.state:s(this,N),{state:v}=t;let d={...v},Q=!1,h;if(e._optimisticResults){const m=this.hasListeners(),Z=!m&&mt(t,e),wt=m&&Rt(t,n,e,o);(Z||wt)&&(d={...d,...Ft(v.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:S,errorUpdatedAt:U,status:R}=d;if(e.select&&d.data!==void 0)if(r&&d.data===(c==null?void 0:c.data)&&e.select===s(this,W))h=s(this,M);else try{l(this,W,e.select),h=e.select(d.data),h=bt(r==null?void 0:r.data,h,e),l(this,M,h),l(this,g,null)}catch(m){l(this,g,m)}else h=d.data;if(e.placeholderData!==void 0&&h===void 0&&R==="pending"){let m;if(r!=null&&r.isPlaceholderData&&e.placeholderData===(p==null?void 0:p.placeholderData))m=r.data;else if(m=typeof e.placeholderData=="function"?e.placeholderData((dt=s(this,A))==null?void 0:dt.state.data,s(this,A)):e.placeholderData,e.select&&m!==void 0)try{m=e.select(m),l(this,g,null)}catch(Z){l(this,g,Z)}m!==void 0&&(R="success",h=bt(r==null?void 0:r.data,m,e),Q=!0)}s(this,g)&&(S=s(this,g),h=s(this,M),U=Date.now(),R="error");const j=d.fetchStatus==="fetching",x=R==="pending",X=R==="error",ct=x&&j,lt=h!==void 0;return{status:R,fetchStatus:d.fetchStatus,isPending:x,isSuccess:R==="success",isError:X,isInitialLoading:ct,isLoading:ct,data:h,dataUpdatedAt:d.dataUpdatedAt,error:S,errorUpdatedAt:U,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>I.dataUpdateCount||d.errorUpdateCount>I.errorUpdateCount,isFetching:j,isRefetching:j&&!x,isLoadingError:X&&!lt,isPaused:d.fetchStatus==="paused",isPlaceholderData:Q,isRefetchError:X&<,isStale:ut(t,e),refetch:this.refetch}}updateResult(t){const e=s(this,b),n=this.createResult(s(this,a),this.options);if(l(this,E,s(this,a).state),l(this,P,this.options),s(this,E).data!==void 0&&l(this,A,s(this,a)),tt(n,e))return;l(this,b,n);const o={},r=()=>{if(!e)return!0;const{notifyOnChangeProps:c}=this.options,p=typeof c=="function"?c():c;if(p==="all"||!p&&!s(this,L).size)return!0;const C=new Set(p??s(this,L));return this.options.throwOnError&&C.add("error"),Object.keys(s(this,b)).some(I=>{const v=I;return s(this,b)[v]!==e[v]&&C.has(v)})};(t==null?void 0:t.listeners)!==!1&&r()&&(o.listeners=!0),f(this,J,Ct).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&f(this,V,nt).call(this)}},y=new WeakMap,a=new WeakMap,N=new WeakMap,b=new WeakMap,E=new WeakMap,P=new WeakMap,g=new WeakMap,W=new WeakMap,M=new WeakMap,A=new WeakMap,D=new WeakMap,F=new WeakMap,w=new WeakMap,L=new WeakMap,T=new WeakSet,$=function(t){f(this,G,ot).call(this);let e=s(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(Qt)),e},_=new WeakSet,et=function(){f(this,z,at).call(this);const t=Y(this.options.staleTime,s(this,a));if(ft||s(this,b).isStale||!pt(t))return;const n=Et(s(this,b).dataUpdatedAt,t)+1;l(this,D,setTimeout(()=>{s(this,b).isStale||this.updateResult()},n))},B=new WeakSet,st=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(s(this,a)):this.options.refetchInterval)??!1},k=new WeakSet,it=function(t){f(this,K,rt).call(this),l(this,w,t),!(ft||O(this.options.enabled,s(this,a))===!1||!pt(s(this,w))||s(this,w)===0)&&l(this,F,setInterval(()=>{(this.options.refetchIntervalInBackground||Dt.isFocused())&&f(this,T,$).call(this)},s(this,w)))},V=new WeakSet,nt=function(){f(this,_,et).call(this),f(this,k,it).call(this,f(this,B,st).call(this))},z=new WeakSet,at=function(){s(this,D)&&(clearTimeout(s(this,D)),l(this,D,void 0))},K=new WeakSet,rt=function(){s(this,F)&&(clearInterval(s(this,F)),l(this,F,void 0))},G=new WeakSet,ot=function(){const t=s(this,y).getQueryCache().build(s(this,y),this.options);if(t===s(this,a))return;const e=s(this,a);l(this,a,t),l(this,N,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},J=new WeakSet,Ct=function(t){Tt.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(s(this,b))}),s(this,y).getQueryCache().notify({query:s(this,a),type:"observerResultsUpdated"})})},gt);function Wt(i,t){return O(t.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&t.retryOnMount===!1)}function mt(i,t){return Wt(i,t)||i.state.data!==void 0&&ht(i,t,t.refetchOnMount)}function ht(i,t,e){if(O(t.enabled,i)!==!1){const n=typeof e=="function"?e(i):e;return n==="always"||n!==!1&&ut(i,t)}return!1}function Rt(i,t,e,n){return(i!==t||O(n.enabled,i)===!1)&&(!e.suspense||i.state.status!=="error")&&ut(i,e)}function ut(i,t){return O(t.enabled,i)!==!1&&i.isStaleByTime(Y(t.staleTime,i))}function _t(i,t){return!tt(i.getCurrentResult(),t)}function Bt(i=""){if(!Ut())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=xt(i),e=jt(t);if(!e)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return e}function kt(i,t,e){const n=e||Bt(),o=Ot(()=>{const h=Pt(t);typeof h.enabled=="function"&&(h.enabled=h.enabled());const S=n.defaultQueryOptions(h);return S._optimisticResults=n.isRestoring.value?"isRestoring":"optimistic",S}),r=new i(n,o.value),c=Mt(r.getCurrentResult());let p=()=>{};H(n.isRestoring,h=>{h||(p(),p=r.subscribe(S=>{yt(c,S)}))},{immediate:!0});const C=()=>{r.setOptions(o.value),yt(c,r.getCurrentResult())};H(o,C),At(()=>{p()});const I=(...h)=>(C(),c.refetch(...h)),v=()=>new Promise((h,S)=>{let U=()=>{};const R=()=>{if(o.value.enabled!==!1){r.setOptions(o.value);const j=r.getOptimisticResult(o.value);j.isStale?(U(),r.fetchOptimistic(o.value).then(h,x=>{vt(o.value.throwOnError,[x,r.getCurrentQuery()])?S(x):h(r.getCurrentResult())})):(U(),h(j))}};R(),U=H(o,R)});H(()=>c.error,h=>{if(c.isError&&!c.isFetching&&vt(o.value.throwOnError,[h,r.getCurrentQuery()]))throw h});const Q=Lt(c);for(const h in c)typeof c[h]=="function"&&(Q[h]=c[h]);return Q.suspense=v,Q.refetch=I,Q}function Vt(i,t){return kt(Nt,i,t)}const zt=3;async function Kt(i,t){const e=i.startsWith("/")?i.slice(1):i;let n=`${window.DATA_HOST}${e}`;i.startsWith("http")&&(n=i),n.endsWith("/")&&(n=n.slice(0,-1));const o=await fetch(`${n}/config.json?t=${t??0}`),r=await fetch(`${n}/team.json?t=${t??0}`),c=await fetch(`${n}/run.json?t=${t??0}`),{status:p,statusText:C}=o;if(p>=300||p<200)throw new Error(`fetch data failed. [status=${p}] [statusText=${C}]`);return Promise.all([o.json(),r.json(),c.json()]).then(v=>({contest:v[0],teams:v[1],submissions:v[2]}))}function Jt(i,t,e=!1){let n=3e4,o=n;const r=Ot(()=>Math.floor(t.value.getTime()/1e3/10));return $t.value==="I18N"&&(n=10*1e3,o=n),e&&(n=Number.POSITIVE_INFINITY,o=!1),Vt({queryKey:[i,r.value],queryFn:()=>Kt(i,r.value),retry:zt,staleTime:n,refetchInterval:o})}function Xt(){return St("data-source","",{transform:String})}function Zt(){return St("battle-of-giants","",{transform:String})}export{Zt as a,Xt as g,Jt as u};
|
|
1
|
+
var q=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var s=(i,t,e)=>(q(i,t,"read from private field"),e?e.call(i):t.get(i)),u=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},l=(i,t,e,n)=>(q(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e);var f=(i,t,e)=>(q(i,t,"access private method"),e);import{ax as It,ay as O,az as tt,aA as Y,aB as Qt,aC as ft,aD as pt,aE as Et,aF as Dt,aG as Ft,aH as bt,aI as Tt,aJ as Ut,aK as jt,aL as xt,h as Ot,aM as Pt,aN as Mt,v as H,aO as yt,aP as At,aQ as vt,aR as Lt,aS as $t,am as St}from"./index-f813b721.js";var y,a,N,b,E,P,g,W,M,A,D,F,w,L,T,$,_,et,B,st,k,it,V,nt,z,at,K,rt,G,ot,J,Ct,gt,Nt=(gt=class extends It{constructor(t,e){super();u(this,T);u(this,_);u(this,B);u(this,k);u(this,V);u(this,z);u(this,K);u(this,G);u(this,J);u(this,y,void 0);u(this,a,void 0);u(this,N,void 0);u(this,b,void 0);u(this,E,void 0);u(this,P,void 0);u(this,g,void 0);u(this,W,void 0);u(this,M,void 0);u(this,A,void 0);u(this,D,void 0);u(this,F,void 0);u(this,w,void 0);u(this,L,new Set);this.options=e,l(this,y,t),l(this,g,null),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(s(this,a).addObserver(this),mt(s(this,a),this.options)?f(this,T,$).call(this):this.updateResult(),f(this,V,nt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ht(s(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ht(s(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,f(this,z,at).call(this),f(this,K,rt).call(this),s(this,a).removeObserver(this)}setOptions(t,e){const n=this.options,o=s(this,a);if(this.options=s(this,y).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof O(this.options.enabled,s(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");f(this,G,ot).call(this),s(this,a).setOptions(this.options),n._defaulted&&!tt(this.options,n)&&s(this,y).getQueryCache().notify({type:"observerOptionsUpdated",query:s(this,a),observer:this});const r=this.hasListeners();r&&Rt(s(this,a),o,this.options,n)&&f(this,T,$).call(this),this.updateResult(e),r&&(s(this,a)!==o||O(this.options.enabled,s(this,a))!==O(n.enabled,s(this,a))||Y(this.options.staleTime,s(this,a))!==Y(n.staleTime,s(this,a)))&&f(this,_,et).call(this);const c=f(this,B,st).call(this);r&&(s(this,a)!==o||O(this.options.enabled,s(this,a))!==O(n.enabled,s(this,a))||c!==s(this,w))&&f(this,k,it).call(this,c)}getOptimisticResult(t){const e=s(this,y).getQueryCache().build(s(this,y),t),n=this.createResult(e,t);return _t(this,n)&&(l(this,b,n),l(this,P,this.options),l(this,E,s(this,a).state)),n}getCurrentResult(){return s(this,b)}trackResult(t,e){const n={};return Object.keys(t).forEach(o=>{Object.defineProperty(n,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),e==null||e(o),t[o])})}),n}trackProp(t){s(this,L).add(t)}getCurrentQuery(){return s(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=s(this,y).defaultQueryOptions(t),n=s(this,y).getQueryCache().build(s(this,y),e);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,e))}fetch(t){return f(this,T,$).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),s(this,b)))}createResult(t,e){var dt;const n=s(this,a),o=this.options,r=s(this,b),c=s(this,E),p=s(this,P),I=t!==n?t.state:s(this,N),{state:v}=t;let d={...v},Q=!1,h;if(e._optimisticResults){const m=this.hasListeners(),Z=!m&&mt(t,e),wt=m&&Rt(t,n,e,o);(Z||wt)&&(d={...d,...Ft(v.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:S,errorUpdatedAt:U,status:R}=d;if(e.select&&d.data!==void 0)if(r&&d.data===(c==null?void 0:c.data)&&e.select===s(this,W))h=s(this,M);else try{l(this,W,e.select),h=e.select(d.data),h=bt(r==null?void 0:r.data,h,e),l(this,M,h),l(this,g,null)}catch(m){l(this,g,m)}else h=d.data;if(e.placeholderData!==void 0&&h===void 0&&R==="pending"){let m;if(r!=null&&r.isPlaceholderData&&e.placeholderData===(p==null?void 0:p.placeholderData))m=r.data;else if(m=typeof e.placeholderData=="function"?e.placeholderData((dt=s(this,A))==null?void 0:dt.state.data,s(this,A)):e.placeholderData,e.select&&m!==void 0)try{m=e.select(m),l(this,g,null)}catch(Z){l(this,g,Z)}m!==void 0&&(R="success",h=bt(r==null?void 0:r.data,m,e),Q=!0)}s(this,g)&&(S=s(this,g),h=s(this,M),U=Date.now(),R="error");const j=d.fetchStatus==="fetching",x=R==="pending",X=R==="error",ct=x&&j,lt=h!==void 0;return{status:R,fetchStatus:d.fetchStatus,isPending:x,isSuccess:R==="success",isError:X,isInitialLoading:ct,isLoading:ct,data:h,dataUpdatedAt:d.dataUpdatedAt,error:S,errorUpdatedAt:U,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>I.dataUpdateCount||d.errorUpdateCount>I.errorUpdateCount,isFetching:j,isRefetching:j&&!x,isLoadingError:X&&!lt,isPaused:d.fetchStatus==="paused",isPlaceholderData:Q,isRefetchError:X&<,isStale:ut(t,e),refetch:this.refetch}}updateResult(t){const e=s(this,b),n=this.createResult(s(this,a),this.options);if(l(this,E,s(this,a).state),l(this,P,this.options),s(this,E).data!==void 0&&l(this,A,s(this,a)),tt(n,e))return;l(this,b,n);const o={},r=()=>{if(!e)return!0;const{notifyOnChangeProps:c}=this.options,p=typeof c=="function"?c():c;if(p==="all"||!p&&!s(this,L).size)return!0;const C=new Set(p??s(this,L));return this.options.throwOnError&&C.add("error"),Object.keys(s(this,b)).some(I=>{const v=I;return s(this,b)[v]!==e[v]&&C.has(v)})};(t==null?void 0:t.listeners)!==!1&&r()&&(o.listeners=!0),f(this,J,Ct).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&f(this,V,nt).call(this)}},y=new WeakMap,a=new WeakMap,N=new WeakMap,b=new WeakMap,E=new WeakMap,P=new WeakMap,g=new WeakMap,W=new WeakMap,M=new WeakMap,A=new WeakMap,D=new WeakMap,F=new WeakMap,w=new WeakMap,L=new WeakMap,T=new WeakSet,$=function(t){f(this,G,ot).call(this);let e=s(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(Qt)),e},_=new WeakSet,et=function(){f(this,z,at).call(this);const t=Y(this.options.staleTime,s(this,a));if(ft||s(this,b).isStale||!pt(t))return;const n=Et(s(this,b).dataUpdatedAt,t)+1;l(this,D,setTimeout(()=>{s(this,b).isStale||this.updateResult()},n))},B=new WeakSet,st=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(s(this,a)):this.options.refetchInterval)??!1},k=new WeakSet,it=function(t){f(this,K,rt).call(this),l(this,w,t),!(ft||O(this.options.enabled,s(this,a))===!1||!pt(s(this,w))||s(this,w)===0)&&l(this,F,setInterval(()=>{(this.options.refetchIntervalInBackground||Dt.isFocused())&&f(this,T,$).call(this)},s(this,w)))},V=new WeakSet,nt=function(){f(this,_,et).call(this),f(this,k,it).call(this,f(this,B,st).call(this))},z=new WeakSet,at=function(){s(this,D)&&(clearTimeout(s(this,D)),l(this,D,void 0))},K=new WeakSet,rt=function(){s(this,F)&&(clearInterval(s(this,F)),l(this,F,void 0))},G=new WeakSet,ot=function(){const t=s(this,y).getQueryCache().build(s(this,y),this.options);if(t===s(this,a))return;const e=s(this,a);l(this,a,t),l(this,N,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},J=new WeakSet,Ct=function(t){Tt.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(s(this,b))}),s(this,y).getQueryCache().notify({query:s(this,a),type:"observerResultsUpdated"})})},gt);function Wt(i,t){return O(t.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&t.retryOnMount===!1)}function mt(i,t){return Wt(i,t)||i.state.data!==void 0&&ht(i,t,t.refetchOnMount)}function ht(i,t,e){if(O(t.enabled,i)!==!1){const n=typeof e=="function"?e(i):e;return n==="always"||n!==!1&&ut(i,t)}return!1}function Rt(i,t,e,n){return(i!==t||O(n.enabled,i)===!1)&&(!e.suspense||i.state.status!=="error")&&ut(i,e)}function ut(i,t){return O(t.enabled,i)!==!1&&i.isStaleByTime(Y(t.staleTime,i))}function _t(i,t){return!tt(i.getCurrentResult(),t)}function Bt(i=""){if(!Ut())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=xt(i),e=jt(t);if(!e)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return e}function kt(i,t,e){const n=e||Bt(),o=Ot(()=>{const h=Pt(t);typeof h.enabled=="function"&&(h.enabled=h.enabled());const S=n.defaultQueryOptions(h);return S._optimisticResults=n.isRestoring.value?"isRestoring":"optimistic",S}),r=new i(n,o.value),c=Mt(r.getCurrentResult());let p=()=>{};H(n.isRestoring,h=>{h||(p(),p=r.subscribe(S=>{yt(c,S)}))},{immediate:!0});const C=()=>{r.setOptions(o.value),yt(c,r.getCurrentResult())};H(o,C),At(()=>{p()});const I=(...h)=>(C(),c.refetch(...h)),v=()=>new Promise((h,S)=>{let U=()=>{};const R=()=>{if(o.value.enabled!==!1){r.setOptions(o.value);const j=r.getOptimisticResult(o.value);j.isStale?(U(),r.fetchOptimistic(o.value).then(h,x=>{vt(o.value.throwOnError,[x,r.getCurrentQuery()])?S(x):h(r.getCurrentResult())})):(U(),h(j))}};R(),U=H(o,R)});H(()=>c.error,h=>{if(c.isError&&!c.isFetching&&vt(o.value.throwOnError,[h,r.getCurrentQuery()]))throw h});const Q=Lt(c);for(const h in c)typeof c[h]=="function"&&(Q[h]=c[h]);return Q.suspense=v,Q.refetch=I,Q}function Vt(i,t){return kt(Nt,i,t)}const zt=3;async function Kt(i,t){const e=i.startsWith("/")?i.slice(1):i;let n=`${window.DATA_HOST}${e}`;i.startsWith("http")&&(n=i),n.endsWith("/")&&(n=n.slice(0,-1));const o=await fetch(`${n}/config.json?t=${t??0}`),r=await fetch(`${n}/team.json?t=${t??0}`),c=await fetch(`${n}/run.json?t=${t??0}`),{status:p,statusText:C}=o;if(p>=300||p<200)throw new Error(`fetch data failed. [status=${p}] [statusText=${C}]`);return Promise.all([o.json(),r.json(),c.json()]).then(v=>({contest:v[0],teams:v[1],submissions:v[2]}))}function Jt(i,t,e=!1){let n=3e4,o=n;const r=Ot(()=>Math.floor(t.value.getTime()/1e3/10));return $t.value==="I18N"&&(n=10*1e3,o=n),e&&(n=Number.POSITIVE_INFINITY,o=!1),Vt({queryKey:[i,r.value],queryFn:()=>Kt(i,r.value),retry:zt,staleTime:n,refetchInterval:o})}function Xt(){return St("data-source","",{transform:String})}function Zt(){return St("battle-of-giants","",{transform:String})}export{Zt as a,Xt as g,Jt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as p}from"./TheInput.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as p}from"./TheInput.vue_vue_type_script_setup_true_lang-9cc92a14.js";import{g as c,i as f,U as _,q as b,o as v,c as h,d as e,t as a,u as s,b as x,V as y,W as g,E as i}from"./index-f813b721.js";import{u as V}from"./user-5e4a4fb1.js";const k={flex:"","flex-col":"","justify-center":"","items-center":""},w={"text-sm":"","opacity-75":""},I={"w-48":""},U={class:"hidden",for:"input"},B=["disabled"],C=c({name:"IndexPage",__name:"test",setup(N){const r=V(),o=f(r.savedName),u=_();function l(){o.value&&u.push(`/hi/${encodeURIComponent(o.value)}`)}const{t:n}=b();return(R,t)=>{const d=p;return v(),h("div",k,[t[1]||(t[1]=e("div",{"text-4xl":""},[e("div",{"i-carbon-campsite":""})],-1)),t[2]||(t[2]=e("p",null,[e("a",{rel:"noreferrer",href:"https://github.com/antfu/vitesse",target:"_blank"}," Vitesse ")],-1)),e("p",null,[e("em",w,a(s(n)("intro.desc")),1)]),t[3]||(t[3]=e("div",{"py-4":""},null,-1)),e("div",I,[x(d,{modelValue:s(o),"onUpdate:modelValue":t[0]||(t[0]=m=>y(o)?o.value=m:null),placeholder:s(n)("intro.whats-your-name"),autocomplete:"false",onKeydown:g(l,["enter"])},null,8,["modelValue","placeholder"]),e("label",U,a(s(n)("intro.whats-your-name")),1)]),e("div",null,[e("button",{"m-3":"","text-sm":"",btn:"",disabled:!s(o),onClick:l},a(s(n)("button.go")),9,B)])])}}});typeof i=="function"&&i(C);export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aW as m,i as r,h as t}from"./index-
|
|
1
|
+
import{aW as m,i as r,h as t}from"./index-f813b721.js";const l=m("user",()=>{const e=r(""),s=r(new Set),o=t(()=>Array.from(s.value)),u=t(()=>o.value.filter(a=>a!==e.value));function n(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:n,otherNames:u,savedName:e}});export{l as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_}from"./index-
|
|
1
|
+
import{_}from"./index-f813b721.js";function f(c={}){const{immediate:d=!1,onNeedRefresh:m,onOfflineReady:i,onRegistered:r,onRegisteredSW:s,onRegisterError:a}=c;let t,o;const l=async(n=!0)=>{await o};async function p(){if("serviceWorker"in navigator){const{Workbox:n}=await _(()=>import("./workbox-window.prod.es5-c46a1faa.js"),[],import.meta.url);t=new n("/sw.js",{scope:"/",type:"classic"}),t.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),t.addEventListener("installed",e=>{e.isUpdate||i==null||i()}),t.register({immediate:d}).then(e=>{s?s("/sw.js",e):r==null||r(e)}).catch(e=>{a==null||a(e)})}}return o=p(),l}export{f as registerSW};
|
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.52.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"><link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.52.1/dist/balloon-192x192.png"><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.52.1/dist/balloon-512x512.svg" color="#00aba9"><meta name="msapplication-TileColor" content="#00aba9"><script>function normalizePath(_){for(;_.endsWith("/");)_=_.slice(0,-1);return`${_}/`}{let _="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.52.1/dist";_=normalizePath(_),window.CDN_HOST=_}try{let _=__DATA_HOST__;_=normalizePath(_),window.DATA_HOST=_}catch(_){window.DATA_HOST="/data/"}try{let _=__DATA_REGION__;window.DATA_REGION=_}catch(_){window.DATA_REGION="CN"}try{let _=__DEFAULT_LANG__;window.DEFAULT_LANG=_}catch(_){window.DEFAULT_LANG="en"}</script><script>!function(){localStorage.getItem("vueuse-color-scheme")||localStorage.setItem("vueuse-color-scheme","light");const e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,o=localStorage.getItem("vueuse-color-scheme")||"auto";("dark"===o||e&&"light"!==o)&&document.documentElement.classList.toggle("dark",!0)}()</script><script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.52.1/dist/assets/index-f813b721.js"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.52.1/dist/assets/index-ae8b398e.css"><link rel="manifest" href="/manifest.webmanifest"></head><body class="font-sans"><div id="app"></div><noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript><script>try{var umamiJSUrl=__UMAMI_JS_URL__,umamiWebsiteId=__UMAMI_WEBSITE_ID__;!function(){var e=document.createElement("script");e.src=umamiJSUrl,e.defer=!0,e.setAttribute("data-website-id",umamiWebsiteId);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var plausibleJSUrl=__PLAUSIBLE_JS_URL__,plausibleDataDomain=__PLAUSIBLE_DATA_DOMAIN__;!function(){var e=document.createElement("script");e.src=plausibleJSUrl,e.defer=!0,e.setAttribute("data-domain",plausibleDataDomain);var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var baiduAnalyticsId=__BAIDU_ANALYTICS_ID__,_hmt=_hmt||[];!function(){var e=document.createElement("script");e.src=`https://hm.baidu.com/hm.js?${baiduAnalyticsId}`;var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}catch(e){}try{var googleAnalyticsId=__GOOGLE_ANALYTICS_ID__;!function(){var e,t,a,r,c,n;location.port||(e=window,t=document,a="script",r="ga",e.GoogleAnalyticsObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,c=t.createElement(a),n=t.getElementsByTagName(a)[0],c.async=1,c.src="//www.google-analytics.com/analytics.js",n.parentNode.insertBefore(c,n),ga("create",`${googleAnalyticsId}`,"auto"),ga("send","pageview"))}()}catch(e){}</script></body></html>
|
package/dist/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(n,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const a=s=>l(s,r),t={module:{uri:r},exports:u,require:a};e[r]=Promise.all(n.map((s=>t[s]||a(s)))).then((s=>(i(...s),u)))}}define(["./workbox-86deb690"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_...all_-
|
|
1
|
+
if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(n,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const a=s=>l(s,r),t={module:{uri:r},exports:u,require:a};e[r]=Promise.all(n.map((s=>t[s]||a(s)))).then((s=>(i(...s),u)))}}define(["./workbox-86deb690"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_...all_-80d9c58d.js",revision:null},{url:"assets/_...all_-c60acc8c.css",revision:null},{url:"assets/_...all_-efc1d81f.js",revision:null},{url:"assets/_name_-5f588c5c.js",revision:null},{url:"assets/about-86489903.js",revision:null},{url:"assets/board-428898fa.js",revision:null},{url:"assets/Board-b5bf1828.js",revision:null},{url:"assets/Board-f05c0366.css",revision:null},{url:"assets/board-layout-f4b42426.js",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-47ff726d.js",revision:null},{url:"assets/en-c9a8dbb5.js",revision:null},{url:"assets/headless-464cd216.js",revision:null},{url:"assets/home-1c2da293.js",revision:null},{url:"assets/index-1426f0a6.js",revision:null},{url:"assets/index-241beb5a.css",revision:null},{url:"assets/index-5271d2f0.css",revision:null},{url:"assets/index-8a3db893.js",revision:null},{url:"assets/index-accb347c.css",revision:null},{url:"assets/index-ae8b398e.css",revision:null},{url:"assets/index-c4a296e0.js",revision:null},{url:"assets/index-f813b721.js",revision:null},{url:"assets/index-fe6090d1.js",revision:null},{url:"assets/index-layout-6dbef8c0.js",revision:null},{url:"assets/pagination-959b8075.js",revision:null},{url:"assets/query-8d6474f1.js",revision:null},{url:"assets/test-ce57205f.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-9cc92a14.js",revision:null},{url:"assets/user-5e4a4fb1.js",revision:null},{url:"assets/virtual_pwa-register-ab60e448.js",revision:null},{url:"assets/workbox-window.prod.es5-c46a1faa.js",revision:null},{url:"assets/zh-CN-8e545f66.js",revision:null},{url:"index.html",revision:"151bd75bced66b023f21768a3389ea1f"},{url:"favicon.svg",revision:"5a744f4ccbb122d4a0575be779ddcd43"},{url:"safari-pinned-tab.svg",revision:"5eaf74d1c43d30e0af743b68a3f48504"},{url:"balloon2-192x192.png",revision:"c857ae6d9dfae118ab4397d4358422bd"},{url:"balloon2-512x512.png",revision:"065594f4f743fe3884793c03d3fe7d9e"},{url:"manifest.webmanifest",revision:"3082e8d8ebc9619c6c1055ff243a02a8"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcpcio/board-app",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.52.
|
|
4
|
+
"version": "0.52.1",
|
|
5
5
|
"description": "XCPCIO Board App",
|
|
6
6
|
"author": "Dup4 <lyuzhi.pan@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"file-saver": "^2.0.5",
|
|
42
42
|
"floating-vue": "2.0.0-beta.24",
|
|
43
43
|
"flowbite": "^1.8.1",
|
|
44
|
+
"gsap": "^3.12.5",
|
|
44
45
|
"highcharts": "^11.4.8",
|
|
45
46
|
"highcharts-vue": "^1.4.3",
|
|
46
47
|
"lodash": "^4.17.21",
|
|
@@ -53,8 +54,8 @@
|
|
|
53
54
|
"vue-router": "^4.4.5",
|
|
54
55
|
"vue-search-select": "^3.2.0",
|
|
55
56
|
"vue-toast-notification": "^3.1.3",
|
|
56
|
-
"@xcpcio/core": "0.52.
|
|
57
|
-
"@xcpcio/types": "0.52.
|
|
57
|
+
"@xcpcio/core": "0.52.1",
|
|
58
|
+
"@xcpcio/types": "0.52.1"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@antfu/eslint-config": "^0.39.8",
|
|
@@ -3,15 +3,21 @@ import { onKeyUp } from "@vueuse/core";
|
|
|
3
3
|
import { ResolverVue, createContest, createSubmissions, createTeams } from "@xcpcio/core";
|
|
4
4
|
import type { Contest, Submissions, Teams } from "@xcpcio/core";
|
|
5
5
|
import type { Contest as IContest, Submissions as ISubmissions, Teams as ITeams } from "@xcpcio/types";
|
|
6
|
+
import { gsap } from "gsap";
|
|
7
|
+
import { ScrollToPlugin } from "gsap/ScrollToPlugin";
|
|
6
8
|
|
|
7
9
|
const props = defineProps<{
|
|
8
10
|
dataSourceUrl: string,
|
|
9
11
|
}>();
|
|
10
12
|
|
|
13
|
+
gsap.registerPlugin(ScrollToPlugin);
|
|
14
|
+
|
|
11
15
|
const title = useTitle(RESOLVER_TITLE_SUFFIX);
|
|
12
16
|
const { t } = useI18n();
|
|
13
17
|
|
|
14
18
|
const firstLoaded = ref(false);
|
|
19
|
+
const startFirstScroll = ref(false);
|
|
20
|
+
const finishedFirstScroll = ref(false);
|
|
15
21
|
const contest = ref({} as Contest);
|
|
16
22
|
const teams = ref([] as Teams);
|
|
17
23
|
const submissions = ref([] as Submissions);
|
|
@@ -46,17 +52,86 @@ onKeyStroke([" "], (e) => {
|
|
|
46
52
|
});
|
|
47
53
|
|
|
48
54
|
onKeyUp(["n", " "], () => {
|
|
55
|
+
if (!finishedFirstScroll.value) {
|
|
56
|
+
startFirstScroll.value = true;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
49
60
|
resolver.value.next();
|
|
50
61
|
}, { dedupe: true });
|
|
51
62
|
|
|
52
63
|
onKeyUp(["r"], () => {
|
|
53
64
|
resolver.value.rewind();
|
|
54
65
|
}, { dedupe: true });
|
|
66
|
+
|
|
67
|
+
onKeyUp(["w"], () => {
|
|
68
|
+
resolver.value.currentIndex--;
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
onKeyUp(["s"], () => {
|
|
72
|
+
resolver.value.currentIndex++;
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const resolverRef = ref<HTMLElement | null>(null);
|
|
76
|
+
const currentRowRef = ref<HTMLElement | null>(null);
|
|
77
|
+
|
|
78
|
+
onMounted(() => {
|
|
79
|
+
watch(() => startFirstScroll.value, async () => {
|
|
80
|
+
if (finishedFirstScroll.value) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (!startFirstScroll.value) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (resolverRef.value) {
|
|
89
|
+
const scrollHeight = resolverRef.value.scrollHeight;
|
|
90
|
+
const clientHeight = resolverRef.value.clientHeight;
|
|
91
|
+
|
|
92
|
+
gsap.to(resolverRef.value, {
|
|
93
|
+
duration: Math.round(resolver.value.teams.length * 0.5),
|
|
94
|
+
scrollTop: scrollHeight - clientHeight,
|
|
95
|
+
ease: "power1.inOut",
|
|
96
|
+
onComplete: () => {
|
|
97
|
+
finishedFirstScroll.value = true;
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}, { immediate: true });
|
|
102
|
+
|
|
103
|
+
watch(() => resolver.value.currentIndex, async () => {
|
|
104
|
+
if (!finishedFirstScroll.value) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (resolverRef.value && currentRowRef.value) {
|
|
109
|
+
const containerRect = resolverRef.value.getBoundingClientRect();
|
|
110
|
+
const containerHeight = containerRect.height;
|
|
111
|
+
const rowRect = currentRowRef.value.getBoundingClientRect();
|
|
112
|
+
const rowHeight = rowRect.height;
|
|
113
|
+
|
|
114
|
+
// 计算选中行应该在的位置(距离底部2行)
|
|
115
|
+
const targetPosition = containerHeight - 3 * rowHeight;
|
|
116
|
+
|
|
117
|
+
// 计算当前选中行相对于容器顶部的位置
|
|
118
|
+
const currentPosition = rowRect.top - containerRect.top;
|
|
119
|
+
|
|
120
|
+
// 计算需要滚动的距离
|
|
121
|
+
const scrollDistance = (currentPosition - targetPosition);
|
|
122
|
+
|
|
123
|
+
gsap.to(resolverRef.value, {
|
|
124
|
+
duration: 2.5,
|
|
125
|
+
ease: "power1.out",
|
|
126
|
+
scrollTop: `+=${scrollDistance}`,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}, { flush: "post" });
|
|
130
|
+
});
|
|
55
131
|
</script>
|
|
56
132
|
|
|
57
133
|
<template>
|
|
58
134
|
<div
|
|
59
|
-
|
|
60
135
|
text-gray-200
|
|
61
136
|
w-screen h-screen
|
|
62
137
|
>
|
|
@@ -81,32 +156,42 @@ onKeyUp(["r"], () => {
|
|
|
81
156
|
<div
|
|
82
157
|
v-else
|
|
83
158
|
>
|
|
84
|
-
<div
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
name="resolver"
|
|
92
|
-
tag="ul"
|
|
159
|
+
<div>
|
|
160
|
+
<div
|
|
161
|
+
class="bg-resolver-bg-1"
|
|
162
|
+
flex flex-col justify-between
|
|
163
|
+
font-mono
|
|
164
|
+
w-screen h-screen
|
|
165
|
+
overflow-hidden
|
|
93
166
|
>
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
167
|
+
<div
|
|
168
|
+
ref="resolverRef"
|
|
169
|
+
h-full
|
|
170
|
+
overflow-y-auto
|
|
97
171
|
>
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
172
|
+
<TransitionGroup
|
|
173
|
+
name="resolver"
|
|
174
|
+
tag="ul"
|
|
101
175
|
>
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
176
|
+
<template
|
|
177
|
+
v-for="(team, index) in resolver.teams"
|
|
178
|
+
:key="team.id"
|
|
179
|
+
>
|
|
180
|
+
<div
|
|
181
|
+
:ref="(el) => { if (index === resolver.currentIndex) { currentRowRef = el as HTMLElement; } }"
|
|
182
|
+
:class="[team.id === resolver.currentTeamId ? 'z-999' : 'z-0']"
|
|
183
|
+
position-relative
|
|
184
|
+
>
|
|
185
|
+
<ResolverTeamRow
|
|
186
|
+
:index="index"
|
|
187
|
+
:team="team"
|
|
188
|
+
:resolver="resolver"
|
|
189
|
+
/>
|
|
190
|
+
</div>
|
|
191
|
+
</template>
|
|
192
|
+
</TransitionGroup>
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
110
195
|
</div>
|
|
111
196
|
</div>
|
|
112
197
|
</div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as ot,_ as wt,T as re,h as kt,P as ie,a as ue}from"./pagination-6eac914a.js";import{g as A,h as b,i as O,Z as tt,o as l,c as m,d as e,t as v,u as t,N as at,b as x,w as L,l as h,m as bt,$ as ce,a0 as de,a1 as me,U as V,a2 as pe,W as ct,a3 as jt,a4 as Tt,q as et,v as ut,J as X,V as fe,a5 as Ht,a6 as q,a7 as _e,a8 as Gt,F as N,j,T as It,a as Q,S as ve,a9 as vt,aa as ge,ab as Vt,ac as Xt,ad as zt,ae as be,af as he,ag as Wt,k as Y,n as E,ah as ye,ai as Ft,aj as Yt,E as xe,ak as ke,al as Ct,am as qt,Y as we,an as Se,p as $e,ao as Bt,s as Te,ap as Ce,x as Me,y as Oe,z as Ie,aq as ze,A as Fe,M as Be,ar as Pe,as as Ae,at as De,au as Ee,Q as Le,av as Ne,aw as Re}from"./index-1e2a1259.js";import{_ as Qt}from"./TheInput.vue_vue_type_script_setup_true_lang-f91fd6e0.js";import{a as Kt,u as Ue}from"./query-ff21040c.js";const je={"ml-4":"","mt-2":""},He={"ml-4":"","mt-2":"",grid:"","grid-cols-6":"","gap-y-4":""},Ge={flex:"","items-center":"","w-full":"","col-span-5":""},Ve={key:0,flex:"","items-center":"","text-sm":""},Xe={key:1,flex:"","items-center":"","w-full":"","col-span-5":""},We={flex:"","items-center":"","w-full":"","col-span-5":""},Ye=A({__name:"GiantsOptions",props:{rank:null,orgOptions:null,teamsOptions:null,giants:null},emits:["update:giants"],setup(_,{emit:r}){const n=_,p=r,d=b({get(){return n.giants},set(c){p("update:giants",c)}}),u=O(d.value.filterOrganizations);function f(c,a){u.value=c,d.value.setFilterOrganizations(c)}const o=O(d.value.filterTeams);function g(c,a){o.value=c,d.value.setFilterTeams(c)}const i=b(()=>`${d.value.type===tt.BLUE?"Blue":"Red"} Team`),s=b(()=>d.value.type===tt.BLUE?"#0000FF":"#FF0000");return(c,a)=>{const y=Qt,w=bt;return l(),m("div",je,[e("div",{flex:"","text-sm":"",style:at({color:t(s)})},v(t(i)),5),e("div",He,[a[3]||(a[3]=e("div",{flex:"","items-center":"","text-sm":""}," Name: ",-1)),e("div",Ge,[x(y,{modelValue:t(d).name,"onUpdate:modelValue":a[0]||(a[0]=$=>t(d).name=$),"text-align":"left"},null,8,["modelValue"]),x(w,null,{popper:L(()=>a[2]||(a[2]=[e("div",null," Refresh Name ",-1)])),default:L(()=>[e("div",{"i-material-symbols-refresh":"","cursor-pointer":"",btn:"","text-2xl":"","ml-2":"",onClick:a[1]||(a[1]=$=>t(d).refreshName())})]),_:1})]),_.rank.contest.organization?(l(),m("div",Ve,v(_.rank.contest.organization)+": ",1)):h("",!0),_.rank.contest.organization?(l(),m("div",Xe,[x(t(ot),{options:_.orgOptions,"selected-options":t(u),onSelect:f},null,8,["options","selected-options"])])):h("",!0),a[4]||(a[4]=e("div",{"text-sm":"",flex:"","items-center":""}," Team: ",-1)),e("div",We,[x(t(ot),{options:_.teamsOptions,"selected-options":t(o),onSelect:g},null,8,["options","selected-options"])])])])}}}),qe={relative:"","inline-flex":"","items-center":"","cursor-pointer":""},Qe=A({__name:"TheCheckbox",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(_){const{modelValue:r}=ce("modelValue");return(n,p)=>(l(),m("label",qe,[de(e("input",{"onUpdate:modelValue":p[0]||(p[0]=d=>V(r)?r.value=d:null),type:"checkbox",class:"sr-only peer"},null,512),[[me,t(r)]]),p[1]||(p[1]=e("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1)),pe(n.$slots,"default")]))}});function Ke(){return`filter-organizations-${ct().path}`}function Ze(){return`filter-teams-${ct().path}`}function Je(){const r=`filter-organizations-${ct().path}`;return jt(r,[])}function tn(){const r=`filter-teams-${ct().path}`;return jt(r,[])}const en={"w-full":"","font-bold":"","font-mono":"","text-base":"",flex:"","flex-col":"","gap-4":"","items-center":"","justify-center":""},nn={flex:"","flex-col":"","w-full":""},sn={"ml-8":"","mt-2":"",grid:"","grid-cols-6":"","gap-y-4":""},on={key:0,flex:"","items-center":"","text-sm":""},an={key:1,flex:"","items-center":"","w-full":"","col-span-5":""},ln={flex:"","items-center":"","w-full":"","col-span-5":""},rn={flex:"","flex-col":"","w-full":""},un={"ml-4":"","mt-2":""},cn={grid:"","grid-cols-8":"","items-center":""},dn={flex:"","flex-col":"","w-full":""},mn={"ml-4":"","mt-2":""},pn={flex:"","flex-row":""},fn={"w-full":"",flex:"","flex-row-reverse":"","items-center":"","gap-x-4":""},_n=A({__name:"OptionsModal",props:{isHidden:{type:Boolean},rank:null,rankOptions:null},emits:["update:isHidden","update:rankOptions"],setup(_,{emit:r}){const n=_,p=r,d=Tt.cloneDeep(n.rankOptions),{t:u}=et(),f=b({get(){return n.isHidden},set(P){p("update:isHidden",P)}}),o=b({get(){return n.rankOptions},set(P){p("update:rankOptions",P)}}),g=b(()=>n.rank),i=b(()=>u("type_menu.options")),s=O(!1);function c(){s.value=!0}function a(){s.value=!1}function y(P){s.value&&P.stopPropagation()}const w=b(()=>g.value.organizations.map(S=>({value:S,text:S}))),$=O(o.value.filterOrganizations);function C(P,S){$.value=P,o.value.setFilterOrganizations(P)}const T=b(()=>g.value.originTeams.map(S=>({value:S.id,text:S.organization?`${S.name} - ${S.organization}`:S.name}))),B=O(o.value.filterTeams);function H(P,S){B.value=P,o.value.setFilterTeams(P)}const Z=Kt();function lt(){o.value.battleOfGiants.persist?Z.value=o.value.battleOfGiants.ToBase64():Z.value=void 0}ut(()=>o.value.battleOfGiants.persist,()=>{lt()});async function rt(){o.value.setSelf(d),await Ht(),lt(),f.value=!0}const nt=Ke(),dt=Ze();function G(){localStorage.setItem(nt,JSON.stringify($.value)),localStorage.setItem(dt,JSON.stringify(B.value)),lt(),f.value=!0}return(P,S)=>{const st=Qe,mt=Qt,K=Ye,it=wt;return l(),X(it,{"is-hidden":t(f),"onUpdate:isHidden":S[5]||(S[5]=W=>V(f)?f.value=W:null),title:t(i),width:"w-200",mt:"mt-4"},{default:L(()=>[e("div",en,[e("div",nn,[S[7]||(S[7]=e("div",{flex:""}," Filter ",-1)),e("div",sn,[t(g).contest.organization?(l(),m("div",on,v(t(g).contest.organization)+": ",1)):h("",!0),t(g).contest.organization?(l(),m("div",an,[x(t(ot),{options:t(w),"selected-options":t($),onSelect:C,onCompositionstart:c,onCompositionend:a,onKeydownCapture:fe(y,["delete"])},null,8,["options","selected-options"])])):h("",!0),S[6]||(S[6]=e("div",{"text-sm":"",flex:"","items-center":""}," Team: ",-1)),e("div",ln,[x(t(ot),{options:t(T),"selected-options":t(B),onSelect:H},null,8,["options","selected-options"])])])]),e("div",rn,[S[12]||(S[12]=e("div",{flex:""}," Battle of Giants ",-1)),e("div",un,[e("div",cn,[S[8]||(S[8]=e("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Enable ",-1)),x(st,{modelValue:t(o).battleOfGiants.enable,"onUpdate:modelValue":S[0]||(S[0]=W=>t(o).battleOfGiants.enable=W)},null,8,["modelValue"]),S[9]||(S[9]=e("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Equal Teams ",-1)),x(st,{modelValue:t(o).battleOfGiants.equalTeams,"onUpdate:modelValue":S[1]||(S[1]=W=>t(o).battleOfGiants.equalTeams=W)},null,8,["modelValue"]),S[10]||(S[10]=e("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Persist ",-1)),x(st,{modelValue:t(o).battleOfGiants.persist,"onUpdate:modelValue":S[2]||(S[2]=W=>t(o).battleOfGiants.persist=W)},null,8,["modelValue"]),S[11]||(S[11]=e("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," TopX ",-1)),x(mt,{modelValue:t(o).battleOfGiants.topX,"onUpdate:modelValue":S[3]||(S[3]=W=>t(o).battleOfGiants.topX=W),"text-align":"left","text-type":"number"},null,8,["modelValue"])])]),x(K,{rank:t(g),"org-options":t(w),"teams-options":t(T),giants:t(o).battleOfGiants.blueTeam},null,8,["rank","org-options","teams-options","giants"]),x(K,{rank:t(g),"org-options":t(w),"teams-options":t(T),giants:t(o).battleOfGiants.redTeam},null,8,["rank","org-options","teams-options","giants"])]),e("div",dn,[S[14]||(S[14]=e("div",{flex:""}," Feature ",-1)),e("div",mn,[e("div",pn,[x(st,{modelValue:t(o).enableAnimatedSubmissions,"onUpdate:modelValue":S[4]||(S[4]=W=>t(o).enableAnimatedSubmissions=W)},{default:L(()=>S[13]||(S[13]=[e("span",{"ml-3":"","text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Submission Queue ",-1)])),_:1},8,["modelValue"])])])]),e("div",fn,[e("button",{type:"submit",class:"text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800","font-medium":"","text-sm":"","rounded-md":"",onClick:G},v(t(u)("button.confirm")),1),e("button",{type:"reset",class:"py-2.5 px-5 text-gray-900 focus:outline-none bg-white border border-gray-200 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700","font-medium":"","text-sm":"","rounded-md":"",onClick:rt},v(t(u)("button.cancel")),1)])])]),_:1},8,["is-hidden","title"])}}});function vn(_){const r={backgroundColor:"#fff",color:"#000"};if(_.awards.includes(q.GOLD))return r.backgroundColor="#fff566",r;if(_.awards.includes(q.SILVER))return r.backgroundColor="#ffadd2",r;if(_.awards.includes(q.BRONZE))return r.backgroundColor="#f0c0a0",r;if(_.awards.includes(q.HONORABLE))return r.backgroundColor="#e6f7ff",r}function gn(_){return _.isFirstSolved?"#3db03d":_.isAccepted()?"#e1ffb5":_.isPending()?"#c8d6fa":"#ffd0d0"}var gt=(_=>(_[_.SUBMISSION_STATUS=0]="SUBMISSION_STATUS",_[_.SUBMIT_TIMESTAMP=1]="SUBMIT_TIMESTAMP",_))(gt||{});const bn={"h-7":"","w-124":"","text-gray-200":"","font-mono":"",flex:"","flex-row":"","justify-center":"","items-center":"",class:"bg-resolver-bg-zero"},hn={"h-full":"","w-92":"","pl-1":"",truncate:""},yn={"h-full":"","w-4":""},xn=A({__name:"AnimatedSubmissionBlock",props:{item:null,lastBlockDisplayType:null},setup(_){const r=_,n=b(()=>r.item);function p(){const d=n.value.submission;if(r.lastBlockDisplayType===gt.SUBMISSION_STATUS)return _e[d.status];if(r.lastBlockDisplayType===gt.SUBMIT_TIMESTAMP)return d.timestampToMinute}return(d,u)=>(l(),m("div",bn,[e("div",{"h-full":"","w-10":"",style:at(t(vn)(t(n).team)),flex:"","justify-center":"","items-center":""},[e("div",null,v(t(n).team.rank),1)],4),e("div",hn,v(t(n).displayName),1),e("div",yn,v(t(n).team.solvedProblemNum),1),e("div",{"h-full":"","w-6":"","border-b-3":"",flex:"","justify-center":"",style:at({borderColor:t(n).problem.balloonColor.background_color})},v(t(n).problem.label),5),e("div",{"h-full":"","w-12":"",flex:"","justify-center":"","font-sans":"","font-medium":"","text-zinc-800":"",style:at({backgroundColor:("getStandingsStatusColor"in d?d.getStandingsStatusColor:t(gn))(t(n).submission)})},v(p()),5)]))}}),kn={absolute:"",fixed:"","z-99":"","bottom-4":"","left-4":"","opacity-80":""},wn={flex:"","flex-col":""},Sn={flex:"","flex-col":"","mt-6":""},$n=A({__name:"AnimatedSubmissionsModal",props:{rank:{}},setup(_){const r=_,n=b(()=>r.rank),p=b(()=>{const f=n.value.getSubmissions().sort(Gt.compare).reverse();let o=0;const g=10,i=[];let s=0;const c=6,a=[];for(let y=0;y<f.length&&(s<c||o<g);y++){const w=f[y],$=w.teamId,C=w.problemId,T=n.value.teamsMap.get($);if(!T||n.value.filterTeamByOrg(T))continue;const B=n.value.contest.problemsMap.get(C);if(!B)continue;let H=T.name;T.organization&&(H=`${T.organization} - ${H}`);const Z={submission:w,team:T,problem:B,displayName:H};o<g&&(i.push(Z),++o),w.isSolved&&s<c&&(a.push(Z),++s)}return a.reverse(),i.reverse(),{acceptedRes:a,allRes:i}}),d=b(()=>p.value.acceptedRes),u=b(()=>p.value.allRes);return(f,o)=>{const g=xn;return l(),m("div",kn,[e("div",wn,[e("div",null,[x(It,{name:"list",tag:"ul"},{default:L(()=>[(l(!0),m(N,null,j(t(d),i=>(l(),m("div",{key:i.submission.id},[x(g,{item:i,"last-block-display-type":t(gt).SUBMIT_TIMESTAMP},null,8,["item","last-block-display-type"])]))),128))]),_:1})])]),e("div",Sn,[e("div",null,[x(It,{name:"list",tag:"ul"},{default:L(()=>[(l(!0),m(N,null,j(t(u),i=>(l(),m("div",{key:i.submission.id},[e("div",null,[x(g,{item:i,"last-block-display-type":t(gt).SUBMISSION_STATUS},null,8,["item","last-block-display-type"])])]))),128))]),_:1})])])])}}});const Tn=Q($n,[["__scopeId","data-v-c5c85310"]]),Cn={"w-full":"",flex:"","mt-4":"","gap-4":""},Mn={btn:"",title:"Submissions",disabled:"true"},On={"w-full":"",flex:"","mt-4":"","gap-4":""},In=A({__name:"Utility",setup(_){const{t:r}=et(),n=ct(),p=ve();function d(){p.push(`/resolver/?data-source=${n.path}`)}function u(){p.push(`/balloon/?data-source=${n.path}`)}function f(){p.push(`/countdown/?data-source=${n.path}`)}return(o,g)=>(l(),m(N,null,[e("div",Cn,[e("button",{btn:"",title:"Balloon",onClick:u},v(t(r)("type_menu.balloon")),1),e("button",Mn,v(t(r)("type_menu.submissions")),1)]),e("div",On,[e("button",{btn:"",title:"Resolver",onClick:d},v(t(r)("type_menu.resolver")),1),e("button",{btn:"",title:"Countdown",onClick:f},v(t(r)("type_menu.countdown")),1)])],64))}});var Zt={exports:{}};(function(_,r){(function(n,p){p()})(vt,function(){function n(i,s){return typeof s>"u"?s={autoBom:!1}:typeof s!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}function p(i,s,c){var a=new XMLHttpRequest;a.open("GET",i),a.responseType="blob",a.onload=function(){g(a.response,s,c)},a.onerror=function(){console.error("could not download file")},a.send()}function d(i){var s=new XMLHttpRequest;s.open("HEAD",i,!1);try{s.send()}catch{}return 200<=s.status&&299>=s.status}function u(i){try{i.dispatchEvent(new MouseEvent("click"))}catch{var s=document.createEvent("MouseEvents");s.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),i.dispatchEvent(s)}}var f=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof vt=="object"&&vt.global===vt?vt:void 0,o=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||(typeof window!="object"||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(i,s,c){var a=f.URL||f.webkitURL,y=document.createElement("a");s=s||i.name||"download",y.download=s,y.rel="noopener",typeof i=="string"?(y.href=i,y.origin===location.origin?u(y):d(y.href)?p(i,s,c):u(y,y.target="_blank")):(y.href=a.createObjectURL(i),setTimeout(function(){a.revokeObjectURL(y.href)},4e4),setTimeout(function(){u(y)},0))}:"msSaveOrOpenBlob"in navigator?function(i,s,c){if(s=s||i.name||"download",typeof i!="string")navigator.msSaveOrOpenBlob(n(i,c),s);else if(d(i))p(i,s,c);else{var a=document.createElement("a");a.href=i,a.target="_blank",setTimeout(function(){u(a)})}}:function(i,s,c,a){if(a=a||open("","_blank"),a&&(a.document.title=a.document.body.innerText="downloading..."),typeof i=="string")return p(i,s,c);var y=i.type==="application/octet-stream",w=/constructor/i.test(f.HTMLElement)||f.safari,$=/CriOS\/[\d]+/.test(navigator.userAgent);if(($||y&&w||o)&&typeof FileReader<"u"){var C=new FileReader;C.onloadend=function(){var H=C.result;H=$?H:H.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=H:location=H,a=null},C.readAsDataURL(i)}else{var T=f.URL||f.webkitURL,B=T.createObjectURL(i);a?a.location=B:location.href=B,a=null,setTimeout(function(){T.revokeObjectURL(B)},4e4)}});f.saveAs=g.saveAs=g,_.exports=g})})(Zt);var zn=Zt.exports;const Pt=ge(zn);var Fn=setTimeout;function Bn(_,r){var n=r.useCachedSetTimeout?Fn:setTimeout;return new Promise(function(p){n(p,_)})}function Pn(_){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.useCachedSetTimeout,p=Bn(_,{useCachedSetTimeout:n});function d(u){return p.then(function(){return u})}return d.then=function(){return p.then.apply(p,arguments)},d.catch=Promise.resolve().catch,d}const An={flex:"","flex-col":""},Dn={"w-160":"","font-bold":""},En={"mt-8":""},Ln={key:0,flex:"","flex-row":"","justify-center":"","gap-4":""},Nn=["disabled"],Rn=["disabled"],Un={key:1,flex:"","justify-center":""},jn=["disabled"],Hn={key:2,flex:"","justify-center":""},Gn=["disabled"],Vn=A({__name:"Export",props:{rank:null},setup(_){const r=_,n=Vt.useToast(),{copy:p,isSupported:d}=Xt(),u=b(()=>r.rank),f=O({value:"cf-dat",text:"Codeforces Gym Ghost(dat)"}),o=O([{value:"cf-dat",text:"Codeforces Gym Ghost(dat)"},{value:"general-xlsx",text:"Excel Table(xlsx)"},{value:"icpc-standings-csv",text:"ICPC Standings(csv)"}]),g=O({CfDatDownload:!1,CfDatCopy:!1,GeneralXLSXDownload:!1,ICPCStandingsCsvDownload:!1});async function i(){await Ht(),await Pn(16)}async function s(){g.value.CfDatDownload=!0,await i();const $=new zt().convert(u.value),C=new Blob([$],{type:"text/plain;charset=utf-8"});Pt.saveAs(C,"contest.dat"),g.value.CfDatDownload=!1}async function c(){if(!d.value){n.warning("clipboard is not supported");return}g.value.CfDatCopy=!0,await i();const $=new zt().convert(u.value);p($),g.value.CfDatCopy=!1,n.success("Copy Success")}async function a(){g.value.GeneralXLSXDownload=!0,await i(),new be().convertAndWrite(u.value,`${u.value.contest.name}.xlsx`),g.value.GeneralXLSXDownload=!1}async function y(){g.value.ICPCStandingsCsvDownload=!0,await i();const $=new he().convert(u.value),C=new Blob([$],{type:"text/csv;charset=utf-8"});Pt.saveAs(C,"standings.csv"),g.value.ICPCStandingsCsvDownload=!1}return(w,$)=>(l(),m("div",An,[e("div",Dn,[x(t(re),{modelValue:t(f),"onUpdate:modelValue":$[0]||($[0]=C=>V(f)?f.value=C:null),options:t(o),placeholder:"Export Type"},null,8,["modelValue","options"])]),e("div",En,[t(f).value==="cf-dat"?(l(),m("div",Ln,[e("button",{disabled:t(g).CfDatDownload,btn:"",onClick:s}," Download ",8,Nn),e("button",{disabled:t(g).CfDatCopy,btn:"",onClick:c}," Copy to Clipboard ",8,Rn)])):h("",!0),t(f).value==="general-xlsx"?(l(),m("div",Un,[e("button",{disabled:t(g).GeneralXLSXDownload,btn:"",onClick:a}," Download ",8,jn)])):h("",!0),t(f).value==="icpc-standings-csv"?(l(),m("div",Hn,[e("button",{disabled:t(g).ICPCStandingsCsvDownload,btn:"",onClick:y}," Download ",8,Gn)])):h("",!0)])]))}});function Mt(_,r,n,p,d,u){return{colors:u,chart:window.innerWidth<992?{type:"bar",backgroundColor:"transparent"}:{type:"column",backgroundColor:"transparent",height:"420px"},title:{text:_},xAxis:{categories:p,labels:{style:{fontSize:"16px"}},title:{text:r,style:{fontSize:"16px"}}},yAxis:{min:0,title:{text:n,style:{fontSize:"16px",height:"320px"}},stackLabels:{enabled:!0,style:{fontSize:"16px"}}},tooltip:{enabled:!0,headerFormat:"",pointFormat:"{series.name}:{point.y}"},plotOptions:{bar:{stacking:"normal"},column:{stacking:"normal"}},credits:{enabled:!1},series:d}}function Xn(_){const r=[];_.contest.problems.forEach((u,f)=>{r.push({problem_id:u.label,index:f,solved:u.statistics.acceptedNum})}),r.sort((u,f)=>u.solved>f.solved?-1:u.solved<f.solved?1:u.index<f.index?-1:u.index>f.index?1:0);const{cat:n,series:p,colors:d}=(()=>{const u=[],f=[];return r.forEach(i=>{u.push(i.problem_id),f.push(i.solved)}),{cat:u,series:[{name:"队伍数",showInLegend:!1,data:f}],colors:["rgb(124, 181, 236)"]}})();return Mt("题目通过数","题目编号","通过数",n,p,d)}function Wn(_){const r=_.rankStatistics.teamSolvedNum.map((u,f)=>({index:f,cnt:u})),{cat:n,series:p,colors:d}=(()=>{const u=[],f=[];return r.forEach(i=>{u.push(i.index),f.push(i.cnt)}),{cat:u,series:[{name:"队伍数",showInLegend:!1,data:f}],colors:["rgb(124, 181, 236)"]}})();return Mt("队伍过题数","过题数","队伍数",n,p,d)}function Yn(_){const{cat:r,series:n,colors:p}=(()=>{const d=[],u=[],f=[],o=[];return _.contest.problems.forEach(s=>{u.push(s.statistics.acceptedNum),f.push(s.statistics.rejectedNum),o.push(s.statistics.pendingNum),d.push(s.label)}),{cat:d,series:[{name:"Accepted",showInLegend:!1,data:u},{name:"Rejected",showInLegend:!1,data:f},{name:"Pending",showInLegend:!1,data:o}],colors:["#E1FFB5","#FFD0D0","#C8D6FA"]}})();return Mt("提交分类","题目编号","提交数",r,n,p)}function qn(_,r){const n=r.placeChartPoints.map(d=>{var u,f;return{x:d.timePoint,y:d.rank,showX:Wt(d.timePoint),lastSolved:(u=d.lastSolvedProblem)!=null&&u.label?`Last Solved Problem ${(f=d.lastSolvedProblem)==null?void 0:f.label}`:""}});return{chart:{type:"spline"},title:{text:"排名变化趋势图"},series:[{showInLegend:!1,allowPointSelect:!1,name:"rank",type:"spline",data:n,marker:{symbol:"circle",radius:4,lineWidth:2,fillColor:"yellow",lineColor:"yellow"}}],xAxis:[{allowDecimals:!1,title:{text:"Time(min)"},crosshair:!0}],yAxis:[{allowDecimals:!1,title:{text:"Place"},reversed:!0,gridLineWidth:1}],plotOptions:{line:{color:"#efbc47",dataLabels:{enabled:!1},enableMouseTracking:!0,marker:{enabled:!0,fillColor:"#fff566"}}},tooltip:{enabled:!0,headerFormat:"",pointFormat:"Time: {point.showX} <br/> Place: {point.y} <br/> {point.lastSolved}"},credits:{enabled:!1},exporting:{enabled:!0},navigation:{menuItemStyle:{fontSize:"10px"}}}}const Qn={class:"w-full",flex:"","flex-col":""},Kn={class:"sm:w-full md:w-[92%]","mx-auto":"","px-4":"","py-4":"","lg:px-6":"","lg:py-6":""},Zn={grid:"","grid-cols-3":"","gap-10":"","space-y-0":""},Jn={class:"mx-auto w-[16rem]","p-6":"","xl:p-8":"",flex:"","flex-col":"",border:"","border-gray-100":"","dark:border-gray-600":"","text-center":"","test-gray-900":"","bg-white":"","dark:bg-gray-800":"","dark:text-white":"",shadow:"","rounded-md":""},ts={"mb-4":"","text-2xl":"","font-semibold":""},es={class:"my-8 flex items-baseline justify-center"},ns={class:"mr-2 text-5xl font-extrabold"},ss={"mt-8":"","gap-8":"",flex:"","flex-col":""},os=A({__name:"Statistics",props:{rank:null},setup(_){const r=_,{t:n}=et(),p=b(()=>r.rank);function d(){const u=[];return u.push({title:"standings.statistics.head_data.problems",data:p.value.contest.problems.length}),u.push({title:"standings.statistics.head_data.teams",data:p.value.teams.length}),u.push({title:"standings.statistics.head_data.submissions",data:p.value.getSubmissions().length}),u}return(u,f)=>(l(),m("div",Qn,[e("section",null,[e("div",Kn,[e("div",Zn,[(l(!0),m(N,null,j(d(),o=>(l(),m("div",{key:o.title},[e("div",Jn,[e("h3",ts,v(t(n)(o.title)),1),e("div",es,[e("span",ns,v(o.data),1)])])]))),128))])])]),e("div",ss,[e("div",null,[x(t(kt.Chart),{options:("getSubmitChart"in u?u.getSubmitChart:t(Yn))(t(p))},null,8,["options"])]),e("div",null,[x(t(kt.Chart),{options:("getProblemChart"in u?u.getProblemChart:t(Xn))(t(p))},null,8,["options"])]),e("div",null,[x(t(kt.Chart),{options:("getTeamChart"in u?u.getTeamChart:t(Wn))(t(p))},null,8,["options"])])])]))}}),as=["src"],ls=A({__name:"ReactionVideoModal",props:{isOpen:{type:Boolean},submissionReaction:null,width:null},emits:["close"],setup(_,{emit:r}){const n=_,p=r,d=O(null);function u(){p("close")}function f(o){o.target===o.currentTarget&&u()}return ut(()=>n.isOpen,o=>{o&&d.value?d.value.play():d.value&&(d.value.pause(),d.value.currentTime=0)}),(o,g)=>_.isOpen?(l(),m("div",{key:0,fixed:"","inset-0":"",flex:"","items-center":"","justify-center":"","p-2":"","bg-black":"","bg-opacity-50":"","z-2999":"",onClick:f},[e("div",{"bg-white":"",shadow:"",relative:"","overflow-hidden":"",class:E(["h-[100%]",[_.width??"w-[540px]"]]),onClick:g[0]||(g[0]=ye(()=>{},["stop"]))},[e("video",{ref_key:"videoPlayer",ref:d,controls:"",autoplay:"",class:"w-full h-full"},[e("source",{src:_.submissionReaction.url,type:"video/mp4"},null,8,as),g[1]||(g[1]=Y(" Your browser does not support the video tag. "))],512),e("div",{absolute:"","top-0.5":"","right-0.5":"","text-black":"","rounded-md":"","p-2":"","transition-colors":"","duration-300":"","focus:outline-none":"","cursor-pointer":"",onClick:u},g[2]||(g[2]=[e("span",{"i-ion-close-circle-outline":"","text-2xl":""},null,-1)]))],2)])):h("",!0)}});const rs={"mx-auto":"","w-full":""},is={key:0,flex:"","justify-start":"","items-start":""},us={"space-y-3":"",flex:"","flex-col":"","px-4":"","py-3":"","lg:flex-row":"","lg:items-center":"","lg:justify-between":"","lg:space-x-4":"","lg:space-y-0":""},cs={flex:"","flex-shrink-0":"","flex-col":"","md:flex-row":"","md:items-center":"","lg:justify-end":"","space-y-3":"","md:space-x-3":"","md:space-y-0":""},ds={key:0,"w-48":""},ms={key:1,"w-48":""},ps={key:2,"w-68":""},fs={key:3,"w-48":""},_s={key:4},vs={class:"overflow-x-auto"},gs={class:"w-full text-left text-sm text-gray-500 dark:text-gray-400","font-medium":"","font-mono":""},bs={class:"bg-gray-50 text-xs uppercase text-gray-700 dark:bg-gray-700 dark:text-gray-400"},hs={key:0,scope:"col",class:"px-4 py-3"},ys={key:1,scope:"col",class:"px-4 py-3"},xs={key:2,scope:"col",class:"px-4 py-3"},ks={key:3,scope:"col",class:"px-4 py-3"},ws={key:4,scope:"col",class:"px-4 py-3"},Ss={"px-4":"","py-2":""},$s={key:0,class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},Ts={class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},Cs={key:1,class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},Ms={flex:"","items-center":""},Os={key:2,class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},Is={key:3,class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},zs={flex:"","items-center":""},Fs={class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},Bs={flex:"","items-center":""},Ps={key:4,class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},As=["onClick"],Ds=A({__name:"SubmissionsTable",props:{rank:null,submissions:null,pageSize:null,removeBorder:{type:Boolean},enableFilter:null},setup(_){const r=_,n=b(()=>r.rank),p=b(()=>r.enableFilter),d=b(()=>{if(!p.value)return!1;for(const[z,k]of Object.entries(p.value))if(k===!0)return!0;return!1}),u=O({orgNames:[],teamIds:[],languages:[],statuses:[]}),f=b(()=>n.value.organizations.map(k=>({value:k,text:k}))),o=O([]),g=O({});function i(z,k){o.value=z,g.value=k}const s=b(()=>n.value.originTeams.map(k=>({value:k.id,text:k.organization?`${k.name} - ${k.organization}`:k.name}))),c=O([]),a=O({});function y(z,k){c.value=z,a.value=k}const w=b(()=>n.value.languages.map(F=>({value:F,text:F}))),$=O([]),C=O({});function T(z,k){$.value=z,C.value=k}const B=b(()=>n.value.statuses.map(F=>({value:F,text:Ft[F]}))),H=O([]),Z=O({});function lt(z,k){H.value=z,Z.value=k}function rt(z){return z.value.toString()}const nt=b(()=>r.submissions.filter(k=>{const F=u.value;if(F.orgNames.length===0&&F.teamIds.length===0&&F.languages.length===0&&F.statuses.length===0)return!0;if(F.teamIds.length>0){for(const U of F.teamIds)if(U===k.teamId)return!0}if(F.orgNames.length>0){const U=n.value.teamsMap.get(k.teamId);for(const pt of F.orgNames)if(pt===(U==null?void 0:U.organization))return!0}if(F.languages.length>0){for(const U of F.languages)if(U===k.language)return!0}if(F.statuses.length>0){for(const U of F.statuses)if(U===k.status)return!0}return!1}).sort(Gt.compare).reverse());function dt(){const z={orgNames:[],teamIds:[],languages:[],statuses:[]};z.orgNames=o.value.map(k=>k.value),z.teamIds=c.value.map(k=>k.value),z.languages=$.value.map(k=>k.value),z.statuses=H.value.map(k=>k.value),u.value=z}const G=O(new ie);G.value.currentPage=0,G.value.pageSize=r.pageSize??16,G.value.totalSize=nt.value.length,ut(nt,()=>{G.value.totalSize=nt.value.length,G.value.currentPage>=G.value.totalPage&&(G.value.currentPage=G.value.totalPage-1)});const P=b(()=>nt.value.slice(G.value.currentLeft,G.value.currentRight)),S=O(!1);function st(z){const k="bg-primary-100 text-primary-800 dark:bg-primary-900 dark:text-primary-300",F=z.problemId,U=n.value.contest.problemsMap.get(F);if(U==null||!U.balloonColor)return k}function mt(z){const k=z.problemId,F=n.value.contest.problemsMap.get(k);if(!(F==null||!F.balloonColor))return{backgroundColor:F.balloonColor.background_color,color:F.balloonColor.color}}const K=O(!1),it=O(null);function W(z){it.value=z,K.value=!0}function $t(){K.value=!1}return(z,k)=>{var ft,M,I,R;const F=ls,U=bt,pt=ue;return l(),m("section",null,[e("div",rs,[t(K)?(l(),m("div",is,[x(F,{"is-open":t(K),"submission-reaction":t(it),onClose:$t},null,8,["is-open","submission-reaction"])])):h("",!0),e("div",{relative:"","overflow-hidden":"","bg-white":"","dark:bg-gray-800":"",class:E({"shadow-md":r.removeBorder!==!0,"sm:rounded-sm":r.removeBorder!==!0})},[e("div",us,[e("div",cs,[t(n).contest.organization&&((ft=t(p))!=null&&ft.organization)?(l(),m("div",ds,[x(t(ot),{options:t(f),"selected-options":t(o),placeholder:t(n).contest.organization,onSelect:i},null,8,["options","selected-options","placeholder"])])):h("",!0),(M=t(p))!=null&&M.team?(l(),m("div",ms,[x(t(ot),{options:t(s),"selected-options":t(c),placeholder:"Team",onSelect:y},null,8,["options","selected-options"])])):h("",!0),(I=t(p))!=null&&I.status?(l(),m("div",ps,[x(t(ot),{options:t(B),"selected-options":t(H),placeholder:"Status","custom-attr":rt,onSelect:lt},null,8,["options","selected-options"])])):h("",!0),(R=t(p))!=null&&R.language&&t(w).length>0?(l(),m("div",fs,[x(t(ot),{options:t(w),"selected-options":t($),placeholder:"Language",onSelect:T},null,8,["options","selected-options"])])):h("",!0),t(d)?(l(),m("div",_s,[e("button",{type:"button",class:"flex flex-shrink-0 items-center justify-center border border-gray-200 rounded-lg bg-white px-3 py-2 text-sm font-medium text-gray-900 focus:z-10 dark:border-gray-600 dark:bg-gray-800 hover:bg-gray-100 dark:text-gray-400 hover:text-primary-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700",onClick:dt},k[1]||(k[1]=[e("div",{"i-material-symbols-search":"","mr-1":"","h-5":"","w-5":""},null,-1),Y(" Filter ")]))])):h("",!0)])]),e("div",vs,[e("table",gs,[e("thead",bs,[e("tr",null,[k[2]||(k[2]=e("th",{scope:"col",class:"px-4 py-3"}," Problem ",-1)),t(n).contest.organization?(l(),m("th",hs,v(t(n).contest.organization),1)):h("",!0),k[3]||(k[3]=e("th",{scope:"col",class:"px-4 py-3"}," Team ",-1)),k[4]||(k[4]=e("th",{scope:"col",class:"px-4 py-3"}," Status ",-1)),t(n).contest.options.submissionHasTimeField?(l(),m("th",ys," Time ")):h("",!0),t(S)?(l(),m("th",xs," Memory ")):h("",!0),t(n).contest.options.submissionHasLanguageField?(l(),m("th",ks," Answer ")):h("",!0),k[5]||(k[5]=e("th",{scope:"col",class:"px-4 py-3"}," Submit Time ",-1)),t(n).contest.options.submissionEnableActionField?(l(),m("th",ws," Action ")):h("",!0)])]),e("tbody",null,[(l(!0),m(N,null,j(t(P),D=>{var ht,yt,_t;return l(),m("tr",{key:D.id,class:"border-b dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"},[e("td",Ss,[e("span",{class:E(["rounded px-2 py-0.5 text-sm",[st(D)]]),style:at(mt(D))},v((ht=t(n).contest.problemsMap.get(D.problemId))==null?void 0:ht.label),7)]),t(n).contest.organization?(l(),m("td",$s,v((yt=t(n).teamsMap.get(D.teamId))==null?void 0:yt.organization),1)):h("",!0),e("td",Ts,v((_t=t(n).teamsMap.get(D.teamId))==null?void 0:_t.name),1),e("td",{scope:"row",class:E([D.status.toString()]),"whitespace-nowrap":"","px-4":"","py-2":"",flex:"","items-center":"","font-bold":""},v(t(Ft)[D.status]),3),t(n).contest.options.submissionHasTimeField?(l(),m("td",Cs,[e("div",Ms,v(`${D.time??0} ms`),1)])):h("",!0),t(S)?(l(),m("td",Os," 0.47 ")):h("",!0),t(n).contest.options.submissionHasLanguageField?(l(),m("td",Is,[e("div",zs,v(D.language),1)])):h("",!0),e("td",Fs,[e("div",Bs,[x(U,null,{popper:L(()=>[Y(v(D.timestampDisplayFormatWithMilliSecond),1)]),default:L(()=>[Y(v(D.timestampDisplayFormatWithSecond)+" ",1)]),_:2},1024)])]),t(n).contest.options.submissionEnableActionField?(l(),m("td",Ps,[x(U,null,{popper:L(()=>k[6]||(k[6]=[Y(" Reaction Video ")])),default:L(()=>[D.reaction?(l(),m("div",{key:0,flex:"","items-center":"","justify-start":"","text-lg":"","cursor-pointer":"","i-material-symbols-slow-motion-video":"",onClick:Ot=>W(D.reaction)},null,8,As)):h("",!0)]),_:2},1024)])):h("",!0)])}),128))])])]),x(pt,{pagination:t(G),"onUpdate:pagination":k[0]||(k[0]=D=>V(G)?G.value=D:null)},null,8,["pagination"])],2)])])}}});const St=Q(Ds,[["__scopeId","data-v-31b46868"]]),Es={class:"statistics-0"},Ls=["colspan"],Ns={class:"stnd"},Rs={class:"statistics-1"},Us=["colspan"],js={class:"stnd"},Hs={class:"statistics-0"},Gs=["colspan"],Vs={class:"stnd"},Xs={class:"statistics-1"},Ws=["colspan"],Ys={class:"stnd"},qs={class:"statistics-0"},Qs=["colspan"],Ks={class:"stnd"},Zs={class:"statistics-1"},Js=["colspan"],to={class:"stnd"},eo={class:"statistics-0"},no=["colspan"],so={class:"stnd"},oo=A({__name:"BottomStatistics",props:{rank:null},setup(_){const r=_,{t:n}=et(),p=b(()=>r.rank);function d(){let s=3;return p.value.contest.organization&&s++,p.value.contest.badge&&s++,s}function u(s){return s.submittedNum===0?"NaN":`${Math.floor(s.attemptedNum*100/s.submittedNum)}%`}function f(s){return s.submittedNum===0?"NaN":`${Math.floor(s.acceptedNum*100/s.submittedNum)}%`}function o(s){return s.attemptedNum===0?"NaN":`${s.dirt}%`}function g(s){return s.firstSolveSubmissions.length===0?"Null":`${s.firstSolveSubmissions[0].timestampToMinute}`}function i(s){return s.lastSolveSubmissions.length===0?"Null":`${s.lastSolveSubmissions[0].timestampToMinute}`}return(s,c)=>(l(),m(N,null,[e("tr",Es,[e("td",{class:"empty",colspan:d()},null,8,Ls),e("td",Ns,[e("b",null,v(t(n)("standings.statistics.submitted")),1)]),(l(!0),m(N,null,j(t(p).contest.problems,a=>(l(),m("td",{key:a.id,class:"stnd"},[e("b",null,v(a.statistics.submittedNum),1)]))),128))]),e("tr",Rs,[e("td",{class:"empty",colspan:d()},null,8,Us),e("td",js,[e("b",null,v(t(n)("standings.statistics.attempted")),1)]),(l(!0),m(N,null,j(t(p).contest.problems,a=>(l(),m("td",{key:a.id,class:"stnd"},[e("b",null,v(a.statistics.attemptedNum),1),c[0]||(c[0]=e("br",null,null,-1)),e("b",null," ("+v(u(a.statistics))+") ",1)]))),128))]),e("tr",Hs,[e("td",{class:"empty",colspan:d()},null,8,Gs),e("td",Vs,[e("b",null,v(t(n)("standings.statistics.accepted")),1)]),(l(!0),m(N,null,j(t(p).contest.problems,a=>(l(),m("td",{key:a.id,class:"stnd"},[e("b",null,v(a.statistics.acceptedNum),1),c[1]||(c[1]=e("br",null,null,-1)),e("b",null," ("+v(f(a.statistics))+") ",1)]))),128))]),e("tr",Xs,[e("td",{class:"empty",colspan:d()},null,8,Ws),e("td",Ys,[e("b",null,v(t(n)("standings.statistics.dirt")),1)]),(l(!0),m(N,null,j(t(p).contest.problems,a=>(l(),m("td",{key:a.id,class:"stnd"},[e("b",null,v(a.statistics.attemptedNum-a.statistics.acceptedNum),1),c[2]||(c[2]=e("br",null,null,-1)),e("b",null," ("+v(o(a.statistics))+") ",1)]))),128))]),e("tr",qs,[e("td",{class:"empty",colspan:d()},null,8,Qs),e("td",Ks,[e("b",null,v(t(n)("standings.statistics.se")),1)]),(l(!0),m(N,null,j(t(p).contest.problems,a=>(l(),m("td",{key:a.id,class:"stnd"},[e("b",null,v(a.statistics.se.toFixed(2)),1)]))),128))]),e("tr",Zs,[e("td",{class:"empty",colspan:d()},null,8,Js),e("td",to,[e("b",null,v(t(n)("standings.statistics.first_solved")),1)]),(l(!0),m(N,null,j(t(p).contest.problems,a=>(l(),m("td",{key:a.id,class:"stnd"},[e("b",null,v(g(a.statistics)),1)]))),128))]),e("tr",eo,[e("td",{class:"empty",colspan:d()},null,8,no),e("td",so,[e("b",null,v(t(n)("standings.statistics.last_solved")),1)]),(l(!0),m(N,null,j(t(p).contest.problems,a=>(l(),m("td",{key:a.id,class:"stnd"},[e("b",null,v(i(a.statistics)),1)]))),128))])],64))}});const ao=Q(oo,[["__scopeId","data-v-198c3ef3"]]),lo={"w-full":"","font-bold":"","font-mono":"",flex:"","items-center":"","justify-center":"",class:"mt-[-12px]"},ro=A({__name:"SubmissionsTableModal",props:{isHidden:{type:Boolean},rank:null,team:null,p:null},emits:["update:isHidden"],setup(_,{emit:r}){const n=_,p=r,d=b({get(){return n.isHidden},set(i){p("update:isHidden",i)}}),u=b(()=>n.rank),f=b(()=>n.team),o=b(()=>n.p),g=b(()=>`${f.value.name} - ${o.value.problem.label}`);return(i,s)=>{const c=St,a=wt;return l(),X(a,{"is-hidden":t(d),"onUpdate:isHidden":s[0]||(s[0]=y=>V(d)?d.value=y:null),title:t(g)},{default:L(()=>[e("div",lo,[x(c,{"w-full":"",rank:t(u),submissions:t(o).submissions,"page-size":8,"remove-border":!0},null,8,["rank","submissions"])])]),_:1},8,["is-hidden","title"])}}}),io=A({__name:"TeamProblemBlock",props:{rank:null,team:null,p:null},setup(_){const r=_,n=O(!0);function p(){n.value=!1}const d=b(()=>r.rank),u=b(()=>r.team),f=b(()=>r.p);function o(s){return s.isSolved?"+":s.isWrongAnswer?"-":s.isPending?`? ${s.pendingCount}`:""}function g(s){let c="";return s.isUnSubmitted||(c+=`${s.failedCount+Number(s.isSolved)}`),(s.isSolved&&d.value.contest.statusTimeDisplay.correct||s.isPending&&d.value.contest.statusTimeDisplay.pending||s.isWrongAnswer&&d.value.contest.statusTimeDisplay.incorrect)&&(c+=`/${Math.floor(s.lastSubmitTimestamp/60)}`),c}function i(s){return s.isFirstSolved?"first-solve":s.isSolved?"correct":s.isWrongAnswer?"incorrect":s.isPending?"pending":"unattempted"}return(s,c)=>{const a=ro;return l(),m("td",{class:E(["stnd",[i(t(f))]])},[e("div",{"cursor-pointer":"",flex:"","flex-col":"","justify-center":"","items-center":"",onClick:p},[e("div",null,v(o(t(f))),1),e("div",null,v(g(t(f))),1)]),e("div",null,[t(n)?h("",!0):(l(),X(a,{key:0,"is-hidden":t(n),"onUpdate:isHidden":c[0]||(c[0]=y=>V(n)?n.value=y:null),rank:t(d),team:t(u),p:t(f)},null,8,["is-hidden","rank","team","p"]))])],2)}}});const uo=Q(io,[["__scopeId","data-v-99090aec"]]),co={"text-gray-900":"","dark:text-white":"","text-xl":"","font-mono":"","font-semibold":"",italic:"",flex:"","flex-col":"","gap-2":"","justify-center":"","items-center":""},mo={flex:"","flex-col":"","items-start":"","gap-y-2":""},po={key:0},fo={key:1},_o={key:2,flex:"","flex-col":"","gap-2":""},vo={key:3},go=A({__name:"TeamAwards",props:{team:null,rank:null},setup(_){const r=_,n=b(()=>r.team),p=b(()=>r.rank),d=b(()=>r.team.problemStatistics.filter(o=>!!o.isFirstSolved).map(o=>o.problem.label).join(",")),u=b(()=>{const o=r.team.awards;return o.includes(q.GOLD)?{text:"Gold"}:o.includes(q.SILVER)?{text:"Silver"}:o.includes(q.BRONZE)?{text:"Bronze"}:o.includes(q.HONORABLE)?{text:"Honorable"}:null}),f=b(()=>{let o=n.value.rank;return p.value.contest.organization&&(o=n.value.organizationRank),o===1?"1st Place":o===2?"2nd Place":o===3?"3rd Place":""});return(o,g)=>(l(),m("div",co,[e("div",mo,[t(u)?(l(),m("div",po,v(t(u).text)+" Medalist ",1)):h("",!0),t(f).length>0?(l(),m("div",fo,v(t(f)),1)):h("",!0),t(d).length?(l(),m("div",_o,[e("div",null," First Solved Problem "+v(t(d)),1)])):h("",!0),t(n).solvedProblemNum>0?(l(),m("div",vo," Solved "+v(t(n).solvedProblemNum)+" "+v(t(n).solvedProblemNum>1?"Problems":"Problem"),1)):h("",!0)])]))}}),bo={role:"group","inline-flex":"","flex-col":"","w-full":"","md:w-auto":"","md:flex-row":"","rounded-md":"","shadow-sm":""},ho=["onClick"],Jt=A({__name:"ModalMenu",props:{currentType:null,types:null},emits:["update:currentType"],setup(_,{emit:r}){const n=_,p=r,{t:d}=et(),u=b({get(){return n.currentType},set(g){p("update:currentType",g)}});function f(g){u.value=g}const o=b(()=>n.types.length);return(g,i)=>(l(),m("div",bo,[(l(!0),m(N,null,j(n.types,(s,c)=>(l(),m("button",{key:s,type:"button","px-4":"","py-2":"","my-2":"","text-sm":"","font-medium":"","text-gray-900":"","bg-white":"","dark:bg-gray-700":"","dark:text-white":"","border-gray-200":"","dark:border-gray-600":"","hover:bg-gray-100":"","dark:hover:bg-gray-600":"","hover:text-primary-700":"","dark:hover:text-white":"","focus:z-10":"","focus:ring-2":"","focus:ring-primary-700":"","focus:text-primary-700":"","dark:focus:ring-primary-500":"","dark:focus:text-white":"",class:E({"rounded-t-lg md:rounded-tr-none md:rounded-l-lg":c===0,"rounded-b-lg md:rounded-bl-none md:rounded-r-lg mr-2":c+1===t(o),border:c===0||c+1===t(o),"border-t border-x md:border-x-0 md:border-b":c>0&&c+1<t(o),"md:border-r-0":c===0,"md:border-l":c>0,"z-10 ring-2 ring-primary-700 text-primary-700 dark:ring-primary-600 dark:text-white":t(u)===s}),onClick:a=>f(s)},v(t(d)(`type_menu.${s}`)),11,ho))),128))]))}}),yo=["src"],te=A({__name:"Badge",props:{image:null,widthClass:null},setup(_){const r=_,n=b(()=>r.image),p=b(()=>r.widthClass?r.widthClass:"h-8 w-8");return(d,u)=>t(n).base64?(l(),m("img",{key:0,src:t(Yt)(t(n)),alt:"badge",class:E([t(p)])},null,10,yo)):h("",!0)}}),xo={"w-full":"","max-w-screen-xl":"","px-4":"","mx-auto":"","lg:px-12":""},ko={relative:"","overflow-hidden":"","bg-white":"","dark:bg-gray-800":""},wo={flex:"","flex-col":"","items-center":"","justify-between":"","md:flex-row":"","space-y-3":"","md:space-y-0":""},So={flex:"","flex-row":"","space-x-3":""},$o={"text-gray-900":"","dark:text-white":"","text-2xl":"","font-sans":"","font-semibold":"",italic:""},To={flex:"","flex-col":"","justify-start":"","items-start":""},Co={"w-full":"","font-bold":"","font-mono":"",flex:"","items-center":"","justify-center":""},Mo={key:0,"w-full":"",class:"mt-[-12px]"},Oo={key:1,"w-full":""},Io={key:2,"w-full":""},At="submissions",Dt="statistics",Et="awards",zo=A({__name:"TeamInfoModal",props:{isHidden:{type:Boolean},rank:null,team:null},emits:["update:isHidden"],setup(_,{emit:r}){const n=_,p=r,d=b({get(){return n.isHidden},set(s){p("update:isHidden",s)}}),u=O("submissions"),f=b(()=>n.rank),o=b(()=>n.team),g=b(()=>{let s="";return f.value.contest.organization&&o.value.organization.length>0&&(s+=`${o.value.organization} - `),s+=`${o.value.name}`,o.value.members&&(s+=` - ${o.value.members}`),o.value.coach&&(s+=` - ${o.value.coach}(coach)`),s}),i=[At,Dt,Et];return(s,c)=>{const a=te,y=bt,w=Jt,$=St,C=go,T=wt;return l(),X(T,{"is-hidden":t(d),"onUpdate:isHidden":c[1]||(c[1]=B=>V(d)?d.value=B:null)},{header:L(()=>[e("div",xo,[e("div",ko,[e("div",wo,[e("div",So,[t(o).badge?(l(),X(a,{key:0,image:t(o).badge,"width-class":"h-8 w-8"},null,8,["image"])):h("",!0),x(y,null,{popper:L(()=>[e("div",To,[e("div",null," TeamID: "+v(t(o).id),1)])]),default:L(()=>[e("h3",$o,v(t(g)),1)]),_:1})]),x(w,{"current-type":t(u),"onUpdate:currentType":c[0]||(c[0]=B=>V(u)?u.value=B:null),types:i},null,8,["current-type"])])])])]),default:L(()=>[e("div",Co,[t(u)===At?(l(),m("div",Mo,[x($,{"w-full":"",rank:t(f),submissions:t(o).submissions,"page-size":8,"remove-border":!0},null,8,["rank","submissions"])])):h("",!0),t(u)===Dt?(l(),m("div",Oo,[x(t(kt.Chart),{options:("getTeamPlaceChart"in s?s.getTeamPlaceChart:t(qn))(t(f),t(o))},null,8,["options"])])):h("",!0),t(u)===Et?(l(),m("div",Io,[x(C,{team:t(o),rank:t(f)},null,8,["team","rank"])])):h("",!0)])]),_:1},8,["is-hidden"])}}}),Fo={},Bo={class:"color-gray-700 dark:color-gray-200"};function Po(_,r){return l(),m("div",Bo,r[0]||(r[0]=[e("svg",{t:"1685666543416",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3736",width:"16",height:"16"},[e("path",{d:"M661.333333 662.613333c0.213333 82.133333 28.8 169.386667 64 169.386667v170.666667H298.666667v-170.666667c35.2 0 63.786667-87.253333 64-169.386667a176.256 176.256 0 0 1 21.333333-1.28h21.333333c0 35.413333 47.786667 64 106.666667 64s106.666667-28.586667 106.666667-64h21.333333a176.256 176.256 0 0 1 21.333333 1.28z",fill:"#F3596B","p-id":"3737"}),e("path",{d:"M810.666667 832v170.666667h-85.333334v-170.666667c-35.2 0-63.786667-87.253333-64-169.386667A170.666667 170.666667 0 0 1 810.666667 832zM362.666667 662.613333c-0.213333 82.133333-28.8 169.386667-64 169.386667v170.666667h-85.333334v-170.666667a170.666667 170.666667 0 0 1 149.333334-169.386667z",fill:"#FFD0AA","p-id":"3738"}),e("path",{d:"M704 320v-85.333333c0-94.293333-97.706667-170.666667-192-170.666667a42.794667 42.794667 0 0 1 42.666667-42.666667h128a128 128 0 0 1 128 128v234.666667s0 85.333333 85.333333 85.333333c0 0-93.226667 134.613333-228.48 6.186667a166.229333 166.229333 0 0 0 13.866667-49.066667L682.666667 426.666667h21.333333a42.666667 42.666667 0 0 0 0-85.333334h-21.333333v-21.333333z",fill:"#FFCA6B","p-id":"3739"}),e("path",{d:"M704 234.666667H320c0-94.293333 97.706667-170.666667 192-170.666667s192 76.373333 192 170.666667z",fill:"#FFCA6B","p-id":"3740"}),e("path",{d:"M704 234.666667v85.333333H320v-85.333333h384z",fill:"#F3596B","p-id":"3741"}),e("path",{d:"M746.666667 384a42.794667 42.794667 0 0 1-42.666667 42.666667h-21.333333l-1.28-0.213334A172.8 172.8 0 0 0 682.666667 405.333333v-64h21.333333a42.794667 42.794667 0 0 1 42.666667 42.666667zM341.333333 405.333333a172.8 172.8 0 0 0 1.28 21.12L341.333333 426.666667h-21.333333a42.666667 42.666667 0 0 1 0-85.333334h21.333333zM618.666667 661.333333c0 35.413333-47.786667 64-106.666667 64s-106.666667-28.586667-106.666667-64a42.794667 42.794667 0 0 0 42.666667-42.666666v-55.04a171.712 171.712 0 0 0 128 0V618.666667a42.794667 42.794667 0 0 0 42.666667 42.666666z",fill:"#FFD0AA","p-id":"3742"}),e("path",{d:"M682.666667 341.333333v64a172.8 172.8 0 0 1-1.28 21.12 166.229333 166.229333 0 0 1-13.866667 49.066667A170.474667 170.474667 0 0 1 576 563.626667 170.538667 170.538667 0 0 1 341.333333 405.333333v-85.333333h341.333334z",fill:"#FFD0AA","p-id":"3743"}),e("path",{d:"M810.666667 1024H213.333333a21.333333 21.333333 0 0 1-21.333333-21.333333v-170.666667a192.213333 192.213333 0 0 1 192-192h21.333333a21.333333 21.333333 0 0 0 21.333334-21.333333v-64h42.666666v64a64 64 0 0 1-64 64h-21.333333a149.504 149.504 0 0 0-149.333333 149.333333v149.333333h554.666666v-149.333333a149.504 149.504 0 0 0-149.333333-149.333333h-21.333333a64 64 0 0 1-64-64v-64h42.666666v64a21.333333 21.333333 0 0 0 21.333334 21.333333h21.333333a192.213333 192.213333 0 0 1 192 192v170.666667a21.333333 21.333333 0 0 1-21.333333 21.333333z",fill:"#2A3244","p-id":"3744"}),e("path",{d:"M512 597.333333a192.234667 192.234667 0 0 1-192-192v-85.333333a21.333333 21.333333 0 0 1 21.333333-21.333333h341.333334a21.333333 21.333333 0 0 1 21.333333 21.333333v85.333333a192.234667 192.234667 0 0 1-192 192z m-149.333333-256v64a149.333333 149.333333 0 0 0 298.666666 0v-64z",fill:"#2A3244","p-id":"3745"}),e("path",{d:"M704 448h-21.333333v-42.666667h21.333333a21.333333 21.333333 0 0 0 0-42.666666h-21.333333v-42.666667h21.333333a64 64 0 0 1 0 128zM341.333333 448h-21.333333a64 64 0 0 1 0-128h21.333333v42.666667h-21.333333a21.333333 21.333333 0 0 0 0 42.666666h21.333333z",fill:"#2A3244","p-id":"3746"}),e("path",{d:"M704 341.333333H320a21.333333 21.333333 0 0 1-21.333333-21.333333v-85.333333a21.333333 21.333333 0 0 1 21.333333-21.333334h384a21.333333 21.333333 0 0 1 21.333333 21.333334v85.333333a21.333333 21.333333 0 0 1-21.333333 21.333333z m-362.666667-42.666666h341.333334v-42.666667H341.333333z",fill:"#2A3244","p-id":"3747"}),e("path",{d:"M725.333333 234.666667h-42.666666c0-84.096-91.733333-149.333333-170.666667-149.333334s-170.666667 65.237333-170.666667 149.333334h-42.666666c0-109.888 112.618667-192 213.333333-192s213.333333 82.112 213.333333 192z",fill:"#2A3244","p-id":"3748"}),e("path",{d:"M783.616 552.32c-46.122667 0-92.266667-22.805333-137.365333-67.904l30.165333-30.165333c39.701333 39.701333 78.613333 58.389333 115.648 55.018666a114.282667 114.282667 0 0 0 60.8-26.026666A105.92 105.92 0 0 1 789.333333 384V149.333333a106.794667 106.794667 0 0 0-106.666666-106.666666h-128a21.333333 21.333333 0 0 0-21.333334 21.333333h-42.666666a64 64 0 0 1 64-64h128a149.504 149.504 0 0 1 149.333333 149.333333v234.666667a60.842667 60.842667 0 0 0 64 64 21.333333 21.333333 0 0 1 17.536 33.472 174.72 174.72 0 0 1-117.333333 70.250667 130.133333 130.133333 0 0 1-12.586667 0.597333zM512 746.666667c-71.765333 0-128-37.482667-128-85.333334h42.666667c0 20.138667 36.48 42.666667 85.333333 42.666667s85.333333-22.528 85.333333-42.666667h42.666667c0 47.850667-56.234667 85.333333-128 85.333334zM746.666667 1002.666667h-42.666667v-154.709334c-43.968-23.274667-64-117.333333-64-186.624h42.666667c0 85.333333 29.866667 148.842667 42.666666 149.333334a22.08 22.08 0 0 1 21.333334 21.333333zM320 1002.666667h-42.666667v-170.666667a21.333333 21.333333 0 0 1 21.333334-21.333333c12.8-0.490667 42.666667-64 42.666666-149.333334h42.666667c0 69.354667-20.032 163.349333-64 186.624z",fill:"#2A3244","p-id":"3749"})],-1)]))}const Ao=Q(Fo,[["render",Po]]),Do={},Eo={class:"color-gray-700 dark:color-gray-200"};function Lo(_,r){return l(),m("div",Eo,r[0]||(r[0]=[e("svg",{t:"1685845881484",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4847",width:"16",height:"16"},[e("path",{d:"M785.352203 933.397493c-4.074805 0-8.151657-0.970094-11.833513-3.007497l-261.311471-142.488225L250.942821 930.388972c-8.343015 4.559852-18.527982 3.8814-26.28669-1.599428-7.760754-5.5279-11.640108-14.987343-10.088776-24.347524l47.578622-285.365306L72.563154 429.470355c-6.594185-6.547113-8.971325-16.295128-6.110161-25.122167 2.814092-8.850575 10.379395-15.397688 19.546172-16.949021l285.512662-47.577598 118.529557-236.989529c4.172019-8.391111 12.803607-13.701047 22.165836-13.701047 9.359158 0 17.992793 5.309936 22.163789 13.701047l118.529557 236.989529 285.511639 47.577598c9.217942 1.551332 16.73208 8.051373 19.593244 16.949021 2.813069 8.875135 0.48607 18.575054-6.109138 25.122167L762.264369 619.077737l47.577598 285.365306c1.50119 9.360182-2.37714 18.819624-10.087753 24.347524C795.487028 931.797042 790.394033 933.397493 785.352203 933.397493zM512.206196 734.747153c4.073782 0 8.196683 0.968048 11.880585 3.006474l228.379431 124.545574-41.268916-247.634983c-1.308809-7.90504 1.257643-16.005532 6.932899-21.63167l164.55787-164.555823-250.398934-41.709961c-7.855922-1.308809-14.549368-6.304589-18.140149-13.408381l-101.942787-203.915249","p-id":"4848"})],-1)]))}const No=Q(Do,[["render",Lo]]),Ro={key:1,class:"empty flex items-center justify-center"},Uo={flex:""},jo={"float-left":"","pl-2":"","font-serif":""},Ho={key:0},Go={"flex-1":""},Vo=A({__name:"TeamUI",props:{ix:null,rank:null,team:null,isFilter:{type:Boolean},giantsType:null},setup(_){const r=_,n=O(null),p=xe(n),d=O(!0);function u(){d.value=!1}const f=b(()=>r.rank),o=b(()=>r.team);function g(s,c=!1){if(c){if(s.awards.includes(q.GOLD))return"gold";if(s.awards.includes(q.SILVER))return"silver";if(s.awards.includes(q.BRONZE))return"bronze";if(s.awards.includes(q.HONORABLE))return"honorable"}if(r.giantsType!==void 0)switch(r.giantsType){case tt.BLUE:return"bg-blue-400";case tt.RED:return"bg-red-400"}if(r.isFilter)return"filter-team";const a=(f.value.rankStatistics.getTeamSolvedNumIndex(s.solvedProblemNum)-1)%2,y=r.ix%2;return`stand${a}${y}`}function i(){return p.value||r.ix<32}return(s,c)=>{const a=te,y=No,w=Ao,$=zo,C=uo;return l(),m("tr",{ref_key:"el",ref:n,class:E(["h-10",[r.isFilter?"filter-team":"",r.giantsType!==void 0?g(r.team):""]])},[i()?(l(),m("td",{key:0,class:E(["stnd",[g(t(o),!0)]])},v(t(o).rank),3)):h("",!0),t(f).contest.badge&&t(o).badge&&i()?(l(),m("td",Ro,[x(a,{image:t(o).badge,"width-class":"h-8 w-8"},null,8,["image"])])):h("",!0),t(f).contest.organization&&i()?(l(),m("td",{key:2,class:E(["stnd",[g(t(o))]])},[e("div",Uo,[e("div",jo,[t(o).organizationRank>-1?(l(),m("div",Ho,v(t(o).organizationRank),1)):h("",!0)]),e("div",Go,v(t(o).organization),1),c[1]||(c[1]=e("div",{"float-right":""},null,-1))])],2)):h("",!0),i()?(l(),m("td",{key:3,class:E(["stnd",[g(t(o))]])},[e("div",{"cursor-pointer":"",onClick:u},[e("span",null,v(t(o).name),1),t(o).group.includes("unofficial")?(l(),X(y,{key:0,"inline-block":""})):h("",!0),t(o).group.includes("girl")?(l(),X(w,{key:1,"inline-block":""})):h("",!0)]),e("div",null,[t(d)?h("",!0):(l(),X($,{key:0,"is-hidden":t(d),"onUpdate:isHidden":c[0]||(c[0]=T=>V(d)?d.value=T:null),rank:t(f),team:t(o)},null,8,["is-hidden","rank","team"]))])],2)):h("",!0),i()?(l(),m("td",{key:4,class:E(["stnd",[g(t(o))]])},v(t(o).solvedProblemNum),3)):h("",!0),i()?(l(),m("td",{key:5,class:E(["stnd",[g(t(o))]])},v(t(o).penaltyToMinute),3)):h("",!0),(l(!0),m(N,null,j(t(o).problemStatistics,T=>(l(),m(N,{key:T.problem.id},[i()?(l(),X(C,{key:0,rank:t(f),team:t(o),p:T},null,8,["rank","team","p"])):h("",!0)],64))),128)),i()?(l(),m("td",{key:6,class:E(["stnd",[g(t(o))]])},v(`${t(o).dirt}%`),3)):h("",!0),i()?(l(),m("td",{key:7,class:E(["stnd",[g(t(o))]])},v(`${t(o).se.toFixed(2)}`),3)):h("",!0)],2)}}});const Xo=Q(Vo,[["__scopeId","data-v-e8acef14"]]),Wo={"w-full":"","max-w-screen-xl":"","px-4":"","mx-auto":"","lg:px-12":""},Yo={relative:"","overflow-hidden":"","bg-white":"","dark:bg-gray-800":""},qo={flex:"","flex-col":"","items-center":"","justify-between":"","md:flex-row":"","space-y-3":"","md:space-y-0":""},Qo={flex:"","flex-row":"","space-x-3":""},Ko={"text-gray-900":"","dark:text-white":"","text-2xl":"","font-sans":"","font-semibold":"",italic:""},Zo={"w-full":"","font-bold":"","font-mono":"",flex:"","items-center":"","justify-center":""},Jo={key:0,"w-full":"",class:"mt-[-12px]"},ta={key:1,"w-full":""},ea={key:2,"w-full":""},Lt="submissions",Nt="statistics",Rt="awards",na=A({__name:"ProblemInfoModal",props:{isHidden:{type:Boolean},rank:null,problem:null},emits:["update:isHidden"],setup(_,{emit:r}){const n=_,p=r,d=b({get(){return n.isHidden},set(c){p("update:isHidden",c)}}),u=O("submissions"),f=b(()=>n.rank),o=b(()=>n.problem),g=b(()=>`Problem ${o.value.label}`),i=b(()=>f.value.getSubmissions().filter(c=>c.problemId===o.value.id)),s=[Lt,Nt,Rt];return(c,a)=>{const y=Jt,w=St,$=wt;return l(),X($,{"is-hidden":t(d),"onUpdate:isHidden":a[1]||(a[1]=C=>V(d)?d.value=C:null)},{header:L(()=>[e("div",Wo,[e("div",Yo,[e("div",qo,[e("div",Qo,[e("h3",Ko,v(t(g)),1)]),x(y,{"current-type":t(u),"onUpdate:currentType":a[0]||(a[0]=C=>V(u)?u.value=C:null),types:s},null,8,["current-type"])])])])]),default:L(()=>[e("div",Zo,[t(u)===Lt?(l(),m("div",Jo,[x(w,{"w-full":"",rank:t(f),submissions:t(i),"page-size":8,"remove-border":!0,"enable-filter":{organization:!0,team:!0,language:!0,status:!0}},null,8,["rank","submissions"])])):h("",!0),t(u)===Nt?(l(),m("div",ta)):h("",!0),t(u)===Rt?(l(),m("div",ea)):h("",!0)])]),_:1},8,["is-hidden"])}}}),sa=A({__name:"ProblemBlock",props:{rank:null,problem:null},setup(_){const r=_,n=O(!0);function p(){n.value=!1}const d=b(()=>r.rank),u=b(()=>r.problem),f=b(()=>u.value.balloonColor);return(o,g)=>{const i=na;return l(),m("th",{key:t(u).id,class:"success","text-center":"",style:at([{width:"3rem"},{"background-color":t(f).background_color,color:t(f).color}])},[e("div",{"cursor-pointer":"",flex:"","flex-col":"","justify-center":"","items-center":"",onClick:p},[e("div",null,v(t(u).label),1),e("div",null,v(t(u).statistics.acceptedNum),1)]),e("div",null,[t(n)?h("",!0):(l(),X(i,{key:0,"is-hidden":t(n),"onUpdate:isHidden":g[0]||(g[0]=s=>V(n)?n.value=s:null),rank:t(d),problem:t(u)},null,8,["is-hidden","rank","problem"]))])],4)}}});const oa=Q(sa,[["__scopeId","data-v-6d613751"]]),aa={"text-8xl":"","font-mono":"",flex:"","justify-center":"","items-center":""},la={flex:"","justify-end":"","items-center":"","text-blue-400":""},ra={flex:"","flex-col":"","items-center":"","justify-center":"","ml-4":""},ia={"text-6xl":""},ua={"text-4xl":""},ca={flex:"","justify-start":"","items-center":"","text-red-400":""},da={flex:"","flex-col":"","items-center":"","justify-center":"","mr-4":""},ma={"text-6xl":""},pa={"text-4xl":""},fa=A({__name:"GiantsScoreBoard",props:{battleOfGiants:null},setup(_){const r=_,n=b(()=>r.battleOfGiants);return(p,d)=>(l(),m("div",null,[e("div",aa,[e("div",la,[e("div",null,v(t(n).blueTeam.name),1),e("div",ra,[e("div",ia,v(t(n).blueTeam.totalSolvedProblemNum),1),e("div",ua,v(t(n).blueTeam.totalPenaltyToString),1)])]),d[0]||(d[0]=e("div",{flex:"","justify-center":"","items-center":"","ml-4":"","mr-4":""}," : ",-1)),e("div",ca,[e("div",da,[e("div",ma,v(t(n).redTeam.totalSolvedProblemNum),1),e("div",pa,v(t(n).redTeam.totalPenaltyToString),1)]),e("div",null,v(t(n).redTeam.name),1)])])]))}}),_a={key:0,"mb-4":""},va={class:"standings","font-mono":"","dark:text-gray-700":""},ga={class:"sticky top-0 z-99"},ba={class:"title",style:{width:"3rem"}},ha={key:0,class:"title",style:{width:"2rem"}},ya={class:"title",style:{width:"3rem"}},xa={class:"title",style:{width:"4rem"}},ka={class:"title",style:{width:"2.5rem"}},wa={class:"title",style:{width:"2.5rem"}},Sa=A({__name:"Standings",props:{rank:{}},setup(_){const r=_,{t:n}=et(),p=b(()=>r.rank),d=b(()=>r.rank.teams),u=b(()=>r.rank.options),f=b(()=>r.rank.teams.filter(c=>!!(r.rank.organizations&&r.rank.options.filterOrganizationMap.has(c.organization)||r.rank.options.filterTeamMap.has(c.id)))),o=b(()=>{const s=u.value.battleOfGiants,c=s.blueTeam,a=s.redTeam;c.teams=[],a.teams=[];let y=0,w=0;for(const C of r.rank.teams){const T=(()=>c.filterOrganizationMap.has(C.organization)||c.filterTeamMap.has(C.id)?y>=s.topX?null:(y++,tt.BLUE):a.filterOrganizationMap.has(C.organization)||a.filterTeamMap.has(C.id)?w>=s.topX?null:(w++,tt.RED):null)();if(T!==null&&(T===tt.BLUE?c.teams.push(C):a.teams.push(C),y===s.topX&&w===s.topX))break}if(s.equalTeams){for(;c.teams.length<a.teams.length;)a.teams.pop();for(;a.teams.length<c.teams.length;)c.teams.pop()}const $=[...c.teams.map(C=>({team:C,giantsType:tt.BLUE})),...a.teams.map(C=>({team:C,giantsType:tt.RED}))];return $.sort((C,T)=>ke.compare(C.team,T.team)),$}),g=b(()=>{let s=0;return p.value.teams.forEach(c=>{s=Math.max(s,c.organization.length)}),s}),i=b(()=>{let s=0;return p.value.teams.forEach(c=>{s=Math.max(s,c.name.length)}),s});return(s,c)=>{const a=fa,y=oa,w=bt,$=Xo,C=ao;return l(),m("div",null,[t(u).battleOfGiants.enable?(l(),m("div",_a,[x(a,{"battle-of-giants":t(u).battleOfGiants},null,8,["battle-of-giants"])])):h("",!0),e("div",null,[e("table",va,[e("thead",ga,[e("tr",null,[e("th",ba,v(t(n)("standings.place")),1),t(p).contest.badge?(l(),m("th",ha,v(t(p).contest.badge),1)):h("",!0),t(p).contest.organization?(l(),m("th",{key:1,class:"title",style:at({width:`${Math.min(32,Math.ceil(t(g)*1.1))}rem`})},v(t(p).contest.organization),5)):h("",!0),e("th",{class:"title",style:at({width:`${Math.min(32,Math.ceil(t(i)*1))}rem`})},v(t(n)("standings.team")),5),e("th",ya,v(t(n)("standings.solved")),1),e("th",xa,v(t(n)("standings.penalty")),1),(l(!0),m(N,null,j(t(p).contest.problems,T=>(l(),X(y,{key:`problem-block-${T.id}`,rank:t(p),problem:T},null,8,["rank","problem"]))),128)),e("th",ka,[x(w,{placement:"top"},{popper:L(()=>c[0]||(c[0]=[e("div",null,[Y(" number of submits on the "),e("br"),Y(" all solved problems / number "),e("br"),Y(" of the solved problems ")],-1)])),default:L(()=>[e("div",null,v(t(n)("standings.dirt")),1)]),_:1})]),e("th",wa,[x(w,{placement:"top"},{popper:L(()=>c[1]||(c[1]=[e("div",null,[Y(' "average hardness". '),e("br"),Y(" Problem, solved by N teams out of M, "),e("br"),Y(" have hardness (M-N)/M. ")],-1)])),default:L(()=>[e("div",null,v(t(n)("standings.se")),1)]),_:1})])])]),e("tbody",null,[t(u).battleOfGiants.enable?(l(!0),m(N,{key:0},j(t(o),(T,B)=>(l(),X($,{key:`giant-team-${T.team.id}`,ix:B,rank:t(p),team:T.team,"giants-type":T.giantsType},null,8,["ix","rank","team","giants-type"]))),128)):h("",!0),(l(!0),m(N,null,j(t(f),(T,B)=>(l(),X($,{key:`filter-${T.id}`,ix:B,rank:t(p),team:T,"is-filter":!0},null,8,["ix","rank","team"]))),128)),(l(!0),m(N,null,j(t(d),(T,B)=>(l(),X($,{key:T.id,ix:B,rank:t(p),team:T},null,8,["ix","rank","team"]))),128)),x(C,{rank:t(p)},null,8,["rank"])])])])])}}});const $a=Q(Sa,[["__scopeId","data-v-84f25c40"]]),Ta={"font-mono":"",flex:""},Ca=["onClick"],Ma=["href"],Oa={key:1},Ia=A({__name:"SecondLevelMenu",props:{items:null,currentItem:null,queryParamName:null,reverseOrder:{type:Boolean},onChange:{type:Function}},emits:["update:currentItem"],setup(_,{emit:r}){const n=_,p=r,d=b(()=>{var a;for(const y of n.items)if(y.isDefault)return y.keyword;return(a=n.items)==null?void 0:a[0].keyword}),u=Ct(n.queryParamName,d.value,{transform:String}),f=b({get(){return n.currentItem},set(a){p("update:currentItem",a)}}),{t:o,locale:g}=et();function i(a){return a.title?o(a.title):a.titles?a.titles.get(g.value)??a.titles.get(a.defaultLang):""}function s(a){return f.value===a.keyword}function c(a){n.onChange&&n.onChange(a.keyword),!(a.link||a.isModal)&&(f.value=a.keyword,u.value=a.keyword)}return qt(()=>{(()=>{var a;((a=u.value)==null?void 0:a.length)>0&&((()=>{for(const y of n.items)if(y.titles){for(const[w,$]of y.titles)if(u.value===$){u.value=y.keyword;return}}})(),f.value=u.value,n.onChange&&n.onChange(u.value))})()}),(a,y)=>(l(),m("div",Ta,[e("div",{class:E(["mr-[-4px]",{"flex-row-reverse":n.reverseOrder}]),flex:""},[(l(!0),m(N,null,j(n.items,w=>(l(),m("div",{key:w.keyword,class:E(["second-level-menu-item",[s(w)?"second-level-menu-item-current":""]]),onClick:$=>c(w)},[e("div",null,[w.link?(l(),m("a",{key:0,href:w.link,target:"_blank",title:"Resolver"},v(i(w)),9,Ma)):h("",!0),w.link?h("",!0):(l(),m("div",Oa,v(i(w)),1))])],10,Ca))),128))],2)]))}});const za=Q(Ia,[["__scopeId","data-v-714a998b"]]);const Fa={},Ba={flex:"","items-center":"","justify-center":"","dark:text-black":""};function Pa(_,r){return l(),m("div",Ba,r[0]||(r[0]=[we('<table data-v-9e0d419f><tbody data-v-9e0d419f><tr data-v-9e0d419f><td class="gold" data-v-9e0d419f> Gold </td><td class="silver" data-v-9e0d419f> Silver </td><td class="bronze" data-v-9e0d419f> Bronze </td><td class="honorable" data-v-9e0d419f> Honorable </td><td class="first-solve" data-v-9e0d419f> First to solve problem </td><td class="correct" data-v-9e0d419f> Solved problem </td><td class="incorrect" data-v-9e0d419f> Attempted problem </td><td class="pending" data-v-9e0d419f> Pending judgement/Frozen </td></tr></tbody></table>',1)]))}const Aa=Q(Fa,[["render",Pa],["__scopeId","data-v-9e0d419f"]]),Da={flex:""},Ea={flex:""},La={flex:""},Na=A({__name:"BoardTab",props:{rank:{}},setup(_){const r=_,n=b(()=>r.rank),{t:p}=et(),d=Vt.useToast(),{copy:u,isSupported:f}=Xt();let o=null;const g=O(null),i=O(null);function s(){return window?f.value?!0:(d.warning("clipboard is not supported"),o==null||o.hide(),!1):!1}function c(){d.success("copy success"),o==null||o.hide()}function a(){s()&&(u(window.location.href),c())}function y(){if(!s())return;const w=`<iframe src="${window.location.href}" border="0" frameborder="no" framespacing="0" allowfullscreen="true" style="width: 100%; height: 720px"></iframe>`;u(w),c()}return qt(()=>{if(g.value&&i.value){const w={placement:"right",triggerType:"click",offsetSkidding:32,offsetDistance:5,delay:300};o=new Se(g.value,i.value,w)}}),(w,$)=>{const C=bt;return l(),m("div",Da,[e("div",null,[x(C,{"w-inherit":""},{popper:L(()=>{var T;return[e("div",Ea,[e("div",null,v(t(p)("standings.options.calculation_of_penalty"))+": "+v(t(p)(`standings.options.${(T=t(n).contest.options)==null?void 0:T.calculationOfPenalty}`)),1)])]}),default:L(()=>[$[0]||($[0]=e("div",null,[e("div",{"i-material-symbols-info-outline":"","text-lg":""})],-1))]),_:1})]),$[1]||($[1]=e("div",{class:"border-l-[1px] border-r-[1px]","mx-2":"","h-6":"","border-color-black":"","dark:border-color-white":""},null,-1)),e("div",La,[e("div",{ref_key:"dropdownTriggerEl",ref:i,"i-material-symbols-share":"","text-lg":"","cursor-pointer":""},null,512),e("div",{ref_key:"dropdownTargetEl",ref:g,class:"z-9999 hidden divide-y divide-gray-100 rounded shadow w-36","bg-white":"","dark:bg-gray-700":""},[e("ul",{class:"py-2 text-sm text-gray-700 dark:text-gray-200"},[e("li",null,[e("div",{class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white","cursor-pointer":"",onClick:a}," Copy Page Link ")]),e("li",null,[e("div",{class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white","cursor-pointer":"",onClick:y}," Copy Page Code ")])])],512)])])}}}),Ra={key:0},Ua={key:0},ja={key:0},Ha={class:"max-w-[92%]"},Ga=["src"],Va={class:"max-w-[92%]"},Xa={class:"w-[92%]"},Wa={class:"flex font-bold font-mono"},Ya={class:"float-left"},qa={class:"pl-0.5"},Qa={class:"flex-1"},Ka={class:"float-right"},Za={class:"pl-0.5"},Ja={class:"mt-2"},tl={class:"mt-2 flex font-bold font-mono"},el={class:"float-left"},nl={class:"flex-1"},sl={class:"float-right"},ol={class:"mt-4 flex"},al={class:"float-left"},ll={class:"float-right"},rl={class:"w-[92%]",flex:"","justify-center":""},il={key:0},ul={key:1,class:"sm:w-full xl:w-[92%]"},cl={key:2,class:"sm:w-full xl:w-[92%]"},dl={key:3},ml={key:4},pl={key:2},Ut="sm:w-[1280px] xl:w-screen",xt="sm:w-[1260px] xl:w-screen",fl=A({__name:"Board",props:{dataSourceUrl:null},setup(_){const r=_,n=ct(),p=$e(Bt),{t:d}=et(),u=O(!1),f=O({}),o=O([]),g=O([]),i=O({}),s=Te(),c=O(new Ce),a=O(!1);(()=>{const M=Je(),I=tn();M.value.length>0&&c.value.setFilterOrganizations(M.value),I.value.length>0&&c.value.setFilterTeams(I.value)})(),(()=>{const M=Kt();M.value!==null&&M.value!==void 0&&c.value.battleOfGiants.FromBase64(M.value)})();const y=O("all");function w(M){M!==c.value.group&&c.value.setGroup(M)}(()=>{const M=Ct("group","all",{transform:String});y.value=M.value,c.value.setGroup(M.value)})();const $=Ct("replay-start-time",0,{transform:Number}),C=O(!1);function T(M={force:!1}){if(a.value&&M.force===!1||C.value===!0)return;C.value=!0;const I=new Le(f.value,o.value,g.value);I.options=Tt.cloneDeep(c.value),I.setReplayTime($.value),I.buildRank(),i.value=I,C.value=!1}const{data:B,isError:H,error:Z,refetch:lt}=Ue(r.dataSourceUrl??n.path,s);ut(B,async()=>{var M,I,R;B.value===null||B.value===void 0||(f.value=Me((M=B.value)==null?void 0:M.contest),p.value=`${f.value.name} | ${Bt}`,o.value=Oe((I=B.value)==null?void 0:I.teams),g.value=Ie((R=B.value)==null?void 0:R.submissions),!c.value.enableFilterSubmissionsByTimestamp&&(T(),u.value=!0))},{immediate:!0});function rt(){u.value!==!1&&T()}ut(c.value,()=>{if(!i.value.options.isNeedReBuildRank(c.value)){i.value.options=Tt.cloneDeep(c.value);return}rt()});{let M=function(){$.value===0?I():(rt(),R())};const{pause:I,resume:R}=ze(()=>{rt()},1e3);M(),ut($,()=>{M()})}const nt=O([{title:"type_menu.rank",keyword:"rank",isDefault:!0},{title:"type_menu.submissions",keyword:"submissions"},{title:"type_menu.statistics",keyword:"statistics"},{title:"type_menu.export",keyword:"export"},{title:"type_menu.utility",keyword:"utility"},{title:"type_menu.options",keyword:"options",isModal:!0}]),dt=b(()=>i.value.contest.group),G=b(()=>{const M=Array();for(const[I,R]of dt.value){const D={titles:R.names,defaultLang:R.defaultLang,keyword:I,isDefault:R.isDefault};M.push(D)}return M}),P=O("rank"),S=O(!0);function st(M){M==="options"&&(S.value=!1)}function mt(){const M=document.documentElement.scrollHeight||document.body.scrollHeight,I=document.documentElement.scrollTop||document.body.scrollTop,R=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;return M-I===R}let K=null;function it(){K!==null&&clearInterval(K)}Fe("S",M=>{if(a.value=!a.value,a.value===!0){let R=0,D="DOWN";K=setInterval(()=>{if(D==="DOWN"){if(mt()){D="UP",T({force:!0});return}R+=2}else{if(R===0){D="DOWN",T({force:!0});return}R-=2}window.scrollTo({top:R,behavior:"smooth"})},64)}else it()},{dedupe:!1});const W=b(()=>{const M=i.value.contest.getStartTime().format("YYYY-MM-DD HH:mm:ss");return`${d("standings.start_time")}${d("common.colon")}${M}`}),$t=b(()=>{const M=i.value.contest.getEndTime().format("YYYY-MM-DD HH:mm:ss");return`${d("standings.end_time")}${d("common.colon")}${M}`}),z=b(()=>{const M=i.value.contest.getContestElapsedTime(s.value);return`${d("standings.elapsed")}${d("common.colon")}${M}`}),k=b(()=>{const M=i.value.contest.getContestRemainingTime(s.value);return`${d("standings.remaining")}${d("common.colon")}${M}`}),F=b(()=>i.value.options.enableFilterSubmissionsByTimestamp?Be.PAUSED:i.value.contest.getContestState(s.value)),U=b(()=>Wt(i.value.options.timestamp)),pt=Pe(()=>{lt()},30*1e3),ft=Ae();return ut(ft,()=>{ft.value!=="hidden"&&pt()}),De(()=>{it()}),(M,I)=>{const R=Na,D=Ne,ht=Re,yt=Aa,_t=za,Ot=$a,ee=St,ne=os,se=Vn,oe=In,ae=Tn,le=_n;return l(),m("div",null,[t(u)?h("",!0):(l(),m("div",Ra,[e("div",{class:E([Ut]),flex:"","flex-col":"","gap-4":"","justify-center":"","items-center":""},[e("div",null,v(t(d)("common.loading"))+"... ",1),t(H)?(l(),m("div",Ua,v(t(Z)),1)):h("",!0)],2)])),t(u)?(l(),m("div",{key:1,class:E([Ut]),flex:"","flex-col":"","justify-center":"","items-center":""},[t(i).contest.banner?(l(),m("div",ja,[e("div",{class:E([xt]),flex:"","justify-center":"","items-center":""},[e("div",Ha,[e("img",{src:t(Yt)(t(i).contest.banner,`${"DATA_HOST"in M?M.DATA_HOST:t(Ee)}${t(n).path.slice(1)}`),alt:"banner"},null,8,Ga)])],2)])):h("",!0),!t(i).contest.banner||t(i).contest.banner&&t(i).contest.bannerMode==="ALL"?(l(),m("div",{key:1,class:E(["title",[xt]]),flex:"","justify-center":"","text-center":"","text-3xl":"","font-normal":"","font-serif":"","mb-2":""},[e("div",Va,v(t(i).contest.name),1)],2)):h("",!0),e("div",null,[x(R,{rank:t(i)},null,8,["rank"])]),e("div",{class:E([xt]),"mt-2":"",flex:"","flex-row":"","justify-center":""},[e("div",Xa,[e("div",Wa,[e("div",Ya,[Y(v(t(W)),1),e("sup",qa,v(t(i).contest.getStartTime().format("z")),1)]),e("div",Qa,[x(D,{state:t(F),"pending-time":t(i).contest.getContestPendingTime(t(s)),"paused-time":t(U)},null,8,["state","pending-time","paused-time"])]),e("div",Ka,[Y(v(t($t)),1),e("sup",Za,v(t(i).contest.endTime.format("z")),1)])]),e("div",Ja,[x(ht,{"rank-options":t(c),"onUpdate:rankOptions":I[0]||(I[0]=J=>V(c)?c.value=J:null),width:t(i).contest.getContestProgressRatio(t(s)),state:t(i).contest.getContestState(t(s)),"need-scroll":!0,rank:t(i),"elapsed-time":t(i).contest.getContestElapsedTime(t(s))},null,8,["rank-options","width","state","rank","elapsed-time"])]),e("div",tl,[e("div",el,v(t(z)),1),e("div",nl,[x(yt)]),e("div",sl,v(t(k)),1)]),e("div",ol,[e("div",al,[x(_t,{"current-item":t(y),"onUpdate:currentItem":I[1]||(I[1]=J=>V(y)?y.value=J:null),items:t(G),"query-param-name":"group","on-change":w},null,8,["current-item","items"])]),I[5]||(I[5]=e("div",{class:"flex-1"},null,-1)),e("div",ll,[x(_t,{"current-item":t(P),"onUpdate:currentItem":I[2]||(I[2]=J=>V(P)?P.value=J:null),items:t(nt),"reverse-order":!0,"query-param-name":"type","on-change":st},null,8,["current-item","items"])])])])],2),e("div",{"mt-4":"",class:E([xt]),flex:"","justify-center":""},[e("div",rl,[t(P)==="rank"?(l(),m("div",il,[x(Ot,{rank:t(i)},null,8,["rank"])])):h("",!0),t(P)==="submissions"?(l(),m("div",ul,[x(ee,{"w-full":"",rank:t(i),submissions:t(i).getSubmissions(),"enable-filter":{organization:!0,team:!0,language:!0,status:!0}},null,8,["rank","submissions"])])):h("",!0),t(P)==="statistics"?(l(),m("div",cl,[x(ne,{rank:t(i)},null,8,["rank"])])):h("",!0),t(P)==="export"?(l(),m("div",dl,[x(se,{rank:t(i)},null,8,["rank"])])):h("",!0),t(P)==="utility"?(l(),m("div",ml,[x(oe,{rank:t(i)},null,8,["rank"])])):h("",!0)])],2),t(c).enableAnimatedSubmissions?(l(),m("div",pl,[x(ae,{rank:t(i)},null,8,["rank"])])):h("",!0),t(S)?h("",!0):(l(),X(le,{key:3,"is-hidden":t(S),"onUpdate:isHidden":I[3]||(I[3]=J=>V(S)?S.value=J:null),"rank-options":t(c),"onUpdate:rankOptions":I[4]||(I[4]=J=>V(c)?c.value=J:null),rank:t(i)},null,8,["is-hidden","rank-options","rank"]))],2)):h("",!0)])}}});const hl=Q(fl,[["__scopeId","data-v-ce668feb"]]);export{hl as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as s,$ as r,a0 as u,aT as p,u as i,o as d,c as m,aU as c,U as x}from"./index-1e2a1259.js";const _=["type","text"],g=s({__name:"TheInput",props:{textAlign:null,textType:null,modelValue:null},emits:["update:modelValue"],setup(a){const t=a,{modelValue:e}=r("modelValue");return(l,n)=>u((d(),m("input",c({id:"input","onUpdate:modelValue":n[0]||(n[0]=o=>x(e)?e.value=o:null)},l.$attrs,{type:t.textType??"text",text:t.textAlign??"center",p:"x-4 y-2","w-full":"",bg:"transparent",border:"~ rounded gray-200 dark:gray-700",outline:"none active:none"}),null,16,_)),[[p,i(e)]])}});export{g as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as p}from"./Board-04b0589d.js";import{_ as l}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-11e5a08c.js";import{g as f}from"./query-ff21040c.js";import{g as i,o as t,c as n,b as r,u as a,l as d,F as g,a as B,J as k,D as c}from"./index-1e2a1259.js";import"./pagination-6eac914a.js";import"./TheInput.vue_vue_type_script_setup_true_lang-f91fd6e0.js";const h={key:0},x=i({__name:"CustomBoard",setup(_){const o=f();return(e,b)=>{const m=l,u=p;return t(),n(g,null,[r(m),a(o).length>0?(t(),n("div",h,[r(u,{"data-source-url":a(o)},null,8,["data-source-url"])])):d("",!0)],64)}}}),s={};function C(_,o){const e=x;return t(),k(e)}typeof c=="function"&&c(s);const V=B(s,[["render",C]]);export{V as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as I,h as T,i as x,o as s,c as n,n as S,u as e,d as o,t as a,b as g,w as C,F as v,j as z,k as $,l as f,m as F,a as j,p as L,R as A,q as P,s as M,v as K,x as W,y as q,z as G,A as O,B as N,T as Q,C as X,D as U}from"./index-1e2a1259.js";import{u as H,g as J}from"./query-ff21040c.js";import{_ as Y}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-11e5a08c.js";import"./TheInput.vue_vue_type_script_setup_true_lang-f91fd6e0.js";const Z={"w-20":"",flex:"","flex-shrink-0":"","justify-center":"","items-center":""},ee={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":"","gap-y-3":""},te={class:"resolver-team-name",truncate:"","overflow-hidden":""},se={flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},ne={"w-48":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},oe={class:"w-1/3"},re={class:"w-2/3"},ae=I({__name:"ResolverTeamRow",props:{index:null,team:null,resolver:null},setup(b){const l=b,i=T(()=>l.index),c=T(()=>l.team),r=T(()=>l.resolver),m=x(null);function h(p){return[p.organization,p.name].filter(y=>y).join(" - ")}return(p,u)=>{const y=F;return s(),n("div",{ref_key:"el",ref:m,"h-24":""},[(s(),n("div",{key:0,"h-24":"",flex:"","flex-row":"","gap-x-4":"","font-mono":"","text-4xl":"",class:S([e(i)%2===0?"bg-resolver-bg-zero":"bg-resolver-bg-one",e(r).duringAnimation&&e(r).currentTeamId===e(c).id?"bg-resolver-selected":"",!e(r).duringAnimation&&e(i)===e(r).currentIndex?"bg-resolver-selected":""])},[o("div",Z,[o("div",null,a(e(c).rank),1)]),o("div",ee,[g(y,null,{popper:C(()=>[o("div",null,a(h(e(c))),1)]),default:C(()=>[o("div",te,a(h(e(c))),1)]),_:1}),o("div",se,[(s(!0),n(v,null,z(e(c).problemStatistics,(t,d)=>(s(),n("div",{key:t.problem.id,class:S(["rounded w-22 h-7 flex justify-center items-center",[t.isAccepted?"bg-resolver-ac":"",t.isWrongAnswer?"bg-resolver-wa":"",t.isPending?"bg-resolver-pending":"",t.isUnSubmitted?"bg-resolver-untouched":"",e(r).problemFlashingEnded===!1&&e(i)===e(r).currentIndex&&e(r).currentProblemIndex===d?"resolver-uncover":""]])},[t.isAccepted?(s(),n(v,{key:0},[$(a(`${t.failedCount+Number(t.isAccepted)}/${Math.floor(t.lastSubmitTimestamp/60)}`),1)],64)):f("",!0),t.isWrongAnswer?(s(),n(v,{key:1},[$(a(`${t.failedCount}/${Math.floor(t.lastSubmitTimestamp/60)}`),1)],64)):f("",!0),t.isPending?(s(),n(v,{key:2},[$(a(`${t.failedCount} + ${t.pendingCount}`),1)],64)):f("",!0),t.isUnSubmitted?(s(),n(v,{key:3},[$(a(t.problem.label),1)],64)):f("",!0)],2))),128))])]),o("div",ne,[o("div",oe,a(e(c).solvedProblemNum),1),o("div",re,a(e(c).penaltyToMinute),1)])],2))],512)}}});const le=j(ae,[["__scopeId","data-v-d1b6b438"]]),ce={"text-gray-200":"","w-screen":"","h-screen":""},ie={key:0},ue={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:"",class:"bg-[#323443]"},de={key:0},_e={key:1},me={class:"bg-resolver-bg-1",flex:"","flex-col":"","justify-between":"","font-mono":""},ve=I({__name:"Resolver",props:{dataSourceUrl:null},setup(b){const l=b,i=L(A),{t:c}=P(),r=x(!1),m=x({}),h=x([]),p=x([]),u=x({}),y=M();function t(){const _=new X(m.value,h.value,p.value);_.buildResolver(),u.value=_}const{data:d,isError:D,error:E}=H(l.dataSourceUrl,y,!0);return K(d,async()=>{var _,k,w;d.value===null||d.value===void 0||(m.value=W((_=d.value)==null?void 0:_.contest),i.value=`${m.value.name} | ${A}`,h.value=q((k=d.value)==null?void 0:k.teams),p.value=G((w=d.value)==null?void 0:w.submissions),t(),r.value=!0)},{immediate:!0}),O([" "],_=>{_.preventDefault()}),N(["n"," "],()=>{u.value.next()},{dedupe:!0}),N(["r"],()=>{u.value.rewind()},{dedupe:!0}),(_,k)=>{const w=le;return s(),n("div",ce,[e(r)?(s(),n("div",_e,[o("div",me,[g(Q,{name:"resolver",tag:"ul"},{default:C(()=>[(s(!0),n(v,null,z(e(u).teams,(R,V)=>(s(),n("div",{key:R.id,"position-relative":"",class:S([R.id===e(u).currentTeamId?"z-999":"z-0"])},[g(w,{index:V,team:R,resolver:e(u)},null,8,["index","team","resolver"])],2))),128))]),_:1})])])):(s(),n("div",ie,[o("div",ue,[o("div",null,a(e(c)("common.loading"))+"... ",1),e(D)?(s(),n("div",de,a(e(E)),1)):f("",!0)])]))])}}});const fe=j(ve,[["__scopeId","data-v-f6b2cc9f"]]),pe={key:0},xe={"mt-20":""},ge={key:1},be=I({__name:"CustomResolver",setup(b){const l=J();return(i,c)=>{const r=Y,m=fe;return s(),n(v,null,[e(l).length===0?(s(),n("div",pe,[o("div",xe,[g(r)])])):f("",!0),e(l).length>0?(s(),n("div",ge,[g(m,{"data-source-url":e(l)},null,8,["data-source-url"])])):f("",!0)],64)}}}),B={};function he(b,l){const i=be;return s(),n("div",null,[g(i)])}typeof U=="function"&&U(B);const Re=j(B,[["render",he]]);export{Re as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as w,h,i as d,E as V,o,c as t,u as e,n as z,d as s,N as C,t as p,l as y,p as F,O as S,q as I,s as O,v as Q,x as R,y as q,z as A,P as J,F as j,j as M,J as P,Q as X,b as B,a as G,D}from"./index-1e2a1259.js";import{u as H,g as K}from"./query-ff21040c.js";import{_ as W}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-11e5a08c.js";import"./TheInput.vue_vue_type_script_setup_true_lang-f91fd6e0.js";const Y={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":""},Z={class:"resolver-team-name",truncate:"","overflow-hidden":""},ee={"w-32":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},oe=w({__name:"BalloonBlock",props:{index:null,balloon:null},setup(m){const n=m,i=h(()=>n.index),a=h(()=>n.balloon),l=d(null),r=V(l);function x(c){return[c.location,c.organization,c.name].filter(k=>k).join(" - ")}const f=h(()=>a.value.problem.balloonColor);return(c,v)=>(o(),t("div",{ref_key:"el",ref:l,"h-24":""},[e(r)?(o(),t("div",{key:0,"h-24":"",flex:"","flex-row":"","gap-x-4":"","font-mono":"","text-4xl":"",class:z([e(i)%2===0?"bg-resolver-bg-0":"bg-resolver-bg-1"])},[s("div",{"w-20":"",flex:"","flex-shrink-0":"","justify-center":"","items-center":"",style:C({backgroundColor:e(f).background_color})},[s("div",{style:C({color:e(f).color})},p(e(a).problem.label),5)],4),s("div",Y,[s("div",Z,p(x(e(a).team)),1),v[0]||(v[0]=s("div",{flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},null,-1))]),s("div",ee,p(e(a).submission.timestampToMinute),1)],2)):y("",!0)],512))}}),te={class:"bg-[#323443]","text-gray-200":"","w-screen":"","h-screen":""},se={key:0},ne={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},ae={key:0},le={key:1},re={flex:"","flex-col":"","justify-between":""},ce=w({__name:"Balloon",props:{dataSourceUrl:null},setup(m){const n=m,i=F(S),{t:a}=I(),l=d(!1),r=d({}),x=d([]),f=d([]),c=d({}),v=O();function k(){const _=new X(r.value,x.value,f.value);_.buildBalloons(),c.value=_}const{data:u,isError:T,error:E}=H(n.dataSourceUrl,v);Q(u,async()=>{var _,g,b;u.value===null||u.value===void 0||(r.value=R((_=u.value)==null?void 0:_.contest),i.value=`${r.value.name} | ${S}`,x.value=q((g=u.value)==null?void 0:g.teams),f.value=A((b=u.value)==null?void 0:b.submissions),k(),l.value=!0)},{immediate:!0});const L=h(()=>c.value.balloons.sort(J.compare).reverse().slice(0,256));return(_,g)=>{const b=oe;return o(),t("div",te,[e(l)?(o(),t("div",le,[s("div",re,[(o(!0),t(j,null,M(e(L),($,U)=>(o(),P(b,{key:$.key,index:U,balloon:$},null,8,["index","balloon"]))),128))])])):(o(),t("div",se,[s("div",ne,[s("div",null,p(e(a)("common.loading"))+"... ",1),e(T)?(o(),t("div",ae,p(e(E)),1)):y("",!0)])]))])}}}),ie={key:0},ue={"mt-20":""},_e={key:1},de=w({__name:"CustomBalloon",setup(m){const n=K();return(i,a)=>{const l=W,r=ce;return o(),t(j,null,[e(n).length===0?(o(),t("div",ie,[s("div",ue,[B(l)])])):y("",!0),e(n).length>0?(o(),t("div",_e,[B(r,{"data-source-url":e(n)},null,8,["data-source-url"])])):y("",!0)],64)}}}),N={};function me(m,n){const i=de;return o(),t("div",null,[B(i)])}typeof D=="function"&&D(N);const be=G(N,[["render",me]]);export{be as default};
|