diff --git a/assets/index-B0kxg0WS.js b/assets/index-BepUDHL8.js similarity index 98% rename from assets/index-B0kxg0WS.js rename to assets/index-BepUDHL8.js index 064ee34..23c7456 100644 --- a/assets/index-B0kxg0WS.js +++ b/assets/index-BepUDHL8.js @@ -108,15 +108,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:l,tableRow:s}};function o(f,b,y,S){return u(d(f,y,S),f.align)}function s(f,b,y,S){const h=c(f,y,S),g=u([h]);return g.slice(0,g.indexOf(` `))}function l(f,b,y,S){const h=y.enter("tableCell"),g=y.enter("phrasing"),m=y.containerPhrasing(f,{...S,before:i,after:i});return g(),h(),m}function u(f,b){return Jz(f,{align:b,alignDelimiters:r,padding:n,stringLength:a})}function d(f,b,y){const S=f.children;let h=-1;const g=[],m=b.enter("table");for(;++h0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const aG={tokenize:pG,partial:!0};function iG(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:uG,continuation:{tokenize:cG},exit:dG}},text:{91:{name:"gfmFootnoteCall",tokenize:lG},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oG,resolveTo:sG}}}}function oG(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const l=r.events[a][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return n(l);const u=zt(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function sG(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function lG(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),l}function l(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(i>999||c===93&&!o||c===null||c===91||ue(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return a.includes(zt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return ue(c)||(o=!0),i++,e.consume(c),c===92?d:u}function d(c){return c===91||c===92||c===93?(e.consume(c),i++,u):u(c)}}function uG(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,s;return l;function l(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(b)}function d(b){if(o>999||b===93&&!s||b===null||b===91||ue(b))return n(b);if(b===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=zt(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return ue(b)||(s=!0),o++,e.consume(b),b===92?c:d}function c(b){return b===91||b===92||b===93?(e.consume(b),o++,d):d(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),a.includes(i)||a.push(i),ae(e,f,"gfmFootnoteDefinitionWhitespace")):n(b)}function f(b){return t(b)}}function cG(e,t,n){return e.check(ki,t,e.attempt(aG,t,n))}function dG(e){e.exit("gfmFootnoteDefinition")}function pG(e,t,n){const r=this;return ae(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):n(i)}}function fG(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,s){let l=-1;for(;++l1?l(b):(o.consume(b),c++,f);if(c<2&&!n)return l(b);const S=o.exit("strikethroughSequenceTemporary"),h=Go(b);return S._open=!h||h===2&&!!y,S._close=!y||y===2&&!!h,s(b)}}}class gG{constructor(){this.map=[]}add(t,n,r){mG(this,t,n,r)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let a=r.pop();for(;a;)t.push(...a),a=r.pop();this.map.length=0}}function mG(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a-1;){const z=r.events[N][1].type;if(z==="lineEnding"||z==="linePrefix")N--;else break}const M=N>-1?r.events[N][1].type:null,H=M==="tableHead"||M==="tableRow"?v:l;return H===v&&r.parser.lazy[r.now().line]?n(A):H(A)}function l(A){return e.enter("tableHead"),e.enter("tableRow"),u(A)}function u(A){return A===124||(o=!0,i+=1),d(A)}function d(A){return A===null?n(A):W(A)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),f):n(A):te(A)?ae(e,d,"whitespace")(A):(i+=1,o&&(o=!1,a+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),c(A)))}function c(A){return A===null||A===124||ue(A)?(e.exit("data"),d(A)):(e.consume(A),A===92?p:c)}function p(A){return A===92||A===124?(e.consume(A),c):c(A)}function f(A){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(A):(e.enter("tableDelimiterRow"),o=!1,te(A)?ae(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):b(A))}function b(A){return A===45||A===58?S(A):A===124?(o=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),y):k(A)}function y(A){return te(A)?ae(e,S,"whitespace")(A):S(A)}function S(A){return A===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),h):A===45?(i+=1,h(A)):A===null||W(A)?D(A):k(A)}function h(A){return A===45?(e.enter("tableDelimiterFiller"),g(A)):k(A)}function g(A){return A===45?(e.consume(A),g):A===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),m):(e.exit("tableDelimiterFiller"),m(A))}function m(A){return te(A)?ae(e,D,"whitespace")(A):D(A)}function D(A){return A===124?b(A):A===null||W(A)?!o||a!==i?k(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):k(A)}function k(A){return n(A)}function v(A){return e.enter("tableRow"),C(A)}function C(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),C):A===null||W(A)?(e.exit("tableRow"),t(A)):te(A)?ae(e,C,"whitespace")(A):(e.enter("data"),R(A))}function R(A){return A===null||A===124||ue(A)?(e.exit("data"),C(A)):(e.consume(A),A===92?x:R)}function x(A){return A===92||A===124?(e.consume(A),R):R(A)}}function EG(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,d,c;const p=new gG;for(;++nn[2]+1){const b=n[2]+1,y=n[3]-n[2]-1;e.add(b,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return a!==void 0&&(i.end=Object.assign({},Rr(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function ok(e,t,n,r,a){const i=[],o=Rr(t.events,n);a&&(a.end=Object.assign({},o),i.push(["exit",a,t])),r.end=Object.assign({},o),i.push(["exit",r,t]),e.add(n+1,0,i)}function Rr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const vG={name:"tasklistCheck",tokenize:DG};function SG(){return{text:{91:vG}}}function DG(e,t,n){const r=this;return a;function a(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return ue(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return W(l)?t(l):te(l)?e.check({tokenize:wG},t,n)(l):n(l)}}function wG(e,t,n){return ae(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function kG(e){return aA([K4(),iG(),fG(e),bG(),SG()])}const TG={};function x_(e){const t=this,n=e||TG,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(kG(n)),i.push(H4()),o.push(V4(n))}function Ig(e){return e?new Date(e*1e3).toLocaleString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}):""}const CG=async(e,t)=>{try{if(!(await fetch(`https://api.meower.org/posts?id=${e}`,{method:"DELETE",headers:{"Content-Type":"application/json",Token:t}})).ok)throw new Error(`Failed to delete post with ID ${e}`);console.log(`Post with ID ${e} deleted successfully.`)}catch(n){console.error("Error deleting post:",n)}},AG=async(e,t,n)=>{try{if(!(await fetch(`https://api.meower.org/posts?id=${e}`,{method:"PATCH",body:JSON.stringify({content:n}),headers:{"Content-Type":"application/json",Token:t}})).ok)throw new Error(`Failed to edit post with ID ${e}`);console.log(`Post with ID ${e} edited successfully.`)}catch(r){console.error("Error edited post:",r)}},sk=({children:e})=>{const t=o=>typeof o=="string"?o:I.isValidElement(o)?o.props.children?I.Children.toArray(o.props.children).map(t).join(""):"":Array.isArray(o)?o.map(t).join(""):"",n=t(e),r=/\[#([0-9A-Fa-f]{3,6})\](.*?)\[#\1\]/g,a=n.split(r),i=a.map((o,s)=>{if(s%3===0)return E.jsx("span",{children:o},s);if(s%3===1){const l=`#${o}`;return E.jsx("span",{style:{color:l},children:a[s+1]},s)}return null});return E.jsx(E.Fragment,{children:i})},_G=["https://meower.org/","https://http.meower.org/","https://assets.meower.org/","https://forums.meower.org/","https://go.meower.org/","https://hedgedoc.meower.org/","https://docs.meower.org/","https://uploads.meower.org/","https://u.cubeupload.com/","https://cubeupload.com/","https://i.ibb.co/","https://media.tenor.com/","https://tenor.com/","https://c.tenor.com/","https://assets.scratch.mit.edu/","https://cdn2.scratch.mit.edu/","https://cdn.scratch.mit.edu/","https://uploads.scratch.mit.edu/","https://cdn.discordapp.com/","https://media.discordapp.net/"],RG=e=>_G.some(t=>e.startsWith(t)),xG=e=>e?e.replace(/(https:\/\/[^\s]+)/g,t=>RG(t)?`![image](${t})`:t):"",IG=e=>e.map(({id:t,filename:n})=>`![](https://uploads.meower.org/attachments/${t}/${n})`).join(" "),Ng=(e,t,n)=>Object.keys(t).reduce((r,a)=>r.replaceAll(a,n(a,t[a])),e),lk=(e,t,n=!0)=>Ng(e,t,(r,a)=>n?` ![${r}](${a}) `:""),NG=(e,t=!0)=>e.replace(/(data:image\/[^\s]+;base64,[^\s]+)/g,n=>t?`![image](${n})`:""),OG=e=>{const t=e.match(/<(a)?:(\w+):(\d+)>/);return t?{name:t[2],number:t[3],isAnimated:!!t[1]}:null},da=(e,t=!0)=>e?e.replace(/\\?<(a)?:(\w+):(\d+)>/gi,n=>{if(n.startsWith("\\"))return n.slice(1);if(!t)return"";const{name:r,number:a,isAnimated:i}=OG(n)||{};return r?`![${r}](https://cdn.discordapp.com/emojis/${a}.${i?"gif":"png"}?size=16&quality=lossless)`:n}):"",Eh=e=>{if(typeof e!="string")return"";const t=/\\?<:([a-z0-9]+)>/gi;return e.replace(t,n=>{if(n.startsWith("\\"))return n.substring(1);{const r=n.substring(2,n.length-1),a=`https://uploads.meower.org/emojis/${r}`;return`![${r}](${a})`}})};function uk(e){return E.jsx("div",{children:e.map(t=>{try{return E.jsx("div",{className:"reply",onClick:()=>WG(t.post_id),style:{cursor:"pointer"},children:E.jsxs("i",{children:[t.author&&t.author.avatar!==null&&t.author.avatar!==void 0?E.jsx("img",{src:t.author.avatar===""?t.author.pfp_data===-3?"/furrchat/assets/default_pfps/icon_guest-e8db7c16.svg":`${Dt[t.author.pfp_data]}`:`https://uploads.meower.org/icons/${t.author.avatar}`,alt:"reply pfp",width:"16",height:"16",style:{paddingRight:5}}):null,E.jsx(Ut,{to:`/users/${t.u}`,children:E.jsx("b",{children:t.u})}),": ",E.jsx(Ci,{components:{p:({children:n})=>{if(n&&typeof n=="string"){const r=n.trim();return r.length>70?E.jsx(sk,{children:r.substring(0,50).replace(/\n/g,"")+"..."}):E.jsx(sk,{children:r})}else return E.jsx(E.Fragment,{children:n})}},children:da(Eh(t.p))})]})},t._id)}catch(n){return console.error("Error rendering reply:",n),null}})})}const I_=e=>E.jsx("div",{style:{maxWidth:"750px"},children:e.map(({emoji:t,count:n})=>{try{const a=LG(t)?t:E.jsx("img",{src:`https://uploads.meower.org/emojis/${t}`,alt:"Reaction!",style:{height:"10px"}});return E.jsxs("button",{style:{padding:"5px",fontSize:"8px",fontWeight:"bold",boxShadow:"2px 2px 4px rgba(0, 0, 0, 0.1)",background:"linear-gradient(to bottom,rgba(255, 255, 255, 0.3), rgba(153, 153, 133, 0.3))",border:"1px solid rgba(0, 0, 0, 0.2)"},children:[a," ",n]},t)}catch(r){return console.error("Error rendering reactions:",r),null}})}),LG=e=>new RegExp("\\p{Emoji_Presentation}","u").test(e),yf=e=>{let t=e;return xG(t),t=da(t),t=Eh(t),t=lk(t,BC),t=lk(t,hg),t=NG(t),t=t.replace(/\[\(sticker\) (.+?): (.+)\]/,(n,r,a)=>`![${r}](${a})`),t=Ng(t,UC,(n,r)=>r),t=Ng(t,hg,(n,r)=>r),t.replace(/\n/g,` -`)};function Ya(){return Ya=Object.assign||function(e){for(var t=1;t=c.top+c.height||f.left+f.width>=c.left+c.width)d++;else break}return u},qG=0,HG=function(){var t=document.getElementById("popup-root");return t===null&&(t=document.createElement("div"),t.setAttribute("id","popup-root"),document.body.appendChild(t)),t},VG=I.forwardRef(function(e,t){var n=e.trigger,r=n===void 0?null:n,a=e.onOpen,i=a===void 0?function(){}:a,o=e.onClose,s=o===void 0?function(){}:o,l=e.defaultOpen,u=l===void 0?!1:l,d=e.open,c=d===void 0?void 0:d,p=e.disabled,f=p===void 0?!1:p,b=e.nested,y=b===void 0?!1:b,S=e.closeOnDocumentClick,h=S===void 0?!0:S,g=e.repositionOnResize,m=g===void 0?!0:g,D=e.closeOnEscape,k=D===void 0?!0:D,v=e.on,C=v===void 0?["click"]:v,R=e.contentStyle,x=R===void 0?{}:R,A=e.arrowStyle,N=A===void 0?{}:A,M=e.overlayStyle,H=M===void 0?{}:M,z=e.className,$=z===void 0?"":z,V=e.position,K=V===void 0?"bottom center":V,O=e.modal,F=O===void 0?!1:O,w=e.lockScroll,P=w===void 0?!1:w,G=e.arrow,_=G===void 0?!0:G,Q=e.offsetX,pe=Q===void 0?0:Q,Z=e.offsetY,be=Z===void 0?0:Z,Ne=e.mouseEnterDelay,xt=Ne===void 0?100:Ne,lt=e.mouseLeaveDelay,It=lt===void 0?100:lt,Sr=e.keepTooltipInside,Hn=Sr===void 0?!1:Sr,Dr=e.children,pa=I.useState(c||u),ut=pa[0],fa=pa[1],Nt=I.useRef(null),Be=I.useRef(null),qt=I.useRef(null),Ri=I.useRef(null),xi=I.useRef("popup-"+ ++qG),He=F?!0:!r,Vn=I.useRef(0);UG(function(){return ut?(Ri.current=document.activeElement,bn(),Ot(),ct()):tn(),function(){clearTimeout(Vn.current)}},[ut]),I.useEffect(function(){typeof c=="boolean"&&(c?wr():L())},[c,f]);var wr=function(re){ut||f||(fa(!0),setTimeout(function(){return i(re)},0))},L=function(re){var Je;!ut||f||(fa(!1),He&&((Je=Ri.current)===null||Je===void 0||Je.focus()),setTimeout(function(){return s(re)},0))},j=function(re){re==null||re.stopPropagation(),ut?L(re):wr(re)},Y=function(re){clearTimeout(Vn.current),Vn.current=setTimeout(function(){return wr(re)},xt)},ee=function(re){re==null||re.preventDefault(),j()},oe=function(re){clearTimeout(Vn.current),Vn.current=setTimeout(function(){return L(re)},It)},ct=function(){He&&P&&(document.getElementsByTagName("body")[0].style.overflow="hidden")},tn=function(){He&&P&&(document.getElementsByTagName("body")[0].style.overflow="auto")},Ot=function(){var re,Je=Be==null||(re=Be.current)===null||re===void 0?void 0:re.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'),Re=Array.prototype.slice.call(Je)[0];Re==null||Re.focus()};I.useImperativeHandle(t,function(){return{open:function(){wr()},close:function(){L()},toggle:function(){j()}}});var bn=function(){if(!(He||!ut)&&!(!(Nt!=null&&Nt.current)||!(Nt!=null&&Nt.current)||!(Be!=null&&Be.current))){var re=Nt.current.getBoundingClientRect(),Je=Be.current.getBoundingClientRect(),Re=GG(re,Je,K,_,{offsetX:pe,offsetY:be},Hn);if(Be.current.style.top=Re.top+window.scrollY+"px",Be.current.style.left=Re.left+window.scrollX+"px",_&&qt.current){var Yn,ga;qt.current.style.transform=Re.transform,qt.current.style.setProperty("-ms-transform",Re.transform),qt.current.style.setProperty("-webkit-transform",Re.transform),qt.current.style.top=((Yn=N.top)===null||Yn===void 0?void 0:Yn.toString())||Re.arrowTop,qt.current.style.left=((ga=N.left)===null||ga===void 0?void 0:ga.toString())||Re.arrowLeft}}};FG(L,k),BG(Be,ut&&He),MG(bn,m),PG(r?[Be,Nt]:[Be],L,h&&!y);var Wn=function(){for(var re={key:"T",ref:Nt,"aria-describedby":xi.current},Je=Array.isArray(C)?C:[C],Re=0,Yn=Je.length;Re=0&&(Je.onMouseEnter=Y,Je.onMouseLeave=oe),Je},nn=function(){return se.createElement("div",Object.assign({},Ve(),{key:"C",role:He?"dialog":"tooltip",id:xi.current}),_&&!He&&se.createElement("div",{ref:qt,style:Ca.popupArrow},se.createElement("svg",{"data-testid":"arrow",className:"popup-arrow "+($!==""?$.split(" ").map(function(re){return re+"-arrow"}).join(" "):""),viewBox:"0 0 32 16",style:Ya({position:"absolute"},N)},se.createElement("path",{d:"M16 0l16 16H0z",fill:"currentcolor"}))),Dr&&typeof Dr=="function"?Dr(L,ut):Dr)},Lt=!(C.indexOf("hover")>=0),M_=He?Ca.overlay.modal:Ca.overlay.tooltip,P_=[Lt&&se.createElement("div",{key:"O","data-testid":"overlay","data-popup":He?"modal":"tooltip",className:"popup-overlay "+($!==""?$.split(" ").map(function(Oe){return Oe+"-overlay"}).join(" "):""),style:Ya({},M_,H,{pointerEvents:h&&y||He?"auto":"none"}),onClick:h&&y?L:void 0,tabIndex:-1},He&&nn()),!He&&nn()];return se.createElement(se.Fragment,null,Wn(),ut&&Na.createPortal(P_,HG()))});const N_=({src:e,alt:t})=>{var r;const n=(r=e.split(".").pop())==null?void 0:r.toLowerCase();if(e.includes("emoji"))return E.jsx("img",{src:e,alt:t,style:{maxWidth:"20px"},title:t});if(e.endsWith("?preview"))return E.jsx("img",{src:e,alt:t,style:{height:"auto",width:"auto",maxHeight:"375px"},title:e});switch(n){case"wav":case"mp3":case"aac":case"flac":return E.jsx("audio",{src:e,controls:!0,style:{maxHeight:"375px",objectPosition:"50% 50%"},title:e});case"mp4":case"webm":case"ogg":case"mov":case"avi":case"mkv":case"wmv":return E.jsx("video",{src:e,controls:!0,style:{maxHeight:"375px",objectPosition:"50% 50%"},title:e});case"pdf":case"doc":case"docx":case"xls":case"xlsx":case"ppt":case"pptx":return n==="pdf"?E.jsx("embed",{src:e,type:"application/pdf",width:"100%",height:"800px"}):E.jsx("iframe",{src:`https://docs.google.com/viewer?url=${encodeURIComponent(e)}&embedded=true`,width:"100%",height:"800px",style:{border:"none"},title:"Document Viewer"});case"jpg":case"jpeg":case"png":case"gif":case"bmp":case"tiff":case"webp":case"svg":case"blob?preview":return E.jsx(E.Fragment,{children:E.jsx(VG,{trigger:E.jsx("img",{src:e,alt:t,style:{height:"auto",width:"auto",maxHeight:"375px",cursor:"pointer"},title:e}),position:"center center",modal:!0,children:E.jsx("center",{children:E.jsx("img",{src:e,alt:t,style:{maxWidth:"800px",maxHeight:"600px"},title:e})})})});default:return E.jsxs("div",{className:"attachment-container",style:{textAlign:"center",width:"fit-content"},children:[E.jsx("p",{children:"Cannot display the file(s) directly."}),E.jsxs("a",{href:e,download:!0,children:["Download ",e.split("/").pop()]})]})}},WG=e=>{if(!e){console.log("Too far away booooo");return}const t=document.getElementById(e);t?t.scrollIntoView({behavior:"smooth"}):console.log(`Element with ID ${e} not found`)},YG=({attachments:e,author:t,post:n,post_id:r,reactions:a,reply_to:i,time:o,user:s,active:l,edited:u})=>{const{setPost:d,userToken:c}=Me(),{replyIds:p,setReplyIds:f}=Me(),{userData:b}=Me(),y=b==null?void 0:b.username,[S,h]=I.useState(!1),[g,m]=I.useState(yf(n)),D=I.useCallback(()=>{d(z=>`@${s} ${z}`),window.scrollTo({top:200,behavior:"smooth"})},[d,s,n]),k=`${t.avatar===""?t.pfp_data===-3?"/furrchat/assets/default_pfps/icon_guest-e8db7c16.svg":`${Dt[t.pfp_data]||Dt[22]}`:`https://uploads.meower.org/icons/${t.avatar}`}`,v=`#${t.avatar_color}`,C=o&&o.e?Ig(o.e):"Invalid time",R=I.useMemo(()=>IG(e),[e]),x=I.useMemo(()=>`${yf(n)} +`)};function Ya(){return Ya=Object.assign||function(e){for(var t=1;t=c.top+c.height||f.left+f.width>=c.left+c.width)d++;else break}return u},qG=0,HG=function(){var t=document.getElementById("popup-root");return t===null&&(t=document.createElement("div"),t.setAttribute("id","popup-root"),document.body.appendChild(t)),t},VG=I.forwardRef(function(e,t){var n=e.trigger,r=n===void 0?null:n,a=e.onOpen,i=a===void 0?function(){}:a,o=e.onClose,s=o===void 0?function(){}:o,l=e.defaultOpen,u=l===void 0?!1:l,d=e.open,c=d===void 0?void 0:d,p=e.disabled,f=p===void 0?!1:p,b=e.nested,y=b===void 0?!1:b,S=e.closeOnDocumentClick,h=S===void 0?!0:S,g=e.repositionOnResize,m=g===void 0?!0:g,D=e.closeOnEscape,k=D===void 0?!0:D,v=e.on,C=v===void 0?["click"]:v,R=e.contentStyle,x=R===void 0?{}:R,A=e.arrowStyle,N=A===void 0?{}:A,M=e.overlayStyle,H=M===void 0?{}:M,z=e.className,$=z===void 0?"":z,V=e.position,K=V===void 0?"bottom center":V,O=e.modal,F=O===void 0?!1:O,w=e.lockScroll,P=w===void 0?!1:w,G=e.arrow,_=G===void 0?!0:G,Q=e.offsetX,pe=Q===void 0?0:Q,Z=e.offsetY,be=Z===void 0?0:Z,Ne=e.mouseEnterDelay,xt=Ne===void 0?100:Ne,lt=e.mouseLeaveDelay,It=lt===void 0?100:lt,Sr=e.keepTooltipInside,Hn=Sr===void 0?!1:Sr,Dr=e.children,pa=I.useState(c||u),ut=pa[0],fa=pa[1],Nt=I.useRef(null),Be=I.useRef(null),qt=I.useRef(null),Ri=I.useRef(null),xi=I.useRef("popup-"+ ++qG),He=F?!0:!r,Vn=I.useRef(0);UG(function(){return ut?(Ri.current=document.activeElement,bn(),Ot(),ct()):tn(),function(){clearTimeout(Vn.current)}},[ut]),I.useEffect(function(){typeof c=="boolean"&&(c?wr():L())},[c,f]);var wr=function(re){ut||f||(fa(!0),setTimeout(function(){return i(re)},0))},L=function(re){var Je;!ut||f||(fa(!1),He&&((Je=Ri.current)===null||Je===void 0||Je.focus()),setTimeout(function(){return s(re)},0))},j=function(re){re==null||re.stopPropagation(),ut?L(re):wr(re)},Y=function(re){clearTimeout(Vn.current),Vn.current=setTimeout(function(){return wr(re)},xt)},ee=function(re){re==null||re.preventDefault(),j()},oe=function(re){clearTimeout(Vn.current),Vn.current=setTimeout(function(){return L(re)},It)},ct=function(){He&&P&&(document.getElementsByTagName("body")[0].style.overflow="hidden")},tn=function(){He&&P&&(document.getElementsByTagName("body")[0].style.overflow="auto")},Ot=function(){var re,Je=Be==null||(re=Be.current)===null||re===void 0?void 0:re.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'),Re=Array.prototype.slice.call(Je)[0];Re==null||Re.focus()};I.useImperativeHandle(t,function(){return{open:function(){wr()},close:function(){L()},toggle:function(){j()}}});var bn=function(){if(!(He||!ut)&&!(!(Nt!=null&&Nt.current)||!(Nt!=null&&Nt.current)||!(Be!=null&&Be.current))){var re=Nt.current.getBoundingClientRect(),Je=Be.current.getBoundingClientRect(),Re=GG(re,Je,K,_,{offsetX:pe,offsetY:be},Hn);if(Be.current.style.top=Re.top+window.scrollY+"px",Be.current.style.left=Re.left+window.scrollX+"px",_&&qt.current){var Yn,ga;qt.current.style.transform=Re.transform,qt.current.style.setProperty("-ms-transform",Re.transform),qt.current.style.setProperty("-webkit-transform",Re.transform),qt.current.style.top=((Yn=N.top)===null||Yn===void 0?void 0:Yn.toString())||Re.arrowTop,qt.current.style.left=((ga=N.left)===null||ga===void 0?void 0:ga.toString())||Re.arrowLeft}}};FG(L,k),BG(Be,ut&&He),MG(bn,m),PG(r?[Be,Nt]:[Be],L,h&&!y);var Wn=function(){for(var re={key:"T",ref:Nt,"aria-describedby":xi.current},Je=Array.isArray(C)?C:[C],Re=0,Yn=Je.length;Re=0&&(Je.onMouseEnter=Y,Je.onMouseLeave=oe),Je},nn=function(){return se.createElement("div",Object.assign({},Ve(),{key:"C",role:He?"dialog":"tooltip",id:xi.current}),_&&!He&&se.createElement("div",{ref:qt,style:Ca.popupArrow},se.createElement("svg",{"data-testid":"arrow",className:"popup-arrow "+($!==""?$.split(" ").map(function(re){return re+"-arrow"}).join(" "):""),viewBox:"0 0 32 16",style:Ya({position:"absolute"},N)},se.createElement("path",{d:"M16 0l16 16H0z",fill:"currentcolor"}))),Dr&&typeof Dr=="function"?Dr(L,ut):Dr)},Lt=!(C.indexOf("hover")>=0),M_=He?Ca.overlay.modal:Ca.overlay.tooltip,P_=[Lt&&se.createElement("div",{key:"O","data-testid":"overlay","data-popup":He?"modal":"tooltip",className:"popup-overlay "+($!==""?$.split(" ").map(function(Oe){return Oe+"-overlay"}).join(" "):""),style:Ya({},M_,H,{pointerEvents:h&&y||He?"auto":"none"}),onClick:h&&y?L:void 0,tabIndex:-1},He&&nn()),!He&&nn()];return se.createElement(se.Fragment,null,Wn(),ut&&Na.createPortal(P_,HG()))});const N_=({src:e,alt:t})=>{var r;const n=(r=e.split(".").pop())==null?void 0:r.toLowerCase();if(e.includes("emoji"))return E.jsx("img",{src:e,alt:t,style:{maxWidth:"20px"},title:t});if(e.endsWith("?preview"))return E.jsx("img",{src:e,alt:t,style:{height:"auto",width:"auto",maxHeight:"375px"},title:e});switch(n){case"wav":case"mp3":case"aac":case"flac":return E.jsx("audio",{src:e,controls:!0,style:{maxHeight:"375px",objectPosition:"50% 50%"},title:e});case"mp4":case"webm":case"ogg":case"mov":case"avi":case"mkv":case"wmv":return E.jsx("video",{src:e,controls:!0,style:{maxHeight:"375px",objectPosition:"50% 50%"},title:e});case"pdf":case"doc":case"docx":case"xls":case"xlsx":case"ppt":case"pptx":return n==="pdf"?E.jsx("embed",{src:e,type:"application/pdf",width:"100%",height:"800px"}):E.jsx("iframe",{src:`https://docs.google.com/viewer?url=${encodeURIComponent(e)}&embedded=true`,width:"100%",height:"800px",style:{border:"none"},title:"Document Viewer"});case"jpg":case"jpeg":case"png":case"gif":case"bmp":case"tiff":case"webp":case"svg":case"blob?preview":return E.jsx(E.Fragment,{children:E.jsx(VG,{trigger:E.jsx("img",{src:e,alt:t,style:{height:"auto",width:"auto",maxHeight:"200px",cursor:"pointer"},title:e}),position:"center center",modal:!0,children:E.jsxs("center",{children:[E.jsx("img",{src:e,alt:t,style:{maxWidth:"800px",maxHeight:"600px"},title:e}),E.jsx("br",{}),E.jsxs("a",{href:e,download:!0,children:["Download ",e.split("/").pop()]})]})})});default:return E.jsxs("div",{className:"attachment-container",style:{textAlign:"center",width:"fit-content"},children:[E.jsx("p",{children:"Cannot display the file(s) directly."}),E.jsxs("a",{href:e,download:!0,children:["Download ",e.split("/").pop()]})]})}},WG=e=>{if(!e){console.log("Too far away booooo");return}const t=document.getElementById(e);t?t.scrollIntoView({behavior:"smooth"}):console.log(`Element with ID ${e} not found`)},YG=({attachments:e,author:t,post:n,post_id:r,reactions:a,reply_to:i,time:o,user:s,active:l,edited:u})=>{const{setPost:d,userToken:c}=Me(),{replyIds:p,setReplyIds:f}=Me(),{userData:b}=Me(),y=b==null?void 0:b.username,[S,h]=I.useState(!1),[g,m]=I.useState(yf(n)),D=I.useCallback(()=>{d(z=>`@${s} ${z}`),window.scrollTo({top:200,behavior:"smooth"})},[d,s,n]),k=`${t.avatar===""?t.pfp_data===-3?"/furrchat/assets/default_pfps/icon_guest-e8db7c16.svg":`${Dt[t.pfp_data]||Dt[22]}`:`https://uploads.meower.org/icons/${t.avatar}`}`,v=`#${t.avatar_color}`,C=o&&o.e?Ig(o.e):"Invalid time",R=I.useMemo(()=>IG(e),[e]),x=I.useMemo(()=>`${yf(n)} ${R}`,[n,R]),A=I.useMemo(()=>{const z=zL();return da(x,!1).split("").filter(V=>z.test(V)).join("")===x},[x]),N=I.useCallback(z=>{m(z.target.value)},[]),M=I.useCallback(async()=>{if(!r||!c)return console.error("Post ID or user token is missing.");try{await AG(r,c,g),h(!1)}catch(z){console.error("Error saving edited post:",z)}},[r,c,g]),H=()=>{const z=JSON.stringify({author:t._id,post:n,post_id:r,avatar:t.avatar,pfp_data:t.pfp_data});z&&!p.includes(z)&&f($=>[...$,z]),window.scrollTo({top:200,behavior:"smooth"})};return E.jsxs("div",{id:r||"",className:"container",children:[E.jsxs("div",{className:"user",children:[E.jsxs(Ut,{to:`/users/${s}`,children:[E.jsxs("span",{className:"post-pfp-container",children:[E.jsx("img",{src:k,alt:"pfp",className:"post-pfp",width:"48",height:"48",style:{borderRadius:"5px",border:`1px solid ${v}`,boxShadow:"0 2px 1px rgba(0, 0, 0, 0.2), 0 2px 0 0 rgba(255, 255, 255, 0.7)",objectFit:"cover"}}),l?E.jsx("span",{className:"online-indicator",title:"Online"}):E.jsx("span",{className:"offline-indicator",title:"Offline"})]})," "]}),E.jsx("p",{className:"post-username-text",children:E.jsxs("strong",{children:[mN[s]||""," ",s]})})]}),E.jsxs("div",{className:"post-content",children:[E.jsx("div",{className:"timestamp",children:E.jsxs("i",{children:[C," ",u?"(edited)":""]})}),S?E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"postmessage",style:{fontSize:A?"20px":"10px"},children:[" ",E.jsx("span",{style:{fontSize:"10px"},children:uk(i)})]}),E.jsxs("div",{style:{display:"flex",paddingTop:"10px"},children:[E.jsx("textarea",{value:g,onChange:N,className:"edit-box",onKeyDown:z=>{z.key==="Enter"&&z.shiftKey?(z.preventDefault(),d(n+` `)):z.key==="Enter"&&sendPost(z)},autoFocus:!0}),E.jsx("button",{className:"edit-button",onClick:M,children:"Save"})]})]}):E.jsxs("div",{className:"postmessage",style:{fontSize:A?"20px":"10px"},children:[E.jsx("span",{style:{fontSize:"10px"},children:uk(i)}),E.jsx(Ci,{remarkPlugins:[x_],components:{code({node:z,className:$,children:V,...K}){const O=/language-(\w+)/.exec($||`h -/`),F=!O;return!F&&O?E.jsx(mh,{children:String(V).replace(/\n\n\n$/,""),style:s_,language:O[1],PreTag:"div",...K,inline:F}):E.jsx("code",{className:$,...K,children:V})},img:N_},children:yf(x)})]}),E.jsx("hr",{}),E.jsxs("div",{className:"social",style:{display:"flex"},children:[E.jsx("div",{className:"reactions",children:I_(a)}),E.jsxs("div",{style:{marginLeft:"auto"},children:[E.jsxs("button",{className:"social-buttons",id:"ReplyButton",onClick:()=>H(),"data-reply-id":r,children:[E.jsx("img",{src:"/furrchat/assets/icons/Reply.png",height:9})," ","Reply"]}),s===y?E.jsxs(E.Fragment,{children:[E.jsxs("button",{className:"social-buttons",id:"DeleteButton",onClick:()=>CG(r,c),children:[E.jsx("img",{src:"/furrchat/assets/icons/Delete.png",height:9})," ","Delete"]}),E.jsxs("button",{className:"social-buttons",id:"EditButton",onClick:()=>h(!0),children:[E.jsx("img",{src:"/furrchat/assets/icons/Edit.png",height:9})," ","Edit"]})]}):"",E.jsxs("button",{className:"social-buttons",id:"QuoteButton",onClick:D,children:[E.jsx("img",{src:"/furrchat/assets/icons/Quote.png",height:9})," Quote"]})]})]})]})]})},vh=se.memo(YG);function Sh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ag(e,t)}function KG(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function XG(e,t){e.classList?e.classList.add(t):KG(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function ck(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function ZG(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=ck(e.className,t):e.setAttribute("class",ck(e.className&&e.className.baseVal||"",t))}const dk={disabled:!1},Wo=se.createContext(null);var O_=function(t){return t.scrollTop},Fa="unmounted",Jn="exited",er="entering",xr="entered",Og="exiting",hn=function(e){Sh(t,e);function t(r,a){var i;i=e.call(this,r,a)||this;var o=a,s=o&&!o.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=Jn,i.appearStatus=er):l=xr:r.unmountOnExit||r.mountOnEnter?l=Fa:l=Jn,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(a,i){var o=a.in;return o&&i.status===Fa?{status:Jn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(a){var i=null;if(a!==this.props){var o=this.state.status;this.props.in?o!==er&&o!==xr&&(i=er):(o===er||o===xr)&&(i=Og)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var a=this.props.timeout,i,o,s;return i=o=s=a,a!=null&&typeof a!="number"&&(i=a.exit,o=a.enter,s=a.appear!==void 0?a.appear:o),{exit:i,enter:o,appear:s}},n.updateStatus=function(a,i){if(a===void 0&&(a=!1),i!==null)if(this.cancelNextCallback(),i===er){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:Na.findDOMNode(this);o&&O_(o)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jn&&this.setState({status:Fa})},n.performEnter=function(a){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:a,l=this.props.nodeRef?[s]:[Na.findDOMNode(this),s],u=l[0],d=l[1],c=this.getTimeouts(),p=s?c.appear:c.enter;if(!a&&!o||dk.disabled){this.safeSetState({status:xr},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:er},function(){i.props.onEntering(u,d),i.onTransitionEnd(p,function(){i.safeSetState({status:xr},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var a=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:Na.findDOMNode(this);if(!i||dk.disabled){this.safeSetState({status:Jn},function(){a.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Og},function(){a.props.onExiting(s),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:Jn},function(){a.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(a,i){i=this.setNextCallback(i),this.setState(a,i)},n.setNextCallback=function(a){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,a(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(a,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:Na.findDOMNode(this),s=a==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],u=l[0],d=l[1];this.props.addEndListener(u,d)}a!=null&&setTimeout(this.nextCallback,a)},n.render=function(){var a=this.state.status;if(a===Fa)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=ys(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return se.createElement(Wo.Provider,{value:null},typeof o=="function"?o(a,s):se.cloneElement(se.Children.only(o),s))},t}(se.Component);hn.contextType=Wo;hn.propTypes={};function Ar(){}hn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ar,onEntering:Ar,onEntered:Ar,onExit:Ar,onExiting:Ar,onExited:Ar};hn.UNMOUNTED=Fa;hn.EXITED=Jn;hn.ENTERING=er;hn.ENTERED=xr;hn.EXITING=Og;var QG=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return XG(t,r)})},Ef=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return ZG(t,r)})},Dh=function(e){Sh(t,e);function t(){for(var r,a=arguments.length,i=new Array(a),o=0;o{const{userToken:n}=Me(),[r,a]=I.useState([]),[i,o]=I.useState([]),[s,l]=I.useState(!1),[u,d]=I.useState(!0),[c,p]=I.useState(1),f=new Set((JSON.parse(localStorage.getItem("userData")||"{}").relationships||[]).filter(S=>S.state===2).map(S=>S.username));I.useEffect(()=>(pk.onmessage=S=>{const h=JSON.parse(S.data);y(h)},()=>{pk.onmessage=null}),[r,i]);const b=I.useCallback(async S=>{l(!0);try{const h=e==="groupchats"&&t?`https://api.meower.org/posts/${t}?page=${S}`:`https://api.meower.org/home?page=${S}`,m=await fetch(h,{headers:n?{Token:n}:{}});if(m.ok){const k=(await m.json()).autoget||[];a(v=>[...v,...k]),d(k.length>0)}}catch(h){console.error("An error occurred:",h)}finally{l(!1)}},[e,t,n]);I.useEffect(()=>{b(c)},[c,b]),I.useEffect(()=>{const S=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight&&u&&!s&&p(h=>h+1)};return window.addEventListener("scroll",S),()=>window.removeEventListener("scroll",S)},[u,s]);const y=S=>{const{cmd:h,val:g}=S;if(console.log(S),!!g)switch(h){case"post":(g.post_origin===t||e==="home"&&g.post_origin===e)&&a(m=>[g,...m]);break;case"ulist":o(g.split(";").slice(0,-1));break;case"update_post":a(r.map(m=>m._id===g._id?g:m));break;case"delete_post":a(r.filter(m=>m._id!==g.post_id));break;case"post_reaction_add":case"post_reaction_remove":a(r.map(m=>{if(m.post_id!==g.post_id)return m;const D=m.reactions.map(k=>k.emoji===g.emoji?(k.count=h==="post_reaction_add"?k.count+1:k.count-1,k.count<=0?null:k):k).filter(Boolean);return h==="post_reaction_add"&&!D.some(k=>k.emoji===g.emoji)&&D.push({emoji:g.emoji,count:1}),{...m,reactions:D}}));break;default:console.warn(`Unhandled command: ${h}`);break}};return E.jsxs(E.Fragment,{children:[E.jsx(kh,{children:r.filter(S=>!f.has(S.u)).map(S=>{var h;return E.jsx(Dh,{timeout:500,classNames:"post-transition",children:E.jsx(vh,{_id:S._id||"",attachments:S.attachments||[],isDeleted:S.isDeleted||!1,post:S.p||"",pinned:S.pinned||!1,post_id:S.post_id||null,post_origin:S.post_origin||null,time:{e:S.edited_at||((h=S.t)==null?void 0:h.e)||0},type:S.type||0,user:S.u||"unknown",active:i.includes(S.u),edited:!!S.edited_at,author:S.author,reactions:S.reactions,reply_to:S.reply_to,u:void 0,p:void 0})},S._id||Math.random())})}),s&&E.jsx("p",{children:"Loading more posts..."})]})},ks=I.memo(aq);async function iq({file:e,userToken:t}){const n=new FormData;n.append("file",e);const r=await fetch("https://uploads.meower.org/emojis",{method:"POST",body:n,headers:{Authorization:t}});if(!r.ok){const i=await r.text();throw console.error(`Failed to upload file: ${e.name}. Status: ${r.status}. Response: ${i}`),new Error(`Failed to upload file: ${e.name}`)}const a=await r.json();return console.log("Upload successful:",a),a.id}const oq=({onEmojiSelect:e,src:t,chatID:n})=>{const[r,a]=I.useState(!1),[i,o]=I.useState(""),[s,l]=I.useState("Smilies"),[u,d]=I.useState(JSON.parse(localStorage.getItem("userEmojis")||"{}")),c=I.useRef(null),{userData:p}=Me(),f=p==null?void 0:p.token;I.useEffect(()=>{(async()=>{if(n&&f)try{const v=await fetch(`https://api.meower.org/chats/${n}`,{headers:{Token:f}});if(v.ok){const C=await v.json();if(!C.error&&C.emojis){const R=C.emojis.reduce((x,A)=>{const N=`https://uploads.meower.org/emojis/${A._id}`;return x[`<:${A._id}>`]=N,x},{});d(x=>({...x,...R}))}}}catch(v){console.error("Error fetching emojis:",v)}})()},[n,f]);const b={Smilies:Object.entries(BC),Emoticons:fN.map(k=>[k,k]),PBJ:Object.entries(hg),Discord:Object.entries(UC),GIFS:Object.entries(gN),Custom:Object.entries(u)},y=k=>e(k),S=k=>o(k.target.value),h=k=>l(k),g=async k=>{if(k.target.files&&f)for(const v of k.target.files)try{const C=await iq({file:v,userToken:f}),R=`https://uploads.meower.org/emojis/${C}`,x={...u,[`<:${C}>`]:R};d(x),localStorage.setItem("userEmojis",JSON.stringify(x))}catch(C){console.error("Failed to upload emoji:",C)}},m=k=>{const v={...u};delete v[k],d(v),localStorage.setItem("userEmojis",JSON.stringify(v))},D=k=>k.filter(([v])=>v.toLowerCase().includes(i.toLowerCase())).sort(([v],[C])=>v.localeCompare(C)).map(([v,C],R)=>{const x=s==="Emoticons";return E.jsx("span",{onClick:()=>y(s==="GIFS"?`![${v}](${C})`:x?v:s==="Discord"?C:v),className:x?"emoticon-item":"emoji-item",style:{height:s==="GIFS"?"64px":"24px"},children:s==="Discord"?E.jsx("img",{src:`https://cdn.discordapp.com/emojis/${C.split(":")[2].slice(0,-1)}.${C.startsWith("{A.preventDefault(),m(v)},style:{cursor:"pointer"}},v)}):E.jsx("img",{src:C,alt:v,title:v})},R)});return E.jsxs("div",{className:"emoji-picker-container",children:[E.jsx("img",{src:t,alt:"Emojis",className:"markdown-item",title:"Emojis",onClick:()=>a(k=>!k)}),r&&E.jsxs("div",{className:"emoji-picker",ref:c,children:[E.jsx("div",{className:"emoji-categories",children:Object.keys(b).map(k=>E.jsx("button",{style:{background:s===k?"linear-gradient(to bottom, rgb(230, 230, 230) 0%, rgb(205, 205, 205) 100%)":"linear-gradient(to bottom, rgb(255, 255, 255) 0%, rgb(230, 230, 230) 100%)",border:"none"},onClick:()=>h(k),children:k},k))}),E.jsx("div",{className:"emoji-list",style:{display:s==="Emoticons"?"block":"grid",gridTemplateColumns:s==="GIFS"?"repeat(auto-fit, minmax(60px, 1fr))":"repeat(auto-fit, minmax(30px, 1fr))",gap:"5px",padding:s==="Emoticons"?"10px":0},children:D(b[s])}),E.jsxs("span",{style:{display:"flex"},children:[E.jsx("input",{id:"emoji-search",type:"text",placeholder:"Search emojis...",value:i,onChange:S}),s==="Custom"&&E.jsxs("span",{className:"search-input-container",children:[E.jsx("button",{id:"file-upload-as-emoji",onClick:()=>{var k;return(k=document.getElementById("file-input"))==null?void 0:k.click()},children:E.jsx("img",{src:"/furrchat/assets/icons/emoji_upload.png",height:"24px",alt:"Upload Emoji"})}),E.jsx("input",{id:"file-input",type:"file",accept:".webp, .png, .jpeg, .gif",multiple:!0,onChange:g,style:{display:"none"}})]})]})]})]})};function sq({options:e,onSelect:t}){const[n,r]=I.useState(!1),a=()=>{r(!n)},i=o=>{t(o),r(!1)};return E.jsxs("div",{className:"dropdown",children:[E.jsx("img",{src:"/furrchat/assets/markdown/T.png",onClick:a,className:"markdown-item"}),n&&E.jsx("div",{className:"dropdown-menu",style:{boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px",borderRadius:"4px",padding:"8px"},children:E.jsx("select",{onChange:o=>i({value:o.target.value,label:o.target.value}),style:{padding:"8px",boxShadow:"1px solid #ccc",borderRadius:"4px"},children:e.map(o=>E.jsx("option",{value:o.value,style:{padding:"4px"},children:o.label},o.value))})})]})}const lq=async({file:e,userToken:t})=>{const n=new FormData;n.append("file",e);const r=await fetch("https://uploads.meower.org/attachments",{method:"POST",body:n,headers:{Authorization:t}});if(!r.ok)throw new Error(`Failed to upload file(s): ${e.name}`);return(await r.json()).id},uq=({userToken:e,context:t,chatId:n})=>{const{post:r,setPost:a}=Me(),{replyIds:i,setReplyIds:o}=Me(),[s,l]=I.useState([]),[u,d]=I.useState(0),[c,p]=I.useState(0),[f,b]=I.useState(!1);let y=null;const S=async C=>{C.preventDefault();const R=await Promise.all(s.map(N=>lq({file:N,userToken:e}))),x=Array.isArray(i)?i.map(N=>JSON.parse(N)).map(N=>N.post_id).filter(N=>N):[],A={content:r,attachments:R,reply_to:x};t==="groupchats"&&n&&(A.chatId=n),fetch(t==="home"?"https://api.meower.org/home":`https://api.meower.org/posts/${n}`,{method:"POST",body:JSON.stringify(A),headers:{"Content-Type":"application/json",Token:e}}).then(N=>N.json()).then(N=>{console.log(N),a(""),l([]),o([])}).catch(N=>{console.error("Error sending post:",N)})},h=C=>{let R=c+C.length;const x=r.substring(c,u),A=r.substring(0,c)+C+x+r.substring(u);R+=x.length+C.length,a(A)},g=(C,R=!0)=>{const x=r.substring(c,u);let A=r,N=c+C.length;R?(A=r.substring(0,c)+C+x+C+r.substring(u),N+=x.length+C.length):(A=r.substring(0,c)+C+x+r.substring(u),N+=C.length),a(A),p(N),d(N)},m=()=>{fetch(t==="home"?"https://api.meower.org/home/typing":`https://api.meower.org/chats/${n}/typing`,{method:"POST",headers:{"Content-Type":"application/json",Token:e}})},D=C=>{const R=C.target.files;if(R){const x=Array.from(R);l(A=>[...A,...x])}};function k(C){const R=new DataTransfer;return C.forEach(x=>R.items.add(x)),R.files}const v=async C=>{var x;const R=(x=C.clipboardData)==null?void 0:x.items;if(R){for(const A of R)if(A.kind==="file"&&A.type.startsWith("image/")){const N=A.getAsFile();if(console.log(N),N){const M=new File([N],`i-really-love-soup.${N.type.split("/")[1]}`,{type:N.type});D({target:{files:k([M])}})}}}};return I.useEffect(()=>(document.addEventListener("paste",v),()=>{document.removeEventListener("paste",v)}),[]),E.jsxs("div",{children:[E.jsx("div",{className:"attachments",style:{borderRadius:"2px"},children:i.map((C,R)=>E.jsxs("div",{className:"attachment-container",style:{display:"flex"},children:[E.jsx("div",{className:"reply",children:E.jsxs("i",{children:[JSON.parse(C).avatar?E.jsx("img",{src:JSON.parse(C).avatar===""?JSON.parse(C).pfp_data===-3?"/furrchat/assets/default_pfps/icon_guest-e8db7c16.svg":`${Dt[34-JSON.parse(C).pfp_data]}`:`https://uploads.meower.org/icons/${JSON.parse(C).avatar}`,alt:"reply pfp",width:"16",height:"16",style:{paddingRight:5}}):null,E.jsx("b",{children:JSON.parse(C).author}),": ",JSON.parse(C).post]})}),E.jsx("button",{onClick:()=>{const x=[...i];x.splice(R,1),o(x)},style:{width:"20px",height:"25px",float:"right"},children:"X"})]},R))}),E.jsxs("div",{className:"markdown-buttons",children:[E.jsx("img",{src:"/furrchat/assets/markdown/B.png",id:"bold",className:"markdown-item",onClick:()=>g("**")}),E.jsx("img",{src:"/furrchat/assets/markdown/I.png",id:"italic",className:"markdown-item",onClick:()=>g("*")}),E.jsx("img",{src:"/furrchat/assets/markdown/S.png",id:"strikethrough",className:"markdown-item",onClick:()=>g("~~")}),E.jsx(sq,{options:hN,onSelect:C=>g(C.value+" ",!1)}),E.jsx(oq,{onEmojiSelect:h,src:"/furrchat/assets/markdown/E.png",chatID:n}),E.jsx("img",{src:"/furrchat/assets/markdown/Q.png",id:"unorderedlist",className:"markdown-item",onClick:()=>g(` +/`),F=!O;return!F&&O?E.jsx(mh,{children:String(V).replace(/\n\n\n$/,""),style:s_,language:O[1],PreTag:"div",...K,inline:F}):E.jsx("code",{className:$,...K,children:V})},img:N_},children:yf(x)})]}),E.jsx("hr",{}),E.jsxs("div",{className:"social",style:{display:"flex"},children:[E.jsx("div",{className:"reactions",children:I_(a)}),E.jsxs("div",{style:{marginLeft:"auto"},children:[E.jsxs("button",{className:"social-buttons",id:"ReplyButton",onClick:()=>H(),"data-reply-id":r,children:[E.jsx("img",{src:"/furrchat/assets/icons/Reply.png",height:9})," ","Reply"]}),s===y?E.jsxs(E.Fragment,{children:[E.jsxs("button",{className:"social-buttons",id:"DeleteButton",onClick:()=>CG(r,c),children:[E.jsx("img",{src:"/furrchat/assets/icons/Delete.png",height:9})," ","Delete"]}),E.jsxs("button",{className:"social-buttons",id:"EditButton",onClick:()=>h(!0),children:[E.jsx("img",{src:"/furrchat/assets/icons/Edit.png",height:9})," ","Edit"]})]}):"",E.jsxs("button",{className:"social-buttons",id:"QuoteButton",onClick:D,children:[E.jsx("img",{src:"/furrchat/assets/icons/Quote.png",height:9})," Quote"]})]})]})]})]})},vh=se.memo(YG);function Sh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ag(e,t)}function KG(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function XG(e,t){e.classList?e.classList.add(t):KG(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function ck(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function ZG(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=ck(e.className,t):e.setAttribute("class",ck(e.className&&e.className.baseVal||"",t))}const dk={disabled:!1},Wo=se.createContext(null);var O_=function(t){return t.scrollTop},Fa="unmounted",Jn="exited",er="entering",xr="entered",Og="exiting",hn=function(e){Sh(t,e);function t(r,a){var i;i=e.call(this,r,a)||this;var o=a,s=o&&!o.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=Jn,i.appearStatus=er):l=xr:r.unmountOnExit||r.mountOnEnter?l=Fa:l=Jn,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(a,i){var o=a.in;return o&&i.status===Fa?{status:Jn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(a){var i=null;if(a!==this.props){var o=this.state.status;this.props.in?o!==er&&o!==xr&&(i=er):(o===er||o===xr)&&(i=Og)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var a=this.props.timeout,i,o,s;return i=o=s=a,a!=null&&typeof a!="number"&&(i=a.exit,o=a.enter,s=a.appear!==void 0?a.appear:o),{exit:i,enter:o,appear:s}},n.updateStatus=function(a,i){if(a===void 0&&(a=!1),i!==null)if(this.cancelNextCallback(),i===er){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:Na.findDOMNode(this);o&&O_(o)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jn&&this.setState({status:Fa})},n.performEnter=function(a){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:a,l=this.props.nodeRef?[s]:[Na.findDOMNode(this),s],u=l[0],d=l[1],c=this.getTimeouts(),p=s?c.appear:c.enter;if(!a&&!o||dk.disabled){this.safeSetState({status:xr},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:er},function(){i.props.onEntering(u,d),i.onTransitionEnd(p,function(){i.safeSetState({status:xr},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var a=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:Na.findDOMNode(this);if(!i||dk.disabled){this.safeSetState({status:Jn},function(){a.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Og},function(){a.props.onExiting(s),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:Jn},function(){a.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(a,i){i=this.setNextCallback(i),this.setState(a,i)},n.setNextCallback=function(a){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,a(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(a,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:Na.findDOMNode(this),s=a==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],u=l[0],d=l[1];this.props.addEndListener(u,d)}a!=null&&setTimeout(this.nextCallback,a)},n.render=function(){var a=this.state.status;if(a===Fa)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=ys(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return se.createElement(Wo.Provider,{value:null},typeof o=="function"?o(a,s):se.cloneElement(se.Children.only(o),s))},t}(se.Component);hn.contextType=Wo;hn.propTypes={};function Ar(){}hn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ar,onEntering:Ar,onEntered:Ar,onExit:Ar,onExiting:Ar,onExited:Ar};hn.UNMOUNTED=Fa;hn.EXITED=Jn;hn.ENTERING=er;hn.ENTERED=xr;hn.EXITING=Og;var QG=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return XG(t,r)})},Ef=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return ZG(t,r)})},Dh=function(e){Sh(t,e);function t(){for(var r,a=arguments.length,i=new Array(a),o=0;o{const{userToken:n}=Me(),[r,a]=I.useState([]),[i,o]=I.useState([]),[s,l]=I.useState(!1),[u,d]=I.useState(!0),[c,p]=I.useState(1),f=new Set((JSON.parse(localStorage.getItem("userData")||"{}").relationships||[]).filter(S=>S.state===2).map(S=>S.username));I.useEffect(()=>(pk.onmessage=S=>{const h=JSON.parse(S.data);y(h)},()=>{pk.onmessage=null}),[r,i]);const b=I.useCallback(async S=>{l(!0);try{const h=e==="groupchats"&&t?`https://api.meower.org/posts/${t}?page=${S}`:`https://api.meower.org/home?page=${S}`,m=await fetch(h,{headers:n?{Token:n}:{}});if(m.ok){const k=(await m.json()).autoget||[];a(v=>[...v,...k]),d(k.length>0)}}catch(h){console.error("An error occurred:",h)}finally{l(!1)}},[e,t,n]);I.useEffect(()=>{b(c)},[c,b]),I.useEffect(()=>{const S=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight&&u&&!s&&p(h=>h+1)};return window.addEventListener("scroll",S),()=>window.removeEventListener("scroll",S)},[u,s]);const y=S=>{const{cmd:h,val:g}=S;if(console.log(S),!!g)switch(h){case"post":(g.post_origin===t||e==="home"&&g.post_origin===e)&&a(m=>[g,...m]);break;case"ulist":o(g.split(";").slice(0,-1));break;case"update_post":a(r.map(m=>m._id===g._id?g:m));break;case"delete_post":a(r.filter(m=>m._id!==g.post_id));break;case"post_reaction_add":case"post_reaction_remove":a(r.map(m=>{if(m.post_id!==g.post_id)return m;const D=m.reactions.map(k=>k.emoji===g.emoji?(k.count=h==="post_reaction_add"?k.count+1:k.count-1,k.count<=0?null:k):k).filter(Boolean);return h==="post_reaction_add"&&!D.some(k=>k.emoji===g.emoji)&&D.push({emoji:g.emoji,count:1}),{...m,reactions:D}}));break;default:console.warn(`Unhandled command: ${h}`);break}};return E.jsxs(E.Fragment,{children:[E.jsx(kh,{children:r.filter(S=>!f.has(S.u)).map(S=>{var h;return E.jsx(Dh,{timeout:500,classNames:"post-transition",children:E.jsx(vh,{_id:S._id||"",attachments:S.attachments||[],isDeleted:S.isDeleted||!1,post:S.p||"",pinned:S.pinned||!1,post_id:S.post_id||null,post_origin:S.post_origin||null,time:{e:S.edited_at||((h=S.t)==null?void 0:h.e)||0},type:S.type||0,user:S.u||"unknown",active:i.includes(S.u),edited:!!S.edited_at,author:S.author,reactions:S.reactions,reply_to:S.reply_to,u:void 0,p:void 0})},S._id||Math.random())})}),s&&E.jsx("p",{children:"Loading more posts..."})]})},ks=I.memo(aq);async function iq({file:e,userToken:t}){const n=new FormData;n.append("file",e);const r=await fetch("https://uploads.meower.org/emojis",{method:"POST",body:n,headers:{Authorization:t}});if(!r.ok){const i=await r.text();throw console.error(`Failed to upload file: ${e.name}. Status: ${r.status}. Response: ${i}`),new Error(`Failed to upload file: ${e.name}`)}const a=await r.json();return console.log("Upload successful:",a),a.id}const oq=({onEmojiSelect:e,src:t,chatID:n})=>{const[r,a]=I.useState(!1),[i,o]=I.useState(""),[s,l]=I.useState("Smilies"),[u,d]=I.useState(JSON.parse(localStorage.getItem("userEmojis")||"{}")),c=I.useRef(null),{userData:p}=Me(),f=p==null?void 0:p.token;I.useEffect(()=>{(async()=>{if(n&&f)try{const v=await fetch(`https://api.meower.org/chats/${n}`,{headers:{Token:f}});if(v.ok){const C=await v.json();if(!C.error&&C.emojis){const R=C.emojis.reduce((x,A)=>{const N=`https://uploads.meower.org/emojis/${A._id}`;return x[`<:${A._id}>`]=N,x},{});d(x=>({...x,...R}))}}}catch(v){console.error("Error fetching emojis:",v)}})()},[n,f]);const b={Smilies:Object.entries(BC),Emoticons:fN.map(k=>[k,k]),PBJ:Object.entries(hg),Discord:Object.entries(UC),GIFS:Object.entries(gN),Custom:Object.entries(u)},y=k=>e(k),S=k=>o(k.target.value),h=k=>l(k),g=async k=>{if(k.target.files&&f)for(const v of k.target.files)try{const C=await iq({file:v,userToken:f}),R=`https://uploads.meower.org/emojis/${C}`,x={...u,[`<:${C}>`]:R};d(x),localStorage.setItem("userEmojis",JSON.stringify(x))}catch(C){console.error("Failed to upload emoji:",C)}},m=k=>{const v={...u};delete v[k],d(v),localStorage.setItem("userEmojis",JSON.stringify(v))},D=k=>k.filter(([v])=>v.toLowerCase().includes(i.toLowerCase())).sort(([v],[C])=>v.localeCompare(C)).map(([v,C],R)=>{const x=s==="Emoticons";return E.jsx("span",{onClick:()=>y(s==="GIFS"?`![${v}](${C})`:x?v:s==="Discord"?C:v),className:x?"emoticon-item":"emoji-item",style:{height:s==="GIFS"?"64px":"24px"},children:s==="Discord"?E.jsx("img",{src:`https://cdn.discordapp.com/emojis/${C.split(":")[2].slice(0,-1)}.${C.startsWith("{A.preventDefault(),m(v)},style:{cursor:"pointer"}},v)}):E.jsx("img",{src:C,alt:v,title:v})},R)});return E.jsxs("div",{className:"emoji-picker-container",children:[E.jsx("img",{src:t,alt:"Emojis",className:"markdown-item",title:"Emojis",onClick:()=>a(k=>!k)}),r&&E.jsxs("div",{className:"emoji-picker",ref:c,children:[E.jsx("div",{className:"emoji-categories",children:Object.keys(b).map(k=>E.jsx("button",{style:{background:s===k?"linear-gradient(to bottom, rgb(230, 230, 230) 0%, rgb(205, 205, 205) 100%)":"linear-gradient(to bottom, rgb(255, 255, 255) 0%, rgb(230, 230, 230) 100%)",border:"none"},onClick:()=>h(k),children:k},k))}),E.jsx("div",{className:"emoji-list",style:{display:s==="Emoticons"?"block":"grid",gridTemplateColumns:s==="GIFS"?"repeat(auto-fit, minmax(60px, 1fr))":"repeat(auto-fit, minmax(30px, 1fr))",gap:"5px",padding:s==="Emoticons"?"10px":0},children:D(b[s])}),E.jsxs("span",{style:{display:"flex"},children:[E.jsx("input",{id:"emoji-search",type:"text",placeholder:"Search emojis...",value:i,onChange:S}),s==="Custom"&&E.jsxs("span",{className:"search-input-container",children:[E.jsx("button",{id:"file-upload-as-emoji",onClick:()=>{var k;return(k=document.getElementById("file-input"))==null?void 0:k.click()},children:E.jsx("img",{src:"/furrchat/assets/icons/emoji_upload.png",height:"24px",alt:"Upload Emoji"})}),E.jsx("input",{id:"file-input",type:"file",accept:".webp, .png, .jpeg, .gif",multiple:!0,onChange:g,style:{display:"none"}})]})]})]})]})};function sq({options:e,onSelect:t}){const[n,r]=I.useState(!1),a=()=>{r(!n)},i=o=>{t(o),r(!1)};return E.jsxs("div",{className:"dropdown",children:[E.jsx("img",{src:"/furrchat/assets/markdown/T.png",onClick:a,className:"markdown-item"}),n&&E.jsx("div",{className:"dropdown-menu",style:{position:"absolute"},children:E.jsx("select",{onChange:o=>i({value:o.target.value,label:o.target.value}),style:{padding:"8px",boxShadow:"1px solid #ccc",borderRadius:"4px"},children:e.map(o=>E.jsx("option",{value:o.value,style:{padding:"4px"},children:o.label},o.value))})})]})}const lq=async({file:e,userToken:t})=>{const n=new FormData;n.append("file",e);const r=await fetch("https://uploads.meower.org/attachments",{method:"POST",body:n,headers:{Authorization:t}});if(!r.ok)throw new Error(`Failed to upload file(s): ${e.name}`);return(await r.json()).id},uq=({userToken:e,context:t,chatId:n})=>{const{post:r,setPost:a}=Me(),{replyIds:i,setReplyIds:o}=Me(),[s,l]=I.useState([]),[u,d]=I.useState(0),[c,p]=I.useState(0),[f,b]=I.useState(!1);let y=null;const S=async C=>{C.preventDefault();const R=await Promise.all(s.map(N=>lq({file:N,userToken:e}))),x=Array.isArray(i)?i.map(N=>JSON.parse(N)).map(N=>N.post_id).filter(N=>N):[],A={content:r,attachments:R,reply_to:x};t==="groupchats"&&n&&(A.chatId=n),fetch(t==="home"?"https://api.meower.org/home":`https://api.meower.org/posts/${n}`,{method:"POST",body:JSON.stringify(A),headers:{"Content-Type":"application/json",Token:e}}).then(N=>N.json()).then(N=>{console.log(N),a(""),l([]),o([])}).catch(N=>{console.error("Error sending post:",N)})},h=C=>{let R=c+C.length;const x=r.substring(c,u),A=r.substring(0,c)+C+x+r.substring(u);R+=x.length+C.length,a(A)},g=(C,R=!0)=>{const x=r.substring(c,u);let A=r,N=c+C.length;R?(A=r.substring(0,c)+C+x+C+r.substring(u),N+=x.length+C.length):(A=r.substring(0,c)+C+x+r.substring(u),N+=C.length),a(A),p(N),d(N)},m=()=>{fetch(t==="home"?"https://api.meower.org/home/typing":`https://api.meower.org/chats/${n}/typing`,{method:"POST",headers:{"Content-Type":"application/json",Token:e}})},D=C=>{const R=C.target.files;if(R){const x=Array.from(R);l(A=>[...A,...x])}};function k(C){const R=new DataTransfer;return C.forEach(x=>R.items.add(x)),R.files}const v=async C=>{var x;const R=(x=C.clipboardData)==null?void 0:x.items;if(R){for(const A of R)if(A.kind==="file"&&A.type.startsWith("image/")){const N=A.getAsFile();if(console.log(N),N){const M=new File([N],`i-really-love-soup.${N.type.split("/")[1]}`,{type:N.type});D({target:{files:k([M])}})}}}};return I.useEffect(()=>(document.addEventListener("paste",v),()=>{document.removeEventListener("paste",v)}),[]),E.jsxs("div",{children:[E.jsx("div",{className:"attachments",style:{borderRadius:"2px"},children:i.map((C,R)=>E.jsxs("div",{className:"attachment-container",style:{display:"flex"},children:[E.jsx("div",{className:"reply",children:E.jsxs("i",{children:[JSON.parse(C).avatar?E.jsx("img",{src:JSON.parse(C).avatar===""?JSON.parse(C).pfp_data===-3?"/furrchat/assets/default_pfps/icon_guest-e8db7c16.svg":`${Dt[34-JSON.parse(C).pfp_data]}`:`https://uploads.meower.org/icons/${JSON.parse(C).avatar}`,alt:"reply pfp",width:"16",height:"16",style:{paddingRight:5}}):null,E.jsx("b",{children:JSON.parse(C).author}),": ",JSON.parse(C).post]})}),E.jsx("button",{onClick:()=>{const x=[...i];x.splice(R,1),o(x)},style:{width:"20px",height:"25px",float:"right"},children:"X"})]},R))}),E.jsxs("div",{className:"markdown-buttons",children:[E.jsx("img",{src:"/furrchat/assets/markdown/B.png",id:"bold",className:"markdown-item",onClick:()=>g("**")}),E.jsx("img",{src:"/furrchat/assets/markdown/I.png",id:"italic",className:"markdown-item",onClick:()=>g("*")}),E.jsx("img",{src:"/furrchat/assets/markdown/S.png",id:"strikethrough",className:"markdown-item",onClick:()=>g("~~")}),E.jsx(sq,{options:hN,onSelect:C=>g(C.value+" ",!1)}),E.jsx(oq,{onEmojiSelect:h,src:"/furrchat/assets/markdown/E.png",chatID:n}),E.jsx("img",{src:"/furrchat/assets/markdown/Q.png",id:"unorderedlist",className:"markdown-item",onClick:()=>g(` - `,!1)}),E.jsx("img",{src:"/furrchat/assets/markdown/F.png",id:"orderedlist",className:"markdown-item",onClick:()=>g(` 1. - `,!1)}),E.jsx("img",{src:"/furrchat/assets/markdown/K.png",id:"checkbox",className:"markdown-item",onClick:()=>g("- [] ",!1)}),E.jsx("img",{src:"/furrchat/assets/markdown/D.png",id:"quote",className:"markdown-item",onClick:()=>g("> ",!1)}),E.jsx("img",{src:"/furrchat/assets/markdown/P.png",id:"code",className:"markdown-item",onClick:()=>g("\n``` \n")}),E.jsx("img",{src:"/furrchat/assets/markdown/M.png",id:"table",className:"markdown-item",onClick:()=>g(` | Header 1 | Header 2 | | -------- | -------- | | Cell 1 | Cell 2 | | Cell 3 | Cell 4 |`,!1)}),E.jsx("img",{src:"/furrchat/assets/markdown/N.png",id:"hyperlink",className:"markdown-item",onClick:()=>g("[link description](link)",!1)}),E.jsx("img",{src:"/furrchat/assets/markdown/L.png",id:"image-markdown",className:"markdown-item",onClick:()=>g("![image description](image link)",!1)}),E.jsx("label",{htmlFor:"file-upload",children:E.jsx("img",{src:"/furrchat/assets/markdown/Z.png",id:"upload",className:"markdown-item"})}),E.jsx("input",{id:"file-upload",type:"file",multiple:!0,onChange:D,style:{display:"none"}}),E.jsx("span",{className:"markdown-item",id:"preview-button",onClick:()=>b(!f),children:f?"Hide Preview":"Show Preview"}),E.jsx("form",{className:"markdown-item",id:"post-button",onClick:S,children:"Post"})]}),E.jsx("span",{children:f?E.jsx("div",{className:"markdown-preview",children:E.jsx(Ci,{remarkPlugins:[x_],components:{code({node:C,className:R,children:x,...A}){const N=/language-(\w+)/.exec(R||""),M=!N;return!M&&N?E.jsx(mh,{children:String(x).replace(/\n$/,""),style:s_,language:N[1],PreTag:"div",...A,inline:M}):E.jsx("code",{className:R,...A,children:x})},img:ks},children:r})}):E.jsxs("form",{onSubmit:S,style:{display:"flex"},children:[E.jsx("textarea",{name:"post",value:r,onChange:C=>a(C.target.value),placeholder:"What's on your mind?",onKeyDown:C=>{C.key==="Enter"&&C.shiftKey?(C.preventDefault(),a(r+` -`)):C.key==="Enter"&&S(C)},onKeyDownCapture:()=>{y&&clearTimeout(y),y=setTimeout(()=>{m(),y=null},500)},style:{flex:1,minHeight:"50px",maxHeight:"500px",padding:"10px"},onSelect:C=>{p(C.target.selectionStart),d(C.target.selectionEnd)}}),E.jsx("div",{})]})}),E.jsx("div",{children:E.jsx("div",{className:"attachments",children:s.map((C,R)=>E.jsxs("div",{className:"attachment-container",children:[C.type.startsWith("image/")&&E.jsx("img",{src:URL.createObjectURL(C),alt:C.name,style:{height:"40px"}}),E.jsx("button",{onClick:()=>{const x=[...s];x.splice(R,1),l(x)},style:{width:"20px",height:"25px",float:"right"},children:"X"}),E.jsx("br",{}),C.name]},R))})})]})},Th=I.memo(uq),cq=()=>{const[e,t]=I.useState([]),n=async()=>{try{const r=await fetch("https://api.meower.org/ulist");if(!r.ok)throw new Error("Failed to fetch user list");const i=(await r.json()).autoget.map(o=>o);t(i)}catch(r){console.error("Error fetching user list:",r),t([])}};return I.useEffect(()=>{n();const r=setInterval(()=>{n()},2500);return()=>clearInterval(r)},[]),e},dq=()=>{const e=cq();return E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"uList",children:[E.jsx("div",{className:"uList-heading",children:`${e.length} users:`}),E.jsx("div",{className:"uList-users",children:E.jsx("span",{style:{fontWeight:600,color:"#333"},children:e.map((t,n)=>E.jsxs("span",{children:[E.jsx(Ut,{to:`/users/${t._id}`,className:"user-button",style:{fontWeight:"200"},children:t._id}),n{const[n,r]=I.useState(new Set),[a,i]=I.useState({}),o=JSON.parse(localStorage.getItem("userData")||"{}"),s=o==null?void 0:o.username;I.useEffect(()=>{const d=new WebSocket("wss://server.meower.org?v=1");return d.onmessage=c=>{const{cmd:p,val:{chat_id:f,username:b}}=JSON.parse(c.data);p==="typing"&&b.toLowerCase()!==s&&(f.toLowerCase()===t||e==="home"&&f===e)&&l(b,f)},d.onerror=c=>console.error("WebSocket error:",c),d.onclose=c=>console.log("WebSocket connection closed:",c),()=>{d.close()}},[]);const l=I.useCallback((d,c)=>{const p={},f=`${c}-${d}`;p[f]&&clearTimeout(p[f]),r(y=>new Set(y).add(f));const b=setTimeout(()=>{r(y=>{const S=new Set(y);return S.delete(f),S})},2e3);i(y=>({...y,[f]:b}))},[a]),u=()=>Array.from(n).map(d=>d.split("-")[1]).join(", ");return E.jsx("div",{id:"typingIndicator",children:u()?E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"loader",children:[E.jsx("div",{className:"dot"}),E.jsx("div",{className:"dot"}),E.jsx("div",{className:"dot"})]}),E.jsx("span",{className:"typing-indicator",children:`${u()} is typing...`})," "]}):E.jsx("span",{className:"no-typing",children:"No one is currently typing..."})})};function pq(){const{loginSuccess:e,userToken:t}=Me();return E.jsxs(E.Fragment,{children:[E.jsx(dq,{}),E.jsx(Th,{userToken:t||"",context:"home"})," ",E.jsx(Ch,{context:"home"}),!e&&E.jsx("p",{style:{display:"flex",justifyContent:"left",paddingLeft:20},children:"You're not logged in yet!"})," ",E.jsx("div",{className:"posts",children:E.jsx(ks,{context:"home"})})]})}async function fq(e,t){try{const n=await fetch(`https://api.meower.org/inbox${t!=="All"?`?page=${t}`:""}`,{method:"GET",headers:{Token:e}});if(!n.ok)throw new Error(`Failed to fetch inbox: ${n.statusText}`);const r=await n.json();return console.log("Fetched data:",r),r}catch(n){throw console.error("Failed to fetch inbox:",n),n}}const Vt=async(e,t,n,r)=>{try{const a=await fetch("https://api.meower.org/me/config",{method:"PATCH",body:JSON.stringify({[e]:t}),headers:{"Content-Type":"application/json",Token:n}});if(a.ok){const i=await a.json(),o=JSON.parse(localStorage.getItem("userData")||"{}");localStorage.setItem("userData",JSON.stringify({...o,account:{...o.account,[e]:t}})),r(s=>({...s,account:{...s.account,[e]:i[e]}}))}else console.error("Failed to update configuration")}catch(a){console.error("Error updating configuration:",a)}};function gq(){const{userToken:e}=Me(),[t,n]=I.useState([]),[r,a]=I.useState(1),[i,o]=I.useState(1),{setUserData:s}=Me();I.useEffect(()=>{(async()=>{if(e)try{const d=await fq(e,r);n(Array.isArray(d.autoget)?d.autoget:[]),o(d.pages||1),Vt("unread_inbox",!1,e,s)}catch(d){console.error("Failed to fetch inbox:",d)}})()},[e,r]);const l=u=>a(u);return window.scrollTo({top:0,behavior:"smooth"}),E.jsxs("div",{className:"posts",children:[Array.isArray(t)&&t.length>0?t.map(u=>{var d;return E.jsx(vh,{_id:u._id||"",attachments:u.attachments||[],isDeleted:u.isDeleted||!1,post:u.p||"",pinned:u.pinned||!1,post_id:u.post_id||null,post_origin:u.post_origin||null,time:{e:u.edited_at!==void 0?u.edited_at:((d=u.t)==null?void 0:d.e)||0},type:u.type||0,user:u.u||"unknown",active:!1,edited:u.edited_at!==void 0,author:u.author,reactions:u.reactions,reply_to:u.reply_to,u:void 0,p:void 0},u._id||u.post_id)}):E.jsx("p",{children:"No messages available"}),E.jsx("div",{className:"pagination",children:Array.from({length:i},(u,d)=>E.jsx("button",{onClick:()=>l(d+1),children:d+1},d+1))})]})}const mq="_groupchats_1jy6v_2",hq="_categoryButtons_1jy6v_8",bq="_activeButton_1jy6v_14",yq="_container_1jy6v_41",Eq="_header_1jy6v_61",vq="_infobox_1jy6v_96",Sq="_recentactivity_1jy6v_120",Dq="_activityitem_1jy6v_132",wn={groupchats:mq,categoryButtons:hq,activeButton:bq,container:yq,header:Eq,infobox:vq,recentactivity:Sq,activityitem:Dq};async function wq(e,t){try{const n=await fetch(`https://api.meower.org/posts/${t}`,{method:"GET",headers:{Token:e}});if(!n.ok)throw new Error(`Failed to fetch inbox: ${n.statusText}`);return(await n.json()).autoget}catch(n){throw console.error("Failed to fetch chat:",n),n}}const vf=new Map,Aa=new Map;function L_(e){if(vf.has(e))return Promise.resolve(vf.get(e)??null);if(Aa.has(e))return Aa.get(e);{const t=fetch(`https://api.meower.org/users/${e}`).then(n=>n.json()).then(n=>(vf.set(e,n),Aa.delete(e),n)).catch(n=>(console.error("Error fetching user data:",n),Aa.delete(e),null));return Aa.set(e,t),t}}function kq(){const{userToken:e}=Me(),[t,n]=I.useState([]),[,r]=I.useState([]),[a,i]=I.useState("All"),[o,s]=I.useState(""),[l,u]=I.useState(10);I.useEffect(()=>{(async()=>{try{const b=localStorage.getItem("userData"),y=b?JSON.parse(b):{},h=(y.chats||[]).map(m=>wq(e,m._id).then(D=>({...m,posts:D}))),g=await Promise.all(h);r(g),d(g,y)}catch(b){console.error("Failed to fetch group chats:",b)}})()},[e,l,a,o]);const d=(f,b)=>{const y=Date.now()/1e3-604800,S=m=>{var D;switch(a){case"Starred":return(D=b.account)==null?void 0:D.favorited_chats.includes(m._id);case"Owned":return m.owner===b.account._id;case"Other Chats":return m.owner!==b.account._id&&m.type!==1;case"DMS":return m.type!==0;case"Recent Activity":return m.last_active>y;case"All":default:return!0}},h=m=>{var k;const D=o.toLowerCase();if(m.type===0)return((k=m.nickname)==null?void 0:k.toLowerCase().includes(D))??!0;if(m.type===1){const v=m.members.find(C=>C!==b.account._id);return(v==null?void 0:v.toLowerCase().includes(D))??!0}return!1},g=f.filter(S).filter(h).slice(0,l);n(g)},c=I.useCallback(()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight&&u(f=>f+10)},[]);I.useEffect(()=>(window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}),[c]);const p=["All","Recent Activity","Starred","Owned","Other Chats","DMS"];return E.jsxs("div",{children:[E.jsxs("div",{className:wn.categoryButtons,children:[p.map(f=>E.jsx("button",{onClick:()=>i(f),className:a===f?wn.activeButton:"",children:f},f)),E.jsx("input",{type:"text",placeholder:"Search",className:"search-category-container",value:o,onChange:f=>s(f.target.value)})]}),t.map(f=>E.jsx(Tq,{...f},f._id))]})}const Tq=({_id:e,created:t,icon:n,last_active:r,members:a,nickname:i,owner:o,posts:s,icon_color:l,type:u})=>{const d=localStorage.getItem("userData"),c=d?JSON.parse(d):{},p=u===1?a.find(g=>g!==c.account._id):null,[f,b]=I.useState(""),[y,S]=I.useState("#007BFF");I.useEffect(()=>{u===1&&p&&L_(p).then(g=>{const m=g!=null&&g.avatar?`https://uploads.meower.org/icons/${g.avatar}`:(g==null?void 0:g.pfp_data)!==void 0?Dt[g.pfp_data]:Dt[22],D=`#${(g==null?void 0:g.avatar_color)||"007BFF"}`;b(m),S(D)}).catch(g=>{console.error("Error fetching user data:",g)})},[p,u]);const h=s.length>0;return E.jsxs("div",{className:wn.container,children:[E.jsxs("div",{className:wn.header,children:[E.jsx("img",{src:u===1?f:n?`https://uploads.meower.org/icons/${n}`:Dt[22],alt:"Group Avatar",width:48,height:48,style:{border:`2px solid ${y}`,objectFit:"cover"}}),E.jsxs("h2",{className:wn.userheading,style:{color:y||l},children:[u===1&&p?E.jsx(Ut,{to:`/users/${p}`,children:p}):i,E.jsx("br",{}),E.jsx("i",{children:e})]}),E.jsxs("div",{style:{marginLeft:"auto"},children:[E.jsx("button",{children:E.jsx(Ut,{to:p?`/users/${p}/dm`:`/chats/${e}`,children:"Enter"})}),E.jsx("button",{children:c.account.favorited_chats.includes(e)?"★":"☆"})]})]}),E.jsxs("div",{className:wn.infobox,children:[[{label:"Created",value:Ig(t)},{label:"Last Active",value:Ig(r)}].map(({label:g,value:m},D)=>E.jsxs("div",{children:[E.jsxs("strong",{children:[g,":"]}),E.jsxs("span",{children:[" ",m]})]},D)),u!==1&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{children:[E.jsx("strong",{children:"Owner:"}),E.jsxs("span",{children:[" ",o]})]}),E.jsxs("details",{children:[E.jsx("summary",{children:E.jsxs("strong",{children:[a.length," Members:"]})}),E.jsx("span",{children:a.join(", ")})]})]})]}),h&&E.jsx("div",{className:wn.recentactivity,children:s.slice(0,2).map(({u:g,p:m,author:D})=>{const k=D.avatar===""?D.pfp_data===-3?"/furrchat/assets/default_pfps/icon_guest-e8db7c16.svg":Dt[D.pfp_data]||Dt[22]:`https://uploads.meower.org/icons/${D.avatar}`;return E.jsxs("div",{className:wn.activityitem,children:[E.jsx(Ut,{to:`/users/${g}`,children:E.jsx("img",{src:k,alt:"User Avatar",width:28,height:28,style:{objectFit:"cover"}})}),E.jsxs("span",{children:[E.jsx("b",{children:`${g}: `}),E.jsx(Ci,{components:{p:({children:v})=>{if(v&&typeof v=="string"){const C=v;return C.length>100?E.jsxs(E.Fragment,{children:[C.substring(0,100),"..."]}):E.jsx(E.Fragment,{children:C})}else return E.jsx(E.Fragment,{children:v})}},children:da(Eh(m.trim()))}),m.reactions&&I_(m.reactions)]})]},g)})})]})},fk=async({file:e,userToken:t})=>{if(!e)throw new Error("No file provided");const n=new FormData;n.append("file",e);try{const r=await fetch("https://uploads.meower.org/icons",{method:"POST",body:n,headers:{Authorization:t}});if(!r.ok)throw new Error(`Failed to upload file: ${e.name}`);return(await r.json()).id}catch(r){throw console.error("Error uploading icon:",r),r}},Cq=()=>{const{isBgmEnabled:e,selectedTrackIndex:t,toggleBgm:n,selectTrack:r}=Me();return E.jsxs("div",{style:{width:"100%",padding:0},children:[E.jsxs("label",{children:["Enable BGM:",E.jsx("input",{type:"checkbox",checked:e,onChange:a=>n(a.target.checked)})]}),e&&E.jsxs("details",{children:[E.jsx("summary",{children:E.jsx("label",{children:"Select Music:"})}),E.jsx("div",{children:jC.map((a,i)=>E.jsxs("div",{onClick:()=>r(i),style:{cursor:"pointer",color:t===i?"grey":"black",background:t===i?"linear-gradient(to bottom,rgba(255, 255, 255, 0.507) 0%, rgba(230, 230, 230, 0.5) 100%)":"transparent",fontWeight:t===i?"600":"normal",border:t===i?"1px solid grey":"none",boxShadow:"5px 5px 10px rgba(0, 0, 0, 0.2), -5px -5px 10px rgba(255, 255, 255, 0.3), 0 3px 1px rgba(0, 0, 0, 0.2), 0 2px 0 0 rgba(255, 255, 255, 0.7) inset",padding:"5px",marginBottom:"5px",backgroundColor:t===i?"#f0f0f0":"transparent",borderRadius:"5px",boxSizing:"border-box",width:"100%"},children:[a.songName," by ",a.author]},i))})]})]})};function Aq(){var n,r,a;const{userData:e,setUserData:t}=Me();if(localStorage.getItem("userData")){const i=e==null?void 0:e.token,o=JSON.parse(localStorage.getItem("userData")||"{}"),s=((n=o.account)==null?void 0:n.avatar_color)||"!color",{pfp:l}=I.useMemo(()=>{var w,P;return{pfp:(w=o.account)!=null&&w.avatar?`https://uploads.meower.org/icons/${o.account.avatar}`:o.account._id==="Server"?"https://app.meower.org/assets/icon_100-026e1a7d.svg":Dt[((P=o.account)==null?void 0:P.pfp_data)||0]}},[o]),[u,d]=I.useState(((r=o.account)==null?void 0:r.quote)||""),c=u.match(/\s*\[([^\]]*)\]/);let p=u,f;c&&u.endsWith(c[0])&&(p=u.replace(c[0],""),f=c[1].trim()),p=da(p);const[b,y]=I.useState(!1),[S,h]=I.useState(s==="!color"?"none":"pickedAvatarColor"),[g,m]=I.useState(`#${s}`),[D,k]=I.useState([...Object.entries(Dt).map(([F,w])=>({key:F,url:w,title:`Profile Picture ${F}`})),{key:"upload",url:"/furrchat/assets/icons/pfp_upload.png",title:"Upload Custom PFP"}]),[v,C]=I.useState(!1),[R,x]=I.useState(new Map),A=F=>d(F.target.value),N=()=>{y(!1),Vt("quote",u,i,t)},M=F=>{const w=F.target.value;m(w),S==="pickedAvatarColor"&&Vt("avatar_color",w.substring(1),i,t)},H=F=>{const w=F.target.value;h(w),Vt("avatar_color",w==="pickedAvatarColor"?g.substring(1):"!color",i,t)},z=async F=>{const w=F.target.files[0];if(w){C(!0);try{const P=await fk({file:w,userToken:i}),G={rawData:w,key:P,url:`https://uploads.meower.org/icons/${P}`,title:`Custom PFP: ${P}`};k(_=>[..._,G]),x(_=>new Map(_).set(P,w)),Vt("avatar",P,i,t)}catch(P){console.error("Upload failed:",P),alert("Upload failed.")}finally{C(!1)}}else console.error("No file selected"),alert("No file selected")},$=()=>{v||document.getElementById("fileInput").click()},V=async(F,w)=>{if(F==="upload")$();else if(w.startsWith("https://uploads.meower.org/icons/")){const P=R.get(F);if(P)try{const G=await fk({file:P,userToken:i});Vt("avatar",G,i,t)}catch(G){console.error("Re-upload failed:",G),alert("Re-upload failed.")}else console.error("File data not found"),alert("File data not found.")}else Vt("avatar","",i,t),Vt("pfp_data",F,i,t)},K=F=>{k(w=>w.filter(P=>P.key!==F)),x(w=>{const P=new Map(w);return P.delete(F),P}),l.startsWith("https://uploads.meower.org/icons/")&&F===l&&Vt("avatar","",i,t)},O=()=>E.jsxs("div",{className:"pfpset",children:[D.map(({key:F,url:w,title:P})=>E.jsx("div",{className:"pfp-item",children:E.jsxs("div",{className:"pfp-container",children:[E.jsx("img",{src:w,title:P,width:"48",height:"48",className:"pick-pfp",onClick:()=>V(F,w)}),P.startsWith("Custom PFP:")&&E.jsx("button",{className:"remove-pfp",onClick:()=>K(F),children:"X"})]})},F)),E.jsx("input",{id:"fileInput",type:"file",accept:".png,.jpg,.jpeg,.svg",style:{display:"none"},onChange:z})]});return E.jsxs("div",{className:"settings-container",children:[E.jsxs("div",{className:"user-profile",children:[E.jsxs("div",{className:"profile-info",children:[E.jsx("div",{className:"post-pfp-container",children:E.jsx("img",{src:l,alt:`${o==null?void 0:o.account._id}'s profile picture`,className:"post-pfp",width:"128",height:"128",style:{borderRadius:"5px",border:S==="none"?"none":`2.5px solid ${g}`,boxShadow:"0px 0px 6px rgba(0, 0, 0, 0.4)"}})}),E.jsxs("div",{className:"user-text",children:[o==null?void 0:o.account._id,f&&f.length>15&&E.jsx("br",{}),f&&E.jsxs("span",{className:"pronouns",children:["(",f,")"]})]})]}),E.jsxs("div",{style:{flexGrow:1,flexDirection:"column"},children:[E.jsxs("div",{className:"user-bio-container",children:["Your Quote:",E.jsx("textarea",{className:"textarea-userbio",value:u,onChange:A,onBlur:N,onKeyDown:F=>F.key==="Enter"&&!F.shiftKey&&N()})]}),E.jsxs("div",{className:"color-picker-container",children:[E.jsx("label",{htmlFor:"pickedAvatarColor",children:"Avatar Color:"}),E.jsx("input",{type:"color",id:"pickedAvatarColor",name:"pickedAvatarColor",value:S==="pickedAvatarColor"?g:"!color",onChange:M,disabled:S==="none"}),E.jsxs("label",{children:[E.jsx("input",{type:"radio",name:"avatarColorOption",value:"pickedAvatarColor",checked:S==="pickedAvatarColor",onChange:H}),"Use Color Picker"]}),E.jsxs("label",{children:[E.jsx("input",{type:"radio",name:"avatarColorOption",value:"none",checked:S==="none",onChange:H}),"None"]})]})]})]}),E.jsx("div",{className:"user-profile",children:E.jsxs("span",{style:{flexGrow:1,flexDirection:"column"},children:["Profile Picture:",O()]})}),E.jsx("div",{className:"user-profile",children:E.jsx(Cq,{})}),E.jsx("div",{className:"user-profile",children:E.jsxs("label",{htmlFor:"hideBlockedUsers",children:["Hide Blocked Users:",E.jsx("input",{type:"checkbox",id:"hideBlockedUsers",checked:((a=o==null?void 0:o.account)==null?void 0:a.hide_blocked_users)||!1,onChange:F=>{Vt("hide_blocked_users",F.target.checked,i,t)}})]})})]})}else return E.jsx("div",{children:"You're not logged in yet!..."})}async function F_({user:e,userToken:t,userParam:n}){const r=await fetch(`https://api.meower.org/users/${e}/${n}`,{method:"GET",headers:{Token:t}});if(!r.ok)throw new Error(`HTTP error! Status: ${r.status}`);const a=await r.json();return console.log("Data:",a),a}function _q(){const{username:e}=Ha(),[t,n]=I.useState(null),{userToken:r}=Me(),[a,i]=I.useState([]);if(I.useEffect(()=>{e&&(async()=>{try{const m=await F_({user:e??"",userToken:r,userParam:"posts"});i(m.autoget);const D=await L_(e??"");n(D)}catch(m){console.error("Error fetching data:",m)}})()},[e,r]),!t)return E.jsx("div",{children:"Loading..."});const{_id:o,avatar:s,avatar_color:l,banned:u,created:d,last_seen:c,pfp_data:p,quote:f}=t,b=f.match(/\s*\[([^\]]+)\]\s*$/);let y=f,S;b&&f.endsWith(b[0])&&(y=f.replace(b[0],""),S=b[1].trim()),y=da(y);const h=s===""?p===-3?"/furrchat/assets/default_pfps/icon_guest-e8db7c16.svg":`${Dt[p]}`:`https://uploads.meower.org/icons/${s}`;return E.jsxs("div",{className:"settings-container",children:[E.jsxs("div",{className:"settings",children:[E.jsxs("div",{className:"user-profile",children:[E.jsxs("div",{className:"profile-info",children:[E.jsx("div",{className:"post-pfp-container",children:E.jsx("img",{src:h,alt:`${o}'s profile picture`,className:"post-pfp",width:"128",height:"128",style:{borderRadius:"25%",border:"2.5px solid",borderColor:`#${l}`,boxShadow:"0px 0px 6px rgba(0, 0, 0, 0.4)"}})}),E.jsxs("div",{className:"user-text",children:[o,S&&E.jsxs("p",{className:"pronouns",children:["(",S,")"]})]})]}),E.jsxs("div",{className:"user-bio-container",children:[y&&E.jsx("div",{className:"user-bio",children:E.jsx(Ci,{components:{img:N_},children:y})}),E.jsx("div",{className:"user-bio",children:E.jsxs("p",{children:["Created: ",new Date(d*1e3).toLocaleString()]})}),E.jsxs("div",{className:"user-bio",children:[E.jsxs("p",{children:["Last Seen: ",new Date(c*1e3).toLocaleString()]}),u&&E.jsx("p",{className:"banned",children:"Banned"})]})]})]}),E.jsx("div",{className:"settings-buttons",style:{float:"right"},children:E.jsx(Ut,{to:`/users/${o}/dm`,children:E.jsx("button",{className:"button",children:"Message"})})})]}),E.jsx("hr",{style:{borderTop:"1px solid #0000001f",width:"100%"}}),E.jsx("strong",{children:"User's Latest Posts:"}),E.jsx("div",{className:"user-posts",children:a.slice(0,12).map(g=>E.jsx(vh,{post:g.p,u:g.u,p:g.p,attachments:g.attachments,author:g.author,isDeleted:g.isDeleted,pinned:g.pinned,post_id:g.post_id,post_origin:g.post_origin,reactions:g.reactions,reply_to:g.reply_to,time:g.t,type:g.type,_id:g._id,user:g.u,active:!1,edited:g.edited_at!==void 0},g._id))})]})}function Rq(){const{loginSuccess:e,userToken:t}=Me();return E.jsxs(E.Fragment,{children:[E.jsx(Th,{userToken:t||"",context:"groupchats",chatId:Ha().chatId})," ",E.jsx(Ch,{context:"groupchats",chatId:Ha().chatId}),!e&&E.jsx("p",{style:{display:"flex",justifyContent:"left",paddingLeft:20},children:"You're not logged in yet!"})," ",E.jsx("div",{className:"posts",children:E.jsx(ks,{context:"groupchats",chatId:Ha().chatId})})]})}function xq(){const{loginSuccess:e,userToken:t}=Me(),{username:n}=Ha(),[r,a]=I.useState(void 0),[i,o]=I.useState(!0);return I.useEffect(()=>{n&&t?F_({user:n,userToken:t,userParam:"dm"}).then(s=>{a(s._id)}).catch(s=>{console.error("Failed to fetch posts:",s)}).finally(()=>{o(!1)}):o(!1)},[n,t]),i?E.jsx("p",{children:"Loading..."}):E.jsxs(E.Fragment,{children:[E.jsx(Th,{userToken:t||"",context:"groupchats",chatId:r}),E.jsx(Ch,{context:"groupchats",chatId:r}),!e&&E.jsx("p",{style:{display:"flex",justifyContent:"left",paddingLeft:20},children:"You're not logged in yet!"}),E.jsx("div",{className:"posts",children:E.jsx(ks,{context:"groupchats",chatId:r})})]})}const Iq=()=>E.jsxs(uN,{children:[E.jsx(EN,{}),E.jsxs(nN,{children:[E.jsx(vn,{path:"/",element:E.jsx(pq,{})}),E.jsx(vn,{path:"messages",element:E.jsx(gq,{})}),E.jsx(vn,{path:"chats",exact:!0,element:E.jsx(kq,{})}),E.jsx(vn,{path:"chats/:chatId",element:E.jsx(Rq,{})}),E.jsx(vn,{path:"settings",element:E.jsx(Aq,{})}),E.jsx(vn,{path:"users/:username",element:E.jsx(_q,{})}),E.jsx(vn,{path:"users/:username/dm",element:E.jsx(xq,{})})]})]});AC(document.getElementById("root")).render(E.jsx(I.StrictMode,{children:E.jsx(bN,{children:E.jsx("div",{className:"app",children:E.jsx(Iq,{})})})})); +`)):C.key==="Enter"&&S(C)},onKeyDownCapture:()=>{y&&clearTimeout(y),y=setTimeout(()=>{m(),y=null},500)},style:{flex:1,minHeight:"50px",maxHeight:"500px",padding:"10px"},onSelect:C=>{p(C.target.selectionStart),d(C.target.selectionEnd)}}),E.jsx("div",{})]})}),E.jsx("div",{children:E.jsx("div",{className:"attachments",children:s.map((C,R)=>E.jsxs("div",{className:"attachment-container",children:[C.type.startsWith("image/")&&E.jsx("img",{src:URL.createObjectURL(C),alt:C.name,style:{height:"40px"}}),E.jsx("button",{onClick:()=>{const x=[...s];x.splice(R,1),l(x)},style:{width:"20px",height:"25px",float:"right"},children:"X"}),E.jsx("br",{}),C.name]},R))})})]})},Th=I.memo(uq),cq=()=>{const[e,t]=I.useState([]),n=async()=>{try{const r=await fetch("https://api.meower.org/ulist");if(!r.ok)throw new Error("Failed to fetch user list");const i=(await r.json()).autoget.map(o=>o);t(i)}catch(r){console.error("Error fetching user list:",r),t([])}};return I.useEffect(()=>{n();const r=setInterval(()=>{n()},2500);return()=>clearInterval(r)},[]),e},dq=()=>{const e=cq();return E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"uList",children:[E.jsx("div",{className:"uList-heading",children:`${e.length} users:`}),E.jsx("div",{className:"uList-users",children:E.jsx("span",{style:{fontWeight:600,color:"#333"},children:e.map((t,n)=>E.jsxs("span",{children:[E.jsx(Ut,{to:`/users/${t._id}`,className:"user-button",style:{fontWeight:"200"},children:t._id}),n{const[n,r]=I.useState(new Set),[a,i]=I.useState({}),o=JSON.parse(localStorage.getItem("userData")||"{}"),s=o==null?void 0:o.username;I.useEffect(()=>{const d=new WebSocket("wss://server.meower.org?v=1");return d.onmessage=c=>{const{cmd:p,val:{chat_id:f,username:b}}=JSON.parse(c.data);p==="typing"&&b.toLowerCase()!==s&&(f.toLowerCase()===t||e==="home"&&f===e)&&l(b,f)},d.onerror=c=>console.error("WebSocket error:",c),d.onclose=c=>console.log("WebSocket connection closed:",c),()=>{d.close()}},[]);const l=I.useCallback((d,c)=>{const p={},f=`${c}-${d}`;p[f]&&clearTimeout(p[f]),r(y=>new Set(y).add(f));const b=setTimeout(()=>{r(y=>{const S=new Set(y);return S.delete(f),S})},2e3);i(y=>({...y,[f]:b}))},[a]),u=()=>Array.from(n).map(d=>d.split("-")[1]).join(", ");return E.jsx("div",{id:"typingIndicator",children:u()?E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"loader",children:[E.jsx("div",{className:"dot"}),E.jsx("div",{className:"dot"}),E.jsx("div",{className:"dot"})]}),E.jsx("span",{className:"typing-indicator",children:`${u()} is typing...`})," "]}):E.jsx("span",{className:"no-typing",children:"No one is currently typing..."})})};function pq(){const{loginSuccess:e,userToken:t}=Me();return E.jsxs(E.Fragment,{children:[E.jsx(dq,{}),E.jsx(Th,{userToken:t||"",context:"home"})," ",E.jsx(Ch,{context:"home"}),!e&&E.jsx("p",{style:{display:"flex",justifyContent:"left",paddingLeft:20},children:"You're not logged in yet!"})," ",E.jsx("div",{className:"posts",children:E.jsx(ks,{context:"home"})})]})}async function fq(e,t){try{const n=await fetch(`https://api.meower.org/inbox${t!=="All"?`?page=${t}`:""}`,{method:"GET",headers:{Token:e}});if(!n.ok)throw new Error(`Failed to fetch inbox: ${n.statusText}`);const r=await n.json();return console.log("Fetched data:",r),r}catch(n){throw console.error("Failed to fetch inbox:",n),n}}const Vt=async(e,t,n,r)=>{try{const a=await fetch("https://api.meower.org/me/config",{method:"PATCH",body:JSON.stringify({[e]:t}),headers:{"Content-Type":"application/json",Token:n}});if(a.ok){const i=await a.json(),o=JSON.parse(localStorage.getItem("userData")||"{}");localStorage.setItem("userData",JSON.stringify({...o,account:{...o.account,[e]:t}})),r(s=>({...s,account:{...s.account,[e]:i[e]}}))}else console.error("Failed to update configuration")}catch(a){console.error("Error updating configuration:",a)}};function gq(){const{userToken:e}=Me(),[t,n]=I.useState([]),[r,a]=I.useState(1),[i,o]=I.useState(1),{setUserData:s}=Me();I.useEffect(()=>{(async()=>{if(e)try{const d=await fq(e,r);n(Array.isArray(d.autoget)?d.autoget:[]),o(d.pages||1),Vt("unread_inbox",!1,e,s)}catch(d){console.error("Failed to fetch inbox:",d)}})()},[e,r]);const l=u=>a(u);return window.scrollTo({top:0,behavior:"smooth"}),E.jsxs("div",{className:"posts",children:[Array.isArray(t)&&t.length>0?t.map(u=>{var d;return E.jsx(vh,{_id:u._id||"",attachments:u.attachments||[],isDeleted:u.isDeleted||!1,post:u.p||"",pinned:u.pinned||!1,post_id:u.post_id||null,post_origin:u.post_origin||null,time:{e:u.edited_at!==void 0?u.edited_at:((d=u.t)==null?void 0:d.e)||0},type:u.type||0,user:u.u||"unknown",active:!1,edited:u.edited_at!==void 0,author:u.author,reactions:u.reactions,reply_to:u.reply_to,u:void 0,p:void 0},u._id||u.post_id)}):E.jsx("p",{children:"No messages available"}),E.jsx("div",{className:"pagination",children:Array.from({length:i},(u,d)=>E.jsx("button",{onClick:()=>l(d+1),children:d+1},d+1))})]})}const mq="_groupchats_1jy6v_2",hq="_categoryButtons_1jy6v_8",bq="_activeButton_1jy6v_14",yq="_container_1jy6v_41",Eq="_header_1jy6v_61",vq="_infobox_1jy6v_96",Sq="_recentactivity_1jy6v_120",Dq="_activityitem_1jy6v_132",wn={groupchats:mq,categoryButtons:hq,activeButton:bq,container:yq,header:Eq,infobox:vq,recentactivity:Sq,activityitem:Dq};async function wq(e,t){try{const n=await fetch(`https://api.meower.org/posts/${t}`,{method:"GET",headers:{Token:e}});if(!n.ok)throw new Error(`Failed to fetch inbox: ${n.statusText}`);return(await n.json()).autoget}catch(n){throw console.error("Failed to fetch chat:",n),n}}const vf=new Map,Aa=new Map;function L_(e){if(vf.has(e))return Promise.resolve(vf.get(e)??null);if(Aa.has(e))return Aa.get(e);{const t=fetch(`https://api.meower.org/users/${e}`).then(n=>n.json()).then(n=>(vf.set(e,n),Aa.delete(e),n)).catch(n=>(console.error("Error fetching user data:",n),Aa.delete(e),null));return Aa.set(e,t),t}}function kq(){const{userToken:e}=Me(),[t,n]=I.useState([]),[,r]=I.useState([]),[a,i]=I.useState("All"),[o,s]=I.useState(""),[l,u]=I.useState(10);I.useEffect(()=>{(async()=>{try{const b=localStorage.getItem("userData"),y=b?JSON.parse(b):{},h=(y.chats||[]).map(m=>wq(e,m._id).then(D=>({...m,posts:D}))),g=await Promise.all(h);r(g),d(g,y)}catch(b){console.error("Failed to fetch group chats:",b)}})()},[e,l,a,o]);const d=(f,b)=>{const y=Date.now()/1e3-604800,S=m=>{var D;switch(a){case"Starred":return(D=b.account)==null?void 0:D.favorited_chats.includes(m._id);case"Owned":return m.owner===b.account._id;case"Other Chats":return m.owner!==b.account._id&&m.type!==1;case"DMS":return m.type!==0;case"Recent Activity":return m.last_active>y;case"All":default:return!0}},h=m=>{var k;const D=o.toLowerCase();if(m.type===0)return((k=m.nickname)==null?void 0:k.toLowerCase().includes(D))??!0;if(m.type===1){const v=m.members.find(C=>C!==b.account._id);return(v==null?void 0:v.toLowerCase().includes(D))??!0}return!1},g=f.filter(S).filter(h).slice(0,l);n(g)},c=I.useCallback(()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight&&u(f=>f+10)},[]);I.useEffect(()=>(window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}),[c]);const p=["All","Recent Activity","Starred","Owned","Other Chats","DMS"];return E.jsxs("div",{children:[E.jsxs("div",{className:wn.categoryButtons,children:[p.map(f=>E.jsx("button",{onClick:()=>i(f),className:a===f?wn.activeButton:"",children:f},f)),E.jsx("input",{type:"text",placeholder:"Search",className:"search-category-container",value:o,onChange:f=>s(f.target.value)})]}),t.map(f=>E.jsx(Tq,{...f},f._id))]})}const Tq=({_id:e,created:t,icon:n,last_active:r,members:a,nickname:i,owner:o,posts:s,icon_color:l,type:u})=>{const d=localStorage.getItem("userData"),c=d?JSON.parse(d):{},p=u===1?a.find(g=>g!==c.account._id):null,[f,b]=I.useState(""),[y,S]=I.useState("#007BFF");I.useEffect(()=>{u===1&&p&&L_(p).then(g=>{const m=g!=null&&g.avatar?`https://uploads.meower.org/icons/${g.avatar}`:(g==null?void 0:g.pfp_data)!==void 0?Dt[g.pfp_data]:Dt[22],D=`#${(g==null?void 0:g.avatar_color)||"007BFF"}`;b(m),S(D)}).catch(g=>{console.error("Error fetching user data:",g)})},[p,u]);const h=s.length>0;return E.jsxs("div",{className:wn.container,children:[E.jsxs("div",{className:wn.header,children:[E.jsx("img",{src:u===1?f:n?`https://uploads.meower.org/icons/${n}`:Dt[22],alt:"Group Avatar",width:48,height:48,style:{border:`2px solid ${y}`,objectFit:"cover"}}),E.jsxs("h2",{className:wn.userheading,style:{color:y||l},children:[u===1&&p?E.jsx(Ut,{to:`/users/${p}`,children:p}):i,E.jsx("br",{}),E.jsx("i",{children:e})]}),E.jsxs("div",{style:{marginLeft:"auto"},children:[E.jsx("button",{children:E.jsx(Ut,{to:p?`/users/${p}/dm`:`/chats/${e}`,children:"Enter"})}),E.jsx("button",{children:c.account.favorited_chats.includes(e)?"★":"☆"})]})]}),E.jsxs("div",{className:wn.infobox,children:[[{label:"Created",value:Ig(t)},{label:"Last Active",value:Ig(r)}].map(({label:g,value:m},D)=>E.jsxs("div",{children:[E.jsxs("strong",{children:[g,":"]}),E.jsxs("span",{children:[" ",m]})]},D)),u!==1&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{children:[E.jsx("strong",{children:"Owner:"}),E.jsxs("span",{children:[" ",o]})]}),E.jsxs("details",{children:[E.jsx("summary",{children:E.jsxs("strong",{children:[a.length," Members:"]})}),E.jsx("span",{children:a.join(", ")})]})]})]}),h&&E.jsx("div",{className:wn.recentactivity,children:s.slice(0,2).map(({u:g,p:m,author:D})=>{const k=D.avatar===""?D.pfp_data===-3?"/furrchat/assets/default_pfps/icon_guest-e8db7c16.svg":Dt[D.pfp_data]||Dt[22]:`https://uploads.meower.org/icons/${D.avatar}`;return E.jsxs("div",{className:wn.activityitem,children:[E.jsx(Ut,{to:`/users/${g}`,children:E.jsx("img",{src:k,alt:"User Avatar",width:28,height:28,style:{objectFit:"cover"}})}),E.jsxs("span",{children:[E.jsx("b",{children:`${g}: `}),E.jsx(Ci,{components:{p:({children:v})=>{if(v&&typeof v=="string"){const C=v;return C.length>100?E.jsxs(E.Fragment,{children:[C.substring(0,100),"..."]}):E.jsx(E.Fragment,{children:C})}else return E.jsx(E.Fragment,{children:v})}},children:da(Eh(m.trim()))}),m.reactions&&I_(m.reactions)]})]},g)})})]})},fk=async({file:e,userToken:t})=>{if(!e)throw new Error("No file provided");const n=new FormData;n.append("file",e);try{const r=await fetch("https://uploads.meower.org/icons",{method:"POST",body:n,headers:{Authorization:t}});if(!r.ok)throw new Error(`Failed to upload file: ${e.name}`);return(await r.json()).id}catch(r){throw console.error("Error uploading icon:",r),r}},Cq=()=>{const{isBgmEnabled:e,selectedTrackIndex:t,toggleBgm:n,selectTrack:r}=Me();return E.jsxs("div",{style:{width:"100%",padding:0},children:[E.jsxs("label",{children:["Enable BGM:",E.jsx("input",{type:"checkbox",checked:e,onChange:a=>n(a.target.checked)})]}),e&&E.jsxs("details",{children:[E.jsx("summary",{children:E.jsx("label",{children:"Select Music:"})}),E.jsx("div",{children:jC.map((a,i)=>E.jsxs("div",{onClick:()=>r(i),style:{cursor:"pointer",color:t===i?"grey":"black",background:t===i?"linear-gradient(to bottom,rgba(255, 255, 255, 0.507) 0%, rgba(230, 230, 230, 0.5) 100%)":"transparent",fontWeight:t===i?"600":"normal",border:t===i?"1px solid grey":"none",boxShadow:"5px 5px 10px rgba(0, 0, 0, 0.2), -5px -5px 10px rgba(255, 255, 255, 0.3), 0 3px 1px rgba(0, 0, 0, 0.2), 0 2px 0 0 rgba(255, 255, 255, 0.7) inset",padding:"5px",marginBottom:"5px",backgroundColor:t===i?"#f0f0f0":"transparent",borderRadius:"5px",boxSizing:"border-box",width:"100%"},children:[a.songName," by ",a.author]},i))})]})]})};function Aq(){var n,r,a;const{userData:e,setUserData:t}=Me();if(localStorage.getItem("userData")){const i=e==null?void 0:e.token,o=JSON.parse(localStorage.getItem("userData")||"{}"),s=((n=o.account)==null?void 0:n.avatar_color)||"!color",{pfp:l}=I.useMemo(()=>{var w,P;return{pfp:(w=o.account)!=null&&w.avatar?`https://uploads.meower.org/icons/${o.account.avatar}`:o.account._id==="Server"?"https://app.meower.org/assets/icon_100-026e1a7d.svg":Dt[((P=o.account)==null?void 0:P.pfp_data)||0]}},[o]),[u,d]=I.useState(((r=o.account)==null?void 0:r.quote)||""),c=u.match(/\s*\[([^\]]*)\]/);let p=u,f;c&&u.endsWith(c[0])&&(p=u.replace(c[0],""),f=c[1].trim()),p=da(p);const[b,y]=I.useState(!1),[S,h]=I.useState(s==="!color"?"none":"pickedAvatarColor"),[g,m]=I.useState(`#${s}`),[D,k]=I.useState([...Object.entries(Dt).map(([F,w])=>({key:F,url:w,title:`Profile Picture ${F}`})),{key:"upload",url:"/furrchat/assets/icons/pfp_upload.png",title:"Upload Custom PFP"}]),[v,C]=I.useState(!1),[R,x]=I.useState(new Map),A=F=>d(F.target.value),N=()=>{y(!1),Vt("quote",u,i,t)},M=F=>{const w=F.target.value;m(w),S==="pickedAvatarColor"&&Vt("avatar_color",w.substring(1),i,t)},H=F=>{const w=F.target.value;h(w),Vt("avatar_color",w==="pickedAvatarColor"?g.substring(1):"!color",i,t)},z=async F=>{const w=F.target.files[0];if(w){C(!0);try{const P=await fk({file:w,userToken:i}),G={rawData:w,key:P,url:`https://uploads.meower.org/icons/${P}`,title:`Custom PFP: ${P}`};k(_=>[..._,G]),x(_=>new Map(_).set(P,w)),Vt("avatar",P,i,t)}catch(P){console.error("Upload failed:",P),alert("Upload failed.")}finally{C(!1)}}else console.error("No file selected"),alert("No file selected")},$=()=>{v||document.getElementById("fileInput").click()},V=async(F,w)=>{if(F==="upload")$();else if(w.startsWith("https://uploads.meower.org/icons/")){const P=R.get(F);if(P)try{const G=await fk({file:P,userToken:i});Vt("avatar",G,i,t)}catch(G){console.error("Re-upload failed:",G),alert("Re-upload failed.")}else console.error("File data not found"),alert("File data not found.")}else Vt("avatar","",i,t),Vt("pfp_data",F,i,t)},K=F=>{k(w=>w.filter(P=>P.key!==F)),x(w=>{const P=new Map(w);return P.delete(F),P}),l.startsWith("https://uploads.meower.org/icons/")&&F===l&&Vt("avatar","",i,t)},O=()=>E.jsxs("div",{className:"pfpset",children:[D.map(({key:F,url:w,title:P})=>E.jsx("div",{className:"pfp-item",children:E.jsxs("div",{className:"pfp-container",children:[E.jsx("img",{src:w,title:P,width:"48",height:"48",className:"pick-pfp",onClick:()=>V(F,w)}),P.startsWith("Custom PFP:")&&E.jsx("button",{className:"remove-pfp",onClick:()=>K(F),children:"X"})]})},F)),E.jsx("input",{id:"fileInput",type:"file",accept:".png,.jpg,.jpeg,.svg",style:{display:"none"},onChange:z})]});return E.jsx("div",{className:"settings-container",children:E.jsxs("div",{className:"settings",children:[E.jsxs("div",{className:"user-profile",children:[E.jsxs("div",{className:"profile-info",children:[E.jsx("div",{className:"post-pfp-container",children:E.jsx("img",{src:l,alt:`${o==null?void 0:o.account._id}'s profile picture`,className:"post-pfp",width:"128",height:"128",style:{borderRadius:"5px",border:S==="none"?"none":`2.5px solid ${g}`,boxShadow:"0px 0px 6px rgba(0, 0, 0, 0.4)"}})}),E.jsxs("div",{className:"user-text",children:[o==null?void 0:o.account._id,f&&f.length>15&&E.jsx("br",{}),f&&E.jsxs("span",{className:"pronouns",children:["(",f,")"]})]})]}),E.jsxs("div",{style:{flexGrow:1,flexDirection:"column"},children:[E.jsxs("div",{className:"user-bio-container",children:["Your Quote:",E.jsx("textarea",{className:"textarea-userbio",value:u,onChange:A,onBlur:N,onKeyDown:F=>F.key==="Enter"&&!F.shiftKey&&N()})]}),E.jsxs("div",{className:"color-picker-container",children:[E.jsx("label",{htmlFor:"pickedAvatarColor",children:"Avatar Color:"}),E.jsx("input",{type:"color",id:"pickedAvatarColor",name:"pickedAvatarColor",value:S==="pickedAvatarColor"?g:"!color",onChange:M,disabled:S==="none"}),E.jsxs("label",{children:[E.jsx("input",{type:"radio",name:"avatarColorOption",value:"pickedAvatarColor",checked:S==="pickedAvatarColor",onChange:H}),"Use Color Picker"]}),E.jsxs("label",{children:[E.jsx("input",{type:"radio",name:"avatarColorOption",value:"none",checked:S==="none",onChange:H}),"None"]})]})]})]}),E.jsx("br",{}),E.jsx("div",{className:"user-profile",children:E.jsxs("span",{style:{flexGrow:1,flexDirection:"column"},children:["Profile Picture:",O()]})}),E.jsx("br",{}),E.jsx("div",{className:"user-profile",children:E.jsx(Cq,{})}),E.jsx("br",{}),E.jsx("div",{className:"user-profile",children:E.jsxs("label",{htmlFor:"hideBlockedUsers",children:["Hide Blocked Users:",E.jsx("input",{type:"checkbox",id:"hideBlockedUsers",checked:((a=o==null?void 0:o.account)==null?void 0:a.hide_blocked_users)||!1,onChange:F=>{Vt("hide_blocked_users",F.target.checked,i,t)}})]})})]})})}else return E.jsx("div",{children:"You're not logged in yet!..."})}async function F_({user:e,userToken:t,userParam:n}){const r=await fetch(`https://api.meower.org/users/${e}/${n}`,{method:"GET",headers:{Token:t}});if(!r.ok)throw new Error(`HTTP error! Status: ${r.status}`);const a=await r.json();return console.log("Data:",a),a}function _q(){const{username:e}=Ha(),[t,n]=I.useState(null),{userToken:r}=Me(),[a,i]=I.useState([]);if(I.useEffect(()=>{e&&(async()=>{try{const m=await F_({user:e??"",userToken:r,userParam:"posts"});i(m.autoget);const D=await L_(e??"");n(D)}catch(m){console.error("Error fetching data:",m)}})()},[e,r]),!t)return E.jsx("div",{children:"Loading..."});const{_id:o,avatar:s,avatar_color:l,banned:u,created:d,last_seen:c,pfp_data:p,quote:f}=t,b=f.match(/\s*\[([^\]]+)\]\s*$/);let y=f,S;b&&f.endsWith(b[0])&&(y=f.replace(b[0],""),S=b[1].trim()),y=da(y);const h=s===""?p===-3?"/furrchat/assets/default_pfps/icon_guest-e8db7c16.svg":`${Dt[p]}`:`https://uploads.meower.org/icons/${s}`;return E.jsxs("div",{className:"settings-container",children:[E.jsxs("div",{className:"settings",children:[E.jsxs("div",{className:"user-profile",children:[E.jsxs("div",{className:"profile-info",children:[E.jsx("div",{className:"post-pfp-container",children:E.jsx("img",{src:h,alt:`${o}'s profile picture`,className:"post-pfp",width:"128",height:"128",style:{borderRadius:"25%",border:"2.5px solid",borderColor:`#${l}`,boxShadow:"0px 0px 6px rgba(0, 0, 0, 0.4)"}})}),E.jsxs("div",{className:"user-text",children:[o,S&&E.jsxs("p",{className:"pronouns",children:["(",S,")"]})]})]}),E.jsxs("div",{className:"user-bio-container",children:[y&&E.jsx("div",{className:"user-bio",children:E.jsx(Ci,{components:{img:N_},children:y})}),E.jsx("div",{className:"user-bio",children:E.jsxs("p",{children:["Created: ",new Date(d*1e3).toLocaleString()]})}),E.jsxs("div",{className:"user-bio",children:[E.jsxs("p",{children:["Last Seen: ",new Date(c*1e3).toLocaleString()]}),u&&E.jsx("p",{className:"banned",children:"Banned"})]})]})]}),E.jsx("div",{className:"settings-buttons",style:{float:"right"},children:E.jsx(Ut,{to:`/users/${o}/dm`,children:E.jsx("button",{className:"button",children:"Message"})})})]}),E.jsx("hr",{style:{borderTop:"1px solid #0000001f",width:"100%"}}),E.jsx("strong",{children:"User's Latest Posts:"}),E.jsx("div",{className:"user-posts",children:a.slice(0,12).map(g=>E.jsx(vh,{post:g.p,u:g.u,p:g.p,attachments:g.attachments,author:g.author,isDeleted:g.isDeleted,pinned:g.pinned,post_id:g.post_id,post_origin:g.post_origin,reactions:g.reactions,reply_to:g.reply_to,time:g.t,type:g.type,_id:g._id,user:g.u,active:!1,edited:g.edited_at!==void 0},g._id))})]})}function Rq(){const{loginSuccess:e,userToken:t}=Me();return E.jsxs(E.Fragment,{children:[E.jsx(Th,{userToken:t||"",context:"groupchats",chatId:Ha().chatId})," ",E.jsx(Ch,{context:"groupchats",chatId:Ha().chatId}),!e&&E.jsx("p",{style:{display:"flex",justifyContent:"left",paddingLeft:20},children:"You're not logged in yet!"})," ",E.jsx("div",{className:"posts",children:E.jsx(ks,{context:"groupchats",chatId:Ha().chatId})})]})}function xq(){const{loginSuccess:e,userToken:t}=Me(),{username:n}=Ha(),[r,a]=I.useState(void 0),[i,o]=I.useState(!0);return I.useEffect(()=>{n&&t?F_({user:n,userToken:t,userParam:"dm"}).then(s=>{a(s._id)}).catch(s=>{console.error("Failed to fetch posts:",s)}).finally(()=>{o(!1)}):o(!1)},[n,t]),i?E.jsx("p",{children:"Loading..."}):E.jsxs(E.Fragment,{children:[E.jsx(Th,{userToken:t||"",context:"groupchats",chatId:r}),E.jsx(Ch,{context:"groupchats",chatId:r}),!e&&E.jsx("p",{style:{display:"flex",justifyContent:"left",paddingLeft:20},children:"You're not logged in yet!"}),E.jsx("div",{className:"posts",children:E.jsx(ks,{context:"groupchats",chatId:r})})]})}const Iq=()=>E.jsxs(uN,{children:[E.jsx(EN,{}),E.jsxs(nN,{children:[E.jsx(vn,{path:"/",element:E.jsx(pq,{})}),E.jsx(vn,{path:"messages",element:E.jsx(gq,{})}),E.jsx(vn,{path:"chats",exact:!0,element:E.jsx(kq,{})}),E.jsx(vn,{path:"chats/:chatId",element:E.jsx(Rq,{})}),E.jsx(vn,{path:"settings",element:E.jsx(Aq,{})}),E.jsx(vn,{path:"users/:username",element:E.jsx(_q,{})}),E.jsx(vn,{path:"users/:username/dm",element:E.jsx(xq,{})})]})]});AC(document.getElementById("root")).render(E.jsx(I.StrictMode,{children:E.jsx(bN,{children:E.jsx("div",{className:"app",children:E.jsx(Iq,{})})})})); diff --git a/assets/index-CTmsR5Sl.css b/assets/index-CTmsR5Sl.css new file mode 100644 index 0000000..f580534 --- /dev/null +++ b/assets/index-CTmsR5Sl.css @@ -0,0 +1 @@ +:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color:#000000e8;text-rendering:optimizeLegibility;background-image:linear-gradient(to right,#48ad94cc,#71bcd4cc 75%,#e8f3f2e7);display:flex;justify-content:center}.noto-color-emoji-regular{font-family:"Noto Color Emoji";font-weight:400;font-style:normal}hr{border-top:1px solid #0000001f}audio{box-shadow:5px 5px 10px #00000080,-5px -5px 10px #ffffff4d,0 1px 1px #0003,0 1px 0 0 rgbinseta(255,255,255,.7);border:1px solid rgba(0,0,0,.2);border-radius:26px}audio::-webkit-media-controls-panel{font-size:8px;border:1px solid rgba(0,0,0,.2);border-radius:26px;box-shadow:5px 5px 10px #00000080,-5px -5px 10px #ffffff4d,0 1px 1px #0003,0 1px #ffffffb3 inset;font-size:.6rem}a{text-decoration:inherit}.user-button,.userheading,.navbar-item a{color:#073742}a:hover{text-decoration:underline}a:hover>img{filter:brightness(60%)}button{padding:.3em .6em;font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;border-color:#c7c3bf;background-color:#e9e9e9;background-image:-webkit-linear-gradient(top,#FFFFFF 0%,#E9E9E9 100%);background-image:linear-gradient(to bottom,#fff,#e9e9e9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFF",endColorstr="#E9E9E9",GradientType=0);box-shadow:0 0 0 1px #fff inset}::-webkit-scrollbar{width:15px}::-webkit-scrollbar-track{box-shadow:inset 0 0 5px gray}::-webkit-scrollbar-thumb{box-shadow:inset 0 0 5px #438cad;background:#8fd5f5;border-radius:5px}::-webkit-scrollbar-thumb:hover{background:#b6e2f7}.markdown-container{display:flex;padding-bottom:35px;width:1180px;height:10px}.markdown-button :active{filter:brightness(.7)}.emoticon-item{font-size:small}.emoji-item{cursor:pointer;text-align:center}.emoji-item:hover{background:linear-gradient(#dfdfdf 50%,#afafaf)}.emoji-item img{max-width:100%;max-height:100%;object-fit:cover}textarea{background:linear-gradient(#ffffff67,#d3d3d377)}textarea:focus{outline:none}.markdown-preview{padding-bottom:35px;min-height:35px;border:1px solid rgba(0,0,0,.5);background:linear-gradient(#ffffff67,#d3d3d377)}.markdown-buttons{display:flex;background:linear-gradient(#fff,#d3d3d3);border:1px solid grey;max-width:100%;height:25px;border-radius:2px}.markdown-item{padding:0 7px;background:url(/furrchat/assets/Markdown-button-divider.png) no-repeat right top;box-shadow:inset 0 0 5px #00000048;opacity:.7;height:25px}#preview-button{background:linear-gradient(to bottom,#2cad30,#207e25);color:#fff}#post-button{background:linear-gradient(to bottom,#2c9aad,#20497e);color:#fff}.markdown-item:hover{background:linear-gradient(#dfdfdf 50%,#afafaf)}#preview-button:hover{background:linear-gradient(to bottom,#268829,#175f29)}#post-button:hover{background:linear-gradient(to bottom,#277c8b,#20397c);color:#fff}table{border-collapse:collapse;width:100%}p code{background-color:#eee;border-radius:3px;border:1px solid #b4b4b4;box-shadow:0 1px 1px #0003,0 2px #ffffffb3 inset;color:#333;display:inline-block;font-size:.85em;font-weight:700;line-height:1;padding:2px 4px;white-space:nowrap}th,td{border:1px solid black;padding:8px;text-align:left;box-shadow:4px .5px 4px #00000080}th{background-color:#7aaa9ecc}blockquote{font:14px/20px italic Times,serif;background-color:#faebbc;border-top:1px solid #e1cc89;border-bottom:1px solid #e1cc89;margin:15px;padding:2px 35px;position:relative;box-shadow:0 0 5px #0000004d;border-radius:5px}blockquote:before{content:"“";font-size:40px;line-height:0;position:absolute;top:10px;left:10px;color:#887a4c}blockquote:after{content:"”";font-size:40px;line-height:0;position:absolute;bottom:10px;right:10px;color:#887a4c}@layer utilities{.text-balance{text-wrap:balance}}@keyframes rotate-animation{0%{transform:rotateY(0);scale:100% 1}to{transform:rotateY(360deg)}}.postmessage{border-top:1px solid #0000001f;font-size:.8rem;width:100%;max-height:80vh;overflow-y:auto;text-align:left;line-height:1.2}.post-username-text{margin:0;font-size:7px;text-align:center;max-width:80px;word-wrap:break-word;white-space:normal}.reply{position:relative;box-shadow:0 1px 2px #0000004d,0 0 20px #0000001a inset;padding:4px;color:#3c3c3c;border-radius:0 0 7px 7px}.reply:hover{background:linear-gradient(to top,#ebebeb94,#fffb)}.container{margin:9px auto;display:flex;border-radius:5px;padding:5px;font-family:Verdana;max-width:100%;max-height:500px;background:linear-gradient(#ffffffb3,#d3d3d380);box-shadow:0 0 4px #00000080;border:1px solid grey}.post-pfp-container{position:relative;display:inline-block;perspective:1000px}.post-pfp-container:hover{animation:3s infinite alternate rotate-animation}.user{margin:7px}.post-content{margin-left:10px;margin-top:12px;width:92.5%}.timestamp{display:flex;font-size:.6rem;color:#999;margin-bottom:.5em}.online-indicator,.offline-indicator{position:absolute;bottom:0;left:44px;width:10px;height:10px;border-radius:5px;border:1.5px solid #00000057}.online-indicator{background:linear-gradient(to bottom,green 34%,#0f0)}.offline-indicator{background:linear-gradient(to bottom,maroon 34%,red)}.online-indicator:before,.offline-indicator:before{content:"";position:absolute;top:0;left:0;width:100%;height:50%;border-top-left-radius:inherit;border-top-right-radius:inherit}.online-indicator:before{background:radial-gradient(circle,#34ff34,#0000)}.offline-indicator:before{background:radial-gradient(circle,red,#0000)}.attachments{display:flex;flex-wrap:wrap}.attachment-container{font-size:10px;border:1px solid #83838396;padding:5px;background-color:transparent white;box-shadow:2px 2px 4px #00000080,-2px -2px 4px #ffffff4d,0 1px 1px #0003,0 1px #ffffffb3 inset;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.edit-button{width:100%;padding:10px;font-size:14px}.edit-box{width:100%;max-height:80vh;padding:15px}@media (max-width: 960px){.app{padding:8px}.navbar-search{display:none}}.app{padding:12px;width:1024px;margin:0 auto;background:linear-gradient(to bottom,#ffffff81,#e6e6e680);box-shadow:0 5px 5px 5px #0004,-5px -5px 10px #cecece4d;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);border-radius:10px 10px 0 0}.login-form{display:grid;grid-template-columns:auto auto auto auto auto;gap:5px;font-family:Trebuchet MS;font-size:"16px"}.username-icon,.password-icon{display:none}@media (max-width: 960px){.login-form{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(3,auto);gap:5px}.password-submit{grid-row:3;grid-column:1 / span 2;justify-self:right}}@media (max-width: 700px){.login-form{display:flex;flex-direction:column;gap:5px}.username-label,.password-label{display:none}.username-field,.password-field{display:flex;align-items:center}.username-icon,.password-icon{margin-right:10px}.password-submit{align-self:flex-end}}.banner{background:linear-gradient(to bottom,#fff6,#609c8c80);box-shadow:0 0 4px #00000080;margin:auto;max-width:98%;height:120px;border-radius:10px 10px 0 0}.uList-heading,.uList-users{box-shadow:0 0 4px #00000080;border-radius:10px 10px 0 0;padding:10px}.uList-heading{background:linear-gradient(to bottom,#fff6,#b1bdba80);height:15px;font-weight:600}.uList-users{border-radius:0 0 10px 10px}.navbar{display:flex;max-width:98%;height:30px;margin:0 auto 16px;background:linear-gradient(to top,#233f3780,#609c8c80);box-shadow:0 0 4px #00000080;border-radius:0 0 10px 10px}.navbar-items{display:flex;flex-direction:row;font-weight:700;font-family:Trebuchet MS;text-shadow:rgb(255,255,255) 1px 0 10px}.navbar-items .navbar-item{padding:0 15px;background:url(/furrchat/assets/Divider.png) no-repeat right top}.navbar-items .navbar-item:hover{background:linear-gradient(to top,#15252180,#507e7280 90%,#507e7280)}.navbar-items .navbar-item:hover:first-child{border-radius:0 0 0 10px}input.navbar-search{flex:0;right:22px;position:absolute;height:30px;padding:0 10px;border:none;border-radius:0 0 10px;background:linear-gradient(#fff,#d3d3d3);box-shadow:inset 0 0 5px #9c9c9c}.notification-indicator{position:relative;bottom:20px;left:68px;width:10px;height:10px;background:linear-gradient(to bottom,red,#c00);border-radius:4px;animation:infinite ease-in-out;box-shadow:0 0 2.5px red}.login{position:absolute;margin:-95px 350px}@media (max-width: 960px){.login{margin:-105px 300px}}.popup-overlay{backdrop-filter:blur(1.5px);-webkit-backdrop-filter:blur(1.5px)}.popup-content{border:1px solid rgba(0,0,0,.5)!important;width:fit-content!important;background:linear-gradient(to bottom,#ffffffda,#d3d3d3dc)!important;box-shadow:0 5px 5px 5px #0004,-5px -5px 10px #cecece4d,inset 2px 2px 5px #fffc,inset -2px -2px 5px #0003!important;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}img{max-width:600px}.posts{margin-left:auto;margin-right:auto;display:flex;flex-direction:column}.logo{height:6em;padding:1.5em}.uList{padding:14px;max-width:100%;margin:0 auto;font-size:small}.popup-content{margin:auto;background:#fff;width:50%;padding:5px;border:1px solid #d7d7d7}[role=tooltip].popup-content{width:200px;box-shadow:0 0 3px #00000029;border-radius:5px}.popup-overlay{background:#00000080}[data-popup=tooltip].popup-overlay{background:transparent}.popup-arrow{-webkit-filter:drop-shadow(0 -3px 3px rgba(0,0,0,.16));filter:drop-shadow(0 -3px 3px rgba(0,0,0,.16));color:#fff;stroke-width:2px;stroke:#d7d7d7;stroke-dasharray:30px;stroke-dashoffset:-54px;left:0;right:0;top:0;bottom:0}.social-buttons{padding:5px;border-width:1px;border-radius:2px;font-size:.6rem}.social-buttons:hover{background:linear-gradient(to top,#fff3,#8585854d)}#ReplyButton{background:linear-gradient(to bottom,#7fbce481,#3b5396ad);color:#fff}#ReplyButton:hover,#DeleteButton:hover{background:linear-gradient(to top,#7fbce481,#3b5396ad)}#DeleteButton{background:linear-gradient(to bottom,#e47f7f81,#963b3bad)}#DeleteButton:hover{background:linear-gradient(to top,#e47f7f81,#963b3bad)}#ReactButton{background:linear-gradient(45deg,#ff00004f,#ffbf004f,#ffef004f,#dfff004f,#7fff004f,#20ff004f,#00ff104f,#00ff404f,#00ffff4f,#0040ff4f,#0010ff4f,#2000ff4f,#7f00ff4f,#df00ff4f,#ff00ef4f,#ff00bf4f,#ff00004f 0%,#ffbf004f 12.5%,#ffef004f,#dfff004f 18.75%,#7fff004f,#20ff004f 31.25%,#00ff104f,#00ff404f 37.5%,#00ffff4f,#0040ff4f 62.5%,#0010ff4f,#2000ff4f 68.75%,#7f00ff4f,#df00ff4f 81.25%,#ff00ef4f,#ff00bf4f 87.5%,#ff00004f);color:#fff}.post-transition-enter{opacity:0;transform:translateY(-20px) scale(.9) rotate(-5deg);filter:blur(5px)}.post-transition-enter-active{opacity:1;transform:translateY(0) scale(1) rotate(0);filter:blur(0px);transition:opacity .3s ease-out,transform .3s ease-out,filter .3s ease-out}.post-transition-exit{opacity:1;transform:translateY(0) scale(1)}.post-transition-exit-active{opacity:0;transform:translateY(20px) scale(.9);transition:opacity .3s ease-in,transform .3s ease-in}.emoji-container{position:absolute;z-index:1000}.emoji-picker{opacity:.95;position:fixed;z-index:20000;border:1px solid grey;box-shadow:0 0 4px #00000080;width:39.1%}.emoji-categories{display:flex;border-bottom:1px solid #ccc;box-sizing:border-box}.emoji-list{background:linear-gradient(to bottom,#fff,#e6e6e6);box-shadow:inset 0 0 5px #00000048;border:1px solid lightgray;z-index:1000;height:200px;overflow-y:auto;box-sizing:border-box}#emoji-search{box-sizing:border-box;width:100%;padding:4px 6px;border:1px solid #ccc;font-size:16px;background-color:#fff;box-shadow:inset 0 0 5px #00000048}#emoji-search:focus{outline:none;border-color:#fff;box-shadow:0 0 5px gray}.search-input-container{display:flex;justify-content:center;align-items:center}#file-upload-as-emoji{padding:0 2px;border:1px solid #ccc;font-size:15px;background-color:#fff;box-shadow:inset 0 0 5px #00000048}#typingIndicator{display:flex;padding:5px;box-shadow:0 1px 1px #0003,0 1px #ffffffb3 inset;background:transparent;margin:5px auto;border:1px solid rgba(0,0,0,.2);border-radius:5px;color:gray}.typing-indicator{animation:pulse 1.5s infinite;text-shadow:0 0 5px rgba(255,255,255,.5)}.loader{display:flex;justify-content:center;align-items:center;padding-right:15px}.dot{width:7px;height:7px;margin:2px;border-radius:50%;box-shadow:0 1px 1px #0003,0 1px #ffffffb3 inset;background:#ffffff80;animation:bounce 1.5s infinite ease-in-out}.dot:nth-child(1){animation-delay:0s}.dot:nth-child(2){animation-delay:.3s}.dot:nth-child(3){animation-delay:.6s}@keyframes bounce{0%{transform:translateY(0)}50%{transform:translateY(-8px)}}@keyframes pulse{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}.pagination{display:flex;justify-content:center;margin:20px 10;padding-top:20px}.pagination button{background:linear-gradient(to bottom,#fff9,#dfdfdf99 20%,#dfdfdf99 80%,#fff9);border:1px solid #83838396;border-radius:15px;color:#0f0c0c;font-size:16px;font-family:Verdana,sans-serif;font-weight:700;padding:10px 20px;margin:0 5px;cursor:pointer;transition:all .3s ease;box-shadow:5px 5px 10px #00000080,-5px -5px 10px #ffffff4d,0 3px 1px #0003,inset 0 2px #ffffffb3;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.pagination button:hover{background:linear-gradient(to bottom,#fffc,#dfdfdfcc 20%,#dfdfdfcc 80%,#fffc);box-shadow:7px 7px 15px #00000080,-7px -7px 15px #ffffff4d,0 4px 2px #0003,inset 0 3px 1px #ffffffe6}.pagination button:active{background:linear-gradient(to bottom,#ffffff80,#dfdfdf80 20%,#dfdfdf80 80%,#ffffff80);box-shadow:inset 1px 1px 3px #00000080,inset -1px -1px 3px #ffffff4d}._groupchats_1jy6v_2{display:flex;justify-content:center;padding-top:20px}._categoryButtons_1jy6v_8{display:flex;margin:20px 20px 0;flex-direction:row}._activeButton_1jy6v_14{background-color:#18406b;color:#fff;border:1px solid #133050}._categoryButtons_1jy6v_8 button{flex-grow:1}._categoryButtons_1jy6v_8 button{color:#000}._categoryButtons_1jy6v_8 button:hover{filter:brightness(.8)}._categoryButtons_1jy6v_8 input[type=text]{border-color:#c7c3bf;background-color:#e9e9e9;background-image:-webkit-linear-gradient(top,#FFFFFF 0%,#E9E9E9 100%);background-image:linear-gradient(to bottom,#fff,#e9e9e9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFF",endColorstr="#E9E9E9",GradientType=0);box-shadow:0 0 0 1px #fff inset}._container_1jy6v_41{box-shadow:5px 5px 10px #00000080,-5px -5px 10px #ffffff4d,0 3px 1px #0003,inset 0 2px #ffffffb3;border-radius:6px;padding:6px;margin:20px 20px 0;background:linear-gradient(to bottom,#fff9,#dfdfdf99 20%,#dfdfdf99 80%,#fff9);font-family:Verdana,sans-serif;display:flex;flex-direction:column;height:fit-content;border:1px solid grey}._header_1jy6v_61{display:flex;align-items:center;margin-bottom:6px;background:linear-gradient(to bottom,rgba(223,223,223,.6) 0%,rgba(255,255,255,.6) 20%,rgba(255,255,255,.6) 80% rgba(223,223,223,.6) 100%,);padding:6px;border-radius:6px;box-shadow:0 4px 8px #0003}._header_1jy6v_61 img{border-radius:6px;margin-right:6px;box-shadow:0 2px 4px #0003}._header_1jy6v_61 h2{margin:0;font-size:24px;font-weight:600;opacity:.8;text-shadow:0 0px 2px rgb(255,255,255)}._header_1jy6v_61 h2 i{margin-left:8px;color:#999;font-size:14px}._infobox_1jy6v_96{padding:6px;border-radius:6px;background-color:#ffffffb4;box-shadow:0 4px 8px #0003;margin-bottom:6px}._infobox_1jy6v_96 div{margin-bottom:6px}._infobox_1jy6v_96 strong{color:#555;font-size:14px}._infobox_1jy6v_96 span{font-size:14px;color:#333}._recentactivity_1jy6v_120{border-top:1px solid rgba(0,0,0,.7);padding-top:6px;color:#666;font-size:14px}._recentactivity_1jy6v_120 p{margin:0 0 6px;font-weight:600}._recentactivity_1jy6v_120 ._activityitem_1jy6v_132{border-radius:6px;background-color:#ffffffb4;padding:6px;margin-bottom:6px;box-shadow:0 2px 4px #0003;display:flex;align-items:center}._recentactivity_1jy6v_120 ._activityitem_1jy6v_132 img{border-radius:6px;margin-right:6px;box-shadow:0 2px 4px #0003}._recentactivity_1jy6v_120 ._activityitem_1jy6v_132 strong{display:block;margin-bottom:4px}.color-picker-container,.user-bio{background:#d3e3e783;border-radius:3px;box-shadow:2.5px 2.5px 2.5px #00000080,-5px -5px 10px #ffffff4d,0 3px 1px #0003,inset 0 1px #ffffffb3}.user-bio-container{width:100%}.textarea-userbio{font-size:16px;width:100%;height:100px;box-sizing:border-box;resize:none;background-color:#fff;box-shadow:#0000001a 0 4px 8px;border-width:1px;border-style:solid;border-color:#ddd;border-image:initial;border-radius:4px;padding:10px}.color-picker-container{display:flex;align-items:center;border:1px solid #ddd;padding:15px}.color-picker-container label{margin-right:10px;font-size:17px;color:#333}input#pickedAvatarColor{width:50px;height:30px;border:none;background:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:4px}input#pickedAvatarColor::-webkit-color-swatch-wrapper,input#pickedAvatarColor::-webkit-color-swatch{border:1px solid #ddd;border-radius:4px}.pfpset{display:flex;flex-wrap:wrap}.pfp-item,.pfp-container{position:relative}.pick-pfp{border-radius:4px;box-shadow:0 4px 6px #0003;border:.5px solid #ddd;margin:3px;cursor:pointer;transition:background-color .3s linear}.pick-pfp:hover{background-color:#f0f0f0}.remove-pfp{position:absolute;top:0;right:0;background:radial-gradient(circle,#ff0000e6,#c80000e6);color:#fff;border:2px solid rgba(255,255,255,.4);border-radius:5px;width:20px;height:20px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:15px;font-weight:700;box-shadow:0 4px 6px #0000004d,inset 0 1px 3px #fff6;transform:translate(50%,-50%);transition:background .3s ease,box-shadow .3s ease}.remove-pfp:hover{background:radial-gradient(circle,#c80000e6,#960000e6);box-shadow:0 4px 8px #0006,inset 0 1px 5px #ffffff80}.settings-container{display:flex;flex-direction:column;gap:10px;padding:25px}.settings-buttons{flex-direction:row}.settings{padding:20px;margin:0 20px;border-radius:10px;box-shadow:0 4px 8px #0000001a;background:linear-gradient(to bottom,#ffffff81,#e6e6e680);box-shadow:5px 5px 10px #00000080,-5px -5px 10px #ffffff4d,0 3px 1px #0003,inset 0 2px #ffffffb3;border:1px solid rgb(172,172,172)}.user-profile{display:flex;flex-direction:row;align-items:center}.profile-info{display:flex;flex-direction:column;align-items:center;margin-right:30px}.post-pfp-container{display:block}.user-text{font-size:19px;text-align:center}.pronouns{font-size:12px;color:#888;margin-block-start:0px;margin-block-end:0px}.user-posts{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px}.user-bio{padding:8px;margin:4px}.user-bio p{margin:0} diff --git a/assets/index-aRDurAYy.css b/assets/index-aRDurAYy.css deleted file mode 100644 index 80bc8a0..0000000 --- a/assets/index-aRDurAYy.css +++ /dev/null @@ -1 +0,0 @@ -:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color:#000000e8;text-rendering:optimizeLegibility;background-image:linear-gradient(to right,#48ad94cc,#71bcd4cc 75%,#e8f3f2e7);display:flex;justify-content:center}.noto-color-emoji-regular{font-family:"Noto Color Emoji";font-weight:400;font-style:normal}hr{border-top:1px solid #0000001f}audio{box-shadow:5px 5px 10px #00000080,-5px -5px 10px #ffffff4d,0 1px 1px #0003,0 1px 0 0 rgbinseta(255,255,255,.7);border:1px solid rgba(0,0,0,.2);border-radius:26px}audio::-webkit-media-controls-panel{font-size:8px;border:1px solid rgba(0,0,0,.2);border-radius:26px;box-shadow:5px 5px 10px #00000080,-5px -5px 10px #ffffff4d,0 1px 1px #0003,0 1px #ffffffb3 inset;font-size:.6rem}a{text-decoration:inherit}.user-button,.userheading,.navbar-item a{color:#073742}a:hover{text-decoration:underline}a:hover>img{filter:brightness(60%)}button{padding:.3em .6em;font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;border-color:#c7c3bf;background-color:#e9e9e9;background-image:-webkit-linear-gradient(top,#FFFFFF 0%,#E9E9E9 100%);background-image:linear-gradient(to bottom,#fff,#e9e9e9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFF",endColorstr="#E9E9E9",GradientType=0);box-shadow:0 0 0 1px #fff inset}::-webkit-scrollbar{width:15px}::-webkit-scrollbar-track{box-shadow:inset 0 0 5px gray}::-webkit-scrollbar-thumb{box-shadow:inset 0 0 5px #438cad;background:#8fd5f5;border-radius:5px}::-webkit-scrollbar-thumb:hover{background:#b6e2f7}.markdown-container{display:flex;padding-bottom:35px;width:1180px;height:10px}.markdown-button :active{filter:brightness(.7)}.emoticon-item{font-size:small}.emoji-item{cursor:pointer;text-align:center}.emoji-item:hover{background:linear-gradient(#dfdfdf 50%,#afafaf)}.emoji-item img{max-width:100%;max-height:100%;object-fit:cover}textarea{background:linear-gradient(#ffffff67,#d3d3d377)}textarea:focus{outline:none}.markdown-preview{padding-bottom:35px;min-height:35px;border:1px solid rgba(0,0,0,.5);background:linear-gradient(#ffffff67,#d3d3d377)}.markdown-buttons{display:flex;background:linear-gradient(#fff,#d3d3d3);border:1px solid grey;max-width:100%;height:25px;border-radius:2px}.markdown-item{padding:0 7px;background:url(/furrchat/assets/Markdown-button-divider.png) no-repeat right top;box-shadow:inset 0 0 5px #00000048;opacity:.7;height:25px}#preview-button{background:linear-gradient(to bottom,#2cad30,#207e25);color:#fff}#post-button{background:linear-gradient(to bottom,#2c9aad,#20497e);color:#fff}.markdown-item:hover{background:linear-gradient(#dfdfdf 50%,#afafaf)}#preview-button:hover{background:linear-gradient(to bottom,#268829,#175f29)}#post-button:hover{background:linear-gradient(to bottom,#277c8b,#20397c);color:#fff}table{border-collapse:collapse;width:100%}p code{background-color:#eee;border-radius:3px;border:1px solid #b4b4b4;box-shadow:0 1px 1px #0003,0 2px #ffffffb3 inset;color:#333;display:inline-block;font-size:.85em;font-weight:700;line-height:1;padding:2px 4px;white-space:nowrap}th,td{border:1px solid black;padding:8px;text-align:left;box-shadow:4px .5px 4px #00000080}th{background-color:#7aaa9ecc}blockquote{font:14px/20px italic Times,serif;background-color:#faebbc;border-top:1px solid #e1cc89;border-bottom:1px solid #e1cc89;margin:15px;padding:2px 35px;position:relative;box-shadow:0 0 5px #0000004d;border-radius:5px}blockquote:before{content:"“";font-size:40px;line-height:0;position:absolute;top:10px;left:10px;color:#887a4c}blockquote:after{content:"”";font-size:40px;line-height:0;position:absolute;bottom:10px;right:10px;color:#887a4c}@layer utilities{.text-balance{text-wrap:balance}}@keyframes rotate-animation{0%{transform:rotateY(0);scale:100% 1}to{transform:rotateY(360deg)}}.postmessage{border-top:1px solid #0000001f;font-size:.8rem;width:100%;max-height:80vh;overflow-y:auto;text-align:left;line-height:1.2}.post-username-text{margin:0;font-size:7px;text-align:center;max-width:80px;word-wrap:break-word;white-space:normal}.reply{position:relative;box-shadow:0 1px 2px #0000004d,0 0 20px #0000001a inset;padding:4px;color:#3c3c3c;border-radius:0 0 7px 7px}.reply:hover{background:linear-gradient(to top,#ebebeb94,#fffb)}.container{margin:9px auto;display:flex;border-radius:5px;padding:5px;font-family:Verdana;max-width:100%;max-height:500px;background:linear-gradient(#ffffff67,#d3d3d377);box-shadow:0 0 4px #00000080;border:1px solid grey;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.post-pfp-container{position:relative;display:inline-block;perspective:1000px}.post-pfp-container:hover{animation:3s infinite alternate rotate-animation}.user{margin:7px}.post-content{margin-left:10px;margin-top:12px;width:92.5%}.timestamp{display:flex;font-size:.6rem;color:#999;margin-bottom:.5em}.online-indicator,.offline-indicator{position:absolute;bottom:0;left:44px;width:10px;height:10px;border-radius:5px;border:1.5px solid #00000057}.online-indicator{background:linear-gradient(to bottom,green 34%,#0f0)}.offline-indicator{background:linear-gradient(to bottom,maroon 34%,red)}.online-indicator:before,.offline-indicator:before{content:"";position:absolute;top:0;left:0;width:100%;height:50%;border-top-left-radius:inherit;border-top-right-radius:inherit}.online-indicator:before{background:radial-gradient(circle,#34ff34,#0000)}.offline-indicator:before{background:radial-gradient(circle,red,#0000)}.attachments{display:flex;flex-wrap:wrap}.attachment-container{font-size:10px;border:1px solid #83838396;padding:5px;background-color:transparent white;box-shadow:2px 2px 4px #00000080,-2px -2px 4px #ffffff4d,0 1px 1px #0003,0 1px #ffffffb3 inset;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.edit-button{width:100%;padding:10px;font-size:14px}.edit-box{width:100%;max-height:80vh;padding:15px}@media (max-width: 960px){.app{padding:8px}.navbar-search{display:none}}.app{padding:12px;width:1024px;margin:0 auto;background:linear-gradient(to bottom,#ffffff81,#e6e6e680);box-shadow:0 5px 5px 5px #0004,-5px -5px 10px #cecece4d;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);border-radius:10px 10px 0 0}.login-form{display:grid;grid-template-columns:auto auto auto auto auto;gap:5px;font-family:Trebuchet MS;font-size:"16px"}.username-icon,.password-icon{display:none}@media (max-width: 960px){.login-form{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(3,auto);gap:5px}.password-submit{grid-row:3;grid-column:1 / span 2;justify-self:right}}@media (max-width: 700px){.login-form{display:flex;flex-direction:column;gap:5px}.username-label,.password-label{display:none}.username-field,.password-field{display:flex;align-items:center}.username-icon,.password-icon{margin-right:10px}.password-submit{align-self:flex-end}}.banner{background:linear-gradient(to bottom,#fff6,#609c8c80);box-shadow:0 0 4px #00000080;margin:auto;max-width:98%;height:120px;border-radius:10px 10px 0 0}.uList-heading,.uList-users{box-shadow:0 0 4px #00000080;border-radius:10px 10px 0 0;padding:10px}.uList-heading{background:linear-gradient(to bottom,#fff6,#b1bdba80);height:15px;font-weight:600}.uList-users{border-radius:0 0 10px 10px}.navbar{display:flex;max-width:98%;height:30px;margin:0 auto 16px;background:linear-gradient(to top,#233f3780,#609c8c80);box-shadow:0 0 4px #00000080;border-radius:0 0 10px 10px}.navbar-items{display:flex;flex-direction:row;font-weight:700;font-family:Trebuchet MS;text-shadow:rgb(255,255,255) 1px 0 10px}.navbar-items .navbar-item{padding:0 15px;background:url(/furrchat/assets/Divider.png) no-repeat right top}.navbar-items .navbar-item:hover{background:linear-gradient(to top,#15252180,#507e7280 90%,#507e7280)}.navbar-items .navbar-item:hover:first-child{border-radius:0 0 0 10px}input.navbar-search{flex:0;right:22px;position:absolute;height:30px;padding:0 10px;border:none;border-radius:0 0 10px;background:linear-gradient(#fff,#d3d3d3);box-shadow:inset 0 0 5px #9c9c9c}.notification-indicator{position:relative;bottom:20px;left:68px;width:10px;height:10px;background:linear-gradient(to bottom,red,#c00);border-radius:4px;animation:infinite ease-in-out;box-shadow:0 0 2.5px red}.login{position:absolute;margin:-95px 350px}@media (max-width: 960px){.login{margin:-105px 300px}}.popup-overlay{backdrop-filter:blur(1.5px);-webkit-backdrop-filter:blur(1.5px)}img{max-width:600px}.posts{margin-left:auto;margin-right:auto;display:flex;flex-direction:column}.logo{height:6em;padding:1.5em}.uList{padding:14px;max-width:100%;margin:0 auto;font-size:small}.popup-content{margin:auto;background:#fff;width:50%;padding:5px;border:1px solid #d7d7d7}[role=tooltip].popup-content{width:200px;box-shadow:0 0 3px #00000029;border-radius:5px}.popup-overlay{background:#00000080}[data-popup=tooltip].popup-overlay{background:transparent}.popup-arrow{-webkit-filter:drop-shadow(0 -3px 3px rgba(0,0,0,.16));filter:drop-shadow(0 -3px 3px rgba(0,0,0,.16));color:#fff;stroke-width:2px;stroke:#d7d7d7;stroke-dasharray:30px;stroke-dashoffset:-54px;left:0;right:0;top:0;bottom:0}.social-buttons{padding:5px;border-width:1px;border-radius:2px;font-size:.6rem}.social-buttons:hover{background:linear-gradient(to top,#fff3,#8585854d)}#ReplyButton{background:linear-gradient(to bottom,#7fbce481,#3b5396ad);color:#fff}#ReplyButton:hover,#DeleteButton:hover{background:linear-gradient(to top,#7fbce481,#3b5396ad)}#DeleteButton{background:linear-gradient(to bottom,#e47f7f81,#963b3bad)}#DeleteButton:hover{background:linear-gradient(to top,#e47f7f81,#963b3bad)}#ReactButton{background:linear-gradient(45deg,#ff00004f,#ffbf004f,#ffef004f,#dfff004f,#7fff004f,#20ff004f,#00ff104f,#00ff404f,#00ffff4f,#0040ff4f,#0010ff4f,#2000ff4f,#7f00ff4f,#df00ff4f,#ff00ef4f,#ff00bf4f,#ff00004f 0%,#ffbf004f 12.5%,#ffef004f,#dfff004f 18.75%,#7fff004f,#20ff004f 31.25%,#00ff104f,#00ff404f 37.5%,#00ffff4f,#0040ff4f 62.5%,#0010ff4f,#2000ff4f 68.75%,#7f00ff4f,#df00ff4f 81.25%,#ff00ef4f,#ff00bf4f 87.5%,#ff00004f);color:#fff}.post-transition-enter{opacity:0;transform:translateY(-20px) scale(.9) rotate(-5deg);filter:blur(5px)}.post-transition-enter-active{opacity:1;transform:translateY(0) scale(1) rotate(0);filter:blur(0px);transition:opacity .3s ease-out,transform .3s ease-out,filter .3s ease-out}.post-transition-exit{opacity:1;transform:translateY(0) scale(1)}.post-transition-exit-active{opacity:0;transform:translateY(20px) scale(.9);transition:opacity .3s ease-in,transform .3s ease-in}.emoji-container{position:absolute;z-index:1000}.emoji-picker{opacity:.95;position:fixed;z-index:20000;border:1px solid grey;box-shadow:0 0 4px #00000080;width:39.1%}.emoji-categories{display:flex;border-bottom:1px solid #ccc;box-sizing:border-box}.emoji-list{background:linear-gradient(to bottom,#fff,#e6e6e6);box-shadow:inset 0 0 5px #00000048;border:1px solid lightgray;z-index:1000;height:200px;overflow-y:auto;box-sizing:border-box}#emoji-search{box-sizing:border-box;width:100%;padding:4px 6px;border:1px solid #ccc;font-size:16px;background-color:#fff;box-shadow:inset 0 0 5px #00000048}#emoji-search:focus{outline:none;border-color:#fff;box-shadow:0 0 5px gray}.search-input-container{display:flex;justify-content:center;align-items:center}#file-upload-as-emoji{padding:0 2px;border:1px solid #ccc;font-size:15px;background-color:#fff;box-shadow:inset 0 0 5px #00000048}#typingIndicator{display:flex;padding:5px;box-shadow:0 1px 1px #0003,0 1px #ffffffb3 inset;background:transparent;margin:5px auto;border:1px solid rgba(0,0,0,.2);border-radius:5px;color:gray}.typing-indicator{animation:pulse 1.5s infinite;text-shadow:0 0 5px rgba(255,255,255,.5)}.loader{display:flex;justify-content:center;align-items:center;padding-right:15px}.dot{width:7px;height:7px;margin:2px;border-radius:50%;box-shadow:0 1px 1px #0003,0 1px #ffffffb3 inset;background:#ffffff80;animation:bounce 1.5s infinite ease-in-out}.dot:nth-child(1){animation-delay:0s}.dot:nth-child(2){animation-delay:.3s}.dot:nth-child(3){animation-delay:.6s}@keyframes bounce{0%{transform:translateY(0)}50%{transform:translateY(-8px)}}@keyframes pulse{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}.pagination{display:flex;justify-content:center;margin:20px 10;padding-top:20px}.pagination button{background:linear-gradient(to bottom,#fff9,#dfdfdf99 20%,#dfdfdf99 80%,#fff9);border:1px solid #83838396;border-radius:15px;color:#0f0c0c;font-size:16px;font-family:Verdana,sans-serif;font-weight:700;padding:10px 20px;margin:0 5px;cursor:pointer;transition:all .3s ease;box-shadow:5px 5px 10px #00000080,-5px -5px 10px #ffffff4d,0 3px 1px #0003,inset 0 2px #ffffffb3;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.pagination button:hover{background:linear-gradient(to bottom,#fffc,#dfdfdfcc 20%,#dfdfdfcc 80%,#fffc);box-shadow:7px 7px 15px #00000080,-7px -7px 15px #ffffff4d,0 4px 2px #0003,inset 0 3px 1px #ffffffe6}.pagination button:active{background:linear-gradient(to bottom,#ffffff80,#dfdfdf80 20%,#dfdfdf80 80%,#ffffff80);box-shadow:inset 1px 1px 3px #00000080,inset -1px -1px 3px #ffffff4d}._groupchats_1jy6v_2{display:flex;justify-content:center;padding-top:20px}._categoryButtons_1jy6v_8{display:flex;margin:20px 20px 0;flex-direction:row}._activeButton_1jy6v_14{background-color:#18406b;color:#fff;border:1px solid #133050}._categoryButtons_1jy6v_8 button{flex-grow:1}._categoryButtons_1jy6v_8 button{color:#000}._categoryButtons_1jy6v_8 button:hover{filter:brightness(.8)}._categoryButtons_1jy6v_8 input[type=text]{border-color:#c7c3bf;background-color:#e9e9e9;background-image:-webkit-linear-gradient(top,#FFFFFF 0%,#E9E9E9 100%);background-image:linear-gradient(to bottom,#fff,#e9e9e9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFF",endColorstr="#E9E9E9",GradientType=0);box-shadow:0 0 0 1px #fff inset}._container_1jy6v_41{box-shadow:5px 5px 10px #00000080,-5px -5px 10px #ffffff4d,0 3px 1px #0003,inset 0 2px #ffffffb3;border-radius:6px;padding:6px;margin:20px 20px 0;background:linear-gradient(to bottom,#fff9,#dfdfdf99 20%,#dfdfdf99 80%,#fff9);font-family:Verdana,sans-serif;display:flex;flex-direction:column;height:fit-content;border:1px solid grey}._header_1jy6v_61{display:flex;align-items:center;margin-bottom:6px;background:linear-gradient(to bottom,rgba(223,223,223,.6) 0%,rgba(255,255,255,.6) 20%,rgba(255,255,255,.6) 80% rgba(223,223,223,.6) 100%,);padding:6px;border-radius:6px;box-shadow:0 4px 8px #0003}._header_1jy6v_61 img{border-radius:6px;margin-right:6px;box-shadow:0 2px 4px #0003}._header_1jy6v_61 h2{margin:0;font-size:24px;font-weight:600;opacity:.8;text-shadow:0 0px 2px rgb(255,255,255)}._header_1jy6v_61 h2 i{margin-left:8px;color:#999;font-size:14px}._infobox_1jy6v_96{padding:6px;border-radius:6px;background-color:#ffffffb4;box-shadow:0 4px 8px #0003;margin-bottom:6px}._infobox_1jy6v_96 div{margin-bottom:6px}._infobox_1jy6v_96 strong{color:#555;font-size:14px}._infobox_1jy6v_96 span{font-size:14px;color:#333}._recentactivity_1jy6v_120{border-top:1px solid rgba(0,0,0,.7);padding-top:6px;color:#666;font-size:14px}._recentactivity_1jy6v_120 p{margin:0 0 6px;font-weight:600}._recentactivity_1jy6v_120 ._activityitem_1jy6v_132{border-radius:6px;background-color:#ffffffb4;padding:6px;margin-bottom:6px;box-shadow:0 2px 4px #0003;display:flex;align-items:center}._recentactivity_1jy6v_120 ._activityitem_1jy6v_132 img{border-radius:6px;margin-right:6px;box-shadow:0 2px 4px #0003}._recentactivity_1jy6v_120 ._activityitem_1jy6v_132 strong{display:block;margin-bottom:4px}.color-picker-container,.user-bio{background:#d3e3e783;border-radius:3px;box-shadow:2.5px 2.5px 2.5px #00000080,-5px -5px 10px #ffffff4d,0 3px 1px #0003,inset 0 1px #ffffffb3}.user-bio-container{width:100%}.textarea-userbio{font-size:16px;width:100%;height:100px;box-sizing:border-box;resize:none;background-color:#fff;box-shadow:#0000001a 0 4px 8px;border-width:1px;border-style:solid;border-color:#ddd;border-image:initial;border-radius:4px;padding:10px}.color-picker-container{display:flex;align-items:center;border:1px solid #ddd;padding:15px}.color-picker-container label{margin-right:10px;font-size:17px;color:#333}input#pickedAvatarColor{width:50px;height:30px;border:none;background:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:4px}input#pickedAvatarColor::-webkit-color-swatch-wrapper,input#pickedAvatarColor::-webkit-color-swatch{border:1px solid #ddd;border-radius:4px}.pfpset{display:flex;flex-wrap:wrap}.pfp-item,.pfp-container{position:relative}.pick-pfp{border-radius:4px;box-shadow:0 4px 6px #0003;border:.5px solid #ddd;margin:3px;cursor:pointer;transition:background-color .3s linear}.pick-pfp:hover{background-color:#f0f0f0}.remove-pfp{position:absolute;top:0;right:0;background:radial-gradient(circle,#ff0000e6,#c80000e6);color:#fff;border:2px solid rgba(255,255,255,.4);border-radius:5px;width:20px;height:20px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:15px;font-weight:700;box-shadow:0 4px 6px #0000004d,inset 0 1px 3px #fff6;transform:translate(50%,-50%);transition:background .3s ease,box-shadow .3s ease}.remove-pfp:hover{background:radial-gradient(circle,#c80000e6,#960000e6);box-shadow:0 4px 8px #0006,inset 0 1px 5px #ffffff80}.settings-container{display:flex;flex-direction:column;gap:10px;padding:25px}.settings-buttons{flex-direction:row}.settings{padding:20px;margin:0 20px;border-radius:10px;box-shadow:0 4px 8px #0000001a;background:linear-gradient(to bottom,#ffffff81,#e6e6e680);box-shadow:5px 5px 10px #00000080,-5px -5px 10px #ffffff4d,0 3px 1px #0003,inset 0 2px #ffffffb3;border:1px solid rgb(172,172,172)}.user-profile{display:flex;flex-direction:row;align-items:center}.profile-info{display:flex;flex-direction:column;align-items:center;margin-right:30px}.post-pfp-container{display:block}.user-text{font-size:19px;text-align:center}.pronouns{font-size:12px;color:#888;margin-block-start:0px;margin-block-end:0px}.user-posts{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px}.user-bio{padding:8px;margin:4px}.user-bio p{margin:0} diff --git a/index.html b/index.html index 623f90f..698e274 100644 --- a/index.html +++ b/index.html @@ -8,8 +8,8 @@ Home - FurrChat - - + +