You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
1.7 KiB

function e(){return 60}var t=`/api/auth/sms/send`,n=`/api/auth/sms/login`,r=`cxxfds_token`,i=`cxxfds_participant_competition_slug`,a=`cxxfds_admin_token`,o=`cxxfds_admin_competition_id`,s=`cxxfds_reviewer_token`,c=`cxxfds_reviewer_competition_slug`,l=`/api/v1/review/auth/login`,u=`/api/v1/review/me`,d=`/api/v1/review/applications`;function f(e,t){let n=new URLSearchParams({competition_slug:t});return`${g()}/api/v1/review/applications/${e}?${n.toString()}`}function p(e){return`${g()}/api/v1/review/applications/${e}/score`}var m=`/v1/admin`;function h(){let e=`/admin/`;return e===`/`?`/admin/login`:`${e.endsWith(`/`)?e.slice(0,-1):e}/admin/login`}function g(){return(void 0)?.trim()?(void 0).trim().replace(/\/$/,``):(window.location.hostname,``)}function _(e){let t=String(e??``).trim();if(!t)return t;if(/^https?:\/\//i.test(t))try{let e=new URL(t),n=e.pathname.replace(/\/{2,}/g,`/`);return e.pathname=n.startsWith(`/`)?n:`/${n}`,e.toString()}catch{return t.replace(/([^:])\/\/+/g,`$1/`)}return t.replace(/\/{2,}/g,`/`)}function v(e,t,n){let r=new URLSearchParams({competition_slug:n});return`${g()}/api/v1/review/applications/${e}/files/${t}/download?${r.toString()}`}function y(){let e=(void 0)?.trim();return e?e.replace(/\/$/,``):`${g()}/api${m}`}function b(){return{token:localStorage.getItem(`cxxfds_reviewer_token`)??``,competitionSlug:localStorage.getItem(`cxxfds_reviewer_competition_slug`)??``}}function x(e,t){localStorage.setItem(s,e),localStorage.setItem(c,t)}function S(){localStorage.removeItem(s),localStorage.removeItem(c)}function C(e){return/^\/c\/[^/]+\/review(?:\/|$)/.test(e)}export{b as _,t as a,p as b,u as c,y as d,g as f,h as g,C as h,n as i,r as l,_ as m,a as n,d as o,e as p,i as r,l as s,o as t,S as u,f as v,x,v as y};