@qratilabs/qrati-connect 2.2.0 → 2.2.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/element/{AuthLayout-CyO9f3yS.js → AuthLayout-BIIDdbLI.js} +1 -1
  3. package/element/{ContentsPage-DTXin7QX.js → ContentsPage-Cz9xHoZG.js} +2 -2
  4. package/element/{CuratePage-Da329OuY.js → CuratePage-CIcQGgHY.js} +1 -1
  5. package/element/{Dialog-DUE33ABe.js → Dialog-Bu_qHGFB.js} +1 -1
  6. package/element/{DotLottiePlayer-8MlLiMyZ.js → DotLottiePlayer-CGyX5Uiy.js} +1 -1
  7. package/element/{EventHeaderAdminButtons-ZWRtXY11.js → EventHeaderAdminButtons-CzyFFINt.js} +2 -2
  8. package/element/{FolderBreadcrumb-CEs6rjY8.js → FolderBreadcrumb-Cj7QxYYv.js} +1 -1
  9. package/element/{ForgotPasswordPage-DcrSZb4Y.js → ForgotPasswordPage-CBmFRFNE.js} +1 -1
  10. package/element/{InputField-C89vrW2H.js → InputField-CcuGCvlZ.js} +1 -1
  11. package/element/{LazyLoadImage-CCgs8tnO.js → LazyLoadImage-Bm4-SISp.js} +1 -1
  12. package/element/{LeaderboardPage-CTDNDeXw.js → LeaderboardPage-BMvF370T.js} +1 -1
  13. package/element/{LoginPage-smlCb8hl.js → LoginPage-DArirI4F.js} +1 -1
  14. package/element/{NCMVHL6D-mctK8Nwg.js → NCMVHL6D-CbHXYjQh.js} +1 -1
  15. package/element/{PublicEvents-D2zm99Nv.js → PublicEvents-BMwJiX-a.js} +1 -1
  16. package/element/{RegisterPage-B6iFPEOf.js → RegisterPage-BwOo1H_W.js} +1 -1
  17. package/element/{SocialLoginButton-Bmw5w2Wo.js → SocialLoginButton-Bkbp5LgY.js} +1 -1
  18. package/element/{UploadPage-CeUd2Ngw.js → UploadPage-BONeTtwN.js} +1 -1
  19. package/element/{VideoPlayer-D3O9yQy5.js → VideoPlayer-D0UnCWNM.js} +1 -1
  20. package/element/element.es.js +1 -1
  21. package/element/{heic2any-ChkiLE0t.js → heic2any-BvbAMS3F.js} +1 -1
  22. package/element/{index-Dc66pO4G.js → index-B3zOFkob.js} +1 -1
  23. package/element/{index-eZDSy_OJ.js → index-ER4_3XNl.js} +2 -2
  24. package/element/{index.esm-fgGipFtS.js → index.esm-BWTacECI.js} +1 -1
  25. package/element/{photoswipe-CqOSmPl3.js → photoswipe-DMKE7eBJ.js} +1 -1
  26. package/element/styles.css +1 -1
  27. package/element/{tslib.es6-CrRFG_pJ.js → tslib.es6-Jsc-fWIN.js} +1 -1
  28. package/element/{useOrgAccess-DwChBdHT.js → useOrgAccess-DAaw7C4P.js} +1 -1
  29. package/element/web.es.js +1 -1
  30. package/package.json +1 -1
  31. package/react/{3-7xITP8.js → 7-EU-j9r.js} +1 -1
  32. package/react/{Cy0hl_vl.js → BNG2dNZI.js} +1 -1
  33. package/react/{D9rAIIEm.js → B_kCg8Mg.js} +1 -1
  34. package/react/{DR9E1aMG.js → BdDpLyOs.js} +2 -2
  35. package/react/{01YpbkrK.js → Bn45auOf.js} +1 -1
  36. package/react/{C9K7NHY-.js → BsBPHCW1.js} +1 -1
  37. package/react/{Cwug7XlJ.js → BvSsH7bx.js} +1 -1
  38. package/react/{DOyHX7jh.js → COoqtIAh.js} +1 -1
  39. package/react/{DBT304mv.js → CiAq8fSg.js} +1 -1
  40. package/react/{HRRHpVRs.js → Cm0IpoCo.js} +1 -1
  41. package/react/{BC4qG4vp.js → CwiwOI7_.js} +2 -2
  42. package/react/{DgG5NhsB.js → DAjZbCDM.js} +1 -1
  43. package/react/{Bhx5l06G.js → DFl0SJ9s.js} +1 -1
  44. package/react/{BG98DA1v.js → Dh5Eu-W1.js} +2 -2
  45. package/react/{DGrws0Ed.js → E7zPOMav.js} +1 -1
  46. package/react/{DGbDKxZM.js → ITOOpeUZ.js} +1 -1
  47. package/react/{CQ_GAdf6.js → Jy4Lc2ko.js} +1 -1
  48. package/react/{DlRtYLod.js → iK-ZNjdx.js} +1 -1
  49. package/react/index.es.js +2 -2
  50. package/react/{DtITAxUS.js → pnBKcwun.js} +1 -1
  51. package/react/{YK1PgWHO.js → r_zvdjwU.js} +1 -1
  52. package/react/{DDDUG6Th.js → wO1wraLd.js} +1 -1
  53. package/react/{CwHDgEUw.js → wsX3yzhl.js} +1 -1
  54. package/react/{B-6zXxDr.js → z1g_nsak.js} +1 -1
  55. package/umd/web.umd.js +7 -7
@@ -1 +1 @@
1
- import{j as t,c as e}from"./DR9E1aMG.js";import*as r from"react";import{useRef as i,useState as s}from"react";var o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],n=t=>{let e=0;for(let r=0;r<t.length;r++){let i=t[r];e=83*e+o.indexOf(i)}return e},a=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},h=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(12.92*e*255+.5):Math.trunc(255*(1.055*Math.pow(e,.4166666666666667)-.055)+.5)},l=(t,e)=>(t=>t<0?-1:1)(t)*Math.pow(Math.abs(t),e),c=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},u=t=>{let e=t>>8&255,r=255&t;return[a(t>>16),a(e),a(r)]},p=(t,e)=>{let r=Math.floor(t/361),i=Math.floor(t/19)%19,s=t%19;return[l((r-9)/9,2)*e,l((i-9)/9,2)*e,l((s-9)/9,2)*e]},d=(t,e,r,i)=>{(t=>{if(!t||t.length<6)throw new c("The blurhash string must be at least 6 characters");let e=n(t[0]),r=Math.floor(e/9)+1,i=e%9+1;if(t.length!==4+2*i*r)throw new c(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*i*r}`)})(t),i|=1;let s=n(t[0]),o=Math.floor(s/9)+1,a=s%9+1,l=(n(t[1])+1)/166,d=new Array(a*o);for(let e=0;e<d.length;e++)if(0===e){let r=n(t.substring(2,6));d[e]=u(r)}else{let r=n(t.substring(4+2*e,6+2*e));d[e]=p(r,l*i)}let b=4*e,f=new Uint8ClampedArray(b*r);for(let t=0;t<r;t++)for(let i=0;i<e;i++){let s=0,n=0,l=0;for(let h=0;h<o;h++)for(let o=0;o<a;o++){let c=Math.cos(Math.PI*i*o/e)*Math.cos(Math.PI*t*h/r),u=d[o+h*a];s+=u[0]*c,n+=u[1]*c,l+=u[2]*c}let c=h(s),u=h(n),p=h(l);f[4*i+0+t*b]=c,f[4*i+1+t*b]=u,f[4*i+2+t*b]=p,f[4*i+3+t*b]=255}return f},b=Object.defineProperty,f=Object.defineProperties,g=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V=(t,e)=>{for(var r in e||(e={}))m.call(e,r)&&y(t,r,e[r]);if(w)for(var r of w(e))v.call(e,r)&&y(t,r,e[r]);return t},M=(t,e)=>f(t,g(e)),I=(t,e)=>{var r={};for(var i in t)m.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&w)for(var i of w(t))e.indexOf(i)<0&&v.call(t,i)&&(r[i]=t[i]);return r},q=class extends r.PureComponent{constructor(){super(...arguments),this.canvas=null,this.handleRef=t=>{this.canvas=t,this.draw()},this.draw=()=>{let{hash:t,height:e,punch:r,width:i}=this.props;if(this.canvas){let s=d(t,i,e,r),o=this.canvas.getContext("2d"),n=o.createImageData(i,e);n.data.set(s),o.putImageData(n,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:e,height:i,width:s}=t,o=I(t,["hash","height","width"]);return r.createElement("canvas",M(V({},o),{height:i,width:s,ref:this.handleRef}))}};q.defaultProps={height:128,width:128};var C={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends r.PureComponent{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:e,height:i,width:s,punch:o,resolutionX:n,resolutionY:a,style:h}=t,l=I(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return r.createElement("div",M(V({},l),{style:M(V({display:"inline-block",height:i,width:s},h),{position:"relative"})}),r.createElement(q,{hash:e,height:a,width:n,punch:o,style:C}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var j=Object.defineProperty,k=(t,e,r)=>((t,e,r)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),O=new Map,x=new WeakMap,E=0;function P(t){return Object.keys(t).sort().filter(e=>void 0!==t[e]).map(e=>`${e}_${"root"===e?function(t){return t?(x.has(t)||(E+=1,x.set(t,E.toString())),x.get(t)):"0"}(t.root):t[e]}`).toString()}function N(t,e,r={},i=undefined){if(typeof window.IntersectionObserver>"u"&&void 0!==i){const s=t.getBoundingClientRect();return e(i,{isIntersecting:i,target:t,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:s,intersectionRect:s,rootBounds:s}),()=>{}}const{id:s,observer:o,elements:n}=function(t){const e=P(t);let r=O.get(e);if(!r){const i=new Map;let s;const o=new IntersectionObserver(e=>{e.forEach(e=>{var r;const o=e.isIntersecting&&s.some(t=>e.intersectionRatio>=t);t.trackVisibility&&typeof e.isVisible>"u"&&(e.isVisible=o),null==(r=i.get(e.target))||r.forEach(t=>{t(o,e)})})},t);s=o.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),r={id:e,observer:o,elements:i},O.set(e,r)}return r}(r),a=n.get(t)||[];return n.has(t)||n.set(t,a),a.push(e),o.observe(t),function(){a.splice(a.indexOf(e),1),0===a.length&&(n.delete(t),o.unobserve(t)),0===n.size&&(o.disconnect(),O.delete(s))}}var R=class extends r.Component{constructor(t){super(t),k(this,"node",null),k(this,"_unobserveCb",null),k(this,"lastInView"),k(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&(this.setState({inView:!!this.props.initialInView,entry:void 0}),this.lastInView=this.props.initialInView)),this.node=t||null,this.observeNode()}),k(this,"handleChange",(t,e)=>{const r=this.lastInView;this.lastInView=t,(void 0!==r||t)&&(t&&this.props.triggerOnce&&this.unobserve(),function(t){return"function"!=typeof t.children}(this.props)||this.setState({inView:t,entry:e}),this.props.onChange&&this.props.onChange(t,e))}),this.state={inView:!!t.initialInView,entry:void 0},this.lastInView=t.initialInView}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(t){(t.rootMargin!==this.props.rootMargin||t.root!==this.props.root||t.threshold!==this.props.threshold||t.skip!==this.props.skip||t.trackVisibility!==this.props.trackVisibility||t.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:t,root:e,rootMargin:r,trackVisibility:i,delay:s,fallbackInView:o}=this.props;void 0===this.lastInView&&(this.lastInView=this.props.initialInView),this._unobserveCb=N(this.node,this.handleChange,{threshold:t,root:e,rootMargin:r,trackVisibility:i,delay:s},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if("function"==typeof t){const{inView:e,entry:r}=this.state;return t({inView:e,entry:r,ref:this.handleNode})}const{as:e,triggerOnce:i,threshold:s,root:o,rootMargin:n,onChange:a,skip:h,trackVisibility:l,delay:c,initialInView:u,fallbackInView:p,...d}=this.props;return r.createElement(e||"div",{ref:this.handleNode,...d},t)}};const z=({src:r,alt:o,delayTime:n=0,threshold:a=.5,blurhash:h="LEHV6nWB2yk8pyo0adR*.7kCMdnj",wrapperClassName:l="qc:size-full",sizeMode:c="cover",position:u="center",onClick:p})=>{const d=i(null),b=i(null),[f,g]=s(!1),[w,m]=s(!1);return t.jsxs(R,{as:"div",className:e(l,"qc:relative qc:overflow-hidden"),threshold:a,onChange:t=>{t?b.current||(n<=0?g(!0):b.current=setTimeout(()=>g(!0),n)):b.current&&(clearTimeout(b.current),b.current=null)},children:[t.jsx(q,{className:"qc:size-full qc:blur-2xl",hash:h}),t.jsx("img",{alt:o,ref:d,src:f?r:null,onLoad:()=>m(!0),className:e("qc:bg-background qc:absolute qc:left-0 qc:top-0 qc:size-full qc:object-center qc:transition-all qc:duration-300",w?"qc:scale-100 qc:opacity-100":"qc:scale-95 qc:opacity-0","contain"===c?"qc:object-contain":"qc:object-cover","top"===u?"qc:object-top":"bottom"===u?"qc:object-bottom":"qc:object-center"),onClick:p})]})};export{R as I,z as L,d as j};
1
+ import{j as t,c as e}from"./BdDpLyOs.js";import*as r from"react";import{useRef as i,useState as s}from"react";var o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],n=t=>{let e=0;for(let r=0;r<t.length;r++){let i=t[r];e=83*e+o.indexOf(i)}return e},a=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},h=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(12.92*e*255+.5):Math.trunc(255*(1.055*Math.pow(e,.4166666666666667)-.055)+.5)},l=(t,e)=>(t=>t<0?-1:1)(t)*Math.pow(Math.abs(t),e),c=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},u=t=>{let e=t>>8&255,r=255&t;return[a(t>>16),a(e),a(r)]},p=(t,e)=>{let r=Math.floor(t/361),i=Math.floor(t/19)%19,s=t%19;return[l((r-9)/9,2)*e,l((i-9)/9,2)*e,l((s-9)/9,2)*e]},d=(t,e,r,i)=>{(t=>{if(!t||t.length<6)throw new c("The blurhash string must be at least 6 characters");let e=n(t[0]),r=Math.floor(e/9)+1,i=e%9+1;if(t.length!==4+2*i*r)throw new c(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*i*r}`)})(t),i|=1;let s=n(t[0]),o=Math.floor(s/9)+1,a=s%9+1,l=(n(t[1])+1)/166,d=new Array(a*o);for(let e=0;e<d.length;e++)if(0===e){let r=n(t.substring(2,6));d[e]=u(r)}else{let r=n(t.substring(4+2*e,6+2*e));d[e]=p(r,l*i)}let b=4*e,f=new Uint8ClampedArray(b*r);for(let t=0;t<r;t++)for(let i=0;i<e;i++){let s=0,n=0,l=0;for(let h=0;h<o;h++)for(let o=0;o<a;o++){let c=Math.cos(Math.PI*i*o/e)*Math.cos(Math.PI*t*h/r),u=d[o+h*a];s+=u[0]*c,n+=u[1]*c,l+=u[2]*c}let c=h(s),u=h(n),p=h(l);f[4*i+0+t*b]=c,f[4*i+1+t*b]=u,f[4*i+2+t*b]=p,f[4*i+3+t*b]=255}return f},b=Object.defineProperty,f=Object.defineProperties,g=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V=(t,e)=>{for(var r in e||(e={}))m.call(e,r)&&y(t,r,e[r]);if(w)for(var r of w(e))v.call(e,r)&&y(t,r,e[r]);return t},M=(t,e)=>f(t,g(e)),I=(t,e)=>{var r={};for(var i in t)m.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&w)for(var i of w(t))e.indexOf(i)<0&&v.call(t,i)&&(r[i]=t[i]);return r},q=class extends r.PureComponent{constructor(){super(...arguments),this.canvas=null,this.handleRef=t=>{this.canvas=t,this.draw()},this.draw=()=>{let{hash:t,height:e,punch:r,width:i}=this.props;if(this.canvas){let s=d(t,i,e,r),o=this.canvas.getContext("2d"),n=o.createImageData(i,e);n.data.set(s),o.putImageData(n,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:e,height:i,width:s}=t,o=I(t,["hash","height","width"]);return r.createElement("canvas",M(V({},o),{height:i,width:s,ref:this.handleRef}))}};q.defaultProps={height:128,width:128};var C={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends r.PureComponent{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:e,height:i,width:s,punch:o,resolutionX:n,resolutionY:a,style:h}=t,l=I(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return r.createElement("div",M(V({},l),{style:M(V({display:"inline-block",height:i,width:s},h),{position:"relative"})}),r.createElement(q,{hash:e,height:a,width:n,punch:o,style:C}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var j=Object.defineProperty,k=(t,e,r)=>((t,e,r)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),O=new Map,x=new WeakMap,E=0;function P(t){return Object.keys(t).sort().filter(e=>void 0!==t[e]).map(e=>`${e}_${"root"===e?function(t){return t?(x.has(t)||(E+=1,x.set(t,E.toString())),x.get(t)):"0"}(t.root):t[e]}`).toString()}function N(t,e,r={},i=undefined){if(typeof window.IntersectionObserver>"u"&&void 0!==i){const s=t.getBoundingClientRect();return e(i,{isIntersecting:i,target:t,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:s,intersectionRect:s,rootBounds:s}),()=>{}}const{id:s,observer:o,elements:n}=function(t){const e=P(t);let r=O.get(e);if(!r){const i=new Map;let s;const o=new IntersectionObserver(e=>{e.forEach(e=>{var r;const o=e.isIntersecting&&s.some(t=>e.intersectionRatio>=t);t.trackVisibility&&typeof e.isVisible>"u"&&(e.isVisible=o),null==(r=i.get(e.target))||r.forEach(t=>{t(o,e)})})},t);s=o.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),r={id:e,observer:o,elements:i},O.set(e,r)}return r}(r),a=n.get(t)||[];return n.has(t)||n.set(t,a),a.push(e),o.observe(t),function(){a.splice(a.indexOf(e),1),0===a.length&&(n.delete(t),o.unobserve(t)),0===n.size&&(o.disconnect(),O.delete(s))}}var R=class extends r.Component{constructor(t){super(t),k(this,"node",null),k(this,"_unobserveCb",null),k(this,"lastInView"),k(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&(this.setState({inView:!!this.props.initialInView,entry:void 0}),this.lastInView=this.props.initialInView)),this.node=t||null,this.observeNode()}),k(this,"handleChange",(t,e)=>{const r=this.lastInView;this.lastInView=t,(void 0!==r||t)&&(t&&this.props.triggerOnce&&this.unobserve(),function(t){return"function"!=typeof t.children}(this.props)||this.setState({inView:t,entry:e}),this.props.onChange&&this.props.onChange(t,e))}),this.state={inView:!!t.initialInView,entry:void 0},this.lastInView=t.initialInView}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(t){(t.rootMargin!==this.props.rootMargin||t.root!==this.props.root||t.threshold!==this.props.threshold||t.skip!==this.props.skip||t.trackVisibility!==this.props.trackVisibility||t.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:t,root:e,rootMargin:r,trackVisibility:i,delay:s,fallbackInView:o}=this.props;void 0===this.lastInView&&(this.lastInView=this.props.initialInView),this._unobserveCb=N(this.node,this.handleChange,{threshold:t,root:e,rootMargin:r,trackVisibility:i,delay:s},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if("function"==typeof t){const{inView:e,entry:r}=this.state;return t({inView:e,entry:r,ref:this.handleNode})}const{as:e,triggerOnce:i,threshold:s,root:o,rootMargin:n,onChange:a,skip:h,trackVisibility:l,delay:c,initialInView:u,fallbackInView:p,...d}=this.props;return r.createElement(e||"div",{ref:this.handleNode,...d},t)}};const z=({src:r,alt:o,delayTime:n=0,threshold:a=.5,blurhash:h="LEHV6nWB2yk8pyo0adR*.7kCMdnj",wrapperClassName:l="qc:size-full",sizeMode:c="cover",position:u="center",onClick:p})=>{const d=i(null),b=i(null),[f,g]=s(!1),[w,m]=s(!1);return t.jsxs(R,{as:"div",className:e(l,"qc:relative qc:overflow-hidden"),threshold:a,onChange:t=>{t?b.current||(n<=0?g(!0):b.current=setTimeout(()=>g(!0),n)):b.current&&(clearTimeout(b.current),b.current=null)},children:[t.jsx(q,{className:"qc:size-full qc:blur-2xl",hash:h}),t.jsx("img",{alt:o,ref:d,src:f?r:null,onLoad:()=>m(!0),className:e("qc:bg-background qc:absolute qc:left-0 qc:top-0 qc:size-full qc:object-center qc:transition-all qc:duration-300",w?"qc:scale-100 qc:opacity-100":"qc:scale-95 qc:opacity-0","contain"===c?"qc:object-contain":"qc:object-cover","top"===u?"qc:object-top":"bottom"===u?"qc:object-bottom":"qc:object-center"),onClick:p})]})};export{R as I,z as L,d as j};
@@ -1 +1 @@
1
- import{u as t,j as r,c as e,O as a,A as c}from"./DR9E1aMG.js";import{useState as n,useRef as o}from"react";function s({content:c,children:s,position:l="bottom",className:q,contentClassName:i}){const[p,b]=n(!1),d=o(null),{organization:u}=t();return r.jsxs("div",{className:e("qc:relative qc:inline-block",q),ref:d,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),onClick:()=>b(!1),onBlur:()=>b(!1),children:[s,p&&r.jsxs("div",{className:e("qc:absolute qc:z-50 qc:whitespace-nowrap qc:rounded qc:bg-neutral-200 qc:px-2 qc:py-1 qc:text-sm qc:text-black",{top:"qc:bottom-full qc:left-1/2 -qc:translate-x-1/2 qc:mb-2",right:"qc:left-full qc:top-1/2 -qc:translate-y-1/2 qc:ml-2",bottom:"qc:top-full qc:left-1/2 -qc:translate-x-1/2 qc:mt-2",left:"qc:right-full qc:top-1/2 -qc:translate-y-1/2 qc:mr-2"}[l],i),style:a(u),role:"tooltip",children:[c,r.jsx("div",{className:e("qc:absolute qc:h-0 qc:w-0 qc:border-4",{top:"qc:top-full qc:left-1/2 -qc:translate-x-1/2 qc:border-l-transparent qc:border-r-transparent qc:border-b-transparent",right:"qc:right-full qc:top-1/2 -qc:translate-y-1/2 qc:border-t-transparent qc:border-b-transparent qc:border-l-transparent",bottom:"qc:bottom-full qc:left-1/2 -qc:translate-x-1/2 qc:border-l-transparent qc:border-r-transparent qc:border-t-transparent",left:"qc:left-full qc:top-1/2 -qc:translate-y-1/2 qc:border-t-transparent qc:border-b-transparent qc:border-r-transparent"}[l])})]})]})}const l=()=>{const{initializing:r,organization:e,user:a,loadingUser:n}=t(),o=e?.admins?.find(t=>t.email===a?.email)?.role;return{role:o,isSuper:a?.isSuper,loading:n||r,isOwner:o===c.OWNER,isAdmin:o===c.ADMIN,isModerator:o===c.MODERATOR}};export{s as T,l as u};
1
+ import{u as t,j as r,c as e,O as a,A as c}from"./BdDpLyOs.js";import{useState as n,useRef as o}from"react";function s({content:c,children:s,position:l="bottom",className:q,contentClassName:i}){const[p,b]=n(!1),d=o(null),{organization:u}=t();return r.jsxs("div",{className:e("qc:relative qc:inline-block",q),ref:d,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),onClick:()=>b(!1),onBlur:()=>b(!1),children:[s,p&&r.jsxs("div",{className:e("qc:absolute qc:z-50 qc:whitespace-nowrap qc:rounded qc:bg-neutral-200 qc:px-2 qc:py-1 qc:text-sm qc:text-black",{top:"qc:bottom-full qc:left-1/2 qc:-translate-x-1/2 qc:mb-2",right:"qc:left-full qc:top-1/2 qc:-translate-y-1/2 qc:ml-2",bottom:"qc:top-full qc:left-1/2 qc:-translate-x-1/2 qc:mt-2",left:"qc:right-full qc:top-1/2 qc:-translate-y-1/2 qc:mr-2"}[l],i),style:a(u),role:"tooltip",children:[c,r.jsx("div",{className:e("qc:absolute qc:h-0 qc:w-0 qc:border-4",{top:"qc:top-full qc:left-1/2 qc:-translate-x-1/2 qc:border-l-transparent qc:border-r-transparent qc:border-b-transparent",right:"qc:right-full qc:top-1/2 qc:-translate-y-1/2 qc:border-t-transparent qc:border-b-transparent qc:border-l-transparent",bottom:"qc:bottom-full qc:left-1/2 qc:-translate-x-1/2 qc:border-l-transparent qc:border-r-transparent qc:border-t-transparent",left:"qc:left-full qc:top-1/2 qc:-translate-y-1/2 qc:border-t-transparent qc:border-b-transparent qc:border-r-transparent"}[l])})]})]})}const l=()=>{const{initializing:r,organization:e,user:a,loadingUser:n}=t(),o=e?.admins?.find(t=>t.email===a?.email)?.role;return{role:o,isSuper:a?.isSuper,loading:n||r,isOwner:o===c.OWNER,isAdmin:o===c.ADMIN,isModerator:o===c.MODERATOR}};export{s as T,l as u};