@xcpcio/board-app 0.44.1 → 0.44.3
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-4569fc6c.js → Board-c41a7b12.js} +3 -3
- package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-86e39d12.js → DataSourceInput.vue_vue_type_script_setup_true_lang-b0ab1d18.js} +1 -1
- package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-6e8ca92c.js → TheInput.vue_vue_type_script_setup_true_lang-2780acad.js} +1 -1
- package/dist/assets/{_...all_-de087eb0.js → _...all_-f78942d0.js} +1 -1
- package/dist/assets/{_name_-06edfd14.js → _name_-8fee1ac6.js} +1 -1
- package/dist/assets/{about-c21c664b.js → about-c29fef0e.js} +1 -1
- package/dist/assets/{board-472d3cb3.js → board-bb2136d4.js} +1 -1
- package/dist/assets/{board-layout-d77cb1f2.js → board-layout-697d2319.js} +1 -1
- package/dist/assets/{headless-fb293940.js → headless-e0c7ce47.js} +1 -1
- package/dist/assets/{home-20deb86b.js → home-745f3988.js} +1 -1
- package/dist/assets/index-0429e829.js +1 -0
- package/dist/assets/{index-40d709ed.js → index-0a50182c.js} +39 -39
- package/dist/assets/{index-06792736.css → index-47212532.css} +2 -2
- package/dist/assets/index-67b2a8c5.css +1 -0
- package/dist/assets/index-944742ec.js +1 -0
- package/dist/assets/{index-layout-d4fc4afd.js → index-layout-c825e6e2.js} +1 -1
- package/dist/assets/{query-7b63ef07.js → query-ebd5f692.js} +1 -1
- package/dist/assets/{test-d415daee.js → test-883825b2.js} +1 -1
- package/dist/assets/{user-1cebd436.js → user-cb76ec54.js} +1 -1
- package/dist/assets/{virtual_pwa-register-11341dab.js → virtual_pwa-register-6534be2d.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +3 -3
- package/src/components/Balloon.vue +1 -9
- package/src/components/ContestIndexUI.vue +1 -9
- package/src/components/Countdown.vue +1 -9
- package/src/components/board/Modal.vue +2 -1
- package/src/components/board/OptionsModal.vue +1 -0
- package/src/composables/useQueryBoardData.ts +3 -3
- package/src/pages/index.vue +17 -7
- package/dist/assets/index-125c12c1.js +0 -1
- package/dist/assets/index-39ee8a2c.css +0 -1
- package/dist/assets/index-3dc9c47f.js +0 -1
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.44.
|
|
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.44.3/dist/balloon-192x192.png"><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.44.3/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.44.3/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.44.3/dist/assets/index-0a50182c.js"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.44.3/dist/assets/index-47212532.css"><link rel="manifest" href="/manifest.webmanifest"><style></style></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
|
|
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-b8d87ee1"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_...all_-f78942d0.js",revision:null},{url:"assets/_name_-8fee1ac6.js",revision:null},{url:"assets/about-c29fef0e.js",revision:null},{url:"assets/Board-916a327e.css",revision:null},{url:"assets/board-bb2136d4.js",revision:null},{url:"assets/Board-c41a7b12.js",revision:null},{url:"assets/board-layout-697d2319.js",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-b0ab1d18.js",revision:null},{url:"assets/en-c9a8dbb5.js",revision:null},{url:"assets/headless-e0c7ce47.js",revision:null},{url:"assets/home-745f3988.js",revision:null},{url:"assets/index-0429e829.js",revision:null},{url:"assets/index-0a50182c.js",revision:null},{url:"assets/index-47212532.css",revision:null},{url:"assets/index-67b2a8c5.css",revision:null},{url:"assets/index-944742ec.js",revision:null},{url:"assets/index-layout-c825e6e2.js",revision:null},{url:"assets/query-ebd5f692.js",revision:null},{url:"assets/test-883825b2.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-2780acad.js",revision:null},{url:"assets/user-cb76ec54.js",revision:null},{url:"assets/virtual_pwa-register-6534be2d.js",revision:null},{url:"assets/workbox-window.prod.es5-a7b12eab.js",revision:null},{url:"assets/zh-CN-8e545f66.js",revision:null},{url:"index.html",revision:"97a965f0cc3580b4d31def7ad978397a"},{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.44.
|
|
4
|
+
"version": "0.44.3",
|
|
5
5
|
"description": "XCPCIO Board App",
|
|
6
6
|
"author": "Dup4 <lyuzhi.pan@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"vue-router": "^4.2.4",
|
|
54
54
|
"vue-search-select": "^3.1.2",
|
|
55
55
|
"vue-toast-notification": "^3",
|
|
56
|
-
"@xcpcio/core": "0.44.
|
|
57
|
-
"@xcpcio/types": "0.44.
|
|
56
|
+
"@xcpcio/core": "0.44.3",
|
|
57
|
+
"@xcpcio/types": "0.44.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@antfu/eslint-config": "^0.39.8",
|
|
@@ -17,7 +17,7 @@ const contestData = ref({} as Contest);
|
|
|
17
17
|
const teamsData = ref([] as Teams);
|
|
18
18
|
const submissionsData = ref([] as Submissions);
|
|
19
19
|
const rank = ref({} as Rank);
|
|
20
|
-
const now =
|
|
20
|
+
const now = useNow();
|
|
21
21
|
|
|
22
22
|
function reBuildBalloons() {
|
|
23
23
|
const newRank = new Rank(contestData.value, teamsData.value, submissionsData.value);
|
|
@@ -45,14 +45,6 @@ watch(data, async () => {
|
|
|
45
45
|
const balloons = computed(() => {
|
|
46
46
|
return rank.value.balloons.sort(Balloon.compare).reverse().slice(0, 256);
|
|
47
47
|
});
|
|
48
|
-
|
|
49
|
-
const setNowIntervalId = setInterval(() => {
|
|
50
|
-
now.value = new Date();
|
|
51
|
-
}, 1000);
|
|
52
|
-
|
|
53
|
-
onUnmounted(() => {
|
|
54
|
-
clearInterval(setNowIntervalId);
|
|
55
|
-
});
|
|
56
48
|
</script>
|
|
57
49
|
|
|
58
50
|
<template>
|
|
@@ -13,7 +13,7 @@ const props = defineProps<{
|
|
|
13
13
|
const { t } = useI18n();
|
|
14
14
|
|
|
15
15
|
const contest = computed(() => props.data.contest);
|
|
16
|
-
const now =
|
|
16
|
+
const now = useNow();
|
|
17
17
|
|
|
18
18
|
const el = ref(null);
|
|
19
19
|
const isVisible = useElementVisibility(el);
|
|
@@ -25,14 +25,6 @@ const logo = computed(() => {
|
|
|
25
25
|
|
|
26
26
|
return getLogoFromPreset(contest.value.logo);
|
|
27
27
|
});
|
|
28
|
-
|
|
29
|
-
const setNowIntervalId = setInterval(() => {
|
|
30
|
-
now.value = new Date();
|
|
31
|
-
}, 1000);
|
|
32
|
-
|
|
33
|
-
onUnmounted(() => {
|
|
34
|
-
clearInterval(setNowIntervalId);
|
|
35
|
-
});
|
|
36
28
|
</script>
|
|
37
29
|
|
|
38
30
|
<template>
|
|
@@ -11,7 +11,7 @@ const props = defineProps<{
|
|
|
11
11
|
const { t } = useI18n();
|
|
12
12
|
const title = useTitle(COUNTDOWN_TITLE_SUFFIX);
|
|
13
13
|
|
|
14
|
-
const now =
|
|
14
|
+
const now = useNow();
|
|
15
15
|
const contest = ref({} as Contest);
|
|
16
16
|
const firstLoaded = ref(false);
|
|
17
17
|
|
|
@@ -26,14 +26,6 @@ watch(data, async () => {
|
|
|
26
26
|
|
|
27
27
|
firstLoaded.value = true;
|
|
28
28
|
});
|
|
29
|
-
|
|
30
|
-
const setNowIntervalId = setInterval(() => {
|
|
31
|
-
now.value = new Date();
|
|
32
|
-
}, 1000);
|
|
33
|
-
|
|
34
|
-
onUnmounted(() => {
|
|
35
|
-
clearInterval(setNowIntervalId);
|
|
36
|
-
});
|
|
37
29
|
</script>
|
|
38
30
|
|
|
39
31
|
<template>
|
|
@@ -6,6 +6,7 @@ const props = defineProps<{
|
|
|
6
6
|
|
|
7
7
|
title?: string,
|
|
8
8
|
width?: string,
|
|
9
|
+
mt?: string,
|
|
9
10
|
}>();
|
|
10
11
|
|
|
11
12
|
const emit = defineEmits(["update:isHidden"]);
|
|
@@ -34,10 +35,10 @@ watch(Escape, (v) => {
|
|
|
34
35
|
<template>
|
|
35
36
|
<div
|
|
36
37
|
class="md:inset-0 w-[100%] h-[100%]"
|
|
38
|
+
:class="[props.mt ?? 'md:mt-32 sm:mt-16']"
|
|
37
39
|
fixed z-9997
|
|
38
40
|
of-x-hidden
|
|
39
41
|
flex justify-center items-start
|
|
40
|
-
md:mt-32 sm:mt-16
|
|
41
42
|
>
|
|
42
43
|
<!-- background -->
|
|
43
44
|
<div
|
|
@@ -46,10 +46,10 @@ async function fetcher(target: string, timestamp?: number): Promise<BoardData> {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export function useQueryBoardData(target: string, timestamp?: any) {
|
|
49
|
-
const timestampSeconds = Math.floor(timestamp.value.getTime() / 1000);
|
|
49
|
+
const timestampSeconds = computed(() => Math.floor(timestamp.value.getTime() / 1000));
|
|
50
50
|
return useQuery({
|
|
51
|
-
queryKey: [target, timestampSeconds],
|
|
52
|
-
queryFn: () => fetcher(target, timestampSeconds),
|
|
51
|
+
queryKey: [target, timestampSeconds.value],
|
|
52
|
+
queryFn: () => fetcher(target, timestampSeconds.value),
|
|
53
53
|
retry: RETRY,
|
|
54
54
|
staleTime: REFETCH_INTERVAL,
|
|
55
55
|
refetchInterval: REFETCH_INTERVAL,
|
package/src/pages/index.vue
CHANGED
|
@@ -12,12 +12,14 @@ import ContestIndexUI from "~/components/ContestIndexUI.vue";
|
|
|
12
12
|
const { t } = useI18n();
|
|
13
13
|
useTitle(TITLE_SUFFIX);
|
|
14
14
|
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const FETCH_INTERVAL = 1000 * 60 * 5;
|
|
16
|
+
const now = useNow();
|
|
17
|
+
const nowMinutes = computed(() => Math.floor(now.value.getTime() / FETCH_INTERVAL));
|
|
18
|
+
|
|
19
|
+
function genURL() {
|
|
20
|
+
return `${window.DATA_HOST}index/contest_list.json?t=${nowMinutes.value}`;
|
|
21
|
+
}
|
|
22
|
+
const url = ref(genURL());
|
|
21
23
|
|
|
22
24
|
const s = useRouteQuery<string | null>("s", "", { transform: String });
|
|
23
25
|
const searchText = ref<string | null>(s.value);
|
|
@@ -59,7 +61,7 @@ const {
|
|
|
59
61
|
isFetching,
|
|
60
62
|
isFinished,
|
|
61
63
|
} = useFetch(url, {
|
|
62
|
-
refetch,
|
|
64
|
+
refetch: true,
|
|
63
65
|
afterFetch: (ctx) => {
|
|
64
66
|
contestIndexAllList.value = createContestIndexList(JSON.parse(ctx.data));
|
|
65
67
|
contestIndexList.value = contestIndexAllList.value.map(c => c);
|
|
@@ -72,6 +74,14 @@ const {
|
|
|
72
74
|
watch(searchText, () => {
|
|
73
75
|
onSearch();
|
|
74
76
|
});
|
|
77
|
+
|
|
78
|
+
const fetchIntervalId = setInterval(() => {
|
|
79
|
+
url.value = genURL();
|
|
80
|
+
}, FETCH_INTERVAL);
|
|
81
|
+
|
|
82
|
+
onUnmounted(() => {
|
|
83
|
+
clearInterval(fetchIntervalId);
|
|
84
|
+
});
|
|
75
85
|
</script>
|
|
76
86
|
|
|
77
87
|
<template>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as x,u as D,h as N,C as g,i as d,w as $,j as U,k as T,o,c as s,l as t,d as c,t as r,m,n as h,p as b,a as y,b as p,F as E,q as C}from"./index-40d709ed.js";import{u as B,g as F}from"./query-7b63ef07.js";import{_ as j}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-86e39d12.js";import"./TheInput.vue_vue_type_script_setup_true_lang-6e8ca92c.js";const V={class:"background","text-gray-200":"","w-screen":"","h-screen":""},L={key:0},O={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},P={key:0},q={key:1},z={flex:"","flex-col":"","items-center":"","justify-center":"","font-mono":""},G={key:0},Q={key:1},W=x({__name:"Countdown",props:{dataSourceUrl:null},setup(l){const a=l,{t:_}=D(),v=N(g),e=d(new Date),n=d({}),f=d(!1),{data:i,isError:w,error:k}=B(a.dataSourceUrl,e);$(i,async()=>{var u;i.value===null||i.value===void 0||(n.value=U((u=i.value)==null?void 0:u.contest),v.value=`${n.value.name} | ${g}`,f.value=!0)});const I=setInterval(()=>{e.value=new Date},1e3);return T(()=>{clearInterval(I)}),(u,R)=>(o(),s("div",V,[t(f)?(o(),s("div",q,[c("div",z,[c("div",{"mt-20":"","text-6xl":"",class:h([t(n).getContestState(t(e)).toString()])},r(t(n).getContestState(t(e))),3),c("div",{"mt-20":"",class:h(["text-[320px]",[t(n).getContestState(t(e)).toString()]])},[t(n).getContestState(t(e))===t(b).PENDING?(o(),s("div",G,r(t(n).getContestPendingTime(t(e))),1)):(o(),s("div",Q,r(t(n).getContestElapsedTime(t(e))),1))],2)])])):(o(),s("div",L,[c("div",O,[c("div",null,r(t(_)("common.loading"))+"... ",1),t(w)?(o(),s("div",P,r(t(k)),1)):m("",!0)])]))]))}});const X=y(W,[["__scopeId","data-v-03b5a196"]]),A={key:0},H={"mt-20":""},J={key:1},K=x({__name:"CustomCountdown",setup(l){const a=F();return(_,v)=>{const e=j,n=X;return o(),s(E,null,[t(a).length===0?(o(),s("div",A,[c("div",H,[p(e)])])):m("",!0),t(a).length>0?(o(),s("div",J,[p(n,{"data-source-url":t(a)},null,8,["data-source-url"])])):m("",!0)],64)}}}),S={};function M(l,a){const _=K;return o(),s("div",null,[p(_)])}typeof C=="function"&&C(S);const nt=y(S,[["render",M]]);export{nt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.background[data-v-03b5a196]{background-color:#333443}.PENDING[data-v-03b5a196]{color:#3bb4f2}.RUNNING[data-v-03b5a196]{color:#5eb95e}.FROZEN[data-v-03b5a196]{color:#dd514c}.FINISHED[data-v-03b5a196]{color:#0e90d2}.PAUSED[data-v-03b5a196]{color:#3bb4f2}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as w,s as h,i,v as L,o,c as t,l as e,n as V,d as s,x as D,t as v,m as y,h as F,B as C,u as R,w as A,j as O,y as q,z as M,A as Q,k as X,F as I,D as G,E as H,R as J,b as B,a as K,q as S}from"./index-40d709ed.js";import{u as P,g as W}from"./query-7b63ef07.js";import{_ as Y}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-86e39d12.js";import"./TheInput.vue_vue_type_script_setup_true_lang-6e8ca92c.js";const Z={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":""},ee={class:"resolver-team-name",truncate:"","overflow-hidden":""},oe=s("div",{flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},null,-1),te={"w-32":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},se=w({__name:"BalloonBlock",props:{index:null,balloon:null},setup(m){const n=m,u=h(()=>n.index),a=h(()=>n.balloon),l=i(null),r=L(l);function x(c){return[c.location,c.organization,c.name].filter(k=>k).join(" - ")}const f=h(()=>a.value.problem.balloonColor);return(c,p)=>(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:V([e(u)%2===0?"bg-resolver-bg-zero":"bg-resolver-bg-one"])},[s("div",{"w-20":"",flex:"","flex-shrink-0":"","justify-center":"","items-center":"",style:D({backgroundColor:e(f).background_color})},[s("div",{style:D({color:e(f).color})},v(e(a).problem.label),5)],4),s("div",Z,[s("div",ee,v(x(e(a).team)),1),oe]),s("div",te,v(e(a).submission.timestampToMinute),1)],2)):y("",!0)],512))}}),ne={class:"bg-[#323443]","text-gray-200":""},ae={key:0},le={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},re={key:0},ce={key:1},ie={flex:"","flex-col":"","justify-between":""},ue=w({__name:"Balloon",props:{dataSourceUrl:null},setup(m){const n=m,u=F(C),{t:a}=R(),l=i(!1),r=i({}),x=i([]),f=i([]),c=i({}),p=i(new Date);function k(){const d=new J(r.value,x.value,f.value);d.buildBalloons(),c.value=d}const{data:_,isError:N,error:T}=P(n.dataSourceUrl,p);A(_,async()=>{var d,g,b;_.value===null||_.value===void 0||(r.value=O((d=_.value)==null?void 0:d.contest),u.value=`${r.value.name} | ${C}`,x.value=q((g=_.value)==null?void 0:g.teams),f.value=M((b=_.value)==null?void 0:b.submissions),k(),l.value=!0)});const U=h(()=>c.value.balloons.sort(Q.compare).reverse().slice(0,256)),z=setInterval(()=>{p.value=new Date},1e3);return X(()=>{clearInterval(z)}),(d,g)=>{const b=se;return o(),t("div",ne,[e(l)?(o(),t("div",ce,[s("div",ie,[(o(!0),t(I,null,G(e(U),($,E)=>(o(),H(b,{key:$.key,index:E,balloon:$},null,8,["index","balloon"]))),128))])])):(o(),t("div",ae,[s("div",le,[s("div",null,v(e(a)("common.loading"))+"... ",1),e(N)?(o(),t("div",re,v(e(T)),1)):y("",!0)])]))])}}}),_e={key:0},de={"mt-20":""},me={key:1},fe=w({__name:"CustomBalloon",setup(m){const n=W();return(u,a)=>{const l=Y,r=ue;return o(),t(I,null,[e(n).length===0?(o(),t("div",_e,[s("div",de,[B(l)])])):y("",!0),e(n).length>0?(o(),t("div",me,[B(r,{"data-source-url":e(n)},null,8,["data-source-url"])])):y("",!0)],64)}}}),j={};function ve(m,n){const u=fe;return o(),t("div",null,[B(u)])}typeof S=="function"&&S(j);const ye=K(j,[["render",ve]]);export{ye as default};
|