@qratilabs/qrati-connect 1.36.0 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/element/AuthLayout-DPLyVQpc.js +1 -0
- package/element/ContentsPage-CmduBM_h.js +16 -0
- package/element/CuratePage-DbgWxBv-.js +1 -0
- package/element/Dialog-DyjIzwNt.js +1 -0
- package/element/DotLottiePlayer-Bc8rBb-C.js +1 -0
- package/element/EventHeaderAdminButtons-BAA9hpIa.js +10 -0
- package/element/ForgotPasswordPage-BVA3Fsca.js +1 -0
- package/element/I3HPI4QX-Dju7V5ro.js +1206 -0
- package/element/{InputField-C49ocGir.js → InputField-moE6s2aT.js} +1 -1
- package/element/{LazyLoadImage-Czip9s-G.js → LazyLoadImage-C9xLmmSA.js} +1 -1
- package/element/LeaderboardPage-Dd57I-2q.js +1 -0
- package/element/LoginPage-BwaHx9tW.js +1 -0
- package/element/PublicEvents-dHjazVIz.js +1 -0
- package/element/RegisterPage-CqFmSp_U.js +1 -0
- package/element/{SocialLoginButton-CPSTSybv.js → SocialLoginButton-3-Pclw3r.js} +1 -1
- package/element/Tooltip-D861rD_i.js +1 -0
- package/element/UploadPage-D9mc__nL.js +1 -0
- package/element/VideoPlayer-D2qQXCtP.js +1 -0
- package/element/element.es.js +1 -1
- package/element/{heic2any-DhxH1PcD.js → heic2any-DAuAPR4E.js} +1 -1
- package/element/index-BTsfiOYs.js +1 -0
- package/element/index-BmmnxX0E.js +1739 -0
- package/element/index-DDBZtwq7.js +14 -0
- package/element/index-DltYiRmM.js +1 -0
- package/element/index.esm-CYooUD21.js +1 -0
- package/element/photoswipe-Dqr5VOVb.js +1 -0
- package/element/styles.css +1 -1
- package/element/web.es.js +1 -1
- package/package.json +30 -30
- package/react/3Yuen6PL.js +1 -0
- package/react/424Ipeio.js +1 -0
- package/react/B3-Qr1gf.js +1 -0
- package/react/BA81SDYw.js +1 -0
- package/react/BB7bqtAt.js +1 -0
- package/react/BOYjwqUL.js +1 -0
- package/react/Bn1e08nI.js +16 -0
- package/react/BnM1ZR01.js +1 -0
- package/react/BngQnXAm.js +19 -0
- package/react/ByaflAoD.js +1 -0
- package/react/CWuluVny.js +1 -0
- package/react/CX1xgrHv.js +1 -0
- package/react/Cc4X5G6P.js +1 -0
- package/react/{BC3j1Vfx.js → Cfcg5oOC.js} +1 -1
- package/react/{wMqVTbnB.js → D4fhzeDM.js} +1 -1
- package/react/D6_0tvWY.js +1 -0
- package/react/D9wNeZqE.js +1 -0
- package/react/{B997N-4x.js → DAM1GvS1.js} +1 -1
- package/react/DNeKBzyt.js +1 -0
- package/react/DQP8dKCY.js +22 -0
- package/react/DVJ6bF1K.js +1673 -0
- package/react/DXU3-7MF.js +1 -0
- package/react/De1fAb5U.js +1 -0
- package/react/Dki0xOtw.js +1214 -0
- package/react/DpVRQR2l.js +1 -0
- package/react/index.es.js +2 -2
- package/react/uTuW7LKr.js +1 -0
- package/react/{BaYUmqoo.js → waJI3JwG.js} +1 -1
- package/umd/web.umd.js +320 -548
- package/element/AuthLayout-B4FdAL6K.js +0 -1
- package/element/ContentsPage-CIlLUAk_.js +0 -25
- package/element/CuratePage-3hgdKCGz.js +0 -1
- package/element/Dialog-DTCg2Xuz.js +0 -1
- package/element/DotLottiePlayer-DPV8oPyY.js +0 -1
- package/element/ForgotPasswordPage-CYXkJgDG.js +0 -1
- package/element/I3HPI4QX-BiT7DjSF.js +0 -1206
- package/element/LeaderboardPage-DRacHwxf.js +0 -1
- package/element/LoginPage-IzXPyqx8.js +0 -1
- package/element/PublicEvents-BR1Jkb0X.js +0 -1
- package/element/RegisterPage-BkBPf1Nu.js +0 -1
- package/element/Tooltip-DWUxOKV4.js +0 -1
- package/element/UploadPage-4_cTrPgS.js +0 -16
- package/element/VideoPlayer-CkpP_2m2.js +0 -1
- package/element/index-C6FtBySC.js +0 -1739
- package/element/index-yFaF3DLQ.js +0 -14
- package/element/index.esm-BfXs-pez.js +0 -1
- package/element/photoswipe-CkeDPh8o.js +0 -1
- package/element/useInReviewCount-CZYyI0FO.js +0 -1
- package/element/useOrgAccess-om0FCvix.js +0 -1
- package/react/-bUmZFgL.js +0 -1
- package/react/4p05mYvZ.js +0 -1
- package/react/BGOEGd5o.js +0 -16
- package/react/BQbkBeBG.js +0 -1214
- package/react/BcE6Exl0.js +0 -1
- package/react/BylkhFHr.js +0 -1
- package/react/C5r70Orb.js +0 -1
- package/react/CM1B9r4o.js +0 -1
- package/react/CMxsDI0h.js +0 -34
- package/react/CuQjlRtA.js +0 -1
- package/react/CwioEUqI.js +0 -1
- package/react/D2HnjnKH.js +0 -1
- package/react/D7gbK_bK.js +0 -1
- package/react/DAeAHTWB.js +0 -1
- package/react/DTwikWiv.js +0 -1673
- package/react/DbUA069a.js +0 -1
- package/react/Dh0r0hV2.js +0 -1
- package/react/DkdqsLYt.js +0 -22
- package/react/Lj_85HFN.js +0 -1
- package/react/QbmxR9A7.js +0 -1
- package/react/jDOycm-1.js +0 -1
- package/react/kA_RhWTO.js +0 -1
- package/react/vt1_alij.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.37.0](https://github.com/qrati-labs/qrati-connect-js/compare/v1.36.0...v1.37.0) (2025-06-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Powered by Qrati added in footer ([f58caaf](https://github.com/qrati-labs/qrati-connect-js/commit/f58caaf53730179e9f7bfe76688c6a94fe3251c5))
|
|
7
|
+
|
|
8
|
+
# [1.36.0](https://github.com/qrati-labs/qrati-connect-js/compare/v1.35.0...v1.36.0) (2025-06-06)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* inline gallery row and column constraints logic in MediaGallery component ([ba48da6](https://github.com/qrati-labs/qrati-connect-js/commit/ba48da6b11db67482f488aac4e79d96db12f319d))
|
|
14
|
+
|
|
1
15
|
# [1.35.0](https://github.com/qrati-labs/qrati-connect-js/compare/v1.34.1...v1.35.0) (2025-06-06)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as a,u as s,j as c,S as e,f as r,N as t,c as i,P as q,T as l,ac as n,ad as d}from"./index-BmmnxX0E.js";const m=()=>{const m=a(),{initializing:x,organization:o,user:h}=s();return x?c.jsxs("div",{className:"qc-mx-auto qc-max-w-lg qc-space-y-8 qc-py-8",children:[c.jsx(e,{className:"qc-h-8"}),c.jsx(e,{className:"qc-h-8"}),c.jsx(e,{className:"qc-h-8"}),c.jsx(e,{className:"qc-h-8"})]}):!o||o?.customAuth?null:h?c.jsx(r,{replace:!0,to:m?.state?.referrer||"/"}):c.jsxs("div",{className:"qc-bg-primary qc-mx-auto qc-mt-24 qc-min-h-[80vh] qc-max-w-md",children:[c.jsxs("div",{className:"qc-my-8 qc-flex qc-w-full qc-justify-around",children:[c.jsx(t,{to:q.LOGIN,state:m?.state,className:i(m.pathname===q.LOGIN?"qc-border-brand":"qc-border-primary","qc-flex-1 qc-border-2 qc-border-x-0 qc-border-t-0 qc-pb-2"),children:c.jsx(l,{variant:"h5",align:"center",children:"Login"})}),c.jsx(t,{to:q.REGISTER,state:m?.state,className:i(m.pathname===q.REGISTER?"qc-border-brand":"qc-border-primary","qc-flex-1 qc-border-2 qc-border-x-0 qc-border-t-0 qc-pb-2"),children:c.jsx(l,{variant:"h5",align:"center",children:"Register"})})]}),c.jsx(n,{}),c.jsx("div",{className:"qc-mt-12",children:c.jsx(d,{})})]})};export{m as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{Q as e,m as t,n,o as i,p as r,a as s,u as o,k as a,l,q as c,s as d,t as h,v as u,D as p,w as m,x as f,C as g,y as w,j as v,c as b,z as y,B as x,G as q,H as T,J as S,g as E,K as k,L as j,I as C,e as _,d as O,M as P,T as N,E as A,N as I,P as M,O as L,R as z,U as F,V,W as R,X as D,Y as B,Z as H,S as U,i as W}from"./index-BmmnxX0E.js";import{I as $}from"./InputField-moE6s2aT.js";import{u as Y,o as G,s as Z,f as K,a as X,b as Q,h as J,l as ee,c as te,E as ne}from"./EventHeaderAdminButtons-BAA9hpIa.js";import{D as ie,a as re,b as se,c as oe,d as ae,P as le,u as ce,e as de,f as he,g as ue,h as pe,i as me,R as fe,j as ge,k as we,F as ve,l as be,m as ye,n as xe}from"./Dialog-DyjIzwNt.js";import{L as qe,I as Te}from"./LazyLoadImage-C9xLmmSA.js";var Se=class extends e{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:t()})}getOptimisticResult(e){return e.behavior=t(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:r}=e,s=super.createResult(e,t),{isFetching:o,isRefetching:a,isError:l,isRefetchError:c}=s,d=r.fetchMeta?.fetchMore?.direction,h=l&&"forward"===d,u=o&&"forward"===d,p=l&&"backward"===d,m=o&&"backward"===d;return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:i(t,r.data),hasPreviousPage:n(t,r.data),isFetchNextPageError:h,isFetchingNextPage:u,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:c&&!h&&!p,isRefetching:a&&!u&&!m}}};const Ee=()=>{const e=s.useRef(),{props:{organizationId:t},sessionId:n,getAccessToken:i,user:r}=o(),u=async(n,i)=>{if(n&&i&&(e.current||(e.current=await d()),e.current))try{await a.post(l.UPDATE_AD_ANALYTICS,{json:{adId:n,type:i,browserFingerprint:e.current},headers:{"x-org-id":t}})}catch(e){console.error(e)}},p=async e=>{if(n)try{await a.post(l.UPDATE_SESSION,{headers:{"x-org-id":t},json:{sessionId:n,pageViews:e}})}catch(e){console.error(e)}};return{incrementEventView:async n=>{if(n&&(e.current||(e.current=await d()),e.current))try{await a.post(l.INCREMENT_EVENT_VIEW,{json:{eventSlug:n,accessToken:r?await i():null,browserFingerprint:e.current},headers:{"x-org-id":t}})}catch(e){console.error(e)}},captureAdImpression:e=>u(e,h.AD_IMPRESSION),captureAdEngagement:e=>u(e,h.AD_ENGAGEMENT),captureAdClick:(e,t,n)=>{switch(u(e,h.AD_CLICK),t){case c.LINK:window.open(n,"_blank");break;case c.EMAIL:window.location.href=`mailto:${n}`;break;case c.PHONE:window.location.href=`tel:${n}`;break;case c.SMS:window.location.href=`sms:${n}`;break;case c.WHATSAPP:window.location.href=`https://wa.me/${n}`;break;case c.MESSENGER:window.location.href=`https://m.me/${n}`;break;default:window.open(n,"_blank")}},trackPageView:e=>{if(currentPageRef.current&&pageEntryTimeRef.current){const e={page:currentPageRef.current,entryTime:pageEntryTimeRef.current,exitTime:Date.now()};p([e])}currentPageRef.current=e,pageEntryTimeRef.current=Date.now()},exportPageViewsData:p}},ke=({ref:e,onBottomReached:t,hasNextPage:n,fetchNextPage:i,isFetchingNextPage:r})=>{const o=s.useRef(1),a=s.useRef(null),l=s.useRef(null),c=s.useRef(null),[d,h]=s.useState(!1),[u,p]=s.useState(!1);s.useEffect((()=>(d&&(clearTimeout(l.current),l.current=setTimeout((()=>{a.current=requestAnimationFrame(m)}),300)),()=>{cancelAnimationFrame(a.current)})),[d,n,r,i,t]);const m=()=>{e.current&&(e.current.scrollTop+=o.current,n&&!r&&i&&e.current.scrollTop+e.current.clientHeight>=.5*e.current.scrollHeight&&i(),e.current.scrollTop+e.current.clientHeight>=e.current.scrollHeight?(h(!1),cancelAnimationFrame(a.current),l.current=setTimeout((()=>{p(!0),t&&t(),l.current=setTimeout((()=>{e.current.scrollTop=0,p(!1),h(!0)}),1e3)}),1e3)):a.current=requestAnimationFrame(m))},f=e=>{"+"===e.key&&(o.current=Math.min(o.current+1,10)),"-"===e.key&&(o.current=Math.max(o.current-1,1))},g=()=>{document.fullscreenElement||(null!==c.current?c.current.release().then((()=>(c.current=null,!0))).catch((e=>console.error(`Failed to release wake lock: ${e.message}`))):console.error("No Wake Lock to release."),h(!1),p(!1),e.current.scrollTop=0,cancelAnimationFrame(a.current),clearTimeout(l.current),document.removeEventListener("keydown",f),document.removeEventListener("fullscreenchange",g))};return{start:()=>{e?.current?.requestFullscreen?e?.current?.requestFullscreen():e?.current?.webkitRequestFullscreen?e?.current?.webkitRequestFullscreen():e?.current?.mozRequestFullScreen?e?.current?.mozRequestFullScreen():e?.current?.msRequestFullscreen&&e?.current?.msRequestFullscreen(),(async()=>{try{"wakeLock"in navigator?(c.current=await navigator.wakeLock.request("screen"),document.addEventListener("visibilitychange",(async()=>{null!==c.current&&"visible"===document.visibilityState&&(c.current=await navigator.wakeLock.request("screen"))}))):console.error("Wake Lock API is not supported in this browser.")}catch(e){console.error(`Failed to acquire wake lock: ${e.message}`)}})(),h(!0),document.addEventListener("keydown",f),document.addEventListener("fullscreenchange",g)},initializing:u,running:d}},je=e=>e?.meta?.currentPage>1&&e.meta.currentPage-1,Ce=e=>e?.meta?.currentPage<e?.meta?.totalPages?e.meta.currentPage+1:void 0,_e=({event:e,ads:t=[],sort:n=p,order:i=m,keywords:c,face:d,limit:h=20})=>{const{props:{organizationId:v},getAccessToken:b,loadingUser:y}=o(),{isLoading:x,data:q,hasNextPage:T,fetchNextPage:S,isFetchingNextPage:E}=function(e,t){return r(e,Se,t)}({queryKey:[u.CONTENTS_BY_EVENT(e?._id),n,i,c,d],queryFn:async({pageParam:t=1})=>{try{return await a.get(l.GET_CONTENTS,{searchParams:{eventId:e?._id,accessToken:await b(),page:t,keywords:c,faceImageUrl:d,sort:`${f[i].sortOrder}${g[n].sortField}`,limit:h},headers:{"x-org-id":v}}).json()}catch(e){throw new Error(e?.message||"Failed to fetch public events")}},enabled:!y&&!!e,initialPageParam:1,getPreviousPageParam:je,getNextPageParam:Ce}),k=s.useMemo((()=>q?.pages?.flatMap((e=>e?.data))),[q]),j=s.useMemo((()=>((e,t,n)=>{if(n<=0)return e;let i=0;const r=[];for(let s=0;s<e?.length;s++)r.push(e[s]),t.length>0&&n>0&&(s+1)%n==0&&(r.push({...t[i],type:w.AD,adType:t[i].type}),i=(i+1)%t.length);return r})(k,t,e?.adPosition)),[k]);return{contents:k,contentsWithAds:j,loading:x,hasNextPage:T,fetchNextPage:S,isFetchingNextPage:E}},Oe=y("qc-border-brand -qc-ml-px qc-inline-flex qc-h-fit qc-flex-auto qc-items-center qc-justify-center qc-border qc-transition-colors qc-duration-500 focus:qc-outline-none",{variants:{size:{sm:"qc-gap-1.5 qc-p-1.5 qc-text-xs",md:"qc-gap-3 qc-px-3 qc-py-2 qc-text-sm",lg:"qc-gap-3 qc-px-4 qc-py-3 qc-text-base"}},defaultVariants:{size:"md"}}),Pe=({size:e,buttons:t=[],onChange:n,selected:i,className:r})=>{const{props:{textClassName:s}}=o();return v.jsx("div",{className:b("qc-shadow-outer qc-z-0 qc-flex qc-h-fit qc-rounded",r),children:t.map(((r,o)=>{const a=0===o,l=o===t.length-1,c=r.value===i;return v.jsxs("button",{type:"button",onClick:()=>n&&n(r.value),className:b(Oe({size:e}),c?r.activeClassName?r.activeClassName:"qc-bg-brand qc-text-a11y":"qc-bg-primary qc-text-primary",a&&"qc-rounded-l",l&&"qc-rounded-r",s),children:[!r.icon&&v.jsx("span",{className:"qc-font-medium",children:r.text}),r.icon&&v.jsx("div",{className:"qc-size-5",children:r.icon})]},r.value)}))})},Ne=({engagementStyle:e,sort:t=p,order:n=m,onSortChange:i,onSortOrderChange:r})=>{const o=s.useMemo((()=>{const t=Object.keys(g).map((e=>({text:g[e].label,value:e,activeClassName:"qc-bg-brand qc-text-a11y"})));return e===x.CONTEST?t:t.filter((e=>e.value!==q.POPULAR))}),[e]);return v.jsxs("div",{className:"qc-relative qc-flex qc-w-auto qc-items-center qc-gap-2",children:[v.jsx("button",{type:"button",className:"qc-bg-primary qc-rounded qc-p-1",onClick:r,children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:b("qc-text-primary qc-size-7 -qc-scale-x-100 qc-transition-transform",n===T.ASC&&"-qc-scale-y-100"),viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h4q.425 0 .713.288T9 17t-.288.713T8 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h10q.425 0 .713.288T15 12t-.288.713T14 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}),v.jsx(Pe,{className:"qc-flex-1 lg:qc-flex-none",selected:t,buttons:o,onChange:i})]})},Ae={[S.GRID]:{icon:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 24 24",children:[v.jsx("rect",{width:"24",height:"24",fill:"none"}),v.jsx("path",{fill:"currentColor",d:"M5 11q-.825 0-1.412-.587T3 9V5q0-.825.588-1.412T5 3h4q.825 0 1.413.588T11 5v4q0 .825-.587 1.413T9 11zm0 10q-.825 0-1.412-.587T3 19v-4q0-.825.588-1.412T5 13h4q.825 0 1.413.588T11 15v4q0 .825-.587 1.413T9 21zm10-10q-.825 0-1.412-.587T13 9V5q0-.825.588-1.412T15 3h4q.825 0 1.413.588T21 5v4q0 .825-.587 1.413T19 11zm0 10q-.825 0-1.412-.587T13 19v-4q0-.825.588-1.412T15 13h4q.825 0 1.413.588T21 15v4q0 .825-.587 1.413T19 21z"})]})},[S.SINGLE]:{icon:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 20 20",children:[v.jsx("rect",{x:"0",y:"0",className:"size-5",fill:"none",stroke:"none"}),v.jsx("path",{fill:"currentColor",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v1A1.5 1.5 0 0 0 4.5 6h11A1.5 1.5 0 0 0 17 4.5v-1A1.5 1.5 0 0 0 15.5 2h-11Zm0 6A1.5 1.5 0 0 0 3 9.5v1A1.5 1.5 0 0 0 4.5 12h11a1.5 1.5 0 0 0 1.5-1.5v-1A1.5 1.5 0 0 0 15.5 8h-11Zm0 6A1.5 1.5 0 0 0 3 15.5v1A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5v-1a1.5 1.5 0 0 0-1.5-1.5h-11Z"})]})}},Ie=Object.keys(Ae).map((e=>({icon:Ae[e].icon,value:e}))),Me=({engagementStyle:e,uploaders:t,facialSearchImage:n,onImageChange:i,disabled:r,userPlan:a,mode:l,onModeChange:c,sort:d,onSortChange:h,sortOrder:u,onSortOrderChange:p,handleChange:m,face:f,onFaceImageChange:g})=>{const{organization:w}=o(),[b,y]=s.useState("");return v.jsxs("div",{className:"qc-mb-3 qc-grid qc-grid-cols-3 md:qc-space-x-4 md:qc-space-y-0",children:[v.jsxs("div",{className:"qc-col-span-3 qc-flex qc-items-center qc-gap-4 md:qc-col-span-1",children:[w?.integrationSettings?.showGridViewToggle&&v.jsx(Pe,{buttons:Ie,selected:l,onChange:c}),w?.integrationSettings?.showKeywordSearch&&v.jsx("div",{className:"qc-flex-auto",children:v.jsxs("div",{className:"qc-relative lg:qc-min-w-80",children:[v.jsx($,{placeholder:"Search by keywords",value:b,className:"qc-py-2",onChange:e=>y(e.target.value),onKeyUp:e=>{"Enter"===e.key?m(b.length>0?b:""):"Escape"===e.key&&(y(""),m(""))}}),b?.length>0&&v.jsx("button",{className:"qc-absolute qc-inset-y-0 qc-right-10 qc-flex qc-items-center",onClick:()=>{y(""),m(""),g(null)},children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc-text-primary qc-size-5",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})}),v.jsx("button",{className:"qc-absolute qc-inset-y-0 qc-right-3 qc-flex qc-items-center",onClick:()=>m(b),children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc-text-primary qc-size-5",viewBox:"0 0 24 24",children:v.jsx("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"})})})]})})]}),v.jsx("div",{className:"qc-col-span-3 md:qc-col-span-1"}),v.jsx("div",{className:"qc-col-span-3 qc-mt-3 md:qc-col-span-1 md:qc-mt-0 lg:qc-justify-self-end",children:v.jsx(Ne,{engagementStyle:e,sort:d,order:u,onSortChange:h,onSortOrderChange:p})})]})};var Le,ze,Fe={},Ve={exports:{}};function Re(){return Le||(Le=1,e=Ve.exports,t=function(){return t=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.apply(this,arguments)},n=function(){function e(e,n,i){var r=this;this.endVal=n,this.options=i,this.version="2.8.1",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(e){r.startTime||(r.startTime=e);var t=e-r.startTime;r.remaining=r.duration-t,r.useEasing?r.countDown?r.frameVal=r.startVal-r.easingFn(t,0,r.startVal-r.endVal,r.duration):r.frameVal=r.easingFn(t,r.startVal,r.endVal-r.startVal,r.duration):r.frameVal=r.startVal+(r.endVal-r.startVal)*(t/r.duration);var n=r.countDown?r.frameVal<r.endVal:r.frameVal>r.endVal;r.frameVal=n?r.endVal:r.frameVal,r.frameVal=Number(r.frameVal.toFixed(r.options.decimalPlaces)),r.printValue(r.frameVal),t<r.duration?r.rAF=requestAnimationFrame(r.count):null!==r.finalEndVal?r.update(r.finalEndVal):r.options.onCompleteCallback&&r.options.onCompleteCallback()},this.formatNumber=function(e){var t,n,i,s,o=e<0?"-":"";t=Math.abs(e).toFixed(r.options.decimalPlaces);var a=(t+="").split(".");if(n=a[0],i=a.length>1?r.options.decimal+a[1]:"",r.options.useGrouping){s="";for(var l=3,c=0,d=0,h=n.length;d<h;++d)r.options.useIndianSeparators&&4===d&&(l=2,c=1),0!==d&&c%l==0&&(s=r.options.separator+s),c++,s=n[h-d-1]+s;n=s}return r.options.numerals&&r.options.numerals.length&&(n=n.replace(/[0-9]/g,(function(e){return r.options.numerals[+e]})),i=i.replace(/[0-9]/g,(function(e){return r.options.numerals[+e]}))),o+r.options.prefix+n+i+r.options.suffix},this.easeOutExpo=function(e,t,n,i){return n*(1-Math.pow(2,-10*e/i))*1024/1023+t},this.options=t(t({},this.defaults),i),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(n),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el="string"==typeof e?document.getElementById(e):e,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined",typeof window<"u"&&this.options.enableScrollSpy&&(this.error?console.error(this.error,e):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push((function(){return r.handleScroll(r)})),window.onscroll=function(){window.onScrollFns.forEach((function(e){return e()}))},this.handleScroll(this)))}return e.prototype.handleScroll=function(e){if(e&&window&&!e.once){var t=window.innerHeight+window.scrollY,n=e.el.getBoundingClientRect(),i=n.top+window.pageYOffset,r=n.top+n.height+window.pageYOffset;r<t&&r>window.scrollY&&e.paused?(e.paused=!1,setTimeout((function(){return e.start()}),e.options.scrollSpyDelay),e.options.scrollSpyOnce&&(e.once=!0)):(window.scrollY>r||i>t)&&!e.paused&&e.reset()}},e.prototype.determineDirectionAndSmartEasing=function(){var e=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>e;var t=e-this.startVal;if(Math.abs(t)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=e;var n=this.countDown?1:-1;this.endVal=e+n*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=e,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},e.prototype.start=function(e){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),e&&(this.options.onCompleteCallback=e),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},e.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},e.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},e.prototype.update=function(e){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(e),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},e.prototype.printValue=function(e){var t;if(this.el){var n=this.formattingFn(e);null!==(t=this.options.plugin)&&void 0!==t&&t.render?this.options.plugin.render(this.el,n):"INPUT"===this.el.tagName?this.el.value=n:"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=n:this.el.innerHTML=n}},e.prototype.ensureNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.prototype.validateValue=function(e){var t=Number(e);return this.ensureNumber(t)?t:(this.error="[CountUp] invalid start or end value: ".concat(e),null)},e.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},e}(),e.CountUp=n),Ve.exports;var e,t,n}const De=j(function(){if(ze)return Fe;ze=1,Object.defineProperty(Fe,"__esModule",{value:!0});var e=k(),t=Re();function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){s(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function r(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function s(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,0!==t)for(;!(l=(i=s.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var d=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?e.useLayoutEffect:e.useEffect;function h(t){var n=e.useRef(t);return d((function(){n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.current.apply(void 0,t)}),[])}var u=["ref","startOnMount","enableReinitialize","delay","onEnd","onStart","onPauseResume","onReset","onUpdate"],p={decimal:".",separator:",",delay:null,prefix:"",suffix:"",duration:2,start:0,decimals:0,startOnMount:!0,enableReinitialize:!0,useEasing:!0,useGrouping:!0,useIndianSeparators:!1},m=function(n){var r=Object.fromEntries(Object.entries(n).filter((function(e){return void 0!==l(e,2)[1]}))),s=e.useMemo((function(){return i(i({},p),r)}),[n]),o=s.ref,c=s.startOnMount,d=s.enableReinitialize,m=s.delay,f=s.onEnd,g=s.onStart,w=s.onPauseResume,v=s.onReset,b=s.onUpdate,y=a(s,u),x=e.useRef(),q=e.useRef(),T=e.useRef(!1),S=h((function(){return function(e,n){var i=n.decimal,r=n.decimals,s=n.duration,o=n.easingFn,a=n.end,l=n.formattingFn,c=n.numerals,d=n.prefix,h=n.separator,u=n.start,p=n.suffix,m=n.useEasing,f=n.useGrouping,g=n.useIndianSeparators,w=n.enableScrollSpy,v=n.scrollSpyDelay,b=n.scrollSpyOnce,y=n.plugin;return new t.CountUp(e,a,{startVal:u,duration:s,decimal:i,decimalPlaces:r,easingFn:o,formattingFn:l,numerals:c,separator:h,prefix:d,suffix:p,plugin:y,useEasing:m,useIndianSeparators:g,useGrouping:f,enableScrollSpy:w,scrollSpyDelay:v,scrollSpyOnce:b})}("string"==typeof o?o:o.current,y)})),E=h((function(e){var t=x.current;if(t&&!e)return t;var n=S();return x.current=n,n})),k=h((function(){var e=function(){return E(!0).start((function(){f?.({pauseResume:j,reset:C,start:O,update:_})}))};m&&m>0?q.current=setTimeout(e,1e3*m):e(),g?.({pauseResume:j,reset:C,update:_})})),j=h((function(){E().pauseResume(),w?.({reset:C,start:O,update:_})})),C=h((function(){E().el&&(q.current&&clearTimeout(q.current),E().reset(),v?.({pauseResume:j,start:O,update:_}))})),_=h((function(e){E().update(e),b?.({pauseResume:j,reset:C,start:O})})),O=h((function(){C(),k()})),P=h((function(e){c&&(e&&C(),k())}));return e.useEffect((function(){T.current?d&&P(!0):(T.current=!0,P())}),[d,T,P,m,n.start,n.suffix,n.prefix,n.duration,n.separator,n.decimals,n.decimal,n.formattingFn]),e.useEffect((function(){return function(){C()}}),[C]),{start:O,pauseResume:j,reset:C,update:_,getCountUp:E}},f=["className","redraw","containerProps","children","style"];return Fe.default=function(t){var n=t.className,r=t.redraw,s=t.containerProps,l=t.children,c=t.style,d=a(t,f),u=e.useRef(null),p=e.useRef(!1),g=m(i(i({},d),{},{ref:u,startOnMount:"function"!=typeof l||0===t.delay,enableReinitialize:!1})),w=g.start,v=g.reset,b=g.update,y=g.pauseResume,x=g.getCountUp,q=h((function(){w()})),T=h((function(e){t.preserveValue||v(),b(e)})),S=h((function(){"function"!=typeof t.children||u.current instanceof Element?x():console.error('Couldn\'t find attached element to hook the CountUp instance into! Try to attach "containerRef" from the render prop to a an Element, eg. <span ref={containerRef} />.')}));e.useEffect((function(){S()}),[S]),e.useEffect((function(){p.current&&T(t.end)}),[t.end,T]);var E=r&&t;return e.useEffect((function(){r&&p.current&&q()}),[q,r,E]),e.useEffect((function(){!r&&p.current&&q()}),[q,r,t.start,t.suffix,t.prefix,t.duration,t.separator,t.decimals,t.decimal,t.className,t.formattingFn]),e.useEffect((function(){p.current=!0}),[]),"function"==typeof l?l({countUpRef:u,start:w,reset:v,update:b,pauseResume:y,getCountUp:x}):e.createElement("span",o({className:n,ref:u,style:c},s),typeof t.start<"u"?x().formattingFn(t.start):"")},Fe.useCountUp=m,Fe}()),Be=({engagementStyle:e,views:t,contentCount:n,curationCount:i})=>v.jsxs("div",{className:"qc-line-clamp-1 qc-flex qc-w-fit qc-items-center qc-justify-center qc-gap-8",children:[v.jsxs("div",{className:"qc-flex qc-items-center qc-gap-2",children:[v.jsx(C,{name:"material-symbols-light:visibility-outline-rounded"}),v.jsx(De,{start:0,end:t??0,duration:3,delay:0,children:({countUpRef:e})=>v.jsx("span",{ref:e})})]}),v.jsxs("div",{className:"qc-flex qc-items-center qc-gap-2",children:[v.jsx(C,{name:"material-symbols-light:gallery-thumbnail-outline-rounded"}),v.jsx(De,{start:0,end:n,duration:3,delay:0,children:({countUpRef:e})=>v.jsx("span",{ref:e})})]}),e===x.CONTEST&&v.jsxs("div",{className:"qc-flex qc-items-center qc-gap-1",children:[v.jsx(C,{name:"material-symbols-light:star-outline-rounded"}),v.jsx(De,{start:0,end:i,duration:3,delay:0,children:({countUpRef:e})=>v.jsx("span",{ref:e})})]})]}),He=()=>{const e=_(),{eventSlug:t}=O(),{event:n}=P({eventSlug:t}),{props:{curateLabel:i,leaderboardLabel:r},organization:s}=o(),{eventViews:c,contentCount:d,curationCount:h}=(({event:e})=>{const{props:{organizationId:t},organization:n}=o(),{isLoading:i,data:r}=E({queryKey:[`event-stats-${e?._id}`],queryFn:async()=>{try{return(await a.get(l.GET_EVENT_STATISTICS,{searchParams:{eventSlug:e?.slug},headers:{"x-org-id":t}}).json()).data}catch(e){throw new Error(e?.message||"Failed to fetch public events")}},enabled:!!e&&n?.integrationSettings?.showEventStats});return{isLoading:i,eventViews:r?.eventViews||0,contentCount:r?.contentCount||0,curationCount:r?.curationCount||0}})({event:n});return v.jsxs("div",{className:"qc-w-full qc-space-y-4",children:[v.jsxs("div",{className:"qc-space-y-4 md:-qc-mt-10",children:[v.jsx(N,{variant:"h3",align:"center",immutable:!0,children:n?.name}),v.jsx(N,{variant:"h5",align:"center",color:"secondary",lines:2,immutable:!0,children:n?.description})]}),s?.integrationSettings?.showEventStats&&v.jsx("div",{className:"qc-flex qc-justify-center",children:v.jsx(Be,{engagementStyle:n?.engagementStyle,views:c?.views,contentCount:d,curationCount:h})}),(n?.status===A.OPEN&&n?.uploadLimit>0||n?.status===A.OPEN&&n.engagementStyle!==x.REACTION||n?.engagementStyle===x.REACTION&&n?.showLeaderboard||n?.engagementStyle===x.CONTEST)&&v.jsxs("div",{className:"qc-flex qc-w-full qc-flex-wrap qc-justify-center qc-gap-3",children:[n?.status===A.OPEN&&n?.uploadLimit>0&&v.jsx(I,{to:M.UPLOAD(t),children:v.jsx(L,{variant:e.pathname===M.UPLOAD(t)?"default":"outlined",iconSvg:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc-size-7",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M6.616 19q-.691 0-1.153-.462T5 17.384v-1.923q0-.213.143-.356t.357-.144t.357.144t.143.356v1.923q0 .231.192.424t.423.192h10.77q.23 0 .423-.192t.192-.424v-1.923q0-.213.143-.356t.357-.144t.357.144t.143.356v1.923q0 .691-.462 1.153T17.384 19zM11.5 6.927L9.529 8.898q-.146.146-.347.153t-.366-.159q-.16-.165-.163-.353q-.003-.189.163-.354l2.618-2.62q.132-.13.268-.183q.137-.053.298-.053t.298.053t.268.184l2.618 2.619q.147.146.154.344q.006.198-.153.363q-.166.166-.357.169t-.357-.163L12.5 6.927v8.15q0 .214-.143.357t-.357.143t-.357-.143t-.143-.357z"})}),children:"Upload"})}),n?.status===A.OPEN&&n?.engagementStyle!==x.REACTION&&v.jsx(I,{to:M.CURATE(t),children:v.jsx(L,{variant:e.pathname?.includes("curate")?"default":"outlined",iconSvg:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc-size-7",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"m8.85 16.825l3.15-1.9l3.15 1.925l-.825-3.6l2.775-2.4l-3.65-.325l-1.45-3.4l-1.45 3.375l-3.65.325l2.775 2.425zm3.15-.723l-3.63 2.192q-.16.079-.297.064q-.136-.016-.265-.094q-.13-.08-.196-.226t-.012-.319l.966-4.11l-3.195-2.77q-.135-.11-.178-.263t.019-.293t.165-.23q.104-.087.28-.118l4.216-.368l1.644-3.892q.068-.165.196-.238T12 5.364t.288.073t.195.238l1.644 3.892l4.215.368q.177.03.281.119q.104.088.166.229q.061.14.018.293t-.178.263l-3.195 2.77l.966 4.11q.056.171-.011.318t-.197.226q-.128.08-.265.095q-.136.015-.296-.064zm0-3.852"})}),children:i||"Curate"})}),n?.showLeaderboard&&v.jsx(I,{to:M.LEADERBOARD(t),children:v.jsx(L,{variant:e.pathname===M.LEADERBOARD(t)?"default":"outlined",iconSvg:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc-size-7",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M4 19h4.673v-8H4zm5.673 0h4.654V5H9.673zm5.654 0H20v-6h-4.673zM3 18.384v-6.768q0-.667.475-1.141T4.615 10h4.058V5.616q0-.667.475-1.141T10.288 4h3.424q.666 0 1.14.475t.475 1.14V12h4.058q.666 0 1.14.475t.475 1.14v4.77q0 .666-.475 1.14t-1.14.475H4.615q-.666 0-1.14-.475T3 18.386"})}),children:r||"Leaders"})})]})]})};function Ue(e,[t,n]){const[i,r]=e;return void 0!==i&&void 0!==r&&void 0!==t&&void 0!==n&&t>i&&t-i<=20&&n<r?[i,n]:i!==t||r!==n?[t,n]:e}function We(e,t){let n=e?.clientWidth;if(void 0!==n&&t&&t.length>0){const e=[...t.filter((e=>e>0))].sort(((e,t)=>t-e));e.push(Math.floor(e[e.length-1]/2)),n=e.find(((t,i)=>t<=n||i===e.length-1))}return n}function $e(e,t,n){const[[i],r]=s.useReducer(Ue,[n]),o=function(e){const t=s.useRef(e);return(!e||!t.current||e.length!==t.current.length||t.current.some(((t,n)=>t!==e[n])))&&(t.current=e),t.current}(t),a=s.useRef(void 0);return{containerRef:s.useCallback((t=>{a.current?.disconnect(),a.current=void 0;const n=()=>r([We(t,o),window.innerWidth-document.documentElement.clientWidth]);n(),t&&typeof ResizeObserver<"u"&&(a.current=new ResizeObserver(n),a.current.observe(t)),"function"==typeof e?e(t):e&&(e.current=t)}),[e,o]),containerWidth:i}}function Ye(e){return["react-photo-album",e].filter(Boolean).join("--")}function Ge(e){return`--${Ye(e)}`}function Ze({width:e,height:t}){return e/t}const Ke=Object.freeze([1200,600,300,0]);function Xe(e,t){return"function"==typeof e?e(t):e}function Qe(e,t){return void 0!==t?Xe(e,t):void 0}function Je(e,t,n,i=0){if(void 0===t)return;const r=Qe(e,t);return Math.round(Math.max(void 0===r?function(e,t){const n=Ke.findIndex((e=>e<=t));return Xe(e[Math.max(n,0)],t)}(n,t):r,i))}function et(e,{spacing:t,padding:n,componentsProps:i,render:r}){return{spacing:Je(t,e,[20,15,10,5]),padding:Je(n,e,[0,0,0,0]),componentsProps:Xe(i,e)||{},render:Xe(r,e)}}function tt(e,t=0){const n=10**t;return Math.round((e+Number.EPSILON)*n)/n}function nt(e,t,n,i,r,s,o){let a,l;const c=e=>{const t=s*(r-1)+2*o*r;return`calc((${e.match(/^\s*calc\((.*)\)\s*$/)?.[1]??e} - ${t}px) / ${tt((i-t)/n,5)})`},d=e.srcSet;return d&&d.length>0&&(a=d.concat(d.some((({width:t})=>t===e.width))?[]:[{src:e.src,width:e.width,height:e.height}]).sort(((e,t)=>e.width-t.width)).map((e=>`${e.src} ${e.width}w`)).join(", ")),l=t?.size?(t.sizes||[]).map((({viewport:e,size:t})=>`${e} ${c(t)}`)).concat(c(t.size)).join(", "):`${Math.ceil(n/i*100)}vw`,{srcSet:a,sizes:l}}const it=s.forwardRef((function({as:e,render:t,context:n,classes:i=[],variables:r={},style:s,className:o,children:a,...l},c){const d=function(...e){return[...e].filter(Boolean).join(" ")}(...(Array.isArray(i)?i:[i]).filter((e=>"string"==typeof e)).map(Ye),o),h={style:{...Object.fromEntries(Object.entries(r).map((([e,t])=>[Ge(e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()),"number"==typeof t?tt(t,5):t]))),...s},className:d,children:a,...l};if(t){const e=t({ref:c,...h},n);if(e)return e}const u=e||"div";return v.jsx(u,{ref:c,...h})}));const rt=s.forwardRef((function({photo:e,index:t,width:n,height:i,onClick:r,render:{wrapper:s,link:o,button:a,image:l,extras:c}={},componentsProps:{link:d,button:h,wrapper:u,image:p}={}},m){const{href:f}=e,g={photo:e,index:t,width:tt(n,3),height:tt(i,3)};let w;return w=f?{...d,as:"a",render:o,classes:["photo","link"],href:f,onClick:r}:r?{...h,as:"button",type:"button",render:a,classes:["photo","button"],onClick:r}:{...u,render:s,classes:"photo"},v.jsxs(it,{ref:m,variables:{photoWidth:g.width,photoHeight:g.height},context:g,...w,children:[v.jsx(it,{as:"img",classes:"image",render:l,context:g,...p}),c?.({},g)]})}));const st=s.forwardRef((function({layout:e,sizes:t,model:n,skeleton:i,onClick:r,render:{container:o,track:a,photo:l,...c}={},componentsProps:{container:d,track:h,link:u,button:p,wrapper:m,image:f}={}},g){const{spacing:w,padding:b,containerWidth:y,tracks:x,variables:q,horizontal:T}=n||{};return v.jsxs(it,{role:"group","aria-label":"Photo album",...d,variables:{spacing:w,padding:b,containerWidth:y,...q},classes:["",e],render:o,ref:g,children:[void 0!==w&&void 0!==b&&void 0!==y&&x?.map((({photos:e,variables:n},i)=>{const o=e.length,d=T?o:x.length;return s.createElement(it,{...h,key:i,render:a,classes:"track",variables:{trackSize:o,...n}},e.map((e=>{const{photo:n,index:i,width:s}=e,{key:o,src:a,alt:h,title:g,label:x}=n,q=r?e=>{r({event:e,photo:n,index:i})}:void 0;if(l){const t=l({onClick:q},e);if(t)return t}const T=e=>x?{"aria-label":x,...e}:e;return v.jsx(rt,{onClick:q,render:c,componentsProps:{image:{loading:"lazy",decoding:"async",src:a,alt:h,title:g,...nt(n,t,s,y,d,w,b),...Xe(f,e)},link:T(Xe(u,e)),button:T(Xe(p,e)),wrapper:Xe(m,e)},...e},o??a)})))})),void 0===y&&i]})}));function ot(e){let t=0;const n=[],i=(t,i)=>e(n[t],n[i])<0,r=(e,t)=>{const i=n[e];n[e]=n[t],n[t]=i};return{push:e=>{t+=1,n[t]=e,(e=>{let t=e,n=Math.floor(t/2);for(;t>1&&i(n,t);)r(n,t),t=n,n=Math.floor(t/2)})(t)},pop:()=>{if(0===t)return;r(1,t),t-=1;const e=n.pop();return(e=>{let n=e,s=2*n;for(;s<=t&&(s<t&&i(s,s+1)&&(s+=1),i(n,s));)r(n,s),n=s,s=2*n})(1),e},size:()=>t}}function at(e,t,n){return function(e,t){if(!e)return;const n=[];for(let i=t;void 0!==i;i=e.get(i))n.push(i);return n.reverse()}(function(e,t,n){const i=new Map,r=new Set,s=new Map;s.set(t,0);const o=ot(function(e){return(t,n)=>e(n)-e(t)}((e=>e[1])));for(o.push([t,0]);o.size()>0;){const[t,n]=o.pop();if(!r.has(t)){const a=e(t);r.add(t),a.forEach(((e,r)=>{const a=n+e,l=i.get(r),c=s.get(r);(void 0===c||c>a&&(c/a>1.005||void 0!==l&&l<t))&&(s.set(r,a),o.push([r,a]),i.set(r,t))}))}}return s.has(n)?i:void 0}(e,t,n),n)}function lt(e,t,n,i){return(t-(e.length-1)*n-2*i*e.length)/e.reduce(((e,t)=>e+Ze(t)),0)}function ct(e,t,n,i,r,s,o){const a=e.slice(t,n),l=lt(a,i,r,s);return l>0?(l-o)**2*a.length:void 0}function dt(e,t,n,i,r,s,o){const a=function(e,t,n,i){return tt(t/n/Math.min(...e.map((e=>Ze(e)))))+(i||0)+2}(e,i,r,s),l=function(e,t,n,i,r,s,o,a){return l=>{const c=new Map;c.set(l,0);const d=o||1,h=Math.min(s,a||1/0);for(let s=l+d;s<e.length+1&&!(s-l>h);s+=1){const o=ct(e,l,s,i,t,n,r);if(void 0===o)break;c.set(s,o)}return c}}(e,t,n,i,r,a,s,o),c=at(l,0,e.length);if(!c)return;const d=[];for(let r=1;r<c.length;r+=1){const s=e.map(((e,t)=>({photo:e,index:t}))).slice(c[r-1],c[r]),o=lt(s.map((({photo:e})=>e)),i,t,n);d.push({photos:s.map((({photo:e,index:t})=>({photo:e,index:t,width:o*Ze(e),height:o})))})}return{spacing:t,padding:n,containerWidth:i,tracks:d,horizontal:!0}}const ht=s.forwardRef((function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:o,containerWidth:a}=$e(r,t,n),{spacing:l,padding:c,targetRowHeight:d,minPhotos:h,maxPhotos:u,...p}=function(e,{photos:t,targetRowHeight:n,rowConstraints:i,...r}){const{spacing:s,padding:o,componentsProps:a,render:l}=et(e,r),{singleRowMaxHeight:c,minPhotos:d,maxPhotos:h}=Qe(i,e)||{};if(void 0!==c&&void 0!==s&&void 0!==o){const e=Math.floor(t.reduce(((e,{width:t,height:n})=>e+t/n*c-2*o),o*t.length*2+s*(t.length-1)));e>0&&(a.container={...a.container},a.container.style={maxWidth:e,...a.container.style})}return{...r,targetRowHeight:Je(n,e,[e=>e/5,e=>e/4,e=>e/3,e=>e/2]),render:l,spacing:s,padding:o,minPhotos:d,maxPhotos:h,componentsProps:a}}(a,{photos:e,...i}),m=s.useMemo((()=>void 0!==a&&void 0!==l&&void 0!==c&&void 0!==d?dt(e,l,c,a,d,h,u):void 0),[e,l,c,a,d,h,u]);return v.jsx(st,{layout:"rows",ref:o,model:m,...p})}));function ut(e,t,n,i){return function(e,t,n){const i=[n];for(let r=n,s=t;s>0;s-=1)[r]=e.get(r)[s],i.push(r);return i.reverse()}(function(e,t,n,i){const r=new Map,s=new Set;s.add(n);for(let n=0;n<t;n+=1){const o=[...s.keys()];s.clear(),o.forEach((o=>{const a=n>0?r.get(o)[n][1]:0;e(o).forEach((([e,l])=>{let c=r.get(e);c||(c=[],r.set(e,c));const d=a+l,h=c[n+1];(!h||h[1]>d&&(h[1]/d>1.0001||o<h[0]))&&(c[n+1]=[o,d]),n<t-1&&e!==i&&s.add(e)}))}))}return r}(e,t,n,i),t,i)}function pt(e,t,n,i,r,s,o){const a=[],l=o.reduce(((e,t)=>e+t),0);for(let c=0;c<e.length-1;c+=1){const d=t.map(((e,t)=>({photo:e,index:t}))).slice(e[c],e[c+1]),h=o.reduce(((e,t,n)=>e+(s[c]-s[n])*t),0),u=(r-(e.length-2)*n-2*(e.length-1)*i-h)*o[c]/l;a.push({photos:d.map((({photo:e,index:t})=>({photo:e,index:t,width:u,height:u/Ze(e)}))),variables:{adjustedGaps:h,columnRatio:o[c]}})}return{tracks:a,variables:{totalRatio:l}}}function mt(e,t,n,i,r,s){const o=[],a=[];if(e.length<=s){const r=e.length>0?e.reduce(((e,t)=>e+Ze(t)),0)/e.length:1;for(let t=0;t<s;t+=1)o[t]=2*n,a[t]=t<e.length?Ze(e[t]):r;return pt(Array.from({length:s+1},((t,n)=>Math.min(n,e.length))),e,t,n,i,o,a)}const l=(e.reduce(((e,t)=>e+r/Ze(t)),0)+t*(e.length-s)+2*n*e.length)/s,c=function(e,t,n,i,r){return s=>{const o=[],a=1.5*r;let l=i/Ze(e[s])+2*n;for(let c=s+1;c<e.length+1&&(o.push([c,(r-l)**2]),!(l>a||c===e.length));c+=1)l+=i/Ze(e[c])+t+2*n;return o}}(e,t,n,r,l),d=ut(c,s,0,e.length);for(let i=0;i<d.length-1;i+=1){const r=e.slice(d[i],d[i+1]);o[i]=t*(r.length-1)+2*n*r.length,a[i]=1/r.reduce(((e,t)=>e+1/Ze(t)),0)}return pt(d,e,t,n,i,o,a)}function ft(e,t,n,i,r){const s=(i-t*(r-1)-2*n*r)/r,{tracks:o,variables:a}=mt(e,t,n,i,s,r);return o.some((e=>e.photos.some((({width:e,height:t})=>e<0||t<0))))?r>1?ft(e,t,n,i,r-1):void 0:{tracks:o,spacing:t,padding:n,containerWidth:i,variables:{columns:r,...a}}}const gt=s.forwardRef((function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:o,containerWidth:a}=$e(r,t,n),{spacing:l,padding:c,columns:d,...h}=function(e,{columns:t,...n}){return{...n,...et(e,n),columns:Je(t,e,[5,4,3,2],1)}}(a,{photos:e,...i}),u=s.useMemo((()=>void 0!==a&&void 0!==l&&void 0!==c&&void 0!==d?ft(e,l,c,a,d):void 0),[e,l,c,a,d]);return v.jsx(st,{layout:"columns",ref:o,model:u,...h})}));function wt(e,t,n,i,r){const s=(i-t*(r-1)-2*n*r)/r;if(s<=0)return r>1?wt(e,t,n,i,r-1):void 0;const o=[];for(let e=0;e<r;e+=1)o[e]=0;const a=e.reduce(((e,i,r)=>{const a=o.reduce(((e,t,n)=>t<o[e]-1?n:e),0);return o[a]=o[a]+s/Ze(i)+t+2*n,e[a].push({photo:i,index:r}),e}),Array.from({length:r},(()=>[])));return{spacing:t,padding:n,containerWidth:i,variables:{columns:r},tracks:a.map((e=>({photos:e.map((({photo:e,index:t})=>({photo:e,index:t,width:s,height:s/Ze(e)})))})))}}const vt=s.forwardRef((function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:o,containerWidth:a}=$e(r,t,n),{spacing:l,padding:c,columns:d,...h}=function(e,{columns:t,...n}){return{...n,...et(e,n),columns:Je(t,e,[5,4,3,2],1)}}(a,{photos:e,...i}),u=s.useMemo((()=>void 0!==a&&void 0!==l&&void 0!==c&&void 0!==d?wt(e,l,c,a,d):void 0),[e,l,c,a,d]);return v.jsx(st,{layout:"masonry",ref:o,model:u,...h})}));function bt(e,t,n){const i=document.createElement(t);return e&&(i.className=e),n&&n.appendChild(i),i}function yt(e,t){return e.x=t.x,e.y=t.y,void 0!==t.id&&(e.id=t.id),e}function xt(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function qt(e,t){const n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.sqrt(n*n+i*i)}function Tt(e,t){return e.x===t.x&&e.y===t.y}function St(e,t,n){return Math.min(Math.max(e,t),n)}function Et(e,t,n){let i=`translate3d(${e}px,${t||0}px,0)`;return void 0!==n&&(i+=` scale3d(${n},${n},1)`),i}function kt(e,t,n,i){e.style.transform=Et(t,n,i)}function jt(e,t,n,i){e.style.transition=t?`${t} ${n}ms ${i||"cubic-bezier(.4,0,.22,1)"}`:"none"}function Ct(e,t,n){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof n?`${n}px`:n}function _t(e){jt(e)}function Ot(e){return"decode"in e?e.decode().catch((()=>{})):e.complete?Promise.resolve(e):new Promise(((t,n)=>{e.onload=()=>t(e),e.onerror=n}))}const Pt="idle",Nt="loading",At="loaded",It="error";function Mt(e){return"button"in e&&1===e.button||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}function Lt(e,t,n=document){let i=[];if(e instanceof Element)i=[e];else if(e instanceof NodeList||Array.isArray(e))i=Array.from(e);else{const r="string"==typeof e?e:t;r&&(i=Array.from(n.querySelectorAll(r)))}return i}function zt(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class Ft{constructor(e,t){if(this.element=bt("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(Ct(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Et(0,0,e/250)):Ct(this.element,e,t))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}}let Vt=class{constructor(e,t,n){this.instance=t,this.data=e,this.index=n,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=Pt,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.hash=this.data.hash,this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Ft(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=bt("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=bt("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const t=this.element;this.updateSrcsetSizes(),this.data.srcset&&(t.srcset=this.data.srcset),t.src=this.data.src??"",t.alt=this.data.alt??"",this.state=Nt,t.complete?this.onLoaded():(t.onload=()=>{this.onLoaded()},t.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=At,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===At||this.state===It)&&this.removePlaceholder())}onError(){this.state=It,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===Nt,this)}isError(){return this.state===It}isImageContent(){return"image"===this.type||"ad"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(Ct(this.element,e,t),this.isImageContent()&&!this.isError()))){const n=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,n?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==It,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){let e=bt("pswp__error-msg","div");e.innerText=this.instance.options?.errorMsg??"",e=this.instance.applyFilters("contentErrorElement",e,this),this.element=bt("pswp__content pswp__error-msg-container","div"),this.element.appendChild(e),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===It)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||zt())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!zt()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===At||this.state===It)&&this.removePlaceholder()))}};function Rt(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function Dt(e,t,n,i,r){let s=0;if(t.paddingFn)s=t.paddingFn(n,i,r)[e];else if(t.padding)s=t.padding[e];else{const n="padding"+e[0].toUpperCase()+e.slice(1);t[n]&&(s=t[n])}return Number(s)||0}function Bt(e,t,n,i){return{x:t.x-Dt("left",e,t,n,i)-Dt("right",e,t,n,i),y:t.y-Dt("top",e,t,n,i)-Dt("bottom",e,t,n,i)}}class Ht{constructor(e,t,n,i){this.pswp=i,this.options=e,this.itemData=t,this.index=n,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,t,n){const i={x:e,y:t};this.elementSize=i,this.panAreaSize=n;const r=n.x/i.x,s=n.y/i.y;this.fit=Math.min(1,r<s?r:s),this.fill=Math.min(1,r>s?r:s),this.vFill=Math.min(1,s),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const t=e+"ZoomLevel",n=this.options[t];if(n)return"function"==typeof n?n(this):"fill"===n?this.fill:"fit"===n?this.fit:Number(n)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function Ut(e,t,n){const i=t.createContentFromData(e,n);let r;const{options:s}=t;if(s){let o;r=new Ht(s,e,-1),o=t.pswp?t.pswp.viewportSize:Rt(s,t);const a=Bt(s,o,e,n);r.update(i.width,i.height,a)}return i.lazyLoad(),r&&i.setDisplayedSize(Math.ceil(i.width*r.initial),Math.ceil(i.height*r.initial)),i}function Wt(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return Ut(n,t,e)}class $t{constructor(e){this.pswp=e,this.limit=Math.max(e.options.preload[0]+e.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(e){const{pswp:t}=this;if(t.dispatch("lazyLoad").defaultPrevented)return;const{preload:n}=t.options,i=void 0===e||e>=0;let r;for(r=0;r<=n[1];r++)this.loadSlideByIndex(t.currIndex+(i?r:-r));for(r=1;r<=n[0];r++)this.loadSlideByIndex(t.currIndex+(i?-r:r))}loadSlideByIndex(e){const t=this.pswp.getLoopedIndex(e);let n=this.getContentByIndex(t);n||(n=Wt(t,this.pswp),n&&this.addToCache(n))}getContentBySlide(e){let t=this.getContentByIndex(e.index);return t||(t=this.pswp.createContentFromData(e.data,e.index),this.addToCache(t)),t.setSlide(e),t}addToCache(e){if(this.removeByIndex(e.index),this._cachedItems.push(e),this._cachedItems.length>this.limit){const e=this._cachedItems.findIndex((e=>!e.isAttached&&!e.hasSlide));-1!==e&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(e){const t=this._cachedItems.findIndex((t=>t.index===e));-1!==t&&this._cachedItems.splice(t,1)}getContentByIndex(e){return this._cachedItems.find((t=>t.index===e))}destroy(){this._cachedItems.forEach((e=>e.destroy())),this._cachedItems=[]}}class Yt{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}}class Gt{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,n=100){this._filters[e]||(this._filters[e]=[]),this._filters[e]?.push({fn:t,priority:n}),this._filters[e]?.sort(((e,t)=>e.priority-t.priority)),this.pswp?.addFilter(e,t,n)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter((e=>e.fn!==t))),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){return this._filters[e]?.forEach((e=>{t[0]=e.fn.apply(this,t)})),t[0]}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e]?.push(t),this.pswp?.on(e,t)}off(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((e=>t!==e))),this.pswp?.off(e,t)}dispatch(e,t){if(this.pswp)return this.pswp.dispatch(e,t);const n=new Yt(e,t);return this._listeners[e]?.forEach((e=>{e.call(this,n)})),n}}class Zt extends Gt{getNumItems(){let e=0;const t=this.options?.dataSource;t&&"length"in t?e=t.length:t&&"gallery"in t&&(t.items||(t.items=this._getGalleryDOMElements(t.gallery)),t.items&&(e=t.items.length));const n=this.dispatch("numItems",{dataSource:t,numItems:e});return this.applyFilters("numItems",n.numItems,t)}createContentFromData(e,t){return new Vt(e,this,t)}getItemData(e){const t=this.options?.dataSource;let n={};Array.isArray(t)?n=t[e]:t&&"gallery"in t&&(t.items||(t.items=this._getGalleryDOMElements(t.gallery)),n=t.items[e]);let i=n;i instanceof Element&&(i=this._domElementToItemData(i));const r=this.dispatch("itemData",{itemData:i||{},index:e});return this.applyFilters("itemData",r.itemData,e)}_getGalleryDOMElements(e){return this.options?.children||this.options?.childSelector?Lt(this.options.children,this.options.childSelector,e)||[]:[e]}_toLowerCaseFirstLetter(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}_domElementToItemData(e){const t={element:e},n="A"===e.tagName?e:e.querySelector("a");if(n){t.src=n.dataset.pswpSrc||n.href,n.dataset.pswpSrcset&&(t.srcset=n.dataset.pswpSrcset),t.width=n.dataset.pswpWidth?parseInt(n.dataset.pswpWidth,10):0,t.height=n.dataset.pswpHeight?parseInt(n.dataset.pswpHeight,10):0,n.dataset.pswpType&&(t.type=n.dataset.pswpType.toLowerCase());const i=e.querySelector("img");i&&(t.msrc=i.currentSrc||i.src,t.alt=i.getAttribute("alt")??""),(n.dataset.pswpCropped||n.dataset.cropped)&&(t.thumbCropped=!0);const r=["element","src","srcset","width","height","type","msrc","alt","thumbCropped"];Object.keys(n.dataset).filter((e=>e.startsWith("pswp")&&!r.includes(this._toLowerCaseFirstLetter(e.slice(4))))).forEach((e=>{t[this._toLowerCaseFirstLetter(e.slice(4))]=n.dataset[e]}))}return this.applyFilters("domItemData",t,e,n)}lazyLoadData(e,t){return Ut(e,this,t)}}class Kt extends Zt{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Lt(this.options.gallery,this.options.gallerySelector).forEach((e=>{e.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(e){if(Mt(e)||window.pswp)return;let t={x:e.clientX,y:e.clientY};!t.x&&!t.y&&(t=null);let n=this.getClickedIndex(e);n=this.applyFilters("clickedIndex",n,e,this);const i={gallery:e.currentTarget};n>=0&&(e.preventDefault(),this.loadAndOpen(n,i,t))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const t=e.target,n=Lt(this.options.children,this.options.childSelector,e.currentTarget).findIndex((e=>e===t||e.contains(t)));return-1!==n?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,t,n){if(window.pswp||!this.options)return!1;if(!t&&this.options.gallery&&this.options.children){const e=Lt(this.options.gallery);e[0]&&(t={gallery:e[0]})}return this.options.index=e,this.options.initialPointerPos=n,this.shouldOpen=!0,this.preload(e,t),!0}preload(e,t){const{options:n}=this;t&&(n.dataSource=t);const i=[],r=typeof n.pswpModule;if("function"==typeof(s=n.pswpModule)&&s.prototype&&s.prototype.goTo)i.push(Promise.resolve(n.pswpModule));else{if("string"===r)throw new Error("pswpModule as string is no longer supported");if("function"!==r)throw new Error("pswpModule is not valid");i.push(n.pswpModule())}var s;"function"==typeof n.openPromise&&i.push(n.openPromise()),!1!==n.preloadFirstSlide&&e>=0&&(this._preloadedContent=Wt(e,this));const o=++this._uid;Promise.all(i).then((e=>{if(this.shouldOpen){const t=e[0];this._openPhotoswipe(t,o)}}))}_openPhotoswipe(e,t){if(t!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const n="object"==typeof e?new e.default(this.options):new e(this.options);this.pswp=n,window.pswp=n,Object.keys(this._listeners).forEach((e=>{this._listeners[e]?.forEach((t=>{n.on(e,t)}))})),Object.keys(this._filters).forEach((e=>{this._filters[e]?.forEach((t=>{n.addFilter(e,t.fn,t.priority)}))})),this._preloadedContent&&(n.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),n.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),n.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},Lt(this.options.gallery,this.options.gallerySelector).forEach((e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)}))}}const Xt='url("https://res.cloudinary.com/dectzk2b2/image/upload/v1736933014/black_rpie3v.png")';class Qt{constructor(e){this.backdropOn=!1,this.lightbox=e,this.backgroundElement=null,this.backgroundVideoElement=null,this.referenceVideoElement=null,this.options={toggleBackdropButtonOrder:7},e.on("init",(()=>{this.initPswpEvents(e.pswp)}))}initPswpEvents(e){e.on("afterInit",(()=>{setTimeout((()=>{this.backgroundElement.style.display="block",this.backgroundVideoElement.style.display="block"}),[500])})),e.on("uiRegister",(()=>{e.ui.registerElement({name:"toggle-backdrop-button",title:"Toggle blur backdrop",order:this.options.toggleBackdropButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-backdrop"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-backdrop"/><path id="pswp__icn-show-backdrop" style="display:none" d="M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m0-4q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m0-4q-.425 0-.712-.288T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m0-4q-.425 0-.712-.288T5 6t.288-.712T6 5t.713.288T7 6t-.288.713T6 7m4 8.5q-.625 0-1.062-.437T8.5 14t.438-1.062T10 12.5t1.063.438T11.5 14t-.437 1.063T10 15.5m0-4q-.625 0-1.062-.437T8.5 10t.438-1.062T10 8.5t1.063.438T11.5 10t-.437 1.063T10 11.5m0 7.5q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m0-12q-.425 0-.712-.288T9 6t.288-.712T10 5t.713.288T11 6t-.288.713T10 7m0 14.5q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 12q-.625 0-1.062-.437T12.5 14t.438-1.062T14 12.5t1.063.438T15.5 14t-.437 1.063T14 15.5m0-4q-.625 0-1.062-.437T12.5 10t.438-1.062T14 8.5t1.063.438T15.5 10t-.437 1.063T14 11.5m0 7.5q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m0-12q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m0 14.5q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M18 19q-.425 0-.712-.288T17 18t.288-.712T18 17t.713.288T19 18t-.288.713T18 19m0-4q-.425 0-.712-.288T17 14t.288-.712T18 13t.713.288T19 14t-.288.713T18 15m0-4q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m0-4q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m3 7.5q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15"/><path id="pswp__icn-hide-backdrop" d="m19.1 21.9l-17-17q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l17 17q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-9.1-.4q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m4 0q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m4 0q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m-4-3.5q-.65 0-1.075-.425T8.5 14t.425-1.075T10 12.5t1.075.425T11.5 14t-.425 1.075T10 15.5M6 15q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m11.8-.025l-.775-.775q-.1-.5.213-.85T18 13q.425 0 .713.288T19 14q0 .45-.35.763t-.85.212M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m-6.7-3.05L12.55 9.7q.125-.525.5-.862T14 8.5q.65 0 1.075.425T15.5 10q0 .575-.35.963t-.85.487M6 11q-.425 0-.712-.287T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m12 0q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m-15-.5q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M14 7q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m-4.175-.025l-.8-.8q-.075-.5.225-.837T10 5q.425 0 .712.287T11 6q0 .45-.337.75t-.838.225M18 7q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m-8-3.5q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15" /></svg>',onClick:()=>{this.toggleBackdrop(e)}}),this.createBlurBackground(e)})),e.on("change",(()=>{this.backdropOn&&this.updateBlurBackground(e)})),e.on("close",(()=>{this.removeBlurBackground(),this.backdropOn=!1}))}createBlurBackground(e){const t=e.element;if(!this.backgroundElement){const e=document.createElement("div");e.style.position="fixed",e.style.top=0,e.style.left=0,e.style.width="100vw",e.style.height="100vh",e.style.backgroundSize="cover",e.style.backgroundPosition="center",e.style.filter="blur(64px)",e.style.zIndex=-1,e.style.transition="background-image 0.5s ease, opacity 0.5s ease",e.style.display="none",e.style.backgroundImage=Xt,t.append(e),this.backgroundElement=e}if(!this.backgroundVideoElement){const e=document.createElement("video");e.style.position="fixed",e.style.top=0,e.style.left=0,e.style.width="100vw",e.style.height="100vh",e.style.objectFit="cover",e.style.filter="blur(64px)",e.style.zIndex=-1,e.style.display="none",e.style.transition="opacity 0.5s ease",e.muted=!0,e.loop=!0,e.autoplay=!1,e.muted=!0,e.volume=0,t.append(e),this.backgroundVideoElement=e}}toggleBackdrop(e){this.backdropOn?(this.backgroundElement.style.backgroundImage=Xt,this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.pause(),this.backdropOn=!1):(this.updateBlurBackground(e),this.backdropOn=!0),document.querySelector("#pswp__icn-hide-backdrop").style.display=this.backdropOn?"none":"inline",document.querySelector("#pswp__icn-show-backdrop").style.display=this.backdropOn?"inline":"none"}updateBlurBackground(e){const t=e.currSlide;if(t?.data)if("video"===t.data.type){const e=this.backgroundVideoElement,n=t.content.element;"video"===n?.tagName?.toLowerCase()&&(this.referenceVideoElement=n,this.registerVideoEvents(n,e)),e.style.opacity=0,setTimeout((()=>{e.src=t.data.src,e.load(),this.initBackgroundVideo(),e.style.opacity=1}),500),this.backgroundElement&&(this.backgroundElement.style.opacity=0)}else this.backgroundElement&&(this.backgroundElement.style.backgroundImage=`url('${t.data.thumbnailUrl}')`,this.backgroundElement.style.opacity=1),this.backgroundVideoElement&&(this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.src="")}initBackgroundVideo(){this.referenceVideoElement&&(this.backgroundVideoElement.currentTime=this.referenceVideoElement.currentTime,this.referenceVideoElement.currentTime>0&&!this.referenceVideoElement.paused&&!this.referenceVideoElement.ended&&this.referenceVideoElement.readyState>2&&this.backgroundVideoElement.play())}removeBlurBackground(){this.backgroundElement&&(this.backgroundElement.remove(),this.backgroundVideoElement.remove(),this.backgroundElement=null,this.backgroundVideoElement=null)}registerVideoEvents(e,t){this.foregroundVideoElement=e,e.addEventListener("play",(()=>{t.currentTime=e.currentTime,t.play()})),e.addEventListener("pause",(()=>{t.pause()})),e.addEventListener("ended",(()=>{t.pause(),t.currentTime=0}))}}const Jt={[c.LINK]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h6q.425 0 .713.288T12 4t-.288.713T11 5H5v14h14v-6q0-.425.288-.712T20 12t.713.288T21 13v6q0 .825-.587 1.413T19 21zM19 6.4L10.4 15q-.275.275-.7.275T9 15t-.275-.7t.275-.7L17.6 5H15q-.425 0-.712-.288T14 4t.288-.712T15 3h5q.425 0 .713.288T21 4v5q0 .425-.288.713T20 10t-.712-.288T19 9z"/></svg>',[c.EMAIL]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12v1.45q0 1.475-1.012 2.513T18.5 17q-.875 0-1.65-.375t-1.3-1.075q-.725.725-1.638 1.088T12 17q-2.075 0-3.537-1.463T7 12t1.463-3.537T12 7t3.538 1.463T17 12v1.45q0 .65.425 1.1T18.5 15t1.075-.45t.425-1.1V12q0-3.35-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20h4q.425 0 .713.288T17 21t-.288.713T16 22zm0-7q1.25 0 2.125-.875T15 12t-.875-2.125T12 9t-2.125.875T9 12t.875 2.125T12 15"/></svg>',[c.PHONE]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M19.95 21q-3.125 0-6.175-1.362t-5.55-3.863t-3.862-5.55T3 4.05q0-.45.3-.75t.75-.3H8.1q.35 0 .625.238t.325.562l.65 3.5q.05.4-.025.675T9.4 8.45L6.975 10.9q.5.925 1.187 1.787t1.513 1.663q.775.775 1.625 1.438T13.1 17l2.35-2.35q.225-.225.588-.337t.712-.063l3.45.7q.35.1.575.363T21 15.9v4.05q0 .45-.3.75t-.75.3M6.025 9l1.65-1.65L7.25 5H5.025q.125 1.025.35 2.025T6.025 9m8.95 8.95q.975.425 1.988.675T19 18.95v-2.2l-2.35-.475zm0 0"/></svg>',[c.SMS]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="m6 18l-2.3 2.3q-.475.475-1.088.213T2 19.575V4q0-.825.588-1.412T4 2h16q.825 0 1.413.588T22 4v12q0 .825-.587 1.413T20 18zm-.85-2H20V4H4v13.125zM4 16V4zm4-5q.425 0 .713-.288T9 10t-.288-.712T8 9t-.712.288T7 10t.288.713T8 11m4 0q.425 0 .713-.288T13 10t-.288-.712T12 9t-.712.288T11 10t.288.713T12 11m4 0q.425 0 .713-.288T17 10t-.288-.712T16 9t-.712.288T15 10t.288.713T16 11"/></svg>',[c.WHATSAPP]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 258"><defs><linearGradient id="logosWhatsappIcon0" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#1faf38"/><stop offset="100%" stop-color="#60d669"/></linearGradient><linearGradient id="logosWhatsappIcon1" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#f9f9f9"/><stop offset="100%" stop-color="#fff"/></linearGradient></defs><path fill="url(#logosWhatsappIcon0)" d="M5.463 127.456c-.006 21.677 5.658 42.843 16.428 61.499L4.433 252.697l65.232-17.104a123 123 0 0 0 58.8 14.97h.054c67.815 0 123.018-55.183 123.047-123.01c.013-32.867-12.775-63.773-36.009-87.025c-23.23-23.25-54.125-36.061-87.043-36.076c-67.823 0-123.022 55.18-123.05 123.004"/><path fill="url(#logosWhatsappIcon1)" d="M1.07 127.416c-.007 22.457 5.86 44.38 17.014 63.704L0 257.147l67.571-17.717c18.618 10.151 39.58 15.503 60.91 15.511h.055c70.248 0 127.434-57.168 127.464-127.423c.012-34.048-13.236-66.065-37.3-90.15C194.633 13.286 162.633.014 128.536 0C58.276 0 1.099 57.16 1.071 127.416m40.24 60.376l-2.523-4.005c-10.606-16.864-16.204-36.352-16.196-56.363C22.614 69.029 70.138 21.52 128.576 21.52c28.3.012 54.896 11.044 74.9 31.06c20.003 20.018 31.01 46.628 31.003 74.93c-.026 58.395-47.551 105.91-105.943 105.91h-.042c-19.013-.01-37.66-5.116-53.922-14.765l-3.87-2.295l-40.098 10.513z"/><path fill="#fff" d="M96.678 74.148c-2.386-5.303-4.897-5.41-7.166-5.503c-1.858-.08-3.982-.074-6.104-.074c-2.124 0-5.575.799-8.492 3.984c-2.92 3.188-11.148 10.892-11.148 26.561s11.413 30.813 13.004 32.94c1.593 2.123 22.033 35.307 54.405 48.073c26.904 10.609 32.379 8.499 38.218 7.967c5.84-.53 18.844-7.702 21.497-15.139c2.655-7.436 2.655-13.81 1.859-15.142c-.796-1.327-2.92-2.124-6.105-3.716s-18.844-9.298-21.763-10.361c-2.92-1.062-5.043-1.592-7.167 1.597c-2.124 3.184-8.223 10.356-10.082 12.48c-1.857 2.129-3.716 2.394-6.9.801c-3.187-1.598-13.444-4.957-25.613-15.806c-9.468-8.442-15.86-18.867-17.718-22.056c-1.858-3.184-.199-4.91 1.398-6.497c1.431-1.427 3.186-3.719 4.78-5.578c1.588-1.86 2.118-3.187 3.18-5.311c1.063-2.126.531-3.986-.264-5.579c-.798-1.593-6.987-17.343-9.819-23.64"/></svg>',[c.MESSENGER]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 256"><defs><radialGradient id="logosMessenger0" cx="19.247%" cy="99.465%" r="108.96%" fx="19.247%" fy="99.465%"><stop offset="0%" stop-color="#09f"/><stop offset="60.975%" stop-color="#a033ff"/><stop offset="93.482%" stop-color="#ff5280"/><stop offset="100%" stop-color="#ff7061"/></radialGradient></defs><path fill="url(#logosMessenger0)" d="M128 0C55.894 0 0 52.818 0 124.16c0 37.317 15.293 69.562 40.2 91.835c2.09 1.871 3.352 4.493 3.438 7.298l.697 22.77c.223 7.262 7.724 11.988 14.37 9.054L84.111 243.9a10.22 10.22 0 0 1 6.837-.501c11.675 3.21 24.1 4.92 37.052 4.92c72.106 0 128-52.818 128-124.16S200.106 0 128 0"/><path fill="#fff" d="m51.137 160.47l37.6-59.653c5.98-9.49 18.788-11.853 27.762-5.123l29.905 22.43a7.68 7.68 0 0 0 9.252-.027l40.388-30.652c5.39-4.091 12.428 2.36 8.82 8.085l-37.6 59.654c-5.981 9.489-18.79 11.852-27.763 5.122l-29.906-22.43a7.68 7.68 0 0 0-9.25.027l-40.39 30.652c-5.39 4.09-12.427-2.36-8.818-8.085"/></svg>'};class en{constructor(e,t,n){this.lightbox=e,this.captureAdImpression=t,this.captureAdClick=n,this.captionOn=!0,this.options={captionButtonOrder:8},e.on("init",(()=>{this.initPswpEvents(e.pswp)}))}initPswpEvents(e){e.on("uiRegister",(()=>{e.ui.registerElement({name:"caption-toggle-button",title:"Toggle caption view",order:this.options.captionButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn qc-p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-caption"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-caption"/><path id="pswp__icn-show-caption" d="M5 20q-.825 0-1.412-.587T3 18V6q0-.825.588-1.412T5 4h14q.825 0 1.413.588T21 6v12q0 .825-.587 1.413T19 20zm0-2h14V6H5zm2-3h3q.425 0 .713-.288T11 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T11 10.5V10q0-.425-.288-.712T10 9H7q-.425 0-.712.288T6 10v4q0 .425.288.713T7 15m10-6h-3q-.425 0-.712.288T13 10v4q0 .425.288.713T14 15h3q.425 0 .713-.288T18 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T18 10.5V10q0-.425-.288-.712T17 9M5 18V6z"/><path id="pswp__icn-hide-caption" style="display:none" d="m9.025 9l1.5 1.5H7.5v3h2q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375v.5q0 .425-.288.713T10 15H7q-.425 0-.712-.288T6 14v-4q0-.425.288-.712T7 9zM21 6v10q0 .5-.325.763t-.7.262t-.675-.262T19 16V6H8.975q-.5 0-.75-.312T7.975 5t.25-.687t.75-.313H19q.825 0 1.413.588T21 6m-3 8q0 .225-.088.438t-.262.337L16.375 13.5h.125q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375zm-1-5q.425 0 .713.288T18 10v.5q0 .225-.15.375t-.375.15h-.45q-.225 0-.375-.15t-.15-.375h-2v1.125l-1.5-1.5V10q0-.425.288-.712T14 9zM5 20q-.825 0-1.412-.587T3 18V6q0-.625.338-1.112t.862-.713L6.025 6H5v12h10.175L1.375 4.225q-.3-.3-.3-.712t.3-.713t.713-.3t.712.3l18.375 18.375q.3.3.3.713t-.3.712t-.712.3t-.713-.3L17.175 20z"/></svg>',onClick:()=>{this.toggleCaption(e)}}),e.ui.registerElement({name:"custom-caption",isButton:!1,appendTo:"root",html:'<div id="pswp-caption-container" class="qc-absolute qc-bottom-0 qc-w-full"></div>'})})),e.on("change",(()=>{this.captionOn&&this.updateCaption(e)})),e.on("close",(()=>{this.clearCaption()}))}toggleCaption(e){this.captionOn?this.clearCaption():this.updateCaption(e),this.captionOn=!this.captionOn,document.querySelector("#pswp__icn-show-caption").style.display=this.captionOn?"inline":"none",document.querySelector("#pswp__icn-hide-caption").style.display=this.captionOn?"none":"inline"}createCaptionHTML(e){const{id:t,type:n,caption:i,title:r,description:s,targetType:o,targetText:a,targetUrl:l}=e||{};switch("ad"===n&&this.captureAdImpression&&this.captureAdImpression(t),n){case"image":case"video":return i?.length>0?`\n <div class="qc-w-full qc-bg-black qc-bg-opacity-50 qc-p-4 qc-text-gray-300">\n <h3 class="qc-text-center sm:qc-text-lg">${i}</h3>\n </div>\n `:"";case"ad":return`\n <div class="qc-w-full qc-bg-black/85 qc-p-4 qc-text-white">\n <div class="qc-mx-auto qc-w-full qc-max-w-2xl qc-space-y-2 qc-text-center">\n <h3 class="qc-text-center sm:qc-text-lg">${r||""}</h3>\n <h4 class="qc-pb-2 qc-text-center qc-text-sm sm:qc-text-base">${s||""}</h4>\n <button\n class="qc-flex qc-w-full qc-items-center qc-justify-center qc-gap-3 qc-rounded-md qc-bg-white qc-py-1 qc-text-lg qc-text-black qc-caption-action-button"\n data-id="${t}"\n data-target-type="${o||c.LINK}"\n data-target-url="${l||""}">\n ${Jt[o||c.LINK]}\n ${a||""}\n </button>\n </div>\n </div>\n `;default:return""}}updateCaption(e){try{const t=document.getElementById("pswp-caption-container");if(!t)return;const n=e.currSlide?.data,i=this.createCaptionHTML(n);t.innerHTML=i;const r=t.querySelector(".qc-caption-action-button");r&&r.addEventListener("click",(e=>{const t=e.currentTarget.dataset.id,n=e.currentTarget.dataset.targetType,i=e.currentTarget.dataset.targetUrl;this.captureAdClick&&t&&this.captureAdClick(t,n,i)}))}catch(e){console.error("Error rendering caption:",e)}}clearCaption(){const e=document.getElementById("pswp-caption-container");e&&(e.innerHTML="")}}class tn{constructor(e){this.lightbox=e,this.fullscreen=!1,this.options={fullScreenButtonOrder:7},e.on("init",(()=>{this.initPswpEvents(e.pswp)}))}initPswpEvents(e){e.on("uiRegister",(()=>{!document.fullscreenEnabled&&!document.webkitFullscreenEnabled&&!document.mozFullScreenEnabled&&!document.msFullscreenEnabled||e.ui.registerElement({name:"fullscreen-button",title:"Toggle fullscreen view",order:this.options.fullScreenButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-1" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-fullscreen"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-exit-fullscreen"/><path id="pswp__icn-fullscreen" d="M5 19h2q.425 0 .713.288T8 20t-.288.713T7 21H4q-.425 0-.712-.288T3 20v-3q0-.425.288-.712T4 16t.713.288T5 17zm14 0v-2q0-.425.288-.712T20 16t.713.288T21 17v3q0 .425-.288.713T20 21h-3q-.425 0-.712-.288T16 20t.288-.712T17 19zM5 5v2q0 .425-.288.713T4 8t-.712-.288T3 7V4q0-.425.288-.712T4 3h3q.425 0 .713.288T8 4t-.288.713T7 5zm14 0h-2q-.425 0-.712-.288T16 4t.288-.712T17 3h3q.425 0 .713.288T21 4v3q0 .425-.288.713T20 8t-.712-.288T19 7z"/><path id="pswp__icn-exit-fullscreen" style="display:none" d="M6 18H4q-.425 0-.712-.288T3 17t.288-.712T4 16h3q.425 0 .713.288T8 17v3q0 .425-.288.713T7 21t-.712-.288T6 20zm12 0v2q0 .425-.288.713T17 21t-.712-.288T16 20v-3q0-.425.288-.712T17 16h3q.425 0 .713.288T21 17t-.288.713T20 18zM6 6V4q0-.425.288-.712T7 3t.713.288T8 4v3q0 .425-.288.713T7 8H4q-.425 0-.712-.288T3 7t.288-.712T4 6zm12 0h2q.425 0 .713.288T21 7t-.288.713T20 8h-3q-.425 0-.712-.288T16 7V4q0-.425.288-.712T17 3t.713.288T18 4z"/></svg>',onClick:()=>{this.toggleFullscreen(e)}})}))}toggleFullscreen(e){const t=e.element;this.fullscreen?(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),e.options.showHideAnimationType="zoom",this.fullscreen=!1):(t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen(),e.options.showHideAnimationType="fade",this.fullscreen=!0),document.querySelector("#pswp__icn-exit-fullscreen").style.display=this.fullscreen?"inline":"none",document.querySelector("#pswp__icn-fullscreen").style.display=this.fullscreen?"none":"inline"}}
|
|
2
|
+
/*! Slideshow plugin for PhotoSwipe v5. https://github.com/htmltiger/photoswipe-slideshow */class nn{constructor(e,t={}){this.lightbox=e,this.autoHideTimer=null,this.uiVisible=!0,this.options=Object.assign({defaultDelayMs:4e3,playPauseButtonOrder:9,progressBarPosition:"top",progressBarTransition:"ease",restartOnSlideChange:!0,autoHideProgressBar:!0},t),this.setSlideshowLength(Number(localStorage.getItem("pswp_delay"))||this.options.defaultDelayMs),document.head.insertAdjacentHTML("beforeend",`<style>.pswp__progress-bar{position:fixed;${this.options.progressBarPosition}:0;width:0;height:0}.pswp__progress-bar.running{width:100%;height:2px;transition-property:width;background:#ff4800}</style>`),this.slideshowIsRunning=!1,this.slideshowTimerID=null,this.wakeLockIsRunning=!1,this.wakeLockSentinel=null,this.lightbox.on("init",(()=>{this.init(this.lightbox.pswp)}))}init(e){e.on("uiRegister",(()=>{e.ui.registerElement({name:"playpause-button",title:"Toggle slideshow (Space)\nChange delay with +/- while running",order:this.options.playPauseButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-play"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-stop"/><path id="pswp__icn-play" d="M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"/><path id="pswp__icn-stop" style="display:none" d="M16 19q-.825 0-1.412-.587T14 17V7q0-.825.588-1.412T16 5t1.413.588T18 7v10q0 .825-.587 1.413T16 19m-8 0q-.825 0-1.412-.587T6 17V7q0-.825.588-1.412T8 5t1.413.588T10 7v10q0 .825-.587 1.413T8 19"/></svg>',onClick:()=>{this.setSlideshowState()}}),e.ui.registerElement({name:"playtime",appendTo:"wrapper",tagName:"div",className:"pswp__progress-bar"}),e.events.add(document,"keydown",(e=>{switch(e.code){case"Space":this.setSlideshowState(),e.preventDefault();break;case"ArrowUp":case"NumpadAdd":case"Equal":this.changeSlideshowLength(1e3),e.preventDefault();break;case"ArrowDown":case"NumpadSubtract":case"Minus":this.changeSlideshowLength(-1e3),e.preventDefault()}}))})),this.lightbox.on("change",(()=>{this.slideshowIsRunning&&this.options.restartOnSlideChange&&this.goToNextSlideAfterTimeout()})),this.lightbox.on("close",(()=>{this.slideshowIsRunning&&this.setSlideshowState()}))}showUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.add("pswp--ui-visible"),this.uiVisible=!0}stopAutoHideTimer(){this.autoHideTimer&&(clearTimeout(this.autoHideTimer),this.autoHideTimer=null)}hideUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.remove("pswp--ui-visible"),this.uiVisible=!1}resetAutoHideTimer(){this.autoHideTimer&&clearTimeout(this.autoHideTimer),this.autoHideTimer=setTimeout((()=>{this.slideshowIsRunning&&this.hideUI(),this.autoHideTimer=null}),[3e3])}setSlideshowState(){this.slideshowIsRunning=!this.slideshowIsRunning,this.slideshowIsRunning?(this.goToNextSlideAfterTimeout(),this.showUI(),this.resetAutoHideTimer(),document.addEventListener("touchstart",(()=>{this.stopAutoHideTimer(),this.showUI()})),document.addEventListener("touchend",(()=>{this.resetAutoHideTimer()})),document.addEventListener("mousemove",(()=>{this.uiVisible||this.showUI(),this.resetAutoHideTimer()}))):(this.showUI(),this.resetSlideshow(),this.stopAutoHideTimer()),document.querySelector("#pswp__icn-stop").style.display=this.slideshowIsRunning?"inline":"none",document.querySelector("#pswp__icn-play").style.display=this.slideshowIsRunning?"none":"inline",document.querySelector(".pswp__progress-bar").style.opacity=this.options.autoHideProgressBar?null:1,this.toggleWakeLock()}setSlideshowLength(e){this.options.defaultDelayMs=Math.min(Math.max(e,1e3),2147483647),this.options.defaultDelayMs!=e&&localStorage.setItem("pswp_delay",this.options.defaultDelayMs)}changeSlideshowLength(e){if(!this.slideshowIsRunning)return;this.setSlideshowLength(this.options.defaultDelayMs+e),localStorage.setItem("pswp_delay",this.options.defaultDelayMs);const t=document.querySelector(".pswp__counter");t&&(t.innerHTML=this.options.defaultDelayMs/1e3+"s"),this.goToNextSlideAfterTimeout()}isVideoContent(e){return"video"===e?.data?.type}getSlideTimeout(){const e=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(e)){const t=e.element;if(t.paused)return this.options.defaultDelayMs;const n=t.duration,i=t.currentTime;return isNaN(n)||isNaN(i)?this.options.defaultDelayMs:1e3*(n-i)}return this.options.defaultDelayMs}slideContentHasLoaded(){const e=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(e)){const t=e.element;return t.ended||t.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA&&[HTMLMediaElement.NETWORK_IDLE,HTMLMediaElement.NETWORK_LOADING].includes(t.networkState)}return!e.isLoading()}goToNextSlideAfterTimeout(){if(this.resetSlideshow(),this.slideContentHasLoaded()){const e=this.getSlideTimeout();this.slideshowTimerID=setTimeout((()=>{this.lightbox.pswp.next(),this.options.restartOnSlideChange||this.goToNextSlideAfterTimeout()}),e),setTimeout((()=>{this.slideshowIsRunning&&this.toggleProgressBar(e)}),100)}else this.slideshowTimerID=setTimeout((()=>{this.goToNextSlideAfterTimeout()}),200)}getSlideTransition(){return this.isVideoContent(this.lightbox.pswp.currSlide.content)?"linear":this.options.progressBarTransition}toggleProgressBar(e){const t=document.querySelector(".pswp__progress-bar");e?(t.style.transitionTimingFunction=this.getSlideTransition(),t.style.transitionDuration=`${e}ms`,t.classList.add("running")):t.classList.remove("running")}toggleWakeLock(){this.wakeLockIsRunning!=this.slideshowIsRunning&&("keepAwake"in screen?screen.keepAwake=this.slideshowIsRunning:"wakeLock"in navigator&&(this.wakeLockSentinel?this.wakeLockSentinel.release().then((()=>(this.wakeLockSentinel=null,!0))).catch((e=>console.error(e))):navigator.wakeLock.request("screen").then((e=>(this.wakeLockSentinel=e,this.wakeLockSentinel.addEventListener("release",(()=>{this.wakeLockSentinel=null,this.wakeLockIsRunning=!1})),!0))).catch((e=>{}))),this.wakeLockIsRunning=this.slideshowIsRunning)}resetSlideshow(){this.toggleProgressBar(),this.slideshowTimerID&&(clearTimeout(this.slideshowTimerID),this.slideshowTimerID=null)}}const rn={videoAttributes:{controls:"",playsinline:"",muted:"",preload:"auto"},autoplay:!0,preventDragOffset:40};function sn(e){return e&&e.data&&"video"===e.data.type}class on{constructor(e,t){this.options=t,this.initLightboxEvents(e),e.on("init",(()=>{this.initPswpEvents(e.pswp)}))}initLightboxEvents(e){e.on("contentLoad",this.onContentLoad.bind(this)),e.on("contentDestroy",this.onContentDestroy.bind(this)),e.on("contentActivate",this.onContentActivate.bind(this)),e.on("contentDeactivate",this.onContentDeactivate.bind(this)),e.on("contentAppend",this.onContentAppend.bind(this)),e.on("contentResize",this.onContentResize.bind(this)),e.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),e.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),e.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),e.addFilter("domItemData",((e,t,n)=>("video"===e.type&&n&&(n.dataset.pswpVideoSources?e.videoSources=JSON.parse(n.dataset.pswpVideoSources):n.dataset.pswpVideoSrc?e.videoSrc=n.dataset.pswpVideoSrc:e.videoSrc=n.href),e)))}initPswpEvents(e){e.on("pointerDown",(t=>{const n=e.currSlide;if(sn(n)&&this.options.preventDragOffset){const i=t.originalEvent;if("pointerdown"===i.type){const r=Math.ceil(n.height*n.currZoomLevel)+n.bounds.center.y,s=i.pageY-e.offset.y;s>r-this.options.preventDragOffset&&s<r&&t.preventDefault()}}})),e.on("appendHeavy",(e=>{sn(e.slide)&&!e.slide.isActive&&e.preventDefault()})),e.on("close",(()=>{sn(e.currSlide.content)&&this.pauseVideo(e.currSlide.content)}))}onContentDestroy({content:e}){sn(e)&&e._videoPosterImg&&(e._videoPosterImg.onload=e._videoPosterImg.onerror=null,e._videoPosterImg=null)}onContentResize(e){if(sn(e.content)){e.preventDefault();const t=e.width,n=e.height,i=e.content;if(i.element&&(i.element.style.width=t+"px",i.element.style.height=n+"px"),i.slide&&i.slide.placeholder){const e=i.slide.placeholder.element.style;e.transform="none",e.width=t+"px",e.height=n+"px"}}}isKeepingPlaceholder(e,t){return!sn(t)&&e}isContentZoomable(e,t){return!sn(t)&&e}onContentActivate({content:e}){sn(e)&&this.options.autoplay&&this.playVideo(e)}onContentDeactivate({content:e}){sn(e)&&this.pauseVideo(e)}onContentAppend(e){sn(e.content)&&(e.preventDefault(),e.content.isAttached=!0,e.content.appendImage())}onContentLoad(e){const t=e.content;if(sn(e.content)&&(e.preventDefault(),!t.element)){if(t.state="loading",t.type="video",t.element=document.createElement("video"),this.options.videoAttributes)for(let e in this.options.videoAttributes)t.element.setAttribute(e,this.options.videoAttributes[e]||"");t.element.setAttribute("poster",t.data.msrc),this.preloadVideoPoster(t,t.data.msrc),t.element.style.position="relative",t.element.style.left=0,t.element.style.top=0,t.data.videoSources?t.data.videoSources.forEach((e=>{let n=document.createElement("source");n.src=e.src,n.type=e.type,t.element.appendChild(n)})):t.data.videoSrc&&(t.element.src=t.data.videoSrc)}}preloadVideoPoster(e,t){!e._videoPosterImg&&t&&(e._videoPosterImg=new Image,e._videoPosterImg.src=t,e._videoPosterImg.complete?e.onLoaded():e._videoPosterImg.onload=e._videoPosterImg.onerror=()=>{e.onLoaded()})}playVideo(e){e.element&&e.element.play()}pauseVideo(e){e.element&&e.element.pause()}useContentPlaceholder(e,t){return!!sn(t)||e}}class an{constructor(e,t={}){new on(e,{...rn,...t})}}const ln=({ad:e,onClose:t,captureAdClick:n})=>v.jsx(ie,{open:!!e,onOpenChange:e=>!e&&t(),children:v.jsxs(re,{children:[v.jsxs(se,{className:"qc-hidden",children:[v.jsx(oe,{children:e?.title}),v.jsx(ae,{children:e?.description})]}),v.jsxs("div",{className:"qc-flex qc-max-w-lg qc-flex-col qc-overflow-hidden",children:[v.jsx("img",{className:"qc-h-auto qc-max-h-96 qc-w-full qc-object-contain",src:e?.imageUrl,alt:"Image not found"}),v.jsxs("div",{className:"qc-flex qc-flex-col qc-gap-2 qc-p-3",children:[v.jsx(N,{variant:"h4",align:"center",lines:2,children:e?.title}),v.jsx(N,{variant:"body3",color:"secondary",align:"center",lines:6,children:e?.description})]}),v.jsx(L,{fullWidth:!0,className:"qc-rounded-t-none",onClick:()=>n(e._id,e.targetType,e.targetUrl),icon:z[e?.targetType??c.LINK],children:e?.targetText})]})]})}),cn=({url:e,alt:t="",thumbnailUrl:n,blurhash:i,pswpData:r={},curateLink:o,onClick:a})=>{const l=v.jsxs(s.Fragment,{children:[v.jsx(qe,{threshold:.1,src:n||e,blurhash:i,alt:t}),r.type===w.VIDEO&&v.jsx("div",{className:"qc-absolute qc-left-0 qc-top-0 qc-flex qc-size-full qc-items-center qc-justify-center qc-opacity-75",children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc-size-16 qc-text-white lg:qc-size-24",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})})]});return a?v.jsx("button",{className:"qc-size-full",onClick:a,children:l}):o?v.jsx(I,{className:"qc-size-full",to:o,children:l}):v.jsx("a",{href:e,className:"qc-pswp-item qc-size-full",...Object.keys(r).reduce(((e,t)=>(e[`data-pswp-${(e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())(t)}`]=r[t],e)),{}),target:"_blank",rel:"noreferrer",children:l})},dn=({style:e,content:t,curateLink:n,onAdClick:i})=>{const{captureAdImpression:r,captureAdEngagement:s,captureAdClick:o}=Ee();return v.jsxs("div",{style:e,className:"qc-group qc-relative qc-mb-1 qc-overflow-hidden qc-rounded",children:[v.jsx(Te,{as:"div",className:"qc-size-full",threshold:.8,triggerOnce:!0,onChange:e=>{e&&r(t._id)},onClick:()=>s(t._id),children:v.jsx(cn,{url:t.src,thumbnailUrl:t.src,blurhash:t.blurhash,alt:t.caption,onClick:n?i:null,pswpData:{id:t._id,type:w.AD,hash:t._id,width:t.width,height:t.height,title:t.title,description:t.description,targetType:t.targetType,targetText:t.targetText,targetUrl:t.targetUrl,thumbnailUrl:t.imageUrl,blurhash:t.blurhash}})}),v.jsx("div",{className:"qc-transition-opacity qc-duration-500 group-hover:qc-opacity-100 sm:qc-opacity-0",children:v.jsxs("div",{className:"qc-text-primary qc-bg-primary qc-absolute qc-bottom-0 qc-w-full qc-flex-col qc-items-center qc-justify-between qc-bg-opacity-75 sm:qc-flex sm:qc-flex-row",children:[v.jsx("h3",{className:"qc-text-primary qc-line-clamp-2 qc-p-2 qc-text-sm qc-font-medium sm:qc-ml-3 sm:qc-line-clamp-1 sm:qc-p-0",children:t.title}),t?.targetType!==c.NONE&&v.jsx(L,{immutable:!0,className:"qc-w-full qc-text-nowrap qc-rounded-t-none qc-py-1 sm:qc-w-auto sm:qc-rounded-t-none sm:qc-rounded-bl-none sm:qc-py-2",onClick:()=>o(t._id,t.targetType,t.targetUrl),icon:z[t?.targetType??c.LINK],children:t?.targetText})]})})]})};var hn=s.forwardRef(((e,t)=>{const{children:n,width:i=10,height:r=5,...s}=e;return v.jsx(le.svg,{...s,ref:t,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})}));hn.displayName="Arrow";var un=hn;var pn="Popper",[mn,fn]=de(pn),[gn,wn]=mn(pn),vn=e=>{const{__scopePopper:t,children:n}=e,[i,r]=s.useState(null);return v.jsx(gn,{scope:t,anchor:i,onAnchorChange:r,children:n})};vn.displayName=pn;var bn="PopperAnchor",yn=s.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:i,...r}=e,o=wn(bn,n),a=s.useRef(null),l=V(t,a);return s.useEffect((()=>{o.onAnchorChange(i?.current||a.current)})),i?null:v.jsx(le.div,{...r,ref:l})}));yn.displayName=bn;var xn="PopperContent",[qn,Tn]=mn(xn),Sn=s.forwardRef(((e,t)=>{const{__scopePopper:n,side:i="bottom",sideOffset:r=0,align:o="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:h=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:f,...g}=e,w=wn(xn,n),[b,y]=s.useState(null),x=V(t,(e=>y(e))),[q,T]=s.useState(null),S=function(e){const[t,n]=s.useState(void 0);return ce((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const i=t[0];let r,s;if("borderBoxSize"in i){const e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,s=t.blockSize}else r=e.offsetWidth,s=e.offsetHeight;n({width:r,height:s})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(q),E=S?.width??0,k=S?.height??0,j=i+("center"!==o?"-"+o:""),C="number"==typeof h?h:{top:0,right:0,bottom:0,left:0,...h},_=Array.isArray(d)?d:[d],O=_.length>0,P={padding:C,boundary:_.filter(Cn),altBoundary:O},{refs:N,floatingStyles:A,placement:I,isPositioned:M,middlewareData:L}=Y({strategy:"fixed",placement:j,whileElementsMounted:(...e)=>te(...e,{animationFrame:"always"===m}),elements:{reference:w.anchor},middleware:[G({mainAxis:r+k,alignmentAxis:a}),c&&Z({mainAxis:!0,crossAxis:!1,limiter:"partial"===u?ee():void 0,...P}),c&&K({...P}),X({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:i})=>{const{width:r,height:s}=t.reference,o=e.floating.style;o.setProperty("--radix-popper-available-width",`${n}px`),o.setProperty("--radix-popper-available-height",`${i}px`),o.setProperty("--radix-popper-anchor-width",`${r}px`),o.setProperty("--radix-popper-anchor-height",`${s}px`)}}),q&&Q({element:q,padding:l}),_n({arrowWidth:E,arrowHeight:k}),p&&J({strategy:"referenceHidden",...P})]}),[z,F]=On(I),R=he(f);ce((()=>{M&&R?.()}),[M,R]);const D=L.arrow?.x,B=L.arrow?.y,H=0!==L.arrow?.centerOffset,[U,W]=s.useState();return ce((()=>{b&&W(window.getComputedStyle(b).zIndex)}),[b]),v.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:M?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(qn,{scope:n,placedSide:z,onArrowChange:T,arrowX:D,arrowY:B,shouldHideArrow:H,children:v.jsx(le.div,{"data-side":z,"data-align":F,...g,ref:x,style:{...g.style,animation:M?void 0:"none"}})})})}));Sn.displayName=xn;var En="PopperArrow",kn={top:"bottom",right:"left",bottom:"top",left:"right"},jn=s.forwardRef((function(e,t){const{__scopePopper:n,...i}=e,r=Tn(En,n),s=kn[r.placedSide];return v.jsx("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:v.jsx(un,{...i,ref:t,style:{...i.style,display:"block"}})})}));function Cn(e){return null!==e}jn.displayName=En;var _n=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:r}=t,s=0!==r.arrow?.centerOffset,o=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,c]=On(n),d={start:"0%",center:"50%",end:"100%"}[c],h=(r.arrow?.x??0)+o/2,u=(r.arrow?.y??0)+a/2;let p="",m="";return"bottom"===l?(p=s?d:`${h}px`,m=-a+"px"):"top"===l?(p=s?d:`${h}px`,m=`${i.floating.height+a}px`):"right"===l?(p=-a+"px",m=s?d:`${u}px`):"left"===l&&(p=`${i.floating.width+a}px`,m=s?d:`${u}px`),{data:{x:p,y:m}}}});function On(e){const[t,n="center"]=e.split("-");return[t,n]}var Pn=vn,Nn=yn,An=Sn,In=jn,Mn="Popover",[Ln,zn]=de(Mn,[fn]),Fn=fn(),[Vn,Rn]=Ln(Mn),Dn=e=>{const{__scopePopover:t,children:n,open:i,defaultOpen:r,onOpenChange:o,modal:a=!1}=e,l=Fn(t),c=s.useRef(null),[d,h]=s.useState(!1),[u,p]=ye({prop:i,defaultProp:r??!1,onChange:o,caller:Mn});return v.jsx(Pn,{...l,children:v.jsx(Vn,{scope:t,contentId:xe(),triggerRef:c,open:u,onOpenChange:p,onOpenToggle:s.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:d,onCustomAnchorAdd:s.useCallback((()=>h(!0)),[]),onCustomAnchorRemove:s.useCallback((()=>h(!1)),[]),modal:a,children:n})})};Dn.displayName=Mn;var Bn="PopoverAnchor";s.forwardRef(((e,t)=>{const{__scopePopover:n,...i}=e,r=Rn(Bn,n),o=Fn(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=r;return s.useEffect((()=>(a(),()=>l())),[a,l]),v.jsx(Nn,{...o,...i,ref:t})})).displayName=Bn;var Hn="PopoverTrigger",Un=s.forwardRef(((e,t)=>{const{__scopePopover:n,...i}=e,r=Rn(Hn,n),s=Fn(n),o=V(t,r.triggerRef),a=v.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ni(r.open),...i,ref:o,onClick:ge(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:v.jsx(Nn,{asChild:!0,...s,children:a})}));Un.displayName=Hn;var Wn="PopoverPortal",[$n,Yn]=Ln(Wn,{forceMount:void 0}),Gn=e=>{const{__scopePopover:t,forceMount:n,children:i,container:r}=e,s=Rn(Wn,t);return v.jsx($n,{scope:t,forceMount:n,children:v.jsx(ue,{present:n||s.open,children:v.jsx(pe,{asChild:!0,container:r,children:i})})})};Gn.displayName=Wn;var Zn="PopoverContent",Kn=s.forwardRef(((e,t)=>{const n=Yn(Zn,e.__scopePopover),{forceMount:i=n.forceMount,...r}=e,s=Rn(Zn,e.__scopePopover);return v.jsx(ue,{present:i||s.open,children:s.modal?v.jsx(Qn,{...r,ref:t}):v.jsx(Jn,{...r,ref:t})})}));Kn.displayName=Zn;var Xn=R("PopoverContent.RemoveScroll"),Qn=s.forwardRef(((e,t)=>{const n=Rn(Zn,e.__scopePopover),i=s.useRef(null),r=V(t,i),o=s.useRef(!1);return s.useEffect((()=>{const e=i.current;if(e)return me(e)}),[]),v.jsx(fe,{as:Xn,allowPinchZoom:!0,children:v.jsx(ei,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(e.onCloseAutoFocus,(e=>{e.preventDefault(),o.current||n.triggerRef.current?.focus()})),onPointerDownOutside:ge(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,i=2===t.button||n;o.current=i}),{checkForDefaultPrevented:!1}),onFocusOutside:ge(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),Jn=s.forwardRef(((e,t)=>{const n=Rn(Zn,e.__scopePopover),i=s.useRef(!1),r=s.useRef(!1);return v.jsx(ei,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(i.current||n.triggerRef.current?.focus(),t.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(r.current=!0));const s=t.target;n.triggerRef.current?.contains(s)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&r.current&&t.preventDefault()}})})),ei=s.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...h}=e,u=Rn(Zn,n),p=Fn(n);return we(),v.jsx(ve,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:s,children:v.jsx(be,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>u.onOpenChange(!1),children:v.jsx(An,{"data-state":ni(u.open),role:"dialog",id:u.contentId,...p,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),ti="PopoverClose";s.forwardRef(((e,t)=>{const{__scopePopover:n,...i}=e,r=Rn(ti,n);return v.jsx(le.button,{type:"button",...i,ref:t,onClick:ge(e.onClick,(()=>r.onOpenChange(!1)))})})).displayName=ti;function ni(e){return e?"open":"closed"}s.forwardRef(((e,t)=>{const{__scopePopover:n,...i}=e,r=Fn(n);return v.jsx(In,{...r,...i,ref:t})})).displayName="PopoverArrow";var ii=Gn,ri=Kn;const si=Dn,oi=Un,ai=s.forwardRef((({className:e,align:t="center",sideOffset:n=4,...i},r)=>{const{props:{fontClassName:s,textClassName:a},organization:l}=o();return v.jsx(ii,{children:v.jsx(ri,{ref:r,align:t,sideOffset:n,className:b("qc-bg-primary qc-text-primary qc-border-secondary qc-shadow-outer data-[state=open]:qc-animate-in data-[state=closed]:qc-animate-out data-[state=closed]:qc-fade-out-0 data-[state=open]:qc-fade-in-0 data-[state=closed]:qc-zoom-out-95 data-[state=open]:qc-zoom-in-95 data-[side=bottom]:qc-slide-in-from-top-2 data-[side=left]:qc-slide-in-from-right-2 data-[side=right]:qc-slide-in-from-left-2 data-[side=top]:qc-slide-in-from-bottom-2 qc-z-[2010] qc-rounded qc-outline-none",s,a,e),style:D(l),...i})})}));ai.displayName=ri.displayName;const li=({eventId:e,contentId:t,emojis:n=[],counts:i={},userReaction:r})=>{const c=_(),{user:d}=o(),{props:{loginUrl:h},organization:u}=o(),{handleReactionClick:p}=(()=>{const e=F(),{props:{organizationId:t},getAccessToken:n}=o();return{handleReactionClick:async(i,r,s)=>{try{await a.post(l.UPDATE_REACTION,{json:{accessToken:await n(),eventId:i,contentId:r,reaction:s},headers:{"x-org-id":t}}),e.setQueriesData([`content-list-by-event-${i}`],(e=>{if(e?.pages&&Array.isArray(e.pages))return{...e,pages:e.pages.map((e=>e.data?{...e,data:e.data.map((e=>{if(e._id===r){const t=e.reactionCounts||{};return e.userReaction&&(t[e.userReaction]=(t[e.userReaction]||1)-1),t[s]=(t[s]||0)+1,{...e,reactionCounts:t,userReaction:s}}return e}))}:e))}}))}catch(e){console.error("Error handling reaction click:",e)}}}})(),[m,f]=s.useState(!1),g=Object.values(i).reduce(((e,t)=>e+t),0);return v.jsxs(si,{open:m,onOpenChange:f,children:[v.jsx(oi,{children:v.jsxs("div",{className:"qc-bg-primary qc-active:scale-90 qc-flex qc-items-center qc-gap-1 qc-rounded qc-bg-opacity-50 qc-px-2 qc-py-1 qc-transition-transform sm:qc-gap-2 sm:qc-py-0",children:[(n||[]).toSorted(((e,t)=>(i[t]||0)-(i[e]||0))).slice(0,1).map((e=>v.jsx("span",{className:"qc-text-sm sm:qc-text-lg",children:e},`${t}-${e}-1`))),g>0&&v.jsx("span",{className:"qc-text-xs qc-font-bold sm:qc-text-sm",children:g||0})]})}),v.jsxs(ai,{side:"top",align:"end",children:[d?null:u?.customAuth?v.jsxs("div",{className:"qc-p-2 qc-font-semibold",children:["Please"," ",v.jsx("a",{className:"qc-text-info qc-underline",href:h,children:"Login"})," ","to react"]}):v.jsxs("div",{className:"qc-p-2 qc-font-semibold",children:["Please"," ",v.jsx(I,{className:"qc-text-info qc-underline",to:M.LOGIN,state:{referrer:c.pathname},children:"Login"})," ","to react"]}),d&&v.jsx("div",{className:"qc-flex qc-gap-1 qc-p-2",children:n.map((n=>v.jsxs("div",{className:"qc-flex qc-flex-col qc-items-center",children:[v.jsx("span",{className:"qc-text-xs qc-font-medium",children:i[n]||0}),v.jsx("span",{className:b("qc-cursor-pointer qc-text-3xl qc-transition-transform",r===n?"qc-scale-125":"qc-hover:scale-125"),onClick:()=>{p&&p(e,t,n),f(!1)},children:n})]},`${t}-${n}-2`)))})]})]})},ci=({event:e,content:t,curateLink:n})=>v.jsxs(v.Fragment,{children:[e.engagementStyle===x.CONTEST&&v.jsxs("button",{onClick:()=>{},href:n,className:"qc-bg-primary qc-flex qc-items-center qc-gap-1 qc-rounded qc-bg-opacity-50 qc-px-2 qc-py-1",children:[v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc-size-5",viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M12 7.125v7.8l3.15 1.925l-.825-3.6l2.775-2.4l-3.65-.325zm0 10.15l-4.15 2.5q-.275.175-.575.15t-.525-.2t-.35-.437t-.05-.588l1.1-4.725L3.775 10.8q-.25-.225-.312-.513t.037-.562t.3-.45t.55-.225l4.85-.425l1.875-4.45q.125-.3.388-.45t.537-.15t.537.15t.388.45l1.875 4.45l4.85.425q.35.05.55.225t.3.45t.038.563t-.313.512l-3.675 3.175l1.1 4.725q.075.325-.05.588t-.35.437t-.525.2t-.575-.15z"})}),v.jsx("span",{className:"qc-text-xs qc-font-semibold sm:qc-text-base",children:parseFloat(t.score).toFixed(1)})]}),e.engagementStyle===x.REACTION&&e.reactionEmojis?.length>0&&v.jsx(li,{eventId:e?._id,contentId:t._id,emojis:e?.reactionEmojis,engagementStyle:e?.engagementStyle,counts:t.reactionCounts||{},userReaction:t.userReaction})]}),di=({content:e})=>v.jsxs("div",{className:"qc-w-full qc-space-y-4 qc-px-4 qc-pb-2 sm:qc-pb-4",children:[e?.caption&&v.jsx("span",{className:"qc-hidden qc-w-full qc-py-1 qc-text-xs qc-drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)] sm:qc-block","data-tooltip-target":"tooltip-default",children:v.jsx("div",{href:"#",className:"hover:qc-text-primary lg:qc-text-md qc-line-clamp-2 qc-text-xs qc-text-white lg:qc-font-medium","data-te-toggle":"tooltip",title:e?.caption,children:e?.caption})}),v.jsx("div",{className:"qc-flex qc-items-center qc-justify-between",children:v.jsx("div",{className:"qc-flex qc-items-center qc-gap-2",children:v.jsx("span",{className:"lg:qc-text-md qc-line-clamp-1 qc-text-sm qc-font-medium qc-text-white qc-drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)]",children:e?.user?.displayName})})})]}),hi=({event:e,content:t,style:n,timestampField:i,curateLink:r,onChangeFaceUrl:a,hideControls:l})=>{const{organization:c}=o();return v.jsxs("div",{id:`content-${t._id}`,style:n,className:"qc-group qc-relative qc-mb-1 qc-overflow-hidden qc-rounded",children:[v.jsx(cn,{url:t.src,alt:t.caption,blurhash:t.blurhash,thumbnailUrl:t.thumbnailUrl,curateLink:r,pswpData:{id:t._id,type:w.IMAGE,hash:t._id,width:t.width,height:t.height,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,caption:t.caption}}),!l&&v.jsxs(s.Fragment,{children:[c?.integrationSettings?.showQuickSearch&&t.faces?.length>0&&v.jsx("button",{className:"qc-bg-brand qc-absolute qc-right-2 qc-top-2 qc-rounded-full qc-p-1 qc-text-gray-200 qc-opacity-50 qc-transition-all sm:qc-p-1.5 sm:hover:qc-scale-110 sm:hover:qc-opacity-100",onClick:()=>{a(t?.url);const e=document.getElementById("media-gallery-container");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},children:v.jsx(C,{color:"a11y",name:"material-symbols:familiar-face-and-zone-outline-rounded"})}),v.jsxs("div",{className:"qc-opacity-100 qc-transition-opacity qc-duration-500 group-hover:qc-opacity-100 sm:qc-opacity-0",children:[v.jsx("div",{className:"qc-absolute qc-bottom-0 qc-w-full qc-rounded-b",children:v.jsx(di,{content:t})}),v.jsx("div",{className:"qc-absolute qc-bottom-2 qc-right-2",children:v.jsx(ci,{event:e,content:t,curateLink:r})})]})]})]})},ui=({content:e,style:t,event:n,timestampField:i,curateLink:r,hideControls:s})=>v.jsxs("div",{id:`content-${e._id}`,className:"qc-group qc-relative qc-mb-1 qc-overflow-hidden qc-rounded",style:t,children:[v.jsx(cn,{url:e.src,thumbnailUrl:e.thumbnailUrl,blurhash:e.blurhash,alt:e.caption,curateLink:r,pswpData:{id:e._id,type:w.VIDEO,hash:e._id,width:e.width,height:e.height,thumbnailUrl:e.thumbnailUrl,blurhash:e.blurhash,caption:e.caption}}),!s&&v.jsxs("div",{className:"qc-opacity-100 qc-transition-opacity qc-duration-500 group-hover:qc-opacity-100 sm:qc-opacity-0",children:[v.jsx("div",{className:"qc-absolute qc-bottom-0 qc-w-full qc-rounded-b",children:v.jsx(di,{content:e})}),v.jsx("div",{className:"qc-absolute qc-bottom-2 qc-right-2",children:v.jsx(ci,{event:n,content:e,curateLink:r})})]})]}),pi=({event:e,contents:t=[],singleColumnMode:n,kioskMode:i,timestampField:r,curateLink:o,onChangeFaceUrl:a})=>{const l=s.useRef(null),c=s.useMemo((()=>`gallery-${e._id}`),[e]),{captureAdImpression:d,captureAdClick:h}=Ee(),[u,p]=s.useState(null);s.useEffect((()=>{if(!o){const e=new Kt({gallery:`#${c}`,children:"a",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:()=>import("./photoswipe-Dqr5VOVb.js")});l.current=e,new an(e),new Qt(e),new en(e,d,h),new tn(e),new nn(e),e.init()}return()=>{l.current?.destroy(),l.current=null}}),[e?.galleryLayout,o]);const m=s.useMemo((()=>{switch(e.galleryLayout){default:case B.ROW:return ht;case B.COLUMN:return gt;case B.MASONRY:return vt}}),[n,e.galleryLayout]);return v.jsxs(s.Fragment,{children:[v.jsx(m,{spacing:4,targetRowHeight:n?500:360,columns:e=>n?1:e<400?2:e<800?3:4,photos:t.map((e=>({src:e.type===w.IMAGE||e.type===w.VIDEO?e.url:e.imageUrl,width:e.dimension?.width,height:e.dimension?.height,...e}))),render:{container:({ref:e,className:t,children:i})=>v.jsx("div",{ref:e,id:c,className:b(t,n?"qc-w-full lg:qc-w-1/3":"qc-w-full"),children:i}),photo:(t,{photo:n,width:s,height:l,index:c})=>{let d;switch(n.type){case w.IMAGE:d=hi;break;case w.VIDEO:d=ui;break;case w.AD:d=dn}return d&&v.jsx(d,{style:{width:s,height:l},event:e,content:n,timestampField:r,onAdClick:()=>{p(n)},hideControls:i,curateLink:o?`${o}/${n._id}`:null,onChangeFaceUrl:a},`${n._id}-${c}`)}}}),v.jsx(ln,{ad:u,onClose:()=>p(null),captureAdClick:h})]})};function mi(e){return"string"==typeof e&&"%"===e[e.length-1]&&function(e){const t=parseFloat(e);return!isNaN(t)&&isFinite(t)}(e.substring(0,e.length-1))}function fi(e,t,n){0===t&&!n&&e?.style&&e?.children.length>0&&(e.style.display="none")}const gi={animating:"rah-animating",animatingUp:"rah-animating--up",animatingDown:"rah-animating--down",animatingToHeightZero:"rah-animating--to-height-zero",animatingToHeightAuto:"rah-animating--to-height-auto",animatingToHeightSpecific:"rah-animating--to-height-specific",static:"rah-static",staticHeightZero:"rah-static--height-zero",staticHeightAuto:"rah-static--height-auto",staticHeightSpecific:"rah-static--height-specific"};function wi(e,t){return[e.static,0===t&&e.staticHeightZero,"number"==typeof t&&t>0?e.staticHeightSpecific:null,"auto"===t&&e.staticHeightAuto].filter((e=>e)).join(" ")}const vi=["animateOpacity","animationStateClasses","applyInlineTransitions","children","className","contentClassName","contentRef","delay","duration","easing","height","onHeightAnimationEnd","onHeightAnimationStart","style","disableDisplayNone"],bi=H.forwardRef(((e,t)=>{const{animateOpacity:n=!1,animationStateClasses:i={},applyInlineTransitions:r=!0,children:o,className:a="",contentClassName:l,delay:c=0,disableDisplayNone:d=!1,duration:h=500,easing:u="ease",height:p,onHeightAnimationEnd:m,onHeightAnimationStart:f,style:g,contentRef:w}=e,v=Object.assign({},e);vi.forEach((e=>{delete v[e]}));const b=s.useRef(p),y=s.useRef(null),x=s.useRef(),q=s.useRef(),T=s.useRef(Object.assign(Object.assign({},gi),i)),S=typeof window<"u",E=s.useRef(!(!S||!window.matchMedia)&&window.matchMedia("(prefers-reduced-motion)").matches),k=E.current?0:c,j=E.current?0:h;let C=p,_="visible";"number"==typeof p?(C=p<0?0:p,_="hidden"):mi(C)&&(C="0%"===p?0:p,_="hidden");const[O,P]=s.useState(C),[N,A]=s.useState(_),[I,M]=s.useState(!1),[L,z]=s.useState(wi(T.current,p));s.useEffect((()=>{fi(y.current,O,d)}),[]),s.useEffect((()=>{if(p!==b.current&&y.current){(function(e,t){0===t&&e?.style&&(e.style.display="")})(y.current,b.current),y.current.style.overflow="hidden";const e=y.current.offsetHeight;y.current.style.overflow="";const t=j+k;let n,i,r,s="hidden";const o="auto"===b.current;"number"==typeof p?(n=p<0?0:p,i=n):mi(p)?(n="0%"===p?0:p,i=n):(n=e,i="auto",s=void 0),o&&(i=n,n=e);const a=[T.current.animating,("auto"===b.current||p<b.current)&&T.current.animatingUp,("auto"===p||p>b.current)&&T.current.animatingDown,0===i&&T.current.animatingToHeightZero,"auto"===i&&T.current.animatingToHeightAuto,"number"==typeof i&&i>0?T.current.animatingToHeightSpecific:null].filter((e=>e)).join(" "),l=wi(T.current,i);P(n),A("hidden"),M(!o),z(a),clearTimeout(q.current),clearTimeout(x.current),o?(r=!0,q.current=setTimeout((()=>{P(i),A(s),M(r),f?.(i)}),50),x.current=setTimeout((()=>{M(!1),z(l),fi(y.current,i,d),m?.(i)}),t)):(f?.(n),q.current=setTimeout((()=>{P(i),A(s),M(!1),z(l),"auto"!==p&&fi(y.current,n,d),m?.(n)}),t))}return b.current=p,()=>{clearTimeout(q.current),clearTimeout(x.current)}}),[p]);const F=Object.assign(Object.assign({},g),{height:O,overflow:N||g?.overflow});I&&r&&(F.transition=`height ${j}ms ${u} ${k}ms`,g?.transition&&(F.transition=`${g.transition}, ${F.transition}`),F.WebkitTransition=F.transition);const V={};n&&(V.transition=`opacity ${j}ms ${u} ${k}ms`,V.WebkitTransition=V.transition,0===O&&(V.opacity=0));const R=typeof v["aria-hidden"]<"u"?v["aria-hidden"]:0===p;return H.createElement("div",Object.assign({},v,{"aria-hidden":R,className:`${L} ${a}`,style:F,ref:t}),H.createElement("div",{className:l,style:V,ref:e=>{y.current=e,w&&(w.current=e)}},o))}));var yi,xi,qi={},Ti={exports:{}},Si=Ti.exports;function Ei(){return yi||(yi=1,e=Ti,t=Ti.exports,function(n,i){var r="function",s="undefined",o="object",a="string",l="major",c="model",d="name",h="type",u="vendor",p="version",m="architecture",f="console",g="mobile",w="tablet",v="smarttv",b="wearable",y="embedded",x="Amazon",q="Apple",T="ASUS",S="BlackBerry",E="Browser",k="Chrome",j="Firefox",C="Google",_="Huawei",O="LG",P="Microsoft",N="Motorola",A="Opera",I="Samsung",M="Sharp",L="Sony",z="Xiaomi",F="Zebra",V="Facebook",R="Chromium OS",D="Mac OS",B=" Browser",H=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},U=function(e,t){return typeof e===a&&-1!==W(t).indexOf(W(e))},W=function(e){return e.toLowerCase()},$=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,500)},Y=function(e,t){for(var n,s,a,l,c,d,h=0;h<t.length&&!c;){var u=t[h],p=t[h+1];for(n=s=0;n<u.length&&!c&&u[n];)if(c=u[n++].exec(e))for(a=0;a<p.length;a++)d=c[++s],typeof(l=p[a])===o&&l.length>0?2===l.length?typeof l[1]==r?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:3===l.length?typeof l[1]!==r||l[1].exec&&l[1].test?this[l[0]]=d?d.replace(l[1],l[2]):i:this[l[0]]=d?l[1].call(this,d,l[2]):i:4===l.length&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):i):this[l]=d||i;h+=2}},G=function(e,t){for(var n in t)if(typeof t[n]===o&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(U(t[n][r],e))return"?"===n?i:n}else if(U(t[n],e))return"?"===n?i:n;return t.hasOwnProperty("*")?t["*"]:e},Z={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,p],[/opios[\/ ]+([\w\.]+)/i],[p,[d,A+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[p,[d,A+" GX"]],[/\bopr\/([\w\.]+)/i],[p,[d,A]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[p,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[p,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,p],[/quark(?:pc)?\/([-\w\.]+)/i],[p,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[p,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[d,"UC"+E]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[p,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[p,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[p,[d,"Smart Lenovo "+E]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+E],p],[/\bfocus\/([\w\.]+)/i],[p,[d,j+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[d,A+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[d,A+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[d,"MIUI"+B]],[/fxios\/([\w\.-]+)/i],[p,[d,j]],[/\bqihoobrowser\/?([\w\.]*)/i],[p,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],p],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+B],p],[/samsungbrowser\/([\w\.]+)/i],[p,[d,I+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[p,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,p],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[p,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,V],p],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[p,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[d,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,k+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[d,"Android "+E]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[p,G,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],p],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[d,j+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,[p,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,W]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",W]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,W]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[u,I],[h,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[u,I],[h,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[u,q],[h,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[u,q],[h,w]],[/(macintosh);/i],[c,[u,q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[u,M],[h,g]],[/(?:honor)([-\w ]+)[;\)]/i],[c,[u,"Honor"],[h,g]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[u,_],[h,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[u,_],[h,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[c,/_/g," "],[u,z],[h,g]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[u,z],[h,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[u,"OPPO"],[h,g]],[/\b(opd2\d{3}a?) bui/i],[c,[u,"OPPO"],[h,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[u,"Vivo"],[h,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[u,"Realme"],[h,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[u,N],[h,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[u,N],[h,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[u,O],[h,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[u,O],[h,g]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[u,"Lenovo"],[h,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[u,"Nokia"],[h,g]],[/(pixel c)\b/i],[c,[u,C],[h,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[u,C],[h,g]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[u,L],[h,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[u,L],[h,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[u,"OnePlus"],[h,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[u,x],[h,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[u,x],[h,g]],[/(playbook);[-\w\),; ]+(rim)/i],[c,u,[h,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[u,S],[h,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[u,T],[h,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[u,T],[h,g]],[/(nexus 9)/i],[c,[u,"HTC"],[h,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[c,/_/g," "],[h,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[u,"TCL"],[h,w]],[/(itel) ((\w+))/i],[[u,W],c,[h,G,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[u,"Acer"],[h,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[u,"Meizu"],[h,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[u,"Ulefone"],[h,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[u,"Energizer"],[h,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[u,"Cat"],[h,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[u,"Smartfren"],[h,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[u,"Nothing"],[h,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,c,[h,g]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,c,[h,w]],[/(surface duo)/i],[c,[u,P],[h,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[u,"Fairphone"],[h,g]],[/(u304aa)/i],[c,[u,"AT&T"],[h,g]],[/\bsie-(\w*)/i],[c,[u,"Siemens"],[h,g]],[/\b(rct\w+) b/i],[c,[u,"RCA"],[h,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[u,"Dell"],[h,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[u,"Verizon"],[h,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[u,"Barnes & Noble"],[h,w]],[/\b(tm\d{3}\w+) b/i],[c,[u,"NuVision"],[h,w]],[/\b(k88) b/i],[c,[u,"ZTE"],[h,w]],[/\b(nx\d{3}j) b/i],[c,[u,"ZTE"],[h,g]],[/\b(gen\d{3}) b.+49h/i],[c,[u,"Swiss"],[h,g]],[/\b(zur\d{3}) b/i],[c,[u,"Swiss"],[h,w]],[/\b((zeki)?tb.*\b) b/i],[c,[u,"Zeki"],[h,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],c,[h,w]],[/\b(ns-?\w{0,9}) b/i],[c,[u,"Insignia"],[h,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[u,"NextBook"],[h,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],c,[h,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],c,[h,g]],[/\b(ph-1) /i],[c,[u,"Essential"],[h,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[u,"Envizen"],[h,w]],[/\b(trio[-\w\. ]+) b/i],[c,[u,"MachSpeed"],[h,w]],[/\btu_(1491) b/i],[c,[u,"Rotor"],[h,w]],[/(shield[\w ]+) b/i],[c,[u,"Nvidia"],[h,w]],[/(sprint) (\w+)/i],[u,c,[h,g]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[u,P],[h,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[u,F],[h,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[u,F],[h,g]],[/smart-tv.+(samsung)/i],[u,[h,v]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[u,I],[h,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,O],[h,v]],[/(apple) ?tv/i],[u,[c,q+" TV"],[h,v]],[/crkey/i],[[c,k+"cast"],[u,C],[h,v]],[/droid.+aft(\w+)( bui|\))/i],[c,[u,x],[h,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[u,M],[h,v]],[/(bravia[\w ]+)( bui|\))/i],[c,[u,L],[h,v]],[/(mitv-\w{5}) bui/i],[c,[u,z],[h,v]],[/Hbbtv.*(technisat) (.*);/i],[u,c,[h,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[u,$],[c,$],[h,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,c,[h,f]],[/droid.+; (shield) bui/i],[c,[u,"Nvidia"],[h,f]],[/(playstation [345portablevi]+)/i],[c,[u,L],[h,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[u,P],[h,f]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[u,I],[h,b]],[/((pebble))app/i],[u,c,[h,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[u,q],[h,b]],[/droid.+; (glass) \d/i],[c,[u,C],[h,b]],[/droid.+; (wt63?0{2,3})\)/i],[c,[u,F],[h,b]],[/droid.+; (glass) \d/i],[c,[u,C],[h,b]],[/(pico) (4|neo3(?: link|pro)?)/i],[u,c,[h,b]],[/; (quest( \d| pro)?)/i],[c,[u,V],[h,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[h,y]],[/(aeobc)\b/i],[c,[u,x],[h,y]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[h,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[h,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,g]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,p],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,p],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[d,[p,G,Z]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,G,Z],[d,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,D],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,p],[/\(bb(10);/i],[p,[d,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[d,j+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[p,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[p,[d,k+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,R],p],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,p],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,p]]},X=function(e,t){if(typeof e===o&&(t=e,e=i),!(this instanceof X))return new X(e,t).getResult();var f=typeof n!==s&&n.navigator?n.navigator:i,v=e||(f&&f.userAgent?f.userAgent:""),b=f&&f.userAgentData?f.userAgentData:i,y=t?function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n}(K,t):K,x=f&&f.userAgent==v;return this.getBrowser=function(){var e={};return e[d]=i,e[p]=i,Y.call(e,v,y.browser),e[l]=function(e){return typeof e===a?e.replace(/[^\d\.]/g,"").split(".")[0]:i}(e[p]),x&&f&&f.brave&&typeof f.brave.isBrave==r&&(e[d]="Brave"),e},this.getCPU=function(){var e={};return e[m]=i,Y.call(e,v,y.cpu),e},this.getDevice=function(){var e={};return e[u]=i,e[c]=i,e[h]=i,Y.call(e,v,y.device),x&&!e[h]&&b&&b.mobile&&(e[h]=g),x&&"Macintosh"==e[c]&&f&&typeof f.standalone!==s&&f.maxTouchPoints&&f.maxTouchPoints>2&&(e[c]="iPad",e[h]=w),e},this.getEngine=function(){var e={};return e[d]=i,e[p]=i,Y.call(e,v,y.engine),e},this.getOS=function(){var e={};return e[d]=i,e[p]=i,Y.call(e,v,y.os),x&&!e[d]&&b&&b.platform&&"Unknown"!=b.platform&&(e[d]=b.platform.replace(/chrome os/i,R).replace(/macos/i,D)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===a&&e.length>500?$(e,500):e,this},this.setUA(v),this};X.VERSION="1.0.40",X.BROWSER=H([d,p,l]),X.CPU=H([m]),X.DEVICE=H([c,u,h,f,g,v,w,b,y]),X.ENGINE=X.OS=H([d,p]),e.exports&&(t=e.exports=X),t.UAParser=X;var Q=typeof n!==s&&(n.jQuery||n.Zepto);if(Q&&!Q.ua){var J=new X;Q.ua=J.getResult(),Q.ua.get=function(){return J.getUA()},Q.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var n in t)Q.ua[n]=t[n]}}}("object"==typeof window?window:Si)),Ti.exports;var e,t}var ki=function(){if(xi)return qi;xi=1,Object.defineProperty(qi,"__esModule",{value:!0});var e,t=k(),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=Ei(),r=new i,s=r.getBrowser(),o=r.getCPU(),a=r.getDevice(),l=r.getEngine(),c=r.getOS(),d=r.getUA(),h=function(e){return r.setUA(e)},u=function(e){if(e){var t=new i(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}console.error("No userAgent string was provided")},p=Object.freeze({ClientUAInstance:r,browser:s,cpu:o,device:a,engine:l,os:c,ua:d,setUa:h,parseUserAgent:u});function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(e.prototype,t),e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},v.apply(this,arguments)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,s=[],o=!0,a=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(s.push(i.value),!t||s.length!==t);o=!0);}catch(e){a=!0,r=e}finally{try{!o&&null!=n.return&&n.return()}finally{if(a)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var E="mobile",j="tablet",C="smarttv",_="console",O="wearable",P="embedded",N=void 0,A={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},I={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},M={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},L=function(e){return e||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none")},z=function(){return!!(typeof window<"u"&&(window.navigator||navigator))&&(window.navigator||navigator)},F=function(e){var t=z();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},V=function(e,t,n,i){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{vendor:L(t.vendor),model:L(t.model),os:L(n.name),osVersion:L(n.version),ua:L(i)})},R=function(e){return e.type===E},D=function(e){return e.type===j},B=function(e){var t=e.type;return t===E||t===j},H=function(e){return e.type===C},U=function(e){return e.type===N},W=function(e){return e.type===O},$=function(e){return e.type===_},Y=function(e){return e.type===P},G=function(e){var t=e.vendor;return L(t)},Z=function(e){var t=e.model;return L(t)},K=function(e){var t=e.type;return L(t,"browser")},X=function(e){return e.name===I.Android},Q=function(e){return e.name===I.Windows},J=function(e){return e.name===I.MAC_OS},ee=function(e){return e.name===I.WindowsPhone},te=function(e){return e.name===I.IOS},ne=function(e){var t=e.version;return L(t)},ie=function(e){var t=e.name;return L(t)},re=function(e){return e.name===A.Chrome},se=function(e){return e.name===A.Firefox},oe=function(e){return e.name===A.Chromium},ae=function(e){return e.name===A.Edge},le=function(e){return e.name===A.Yandex},ce=function(e){var t=e.name;return t===A.Safari||t===A.MobileSafari},de=function(e){return e.name===A.MobileSafari},he=function(e){return e.name===A.Opera},ue=function(e){var t=e.name;return t===A.InternetExplorer||t===A.Ie},pe=function(e){return e.name===A.MIUI},me=function(e){return e.name===A.SamsungBrowser},fe=function(e){var t=e.version;return L(t)},ge=function(e){var t=e.major;return L(t)},we=function(e){var t=e.name;return L(t)},ve=function(e){var t=e.name;return L(t)},be=function(e){var t=e.version;return L(t)},ye=function(){var e=z(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},xe=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},qe=function(){var e=z();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},Te=function(){return F("iPad")},Se=function(){return F("iPhone")},Ee=function(){return F("iPod")},ke=function(e){return L(e)};function je(e){var t=e||p,n=t.device,i=t.browser,r=t.os,s=t.engine,o=t.ua;return{isSmartTV:H(n),isConsole:$(n),isWearable:W(n),isEmbedded:Y(n),isMobileSafari:de(i)||Te(),isChromium:oe(i),isMobile:B(n)||Te(),isMobileOnly:R(n),isTablet:D(n)||Te(),isBrowser:U(n),isDesktop:U(n),isAndroid:X(r),isWinPhone:ee(r),isIOS:te(r)||Te(),isChrome:re(i),isFirefox:se(i),isSafari:ce(i),isOpera:he(i),isIE:ue(i),osVersion:ne(r),osName:ie(r),fullBrowserVersion:fe(i),browserVersion:ge(i),browserName:we(i),mobileVendor:G(n),mobileModel:Z(n),engineName:ve(s),engineVersion:be(s),getUA:ke(o),isEdge:ae(i)||xe(o),isYandex:le(i),deviceType:K(n),isIOS13:qe(),isIPad13:Te(),isIPhone13:Se(),isIPod13:Ee(),isElectron:ye(),isEdgeChromium:xe(o),isLegacyEdge:ae(i)&&!xe(o),isWindows:Q(r),isMacOs:J(r),isMIUI:pe(i),isSamsungBrowser:me(i)}}var Ce=H(a),_e=$(a),Oe=W(a),Pe=Y(a),Ne=de(s)||Te(),Ae=oe(s),Ie=B(a)||Te(),Me=R(a),Le=D(a)||Te(),ze=U(a),Fe=U(a),Ve=X(c),Re=ee(c),De=te(c)||Te(),Be=re(s),He=se(s),Ue=ce(s),We=he(s),$e=ue(s),Ye=ne(c),Ge=ie(c),Ze=fe(s),Ke=ge(s),Xe=we(s),Qe=G(a),Je=Z(a),et=ve(l),tt=be(l),nt=ke(d),it=ae(s)||xe(d),rt=le(s),st=K(a),ot=qe(),at=Te(),lt=Se(),ct=Ee(),dt=ye(),ht=xe(d),ut=ae(s)&&!xe(d),pt=Q(c),mt=J(c),ft=pe(s),gt=me(s);function wt(e){var t=e||window.navigator.userAgent;return u(t)}return qi.AndroidView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Ve?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.BrowserTypes=A,qi.BrowserView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return ze?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.ConsoleView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return _e?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.CustomView=function(e){var i=e.renderWithFragment,r=e.children;e.viewClassName,e.style;var s=e.condition,o=x(e,["renderWithFragment","children","viewClassName","style","condition"]);return s?i?n.createElement(t.Fragment,null,r):n.createElement("div",o,r):null},qi.IEView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return $e?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.IOSView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return De?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.MobileOnlyView=function(e){var i=e.renderWithFragment,r=e.children;e.viewClassName,e.style;var s=x(e,["renderWithFragment","children","viewClassName","style"]);return Me?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.MobileView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Ie?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.OsTypes=I,qi.SmartTVView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Ce?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.TabletView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Le?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.WearableView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Oe?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.WinPhoneView=function(e){var i=e.renderWithFragment,r=e.children,s=x(e,["renderWithFragment","children"]);return Re?i?n.createElement(t.Fragment,null,r):n.createElement("div",s,r):null},qi.browserName=Xe,qi.browserVersion=Ke,qi.deviceDetect=function(e){var t=e?u(e):p,n=t.device,i=t.browser,r=t.engine,s=t.os,o=t.ua,a=function(e){switch(e){case E:return{isMobile:!0};case j:return{isTablet:!0};case C:return{isSmartTV:!0};case _:return{isConsole:!0};case O:return{isWearable:!0};case N:return{isBrowser:!0};case P:return{isEmbedded:!0};default:return M}}(n.type),l=a.isBrowser,c=a.isMobile,d=a.isTablet,h=a.isSmartTV,m=a.isConsole,f=a.isWearable,g=a.isEmbedded;return l?function(e,t,n,i,r){return{isBrowser:e,browserMajorVersion:L(t.major),browserFullVersion:L(t.version),browserName:L(t.name),engineName:L(n.name),engineVersion:L(n.version),osName:L(i.name),osVersion:L(i.version),userAgent:L(r)}}(l,i,r,s,o):h?function(e,t,n,i){return{isSmartTV:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(i)}}(h,r,s,o):m?function(e,t,n,i){return{isConsole:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(i)}}(m,r,s,o):c||d?V(a,n,s,o):f?function(e,t,n,i){return{isWearable:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(i)}}(f,r,s,o):g?function(e,t,n,i,r){return{isEmbedded:e,vendor:L(t.vendor),model:L(t.model),engineName:L(n.name),engineVersion:L(n.version),osName:L(i.name),osVersion:L(i.version),userAgent:L(r)}}(g,n,r,s,o):void 0},qi.deviceType=st,qi.engineName=et,qi.engineVersion=tt,qi.fullBrowserVersion=Ze,qi.getSelectorsByUserAgent=function(e){if(e&&"string"==typeof e){var t=u(e);return je({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})}console.error("No valid user agent string was provided")},qi.getUA=nt,qi.isAndroid=Ve,qi.isBrowser=ze,qi.isChrome=Be,qi.isChromium=Ae,qi.isConsole=_e,qi.isDesktop=Fe,qi.isEdge=it,qi.isEdgeChromium=ht,qi.isElectron=dt,qi.isEmbedded=Pe,qi.isFirefox=He,qi.isIE=$e,qi.isIOS=De,qi.isIOS13=ot,qi.isIPad13=at,qi.isIPhone13=lt,qi.isIPod13=ct,qi.isLegacyEdge=ut,qi.isMIUI=ft,qi.isMacOs=mt,qi.isMobile=Ie,qi.isMobileOnly=Me,qi.isMobileSafari=Ne,qi.isOpera=We,qi.isSafari=Ue,qi.isSamsungBrowser=gt,qi.isSmartTV=Ce,qi.isTablet=Le,qi.isWearable=Oe,qi.isWinPhone=Re,qi.isWindows=pt,qi.isYandex=rt,qi.mobileModel=Je,qi.mobileVendor=Qe,qi.osName=Ge,qi.osVersion=Ye,qi.parseUserAgent=u,qi.setUserAgent=function(e){return h(e)},qi.useDeviceData=wt,qi.useDeviceSelectors=function(e){var t=wt(e||window.navigator.userAgent);return[je(t),t]},qi.useMobileOrientation=function(){var e=T(t.useState((function(){var e=window.innerWidth>window.innerHeight?90:0;return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}})),2),n=e[0],i=e[1],r=t.useCallback((function(){var e=window.innerWidth>window.innerHeight?90:0,t={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};n.orientation!==t.orientation&&i(t)}),[n.orientation]);return t.useEffect((function(){return void 0!==(typeof window>"u"?"undefined":f(window))&&Ie&&(r(),window.addEventListener("load",r,!1),window.addEventListener("resize",r,!1)),function(){window.removeEventListener("resize",r,!1),window.removeEventListener("load",r,!1)}}),[r]),n},qi.withOrientationChange=function(e){return function(t){function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return q(e)}(this,b(i).call(this,e)),t.isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(q(t)),t.onOrientationChange=t.onOrientationChange.bind(q(t)),t.onPageLoad=t.onPageLoad.bind(q(t)),t.state={isLandscape:!1,isPortrait:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(i,t),g(i,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==(typeof window>"u"?"undefined":f(window))&&Ie&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return n.createElement(e,v({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),i}(n.Component)},qi}(),ji=function(e,t){return(ji=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};
|
|
3
|
+
/*! *****************************************************************************
|
|
4
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
6
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
7
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
10
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
11
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
12
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
13
|
+
|
|
14
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
15
|
+
and limitations under the License.
|
|
16
|
+
***************************************************************************** */var Ci=function(){return Ci=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Ci.apply(this,arguments)};var _i="Pixel",Oi="Percent",Pi={unit:Oi,value:.8};function Ni(e){return"number"==typeof e?{unit:Oi,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:_i,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:Oi,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),Pi):(console.warn("scrollThreshold should be string or number"),Pi)}var Ai=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),!(n.currentY<n.startY)&&(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),!(n.currentY-n.startY>1.5*n.maxPullDownDistance)&&n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame((function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")}))},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout((function(){return n.props.onScroll&&n.props.onScroll(e)}),0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,i){var r,s=!1,o=0;function a(){r&&clearTimeout(r)}function l(){var l=this,c=Date.now()-o,d=arguments;function h(){o=Date.now(),n.apply(l,d)}s||(i&&!r&&h(),a(),void 0===i&&c>e?h():!0!==t&&(r=setTimeout(i?function(){r=void 0}:h,void 0===i?e-c:e)))}return"boolean"!=typeof t&&(i=n,n=t,t=void 0),l.cancel=function(){a(),s=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}ji(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?Ci(Ci({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,i=Ni(t);return i.unit===_i?e.scrollTop<=i.value+n-e.scrollHeight+1:e.scrollTop<=i.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,i=Ni(t);return i.unit===_i?e.scrollTop+n>=e.scrollHeight-i.value:e.scrollTop+n>=i.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=Ci({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),i=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return H.createElement("div",{style:i,className:"infinite-scroll-component__outerdiv"},H.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&H.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},H.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(s.Component);const Ii=Object.freeze(Object.defineProperty({__proto__:null,default:()=>{const{eventSlug:e}=O(),{loadingUser:t}=o(),n=F(),[i,r]=s.useState(""),[a,l]=s.useState(null),[c,d]=s.useState(p),[h,f]=s.useState(m),[g,w]=s.useState(ki.isMobile?S.SINGLE:S.GRID),y=s.useRef(null),{event:q,ads:T}=P({eventSlug:e}),{loading:E,contentsWithAds:k,hasNextPage:j,fetchNextPage:C,isFetchingNextPage:_}=_e({event:q,ads:T,sort:c,order:h,keywords:i,face:a}),{incrementEventView:I}=Ee(),{start:z,initializing:V,running:R}=ke({ref:y,hasNextPage:j,fetchNextPage:C,isFetchingNextPage:_,onBottomReached:()=>n.refetchQueries([u.CONTENTS_BY_EVENT(q?._id)])});s.useEffect((()=>{q&&I(q?.slug)}),[q]);const D=s.useMemo((()=>g===S.SINGLE),[g]),B=s.useMemo((()=>v.jsx(ne,{event:q,onAutoscrollClick:z})),[q?.galleryLayout,z]);return v.jsxs("div",{className:"qc-mx-auto qc-min-h-[80vh] qc-space-y-2",children:[v.jsx("div",{className:"qc-flex qc-flex-row qc-justify-end",children:B}),v.jsx("div",{className:"qc-pb-2",children:v.jsx(He,{})}),v.jsx(Me,{engagementStyle:q?.engagementStyle,disabled:t||E,mode:g,onModeChange:w,sort:c,sortOrder:h,onSortChange:d,onSortOrderChange:()=>f("asc"===h?"desc":"asc"),handleChange:r,face:a,onFaceImageChange:l}),v.jsx(bi,{duration:300,height:a?"auto":0,animateOpacity:!0,children:v.jsxs("div",{className:"qc-flex qc-gap-4",children:[v.jsxs("div",{className:"qc-space-y-2",children:[v.jsx(N,{variant:"h4",children:"Searching using"}),v.jsx("img",{src:a,alt:"face",className:"qc-h-32 qc-rounded"})]}),v.jsx("div",{className:"qc-flex qc-flex-col qc-justify-end qc-gap-2",children:v.jsx(L,{color:"error",icon:"material-symbols:close-rounded",onClick:()=>l(null),children:"Clear search"})})]})}),t||E?v.jsx("div",{className:"qc-grid qc-grid-cols-1 qc-gap-4 sm:qc-grid-cols-3",children:Array.from({length:8}).map(((e,t)=>v.jsx(U,{className:"qc-h-72"},t)))}):k?.length<=0?v.jsx("div",{children:v.jsx(W,{title:"No contents",description:"Be the first to upload in the event",iconSvg:v.jsxs("svg",{"data-name":"Layer 1",className:"qc-size-full",viewBox:"0 0 858.76 581.93",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.6 738.67a198.59 198.59 0 0 1 16.436-62.675q3.7094-8.2865 8.1655-16.208a1.2103 1.2103 0 0 0-2.0886-1.2208 201.33 201.33 0 0 0-22.403 61.805q-1.682 9.0855-2.5283 18.299c-0.14337 1.5493 2.2763 1.5396 2.4188 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"842.44",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m984.17 739.08a128.83 128.83 0 0 1 10.662-40.66q2.4064-5.3758 5.2973-10.515a0.78518 0.78518 0 0 0-1.355-0.792 130.61 130.61 0 0 0-14.534 40.096q-1.0912 5.8942-1.6402 11.872c-0.093 1.0051 1.4768 0.99878 1.5692 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"833.31",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.19 738.14a128.83 128.83 0 0 1-16.601-38.618q-1.409-5.7188-2.2905-11.549a0.78518 0.78518 0 0 0-1.5555 0.2089 130.61 130.61 0 0 0 13.202 40.554q2.7649 5.3186 6.0085 10.369c0.54487 0.84972 1.7787-0.12078 1.2373-0.96515z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"791.11",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.05 738.67a198.59 198.59 0 0 0-16.436-62.675q-3.7094-8.2865-8.1655-16.208a1.2103 1.2103 0 0 1 2.0886-1.2208 201.33 201.33 0 0 1 22.403 61.805q1.682 9.0855 2.5283 18.299c0.14338 1.5493-2.2763 1.5396-2.4188 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"139.97",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m339.48 739.08a128.83 128.83 0 0 0-10.662-40.66q-2.4064-5.3758-5.2973-10.515a0.78518 0.78518 0 0 1 1.355-0.792 130.61 130.61 0 0 1 14.534 40.096q1.0912 5.8942 1.6402 11.872c0.093 1.0051-1.4768 0.99878-1.5692 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"149.1",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.46 738.14a128.83 128.83 0 0 0 16.601-38.618q1.409-5.7188 2.2905-11.549a0.78518 0.78518 0 0 1 1.5555 0.2089 130.61 130.61 0 0 1-13.202 40.554q-2.7649 5.3186-6.0084 10.369c-0.54487 0.84972-1.7787-0.12078-1.2373-0.96515z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"191.3",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m925.02 538.41 0.2391 180.11a12.626 12.626 0 0 1-12.593 12.63l-74.817 0.10967c21.062-39.4 32.987-101.41 32.917-149.22a281.27 281.27 0 0 0-5.721-56.161l47.345-0.0694a12.626 12.626 0 0 1 12.63 12.593z",fill:"currentColor"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m1028.2 740.97h-738.29a1.1907 1.1907 0 0 1 0-2.3814h738.29a1.1907 1.1907 0 0 1 0 2.3814z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m815.39 513.79-133.34-0.52295 12.966-43.137a16.599 16.599 0 0 1 15.804-11.75h0.06274l76.106 0.29883a16.597 16.597 0 0 1 15.774 11.875z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m889.83 499.03a14 14 0 0 0-14 14h28a14 14 0 0 0-14-14z",fill:"currentColor"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m932.83 740.03h-368a17.019 17.019 0 0 1-17-17v-194a17.019 17.019 0 0 1 17-17h368a17.019 17.019 0 0 1 17 17v194a17.019 17.019 0 0 1-17 17zm-368-226a15.017 15.017 0 0 0-15 15v194a15.017 15.017 0 0 0 15 15h368a15.017 15.017 0 0 0 15-15v-194a15.017 15.017 0 0 0-15-15z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m764.83 497.53h-32a8.5 8.5 0 0 1 0-17h32a8.5 8.5 0 0 1 0 17z",fill:"#fff"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 702.03a76 76 0 1 1 76-76 76.086 76.086 0 0 1-76 76zm0-150a74 74 0 1 0 74 74 74.084 74.084 0 0 0-74-74z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 676.03a50 50 0 1 1 50-50 50.056 50.056 0 0 1-50 50zm0-98a48 48 0 1 0 48 48 48.054 48.054 0 0 0-48-48z",fill:"#3f3d56"}),v.jsx("circle",{cx:"578.2",cy:"467",r:"38",fill:"#ccc"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m725.83 626.03a25.001 25.001 0 0 1 21.5-24.751 25 25 0 1 0 0 49.502 25.001 25.001 0 0 1-21.5-24.751z",fill:"#fff"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m914.83 514.03h-50v-1a25 25 0 0 1 50 0zm-47.979-2h45.957a23 23 0 0 0-45.957 0z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m572.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("circle",{cx:"402.2",cy:"373",r:"5",fill:"currentColor"}),v.jsx("circle",{cx:"428.2",cy:"373",r:"5",fill:"#ccc"}),v.jsx("circle",{cx:"454.2",cy:"373",r:"5",fill:"#ccc"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m598.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m624.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("rect",{x:"378.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"378.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"648.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"651.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m443.45 401.51c-8.1095-3.7255-13.44-14.377-13.137-24.881s5.8315-20.329 13.456-25.338a26.649 26.649 0 0 1 25.219-1.9056c8.1825 3.483 19.169 4.4318 24.087 13.089 3.7796 6.6528 2.4181 21.495-0.25792 28.892-2.3129 6.394-7.9684 9.9966-13.483 12.013a45.34 45.34 0 0 1-37.511-3.0216",fill:"#2f2e41"}),v.jsx("polygon",{points:"223.38 568.71 211.72 564.91 220.8 518.14 238.01 523.74",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(72.575 -240.02) rotate(18.021)",d:"m372.58 718.9h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),v.jsx("polygon",{points:"327.75 568.96 315.49 568.96 309.66 521.67 327.75 521.67",fill:"#ffb8b8"}),v.jsx("path",{d:"m306.73 565.46h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m497.75 708.65c-0.07373 0-0.14746-2e-3 -0.22168-0.00585l-13.586-0.64747a4.5061 4.5061 0 0 1-4.2854-4.4326l-1.8411-134.39a1.5 1.5 0 0 0-2.8267-0.67871l-71.958 136.44a4.4762 4.4762 0 0 1-4.822 2.3213l-13.521-2.5752a4.4992 4.4992 0 0 1-3.4014-5.918l52.43-148.55 4.0344-43.943a4.4698 4.4698 0 0 1 3.936-4.0498c15.277-1.877 36.624-14.395 45.092-19.689a4.446 4.446 0 0 1 3.5305-0.53125 4.5558 4.5558 0 0 1 2.8308 2.2451 202.75 202.75 0 0 1 22.277 123.98l-13.217 96.54a4.4752 4.4752 0 0 1-4.4507 3.8907z",fill:"#2f2e41"}),v.jsx("circle",{cx:"290.56",cy:"228.24",r:"24.561",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m436.71 516.82-7.3955-52.845a31.045 31.045 0 0 1 60.574-13.635c2.106 9.7686 6.385 21.66 4.8218 34.479-10.953 30.399-30.835 39.772-58 32z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m469.21 434.82h-18a4.5051 4.5051 0 0 1-4.5-4.5v-6a4.5051 4.5051 0 0 1 4.5-4.5h18a4.5051 4.5051 0 0 1 4.5 4.5v6a4.5051 4.5051 0 0 1-4.5 4.5z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m560.44 534.7a10.743 10.743 0 0 0-8.7149-13.979l-56.029-80.214-16.614 16.425 60.299 73.683a10.801 10.801 0 0 0 21.059 4.0847z",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m513.22 465.05-20.234 13.507a4.8169 4.8169 0 0 1-7.0291-1.9475l-10.365-21.928a13.377 13.377 0 0 1 22.295-14.789l16.229 17.919a4.8169 4.8169 0 0 1-0.8968 7.2386z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m362.5 426.92a10.526 10.526 0 0 1 0.2393 1.6401l42.957 24.782 10.441-6.0109 11.131 14.572-17.45 12.438a8 8 0 0 1-9.5982-0.23384l-44.297-34.946a10.497 10.497 0 1 1 6.5757-12.241z",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m418.18 471.35-10.794-21.802a4.8169 4.8169 0 0 1 2.835-6.7204l23.078-7.4597a13.377 13.377 0 0 1 11.8 24.012l-19.857 13.79a4.8169 4.8169 0 0 1-7.0632-1.82z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m477.67 356.34a4.0633 4.0633 0 0 0 4.3168-2.4094 5.8506 5.8506 0 0 0-0.41558-5.1377 10.736 10.736 0 0 0-3.7759-3.7034 12.406 12.406 0 0 0-5.9816-2.0579 7.4612 7.4612 0 0 0-5.7939 2.1993 5.3768 5.3768 0 0 0-0.97171 5.9276c0.89811 1.7319 2.7825 2.7031 4.6186 3.3625a27.094 27.094 0 0 0 11.378 1.4944",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m485.52 398.45c-4.2928 0.20179-3.5536-8.9072-4.8971-12.989s-3.1955-8.9513-7.4212-9.734c-3.463-0.6414-6.5925 1.8908-9.609 3.7086-5.3764 3.24-12.336 4.4352-17.981 1.6906s-9.0786-10.078-6.3329-15.723a12.876 12.876 0 0 1 8.049-6.3415 25.906 25.906 0 0 1 10.462-0.50253 53.527 53.527 0 0 1 21.886 7.7574c4.5819 2.8736 8.9417 6.7864 10.306 12.02s1.9198 19.465-3.413 20.366z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m474.29 343.67c-3.2427-4.1108-2.0213-10.588 1.7582-14.211s9.3995-4.7529 14.615-4.292a29.621 29.621 0 0 1 24.025 17.275c3.2959 7.5393 3.2687 16.163 6.2494 23.832a32.137 32.137 0 0 0 43.41 17.543c5.1881-2.3921 10.128-7.0763 9.8321-12.782 3.2802 12.646-2.6276 27.112-13.823 33.847-6.5573 3.9448-14.323 5.284-21.92 6.2056-4.9507 0.60059-10.039 1.0474-14.87-0.18987-6.7592-1.731-12.418-6.7198-15.845-12.798s-4.7748-13.161-4.827-20.138c-0.04071-5.4353 0.67085-10.873 0.29483-16.296s-2.0061-11.031-5.9367-14.785-10.564-4.9899-14.878-1.6831c-1.7337 1.329-3.0043 3.2697-4.9563 4.2502s-5.036 0.21793-5.1666-1.9626z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m380.18 427.1h-202.58a6.9935 6.9935 0 0 1-6.9854-6.9854v-114.1a6.9936 6.9936 0 0 1 6.9854-6.9854h202.58a6.9933 6.9933 0 0 1 6.9854 6.9854v114.1a6.9933 6.9933 0 0 1-6.9854 6.9854zm-202.58-126.51a5.4392 5.4392 0 0 0-5.4331 5.4331v114.1a5.4392 5.4392 0 0 0 5.4331 5.4331h202.58a5.4395 5.4395 0 0 0 5.4331-5.4331v-114.1a5.4394 5.4394 0 0 0-5.4331-5.4331z",fill:"#3f3d56"}),v.jsx("circle",{cx:"73.768",cy:"191.12",r:"28.967",fill:"#e6e6e6"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m356.01 401.31-34.003-58.895a2.4215 2.4215 0 0 0-4.1941 0l-20.751 35.942-30.936-53.582a3.1047 3.1047 0 0 0-5.3774 0l-43.596 75.511a3.1046 3.1046 0 0 0 2.6887 4.657h134.07a2.4215 2.4215 0 0 0 2.0971-3.6322z",fill:"currentColor"}),v.jsx("rect",{x:"14.747",y:"153.97",width:"12.419",height:"12.419",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m459.04 259.1h-158.29a5.4645 5.4645 0 0 1-5.4581-5.4582v-89.15a5.4645 5.4645 0 0 1 5.4581-5.4582h158.29a5.4643 5.4643 0 0 1 5.4582 5.4582v89.15a5.4643 5.4643 0 0 1-5.4582 5.4582zm-158.29-98.853a4.25 4.25 0 0 0-4.2452 4.2452v89.15a4.25 4.25 0 0 0 4.2452 4.2452h158.29a4.2502 4.2502 0 0 0 4.2452-4.2452v-89.15a4.2502 4.2502 0 0 0-4.2452-4.2452z",fill:"#ccc"}),v.jsx("circle",{cx:"182.31",cy:"39.947",r:"22.634",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m440.15 238.95-26.569-46.018a1.892 1.892 0 0 0-3.2771 0l-16.214 28.084-24.172-41.867a2.4259 2.4259 0 0 0-4.2017 0l-34.064 59.001a2.4258 2.4258 0 0 0 2.1008 3.6388h104.76a1.8921 1.8921 0 0 0 1.6386-2.8381z",fill:"#e6e6e6"}),v.jsx("rect",{x:"136.2",y:"10.916",width:"9.7034",height:"9.7034",fill:"#ccc"})]}),className:"qc-mt-8 lg:qc-mt-24"})}):v.jsx(Ai,{dataLength:k?.length||0,next:C,hasMore:j||!1,loader:v.jsx("div",{className:"qc-mx-auto qc-my-3 qc-w-fit",children:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc-size-12",viewBox:"0 0 24 24",children:[v.jsx("circle",{cx:18,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:.67,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),v.jsx("circle",{cx:12,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:.33,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),v.jsx("circle",{cx:6,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:0,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})})]})}),children:v.jsx("div",{ref:y,className:b(D?"qc-flex qc-w-full qc-justify-center":"",V?"qc-opacity-0":"qc-opacity-100",R?"qc-pointer-events-none qc-transition-opacity qc-duration-300":"qc-pointer-events-auto qc-transition-none","qc-scrollbar-hide qc-relative qc-size-full qc-overflow-auto"),children:v.jsx(pi,{event:q,contents:k,singleColumnMode:D,kioskMode:R,curateLink:q?.engagementStyle===x.CONTEST&&q.status===A.OPEN?M.CURATE(q?.slug):null,onChangeFaceUrl:l})})})]})}},Symbol.toStringTag,{value:"Module"}));export{$t as C,Zt as P,Ht as Z,kt as a,bt as b,St as c,Ot as d,yt as e,Dt as f,qt as g,Bt as h,jt as i,_t as j,Rt as k,Ii as l,Tt as p,xt as r,Mt as s,Et as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,j as r,c as t,T as a,a5 as s,e as c,d as n,u as i,M as l,k as o,l as d,a6 as m,S as q,i as u,f as h,P as g,E as x,y as p,O as f,I as v,N as j,a7 as b}from"./index-BmmnxX0E.js";import{D as y,a as w,b as N,c as S,d as k}from"./Dialog-DyjIzwNt.js";import{L as E}from"./LazyLoadImage-C9xLmmSA.js";import{V as I}from"./VideoPlayer-D2qQXCtP.js";const C=(e,r)=>`${Number.parseFloat(e?.toFixed(r)??0)}`,_=(e,r)=>{switch(Math.floor(Math.abs(e-r))){case 0:return"qc-bg-green-500";case 1:return"qc-bg-lime-500";case 2:return"qc-bg-yellow-500";case 3:return"qc-bg-orange-500";case 4:return"qc-bg-red-500";default:return"qc-bg-primary-500"}},T=(e,r)=>{switch(Math.floor(Math.abs(e-r))){case 0:return"qc-border-t-green-500";case 1:return"qc-border-t-lime-500";case 2:return"qc-border-t-yellow-500";case 3:return"qc-border-t-orange-500";case 4:return"qc-border-t-red-500";default:return"qc-border-t-color-500"}},O=({position:e,maxPosition:t=4,content:a,isOverlapping:s,colorclsx:c,borderColorclsx:n})=>{const i=e/t*100;let l="qc-transform qc--translate-x-1/2 qc-left-1/2";e<2?l="qc-left-0":e>3&&(l="qc-right-0 qc-transform qc--translate-x-full");const o=s?"qc--top-1.5":"qc-bottom-full";return r.jsxs("div",{className:"qc-relative",children:[r.jsx("div",{style:{left:`${i}%`},className:`qc-absolute ${o} qc-text-a11y qc-mb-0.5 qc-w-fit qc-whitespace-nowrap qc-rounded-md qc-px-2 qc-py-1 qc-text-sm md:qc-mb-1 ${l} qc-transition-all qc-duration-500 qc-ease-in-out ${c}`,children:a}),r.jsx("div",{style:{left:`${i}%`},className:`qc-absolute ${o} qc--mb-1.5 qc-size-0 qc-border-x-4 qc-border-t-[1rem] qc-border-transparent ${l} qc-transition-all qc-duration-500 qc-ease-in-out ${n}`})]})},R=a=>{const{crowdScore:s,userScore:c}=a,[n,i]=e.useState(0);e.useEffect((()=>{setTimeout((()=>{i(c-1)}),300)}),[c]);const l=s-1,o=c-1,d=Math.abs(l-o)<1;return r.jsxs("div",{className:t("qc-relative qc-h-4",d?"qc-mb-3":"qc-mb-0"),children:[r.jsx("div",{className:"qc-absolute qc-top-1/2 qc-h-0.5 qc-w-full qc-bg-border-primary-light"}),r.jsx("div",{style:{left:(l<n?l:n)/4*100+"%",right:`calc(100% - ${(l<n?n:l)/4*100}%)`},className:t("qc-absolute qc-top-1/2 qc-h-1 qc-rounded",_(l,o))}),r.jsx(O,{position:l,content:`crowd · ${C(s,1)}`,isOverlapping:!1,colorclsx:"qc-bg-brand",borderColorclsx:"qc-border-t-brand-light"}),r.jsx(O,{position:n,content:`you · ${C(c,1)}`,isOverlapping:d,colorclsx:_(l,o),borderColorclsx:T(l,o)})]})},z=e.lazy((()=>import("./index-BTsfiOYs.js").then((e=>e.i)))),P=e.lazy((()=>import("./DotLottiePlayer-Bc8rBb-C.js"))),$=({feedback:t})=>{const s="#374151",[c,n]=e.useState(10);return e.useEffect((()=>{const e=(t&&t.parameters||[]).reduce(((e,r)=>e+Math.abs(parseFloat(r.crowdRating)-parseFloat(r.userRating))),0);n(e.toFixed?e.toFixed(2):0)}),[t]),t?r.jsxs("div",{className:"qc-w-full",children:[t.rateCount<=0&&r.jsxs("div",{className:"-qc-mt-4 qc-mb-4 qc-flex qc-flex-col qc-items-center",children:[r.jsx(P,{className:"qc-h-auto qc-w-72 sm:qc-h-72 sm:qc-w-auto",src:"https://res.cloudinary.com/dxtjlcra0/raw/upload/v1740374960/star-explode_h2nytb.lottie",autoplay:!0,loop:!0}),r.jsx(a,{variant:"h5",align:"center",children:"Congratulations! You are the first to rate"})]}),t.rateCount>0&&r.jsxs("div",{className:"qc-mt-4",children:[(t.parameters||[]).map((e=>r.jsxs("div",{className:"qc-mt-4 qc-space-y-4",children:[r.jsx(a,{variant:"h5",children:e.name}),r.jsx(R,{crowdScore:parseFloat(e.crowdRating),userScore:parseFloat(e.userRating)})]},e.name))),r.jsxs("div",{className:"qc-mt-4 qc-flex qc-w-full qc-flex-col qc-items-center",children:[r.jsx(z,{nrOfLevels:10,percent:(10-c)/10,colors:["#ef4444","#22c55e"],textColor:s,needleColor:s,needleBaseColor:s}),r.jsx(a,{variant:"h6",children:"Alignment with crowd"})]})]})]}):null},A=e.lazy((()=>import("./DotLottiePlayer-Bc8rBb-C.js"))),F=({parameter:e,selected:c,onChange:n,showValues:i=!0})=>r.jsxs("div",{className:"qc-mb-8 qc-flex qc-w-full qc-flex-col qc-gap-2 lg:qc-mb-12 lg:qc-gap-4",children:[r.jsx(a,{variant:"h4",className:"qc-text-center qc-font-semibold qc-text-brand-light md:qc-text-left",children:e.name}),r.jsx("div",{className:"qc-grid qc-w-full qc-grid-cols-5 qc-gap-1 lg:qc-gap-2",children:(e.tooltips||[]).map((a=>{const l=`${e._id}-option-${a.value}`;return r.jsxs("div",{children:[r.jsxs("button",{className:t("qc-border-brand qc-shadow-outer qc-flex qc-size-full qc-min-h-12 qc-items-center qc-justify-center qc-rounded qc-border qc-transition-all qc-duration-100 active:qc-scale-90",c===a.value?"qc-bg-brand":"qc-bg-primary"),onClick:()=>{c!==a.value&&n&&n(a.value)},children:[e.mode===s.TEXT&&r.jsx("div",{className:t("qc-p-1 qc-text-center qc-text-xs qc-font-semibold md:qc-p-2 md:qc-text-base",c===a.value?"qc-text-a11y":"qc-text-primary"),children:a.label}),e.mode===s.IMAGE&&r.jsx("img",{className:"qc-h-12 qc-w-auto qc-rounded-md qc-object-contain lg:qc-h-16",src:a.imageUrl,alt:a.value}),e.mode===s.LOTTIE&&r.jsx(A,{className:"qc-h-16 qc-w-auto qc-rounded-md qc-object-contain lg:qc-h-24",src:a.imageUrl,autoplay:!0,loop:!0})]}),i&&r.jsx("div",{className:"qc-mt-1 qc-w-full qc-text-center",children:r.jsx("span",{className:"qc-text-primary qc-inline-flex qc-items-center qc-px-2 qc-py-[0.0625] qc-text-xs qc-font-medium md:qc-px-3 md:qc-py-0.5",children:a.value})})]},l)}))})]});var L,M,D=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var a,s,c=t.call(e),n=[];try{for(;(void 0===r||r-- >0)&&!(a=c.next()).done;)n.push(a.value)}catch(e){s={error:e}}finally{try{a&&!a.done&&(t=c.return)&&t.call(c)}finally{if(s)throw s.error}}return n};function U(e,r,t,a,s,c,n,i,l,o,d){var m,q,u,h;if(0!==n)if(n!==t-r+(c-s)){for(var g=t-r,x=c-s,p=Math.floor(x/2),f={},v=-n-1;v<=n+1;++v)f[v]={d:1/0,segments:0,direct:L.none};for(var j=((m={})[-n-1]={d:1/0,segments:0,direct:L.none},m[n+1]={d:1/0,segments:0,direct:L.none},m),b=0;b<=p;++b){q=D([j,f],2),f=q[0],j=q[1];var y=function(t){var c=b+t;if(0===b&&0===c)return f[t]={d:0,segments:0,direct:i},"continue";var n=[{direct:L.horizontal,d:f[t-1].d+1,segments:f[t-1].segments+(f[t-1].direct&L.horizontal?0:1)},{direct:L.vertical,d:j[t+1].d+1,segments:j[t+1].segments+(j[t+1].direct&L.vertical?0:1)}];c>0&&c<=g&&b>0&&b<=x&&o(e[r+c-1],a[s+b-1])&&n.push({direct:L.diagonal,d:j[t].d,segments:j[t].segments+(j[t].direct&L.diagonal?0:1)});var l=n.reduce((function(e,r){return e.d>r.d||e.d===r.d&&e.segments>r.segments?r:e}));n.forEach((function(e){l.d===e.d&&l.segments===e.segments&&(l.direct|=e.direct)})),f[t]=l};for(v=-n;v<=n;++v)y(v)}var w={};for(v=-n-1;v<=n+1;++v)w[v]={d:1/0,segments:0,direct:L.none};var N=((u={})[-n-1]={d:1/0,segments:0,direct:L.none},u[n+1]={d:1/0,segments:0,direct:L.none},u);for(b=x;b>=p;--b){h=D([N,w],2),w=h[0],N=h[1];var S=function(t){var c=b+t;if(b===x&&c===g)return w[t]={d:0,segments:0,direct:l},"continue";var n=[{direct:L.horizontal,d:w[t+1].d+1,segments:w[t+1].segments+(w[t+1].direct&L.horizontal?0:1)},{direct:L.vertical,d:N[t-1].d+1,segments:N[t-1].segments+(N[t-1].direct&L.vertical?0:1)}];c>=0&&c<g&&b>=0&&b<x&&o(e[r+c],a[s+b])&&n.push({direct:L.diagonal,d:N[t].d,segments:N[t].segments+(N[t].direct&L.diagonal?0:1)});var i=n.reduce((function(e,r){return e.d>r.d||e.d===r.d&&e.segments>r.segments?r:e}));n.forEach((function(e){i.d===e.d&&i.segments===e.segments&&(i.direct|=e.direct)})),w[t]=i};for(v=n;v>=-n;--v)S(v)}var k={k:-1,d:1/0,segments:0,direct:L.none};for(v=-n;v<=n;++v){var E=f[v].d+w[v].d;if(E<k.d)k.k=v,k.d=E,k.segments=f[v].segments+w[v].segments+(f[v].segments&w[v].segments?0:1),k.direct=w[v].direct;else if(E===k.d){var I=f[v].segments+w[v].segments+(f[v].segments&w[v].segments?0:1);(I<k.segments||I===k.segments&&!(k.direct&L.diagonal)&&w[v].direct&L.diagonal)&&(k.k=v,k.d=E,k.segments=I,k.direct=w[v].direct)}}p+k.k===0&&0===p&&(p++,f[k.k].direct=w[k.k].direct,w[k.k].direct=N[k.k].direct),U(e,r,r+p+k.k,a,s,s+p,f[k.k].d,i,w[k.k].direct,o,d),U(e,r+p+k.k,t,a,s+p,c,w[k.k].d,f[k.k].direct,l,o,d)}else(i&L.horizontal?1:0)+(l&L.vertical?1:0)>=(i&L.vertical?1:0)+(l&L.horizontal?1:0)?(r!==t&&d("remove",e,r,t,a,s,s),s!==c&&d("add",e,t,t,a,s,c)):(s!==c&&d("add",e,r,r,a,s,c),r!==t&&d("remove",e,r,t,a,c,c));else d("same",e,r,t,a,s,c)}function G(e,r,t,a){var s=function(e,r,t){for(var a=e.length,s=r.length,c=a+s,n={1:0},i=0;i<=c;++i)for(var l=-i;l<=i;l+=2){for(var o=void 0,d=(o=l===-i||l!==i&&n[l-1]+1<n[l+1]?n[l+1]:n[l-1]+1)-l;o<a&&d<s&&t(e[o],r[d]);)o++,d++;if(o===a&&d===s)return i;n[l]=o}return-1}(e,r,t);U(e,0,e.length,r,0,r.length,s,L.diagonal,L.all,t,a)}(M=L||(L={}))[M.none=0]="none",M[M.horizontal=1]="horizontal",M[M.vertical=2]="vertical",M[M.diagonal=4]="diagonal",M[M.all=7]="all";const V=()=>{const t=c(),{eventSlug:s,contentId:C}=n(),{props:{organizationId:_,loginUrl:T},user:O,getAccessToken:R,loadingUser:z,organization:P}=i(),[A,L]=e.useState(!1),[M,D]=e.useState(null),[U,V]=e.useState([]),[W,Y]=e.useState(null),[X,H]=e.useState("contain"),[J,K]=e.useState({}),[Q,Z]=e.useState(null),[ee,re]=e.useState(!1),[te,ae]=e.useState(!0),[se,ce]=e.useState(null),{loading:ne,event:ie,parameters:le}=l({eventSlug:s});e.useEffect((()=>{ie&&O&&de(ie._id)}),[ie,O]);const oe=P?.navigationSettings?.showAIDescription,de=async e=>{L(!0);try{const r=await o.get(d.CONTENT_FOR_CURATION,{headers:{"x-org-id":_},searchParams:{accessToken:await R(),eventId:e,page:1,limit:10,includeDescription:oe}}).json();if(r.error)throw new Error(r.error);const t=C?r.data.filter((e=>e._id!==C)):r.data;let a,s=t;if(C){const e=await o.get(d.ELIGIBLE_TO_CURATE,{headers:{"x-org-id":_},searchParams:{accessToken:await R(),contentId:C,includeDescription:oe}}).json();if(e.error)throw new Error(e.error);const r=e.data;s=r?[r,...t]:t||[],a=r&&r.userId===O?._id?"Sorry, you cannot rate your own content":r&&r.ratingStatus===m.CURATED?"Sorry, you have already rated this photo.":null}const c=await o.get(d.GET_EVENT_POINTS,{headers:{"x-org-id":_},searchParams:{accessToken:await R(),eventId:e}}).json();if(c.error)throw new Error(c.error);Y(c.data),V(s),D(a)}catch(e){console.error("Failed to fetch contents",e)}L(!1)},me=async e=>{try{const r=await o.get(d.CONTENT_FOR_CURATION,{headers:{"x-org-id":_},searchParams:{accessToken:await R(),eventId:ie?._id,page:1,limit:10,includeDescription:oe}});if(r.error)throw new Error(r.error);if(r?.data?.length>0){const t=function(e,r,t){void 0===t&&(t=function(e,r){return e===r});var a={removed:[],added:[]};return G(e,r,t,(function(e,r,t,s,c,n,i){if("add"===e)for(var l=n;l<i;++l)a.added.push(c[l]);else if("remove"===e)for(l=t;l<s;++l)a.removed.push(r[l])})),a}(e,r.data,((e,r)=>e._id===r._id)),a=[...e,...t.added];V(a)}}catch(e){console.error(e)}},qe=()=>{const e=U.slice(1);D(null),Z(null),K({}),e.length===b?me(e):V(e),ae(!0)};if(z)return r.jsx(q,{className:"qc-mx-auto qc-h-6 qc-w-64"});if(!O){if(!P.customAuth)return r.jsx(h,{to:g.LOGIN,state:{referrer:t.pathname}});if(!T)return r.jsx(u,{title:"Please login to upload content"});window.history.pushState({},"",T)}return r.jsx("div",{className:"qc-min-h-[80vh]",children:A||ne?r.jsxs("div",{className:"qc-mt-8 qc-grid qc-grid-cols-1 qc-gap-6 md:qc-grid-cols-2",children:[r.jsx(q,{className:"qc-h-64 qc-w-full md:qc-h-[30rem] md:qc-max-h-screen md:qc-rounded"}),r.jsx("div",{className:"qc-space-y-8",children:Array.from({length:2}).map(((e,t)=>r.jsxs("div",{className:"qc-space-y-4",children:[r.jsx(q,{className:"qc-h-8 qc-w-36"}),r.jsx("div",{className:"qc-flex qc-w-full qc-gap-4",children:Array.from({length:5}).map(((e,t)=>r.jsx(q,{className:"qc-h-24 qc-w-full sm:qc-h-32"},t)))})]},t)))})]}):r.jsxs("div",{className:"lg:qc-mt-8",children:[ie?.status===x.CLOSED&&r.jsx(a,{variant:"h3",color:"brand",align:"center",children:"Event is now closed. Thank you for participating!"}),ie?.status===x.OPEN&&U.length<=0&&r.jsx(a,{variant:"h3",color:"brand",align:"center",children:"No content to rate. Please find another event to rate contents."}),ie?.status===x.OPEN&&U.length>0&&r.jsxs("div",{children:[r.jsxs("div",{className:"qc-flex qc-w-full qc-items-center qc-justify-between",children:[oe&&U[0]?.contentSummary?.subject?r.jsx(a,{variant:"h4",children:U[0].contentSummary.subject}):r.jsxs(a,{variant:"h4",children:["Rate this ",U[0].type===p.IMAGE?"image":"video"]}),r.jsxs(a,{variant:"h4",children:[ie?.pointName,":"," ",r.jsx("span",{className:"qc-text-brand",children:W.upload+W.curate})]})]}),r.jsxs("div",{className:"qc-grid qc-grid-cols-1 qc-gap-6 md:qc-grid-cols-2",children:[r.jsxs("div",{className:"qc-relative qc-mt-4 qc-w-full",children:[U[0].type===p.IMAGE&&r.jsxs(e.Fragment,{children:[r.jsx(E,{sizeMode:X,src:U[0].url,alt:U[0].caption,blurhash:U[0].blurhash,wrapperClassName:"qc-w-full qc-h-60 md:qc-h-[30rem] md:qc-max-h-screen md:qc-rounded"}),oe&&r.jsx("div",{className:"qc-absolute qc-right-0 qc-top-0",children:r.jsx("a",{target:"_blank",href:`https://www.bing.com/images/search?view=detailv2&iss=SBI&form=SBIIRP&sbisrc=UrlPaste&q=imgurl:${U[0].url}&idpbck=1&selectedindex=0&id=${U[0].url}&mediaurl=${U[0].url}&exph=480&expw=640&vt=3&sim=11&cal=0&cab=1&cat=0&car=1`,rel:"noopener noreferrer",children:r.jsx(f,{icon:"logos:bing",color:"primary",children:r.jsx(v,{name:"material-symbols:open-in-new-rounded",size:"sm"})})})})]}),U[0].type===p.VIDEO&&r.jsx("div",{className:"qc-mx-auto qc-h-80 qc-w-fit qc-overflow-hidden qc-rounded sm:qc-h-[30rem]",children:r.jsx(I,{fit:X,src:U[0].url,loop:!0,playing:te,volume:0,muted:!0,onPlay:()=>ae(!0),onPause:()=>ae(!1),onEnd:()=>ae(!1)})}),U[0].caption&&U[0].caption.length>0&&r.jsx("div",{className:"qc-bg-primary qc-absolute qc-bottom-0 qc-w-full qc-bg-opacity-75 qc-p-2",children:r.jsx(a,{variant:"body3",lines:"2",children:U[0].caption})}),U.length>1&&r.jsx("img",{style:{display:"none"},src:U[1].url,alt:"Next image"})]}),r.jsxs("div",{className:"qc-px-2 md:qc-px-4",children:[!M&&le&&le.map((e=>r.jsx(F,{parameter:e,selected:J[e._id],onChange:r=>K({...J,[e._id]:r})},e._id))),se&&r.jsx(a,{variant:"h5",color:"error",children:se}),M&&r.jsx("div",{className:"sm:qc-pt-16",children:r.jsx(a,{variant:"h5",color:"error",align:"center",children:M})}),le&&r.jsx(f,{type:"button",color:"brand",className:"qc-mt-4 qc-w-full",disabled:ee,loading:ee,icon:"material-symbols:check-rounded",onClick:M?qe:async()=>{if(le.length<1)return void ce("no parameters found");if(Object.keys(J).length<le.length)return void ce("please select your ratings");ce(null),re(!0);const e=await o.post(d.CURATE_CONTENT,{headers:{"x-org-id":_},json:{accessToken:await R(),eventId:ie._id,contentId:U[0]._id,parameterCount:le.length,userRatings:le.map((e=>({parameterId:e._id,weight:e.weight,rate:J[e._id]}))),inappropriate:""}}).json();if(e.error)ce(e.error);else{const r=e.data,t=r.crowdRatings||{},a={parameters:le.map((e=>({name:e.name,crowdRating:t[e._id],userRating:r.ratings?.find((r=>r.parameterId===e._id))?.rate}))),similarity:r.similarity||null,points:r.points||0,rateCount:r.rateCount||0};Z(a);const s={...W};s.curate+=ie.activityScores.curate,Y(s)}re(!1)},children:M?"Rate Next Image":ee?"Rating...":"Submit"})]})]}),U?.length>0&&oe&&r.jsx(B,{summary:U[0].contentSummary}),r.jsx(j,{to:g.GALLERY(s),state:{internalNavigation:!0},children:r.jsx(a,{variant:"h5",align:"center",children:"Goto gallery"})})]}),r.jsx(y,{open:!!Q,onOpenChange:e=>!e&&qe(),children:r.jsxs(w,{children:[r.jsxs(N,{children:[r.jsxs(S,{className:"qc-hidden",children:[ie?.pointName,": ",W?.upload+W?.curate]}),r.jsx(k,{className:"qc-hidden",children:"We are here to help you"})]}),r.jsxs("div",{className:"qc-w-full qc-space-y-3 qc-px-3 qc-pb-6 lg:qc-px-6",children:[r.jsx($,{feedback:Q}),r.jsx(f,{fullWidth:!0,color:"brand",onClick:qe,children:"Next"})]})]})})]})})},B=({summary:t})=>r.jsxs("div",{className:"qc-mb-16 qc-mt-8 qc-w-full",children:[t?.labels&&r.jsx("div",{className:"qc-space-y-2",children:Object.entries(t?.labels).filter((([e,r])=>Array.isArray(r)&&r.length>0)).map((([e,t])=>r.jsxs("div",{className:"",children:[r.jsx(a,{variant:"h4",className:"qc-mb-2 qc-font-semibold qc-capitalize",children:e.replace("_"," ")}),r.jsx("ul",{className:"qc-space-y-1 qc-pl-2",children:t.map(((e,t)=>r.jsxs("li",{className:"qc-flex qc-items-center qc-gap-2",children:[r.jsx(v,{name:"material-symbols:check-circle-outline",className:"qc-text-brand"}),r.jsx(a,{variant:"body1",children:e}),r.jsx("a",{href:`https://www.google.com/search?q=${encodeURIComponent(e)}`,target:"_blank",rel:"noopener noreferrer",className:"qc-ml-2",children:r.jsx(f,{variant:"outlined",icon:"flat-color-icons:google",children:r.jsx(v,{name:"material-symbols:open-in-new-rounded",size:"sm"})})})]},t)))})]},e)))}),t?.description&&r.jsxs(e.Fragment,{children:[r.jsx("hr",{className:"qc-my-4 lg:qc-my-8"}),r.jsx(a,{variant:"body2",children:t?.description})]})]});export{V as default};
|