@qratilabs/qrati-connect 2.23.7 → 2.23.9

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.
@@ -1,13 +1,13 @@
1
- import{t as e,v as r}from"./C3uDEVBt.js";import{N as a,P as t,i as l,n as i,u as n,v as o}from"./BItJQVdK.js";import{u as s}from"./b6CwQBFC.js";import{t as d}from"./ekog7y-V.js";import{t as c}from"./Cb1JRT_1.js";import{n as m}from"./DvTRhlvs.js";import{t as g}from"./qWp4ucdT.js";import{t as h}from"./B14kCOq8.js";import{t as f}from"./DNG5BSHx2.js";function p({className:r}){/* @__PURE__ */
1
+ import{t as e,v as r}from"./C3uDEVBt.js";import{N as a,P as t,i as l,n as i,u as n,v as o}from"./BItJQVdK.js";import{u as s}from"./b6CwQBFC.js";import{t as d}from"./Cb1JRT_1.js";import{t as c}from"./ekog7y-V.js";import{n as m}from"./DvTRhlvs.js";import{t as g}from"./qWp4ucdT.js";import{t as h}from"./B14kCOq8.js";import{t as f}from"./DNG5BSHx2.js";function p({className:r}){/* @__PURE__ */
2
2
  return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m12 152a8 8 0 0 1-16 0V95l-11.56 7.71a8 8 0 1 1-8.88-13.32l24-16A8 8 0 0 1 140 80Z"})})}function b({className:r}){/* @__PURE__ */
3
3
  return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m-4 164a35.7 35.7 0 0 1-25.71-10.81A8 8 0 1 1 109.71 166A20 20 0 1 0 124 132a8 8 0 0 1-6.55-12.59L136.63 92H104a8 8 0 0 1 0-16h48a8 8 0 0 1 6.55 12.59l-21 30A36 36 0 0 1 124 188"})})}function x({className:r}){/* @__PURE__ */
4
- return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m24 144a8 8 0 0 1 0 16h-48a8 8 0 0 1-6.4-12.8l43.17-57.56a16 16 0 1 0-27.86-15a8 8 0 0 1-15.09-5.34a32 32 0 1 1 55.74 29.93L120 168Z"})})}var u=e=>{if(!e)return"";const r=e.trim().split(/\s+/);return 1===r.length?r[0]:`${r[0]} ${r[1]?.[0]?`${r[1][0]}.`:""}`},v={first:{size:"size-28",imageSize:"size-24",borderColor:"border-amber-400",gradient:"from-amber-400/20 via-yellow-300/10 to-transparent"},second:{size:"size-20",imageSize:"size-16",borderColor:"border-slate-400",gradient:"from-slate-400/20 via-slate-300/10 to-transparent"},third:{size:"size-20",imageSize:"size-16",borderColor:"border-amber-600",gradient:"from-amber-600/20 via-amber-500/10 to-transparent"}},N=(e,r)=>{const a=void 0===e.totalPoint?e.maxScore:e.totalPoint;return void 0===a?"—":a.toFixed(r?2:0)},w=({entry:a,position:t,showFloatingPoint:i,hidePictures:n})=>{const o=1===t?v.first:2===t?v.second:v.third,s={1:p,2:x,3:b}[t],d={1:{bg:"bg-amber-400",border:"border-amber-600",text:"text-amber-900"},2:{bg:"bg-slate-300",border:"border-slate-500",text:"text-slate-700"},3:{bg:"bg-amber-600",border:"border-amber-800",text:"text-amber-100"}},m=r(e=>{e.currentTarget.style.display="none"},[]);/* @__PURE__ */
5
- return e("div",{className:l("flex w-full flex-col items-center justify-center rounded-xl p-4 text-center sm:min-w-36","bg-linear-to-b",o.gradient),children:[n?/* @__PURE__ */e(s,{className:l(o.size,{1:"text-amber-400",2:"text-slate-400",3:"text-amber-600"}[t])}):/* @__PURE__ */e("div",{className:"relative",children:[/* @__PURE__ */e("img",{className:l(o.imageSize,"shadow-card scale-100 rounded-full border-4 object-cover",o.borderColor),src:a.image,alt:a.name??"",loading:"lazy",onError:m}),/* @__PURE__ */e("span",{className:l("shadow-card absolute -bottom-2 left-1/2 z-10 flex size-7 -translate-x-1/2 items-center justify-center rounded-full border-2 text-sm font-bold",d[t].bg,d[t].border,d[t].text),children:t})]}),/* @__PURE__ */e("div",{className:"mt-3 space-y-3 text-center",children:[/* @__PURE__ */e(c,{variant:"h6",lines:2,className:"max-w-24",align:"center",children:u(a.name)}),/* @__PURE__ */e("div",{className:"text-primary text-lg font-bold",children:N(a,i)})]})]})},y=({title:a,entries:t=[],showFloatingPoint:i=!1,hidePictures:n=!0})=>{const{t:o}=m(),s=a.replace(/\s+/g,"-").toLowerCase(),d=r(e=>{e.currentTarget.style.display="none"},[]);/* @__PURE__ */
6
- return e("div",{className:"border-border mx-auto flex max-w-2xl flex-col rounded border p-4 sm:p-5 lg:p-6",children:[/* @__PURE__ */e("div",{className:"mb-4 flex items-center justify-center gap-2",children:[/* @__PURE__ */e(h,{className:"text-primary size-6"}),/* @__PURE__ */e(c,{variant:"h4",align:"center",color:"primary",children:a})]}),0===t.length?/* @__PURE__ */e("div",{className:"py-16 text-center",children:[/* @__PURE__ */e(c,{variant:"h5",align:"center",color:"error",children:o("leaderboard.not_available","No data available")}),/* @__PURE__ */e(c,{variant:"body2",align:"center",color:"muted",className:"mt-2",children:o("leaderboard.come_back_later","Check back later for updates.")})]}):/* @__PURE__ */e("div",{children:[/* @__PURE__ */e("div",{className:"flex items-end justify-center gap-2 lg:gap-8",children:[t.length>1&&/* @__PURE__ */e(w,{entry:t[1],position:2,showFloatingPoint:i,hidePictures:n}),t.length>0&&/* @__PURE__ */e(w,{entry:t[0],position:1,showFloatingPoint:i,hidePictures:n}),t.length>2&&/* @__PURE__ */e(w,{entry:t[2],position:3,showFloatingPoint:i,hidePictures:n})]}),/* @__PURE__ */e("div",{className:"mt-6 overflow-hidden rounded ring-1 ring-black/5",children:/* @__PURE__ */e("div",{className:"divide-border divide-y",children:t.slice(3).map((r,a)=>/* @__PURE__ */e("div",{className:l("hover:bg-primary/5 flex items-center gap-4 px-4 py-3",a%2==0?"bg-primary/5":"bg-background"),children:[
7
- /* @__PURE__ */e("span",{className:"text-muted-foreground w-8 text-center text-sm font-medium",children:a+4}),!n&&/* @__PURE__ */e("img",{className:"ring-border size-10 rounded-full object-cover ring-2",src:r.image,alt:r.name??"",loading:"lazy",onError:d}),
4
+ return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m24 144a8 8 0 0 1 0 16h-48a8 8 0 0 1-6.4-12.8l43.17-57.56a16 16 0 1 0-27.86-15a8 8 0 0 1-15.09-5.34a32 32 0 1 1 55.74 29.93L120 168Z"})})}var u=e=>{if(!e)return"";const r=e.trim().split(/\s+/);return 1===r.length?r[0]:`${r[0]} ${r[1]?.[0]?`${r[1][0]}.`:""}`},v={first:{size:"size-28",imageSize:"size-24",borderColor:"border-amber-400",gradient:"from-amber-400/20 via-yellow-300/10 to-transparent"},second:{size:"size-20",imageSize:"size-16",borderColor:"border-slate-400",gradient:"from-slate-400/20 via-slate-300/10 to-transparent"},third:{size:"size-20",imageSize:"size-16",borderColor:"border-amber-600",gradient:"from-amber-600/20 via-amber-500/10 to-transparent"}},N=(e,r)=>{const a=void 0===e.totalPoint?e.maxScore:e.totalPoint;return void 0===a?"—":a.toFixed(r?2:0)},w=({entry:a,position:t,showFloatingPoint:i,hidePictures:n})=>{const o=1===t?v.first:2===t?v.second:v.third,s={1:p,2:x,3:b}[t],c={1:{bg:"bg-amber-400",border:"border-amber-600",text:"text-amber-900"},2:{bg:"bg-slate-300",border:"border-slate-500",text:"text-slate-700"},3:{bg:"bg-amber-600",border:"border-amber-800",text:"text-amber-100"}},m=r(e=>{e.currentTarget.style.display="none"},[]);/* @__PURE__ */
5
+ return e("div",{className:l("flex w-full flex-col items-center justify-center rounded-xl p-4 text-center sm:min-w-36","bg-linear-to-b",o.gradient),children:[n?/* @__PURE__ */e(s,{className:l(o.size,{1:"text-amber-400",2:"text-slate-400",3:"text-amber-600"}[t])}):/* @__PURE__ */e("div",{className:"relative",children:[/* @__PURE__ */e("img",{className:l(o.imageSize,"shadow-card scale-100 rounded-full border-4 object-cover",o.borderColor),src:a.image,alt:a.name??"",loading:"lazy",onError:m}),/* @__PURE__ */e("span",{className:l("shadow-card absolute -bottom-2 left-1/2 z-10 flex size-7 -translate-x-1/2 items-center justify-center rounded-full border-2 text-sm font-bold",c[t].bg,c[t].border,c[t].text),children:t})]}),/* @__PURE__ */e("div",{className:"mt-3 space-y-3 text-center",children:[/* @__PURE__ */e(d,{variant:"h6",lines:2,className:"max-w-24",align:"center",children:u(a.name)}),/* @__PURE__ */e("div",{className:"text-primary text-lg font-bold",children:N(a,i)})]})]})},y=({title:a,entries:t=[],showFloatingPoint:i=!1,hidePictures:n=!0})=>{const{t:o}=m(),s=a.replace(/\s+/g,"-").toLowerCase(),c=r(e=>{e.currentTarget.style.display="none"},[]);/* @__PURE__ */
6
+ return e("div",{className:"border-border mx-auto flex max-w-2xl flex-col rounded border p-4 sm:p-5 lg:p-6",children:[/* @__PURE__ */e("div",{className:"mb-4 flex items-center justify-center gap-2",children:[/* @__PURE__ */e(h,{className:"text-primary size-6"}),/* @__PURE__ */e(d,{variant:"h4",align:"center",color:"primary",children:a})]}),0===t.length?/* @__PURE__ */e("div",{className:"py-16 text-center",children:[/* @__PURE__ */e(d,{variant:"h5",align:"center",color:"error",children:o("leaderboard.not_available","No data available")}),/* @__PURE__ */e(d,{variant:"body2",align:"center",color:"muted",className:"mt-2",children:o("leaderboard.come_back_later","Check back later for updates.")})]}):/* @__PURE__ */e("div",{children:[/* @__PURE__ */e("div",{className:"flex items-end justify-center gap-2 lg:gap-8",children:[t.length>1&&/* @__PURE__ */e(w,{entry:t[1],position:2,showFloatingPoint:i,hidePictures:n}),t.length>0&&/* @__PURE__ */e(w,{entry:t[0],position:1,showFloatingPoint:i,hidePictures:n}),t.length>2&&/* @__PURE__ */e(w,{entry:t[2],position:3,showFloatingPoint:i,hidePictures:n})]}),/* @__PURE__ */e("div",{className:"mt-6 overflow-hidden rounded ring-1 ring-black/5",children:/* @__PURE__ */e("div",{className:"divide-border divide-y",children:t.slice(3).map((r,a)=>/* @__PURE__ */e("div",{className:l("hover:bg-primary/5 flex items-center gap-4 px-4 py-3",a%2==0?"bg-primary/5":"bg-background"),children:[
7
+ /* @__PURE__ */e("span",{className:"text-muted-foreground w-8 text-center text-sm font-medium",children:a+4}),!n&&/* @__PURE__ */e("img",{className:"ring-border size-10 rounded-full object-cover ring-2",src:r.image,alt:r.name??"",loading:"lazy",onError:c}),
8
8
  /* @__PURE__ */e("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */e("div",{className:"truncate font-medium",children:u(r.name)})}),
9
9
  /* @__PURE__ */e("div",{className:"text-primary text-right font-semibold",children:N(r,i)})]},`${s}-${a}`))})})]})]})},z=()=>{const{eventSlug:r}=s(),{props:h}=i(),{t:p}=m(),b=h?.organizationId,{event:x,loading:u}=g({eventSlug:r}),{isLoading:v,isError:N,error:w,data:z}=t({queryKey:[`leaderboard-${b}-${x?._id}`],queryFn:async()=>(await a.get(n.GET_LEADERBOARD,{headers:{"x-org-id":b??""},searchParams:{eventId:x?._id??"",projection:"connect"}}).json()).data,enabled:Boolean(x),staleTime:3e4,gcTime:3e5});/* @__PURE__ */
10
- return e("div",u||v?{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */e("div",{className:"flex flex-col items-center gap-2 text-center",children:[/* @__PURE__ */e(d,{className:"h-5 w-28 rounded-full"}),/* @__PURE__ */e(d,{className:"h-10 w-64 rounded"})]}),/* @__PURE__ */e("div",{className:l("flex w-full gap-8 lg:gap-0",x?.engagementStyle===o.REACTION?"flex-col-reverse md:flex-row-reverse md:justify-between":"flex-col md:flex-row"),children:[/* @__PURE__ */e("div",{className:"flex-1",children:[/* @__PURE__ */e(d,{className:"h-72 w-full rounded"}),/* @__PURE__ */e(d,{className:"mt-4 h-72 w-full rounded"})]}),/* @__PURE__ */e("div",{className:"flex-1",children:/* @__PURE__ */e(d,{className:"h-72 w-full rounded"})})]})]}:N?{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col items-center justify-center gap-4 px-2 py-4 text-center sm:px-0 lg:py-8",children:[
10
+ return e("div",u||v?{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */e("div",{className:"flex flex-col items-center gap-2 text-center",children:[/* @__PURE__ */e(c,{className:"h-5 w-28 rounded-full"}),/* @__PURE__ */e(c,{className:"h-10 w-64 rounded"})]}),/* @__PURE__ */e("div",{className:l("flex w-full gap-8 lg:gap-0",x?.engagementStyle===o.REACTION?"flex-col-reverse md:flex-row-reverse md:justify-between":"flex-col md:flex-row"),children:[/* @__PURE__ */e("div",{className:"flex-1",children:[/* @__PURE__ */e(c,{className:"h-72 w-full rounded"}),/* @__PURE__ */e(c,{className:"mt-4 h-72 w-full rounded"})]}),/* @__PURE__ */e("div",{className:"flex-1",children:/* @__PURE__ */e(c,{className:"h-72 w-full rounded"})})]})]}:N?{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col items-center justify-center gap-4 px-2 py-4 text-center sm:px-0 lg:py-8",children:[
11
11
  /* @__PURE__ */e(f,{className:"size-9 text-destructive"}),
12
- /* @__PURE__ */e(c,{variant:"h4",color:"error",align:"center",children:p("common.error","Something went wrong")}),
13
- /* @__PURE__ */e(c,{variant:"body2",color:"muted",align:"center",children:w instanceof Error?w.message:p("common.try_again","Please try again later.")})]}:{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */e("div",{className:"flex flex-col items-center gap-2 text-center",children:[/* @__PURE__ */e("div",{className:"text-primary flex items-center gap-2",children:/* @__PURE__ */e(c,{variant:"h5",color:"primary",children:p("leaderboard.leaderboard","Leaderboard")})}),/* @__PURE__ */e(c,{variant:"h4",align:"center",color:"foreground",children:x?.name})]}),/* @__PURE__ */e("div",{className:l("flex w-full gap-8 lg:gap-0",x?.engagementStyle===o.REACTION?"flex-col-reverse md:flex-row-reverse md:justify-between":"flex-col md:flex-row"),children:[/* @__PURE__ */e("div",{className:"flex-1",children:/* @__PURE__ */e(y,{title:p("leaderboard.point_leaders","Top Points Leaders"),entries:z?.leaderboardByPoint?.topRankers||[],pointName:x?.pointName})}),/* @__PURE__ */e("div",{className:"flex-1",children:/* @__PURE__ */e(y,{title:x?.engagementStyle===o.REACTION?p("leaderboard.reaction_counts","Top Reactions"):p("leaderboard.top_rated_photos","Top Rated Photos"),showFloatingPoint:x?.engagementStyle===o.CONTEST,entries:z?.leaderboardByScore?.topRankers||[],pointName:x?.pointName})})]})]})};export{z as default};
12
+ /* @__PURE__ */e(d,{variant:"h4",color:"error",align:"center",children:p("common.error","Something went wrong")}),
13
+ /* @__PURE__ */e(d,{variant:"body2",color:"muted",align:"center",children:w instanceof Error?w.message:p("common.try_again","Please try again later.")})]}:{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */e("div",{className:"flex flex-col items-center gap-2 text-center",children:[/* @__PURE__ */e("div",{className:"text-primary flex items-center gap-2",children:/* @__PURE__ */e(d,{variant:"h5",color:"primary",children:p("leaderboard.leaderboard","Leaderboard")})}),/* @__PURE__ */e(d,{variant:"h4",align:"center",color:"foreground",children:x?.name})]}),/* @__PURE__ */e("div",{className:l("flex w-full gap-8 lg:gap-0",x?.engagementStyle===o.REACTION?"flex-col-reverse md:flex-row-reverse md:justify-between":"flex-col md:flex-row"),children:[/* @__PURE__ */e("div",{className:"flex-1",children:/* @__PURE__ */e(y,{title:p("leaderboard.point_leaders","Top Points Leaders"),entries:z?.leaderboardByPoint?.topRankers||[],pointName:x?.pointName})}),/* @__PURE__ */e("div",{className:"flex-1",children:/* @__PURE__ */e(y,{title:x?.engagementStyle===o.REACTION?p("leaderboard.reaction_counts","Top Reactions"):p("leaderboard.top_rated_photos","Top Rated Photos"),showFloatingPoint:x?.engagementStyle===o.CONTEST,entries:z?.leaderboardByScore?.topRankers||[],pointName:x?.pointName})})]})]})};export{z as default};
@@ -1,4 +1,4 @@
1
- import{h as a,t as e}from"./C3uDEVBt.js";import{D as o,n as s}from"./BItJQVdK.js";import{c as l,t as r}from"./b6CwQBFC.js";import{t as i}from"./Cb1JRT_1.js";import{n as t}from"./DvTRhlvs.js";import{t as n}from"./D9NypPiv.js";import{i as d,s as p,t as m}from"./DXx41__x2.js";import{n as c,r as g,t as u}from"./VakK6fPh2.js";var f=()=>{const{t:f}=t(),h=l(),[w,v]=a(""),[b,y]=a(""),[j,C]=a(!1),[N,k]=a(null),[A,P]=a(!1),[S,x]=a({}),{loginUsingEmail:D,loginWithGoogle:E,loginWithApple:F}=s(),[L,O]=a({google:!1,apple:!1}),W=a=>{x(e=>e[a]?{...e,[a]:void 0}:e)},G=async(a,e)=>{O(e=>({...e,[a]:!0})),k(null);try{await(e?.())}catch(o){o instanceof Error?k(o.message):k(`Failed to login with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{O(e=>({...e,[a]:!1}))}};/* @__PURE__ */
1
+ import{h as a,t as e}from"./C3uDEVBt.js";import{D as o,n as s}from"./BItJQVdK.js";import{c as l,t as r}from"./b6CwQBFC.js";import{t as i}from"./Cb1JRT_1.js";import{n as t}from"./DvTRhlvs.js";import{t as n}from"./D9NypPiv.js";import{i as d,s as p,t as m}from"./DXx41__x2.js";import{n as c,r as g,t as u}from"./gk4TX_a62.js";var f=()=>{const{t:f}=t(),h=l(),[w,v]=a(""),[b,y]=a(""),[j,C]=a(!1),[N,k]=a(null),[A,P]=a(!1),[S,x]=a({}),{loginUsingEmail:D,loginWithGoogle:E,loginWithApple:F}=s(),[L,O]=a({google:!1,apple:!1}),W=a=>{x(e=>e[a]?{...e,[a]:void 0}:e)},G=async(a,e)=>{O(e=>({...e,[a]:!0})),k(null);try{await(e?.())}catch(o){o instanceof Error?k(o.message):k(`Failed to login with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{O(e=>({...e,[a]:!1}))}};/* @__PURE__ */
2
2
  return e("div",{className:"bg-background w-full space-y-6",children:[/* @__PURE__ */e("form",{noValidate:!0,onSubmit:async a=>{a.preventDefault();const e=d(w),o=p(b);if(e||o)return void x({email:e,password:o});x({}),C(!0),k(null);const s=await(D?.(w.toLowerCase(),b));s?.error&&k(s.error),C(!1)},className:"space-y-6",children:[
3
3
  /* @__PURE__ */e("div",{className:"space-y-9",children:[/* @__PURE__ */e(m,{label:f("auth.email","Email address"),name:"email",disabled:j,type:"email",value:w,onChange:a=>{v(a.target.value),W("email")},autoComplete:"email",error:S.email}),/* @__PURE__ */e(m,{label:f("auth.password","Password"),name:"password",disabled:j,type:A?"text":"password",value:b,onChange:a=>{y(a.target.value),W("password")},autoComplete:"current-password",error:S.password,actionLabel:A?"Hide password":"Show password",actionIcon:/* @__PURE__ */e(A?u:c,{className:"size-5"}),onActionClick:()=>P(!A)})]}),N&&/* @__PURE__ */e(i,{align:"center",color:"error",className:"font-medium",children:N}),
4
4
  /* @__PURE__ */e("div",{className:"flex justify-end",children:/* @__PURE__ */e(r,{to:o.FORGOT_PASSWORD,state:{from:h.pathname},children:/* @__PURE__ */e(i,{variant:"h6",className:"w-fit",children:f("button.forgotPassword","Forgot Password?")})})}),
@@ -2,6 +2,6 @@ import{t as e}from"./C3uDEVBt.js";var a=a=>{switch(a){case"google":/* @__PURE__
2
2
  /* @__PURE__ */e("path",{fill:"#ffc107",d:"M43.611 20.083H42V20H24v8h11.303c-1.649 4.657-6.08 8-11.303 8c-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4C12.955 4 4 12.955 4 24s8.955 20 20 20s20-8.955 20-20c0-1.341-.138-2.65-.389-3.917"}),
3
3
  /* @__PURE__ */e("path",{fill:"#ff3d00",d:"m6.306 14.691l6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4C16.318 4 9.656 8.337 6.306 14.691"}),
4
4
  /* @__PURE__ */e("path",{fill:"#4caf50",d:"M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238A11.9 11.9 0 0 1 24 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44"}),
5
- /* @__PURE__ */e("path",{fill:"#1976d2",d:"M43.611 20.083H42V20H24v8h11.303a12.04 12.04 0 0 1-4.087 5.571l.003-.002l6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917"})]});case"apple":/* @__PURE__ */return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:/* @__PURE__ */e("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47c-1.34.03-1.77-.79-3.29-.79c-1.53 0-2 .77-3.27.82c-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51c1.28-.02 2.5.87 3.29.87c.78 0 2.26-1.07 3.81-.91c.65.03 2.47.26 3.64 1.98c-.09.06-2.17 1.28-2.15 3.81c.03 3.02 2.65 4.03 2.68 4.04c-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5c.13 1.17-.34 2.35-1.04 3.19c-.69.85-1.83 1.51-2.95 1.42c-.15-1.15.41-2.35 1.05-3.11"})});default:return""}},c=({disabled:c,provider:l,onClick:r,loading:s,className:t})=>/* @__PURE__ */e("button",{disabled:c||s,onClick:async()=>{c||s||await(r?.())},className:t||"group h-12 rounded-full transition duration-300 disabled:cursor-not-allowed disabled:border-gray-500 disabled:opacity-50",children:/* @__PURE__ */e("div",s?{className:"flex h-full items-center justify-center",children:/* @__PURE__ */e("div",{className:"border-foreground h-5 w-5 animate-spin rounded-full border-2 border-b-transparent"})}:{className:"border-border flex items-center justify-center rounded border py-2",children:a(l)})});function l({className:a}){/* @__PURE__ */
5
+ /* @__PURE__ */e("path",{fill:"#1976d2",d:"M43.611 20.083H42V20H24v8h11.303a12.04 12.04 0 0 1-4.087 5.571l.003-.002l6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917"})]});case"apple":/* @__PURE__ */return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:/* @__PURE__ */e("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47c-1.34.03-1.77-.79-3.29-.79c-1.53 0-2 .77-3.27.82c-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51c1.28-.02 2.5.87 3.29.87c.78 0 2.26-1.07 3.81-.91c.65.03 2.47.26 3.64 1.98c-.09.06-2.17 1.28-2.15 3.81c.03 3.02 2.65 4.03 2.68 4.04c-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5c.13 1.17-.34 2.35-1.04 3.19c-.69.85-1.83 1.51-2.95 1.42c-.15-1.15.41-2.35 1.05-3.11"})});default:return""}},c=({disabled:c,provider:l,onClick:r,loading:s,className:t})=>/* @__PURE__ */e("button",{disabled:c||s,onClick:async()=>{c||s||await(r?.())},className:t||"group h-12 rounded-full transition duration-300 disabled:cursor-not-allowed disabled:border-gray-500 disabled:opacity-50",children:/* @__PURE__ */e("div",s?{className:"flex h-full items-center justify-center",children:/* @__PURE__ */e("div",{className:"border-foreground h-5 w-5 animate-spin rounded-full border-2 border-b-transparent"})}:{className:"border-border flex items-center justify-center rounded border-[1px] py-2",children:a(l)})});function l({className:a}){/* @__PURE__ */
6
6
  return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:a,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M2 5.27L3.28 4L20 20.72L18.73 22l-3.08-3.08c-1.15.38-2.37.58-3.65.58c-5 0-9.27-3.11-11-7.5c.69-1.76 1.79-3.31 3.19-4.54zM12 9a3 3 0 0 1 3 3a3 3 0 0 1-.17 1L11 9.17A3 3 0 0 1 12 9m0-4.5c5 0 9.27 3.11 11 7.5a11.8 11.8 0 0 1-4 5.19l-1.42-1.43A9.86 9.86 0 0 0 20.82 12A9.82 9.82 0 0 0 12 6.5c-1.09 0-2.16.18-3.16.5L7.3 5.47c1.44-.62 3.03-.97 4.7-.97M3.18 12A9.82 9.82 0 0 0 12 17.5c.69 0 1.37-.07 2-.21L11.72 15A3.064 3.064 0 0 1 9 12.28L5.6 8.87c-.99.85-1.82 1.91-2.42 3.13"})})}function r({className:a}){/* @__PURE__ */
7
7
  return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:a,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M12 9a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3m0-4.5c5 0 9.27 3.11 11 7.5c-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5M3.18 12a9.821 9.821 0 0 0 17.64 0a9.821 9.821 0 0 0-17.64 0"})})}export{l as n,c as r,r as t};
@@ -1,9 +1,9 @@
1
- import{t as e,w as t}from"./C3uDEVBt.js";import{D as n,n as a}from"./BItJQVdK.js";import{c as r,l as i,t as s}from"./b6CwQBFC.js";import{t as o}from"./ekog7y-V.js";import{t as l}from"./Cb1JRT_1.js";import{n as c}from"./DvTRhlvs.js";import{t as m}from"./D9NypPiv.js";import{t as d}from"./_ty2jtjs.js";function h({className:t}){/* @__PURE__ */
1
+ import{t as e,w as t}from"./C3uDEVBt.js";import{D as n,n as a}from"./BItJQVdK.js";import{c as r,l as i,t as s}from"./b6CwQBFC.js";import{t as o}from"./Cb1JRT_1.js";import{t as l}from"./ekog7y-V.js";import{n as c}from"./DvTRhlvs.js";import{t as m}from"./D9NypPiv.js";import{t as d}from"./_ty2jtjs.js";function h({className:t}){/* @__PURE__ */
2
2
  return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19v-3q0-.425.288-.712T4 15t.713.288T5 16v3h14V5H5v3q0 .425-.288.713T4 9t-.712-.288T3 8V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm6.65-8H4q-.425 0-.712-.288T3 12t.288-.712T4 11h7.65L9.8 9.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.312t.712.287L14.8 11.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-3.575 3.575q-.3.3-.712.288T9.8 16.25q-.275-.3-.288-.7t.288-.7z"})})}var u=()=>{const{t:t}=c(),d=r(),u=i(),{initializing:p,organization:g,loadingUser:v,user:f,signout:N}=a();/* @__PURE__ */
3
- return e("div",p||v?{className:"my-2 flex justify-end",children:/* @__PURE__ */e(o,{className:"h-9 w-64"})}:{className:"mx-auto mb-4",children:[!f&&/* @__PURE__ */e("div",{className:"flex justify-end gap-4",children:/* @__PURE__ */e(s,{to:`${n.LOGIN}?ref=${encodeURIComponent(d.pathname)}`,children:/* @__PURE__ */e(m,{children:t("button.login","Login")})})}),f&&/* @__PURE__ */e("div",{className:"mt-2 flex items-center justify-end gap-4",children:[/* @__PURE__ */e(l,{variant:"h5",children:f.name}),!g?.customAuth&&/* @__PURE__ */e("button",{onClick:async()=>{await N(),u(n.PUBLIC_EVENTS)},children:/* @__PURE__ */e(h,{className:"text-destructive"})})]})]})},p=()=>{const{user:r,organization:o,signout:c}=a(),m=i(),h=o?.integrationSettings?.hideQratiBranding;/* @__PURE__ */
4
- return e("div",{className:"pt-16 sm:pt-24",children:[o&&/* @__PURE__ */e("div",{className:"mx-auto py-2",children:o.customAuth?r&&/* @__PURE__ */e(l,{variant:"h6",align:"center",children:[r.name,"•"," ",
5
- /* @__PURE__ */e(s,{className:"hover:underline",to:n.MY_UPLOADS,children:"My Uploads"})]}):/* @__PURE__ */e(t,{children:[!r&&/* @__PURE__ */e(l,{variant:"h6",align:"center",children:[
3
+ return e("div",p||v?{className:"my-2 flex justify-end",children:/* @__PURE__ */e(l,{className:"h-9 w-64"})}:{className:"mx-auto mb-4",children:[!f&&/* @__PURE__ */e("div",{className:"flex justify-end gap-4",children:/* @__PURE__ */e(s,{to:`${n.LOGIN}?ref=${encodeURIComponent(d.pathname)}`,children:/* @__PURE__ */e(m,{children:t("button.login","Login")})})}),f&&/* @__PURE__ */e("div",{className:"mt-2 flex items-center justify-end gap-4",children:[/* @__PURE__ */e(o,{variant:"h5",children:f.name}),!g?.customAuth&&/* @__PURE__ */e("button",{onClick:async()=>{await N(),u(n.PUBLIC_EVENTS)},children:/* @__PURE__ */e(h,{className:"text-destructive"})})]})]})},p=()=>{const{user:r,organization:l,signout:c}=a(),m=i(),h=l?.integrationSettings?.hideQratiBranding;/* @__PURE__ */
4
+ return e("div",{className:"pt-16 sm:pt-24",children:[l&&/* @__PURE__ */e("div",{className:"mx-auto py-2",children:l.customAuth?r&&/* @__PURE__ */e(o,{variant:"h6",align:"center",children:[r.name,"•"," ",
5
+ /* @__PURE__ */e(s,{className:"hover:underline",to:n.MY_UPLOADS,children:"My Uploads"})]}):/* @__PURE__ */e(t,{children:[!r&&/* @__PURE__ */e(o,{variant:"h6",align:"center",children:[
6
6
  /* @__PURE__ */e(s,{className:"text-primary hover:underline",to:n.LOGIN,children:"Login"})," ","•"," ",
7
- /* @__PURE__ */e(s,{className:"text-primary hover:underline",to:n.REGISTER,children:"Register"})]}),r&&/* @__PURE__ */e(l,{variant:"h6",align:"center",children:[r.name," •"," ",
7
+ /* @__PURE__ */e(s,{className:"text-primary hover:underline",to:n.REGISTER,children:"Register"})]}),r&&/* @__PURE__ */e(o,{variant:"h6",align:"center",children:[r.name," •"," ",
8
8
  /* @__PURE__ */e(s,{className:"hover:underline",to:n.MY_UPLOADS,children:"My Uploads"})," ","•"," ",
9
9
  /* @__PURE__ */e("button",{type:"button",className:"text-destructive cursor-pointer border-none bg-transparent p-0 hover:underline",onClick:async()=>{await c(),m(n.PUBLIC_EVENTS)},children:"Logout"})]})]})}),!h&&/* @__PURE__ */e(d,{})]})};export{u as n,p as t};