@xcpcio/board-app 0.57.2 → 0.58.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.
Files changed (58) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -0
  3. package/dist/404.html +1 -1
  4. package/dist/assets/{Balloon.vue_vue_type_script_setup_true_lang-Ii9F8fKX.js → Balloon.vue_vue_type_script_setup_true_lang-BKveHasS.js} +1 -1
  5. package/dist/assets/{Board-DnZBiplC.css → Board-bfV2AXzG.css} +1 -1
  6. package/dist/assets/Board-sEPnOK2-.js +1 -0
  7. package/dist/assets/{ContestStateBadge-CB2h5oiz.js → ContestStateBadge-C-CRP-tQ.js} +1 -1
  8. package/dist/assets/{Countdown-Bg2ceHuz.js → Countdown-CeS_BWZv.js} +1 -1
  9. package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-CZuFuTYd.js → DataSourceInput.vue_vue_type_script_setup_true_lang-BSD2nOLI.js} +1 -1
  10. package/dist/assets/{Footer.vue_vue_type_script_setup_true_lang-DLSNv3Br.js → Footer.vue_vue_type_script_setup_true_lang-B86U4ciI.js} +1 -1
  11. package/dist/assets/{NavBar-B31sijfp.js → NavBar-D31YQkhO.js} +1 -1
  12. package/dist/assets/{Resolver-CTV46p98.js → Resolver-CRFhNOx4.js} +1 -1
  13. package/dist/assets/{RightArrowIcon-BE_CmUpM.js → RightArrowIcon-T3TF8_rk.js} +1 -1
  14. package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-DHt6Tg-y.js → TheInput.vue_vue_type_script_setup_true_lang-BWpongzC.js} +1 -1
  15. package/dist/assets/{Tooltip.vue_vue_type_script_setup_true_lang-CNn32wRO.js → Tooltip.vue_vue_type_script_setup_true_lang-Dz7zNI7K.js} +1 -1
  16. package/dist/assets/{_...all_-CbfopCa9.js → _...all_-C40TUx5u.js} +1 -1
  17. package/dist/assets/{_...all_-DIG3mg6Q.js → _...all_-CCcLuoMG.js} +1 -1
  18. package/dist/assets/{_name_-Dar5rc0L.js → _name_-ClyI30XE.js} +1 -1
  19. package/dist/assets/{about-Ca1bj5Us.js → about-BV57MLHG.js} +1 -1
  20. package/dist/assets/board-DJeGN7R7.js +1 -0
  21. package/dist/assets/{board-layout-K7oQQMow.js → board-layout-BzOSZI4M.js} +1 -1
  22. package/dist/assets/{constant-Do-LM82G.js → constant-BHEvsV-t.js} +1 -1
  23. package/dist/assets/{default-CFdD4Pmq.js → default-CavolZov.js} +1 -1
  24. package/dist/assets/en-C8WQ1AP4.js +1 -0
  25. package/dist/assets/{headless-DS9cFjUu.js → headless-DFTRHIoQ.js} +1 -1
  26. package/dist/assets/{home-CIFszjmR.js → home-BlfNlQZp.js} +1 -1
  27. package/dist/assets/{index-Cnt7tyLE.js → index-6t7LBg_a.js} +1 -1
  28. package/dist/assets/{index-BP4Asovv.js → index-B-HgEno7.js} +1 -1
  29. package/dist/assets/{index-tapFjGuq.js → index-B3EUeOPq.js} +5 -5
  30. package/dist/assets/{index-BPd5Bz4z.js → index-BEWvW0Ov.js} +1 -1
  31. package/dist/assets/{index-C36TYCdC.js → index-C3xW_99q.js} +1 -1
  32. package/dist/assets/{index-BvIjBqN1.js → index-CQhfGh-j.js} +1 -1
  33. package/dist/assets/{index-M43KtsHC.js → index-D6OpkRje.js} +1 -1
  34. package/dist/assets/{index-ldiJ-x6O.js → index-Df2L9kBl.js} +1 -1
  35. package/dist/assets/{index--qalSMih.js → index-DjL7tCTU.js} +1 -1
  36. package/dist/assets/index-DqMOf7dN.css +5 -0
  37. package/dist/assets/{index-layout-DCXN167O.js → index-layout-D9jzayF1.js} +1 -1
  38. package/dist/assets/{pagination-GZnvr2bj.js → pagination-BqXCsqCF.js} +1 -1
  39. package/dist/assets/{query-y99OiRRB.js → query-CYkuXIy7.js} +1 -1
  40. package/dist/assets/{test-DQCRWLcc.js → test-DypsErYH.js} +1 -1
  41. package/dist/assets/{use-vmodel-CSCfEOCt.js → use-vmodel-B7MHtQGY.js} +1 -1
  42. package/dist/assets/{user-B2EJpwA8.js → user-CWmd0Y8g.js} +1 -1
  43. package/dist/assets/{virtual_pwa-register-CsPGbIF8.js → virtual_pwa-register-DgX7z6s_.js} +1 -1
  44. package/dist/assets/zh-CN-Bs0tKfN4.js +1 -0
  45. package/dist/index.html +1 -1
  46. package/dist/sw.js +1 -1
  47. package/package.json +7 -8
  48. package/src/components/board/Board.vue +54 -4
  49. package/src/components/board/FilterModal.vue +203 -0
  50. package/src/components/board/OptionsModal.vue +17 -112
  51. package/src/components.d.ts +1 -0
  52. package/src/main.ts +1 -0
  53. package/src/styles/vue-search-select-dark.css +162 -0
  54. package/dist/assets/Board-BSflbt1L.js +0 -1
  55. package/dist/assets/board-CZZsT9Y8.js +0 -1
  56. package/dist/assets/en-Bjc9Zdq9.js +0 -1
  57. package/dist/assets/index-CTdHCzhg.css +0 -5
  58. package/dist/assets/zh-CN-BgAN9IOl.js +0 -1
@@ -1 +1 @@
1
- import{a4 as V,a5 as j,a6 as d,a7 as D,a8 as w,a9 as z,aa as k,ab as M,ac as H,ad as T,ae as K,af as G,ag as L,ah as Y,ai as J,aj as X,ak as Z,f as W,al as q,am as tt,an as et,C as Q,ao as $,ap as st,aq as A,ar as it,as as nt,at as rt}from"./index-tapFjGuq.js";import{a as at}from"./constant-Do-LM82G.js";import{u as B}from"./index-C36TYCdC.js";var ot=class extends V{constructor(t,e){super(),this.options=e,this.#s=t,this.#n=null,this.#i=j(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#a;#l;#i;#n;#b;#c;#f;#o;#h;#r;#d=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),_(this.#t,this.options)?this.#u():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return U(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return U(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#O(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,i=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof d(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),e._defaulted&&!D(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&N(this.#t,i,this.options,e)&&this.#u(),this.updateResult(),s&&(this.#t!==i||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||w(this.options.staleTime,this.#t)!==w(e.staleTime,this.#t))&&this.#v();const n=this.#m();s&&(this.#t!==i||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||n!==this.#r)&&this.#R(n)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),i=this.createResult(e,t);return ut(this,i)&&(this.#e=i,this.#l=this.options,this.#a=this.#t.state),i}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(i,s)=>(this.trackProp(s),e?.(s),s==="promise"&&!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(i,s))})}trackProp(t){this.#d.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),i=this.#s.getQueryCache().build(this.#s,e);return i.fetch().then(()=>this.createResult(i,e))}fetch(t){return this.#u({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#u(t){this.#w();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(z)),e}#v(){this.#g();const t=w(this.options.staleTime,this.#t);if(k||this.#e.isStale||!M(t))return;const i=H(this.#e.dataUpdatedAt,t)+1;this.#o=T.setTimeout(()=>{this.#e.isStale||this.updateResult()},i)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#R(t){this.#O(),this.#r=t,!(k||d(this.options.enabled,this.#t)===!1||!M(this.#r)||this.#r===0)&&(this.#h=T.setInterval(()=>{(this.options.refetchIntervalInBackground||K.isFocused())&&this.#u()},this.#r))}#y(){this.#v(),this.#R(this.#m())}#g(){this.#o&&(T.clearTimeout(this.#o),this.#o=void 0)}#O(){this.#h&&(T.clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const i=this.#t,s=this.options,n=this.#e,a=this.#a,u=this.#l,v=t!==i?t.state:this.#p,{state:g}=t;let r={...g},S=!1,h;if(e._optimisticResults){const c=this.hasListeners(),C=!c&&_(t,e),y=c&&N(t,i,e,s);(C||y)&&(r={...r,...G(g.data,t.options)}),e._optimisticResults==="isRestoring"&&(r.fetchStatus="idle")}let{error:o,errorUpdatedAt:b,status:f}=r;h=r.data;let O=!1;if(e.placeholderData!==void 0&&h===void 0&&f==="pending"){let c;n?.isPlaceholderData&&e.placeholderData===u?.placeholderData?(c=n.data,O=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,c!==void 0&&(f="success",h=L(n?.data,c,e),S=!0)}if(e.select&&h!==void 0&&!O)if(n&&h===a?.data&&e.select===this.#b)h=this.#c;else try{this.#b=e.select,h=e.select(h),h=L(n?.data,h,e),this.#c=h,this.#n=null}catch(c){this.#n=c}this.#n&&(o=this.#n,h=this.#c,b=Date.now(),f="error");const m=r.fetchStatus==="fetching",R=f==="pending",E=f==="error",P=R&&m,x=h!==void 0,p={status:f,fetchStatus:r.fetchStatus,isPending:R,isSuccess:f==="success",isError:E,isInitialLoading:P,isLoading:P,data:h,dataUpdatedAt:r.dataUpdatedAt,error:o,errorUpdatedAt:b,failureCount:r.fetchFailureCount,failureReason:r.fetchFailureReason,errorUpdateCount:r.errorUpdateCount,isFetched:r.dataUpdateCount>0||r.errorUpdateCount>0,isFetchedAfterMount:r.dataUpdateCount>v.dataUpdateCount||r.errorUpdateCount>v.errorUpdateCount,isFetching:m,isRefetching:m&&!R,isLoadingError:E&&!x,isPaused:r.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:E&&x,isStale:F(t,e),refetch:this.refetch,promise:this.#i,isEnabled:d(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=I=>{p.status==="error"?I.reject(p.error):p.data!==void 0&&I.resolve(p.data)},C=()=>{const I=this.#i=p.promise=j();c(I)},y=this.#i;switch(y.status){case"pending":t.queryHash===i.queryHash&&c(y);break;case"fulfilled":(p.status==="error"||p.data!==y.value)&&C();break;case"rejected":(p.status!=="error"||p.error!==y.reason)&&C();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#l=this.options,this.#a.data!==void 0&&(this.#f=this.#t),D(e,t))return;this.#e=e;const i=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,n=typeof s=="function"?s():s;if(n==="all"||!n&&!this.#d.size)return!0;const a=new Set(n??this.#d);return this.options.throwOnError&&a.add("error"),Object.keys(this.#e).some(u=>{const l=u;return this.#e[l]!==t[l]&&a.has(l)})};this.#S({listeners:i()})}#w(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(t){Y.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function ht(t,e){return d(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function _(t,e){return ht(t,e)||t.state.data!==void 0&&U(t,e,e.refetchOnMount)}function U(t,e,i){if(d(e.enabled,t)!==!1&&w(e.staleTime,t)!=="static"){const s=typeof i=="function"?i(t):i;return s==="always"||s!==!1&&F(t,e)}return!1}function N(t,e,i,s){return(t!==e||d(s.enabled,t)===!1)&&(!i.suspense||t.state.status!=="error")&&F(t,i)}function F(t,e){return d(e.enabled,t)!==!1&&t.isStaleByTime(w(e.staleTime,t))}function ut(t,e){return!D(t.getCurrentResult(),e)}function lt(t=""){if(!J())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const e=Z(t),i=X(e);if(!i)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return i}function ct(t,e,i){const s=lt(),n=W(()=>{const o=q(e);typeof o.enabled=="function"&&(o.enabled=o.enabled());const b=s.defaultQueryOptions(o);return b._optimisticResults=s.isRestoring?.value?"isRestoring":"optimistic",b}),a=new t(s,n.value),u=n.value.shallow?tt(a.getCurrentResult()):et(a.getCurrentResult());let l=()=>{};s.isRestoring&&Q(s.isRestoring,o=>{o||(l(),l=a.subscribe(b=>{$(u,b)}))},{immediate:!0});const v=()=>{a.setOptions(n.value),$(u,a.getCurrentResult())};Q(n,v),st(()=>{l()});const g=(...o)=>(v(),u.refetch(...o)),r=()=>new Promise((o,b)=>{let f=()=>{};const O=()=>{if(n.value.enabled!==!1){a.setOptions(n.value);const m=a.getOptimisticResult(n.value);m.isStale?(f(),a.fetchOptimistic(n.value).then(o,R=>{A(n.value.throwOnError,[R,a.getCurrentQuery()])?b(R):o(a.getCurrentResult())})):(f(),o(m))}};O(),f=Q(n,O)});Q(()=>u.error,o=>{if(u.isError&&!u.isFetching&&A(n.value.throwOnError,[o,a.getCurrentQuery()]))throw o});const S=n.value.shallow?it(u):nt(u),h=rt(S);for(const o in u)typeof u[o]=="function"&&(h[o]=u[o]);return h.suspense=r,h.refetch=g,h}function ft(t,e){return ct(ot,t)}const dt=3;async function pt(t,e){const i=t.startsWith("/")?t.slice(1):t;let s=`${window.DATA_HOST}${i}`;const n={allInOne:!1};if(s.includes("#")){const r=new URLSearchParams(s.split("#")[1]);n.allInOne=r.get("allInOne")==="true",s=s.split("#")[0]}t.startsWith("http")&&(s=t),s.endsWith("/")&&(s=s.slice(0,-1));const a=r=>r.includes("?")?`${r}&t=${e??0}`:`${r}?t=${e??0}`,u=n.allInOne?[await fetch(a(s))]:[await fetch(a(`${s}/config.json`)),await fetch(a(`${s}/team.json`)),await fetch(a(`${s}/run.json`))],{status:l,statusText:v}=u[0];if(l>=300||l<200)throw new Error(`fetch data failed. [status=${l}] [statusText=${v}]`);return Promise.all(u.map(r=>r.json())).then(r=>n.allInOne?r[0]:{contest:r[0],teams:r[1],submissions:r[2]})}function yt(t,e,i=!1){let s=3e4,n=s;const a=W(()=>Math.floor(e.value.getTime()/1e3/10));return at.value==="I18N"&&(s=10*1e3,n=s),i&&(s=Number.POSITIVE_INFINITY,n=!1),ft({queryKey:[t,a.value],queryFn:()=>pt(t,a.value),retry:dt,staleTime:s,refetchInterval:n})}function gt(){return B("data-source","",{transform:String})}function Ot(){return B("battle-of-giants","",{transform:String})}export{Ot as a,gt as g,yt as u};
1
+ import{a4 as V,a5 as j,a6 as d,a7 as D,a8 as w,a9 as z,aa as k,ab as M,ac as H,ad as T,ae as K,af as G,ag as L,ah as Y,ai as J,aj as X,ak as Z,f as W,al as q,am as tt,an as et,C as Q,ao as $,ap as st,aq as A,ar as it,as as nt,at as rt}from"./index-B3EUeOPq.js";import{a as at}from"./constant-BHEvsV-t.js";import{u as B}from"./index-C3xW_99q.js";var ot=class extends V{constructor(t,e){super(),this.options=e,this.#s=t,this.#n=null,this.#i=j(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#a;#l;#i;#n;#b;#c;#f;#o;#h;#r;#d=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),_(this.#t,this.options)?this.#u():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return U(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return U(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#O(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,i=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof d(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),e._defaulted&&!D(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&N(this.#t,i,this.options,e)&&this.#u(),this.updateResult(),s&&(this.#t!==i||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||w(this.options.staleTime,this.#t)!==w(e.staleTime,this.#t))&&this.#v();const n=this.#m();s&&(this.#t!==i||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||n!==this.#r)&&this.#R(n)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),i=this.createResult(e,t);return ut(this,i)&&(this.#e=i,this.#l=this.options,this.#a=this.#t.state),i}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(i,s)=>(this.trackProp(s),e?.(s),s==="promise"&&!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(i,s))})}trackProp(t){this.#d.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),i=this.#s.getQueryCache().build(this.#s,e);return i.fetch().then(()=>this.createResult(i,e))}fetch(t){return this.#u({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#u(t){this.#w();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(z)),e}#v(){this.#g();const t=w(this.options.staleTime,this.#t);if(k||this.#e.isStale||!M(t))return;const i=H(this.#e.dataUpdatedAt,t)+1;this.#o=T.setTimeout(()=>{this.#e.isStale||this.updateResult()},i)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#R(t){this.#O(),this.#r=t,!(k||d(this.options.enabled,this.#t)===!1||!M(this.#r)||this.#r===0)&&(this.#h=T.setInterval(()=>{(this.options.refetchIntervalInBackground||K.isFocused())&&this.#u()},this.#r))}#y(){this.#v(),this.#R(this.#m())}#g(){this.#o&&(T.clearTimeout(this.#o),this.#o=void 0)}#O(){this.#h&&(T.clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const i=this.#t,s=this.options,n=this.#e,a=this.#a,u=this.#l,v=t!==i?t.state:this.#p,{state:g}=t;let r={...g},S=!1,h;if(e._optimisticResults){const c=this.hasListeners(),C=!c&&_(t,e),y=c&&N(t,i,e,s);(C||y)&&(r={...r,...G(g.data,t.options)}),e._optimisticResults==="isRestoring"&&(r.fetchStatus="idle")}let{error:o,errorUpdatedAt:b,status:f}=r;h=r.data;let O=!1;if(e.placeholderData!==void 0&&h===void 0&&f==="pending"){let c;n?.isPlaceholderData&&e.placeholderData===u?.placeholderData?(c=n.data,O=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,c!==void 0&&(f="success",h=L(n?.data,c,e),S=!0)}if(e.select&&h!==void 0&&!O)if(n&&h===a?.data&&e.select===this.#b)h=this.#c;else try{this.#b=e.select,h=e.select(h),h=L(n?.data,h,e),this.#c=h,this.#n=null}catch(c){this.#n=c}this.#n&&(o=this.#n,h=this.#c,b=Date.now(),f="error");const m=r.fetchStatus==="fetching",R=f==="pending",E=f==="error",P=R&&m,x=h!==void 0,p={status:f,fetchStatus:r.fetchStatus,isPending:R,isSuccess:f==="success",isError:E,isInitialLoading:P,isLoading:P,data:h,dataUpdatedAt:r.dataUpdatedAt,error:o,errorUpdatedAt:b,failureCount:r.fetchFailureCount,failureReason:r.fetchFailureReason,errorUpdateCount:r.errorUpdateCount,isFetched:r.dataUpdateCount>0||r.errorUpdateCount>0,isFetchedAfterMount:r.dataUpdateCount>v.dataUpdateCount||r.errorUpdateCount>v.errorUpdateCount,isFetching:m,isRefetching:m&&!R,isLoadingError:E&&!x,isPaused:r.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:E&&x,isStale:F(t,e),refetch:this.refetch,promise:this.#i,isEnabled:d(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=I=>{p.status==="error"?I.reject(p.error):p.data!==void 0&&I.resolve(p.data)},C=()=>{const I=this.#i=p.promise=j();c(I)},y=this.#i;switch(y.status){case"pending":t.queryHash===i.queryHash&&c(y);break;case"fulfilled":(p.status==="error"||p.data!==y.value)&&C();break;case"rejected":(p.status!=="error"||p.error!==y.reason)&&C();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#l=this.options,this.#a.data!==void 0&&(this.#f=this.#t),D(e,t))return;this.#e=e;const i=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,n=typeof s=="function"?s():s;if(n==="all"||!n&&!this.#d.size)return!0;const a=new Set(n??this.#d);return this.options.throwOnError&&a.add("error"),Object.keys(this.#e).some(u=>{const l=u;return this.#e[l]!==t[l]&&a.has(l)})};this.#S({listeners:i()})}#w(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(t){Y.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function ht(t,e){return d(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function _(t,e){return ht(t,e)||t.state.data!==void 0&&U(t,e,e.refetchOnMount)}function U(t,e,i){if(d(e.enabled,t)!==!1&&w(e.staleTime,t)!=="static"){const s=typeof i=="function"?i(t):i;return s==="always"||s!==!1&&F(t,e)}return!1}function N(t,e,i,s){return(t!==e||d(s.enabled,t)===!1)&&(!i.suspense||t.state.status!=="error")&&F(t,i)}function F(t,e){return d(e.enabled,t)!==!1&&t.isStaleByTime(w(e.staleTime,t))}function ut(t,e){return!D(t.getCurrentResult(),e)}function lt(t=""){if(!J())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const e=Z(t),i=X(e);if(!i)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return i}function ct(t,e,i){const s=lt(),n=W(()=>{const o=q(e);typeof o.enabled=="function"&&(o.enabled=o.enabled());const b=s.defaultQueryOptions(o);return b._optimisticResults=s.isRestoring?.value?"isRestoring":"optimistic",b}),a=new t(s,n.value),u=n.value.shallow?tt(a.getCurrentResult()):et(a.getCurrentResult());let l=()=>{};s.isRestoring&&Q(s.isRestoring,o=>{o||(l(),l=a.subscribe(b=>{$(u,b)}))},{immediate:!0});const v=()=>{a.setOptions(n.value),$(u,a.getCurrentResult())};Q(n,v),st(()=>{l()});const g=(...o)=>(v(),u.refetch(...o)),r=()=>new Promise((o,b)=>{let f=()=>{};const O=()=>{if(n.value.enabled!==!1){a.setOptions(n.value);const m=a.getOptimisticResult(n.value);m.isStale?(f(),a.fetchOptimistic(n.value).then(o,R=>{A(n.value.throwOnError,[R,a.getCurrentQuery()])?b(R):o(a.getCurrentResult())})):(f(),o(m))}};O(),f=Q(n,O)});Q(()=>u.error,o=>{if(u.isError&&!u.isFetching&&A(n.value.throwOnError,[o,a.getCurrentQuery()]))throw o});const S=n.value.shallow?it(u):nt(u),h=rt(S);for(const o in u)typeof u[o]=="function"&&(h[o]=u[o]);return h.suspense=r,h.refetch=g,h}function ft(t,e){return ct(ot,t)}const dt=3;async function pt(t,e){const i=t.startsWith("/")?t.slice(1):t;let s=`${window.DATA_HOST}${i}`;const n={allInOne:!1};if(s.includes("#")){const r=new URLSearchParams(s.split("#")[1]);n.allInOne=r.get("allInOne")==="true",s=s.split("#")[0]}t.startsWith("http")&&(s=t),s.endsWith("/")&&(s=s.slice(0,-1));const a=r=>r.includes("?")?`${r}&t=${e??0}`:`${r}?t=${e??0}`,u=n.allInOne?[await fetch(a(s))]:[await fetch(a(`${s}/config.json`)),await fetch(a(`${s}/team.json`)),await fetch(a(`${s}/run.json`))],{status:l,statusText:v}=u[0];if(l>=300||l<200)throw new Error(`fetch data failed. [status=${l}] [statusText=${v}]`);return Promise.all(u.map(r=>r.json())).then(r=>n.allInOne?r[0]:{contest:r[0],teams:r[1],submissions:r[2]})}function yt(t,e,i=!1){let s=3e4,n=s;const a=W(()=>Math.floor(e.value.getTime()/1e3/10));return at.value==="I18N"&&(s=10*1e3,n=s),i&&(s=Number.POSITIVE_INFINITY,n=!1),ft({queryKey:[t,a.value],queryFn:()=>pt(t,a.value),retry:dt,staleTime:s,refetchInterval:n})}function gt(){return B("data-source","",{transform:String})}function Ot(){return B("battle-of-giants","",{transform:String})}export{Ot as a,gt as g,yt as u};
@@ -1 +1 @@
1
- import{_ as p}from"./TheInput.vue_vue_type_script_setup_true_lang-DHt6Tg-y.js";import{d as c,m as f,H as _,u as b,c as h,o as v,b as e,k as a,h as s,a as x,O as y,z as g}from"./index-tapFjGuq.js";import{u as k}from"./user-B2EJpwA8.js";import{b as l}from"./route-block-B_A1xBdJ.js";import"./use-vmodel-CSCfEOCt.js";const V={flex:"","flex-col":"","justify-center":"","items-center":""},w={"text-sm":"","opacity-75":""},I={"w-48":""},B={class:"hidden",for:"input"},C=["disabled"],N=c({name:"IndexPage",__name:"test",setup(R){const i=k(),o=f(i.savedName),u=_();function r(){o.value&&u.push(`/hi/${encodeURIComponent(o.value)}`)}const{t:n}=b();return(U,t)=>{const d=p;return v(),h("div",V,[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=>g(o)?o.value=m:null),placeholder:s(n)("intro.whats-your-name"),autocomplete:"false",onKeydown:y(r,["enter"])},null,8,["modelValue","placeholder"]),e("label",B,a(s(n)("intro.whats-your-name")),1)]),e("div",null,[e("button",{"m-3":"","text-sm":"",btn:"",disabled:!s(o),onClick:r},a(s(n)("button.go")),9,C)])])}}});typeof l=="function"&&l(N);export{N as default};
1
+ import{_ as p}from"./TheInput.vue_vue_type_script_setup_true_lang-BWpongzC.js";import{d as c,m as f,H as _,u as b,c as h,o as v,b as e,k as a,h as s,a as x,W as y,z as g}from"./index-B3EUeOPq.js";import{u as k}from"./user-CWmd0Y8g.js";import{b as l}from"./route-block-B_A1xBdJ.js";import"./use-vmodel-B7MHtQGY.js";const V={flex:"","flex-col":"","justify-center":"","items-center":""},w={"text-sm":"","opacity-75":""},I={"w-48":""},B={class:"hidden",for:"input"},C=["disabled"],N=c({name:"IndexPage",__name:"test",setup(R){const i=k(),o=f(i.savedName),u=_();function r(){o.value&&u.push(`/hi/${encodeURIComponent(o.value)}`)}const{t:n}=b();return(U,t)=>{const d=p;return v(),h("div",V,[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=>g(o)?o.value=m:null),placeholder:s(n)("intro.whats-your-name"),autocomplete:"false",onKeydown:y(r,["enter"])},null,8,["modelValue","placeholder"]),e("label",B,a(s(n)("intro.whats-your-name")),1)]),e("div",null,[e("button",{"m-3":"","text-sm":"",btn:"",disabled:!s(o),onClick:r},a(s(n)("button.go")),9,C)])])}}});typeof l=="function"&&l(N);export{N as default};
@@ -1 +1 @@
1
- import{aA as c,aB as r}from"./index-tapFjGuq.js";const d=(...p)=>{const s=c().proxy.$props,t=Object.create(null);for(const e of p)if(typeof e=="string")t[e]=r(s,e,void 0,{eventName:`update:${e}`,passive:!0});else{const[o,n=o,a=`update:${o}`,u={}]=e;t[o]=r(s,n,void 0,{eventName:a,passive:!0,...u})}return t};export{d as _};
1
+ import{aA as c,aB as r}from"./index-B3EUeOPq.js";const d=(...p)=>{const s=c().proxy.$props,t=Object.create(null);for(const e of p)if(typeof e=="string")t[e]=r(s,e,void 0,{eventName:`update:${e}`,passive:!0});else{const[o,n=o,a=`update:${o}`,u={}]=e;t[o]=r(s,n,void 0,{eventName:a,passive:!0,...u})}return t};export{d as _};
@@ -1 +1 @@
1
- import{ay as n,m as r,f as t}from"./index-tapFjGuq.js";const f=n("user",()=>{const e=r(""),s=r(new Set),o=t(()=>Array.from(s.value)),u=t(()=>o.value.filter(a=>a!==e.value));function m(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:m,otherNames:u,savedName:e}});export{f as u};
1
+ import{ay as n,m as r,f as t}from"./index-B3EUeOPq.js";const f=n("user",()=>{const e=r(""),s=r(new Set),o=t(()=>Array.from(s.value)),u=t(()=>o.value.filter(a=>a!==e.value));function m(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:m,otherNames:u,savedName:e}});export{f as u};
@@ -1 +1 @@
1
- import{_ as f}from"./index-tapFjGuq.js";function p(n={}){const{immediate:s=!1,onNeedRefresh:u,onOfflineReady:o,onRegistered:d,onRegisteredSW:r,onRegisterError:i}=n;let t,a;const c=async(e=!0)=>{await a};async function l(){if("serviceWorker"in navigator){if(t=await f(async()=>{const{Workbox:e}=await import("./workbox-window.prod.es5-CwtvwXb3.js");return{Workbox:e}},[],import.meta.url).then(({Workbox:e})=>new e("/sw.js",{scope:"/",type:"classic"})).catch(e=>{i?.(e)}),!t)return;t.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),t.addEventListener("installed",e=>{e.isUpdate||o?.()}),t.register({immediate:s}).then(e=>{r?r("/sw.js",e):d?.(e)}).catch(e=>{i?.(e)})}}return a=l(),c}export{p as registerSW};
1
+ import{_ as f}from"./index-B3EUeOPq.js";function p(n={}){const{immediate:s=!1,onNeedRefresh:u,onOfflineReady:o,onRegistered:d,onRegisteredSW:r,onRegisterError:i}=n;let t,a;const c=async(e=!0)=>{await a};async function l(){if("serviceWorker"in navigator){if(t=await f(async()=>{const{Workbox:e}=await import("./workbox-window.prod.es5-CwtvwXb3.js");return{Workbox:e}},[],import.meta.url).then(({Workbox:e})=>new e("/sw.js",{scope:"/",type:"classic"})).catch(e=>{i?.(e)}),!t)return;t.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),t.addEventListener("installed",e=>{e.isUpdate||o?.()}),t.register({immediate:s}).then(e=>{r?r("/sw.js",e):d?.(e)}).catch(e=>{i?.(e)})}}return a=l(),c}export{p as registerSW};
@@ -0,0 +1 @@
1
+ const t={button:{about:{t:0,b:{t:2,i:[{t:3}],s:"关于"}},back:{t:0,b:{t:2,i:[{t:3}],s:"返回"}},go:{t:0,b:{t:2,i:[{t:3}],s:"确定"}},home:{t:0,b:{t:2,i:[{t:3}],s:"首页"}},confirm:{t:0,b:{t:2,i:[{t:3}],s:"确认"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},toggle_dark:{t:0,b:{t:2,i:[{t:3}],s:"切换深色模式"}},toggle_langs:{t:0,b:{t:2,i:[{t:3}],s:"切换语言"}}},intro:{desc:{t:0,b:{t:2,i:[{t:3}],s:"固执己见的 Vite 项目模板"}},"dynamic-route":{t:0,b:{t:2,i:[{t:3}],s:"动态路由演示"}},hi:{t:0,b:{t:2,i:[{t:3,v:"你好,"},{t:4,k:"name"}]}},aka:{t:0,b:{t:2,i:[{t:3}],s:"也叫"}},"whats-your-name":{t:0,b:{t:2,i:[{t:3}],s:"输入你的名字"}}},"not-found":{t:0,b:{t:2,i:[{t:3}],s:"未找到页面"}},common:{loading:{t:0,b:{t:2,i:[{t:3}],s:"加载中"}},colon:{t:0,b:{t:2,i:[{t:3}],s:":"}}},index:{start:{t:0,b:{t:2,i:[{t:3}],s:"开始时间"}},duration:{t:0,b:{t:2,i:[{t:3}],s:"持续时长"}}},type_menu:{rank:{t:0,b:{t:2,i:[{t:3}],s:"排名"}},submissions:{t:0,b:{t:2,i:[{t:3}],s:"提交"}},statistics:{t:0,b:{t:2,i:[{t:3}],s:"统计"}},balloon:{t:0,b:{t:2,i:[{t:3}],s:"气球"}},export:{t:0,b:{t:2,i:[{t:3}],s:"导出"}},resolver:{t:0,b:{t:2,i:[{t:3}],s:"滚榜"}},filter:{t:0,b:{t:2,i:[{t:3}],s:"筛选"}},options:{t:0,b:{t:2,i:[{t:3}],s:"选项"}},awards:{t:0,b:{t:2,i:[{t:3}],s:"奖项"}},utility:{t:0,b:{t:2,i:[{t:3}],s:"工具"}},countdown:{t:0,b:{t:2,i:[{t:3}],s:"倒计时"}}},standings:{start_time:{t:0,b:{t:2,i:[{t:3}],s:"开始时间"}},end_time:{t:0,b:{t:2,i:[{t:3}],s:"结束时间"}},elapsed:{t:0,b:{t:2,i:[{t:3}],s:"当前时间"}},remaining:{t:0,b:{t:2,i:[{t:3}],s:"剩余时间"}},place:{t:0,b:{t:2,i:[{t:3}],s:"Place"}},team:{t:0,b:{t:2,i:[{t:3}],s:"Team"}},solved:{t:0,b:{t:2,i:[{t:3}],s:"Solved"}},penalty:{t:0,b:{t:2,i:[{t:3}],s:"Penalty"}},dirt:{t:0,b:{t:2,i:[{t:3}],s:"Dirt"}},se:{t:0,b:{t:2,i:[{t:3}],s:"SE"}},statistics:{submitted:{t:0,b:{t:2,i:[{t:3}],s:"Submitted"}},attempted:{t:0,b:{t:2,i:[{t:3}],s:"Attempted"}},accepted:{t:0,b:{t:2,i:[{t:3}],s:"Accepted"}},dirt:{t:0,b:{t:2,i:[{t:3}],s:"Dirt"}},se:{t:0,b:{t:2,i:[{t:3}],s:"SE"}},first_solved:{t:0,b:{t:2,i:[{t:3}],s:"First Solved"}},last_solved:{t:0,b:{t:2,i:[{t:3}],s:"Last Solved"}},head_data:{problems:{t:0,b:{t:2,i:[{t:3}],s:"题目数"}},teams:{t:0,b:{t:2,i:[{t:3}],s:"队伍数"}},submissions:{t:0,b:{t:2,i:[{t:3}],s:"提交数"}}},submit_heatmap:{t:0,b:{t:2,i:[{t:3}],s:"提交热力图"}}},options:{calculation_of_penalty:{t:0,b:{t:2,i:[{t:3}],s:"罚时计算方式"}},in_minutes:{t:0,b:{t:2,i:[{t:3}],s:"精确到分钟进行累加"}},in_seconds:{t:0,b:{t:2,i:[{t:3}],s:"精确到秒进行累加"}},accumulate_in_seconds_and_finally_to_the_minute:{t:0,b:{t:2,i:[{t:3}],s:"精确到秒进行累加,最后精确到分钟"}}}},submissions:{total_submissions:{t:0,b:{t:2,i:[{t:3}],s:"总提交数"}}}};export{t as default};
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.57.2/dist/balloon-192x192.png"/><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.57.2/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.57.2/dist";_=normalizePath(_),window.CDN_HOST=_,window.__toAssetUrl=_=>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.57.2/dist/assets/index-tapFjGuq.js"></script><link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.57.2/dist/assets/index-CTdHCzhg.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>
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.58.3/dist/balloon-192x192.png"/><link rel="mask-icon" href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.58.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.58.3/dist";_=normalizePath(_),window.CDN_HOST=_,window.__toAssetUrl=_=>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.58.3/dist/assets/index-B3EUeOPq.js"></script><link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@xcpcio/board-app@0.58.3/dist/assets/index-DqMOf7dN.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 t=s=>l(s,r),o={module:{uri:r},exports:u,require:t};e[r]=Promise.all(n.map((s=>o[s]||t(s)))).then((s=>(i(...s),u)))}}define(["./workbox-7ee6f867"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_..-5I0UWqRG.css",revision:null},{url:"assets/_...all_-CbfopCa9.js",revision:null},{url:"assets/_...all_-DIG3mg6Q.js",revision:null},{url:"assets/_name_-Dar5rc0L.js",revision:null},{url:"assets/_plugin-vue_export-helper-DlAUqK2U.js",revision:null},{url:"assets/about-Ca1bj5Us.js",revision:null},{url:"assets/Balloon.vue_vue_type_script_setup_true_lang-Ii9F8fKX.js",revision:null},{url:"assets/Board-BSflbt1L.js",revision:null},{url:"assets/board-CZZsT9Y8.js",revision:null},{url:"assets/Board-DnZBiplC.css",revision:null},{url:"assets/board-layout-K7oQQMow.js",revision:null},{url:"assets/constant-Do-LM82G.js",revision:null},{url:"assets/ContestStateBadge-BqhxSQpe.css",revision:null},{url:"assets/ContestStateBadge-CB2h5oiz.js",revision:null},{url:"assets/Countdown-Bg2ceHuz.js",revision:null},{url:"assets/Countdown-CGwMuG9S.css",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-CZuFuTYd.js",revision:null},{url:"assets/default-CFdD4Pmq.js",revision:null},{url:"assets/en-Bjc9Zdq9.js",revision:null},{url:"assets/Footer.vue_vue_type_script_setup_true_lang-DLSNv3Br.js",revision:null},{url:"assets/headless-DS9cFjUu.js",revision:null},{url:"assets/home-CIFszjmR.js",revision:null},{url:"assets/index--qalSMih.js",revision:null},{url:"assets/index-BP4Asovv.js",revision:null},{url:"assets/index-BPd5Bz4z.js",revision:null},{url:"assets/index-BvIjBqN1.js",revision:null},{url:"assets/index-C36TYCdC.js",revision:null},{url:"assets/index-CD2Bzcv5.css",revision:null},{url:"assets/index-Cnt7tyLE.js",revision:null},{url:"assets/index-CTdHCzhg.css",revision:null},{url:"assets/index-kywOXmCz.css",revision:null},{url:"assets/index-layout-DCXN167O.js",revision:null},{url:"assets/index-ldiJ-x6O.js",revision:null},{url:"assets/index-M43KtsHC.js",revision:null},{url:"assets/index-tapFjGuq.js",revision:null},{url:"assets/NavBar-B31sijfp.js",revision:null},{url:"assets/NavBar-C0cqpBnK.css",revision:null},{url:"assets/pagination-GZnvr2bj.js",revision:null},{url:"assets/query-y99OiRRB.js",revision:null},{url:"assets/Resolver-BTlxgfNF.css",revision:null},{url:"assets/Resolver-CTV46p98.js",revision:null},{url:"assets/RightArrowIcon-BE_CmUpM.js",revision:null},{url:"assets/route-block-B_A1xBdJ.js",revision:null},{url:"assets/test-DQCRWLcc.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-DHt6Tg-y.js",revision:null},{url:"assets/Tooltip-DzyPDwbo.css",revision:null},{url:"assets/Tooltip.vue_vue_type_script_setup_true_lang-CNn32wRO.js",revision:null},{url:"assets/use-vmodel-CSCfEOCt.js",revision:null},{url:"assets/user-B2EJpwA8.js",revision:null},{url:"assets/virtual_pwa-register-CsPGbIF8.js",revision:null},{url:"assets/workbox-window.prod.es5-CwtvwXb3.js",revision:null},{url:"assets/zh-CN-BgAN9IOl.js",revision:null},{url:"index.html",revision:"efb2de20344b7e1a72ff5e265d0e1575"},{url:"balloon2-192x192.png",revision:"c857ae6d9dfae118ab4397d4358422bd"},{url:"balloon2-512x512.png",revision:"065594f4f743fe3884793c03d3fe7d9e"},{url:"favicon.svg",revision:"5a744f4ccbb122d4a0575be779ddcd43"},{url:"safari-pinned-tab.svg",revision:"5eaf74d1c43d30e0af743b68a3f48504"},{url:"manifest.webmanifest",revision:"e3e2be135eb58ab7933fee8cff2fd3b4"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
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,r)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const t=s=>l(s,i),o={module:{uri:i},exports:u,require:t};e[i]=Promise.all(n.map((s=>o[s]||t(s)))).then((s=>(r(...s),u)))}}define(["./workbox-7ee6f867"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/_..-5I0UWqRG.css",revision:null},{url:"assets/_...all_-C40TUx5u.js",revision:null},{url:"assets/_...all_-CCcLuoMG.js",revision:null},{url:"assets/_name_-ClyI30XE.js",revision:null},{url:"assets/_plugin-vue_export-helper-DlAUqK2U.js",revision:null},{url:"assets/about-BV57MLHG.js",revision:null},{url:"assets/Balloon.vue_vue_type_script_setup_true_lang-BKveHasS.js",revision:null},{url:"assets/Board-bfV2AXzG.css",revision:null},{url:"assets/board-DJeGN7R7.js",revision:null},{url:"assets/board-layout-BzOSZI4M.js",revision:null},{url:"assets/Board-sEPnOK2-.js",revision:null},{url:"assets/constant-BHEvsV-t.js",revision:null},{url:"assets/ContestStateBadge-BqhxSQpe.css",revision:null},{url:"assets/ContestStateBadge-C-CRP-tQ.js",revision:null},{url:"assets/Countdown-CeS_BWZv.js",revision:null},{url:"assets/Countdown-CGwMuG9S.css",revision:null},{url:"assets/DataSourceInput.vue_vue_type_script_setup_true_lang-BSD2nOLI.js",revision:null},{url:"assets/default-CavolZov.js",revision:null},{url:"assets/en-C8WQ1AP4.js",revision:null},{url:"assets/Footer.vue_vue_type_script_setup_true_lang-B86U4ciI.js",revision:null},{url:"assets/headless-DFTRHIoQ.js",revision:null},{url:"assets/home-BlfNlQZp.js",revision:null},{url:"assets/index-6t7LBg_a.js",revision:null},{url:"assets/index-B-HgEno7.js",revision:null},{url:"assets/index-B3EUeOPq.js",revision:null},{url:"assets/index-BEWvW0Ov.js",revision:null},{url:"assets/index-C3xW_99q.js",revision:null},{url:"assets/index-CD2Bzcv5.css",revision:null},{url:"assets/index-CQhfGh-j.js",revision:null},{url:"assets/index-D6OpkRje.js",revision:null},{url:"assets/index-Df2L9kBl.js",revision:null},{url:"assets/index-DjL7tCTU.js",revision:null},{url:"assets/index-DqMOf7dN.css",revision:null},{url:"assets/index-kywOXmCz.css",revision:null},{url:"assets/index-layout-D9jzayF1.js",revision:null},{url:"assets/NavBar-C0cqpBnK.css",revision:null},{url:"assets/NavBar-D31YQkhO.js",revision:null},{url:"assets/pagination-BqXCsqCF.js",revision:null},{url:"assets/query-CYkuXIy7.js",revision:null},{url:"assets/Resolver-BTlxgfNF.css",revision:null},{url:"assets/Resolver-CRFhNOx4.js",revision:null},{url:"assets/RightArrowIcon-T3TF8_rk.js",revision:null},{url:"assets/route-block-B_A1xBdJ.js",revision:null},{url:"assets/test-DypsErYH.js",revision:null},{url:"assets/TheInput.vue_vue_type_script_setup_true_lang-BWpongzC.js",revision:null},{url:"assets/Tooltip-DzyPDwbo.css",revision:null},{url:"assets/Tooltip.vue_vue_type_script_setup_true_lang-Dz7zNI7K.js",revision:null},{url:"assets/use-vmodel-B7MHtQGY.js",revision:null},{url:"assets/user-CWmd0Y8g.js",revision:null},{url:"assets/virtual_pwa-register-DgX7z6s_.js",revision:null},{url:"assets/workbox-window.prod.es5-CwtvwXb3.js",revision:null},{url:"assets/zh-CN-Bs0tKfN4.js",revision:null},{url:"index.html",revision:"bde1b26b42e84d3060e4407bc5bec328"},{url:"balloon2-192x192.png",revision:"c857ae6d9dfae118ab4397d4358422bd"},{url:"balloon2-512x512.png",revision:"065594f4f743fe3884793c03d3fe7d9e"},{url:"favicon.svg",revision:"5a744f4ccbb122d4a0575be779ddcd43"},{url:"safari-pinned-tab.svg",revision:"5eaf74d1c43d30e0af743b68a3f48504"},{url:"manifest.webmanifest",revision:"e3e2be135eb58ab7933fee8cff2fd3b4"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@xcpcio/board-app",
3
3
  "type": "module",
4
- "version": "0.57.2",
4
+ "version": "0.58.3",
5
5
  "description": "XCPCIO Board App",
6
- "author": "Dup4 <lyuzhi.pan@gmail.com>",
6
+ "author": "Dup4 <hi@dup4.com>",
7
7
  "license": "MIT",
8
8
  "homepage": "https://github.com/xcpcio/xcpcio",
9
9
  "repository": {
@@ -54,8 +54,8 @@
54
54
  "vue-router": "^4.5.1",
55
55
  "vue-search-select": "^3.2.0",
56
56
  "vue-toast-notification": "^3.1.3",
57
- "@xcpcio/core": "0.57.2",
58
- "@xcpcio/types": "0.57.2"
57
+ "@xcpcio/core": "0.58.3",
58
+ "@xcpcio/types": "0.58.3"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@iconify/json": "^2.2.381",
@@ -104,18 +104,17 @@
104
104
  "workbox-window": "^7.3.0"
105
105
  },
106
106
  "scripts": {
107
- "build": "vite build",
108
107
  "dev": "vite --port 3333",
109
- "lint": "eslint .",
110
- "lint:fix": "eslint --fix .",
108
+ "build": "vite build",
111
109
  "preview": "vite preview",
112
110
  "preview-https": "serve dist",
113
111
  "start": "npm run preview",
112
+ "lint": "eslint .",
113
+ "lint:fix": "eslint --fix .",
114
114
  "test": "vitest",
115
115
  "test:e2e": "cypress open",
116
116
  "test:unit": "vitest",
117
117
  "typecheck": "vue-tsc --noEmit",
118
- "up": "taze major -I",
119
118
  "sizecheck": "npx vite-bundle-visualizer"
120
119
  }
121
120
  }
@@ -4,11 +4,13 @@ import type { Contest as IContest, Submissions as ISubmissions, Teams as ITeams
4
4
  import type { Item } from "~/components/board/SecondLevelMenu.vue";
5
5
 
6
6
  import { onKeyStroke, useDocumentVisibility, useIntervalFn, useNow } from "@vueuse/core";
7
- import { useRouteQuery } from "@vueuse/router";
8
7
 
8
+ import { useRouteQuery } from "@vueuse/router";
9
9
  import { createContest, createSubmissions, createTeams, getImageSource, getTimeDiff, Rank, RankOptions } from "@xcpcio/core";
10
+
10
11
  import { ContestState } from "@xcpcio/types";
11
12
  import _ from "lodash";
13
+ import FilterModal from "~/components/board/FilterModal.vue";
12
14
 
13
15
  import { TITLE_SUFFIX } from "~/composables/constant";
14
16
 
@@ -181,6 +183,11 @@ const typeMenuList = ref<Array<Item>>([
181
183
  title: "type_menu.utility",
182
184
  keyword: "utility",
183
185
  },
186
+ {
187
+ title: "type_menu.filter",
188
+ keyword: "filter",
189
+ isModal: true,
190
+ },
184
191
  {
185
192
  title: "type_menu.options",
186
193
  keyword: "options",
@@ -211,10 +218,13 @@ const groupMenuList = computed(() => {
211
218
 
212
219
  const currentType = ref("rank");
213
220
  const isHiddenOptionsModal = ref(true);
221
+ const isHiddenFilterModal = ref(true);
214
222
 
215
223
  function onChangeCurrentType(type: string) {
216
224
  if (type === "options") {
217
225
  isHiddenOptionsModal.value = false;
226
+ } else if (type === "filter") {
227
+ isHiddenFilterModal.value = false;
218
228
  }
219
229
  }
220
230
 
@@ -238,13 +248,21 @@ function clearAutoScrollInterval() {
238
248
  }
239
249
  }
240
250
 
251
+ function isAnyModalOpen(): boolean {
252
+ return !(isHiddenOptionsModal.value && isHiddenFilterModal.value);
253
+ }
254
+
255
+ function isUserTyping(): boolean {
256
+ const activeElement = document.activeElement;
257
+ return activeElement?.matches("input, textarea, select, [contenteditable]") ?? false;
258
+ }
259
+
241
260
  onKeyStroke("S", (_e) => {
242
- if (!isHiddenOptionsModal.value) {
261
+ if (isAnyModalOpen()) {
243
262
  return;
244
263
  }
245
264
 
246
- const activeElement = document.activeElement;
247
- if (activeElement?.matches("input, textarea, select, [contenteditable]")) {
265
+ if (isUserTyping()) {
248
266
  return;
249
267
  }
250
268
 
@@ -284,6 +302,31 @@ onKeyStroke("S", (_e) => {
284
302
  }
285
303
  }, { dedupe: false });
286
304
 
305
+ onKeyStroke("f", (e) => {
306
+ // Check for Command+F (Meta+F on macOS, Ctrl+F on other platforms)
307
+ if (!e.metaKey && !e.ctrlKey) {
308
+ return;
309
+ }
310
+
311
+ // Prevent browser's default find functionality
312
+ e.preventDefault();
313
+
314
+ if (isUserTyping()) {
315
+ return;
316
+ }
317
+
318
+ if (!isHiddenFilterModal.value) {
319
+ isHiddenFilterModal.value = true;
320
+ return;
321
+ }
322
+
323
+ if (isAnyModalOpen()) {
324
+ return;
325
+ }
326
+
327
+ isHiddenFilterModal.value = false;
328
+ }, { dedupe: false, target: window });
329
+
287
330
  const startTime = computed(() => {
288
331
  const time = rank.value.contest.getStartTime().format("YYYY-MM-DD HH:mm:ss");
289
332
  return `${t("standings.start_time")}${t("common.colon")}${time}`;
@@ -532,6 +575,13 @@ const widthClass = "sm:w-[1260px] xl:w-screen";
532
575
  />
533
576
  </div>
534
577
 
578
+ <FilterModal
579
+ v-if="!isHiddenFilterModal"
580
+ v-model:is-hidden="isHiddenFilterModal"
581
+ v-model:rank-options="rankOptions"
582
+ :rank="rank"
583
+ />
584
+
535
585
  <OptionsModal
536
586
  v-if="!isHiddenOptionsModal"
537
587
  v-model:is-hidden="isHiddenOptionsModal"
@@ -0,0 +1,203 @@
1
+ <script setup lang="ts">
2
+ import type { Rank, RankOptions, SelectOptionItem } from "@xcpcio/core";
3
+ import _ from "lodash";
4
+ import { MultiSelect } from "vue-search-select";
5
+
6
+ const props = defineProps<{
7
+ isHidden: boolean;
8
+ rank: Rank;
9
+ rankOptions: RankOptions;
10
+ }>();
11
+
12
+ const emit = defineEmits([
13
+ "update:isHidden",
14
+ "update:rankOptions",
15
+ ]);
16
+
17
+ const beforeRankOptions = _.cloneDeep(props.rankOptions);
18
+
19
+ const { t } = useI18n();
20
+
21
+ const isHidden = computed({
22
+ get() {
23
+ return props.isHidden;
24
+ },
25
+ set(value) {
26
+ emit("update:isHidden", value);
27
+ },
28
+ });
29
+
30
+ const rankOptions = computed({
31
+ get() {
32
+ return props.rankOptions;
33
+ },
34
+ set(value) {
35
+ emit("update:rankOptions", value);
36
+ },
37
+ });
38
+
39
+ const title = computed(() => {
40
+ return t("type_menu.filter");
41
+ });
42
+
43
+ const rank = computed(() => props.rank);
44
+
45
+ const isComposing = ref(false);
46
+
47
+ function onCompositionStart() {
48
+ isComposing.value = true;
49
+ }
50
+
51
+ function onCompositionEnd() {
52
+ isComposing.value = false;
53
+ }
54
+
55
+ function onDelete(event: Event) {
56
+ if (isComposing.value) {
57
+ event.stopPropagation();
58
+ }
59
+ }
60
+
61
+ const orgOptions = computed(() => {
62
+ const res = rank.value.organizations.map((o) => {
63
+ return {
64
+ value: o,
65
+ text: o,
66
+ };
67
+ });
68
+
69
+ return res;
70
+ });
71
+
72
+ const orgSelectedItems = ref<Array<SelectOptionItem>>(rankOptions.value.filterOrganizations);
73
+ function orgOnSelect(selectedItems: Array<SelectOptionItem>, _lastSelectItem: SelectOptionItem) {
74
+ orgSelectedItems.value = selectedItems;
75
+ rankOptions.value.setFilterOrganizations(selectedItems);
76
+ }
77
+
78
+ const teamsOptions = computed(() => {
79
+ const res = rank.value.originTeams.map((t) => {
80
+ return {
81
+ value: t.id,
82
+ text: t.organization ? `${t.name} - ${t.organization}` : t.name,
83
+ };
84
+ });
85
+
86
+ return res;
87
+ });
88
+
89
+ const teamsSelectedItems = ref<Array<SelectOptionItem>>(rankOptions.value.filterTeams);
90
+ function teamsOnSelect(selectedItems: Array<SelectOptionItem>, _lastSelectItem: SelectOptionItem) {
91
+ teamsSelectedItems.value = selectedItems;
92
+ rankOptions.value.setFilterTeams(selectedItems);
93
+ }
94
+
95
+ async function onCancel() {
96
+ rankOptions.value.setSelf(beforeRankOptions);
97
+ await nextTick();
98
+ isHidden.value = true;
99
+ }
100
+
101
+ const localStorageKeyForFilterOrganizations = getLocalStorageKeyForFilterOrganizations();
102
+ const localStorageKeyForFilterTeams = getLocalStorageKeyForFilterTeams();
103
+
104
+ function onConfirm() {
105
+ // can't use useStorage, maybe it's a bug
106
+ localStorage.setItem(localStorageKeyForFilterOrganizations, JSON.stringify(orgSelectedItems.value));
107
+ localStorage.setItem(localStorageKeyForFilterTeams, JSON.stringify(teamsSelectedItems.value));
108
+
109
+ isHidden.value = true;
110
+ }
111
+ </script>
112
+
113
+ <template>
114
+ <Modal
115
+ v-model:is-hidden="isHidden"
116
+ :title="title"
117
+ width="w-200"
118
+ mt="mt-4"
119
+ >
120
+ <div
121
+ w-full
122
+ font-bold font-mono text-base
123
+ flex flex-col gap-4
124
+ items-center justify-center
125
+ >
126
+ <div
127
+ flex flex-col w-full
128
+ >
129
+ <div
130
+ grid grid-cols-6 gap-y-4
131
+ >
132
+ <div
133
+ v-if="rank.contest.organization"
134
+ flex items-center
135
+ text-sm
136
+ >
137
+ {{ rank.contest.organization }}:
138
+ </div>
139
+
140
+ <div
141
+ v-if="rank.contest.organization"
142
+ flex items-center
143
+ w-full
144
+ col-span-6
145
+ >
146
+ <MultiSelect
147
+ :options="orgOptions"
148
+ :selected-options="orgSelectedItems"
149
+ @select="orgOnSelect"
150
+ @compositionstart="onCompositionStart"
151
+ @compositionend="onCompositionEnd"
152
+ @keydown.delete.capture="onDelete"
153
+ />
154
+ </div>
155
+
156
+ <div
157
+ text-sm
158
+ flex items-center
159
+ >
160
+ Team:
161
+ </div>
162
+
163
+ <div
164
+ flex items-center
165
+ w-full
166
+ col-span-6
167
+ >
168
+ <MultiSelect
169
+ :options="teamsOptions"
170
+ :selected-options="teamsSelectedItems"
171
+ @select="teamsOnSelect"
172
+ />
173
+ </div>
174
+ </div>
175
+ </div>
176
+
177
+ <div
178
+ w-full
179
+ flex flex-row-reverse items-center
180
+ gap-x-4
181
+ >
182
+ <button
183
+ type="submit"
184
+ 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"
185
+ font-medium text-sm
186
+ rounded-md
187
+ @click="onConfirm"
188
+ >
189
+ {{ t("button.confirm") }}
190
+ </button>
191
+ <button
192
+ type="reset"
193
+ 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"
194
+ font-medium text-sm
195
+ rounded-md
196
+ @click="onCancel"
197
+ >
198
+ {{ t("button.cancel") }}
199
+ </button>
200
+ </div>
201
+ </div>
202
+ </Modal>
203
+ </template>