@xcpcio/board-app 0.50.0 → 0.50.2
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-40a0cfa5.js → Board-38585e67.js} +1 -1
- package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-98be1768.js → DataSourceInput.vue_vue_type_script_setup_true_lang-114e3155.js} +1 -1
- package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-d2d57e9d.js → TheInput.vue_vue_type_script_setup_true_lang-bd5395e9.js} +1 -1
- package/dist/assets/{_...all_-05bd1449.js → _...all_-0bc53d25.js} +2 -2
- package/dist/assets/{_...all_-f287abfb.js → _...all_-8c4ba3cf.js} +1 -1
- package/dist/assets/{_name_-b94d9254.js → _name_-a532ea53.js} +1 -1
- package/dist/assets/{about-8815e1b2.js → about-6f40b1d0.js} +1 -1
- package/dist/assets/{board-eaf52d42.js → board-08dfd01a.js} +1 -1
- package/dist/assets/{board-layout-bc466cb4.js → board-layout-74a77f38.js} +1 -1
- package/dist/assets/{headless-0dd1f4bf.js → headless-54fb8186.js} +1 -1
- package/dist/assets/{home-8c450f05.js → home-9515d6d7.js} +1 -1
- package/dist/assets/index-0e85099d.js +274 -0
- package/dist/assets/index-3a723320.js +1 -0
- package/dist/assets/{index-83115143.js → index-67faeda8.js} +1 -1
- package/dist/assets/{index-4c46f239.js → index-de0376d5.js} +1 -1
- package/dist/assets/{index-layout-b724cb15.js → index-layout-2b7977ec.js} +1 -1
- package/dist/assets/{pagination-4651c09b.js → pagination-672f41c6.js} +1 -1
- package/dist/assets/query-61045468.js +1 -0
- package/dist/assets/{test-ef214576.js → test-3d1287e8.js} +1 -1
- package/dist/assets/{user-bd439f53.js → user-3576d2ec.js} +1 -1
- package/dist/assets/{virtual_pwa-register-59b9c613.js → virtual_pwa-register-c4e95d0e.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +5 -5
- package/dist/assets/index-82d2f68a.js +0 -274
- package/dist/assets/index-cc09ec19.js +0 -1
- package/dist/assets/query-bd77f1e8.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as w,h as b,i as d,u as U,o,c as t,j as e,D as V,d as s,G as C,t as v,k as h,p as E,H as S,n as F,z as A,A as O,B as R,I as G,J as H,K as J,F as j,s as K,v as M,L as Q,b as B,a as X,y as D}from"./index-82d2f68a.js";import{u as q,g as P}from"./query-bd77f1e8.js";import{_ as W}from"./DataSourceInput.vue_vue_type_script_setup_true_lang-98be1768.js";import"./TheInput.vue_vue_type_script_setup_true_lang-d2d57e9d.js";const Y={flex:"","flex-1":"","flex-col":"","justify-center":"","items-start":""},Z={class:"resolver-team-name",truncate:"","overflow-hidden":""},ee=s("div",{flex:"","flex-row":"","text-sm":"","items-start":"","gap-x-2":""},null,-1),oe={"w-32":"",flex:"","flex-shrink-0":"","flex-row":"","justify-start":"","items-center":""},te=w({__name:"BalloonBlock",props:{index:null,balloon:null},setup(m){const n=m,i=b(()=>n.index),a=b(()=>n.balloon),l=d(null),r=U(l);function p(c){return[c.location,c.organization,c.name].filter(k=>k).join(" - ")}const f=b(()=>a.value.problem.balloonColor);return(c,y)=>(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(i)%2===0?"bg-resolver-bg-zero":"bg-resolver-bg-one"])},[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})},v(e(a).problem.label),5)],4),s("div",Y,[s("div",Z,v(p(e(a).team)),1),ee]),s("div",oe,v(e(a).submission.timestampToMinute),1)],2)):h("",!0)],512))}}),se={class:"bg-[#323443]","text-gray-200":""},ne={key:0},ae={flex:"","flex-col":"","justify-center":"","items-center":"","w-screen":"","h-screen":"","text-xl":"",italic:""},le={key:0},re={key:1},ce={flex:"","flex-col":"","justify-between":""},ie=w({__name:"Balloon",props:{dataSourceUrl:null},setup(m){const n=m,i=E(S),{t:a}=F(),l=d(!1),r=d({}),p=d([]),f=d([]),c=d({}),y=A();function k(){const _=new Q(r.value,p.value,f.value);_.buildBalloons(),c.value=_}const{data:u,isError:N,error:T}=q(n.dataSourceUrl,y);O(u,async()=>{var _,g,x;u.value===null||u.value===void 0||(r.value=R((_=u.value)==null?void 0:_.contest),i.value=`${r.value.name} | ${S}`,p.value=G((g=u.value)==null?void 0:g.teams),f.value=H((x=u.value)==null?void 0:x.submissions),k(),l.value=!0)});const z=b(()=>c.value.balloons.sort(J.compare).reverse().slice(0,256));return(_,g)=>{const x=te;return o(),t("div",se,[e(l)?(o(),t("div",re,[s("div",ce,[(o(!0),t(j,null,K(e(z),($,I)=>(o(),M(x,{key:$.key,index:I,balloon:$},null,8,["index","balloon"]))),128))])])):(o(),t("div",ne,[s("div",ae,[s("div",null,v(e(a)("common.loading"))+"... ",1),e(N)?(o(),t("div",le,v(e(T)),1)):h("",!0)])]))])}}}),ue={key:0},_e={"mt-20":""},de={key:1},me=w({__name:"CustomBalloon",setup(m){const n=P();return(i,a)=>{const l=W,r=ie;return o(),t(j,null,[e(n).length===0?(o(),t("div",ue,[s("div",_e,[B(l)])])):h("",!0),e(n).length>0?(o(),t("div",de,[B(r,{"data-source-url":e(n)},null,8,["data-source-url"])])):h("",!0)],64)}}}),L={};function fe(m,n){const i=me;return o(),t("div",null,[B(i)])}typeof D=="function"&&D(L);const he=X(L,[["render",fe]]);export{he as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{av as K,aw as T,ax as L,ay as D,az as A,aA as B,aB as N,aC as W,aD as P,aE as z,aF as V,aG as G,aH as $,aI as H,h as Q,aJ as J,A as b,aK as x,aL as Y,aM as _,aN as X,aO as Z,j as S,aP as ee,aQ as te,aR as se,ai as k}from"./index-82d2f68a.js";class re extends K{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),M(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return E(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return E(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const s=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),T(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();const i=this.hasListeners();i&&j(this.currentQuery,n,this.options,s)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();const u=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==s.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),s=this.createResult(t,e);return ne(this,s,e)&&(this.currentResult=s,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),s}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach(s=>{Object.defineProperty(t,s,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(s),e[s])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),s=this.client.getQueryCache().build(this.client,t);return s.isFetchingOptimistic=!0,s.fetch().then(()=>this.createResult(s,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:(t=e.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(L)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),D||this.currentResult.isStale||!A(this.options.staleTime))return;const t=B(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(D||this.options.enabled===!1||!A(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||N.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const s=this.currentQuery,n=this.options,i=this.currentResult,u=this.currentResultState,a=this.currentResultOptions,c=e!==s,h=c?e.state:this.currentQueryInitialState,l=c?this.currentResult:this.previousQueryResult,{state:o}=e;let{dataUpdatedAt:d,error:R,errorUpdatedAt:m,fetchStatus:v,status:f}=o,F=!1,U=!1,y;if(t._optimisticResults){const p=this.hasListeners(),C=!p&&M(e,t),q=p&&j(e,s,t,n);(C||q)&&(v=W(e.options.networkMode)?"fetching":"paused",d||(f="loading")),t._optimisticResults==="isRestoring"&&(v="idle")}if(t.keepPreviousData&&!o.dataUpdatedAt&&l!=null&&l.isSuccess&&f!=="error")y=l.data,d=l.dataUpdatedAt,f=l.status,F=!0;else if(t.select&&typeof o.data<"u")if(i&&o.data===(u==null?void 0:u.data)&&t.select===this.selectFn)y=this.selectResult;else try{this.selectFn=t.select,y=t.select(o.data),y=P(i==null?void 0:i.data,y,t),this.selectResult=y,this.selectError=null}catch(p){this.selectError=p}else y=o.data;if(typeof t.placeholderData<"u"&&typeof y>"u"&&f==="loading"){let p;if(i!=null&&i.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData))p=i.data;else if(p=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof p<"u")try{p=t.select(p),this.selectError=null}catch(C){this.selectError=C}typeof p<"u"&&(f="success",y=P(i==null?void 0:i.data,p,t),U=!0)}this.selectError&&(R=this.selectError,y=this.selectResult,m=Date.now(),f="error");const g=v==="fetching",I=f==="loading",O=f==="error";return{status:f,fetchStatus:v,isLoading:I,isSuccess:f==="success",isError:O,isInitialLoading:I&&g,data:y,dataUpdatedAt:d,error:R,errorUpdatedAt:m,failureCount:o.fetchFailureCount,failureReason:o.fetchFailureReason,errorUpdateCount:o.errorUpdateCount,isFetched:o.dataUpdateCount>0||o.errorUpdateCount>0,isFetchedAfterMount:o.dataUpdateCount>h.dataUpdateCount||o.errorUpdateCount>h.errorUpdateCount,isFetching:g,isRefetching:g&&!I,isLoadingError:O&&o.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:U,isPreviousData:F,isRefetchError:O&&o.dataUpdatedAt!==0,isStale:w(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,T(s,t))return;this.currentResult=s;const n={cache:!0},i=()=>{if(!t)return!0;const{notifyOnChangeProps:u}=this.options,a=typeof u=="function"?u():u;if(a==="all"||!a&&!this.trackedProps.size)return!0;const c=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(h=>{const l=h;return this.currentResult[l]!==t[l]&&c.has(l)})};(e==null?void 0:e.listeners)!==!1&&i()&&(n.listeners=!0),this.notify({...n,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};e.type==="success"?t.onSuccess=!e.manual:e.type==="error"&&!z(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){V.batch(()=>{if(e.onSuccess){var t,s,n,i;(t=(s=this.options).onSuccess)==null||t.call(s,this.currentResult.data),(n=(i=this.options).onSettled)==null||n.call(i,this.currentResult.data,null)}else if(e.onError){var u,a,c,h;(u=(a=this.options).onError)==null||u.call(a,this.currentResult.error),(c=(h=this.options).onSettled)==null||c.call(h,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:l})=>{l(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ie(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function M(r,e){return ie(r,e)||r.state.dataUpdatedAt>0&&E(r,e,e.refetchOnMount)}function E(r,e,t){if(e.enabled!==!1){const s=typeof t=="function"?t(r):t;return s==="always"||s!==!1&&w(r,e)}return!1}function j(r,e,t,s){return t.enabled!==!1&&(r!==e||s.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&w(r,t)}function w(r,e){return r.isStaleByTime(e.staleTime)}function ne(r,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!T(r.getCurrentResult(),e)}function ue(r=""){var e;if(!((e=G())==null?void 0:e.proxy))throw new Error("vue-query hooks can only be used inside setup() function.");const s=H(r),n=$(s);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}function ae(r,e,t={},s={}){var n;const i=Q(()=>le(e,t,s)),u=(n=i.value.queryClient)!=null?n:ue(i.value.queryClientKey),a=Q(()=>{const d=u.defaultQueryOptions(i.value);return d._optimisticResults=u.isRestoring.value?"isRestoring":"optimistic",d}),c=new r(u,a.value),h=J(c.getCurrentResult());let l=()=>{};b(u.isRestoring,d=>{d||(l(),l=c.subscribe(R=>{x(h,R)}))},{immediate:!0}),b(a,()=>{c.setOptions(a.value),x(h,c.getCurrentResult())}),Y(()=>{l()});const o=()=>new Promise((d,R)=>{let m=()=>{};const v=()=>{if(a.value.enabled!==!1){const f=c.getOptimisticResult(a.value);f.isStale?(m(),c.fetchOptimistic(a.value).then(d,R)):(m(),d(f))}};v(),m=b(a,v,{deep:!0})});return b(()=>h.error,d=>{if(h.isError&&!h.isFetching&&_(a.value.useErrorBoundary,[d,c.getCurrentQuery()]))throw d}),{...X(Z(h)),suspense:o}}function le(r,e={},t={}){const s=S(r),n=S(e),i=S(t);let u=s;return ee(s)?typeof n=="function"?u={...i,queryKey:s,queryFn:n}:u={...n,queryKey:s}:u=s,te(u)}function ce(r,e,t){const s=ae(re,r,e,t);return{...s,refetch:s.refetch.value,remove:s.remove.value}}const oe=3;async function he(r,e){const t=r.startsWith("/")?r.slice(1):r;let s=`${window.DATA_HOST}${t}`;r.startsWith("http")&&(s=r),s.endsWith("/")&&(s=s.slice(0,-1));const n=await fetch(`${s}/config.json?t=${e??0}`),i=await fetch(`${s}/team.json?t=${e??0}`),u=await fetch(`${s}/run.json?t=${e??0}`),{status:a,statusText:c}=n;if(a>=300||a<200)throw new Error(`fetch data failed. [status=${a}] [statusText=${c}]`);return Promise.all([n.json(),i.json(),u.json()]).then(l=>({contest:l[0],teams:l[1],submissions:l[2]}))}function pe(r,e){let t=3e4,s=Q(()=>Math.floor(e.value.getTime()/1e3/10));return se.value==="I18N"&&(t=10*1e3,s=Q(()=>Math.floor(e.value.getTime()/1e3))),ce({queryKey:[r,s.value],queryFn:()=>he(r,s.value),retry:oe,staleTime:t,refetchInterval:t})}function ye(){return k("data-source","",{transform:String})}function ve(){return k("battle-of-giants","",{transform:String})}export{ve as a,ye as g,pe as u};
|