"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2570],{6468:(e,n,t)=>{t.d(n,{e:()=>g});var r=t(37876),i=t(30090);let l=e=>{let{children:n,breakpoints:t}=e,{breakpoint:l}=(0,i.dv)();return t.includes(l)?(0,r.jsx)(r.Fragment,{children:n}):null};var o=t(16607),a=t(14728),s=t(75583),d=t(89572),c=t(76841),u=t(92637),h=t(57175),p=t(77680);let m=e=>{let{id:n,type:t}=e,{channel:i}=(0,o.p)(),{length:l}=(0,a.E1)(),{hover:m}=(0,u.a)(),{ref:g,mode:x,dropMode:f}=(0,s.i)({id:n,type:t}),y=!!(null==i?void 0:i.can.update);return(0,r.jsx)(d.a,{ref:g,css:{position:"absolute",top:0,left:0,zIndex:1},style:{..."Idle"!==f||"Preview"===x?{width:"100%",height:"100%"}:{width:"auto",height:"auto"}},children:"Preview"===x||"Over"===x?(0,r.jsx)(h.Z,{css:{width:"100%",height:"100%",color:"$focus",border:"1px solid",bg:"$background"}}):(0,r.jsx)(d.a,{css:{display:"flex",gap:"$1",padding:"$2"},children:"Hover"===m&&l>1&&y&&(0,r.jsx)(c.$,{size:"icon",css:{cursor:"grab"},children:(0,r.jsx)(p.v$n,{})})})})},g=e=>{let{id:n,type:t}=e;return(0,r.jsx)(l,{breakpoints:["2","3","4"],children:(0,r.jsx)(m,{id:n,type:t})})}},23698:(e,n,t)=>{t.d(n,{K:()=>o});var r=t(37876),i=t(89572),l=t(96945);let o=()=>(0,r.jsx)(l.L,{name:"Not found",children:(0,r.jsx)(i.a,{css:{width:"100%",height:"100%",border:"1px solid $gray2"}})})},29507:(e,n,t)=>{t.d(n,{r:()=>r});let r=e=>Array.isArray(e)?e[0]:e||""},31576:(e,n,t)=>{t.d(n,{ll:()=>eh,Yu:()=>ec,PU:()=>eu,DX:()=>ep});var r=t(28888),i=t(37876),l=t(14905),o=t(86355),a=t(89572),s=t(96945),d=t(98101),c=t(57314),u=t(41058),h=t(50851),p=t(70842),m=t(77680),g=t(6468),x=t(57048),f=t(87479),y=t(96428);function v(){let e=(0,r._)(["\n fragment GridCellResizedImageFragment on ResizedImage {\n id\n blurhash\n grid_cell_resized_image: resized(\n width: 300\n height: 300\n quality: 75\n flatten: true\n ) {\n id\n width\n height\n src_1x\n src_2x\n }\n }\n"]);return v=function(){return e},e}let j=e=>{let{resizedImage:n,altText:t}=e,r=[n.grid_cell_resized_image.src_1x,n.grid_cell_resized_image.src_2x];if(!n.grid_cell_resized_image.width||!n.grid_cell_resized_image.height)return(0,i.jsx)(y._,{srcs:r,alt:t||""});let l=n.grid_cell_resized_image.width,o=n.grid_cell_resized_image.height;return(0,i.jsx)(a.a,{css:{bg:"$gray1",position:"relative",aspectRatio:"".concat(l," / ").concat(o),...o>l?{height:"100%",width:"auto"}:{width:"100%",height:"auto"},maxWidth:"100%",maxHeight:"100%"},children:(0,i.jsx)(f.H,{srcs:r,blurhash:n.blurhash,css:{width:"100%",height:"100%"},alt:t||""})})},b=(0,o.J1)(v());function C(){let e=(0,r._)(["\n fragment GridCellAttachmentContentFragment on Attachment {\n id\n title\n file_content_type\n file_size\n file_extension\n resized_image {\n ...GridCellResizedImageFragment\n id\n }\n }\n ","\n"]);return C=function(){return e},e}function _(){let e=(0,r._)(["\n fragment GridCellAttachmentFragment on Attachment {\n ...GridCellAttachmentContentFragment\n id\n title\n href\n counts {\n comments\n }\n }\n ","\n"]);return _=function(){return e},e}let k=e=>{var n;let{attachment:t}=e,{link:r}=(0,c.U)({href:t.href,blockId:t.id.toString()}),{connection:l,fetch:o}=(0,h.$)({id:t.id,type:"Block"}),{isPinned:a}=(0,x.i)({id:t.id,type:"Block"});return(0,i.jsxs)(s.L,{link:r,onMouseEnter:o,name:[t.title,l.by||t.title],meta:[null,l.at],overlay:(0,i.jsx)(d.V,{id:t.id,type:"Block"}),count:t.counts.comments,hint:(0,i.jsx)(i.Fragment,{children:(null==(n=t.file_content_type)?void 0:n.startsWith("video"))?(0,i.jsx)(p.E,{children:(0,i.jsx)(m.udU,{})}):(0,i.jsx)(i.Fragment,{children:t.file_extension&&(0,i.jsx)(p.E,{children:t.file_extension})})}),pinned:a,children:[(0,i.jsx)(g.e,{id:t.id,type:"Block"}),(0,i.jsx)($,{attachment:t})]})},$=e=>{var n,t;let{attachment:r}=e;return(0,i.jsx)(a.a,{css:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:r.resized_image?(0,i.jsx)(j,{resizedImage:r.resized_image}):(0,i.jsx)(a.a,{css:{display:"flex",width:"100%",height:"100%",bg:"$gray1",p:"$2",border:"1px solid transparent","&:hover":{borderColor:"$gray3"}},children:(0,i.jsx)(u.u,{css:{width:"100%"},definitions:[{term:"Name",description:r.title},{term:"Content Type",description:null!=(n=r.file_content_type)?n:"Unknown"},{term:"File Size",description:null!=(t=r.file_size)?t:"Unknown"}]})})})},w=(0,o.J1)(C(),b),I=(0,o.J1)(_(),w);var G=t(93958);function E(){let e=(0,r._)(["\n fragment GridCellEmbedContentFragment on Embed {\n id\n resized_image {\n ...GridCellResizedImageFragment\n id\n }\n }\n ","\n"]);return E=function(){return e},e}function z(){let e=(0,r._)(["\n fragment GridCellEmbedFragment on Embed {\n ...GridCellEmbedContentFragment\n id\n title\n href\n source {\n url\n provider_name\n }\n counts {\n comments\n }\n }\n ","\n"]);return z=function(){return e},e}let B=e=>{var n,t;let{embed:r}=e,{link:l}=(0,c.U)({href:r.href,blockId:r.id.toString()}),{connection:o,fetch:a}=(0,h.$)({id:r.id,type:"Block"}),{isPinned:u}=(0,x.i)({id:r.id,type:"Block"});return(0,i.jsxs)(s.L,{link:l,onMouseEnter:a,name:[r.title,o.by||r.title],meta:[null,o.at],overlay:(0,i.jsx)(d.V,{id:r.id,type:"Block",children:(null==(n=r.source)?void 0:n.url)&&(0,i.jsx)(G.q,{href:r.source.url})}),count:r.counts.comments,hint:(0,i.jsx)(i.Fragment,{children:(null==(t=r.source)?void 0:t.provider_name)&&(0,i.jsx)(p.E,{children:r.source.provider_name})}),pinned:u,children:[(0,i.jsx)(g.e,{id:r.id,type:"Block"}),(0,i.jsx)(F,{embed:r})]})},F=e=>{let{embed:n}=e;return n.resized_image?(0,i.jsx)(j,{resizedImage:n.resized_image}):null},L=(0,o.J1)(E(),b),A=(0,o.J1)(z(),L);var M=t(33891);function P(){let e=(0,r._)(["\n fragment GridCellImageContentFragment on Image {\n id\n alt_text\n resized_image {\n ...GridCellResizedImageFragment\n }\n }\n ","\n"]);return P=function(){return e},e}function D(){let e=(0,r._)(["\n fragment GridCellImageFragment on Image {\n ...GridCellImageContentFragment\n id\n href\n title\n counts {\n comments\n }\n source {\n url\n }\n }\n ","\n"]);return D=function(){return e},e}let T=e=>{var n;let{image:t}=e,{link:r}=(0,c.U)({href:t.href,blockId:t.id.toString()}),{connection:l,fetch:o}=(0,h.$)({id:t.id,type:"Block"}),{isPinned:a}=(0,x.i)({id:t.id,type:"Block"});return(0,i.jsxs)(s.L,{link:r,onMouseEnter:o,name:[t.title,l.by||t.title],meta:[null,l.at],overlay:(0,i.jsx)(d.V,{id:t.id,type:"Block",children:(null==(n=t.source)?void 0:n.url)&&(0,i.jsx)(G.q,{href:t.source.url})}),count:t.counts.comments,pinned:a,children:[(0,i.jsx)(g.e,{id:t.id,type:"Block"}),(0,i.jsx)(J,{image:t})]})},J=e=>{let{image:n}=e;return n.resized_image?(0,i.jsx)(j,{resizedImage:n.resized_image}):null},S=(0,o.J1)(P(),b),U=(0,o.J1)(D(),S);function R(){let e=(0,r._)(["\n fragment GridCellLinkContentFragment on Link {\n id\n resized_image {\n ...GridCellResizedImageFragment\n }\n }\n ","\n"]);return R=function(){return e},e}function H(){let e=(0,r._)(["\n fragment GridCellLinkFragment on Link {\n ...GridCellLinkContentFragment\n id\n href\n title\n source {\n url\n }\n counts {\n comments\n }\n }\n ","\n"]);return H=function(){return e},e}let W=e=>{var n;let{link:t}=e,{link:r}=(0,c.U)({href:t.href,blockId:t.id.toString()}),{connection:l,fetch:o}=(0,h.$)({id:t.id,type:"Block"}),{isPinned:a}=(0,x.i)({id:t.id,type:"Block"});return(0,i.jsxs)(s.L,{link:r,name:[t.title,l.by||t.title],meta:[null,l.at],onMouseEnter:o,overlay:(0,i.jsx)(d.V,{id:t.id,type:"Block",children:(null==(n=t.source)?void 0:n.url)&&(0,i.jsx)(G.q,{href:t.source.url})}),count:t.counts.comments,hint:(0,i.jsx)(p.E,{children:(0,i.jsx)(m.Q$,{})}),pinned:a,children:[(0,i.jsx)(g.e,{id:t.id,type:"Block"}),(0,i.jsx)(q,{link:t})]})},q=e=>{let{link:n}=e;return n.resized_image?(0,i.jsx)(j,{resizedImage:n.resized_image}):null},O=(0,o.J1)(R(),b),K=(0,o.J1)(H(),O);var N=t(57965),Y=t(23698),Q=t(57260),V=t(82749),X=t(5336),Z=t(93578),ee=t(64206);function en(){let e=(0,r._)(["\n fragment GridCellTextContentFragment on Text {\n id\n truncatedContent: content(format: HTML, truncate: 1000, no_links: true)\n sub_type {\n __typename\n ... on HexColor {\n value\n }\n }\n }\n"]);return en=function(){return e},e}function et(){let e=(0,r._)(["\n fragment GridCellTextFragment on Text {\n ...GridCellTextContentFragment\n id\n href\n title\n counts {\n comments\n }\n }\n ","\n"]);return et=function(){return e},e}let er=e=>{let{text:n}=e,{link:t}=(0,c.U)({href:n.href,blockId:n.id.toString()}),{connection:r,fetch:l}=(0,h.$)({id:n.id,type:"Block"}),{isPinned:o}=(0,x.i)({id:n.id,type:"Block"});return(0,i.jsxs)(s.L,{link:t,onMouseEnter:l,name:[n.title,r.by||n.title],meta:[null,r.at],count:n.counts.comments,overlay:(0,i.jsx)(d.V,{id:n.id,type:"Block"}),pinned:o,children:[(0,i.jsx)(g.e,{id:n.id,type:"Block"}),(0,i.jsx)(ei,{text:n})]})},ei=e=>{var n;let{text:t}=e;return(null==(n=t.sub_type)?void 0:n.__typename)==="HexColor"?(0,i.jsx)(a.a,{css:{bg:t.sub_type.value,width:"100%",height:"100%",borderRadius:"$1",p:"$2"},children:(0,i.jsx)(ee.C,{size:"xs",css:{p:"$1 $2",display:"inline-block"},children:t.sub_type.value})}):(0,i.jsx)(a.a,{css:{containerType:"inline-size",height:"100%",width:"100%",border:"1px solid $gray2",overflow:"hidden",py:"7px",px:"$2","&:hover":{borderColor:"$gray3"}},children:(0,i.jsx)(X.E,{size:"sm",hyphenate:!0,css:{color:"$gray6",height:"100%","@container (max-width: 200px)":{...X.X.xs}},children:(0,i.jsx)(V.X,{children:(0,i.jsx)(Z.g3,{dangerouslySetInnerHTML:{__html:t.truncatedContent}})})})})},el=(0,o.J1)(en()),eo=(0,o.J1)(et(),el);function ea(){let e=(0,r._)(["\n fragment GridCellBlockContentFragment on Konnectable {\n __typename\n ...GridCellPendingFragment\n ...GridCellTextContentFragment\n ...GridCellImageContentFragment\n ...GridCellLinkContentFragment\n ...GridCellEmbedContentFragment\n ...GridCellAttachmentContentFragment\n }\n ","\n ","\n ","\n ","\n ","\n ","\n"]);return ea=function(){return e},e}function es(){let e=(0,r._)(["\n fragment GridCellBlockFragment on Konnectable {\n __typename\n ...GridCellPendingFragment\n ...GridCellTextFragment\n ...GridCellImageFragment\n ...GridCellLinkFragment\n ...GridCellEmbedFragment\n ...GridCellAttachmentFragment\n }\n\n ","\n ","\n ","\n ","\n ","\n ","\n"]);return es=function(){return e},e}function ed(){let e=(0,r._)(["\n query GridCellBlockQuery($id: ID!) {\n block: blokk(id: $id) {\n ...GridCellBlockFragment\n }\n }\n"]);return ed=function(){return e},e}let ec=e=>{let{block:n}=e;switch(n.__typename){case"PendingBlock":return(0,i.jsx)(Q._6,{pending:n});case"Image":return(0,i.jsx)(T,{image:n});case"Text":return(0,i.jsx)(er,{text:n});case"Link":return(0,i.jsx)(W,{link:n});case"Embed":return(0,i.jsx)(B,{embed:n});case"Attachment":return(0,i.jsx)(k,{attachment:n});default:return null}},eu=e=>{let{block:n}=e;switch(n.__typename){case"PendingBlock":return(0,i.jsx)(Q.$3,{});case"Image":return(0,i.jsx)(J,{image:n});case"Text":return(0,i.jsx)(ei,{text:n});case"Link":return(0,i.jsx)(q,{link:n});case"Embed":return(0,i.jsx)(F,{embed:n});case"Attachment":return(0,i.jsx)($,{attachment:n});default:return null}},eh=(0,o.J1)(ea(),Q.$g,el,S,O,L,w);(0,o.J1)(es(),Q.$g,eo,U,K,A,I);let ep=e=>{let{id:n}=e,[{data:t,error:r,fetching:o}]=(0,l.naL)({variables:{id:n}});return r?(console.error(r),(0,i.jsx)(M.f,{id:n,type:"Block",error:r})):o||!t?(0,i.jsx)(N.B,{}):t.block?(0,i.jsx)(ec,{block:t.block}):(0,i.jsx)(Y.K,{})};(0,o.J1)(ed())},33891:(e,n,t)=>{t.d(n,{f:()=>c});var r=t(37876),i=t(96945),l=t(57175),o=t(94594),a=t(52447),s=t(39220),d=t(89572);let c=e=>{let{id:n,type:t,error:c}=e,u=(0,a.PE)(c);return(0,r.jsx)(i.L,{overlay:(0,r.jsx)(o.H,{id:n,type:t}),hint:(0,r.jsx)(s.m_,{label:"<".concat(t,":").concat(n,"> ").concat(u),children:(0,r.jsx)(d.a,{css:{width:"$2",height:"$2",bg:"$gray3",borderRadius:"$round"}})}),children:(0,r.jsx)(l.Z,{outline:!0,css:{width:"100%",height:"100%",color:"$gray2"}})})}},39484:(e,n,t)=>{t.d(n,{K:()=>y});var r=t(28888),i=t(37876),l=t(14728),o=t(86355),a=t(14905),s=t(16607),d=t(92637),c=t(52001),u=t(77680),h=t(42329),p=t(78235),m=t(74349),g=t(94026),x=t(39734);function f(){let e=(0,r._)(["\n query GridCellChannelContextMenuQuery($id: ID!, $channelId: ID!) {\n connection(\n connectable_id: $id\n connectable_type: CHANNEL\n channel_id: $channelId\n ) {\n __typename\n ... on Model {\n id\n }\n can {\n destroy\n }\n }\n }\n"]);return f=function(){return e},e}let y=e=>{var n;let{id:t,open:r,onOpenChange:o}=e,{mode:f,setMode:y}=(0,d.a)(),{removeCell:v}=(0,l.E1)(),{sendToast:j}=(0,c.Yf)(),{channelId:b,removeConnection:C}=(0,s.p)(),_=(0,m.s)(),[{data:k}]=(0,a.dnU)({variables:{id:t.toString(),channelId:b.toString()},pause:"Active"!==f}),$=async()=>{try{v({id:t,type:"Channel"}),await C({id:t,type:"Channel"}),j({title:"Successfully removed"})}catch(e){console.error(e),j({title:e instanceof Error?e.message:"Error removing connection"})}},w=(0,h.R)({id:t,type:"Channel"}),I=(0,p.Z)({id:t,type:"Channel"}),G=(0,x.f)({id:t,type:"Channel",pause:"Active"!==f});return(0,i.jsx)(g.tz,{open:r,onOpenChange:e=>{y(e?"Active":"Pending"),null==o||o(e)},items:[...G.can?[{id:"follow",type:"button",icon:"Follow"===G.label?(0,i.jsx)(u.c11,{}):(0,i.jsx)(u.eeb,{}),label:G.label,onClick:G.handleFollow}]:[],{id:"connect",type:"button",icon:(0,i.jsx)(u.flY,{}),label:"Connect",onClick:()=>{_.open({type:"Connect",props:{id:t,type:"Channel"}})}},...(null==k||null==(n=k.connection)?void 0:n.can.destroy)?[{id:"remove-connection",type:"button",icon:(0,i.jsx)(u.MKb,{}),label:"Remove Connection",onClick:$}]:[],...w,...I]})};(0,o.J1)(f())},42329:(e,n,t)=>{t.d(n,{R:()=>g});var r=t(37876),i=t(16607),l=t(74349),o=t(14728),a=t(1746),s=t(57048),d=t(52447),c=t(52001),u=t(39791),h=t(6366),p=t(14232),m=t(97042);let g=e=>{let{id:n,type:t}=e,{channel:g,unpinConnection:x,pinConnection:f}=(0,i.p)(),{moveCell:y,indexOf:v,indexToPosition:j}=(0,o.E1)(),{unpinCell:b}=(0,a.O)(),{sendToast:C,updateToast:_,retractToast:k}=(0,c.Yf)(),$=(0,l.s)(),{isPinned:w}=(0,s.i)({id:n,type:t}),I=(0,p.useRef)(null),G={pin:!!(null==g?void 0:g.can.pin),unpin:!!(null==g?void 0:g.can.unpin),potentiallyPin:!!(null==g?void 0:g.can.potentially_pin)},E=(e,n)=>{console.error(e),_({...n,title:(0,d.PE)(e),variant:"error",actions:[]}),k(n.id,1e4)},z=async()=>{if(null===I.current)return void C({title:"Unable to undo",variant:"error"});F({index:I.current})},B=async()=>{if(!G.pin)return void $.open({type:"PremiumGate"});let e=C({title:"Pinning...",duration:1/0,actions:[{label:"Undo",onClick:()=>{},disabled:!0}]}),r={id:n,type:t};try{I.current=v(r),y(r,0,!0),await f(r),_({...e,title:"Pinned",actions:[{label:"Undo",onClick:z}]}),k(e.id,2e3)}catch(n){E(n,e)}},F=async function(){let{index:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!G.unpin)return void $.open({type:"PremiumGate"});let r=C({title:"Unpinning...",duration:1/0}),i={id:n,type:t};try{"number"==typeof e?(y(i,e),b(i),await x({...i,insertAt:j(e)})):(b(i),await x(i)),_({...r,title:"Unpinned"}),k(r.id,2e3)}catch(e){E(e,r)}};return G.potentiallyPin?[{id:w?"unpin":"pin",type:"button",icon:(0,r.jsx)(m.I,{css:{width:15,height:15},children:w?(0,r.jsx)(h.A,{}):(0,r.jsx)(u.A,{})}),label:w?"Unpin":"Pin",onClick:w?()=>F():B}]:[]}},43594:(e,n,t)=>{t.d(n,{D:()=>j,G:()=>v});var r=t(28888),i=t(37876),l=t(89572),o=t(96945),a=t(5336),s=t(14905),d=t(86355),c=t(33891),u=t(57965),h=t(23698),p=t(45990),m=t(59486),g=t(97392),x=t(54904);function f(){let e=(0,r._)(["\n query GridCellUserQuery($id: ID!) {\n user(id: $id) {\n ...GridCellUserFragment\n }\n }\n"]);return f=function(){return e},e}function y(){let e=(0,r._)(["\n fragment GridCellUserFragment on User {\n id\n slug\n name\n href\n initials\n avatar\n }\n"]);return y=function(){return e},e}let v=e=>{let{user:n}=e;return(0,i.jsx)(o.L,{link:{href:n.href},overlay:(0,i.jsx)(m.s,{id:n.id,type:"User"}),children:(0,i.jsx)(x.s,{slug:n.slug,type:"User",side:"right",children:(0,i.jsxs)(l.a,{css:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",border:"1px solid $gray2",p:"$3","&:hover":{borderColor:"$gray3"}},children:[(0,i.jsx)(p.eu,{srcs:n.avatar?[n.avatar]:[],name:n.name,initials:n.initials,size:"lg"}),(0,i.jsx)(l.a,{css:{position:"absolute",top:0,left:0,right:0,display:"flex",alignItems:"center",gap:"$2",textAlign:"center",justifyContent:"center",containerType:"inline-size"},children:(0,i.jsx)(g.K,{lines:2,children:(0,i.jsx)(a.E,{size:"lg",hyphenate:!0,css:{p:"$3",color:"$link",fontWeight:"bold","@container (max-width: 200px)":{...a.X.md,p:"$2"}},children:n.name})})})]})})})},j=e=>{let{id:n}=e,[{data:t,error:r,fetching:l}]=(0,s.Xhp)({variables:{id:n}});return r?(console.error(r),(0,i.jsx)(c.f,{id:n,type:"User",error:r})):l||!t?(0,i.jsx)(u.B,{}):t.user?(0,i.jsx)(v,{user:t.user}):(0,i.jsx)(h.K,{})};(0,d.J1)(f()),(0,d.J1)(y())},50168:(e,n,t)=>{t.d(n,{zd:()=>i.zd,xA:()=>h,kv:()=>i.kv,G6:()=>i.G6,E1:()=>i.E1,MK:()=>i.MK});var r=t(37876),i=t(14728),l=t(20559),o=t(31576),a=t(68556),s=t(99972),d=t(43594),c=t(89748),u=t(75583);let h=()=>{let{cells:e}=(0,i.E1)();return(0,r.jsx)(u.j,{children:(0,r.jsx)(s.YL,{totalCount:e.length,itemContent:n=>{let t=e[n];switch(t.type){case"Add":return(0,r.jsx)(l.O,{});case"Block":return(0,r.jsx)(o.DX,{id:t.id.toString()});case"Channel":return(0,r.jsx)(a.b0,{id:t.id.toString()});case"User":return(0,r.jsx)(d.D,{id:t.id.toString()});case"Group":return(0,r.jsx)(c.p,{id:t.id.toString()})}}})})}},50851:(e,n,t)=>{t.d(n,{$:()=>s});var r=t(28888),i=t(16607),l=t(14905),o=t(86355);function a(){let e=(0,r._)(["\n query GridCellMetadataBlockQuery($id: ID!, $channelId: ID!) {\n block: blokk(id: $id) {\n __typename\n ... on Model {\n id\n }\n ... on ConnectableInterface {\n connection_to(channel_id: $channelId) {\n id\n created_at(relative: true)\n user {\n id\n name\n }\n }\n }\n }\n }\n\n query GridCellMetadataChannelQuery($id: ID!, $channelId: ID!) {\n channel(id: $id) {\n id\n ... on ConnectableInterface {\n connection_to(channel_id: $channelId) {\n id\n created_at(relative: true)\n user {\n id\n name\n }\n }\n }\n }\n }\n"]);return a=function(){return e},e}let s=e=>{var n,t,r,o,a;let{id:s,type:d}=e,{channelId:c}=(0,i.p)(),[u,h]=(0,l.cWh)({pause:!0,requestPolicy:"cache-first",variables:{id:s.toString(),channelId:c.toString()}}),[p,m]=(0,l.Uxb)({pause:!0,requestPolicy:"cache-first",variables:{id:s.toString(),channelId:c.toString()}}),g={Block:null==(t=u.data)||null==(n=t.block)?void 0:n.connection_to,Channel:null==(o=p.data)||null==(r=o.channel)?void 0:r.connection_to}[d];return{fetch:()=>{if(c)return({Block:h,Channel:m})[d]()},connection:{by:g?"Added by ".concat(null==(a=g.user)?void 0:a.name):null,at:g?g.created_at:null}}};(0,o.J1)(a())},54904:(e,n,t)=>{t.d(n,{s:()=>j});var r=t(28888),i=t(37876),l=t(8302),o=t(77152),a=t(5336),s=t(14905),d=t(14232),c=t(86355),u=t(89464),h=t(87303),p=t(39734),m=t(76841),g=t(94801),x=t(22265),f=t(71431),y=t(97392);function v(){let e=(0,r._)(['\n query HoverCardProfileQuery($id: ID!) {\n identity(id: $id) {\n id\n identifiable {\n __typename\n ... on User {\n ...AvatarUserFragment\n id\n name\n href\n created_at(format: "%B %Y")\n contents: kontents(page: 1, per: 6, type: BLOCK) {\n ...PreviewCellFragment\n ... on Model {\n id\n }\n }\n }\n ... on Group {\n ...AvatarGroupFragment\n id\n name\n href\n created_at(format: "%B %Y")\n contents: channels(page: 1, per: 6) {\n ...PreviewCellFragment\n ... on Model {\n id\n }\n }\n }\n }\n }\n }\n']);return v=function(){return e},e}let j=e=>{var n;let{children:t,slug:r,type:c,side:v="bottom",skip:j=!1,length:b=6}=e,[C,_]=(0,d.useState)(!0),[{data:k,fetching:$,error:w}]=(0,s.j6x)({variables:{id:r.toString()},pause:C}),I=(0,p.f)({id:r,type:c}),G=null==k||null==(n=k.identity)?void 0:n.identifiable;return j?(0,i.jsx)(i.Fragment,{children:t}):w?(console.error(w),null):(0,i.jsxs)(l.z8,{onOpenChange:e=>{_(!e)},children:[(0,i.jsx)(l.d0,{asChild:!0,children:t}),(0,i.jsx)(l.HP,{children:(0,i.jsx)(l.Et,{sideOffset:5,side:v,children:$||!G?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(h.B,{gap:"$2",children:[b>0&&(0,i.jsx)(g.Y,{length:b}),(0,i.jsxs)(h.B,{gap:"$2",direction:"horizontal",css:{justifyContent:"space-between"},children:[(0,i.jsxs)(h.B,{gap:"$2",direction:"horizontal",children:[(0,i.jsx)(f.L,{size:"sm"}),(0,i.jsxs)(h.B,{gap:0,children:[(0,i.jsx)(o.r,{size:"sm",hyphenate:!0,children:"Profile Name"}),(0,i.jsx)(o.r,{size:"xs",css:{color:"$slate"},children:"Joined January 0000"})]})]}),(0,i.jsx)(m.$,{size:"sm",disabled:!0,children:I.label})]})]})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.j,{href:G.href,onClick:e=>{e.stopPropagation()}}),(0,i.jsxs)(h.B,{gap:"$2",children:[G.contents.length>0&&(0,i.jsx)(g.B,{children:G.contents.map(e=>(0,i.jsx)(u.l,{connectable:e},e.id))}),(0,i.jsxs)(h.B,{gap:"$2",direction:"horizontal",css:{justifyContent:"space-between"},children:[(0,i.jsxs)(h.B,{gap:"$2",direction:"horizontal",children:[(0,i.jsx)(f.e,{size:"sm",entity:G}),(0,i.jsxs)(h.B,{gap:0,children:[(0,i.jsx)(a.E,{size:"sm",hyphenate:!0,children:(0,i.jsx)(y.K,{lines:3,children:G.name})}),(0,i.jsxs)(a.E,{size:"xs",css:{color:"$slate"},children:[{User:"Joined",Group:"Created"}[G.__typename]," ",G.created_at]})]})]}),I.can&&(0,i.jsx)(m.$,{size:"sm",onClick:e=>{e.stopPropagation(),I.handleFollow()},css:{zIndex:1},children:I.label})]})]})]})})})]})};(0,c.J1)(v())},57048:(e,n,t)=>{t.d(n,{i:()=>l});var r=t(1746),i=t(14232);let l=e=>{let{id:n,type:t}=e,{isPinned:l}=(0,r.O)();return{isPinned:(0,i.useMemo)(()=>l({id:n,type:t}),[l,n,t])}}},57260:(e,n,t)=>{t.d(n,{$3:()=>g,$g:()=>x,_6:()=>m});var r=t(28888),i=t(37876),l=t(57314),o=t(94594),a=t(78085),s=t(89572),d=t(96945),c=t(72696),u=t(14905),h=t(86355);function p(){let e=(0,r._)(['\n fragment GridCellPendingFragment on PendingBlock {\n id\n iso_created_at: created_at(format: "%Y-%m-%dT%H:%M:%S.%LZ")\n href\n }\n']);return p=function(){return e},e}let m=e=>{let{pending:n}=e,[{fetching:t},r]=(0,u.naL)({variables:{id:n.id.toString()},pause:!0}),{link:s}=(0,l.U)({href:n.href,blockId:n.id.toString()});return(0,a.g)({fetching:t,isoTimestamp:n.iso_created_at,refetch:r}),(0,i.jsx)(d.L,{link:s,overlay:(0,i.jsx)(o.H,{id:n.id,type:"Block"}),children:(0,i.jsx)(g,{})})},g=()=>(0,i.jsx)(s.a,{css:{color:"$slate",border:"1px solid $gray2",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)(c.y,{})}),x=(0,h.J1)(p())},57314:(e,n,t)=>{t.d(n,{U:()=>l});var r=t(76820),i=t(89099);let l=e=>{let{href:n,blockId:t}=e,{query:l,query:{channelId:o,profileId:a,blockProfileId:s,blockChannelId:d},pathname:c}=(0,i.useRouter)();switch(!0){case"/[profileId]/[channelId]/[[...tab]]"===c:case"/[profileId]/[channelId]"===c&&!(0,r.NO)(o):case"/share/[token]"===c:return{link:{href:{pathname:c,query:{...l,blockId:t,profileId:a,channelId:o,blockProfileId:s||a,blockChannelId:d||o}},as:n,shallow:!0,scroll:!1}};case"/"===c:case"/notifications"===c:case"/explore"===c:case"/search"===c:case"/feed"===c:case"/editorial/[id]"===c:return{link:{href:{pathname:c,query:{...l,blockId:t}},as:n,shallow:!0,scroll:!1}};default:return{link:{href:n}}}}},57458:(e,n,t)=>{t.d(n,{_:()=>a});var r=t(37876),i=t(73325),l=t(39734),o=t(92637);let a=e=>{let{id:n,type:t}=e,{hover:a}=(0,o.a)(),{label:s,handleFollow:d,can:c}=(0,l.f)({id:n,type:t,pause:"Pending"===a});return(0,r.jsx)(i.R,{onClick:d,disabled:!c,children:s})}},57965:(e,n,t)=>{t.d(n,{B:()=>o});var r=t(37876),i=t(89572),l=t(96945);let o=()=>(0,r.jsx)(l.L,{name:"Loading",children:(0,r.jsx)(i.a,{css:{width:"100%",height:"100%",border:"1px solid $gray2"}})})},59486:(e,n,t)=>{t.d(n,{s:()=>o});var r=t(37876),i=t(57458),l=t(94594);let o=e=>{let{id:n,type:t,children:o}=e;return(0,r.jsxs)(l.H,{id:n,type:t,children:[o,(0,r.jsx)(i._,{id:n,type:t})]})}},68556:(e,n,t)=>{t.d(n,{Bi:()=>B,I0:()=>E,b0:()=>z,b1:()=>G,sT:()=>I});var r=t(28888),i=t(37876),l=t(89572),o=t(96945),a=t(5336),s=t(14905),d=t(86355),c=t(33891),u=t(57965),h=t(23698),p=t(63073),m=t(98101),g=t(29615),x=t(97392),f=t(38942),y=t(74716),v=t(77152),j=t(50851),b=t(57458),C=t(6468),_=t(57048);function k(){let e=(0,r._)(["\n query GridCellChannelQuery($id: ID!) {\n channel(id: $id) {\n ...GridCellChannelFragment\n }\n }\n"]);return k=function(){return e},e}function $(){let e=(0,r._)(["\n fragment GridCellChannelContentFragment on Channel {\n id\n title\n added_to_at(relative: true)\n visibility_name\n counts {\n contents\n }\n owner {\n __typename\n ... on User {\n id\n name\n }\n ... on Group {\n id\n name\n }\n }\n }\n"]);return $=function(){return e},e}function w(){let e=(0,r._)(["\n fragment GridCellChannelFragment on Channel {\n ...GridCellChannelContentFragment\n id\n href\n created_at(relative: true)\n counts {\n contents\n }\n }\n ","\n"]);return w=function(){return e},e}let I=e=>{let{channel:n}=e,{connection:t,fetch:r}=(0,j.$)({id:n.id,type:"Channel"}),{isPinned:a}=(0,_.i)({id:n.id,type:"Channel"});return(0,i.jsxs)(o.L,{onMouseEnter:r,name:[null,t.by],link:{href:n.href},overlay:(0,i.jsx)(m.V,{id:n.id,type:"Channel",children:(0,i.jsx)(b._,{id:n.id,type:"Channel"})}),pinned:a,children:[(0,i.jsx)(C.e,{id:n.id,type:"Channel"}),(0,i.jsx)(f.E,{id:n.id,length:n.counts.contents,side:"right",children:(0,i.jsx)(l.a,{css:{width:"100%",height:"100%"},children:(0,i.jsx)(G,{channel:n})})})]})},G=e=>{let{channel:n,css:t}=e,{primary:r,secondary:o}=(0,g.W)(n.visibility_name),s=(0,p.B)(n.counts.contents);return(0,i.jsxs)(l.a,{css:(0,y.h)({containerType:"inline-size",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",width:"100%",height:"100%",p:"$2",color:r,border:"2px solid",borderColor:o,"&:hover":{borderColor:r}},t),children:[(0,i.jsx)(a.E,{size:"xl",hyphenate:!0,css:{py:"$1",px:"$2","@container (min-width: 400px)":{...a.X["3xl"]},"@container (max-width: 200px)":{...a.X.md,py:"$1",px:0}},children:(0,i.jsx)(x.K,{lines:4,children:n.title})}),(0,i.jsxs)(a.E,{size:"xs",children:[(0,i.jsxs)(l.a,{as:"strong",css:{fontWeight:"bold"},children:["by ",n.owner.name]}),(0,i.jsxs)(l.a,{css:{"@container (max-width: 200px)":{display:"none"}},children:[s," block","1"===s?"":"s",(0,i.jsx)("br",{}),n.added_to_at]})]})]})},E=()=>(0,i.jsxs)(l.a,{css:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",width:"100%",height:"100%",p:"$2"},children:[(0,i.jsx)(v.r,{size:"xl",hyphenate:!0,css:{py:"$1",px:"$2"},children:"Channel Title"}),(0,i.jsx)(v.r,{size:"xs",children:"by User Name"}),(0,i.jsx)(v.r,{size:"xs",children:"00 blocks"}),(0,i.jsx)(v.r,{size:"xs",children:"1 hour ago"})]}),z=e=>{let{id:n}=e,[{data:t,error:r,fetching:l}]=(0,s.dyZ)({variables:{id:n}});return r?(console.error(r),(0,i.jsx)(c.f,{id:n,type:"Channel",error:r})):l||!t?(0,i.jsx)(u.B,{}):t.channel?(0,i.jsx)(I,{channel:t.channel}):(0,i.jsx)(h.K,{})};(0,d.J1)(k());let B=(0,d.J1)($());(0,d.J1)(w(),B)},73325:(e,n,t)=>{t.d(n,{R:()=>l});var r=t(93026),i=t(76841);let l=(0,r.pH)(i.$,{flex:1,height:"40px !important",bg:"$backgroundHeavy","@bp1":{height:"50px !important"},svg:{flexShrink:0},"&:hover, &:active, &:focus":{bg:"$background"},defaultVariants:{size:"lg"}})},75583:(e,n,t)=>{t.d(n,{i:()=>m,j:()=>p});var r=t(37876),i=t(16607),l=t(50168),o=t(52001),a=t(9569),s=t(47901),d=t(18010),c=t(14905),u=t(14232);let h=(0,u.createContext)({mode:"Idle",setMode:()=>{}}),p=e=>{let{children:n}=e,[t,d]=(0,u.useState)("Idle"),{indexOf:p,indexToPosition:m,moveCell:g}=(0,l.E1)(),{moveConnection:x,channel:f}=(0,i.p)(),{sendGenericError:y}=(0,o.Yf)();return(0,u.useEffect)(()=>{if(f&&f.can.update)return(0,s.$p)({onDragStart:e=>{let{location:n}=e;a.w.start({input:n.current.input})},onDrag:e=>{let{location:n}=e;a.w.updateInput({input:n.current.input})},onDrop:async e=>{let{source:n,location:t}=e;a.w.stop();let[r]=t.current.dropTargets;if(!r)return;let i=p((0,l.G6)(r.data)),o=(0,l.G6)(n.data);g(o,i);try{await x({...o,action:c.tWJ.InsertAt,insertAt:m(i)})}catch(e){g(o,p(o)),y(e)}}})},[f,p,m,g,x,y]),(0,r.jsx)(h.Provider,{value:{mode:t,setMode:d},children:n})},m=e=>{let{id:n,type:t}=e,[r,i]=(0,u.useState)("Idle"),{mode:l,setMode:o}=(0,u.useContext)(h),a=(0,u.useRef)(null);return(0,u.useEffect)(()=>{let e=a.current;if(!e)return;let r={id:n,type:t};return(0,d.k)((0,s.kZ)({element:e,getInitialData:()=>r,onDragStart:()=>{i("Dragging"),o("Dragging")},onGenerateDragPreview:()=>{i("Preview")},onDrop:()=>{i("Idle"),o("Idle")}}),(0,s.tO)({element:e,getData:()=>r,getDropEffect:()=>"move",onDragEnter:()=>i("Over"),onDragLeave:()=>i("Idle"),onDrop:()=>i("Idle")}))},[t,n,o]),{ref:a,mode:r,dropMode:l}}},78235:(e,n,t)=>{t.d(n,{Z:()=>h});var r=t(37876),i=t(16607),l=t(14728),o=t(29507),a=t(52001),s=t(77680),d=t(14905),c=t(89099),u=t(14232);let h=e=>{let{id:n,type:t}=e,{query:h}=(0,c.useRouter)(),p=(0,o.r)(h.tab),{sendGenericError:m}=(0,a.Yf)(),{channel:g,moveConnection:x}=(0,i.p)(),{moveCell:f,indexOf:y,length:v}=(0,l.E1)(),j=!!(null==g?void 0:g.can.update),b=(0,u.useMemo)(()=>y({id:n,type:t}),[n,y,t]),C=e=>async()=>{if(e!=d.tWJ.InsertAt)try{switch(e){case d.tWJ.MoveToBottom:f({id:n,type:t},0);break;case d.tWJ.MoveDown:f({id:n,type:t},b-1);break;case d.tWJ.MoveUp:f({id:n,type:t},b+1);break;case d.tWJ.MoveToTop:f({id:n,type:t},v-1)}await x({id:n,type:t,action:e})}catch(e){f({id:n,type:t},b),m(e)}};return j&&1!==v?[{id:"move",type:"submenu",variant:"secondary",icon:(0,r.jsx)(s.v$n,{}),label:"Move",items:[...b>0?[{id:"move-to-top",type:"button",icon:(0,r.jsx)(s.XnW,{}),label:"To top",onClick:C(d.tWJ.MoveToBottom)},{id:"move-up",type:"button",icon:(0,r.jsx)(s.Mtm,{}),label:"table"===p?"Up":"Left",onClick:C(d.tWJ.MoveDown)}]:[],...b{t.d(n,{G:()=>f});var r=t(28888),i=t(37876),l=t(52001),o=t(14728),a=t(86355),s=t(92637),d=t(14905),c=t(16607),u=t(77680),h=t(42329),p=t(78235),m=t(74349),g=t(94026);function x(){let e=(0,r._)(["\n query GridCellBlockContextMenuQuery($id: ID!, $channelId: ID!) {\n block: blokk(id: $id) {\n __typename\n ... on Model {\n id\n }\n ... on Block {\n can {\n manage\n remove_connection(channel_id: $channelId)\n }\n }\n ... on ConnectableInterface {\n href\n source {\n url\n }\n }\n }\n }\n"]);return x=function(){return e},e}let f=e=>{var n,t;let{id:r,open:a,onOpenChange:x}=e,f=(0,m.s)(),{mode:y,setMode:v}=(0,s.a)(),{addCell:j,indexOf:b,indexToPosition:C,removeCell:_}=(0,o.E1)(),{sendToast:k,sendGenericError:$}=(0,l.Yf)(),{channelId:w,createConnection:I,removeConnection:G}=(0,c.p)(),[{data:E}]=(0,d.d2J)({variables:{id:r.toString(),channelId:w.toString()},pause:"Active"!==y}),z=()=>{let e=b({id:r,type:"Block"}),n=C(e);j({id:r,type:"Block"},e),I({id:r,type:"Block",position:n})},B=async()=>{try{_({id:r,type:"Block"}),await G({id:r,type:"Block"}),k({title:"Successfully removed",actions:[{label:"Undo",onClick:z}]})}catch(e){$(e)}},F=(0,h.R)({id:r,type:"Block"}),L=(0,p.Z)({id:r,type:"Block"});if((null==E||null==(n=E.block)?void 0:n.__typename)==="Channel")return null;let A=null==E?void 0:E.block;return(0,i.jsx)(g.tz,{open:a,onOpenChange:e=>{v(e?"Active":"Pending"),null==x||x(e)},items:[{id:"connect",type:"button",icon:(0,i.jsx)(u.flY,{}),label:"Connect",onClick:()=>{f.open({type:"Connect",props:{id:r,type:"Block"}})}},...(null==A?void 0:A.can.remove_connection)?[{id:"remove-connection",type:"button",icon:(0,i.jsx)(u.MKb,{}),label:"Remove Connection",onClick:B}]:[],...F,...L,...(null==A||null==(t=A.source)?void 0:t.url)?[{id:"view-source",type:"link",icon:(0,i.jsx)(u.loI,{}),label:"View Source",href:A.source.url,target:"_blank",rel:"noopener noreferrer",variant:"secondary"}]:[],...(null==A?void 0:A.can.manage)?[{id:"edit",type:"link",icon:(0,i.jsx)(u.WhT,{}),label:"Edit",href:"".concat(A.href,"?mode=Edit"),variant:"secondary"}]:[]]})};(0,a.J1)(x())},89748:(e,n,t)=>{t.d(n,{p:()=>b,u:()=>j});var r=t(28888),i=t(37876),l=t(89572),o=t(96945),a=t(5336),s=t(14905),d=t(86355),c=t(33891),u=t(57965),h=t(23698),p=t(45990),m=t(59486),g=t(70842),x=t(97392),f=t(54904);function y(){let e=(0,r._)(["\n query GridCellGroupQuery($id: ID!) {\n group(id: $id) {\n ...GridCellGroupFragment\n }\n }\n"]);return y=function(){return e},e}function v(){let e=(0,r._)(["\n fragment GridCellGroupFragment on Group {\n id\n slug\n name\n href\n initials\n avatar\n }\n"]);return v=function(){return e},e}let j=e=>{let{group:n}=e;return(0,i.jsx)(o.L,{link:{href:n.href},overlay:(0,i.jsx)(m.s,{id:n.id,type:"Group"}),children:(0,i.jsx)(f.s,{slug:n.slug,type:"Group",side:"right",children:(0,i.jsxs)(l.a,{css:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",border:"1px solid $gray2",p:"$3","&:hover":{borderColor:"$gray3"}},children:[(0,i.jsx)(p.eu,{srcs:n.avatar?[n.avatar]:[],name:n.name,initials:n.initials,size:"lg",variant:"square"}),(0,i.jsx)(l.a,{css:{position:"absolute",top:"$3",left:"$3",right:"$3",display:"flex",alignItems:"center",gap:"$2",textAlign:"center",justifyContent:"center"},children:(0,i.jsx)(x.K,{lines:2,children:(0,i.jsxs)(a.E,{size:"lg",hyphenate:!0,css:{color:"$link",fontWeight:"bold"},children:[n.name," ",(0,i.jsx)(g.E,{variant:"channel",children:"Group"})]})})})]})})})},b=e=>{let{id:n}=e,[{data:t,error:r,fetching:l}]=(0,s.rxC)({variables:{id:n}});return r?(console.error(r),(0,i.jsx)(c.f,{id:n,type:"Group",error:r})):l||!t?(0,i.jsx)(u.B,{}):t.group?(0,i.jsx)(j,{group:t.group}):(0,i.jsx)(h.K,{})};(0,d.J1)(y()),(0,d.J1)(v())},92637:(e,n,t)=>{t.d(n,{U:()=>a,a:()=>o});var r=t(37876),i=t(14232);let l=(0,i.createContext)({cellRef:{},hover:"Pending",mode:"Pending",setHover:()=>{},setMode:()=>{}}),o=()=>(0,i.useContext)(l),a=e=>{let{children:n,cellRef:t,onMouseEnter:o}=e,[a,s]=(0,i.useState)("Pending"),[d,c]=(0,i.useState)("Pending");return(0,i.useEffect)(()=>{let e=t.current;if(!e)return;let n=()=>{c("Hover"),null==o||o()},r=()=>{c("Pending")};e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",r);let i=e=>{"A"===e.target.tagName&&s("Focused")},l=e=>{"A"===e.target.tagName&&"Focused"===a&&s("Pending")};return e.addEventListener("focus",i,!0),e.addEventListener("blur",l,!0),()=>{e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",r),e.removeEventListener("focus",i,!0),e.removeEventListener("blur",l,!0)}},[t,o,a]),(0,r.jsx)(l.Provider,{value:{hover:d,mode:a,setHover:c,setMode:s,cellRef:t},children:n})}},92726:(e,n,t)=>{t.d(n,{A:()=>o});var r=t(37876),i=t(89572),l=t(96945);let o=()=>(0,r.jsx)(l.L,{children:(0,r.jsx)(a,{})}),a=()=>(0,r.jsx)(i.a,{css:{width:"100%",height:"100%",border:"1px solid $gray2"}})},93958:(e,n,t)=>{t.d(n,{q:()=>l});var r=t(37876),i=t(73325);let l=e=>{let{href:n}=e;return(0,r.jsx)(i.R,{as:"a",href:n,target:"_blank",rel:"noopener noreferrer",children:"Source"})}},94594:(e,n,t)=>{t.d(n,{H:()=>m});var r=t(37876),i=t(89572),l=t(14232),o=t(89250),a=t(39484),s=t(92637),d=t(30090),c=t(77680),u=t(94026),h=t(39734);let p=e=>{let{id:n,open:t,onOpenChange:i,type:l}=e,{mode:o,setMode:a}=(0,s.a)(),d=(0,h.f)({id:n,type:l,pause:"Active"!==o});return(0,r.jsx)(u.tz,{open:t,onOpenChange:e=>{a(e?"Active":"Pending"),null==i||i(e)},items:[{id:"follow",type:"button",icon:"Follow"===d.label?(0,r.jsx)(c.c11,{}):(0,r.jsx)(c.eeb,{}),label:d.label,onClick:d.handleFollow,disabled:!d.can}]})},m=e=>{let{id:n,type:t,children:c}=e,{setMode:u,cellRef:h}=(0,s.a)(),{breakpoint:m}=(0,d.dv)();!function(e,n){let{onOpen:t,threshold:r=500,disabled:i=!1}=n,o=(0,l.useRef)(0),a=(0,l.useRef)(null),s=(0,l.useRef)(null),d=(0,l.useRef)(null),c=(0,l.useRef)(0),u=(0,l.useCallback)(()=>{window.clearTimeout(o.current)},[]);(0,l.useEffect)(()=>{let n=null==e?void 0:e.current;if(!n||i)return;let l=e=>{u(),x(!1),t(e)},h=e=>{e.preventDefault(),e.stopPropagation(),l(e)},p=e=>{"mouse"!==e.pointerType&&(u(),window.clearTimeout(c.current),c.current=window.setTimeout(g,100),o.current=window.setTimeout(()=>l(e),r))},m=e=>{"mouse"!==e.pointerType&&(u(),window.clearTimeout(c.current),x(!0))};n.addEventListener("contextmenu",h),n.addEventListener("pointerdown",p),n.addEventListener("pointermove",m),n.addEventListener("pointerup",m),n.addEventListener("pointercancel",m),a.current=n.style.webkitTouchCallout,n.style.webkitTouchCallout="none";let g=()=>{n&&(s.current=n.style.transform,d.current=n.style.transition,n.style.transition="transform ".concat(r,"ms ease-out"),n.style.transform="scale(1.03)")},x=e=>{var t;n&&(n.style.transition=e?"none":"transform ".concat(r,"ms ease-in"),n.style.transform=null!=(t=s.current)?t:"",window.setTimeout(()=>{var e;n.style.transition=null!=(e=d.current)?e:""}))};return()=>{n.removeEventListener("contextmenu",h),n.removeEventListener("pointerdown",p),n.removeEventListener("pointermove",m),n.removeEventListener("pointerup",m),n.removeEventListener("pointercancel",m),u(),window.clearTimeout(c.current),x(!0),null!==a.current&&(n.style.webkitTouchCallout=a.current)}},[e,t,r,i,u])}(h,{disabled:"1"!==m,onOpen:()=>{x(!0),u("Active")}});let[g,x]=(0,l.useState)(!1),f=(0,l.useMemo)(()=>{switch(t){case"Block":return(0,r.jsx)(o.G,{id:n,open:g,onOpenChange:x});case"Channel":return(0,r.jsx)(a.K,{id:n,open:g,onOpenChange:x});case"User":return(0,r.jsx)(p,{id:n,open:g,onOpenChange:x,type:"User"});case"Group":return(0,r.jsx)(p,{id:n,open:g,onOpenChange:x,type:"Group"});default:return null}},[t,n,g,x]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.a,{css:{position:"absolute",top:"$2",right:"$2"},children:f}),c]})}},96945:(e,n,t)=>{t.d(n,{L:()=>f});var r=t(37876),i=t(93026),l=t(14232),o=t(16825),a=t(89572),s=t(5336),d=t(48230),c=t.n(d),u=t(13107),h=t(70842),p=t(92637),m=t(97042),g=t(39791);let x=(0,l.forwardRef)((e,n)=>{let{children:t,count:i=0,hint:l,link:s,meta:d,name:c,onMouseEnter:x,onContextMenu:f,overlay:C,pinned:k}=e,{mode:$,hover:w}=(0,p.a)(),I=Array.isArray(d)?d[+("Hover"===w)]:d,G=Array.isArray(c)?c[+("Hover"===w)]:c;return(0,r.jsxs)(v,{ref:n,onContextMenu:f,active:"Active"===$,"data-testid":"grid-cell",children:[(0,r.jsxs)(_,{...s?{link:{...s,scroll:!1}}:{},children:[(0,r.jsx)(o.z,{width:1,height:1,maxWidth:"100%",children:(0,r.jsxs)(a.a,{css:{position:"relative",bg:"Focused"===$?"$gray1":"transparent",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"left",overflow:"hidden",width:"100%",height:"100%"},children:[t,(0,r.jsxs)(a.a,{css:{position:"absolute",right:"$2",bottom:"$2",display:"flex",alignItems:"center",gap:"$1"},children:[l,i>0&&(0,r.jsx)(h.E,{variant:"keyboard",css:{mixBlendMode:"unset"},children:i})]})]})}),(0,r.jsxs)(a.a,{css:{mt:"$2",mx:"auto",textAlign:"center",height:"$8",position:"relative",px:"$2"},children:[k&&(0,r.jsx)(a.a,{"data-testid":"grid-cell-pinned",css:{position:"absolute",left:0,top:0,color:"$link"},children:(0,r.jsx)(m.I,{css:{width:15,height:15},children:(0,r.jsx)(g.A,{})})}),G&&(0,r.jsx)(j,{size:"xs",ellipsis:!0,css:{mx:"$2"},children:G}),I&&(0,r.jsx)(b,{size:"xs",ellipsis:!0,css:{mx:"$2"},children:(0,u.xv)(I,{length:75})})]})]}),C&&(0,r.jsx)(y,{width:1,height:1,maxWidth:"100%",children:C})]})});x.displayName="GridCellInternal";let f=e=>{let n=(0,l.useRef)(null);return(0,r.jsx)(p.U,{cellRef:n,onMouseEnter:e.onMouseEnter,children:(0,r.jsx)(x,{ref:n,...e})})};f.displayName="GridCell";let y=(0,i.pH)(o.z,{position:"absolute",top:0,display:"flex",alignItems:"flex-end",justifyContent:"center",p:"$2",gap:"$2",pointerEvents:"none","a, button":{pointerEvents:"auto"},"@bp1":{display:"none"}}),v=(0,i.pH)("div",{position:"relative",["".concat(y)]:{opacity:0,transform:"translateY(2px)",transition:"opacity 50ms, visibility 50ms",visibility:"hidden"},"&:hover":{["".concat(y)]:{opacity:1,visibility:"visible"}},variants:{active:{true:{["".concat(y)]:{opacity:1,visibility:"visible"}}}}}),j=(0,i.pH)(s.E,{color:"$gray5"}),b=(0,i.pH)(s.E,{color:"$gray5"}),C=(0,i.pH)("div",{"> a":{display:"block",textDecoration:"none",userSelect:"none",width:"100%",color:"CurrentColor","&:focus":{outline:0,["".concat(b)]:{textDecoration:"underline"}}}}),_=(0,l.forwardRef)((e,n)=>{let{link:t,children:i}=e;return t?(0,r.jsx)(C,{children:(0,r.jsx)(c(),{ref:n,...t,children:i})}):(0,r.jsx)(r.Fragment,{children:i})});_.displayName="Anchor"},98101:(e,n,t)=>{t.d(n,{V:()=>d});var r=t(37876),i=t(92637),l=t(94594),o=t(73325),a=t(13521),s=t(77680);let d=e=>{let{id:n,type:t,children:d}=e,{setMode:c}=(0,i.a)();return(0,r.jsxs)(l.H,{id:n,type:t,children:[d,(0,r.jsx)(a.P,{id:n,type:t,onOpenChange:e=>{c(e?"Active":"Pending")},children:(0,r.jsxs)(o.R,{children:["Connect ",(0,r.jsx)(s.flY,{})]})})]})}},99972:(e,n,t)=>{t.d(n,{Wp:()=>h,YL:()=>p,p2:()=>d});var r=t(37876),i=t(92726),l=t(88798),o=t(42357),a=t(97423),s=t(14232);let d=1600,c={enter:e=>Math.abs(e)>900,exit:e=>500>Math.abs(e)},u=(0,s.forwardRef)((e,n)=>{let{preferences:t}=(0,a.gc)();return(0,r.jsx)(o.JT,{...e,layout:t.gridLayout,ref:n})});u.displayName="GridLayoutWithPreferences";let h={List:u,ScrollSeekPlaceholder:i.A},p=e=>{let{components:n=h,endReached:t,itemContent:i,overscan:o=d,totalCount:a,increaseViewportBy:s}=e;return(0,r.jsx)(l.sN,{useWindowScroll:!0,components:n,endReached:t,itemContent:i,overscan:o,scrollSeekConfiguration:c,totalCount:a,...s?{increaseViewportBy:s}:{}})}}}]);