1 line
7.5 KiB
JavaScript
1 line
7.5 KiB
JavaScript
"use strict";exports.id=2332,exports.ids=[2332],exports.modules={30671:(e,a)=>{Object.defineProperty(a,"M",{enumerable:!0,get:function(){return function e(a,t){return t in a?a[t]:"then"in a&&"function"==typeof a.then?a.then(a=>e(a,t)):"function"==typeof a&&"default"===t?a:void 0}}})},77826:(e,a,t)=>{t.d(a,{A:()=>r});var l=t(8732),c=t(82015),i=t.n(c),n=t(79100);function r({user:e,userImage:a,setUserImage:t,database:c,className:r}){let d=i().useRef();return(0,l.jsxs)("div",{className:"card no-hover col"+(r?" "+r:""),children:[(0,l.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,l.jsx)("img",{src:a?"string"==typeof a?a:a.imageBase64Full:"/images/user-preset.png",alt:"Database Image",width:100,className:"w-full h-full object-cover",ref:d,"data-imagepreview":"image"})}),(0,l.jsxs)("div",{className:"w-full flex-col image-selector-wrapper",children:[(0,l.jsx)("div",{className:"button outlined secondary w-full whitespace-normal",onClick:e=>{e.target.closest(".image-selector-wrapper").querySelector("input").click()},children:"Upload Image"}),(0,l.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Database Image",className:"hidden",onChange:async e=>{t(await (0,n.A)({imageInputFile:e.target.files[0],maxWidth:400}))}})]})]})}t(55158)},55158:(e,a,t)=>{t.d(a,{Ay:()=>r,PB:()=>d,fs:()=>s});var l=t(8732),c=t(58150),i=t(82015),n=t.n(i);function r({children:e,title:a,data:t,fullPage:i,wrapperClasses:r,closePopupDispatch:d,wrapperStyle:o,noContainer:p}){return i?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(r||""),"data-popupid":a||null,style:o,children:[p?(0,l.jsx)(n().Fragment,{children:e}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":t?JSON.stringify(t):"",children:e}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{s(),d&&d()},children:(0,l.jsx)(c.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{s(),d&&d()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[p?(0,l.jsx)(n().Fragment,{children:e}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":t?JSON.stringify(t):"",children:[e,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{s(),d&&d()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),p&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{s(),d&&d()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{s(),d&&d()}})]})}function d(e,a){let t=document.querySelector(`[data-popupid='${e}']`);t&&(t.style.display="flex",a&&a(t))}function s(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},79100:(e,a,t)=>{t.d(a,{A:()=>l});async function l({imageInputFile:e,maxWidth:a}){let t,l,c=document.querySelector("[data-imagepreview='image']"),i=e.name.replace(/\..*/,""),n=document.createElement("canvas"),r=e.type,d=a||null,s=URL.createObjectURL(e),o=new Image;return o.src=s,t=await new Promise((e,a)=>{o.onerror=function(){URL.revokeObjectURL(this.src),console.log("Cannot load image")},o.onload=function(){if(URL.revokeObjectURL(this.src),d){let e=d/o.naturalWidth;n.width=o.naturalWidth<d?o.naturalWidth:d,n.height=o.naturalWidth<d?o.naturalHeight:o.naturalHeight*e}else n.width=o.naturalWidth,n.height=o.naturalHeight;let a=n.getContext("2d");a?.drawImage(o,0,0,n.width,n.height);let t=n.toDataURL(r,.95);c&&document.querySelectorAll("[data-imagepreview='image']").forEach(e=>{e.src=t}),e(t)}}),l=await new Promise((e,a)=>{n.toBlob(a=>{e(a?.size)},r,.95)}),{imageBase64:t.replace(/.*?base64,/,""),imageBase64Full:t,imageName:i,imageSize:l}}},42178:(e,a,t)=>{var l=t(24994);a.A=void 0;var c=l(t(30887)),i=t(8732);a.A=(0,c.default)((0,i.jsx)("path",{d:"M16.62 2.99c-.49-.49-1.28-.49-1.77 0L6.54 11.3c-.39.39-.39 1.02 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76"}),"ArrowBackIosRounded")},26406:(e,a,t)=>{var l=t(24994);a.A=void 0;var c=l(t(30887)),i=t(8732);a.A=(0,c.default)([(0,i.jsx)("path",{d:"M22 15c0-1.66-1.34-3-3-3h-1.5v-.5C17.5 8.46 15.04 6 12 6c-.77 0-1.49.17-2.16.46L20.79 17.4c.73-.55 1.21-1.41 1.21-2.4M2 14c0 2.21 1.79 4 4 4h9.73l-8-8H6c-2.21 0-4 1.79-4 4",opacity:".3"},"0"),(0,i.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.33 0-2.57.36-3.65.97l1.49 1.49C10.51 6.17 11.23 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 .99-.48 1.85-1.21 2.4l1.41 1.41c1.09-.92 1.8-2.27 1.8-3.81 0-2.64-2.05-4.78-4.65-4.96M3 5.27l2.77 2.77h-.42C2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h11.73l2 2 1.41-1.41L4.41 3.86zM7.73 10l8 8H6c-2.21 0-4-1.79-4-4s1.79-4 4-4z"},"1")],"CloudOffTwoTone")},92441:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"M8 7h6",key:"1f0q6e"}],["path",{d:"M8 11h8",key:"vwpz6n"}]])},34637:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},29743:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},10643:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},66916:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},83158:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]])},66918:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},10321:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("ShieldEllipsis",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},25294:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},58150:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(82544).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},9455:(e,a)=>{var t;Object.defineProperty(a,"A",{enumerable:!0,get:function(){return t}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(t||(t={}))}}; |