@qratilabs/qrati-connect 2.32.2 → 2.33.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/element/B60TJHpn.js +1 -0
- package/element/{DiQrTagI2.js → BX09gwBu.js} +1 -1
- package/element/{BZSy_Rh42.js → BgmJHB_q.js} +18 -18
- package/element/{CDBzc1CZ.js → BhPQW37y.js} +1 -1
- package/element/BhUO8wHu.js +16 -0
- package/element/BhYfK52W.js +207 -0
- package/element/BjDK8Ljd.js +85 -0
- package/element/Bjbk1Zhj.js +1 -0
- package/element/BlsbPO0-.js +1 -0
- package/element/{DFRMtMLz.js → Bpjf4eY9.js} +1 -1
- package/element/{DUS9pix12.js → BtLTtkX8.js} +1 -1
- package/element/{CaTxtEbg.js → BuT9kfma.js} +1 -1
- package/element/Bx-BFs7B.js +4 -0
- package/element/{DtBnBN-i.js → BzXQkPAW.js} +1 -1
- package/element/{D-U23_J5.js → CGJtMtq6.js} +36 -36
- package/element/CVlMw3Vf.js +3 -0
- package/element/CYHy0vN3.js +1 -0
- package/element/CZJLtvF9.js +4 -0
- package/element/CfNXbM5H.js +2 -0
- package/element/ChW2P7vL.js +2 -0
- package/element/CrZvMeF8.js +8 -0
- package/element/{DdQWa3ny.js → Crg6P9Om.js} +1 -1
- package/element/{BOsbbHJ0.js → D9jzGMeN.js} +3 -3
- package/element/DExU6-v2.js +5 -0
- package/element/{CmcA5dp5.js → DMAkdDxr.js} +32 -32
- package/element/DMPvw0Jw.js +3 -0
- package/element/DjFlbVE4.js +8 -0
- package/element/{DO2-BnvU.js → DjKx2bl9.js} +3 -2
- package/element/{DRD9__VZ.js → DkrE1H9J.js} +1 -1
- package/element/DnrkqfsH.js +14 -0
- package/element/ILtcTVir.js +93 -0
- package/element/{BOweSM9Y.js → PxjP9VKW.js} +1 -1
- package/element/{DjOFnmwA.js → RLxieWpc.js} +1 -1
- package/element/{GwDdmgYd.js → SAPFe3AV.js} +1 -1
- package/element/ThvpIBOm.js +4 -0
- package/element/X8kQCV14.js +5 -0
- package/element/{CoARa5_i.js → ZWATOkpE.js} +1 -1
- package/element/{CE0UwtGX.js → k9JmIPl-.js} +7 -7
- package/element/{iDDlbtVI.js → pRu0r7dI.js} +1 -1
- package/element/plowVrDm.js +4 -0
- package/element/{XVFdeOm22.js → qTO-oPOF.js} +1 -1
- package/element/web.es.js +1 -1
- package/element/x3_URwMQ.js +3 -0
- package/element/{BeaTNG7m.js → xPFFaUda.js} +1 -1
- package/embed/embed.js +1 -1
- package/package.json +1 -1
- package/element/3CNVs83G2.js +0 -4
- package/element/B2ryYFFr.js +0 -4
- package/element/BNHdfdME.js +0 -1
- package/element/BP08t9Jp2.js +0 -8
- package/element/BRwZXuo82.js +0 -3
- package/element/BiCaKAmb.js +0 -4
- package/element/Bv4TkNQ42.js +0 -85
- package/element/BypLxR3J.js +0 -16
- package/element/C7zv6hcG.js +0 -1
- package/element/CD73UkPZ.js +0 -2
- package/element/CGlyix6P.js +0 -93
- package/element/Cr5o77zq.js +0 -199
- package/element/D3OYeY482.js +0 -8
- package/element/DVo8WBwP2.js +0 -4
- package/element/DXFmV-Ty2.js +0 -14
- package/element/Da6CorI52.js +0 -5
- package/element/DdACKOZr.js +0 -1
- package/element/DnnkdZ6w2.js +0 -3
- package/element/DsU4DxSM.js +0 -3
- package/element/OnH8Izqn.js +0 -1
- package/element/_d0Pbeg3.js +0 -5
- package/element/cjsXyqlO2.js +0 -1
- package/element/tvCSWnLG.js +0 -2
- /package/element/{BUDCYszs2.js → BUDCYszs.js} +0 -0
- /package/element/{CfMNBPpx2.js → CfMNBPpx.js} +0 -0
- /package/element/{DnIueBGr2.js → DnIueBGr.js} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{n as e}from"./BlsbPO0-.js";import{$t as t,Cn as o,Kt as r,Zt as n,_n as l,et as i,hn as a,kt as s,un as d,vt as c,wn as m,xn as p,xt as g,yn as u}from"./BhYfK52W.js";var h=(e,t)=>e.filter(e=>(e.parentFolderId??null)===t).map(t=>{return{folder:t,children:h(e,t._id),eventCount:t.boundary?.length??0,centroid:(o=t.boundary,o?.length?[o.reduce((e,t)=>e+t.x,0)/o.length,o.reduce((e,t)=>e+t.y,0)/o.length]:null),color:t.color||"#fb8500"};var o}).filter(e=>e.eventCount>0||e.children.length>0),f=e=>e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y),x=()=>{const{folders:e,organization:r}=g(),[l,i]=p(null),a=Boolean(r?.integrationSettings?.enableFolderView),d=u(()=>a?h(e??[],null):[],[e,a]),c=t({queryKey:["map-all-events",r?._id],queryFn:async()=>{const e=await n.get(s.PUBLIC_EVENTS,{headers:{"x-org-id":r?._id??""},searchParams:{includeAllFolders:!0,limit:500,sort:"-views",contentLimit:3,projection:"connect"}}).json();return f(e.data??[])},enabled:Boolean(r?._id)&&(!a||0===d.length),staleTime:3e5,gcTime:6e5,retry:!1}),x=t({queryKey:["map-folder-events",r?._id,l],queryFn:async()=>{const e=await n.get(s.PUBLIC_EVENTS,{headers:{"x-org-id":r?._id??""},searchParams:{folderId:l,limit:500,sort:"-views",contentLimit:3,projection:"connect"}}).json();return f(e.data??[])},enabled:Boolean(r?._id)&&a&&Boolean(l),staleTime:3e5,gcTime:6e5,retry:!1}),v=u(()=>(e??[]).find(e=>e._id===l)??null,[e,l]);o(()=>{a||i(null)},[a]);const y=m(e=>{i(e)},[]),b=a&&d.length>0;return{folderTree:d,activeFolderId:l,activeFolder:v,visibleEvents:b?x.data??[]:c.data??[],setActiveFolderId:y,isLoadingEvents:b?Boolean(l)&&(x.isLoading||x.isFetching):c.isLoading||c.isFetching}},v=/* @__PURE__ */e({default:()=>L}),y=l(()=>import("./CVlMw3Vf.js")),b=l(()=>import("./Bx-BFs7B.js")),w=l(()=>import("./x3_URwMQ.js")),_=l(()=>import("./plowVrDm.js")),E=()=>/* @__PURE__ */d("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */d("div",{class:"text-center",children:[
|
|
2
|
+
/* @__PURE__ */d("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */d("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */d("circle",{cx:"12",cy:"9",r:"2.5"})]}),
|
|
3
|
+
/* @__PURE__ */d("p",{class:"text-foreground",children:"No location data available."}),
|
|
4
|
+
/* @__PURE__ */d("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need location data to appear on the map."})]})}),j=()=>/* @__PURE__ */d(i,{className:"size-full min-h-[70vh] rounded-lg"}),L=({events:e,isLoading:t=!1})=>{const{organization:o}=g(),n=c(),l=o?.integrationSettings??{},i=l.mapProvider??"openstreetmap",s=m(e=>{n(r.GALLERY(e))},[n]);if("openstreetmap_free"===i)/* @__PURE__ */return d("div",{class:"relative mt-3 h-screen sm:mt-6",children:/* @__PURE__ */d(a,{fallback:/* @__PURE__ */d(j,{}),children:/* @__PURE__ */d(y,{onExplore:s,logoUrl:o?.logoUrl})})});const p=l.mapTilerApiKey??"",u=l.googleMapsApiKey??"",h=l.mapboxApiKey??"",f=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);/* @__PURE__ */
|
|
5
|
+
return d("div",{class:"relative mt-3 h-screen sm:mt-6",children:t?/* @__PURE__ */d(j,{}):"openstreetmap"===i&&!p||"google"===i&&!u||"mapbox"===i&&!h?/* @__PURE__ */d("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */d("div",{class:"text-center",children:[
|
|
6
|
+
/* @__PURE__ */d("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */d("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */d("circle",{cx:"12",cy:"9",r:"2.5"})]}),
|
|
7
|
+
/* @__PURE__ */d("p",{class:"text-foreground",children:"API key is required to display the map."}),
|
|
8
|
+
/* @__PURE__ */d("p",{class:"text-muted-foreground mt-1 text-xs",children:"Provide a map API key in your organization settings."})]})}):0===f.length?/* @__PURE__ */d(E,{}):/* @__PURE__ */d(a,{fallback:/* @__PURE__ */d(j,{}),children:["openstreetmap"===i&&/* @__PURE__ */d(b,{is3D:!1,apiKey:p,onExplore:s,logoUrl:o?.logoUrl}),"mapbox"===i&&/* @__PURE__ */d(_,{onExplore:s,apiKey:h,is3D:!1,logoUrl:o?.logoUrl}),"google"===i&&/* @__PURE__ */d(w,{apiKey:u,mapId:"DEMO_MAP_ID",onExplore:s,logoUrl:o?.logoUrl})]})})};export{L as default,x as n,v as t};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import{An as e,Cn as a,Ct as t,On as s,Tn as o,
|
|
2
|
-
return n(
|
|
1
|
+
import{An as e,Cn as a,Ct as t,On as s,Tn as o,un as n,wn as d,wt as l,xn as r,xt as m,yn as c}from"./BhYfK52W.js";var i=e(null),p=({open:e,onOpenChange:t,children:s})=>{const[o,l]=r(!!e);a(()=>{"boolean"==typeof e&&l(e)},[e]);const m=d(e=>{l(e),t?.(e)},[t]),p=c(()=>({open:o,setOpen:m}),[o,m]);/* @__PURE__ */
|
|
2
|
+
return n(i.Provider,{value:p,children:s})},u=({children:e})=>/* @__PURE__ */n(s,{children:e}),x=({className:e,...a})=>{const s=o(i);/* @__PURE__ */
|
|
3
|
+
return n("div",{"data-state":s?.open?"open":"closed",className:t("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-2001 bg-black/15 backdrop-blur-md",e),...a})},f=({className:e,children:s,...d})=>{const{organization:r,props:c}=m(),p=o(i);return a(()=>{if(!p?.open)return;const e=e=>{"Escape"===e.key&&p.setOpen(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[p?.open]),p?.open?/* @__PURE__ */n(u,{children:[/* @__PURE__ */n(x,{onClick:()=>p.setOpen(!1)}),/* @__PURE__ */n("div",{role:"dialog","aria-modal":"true","data-state":p?.open?"open":"closed",className:t("border-border bg-background shadow-outer data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=closed]:slide-out-to-bottom fixed top-[50%] left-[50%] z-2002 h-fit w-auto max-w-5xl translate-x-[-50%] translate-y-[-50%] overflow-hidden rounded-t border duration-300 max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:border-x-0 max-sm:border-b-0 sm:rounded",e),style:l(r,c?.theme??"light"),...d,children:s})]}):null},b=({className:e,...a})=>/* @__PURE__ */n("div",{className:t("flex flex-col space-y-1 p-3 text-center sm:text-left",e),...a}),h=({className:e,...a})=>/* @__PURE__ */n("div",{className:t("flex justify-end space-x-3 p-4",e),...a}),N=({className:e,...a})=>/* @__PURE__ */n("h2",{className:t("text-lg font-semibold",e),...a}),v=({className:e,...a})=>/* @__PURE__ */n("p",{className:t("text-muted-foreground text-sm",e),...a});export{b as a,h as i,f as n,N as o,v as r,p as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Dt as e,M as t,N as n,Ot as r,St as o,Zt as a,kt as i,
|
|
1
|
+
import{Dt as e,M as t,N as n,Ot as r,St as o,Zt as a,kt as i,un as s,vn as c,wn as l,xt as d}from"./BhYfK52W.js";function w({className:e}){/* @__PURE__ */
|
|
2
2
|
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("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"})})}function u({className:e}){/* @__PURE__ */
|
|
3
3
|
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M12 20q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4t5.675 2.325T20 12t-2.325 5.675T12 20m0-2q2.5 0 4.25-1.75T18 12q0-.425-.062-.837t-.188-.813q-.375.075-.75.113t-.75.037q-1.575 0-3-.6T10.7 8.15q-.7 1.425-1.925 2.475T6 12.15q.075 2.45 1.812 4.15T12 18M6.4 9.85q1.1-.575 1.675-1.337T9.2 6.7q-.95.5-1.675 1.313T6.4 9.85m2.388 3.863Q8.5 13.425 8.5 13t.288-.712T9.5 12t.713.288t.287.712t-.288.713T9.5 14t-.712-.288M16.25 8.5h.3q.15 0 .3-.025q-.825-1.125-2.087-1.8T12 6h-.3q-.15 0-.275.025q.975 1.125 2.062 1.8t2.763.675m-2.463 5.213Q13.5 13.425 13.5 13t.288-.712T14.5 12t.713.288t.287.712t-.288.713T14.5 14t-.712-.288M1 5V3q0-.825.588-1.412T3 1h2q.425 0 .713.288T6 2t-.288.713T5 3H3v2q0 .425-.288.713T2 6t-.712-.288T1 5m4 18H3q-.825 0-1.412-.587T1 21v-2q0-.425.288-.712T2 18t.713.288T3 19v2h2q.425 0 .713.288T6 22t-.288.713T5 23m16 0h-2q-.425 0-.712-.288T18 22t.288-.712T19 21h2v-3h2v3q0 .825-.587 1.413T21 23m0-18V3h-2q-.425 0-.712-.288T18 2t.288-.712T19 1h2q.825 0 1.413.588T23 3v2q0 .425-.288.713T22 6t-.712-.288T21 5M9.2 6.7"})})}var m=null,p=!1,g=()=>m||(m=new Promise(e=>{if("undefined"==typeof window)return void e();if(window.googletag=window.googletag||{cmd:[]},document.querySelector('script[src*="gpt.js"]'))return void e();const t=document.createElement("script");t.src="https://securepubads.g.doubleclick.net/tag/js/gpt.js",t.async=!0,t.crossOrigin="anonymous",t.onload=()=>e(),t.onerror=()=>e(),document.head.appendChild(t)})),h=()=>{p||(p=!0,window.googletag.enableServices())},T=e=>{try{const t=(window.googletag.pubads().getSlots?.()??[]).find(t=>t.getSlotElementId?.()===e);t&&window.googletag.destroySlots([t])}catch{}},v=async()=>{try{return await(async()=>{const e=await o();return"string"==typeof e?e:e?.fingerprint})()}catch(e){return console.error("[Qrati Connect] Browser fingerprint unavailable:",e),null}},f=()=>{const o=c(null),{props:s,sessionId:w,user:u}=d(),m=s?.organizationId,p=c(null),g=c(null),h=l(async e=>{if(e&&(o.current||(o.current=await v()),o.current))try{await a.post(i.TRACK_EVENT,{json:{kind:"view",eventSlug:e,browserFingerprint:o.current},headers:{"x-org-id":m,...u?{Authorization:`Bearer ${u.token}`}:{}}})}catch(t){console.error(t)}},[m,u]),T=l(async(e,t)=>{if(e&&t&&(o.current||(o.current=await v()),o.current))try{await a.post(i.TRACK_EVENT,{json:{kind:"ad",adId:e,type:t,browserFingerprint:o.current},headers:{"x-org-id":m}})}catch(n){console.error(n)}},[m]),f=l(async t=>T(t,e.AD_IMPRESSION),[T]),E=l(async t=>T(t,e.AD_ENGAGEMENT),[T]),q=l((o,a,i)=>{if(T(o,e.AD_CLICK),!i)return;const s=String(i);switch(a){case r.LINK:t(s,["http:","https:"])&&window.open(s,"_blank","noopener,noreferrer");break;case r.EMAIL:{const e=n(s);e&&(window.location.href=`mailto:${e}`);break}case r.PHONE:{const e=n(s);e&&(window.location.href=`tel:${e}`);break}case r.SMS:{const e=n(s);e&&(window.location.href=`sms:${e}`);break}case r.WHATSAPP:{const e=n(s);e&&(window.location.href=`https://wa.me/${encodeURIComponent(e)}`);break}case r.MESSENGER:{const e=n(s);e&&(window.location.href=`https://m.me/${encodeURIComponent(e)}`);break}default:t(s,["http:","https:"])&&window.open(s,"_blank","noopener,noreferrer")}},[T]),y=l(e=>{if(p.current&&g.current){const e={page:p.current,entryTime:g.current,exitTime:Date.now()};I([e])}p.current=e??null,g.current=Date.now()},[]),I=l(async e=>{if(w)try{await a.post(i.UPDATE_SESSION,{headers:{"x-org-id":m},json:{sessionId:w,pageViews:e}})}catch(t){console.error(t)}},[m,w]);return{incrementEventView:h,captureAdImpression:f,captureAdEngagement:E,captureAdClick:q,trackPageView:y,exportPageViewsData:I,trackGamAnalytics:l(async({eventId:e,organizationId:t,type:n,creativeId:r,lineItemId:s,advertiserId:c,isEmpty:l})=>{if(!e||!n)return;if(o.current||(o.current=await v()),!o.current)return;const d=t||m;if(d)try{await a.post(i.TRACK_EVENT,{json:{kind:"gam",eventId:e,organizationId:d,type:n,browserFingerprint:o.current,...r?{creativeId:r}:{},...s?{lineItemId:s}:{},...c?{advertiserId:c}:{},...void 0!==l?{isEmpty:l}:{}},headers:{"x-org-id":d}})}catch(w){console.error(w)}},[m])}},E=({container:e,onClick:t})=>{let n=!1,r=!1,o=0,a=null;const i=()=>{n=!0,o=Date.now()},s=()=>{n=!1},c=()=>{null!==a&&(window.clearTimeout(a),a=null)},l=()=>{a=window.setTimeout(()=>{const a=document.activeElement,i=a instanceof HTMLIFrameElement&&e.contains(a),s=Date.now()-o<=1500;!r&&(i||n&&s)&&(r=!0,t())},0)};return e.addEventListener("pointerenter",i),e.addEventListener("pointerleave",s),window.addEventListener("blur",l),window.addEventListener("focus",c),()=>{e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",s),window.removeEventListener("blur",l),window.removeEventListener("focus",c),null!==a&&window.clearTimeout(a)}};export{g as a,h as i,f as n,u as o,T as r,w as s,E as t};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{$t as e,Ct as a,Kt as r,Lt as t,Zt as l,et as i,kt as n,nt as o,pt as s,st as d,tt as c,un as m,wn as g,xt as h,yt as b}from"./BhYfK52W.js";import{n as f}from"./Bpjf4eY9.js";import{t as x}from"./BzXQkPAW.js";import{t as u}from"./RLxieWpc.js";function p({className:e}){/* @__PURE__ */
|
|
2
|
+
return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */m("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m12 152a8 8 0 0 1-16 0V95l-11.56 7.71a8 8 0 1 1-8.88-13.32l24-16A8 8 0 0 1 140 80Z"})})}function v({className:e}){/* @__PURE__ */
|
|
3
|
+
return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */m("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m-4 164a35.7 35.7 0 0 1-25.71-10.81A8 8 0 1 1 109.71 166A20 20 0 1 0 124 132a8 8 0 0 1-6.55-12.59L136.63 92H104a8 8 0 0 1 0-16h48a8 8 0 0 1 6.55 12.59l-21 30A36 36 0 0 1 124 188"})})}function N({className:e}){/* @__PURE__ */
|
|
4
|
+
return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */m("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m24 144a8 8 0 0 1 0 16h-48a8 8 0 0 1-6.4-12.8l43.17-57.56a16 16 0 1 0-27.86-15a8 8 0 0 1-15.09-5.34a32 32 0 1 1 55.74 29.93L120 168Z"})})}var w=e=>{if(!e)return"";const a=e.trim().split(/\s+/);return 1===a.length?a[0]:`${a[0]} ${a[1]?.[0]?`${a[1][0]}.`:""}`},y={first:{size:"size-28",imageSize:"size-24",borderColor:"border-amber-400",gradient:"from-amber-400/20 via-yellow-300/10 to-transparent"},second:{size:"size-20",imageSize:"size-16",borderColor:"border-slate-400",gradient:"from-slate-400/20 via-slate-300/10 to-transparent"},third:{size:"size-20",imageSize:"size-16",borderColor:"border-amber-600",gradient:"from-amber-600/20 via-amber-500/10 to-transparent"}},z=(e,a)=>{const r=void 0===e.totalPoint?e.maxScore:e.totalPoint;return void 0===r?"—":r.toFixed(a?2:0)},P=({entry:e,position:r,showFloatingPoint:t,hidePictures:l})=>{const i=1===r?y.first:2===r?y.second:y.third,n={1:p,2:N,3:v}[r],s={1:{bg:"bg-amber-400",border:"border-amber-600",text:"text-amber-900"},2:{bg:"bg-slate-300",border:"border-slate-500",text:"text-slate-700"},3:{bg:"bg-amber-600",border:"border-amber-800",text:"text-amber-100"}},d=g(e=>{e.currentTarget.style.display="none"},[]);/* @__PURE__ */
|
|
5
|
+
return m("div",{className:a("flex w-full flex-col items-center justify-center rounded-xl p-4 text-center sm:min-w-36","bg-linear-to-b",i.gradient),children:[l?/* @__PURE__ */m(n,{className:a(i.size,{1:"text-amber-400",2:"text-slate-400",3:"text-amber-600"}[r])}):/* @__PURE__ */m("div",{className:"relative",children:[/* @__PURE__ */m("img",{className:a(i.imageSize,"shadow-card scale-100 rounded-full border-4 object-cover",i.borderColor),src:e.image,alt:e.name??"",loading:"lazy",onError:d}),/* @__PURE__ */m("span",{className:a("shadow-card absolute -bottom-2 left-1/2 z-10 flex size-7 -translate-x-1/2 items-center justify-center rounded-full border-2 text-sm font-bold",s[r].bg,s[r].border,s[r].text),children:r})]}),/* @__PURE__ */m("div",{className:"mt-3 space-y-3 text-center",children:[/* @__PURE__ */m(o,{variant:"h6",lines:2,className:"max-w-24",align:"center",children:w(e.name)}),/* @__PURE__ */m("div",{className:"text-primary text-lg font-bold",children:z(e,t)})]})]})},j=({title:e,entries:r=[],showFloatingPoint:t=!1,hidePictures:l=!0})=>{const{t:i}=f(),n=e.replace(/\s+/g,"-").toLowerCase(),s=g(e=>{e.currentTarget.style.display="none"},[]);/* @__PURE__ */
|
|
6
|
+
return m("div",{className:"border-border mx-auto flex max-w-2xl flex-col rounded border p-4 sm:p-5 lg:p-6",children:[/* @__PURE__ */m("div",{className:"mb-4 flex items-center justify-center gap-2",children:[/* @__PURE__ */m(x,{className:"text-primary size-6"}),/* @__PURE__ */m(o,{variant:"h4",align:"center",color:"primary",children:e})]}),0===r.length?/* @__PURE__ */m("div",{className:"py-16 text-center",children:[/* @__PURE__ */m(o,{variant:"h5",align:"center",color:"error",children:i("leaderboard.not_available","No data available")}),/* @__PURE__ */m(o,{variant:"body2",align:"center",color:"muted",className:"mt-2",children:i("leaderboard.come_back_later","Check back later for updates.")})]}):/* @__PURE__ */m("div",{children:[/* @__PURE__ */m("div",{className:"flex items-end justify-center gap-2 lg:gap-8",children:[r.length>1&&/* @__PURE__ */m(P,{entry:r[1],position:2,showFloatingPoint:t,hidePictures:l}),r.length>0&&/* @__PURE__ */m(P,{entry:r[0],position:1,showFloatingPoint:t,hidePictures:l}),r.length>2&&/* @__PURE__ */m(P,{entry:r[2],position:3,showFloatingPoint:t,hidePictures:l})]}),/* @__PURE__ */m("div",{className:"mt-6 overflow-hidden rounded ring-1 ring-black/5",children:/* @__PURE__ */m("div",{className:"divide-border divide-y",children:r.slice(3).map((e,r)=>/* @__PURE__ */m("div",{className:a("hover:bg-primary/5 flex items-center gap-4 px-4 py-3",r%2==0?"bg-primary/5":"bg-background"),children:[
|
|
7
|
+
/* @__PURE__ */m("span",{className:"text-muted-foreground w-8 text-center text-sm font-medium",children:r+4}),!l&&/* @__PURE__ */m("img",{className:"ring-border size-10 rounded-full object-cover ring-2",src:e.image,alt:e.name??"",loading:"lazy",onError:s}),
|
|
8
|
+
/* @__PURE__ */m("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */m("div",{className:"truncate font-medium",children:w(e.name)})}),
|
|
9
|
+
/* @__PURE__ */m("div",{className:"text-primary text-right font-semibold",children:z(e,t)})]},`${n}-${e.name??""}-${e.totalPoint??e.maxScore??""}-${e.image??r}`))})})]})]})},S=()=>{const{eventSlug:g}=b(),{props:x}=h(),{t:p}=f(),v=x?.organizationId,{event:N,loading:w}=d({eventSlug:g}),{isLoading:y,isError:z,error:P,data:S}=e({queryKey:[`leaderboard-${v}-${N?._id}`],queryFn:async()=>(await l.get(n.GET_LEADERBOARD,{headers:{"x-org-id":v??""},searchParams:{eventId:N?._id??"",projection:"connect"}}).json()).data,enabled:Boolean(N),staleTime:3e4,gcTime:3e5});return w||y?/* @__PURE__ */m("div",{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */m("div",{className:"flex flex-col items-center gap-2 text-center",children:[/* @__PURE__ */m(i,{className:"h-5 w-28 rounded-full"}),/* @__PURE__ */m(i,{className:"h-10 w-64 rounded"})]}),/* @__PURE__ */m("div",{className:a("flex w-full gap-8 lg:gap-0",N?.engagementStyle===t.REACTION?"flex-col-reverse md:flex-row-reverse md:justify-between":"flex-col md:flex-row"),children:[/* @__PURE__ */m("div",{className:"flex-1",children:[/* @__PURE__ */m(i,{className:"h-72 w-full rounded"}),/* @__PURE__ */m(i,{className:"mt-4 h-72 w-full rounded"})]}),/* @__PURE__ */m("div",{className:"flex-1",children:/* @__PURE__ */m(i,{className:"h-72 w-full rounded"})})]})]}):z?/* @__PURE__ */m("div",{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col items-center justify-center gap-4 px-2 py-4 text-center sm:px-0 lg:py-8",children:[
|
|
10
|
+
/* @__PURE__ */m(u,{className:"size-9 text-destructive"}),
|
|
11
|
+
/* @__PURE__ */m(o,{variant:"h4",color:"error",align:"center",children:p("common.error","Something went wrong")}),
|
|
12
|
+
/* @__PURE__ */m(o,{variant:"body2",color:"muted",align:"center",children:P instanceof Error?P.message:p("common.try_again","Please try again later.")})]}):!1===N?.showLeaderboard?/* @__PURE__ */m(c,{title:p("leaderboard.not_available","Leaderboard not available"),description:p("leaderboard.disabled","Leaderboard is not available for this event.")}):/* @__PURE__ */m("div",{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */m("div",{className:"flex flex-col items-center gap-2 text-center",children:[
|
|
13
|
+
/* @__PURE__ */m("div",{className:"text-primary flex items-center gap-2",children:/* @__PURE__ */m(o,{variant:"h5",color:"primary",children:p("leaderboard.leaderboard","Leaderboard")})}),
|
|
14
|
+
/* @__PURE__ */m(o,{variant:"h4",align:"center",color:"foreground",children:N?.name}),N?.slug&&/* @__PURE__ */m(s,{to:r.GALLERY(N.slug),state:{internalNavigation:!0},className:"text-primary text-sm font-medium underline-offset-4 hover:underline",children:p("leaderboard.back_to_gallery","Back to Gallery")})]}),/* @__PURE__ */m("div",{className:a("flex w-full gap-8 lg:gap-0",N?.engagementStyle===t.REACTION?"flex-col-reverse md:flex-row-reverse md:justify-between":"flex-col md:flex-row"),children:[/* @__PURE__ */m("div",{className:"flex-1",children:/* @__PURE__ */m(j,{title:p("leaderboard.point_leaders","Top Points Leaders"),entries:S?.leaderboardByPoint?.topRankers||[],pointName:N?.pointName})}),/* @__PURE__ */m("div",{className:"flex-1",children:/* @__PURE__ */m(j,{title:N?.engagementStyle===t.REACTION?p("leaderboard.reaction_counts","Top Reactions"):p("leaderboard.top_rated_photos","Top Rated Photos"),showFloatingPoint:N?.engagementStyle===t.CONTEST,entries:S?.leaderboardByScore?.topRankers||[],pointName:N?.pointName})})]})]})};export{S as default};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import{Cn as t,Ct as e,G as r,Jt as n,Kt as i,M as o,Nt as a,Rt as s,V as _,Yt as l,Zt as d,_t as c,et as u,i as h,kt as p,mn as g,mt as m,nt as f,pt as b,st as w,tt as y,un as v,vn as C,wn as L,xn as x,xt as A,yn as M,yt as k}from"./BhYfK52W.js";import{n as S}from"./Bpjf4eY9.js";import{t as E}from"./k9JmIPl-.js";import{n as I,t as F}from"./PxjP9VKW.js";import{a as O,n as P,o as N,r as T,t as R}from"./DjKx2bl9.js";var z=({src:r,thumbnailUrl:n,playing:i=!1,controls:o=!1,playsInline:a=!0,fit:s="cover",muted:_,onClick:l,loop:d=!1,volume:c=1,onPlay:u,onPause:h,onEnd:p,showFullscreen:g=!0})=>{const m=C(null),f=C(null),b=C(null),[w,y]=x(!0);return t(()=>{(async()=>{try{i&&m.current?(b.current&&await b.current,b.current=m.current.play(),await b.current,b.current=null):m.current&&(b.current&&(await b.current,b.current=null),m.current.pause(),y(!0))}catch(t){"AbortError"!==t.name&&console.error(t)}})();const t=f.current;return()=>{t&&clearTimeout(t)}},[i]),t(()=>{if(m.current&&"number"==typeof c)try{m.current.volume=Math.min(Math.max(c,0),1)}catch(q){console.error(q)}},[c]),/* @__PURE__ */v("div",{className:"relative size-full hover:cursor-pointer",onMouseEnter:()=>!w&&y(!0),onMouseLeave:()=>w&&i&&y(!1),children:[
|
|
2
|
+
/* @__PURE__ */v("video",{ref:m,className:e("size-full","cover"===s&&"object-cover","contain"===s&&"object-contain","fill"===s&&"object-fill","none"===s&&"object-none","scale-down"===s&&"object-scale-down"),src:r,muted:_,loop:d,onLoadedMetadata:()=>{if("number"==typeof c&&m.current)try{m.current.volume=Math.min(Math.max(Number(c)||0,0),1)}catch(q){console.error(q)}},poster:n,controls:o,playsInline:a,onEnded:p,onClick:l,children:"Your browser does not support the video!"}),w&&!o&&/* @__PURE__ */v("button",{type:"button",onClick:()=>{i?h?.():u?.()},"aria-label":i?"Pause video":"Play video",className:"animate-fade-in absolute inset-0 m-auto size-12 hover:opacity-90",children:[i&&/* @__PURE__ */v("svg",{className:"absolute inset-0 m-auto size-12",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:/* @__PURE__ */v("path",{fill:"white",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"})}),!i&&/* @__PURE__ */v("svg",{className:"absolute inset-0 m-auto size-12",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:/* @__PURE__ */v("path",{fill:"white",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"})})]}),w&&i&&g&&/* @__PURE__ */v("button",{type:"button",className:"animate-fade-in absolute top-2 right-2 size-6 text-white hover:opacity-90",onClick:()=>{m.current&&(m.current.requestFullscreen?m.current.requestFullscreen():m.current.mozRequestFullScreen?m.current.mozRequestFullScreen():m.current.webkitRequestFullscreen?m.current.webkitRequestFullscreen():m.current.msRequestFullscreen&&m.current.msRequestFullscreen())},"aria-label":"Enter fullscreen",children:/* @__PURE__ */v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:/* @__PURE__ */v("path",{fill:"currentColor",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"})})})]})};function q(t){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function U(t){var e=function(t){if("object"!=q(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=q(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==q(e)?e:e+""}function B(t,e,r){return(e=U(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var D,Z=class{requestAnimationFrame(t){return requestAnimationFrame(t)}cancelAnimationFrame(t){cancelAnimationFrame(t)}},W=class{constructor(){B(this,"_lastHandleId",0),B(this,"_lastImmediate",null)}requestAnimationFrame(t){return this._lastHandleId>=2**53-1&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{t(performance.now())}),this._lastHandleId}cancelAnimationFrame(t){this._lastImmediate&&clearImmediate(this._lastImmediate)}},H=class{constructor(){B(this,"_strategy",void 0),this._strategy="function"==typeof requestAnimationFrame?new Z:new W}requestAnimationFrame(t){return this._strategy.requestAnimationFrame(t)}cancelAnimationFrame(t){this._strategy.cancelAnimationFrame(t)}},K=typeof window<"u"&&void 0!==window.document,G=new Uint8Array([80,75,3,4]),J=["v","ip","op","layers","fr","w","h"],j=Array(128).fill(void 0);function Q(t){return j[t]}j.push(void 0,null,!0,!1);var V=j.length;function Y(t){V===j.length&&j.push(j.length+1);let e=V;return V=j[e],j[e]=t,e}function X(t,e){try{return t.apply(this,e)}catch(t){D.__wbindgen_export_0(Y(t))}}function $(t){return null==t}var tt=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&tt.decode();var et=null;function rt(){return(null===et||0===et.byteLength)&&(et=new Uint8Array(D.memory.buffer)),et}function nt(t,e){return t>>>=0,tt.decode(rt().subarray(t,t+e))}var it=0,ot=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},at="function"==typeof ot.encodeInto?function(t,e){return ot.encodeInto(t,e)}:function(t,e){let r=ot.encode(t);return e.set(r),{read:t.length,written:r.length}};function st(t,e,r){if(void 0===r){let r=ot.encode(t),n=e(r.length,1)>>>0;return rt().subarray(n,n+r.length).set(r),it=r.length,n}let n=t.length,i=e(n,1)>>>0,o=rt(),a=0;for(;a<n;a++){let e=t.charCodeAt(a);if(e>127)break;o[i+a]=e}if(a!==n){0!==a&&(t=t.slice(a)),i=r(i,n,n=a+3*t.length,1)>>>0;let e=rt().subarray(i+a,i+n);a+=at(t,e).written,i=r(i,n,a,1)>>>0}return it=a,i}var _t=null;function lt(){return(null===_t||!0===_t.buffer.detached||void 0===_t.buffer.detached&&_t.buffer!==D.memory.buffer)&&(_t=new DataView(D.memory.buffer)),_t}function dt(t,e){let r=e(1*t.length,1)>>>0;return rt().set(t,r/1),it=t.length,r}function ct(t){let e=Q(t);return function(t){t<132||(j[t]=V,V=t)}(t),e}var ut=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{D.__wbindgen_export_4.get(t.dtor)(t.a,t.b)}),ht=null;function pt(t,e,r){D.__wbindgen_export_5(t,e,Y(r))}var gt=Object.freeze({Forward:0,0:"Forward",Reverse:1,1:"Reverse",Bounce:2,2:"Bounce",ReverseBounce:3,3:"ReverseBounce"}),mt=Object.freeze({Idle:0,0:"Idle",Playing:1,1:"Playing",Paused:2,2:"Paused",Stopped:3,3:"Stopped",Tweening:4,4:"Tweening"}),ft=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>D.__wbg_dotlottieplayerwasm_free(t>>>0,1)),bt=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ft.unregister(this),t}free(){let t=this.__destroy_into_raw();D.__wbg_dotlottieplayerwasm_free(t,0)}clear_slot(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,e,r)}layout_fit(){let t,e;try{let i=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_layout_fit(i,this.__wbg_ptr);var r=lt().getInt32(i+0,!0),n=lt().getInt32(i+4,!0);return t=r,e=n,nt(r,n)}finally{D.__wbindgen_add_to_stack_pointer(16),D.__wbindgen_export_3(t,e,1)}}loop_count(){return D.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return ct(D.dotlottieplayerwasm_poll_event(this.__wbg_ptr))}reset_slot(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,e,r)}set_layout(t,e,r){let n=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),i=it;return 0!==D.dotlottieplayerwasm_set_layout(this.__wbg_ptr,n,i,e,r)}set_marker(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;D.dotlottieplayerwasm_set_marker(this.__wbg_ptr,e,r)}clear_slots(){return 0!==D.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)}is_complete(){return 0!==D.dotlottieplayerwasm_is_complete(this.__wbg_ptr)}reset_slots(){return 0!==D.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)}reset_theme(){return 0!==D.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)}segment_end(){return D.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(t){return 0!==D.dotlottieplayerwasm_set_quality(this.__wbg_ptr,t)}set_segment(t,e){return 0!==D.dotlottieplayerwasm_set_segment(this.__wbg_ptr,t,e)}sm_set_seed(t){return 0!==D.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr,t)}static unload_font(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_unload_font(e,r)}animation_id(){try{let r=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_animation_id(r,this.__wbg_ptr);var t=lt().getInt32(r+0,!0),e=lt().getInt32(r+4,!0);let n;return 0!==t&&(n=nt(t,e).slice(),D.__wbindgen_export_3(t,1*e,1)),n}finally{D.__wbindgen_add_to_stack_pointer(16)}}audio_volume(){return D.dotlottieplayerwasm_audio_volume(this.__wbg_ptr)}background_a(){return D.dotlottieplayerwasm_background_a(this.__wbg_ptr)}background_b(){return D.dotlottieplayerwasm_background_b(this.__wbg_ptr)}background_g(){return D.dotlottieplayerwasm_background_g(this.__wbg_ptr)}background_r(){return D.dotlottieplayerwasm_background_r(this.__wbg_ptr)}clear_marker(){D.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}emit_on_loop(){D.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}get_slot_ids(){return ct(D.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr))}get_slot_str(t){try{let n=D.__wbindgen_add_to_stack_pointer(-16),i=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;D.dotlottieplayerwasm_get_slot_str(n,this.__wbg_ptr,i,o);var e=lt().getInt32(n+0,!0),r=lt().getInt32(n+4,!0);let a;return 0!==e&&(a=nt(e,r).slice(),D.__wbindgen_export_3(e,1*r,1)),a}finally{D.__wbindgen_add_to_stack_pointer(16)}}marker_names(){return ct(D.dotlottieplayerwasm_marker_names(this.__wbg_ptr))}set_autoplay(t){D.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,t)}set_slot_str(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=st(e,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;return 0!==D.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,r,n,i,o)}set_viewport(t,e,r,n){return 0!==D.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,t,e,r,n)}total_frames(){return D.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return 0!==D.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)}current_frame(){return D.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(t){try{let n=D.__wbindgen_add_to_stack_pointer(-16),i=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;D.dotlottieplayerwasm_get_slot_type(n,this.__wbg_ptr,i,o);var e=lt().getInt32(n+0,!0),r=lt().getInt32(n+4,!0);let a;return 0!==e&&(a=nt(e,r).slice(),D.__wbindgen_export_3(e,1*r,1)),a}finally{D.__wbindgen_add_to_stack_pointer(16)}}get_slots_str(){let t,e;try{let i=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_get_slots_str(i,this.__wbg_ptr);var r=lt().getInt32(i+0,!0),n=lt().getInt32(i+4,!0);return t=r,e=n,nt(r,n)}finally{D.__wbindgen_add_to_stack_pointer(16),D.__wbindgen_export_3(t,e,1)}}get_transform(){return ct(D.dotlottieplayerwasm_get_transform(this.__wbg_ptr))}segment_start(){return D.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,e,r)}set_text_slot(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=st(e,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;return 0!==D.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,r,n,i,o)}set_transform(t){let e=function(t,e){let r=e(4*t.length,4)>>>0;return((null===ht||0===ht.byteLength)&&(ht=new Float32Array(D.memory.buffer)),ht).set(t,r/4),it=t.length,r}(t,D.__wbindgen_export_1),r=it;return 0!==D.dotlottieplayerwasm_set_transform(this.__wbg_ptr,e,r)}sm_get_inputs(){return ct(D.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr))}sm_poll_event(){return ct(D.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr))}sm_post_click(t,e){D.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,t,e)}animation_size(){return ct(D.dotlottieplayerwasm_animation_size(this.__wbg_ptr))}current_marker(){try{let r=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_current_marker(r,this.__wbg_ptr);var t=lt().getInt32(r+0,!0),e=lt().getInt32(r+4,!0);let n;return 0!==t&&(n=nt(t,e).slice(),D.__wbindgen_export_3(t,1*e,1)),n}finally{D.__wbindgen_add_to_stack_pointer(16)}}layout_align_x(){return D.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return D.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}load_animation(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_load_animation(this.__wbg_ptr,e,r)}loop_animation(){return 0!==D.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)}set_background(t,e,r,n){return 0!==D.dotlottieplayerwasm_set_background(this.__wbg_ptr,t,e,r,n)}set_color_slot(t,e,r,n){let i=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;return 0!==D.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,o,e,r,n)}set_image_slot(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=st(e,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;return 0!==D.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr,r,n,i,o)}set_loop_count(t){D.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,t)}set_theme_data(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,e,r)}sm_reset_input(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;D.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,e,r)}manifest_string(){let t,e;try{let i=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_manifest_string(i,this.__wbg_ptr);var r=lt().getInt32(i+0,!0),n=lt().getInt32(i+4,!0);return t=r,e=n,nt(r,n)}finally{D.__wbindgen_add_to_stack_pointer(16),D.__wbindgen_export_3(t,e,1)}}set_scalar_slot(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;return 0!==D.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,r,n,e)}set_vector_slot(t,e,r){let n=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),i=it;return 0!==D.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,n,i,e,r)}setup_sw_target(t,e){return 0!==D.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr,t,e)}get_pixel_buffer(){return ct(D.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr))}set_audio_volume(t){D.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,t)}sm_current_state(){let t,e;try{let i=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_sm_current_state(i,this.__wbg_ptr);var r=lt().getInt32(i+0,!0),n=lt().getInt32(i+4,!0);return t=r,e=n,nt(r,n)}finally{D.__wbindgen_add_to_stack_pointer(16),D.__wbindgen_export_3(t,e,1)}}state_machine_id(){try{let r=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_state_machine_id(r,this.__wbg_ptr);var t=lt().getInt32(r+0,!0),e=lt().getInt32(r+4,!0);let n;return 0!==t&&(n=nt(t,e).slice(),D.__wbindgen_export_3(t,1*e,1)),n}finally{D.__wbindgen_add_to_stack_pointer(16)}}get_state_machine(t){try{let n=D.__wbindgen_add_to_stack_pointer(-16),i=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;D.dotlottieplayerwasm_get_state_machine(n,this.__wbg_ptr,i,o);var e=lt().getInt32(n+0,!0),r=lt().getInt32(n+4,!0);let a;return 0!==e&&(a=nt(e,r).slice(),D.__wbindgen_export_3(e,1*r,1)),a}finally{D.__wbindgen_add_to_stack_pointer(16)}}set_position_slot(t,e,r){let n=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),i=it;return 0!==D.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,n,i,e,r)}current_loop_count(){return D.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}set_asset_resolver(t){D.dotlottieplayerwasm_set_asset_resolver(this.__wbg_ptr,$(t)?0:Y(t))}sm_framework_setup(){return ct(D.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr))}sm_post_pointer_up(t,e){D.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,t,e)}state_machine_load(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,e,r)}load_dotlottie_data(t){let e=dt(t,D.__wbindgen_export_1),r=it;return 0!==D.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,e,r)}sm_get_string_input(t){try{let n=D.__wbindgen_add_to_stack_pointer(-16),i=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;D.dotlottieplayerwasm_sm_get_string_input(n,this.__wbg_ptr,i,o);var e=lt().getInt32(n+0,!0),r=lt().getInt32(n+4,!0);let a;return 0!==e&&(a=nt(e,r).slice(),D.__wbindgen_export_3(e,1*r,1)),a}finally{D.__wbindgen_add_to_stack_pointer(16)}}sm_set_string_input(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=st(e,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;return 0!==D.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,r,n,i,o)}sm_get_boolean_input(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it,n=D.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,e,r);return 16777215===n?void 0:0!==n}sm_get_numeric_input(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it,n=D.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,e,r);return 4294967297===n?void 0:n}sm_post_pointer_down(t,e){D.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,t,e)}sm_post_pointer_exit(t,e){D.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,t,e)}sm_post_pointer_move(t,e){D.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,t,e)}sm_set_boolean_input(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;return 0!==D.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,r,n,e)}sm_set_numeric_input(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;return 0!==D.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,r,n,e)}state_machine_unload(){D.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(t,e){D.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,t,e)}load_animation_from_id(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,e,r)}sm_poll_internal_event(){return ct(D.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr))}use_frame_interpolation(){return 0!==D.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)}reset_current_loop_count(){D.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;return 0!==D.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,r,n,e)}state_machine_load_from_id(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,e,r)}set_use_frame_interpolation(t){D.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,t)}constructor(){let t=D.dotlottieplayerwasm_new();return this.__wbg_ptr=t>>>0,ft.register(this,this.__wbg_ptr,this),this}mode(){return D.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return 0!==D.dotlottieplayerwasm_play(this.__wbg_ptr)}stop(){return 0!==D.dotlottieplayerwasm_stop(this.__wbg_ptr)}tick(t){return 0!==D.dotlottieplayerwasm_tick(this.__wbg_ptr,t)}pause(){return 0!==D.dotlottieplayerwasm_pause(this.__wbg_ptr)}speed(){return D.dotlottieplayerwasm_speed(this.__wbg_ptr)}width(){return D.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return D.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}render(){return 0!==D.dotlottieplayerwasm_render(this.__wbg_ptr)}status(){return D.dotlottieplayerwasm_status(this.__wbg_ptr)}markers(){return ct(D.dotlottieplayerwasm_markers(this.__wbg_ptr))}sm_fire(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,e,r)}sm_stop(){return 0!==D.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)}sm_tick(t){return 0!==D.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,t)}autoplay(){return 0!==D.dotlottieplayerwasm_autoplay(this.__wbg_ptr)}duration(){return D.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(t){D.dotlottieplayerwasm_set_loop(this.__wbg_ptr,t)}set_mode(t){D.dotlottieplayerwasm_set_mode(this.__wbg_ptr,t)}sm_start(t,e){let r=function(t){let e=(0,D.__wbindgen_export_1)(4*t.length,4)>>>0,r=lt();for(let n=0;n<t.length;n++)r.setUint32(e+4*n,Y(t[n]),!0);return it=t.length,e}(e),n=it;return 0!==D.dotlottieplayerwasm_sm_start(this.__wbg_ptr,t,r,n)}theme_id(){try{let r=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_theme_id(r,this.__wbg_ptr);var t=lt().getInt32(r+0,!0),e=lt().getInt32(r+4,!0);let n;return 0!==t&&(n=nt(t,e).slice(),D.__wbindgen_export_3(t,1*e,1)),n}finally{D.__wbindgen_add_to_stack_pointer(16)}}load_font(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=dt(e,D.__wbindgen_export_1),o=it;return 0!==D.dotlottieplayerwasm_load_font(this.__wbg_ptr,r,n,i,o)}set_frame(t){return 0!==D.dotlottieplayerwasm_set_frame(this.__wbg_ptr,t)}set_speed(t){D.dotlottieplayerwasm_set_speed(this.__wbg_ptr,t)}set_theme(t){let e=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),r=it;return 0!==D.dotlottieplayerwasm_set_theme(this.__wbg_ptr,e,r)}sm_status(){let t,e;try{let i=D.__wbindgen_add_to_stack_pointer(-16);D.dotlottieplayerwasm_sm_status(i,this.__wbg_ptr);var r=lt().getInt32(i+0,!0),n=lt().getInt32(i+4,!0);return t=r,e=n,nt(r,n)}finally{D.__wbindgen_add_to_stack_pointer(16),D.__wbindgen_export_3(t,e,1)}}};async function wt(t){if(void 0!==D)return D;if(void 0!==t&&(Object.getPrototypeOf(t)===Object.prototype?({module_or_path:t}=t):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===t)throw Error("WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().");let e=function(){let t={wbg:{}};return t.wbg.__wbg_appendChild_8204974b7328bf98=function(){return X(function(t,e){return Y(Q(t).appendChild(Q(e)))},arguments)},t.wbg.__wbg_body_942ea927546a04ba=function(t){let e=Q(t).body;return $(e)?0:Y(e)},t.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return Y(Q(t).buffer)},t.wbg.__wbg_call_672a4d21634d4a24=function(){return X(function(t,e){return Y(Q(t).call(Q(e)))},arguments)},t.wbg.__wbg_call_7cccdd69e0791ae2=function(){return X(function(t,e,r){return Y(Q(t).call(Q(e),Q(r)))},arguments)},t.wbg.__wbg_catch_a6e601879b2610e9=function(t,e){return Y(Q(t).catch(Q(e)))},t.wbg.__wbg_createElement_8c9931a732ee2fea=function(){return X(function(t,e,r){return Y(Q(t).createElement(nt(e,r)))},arguments)},t.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764=function(){return X(function(t,e){let r=st(URL.createObjectURL(Q(e)),D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;lt().setInt32(t+4,n,!0),lt().setInt32(t+0,r,!0)},arguments)},t.wbg.__wbg_currentTime_7940fe39798a1ca0=function(t){return Q(t).currentTime},t.wbg.__wbg_data_d1ed736c1e42b10e=function(t,e){let r=dt(Q(e).data,D.__wbindgen_export_1),n=it;lt().setInt32(t+4,n,!0),lt().setInt32(t+0,r,!0)},t.wbg.__wbg_document_d249400bd7bd996d=function(t){let e=Q(t).document;return $(e)?0:Y(e)},t.wbg.__wbg_drawImage_803dcc46897223c9=function(){return X(function(t,e,r,n){Q(t).drawImage(Q(e),r,n)},arguments)},t.wbg.__wbg_duration_4d32c501d87796c1=function(t){return Q(t).duration},t.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,n;try{r=t,n=e,console.error(nt(t,e))}finally{D.__wbindgen_export_3(r,n,1)}},t.wbg.__wbg_getContext_e9cf379449413580=function(){return X(function(t,e,r){let n=Q(t).getContext(nt(e,r));return $(n)?0:Y(n)},arguments)},t.wbg.__wbg_getImageData_c02374a30b126dab=function(){return X(function(t,e,r,n,i){return Y(Q(t).getImageData(e,r,n,i))},arguments)},t.wbg.__wbg_instanceof_CanvasRenderingContext2d_df82a4d3437bf1cc=function(t){let e;try{e=Q(t)instanceof CanvasRenderingContext2D}catch{e=!1}return e},t.wbg.__wbg_instanceof_HtmlCanvasElement_2ea67072a7624ac5=function(t){let e;try{e=Q(t)instanceof HTMLCanvasElement}catch{e=!1}return e},t.wbg.__wbg_instanceof_HtmlVideoElement_7f414b32f362e317=function(t){let e;try{e=Q(t)instanceof HTMLVideoElement}catch{e=!1}return e},t.wbg.__wbg_instanceof_Window_def73ea0955fc569=function(t){let e;try{e=Q(t)instanceof Window}catch{e=!1}return e},t.wbg.__wbg_length_a446193dc22c12f8=function(t){return Q(t).length},t.wbg.__wbg_load_2671477a3293aadb=function(t){Q(t).load()},t.wbg.__wbg_new_405e22f390576ce2=function(){return Y({})},t.wbg.__wbg_new_78feb108b6472713=function(){return Y([])},t.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Y(Error())},t.wbg.__wbg_new_a12002a7f91c75be=function(t){return Y(new Uint8Array(Q(t)))},t.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return Y(Function(nt(t,e)))},t.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return Y(new Uint8Array(Q(t),e>>>0,r>>>0))},t.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(t){return Y(new Float32Array(t>>>0))},t.wbg.__wbg_newwithsrc_20307ca7e8762a81=function(){return X(function(t,e){return Y(new Audio(nt(t,e)))},arguments)},t.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127=function(){return X(function(t,e){return Y(new Blob(Q(t),Q(e)))},arguments)},t.wbg.__wbg_pause_b74c96d69f769518=function(){return X(function(t){Q(t).pause()},arguments)},t.wbg.__wbg_paused_9b2affc0a8a62e86=function(t){return Q(t).paused},t.wbg.__wbg_play_f6ec5fc4e84b0d26=function(){return X(function(t){return Y(Q(t).play())},arguments)},t.wbg.__wbg_push_737cfc8c1432c2c6=function(t,e){return Q(t).push(Q(e))},t.wbg.__wbg_readyState_017c08aa5e73517e=function(t){return Q(t).readyState},t.wbg.__wbg_remove_e2d2659f3128c045=function(t){Q(t).remove()},t.wbg.__wbg_revokeObjectURL_27267efebeb457c7=function(){return X(function(t,e){URL.revokeObjectURL(nt(t,e))},arguments)},t.wbg.__wbg_seeking_c0427be38e698dcd=function(t){return Q(t).seeking},t.wbg.__wbg_setAttribute_2704501201f15687=function(){return X(function(t,e,r,n,i){Q(t).setAttribute(nt(e,r),nt(n,i))},arguments)},t.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){Q(t).set(Q(e),r>>>0)},t.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return X(function(t,e,r){return Reflect.set(Q(t),Q(e),Q(r))},arguments)},t.wbg.__wbg_setcssText_e018c236104b0233=function(t,e,r){Q(t).cssText=nt(e,r)},t.wbg.__wbg_setcurrentTime_64727eddd3966512=function(t,e){Q(t).currentTime=e},t.wbg.__wbg_setheight_da683a33fa99843c=function(t,e){Q(t).height=e>>>0},t.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(t,e,r){Q(t)[e>>>0]=r},t.wbg.__wbg_setmuted_e93fc48340c43e67=function(t,e){Q(t).muted=0!==e},t.wbg.__wbg_setplaybackRate_f5c3b8896f82425e=function(t,e){Q(t).playbackRate=e},t.wbg.__wbg_setpreload_d2fb02758e3f8e3a=function(t,e,r){Q(t).preload=nt(e,r)},t.wbg.__wbg_setsrc_3a759736e2659904=function(t,e,r){Q(t).src=nt(e,r)},t.wbg.__wbg_settype_39ed370d3edd403c=function(t,e,r){Q(t).type=nt(e,r)},t.wbg.__wbg_setvolume_3895e06a030ca4f7=function(t,e){Q(t).volume=e},t.wbg.__wbg_setwidth_c5fed9f5e7f0b406=function(t,e){Q(t).width=e>>>0},t.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){let r=st(Q(e).stack,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it;lt().setInt32(t+4,n,!0),lt().setInt32(t+0,r,!0)},t.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){let t=typeof global>"u"?null:global;return $(t)?0:Y(t)},t.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){let t=typeof globalThis>"u"?null:globalThis;return $(t)?0:Y(t)},t.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){let t=typeof self>"u"?null:self;return $(t)?0:Y(t)},t.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){let t=typeof window>"u"?null:window;return $(t)?0:Y(t)},t.wbg.__wbg_style_fb30c14e5815805c=function(t){return Y(Q(t).style)},t.wbg.__wbg_videoHeight_3a43327a766c1f03=function(t){return Q(t).videoHeight},t.wbg.__wbg_videoWidth_4b400cf6f4744a4d=function(t){return Q(t).videoWidth},t.wbg.__wbindgen_cb_drop=function(t){let e=ct(t).original;return 1==e.cnt--&&(e.a=0,!0)},t.wbg.__wbindgen_closure_wrapper109=function(t,e,r){return Y(function(t,e,r,n){let i={a:t,b:e,cnt:1,dtor:7},o=(...t)=>{i.cnt++;let e=i.a;i.a=0;try{return n(e,i.b,...t)}finally{0===--i.cnt?(D.__wbindgen_export_4.get(i.dtor)(e,i.b),ut.unregister(i)):i.a=e}};return o.original=i,ut.register(o,i,i),o}(t,e,0,pt))},t.wbg.__wbindgen_is_null=function(t){return null===Q(t)},t.wbg.__wbindgen_is_undefined=function(t){return void 0===Q(t)},t.wbg.__wbindgen_memory=function(){return Y(D.memory)},t.wbg.__wbindgen_number_new=function(t){return Y(t)},t.wbg.__wbindgen_object_clone_ref=function(t){return Y(Q(t))},t.wbg.__wbindgen_object_drop_ref=function(t){ct(t)},t.wbg.__wbindgen_string_get=function(t,e){let r=Q(e),n="string"==typeof r?r:void 0;var i=$(n)?0:st(n,D.__wbindgen_export_1,D.__wbindgen_export_2),o=it;lt().setInt32(t+4,o,!0),lt().setInt32(t+0,i,!0)},t.wbg.__wbindgen_string_new=function(t,e){return Y(nt(t,e))},t.wbg.__wbindgen_throw=function(t,e){throw Error(nt(t,e))},t}();("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:n}=await async function(t,e){if("function"==typeof Response&&t instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(t,e)}catch(e){if("application/wasm"==t.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}let r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}{let r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}(await t,e);return function(t,e){return D=t.exports,wt.__wbindgen_wasm_module=e,_t=null,ht=null,et=null,D}(r,n)}var yt=class{constructor(){B(this,"_eventListeners",/* @__PURE__ */new Map)}addEventListener(t,e){let r=this._eventListeners.get(t);r||(r=/* @__PURE__ */new Set,this._eventListeners.set(t,r)),r.add(e)}removeEventListener(t,e){let r=this._eventListeners.get(t);r&&(e?(r.delete(e),0===r.size&&this._eventListeners.delete(t)):this._eventListeners.delete(t))}dispatch(t){this._eventListeners.get(t.type)?.forEach(e=>e(t))}removeAllEventListeners(){this._eventListeners.clear()}},vt=class t{static _initializeObserver(){t._observer||(t._observer=new IntersectionObserver(e=>{e.forEach(e=>{let r=t._observedCanvases.get(e.target);r&&(e.isIntersecting?r.unfreeze():r.freeze())})},{threshold:0}))}static observe(e,r){t._initializeObserver(),!t._observedCanvases.has(e)&&(t._observedCanvases.set(e,r),t._observer?.observe(e))}static unobserve(e){t._observer?.unobserve(e),t._observedCanvases.delete(e),0===t._observedCanvases.size&&(t._observer?.disconnect(),t._observer=null)}};B(vt,"_observer",null),B(vt,"_observedCanvases",/* @__PURE__ */new Map);var Ct=class t{static _initializeObserver(){t._observer||(t._observer=new ResizeObserver(e=>{e.forEach(e=>{let r=t._observedCanvases.get(e.target);if(!r)return;let[n,i]=r;clearTimeout(i);let o=setTimeout(()=>{n.resize()},100);t._observedCanvases.set(e.target,[n,o])})}))}static observe(e,r){t._initializeObserver(),!t._observedCanvases.has(e)&&(t._observedCanvases.set(e,[r,0]),t._observer?.observe(e))}static unobserve(e){let r=t._observedCanvases.get(e);if(r){let t=r[1];t&&clearTimeout(t)}t._observer?.unobserve(e),t._observedCanvases.delete(e),!t._observedCanvases.size&&t._observer&&(t._observer.disconnect(),t._observer=null)}};function Lt(t){if(t.byteLength<4)return!1;let e=new Uint8Array(t.slice(0,G.byteLength));for(let r=0;r<G.length;r+=1)if(G[r]!==e[r])return!1;return!0}function xt(t){return"string"==typeof t?/^\s*\{/u.test(t)&&/\}\s*$/u.test(t):function(t){return J.every(e=>Object.hasOwn(t,e))}(t)}function At(){return 1+.75*((K?window.devicePixelRatio:1)-1)}function Mt(t){let e=t.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;return!(e.bottom<0||e.top>r||e.right<0||e.left>n)}function kt(t){let e=t.target;if(e instanceof HTMLCanvasElement){let r=e.getBoundingClientRect();if(0===r.width||0===r.height||0===e.width||0===e.height)return null;let n=e.width/r.width,i=e.height/r.height,o=(t.clientX-r.left)*n,a=(t.clientY-r.top)*i;return!Number.isFinite(o)||!Number.isFinite(a)||Number.isNaN(o)||Number.isNaN(a)?null:{x:o,y:a}}return null}function St(t){let e,r,n=t.replace("OpenUrl: ",""),i=n.indexOf(" | Target: ");-1===i?(e=n,r="_blank"):(e=n.substring(0,i),r=n.substring(i+11)),window.open(e,r)}B(Ct,"_observer",null),B(Ct,"_observedCanvases",/* @__PURE__ */new Map);var Et=null;function It(){return Et??(Et=function(t){let e=null,r="https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-web@0.81.0/dist/dotlottie-player.wasm",n="https://unpkg.com/@lottiefiles/dotlottie-web@0.81.0/dist/dotlottie-player.wasm";async function i(e){await t({module_or_path:e})}async function o(e){let r=await fetch(e);if(!r.ok)throw Error(`fetch ${e} responded with ${r.status} ${r.statusText}`);await t({module_or_path:await r.arrayBuffer()})}async function a(t,e){try{return await t(e),null}catch(t){return t}}return{load(){if(!e){let t=r,s=null;s=(async()=>{let r=await a(i,t);if(!r)return;console.warn(`Primary WASM load failed from ${t}: ${r.message}`);let _=null;if(null!==n){if(console.warn(`Attempting to load WASM from backup URL: ${n}`),_=await a(i,n),!_)return;console.warn(`Backup WASM load failed from ${n}: ${_.message}`)}console.warn("Retrying WASM load with buffered instantiation");let l=await a(o,t);if(l&&(console.warn(`Buffered WASM load from ${t} failed: ${l.message}`),null===n||(l=await a(o,n),l)))throw console.error(`Primary WASM URL failed: ${r.message}`),_&&console.error(`Backup WASM URL failed: ${_.message}`),console.error(`Buffered fallback failed: ${l.message}`),e===s&&(e=null),Error("WASM loading failed from all sources.")})(),e=s}return e},setWasmUrl(t){if("string"!=typeof t||""===t.trim())throw TypeError("setWasmUrl() expects a non-empty URL string");n=null,t!==r&&(r=t,e=null)}}}(wt)),Et}var Ft=t=>{switch(t){case"reverse":return gt.Reverse;case"bounce":return gt.Bounce;case"reverse-bounce":return gt.ReverseBounce;default:return gt.Forward}},Ot=t=>{switch(t){case gt.Reverse:return"reverse";case gt.Bounce:return"bounce";case gt.ReverseBounce:return"reverse-bounce";default:return"forward"}},Pt=t=>{switch(t){case"contain":default:return"contain";case"cover":return"cover";case"fill":return"fill";case"fit-height":return"fit-height";case"fit-width":return"fit-width";case"none":return"none"}},Nt=class{constructor(t){B(this,"_canvas",null),B(this,"_pendingLoad",null),B(this,"_srcFetchAbort",null),B(this,"_context",null),B(this,"_eventManager",void 0),B(this,"_animationFrameId",null),B(this,"_frameManager",void 0),B(this,"_boundAnimationLoop",void 0),B(this,"_dotLottieCore",null),B(this,"_stateMachineId",""),B(this,"_stateMachineConfig",null),B(this,"_isStateMachineRunning",!1),B(this,"_renderConfig",{}),B(this,"_isFrozen",!1),B(this,"_backgroundColor",null),B(this,"_lastFrameTime",null),B(this,"_boundOnClick",null),B(this,"_boundOnPointerUp",null),B(this,"_boundOnPointerDown",null),B(this,"_boundOnPointerMove",null),B(this,"_boundOnPointerEnter",null),B(this,"_boundOnPointerLeave",null),B(this,"_bufferMismatchCount",0),B(this,"_lastExpectedBufferSize",0),B(this,"_cachedImageData",null),B(this,"_cachedImageDataBuffer",null),B(this,"_cachedImageDataByteOffset",0),B(this,"_marker",""),B(this,"_segment",null),this._canvas=t.canvas??null,this._eventManager=new yt,this._frameManager=new H,this._boundAnimationLoop=this._animationLoop.bind(this),this._renderConfig={...t.renderConfig,devicePixelRatio:t.renderConfig?.devicePixelRatio||At(),freezeOnOffscreen:t.renderConfig?.freezeOnOffscreen??!0};let e=null;t.src&&!t.data&&(this._srcFetchAbort=new AbortController,e=this._fetchData(t.src,this._srcFetchAbort.signal),e.catch(()=>{})),this._initWasm().then(()=>{this._dotLottieCore=this._createCore(),this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(Ft(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&2===t.segment.length&&(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])),this._marker=t.marker??"",this._marker&&this._dotLottieCore.set_marker(this._marker),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),this._applyAssetResolver(t.assetResolver??null),this._stateMachineId=t.stateMachineId??"",this._stateMachineConfig=t.stateMachineConfig??null,this._onCoreCreated(),this._eventManager.dispatch({type:"ready"}),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src,e):this._pendingLoad={src:t.src,dataPromise:e}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor)}).catch(t=>{this._srcFetchAbort?.abort(),console.error("[dotlottie-web] Initialization failed:",t),this._eventManager.dispatch({type:"loadError",error:Error(`Failed to load wasm module: ${t}`)})})}async _initWasm(){return It().load()}_createCore(){return new bt}_onCoreCreated(){}_setupTarget(t,e){return!!this._dotLottieCore&&this._dotLottieCore.setup_sw_target(t,e)}_drainPlayerEvents({skipFrame:t=!1}={}){if(this._dotLottieCore)for(;;){let e=this._dotLottieCore.poll_event();if(null==e)break;switch(e.type){case"Load":setTimeout(()=>this._eventManager.dispatch({type:"load"}),0);break;case"LoadError":setTimeout(()=>this._eventManager.dispatch({type:"loadError",error:Error("failed to load")}),0);break;case"Play":queueMicrotask(()=>this._eventManager.dispatch({type:"play"}));break;case"Pause":queueMicrotask(()=>this._eventManager.dispatch({type:"pause"}));break;case"Stop":queueMicrotask(()=>this._eventManager.dispatch({type:"stop"}));break;case"Frame":{let r=e.frameNo??0;t||queueMicrotask(()=>this._eventManager.dispatch({type:"frame",currentFrame:r}));break}case"Render":{let r=e.frameNo??0;t||queueMicrotask(()=>this._eventManager.dispatch({type:"render",currentFrame:r}));break}case"Loop":{let t=e.loopCount??0;queueMicrotask(()=>this._eventManager.dispatch({type:"loop",loopCount:t}));break}case"Complete":queueMicrotask(()=>this._eventManager.dispatch({type:"complete"}))}}}_discardPlayerEvents(){for(;null!=this._dotLottieCore?.poll_event(););}_drainSmEvents(){if(this._dotLottieCore){for(;;){let t=this._dotLottieCore.sm_poll_event();if(null==t)break;switch(t.type){case"Start":queueMicrotask(()=>{this._isStateMachineRunning=!0,this._eventManager.dispatch({type:"stateMachineStart"}),this._startAnimationLoop()});break;case"Stop":queueMicrotask(()=>{this._isStateMachineRunning=!1,this._eventManager.dispatch({type:"stateMachineStop"}),this._dotLottieCore?.status()!==mt.Playing&&this._stopAnimationLoop()});break;case"CustomEvent":this._eventManager.dispatch({type:"stateMachineCustomEvent",eventName:t.message??""});break;case"BooleanInputChange":this._eventManager.dispatch({type:"stateMachineBooleanInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"NumericInputChange":this._eventManager.dispatch({type:"stateMachineNumericInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"StringInputChange":this._eventManager.dispatch({type:"stateMachineStringInputValueChange",inputName:t.name??"",newValue:t.newValue,oldValue:t.oldValue});break;case"InputFired":this._eventManager.dispatch({type:"stateMachineInputFired",inputName:t.name??""});break;case"Transition":this._eventManager.dispatch({type:"stateMachineTransition",fromState:t.previousState??"",toState:t.newState??""});break;case"StateEntered":this._eventManager.dispatch({type:"stateMachineStateEntered",state:t.state??""});break;case"StateExit":this._eventManager.dispatch({type:"stateMachineStateExit",state:t.state??""});break;case"Error":this._eventManager.dispatch({type:"stateMachineError",error:t.message??""})}}for(;;){let t=this._dotLottieCore.sm_poll_internal_event();if(null==t)break;if("Message"===t.type){let e=t.message??"";K&&e.startsWith("OpenUrl: ")?St(e):this._eventManager.dispatch({type:"stateMachineInternalMessage",message:e})}}}}_dispatchError(t){console.error(t),this._eventManager.dispatch({type:"loadError",error:Error(t)})}async _fetchData(t,e=null){let r=await fetch(t,{signal:e});if(!r.ok)throw Error(`Failed to fetch animation data from URL: ${t}. ${r.status}: ${r.statusText}`);let n=await r.arrayBuffer();return Lt(n)?n:(new TextDecoder).decode(n)}_loadFromData(t){if(null===this._dotLottieCore)return;if(!this._canvas)return void console.warn("[dotlottie-web] Cannot load animation without canvas. Call setCanvas() first.");this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height);let e=!1;if("string"==typeof t){if(e=this._dotLottieCore.load_animation(t),!e&&!xt(t))return this._discardPlayerEvents(),void this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.")}else if(t instanceof ArrayBuffer){if(!Lt(t))return void this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");e=this._dotLottieCore.load_dotlottie_data(new Uint8Array(t))}else{if("object"!=typeof t)return void this._dispatchError("Unsupported data type for animation data. Expected:\n - string (Lottie JSON),\n - ArrayBuffer (dotLottie),\n - object (Lottie JSON).\n Received: "+typeof t);if(!xt(t))return void this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");e=this._dotLottieCore.load_animation(JSON.stringify(t))}if(e){if(void 0!==this._renderConfig.quality&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents({skipFrame:!!this._marker||!!this._segment}),this._marker&&this._dotLottieCore.set_marker(this._marker),this._segment){this._dotLottieCore.set_segment(this._segment[0],this._segment[1]);let t=Ot(this._dotLottieCore.mode()),e="reverse"===t||"reverse-bounce"===t?this._segment[1]:this._segment[0];this._dotLottieCore.set_frame(e)}setTimeout(()=>{this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame})},0),this._dotLottieCore.render(),this._drainPlayerEvents(),this._draw(),this._stateMachineId?this.stateMachineLoad(this._stateMachineId)&&this.stateMachineStart()&&this._startAnimationLoop():this._dotLottieCore.status()===mt.Playing&&this._startAnimationLoop(),K&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&(vt.observe(this._canvas,this),Mt(this._canvas)||this.freeze()),this._renderConfig.autoResize&&Ct.observe(this._canvas,this))}else this._drainPlayerEvents()}_loadFromSrc(t,e){(e??this._fetchData(t)).then(t=>this._loadFromData(t)).catch(e=>this._dispatchError(`Failed to load animation data from URL: ${t}. ${e}`))}get buffer(){return this._dotLottieCore?this._dotLottieCore.get_pixel_buffer():null}get activeAnimationId(){return this._dotLottieCore?.animation_id()??void 0}get activeThemeId(){return this._dotLottieCore?.theme_id()??void 0}get layout(){if(this._dotLottieCore)return{align:[this._dotLottieCore.layout_align_x(),this._dotLottieCore.layout_align_y()],fit:Pt(this._dotLottieCore.layout_fit())}}get marker(){return this._dotLottieCore?.current_marker()??""}get manifest(){try{let t=this._dotLottieCore?.manifest_string();if(null===this._dotLottieCore||!t)return null;let e=JSON.parse(t);return 0===Object.keys(e).length?null:e}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){if(this._dotLottieCore)return[this._dotLottieCore.segment_start(),this._dotLottieCore.segment_end()]}get loop(){return this._dotLottieCore?.loop_animation()??!1}get mode(){return this._dotLottieCore?Ot(this._dotLottieCore.mode()):"forward"}get isFrozen(){return this._isFrozen}get isStateMachineRunning(){return this._isStateMachineRunning}get backgroundColor(){return this._backgroundColor??""}get autoplay(){return this._dotLottieCore?.autoplay()??!1}get useFrameInterpolation(){return this._dotLottieCore?.use_frame_interpolation()??!1}get speed(){return this._dotLottieCore?.speed()??0}get isReady(){return null!==this._dotLottieCore}get isLoaded(){return(this._dotLottieCore?.status()??mt.Idle)!==mt.Idle}get isPlaying(){return this._dotLottieCore?.status()===mt.Playing}get isPaused(){return this._dotLottieCore?.status()===mt.Paused}get isStopped(){return this._dotLottieCore?.status()===mt.Stopped}get currentFrame(){return this._dotLottieCore?Math.round(100*this._dotLottieCore.current_frame())/100:0}get loopCount(){return this._dotLottieCore?.current_loop_count()??0}get totalFrames(){return this._dotLottieCore?.total_frames()??0}get duration(){return(this._dotLottieCore?.duration()??0)/1e3}get canvas(){return this._canvas}load(t){null!==this._dotLottieCore&&(this._stopAnimationLoop(),this._cleanupCanvas(),this._isFrozen=!1,this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(Ft(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&2===t.segment.length?(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])):(this._segment=null,this._dotLottieCore.clear_segment()),this._marker=t.marker??"",this._marker?this._dotLottieCore.set_marker(this._marker):this._dotLottieCore.clear_marker(),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),this._applyAssetResolver(t.assetResolver??null),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src):this._pendingLoad={src:t.src}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor))}_draw(){if(null===this._dotLottieCore||null===this._canvas||(!this._context&&"getContext"in this._canvas&&"function"==typeof this._canvas.getContext&&(!K||typeof HTMLCanvasElement<"u"&&this._canvas instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&this._canvas instanceof OffscreenCanvas)&&(this._context=this._canvas.getContext("2d")),!this._context))return;let t=this._dotLottieCore.get_pixel_buffer(),e=this._canvas.width,r=this._canvas.height,n=e*r*4;if(t.byteLength!==n)return this._lastExpectedBufferSize===n?this._bufferMismatchCount+=1:(this._bufferMismatchCount=1,this._lastExpectedBufferSize=n),void(10===this._bufferMismatchCount&&console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${n} bytes for canvas ${e}x${r}, but got ${t.byteLength} bytes. This may indicate a WASM memory allocation issue or invalid canvas dimensions.`));this._bufferMismatchCount=0,this._lastExpectedBufferSize=n;let i=this._cachedImageData;if(null===i||i.width!==e||i.height!==r||i.data.byteLength!==n||this._cachedImageDataBuffer!==t.buffer||this._cachedImageDataByteOffset!==t.byteOffset){if(typeof ImageData>"u")this._cachedImageData=this._context.createImageData(e,r);else{let n=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData=new ImageData(n,e,r)}this._cachedImageDataBuffer=t.buffer,this._cachedImageDataByteOffset=t.byteOffset}if(typeof ImageData>"u"){let e=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData.data.set(e)}this._context.putImageData(this._cachedImageData,0,0)}_cleanupCanvas(){this._canvas&&K&&this._canvas instanceof HTMLCanvasElement&&(vt.unobserve(this._canvas),Ct.unobserve(this._canvas),this._cleanupStateMachineListeners())}_initializeCanvas(){this._setupRendererOnCanvas(),this._canvas&&K&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded&&(this._renderConfig.freezeOnOffscreen&&(vt.observe(this._canvas,this),Mt(this._canvas)||this.freeze()),this._renderConfig.autoResize&&Ct.observe(this._canvas,this),this._isStateMachineRunning&&this._setupStateMachineListeners()),this._canvas&&this._dotLottieCore&&this.isLoaded&&this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}_setupRendererOnCanvas(){this._context=null}_stopAnimationLoop(){null!==this._animationFrameId&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),this._lastFrameTime=null}_startAnimationLoop(){null===this._animationFrameId&&this._dotLottieCore&&!this._isFrozen&&(this._dotLottieCore.status()===mt.Playing||this._isStateMachineRunning)&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop))}_animationLoop(t){if(null!==this._dotLottieCore)if(this._dotLottieCore.status()===mt.Playing||this._isStateMachineRunning)try{let e=null===this._lastFrameTime?0:t-this._lastFrameTime;this._lastFrameTime=t;let r=this._isStateMachineRunning?this._dotLottieCore.sm_tick(e):this._dotLottieCore.tick(e);this._isStateMachineRunning?this._drainSmEvents():this._drainPlayerEvents(),r&&this._draw(),this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop)}catch(t){console.error("Error in animation frame:",t),this._eventManager.dispatch({type:"renderError",error:t}),t instanceof WebAssembly.RuntimeError&&this.destroy()}else this._stopAnimationLoop();else this._stopAnimationLoop()}play(){if(null===this._dotLottieCore||!this.isLoaded)return;this._stopAnimationLoop();let t=this._dotLottieCore.play();this._drainPlayerEvents(),(t||this._dotLottieCore.status()===mt.Playing)&&(this._isFrozen=!1,this._startAnimationLoop()),this._canvas&&K&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!Mt(this._canvas)&&this.freeze()}pause(){null!==this._dotLottieCore&&(this._dotLottieCore.pause(),this._drainPlayerEvents(),this._stopAnimationLoop())}stop(){if(null===this._dotLottieCore)return;let t=this._dotLottieCore.stop();this._drainPlayerEvents(),this._stopAnimationLoop(),t&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._dotLottieCore.render(),this._draw())}setFrame(t){if(null!==this._dotLottieCore&&this._dotLottieCore.set_frame(t)){let t=this._dotLottieCore.render();this._drainPlayerEvents(),t&&this._draw()}}setSpeed(t){null!==this._dotLottieCore&&this._dotLottieCore.set_speed(t)}setBackgroundColor(t){if(null!==this._dotLottieCore){if(K&&this._canvas instanceof HTMLCanvasElement)this._canvas.style.backgroundColor=t;else{let[e,r,n,i]=function(t){if(!function(t){return/^#([\da-f]{6}|[\da-f]{8})$/iu.test(t)}(t))return[0,0,0,0];let e=t.replace("#","");return e=6===e.length?`${e}ff`:e,[parseInt(e.slice(0,2),16)/255,parseInt(e.slice(2,4),16)/255,parseInt(e.slice(4,6),16)/255,parseInt(e.slice(6,8),16)/255]}(t);this._dotLottieCore.set_background(e,r,n,i)}this._backgroundColor=t}}setLoop(t){null!==this._dotLottieCore&&this._dotLottieCore.set_loop(t)}setLoopCount(t){null!==this._dotLottieCore&&this._dotLottieCore.set_loop_count(t)}setUseFrameInterpolation(t){null!==this._dotLottieCore&&this._dotLottieCore.set_use_frame_interpolation(t)}_applyAssetResolver(t){if(null!==this._dotLottieCore){if(null===t)return void this._dotLottieCore.set_asset_resolver(null);this._dotLottieCore.set_asset_resolver(e=>{try{return t(e)??null}catch(t){return console.error(`[dotlottie-web] assetResolver threw for "${e}":`,t),null}})}}addEventListener(t,e){this._eventManager.addEventListener(t,e)}removeEventListener(t,e){this._eventManager.removeEventListener(t,e)}destroy(){this._stopAnimationLoop(),this._isStateMachineRunning=!1,this._cleanupCanvas(),this._srcFetchAbort?.abort(),this._srcFetchAbort=null,this._pendingLoad=null;let t=this._dotLottieCore;if(this._dotLottieCore=null,this._context=null,t)try{t.free()}catch(t){console.warn("[dotlottie-web] Error freeing wasm core during destroy:",t)}this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),this._cleanupStateMachineListeners()}freeze(){null!==this._animationFrameId&&(this._stopAnimationLoop(),this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}))}unfreeze(){null===this._animationFrameId&&(this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}),this._startAnimationLoop())}_syncCanvasSize(){if(!(K&&this._canvas instanceof HTMLCanvasElement))return;let t=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:e,width:r}=this._canvas.getBoundingClientRect();0!==e&&0!==r&&(this._canvas.width=r*t,this._canvas.height=e*t)}resize(){!this._dotLottieCore||!this.isLoaded||!this._canvas||(this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw()))}setCanvas(t){if(t&&this._canvas!==t&&(this._canvas&&this._cleanupCanvas(),this._canvas=t,this._initializeCanvas(),this._pendingLoad)){let t=this._pendingLoad;this._pendingLoad=null,t.data?this._loadFromData(t.data):t.src&&this._loadFromSrc(t.src,t.dataPromise)}}setTransform(t){if(!this._dotLottieCore)return!1;let e=this._dotLottieCore.set_transform(new Float32Array(t));return e&&this._dotLottieCore.render()&&this._draw(),e}getTransform(){if(!this._dotLottieCore)return;let t=this._dotLottieCore.get_transform();return Array.from(t)}setSegment(t,e){null!==this._dotLottieCore&&(this._segment=[t,e],this._dotLottieCore.set_segment(t,e))}resetSegment(){null!==this._dotLottieCore&&(this._segment=null,this._dotLottieCore.clear_segment())}setMode(t){null!==this._dotLottieCore&&this._dotLottieCore.set_mode(Ft(t))}setRenderConfig(t){let{devicePixelRatio:e,freezeOnOffscreen:r,quality:n,...i}=t;this._renderConfig={...this._renderConfig,...i,devicePixelRatio:e||At(),freezeOnOffscreen:r??!0,...void 0!==n&&{quality:n}},void 0!==n&&this._dotLottieCore&&this._dotLottieCore.set_quality(n),K&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?Ct.observe(this._canvas,this):Ct.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?(vt.observe(this._canvas,this),Mt(this._canvas)||this.freeze()):(vt.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(t){null===this._dotLottieCore||this._dotLottieCore.animation_id()===t||!this._canvas||(this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height),this._dotLottieCore.load_animation_from_id(t)?(void 0!==this._renderConfig.quality&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents(),this._dotLottieCore.render(),this._draw()):this._dispatchError(`Failed to load animation with id: ${t}`))}setMarker(t){null!==this._dotLottieCore&&(this.markers().some(e=>e.name===t)?(this._marker=t,this._dotLottieCore.set_marker(t)):(this._marker="",this._segment=null,this._dotLottieCore.clear_marker(),this._dotLottieCore.clear_segment()))}markers(){let t=this._dotLottieCore?.markers();return t&&Array.isArray(t)?t:[]}setTheme(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.set_theme(t);return e&&(this._dotLottieCore.render(),this._draw()),e}resetTheme(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.reset_theme();return t&&(this._dotLottieCore.render(),this._draw()),t}setThemeData(t){if(null===this._dotLottieCore)return!1;let e="string"==typeof t?t:JSON.stringify(t),r=this._dotLottieCore.set_theme_data(e);return r&&(this._dotLottieCore.render(),this._draw()),r}setSlots(t){null!==this._dotLottieCore&&this._dotLottieCore.set_slots_str(JSON.stringify(t))&&(this._dotLottieCore.render(),this._draw())}_isKeyframeArray(t){return Array.isArray(t)&&t.length>0&&"object"==typeof t[0]&&null!==t[0]&&"t"in t[0]&&"s"in t[0]}getSlotIds(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.get_slot_ids();return Array.isArray(t)?t:[]}getSlotType(t){if(!this._dotLottieCore)return;return this._dotLottieCore.get_slot_type(t)||void 0}getSlot(t){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_slot_str(t);if(e)try{return JSON.parse(e)}catch{return}}getSlots(){if(!this._dotLottieCore)return{};try{return JSON.parse(this._dotLottieCore.get_slots_str())}catch{return{}}}setColorSlot(t,e){if(null===this._dotLottieCore)return!1;let r=this._isKeyframeArray(e),n=JSON.stringify({a:+!!r,k:e}),i=this._dotLottieCore.set_slot_str(t,n);return this._dotLottieCore.render(),this._draw(),i}setScalarSlot(t,e){if(null===this._dotLottieCore)return!1;let r=JSON.stringify({a:"number"==typeof e?0:1,k:e}),n=this._dotLottieCore.set_slot_str(t,r);return this._dotLottieCore.render(),this._draw(),n}setVectorSlot(t,e){if(null===this._dotLottieCore)return!1;let r=this._isKeyframeArray(e),n=JSON.stringify({a:+!!r,k:e}),i=this._dotLottieCore.set_slot_str(t,n);return this._dotLottieCore.render(),this._draw(),i}setGradientSlot(t,e,r){if(null===this._dotLottieCore)return!1;let n=this._isKeyframeArray(e),i=JSON.stringify({k:{a:+!!n,k:e},p:r}),o=this._dotLottieCore.set_slot_str(t,i);return this._dotLottieCore.render(),this._draw(),o}setTextSlot(t,e){if(null===this._dotLottieCore)return!1;let r=this._dotLottieCore.get_slot_str(t),n=e;if(r){let t=JSON.parse(r);if(t&&"k"in t&&Array.isArray(t.k)){let r=t.k[0];"s"in r&&"object"==typeof r.s&&(n={...r.s,...e})}}let i=JSON.stringify({a:0,k:[{t:0,s:n}]}),o=this._dotLottieCore.set_slot_str(t,i);return this._dotLottieCore.render(),this._draw(),o}async setImageSlot(t,e){if(null===this._dotLottieCore)return!1;let r=await async function(t){if(!/^https?:\/\//i.test(t))return t;let e=await fetch(t);if(!e.ok)throw Error(`Failed to fetch image slot source from URL: ${t}. ${e.status}: ${e.statusText}`);return function(t){return new Promise((e,r)=>{let n=new FileReader;n.onerror=()=>r(n.error??Error("Failed to read image slot source")),n.onload=()=>e(n.result),n.readAsDataURL(t)})}(await e.blob())}(e);if(null===this._dotLottieCore)return!1;let n=this._dotLottieCore.set_image_slot(t,r);return this._dotLottieCore.render(),this._draw(),n}resetSlot(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.reset_slot(t);return this._dotLottieCore.render(),this._draw(),e}clearSlot(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.clear_slot(t);return this._dotLottieCore.render(),this._draw(),e}resetSlots(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.reset_slots();return this._dotLottieCore.render(),this._draw(),t}clearSlots(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.clear_slots();return this._dotLottieCore.render(),this._draw(),t}setLayout(t){null!==this._dotLottieCore&&this._dotLottieCore.set_layout(t.fit??"contain",t.align?.[0]??.5,t.align?.[1]??.5)}setViewport(t,e,r,n){return null!==this._dotLottieCore&&this._dotLottieCore.set_viewport(t,e,r,n)}static setWasmUrl(t){It().setWasmUrl(t)}static preload(){return It().load()}static async registerFont(t,e){try{let r;if(await It().load(),"string"==typeof e){let t=await fetch(e);if(!t.ok)return console.error(`Failed to fetch font from URL: ${e}. Status: ${t.status}`),!1;r=new Uint8Array(await t.arrayBuffer())}else r=e instanceof Uint8Array?e:new Uint8Array(e);let n=function(t,e){let r=st(t,D.__wbindgen_export_1,D.__wbindgen_export_2),n=it,i=dt(e,D.__wbindgen_export_1),o=it;return 0!==D.register_font(r,n,i,o)}(t,r);return n||console.error(`Failed to register font "${t}". Font data may be invalid.`),n}catch(e){return console.error(`Error registering font "${t}":`,e),!1}}animationSize(){let t=this._dotLottieCore?.animation_size();return{width:t?.[0]??0,height:t?.[1]??0}}stateMachineLoad(t){return!!this._dotLottieCore&&this._dotLottieCore.state_machine_load_from_id(t)}stateMachineLoadData(t){return!!this._dotLottieCore&&this._dotLottieCore.state_machine_load(t)}stateMachineSetConfig(t){this._stateMachineConfig=t}stateMachineStart(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.sm_start(this._stateMachineConfig?.openUrlPolicy?.requireUserInteraction??!0,this._stateMachineConfig?.openUrlPolicy?.whitelist??[]);return this._drainSmEvents(),t&&(this._isStateMachineRunning=!0,this._setupStateMachineListeners(),this._startAnimationLoop()),t}stateMachineStop(){if(!this._dotLottieCore)return!1;let t=this._dotLottieCore.sm_stop();return this._drainSmEvents(),t&&(this._isStateMachineRunning=!1,this._cleanupStateMachineListeners(),this._dotLottieCore.status()!==mt.Playing&&this._stopAnimationLoop()),t}stateMachineGetStatus(){return this._dotLottieCore?.sm_status()??""}stateMachineGetCurrentState(){return this._dotLottieCore?.sm_current_state()??""}stateMachineGetActiveId(){return this._dotLottieCore?.state_machine_id()??""}stateMachineOverrideState(t,e=!1){return this._dotLottieCore?.sm_override_current_state(t,e)??!1}stateMachineSetSeed(t){return this._dotLottieCore?.sm_set_seed(BigInt(Math.trunc(t)))??!1}stateMachineGet(t){return this._dotLottieCore?.get_state_machine(t)??""}stateMachineGetListeners(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_framework_setup();return Array.isArray(t)?t:[]}stateMachineSetBooleanInput(t,e){return this._dotLottieCore?.sm_set_boolean_input(t,e)??!1}stateMachineSetNumericInput(t,e){return this._dotLottieCore?.sm_set_numeric_input(t,e)??!1}stateMachineSetStringInput(t,e){return this._dotLottieCore?.sm_set_string_input(t,e)??!1}stateMachineGetBooleanInput(t){return this._dotLottieCore?.sm_get_boolean_input(t)??void 0}stateMachineGetNumericInput(t){return this._dotLottieCore?.sm_get_numeric_input(t)??void 0}stateMachineGetStringInput(t){return this._dotLottieCore?.sm_get_string_input(t)??void 0}stateMachineGetInputs(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_get_inputs();return Array.isArray(t)?t:[]}stateMachineFireEvent(t){this._dotLottieCore?.sm_fire(t)}stateMachinePostClickEvent(t,e){this._dotLottieCore?.sm_post_click(t,e)}stateMachinePostPointerUpEvent(t,e){this._dotLottieCore?.sm_post_pointer_up(t,e)}stateMachinePostPointerDownEvent(t,e){this._dotLottieCore?.sm_post_pointer_down(t,e)}stateMachinePostPointerMoveEvent(t,e){this._dotLottieCore?.sm_post_pointer_move(t,e)}stateMachinePostPointerEnterEvent(t,e){this._dotLottieCore?.sm_post_pointer_enter(t,e)}stateMachinePostPointerExitEvent(t,e){this._dotLottieCore?.sm_post_pointer_exit(t,e)}_onClick(t){let e=kt(t);e&&this.stateMachinePostClickEvent(e.x,e.y)}_onPointerUp(t){let e=kt(t);e&&this.stateMachinePostPointerUpEvent(e.x,e.y)}_onPointerDown(t){let e=kt(t);e&&this.stateMachinePostPointerDownEvent(e.x,e.y)}_onPointerMove(t){let e=kt(t);e&&this.stateMachinePostPointerMoveEvent(e.x,e.y)}_onPointerEnter(t){let e=kt(t);e&&this.stateMachinePostPointerEnterEvent(e.x,e.y)}_onPointerLeave(t){let e=kt(t);e&&this.stateMachinePostPointerExitEvent(e.x,e.y)}_setupStateMachineListeners(){if(K&&this._canvas instanceof HTMLCanvasElement&&null!==this._dotLottieCore&&this.isLoaded){let t=this.stateMachineGetListeners();this._cleanupStateMachineListeners(),t.includes("Click")&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener("click",this._boundOnClick)),t.includes("PointerUp")&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener("pointerup",this._boundOnPointerUp)),t.includes("PointerDown")&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener("pointerdown",this._boundOnPointerDown)),t.includes("PointerMove")&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener("pointermove",this._boundOnPointerMove)),t.includes("PointerEnter")&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener("pointerenter",this._boundOnPointerEnter)),t.includes("PointerExit")&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener("pointerleave",this._boundOnPointerLeave))}}_cleanupStateMachineListeners(){K&&this._canvas instanceof HTMLCanvasElement&&(this._boundOnClick&&(this._canvas.removeEventListener("click",this._boundOnClick),this._boundOnClick=null),this._boundOnPointerUp&&(this._canvas.removeEventListener("pointerup",this._boundOnPointerUp),this._boundOnPointerUp=null),this._boundOnPointerDown&&(this._canvas.removeEventListener("pointerdown",this._boundOnPointerDown),this._boundOnPointerDown=null),this._boundOnPointerMove&&(this._canvas.removeEventListener("pointermove",this._boundOnPointerMove),this._boundOnPointerMove=null),this._boundOnPointerEnter&&(this._canvas.removeEventListener("pointerenter",this._boundOnPointerEnter),this._boundOnPointerEnter=null),this._boundOnPointerLeave&&(this._canvas.removeEventListener("pointerleave",this._boundOnPointerLeave),this._boundOnPointerLeave=null))}},Tt=({animationId:e,autoplay:r,backgroundColor:n,className:i,createDotLottie:o,data:a,dotLottieRefCallback:s,layout:_,loop:l,loopCount:d,mode:c,playOnHover:u,renderConfig:h,segment:p,speed:g,src:m,stateMachineConfig:f,stateMachineId:b,style:w,themeData:y,themeId:x,useFrameInterpolation:A,workerId:M,...k})=>{let S=C(null),E=C(null),I=C(m),F=C(s),O=C(null),P={speed:g,mode:c,loop:l,loopCount:d,useFrameInterpolation:A,segment:p,backgroundColor:n,autoplay:r,themeId:x,workerId:M,src:m,data:a,layout:_,renderConfig:h,animationId:e,stateMachineConfig:f,stateMachineId:b},N=C(P);F.current=s,N.current=P;let T=L(t=>{if(E.current=t,t){let e=O.current;e&&e.canvas===t?(clearTimeout(e.timer),O.current=null,S.current=e.instance):S.current?.canvas!==t&&(S.current=o({...N.current,canvas:t}))}else if(S.current){let t=S.current,e=t.canvas;S.current=null,e instanceof HTMLCanvasElement?O.current={canvas:e,instance:t,timer:setTimeout(()=>{O.current?.instance===t&&(O.current=null),t.destroy()},0)}:t.destroy()}F.current?.(S.current)},[]);return t(()=>{let t=t=>{u&&("mouseenter"===t.type&&S.current?.play(),"mouseleave"===t.type&&S.current?.pause())};return E.current?.addEventListener("mouseenter",t),E.current?.addEventListener("mouseleave",t),()=>{E.current?.removeEventListener("mouseenter",t),E.current?.removeEventListener("mouseleave",t)}},[u]),t(()=>{S.current?.setSpeed(g??1)},[g]),t(()=>{S.current?.setMode(c??"forward")},[c]),t(()=>{S.current?.setLoop(l??!1)},[l]),t(()=>{S.current?.setLoopCount(d??0)},[d]),t(()=>{S.current?.setUseFrameInterpolation(A??!0)},[A]),t(()=>{"number"==typeof p?.[0]&&"number"==typeof p[1]?S.current?.setSegment(p[0],p[1]):S.current?.resetSegment()},[p]),t(()=>{S.current?.setBackgroundColor(n??"")},[n]),t(()=>{S.current?.setRenderConfig(h??{})},[JSON.stringify(h)]),t(()=>{"string"!=typeof a&&"object"!=typeof a||S.current?.load({data:a,...N.current})},[a]),t(()=>{m!==I.current&&(I.current=m,"string"==typeof m&&S.current?.load({src:m,...N.current}))},[m]),t(()=>{S.current?.setMarker(k.marker??"")},[k.marker]),t(()=>{S.current?.isLoaded&&S.current.activeAnimationId!==e&&S.current.loadAnimation(e??"")},[e]),t(()=>{"string"==typeof x&&S.current?.setTheme(x)},[x]),t(()=>{S.current?.setThemeData(y??"")},[y]),t(()=>{S.current?.setLayout(_??{})},[_?.fit,_?.align?.[0],_?.align?.[1]]),t(()=>{S.current?.isLoaded&&("string"==typeof b&&b?S.current.stateMachineLoad(b)&&S.current.stateMachineStart():S.current.stateMachineStop())},[b]),t(()=>{S.current?.stateMachineSetConfig(f??null)},[f]),v("div",{className:i,...!i&&{style:{width:"100%",height:"100%",lineHeight:0,...w}},children:v("canvas",{ref:T,style:{width:"100%",height:"100%"},...k})})},Rt=t=>new Nt(t),zt=t=>v(Tt,{...t,createDotLottie:Rt}),qt=({src:r,className:n,autoplay:i=!1,loop:o=!1,playing:a})=>{const s=C(null);return t(()=>{"boolean"==typeof a&&(a?s.current?.play?.():s.current?.stop?.())},[a]),/* @__PURE__ */v("div",{className:e("size-full",n),children:/* @__PURE__ */v(zt,{src:r,loop:o,autoplay:i,dotLottieRefCallback:t=>{s.current=t},useFrameInterpolation:!1})})},Ut=(t,e=1)=>`${Number.parseFloat((t??0).toFixed(e))}`,Bt=(t,e)=>{switch(Math.floor(Math.abs(t-e))){case 0:return"bg-green-500";case 1:return"bg-lime-500";case 2:return"bg-yellow-500";case 3:return"bg-orange-500";case 4:return"bg-red-500";default:return"bg-gray-500"}},Dt=(t,e)=>{switch(Math.floor(Math.abs(t-e))){case 0:return"border-t-green-500";case 1:return"border-t-lime-500";case 2:return"border-t-yellow-500";case 3:return"border-t-orange-500";case 4:return"border-t-red-500";default:return"border-t-gray-500"}},Zt=({position:t,maxPosition:e=4,content:r,isOverlapping:n,colorclsx:i,borderColorclsx:o})=>{const a=t/e*100;let s="transform -translate-x-1/2 left-1/2";t<2?s="left-0":t>3&&(s="right-0 transform -translate-x-full");const _=n?"-top-1.5":"bottom-full";/* @__PURE__ */
|
|
3
|
+
return v("div",{className:"relative",children:[/* @__PURE__ */v("div",{style:{left:`${a}%`},className:`absolute ${_} text-foreground mb-0.5 w-fit rounded px-2 py-1 whitespace-nowrap md:mb-1 ${s} transition-all duration-500 ease-in-out ${i}`,children:r}),/* @__PURE__ */v("div",{style:{left:`${a}%`},className:`absolute ${_} -mb-1.5 size-0 border-x-4 border-t-[1rem] border-transparent ${s} transition-all duration-500 ease-in-out ${o}`})]})},Wt=({crowdScore:r,userScore:n})=>{const[i,o]=x(0),a=C(null);t(()=>(a.current=window.setTimeout(()=>{o(()=>n-1)},300),()=>{null!==a.current&&window.clearTimeout(a.current)}),[n]);const s=r-1,_=n-1,l=Math.abs(s-_)<1;/* @__PURE__ */
|
|
4
|
+
return v("div",{className:e("relative h-4",l?"mb-3":"mb-0"),children:[
|
|
5
|
+
/* @__PURE__ */v("div",{className:"bg-border absolute top-1/2 h-0.5 w-full"}),
|
|
6
|
+
/* @__PURE__ */v("div",{style:{left:(s<i?s:i)/4*100+"%",right:`calc(100% - ${(s<i?i:s)/4*100}%)`},className:e("absolute top-1/2 h-1 rounded",Bt(s,_))}),
|
|
7
|
+
/* @__PURE__ */v(Zt,{position:s,content:`Crowd · ${Ut(r,1)}`,isOverlapping:!1,colorclsx:"bg-primary text-primary-foreground",borderColorclsx:"border-t-brand-light"}),
|
|
8
|
+
/* @__PURE__ */v(Zt,{position:i,content:`You · ${Ut(n,1)}`,isOverlapping:l,colorclsx:Bt(s,_),borderColorclsx:Dt(s,_)})]})},Ht=({feedback:t})=>{const e=M(()=>{const e=(t?.parameters||[]).reduce((t,e)=>{const r="string"==typeof e.crowdRating?parseFloat(e.crowdRating):e.crowdRating||0,n="string"==typeof e.userRating?parseFloat(e.userRating):e.userRating||0;return t+Math.abs(r-n)},0);return Number.isFinite(e)?Number(e.toFixed(2)):10},[t]);return t?/* @__PURE__ */v("div",{className:"min-w-sm",children:[(t.rateCount??0)<=0&&/* @__PURE__ */v("div",{className:"-mt-4 mb-4 flex flex-col items-center",children:[/* @__PURE__ */v(qt,{className:"h-56",src:"data:application/octet-stream;base64,UEsDBBQAAAAIAAAAAACkiPFndQAAAJ0AAAANAAAAbWFuaWZlc3QuanNvbiXNQQ7CMAwEwL/suSB67QM48QPEwaotMDQxcgwIVf07CTnuala7grImCrVcMJ1XKGMCUxAGJGOpKZsnWmpmdZkbxTRulwH0ipt5FSeLUDnqIqUxKbPrs0PU4ipZnOJP2aLr3b3Zh3w/5ly/G3yLl74a9wdsP1BLAwQUAAAACAAAAAAA1MsWxxUsAADf5wEAFAAAAGFuaW1hdGlvbnMvZGF0YS5qc29u7Z1bjyPHdqX/ilDzWsVhMu96mvGMPU+DGUCG/WAIB+2jktVWSy101/HxgaD/7m/tHUkmyWRVXqLYya6wcdTFvERG7LjuFWuv+P3u11/uvr379fGv3/358dfHu/u7H3744e7b7f3dT3ffNlv+/Wv495fHp3d33/5+9288/j8+fHx6ev/44/sPj5//+9PHjx9+fv/08O+fv9ludtUmu/vj/u7Du789fvp89+2//H739Le7b/N7/87/fff56fETX/n86e7bjH+e7Fsff7v7ttJH3vOHvk0Wfnz34fPjITv/yuu68+4zafy8v/3uo13+mU/9fmf54z+6wKe39/z/92SmuxmuZ3wp/M/ucq13e8slctF/oeDhoso2VVl7gmT+5I3Px9/WJXJ2dIVLjz+S2vcU81cKlf1x78YpgnG+e3r36U/b/Ng6GXdlnjZYR7/jmGeXZ5u8vi+KdrPbVceW4uN65HcvxH/yziar6vs7cmt/8ej77o5dpTB62Wwuu97fWd5VRF3um9xulcUfL9h+ShY2TU4Lszv8FbLyUO82zba5LzbbakfxQpb4h/dC4+AHyf9LrQezMtsVZZbVWXv/UJe8lZVNUdS7qrT3u7LsNlm744ndps2bLt3Gy9M1jEmZ326rIxuS9JkBH7KsaP1iu3XTXW5xi023r6Zqn4F+OXst+fNP7357PPTzu39T5+4a46GZ/vIr9/7n//67v//mnx7//PTx0zf/59PHv/zGo9bw//5vj5//9L8+fPz8+IMu0QLI0nu+1qX6+adxqX6n3HzzcJz6/3/39NM3O41sbpnj0eD3uz/v01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axbFsbyhDU/9bRpZpHGmkUUF2bj9zz+9f3r85ruPH97/YMP3uU5WZcJbB50sn7gWyGQVJKj/RZHyVkK5ZpZIKt5MX3f/7Uf7P1njJwyt8n9GRdT+cIsWMi7z7x0D0EYUqh/5dB4MRvxkZ693nz8/PqmOvv/jvwBQSwECAAAUAAAACAAAAAAApIjxZ3UAAACdAAAADQAAAAAAAAAAAAAAAAAAAAAAbWFuaWZlc3QuanNvblBLAQIAABQAAAAIAAAAAADUyxbHFSwAAN/nAQAUAAAAAAAAAAAAAAAAAKAAAABhbmltYXRpb25zL2RhdGEuanNvblBLBQYAAAAAAgACAH0AAADnLAAAAAA=",autoplay:!0,loop:!0}),/* @__PURE__ */v(f,{variant:"body2",className:"-mt-4",align:"center",children:"Congratulations! You are the first to rate this"})]}),(t.rateCount??0)>0&&/* @__PURE__ */v("div",{className:"mt-4",children:[(t.parameters||[]).map((t,e)=>/* @__PURE__ */v("div",{className:"mt-14",children:[/* @__PURE__ */v(Wt,{crowdScore:parseFloat(String(t.crowdRating||0)),userScore:parseFloat(String(t.userRating||0))}),/* @__PURE__ */v("div",{className:"bg-background md:text-md text-sm font-medium",children:t.name})]},`${t.name}-${e}`)),/* @__PURE__ */v("div",{className:"mt-4 flex w-full flex-col items-center",children:/* @__PURE__ */v("div",{className:"mb-2",children:[/* @__PURE__ */v("div",{className:"text-center text-lg font-semibold",children:`${Math.round((10-e)/10*100)}%`}),/* @__PURE__ */v("div",{className:"text-muted-foreground text-sm",children:"Alignment with crowd"})]})})]})]}):null},Kt=()=>/* @__PURE__ */v("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-full",width:"524.67004",height:"520.18759",viewBox:"0 0 524.67004 520.18759",role:"img",children:[
|
|
9
|
+
/* @__PURE__ */v("path",{d:"M524.67004,518.99758c0,.66003-.53003,1.19-1.19006,1.19H1.19c-.65997,0-1.19-.52997-1.19-1.19s.53003-1.19,1.19-1.19H523.47998c.66003,0,1.19006,.53003,1.19006,1.19Z",fill:"#3f3d56"}),
|
|
10
|
+
/* @__PURE__ */v("polygon",{points:"362.54192 461.05879 368.54192 486.05879 350.54192 491.05879 346.54192 464.05879 362.54192 461.05879",fill:"#ffb6b6"}),
|
|
11
|
+
/* @__PURE__ */v("polygon",{points:"391.54192 380.05879 372.54192 396.05879 360.54192 415.05879 377.54192 426.05879 406.54192 393.05879 391.54192 380.05879",fill:"#ffb6b6"}),
|
|
12
|
+
/* @__PURE__ */v("path",{d:"M385.54192,215.05879l16,54s71,62,64,75c-7,13-54,49-54,49,0,0,3.48819,11.51181-6.75591,6.75591-10.24409-4.75591-21.24409-17.75591-21.24409-17.75591,0,0,0-10,5-8,5,2,28-25,28-25l-50-46v153.81496s12,10.49213,0,11.33858c-12,.84646-23,2.84646-23,2.84646,0,0-14-5-9-10l-15-82-11-100,8-52,69-12Z",fill:"#2f2e41"}),
|
|
13
|
+
/* @__PURE__ */v("path",{d:"M353.54192,483.05879s1-4,5-4h12.21654s3.78346,17,2.78346,17,16,22-2,23c-18,1-23-1-23-1l-2-7.8937s-3-5.1063-2-9.1063,9-18,9-18Z",fill:"#2f2e41"}),
|
|
14
|
+
/* @__PURE__ */v("path",{d:"M378.54192,418.05879s11.48556-.1811,8.74278,2.90945c-2.74278,3.09055-7.74278,8.09055-7.74278,8.09055,0,0-11.8942,24-17.4471,19.5-5.5529-4.5-14.5529-54.5-11.5529-60.5s7-6,7-6l18.44907,11.09552s-11.44907,27.90448,2.55093,24.90448Z",fill:"#2f2e41"}),
|
|
15
|
+
/* @__PURE__ */v("polygon",{points:"350.54192 130.05879 354.54192 105.05879 327.54192 94.05879 323.54192 132.05879 350.54192 130.05879",fill:"#ffb6b6"}),
|
|
16
|
+
/* @__PURE__ */v("polygon",{points:"350.54192 130.05879 354.54192 105.05879 327.54192 94.05879 323.54192 132.05879 350.54192 130.05879",opacity:".1"}),
|
|
17
|
+
/* @__PURE__ */v("path",{d:"M322.04192,126.55879l32-8,34,11s15,42,10,57c-5,15-5,44.29921-5,44.29921,0,0-.5-12.79921-29.5-3.79921-29,9-50,8-50,8l-1-36-12.56231-31.97679c-5.36947-13.66775,.41799-29.18571,13.42611-35.99949l8.6362-4.52372Z",fill:"#e6e6e6"}),
|
|
18
|
+
/* @__PURE__ */v("g",{children:[/* @__PURE__ */v("path",{id:"uuid-1b03a630-7e31-41b5-b302-96493ff31189-103",d:"M468.93625,244.36122c4.51538,5.40957,5.38427,12.12429,1.94111,14.99735-3.44316,2.87305-9.89353,.81637-14.40979-4.59574-1.83372-2.13717-3.12896-4.6824-3.77735-7.42276l-18.84239-23.1622,9.17843-7.42782,19.28065,22.56531c2.58106,1.12838,4.85427,2.85861,6.62935,5.04587Z",fill:"#ffb6b6"}),/* @__PURE__ */v("polygon",{points:"386.58903 129.87809 380.03103 155.85437 412.12807 207.23315 444.89428 240.16415 455.51447 231.35346 422.46915 190.23683 397.42099 137.25937 386.58903 129.87809",fill:"#e6e6e6"})]}),
|
|
19
|
+
/* @__PURE__ */v("g",{children:[
|
|
20
|
+
/* @__PURE__ */v("ellipse",{cx:"459.12853",cy:"52.44806",rx:"41.5",ry:"52.5",transform:"translate(-2.61679 33.98) rotate(-4.22648)",fill:"currentcolor"}),
|
|
21
|
+
/* @__PURE__ */v("rect",{x:"460.12853",y:"104.80549",width:"2",height:"199.43799",fill:"#2f2e41"}),
|
|
22
|
+
/* @__PURE__ */v("polygon",{points:"462.62626 100.59386 462.86623 107.66085 466.05994 114.20304 452.73559 113.52346 458.33644 107.88988 457.70336 101.46854 462.62626 100.59386",fill:"currentcolor"})]}),
|
|
23
|
+
/* @__PURE__ */v("g",{children:[
|
|
24
|
+
/* @__PURE__ */v("circle",{cx:"343.71883",cy:"85.56184",r:"27.53355",fill:"#ffb6b6"}),
|
|
25
|
+
/* @__PURE__ */v("path",{d:"M341.52141,48.54491c.79671,.46507,1.86389-.23857,2.11935-1.12501s-.04212-1.82761-.33722-2.70165l-1.48558-4.40008c-1.0536-3.12063-2.17183-6.35032-4.45368-8.72552-3.44408-3.58499-8.91753-4.497-13.84474-3.83628-6.3275,.84849-12.57056,4.27476-15.51267,9.94055-2.9421,5.66579-1.68954,13.5716,3.62665,17.10648-7.57673,8.68419-10.21786,18.36242-9.80083,29.87971,.41702,11.51729,12.96805,22.11696,21.153,30.23044,1.82785-1.10801,3.48957-6.30065,2.48442-8.18702s.435-4.07179-.80984-5.80934-2.28631,1.02915-1.0278-.69854c.79414-1.0902-2.30536-3.59827-1.12493-4.25078,5.70958-3.15606,7.60854-10.2728,11.19452-15.72263,4.32536-6.57351,11.72821-11.02516,19.56239-11.76369,4.31558-.40683,8.87377,.33002,12.41109,2.83544,3.53731,2.50542,5.82735,6.98256,5.00708,11.23896,2.12436-2.157,3.18182-5.31809,2.78297-8.31917-.39885-3.00108-2.24525-5.77623-4.85926-7.3035,1.58943-5.25615,.22781-11.30225-3.46132-15.36964s-18.65428-3.37463-24.04014-2.30417",fill:"#2f2e41"}),
|
|
26
|
+
/* @__PURE__ */v("path",{d:"M340.68501,68.64111c-7.1334,.77005-12.28392,6.94917-16.63311,12.65557-2.50677,3.28904-5.13259,6.92124-5.06965,11.05618,.06363,4.18054,2.85874,7.76625,4.19457,11.72813,2.18345,6.47581,.05542,14.18053-5.14218,18.61771,5.13581,.97458,10.68776-2.87625,11.57437-8.02797,1.03212-5.99724-3.51408-11.7855-2.97566-17.84704,.47435-5.34029,4.68273-9.45028,8.26047-13.4432,3.57775-3.99292,6.93788-9.29143,5.29193-14.39384",fill:"#2f2e41"})]}),
|
|
27
|
+
/* @__PURE__ */v("path",{d:"M314.42637,234.55793H108.75752c-23.32296,0-42.22995,18.90699-42.22995,42.22995v199.43289c0,23.32291,18.90695,42.22986,42.22986,42.22986h205.66894c23.32296,0,42.22995-18.90699,42.22995-42.22995v-199.43281c0-23.32296-18.90699-42.22995-42.22995-42.22995Z",fill:"#fff"}),
|
|
28
|
+
/* @__PURE__ */v("path",{d:"M314.42649,519.45019H108.75754c-23.83691,0-43.22998-19.39258-43.22998-43.22949v-199.43262c0-23.83691,19.39307-43.22998,43.22998-43.22998h205.66895c23.83691,0,43.22998,19.39307,43.22998,43.22998v199.43262c0,23.83691-19.39307,43.22949-43.22998,43.22949ZM108.75754,235.5581c-22.73438,0-41.22998,18.49561-41.22998,41.22998v199.43262c0,22.73438,18.49561,41.22949,41.22998,41.22949h205.66895c22.73438,0,41.22998-18.49512,41.22998-41.22949v-199.43262c0-22.73437-18.49561-41.22998-41.22998-41.22998H108.75754Z",fill:"#3f3d56"}),
|
|
29
|
+
/* @__PURE__ */v("circle",{cx:"292.72497",cy:"249.4082",r:"4.76903",fill:"#3f3d56"}),
|
|
30
|
+
/* @__PURE__ */v("circle",{cx:"305.83981",cy:"249.4082",r:"4.76903",fill:"#3f3d56"}),
|
|
31
|
+
/* @__PURE__ */v("circle",{cx:"318.95465",cy:"249.4082",r:"4.76903",fill:"#3f3d56"}),
|
|
32
|
+
/* @__PURE__ */v("path",{d:"M102.01538,448.63094c-1.48165,0-2.68692,1.20526-2.68692,2.68692,0,.72246,.27901,1.39069,.78543,1.88399,.51079,.52304,1.1799,.80293,1.90148,.80293h215.09838c1.48165,0,2.68692-1.20526,2.68692-2.68692,0-.72246-.27901-1.39069-.78543-1.88399-.51079-.52304-1.1799-.80293-1.90148-.80293H102.01538Z",fill:"#e6e6e6"}),
|
|
33
|
+
/* @__PURE__ */v("path",{d:"M217.02966,447.7353v7.16511H102.01538c-.98518,0-1.88082-.39414-2.52565-1.0569-.66287-.64483-1.0569-1.54047-1.0569-2.52565,0-1.97047,1.61219-3.58255,3.58255-3.58255h115.01428Z",fill:"currentcolor"}),
|
|
34
|
+
/* @__PURE__ */v("path",{d:"M312.63557,434.30072h-35.82554c-3.95078,0-7.16511-3.21345-7.16511-7.16511s3.21433-7.16511,7.16511-7.16511h35.82554c3.95078,0,7.16511,3.21345,7.16511,7.16511s-3.21433,7.16511-7.16511,7.16511Z",fill:"#e6e6e6"}),
|
|
35
|
+
/* @__PURE__ */v("g",{children:[
|
|
36
|
+
/* @__PURE__ */v("polyline",{points:"178.04436 439.42158 153.00042 355.27363 151.08342 355.84395 176.03948 439.696",fill:"#2f2e41"}),
|
|
37
|
+
/* @__PURE__ */v("ellipse",{cx:"175.04192",cy:"195.55879",rx:"41.5",ry:"52.5",transform:"translate(-13.93649 13.43225) rotate(-4.22648)",fill:"currentcolor"}),
|
|
38
|
+
/* @__PURE__ */v("rect",{x:"176.04192",y:"247.91621",width:"2",height:"199.43799",fill:"#2f2e41"}),
|
|
39
|
+
/* @__PURE__ */v("polygon",{points:"154.12589 352.83568 156.37116 359.54081 161.29787 364.90062 148.33299 368.04891 152.09477 361.05206 149.65683 355.07788 154.12589 352.83568",fill:"currentcolor"}),
|
|
40
|
+
/* @__PURE__ */v("polygon",{points:"178.53965 243.70459 178.77961 250.77158 181.97332 257.31377 168.64898 256.63419 174.24983 251.0006 173.61675 244.57926 178.53965 243.70459",fill:"currentcolor"}),
|
|
41
|
+
/* @__PURE__ */v("ellipse",{cx:"136.04192",cy:"305.55879",rx:"41.5",ry:"52.5",transform:"translate(-100.19337 68.77521) rotate(-20.93384)",fill:"currentcolor"})]}),
|
|
42
|
+
/* @__PURE__ */v("path",{id:"uuid-b40723c2-846b-43d4-8d7a-d7be28bdc184-104",d:"M336.50935,224.32158c6.7457,2.0366,11.16281,7.16803,9.866,11.46082-1.29681,4.29279-7.81569,6.12073-14.56352,4.0825-2.70665-.77722-5.18781-2.19132-7.2359-4.12401l-28.47282-8.99009,3.58382-11.25044,28.51078,8.25056c2.77637-.4763,5.62645-.28063,8.31164,.57066Z",fill:"#ffb6b6"}),
|
|
43
|
+
/* @__PURE__ */v("path",{d:"M287.04192,150.55879l30-22-1,42-28,36,30,12-1,17.13379s-38-9.13379-44-10.13379-11-15-11-15l25-60Z",fill:"#e6e6e6"})]}),Gt=()=>/* @__PURE__ */v("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-full",width:"938.19159",height:"761.03649",viewBox:"0 0 938.19159 761.03649",role:"img",children:[
|
|
44
|
+
/* @__PURE__ */v("rect",{y:"758.44705",width:"937.72423",height:"2",fill:"#3f3d56"}),
|
|
45
|
+
/* @__PURE__ */v("path",{d:"M605.6087,275.68745h-3.99878V166.14212a63.40184,63.40184,0,0,0-63.40179-63.40192H306.1214a63.40185,63.40185,0,0,0-63.402,63.40172V767.11633a63.40186,63.40186,0,0,0,63.40179,63.40191H538.20782a63.40186,63.40186,0,0,0,63.402-63.40167V353.66369h3.99884Z",transform:"translate(-130.9042 -69.48176)",fill:"#3f3d56"}),
|
|
46
|
+
/* @__PURE__ */v("path",{d:"M588.11842,166.58437v600.09a47.35088,47.35088,0,0,1-47.35,47.35h-233.21a47.34234,47.34234,0,0,1-47.34-47.35v-600.09a47.34233,47.34233,0,0,1,47.34-47.35h28.3a22.48621,22.48621,0,0,0,20.83,30.99h132.96a22.48084,22.48084,0,0,0,20.82-30.99h30.3A47.35087,47.35087,0,0,1,588.11842,166.58437Z",transform:"translate(-130.9042 -69.48176)",fill:"#fff"}),
|
|
47
|
+
/* @__PURE__ */v("circle",{cx:"234.72423",cy:"148.94264",r:"62",fill:"#ff6584"}),
|
|
48
|
+
/* @__PURE__ */v("ellipse",{cx:"481.52878",cy:"511.47762",rx:"83.93709",ry:"41.13748",transform:"translate(-205.63303 871.01427) rotate(-84.36901)",fill:"#3f3d56"}),
|
|
49
|
+
/* @__PURE__ */v("path",{d:"M471.82832,648.57886c-6.69694-99.99244,19.199-196.41244,19.46125-197.37392l3.13615.85472c-.261.95682-26.013,96.871-19.35407,196.303Z",transform:"translate(-130.9042 -69.48176)",fill:"currentcolor"}),
|
|
50
|
+
/* @__PURE__ */v("rect",{x:"479.38571",y:"505.02121",width:"42.18651",height:"3.2511",transform:"translate(-286.74406 160.73103) rotate(-22.51062)",fill:"currentcolor"}),
|
|
51
|
+
/* @__PURE__ */v("rect",{x:"458.80141",y:"491.62473",width:"3.2511",height:"42.18795",transform:"matrix(0.55614, -0.83109, 0.83109, 0.55614, -352.65322, 540.75307)",fill:"currentcolor"}),
|
|
52
|
+
/* @__PURE__ */v("ellipse",{cx:"395.86633",cy:"372.95401",rx:"164.17107",ry:"80.46008",transform:"translate(-145.03503 660.83367) rotate(-84.36901)",fill:"#e6e6e6"}),
|
|
53
|
+
/* @__PURE__ */v("path",{d:"M378.44285,641.00468c-13.08066-195.31557,37.50028-383.6477,38.01258-385.52721l3.13615.85473c-.511,1.87484-50.948,189.70118-37.9054,384.45632Z",transform:"translate(-130.9042 -69.48176)",fill:"#3f3d56"}),
|
|
54
|
+
/* @__PURE__ */v("rect",{x:"391.67367",y:"361.87935",width:"82.51384",height:"3.2511",transform:"translate(-237.08815 123.96365) rotate(-22.51062)",fill:"#3f3d56"}),
|
|
55
|
+
/* @__PURE__ */v("rect",{x:"352.96843",y:"334.12429",width:"3.2511",height:"82.51384",transform:"translate(-285.48788 391.84164) rotate(-56.21159)",fill:"#3f3d56"}),
|
|
56
|
+
/* @__PURE__ */v("ellipse",{cx:"595.20552",cy:"293.31849",rx:"224.65515",ry:"110.10326",transform:"translate(113.99601 787.38934) rotate(-84.36901)",fill:"currentcolor"}),
|
|
57
|
+
/* @__PURE__ */v("path",{d:"M571.9608,660.085c-17.893-267.17522,51.29658-524.79536,51.99745-527.36607l3.13615.85472c-.69962,2.56606-69.74527,259.6804-51.89027,526.29519Z",transform:"translate(-130.9042 -69.48176)",fill:"#3f3d56"}),
|
|
58
|
+
/* @__PURE__ */v("rect",{x:"589.46865",y:"278.76226",width:"112.91339",height:"3.2511",transform:"translate(-189.03802 199.17687) rotate(-22.51062)",fill:"#3f3d56"}),
|
|
59
|
+
/* @__PURE__ */v("rect",{x:"537.10232",y:"240.18265",width:"3.2511",height:"112.91339",transform:"translate(-138.31025 509.93024) rotate(-56.21231)",fill:"#3f3d56"}),
|
|
60
|
+
/* @__PURE__ */v("path",{d:"M260.21846,656.72262l-2,112.50247c0,26.619,23.19,48.19931,49.34,48.19931h233.21c26.15,0,49.35-21.58029,49.35-48.19931l-2-111.515C470.54677,612.13741,361.82945,614.99539,260.21846,656.72262Z",transform:"translate(-130.9042 -69.48176)",fill:"currentcolor"}),
|
|
61
|
+
/* @__PURE__ */v("path",{d:"M757.73389,265.55793l12.41349-9.92842c-9.64348-1.06394-13.60581,4.19541-15.22744,8.35823-7.53388-3.12835-15.73541.97151-15.73541.97151l24.83709,9.01675A18.79465,18.79465,0,0,0,757.73389,265.55793Z",transform:"translate(-130.9042 -69.48176)",fill:"#3f3d56"}),
|
|
62
|
+
/* @__PURE__ */v("path",{d:"M454.33082,177.90815l12.41348-9.92842c-9.64348-1.06393-13.60581,4.19542-15.22743,8.35824-7.53389-3.12835-15.73542.97151-15.73542.97151l24.8371,9.01674A18.79483,18.79483,0,0,0,454.33082,177.90815Z",transform:"translate(-130.9042 -69.48176)",fill:"#3f3d56"}),
|
|
63
|
+
/* @__PURE__ */v("path",{d:"M949.215,138.80286l12.41348-9.92841c-9.64348-1.06394-13.60581,4.19541-15.22744,8.35823-7.53388-3.12835-15.73541.97151-15.73541.97151l24.8371,9.01674A18.7949,18.7949,0,0,0,949.215,138.80286Z",transform:"translate(-130.9042 -69.48176)",fill:"#3f3d56"}),
|
|
64
|
+
/* @__PURE__ */v("path",{d:"M929.59073,595.44741l-.21138,16.91339a11.0384,11.0384,0,0,1-13.33074,10.65962h0a11.0384,11.0384,0,0,1-7.64863-15.594l5.65225-11.7156,11.71725-85.025-4.49739-56.81539,21.99782-1.05418,4.6785,64.98836Z",transform:"translate(-130.9042 -69.48176)",fill:"#ffb9b9"}),
|
|
65
|
+
/* @__PURE__ */v("polygon",{points:"690.906 615.823 669.756 729.705 680.331 728.078 719.376 613.383 690.906 615.823",fill:"#ffb9b9"}),
|
|
66
|
+
/* @__PURE__ */v("polygon",{points:"792.179 617.043 805.601 733.772 816.989 732.145 819.836 616.23 792.179 617.043",fill:"#ffb9b9"}),
|
|
67
|
+
/* @__PURE__ */v("path",{d:"M1043.47242,652.36032c-30.3204,24.35925-65.82375,60.13557-101.17188,46.80734-36.88693-13.90847-79.45811-14.78814-127.40493-8.57563C826.347,618.76176,840.4884,550.798,858.8214,488.85876l61.008,9.76129c.94385,1.04272-1.33391,6.68349-.40672,7.72768,17.14911,19.3131,34.64046,34.28155,45.20984,54.17363a263.09034,263.09034,0,0,0,62.09993,77.6744Z",transform:"translate(-130.9042 -69.48176)",fill:"#e6e6e6"}),
|
|
68
|
+
/* @__PURE__ */v("path",{d:"M1069.0958,664.96865c-30.3204,25.04776-93.88745,66.8633-129.23558,53.15835-36.88693-14.30159-80.67827-13.18034-128.6251-6.79223q3.41266-22.01133,7.281-43.74258c10.39163-58.36708,199.81766-37.86485,225.363-15.63859Z",transform:"translate(-130.9042 -69.48176)",fill:"#e6e6e6",opacity:"0.5"}),
|
|
69
|
+
/* @__PURE__ */v("path",{d:"M946.99379,456.45785c-11.40621-3.33493-23.03457-1.67947-34.81756,3.44321l4.26832-32.07389a13.42176,13.42176,0,0,1,11.69123-14.95333h0a13.42177,13.42177,0,0,1,14.95334,11.69123Z",transform:"translate(-130.9042 -69.48176)",fill:"#2f2e41"}),
|
|
70
|
+
/* @__PURE__ */v("circle",{cx:"764.1153",cy:"296.95419",r:"22.77634",fill:"#ffb9b9"}),
|
|
71
|
+
/* @__PURE__ */v("path",{d:"M937.31842,429.88431l-50.0266-11.79488c7.42642-10.67621,5.90678-23.19,0-36.60483L911.695,376.604c2.70107,9.25875,5.978,17.73139,10.57473,24.40322Z",transform:"translate(-130.9042 -69.48176)",fill:"#ffb9b9"}),
|
|
72
|
+
/* @__PURE__ */v("path",{d:"M919.82944,501.87381,858.008,492.926l2.05584-11.57777c-.97509-30.16344,3.99581-54.85253,13.39953-75.46037l54.50052,3.25376,0,0A40.50556,40.50556,0,0,1,939.6747,457.222l-19.03182,37.33085Z",transform:"translate(-130.9042 -69.48176)",fill:"#2f2e41"}),
|
|
73
|
+
/* @__PURE__ */v("path",{d:"M812.67015,828.55818c-2.85281,1.302-5.24242-9.24676-7.64881-6.882-6.731,6.61469-17.03824,8.05508-26.02269,5.16711l3.14439-.03515A4.20762,4.20762,0,0,1,779.491,821.325h0a4.20763,4.20763,0,0,1,2.91922-2.60459l7.15843-1.78961,11.23977-19.76649,12.24936-1.55031.30939.506a31.58354,31.58354,0,0,1,3.38457,25.82571C815.733,825.20973,814.34639,827.79315,812.67015,828.55818Z",transform:"translate(-130.9042 -69.48176)",fill:"#2f2e41"}),
|
|
74
|
+
/* @__PURE__ */v("path",{d:"M947.7013,828.55818c-2.85282,1.302-5.24243-9.24676-7.64882-6.882-6.731,6.61469-17.03824,8.05508-26.02269,5.16711l3.1444-.03515a4.20761,4.20761,0,0,1-2.6521-5.48314h0a4.20763,4.20763,0,0,1,2.91922-2.60459l7.15843-1.78961,11.23977-19.76649,12.24936-1.55031.30939.506a31.58354,31.58354,0,0,1,3.38457,25.82571C950.76414,825.20973,949.37753,827.79315,947.7013,828.55818Z",transform:"translate(-130.9042 -69.48176)",fill:"#2f2e41"}),
|
|
75
|
+
/* @__PURE__ */v("path",{d:"M923.36919,462.42194h-.58335c-10.99942-9.531-20.55808-20.21545-12.8387-33.59175-6.54685-16.61653-13.84548-33.87222-13.4044-44.54745a31.30614,31.30614,0,0,0-7.11173-21.76562c-6.95679-8.12637-8.50514-11.75564-21.21085-8.68247v0a24.07552,24.07552,0,0,1,24.94809-24.394l7.93809.28866c6.07248.22081,25.47968,2.70318,29.64637,6.71041a19.33222,19.33222,0,0,1,5.5343,16.25539c-.77881,6.62568,1.3115,12.4758,6.89623,17.3813,10.692,11.05631,15.10194,22.52841,9.0399,34.6936-4.57574,12.87865-4.35717,23.47924,7.44566,28.57533h0v0C963.502,448.05651,938.57153,462.42194,923.36919,462.42194Z",transform:"translate(-130.9042 -69.48176)",fill:"#2f2e41"}),
|
|
76
|
+
/* @__PURE__ */v("ellipse",{cx:"794.98802",cy:"521.53228",rx:"7.78175",ry:"15.87792",transform:"translate(-273.66577 608.98229) rotate(-42.76626)",fill:"#3f3d56"}),
|
|
77
|
+
/* @__PURE__ */v("circle",{cx:"695.70128",cy:"390.80406",r:"22.82838",fill:"currentcolor"}),
|
|
78
|
+
/* @__PURE__ */v("path",{d:"M864.9405,605.75427a120.26458,120.26458,0,0,1-28.32994-17.97493c-17.27569-14.93614-29.82021-36.372-30.75373-59.53895-.89589-22.2329,8.52533-43.134,18.4908-62.45411q1.88055-3.64579,3.80009-7.27128c.48628-.92285,1.99541-.303,1.5061.62561-10.33838,19.62013-21.18589,40.3541-22.16671,62.97818-1.03383,23.84711,10.61711,46.57835,27.95481,62.44419a117.26593,117.26593,0,0,0,30.03393,19.64334",transform:"translate(-130.9042 -69.48176)",fill:"#3f3d56"}),
|
|
79
|
+
/* @__PURE__ */v("rect",{x:"818.53833",y:"459.58913",width:"1.08699",height:"15.27261",transform:"translate(-215.05144 126.87117) rotate(-13.00791)",fill:"#3f3d56"}),
|
|
80
|
+
/* @__PURE__ */v("ellipse",{cx:"831.60826",cy:"565.3893",rx:"7.78175",ry:"15.87792",transform:"translate(-194.69233 38.19293) rotate(-7.13528)",fill:"#3f3d56"}),
|
|
81
|
+
/* @__PURE__ */v("path",{d:"M858.8214,579.15067,856.55622,595.913a11.0384,11.0384,0,0,1-14.52733,8.96062h0a11.03839,11.03839,0,0,1-5.6969-16.408l7.03407-10.94188,21.96289-82.97095,2.44032-56.94084,21.9629,1.62688-3.25376,65.07525Z",transform:"translate(-130.9042 -69.48176)",fill:"#ffb9b9"}),
|
|
82
|
+
/* @__PURE__ */v("path",{d:"M892.57918,449.81361c-10.91641-4.69632-22.65976-4.46625-34.97794-.81344l8.1344-31.31748a13.42176,13.42176,0,0,1,13.42176-13.42175h0a13.42175,13.42175,0,0,1,13.42175,13.42175Z",transform:"translate(-130.9042 -69.48176)",fill:"#2f2e41"})]}),Jt=g(({parameter:t,selected:r,onChange:n,showValues:i=!0})=>{const o=L(t=>{r!==t&&n?.(t)},[r,n]);/* @__PURE__ */
|
|
83
|
+
return v("div",{className:"mb-8 flex w-full flex-col gap-2 lg:mb-12 lg:gap-4",children:[/* @__PURE__ */v(f,{variant:"h4",className:"text-primary-light text-center font-semibold md:text-left",children:t.name}),/* @__PURE__ */v("div",{className:"grid w-full grid-cols-5 gap-1 lg:gap-2",children:(t.tooltips||[]).map(n=>{const a=`${t._id}-option-${n.value}`;/* @__PURE__ */
|
|
84
|
+
return v("div",{children:[/* @__PURE__ */v("button",{type:"button",className:e("border-primary shadow-outer flex size-full min-h-12 items-center justify-center rounded border transition-all duration-100 active:scale-90",r===n.value?"bg-primary":"bg-background"),onClick:()=>o(n.value),children:[t.mode===l.TEXT&&/* @__PURE__ */v("div",{className:e("p-1 text-center text-xs font-semibold md:p-2 md:text-base",r===n.value?"text-primary-foreground":"text-foreground"),children:n.label}),t.mode===l.IMAGE&&/* @__PURE__ */v("img",{className:"h-12 w-auto rounded object-contain lg:h-16",src:n.imageUrl,alt:n.label||t.name||String(n.value),loading:"lazy"}),t.mode===l.LOTTIE&&n.imageUrl&&/* @__PURE__ */v(qt,{className:"h-12 w-auto rounded object-contain lg:h-16",src:n.imageUrl,autoplay:!0,loop:!0})]}),i&&/* @__PURE__ */v("div",{className:"mt-1 w-full text-center",children:/* @__PURE__ */v("span",{className:"text-foreground inline-flex items-center px-2 py-[0.0625] text-xs font-medium md:px-3 md:py-0.5",children:n.value})})]},a)})})]})});Jt.displayName="RatingRadioButton";var jt,Qt=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function Vt(t,e,r,n,i,o,a,s,_,l,d){var c,u,h,p;if(0!==a)if(a!==r-e+(o-i)){for(var g=r-e,m=o-i,f=Math.floor(m/2),b={},w=-a-1;w<=a+1;++w)b[w]={d:1/0,segments:0,direct:jt.none};for(var y=((c={})[-a-1]={d:1/0,segments:0,direct:jt.none},c[a+1]={d:1/0,segments:0,direct:jt.none},c),v=0;v<=f;++v){u=Qt([y,b],2),b=u[0],y=u[1];var C=function(r){var o=v+r;if(0===v&&0===o)return b[r]={d:0,segments:0,direct:s},"continue";var a=[{direct:jt.horizontal,d:b[r-1].d+1,segments:b[r-1].segments+(b[r-1].direct&jt.horizontal?0:1)},{direct:jt.vertical,d:y[r+1].d+1,segments:y[r+1].segments+(y[r+1].direct&jt.vertical?0:1)}];o>0&&o<=g&&v>0&&v<=m&&l(t[e+o-1],n[i+v-1])&&a.push({direct:jt.diagonal,d:y[r].d,segments:y[r].segments+(y[r].direct&jt.diagonal?0:1)});var _=a.reduce(function(t,e){return t.d>e.d||t.d===e.d&&t.segments>e.segments?e:t});a.forEach(function(t){_.d===t.d&&_.segments===t.segments&&(_.direct|=t.direct)}),b[r]=_};for(w=-a;w<=a;++w)C(w)}var L={};for(w=-a-1;w<=a+1;++w)L[w]={d:1/0,segments:0,direct:jt.none};var x=((h={})[-a-1]={d:1/0,segments:0,direct:jt.none},h[a+1]={d:1/0,segments:0,direct:jt.none},h);for(v=m;v>=f;--v){p=Qt([x,L],2),L=p[0],x=p[1];var A=function(r){var o=v+r;if(v===m&&o===g)return L[r]={d:0,segments:0,direct:_},"continue";var a=[{direct:jt.horizontal,d:L[r+1].d+1,segments:L[r+1].segments+(L[r+1].direct&jt.horizontal?0:1)},{direct:jt.vertical,d:x[r-1].d+1,segments:x[r-1].segments+(x[r-1].direct&jt.vertical?0:1)}];o>=0&&o<g&&v>=0&&v<m&&l(t[e+o],n[i+v])&&a.push({direct:jt.diagonal,d:x[r].d,segments:x[r].segments+(x[r].direct&jt.diagonal?0:1)});var s=a.reduce(function(t,e){return t.d>e.d||t.d===e.d&&t.segments>e.segments?e:t});a.forEach(function(t){s.d===t.d&&s.segments===t.segments&&(s.direct|=t.direct)}),L[r]=s};for(w=a;w>=-a;--w)A(w)}var M={k:-1,d:1/0,segments:0,direct:jt.none};for(w=-a;w<=a;++w){var k=b[w].d+L[w].d;if(k<M.d)M.k=w,M.d=k,M.segments=b[w].segments+L[w].segments+(b[w].segments&L[w].segments?0:1),M.direct=L[w].direct;else if(k===M.d){var S=b[w].segments+L[w].segments+(b[w].segments&L[w].segments?0:1);(S<M.segments||S===M.segments&&!(M.direct&jt.diagonal)&&L[w].direct&jt.diagonal)&&(M.k=w,M.d=k,M.segments=S,M.direct=L[w].direct)}}f+M.k===0&&0===f&&(f++,b[M.k].direct=L[M.k].direct,L[M.k].direct=x[M.k].direct),Vt(t,e,e+f+M.k,n,i,i+f,b[M.k].d,s,L[M.k].direct,l,d),Vt(t,e+f+M.k,r,n,i+f,o,L[M.k].d,b[M.k].direct,_,l,d)}else(s&jt.horizontal?1:0)+(_&jt.vertical?1:0)>=(s&jt.vertical?1:0)+(_&jt.horizontal?1:0)?(e!==r&&d("remove",t,e,r,n,i,i),i!==o&&d("add",t,r,r,n,i,o)):(i!==o&&d("add",t,e,e,n,i,o),e!==r&&d("remove",t,e,r,n,o,o));else d("same",t,e,r,n,i,o)}function Yt(t,e,r,n){var i=function(t,e,r){for(var n=t.length,i=e.length,o=n+i,a={1:0},s=0;s<=o;++s)for(var _=-s;_<=s;_+=2){for(var l=void 0,d=(l=_===-s||_!==s&&a[_-1]+1<a[_+1]?a[_+1]:a[_-1]+1)-_;l<n&&d<i&&r(t[l],e[d]);)l++,d++;if(l===n&&d===i)return s;a[_]=l}return-1}(t,e,r);Vt(t,0,t.length,e,0,e.length,i,jt.diagonal,jt.all,r,n)}!function(t){t[t.none=0]="none",t[t.horizontal=1]="horizontal",t[t.vertical=2]="vertical",t[t.diagonal=4]="diagonal",t[t.all=7]="all"}(jt||(jt={}));var Xt=t=>{if(!t)return"";if("string"==typeof t)return t;if("number"==typeof t)return String(t);if("object"==typeof t&&"_id"in t)return Xt(t._id);if("object"==typeof t&&"id"in t)return Xt(t.id);if("object"==typeof t&&"$oid"in t)return Xt(t.$oid);if("function"==typeof t.toHexString)return t.toHexString();if("function"==typeof t.toString){const e=t.toString();return"[object Object]"===e?"":e}return""},$t=()=>{const e=c(),{eventSlug:l,contentId:g}=k(),q=A(),U=q.props?.organizationId,B=q.props?.loginUrl,{t:D}=S(),Z=q.user,W=q.loadingUser,H=q.organization,K=H?.advancedSettings?.imageSearchProviders?.curate??I,[G,J]=x(!1),[j,Q]=x(null),[V,Y]=x([]),[X,$]=x({upload:0,curate:0}),[tt,et]=x({}),[rt,nt]=x(null),[it,ot]=x(!1),[at,st]=x(!0),[_t,lt]=x(null),{loading:dt,event:ct,parameters:ut}=w({eventSlug:l}),ht=M(()=>Xt(Z?._id)||Xt(Z?.id)||Xt(Z?.userId),[Z?._id,Z?.id,Z?.userId]),pt=L(t=>{const e=Xt(t?.userId);return Boolean(ht)&&Boolean(e)&&e===ht},[ht]),gt=L(t=>t?pt(t)||t.ratingStatus===n.OWN?"Sorry, you cannot rate your own photo!":t.ratingStatus===n.CURATED?"Sorry, you have already rated this content.":null:null,[pt]),mt=C(!1);t(()=>()=>{mt.current=!0},[]);const ft=L(async t=>{mt.current=!1,J(!0);try{const e=Z?.token?{Authorization:`Bearer ${Z.token}`}:{},[r,n]=await Promise.all([d.get(p.CONTENT_FOR_CURATION,{headers:{"x-org-id":U,...e},searchParams:{eventId:t,page:1,limit:10}}).json(),d.get(p.GET_EVENT_POINTS,{headers:{"x-org-id":U,...e},searchParams:{eventId:t}}).json()]),i=r,o=n;if(i.error)throw new Error(i.error);if(o.error)throw new Error(o.error);if(mt.current)return;const a=g?i.data.filter(t=>t._id!==g):i.data.filter(t=>!pt(t));let s=a,_=null;if(g){const t=await d.get(p.ELIGIBLE_TO_CURATE,{headers:{"x-org-id":U,...e},searchParams:{contentId:g}}).json();if(t.error)throw new Error(t.error);const r=t.data;s=r?[r,...a||[]]:a||[],_=gt(r)}if(mt.current)return;$(o.data??{}),Y(s),Q(_)}catch(e){if(mt.current)return;const t=e instanceof Error?e.message:"Failed to fetch contents";h.error(t)}mt.current||J(!1)},[Z,U,ct?._id,gt,g,pt]);t(()=>{ct?._id&&ht&&ft(ct._id)},[ct?._id,ht,ft]);const bt=V.length>0?V[0]:null;t(()=>{const t=gt(bt);Q(t)},[bt,ht]);const wt=async()=>{const t=ut??[];if(Object.keys(tt).length<t.length)lt("please select your ratings");else{lt(null),ot(!0);try{const e=await d.post(p.CURATE_CONTENT,{headers:{"x-org-id":U,...Z?.token?{Authorization:`Bearer ${Z.token}`}:{}},json:{eventId:ct?._id,contentId:bt?._id,parameterCount:t.length,userRatings:t.map(t=>({parameterId:t._id,rate:tt[t._id]})),inappropriate:""}}).json();if(mt.current)return;if(e.error)lt(e.error);else{const r=e.data,n=r?.crowdRatings||{},i={parameters:t.map(t=>({name:t.name??"",crowdRating:n[t._id]??0,userRating:r?.ratings?.find(e=>e.parameterId===t._id)?.rate??0})),similarity:r?.similarity||null,points:r?.points||0,rateCount:r?.rateCount||0};nt(i),$(t=>({...t,curate:(t.curate??0)+(ct?.activityScores?.curate??0)}))}}catch(e){if(mt.current)return;lt(D("error.submit_rating","Failed to submit rating"))}finally{mt.current||ot(!1)}}},yt=L(()=>st(!0),[]),vt=L(()=>st(!1),[]),Ct=L(()=>st(!1),[]),Lt=L((t,e)=>{et(r=>({...r,[t]:e}))},[]),xt=L(()=>{const t=V.slice(1);Q(null),nt(null),et({}),3===t.length?(async t=>{if(!mt.current)try{const e=await d.get(p.CONTENT_FOR_CURATION,{headers:{"x-org-id":U,...Z?.token?{Authorization:`Bearer ${Z.token}`}:{}},searchParams:{eventId:ct?._id,page:1,limit:10}}).json();if(mt.current)return;if(e.error)throw new Error(e.error);if((e?.data?.length??0)>0){const r=function(t,e,r){void 0===r&&(r=function(t,e){return t===e});var n={removed:[],added:[]};return Yt(t,e,r,function(t,e,r,i,o,a,s){if("add"===t)for(var _=a;_<s;++_)n.added.push(o[_]);else if("remove"===t)for(_=r;_<i;++_)n.removed.push(e[_])}),n}(t,e.data??[],(t,e)=>t._id===e._id),n=[...t,...r.added.filter(t=>!pt(t))];Y(n)}}catch(e){if(mt.current)return;const t=e instanceof Error?e.message:"Failed to fetch more contents";h.error(t)}})(t):Y(t),st(!0)},[V]),At=C(wt);At.current=wt;const Mt=L(()=>{j?xt():At.current()},[j,xt]);if(W)/* @__PURE__ */return v(u,{className:"mx-auto h-6 w-64"});if(!Z){if(H?.customAuth){if(B&&o(B)){try{window.top?.location?.assign(B)}catch{window.location.href=B}/* @__PURE__ */
|
|
85
|
+
return v(y,{title:"Redirecting to login..."})}/* @__PURE__ */
|
|
86
|
+
return v(y,{title:"Please login to curate content"})}/* @__PURE__ */
|
|
87
|
+
return v(m,{to:i.LOGIN,state:{referrer:e.pathname},replace:!0})}/* @__PURE__ */
|
|
88
|
+
return v("div",{className:"bg-background min-h-[80vh]",children:/* @__PURE__ */v("div",G||dt?{className:"grid grid-cols-1 gap-6 pt-10 md:grid-cols-2",children:[/* @__PURE__ */v(u,{className:"h-64 w-full md:h-120 md:max-h-screen md:rounded"}),/* @__PURE__ */v("div",{className:"space-y-8",children:Array.from({length:2}).map((t,e)=>/* @__PURE__ */v("div",{className:"space-y-4",children:[/* @__PURE__ */v(u,{className:"h-8 w-36"}),/* @__PURE__ */v("div",{className:"flex w-full gap-4",children:Array.from({length:5}).map((t,e)=>/* @__PURE__ */v(u,{className:"h-24 w-full sm:h-32"},e))})]},e))})]}:{className:"pt-10",children:[ct?.status===s.CLOSED&&/* @__PURE__ */v(y,{title:"Event Closed",className:"py-24",description:"Event is now closed. Thank you for participating!",iconSvg:/* @__PURE__ */v(Kt,{})}),ct?.status===s.OPEN&&V.length<=0&&/* @__PURE__ */v(y,{title:"No Content to Rate",className:"py-24",description:"Please find another event to rate contents.",iconSvg:/* @__PURE__ */v(Gt,{})}),ct?.status===s.OPEN&&bt&&/* @__PURE__ */v("div",{children:[
|
|
89
|
+
/* @__PURE__ */v("div",{className:"flex w-full items-center justify-between",children:[/* @__PURE__ */v(f,{variant:"h4",children:D("curate.rate_this_"+(bt.type===a.IMAGE?"image":"video"),"Rate this "+(bt.type===a.IMAGE?"image":"video"))}),/* @__PURE__ */v(f,{variant:"h4",children:[String(ct?.pointName??""),":"," ",
|
|
90
|
+
/* @__PURE__ */v("span",{className:"text-primary",children:(X.upload??0)+(X.curate??0)})]})]}),
|
|
91
|
+
/* @__PURE__ */v("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[/* @__PURE__ */v("div",{className:"relative mt-4 w-full",children:[bt.type===a.IMAGE&&bt.url&&/* @__PURE__ */v("div",{className:"absolute top-2 left-2 z-10 flex gap-2",children:/* @__PURE__ */v(F,{providers:K,imageUrl:bt.url,className:"bg-foreground/50 rounded-full p-1 opacity-50 transition-[opacity,transform] sm:p-1.5 sm:hover:scale-110 sm:hover:opacity-100",surface:"curate",organizationId:U,eventId:ct?._id,contentId:bt._id})}),bt.type===a.IMAGE&&/* @__PURE__ */v(r,{src:bt.url,alt:bt.caption,blurhash:bt.blurhash,wrapperClassName:"w-full h-60 md:h-120 md:max-h-screen md:rounded"}),bt.type===a.VIDEO&&/* @__PURE__ */v("div",{className:"mx-auto h-80 w-fit overflow-hidden rounded sm:h-120",children:/* @__PURE__ */v(z,{muted:!0,src:bt.url,playing:at,onPlay:yt,onPause:vt,onEnd:Ct})}),bt.caption&&bt.caption.length>0&&/* @__PURE__ */v("div",{className:"bg-background bg-opacity-75 absolute bottom-0 w-full p-2",children:/* @__PURE__ */v(f,{variant:"body3",lines:2,children:bt.caption})}),V[1]?.url&&/* @__PURE__ */v("link",{rel:"preload",as:"image",href:V[1].url})]}),/* @__PURE__ */v("div",{className:"px-2 md:px-4",children:[!j&&ut?.map(t=>/* @__PURE__ */v(Jt,{parameter:t,selected:tt[t._id],onChange:e=>Lt(t._id,e)},t._id)),_t&&ut&&ut.length>0&&/* @__PURE__ */v(f,{variant:"h5",color:"error",children:_t}),j&&ut&&ut.length>0&&/* @__PURE__ */v("div",{className:"sm:pt-16",children:/* @__PURE__ */v(f,{variant:"h5",color:"error",align:"center",children:j})}),ut&&ut.length>0&&/* @__PURE__ */v(E,{type:"button",color:"primary",className:"mt-4 w-full",disabled:it,loading:it,icon:/* @__PURE__ */v(_,{className:"size-5"}),onClick:Mt,children:j?D("curate.button.rate_next_image","Rate Next Image"):it?D("curate.button.rating","Rating..."):D("curate.button.submit","Submit Rating")})]})]}),
|
|
92
|
+
/* @__PURE__ */v("div",{className:"mt-16",children:/* @__PURE__ */v(b,{to:i.GALLERY(l??""),state:{internalNavigation:!0},children:/* @__PURE__ */v(f,{color:"primary",variant:"h5",align:"center",children:D("curate.button_goto_gallery","Back to Gallery")})})})]}),
|
|
93
|
+
/* @__PURE__ */v(R,{open:Boolean(rt),onOpenChange:t=>!t&&xt(),children:/* @__PURE__ */v(P,{children:[/* @__PURE__ */v(O,{className:"sr-only",children:[/* @__PURE__ */v(N,{children:[ct?.pointName,": ",(X?.upload??0)+(X?.curate??0)]}),/* @__PURE__ */v(T,{children:D("curate.dialog_description","Rating submitted")})]}),/* @__PURE__ */v("div",{className:"w-full space-y-3 px-3 pb-6 md:px-6",children:[/* @__PURE__ */v(Ht,{feedback:rt}),/* @__PURE__ */v(E,{fullWidth:!0,color:"primary",onClick:xt,children:D("curate.button_continue","Continue")})]})]})})]})})};export{$t as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Zt as c,kt as e,
|
|
1
|
+
import{Zt as c,kt as e,un as l}from"./BhYfK52W.js";var a={bing:{id:"bing",label:"Bing",policyUrl:"https://privacy.microsoft.com/en-us/privacystatement",buildUrl:c=>`https://www.bing.com/images/search?view=detailv2&iss=sbi&form=SBIVSP&sbisrc=UrlPaste&q=imgurl:${encodeURIComponent(c)}`},google:{id:"google",label:"Google Lens",policyUrl:"https://policies.google.com/privacy",buildUrl:c=>`https://lens.google.com/uploadbyurl?url=${encodeURIComponent(c)}`},yandex:{id:"yandex",label:"Yandex",policyUrl:"https://yandex.com/legal/confidential/",buildUrl:c=>`https://yandex.com/images/search?rpt=imageview&url=${encodeURIComponent(c)}`},tineye:{id:"tineye",label:"TinEye",policyUrl:"https://tineye.com/privacy",buildUrl:c=>`https://tineye.com/search?url=${encodeURIComponent(c)}`}},i=Object.keys(a);function t(c){return i.includes(c)}var o=[],n={bing:function({className:c}){/* @__PURE__ */
|
|
2
2
|
return l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 388",className:c,children:[
|
|
3
3
|
/* @__PURE__ */l("defs",{children:[
|
|
4
4
|
/* @__PURE__ */l("radialGradient",{id:"bingIconGradA",cx:"93.717%",cy:"77.818%",r:"143.121%",fx:"93.717%",fy:"77.818%",gradientTransform:"matrix(-.65486 -.5438 .75575 -.4712 .963 1.654)",children:[/* @__PURE__ */l("stop",{offset:"0%","stop-color":"#00cacc"}),/* @__PURE__ */l("stop",{offset:"100%","stop-color":"#048fce"})]}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{un as t}from"./BhYfK52W.js";function e({className:e}){/* @__PURE__ */
|
|
2
2
|
return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */t("path",{fill:"currentColor",d:"M12.713 16.713Q13 16.425 13 16t-.288-.712T12 15t-.712.288T11 16t.288.713T12 17t.713-.288m0-4Q13 12.425 13 12V8q0-.425-.288-.712T12 7t-.712.288T11 8v4q0 .425.288.713T12 13t.713-.288M12 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 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22"})})}export{e as t};
|