@qratilabs/qrati-connect 2.24.0 → 2.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{t as a}from"./DrrpB4Om.js";import{D as t,n as s}from"./CaX2xgrP.js";import{i as e,n as r,u as o}from"./ChJXhA9c.js";import{t as i}from"./DF0LxcV7.js";import{t as n}from"./DGbyGc8b.js";import{t as l}from"./DGGc10Cy.js";import{n as m,t as c}from"./Bb7nx5xF.js";import{t as g}from"./C3dOFk9A.js";import{t as d}from"./CM46vluW.js";import{t as p}from"./DnQ6XaLR.js";var f=()=>{const f=o(),{organization:v,props:h}=s(),u=h?.organizationId,{loading:N,event:j}=d({eventSlug:f.eventSlug});if(N)/* @__PURE__ */return a("div",{children:[
1
+ import{t as a}from"./DrrpB4Om.js";import{D as t,n as s}from"./CaX2xgrP.js";import{i as e,n as r,u as o}from"./ChJXhA9c.js";import{t as i}from"./DF0LxcV7.js";import{t as n}from"./DGbyGc8b.js";import{t as l}from"./DGGc10Cy.js";import{n as m,t as c}from"./BxErY-nv.js";import{t as g}from"./C3dOFk9A.js";import{t as d}from"./CM46vluW.js";import{t as p}from"./DnQ6XaLR.js";var f=()=>{const f=o(),{organization:v,props:h}=s(),u=h?.organizationId,{loading:N,event:j}=d({eventSlug:f.eventSlug});if(N)/* @__PURE__ */return a("div",{children:[
2
2
  /* @__PURE__ */a(n,{className:"mx-auto mt-4 h-8 w-64"}),
3
3
  /* @__PURE__ */a(n,{className:"mx-auto mt-6 h-6 w-72"}),
4
4
  /* @__PURE__ */a(n,{className:"mx-auto mt-6 h-8 w-72"}),
@@ -0,0 +1,7 @@
1
+ import{t,w as e}from"./DrrpB4Om.js";import{D as n,n as a}from"./CaX2xgrP.js";import{c as r,l as i,t as s}from"./ChJXhA9c.js";import{t as o}from"./CATr-3VW.js";import{t as l}from"./DGbyGc8b.js";import{n as c}from"./DGGc10Cy.js";import{t as m}from"./C3dOFk9A.js";import{t as d}from"./D35mTuTT.js";function h({className:e}){/* @__PURE__ */
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:"M5 21q-.825 0-1.412-.587T3 19v-3q0-.425.288-.712T4 15t.713.288T5 16v3h14V5H5v3q0 .425-.288.713T4 9t-.712-.288T3 8V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm6.65-8H4q-.425 0-.712-.288T3 12t.288-.712T4 11h7.65L9.8 9.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.312t.712.287L14.8 11.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-3.575 3.575q-.3.3-.712.288T9.8 16.25q-.275-.3-.288-.7t.288-.7z"})})}var u=()=>{const{t:e}=c(),d=r(),u=i(),{initializing:g,organization:p,loadingUser:v,user:f,signout:N}=a();/* @__PURE__ */
3
+ return t("div",g||v?{className:"my-2 flex justify-end",children:/* @__PURE__ */t(l,{className:"h-9 w-64"})}:{className:"mx-auto mb-4",children:[!f&&/* @__PURE__ */t("div",{className:"flex justify-end gap-4",children:/* @__PURE__ */t(s,{to:`${n.LOGIN}?ref=${encodeURIComponent(d.pathname)}`,children:/* @__PURE__ */t(m,{children:e("button.login","Login")})})}),f&&/* @__PURE__ */t("div",{className:"mt-2 flex items-center justify-end gap-4",children:[/* @__PURE__ */t(o,{variant:"h5",children:f.name}),!p?.customAuth&&/* @__PURE__ */t("button",{onClick:async()=>{await N(),u(n.PUBLIC_EVENTS)},children:/* @__PURE__ */t(h,{className:"text-destructive"})})]})]})},g=()=>{const{user:r,organization:l,signout:c}=a(),m=i(),h=l?.integrationSettings?.hideQratiBranding;/* @__PURE__ */
4
+ return t("div",{className:"pt-16 sm:pt-24",children:[l&&/* @__PURE__ */t("div",{className:"mx-auto py-2",children:l.customAuth?r&&/* @__PURE__ */t(o,{variant:"h6",align:"center",children:r.name}):/* @__PURE__ */t(e,{children:[!r&&/* @__PURE__ */t(o,{variant:"h6",align:"center",children:[
5
+ /* @__PURE__ */t(s,{className:"text-primary hover:underline",to:n.LOGIN,children:"Login"})," ","•"," ",
6
+ /* @__PURE__ */t(s,{className:"text-primary hover:underline",to:n.REGISTER,children:"Register"})]}),r&&/* @__PURE__ */t(o,{variant:"h6",align:"center",children:[r.name," •"," ",
7
+ /* @__PURE__ */t("button",{type:"button",className:"text-destructive cursor-pointer border-none bg-transparent p-0 hover:underline",onClick:async()=>{await c(),m(n.PUBLIC_EVENTS)},children:"Logout"})]})]})}),!h&&/* @__PURE__ */t(d,{})]})};export{u as n,g as t};
package/element/web.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import{C as t,_ as r,d as a,f as o,h as e,p as i,s as n,t as s,v as l,w as c,x as d}from"./DrrpB4Om.js";import{D as p,I as g,N as m,P as h,m as v,n as b,s as f,t as u,u as w,x as y,y as x}from"./CaX2xgrP.js";import{t as k}from"./BZu3c37u.js";import{a as _,c as T,o as z,r as N,s as q,t as C,u as j}from"./ChJXhA9c.js";import{t as I}from"./CATr-3VW.js";import{a as E,c as S,i as L,l as M,n as O,o as A,r as R,s as U,t as D,u as Y}from"./DdOwRfWG.js";import{t as F}from"./DF0LxcV7.js";import{t as P}from"./DGbyGc8b.js";import{n as V,t as B}from"./Bb7nx5xF.js";import{t as G}from"./Rcen6i0h.js";import{t as $}from"./LYboLIEU.js";import{t as H}from"./CAETItHr.js";import{n as Q,r as X,t as K}from"./BOqkzZ92.js";import{t as Z}from"./CVRTTCyF.js";var W=class extends d{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t){this.props.onError?.(t);try{const r=this.base;(r instanceof Element?r:r?.parentElement||null)?.dispatchEvent(new CustomEvent("qrati-error",{detail:{error:t},bubbles:!0,composed:!0}))}catch{}}render(){return this.state.hasError?this.props.fallback??null:this.props.children}},J=()=>{const t=T(),{props:a,sessionId:e}=b(),i=a?.organizationId,n=o([]),s=o(null),c=o(null),d=o(!1),p=o(!0),g=async t=>{if(e&&t.length)try{await m.post(w.UPDATE_SESSION,{headers:{"x-org-id":i},json:{sessionId:e,pageViews:t}})}catch(r){console.error("Failed to send page views:",r)}},h=l(()=>{if(d.current)return null;d.current=!0;const t=Date.now();if(s.current&&c.current){if(t-c.current<100)return d.current=!1,null;const r={page:s.current,entryTime:c.current,exitTime:t},a=[...n.current,r];return a.length>=5?(g(a),n.current=[]):n.current=a,d.current=!1,r}return d.current=!1,null},[]),v=l(t=>{s.current!==t&&(h(),s.current=t,c.current=Date.now())},[h]);return r(()=>{if(p.current)return p.current=!1,s.current=t.pathname,void(c.current=Date.now());const r=document.getElementById("qrati-connect-container");r&&r.scrollIntoView({behavior:"smooth",block:"start"}),v(t.pathname)},[t.pathname,v]),r(()=>{const t=()=>{const t=h();if(t){const a=[...n.current,t];if(a.length>0)try{try{const t={"Content-Type":"application/json"};i&&(t["x-org-id"]=i),fetch(w.UPDATE_SESSION,{method:"POST",headers:t,body:JSON.stringify({sessionId:e,pageViews:a}),keepalive:!0})}catch(r){console.error("Failed to send final page views with fetch keepalive:",r),g(a)}}catch(r){console.error("Failed to send final page views:",r),g(a)}}};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t);const r=h(),a=r?[...n.current,r]:n.current;a.length>0&&g(a)}},[h,e]),null},tt=(t=[],r)=>{const a=/* @__PURE__ */new Map;t?.forEach(t=>{a.set(t._id,t)});const o=[];let e=a.get(r);for(;e;)o.unshift({_id:e._id,name:e.name,href:p.FOLDER_EVENTS(e?._id),color:e.color}),e=a.get(e.parentFolderId);return o};function rt({className:t}){/* @__PURE__ */
1
+ import{C as t,_ as r,d as a,f as o,h as e,p as i,s as n,t as s,v as l,w as c,x as d}from"./DrrpB4Om.js";import{D as p,I as g,N as m,P as h,m as v,n as b,s as f,t as u,u as w,x as y,y as x}from"./CaX2xgrP.js";import{t as k}from"./BZu3c37u.js";import{a as _,c as T,o as z,r as N,s as q,t as C,u as j}from"./ChJXhA9c.js";import{t as I}from"./CATr-3VW.js";import{a as E,c as S,i as L,l as M,n as O,o as A,r as R,s as U,t as D,u as Y}from"./DdOwRfWG.js";import{t as F}from"./DF0LxcV7.js";import{t as P}from"./DGbyGc8b.js";import{n as V,t as B}from"./BxErY-nv.js";import{t as G}from"./Rcen6i0h.js";import{t as $}from"./LYboLIEU.js";import{t as H}from"./CAETItHr.js";import{n as Q,r as X,t as K}from"./BOqkzZ92.js";import{t as Z}from"./CVRTTCyF.js";var W=class extends d{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t){this.props.onError?.(t);try{const r=this.base;(r instanceof Element?r:r?.parentElement||null)?.dispatchEvent(new CustomEvent("qrati-error",{detail:{error:t},bubbles:!0,composed:!0}))}catch{}}render(){return this.state.hasError?this.props.fallback??null:this.props.children}},J=()=>{const t=T(),{props:a,sessionId:e}=b(),i=a?.organizationId,n=o([]),s=o(null),c=o(null),d=o(!1),p=o(!0),g=async t=>{if(e&&t.length)try{await m.post(w.UPDATE_SESSION,{headers:{"x-org-id":i},json:{sessionId:e,pageViews:t}})}catch(r){console.error("Failed to send page views:",r)}},h=l(()=>{if(d.current)return null;d.current=!0;const t=Date.now();if(s.current&&c.current){if(t-c.current<100)return d.current=!1,null;const r={page:s.current,entryTime:c.current,exitTime:t},a=[...n.current,r];return a.length>=5?(g(a),n.current=[]):n.current=a,d.current=!1,r}return d.current=!1,null},[]),v=l(t=>{s.current!==t&&(h(),s.current=t,c.current=Date.now())},[h]);return r(()=>{if(p.current)return p.current=!1,s.current=t.pathname,void(c.current=Date.now());const r=document.getElementById("qrati-connect-container");r&&r.scrollIntoView({behavior:"smooth",block:"start"}),v(t.pathname)},[t.pathname,v]),r(()=>{const t=()=>{const t=h();if(t){const a=[...n.current,t];if(a.length>0)try{try{const t={"Content-Type":"application/json"};i&&(t["x-org-id"]=i),fetch(w.UPDATE_SESSION,{method:"POST",headers:t,body:JSON.stringify({sessionId:e,pageViews:a}),keepalive:!0})}catch(r){console.error("Failed to send final page views with fetch keepalive:",r),g(a)}}catch(r){console.error("Failed to send final page views:",r),g(a)}}};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t);const r=h(),a=r?[...n.current,r]:n.current;a.length>0&&g(a)}},[h,e]),null},tt=(t=[],r)=>{const a=/* @__PURE__ */new Map;t?.forEach(t=>{a.set(t._id,t)});const o=[];let e=a.get(r);for(;e;)o.unshift({_id:e._id,name:e.name,href:p.FOLDER_EVENTS(e?._id),color:e.color}),e=a.get(e.parentFolderId);return o};function rt({className:t}){/* @__PURE__ */
2
2
  return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M3 19q-.825 0-1.412-.587T1 17V7q0-.825.588-1.412T3 5h10q.825 0 1.413.588T15 7v10q0 .825-.587 1.413T13 19zm15-8q-.425 0-.712-.288T17 10V6q0-.425.288-.712T18 5h4q.425 0 .713.288T23 6v4q0 .425-.288.713T22 11zm1-2h2V7h-2zM3 17h10V7H3zm2-2h6q.3 0 .45-.275t-.05-.525l-1.625-2.175q-.15-.2-.4-.2t-.4.2L7.5 14l-.975-1.3q-.15-.2-.4-.2t-.4.2L4.6 14.2q-.2.25-.05.525T5 15m13 4q-.425 0-.712-.288T17 18v-4q0-.425.288-.712T18 13h4q.425 0 .713.288T23 14v4q0 .425-.288.713T22 19zm1-2h2v-2h-2zM3 17V7zm16-8V7zm0 8v-2z"})})}var at=({event:t})=>{const{organization:r}=b(),a=i(()=>t?.contents&&0!==t.contents.length?[...t.contents].sort((t,r)=>{const a=(r.score||0)-(t.score||0);return 0!==a?a:(t.thumbnailUrl||"").localeCompare(r.thumbnailUrl||"")}):[],[t?.contents]),o=r?.advancedSettings?.defaultCoverImageUrl,e=r?.advancedSettings?.defaultCoverBlurHash;let n,l;t?.coverImageUrl?(n=t.coverImageUrl,l=t.coverBlurHash):a[0]?(n=a[0].thumbnailUrl||a[0].url,l=a[0].blurHash):o&&(n=o,l=e);const c=t?.status?.toUpperCase(),d=!r?.integrationSettings?.hideEventStatus&&c&&c!==x.CLOSED;/* @__PURE__ */
3
3
  return s("div",{className:"space-y-3",children:[/* @__PURE__ */s("div",{className:"relative h-72 overflow-hidden rounded sm:h-80",children:[n?/* @__PURE__ */s($,{wrapperClassName:"size-full sm:hover:scale-105 sm:transition-transform",src:n,blurhash:l||void 0}):/* @__PURE__ */s("div",{className:"flex size-full items-center justify-center bg-muted",children:/* @__PURE__ */s(rt,{className:"size-16 text-white"})}),d&&/* @__PURE__ */s("div",{className:"absolute top-3 left-3",children:c===x.OPEN?/* @__PURE__ */s("span",{className:"bg-success inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-xs font-medium text-white",children:[/* @__PURE__ */s("div",{className:"size-2 animate-pulse rounded-full bg-white"}),"Open"]}):/* @__PURE__ */s("span",{className:"bg-warning inline-flex items-center rounded-full px-3 py-1.5 text-xs font-semibold text-white",children:"Upcoming"})})]}),/* @__PURE__ */s("div",{className:"px-3 sm:px-0",children:[/* @__PURE__ */s(I,{variant:"h5",immutable:!0,lines:2,children:t.name}),t.description&&/* @__PURE__ */s(I,{variant:"body2",immutable:!0,lines:1,color:"muted",children:t.description})]})]})};function ot({className:t}){/* @__PURE__ */
4
4
  return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M6 19h3v-5q0-.425.288-.712T10 13h4q.425 0 .713.288T15 14v5h3v-9l-6-4.5L6 10zm-2 0v-9q0-.475.213-.9t.587-.7l6-4.5q.525-.4 1.2-.4t1.2.4l6 4.5q.375.275.588.7T20 10v9q0 .825-.588 1.413T18 21h-4q-.425 0-.712-.288T13 20v-5h-2v5q0 .425-.288.713T10 21H6q-.825 0-1.412-.587T4 19m8-6.75"})})}function et({className:t}){/* @__PURE__ */
@@ -28,7 +28,7 @@ return s("div",{className:"space-y-4",children:[t===b[0]&&/* @__PURE__ */s(I,{va
28
28
  /* @__PURE__ */s("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-3",children:Array.from({length:6}).map((t,r)=>/* @__PURE__ */s("div",{className:"space-y-4",children:[/* @__PURE__ */s(P,{className:"h-72 overflow-hidden rounded sm:h-80"}),/* @__PURE__ */s(P,{className:"h-6 w-64 rounded"})]},r))})]})]}:{children:[g?.navigationSettings?.enableNavbar&&/* @__PURE__ */s(V,{}),
29
29
  /* @__PURE__ */s("div",{className:"min-h-screen w-full",children:[
30
30
  /* @__PURE__ */s("div",{className:"flex items-end justify-between",children:[/* @__PURE__ */s("div",{className:"mt-4 flex justify-end",children:y&&/* @__PURE__ */s(Y,{className:"flex-1 lg:flex-none",selected:x,buttons:yt,onChange:t=>(t=>{k(t);try{v&&sessionStorage.setItem(`qrati-view-mode-${v}`,t)}catch(r){}})(t)})}),/* @__PURE__ */s("div",{className:"flex flex-col items-end gap-4",children:[/* @__PURE__ */s(dt,{organization:g}),f&&/* @__PURE__ */s(gt,{onSearch:u.handleSearch,onClear:u.clearSearch,hasActiveSearch:u.isSearchActive})]})]}),u.isSearchActive&&/* @__PURE__ */s(ft,{folders:d||[],submittedQuery:u.submittedQuery,submittedSearchType:u.submittedSearchType,isLoading:u.isLoading,errorMessage:u.errorMessage,hasMore:u.hasMore,isSearchActive:u.isSearchActive,page:u.page,onLoadMore:()=>u.setPage(t=>t+1),eventResults:u.eventResults,contentResults:u.contentResults,contentMeta:u.contentMeta,activeFolderKeys:u.activeFolderKeys,eventGroupsByFolder:u.eventGroupsByFolder,contentGroups:u.contentGroups,contentGroupsByFolder:u.contentGroupsByFolder,flattenedContentMedia:u.flattenedContentMedia,galleryElementRef:u.galleryElementRef,galleryId:u.galleryId,openMediaInLightbox:u.openMediaInLightbox}),!u.isSearchActive&&/* @__PURE__ */s(c,{children:["grid"===x&&t&&/* @__PURE__ */s("div",{className:"mt-4",children:/* @__PURE__ */s(nt,{homeLink:p.PUBLIC_EVENTS,data:I})}),"grid"===x&&q.length>0&&/* @__PURE__ */s("div",{className:"mt-4 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-4 lg:gap-6",children:q.map(t=>/* @__PURE__ */s(C,{to:p.FOLDER_EVENTS(String(t?._id)),children:/* @__PURE__ */s(st,{folder:t},String(t._id))},String(t?._id)))}),"map"!==x&&(S?.length??0)<=0&&/* @__PURE__ */s("div",{className:"min-h-[80vh]",children:/* @__PURE__ */s(F,{title:((d??[]).length??0)>0?"Empty Folder":"No Events",description:((d??[]).length??0)>0?"Browse other folders for events":"Check back later for our awesome events!",className:"mt-24 md:mt-36",iconSvg:/* @__PURE__ */s(G,{})})}),"map"===x&&y?/* @__PURE__ */s(n,{fallback:/* @__PURE__ */s(P,{className:"mt-4 h-[70vh] w-full rounded-lg"}),children:/* @__PURE__ */s(ut,{events:_??[],isLoading:T})}):(S?.length??0)>0&&/* @__PURE__ */s("div",{className:"mt-4 grid grid-cols-1 gap-4 gap-y-6 pb-16 sm:grid-cols-2 lg:grid-cols-3",children:(S??[]).map(t=>/* @__PURE__ */s(C,{to:p.GALLERY(String(t.slug)),children:/* @__PURE__ */s(at,{event:t})},t._id))})]})]}),
31
- /* @__PURE__ */s(B,{})]})},kt=a(()=>import("./DWBbTgnB.js")),_t=a(()=>import("./BOQzjiMV.js")),Tt=a(()=>import("./Bow6F3212.js")),zt=a(()=>import("./Bh8kXbe92.js")),Nt=a(()=>import("./Z0-Tddye2.js")),qt=a(()=>import("./mIANlVHi2.js")),Ct=a(()=>import("./CLdpUOLk2.js")),jt=a(()=>import("./CWhnvMey2.js")),It=a(()=>import("./DtRwaUYF2.js")),Et=a(()=>import("./BP2rYgya2.js")),St=()=>/* @__PURE__ */s("div",{className:"w-full min-h-[50vh]"}),Lt=({router:t="memory"})=>{const a="hash"===t.toLowerCase()?"hash":"memory";return r(()=>{const t=()=>{import("./Bow6F3212.js"),import("./Bh8kXbe92.js"),import("./DtRwaUYF2.js"),import("./mIANlVHi2.js")};if("undefined"!=typeof requestIdleCallback){const r=requestIdleCallback(t,{timeout:5e3});return()=>cancelIdleCallback(r)}const r=setTimeout(t,2e3);return()=>clearTimeout(r)},[]),/* @__PURE__ */s(z,{mode:a,children:[/* @__PURE__ */s(J,{}),/* @__PURE__ */s(n,{fallback:/* @__PURE__ */s(St,{}),children:/* @__PURE__ */s(q,{children:[
31
+ /* @__PURE__ */s(B,{})]})},kt=a(()=>import("./DWBbTgnB.js")),_t=a(()=>import("./BDrHm_qM.js")),Tt=a(()=>import("./Bow6F3212.js")),zt=a(()=>import("./Bh8kXbe92.js")),Nt=a(()=>import("./Z0-Tddye2.js")),qt=a(()=>import("./mIANlVHi2.js")),Ct=a(()=>import("./CLdpUOLk2.js")),jt=a(()=>import("./CWhnvMey2.js")),It=a(()=>import("./DtRwaUYF2.js")),Et=a(()=>import("./BP2rYgya2.js")),St=()=>/* @__PURE__ */s("div",{className:"w-full min-h-[50vh]"}),Lt=({router:t="memory"})=>{const a="hash"===t.toLowerCase()?"hash":"memory";return r(()=>{const t=()=>{import("./Bow6F3212.js"),import("./Bh8kXbe92.js"),import("./DtRwaUYF2.js"),import("./mIANlVHi2.js")};if("undefined"!=typeof requestIdleCallback){const r=requestIdleCallback(t,{timeout:5e3});return()=>cancelIdleCallback(r)}const r=setTimeout(t,2e3);return()=>clearTimeout(r)},[]),/* @__PURE__ */s(z,{mode:a,children:[/* @__PURE__ */s(J,{}),/* @__PURE__ */s(n,{fallback:/* @__PURE__ */s(St,{}),children:/* @__PURE__ */s(q,{children:[
32
32
  /* @__PURE__ */s(_,{path:"/my-uploads",element:Et}),
33
33
  /* @__PURE__ */s(_,{path:"/:folderId?",element:xt}),
34
34
  /* @__PURE__ */s(_,{path:"/event/:eventSlug",element:_t,children:[
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qratilabs/qrati-connect",
3
- "version": "2.24.0",
3
+ "version": "2.24.1",
4
4
  "description": "Qrati Connect - Preact-based embeddable SDK with React wrapper",
5
5
  "author": "Qrati Labs",
6
6
  "license": "UNLICENSED",
@@ -1,9 +0,0 @@
1
- import{t as e,w as t}from"./DrrpB4Om.js";import{D as n,n as a}from"./CaX2xgrP.js";import{c as r,l as i,t as s}from"./ChJXhA9c.js";import{t as o}from"./CATr-3VW.js";import{t as l}from"./DGbyGc8b.js";import{n as c}from"./DGGc10Cy.js";import{t as m}from"./C3dOFk9A.js";import{t as d}from"./D35mTuTT.js";function h({className:t}){/* @__PURE__ */
2
- return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19v-3q0-.425.288-.712T4 15t.713.288T5 16v3h14V5H5v3q0 .425-.288.713T4 9t-.712-.288T3 8V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm6.65-8H4q-.425 0-.712-.288T3 12t.288-.712T4 11h7.65L9.8 9.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.312t.712.287L14.8 11.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-3.575 3.575q-.3.3-.712.288T9.8 16.25q-.275-.3-.288-.7t.288-.7z"})})}var u=()=>{const{t:t}=c(),d=r(),u=i(),{initializing:p,organization:g,loadingUser:v,user:f,signout:N}=a();/* @__PURE__ */
3
- return e("div",p||v?{className:"my-2 flex justify-end",children:/* @__PURE__ */e(l,{className:"h-9 w-64"})}:{className:"mx-auto mb-4",children:[!f&&/* @__PURE__ */e("div",{className:"flex justify-end gap-4",children:/* @__PURE__ */e(s,{to:`${n.LOGIN}?ref=${encodeURIComponent(d.pathname)}`,children:/* @__PURE__ */e(m,{children:t("button.login","Login")})})}),f&&/* @__PURE__ */e("div",{className:"mt-2 flex items-center justify-end gap-4",children:[/* @__PURE__ */e(o,{variant:"h5",children:f.name}),!g?.customAuth&&/* @__PURE__ */e("button",{onClick:async()=>{await N(),u(n.PUBLIC_EVENTS)},children:/* @__PURE__ */e(h,{className:"text-destructive"})})]})]})},p=()=>{const{user:r,organization:l,signout:c}=a(),m=i(),h=l?.integrationSettings?.hideQratiBranding;/* @__PURE__ */
4
- return e("div",{className:"pt-16 sm:pt-24",children:[l&&/* @__PURE__ */e("div",{className:"mx-auto py-2",children:l.customAuth?r&&/* @__PURE__ */e(o,{variant:"h6",align:"center",children:[r.name,"•"," ",
5
- /* @__PURE__ */e(s,{className:"hover:underline",to:n.MY_UPLOADS,children:"My Uploads"})]}):/* @__PURE__ */e(t,{children:[!r&&/* @__PURE__ */e(o,{variant:"h6",align:"center",children:[
6
- /* @__PURE__ */e(s,{className:"text-primary hover:underline",to:n.LOGIN,children:"Login"})," ","•"," ",
7
- /* @__PURE__ */e(s,{className:"text-primary hover:underline",to:n.REGISTER,children:"Register"})]}),r&&/* @__PURE__ */e(o,{variant:"h6",align:"center",children:[r.name," •"," ",
8
- /* @__PURE__ */e(s,{className:"hover:underline",to:n.MY_UPLOADS,children:"My Uploads"})," ","•"," ",
9
- /* @__PURE__ */e("button",{type:"button",className:"text-destructive cursor-pointer border-none bg-transparent p-0 hover:underline",onClick:async()=>{await c(),m(n.PUBLIC_EVENTS)},children:"Logout"})]})]})}),!h&&/* @__PURE__ */e(d,{})]})};export{u as n,p as t};