@qratilabs/qrati-connect 2.28.0 → 2.29.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/2ckymssm.js +17 -0
- package/element/{F4i1Y9K7.js → 7Qigk19C.js} +1 -1
- package/element/{DtcmI8yd2.js → B6oxk_Qj2.js} +1 -1
- package/element/{CbTft8Na.js → BDTXukZ_.js} +1 -1
- package/element/BGubuyYi.js +2 -0
- package/element/{BB90a5r62.js → BW-Phbmr2.js} +4 -4
- package/element/Bb9ydqSB.js +1 -0
- package/element/{B01ceTPt.js → Botz-oQY.js} +1 -1
- package/element/{7zeKIiiL.js → BqXNdaJq.js} +1 -1
- package/element/C-J1EE4W.js +7 -0
- package/element/{CgaiV8EU.js → C9l3wVoY.js} +4 -4
- package/element/{JFF45CMp.js → CJRbcuSg.js} +1 -1
- package/element/CWmyXqt5.js +7 -0
- package/element/{CrF08YS6.js → C_SEq15E.js} +1 -1
- package/element/C_ZPqbKe.js +1 -0
- package/element/{3uWxzKri.js → CaYxRUfL.js} +86 -87
- package/element/{BMibcq6T.js → Cens8AWt.js} +1 -1
- package/element/{5z04gCoQ2.js → CkExnaGY2.js} +2 -2
- package/element/{BeUiRRWZ2.js → Cn3UbUp82.js} +16 -16
- package/element/{Da7cHmvl.js → Cq_SerdP.js} +3 -3
- package/element/Cqkksoxi2.js +2 -0
- package/element/CxXoXd5a2.js +9 -0
- package/element/{D34k0bDj2.js → D20MYAFc2.js} +1 -1
- package/element/{CZK4LCzr2.js → DAiDmr0n2.js} +1 -1
- package/element/{C8ixb9k4.js → DDLSkbWV.js} +1 -1
- package/element/{CfTxXwtG2.js → DDxUnIxq2.js} +10 -10
- package/element/DLGISV0I2.js +5 -0
- package/element/DLZ2_ufP.js +8 -0
- package/element/{BhOaopIk2.js → DNBsQPFm2.js} +3 -3
- package/element/{DZwpw1jG.js → DOGRuglQ.js} +1 -1
- package/element/{KdgQ7jUn.js → DS4kxd-M.js} +1 -1
- package/element/{CKwlnGWW2.js → DZy5yLMr2.js} +1 -1
- package/element/DdObkiX2.js +1 -0
- package/element/{BHmNrbtm2.js → DeK1vU3V2.js} +1 -1
- package/element/Dj_EJxLA.js +5 -0
- package/element/Dm8Fvxp7.js +2 -0
- package/element/{BL2ZRdn9.js → DqjsH4hD.js} +1 -1
- package/element/{C6et9sp52.js → DuWwPOwC2.js} +1 -1
- package/element/{CxJgMv2R.js → DxyGHoKK.js} +1 -1
- package/element/{DBlhTxUx2.js → MiqVgN0c2.js} +4 -4
- package/element/{BIibcFd-.js → RMLGjMvY.js} +4 -5
- package/element/{CtApMHPf.js → RY2ymKgG.js} +1 -1
- package/element/{CMYKP_Yn.js → e3AdRaT8.js} +1 -1
- package/element/{tJ2MS5HS.js → f4E4mY0G.js} +41 -41
- package/element/web.es.js +41 -40
- package/package.json +1 -1
- package/element/2PuRbItp.js +0 -8
- package/element/B7YFs6p5.js +0 -1
- package/element/BcAwTWQC.js +0 -5
- package/element/C6ph3KPL.js +0 -5
- package/element/Cr4OmKxk2.js +0 -2
- package/element/DUEaNsCB.js +0 -1
- package/element/DUWOb-5c.js +0 -1
- package/element/DlNQukHq.js +0 -3
- package/element/DmVgPRH5.js +0 -14
- package/element/cePYhOkN2.js +0 -5
- package/element/hiapcVVA2.js +0 -5
- package/element/vA5CQmOb2.js +0 -9
- /package/element/{DGGc10Cy.js → DGGc10Cy2.js} +0 -0
package/package.json
CHANGED
package/element/2PuRbItp.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{h as a,t as s}from"./DrrpB4Om.js";import{n as o}from"./tJ2MS5HS.js";import{x as e}from"./DUWOb-5c.js";import{c as r,t as l}from"./BcAwTWQC.js";import{t as i}from"./DZwpw1jG.js";import{n as t}from"./DGGc10Cy.js";import{t as n}from"./5z04gCoQ2.js";import{a as d,i as m,o as p,r as c,s as w,t as g}from"./C6et9sp52.js";import{n as h,r as f,t as u}from"./DlRUi0u42.js";var P=()=>{const{t:P}=t(),[b,v]=a(""),[C,y]=a(""),[N,j]=a(""),[x,k]=a(""),[z,A]=a(""),[S,F]=a(null),[L,E]=a({}),[O,R]=a(!1),[W,D]=a({google:!1,apple:!1}),[G,H]=a({showPassword:!1,showConfirmPassword:!1}),I=r(),{registerUsingEmail:U,loginWithGoogle:B,loginWithApple:T}=o(),V=a=>{E(s=>s[a]?{...s,[a]:void 0}:s)},X=async(a,s)=>{D(s=>({...s,[a]:!0})),F(null);try{await(s?.())}catch(o){o instanceof Error?F(o.message):F(`Failed to sign up with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{D(s=>({...s,[a]:!1}))}};/* @__PURE__ */
|
|
2
|
-
return s("div",{className:"bg-background w-full space-y-8",children:[/* @__PURE__ */s("form",{noValidate:!0,onSubmit:async a=>{a.preventDefault();const s=d(b),o=p(C),e=m(N),r=w(x),l=c(z,x);if(s||o||e||r||l)return void E({fname:s,lname:o,email:e,password:r,confirmPassword:l});E({}),R(!0),F(null);const i=await(U?.(N.toLowerCase(),x,b,C));i?.error&&F(i.error),R(!1)},className:"space-y-4",children:[
|
|
3
|
-
/* @__PURE__ */s("div",{className:"grid grid-cols-2 gap-4",children:[/* @__PURE__ */s(g,{label:P("auth.firstName","First name"),name:"fname",disabled:O,type:"text",value:b,onChange:a=>{v(a.target.value),V("fname")},error:L.fname}),/* @__PURE__ */s(g,{label:P("auth.lastName","Last name"),name:"lname",disabled:O,type:"text",value:C,onChange:a=>{y(a.target.value),V("lname")},error:L.lname})]}),
|
|
4
|
-
/* @__PURE__ */s(g,{label:P("auth.email","Email address"),name:"email",disabled:O,type:"email",value:N,onChange:a=>{j(a.target.value),V("email")},autoComplete:"email",error:L.email}),
|
|
5
|
-
/* @__PURE__ */s(g,{label:P("auth.password","Password"),name:"password",disabled:O,type:G.showPassword?"text":"password",value:x,onChange:a=>{k(a.target.value),V("password")},autoComplete:"new-password",error:L.password,actionLabel:G.showPassword?"Hide password":"Show password",actionIcon:G.showPassword?/* @__PURE__ */s(u,{className:"size-5"}):/* @__PURE__ */s(h,{className:"size-5"}),onActionClick:()=>H(a=>({...a,showPassword:!a.showPassword}))}),
|
|
6
|
-
/* @__PURE__ */s(g,{label:P("auth.confirmPassword","Confirm password"),name:"confirmPassword",disabled:O,type:G.showConfirmPassword?"text":"password",value:z,onChange:a=>{A(a.target.value),V("confirmPassword")},autoComplete:"new-password",error:L.confirmPassword,actionLabel:G.showConfirmPassword?"Hide password":"Show password",actionIcon:G.showConfirmPassword?/* @__PURE__ */s(u,{className:"size-5"}):/* @__PURE__ */s(h,{className:"size-5"}),onActionClick:()=>H(a=>({...a,showConfirmPassword:!a.showConfirmPassword}))}),S&&/* @__PURE__ */s(i,{align:"center",color:"error",className:"font-medium",children:S}),
|
|
7
|
-
/* @__PURE__ */s("div",{className:"flex justify-end",children:/* @__PURE__ */s(l,{to:e.FORGOT_PASSWORD,state:{from:I.pathname},children:/* @__PURE__ */s(i,{variant:"h6",className:"w-fit",children:P("button.forgotPassword","Forgot Password?")})})}),
|
|
8
|
-
/* @__PURE__ */s(n,{type:"submit",color:"primary",className:"w-full",disabled:O,loading:O,children:P("button.register","Register")})]}),/* @__PURE__ */s("div",{className:"grid grid-cols-2 gap-2",children:[/* @__PURE__ */s(f,{disabled:O||W.google||W.apple,loading:W.google,onClick:()=>X("google",B),provider:"google"}),/* @__PURE__ */s(f,{disabled:O||W.google||W.apple,loading:W.apple,onClick:()=>X("apple",T),provider:"apple"})]})]})};export{P as default};
|
package/element/B7YFs6p5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,d as t,m as r,p as s}from"./tJ2MS5HS.js";var i=class extends t{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:i}=e,a=super.createResult(e,t),{isFetching:c,isRefetching:h,isError:o,isRefetchError:n}=a,P=i.fetchMeta?.fetchMore?.direction,g=o&&"forward"===P,u=c&&"forward"===P,f=o&&"backward"===P,d=c&&"backward"===P;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:s(t,i.data),hasPreviousPage:r(t,i.data),isFetchNextPageError:g,isFetchingNextPage:u,isFetchPreviousPageError:f,isFetchingPreviousPage:d,isRefetchError:n&&!g&&!f,isRefetching:h&&!u&&!d}}};function a(t,r){return e(t,i,r)}var c=e=>e?.meta?.currentPage>1?e.meta.currentPage-1:void 0,h=e=>e?.meta?.currentPage<e?.meta?.totalPages?e.meta.currentPage+1:void 0;export{c as n,a as r,h as t};
|
package/element/BcAwTWQC.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{E as t,S as e,_ as n,f as s,h as r,p as i,t as a,v as o,w as l,y as c}from"./DrrpB4Om.js";import{i as u}from"./tJ2MS5HS.js";var h=t(null),p=t(null),d=class{entries;index=0;listeners=/* @__PURE__ */new Set;constructor(t="/"){this.entries=[{path:t}]}get location(){return this.entries[this.index]?.path??"/"}get state(){return this.entries[this.index]?.state}push(t,e){this.entries=this.entries.slice(0,this.index+1),this.index=this.entries.push({path:t,state:e})-1,this.notify()}replace(t,e){this.entries[this.index]={path:t,state:e},this.notify()}go(t){const e=this.index+t;e>=0&&e<this.entries.length&&(this.index=e,this.notify())}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t(this.location))}},f=class{listeners=/* @__PURE__ */new Set;get location(){return window.location.hash.replace(/^#/,"")||"/"}get state(){return window.history.state?.__qrati_state}makeUrl(t){return`${window.location.pathname+window.location.search}#${t}`}push(t,e){window.history.pushState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}replace(t,e){window.history.replaceState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}go(t){window.history.go(t)}listen(t){this.listeners.add(t);const e=()=>this.notify();return window.addEventListener("popstate",e),window.addEventListener("hashchange",e),queueMicrotask(()=>t(this.location)),()=>{this.listeners.delete(t),window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)}}notify(){this.listeners.forEach(t=>t(this.location))}};function m(){const t=c(p);if(!t)throw new Error("useParams must be used inside a Route");return t.params}function w(){const t=c(h);if(!t)throw new Error("useNavigate must be used inside a Router");const{navigate:e,go:n}=t;return o((t,s)=>{"number"!=typeof t?e(t,s):n(t)},[e,n])}function y(){const t=c(h);if(!t)throw new Error("useLocation must be used inside a Router");return{pathname:t.location,state:t.state,search:"",hash:""}}function v(t,e,n=!0){const s=t.split("/").filter(Boolean),r=function(t){const e=[],n=t.split("/").filter(Boolean);for(const s of n)if("*"===s)e.push({type:"wildcard"});else if(s.startsWith(":")){const t=s.endsWith("?"),n=t?s.slice(1,-1):s.slice(1);e.push({type:"param",name:n,optional:t})}else e.push({type:"static",value:s});return e}(e),i={};let a=0;for(const o of r)if("static"===o.type){if(s[a]!==o.value)return null;a++}else if("param"===o.type){if(a<s.length){try{i[o.name]=decodeURIComponent(s[a])}catch{i[o.name]=s[a]}a++}else if(!o.optional)return null}else if("wildcard"===o.type){i["*"]=s.slice(a).join("/"),a=s.length;break}return n&&a<s.length?null:{params:i}}function g(t,e){return e.startsWith("/")?e:t.endsWith("/")?t+e:`${t}/${e}`}function k(t,e,n=""){for(const s of e){const e=s.path.startsWith("/")?s.path:g(n,s.path);if(s.children&&s.children.length>0){const n=v(t,e,!1);if(n){const r=[{route:s,params:n.params}],i=k(t,s.children,e);if(i)r.push(...i);else{const t=s.children.find(t=>""===t.path);t&&r.push({route:t,params:{}})}return r}}const r=v(t,e,!0);if(r)return[{route:s,params:r.params}]}return null}function E({mode:t,initialPath:e,children:l}){const c=s("memory"===t?new d(e):new f),[u,p]=r(c.current.location),[m,w]=r(c.current.state);n(()=>(p(c.current.location),w(c.current.state),c.current.listen(t=>{p(t),w(c.current.state)})),[]);const y=o((t,e)=>{const n=c.current;e&&e.replace?n.replace(t,e.state):n.push(t,e?.state)},[]),v=o(t=>{c.current.go(t)},[]),g=i(()=>({location:u,state:m,navigate:y,go:v,mode:t}),[u,m,y,v,t]);/* @__PURE__ */
|
|
2
|
-
return a(h.Provider,{value:g,children:l})}function _(t){return null}function x(t){return e(t).filter(t=>t?.type===_).map(t=>({path:t.props.path,element:t.props.element,children:t.props.children?x(t.props.children):void 0}))}function C({children:t}){const{location:n}=c(h),r=s([]),o=e(t).filter(t=>t?.type===_).map(t=>t.props.path).join("\0"),u=s("");o!==u.current&&(u.current=o,r.current=x(t));const d=r.current,f=i(()=>k(n,d),[n,d]),m=i(()=>(f??[]).reduce((t,e)=>({...t,...e.params}),{}),[f]),w=i(()=>{if(!f)return null;let t=null;for(let e=f.length-1;e>=0;e--){const n=f[e].route.element;t=/* @__PURE__ */a(p.Provider,{value:{params:m,outlet:t},children:/* @__PURE__ */a(n,{})})}return t},[f,m]);return f?/* @__PURE__ */a(l,{children:w}):null}function N(){/* @__PURE__ */
|
|
3
|
-
return a(l,{children:c(p)?.outlet})}function W({to:t,state:e,replace:n,children:s,className:r,onClick:i,...l}){const u=c(h);/* @__PURE__ */
|
|
4
|
-
return a("a",{href:t,onClick:o(s=>{s.preventDefault(),i?.(s),u?.navigate(t,{state:e,replace:n})},[u,t,e,n,i]),className:r,...l,children:s})}function b({to:t,state:e,replace:n,children:s,className:r,activeClassName:l,onClick:p,...d}){const f=c(h),m=i(()=>{if(!f)return!1;const e=f.location;return e===t||!("/"===t||!e.startsWith(`${t}/`))},[f?.location,t]);/* @__PURE__ */
|
|
5
|
-
return a("a",{href:t,onClick:o(s=>{s.preventDefault(),p?.(s),f?.navigate(t,{state:e,replace:n})},[f,t,e,n,p]),className:"function"==typeof r?r({isActive:m}):u(r,m&&l),...d,children:s})}function q({to:t,state:e,replace:s}){const r=w();return n(()=>{queueMicrotask(()=>{r(t,{state:e,replace:s})})},[r,t,e,s]),null}export{_ as a,y as c,N as i,w as l,b as n,E as o,q as r,C as s,W as t,m as u};
|
package/element/C6ph3KPL.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{t as r,w as t}from"./DrrpB4Om.js";import{n as e}from"./tJ2MS5HS.js";import{x as n}from"./DUWOb-5c.js";import{l as a,t as i}from"./BcAwTWQC.js";import{t as s}from"./DZwpw1jG.js";import{t as o}from"./D35mTuTT.js";var m=()=>{const{user:m,organization:c,signout:l}=e(),d=a(),h=c?.integrationSettings?.hideQratiBranding;/* @__PURE__ */
|
|
2
|
-
return r("div",{className:"pt-16 sm:pt-24",children:[c&&/* @__PURE__ */r("div",{className:"mx-auto py-2",children:c.customAuth?m&&/* @__PURE__ */r(s,{variant:"h6",align:"center",children:m.name}):/* @__PURE__ */r(t,{children:[!m&&/* @__PURE__ */r(s,{variant:"h6",align:"center",children:[
|
|
3
|
-
/* @__PURE__ */r(i,{className:"text-primary hover:underline",to:n.LOGIN,children:"Login"})," ","•"," ",
|
|
4
|
-
/* @__PURE__ */r(i,{className:"text-primary hover:underline",to:n.REGISTER,children:"Register"})]}),m&&/* @__PURE__ */r(s,{variant:"h6",align:"center",children:[m.name," •"," ",
|
|
5
|
-
/* @__PURE__ */r("button",{type:"button",className:"text-destructive cursor-pointer border-none bg-transparent p-0 hover:underline",onClick:async()=>{await l(),d(n.PUBLIC_EVENTS)},children:"Logout"})]})]})}),!h&&/* @__PURE__ */r(o,{})]})};export{m as t};
|
package/element/Cr4OmKxk2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{E as e,_ as a,h as t,p as s,t as o,v as n,w as d,y as l}from"./DrrpB4Om.js";import{a as r,i as m,n as c}from"./tJ2MS5HS.js";var i=e(null),p=({open:e,onOpenChange:d,children:l})=>{const[r,m]=t(!!e);a(()=>{"boolean"==typeof e&&m(e)},[e]);const c=n(e=>{m(e),d?.(e)},[d]),p=s(()=>({open:r,setOpen:c}),[r,c]);/* @__PURE__ */
|
|
2
|
-
return o(i.Provider,{value:p,children:l})},x=({children:e})=>/* @__PURE__ */o(d,{children:e}),u=({className:e,...a})=>/* @__PURE__ */o("div",{"data-state":l(i)?.open?"open":"closed",className:m("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:t,...s})=>{const{organization:n}=c(),d=l(i);return a(()=>{if(!d?.open)return;const e=e=>{"Escape"===e.key&&d.setOpen(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[d?.open]),d?.open?/* @__PURE__ */o(x,{children:[/* @__PURE__ */o(u,{onClick:()=>d.setOpen(!1)}),/* @__PURE__ */o("div",{role:"dialog","aria-modal":"true","data-state":d?.open?"open":"closed",className:m("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:r(n),...s,children:t})]}):null},b=({className:e,...a})=>/* @__PURE__ */o("div",{className:m("flex flex-col space-y-1 p-3 text-center sm:text-left",e),...a}),h=({className:e,...a})=>/* @__PURE__ */o("div",{className:m("flex justify-end space-x-3 p-4",e),...a}),v=({className:e,...a})=>/* @__PURE__ */o("h2",{className:m("text-center text-lg font-semibold",e),...a}),N=({className:e,...a})=>/* @__PURE__ */o("p",{className:m("text-muted-foreground text-center text-sm",e),...a});export{b as a,h as i,f as n,v as o,N as r,p as t};
|
package/element/DUEaNsCB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as t,D as e,E as s,O as i,S as r,T as u,_ as n,b as a,f as o,j as h,v as c,w as l,x as f,y}from"./tJ2MS5HS.js";import{t as d}from"./KdgQ7jUn.js";var m=class extends a{constructor(t={}){super(),this.config=t,this.#t=/* @__PURE__ */new Map}#t;build(e,s,i){const r=s.queryKey,u=s.queryHash??t(r,s);let n=this.get(u);return n||(n=new o({client:e,queryKey:r,queryHash:u,options:e.defaultQueryOptions(s),state:i,defaultOptions:e.getQueryDefaults(r)}),this.add(n)),n}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){c.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(t=>u(e,t))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(e=>u(t,e)):e}notify(t){c.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){c.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){c.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},p=class extends a{constructor(t={}){super(),this.config=t,this.#e=/* @__PURE__ */new Set,this.#s=/* @__PURE__ */new Map,this.#i=0}#e;#s;#i;build(t,e,s){const i=new d({client:t,mutationCache:this,mutationId:++this.#i,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#e.add(t);const e=q(t);if("string"==typeof e){const s=this.#s.get(e);s?s.push(t):this.#s.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=q(t);if("string"==typeof e){const s=this.#s.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#s.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=q(t);if("string"==typeof e){const s=this.#s.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=q(t);return"string"==typeof e?(this.#s.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){c.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#s.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(t=>l(e,t))}findAll(t={}){return this.getAll().filter(e=>l(t,e))}notify(t){c.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(t=>t.state.isPaused);return c.batch(()=>Promise.all(t.map(t=>t.continue().catch(s))))}};function q(t){return t.options.scope?.id}var g=class{#r;#u;#n;#a;#o;#h;#c;#l;constructor(t={}){this.#r=t.queryCache||new m,this.#u=t.mutationCache||new p,this.#n=t.defaultOptions||{},this.#a=/* @__PURE__ */new Map,this.#o=/* @__PURE__ */new Map,this.#h=0}mount(){this.#h++,1===this.#h&&(this.#c=y.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#l=n.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#h--,0===this.#h&&(this.#c?.(),this.#c=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#r.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#u.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#r.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#r.build(this,e),r=s.state.data;return void 0===r?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(i(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#r.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),r=this.#r.get(i.queryHash)?.state.data,u=f(e,r);if(void 0!==u)return this.#r.build(this,i).setData(u,{...s,manual:!0})}setQueriesData(t,e,s){return c.batch(()=>this.#r.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#r.get(e.queryHash)?.state}removeQueries(t){const e=this.#r;c.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){const s=this.#r;return c.batch(()=>(s.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const i={revert:!0,...e},r=c.batch(()=>this.#r.findAll(t).map(t=>t.cancel(i)));return Promise.all(r).then(s).catch(s)}invalidateQueries(t,e={}){return c.batch(()=>(this.#r.findAll(t).forEach(t=>{t.invalidate()}),"none"===t?.refetchType?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const i={...e,cancelRefetch:e.cancelRefetch??!0},r=c.batch(()=>this.#r.findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,i);return i.throwOnError||(e=e.catch(s)),"paused"===t.state.fetchStatus?Promise.resolve():e}));return Promise.all(r).then(s)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const s=this.#r.build(this,e);return s.isStaleByTime(i(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(s).catch(s)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(s).catch(s)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return n.isOnline()?this.#u.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#u}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#a.set(r(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const s=[...this.#a.values()],i={};return s.forEach(s=>{e(t,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(t,e){this.#o.set(r(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const s=[...this.#o.values()],i={};return s.forEach(s=>{e(t,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const s={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return s.queryHash||(s.queryHash=t(s.queryKey,s)),void 0===s.refetchOnReconnect&&(s.refetchOnReconnect="always"!==s.networkMode),void 0===s.throwOnError&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===h&&(s.enabled=!1),s}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#r.clear(),this.#u.clear()}};export{g as t};
|
package/element/DUWOb-5c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var E={PUBLIC_EVENTS:"/",FOLDER_EVENTS:E=>`/${E}`,LOGIN:"/auth/login",REGISTER:"/auth/register",FORGOT_PASSWORD:"/auth/forgot-password",RESET_PASSWORD:"/auth/reset-password",VERIFY_EMAIL:"/auth/verify-email",GALLERY:E=>`/event/${E}`,UPLOAD:E=>`/event/${E}/upload`,CURATE:E=>`/event/${E}/curate`,LEADERBOARD:E=>`/event/${E}/leaderboard`,MY_UPLOADS:"/my-uploads"},e={ORGANIZATION_SETTINGS:E=>`https://qrati.com/org/${E}/settings`,ORGANIZATION_SETTINGS_INTEGRATION:E=>`https://qrati.com/org/${E}/settings/integration`,ORGANIZATION_DASHBOARD:E=>`https://qrati.com/org/${E}/dashboard`,ORGANIZATION_ADMINS:E=>`https://qrati.com/org/${E}/admins`,EVENT_SETTINGS_BASIC_DETAILS:E=>`https://qrati.com/event/${E}/settings`,EVENT_REVIEW_CONTENTS:E=>`https://qrati.com/event/${E}/review-contents`,EVENT_DEEP_SEARCH:E=>`https://qrati.com/event/${E}/deep-search`,EVENT_GENERATE_ARTICLE:E=>`https://qrati.com/event/${E}/generate-article`,EVENT_ACCESS_REQUESTS:E=>`https://qrati.com/event/${E}/access-requests`,EVENT_SHOT_INSPECTOR:E=>`https://qrati.com/event/${E}/shot-inspector`,EVENT_CURATION_DETAILS:E=>`https://qrati.com/event/${E}/curation-details`},t={PUBLIC:"PUBLIC",PRIVATE:"PRIVATE",SECRET:"SECRET"},a="https://qrati.com/api/connect",T={INITIALIZE_SESSION:`${a}/session/initialize`,REGISTER:`${a}/auth/register`,LOGIN:`${a}/auth/login`,LOGOUT:`${a}/auth/logout`,UPDATE_SESSION:`${a}/session/update`,ACCEPT_TERMS:`${a}/auth/accept-terms`,PUBLIC_EVENTS:`${a}/event/public-events`,SEARCH_EVENTS:`${a}/event/search`,FOLDER_DETAILS:`${a}/folder/details`,NESTED_FOLDERS:`${a}/folder/nested-folders`,GET_EVENT_POINTS:`${a}/event/points`,ELIGIBLE_TO_CURATE:`${a}/content/curation-eligibility`,CONTENT_FOR_CURATION:`${a}/content/for-curation`,CURATE_CONTENT:`${a}/content/curate`,GET_LEADERBOARD:`${a}/event/leaderboard`,GET_UPLOAD_COUNT:`${a}/event/upload-count`,UPLOAD_CREATE:`${a}/content/upload/create`,UPLOAD_COMPLETE:`${a}/content/upload/complete`,UPLOAD_FAIL:`${a}/content/upload/fail`,UPLOAD_ABORT:`${a}/content/upload/abort`,UPDATE_REACTION:`${a}/content/update-reaction`,EVENT_DATA:`${a}/event/details-with-ads-parameters`,UPDATE_EVENT_LAYOUT:`${a}/event/update-layout`,GET_EVENT_STATISTICS:`${a}/event/statistics`,GET_CONTENTS:`${a}/content/for-gallery`,SEARCH_CONTENTS:`${a}/content/search`,GET_CONTENTS_COUNT:`${a}/content/count`,TRACK_EVENT:`${a}/event/track`,SEND_PASSWORD_RESET_CODE:`${a}/auth/send-password-reset-code`,VERIFY_PASSWORD_RESET_CODE:`${a}/auth/verify-password-reset-code`,RESET_PASSWORD:`${a}/auth/reset-password`,REPORT_ERROR:`${a}/log-error`,GET_POST_PROCESSING_SETTINGS:`${a}/event/post-processing-settings`,MY_UPLOADS:`${a}/content/my-uploads`,DELETE_CONTENT:`${a}/content/delete`},s={OWNER:"owner",ADMIN:"admin",MODERATOR:"moderator"},A={IMAGE:"IMAGE",VIDEO:"VIDEO",AD:"AD",GAM_AD:"GAM_AD"},O={GAM_IMPRESSION:"gam_impression",GAM_VIEWABLE:"gam_viewable",GAM_CLICK:"gam_click"},o={ROW:"ROW",COLUMN:"COLUMN",MASONRY:"MASONRY"},S={IN_REVIEW:"IN_REVIEW",APPROVED:"APPROVED",REJECTED:"REJECTED"},N=26214400,n=262144e3,_={CLOSED:"CLOSED",OPEN:"OPEN",UPCOMING:"UPCOMING"},r={TEXT:"text",IMAGE:"image",LOTTIE:"lottie"},I={CONTEST:"CONTEST",REACTION:"REACTION"},R={GRID:"grid",SINGLE:"single"},i={POPULAR:"popular",UPLOAD_TIME:"upload",CAPTURE_TIME:"capture"},c={[i.POPULAR]:{label:"Popular",sortField:"score"},[i.UPLOAD_TIME]:{label:"Uploaded",sortField:"createdAt"},[i.CAPTURE_TIME]:{label:"Captured",sortField:"capturedAt"}},C="map-view-state",D=i.UPLOAD_TIME,l={ASC:"asc",DESC:"desc"},P={[l.ASC]:{label:"Ascending",sortOrder:""},[l.DESC]:{label:"Descending",sortOrder:"-"}},d=l.DESC,L={OWN:"own",CURATED:"curated",ELIGIBLE:"eligible"},$={NONE:null,LINK:"LINK",EMAIL:"EMAIL",PHONE:"PHONE",SMS:"SMS",WHATSAPP:"WHATSAPP",MESSENGER:"MESSENGER"},p={AD_IMPRESSION:"impression",AD_ENGAGEMENT:"engagement",AD_CLICK:"click"},u={QRATI_CONNECT_SESSION:"qrati-connect-session",EVENT_IN_REVIEW_COUNT:E=>`in-review-count-${E}`,CONTENTS_BY_EVENT:E=>`contents-by-event-${E}`,USER_UPLOADS:"user-uploads"};export{L as C,P as E,u as S,l as T,O as _,i as a,n as b,A as c,d,I as f,o as g,e as h,T as i,R as l,t as m,p as n,c as o,_ as p,$ as r,S as s,s as t,D as u,C as v,r as w,E as x,N as y};
|
package/element/DlNQukHq.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{t}from"./DrrpB4Om.js";import{x as e}from"./DUWOb-5c.js";import{l as s}from"./BcAwTWQC.js";function o({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:"m7.825 13l4.9 4.9q.3.3.288.7t-.313.7q-.3.275-.7.288t-.7-.288l-6.6-6.6q-.15-.15-.213-.325T4.426 12t.063-.375t.212-.325l6.6-6.6q.275-.275.688-.275t.712.275q.3.3.3.713t-.3.712L7.825 11H19q.425 0 .713.288T20 12t-.288.713T19 13z"})})}var r=()=>{const r=s();/* @__PURE__ */
|
|
3
|
-
return t("button",{type:"button",onClick:()=>{window.history.length>1?r(-1):r(e.PUBLIC_EVENTS,{state:{internalNavigation:!0}})},className:"text-foreground absolute top-0 left-0",children:/* @__PURE__ */t(o,{className:"size-6"})})};export{r as t};
|
package/element/DmVgPRH5.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{_ as e,f as t,h as a,o as n,p as r,t as o,v as s,w as i}from"./DrrpB4Om.js";import{i as l,n as c,u as d}from"./tJ2MS5HS.js";import{n as m,r as u,t as p}from"./B7YFs6p5.js";import{t as h}from"./JFF45CMp.js";import{t as g}from"./DmpmrPE5.js";import{S as f,i as v,s as x}from"./DUWOb-5c.js";import{c as y,l as w}from"./BcAwTWQC.js";import{t as N}from"./DZwpw1jG.js";import{t as b}from"./DPg_DKOi.js";import{t as T}from"./B01ceTPt.js";import{t as D}from"./CxJgMv2R.js";import{t as P}from"./CrF08YS6.js";import{t as j}from"./DlNQukHq.js";import{t as C}from"./5z04gCoQ2.js";import{n as I,o as S,r as E,t as A}from"./Cr4OmKxk2.js";import{t as z}from"./N4HKgEC52.js";import{i as U,n as q,r as O,t as _}from"./hiapcVVA2.js";var k=({content:e,onDeleted:t,onClose:a})=>{const n=function(){const e=d(),{user:t,props:a}=c(),n=a?.organizationId,r=t?.token;return h({mutationKey:["delete-upload",r??null],mutationFn:async({contentId:e})=>{const t=await g.post(v.DELETE_CONTENT,{json:{contentId:e},headers:{"x-org-id":n,...r?{Authorization:`Bearer ${r}`}:{}}}).json();if(t?.error)throw new Error(t.error);return{contentId:e}},onMutate:async({contentId:t})=>{await e.cancelQueries({queryKey:[f.USER_UPLOADS],exact:!1});const a=e.getQueriesData({queryKey:[f.USER_UPLOADS],exact:!1});return e.setQueriesData({queryKey:[f.USER_UPLOADS],exact:!1},e=>e?.pages?{...e,pages:e.pages.map(e=>({...e,data:e.data.filter(e=>e._id!==t),meta:{...e.meta,totalCount:Math.max(0,(e.meta.totalCount??0)-1)}}))}:e),{previousData:a}},onError:(t,a,n)=>{n?.previousData?.forEach(([t,a])=>{e.setQueryData(t,a)})}})}(),r=e?.rateCount??0,s=r<=0,i=s?null:`This photo has ${r} rating${r>1?"s":""}. Photos with at least 1 rating cannot be deleted.`;/* @__PURE__ */
|
|
2
|
-
return o(O,{open:Boolean(e),onOpenChange:e=>{e||a()},title:"Delete content?",description:i??"Are you sure you want to delete this content? This operation is permanent and cannot be undone.",cancelText:"Cancel",confirmText:s?"Delete":"Got it",confirmColor:s?"error":"primary",onCancel:a,onConfirm:s?()=>{if(!e||!s)return;const a=e.eventId,r=e._id;t(),n.mutate({contentId:r,eventId:a})}:a})};function M({className:e}){/* @__PURE__ */
|
|
3
|
-
return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */o("path",{fill:"currentColor",d:"M7 21q-.825 0-1.412-.587T5 19V6q-.425 0-.712-.288T4 5t.288-.712T5 4h4q0-.425.288-.712T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5t-.288.713T19 6v13q0 .825-.587 1.413T17 21zM17 6H7v13h10zm-7 11q.425 0 .713-.288T11 16V9q0-.425-.288-.712T10 8t-.712.288T9 9v7q0 .425.288.713T10 17m4 0q.425 0 .713-.288T15 16V9q0-.425-.288-.712T14 8t-.712.288T13 9v7q0 .425.288.713T14 17M7 6v13z"})})}var R={[x.APPROVED]:{color:"text-success",bgColor:"bg-success/20",icon:/* @__PURE__ */o(_,{className:"size-full"}),title:"Approved",description:"Your upload has been approved and is now visible to everyone viewing this event."},[x.IN_REVIEW]:{color:"text-warning",bgColor:"bg-warning/20",icon:/* @__PURE__ */o(U,{className:"size-full"}),title:"In Review",description:"Your upload is currently being reviewed. It will be visible once approved by the event admin."},[x.REJECTED]:{color:"text-destructive",bgColor:"bg-destructive/20",icon:/* @__PURE__ */o(z,{className:"size-full"}),title:"Rejected",description:"Your upload was not approved as it may not meet the content guidelines. Please upload appropriate content."}},$=e=>{const t=new Date(e).getTime();if(Number.isNaN(t))return"";const a=Math.max(0,Math.floor((Date.now()-t)/1e3)),n=[[60,"second"],[60,"minute"],[24,"hour"],[30,"day"],[12,"month"],[Number.POSITIVE_INFINITY,"year"]];let r=a,o="second";for(const[s,i]of n){if(r<s){o=i;break}r=Math.floor(r/s),o=i}return"second"===o&&r<30?"just now":`${r} ${o}${1===r?"":"s"} ago`},L=n(({content:e,onDelete:t,onStatusClick:a})=>{const n=e.status,r=R[n];/* @__PURE__ */
|
|
4
|
-
return o("div",{className:"group relative size-full overflow-hidden sm:rounded",children:/* @__PURE__ */o("div",{className:"relative size-full",children:[
|
|
5
|
-
/* @__PURE__ */o(P,{url:e.url||"",alt:e.caption||"",thumbnailUrl:e.thumbnailUrl||void 0,blurhash:e.blurhash||void 0,pswpData:{id:e._id,type:e.type,hash:e._id,width:e.dimension?.width,height:e.dimension?.height,thumbnailUrl:e.thumbnailUrl||void 0,caption:e.caption||""}}),
|
|
6
|
-
/* @__PURE__ */o("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 flex items-center justify-between bg-gradient-to-t from-black/50 to-transparent pl-3",children:[/* @__PURE__ */o(N,{variant:"caption",className:"text-xs text-white opacity-90 sm:text-sm",children:$(e.createdAt)}),/* @__PURE__ */o(q,{icon:/* @__PURE__ */o(M,{className:"size-5"}),color:"error",size:"sm",className:"pointer-events-auto","aria-label":"Delete upload",tooltip:"Delete",onClick:a=>{a.stopPropagation(),a.preventDefault(),t(e._id)}})]}),
|
|
7
|
-
/* @__PURE__ */o("button",{type:"button","aria-label":`Status: ${r?.title||"Unknown"}`,onClick:e=>{e.stopPropagation(),e.preventDefault(),a(n)},className:l("pointer-events-auto absolute top-1 right-1 cursor-pointer rounded-full p-1 transition-opacity hover:opacity-80",r?.bgColor||"bg-gray-500/20"),children:/* @__PURE__ */o("span",{className:l("block size-5",r?.color||"text-gray-500"),children:r?.icon||null})})]})})}),F=e=>new Date(e).toLocaleDateString("en-US",{month:"short",year:"numeric"}),V=e=>{if(0===e.length)return"";if(1===e.length)return F(e[0].createdAt);const{minTime:t,maxTime:a}=e.reduce((e,t)=>{const a=new Date(t.createdAt).getTime();return{minTime:Math.min(e.minTime,a),maxTime:Math.max(e.maxTime,a)}},{minTime:1/0,maxTime:-1/0}),n=F(new Date(t).toISOString()),r=F(new Date(a).toISOString());return n===r?n:`${n} - ${r}`},B=()=>{const n=w(),d=y(),{user:h,loadingUser:x,portalContainer:P}=c(),z=t(null),U=t(!1),q=t(null),O=t(null),[_,M]=a(null),[$,F]=a(null),{contents:B,loading:K,hasNextPage:Y,fetchNextPage:Q,isFetchingNextPage:G}=function({sort:e="-createdAt",limit:t=20}={}){const{user:a,loadingUser:n,props:o}=c(),s=o?.organizationId,i=a?.token,l=a?._id??a?.uid??null,{data:d,isLoading:h,isError:x,error:y,isFetchingNextPage:w,hasNextPage:N,fetchNextPage:b,refetch:T}=u({queryKey:[f.USER_UPLOADS,s??"",l,t,e],queryFn:async({pageParam:a=1})=>await g.get(v.MY_UPLOADS,{searchParams:{page:a,limit:t,sort:e},headers:{"x-org-id":s,...i?{Authorization:`Bearer ${i}`}:{}}}).json(),initialPageParam:1,getPreviousPageParam:m,getNextPageParam:p,maxPages:25,staleTime:12e4,gcTime:3e5,enabled:!n&&!!a});return{contents:r(()=>d?.pages?.flatMap(e=>e?.data??[])??[],[d]),loading:h,isError:x,error:y,isFetchingNextPage:w,hasNextPage:!!N,fetchNextPage:b,refetch:T,totalCount:d?.pages?.[0]?.meta?.totalCount??0}}({sort:"-createdAt",limit:20});e(()=>{x||h||n("/auth/login",{state:{referrer:d.pathname},replace:!0})},[x,h]);const Z=B.length>0,H=!K&&!Z,J=r(()=>{if(!B.length)return[];const e={};return B.forEach(t=>{const a=t.eventId||"unknown";e[a]||(e[a]={eventId:a,eventName:t.event?.name||"Event",uploads:[]}),e[a].uploads.push(t)}),Object.values(e).sort((e,t)=>{const a=new Date(e.uploads[0]?.createdAt||0).getTime();return new Date(t.uploads[0]?.createdAt||0).getTime()-a})},[B]);e(()=>()=>{z.current?.destroy?.(),z.current=null},[P]);const W=s(async e=>{if(z.current||U.current)return;const t=q.current,a=e.target.closest("a");if(!t||!a||!t.contains(a))return;e.preventDefault(),U.current=!0;const n=Array.from(t.querySelectorAll("a")).indexOf(a);try{const[{default:e},{default:a},{default:r},{loadPhotoSwipe:o}]=await Promise.all([import("./web.es.js").then(e=>e.n),import("./Bo39kG4k2.js"),import("./BHmNrbtm2.js"),import("./web.es.js").then(e=>e.t)]),s=new e({gallery:t,children:"a",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:o,appendToEl:P??document.body});z.current=s,new a(s),new r(s),s.init(),n>=0&&z.current?.loadAndOpen?.(n)}finally{U.current=!1}},[P]);e(()=>{const e=O.current;if(!e||!Y)return;const t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&Y&&!G&&Q()},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[Y,G,Q]);const X=r(()=>B.find(e=>e._id===_)??null,[_,B]),ee=$?R[$]:null;/* @__PURE__ */
|
|
8
|
-
return o("div",{className:"bg-background mx-auto min-h-screen max-w-5xl px-3 pt-16 pb-12 lg:px-0",children:[
|
|
9
|
-
/* @__PURE__ */o("div",{className:"relative mb-6 flex items-center justify-center",children:[/* @__PURE__ */o(j,{}),/* @__PURE__ */o(N,{variant:"h4",align:"center",children:"My Uploads"})]}),
|
|
10
|
-
/* @__PURE__ */o("section",{className:"space-y-3",children:K?/* @__PURE__ */o("div",{className:"space-y-8 py-4",children:Array.from({length:2}).map((e,t)=>/* @__PURE__ */o("div",{className:"space-y-4",children:[/* @__PURE__ */o("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */o(D,{className:"h-6 w-48"}),/* @__PURE__ */o(D,{className:"h-5 w-24"})]}),/* @__PURE__ */o("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */o(D,{className:"h-52 w-full lg:h-64"},t))})]},t))}):H?/* @__PURE__ */o(T,{className:"py-12",title:"No uploads yet",description:"Photos and videos you upload to events will appear here."}):/* @__PURE__ */o(i,{children:[
|
|
11
|
-
/* @__PURE__ */o("div",{ref:q,onClickCapture:W,className:"space-y-8 py-4",children:J.map(e=>/* @__PURE__ */o("div",{className:"space-y-4",children:[/* @__PURE__ */o("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */o(N,{variant:"h5",color:"muted",children:e.eventName}),/* @__PURE__ */o("span",{className:"text-muted-foreground text-sm font-light uppercase sm:text-base",children:V(e.uploads)})]}),/* @__PURE__ */o("div",{className:"grid grid-cols-2 gap-1 sm:grid-cols-3 sm:gap-3 lg:grid-cols-4",children:e.uploads.map(e=>/* @__PURE__ */o("div",{className:"h-52 lg:h-64",children:/* @__PURE__ */o(L,{content:e,onDelete:M,onStatusClick:F})},e._id))})]},e.eventId))}),
|
|
12
|
-
/* @__PURE__ */o("div",{ref:O,className:"h-px w-full"}),G&&/* @__PURE__ */o("div",{className:"my-6 w-full",children:/* @__PURE__ */o(b,{})})]})}),
|
|
13
|
-
/* @__PURE__ */o(k,{content:X,onClose:()=>M(null),onDeleted:()=>M(null)}),
|
|
14
|
-
/* @__PURE__ */o(A,{open:Boolean($),onOpenChange:e=>!e&&F(null),children:/* @__PURE__ */o(I,{className:"w-full max-w-lg",children:[/* @__PURE__ */o("div",{className:"flex flex-col gap-4 p-2 sm:flex-row sm:items-start sm:p-4",children:[/* @__PURE__ */o("div",{className:l("mx-auto flex size-12 shrink-0 items-center justify-center rounded-full sm:mx-0 sm:size-10",ee?.bgColor||"bg-gray-500/20"),children:/* @__PURE__ */o("span",{className:l("size-6",ee?.color||"text-gray-500"),children:ee?.icon||null})}),/* @__PURE__ */o("div",{className:"flex-1 space-y-2 text-center sm:text-left",children:[/* @__PURE__ */o(S,{children:ee?.title||"Unknown Status"}),/* @__PURE__ */o(E,{children:ee?.description||"Status information unavailable."})]})]}),/* @__PURE__ */o("div",{className:"flex justify-end p-4",children:/* @__PURE__ */o(C,{variant:"outlined",color:"foreground",onClick:()=>F(null),children:"Got it"})})]})})]})};export{B as default};
|
package/element/cePYhOkN2.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{h as a,t as o}from"./DrrpB4Om.js";import{n as e}from"./tJ2MS5HS.js";import{x as s}from"./DUWOb-5c.js";import{c as r,t as l}from"./BcAwTWQC.js";import{t as i}from"./DZwpw1jG.js";import{n as t}from"./DGGc10Cy.js";import{t as n}from"./5z04gCoQ2.js";import{i as d,s as m,t as p}from"./C6et9sp52.js";import{n as c,r as g,t as u}from"./DlRUi0u42.js";var f=()=>{const{t:f}=t(),h=r(),[w,v]=a(""),[b,y]=a(""),[j,C]=a(!1),[N,P]=a(null),[k,x]=a(!1),[A,S]=a({}),{loginUsingEmail:E,loginWithGoogle:F,loginWithApple:L}=e(),[O,W]=a({google:!1,apple:!1}),z=a=>{S(o=>o[a]?{...o,[a]:void 0}:o)},D=async(a,o)=>{W(o=>({...o,[a]:!0})),P(null);try{await(o?.())}catch(e){e instanceof Error?P(e.message):P(`Failed to login with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{W(o=>({...o,[a]:!1}))}};/* @__PURE__ */
|
|
2
|
-
return o("div",{className:"bg-background w-full space-y-6",children:[/* @__PURE__ */o("form",{noValidate:!0,onSubmit:async a=>{a.preventDefault();const o=d(w),e=m(b);if(o||e)return void S({email:o,password:e});S({}),C(!0),P(null);const s=await(E?.(w.toLowerCase(),b));s?.error&&P(s.error),C(!1)},className:"space-y-6",children:[
|
|
3
|
-
/* @__PURE__ */o("div",{className:"space-y-9",children:[/* @__PURE__ */o(p,{label:f("auth.email","Email address"),name:"email",disabled:j,type:"email",value:w,onChange:a=>{v(a.target.value),z("email")},autoComplete:"email",error:A.email}),/* @__PURE__ */o(p,{label:f("auth.password","Password"),name:"password",disabled:j,type:k?"text":"password",value:b,onChange:a=>{y(a.target.value),z("password")},autoComplete:"current-password",error:A.password,actionLabel:k?"Hide password":"Show password",actionIcon:/* @__PURE__ */o(k?u:c,{className:"size-5"}),onActionClick:()=>x(!k)})]}),N&&/* @__PURE__ */o(i,{align:"center",color:"error",className:"font-medium",children:N}),
|
|
4
|
-
/* @__PURE__ */o("div",{className:"flex justify-end",children:/* @__PURE__ */o(l,{to:s.FORGOT_PASSWORD,state:{from:h.pathname},children:/* @__PURE__ */o(i,{variant:"h6",className:"w-fit",children:f("button.forgotPassword","Forgot Password?")})})}),
|
|
5
|
-
/* @__PURE__ */o(n,{type:"submit",color:"primary",className:"w-full",loading:j,disabled:j,children:f("button.login","Login")})]}),/* @__PURE__ */o("div",{className:"grid grid-cols-2 gap-4",children:[/* @__PURE__ */o(g,{disabled:j||O.google||O.apple,loading:O.google,onClick:()=>D("google",F),provider:"google"}),/* @__PURE__ */o(g,{disabled:j||O.google||O.apple,loading:O.apple,onClick:()=>D("apple",L),provider:"apple"})]})]})};export{f as default};
|
package/element/hiapcVVA2.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./DrrpB4Om.js";import{i as r}from"./tJ2MS5HS.js";import{t}from"./5z04gCoQ2.js";import{n as o,o as s,r as i,t as n}from"./Cr4OmKxk2.js";function d({className:r}){/* @__PURE__ */
|
|
2
|
-
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M2.725 21q-.275 0-.5-.137t-.35-.363t-.137-.488t.137-.512l9.25-16q.15-.25.388-.375T12 3t.488.125t.387.375l9.25 16q.15.25.138.513t-.138.487t-.35.363t-.5.137zm1.725-2h15.1L12 6zm8.263-1.287Q13 17.425 13 17t-.288-.712T12 16t-.712.288T11 17t.288.713T12 18t.713-.288m0-3Q13 14.425 13 14v-3q0-.425-.288-.712T12 10t-.712.288T11 11v3q0 .425.288.713T12 15t.713-.288M12 12.5"})})}function a({open:a,onOpenChange:l,title:c,description:u,cancelText:g="Cancel",confirmText:m="Confirm",confirmColor:f="error",loading:h,onCancel:b,onConfirm:v}){/* @__PURE__ */
|
|
3
|
-
return e(n,{open:a,onOpenChange:l,children:/* @__PURE__ */e(o,{className:"w-full max-w-lg",children:[/* @__PURE__ */e("div",{className:"flex flex-col gap-6 p-2 sm:flex-row sm:items-start sm:p-4",children:[/* @__PURE__ */e("div",{className:"bg-destructive/10 mx-auto flex size-12 shrink-0 items-center justify-center rounded-full sm:mx-0",children:/* @__PURE__ */e(d,{className:"text-destructive size-6"})}),/* @__PURE__ */e("div",{className:"flex-1 space-y-2 text-center sm:text-left",children:[c&&/* @__PURE__ */e(s,{children:c}),u&&/* @__PURE__ */e(i,{children:u})]})]}),/* @__PURE__ */e("div",{className:"flex flex-col-reverse gap-3 p-4 sm:flex-row sm:justify-end",children:[/* @__PURE__ */e(t,{variant:"outlined",color:"foreground",disabled:h,className:"w-full sm:w-auto",onClick:b,children:g}),/* @__PURE__ */e(t,{color:f,loading:h,disabled:h,className:r("w-full sm:w-auto","error"===f&&"text-white"),onClick:v,children:m})]})]})})}var l={xs:"size-6 [&>*]:size-4",sm:"size-8 [&>*]:size-5",md:"size-10 [&>*]:size-6",lg:"size-12 [&>*]:size-7"},c={ghost:{primary:"text-primary hover:bg-primary/10",foreground:"text-foreground hover:bg-foreground/10",muted:"text-muted-foreground hover:bg-muted/20",error:"text-destructive hover:bg-destructive/10",success:"text-success hover:bg-success/10",warning:"text-warning hover:bg-warning/10",info:"text-info hover:bg-info/10"},filled:{primary:"bg-primary text-primary-foreground hover:bg-primary/90",foreground:"bg-foreground text-background hover:bg-foreground/90",muted:"bg-muted text-muted-foreground hover:bg-muted/80",error:"bg-destructive text-white hover:bg-destructive/90",success:"bg-success text-white hover:bg-success/90",warning:"bg-warning text-white hover:bg-warning/90",info:"bg-info text-white hover:bg-info/90"},outlined:{primary:"border border-primary text-primary hover:bg-primary/10",foreground:"border border-foreground text-foreground hover:bg-foreground/10",muted:"border border-border text-muted-foreground hover:bg-muted/20",error:"border border-destructive text-destructive hover:bg-destructive/10",success:"border border-success text-success hover:bg-success/10",warning:"border border-warning text-warning hover:bg-warning/10",info:"border border-info text-info hover:bg-info/10"}};function u({icon:t,size:o="md",variant:s="ghost",color:i="foreground",loading:n,disabled:d,tooltip:a,className:u,...g}){const m="default"===s?"filled":s,f=r("inline-flex cursor-pointer items-center justify-center rounded-full transition-colors disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",l[o],c[m]?.[i]||c[m]?.foreground,u);/* @__PURE__ */
|
|
4
|
-
return e("button",{type:"button",disabled:d||n,className:f,title:a,...g,children:n?/* @__PURE__ */e("svg",{className:"animate-spin",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:/* @__PURE__ */e("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):t})}function g({className:r}){/* @__PURE__ */
|
|
5
|
-
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"m10.6 13.8l-2.15-2.15q-.275-.275-.7-.275t-.7.275t-.275.7t.275.7L9.9 15.9q.3.3.7.3t.7-.3l5.65-5.65q.275-.275.275-.7t-.275-.7t-.7-.275t-.7.275zM12 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{d as i,u as n,a as r,g as t};
|
package/element/vA5CQmOb2.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{t}from"./DrrpB4Om.js";import{n as s}from"./tJ2MS5HS.js";import{x as a}from"./DUWOb-5c.js";import{i as r,n as o,u as e}from"./BcAwTWQC.js";import{t as i}from"./B01ceTPt.js";import{t as n}from"./CxJgMv2R.js";import{t as m}from"./C6ph3KPL.js";import{t as l}from"./DlNQukHq.js";import{t as c}from"./DGGc10Cy.js";import{t as g}from"./DtcmI8yd2.js";import{t as d}from"./5z04gCoQ2.js";var p=()=>{const p=e(),{props:f}=s(),h=f?.organizationId,{loading:v,event:u}=g({eventSlug:p.eventSlug});if(v)/* @__PURE__ */return t("div",{children:[
|
|
2
|
-
/* @__PURE__ */t(n,{className:"mx-auto mt-4 h-8 w-64"}),
|
|
3
|
-
/* @__PURE__ */t(n,{className:"mx-auto mt-6 h-6 w-72"}),
|
|
4
|
-
/* @__PURE__ */t(n,{className:"mx-auto mt-6 h-8 w-72"}),
|
|
5
|
-
/* @__PURE__ */t("div",{className:"mt-8 grid grid-cols-1 gap-4 sm:grid-cols-3",children:Array.from({length:8}).map((s,a)=>/* @__PURE__ */t(n,{className:"h-72"},a))})]});const j=u?.organizationId?.toString?.()||u?.organizationId,N=h?.toString?.()||h;/* @__PURE__ */
|
|
6
|
-
return t("div",u&&j===N?{className:"bg-background relative min-h-screen",children:/* @__PURE__ */t(c,{locale:u?.language??"en",translations:u?.translations,children:[
|
|
7
|
-
/* @__PURE__ */t(l,{}),
|
|
8
|
-
/* @__PURE__ */t(r,{}),
|
|
9
|
-
/* @__PURE__ */t(m,{})]})}:{className:"flex w-full flex-col items-center gap-8",children:[/* @__PURE__ */t(i,{className:"mt-16",title:"Event not found",description:"Please check the provided link",iconSvg:/* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 997.86122 450.8081",role:"img"})}),/* @__PURE__ */t(o,{to:a.PUBLIC_EVENTS,state:{internalNavigation:!0},children:/* @__PURE__ */t(d,{children:"All events"})})]})};export{p as default};
|
|
File without changes
|