1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[84929],{21851:(e,t,n)=>{n.d(t,{L:()=>a});var l=n(59597),r=n(98905);function a(e){let{className:t}=e;return(0,l.jsx)("svg",{"aria-hidden":!0,className:(0,r.cn)("h-3.5 w-[15px] shrink-0",t),fill:"none",height:"14",viewBox:"0 0 15 14",width:"15",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M13.7321 6.63227C13.7331 6.63367 13.7335 6.63577 13.7336 6.63749C13.7336 6.6392 13.7331 6.64115 13.7321 6.6427C13.731 6.64436 13.729 6.6464 13.727 6.64726L13.7212 6.64987L0.819626 12.5609C0.816246 12.5622 0.81301 12.5639 0.809445 12.5635C0.806247 12.5632 0.80332 12.5612 0.800718 12.5596L0.798537 12.5577C0.792182 12.5519 0.790276 12.5477 0.78981 12.5459C0.789586 12.545 0.789752 12.544 0.78981 12.5433C0.789859 12.5428 0.790038 12.5409 0.791264 12.5381L0.791992 12.5362L3.25944 6.89364L3.37143 6.63553L3.25944 6.37742L0.797809 0.741407L0.798537 0.742059C0.796789 0.737954 0.795674 0.731247 0.797809 0.723157C0.798811 0.719454 0.800213 0.716583 0.801445 0.714684C0.802472 0.713126 0.802727 0.712222 0.8029 0.712077C0.805757 0.709754 0.809447 0.708607 0.813081 0.708166C0.814565 0.708023 0.815987 0.707984 0.817444 0.708166C0.818752 0.708361 0.821505 0.707834 0.823989 0.708818V0.710121L13.7212 6.62641L13.7277 6.62966C13.7294 6.63039 13.7311 6.63095 13.7321 6.63227Z",stroke:"currentColor",strokeWidth:1.5})})}},29528:(e,t,n)=>{n.d(t,{o:()=>p});let l=new Set(["youtube.com","www.youtube.com","m.youtube.com","music.youtube.com","youtu.be","www.youtu.be"]),r=new Set(["vimeo.com","www.vimeo.com","player.vimeo.com"]),a=new Set(["loom.com","www.loom.com"]),o=/\.(?:avif|gif|jpe?g|png|webp)(?:$|\?)/i,s=/\.(?:mp4|webm|ogg)(?:$|\?)/i,i=/^[\w-]{6,}$/,c=/^\/(?:embed|shorts|live)\/([\w-]{6,})/,d=/^\/video\/(\d+)/,u=/(?:^|\/)(?:channels\/[^/]+\/|groups\/[^/]+\/videos\/|video\/)?(\d{6,})\/?$/,m=/^\/(?:share|embed)\/([a-zA-Z0-9]+)/;function f(e){return e.hostname.toLowerCase()}function p(e){let t;try{t=new URL(e.trim())}catch(e){return null}if("https:"!==t.protocol)return null;let n=function(e){var t;let n=f(e);if(!l.has(n))return null;if("youtu.be"===n||"www.youtu.be"===n){let t=e.pathname.split("/").filter(Boolean)[0];return t&&i.test(t)?t:null}if("/watch"===e.pathname){let t=e.searchParams.get("v");return t&&i.test(t)?t:null}let r=e.pathname.match(c);return null!=(t=null==r?void 0:r[1])?t:null}(t);if(n)return{kind:"iframe",src:"https://www.youtube-nocookie.com/embed/".concat(n),provider:"youtube"};let p=function(e){var t,n,l,a;let o=f(e);return r.has(o)?"player.vimeo.com"===o?null!=(l=null==(n=e.pathname.match(d))?void 0:n[1])?l:null:null!=(a=null==(t=e.pathname.match(u))?void 0:t[1])?a:null:null}(t);if(p)return{kind:"iframe",src:"https://player.vimeo.com/video/".concat(p),provider:"vimeo"};let h=function(e){var t,n;let l=f(e);return a.has(l)&&null!=(n=null==(t=e.pathname.match(m))?void 0:t[1])?n:null}(t);return h?{kind:"iframe",src:"https://www.loom.com/embed/".concat(h),provider:"loom"}:s.test(t.pathname)||s.test(t.href)?{kind:"video",src:t.href,provider:"direct"}:o.test(t.pathname)||o.test(t.href)?{kind:"image",src:t.href,provider:"direct"}:null}},39130:(e,t,n)=>{n.d(t,{C_:()=>g,EC:()=>m,HR:()=>x,JD:()=>l,W$:()=>f,Wl:()=>p,Yx:()=>o,bM:()=>a,fx:()=>b,mH:()=>r,qO:()=>s});let l=0xa00000,r=2097152,a=["image/jpeg","image/png","image/webp","image/gif"],o=["image/jpeg","image/png","image/webp"],s=a,i={"image/jpeg":"JPEG","image/png":"PNG","image/webp":"WebP","image/gif":"GIF"};function c(e){let t=e.map(e=>i[e]);return t.length<2?t.join(""):"".concat(t.slice(0,-1).join(", "),", or ").concat(t.at(-1))}let d="".concat(5,"MB"),u=c(o),m="Recommended 1200x630px. Max ".concat(d,". ").concat(u,"."),f="Square image, at least 400x400px. Max ".concat(d,". ").concat(u,".");function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5242880;return t.includes(e.type)?e.size>n?"Image too large (max ".concat(n/1048576,"MB)."):null:"Unsupported format â use ".concat(c(t),".")}function h(e){return e.join(",")}let x=h(o),g=h(a),b=h(s)},69872:(e,t,n)=>{n.d(t,{$v:()=>x,EO:()=>m,Lt:()=>i,Rx:()=>g,Zr:()=>b,ck:()=>p,r7:()=>h,tv:()=>c,wd:()=>f});var l=n(59597),r=n(68857),a=n(16108),o=n(98905),s=n(88531);let i=a.Root,c=a.Trigger,d=a.Portal,u=r.forwardRef((e,t)=>
1{let{className:n,...r}=e;return(0,l.jsx)(a.Overlay,{className:(0,o.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...r,ref:t})});u.displayName=a.Overlay.displayName;let m=r.forwardRef((e,t)=>{let{className:n,fadeOnly:r=!1,...s}=e;return(0,l.jsxs)(d,{children:[(0,l.jsx)(u,{}),(0,l.jsx)(a.Content,{ref:t,className:(0,o.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 sm:rounded-lg",!r&&"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",n),...s})]})});m.displayName=a.Content.displayName;let f=e=>{let{className:t,...n}=e;return(0,l.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...n})};f.displayName="AlertDialogHeader";let p=e=>{let{className:t,...n}=e;return(0,l.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...n})};p.displayName="AlertDialogFooter";let h=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,l.jsx)(a.Title,{ref:t,className:(0,o.cn)("text-lg font-semibold",n),...r})});h.displayName=a.Title.displayName;let x=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,l.jsx)(a.Description,{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",n),...r})});x.displayName=a.Description.displayName;let g=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,l.jsx)(a.Action,{ref:t,className:(0,o.cn)((0,s.r)(),n),...r})});g.displayName=a.Action.displayName;let b=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,l.jsx)(a.Cancel,{ref:t,className:(0,o.cn)((0,s.r)({variant:"outline"}),"mt-2 sm:mt-0",n),...r})});b.displayName=a.Cancel.displayName}
1,70633:(e,t,n)=>{n.d(t,{G:()=>p});var l=n(59597),r=n(68857),a=n(58476),o=n(23695),s=n(73124),i=n(3770),c=n(98905);let d=["boxSizing","width","paddingTop","paddingRight","paddingBottom","paddingLeft","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","lineHeight","fontFamily","textAlign","textTransform","textIndent","letterSpacing","wordSpacing"];var u=n(76331);let m=/(^|\s)@([^\s@]{0,30})$/,f=new Map;function p(e){var t,n;let{communityId:p,value:h,onValueChange:x,enabled:g=!0,initialMentions:b}=e,v=(0,r.useRef)(null),w=(0,r.useRef)(null),y=(0,r.useRef)(null),[j,N]=(0,r.useState)(null),[k,C]=(0,r.useState)([]),[A,D]=(0,r.useState)(0),[S,z]=(0,r.useState)(null),[R,E]=(0,r.useState)(null!=b?b:[]),[F,L]=(0,r.useState)([]),[T,I]=(0,r.useState)(!1),P=null!==j,M=(0,r.useRef)(b);(0,r.useEffect)(()=>{M.current!==b&&(M.current=b,E(null!=b?b:[]))},[b]),(0,r.useEffect)(()=>{if(!(g&&p))return;let e=f.get(p);if(e)return void L(e);I(!0);let t=new AbortController;return fetch("/api/community/".concat(p,"/mentionable-users"),{signal:t.signal}).then(e=>e.ok?e.json():{users:[]}).then(e=>{var t;let n=null!=(t=e.users)?t:[];f.set(p,n),L(n)}).catch(()=>{}).finally(()=>I(!1)),()=>t.abort()},[g,p]),(0,r.useEffect)(()=>{if(null===j)return void C([]);let e=j.query.trim().toLowerCase();C(F.filter(t=>{var n,l,r,a;if(!e)return!0;let o=null!=(r=null==(n=t.name)?void 0:n.toLowerCase())?r:"",s=null!=(a=null==(l=t.fullName)?void 0:l.toLowerCase())?a:"";return o.includes(e)||s.includes(e)}).slice(0,8)),D(0)},[j,F]),(0,r.useEffect)(()=>{if(null===w.current||!v.current)return;let e=w.current;w.current=null,v.current.focus(),v.current.setSelectionRange(e,e)},[h]);let O=(0,r.useCallback)(()=>{let e=v.current,t=y.current;if(!e||!t)return;let n=e.getBoundingClientRect(),l=n.top+t.top,r=l+t.height+4;z({top:r+224>window.innerHeight?Math.max(8,l-224-4):r,left:Math.max(8,Math.min(n.left+t.left,window.innerWidth-288-8)),height:t.height})},[]);function _(e){var t;if(!j)return;let n=(null==(t=e.name)?void 0:t.trim())||"user",l="@".concat(n," "),r=h.slice(0,j.start)+l+h.slice(j.end);w.current=j.start+l.length,x(r),E(t=>[...t,{id:e.id,label:n}]),N(null),C([]),z(null)}(0,r.useEffect)(()=>{if(!P)return;let e=()=>O();return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[P,O]);let B=P?(0,l.jsxs)("div",{className:"fixed z-1000 max-h-56 w-72 overflow-y-auto overflow-x-hidden rounded-xl border border-[#E5E7EB] bg-white py-1 shadow-lg",style:{top:null!=(t=null==S?void 0:S.top)?t:0,left:null!=(n=null==S?void 0:S.left)?n:0},children:[T&&0===k.length&&(0,l.jsx)("div",{className:"flex items-center justify-center py-3",children:(0,l.jsx)(o.B,{className:"text-[#96DADF]",size:16})}),!T&&0===k.length&&(0,l.jsx)("div",{className:"px-3 py-2 text-[#9CA3AF] text-xs",children:"No members found."}),k.map((e,t)=>{var n,r;return(0,l.jsxs)("button",{className:(0,c.cn)("flex w-full items-center gap-2 px-3 py-2 text-left",t===A?"bg-[#F3F4F6]":"hover:bg-[#F3F4F6]"),onMouseDown:t=>{t.preventDefault(),_(e)},type:"button",children:[(0,l.jsxs)(s.Avatar,{className:"size-7 shrink-0",children:[e.imageUrl&&(0,l.jsx)(s.AvatarImage,{alt:null!=(n=e.name)?n:"User",src:e.imageUrl}),(0,l.jsx)(s.AvatarFallback,{className:"bg-[#96DADF]/30 text-xs",children:(0,u.IM)({name:e.name})})]}),(0,l.jsxs)("p",{className:"min-w-0 truncate text-sm",children:[(0,l.jsx)("span",{className:"font-medium text-[#111827]",children:null!=(r=e.name)?r:"Unknown"}),e.fullName?(0,l.jsxs)("span",{className:"text-[#6B7280]",children:[" â ",e.fullName]}):null]})]},e.id)})]}):null;return{ref:v,onChange:function(e){var t;let n=e.target.value;x(n);let l=null!=(t=e.target.selectionStart)?t:n.length,r=function(e,t){let n=e.slice(0,t),l=m.exec(n);return l?{query:l[2],start:l.index+l[1].length,end:t}:null}(n,l);N(r),r&&v.current?(y.current=function(e,t){let n=window.getComputedStyle(e),l=document.createElement("div");for(let e of(l.style.position="absolute",l.style.visibility="hidden",l.style.whiteSpace="pre-wrap",l.style.wordWrap="break-word",d))l.style[e]=n[e];l.textContent=e.value.slice(0,t);let r=document.createElement("span");r.textContent=e.value.slice(t)||".",l.appendChild(r),document.body.appendChild(l);let a={top:r.offsetTop-e.scrollTop,left:r.offsetLeft,height:Number.parseInt(n.lineHeight,10)||20};return document.body.removeChild(l),a}(v.current,r.start),O()):(y.current=null,z(null))},onKeyDown:function(e){if(!P||0===k.length)return!1;if("ArrowDown"===e.key)return e.preventDefault(),D(e=>(e+1)%k.length),!0;if("ArrowUp"===e.key)return e.preventDefault(),D(e=>(e-1+k.length)%k.length),!0;if("Enter"===e.key||"Tab"===e.key){let t=k[A];if(t)return e.preventDefault(),_(t),!0}return"Escape"===e.key&&(e.preventDefault(),N(null),!0)},overlay:B&&"undefined"!=typeof document?(0,a.createPortal)(B,document.body):null,serialize:e=>(0,i.Iu)(e,R),addMention:(e,t)=>{let n=t.trim();e&&n&&E(t=>t.some(t=>t.id===e&&t.label===n)?t:[...t,{id:e,label:n}])},reset:()=>{E([]),N(null),C([]),z(null)},focusAt:e=>{w.current=e,requestAnimationFrame(()=>{if(null===w.current||!v.current)return;let e=w.current;w.current=null,v.current.focus(),v.current.setSelectionRange(e,e)})},insertText:function(e,t){let{next:n,caret:l}=function(e,t,n){let l=Math.min(Math.max(n.start,0),e.length),r=M
1ath.min(Math.max(n.end,l),e.length);return{next:"".concat(e.slice(0,l)).concat(t).concat(e.slice(r)),caret:l+t.length}}(h,e,t);w.current=l,x(n),y.current=null,N(null),C([]),z(null)}}}},74138:(e,t,n)=>{n.d(t,{f:()=>d});var l=n(59597),r=n(51725),a=n(66962),o=n(56589),s=n(68857),i=n(29528);function c(e){let{embed:t,title:n,compact:r}=e;return"iframe"===t.kind?(0,l.jsx)("div",{className:r?"relative h-40 w-full overflow-hidden bg-black":"relative aspect-video w-full overflow-hidden bg-black",children:(0,l.jsx)("iframe",{allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,className:"absolute inset-0 h-full w-full border-0",loading:"lazy",referrerPolicy:"strict-origin-when-cross-origin",sandbox:"allow-scripts allow-same-origin allow-presentation allow-popups allow-popups-to-escape-sandbox",src:t.src,title:n})}):"video"===t.kind?(0,l.jsx)("video",{className:r?"max-h-40 w-full bg-black object-contain":"max-h-96 w-full bg-black object-contain",controls:!0,preload:"metadata",src:t.src,children:(0,l.jsx)("a",{href:t.src,rel:"noopener noreferrer",target:"_blank",children:"Open video"})}):(0,l.jsx)("div",{className:r?"relative max-h-40 w-full overflow-hidden bg-gray-100":"relative max-h-96 w-full overflow-hidden bg-gray-100",children:(0,l.jsx)("img",{alt:n,className:r?"max-h-40 w-full object-contain":"max-h-96 w-full object-contain",src:t.src})})}function d(e){let{meta:t,compact:n=!1}=e,[d,u]=(0,s.useState)(!1),[m,f]=(0,s.useState)(!1),p=(0,i.o)(t.url),h=!p&&!!t.image&&!d,x=!!t.favicon&&!m,g=t.title||t.url,b=(()=>{try{return new URL(t.url).hostname.replace("www.","")}catch(e){return t.siteName||""}})(),v=(0,l.jsxs)("div",{className:n?"flex flex-col gap-1 p-2.5":"flex flex-col gap-1.5 p-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[x&&t.favicon?(0,l.jsx)(o.default,{alt:"",className:"rounded-sm",height:16,onError:()=>f(!0),src:t.favicon,unoptimized:!0,width:16}):(0,l.jsx)(r.A,{className:"size-4 shrink-0 text-[#96DADF]"}),(0,l.jsx)("span",{className:"truncate",children:t.siteName||b})]}),(0,l.jsx)("p",{className:n?"line-clamp-1 text-sm font-semibold leading-snug text-[#213F41]":"line-clamp-2 text-sm font-semibold leading-snug text-[#213F41]",children:g}),t.description&&!p&&!n&&(0,l.jsx)("p",{className:"line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:t.description}),(0,l.jsxs)("span",{className:"mt-0.5 flex items-center gap-1 text-xs font-medium text-[#96DADF] transition-colors group-hover:text-[#6dbfc4]",children:[p?"Open link":"View source",(0,l.jsx)(a.A,{className:"size-3"})]})]});return p?(0,l.jsxs)("div",{className:n?"overflow-hidden rounded-xl border border-[#96DADF]/40 bg-[#96DADF]/10":"mt-3 overflow-hidden rounded-2xl border border-[#96DADF]/40 bg-[#96DADF]/10",children:[(0,l.jsx)(c,{compact:n,embed:p,title:g}),(0,l.jsx)("a",{className:"group block transition-colors hover:bg-[#96DADF]/15",href:t.url,rel:"noopener noreferrer",target:"_blank",children:v})]}):(0,l.jsxs)("a",{className:n?"group block overflow-hidden rounded-xl border border-[#96DADF]/40 bg-[#96DADF]/10 transition-colors hover:border-[#96DADF]/70 hover:bg-[#96DADF]/15":"group mt-3 block overflow-hidden rounded-2xl border border-[#96DADF]/40 bg-[#96DADF]/10 transition-colors hover:border-[#96DADF]/70 hover:bg-[#96DADF]/15",href:t.url,rel:"noopener noreferrer",target:"_blank",children:[h&&t.image&&(0,l.jsx)("div",{className:n?"relative h-28 w-full overflow-hidden bg-gray-100":"relative h-40 w-full overflow-hidden bg-gray-100",children:(0,l.jsx)(o.default,{alt:t.title||"Link preview",className:"object-cover transition-transform group-hover:scale-[1.02]",fill:!0,onError:()=>u(!0),sizes:"(max-width: 768px) 100vw, 600px",src:t.image,unoptimized:!0})}),v]})}},81513:(e,t,n)=>{n.d(t,{P:()=>b,UserBadges:()=>g,b:()=>h});var l=n(59597),r=n(33088),a=n(9964),o=n(33733),s=n(76218),i=n(50439),c=n(26479),d=n(68857),u=n(65974),m=n(15011),f=n(98905);let p={shield:r.A,star:a.A,award:o.A,"badge-check":s.A,sparkles:i.A};function h(e){var t;let{badge:n,className:a}=e,o=null!=(t=p[n.icon])?t:r.A;
1return(0,l.jsx)(o,{"aria-hidden":!0,className:(0,f.cn)("shrink-0",a),fill:"".concat(n.color,"33"),stroke:n.color,strokeWidth:2.25})}let x={xs:"size-3",sm:"size-3.5",md:"size-4"};function g(e){let{userId:t,size:n="sm",variant:r="icons",className:a}=e,o=(0,m.P)(t),[s,i]=(0,d.useState)(!1),[p,g]=(0,d.useState)(!1);(0,d.useEffect)(()=>g(!0),[]);let b=(0,d.useRef)(null);if((0,d.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]),0===o.length)return null;let v=(0,u.gV)(o),w=v.join("; "),y=(e,t)=>{b.current&&clearTimeout(b.current),b.current=setTimeout(()=>i(e),t)},j={onPointerEnter:e=>{"mouse"===e.pointerType&&y(!0,300)},onPointerLeave:e=>{"mouse"===e.pointerType&&y(!1,150)}},N=(0,f.cn)("inline-flex shrink-0 items-center rounded-full align-middle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#406C87]/40","icons"===r?"gap-0.5":"flex-wrap gap-1.5",a),k="icons"===r?o.map(e=>(0,l.jsx)(h,{badge:e,className:x[n]},e.id)):o.map(e=>(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border bg-white px-2.5 py-0.5 text-xs font-medium text-[#374151]",style:{borderColor:e.color},children:[(0,l.jsx)(h,{badge:e,className:"size-3.5"}),e.label," expert"]},e.id));return p?(0,l.jsxs)(c.Root,{onOpenChange:e=>{b.current&&(clearTimeout(b.current),b.current=null),i(e)},open:s,children:[(0,l.jsx)(c.Trigger,{asChild:!0,children:(0,l.jsx)("button",{"aria-label":w,className:N,onClick:e=>e.stopPropagation(),type:"button",...j,children:k})}),(0,l.jsx)(c.Portal,{children:(0,l.jsxs)(c.Content,{align:"start",className:"z-50 max-w-72 rounded-lg border border-[#E5E7EB] bg-white px-3 py-2 text-xs text-[#374151] shadow-md outline-none",onOpenAutoFocus:e=>e.preventDefault(),sideOffset:6,...j,children:[v.map(e=>(0,l.jsx)("p",{className:"font-semibold text-[#111827]",children:e},e)),(0,l.jsx)("ul",{className:"mt-1.5 space-y-1",children:o.map(e=>(0,l.jsxs)("li",{className:"flex items-start gap-1.5",children:[(0,l.jsx)(h,{badge:e,className:"mt-px size-3.5"}),(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{className:"font-medium",children:e.label}),e.description?(0,l.jsxs)("span",{className:"text-[#6B7280]",children:[" ","\xb7 ",e.description]}):null]})]},e.id))})]})})]}):(0,l.jsx)("button",{"aria-label":w,className:N,onClick:e=>e.stopPropagation(),type:"button",children:k})}function b(e){return(0,l.jsx)(g,{className:"ml-0.5",size:"xs",userId:e})}},85887:(e,t,n)=>{n.d(t,{SQ:()=>m,_2:()=>f,hO:()=>p,mB:()=>h,rI:()=>d,ty:()=>u});var l=n(59597),r=n(68857),a=n(22817),o=n(3604),s=n(32804),i=n(77212),c=n(98905);let d=a.Root,u=a.Trigger;a.Group,a.Portal,a.Sub,a.RadioGroup,r.forwardRef((e,t)=>{let{className:n,inset:r,children:s,...i}=e;return(0,l.jsxs)(a.SubTrigger,{ref:t,className:(0,c.cn)("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",n),...i,children:[s,(0,l.jsx)(o.A,{className:"ml-auto"})]})}).displayName=a.SubTrigger.displayName,r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,l.jsx)(a.SubContent,{ref:t,className:(0,c.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",n),...r})}).displayName=a.SubContent.displayName;let m=r.forwardRef((e,t)=>{let{className:n,sideOffset:r=4,...o}=e;return(0,l.jsx)(a.Portal,{children:(0,l.jsx)(a.Content,{ref:t,sideOffset:r,className:(0,c.cn)("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",n),...o})})});m.displayName=a.Content.displayName;let f=r.forwardRef((e,t)=>{let{className:n,inset:r,...o}=e;return(0,l.jsx)(a.Item,{ref:t,className:(0,c.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",n),...o})});f.displayName=a.Item.displayName;let p=r.forwardRef((e,t)=>{let{className:n,children:r,checked:o,...i}=e;return(0,l.jsxs)(a.CheckboxItem,{ref:t,className:(0,c.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),checked:o,...i,children:[(0,l.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,l.jsx)(a.ItemIndicator,{children:(0,l.jsx)(s.A,{className:"h-4 w-4"})})}),r]})});p.displayName=a.CheckboxItem.displayName,r.forwardRef((e,t)=>{let{className:n,children:r,...o}=e;return(0,l.jsxs)(a.RadioItem,{ref:t,className:(0,c.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...o,children:[(0,l.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,l.jsx)(a.ItemIndicator,{children:(0,l.jsx)(i.A,{className:"h-2 w-2 fill-current"})})}),r]})}).displayName=a.RadioItem.displayName,r.forwardRef((e,t)=>{let{className:n,inset:r,...o}=e;return(0,l.jsx)(a.Label,{ref:t,className:(0,c.cn)("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",n),...o})}).displayName=a.Label.displayName;let h=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,l.jsx)(a.Separator,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",n),...r})});h.displayName=a.Separator.displayName},87717:(e,t,n)=>{n.d(t,{Q:()=>o});var l=n(68857),r=n(29528),a=n(96927);function o(e){let[t,n]=(0,l.useState)(null),[o,s]=(0,l.useState)(!1),[i,c]=(0,l.useState)(null),d=(0,l.useRef)(null),u=(0,l.useRef)(void 0),m=(0,l.useCallback)(async e=>{if(d.current!==e){d.current=e,s(!0);try{let a=await fetch("/api/link-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})});if(a.ok){var t,l;let o=await a.json();(o.title||o.description||(0,r.o)(null!=(t=o.url)?t:e))&&n({...o,url:null!=(l=o.url)?l:e})}else(0,r.o)(e)&&n({url:e})}catch(t){(0,r.o)(e)&&n({url:e})}finally{s(!1)}}},[]),f=(0,a.Ub)(e);(0,l.useEffect)(()=>{if(!f){n(null),d.current=null;return}if(f!==i&&f!==d.current)return clearTimeout(u.current),u.current=setTimeout(()=>m(f),600),()=>clearTimeout(u.current)},[f,i,m]);let p=(0,l.useCallback)(()=>{c(f),n(null)},[f]);return{linkPreview:t,isFetchingPreview:o,dismissed:!!(i&&f&&i===f),dismissPreview:p,resetPreview:(0,l.useCallback)(()=>{n(null),c(null),d.current=null,clearTimeout(u.current)},[])}}},90398:(e,t,n)=>{n.d(t,{z:()=>d});var l=n(59597),r=n(69640),a=n(68857),o=n(85887),s=n(98905);let i=["\uD83D\uDE0A","\uD83D\uDE02","â¤ï¸","\uD83D\uDC4D","\uD83D\uDE4F","\uD83C\uDF89","â¨","\uD83D\uDE22","\uD83D\uDE2E","\uD83D\uDD25","\uD83D\uDCAA","\uD83E\uDD17","\uD83D\uDC4F","\uD83C\uDF38","âï¸","\uD83C\uDF19","\uD83D\uDCAF","\uD83D\uDE4C","\uD83D\uDE05","\uD83E\uDD70","\uD83D\uDE0C","\uD83E\uDD14","\uD83D\uDC40","\uD83D\uDCAB","\uD83C\uDF31","\uD83E\uDD1D","\uD83D\uDC96","â"],c=new Set(["Enter"," ","ArrowDown"]);function d(e){let{disabled:t,textareaRef:n,triggerClassName:d,onSelect:u}=e,m=(0,a.useRef)(null),[f,p]=(0,a.useState)(!1);function h(e,t){let l=function(e){var t,l,r;let a=null==(t=e.closest("[data-comment-composer], [data-post-composer]"))?void 0:t.querySelector("textarea");return null!=(r=null!=(l=null==n?void 0:n.current)?l:a)?r:null}(e);if(!l){m.current=null;return}if("keyboard"===t||document.activeElement===l){m.current={start:l.selectionStart,end:l.selectionEnd};return}m.current={start:l.value.length,end:l.value.length}}(0,a.useEffect)(()=>p(!0),[]);let x=(0,s.cn)("flex size-7 items-center justify-center rounded-full text-[#6B7280] transition-colors hover:bg-[#
1EADFD5] hover:text-[#213F41] disabled:opacity-50",d);return f?(0,l.jsxs)(o.rI,{onOpenChange:e=>{e||(m.current=null)},children:[(0,l.jsx)(o.ty,{asChild:!0,children:(0,l.jsx)("button",{"aria-label":"Add emoji",className:x,disabled:t,onKeyDown:e=>{c.has(e.key)&&h(e.currentTarget,"keyboard")},onPointerDown:e=>h(e.currentTarget,"pointer"),title:"Add emoji",type:"button",children:(0,l.jsx)(r.A,{className:"size-4"})})}),(0,l.jsx)(o.SQ,{align:"end",className:"w-[220px] p-2",onCloseAutoFocus:e=>e.preventDefault(),children:(0,l.jsx)("div",{className:"grid grid-cols-7 gap-0.5",children:i.map(e=>(0,l.jsx)(o._2,{className:"flex size-7 items-center justify-center p-0 text-base leading-none focus:bg-[#F7EFE9]",onSelect:()=>{var t,l,r;let a=null==n?void 0:n.current,o={start:null!=(t=null==a?void 0:a.value.length)?t:0,end:null!=(l=null==a?void 0:a.value.length)?l:0};u(e,null!=(r=m.current)?r:o)},children:e},e))})})]}):(0,l.jsx)("button",{"aria-label":"Add emoji",className:x,disabled:t,title:"Add emoji",type:"button",children:(0,l.jsx)(r.A,{className:"size-4"})})}},96927:(e,t,n)=>{n.d(t,{Ub:()=>m,ig:()=>f,m9:()=>c});let l=/(?:https?:\/\/|www\.)[^\s<>"'\]}>]+/gi,r=RegExp("(?<![@\\w])(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+(?:com|org|net|io|co|gov|edu|info|app|dev|ai|us|uk|ca|de|fr|jp|au)(?:\\/[^\\s<>\"'\\]}>]*)?\\b","gi"),a=/\[([^\]]+)\]\(/,o=/\)\.(?:\s*)$/,s=/[.,!?;:'"]+$/,i=/^https?:\/\//i;function c(e){let t=e.trim();for(t=(t=t.replace(o,"")).replace(s,"");t.endsWith(")");){var n,l;let e=(null!=(n=t.match(/\(/g))?n:[]).length;if((null!=(l=t.match(/\)/g))?l:[]).length>e)t=t.slice(0,-1);else break}return t}function d(e){if(!i.test(e))return null;let t=0;for(let n=0;n<e.length;n++){let l=e[n];if("("===l)t++;else if(")"===l){if(0===t)return{url:c(e.slice(0,n)),consumedLength:n+1};t--}}let n=u(e)[0];if(!n)return null;let l=e.indexOf(n),r=l>=0?l+n.length:n.length;return{url:c(n),consumedLength:r}}function u(e){let t,n=new Set,a=[];for(l.lastIndex=0,t=l.exec(e);null!==t;){let r=c(t[0]);a.push([t.index,t.index+t[0].length]),n.add(r.startsWith("www.")?"https://".concat(r):r),t=l.exec(e)}for(r.lastIndex=0,t=r.exec(e);null!==t;){let l=t.index,o=l+t[0].length;if(!a.some(e=>{let[t,n]=e;return l<n&&o>t})){let e=c(t[0]);n.add("https://".concat(e))}t=r.exec(e)}return Array.from(n)}function m(e){var t;let n=function(e){var t;let n=a.exec(e);if(!n)return null;let l=d(e.slice(n.index+n[0].length));return null!=(t=null==l?void 0:l.url)?t:null}(e);return n||(null!=(t=u(e)[0])?t:null)}function f(e,t){let n=function(e,t){let n="",l=0;for(;l<e.length;){if("["!==e[l]){let t=e.indexOf("[",l);if(-1===t){n+=e.slice(l);break}n+=e.slice(l,t),l=t;continue}let r=e.slice(l),o=a.exec(r);if(!o){n+=e[l],l+=1;continue}let s=d(r.slice(o[0].length));if(!s){n+=o[0],l+=o[0].length;continue}n+=t(o[1],s.url),l+=o[0].length+s.consumedLength}return n}(e,()=>"");if(!t)return n.trim();let l=c(t);return(n=(n=n.replace(RegExp("".concat(l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"[)\\]}>.,!?;:'\"]*"),"gi"),"")).replace(/https?:\/\/[^\s<>"'\]]+(?:[)\]}>.,!?;:'"]+)?/gi,e=>{var t;return(t=c(e),c(t)===c(l))?"":e})).replace(/\s{2,}/g," ").trim()}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.