@qratilabs/qrati-connect 2.23.0-beta.3 → 2.23.0-beta.4
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,4 +1,4 @@
|
|
|
1
|
-
import{T as e,b as t,d as n,f as r,h as a,p as i,s,t as o,v as l}from"./qbHuxVSe.js";import{C as c,D as d,L as u,M as m,N as g,O as h,P as p,S as f,_ as v,b as w,d as T,f as y,g as N,h as q,i as x,j as b,m as E,n as C,p as S,u as I,v as L,x as z,y as k}from"./WtQ5axEj.js";import{n as A,r as M,t as _}from"./9VAO1NmP.js";import{t as P,u as R}from"./lVJD5cJY.js";import{t as V}from"./fwDYCLiL.js";import{n as O,t as j}from"./BekfKWcG.js";import{a as F,c as B,i as H,l as U,n as G,o as $,r as D,s as W,t as Q,u as K}from"./
|
|
1
|
+
import{T as e,b as t,d as n,f as r,h as a,p as i,s,t as o,v as l}from"./qbHuxVSe.js";import{C as c,D as d,L as u,M as m,N as g,O as h,P as p,S as f,_ as v,b as w,d as T,f as y,g as N,h as q,i as x,j as b,m as E,n as C,p as S,u as I,v as L,x as z,y as k}from"./WtQ5axEj.js";import{n as A,r as M,t as _}from"./9VAO1NmP.js";import{t as P,u as R}from"./lVJD5cJY.js";import{t as V}from"./fwDYCLiL.js";import{n as O,t as j}from"./BekfKWcG.js";import{a as F,c as B,i as H,l as U,n as G,o as $,r as D,s as W,t as Q,u as K}from"./DQ4anWD-.js";import{t as Z}from"./B2KTsK_w.js";import{r as Y}from"./DWbLshVZ.js";import{n as J,t as X}from"./2SYk3iBo.js";import{t as ee}from"./C9HFLidt.js";import{t as te}from"./C0vZ8zxT.js";import{t as ne}from"./CJpmOICA.js";import{a as re,i as ae,n as ie,o as se,r as oe,s as le,t as ce}from"./we0Hcb5C.js";import{n as de,r as ue,t as me}from"./D8Se70tP2.js";import{n as ge,t as he}from"./C6SiAA6Z2.js";function pe({className:e}){/* @__PURE__ */
|
|
2
2
|
return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */o("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zm0 0V5zm2-2h10q.3 0 .45-.275t-.05-.525l-2.75-3.675q-.15-.2-.4-.2t-.4.2L11.25 16L9.4 13.525q-.15-.2-.4-.2t-.4.2l-2 2.675q-.2.25-.05.525T7 17"})})}function fe({className:e}){/* @__PURE__ */
|
|
3
3
|
return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */o("path",{fill:"currentColor",d:"M15.188 14.688Q16.5 13.375 16.5 11.5t-1.312-3.187T12 7T8.813 8.313T7.5 11.5t1.313 3.188T12 16t3.188-1.312m-5.1-1.276Q9.3 12.625 9.3 11.5t.788-1.912T12 8.8t1.913.788t.787 1.912t-.787 1.913T12 14.2t-1.912-.787m-4.2 3.787q-2.763-1.8-4.363-4.75q-.125-.225-.187-.462t-.063-.488t.063-.488t.187-.462q1.6-2.95 4.363-4.75T12 4t6.113 1.8t4.362 4.75q.125.225.188.463t.062.487t-.062.488t-.188.462q-1.6 2.95-4.362 4.75T12 19t-6.113-1.8m11.3-1.687Q19.55 14.025 20.8 11.5q-1.25-2.525-3.613-4.012T12 6T6.813 7.488T3.2 11.5q1.25 2.525 3.613 4.013T12 17t5.188-1.487"})})}var ve=({description:e,maxLines:n=2,className:i})=>{const[s,l]=a(!1),[c,d]=a(!1),u=r(null),m=r(null);return t(()=>{l(!1)},[e]),t(()=>{if(!u.current||!e)return void d(!1);const t=u.current,r=()=>{const e=window.getComputedStyle(t),a=Math.max(0,Math.floor(t.getBoundingClientRect().width));if(!a)return void(m.current=window.requestAnimationFrame(r));const i=e.lineHeight,s=parseFloat(e.fontSize)||16;let o=1.2*s;i&&"normal"!==i&&(o=i.endsWith("px")?parseFloat(i):parseFloat(i)*s);const l=document.createElement("div");l.style.position="absolute",l.style.visibility="hidden",l.style.pointerEvents="none",l.style.whiteSpace="normal",l.style.width=`${a}px`,l.style.boxSizing=e.boxSizing,l.style.padding=e.padding,l.style.margin=e.margin,l.style.fontSize=e.fontSize,l.style.fontFamily=e.fontFamily,l.style.fontWeight=e.fontWeight,l.style.lineHeight=e.lineHeight,l.style.letterSpacing=e.letterSpacing,l.style.wordBreak="break-word",l.innerText=t.innerText||"",document.body.appendChild(l);const c=l.scrollHeight;document.body.removeChild(l),d(c>o*n+1)},a=()=>{null!==m.current&&window.cancelAnimationFrame(m.current),m.current=window.requestAnimationFrame(r)};let i;a(),window.addEventListener("resize",a);try{i=new MutationObserver(a),i.observe(t,{characterData:!0,childList:!0,subtree:!0})}catch{}return()=>{window.removeEventListener("resize",a),null!==m.current&&window.cancelAnimationFrame(m.current),i?.disconnect()}},[e,n]),e?/* @__PURE__ */o("div",{className:x("relative w-full",i),children:[/* @__PURE__ */o("p",{ref:u,className:x(O({variant:"body2",color:"muted",align:"center"}),"w-full",s?void 0:`line-clamp-${n}`),children:[e,c&&s&&/* @__PURE__ */o("button",{type:"button",onClick:()=>l(!1),className:"text-primary ml-2 text-sm font-medium hover:underline cursor-pointer",children:"see less"})]}),c&&!s&&/* @__PURE__ */o("span",{className:"bg-background absolute right-0 bottom-0 inline-flex items-center pl-2",children:[/* @__PURE__ */o("span",{className:"text-muted-foreground",children:"..."}),/* @__PURE__ */o("button",{type:"button",onClick:()=>l(!0),className:"text-primary ml-1 text-sm font-medium hover:underline cursor-pointer",children:"see more"})]})]}):null},we=()=>{const{t:e}=Y(),{eventSlug:t}=R(),{event:n}=te({eventSlug:t}),{props:r,organization:a}=C(),{curateLabel:i,leaderboardLabel:s}=r??{},{eventViews:l,contentCount:c,curationCount:u}=(({event:e})=>{const{props:t,organization:n}=C(),r=t?.organizationId,{isLoading:a,data:i}=p({queryKey:["event-stats",r??"",e?._id??""],queryFn:async()=>{try{return(await g.get(I.GET_EVENT_STATISTICS,{searchParams:{eventSlug:e?.slug},headers:{"x-org-id":r}}).json()).data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch event stats")}},enabled:!!e&&Boolean(n?.integrationSettings?.showEventStats)});return{isLoading:a,eventViews:"number"==typeof i?.eventViews?i.eventViews:i?.eventViews?.views??0,contentCount:i?.contentCount||0,curationCount:i?.curationCount||0}})({event:n});/* @__PURE__ */
|
|
4
4
|
return o("div",{className:"w-full space-y-3",children:[
|
|
@@ -4,7 +4,7 @@ return i("div",{className:m("relative inline-block",a),onMouseEnter:()=>l(!0),on
|
|
|
4
4
|
return i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */i("path",{fill:"currentColor",d:"M10.825 22q-.675 0-1.162-.45t-.588-1.1L8.85 18.8q-.325-.125-.612-.3t-.563-.375l-1.55.65q-.625.275-1.25.05t-.975-.8l-1.175-2.05q-.35-.575-.2-1.225t.675-1.075l1.325-1Q4.5 12.5 4.5 12.337v-.675q0-.162.025-.337l-1.325-1Q2.675 9.9 2.525 9.25t.2-1.225L3.9 5.975q.35-.575.975-.8t1.25.05l1.55.65q.275-.2.575-.375t.6-.3l.225-1.65q.1-.65.588-1.1T10.825 2h2.35q.675 0 1.163.45t.587 1.1l.225 1.65q.325.125.613.3t.562.375l1.55-.65q.625-.275 1.25-.05t.975.8l1.175 2.05q.35.575.2 1.225t-.675 1.075l-1.325 1q.025.175.025.338v.674q0 .163-.05.338l1.325 1q.525.425.675 1.075t-.2 1.225l-1.2 2.05q-.35.575-.975.8t-1.25-.05l-1.5-.65q-.275.2-.575.375t-.6.3l-.225 1.65q-.1.65-.587 1.1t-1.163.45zM11 20h1.975l.35-2.65q.775-.2 1.438-.587t1.212-.938l2.475 1.025l.975-1.7l-2.15-1.625q.125-.35.175-.737T17.5 12t-.05-.787t-.175-.738l2.15-1.625l-.975-1.7l-2.475 1.05q-.55-.575-1.212-.962t-1.438-.588L13 4h-1.975l-.35 2.65q-.775.2-1.437.588t-1.213.937L5.55 7.15l-.975 1.7l2.15 1.6q-.125.375-.175.75t-.05.8q0 .4.05.775t.175.75l-2.15 1.625l.975 1.7l2.475-1.05q.55.575 1.213.963t1.437.587zm1.05-4.5q1.45 0 2.475-1.025T15.55 12t-1.025-2.475T12.05 8.5q-1.475 0-2.487 1.025T8.55 12t1.013 2.475T12.05 15.5M12 12"})})}var w=e({open:!1,setOpen:()=>{}});function C({children:e,className:t,open:r,defaultOpen:a=!1,onOpenChange:n}){const[o,c]=s(a),p=void 0!==r?r:o,u=d(e=>{c(e),n?.(e)},[n]),f=l(()=>({open:p,setOpen:u}),[p,u]);/* @__PURE__ */
|
|
5
5
|
return i(w.Provider,{value:f,children:/* @__PURE__ */i("div",{className:m("relative",t),children:e})})}function T({children:e,className:a,asChild:n=!1}){const{open:o,setOpen:s}=c(w),l=d(e=>{e.stopPropagation(),s(!o)},[o,s]);if(n){const n=r(e)[0];return n?t(n,{onClick:e=>{l(e),n.props?.onClick?.(e)},className:m(n.props?.className,a,"cursor-pointer")}):null}/* @__PURE__ */
|
|
6
6
|
return i("span",{onClick:l,className:m("cursor-pointer",a),children:e})}function k({children:e,className:t,align:r="end",side:a="bottom",sideOffset:s=4}){const{open:l,setOpen:d}=c(w),f=o(null),{organization:h}=u();if(n(()=>{if(!l)return;const e=e=>{f.current&&!f.current.contains(e.target)&&d(!1)},t=e=>{"Escape"===e.key&&d(!1)};return document.addEventListener("click",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("click",e),document.removeEventListener("keydown",t)}},[l,d]),!l)return null;const b="start"===r?"left-0":"end"===r?"right-0":"left-1/2 -translate-x-1/2",v="bottom"===a?{top:`calc(100% + ${s}px)`}:{bottom:`calc(100% + ${s}px)`};/* @__PURE__ */
|
|
7
|
-
return i("div",{ref:f,style:{...p(h),...v},className:m("bg-popover text-popover-foreground border-border z-50 min-w-32 rounded border p-1 shadow-md","animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",b,t),"data-side":a,children:e})}function z({children:e,className:n,href:o,onClick:s,onSelect:l,disabled:p,icon:u,title:f,variant:b="default",isChecked:g,isBeta:x,suffix:N,asChild:q}){const{setOpen:y}=c(w),C=m("hover:bg-primary/20 relative flex w-full cursor-pointer items-center gap-3 rounded px-3 py-2 text-left text-sm transition-colors outline-none select-none",p&&"pointer-events-none opacity-50","destructive"===b&&"text-destructive hover:bg-destructive/10 focus:bg-destructive/10",n),T=e??/* @__PURE__ */i(a,{children:[u,
|
|
7
|
+
return i("div",{ref:f,style:{...p(h),...v},className:m("bg-popover text-popover-foreground border-border absolute z-50 min-w-32 rounded border p-1 shadow-md","animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",b,t),"data-side":a,children:e})}function z({children:e,className:n,href:o,onClick:s,onSelect:l,disabled:p,icon:u,title:f,variant:b="default",isChecked:g,isBeta:x,suffix:N,asChild:q}){const{setOpen:y}=c(w),C=m("hover:bg-primary/20 relative flex w-full cursor-pointer items-center gap-3 rounded px-3 py-2 text-left text-sm transition-colors outline-none select-none",p&&"pointer-events-none opacity-50","destructive"===b&&"text-destructive hover:bg-destructive/10 focus:bg-destructive/10",n),T=e??/* @__PURE__ */i(a,{children:[u,
|
|
8
8
|
/* @__PURE__ */i("span",{className:"flex-1 truncate font-medium",children:f}),g&&/* @__PURE__ */i(v,{className:"text-primary size-5"}),x&&/* @__PURE__ */i("span",{className:"bg-primary text-primary-foreground rounded px-1.5 py-0.5 text-[10px]",children:"BETA"}),N&&/* @__PURE__ */i("span",{children:N})]}),k=d(e=>{p||(l?.(e),s?.(),y(!1))},[p,l,s,y]);if(q&&e){const a=r(e)[0];return a?t(a,{onClick:e=>{k(e),a.props?.onClick?.(e)},className:m(a.props?.className,C)}):null}return o?/* @__PURE__ */i(h,{to:o,onClick:k,className:C,children:T}):/* @__PURE__ */i("button",{onClick:k,className:C,disabled:p,type:"button",children:T})}function O({className:e}){/* @__PURE__ */
|
|
9
9
|
return i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */i("path",{fill:"currentColor",d:"M9.5 16q-2.725 0-4.612-1.888T3 9.5t1.888-4.612T9.5 3t4.613 1.888T16 9.5q0 1.1-.35 2.075T14.7 13.3l5.6 5.6q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-5.6-5.6q-.75.6-1.725.95T9.5 16m0-2q1.875 0 3.188-1.312T14 9.5t-1.312-3.187T9.5 5T6.313 6.313T5 9.5t1.313 3.188T9.5 14"})})}function M({className:e}){/* @__PURE__ */
|
|
10
10
|
return i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:[/* @__PURE__ */i("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"}),/* @__PURE__ */i("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:/* @__PURE__ */i("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}export{z as a,q as c,k as i,N as l,O as n,T as o,C as r,y as s,M as t,x as u};
|
package/element/web.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as r,b as t,d as a,f as e,h as o,p as i,s as n,t as s,v as c,w as l,x as d}from"./qbHuxVSe.js";import{D as p,I as g,N as h,P as v,m,n as b,s as u,t as w,u as f,x as y,y as x}from"./WtQ5axEj.js";import{t as k}from"./O530RtWA.js";import{a as _,c as T,o as z,r as C,s as N,t as q,u as R}from"./lVJD5cJY.js";import{t as M}from"./fwDYCLiL.js";import{t as j}from"./BekfKWcG.js";import{a as E,c as S,i as I,l as L,n as A,o as O,r as Z,s as U,t as F,u as V}from"./
|
|
1
|
+
import{T as r,b as t,d as a,f as e,h as o,p as i,s as n,t as s,v as c,w as l,x as d}from"./qbHuxVSe.js";import{D as p,I as g,N as h,P as v,m,n as b,s as u,t as w,u as f,x as y,y as x}from"./WtQ5axEj.js";import{t as k}from"./O530RtWA.js";import{a as _,c as T,o as z,r as C,s as N,t as q,u as R}from"./lVJD5cJY.js";import{t as M}from"./fwDYCLiL.js";import{t as j}from"./BekfKWcG.js";import{a as E,c as S,i as I,l as L,n as A,o as O,r as Z,s as U,t as F,u as V}from"./DQ4anWD-.js";import{t as D}from"./B2KTsK_w.js";import{n as B,t as P}from"./DYUfJm8F.js";import{t as G}from"./DPmrTFJt.js";import{t as Y}from"./C9HFLidt.js";import{n as $,r as H,t as Q}from"./qJYsRQFB.js";import{t as K}from"./CYQ06kUR.js";var X=class extends d{state={hasError:!1,error:null};static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r){this.props.onError?.(r);try{const t=this.base;(t instanceof Element?t:t?.parentElement||null)?.dispatchEvent(new CustomEvent("qrati-error",{detail:{error:r},bubbles:!0,composed:!0}))}catch{}}render(){return this.state.hasError?this.props.fallback??null:this.props.children}},W=()=>{const r=T(),{props:a,sessionId:o}=b(),i=a?.organizationId,n=e([]),s=e(null),l=e(null),d=e(!1),p=e(!0),g=async r=>{if(o&&r.length)try{await h.post(f.UPDATE_SESSION,{headers:{"x-org-id":i},json:{sessionId:o,pageViews:r}})}catch(t){console.error("Failed to send page views:",t)}},v=c(()=>{if(d.current)return null;d.current=!0;const r=Date.now();if(s.current&&l.current){if(r-l.current<100)return d.current=!1,null;const t={page:s.current,entryTime:l.current,exitTime:r},a=[...n.current,t];return a.length>=5?(g(a),n.current=[]):n.current=a,d.current=!1,t}return d.current=!1,null},[]),m=c(r=>{s.current!==r&&(v(),s.current=r,l.current=Date.now())},[v]);return t(()=>{if(p.current)return p.current=!1,s.current=r.pathname,void(l.current=Date.now());const t=document.getElementById("qrati-connect-container");t&&t.scrollIntoView({behavior:"smooth",block:"start"}),m(r.pathname)},[r.pathname,m]),t(()=>{const r=()=>{const r=v();if(r){const a=[...n.current,r];if(a.length>0)try{try{const r={"Content-Type":"application/json"};i&&(r["x-org-id"]=i),fetch(f.UPDATE_SESSION,{method:"POST",headers:r,body:JSON.stringify({sessionId:o,pageViews:a}),keepalive:!0})}catch(t){console.error("Failed to send final page views with fetch keepalive:",t),g(a)}}catch(t){console.error("Failed to send final page views:",t),g(a)}}};return window.addEventListener("beforeunload",r),()=>{window.removeEventListener("beforeunload",r);const t=v(),a=t?[...n.current,t]:n.current;a.length>0&&g(a)}},[v,o]),null},J=(r=[],t)=>{const a=/* @__PURE__ */new Map;r?.forEach(r=>{a.set(r._id,r)});const e=[];let o=a.get(t);for(;o;)e.unshift({_id:o._id,name:o.name,href:p.FOLDER_EVENTS(o?._id),color:o.color}),o=a.get(o.parentFolderId);return e},rr=()=>/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-full",width:"885.86993",height:"622.8043",viewBox:"0 0 885.86993 622.8043",role:"img",children:[
|
|
2
2
|
/* @__PURE__ */s("title",{children:"through_the_park"}),
|
|
3
3
|
/* @__PURE__ */s("polygon",{points:"461.601 348.37 400.416 348.37 400.416 350.344 409.958 350.344 409.958 369.094 411.932 369.094 411.932 350.344 449.098 350.344 449.098 369.094 451.072 369.094 451.072 350.344 461.601 350.344 461.601 348.37",fill:"#3f3d56"}),
|
|
4
4
|
/* @__PURE__ */s("polygon",{points:"484.299 300.014 468.509 300.014 468.509 315.803 475.829 315.803 475.829 369.007 477.803 369.007 477.803 315.803 484.299 315.803 484.299 300.014",fill:"#3f3d56"}),
|
|
@@ -107,10 +107,10 @@ return s("div",{className:"space-y-4",children:[r===b[0]&&/* @__PURE__ */s(j,{va
|
|
|
107
107
|
/* @__PURE__ */s("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-3",children:Array.from({length:6}).map((r,t)=>/* @__PURE__ */s("div",{className:"space-y-4",children:[/* @__PURE__ */s(M,{className:"h-72 overflow-hidden rounded sm:h-80"}),/* @__PURE__ */s(M,{className:"h-6 w-64 rounded"})]},t))})]})]}:{children:[g?.navigationSettings?.enableNavbar&&/* @__PURE__ */s(B,{}),
|
|
108
108
|
/* @__PURE__ */s("div",{className:"min-h-screen w-full",children:[
|
|
109
109
|
/* @__PURE__ */s("div",{className:"flex items-end justify-between",children:[/* @__PURE__ */s("div",{className:"mt-4 flex justify-end",children:y&&/* @__PURE__ */s(V,{className:"flex-1 lg:flex-none",selected:x,buttons:yr,onChange:r=>(r=>{k(r);try{m&&sessionStorage.setItem(`qrati-view-mode-${m}`,r)}catch(t){}})(r)})}),/* @__PURE__ */s("div",{className:"flex flex-col items-end gap-4",children:[/* @__PURE__ */s(dr,{organization:g}),u&&/* @__PURE__ */s(gr,{onSearch:w.handleSearch,onClear:w.clearSearch,hasActiveSearch:w.isSearchActive})]})]}),w.isSearchActive&&/* @__PURE__ */s(ur,{folders:d||[],submittedQuery:w.submittedQuery,submittedSearchType:w.submittedSearchType,isLoading:w.isLoading,errorMessage:w.errorMessage,hasMore:w.hasMore,isSearchActive:w.isSearchActive,page:w.page,onLoadMore:()=>w.setPage(r=>r+1),eventResults:w.eventResults,contentResults:w.contentResults,contentMeta:w.contentMeta,activeFolderKeys:w.activeFolderKeys,eventGroupsByFolder:w.eventGroupsByFolder,contentGroups:w.contentGroups,contentGroupsByFolder:w.contentGroupsByFolder,flattenedContentMedia:w.flattenedContentMedia,galleryElementRef:w.galleryElementRef,galleryId:w.galleryId,openMediaInLightbox:w.openMediaInLightbox}),!w.isSearchActive&&/* @__PURE__ */s(r,{children:["grid"===x&&a&&/* @__PURE__ */s("div",{className:"mt-4",children:/* @__PURE__ */s(nr,{homeLink:p.PUBLIC_EVENTS,data:j})}),"grid"===x&&N.length>0&&/* @__PURE__ */s("div",{className:"mt-4 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-4 lg:gap-6",children:N.map(r=>/* @__PURE__ */s(q,{to:p.FOLDER_EVENTS(String(r?._id)),children:/* @__PURE__ */s(sr,{folder:r},String(r._id))},String(r?._id)))}),"map"!==x&&(S?.length??0)<=0&&/* @__PURE__ */s("div",{className:"min-h-[80vh]",children:/* @__PURE__ */s(D,{title:((d??[]).length??0)>0?"Empty Folder":"No Events",description:((d??[]).length??0)>0?"Browse other folders for events":"Check back later for our awesome events!",className:"mt-24 md:mt-36",iconSvg:/* @__PURE__ */s(rr,{})})}),"map"===x&&y?/* @__PURE__ */s(n,{fallback:/* @__PURE__ */s(M,{className:"mt-4 h-[70vh] w-full rounded-lg"}),children:/* @__PURE__ */s(wr,{events:_??[],isLoading:T})}):(S?.length??0)>0&&/* @__PURE__ */s("div",{className:"mt-4 grid grid-cols-1 gap-4 gap-y-6 pb-16 sm:grid-cols-2 lg:grid-cols-3",children:(S??[]).map(r=>/* @__PURE__ */s(q,{to:p.GALLERY(String(r.slug)),children:/* @__PURE__ */s(ar,{event:r})},r._id))})]})]}),
|
|
110
|
-
/* @__PURE__ */s(P,{})]})},kr=a(()=>import("./x2Vs8ihf.js")),_r=a(()=>import("./Be-K0dao.js")),Tr=a(()=>import("./
|
|
110
|
+
/* @__PURE__ */s(P,{})]})},kr=a(()=>import("./x2Vs8ihf.js")),_r=a(()=>import("./Be-K0dao.js")),Tr=a(()=>import("./CUJvLwvo2.js")),zr=a(()=>import("./8nf23RYF2.js")),Cr=a(()=>import("./BnWKlftk2.js")),Nr=a(()=>import("./CU_-C7Pt2.js")),qr=a(()=>import("./BqPEscWs2.js")),Rr=a(()=>import("./BiO2AH5s2.js")),Mr=a(()=>import("./CdHR1K3m2.js")),jr=a(()=>import("./htkJ94ea2.js")),Er=()=>/* @__PURE__ */s("div",{className:"flex flex-col gap-4 p-4",children:[
|
|
111
111
|
/* @__PURE__ */s(M,{className:"h-8 w-3/4 rounded"}),
|
|
112
112
|
/* @__PURE__ */s(M,{className:"h-64 w-full rounded-lg"}),
|
|
113
|
-
/* @__PURE__ */s("div",{className:"flex gap-3",children:[/* @__PURE__ */s(M,{className:"h-10 w-24 rounded"}),/* @__PURE__ */s(M,{className:"h-10 w-24 rounded"})]})]}),Sr=({router:r="memory"})=>{const a="hash"===r.toLowerCase()?"hash":"memory";return t(()=>{const r=()=>{import("./
|
|
113
|
+
/* @__PURE__ */s("div",{className:"flex gap-3",children:[/* @__PURE__ */s(M,{className:"h-10 w-24 rounded"}),/* @__PURE__ */s(M,{className:"h-10 w-24 rounded"})]})]}),Sr=({router:r="memory"})=>{const a="hash"===r.toLowerCase()?"hash":"memory";return t(()=>{const r=()=>{import("./CUJvLwvo2.js"),import("./8nf23RYF2.js"),import("./CdHR1K3m2.js"),import("./CU_-C7Pt2.js")};if("undefined"!=typeof requestIdleCallback){const t=requestIdleCallback(r,{timeout:5e3});return()=>cancelIdleCallback(t)}const t=setTimeout(r,2e3);return()=>clearTimeout(t)},[]),/* @__PURE__ */s(z,{mode:a,children:[/* @__PURE__ */s(W,{}),/* @__PURE__ */s(n,{fallback:/* @__PURE__ */s(Er,{}),children:/* @__PURE__ */s(N,{children:[
|
|
114
114
|
/* @__PURE__ */s(_,{path:"/my-uploads",element:jr}),
|
|
115
115
|
/* @__PURE__ */s(_,{path:"/:folderId?",element:xr}),
|
|
116
116
|
/* @__PURE__ */s(_,{path:"/event/:eventSlug",element:_r,children:[
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as e,b as t,d as n,f as r,h as a,p as i,s,t as o,v as l}from"./qbHuxVSe.js";import{C as c,D as d,L as u,M as m,N as g,O as h,P as p,S as f,_ as v,b as w,d as T,f as y,g as N,h as q,i as x,j as b,m as E,n as C,p as S,u as I,v as L,x as z,y as k}from"./WtQ5axEj.js";import{n as A,r as M,t as _}from"./9VAO1NmP.js";import{t as P,u as R}from"./lVJD5cJY.js";import{t as V}from"./fwDYCLiL.js";import{n as O,t as j}from"./BekfKWcG.js";import{a as F,c as B,i as H,l as U,n as G,o as $,r as D,s as W,t as Q,u as K}from"./
|
|
1
|
+
import{T as e,b as t,d as n,f as r,h as a,p as i,s,t as o,v as l}from"./qbHuxVSe.js";import{C as c,D as d,L as u,M as m,N as g,O as h,P as p,S as f,_ as v,b as w,d as T,f as y,g as N,h as q,i as x,j as b,m as E,n as C,p as S,u as I,v as L,x as z,y as k}from"./WtQ5axEj.js";import{n as A,r as M,t as _}from"./9VAO1NmP.js";import{t as P,u as R}from"./lVJD5cJY.js";import{t as V}from"./fwDYCLiL.js";import{n as O,t as j}from"./BekfKWcG.js";import{a as F,c as B,i as H,l as U,n as G,o as $,r as D,s as W,t as Q,u as K}from"./DQ4anWD-.js";import{t as Z}from"./B2KTsK_w.js";import{r as Y}from"./DWbLshVZ.js";import{n as J,t as X}from"./2SYk3iBo.js";import{t as ee}from"./C9HFLidt.js";import{t as te}from"./C0vZ8zxT.js";import{t as ne}from"./CJpmOICA.js";import{a as re,i as ae,n as ie,o as se,r as oe,s as le,t as ce}from"./we0Hcb5C.js";import{n as de,r as ue,t as me}from"./D8Se70tP2.js";import{n as ge,t as he}from"./C6SiAA6Z2.js";function pe({className:e}){/* @__PURE__ */
|
|
2
2
|
return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */o("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zm0 0V5zm2-2h10q.3 0 .45-.275t-.05-.525l-2.75-3.675q-.15-.2-.4-.2t-.4.2L11.25 16L9.4 13.525q-.15-.2-.4-.2t-.4.2l-2 2.675q-.2.25-.05.525T7 17"})})}function fe({className:e}){/* @__PURE__ */
|
|
3
3
|
return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */o("path",{fill:"currentColor",d:"M15.188 14.688Q16.5 13.375 16.5 11.5t-1.312-3.187T12 7T8.813 8.313T7.5 11.5t1.313 3.188T12 16t3.188-1.312m-5.1-1.276Q9.3 12.625 9.3 11.5t.788-1.912T12 8.8t1.913.788t.787 1.912t-.787 1.913T12 14.2t-1.912-.787m-4.2 3.787q-2.763-1.8-4.363-4.75q-.125-.225-.187-.462t-.063-.488t.063-.488t.187-.462q1.6-2.95 4.363-4.75T12 4t6.113 1.8t4.362 4.75q.125.225.188.463t.062.487t-.062.488t-.188.462q-1.6 2.95-4.362 4.75T12 19t-6.113-1.8m11.3-1.687Q19.55 14.025 20.8 11.5q-1.25-2.525-3.613-4.012T12 6T6.813 7.488T3.2 11.5q1.25 2.525 3.613 4.013T12 17t5.188-1.487"})})}var ve=({description:e,maxLines:n=2,className:i})=>{const[s,l]=a(!1),[c,d]=a(!1),u=r(null),m=r(null);return t(()=>{l(!1)},[e]),t(()=>{if(!u.current||!e)return void d(!1);const t=u.current,r=()=>{const e=window.getComputedStyle(t),a=Math.max(0,Math.floor(t.getBoundingClientRect().width));if(!a)return void(m.current=window.requestAnimationFrame(r));const i=e.lineHeight,s=parseFloat(e.fontSize)||16;let o=1.2*s;i&&"normal"!==i&&(o=i.endsWith("px")?parseFloat(i):parseFloat(i)*s);const l=document.createElement("div");l.style.position="absolute",l.style.visibility="hidden",l.style.pointerEvents="none",l.style.whiteSpace="normal",l.style.width=`${a}px`,l.style.boxSizing=e.boxSizing,l.style.padding=e.padding,l.style.margin=e.margin,l.style.fontSize=e.fontSize,l.style.fontFamily=e.fontFamily,l.style.fontWeight=e.fontWeight,l.style.lineHeight=e.lineHeight,l.style.letterSpacing=e.letterSpacing,l.style.wordBreak="break-word",l.innerText=t.innerText||"",document.body.appendChild(l);const c=l.scrollHeight;document.body.removeChild(l),d(c>o*n+1)},a=()=>{null!==m.current&&window.cancelAnimationFrame(m.current),m.current=window.requestAnimationFrame(r)};let i;a(),window.addEventListener("resize",a);try{i=new MutationObserver(a),i.observe(t,{characterData:!0,childList:!0,subtree:!0})}catch{}return()=>{window.removeEventListener("resize",a),null!==m.current&&window.cancelAnimationFrame(m.current),i?.disconnect()}},[e,n]),e?/* @__PURE__ */o("div",{className:x("relative w-full",i),children:[/* @__PURE__ */o("p",{ref:u,className:x(O({variant:"body2",color:"muted",align:"center"}),"w-full",s?void 0:`line-clamp-${n}`),children:[e,c&&s&&/* @__PURE__ */o("button",{type:"button",onClick:()=>l(!1),className:"text-primary ml-2 text-sm font-medium hover:underline cursor-pointer",children:"see less"})]}),c&&!s&&/* @__PURE__ */o("span",{className:"bg-background absolute right-0 bottom-0 inline-flex items-center pl-2",children:[/* @__PURE__ */o("span",{className:"text-muted-foreground",children:"..."}),/* @__PURE__ */o("button",{type:"button",onClick:()=>l(!0),className:"text-primary ml-1 text-sm font-medium hover:underline cursor-pointer",children:"see more"})]})]}):null},we=()=>{const{t:e}=Y(),{eventSlug:t}=R(),{event:n}=te({eventSlug:t}),{props:r,organization:a}=C(),{curateLabel:i,leaderboardLabel:s}=r??{},{eventViews:l,contentCount:c,curationCount:u}=(({event:e})=>{const{props:t,organization:n}=C(),r=t?.organizationId,{isLoading:a,data:i}=p({queryKey:["event-stats",r??"",e?._id??""],queryFn:async()=>{try{return(await g.get(I.GET_EVENT_STATISTICS,{searchParams:{eventSlug:e?.slug},headers:{"x-org-id":r}}).json()).data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch event stats")}},enabled:!!e&&Boolean(n?.integrationSettings?.showEventStats)});return{isLoading:a,eventViews:"number"==typeof i?.eventViews?i.eventViews:i?.eventViews?.views??0,contentCount:i?.contentCount||0,curationCount:i?.curationCount||0}})({event:n});/* @__PURE__ */
|
|
4
4
|
return o("div",{className:"w-full space-y-3",children:[
|
|
@@ -4,7 +4,7 @@ return i("div",{className:m("relative inline-block",a),onMouseEnter:()=>l(!0),on
|
|
|
4
4
|
return i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */i("path",{fill:"currentColor",d:"M10.825 22q-.675 0-1.162-.45t-.588-1.1L8.85 18.8q-.325-.125-.612-.3t-.563-.375l-1.55.65q-.625.275-1.25.05t-.975-.8l-1.175-2.05q-.35-.575-.2-1.225t.675-1.075l1.325-1Q4.5 12.5 4.5 12.337v-.675q0-.162.025-.337l-1.325-1Q2.675 9.9 2.525 9.25t.2-1.225L3.9 5.975q.35-.575.975-.8t1.25.05l1.55.65q.275-.2.575-.375t.6-.3l.225-1.65q.1-.65.588-1.1T10.825 2h2.35q.675 0 1.163.45t.587 1.1l.225 1.65q.325.125.613.3t.562.375l1.55-.65q.625-.275 1.25-.05t.975.8l1.175 2.05q.35.575.2 1.225t-.675 1.075l-1.325 1q.025.175.025.338v.674q0 .163-.05.338l1.325 1q.525.425.675 1.075t-.2 1.225l-1.2 2.05q-.35.575-.975.8t-1.25-.05l-1.5-.65q-.275.2-.575.375t-.6.3l-.225 1.65q-.1.65-.587 1.1t-1.163.45zM11 20h1.975l.35-2.65q.775-.2 1.438-.587t1.212-.938l2.475 1.025l.975-1.7l-2.15-1.625q.125-.35.175-.737T17.5 12t-.05-.787t-.175-.738l2.15-1.625l-.975-1.7l-2.475 1.05q-.55-.575-1.212-.962t-1.438-.588L13 4h-1.975l-.35 2.65q-.775.2-1.437.588t-1.213.937L5.55 7.15l-.975 1.7l2.15 1.6q-.125.375-.175.75t-.05.8q0 .4.05.775t.175.75l-2.15 1.625l.975 1.7l2.475-1.05q.55.575 1.213.963t1.437.587zm1.05-4.5q1.45 0 2.475-1.025T15.55 12t-1.025-2.475T12.05 8.5q-1.475 0-2.487 1.025T8.55 12t1.013 2.475T12.05 15.5M12 12"})})}var w=e({open:!1,setOpen:()=>{}});function C({children:e,className:t,open:r,defaultOpen:a=!1,onOpenChange:n}){const[o,c]=s(a),p=void 0!==r?r:o,u=d(e=>{c(e),n?.(e)},[n]),f=l(()=>({open:p,setOpen:u}),[p,u]);/* @__PURE__ */
|
|
5
5
|
return i(w.Provider,{value:f,children:/* @__PURE__ */i("div",{className:m("relative",t),children:e})})}function T({children:e,className:a,asChild:n=!1}){const{open:o,setOpen:s}=c(w),l=d(e=>{e.stopPropagation(),s(!o)},[o,s]);if(n){const n=r(e)[0];return n?t(n,{onClick:e=>{l(e),n.props?.onClick?.(e)},className:m(n.props?.className,a,"cursor-pointer")}):null}/* @__PURE__ */
|
|
6
6
|
return i("span",{onClick:l,className:m("cursor-pointer",a),children:e})}function k({children:e,className:t,align:r="end",side:a="bottom",sideOffset:s=4}){const{open:l,setOpen:d}=c(w),f=o(null),{organization:h}=u();if(n(()=>{if(!l)return;const e=e=>{f.current&&!f.current.contains(e.target)&&d(!1)},t=e=>{"Escape"===e.key&&d(!1)};return document.addEventListener("click",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("click",e),document.removeEventListener("keydown",t)}},[l,d]),!l)return null;const b="start"===r?"left-0":"end"===r?"right-0":"left-1/2 -translate-x-1/2",v="bottom"===a?{top:`calc(100% + ${s}px)`}:{bottom:`calc(100% + ${s}px)`};/* @__PURE__ */
|
|
7
|
-
return i("div",{ref:f,style:{...p(h),...v},className:m("bg-popover text-popover-foreground border-border z-50 min-w-32 rounded border p-1 shadow-md","animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",b,t),"data-side":a,children:e})}function z({children:e,className:n,href:o,onClick:s,onSelect:l,disabled:p,icon:u,title:f,variant:b="default",isChecked:g,isBeta:x,suffix:N,asChild:q}){const{setOpen:y}=c(w),C=m("hover:bg-primary/20 relative flex w-full cursor-pointer items-center gap-3 rounded px-3 py-2 text-left text-sm transition-colors outline-none select-none",p&&"pointer-events-none opacity-50","destructive"===b&&"text-destructive hover:bg-destructive/10 focus:bg-destructive/10",n),T=e??/* @__PURE__ */i(a,{children:[u,
|
|
7
|
+
return i("div",{ref:f,style:{...p(h),...v},className:m("bg-popover text-popover-foreground border-border absolute z-50 min-w-32 rounded border p-1 shadow-md","animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",b,t),"data-side":a,children:e})}function z({children:e,className:n,href:o,onClick:s,onSelect:l,disabled:p,icon:u,title:f,variant:b="default",isChecked:g,isBeta:x,suffix:N,asChild:q}){const{setOpen:y}=c(w),C=m("hover:bg-primary/20 relative flex w-full cursor-pointer items-center gap-3 rounded px-3 py-2 text-left text-sm transition-colors outline-none select-none",p&&"pointer-events-none opacity-50","destructive"===b&&"text-destructive hover:bg-destructive/10 focus:bg-destructive/10",n),T=e??/* @__PURE__ */i(a,{children:[u,
|
|
8
8
|
/* @__PURE__ */i("span",{className:"flex-1 truncate font-medium",children:f}),g&&/* @__PURE__ */i(v,{className:"text-primary size-5"}),x&&/* @__PURE__ */i("span",{className:"bg-primary text-primary-foreground rounded px-1.5 py-0.5 text-[10px]",children:"BETA"}),N&&/* @__PURE__ */i("span",{children:N})]}),k=d(e=>{p||(l?.(e),s?.(),y(!1))},[p,l,s,y]);if(q&&e){const a=r(e)[0];return a?t(a,{onClick:e=>{k(e),a.props?.onClick?.(e)},className:m(a.props?.className,C)}):null}return o?/* @__PURE__ */i(h,{to:o,onClick:k,className:C,children:T}):/* @__PURE__ */i("button",{onClick:k,className:C,disabled:p,type:"button",children:T})}function O({className:e}){/* @__PURE__ */
|
|
9
9
|
return i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */i("path",{fill:"currentColor",d:"M9.5 16q-2.725 0-4.612-1.888T3 9.5t1.888-4.612T9.5 3t4.613 1.888T16 9.5q0 1.1-.35 2.075T14.7 13.3l5.6 5.6q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-5.6-5.6q-.75.6-1.725.95T9.5 16m0-2q1.875 0 3.188-1.312T14 9.5t-1.312-3.187T9.5 5T6.313 6.313T5 9.5t1.313 3.188T9.5 14"})})}function M({className:e}){/* @__PURE__ */
|
|
10
10
|
return i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:[/* @__PURE__ */i("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"}),/* @__PURE__ */i("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:/* @__PURE__ */i("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}export{z as a,q as c,k as i,N as l,O as n,T as o,C as r,y as s,M as t,x as u};
|
package/umd/web.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as r,b as t,d as a,f as e,h as o,p as i,s as n,t as s,v as c,w as l,x as d}from"./qbHuxVSe.js";import{D as p,I as g,N as h,P as v,m,n as b,s as u,t as w,u as f,x as y,y as x}from"./WtQ5axEj.js";import{t as k}from"./O530RtWA.js";import{a as _,c as T,o as z,r as C,s as N,t as q,u as R}from"./lVJD5cJY.js";import{t as M}from"./fwDYCLiL.js";import{t as j}from"./BekfKWcG.js";import{a as E,c as S,i as I,l as L,n as A,o as O,r as Z,s as U,t as F,u as V}from"./
|
|
1
|
+
import{T as r,b as t,d as a,f as e,h as o,p as i,s as n,t as s,v as c,w as l,x as d}from"./qbHuxVSe.js";import{D as p,I as g,N as h,P as v,m,n as b,s as u,t as w,u as f,x as y,y as x}from"./WtQ5axEj.js";import{t as k}from"./O530RtWA.js";import{a as _,c as T,o as z,r as C,s as N,t as q,u as R}from"./lVJD5cJY.js";import{t as M}from"./fwDYCLiL.js";import{t as j}from"./BekfKWcG.js";import{a as E,c as S,i as I,l as L,n as A,o as O,r as Z,s as U,t as F,u as V}from"./DQ4anWD-.js";import{t as D}from"./B2KTsK_w.js";import{n as B,t as P}from"./DYUfJm8F.js";import{t as G}from"./DPmrTFJt.js";import{t as Y}from"./C9HFLidt.js";import{n as $,r as H,t as Q}from"./qJYsRQFB.js";import{t as K}from"./CYQ06kUR.js";var X=class extends d{state={hasError:!1,error:null};static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r){this.props.onError?.(r);try{const t=this.base;(t instanceof Element?t:t?.parentElement||null)?.dispatchEvent(new CustomEvent("qrati-error",{detail:{error:r},bubbles:!0,composed:!0}))}catch{}}render(){return this.state.hasError?this.props.fallback??null:this.props.children}},W=()=>{const r=T(),{props:a,sessionId:o}=b(),i=a?.organizationId,n=e([]),s=e(null),l=e(null),d=e(!1),p=e(!0),g=async r=>{if(o&&r.length)try{await h.post(f.UPDATE_SESSION,{headers:{"x-org-id":i},json:{sessionId:o,pageViews:r}})}catch(t){console.error("Failed to send page views:",t)}},v=c(()=>{if(d.current)return null;d.current=!0;const r=Date.now();if(s.current&&l.current){if(r-l.current<100)return d.current=!1,null;const t={page:s.current,entryTime:l.current,exitTime:r},a=[...n.current,t];return a.length>=5?(g(a),n.current=[]):n.current=a,d.current=!1,t}return d.current=!1,null},[]),m=c(r=>{s.current!==r&&(v(),s.current=r,l.current=Date.now())},[v]);return t(()=>{if(p.current)return p.current=!1,s.current=r.pathname,void(l.current=Date.now());const t=document.getElementById("qrati-connect-container");t&&t.scrollIntoView({behavior:"smooth",block:"start"}),m(r.pathname)},[r.pathname,m]),t(()=>{const r=()=>{const r=v();if(r){const a=[...n.current,r];if(a.length>0)try{try{const r={"Content-Type":"application/json"};i&&(r["x-org-id"]=i),fetch(f.UPDATE_SESSION,{method:"POST",headers:r,body:JSON.stringify({sessionId:o,pageViews:a}),keepalive:!0})}catch(t){console.error("Failed to send final page views with fetch keepalive:",t),g(a)}}catch(t){console.error("Failed to send final page views:",t),g(a)}}};return window.addEventListener("beforeunload",r),()=>{window.removeEventListener("beforeunload",r);const t=v(),a=t?[...n.current,t]:n.current;a.length>0&&g(a)}},[v,o]),null},J=(r=[],t)=>{const a=/* @__PURE__ */new Map;r?.forEach(r=>{a.set(r._id,r)});const e=[];let o=a.get(t);for(;o;)e.unshift({_id:o._id,name:o.name,href:p.FOLDER_EVENTS(o?._id),color:o.color}),o=a.get(o.parentFolderId);return e},rr=()=>/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-full",width:"885.86993",height:"622.8043",viewBox:"0 0 885.86993 622.8043",role:"img",children:[
|
|
2
2
|
/* @__PURE__ */s("title",{children:"through_the_park"}),
|
|
3
3
|
/* @__PURE__ */s("polygon",{points:"461.601 348.37 400.416 348.37 400.416 350.344 409.958 350.344 409.958 369.094 411.932 369.094 411.932 350.344 449.098 350.344 449.098 369.094 451.072 369.094 451.072 350.344 461.601 350.344 461.601 348.37",fill:"#3f3d56"}),
|
|
4
4
|
/* @__PURE__ */s("polygon",{points:"484.299 300.014 468.509 300.014 468.509 315.803 475.829 315.803 475.829 369.007 477.803 369.007 477.803 315.803 484.299 315.803 484.299 300.014",fill:"#3f3d56"}),
|
|
@@ -107,10 +107,10 @@ return s("div",{className:"space-y-4",children:[r===b[0]&&/* @__PURE__ */s(j,{va
|
|
|
107
107
|
/* @__PURE__ */s("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-3",children:Array.from({length:6}).map((r,t)=>/* @__PURE__ */s("div",{className:"space-y-4",children:[/* @__PURE__ */s(M,{className:"h-72 overflow-hidden rounded sm:h-80"}),/* @__PURE__ */s(M,{className:"h-6 w-64 rounded"})]},t))})]})]}:{children:[g?.navigationSettings?.enableNavbar&&/* @__PURE__ */s(B,{}),
|
|
108
108
|
/* @__PURE__ */s("div",{className:"min-h-screen w-full",children:[
|
|
109
109
|
/* @__PURE__ */s("div",{className:"flex items-end justify-between",children:[/* @__PURE__ */s("div",{className:"mt-4 flex justify-end",children:y&&/* @__PURE__ */s(V,{className:"flex-1 lg:flex-none",selected:x,buttons:yr,onChange:r=>(r=>{k(r);try{m&&sessionStorage.setItem(`qrati-view-mode-${m}`,r)}catch(t){}})(r)})}),/* @__PURE__ */s("div",{className:"flex flex-col items-end gap-4",children:[/* @__PURE__ */s(dr,{organization:g}),u&&/* @__PURE__ */s(gr,{onSearch:w.handleSearch,onClear:w.clearSearch,hasActiveSearch:w.isSearchActive})]})]}),w.isSearchActive&&/* @__PURE__ */s(ur,{folders:d||[],submittedQuery:w.submittedQuery,submittedSearchType:w.submittedSearchType,isLoading:w.isLoading,errorMessage:w.errorMessage,hasMore:w.hasMore,isSearchActive:w.isSearchActive,page:w.page,onLoadMore:()=>w.setPage(r=>r+1),eventResults:w.eventResults,contentResults:w.contentResults,contentMeta:w.contentMeta,activeFolderKeys:w.activeFolderKeys,eventGroupsByFolder:w.eventGroupsByFolder,contentGroups:w.contentGroups,contentGroupsByFolder:w.contentGroupsByFolder,flattenedContentMedia:w.flattenedContentMedia,galleryElementRef:w.galleryElementRef,galleryId:w.galleryId,openMediaInLightbox:w.openMediaInLightbox}),!w.isSearchActive&&/* @__PURE__ */s(r,{children:["grid"===x&&a&&/* @__PURE__ */s("div",{className:"mt-4",children:/* @__PURE__ */s(nr,{homeLink:p.PUBLIC_EVENTS,data:j})}),"grid"===x&&N.length>0&&/* @__PURE__ */s("div",{className:"mt-4 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-4 lg:gap-6",children:N.map(r=>/* @__PURE__ */s(q,{to:p.FOLDER_EVENTS(String(r?._id)),children:/* @__PURE__ */s(sr,{folder:r},String(r._id))},String(r?._id)))}),"map"!==x&&(S?.length??0)<=0&&/* @__PURE__ */s("div",{className:"min-h-[80vh]",children:/* @__PURE__ */s(D,{title:((d??[]).length??0)>0?"Empty Folder":"No Events",description:((d??[]).length??0)>0?"Browse other folders for events":"Check back later for our awesome events!",className:"mt-24 md:mt-36",iconSvg:/* @__PURE__ */s(rr,{})})}),"map"===x&&y?/* @__PURE__ */s(n,{fallback:/* @__PURE__ */s(M,{className:"mt-4 h-[70vh] w-full rounded-lg"}),children:/* @__PURE__ */s(wr,{events:_??[],isLoading:T})}):(S?.length??0)>0&&/* @__PURE__ */s("div",{className:"mt-4 grid grid-cols-1 gap-4 gap-y-6 pb-16 sm:grid-cols-2 lg:grid-cols-3",children:(S??[]).map(r=>/* @__PURE__ */s(q,{to:p.GALLERY(String(r.slug)),children:/* @__PURE__ */s(ar,{event:r})},r._id))})]})]}),
|
|
110
|
-
/* @__PURE__ */s(P,{})]})},kr=a(()=>import("./x2Vs8ihf.js")),_r=a(()=>import("./Be-K0dao.js")),Tr=a(()=>import("./
|
|
110
|
+
/* @__PURE__ */s(P,{})]})},kr=a(()=>import("./x2Vs8ihf.js")),_r=a(()=>import("./Be-K0dao.js")),Tr=a(()=>import("./CUJvLwvo2.js")),zr=a(()=>import("./8nf23RYF2.js")),Cr=a(()=>import("./BnWKlftk2.js")),Nr=a(()=>import("./CU_-C7Pt2.js")),qr=a(()=>import("./BqPEscWs2.js")),Rr=a(()=>import("./BiO2AH5s2.js")),Mr=a(()=>import("./CdHR1K3m2.js")),jr=a(()=>import("./htkJ94ea2.js")),Er=()=>/* @__PURE__ */s("div",{className:"flex flex-col gap-4 p-4",children:[
|
|
111
111
|
/* @__PURE__ */s(M,{className:"h-8 w-3/4 rounded"}),
|
|
112
112
|
/* @__PURE__ */s(M,{className:"h-64 w-full rounded-lg"}),
|
|
113
|
-
/* @__PURE__ */s("div",{className:"flex gap-3",children:[/* @__PURE__ */s(M,{className:"h-10 w-24 rounded"}),/* @__PURE__ */s(M,{className:"h-10 w-24 rounded"})]})]}),Sr=({router:r="memory"})=>{const a="hash"===r.toLowerCase()?"hash":"memory";return t(()=>{const r=()=>{import("./
|
|
113
|
+
/* @__PURE__ */s("div",{className:"flex gap-3",children:[/* @__PURE__ */s(M,{className:"h-10 w-24 rounded"}),/* @__PURE__ */s(M,{className:"h-10 w-24 rounded"})]})]}),Sr=({router:r="memory"})=>{const a="hash"===r.toLowerCase()?"hash":"memory";return t(()=>{const r=()=>{import("./CUJvLwvo2.js"),import("./8nf23RYF2.js"),import("./CdHR1K3m2.js"),import("./CU_-C7Pt2.js")};if("undefined"!=typeof requestIdleCallback){const t=requestIdleCallback(r,{timeout:5e3});return()=>cancelIdleCallback(t)}const t=setTimeout(r,2e3);return()=>clearTimeout(t)},[]),/* @__PURE__ */s(z,{mode:a,children:[/* @__PURE__ */s(W,{}),/* @__PURE__ */s(n,{fallback:/* @__PURE__ */s(Er,{}),children:/* @__PURE__ */s(N,{children:[
|
|
114
114
|
/* @__PURE__ */s(_,{path:"/my-uploads",element:jr}),
|
|
115
115
|
/* @__PURE__ */s(_,{path:"/:folderId?",element:xr}),
|
|
116
116
|
/* @__PURE__ */s(_,{path:"/event/:eventSlug",element:_r,children:[
|