"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[189],{57247:function(e,t){t.Z={src:"/_next/static/media/github.30940da3.png",height:70,width:70,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAPFBMVEUGBgYsLCzu7u5UVFQhISEAAAAREREBAQEdHR02NjaFhYXU1NT///9ra2vMzMy5ublGRkZwcHCurq7n5+cHNHmdAAAACnRSTlP+/////P//tf7+5YnTEwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAD5JREFUeJwdxkkSgDAIBMABHIhAEpf//9Uq+9QIQgQMUFZ3CYGV885yXOok1GB/XsOodH/0AG0P6UkET3dhfDobAajIHSiGAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},31355:function(e,t){t.Z={src:"/_next/static/media/jira.e2c7d7a3.png",height:2160,width:2028,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAOVBMVEUjf/wXceslg/8igf8hfvoAR8MMZeUmhv9MaXEAif8AP/8nif0nif0OZuEOZeEfffopjP8efv4UcfEpHiYQAAAAEHRSTlM98aodUj/v7QADBMjRq6vxoYI51gAAAAlwSFlzAAALEwAACxMBAJqcGAAAADtJREFUeJwVy0cSwCAQBLEmzqxTLfz/sZR1F+FRhAMzdwqD1ltT8KRaU96grN8SGOWemDAq41/h3n35AEO7AeCHfxaNAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},40523:function(e,t,n){n.d(t,{Lz:function(){return u},Un:function(){return d},uE:function(){return N},oB:function(){return A},oG:function(){return L},F3:function(){return W},Gy:function(){return q},bF:function(){return G},N4:function(){return E},mG:function(){return et},b8:function(){return e_}});var s,a=n(50930),r=n(52322),i=n(2784),o=n(49498),c=n(35630),l=n(52970),u=function(e){var t=e.activities,n=(0,i.useRef)(null),s=(0,i.useState)(0),u=s[0],d=s[1],m=new Date,f=new Date(m.getFullYear(),m.getMonth()-1,1),h=new Date(m.getFullYear(),m.getMonth()-2,1),p=new Date(m.getFullYear(),m.getMonth()-3,1),x=new Date(m.getFullYear(),m.getMonth()-4,1),v=[new Date(m.getFullYear(),m.getMonth()-5,1),x,p,h,f,m,],g=function(e){for(var t=e.getMonth(),n=e.getFullYear(),s=[],a=new Date(n,t,1);a.getMonth()===t&&a<new Date;)s.push((0,c.oW)(new Date(a))),a.setDate(a.getDate()+1);return s},b=(0,a.Z)(g(v[0])).concat((0,a.Z)(g(v[1])),(0,a.Z)(g(v[2])),(0,a.Z)(g(v[3])),(0,a.Z)(g(v[4])),(0,a.Z)(g(v[5])));return!function(){for(var e=new Date(b[0]).getDay(),t=0;t<e;t++)b.unshift("")}(),(0,i.useEffect)(function(){n.current&&d(n.current.offsetWidth)},[n]),(0,r.jsx)("div",{className:"grid place-items-center overflow-x-scroll",children:(0,r.jsxs)("div",{className:"flex items-start gap-4",children:[(0,r.jsx)("div",{className:"flex flex-col gap-2 pt-6",children:l.z1.map(function(e,t){return(0,r.jsx)("h6",{className:"h-4 text-xs",children:t%2==0&&e.substring(0,3)},e)})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"flex items-center justify-between",style:{width:"".concat(u,"px")},children:v.map(function(e,t){return(0,r.jsx)("h6",{className:"w-full text-xs",children:l.gg[e.getMonth()].substring(0,3)},t)})}),(0,r.jsx)("div",{className:"mt-2 grid w-full grid-flow-col gap-2",style:{gridTemplateRows:"repeat(7, minmax(0, 1fr))"},ref:n,children:b.map(function(e,n){var s,a=null==t?void 0:t.find(function(t){return t.created_date===e});return(0,r.jsx)(o.u,{tooltipContent:"".concat(a?a.activity_count:0," activities on ").concat((0,c.T3)(e)),children:(0,r.jsx)("div",{className:"".concat(""===e?"pointer-events-none opacity-0":""," h-4 w-4 rounded ").concat(a?"bg-custom-primary ".concat((s=a.activity_count,s<=3?"opacity-20":s>3&&s<=6?"opacity-40":s>6&&s<=9?"opacity-80":"")):"bg-custom-background-80")})},"".concat(e,"-").concat(n))})}),(0,r.jsxs)("div",{className:"mt-8 flex items-center gap-2 text-xs",children:[(0,r.jsx)("span",{children:"Less"}),(0,r.jsx)("span",{className:"h-4 w-4 rounded bg-custom-background-80"}),(0,r.jsx)("span",{className:"h-4 w-4 rounded bg-custom-primary opacity-20"}),(0,r.jsx)("span",{className:"h-4 w-4 rounded bg-custom-primary opacity-40"}),(0,r.jsx)("span",{className:"h-4 w-4 rounded bg-custom-primary opacity-80"}),(0,r.jsx)("span",{className:"h-4 w-4 rounded bg-custom-primary"}),(0,r.jsx)("span",{children:"More"})]})]})]})})},d=function(e){for(var t=function(e){var t,n;c.push({week_in_month:"Week ".concat(e),completed_count:null!==(n=null===(t=null==s?void 0:s.find(function(t){return t.week_in_month===e}))||void 0===t?void 0:t.completed_count)&&void 0!==n?n:0})},n=e.month,s=e.issues,a=e.setMonth,i=2===n?4:5,c=[],u=1;u<=i;u++)t(u);return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-0.5 flex justify-between",children:[(0,r.jsx)("h3",{className:"font-semibold",children:"Issues closed by you"}),(0,r.jsx)(o.fR,{label:(0,r.jsx)("span",{className:"text-sm",children:l.gg[n-1]}),noBorder:!0,children:l.gg.map(function(e,t){return(0,r.jsx)(o.fR.MenuItem,{onClick:function(){return a(t+1)},children:e},e)})})]}),(0,r.jsx)("div",{className:"rounded-[10px] border border-custom-border-200 bg-custom-background-100 p-8 pl-4",children:c.every(function(e){return 0===e.completed_count})?(0,r.jsx)("div",{className:"flex items-center justify-center h-72",children:(0,r.jsx)("h4",{className:"text-[#d687ff]",children:"No issues closed this month"})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.xr,{height:"250px",data:[{id:"completed_issues",color:"#d687ff",data:c.map(function(e){return{x:e.week_in_month,y:e.completed_count}})},],margin:{top:20,right:20,bottom:20,left:20},customYAxisTickValues:c.map(function(e){return e.completed_count}),colors:function(e){return e.color},enableSlices:"x",sliceTooltip:function(e){return(0,r.jsxs)("div",{className:"rounded-md border border-custom-border-200 bg-custom-background-80 p-2 text-xs",children:[e.slice.points[0].data.yFormatted,(0,r.jsx)("span",{className:"text-custom-text-200",children:" issues closed in "}),e.slice.points[0].data.xFormatted]})},theme:{background:"rgb(var(--color-background-100))"}}),(0,r.jsxs)("h4",{className:"mt-4 flex items-center justify-center gap-2 text-[#d687ff]",children:[(0,r.jsx)("span",{className:"h-2 w-2 bg-[#d687ff]"}),"Completed Issues"]})]})})]})},m=n(98788),f=n(5163),h=n(3255),p=n(63955),x=n(60356),v=n(88218),g=n(44646),b=n(75302),j=["api","installations","404","create-workspace","error","invitations","magic-sign-in","onboarding","reset-password","sign-up","workspace-member-invitation",],N=function(e){var t,n,s=e.onSubmit,c=e.defaultValues,l=e.setDefaultValues,u=e.user,d=e.secondaryButton,N=e.primaryButtonText,y=void 0===N?{loading:"Creating...",default:"Create Workspace"}:N,w=(0,i.useState)(!1),k=w[0],_=w[1],A=(0,i.useState)(!1),C=A[0],S=A[1],Z=(0,v.Z)().setToastAlert,I=(0,p.cI)({defaultValues:c,mode:"onChange"}),M=I.register,z=I.handleSubmit,T=I.control,F=I.setValue,R=I.getValues,D=I.formState,E=D.errors,U=D.isSubmitting,P=D.isValid,L=(n=(0,m.Z)(function(e){return(0,f.__generator)(this,function(t){switch(t.label){case 0:var n;return[4,x.Z.workspaceSlugCheck(e.slug).then((n=(0,m.Z)(function(t){return(0,f.__generator)(this,function(n){switch(n.label){case 0:var r;if(!(!0===t.status&&!j.includes(e.slug)))return[3,2];return _(!1),[4,x.Z.createWorkspace(e,u).then((r=(0,m.Z)(function(e){return(0,f.__generator)(this,function(t){switch(t.label){case 0:if(Z({type:"success",title:"Success!",message:"Workspace created successfully."}),(0,h.JG)(g.Lq,function(t){return[e].concat((0,a.Z)(null!=t?t:[]))},!1),!s)return[3,2];return[4,s(e)];case 1:t.sent(),t.label=2;case 2:return[2]}})}),function(e){return r.apply(this,arguments)})).catch(function(){return Z({type:"error",title:"Error!",message:"Workspace could not be created. Please try again."})})];case 1:return n.sent(),[3,3];case 2:_(!0),n.label=3;case 3:return[2]}})}),function(e){return n.apply(this,arguments)})).catch(function(){Z({type:"error",title:"Error!",message:"Some error occurred while creating workspace. Please try again."})})];case 1:return t.sent(),[2]}})}),function(e){return n.apply(this,arguments)});return(0,i.useEffect)(function(){return function(){l(R())}},[R,l]),(0,r.jsxs)("form",{className:"space-y-6 sm:space-y-9",onSubmit:z(L),children:[(0,r.jsxs)("div",{className:"space-y-6 sm:space-y-7",children:[(0,r.jsxs)("div",{className:"space-y-1 text-sm",children:[(0,r.jsx)("label",{htmlFor:"workspaceName",children:"Workspace Name"}),(0,r.jsx)(o.II,{id:"workspaceName",name:"name",register:M,autoComplete:"off",onChange:function(e){return F("slug",e.target.value.toLocaleLowerCase().trim().replace(/ /g,"-"))},validations:{required:"Workspace name is required",validate:function(e){return/^[\w\s-]*$/.test(e)||'Name can only contain (" "), ( - ), ( _ ) & alphanumeric characters.'}},placeholder:"Enter workspace name...",error:E.name})]}),(0,r.jsxs)("div",{className:"space-y-1 text-sm",children:[(0,r.jsx)("label",{htmlFor:"workspaceUrl",children:"Workspace URL"}),(0,r.jsxs)("div",{className:"flex w-full items-center rounded-md border border-custom-border-200 px-3",children:[(0,r.jsxs)("span",{className:"whitespace-nowrap text-sm text-custom-text-200",children:[window&&window.location.host,"/"]}),(0,r.jsx)(o.II,{id:"workspaceUrl",mode:"trueTransparent",autoComplete:"off",name:"slug",register:M,className:"block w-full rounded-md bg-transparent py-2 !px-0 text-sm",validations:{required:"Workspace URL is required"},onChange:function(e){return/^[a-zA-Z0-9_-]+$/.test(e.target.value)?S(!1):S(!0)}})]}),k&&(0,r.jsx)("span",{className:"-mt-3 text-sm text-red-500",children:"Workspace URL is already taken!"}),C&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:"URL can only contain ( - ), ( _ ) & alphanumeric characters."})]}),(0,r.jsxs)("div",{className:"space-y-1 text-sm",children:[(0,r.jsx)("span",{children:"What size is your organization?"}),(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(p.Qr,{name:"organization_size",control:T,rules:{required:"This field is required"},render:function(e){var n=e.field,s=n.value,a=n.onChange;return(0,r.jsx)(o.AP,{value:s,onChange:a,label:null!==(t=b.h1.find(function(e){return e===s}))&&void 0!==t?t:(0,r.jsx)("span",{className:"text-custom-text-200",children:"Select organization size"}),input:!0,width:"w-full",children:b.h1.map(function(e){return(0,r.jsx)(o.AP.Option,{value:e,children:e},e)})})}}),E.organization_size&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:E.organization_size.message})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[d,(0,r.jsx)(o.KM,{type:"submit",size:"md",disabled:!P,loading:U,children:U?y.loading:y.default})]})]})},y=n(5632),w=n(49442),k=n(64631),_=n(89381),A=function(e){var t=e.isOpen,n=e.data,s=e.onClose,a=e.user,c=(0,i.useState)(!1),l=c[0],u=c[1],d=(0,i.useState)(""),p=d[0],b=d[1],j=(0,i.useState)(!1),N=j[0],A=j[1],C=(0,i.useState)(null),S=C[0],Z=C[1],I=(0,y.useRouter)(),M=(0,v.Z)().setToastAlert;(0,i.useEffect)(function(){if(n)Z(n);else var e=setTimeout(function(){Z(null),clearTimeout(e)},350)},[n]);var z,T=p===(null==n?void 0:n.name)&&N,F=function(){s(),u(!1)},R=(z=(0,m.Z)(function(){return(0,f.__generator)(this,function(e){switch(e.label){case 0:if(u(!0),!n||!T)return[2];return[4,x.Z.deleteWorkspace(n.slug,a).then(function(){F(),I.push("/"),(0,h.JG)(g.Lq,function(e){return null==e?void 0:e.filter(function(e){return e.id!==n.id})}),M({type:"success",message:"Workspace deleted successfully",title:"Success"})}).catch(function(e){console.log(e),u(!1)})];case 1:return e.sent(),[2]}})}),function(){return z.apply(this,arguments)});return(0,r.jsx)(w.u.Root,{show:t,as:i.Fragment,children:(0,r.jsxs)(k.V,{as:"div",className:"relative z-20",onClose:F,children:[(0,r.jsx)(w.u.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,r.jsx)("div",{className:"fixed inset-0 bg-custom-backdrop bg-opacity-50 transition-opacity"})}),(0,r.jsx)("div",{className:"fixed inset-0 z-20 overflow-y-auto",children:(0,r.jsx)("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:(0,r.jsx)(w.u.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,r.jsx)(k.V.Panel,{className:"relative transform overflow-hidden rounded-lg border border-custom-border-200 bg-custom-background-100 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-2xl",children:(0,r.jsxs)("div",{className:"flex flex-col gap-6 p-6",children:[(0,r.jsxs)("div",{className:"flex w-full items-center justify-start gap-6",children:[(0,r.jsx)("span",{className:"place-items-center rounded-full bg-red-500/20 p-4",children:(0,r.jsx)(_,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})}),(0,r.jsx)("span",{className:"flex items-center justify-start",children:(0,r.jsx)("h3",{className:"text-xl font-medium 2xl:text-2xl",children:"Delete Workspace"})})]}),(0,r.jsx)("span",{children:(0,r.jsxs)("p",{className:"text-sm leading-7 text-custom-text-200",children:["Are you sure you want to delete workspace"," ",(0,r.jsx)("span",{className:"break-words font-semibold",children:null==n?void 0:n.name}),"? All of the data related to the workspace will be permanently removed. This action cannot be undone."]})}),(0,r.jsxs)("div",{className:"text-custom-text-200",children:[(0,r.jsxs)("p",{className:"break-words text-sm ",children:["Enter the workspace name"," ",(0,r.jsx)("span",{className:"font-medium text-custom-text-100",children:null==S?void 0:S.name})," ","to continue:"]}),(0,r.jsx)(o.II,{type:"text",placeholder:"Workspace name",className:"mt-2",value:p,onChange:function(e){b(e.target.value)},name:"workspaceName"})]}),(0,r.jsxs)("div",{className:"text-custom-text-200",children:[(0,r.jsxs)("p",{className:"text-sm",children:["To confirm, type"," ",(0,r.jsx)("span",{className:"font-medium text-custom-text-100",children:"delete my workspace"})," ","below:"]}),(0,r.jsx)(o.II,{type:"text",placeholder:"Enter 'delete my workspace'",className:"mt-2",onChange:function(e){"delete my workspace"===e.target.value?A(!0):A(!1)},name:"typeDelete"})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(o.kq,{onClick:F,children:"Cancel"}),(0,r.jsx)(o.O3,{onClick:R,loading:l||!T,children:l?"Deleting...":"Delete Workspace"})]})]})})})})})]})})},C=n(39097),S=n.n(C),Z=n(1451),I=n(98286),M=n(81680),z=n(65722),T=n(46733),F=n(46712),R=n(59719),D=[{name:"Documentation",href:"https://docs.plane.so/",Icon:R.$l},{name:"Join our Discord",href:"https://discord.com/invite/A92xrEGCge",Icon:R.D7},{name:"Report a bug",href:"https://github.com/makeplane/plane/issues/new/choose",Icon:R.ET},{name:"Chat with us",href:null,onClick:function(){return window.$crisp.push(["do","chat:show"])},Icon:F},],E=function(e){var t=e.setSidebarActive,n=(0,i.useState)(!1),s=n[0],a=n[1],o=(0,i.useRef)(null),c=(0,Z.Z)(),l=c.collapsed,u=c.toggleCollapsed;return(0,I.Z)(o,function(){return a(!1)}),(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex w-full items-center justify-between gap-1 self-baseline border-t border-custom-border-200 bg-custom-sidebar-background-100 py-2 px-4 ".concat(l?"flex-col":""),children:[!l&&(0,r.jsx)("div",{className:"w-1/2 text-center cursor-default rounded-md px-2.5 py-1.5 font-medium outline-none text-sm bg-green-500/10 text-green-500",children:"Free Plan"}),(0,r.jsxs)("div",{className:"flex items-center gap-1 ".concat(l?"flex-col justify-center":"justify-evenly w-1/2"),children:[(0,r.jsx)("button",{type:"button",className:"grid place-items-center rounded-md p-1.5 text-custom-text-200 hover:text-custom-text-100 hover:bg-custom-background-90 outline-none ".concat(l?"w-full":""),onClick:function(){var e=new KeyboardEvent("keydown",{key:"h"});document.dispatchEvent(e)},children:(0,r.jsx)(M.Z,{fontSize:"small"})}),(0,r.jsx)("button",{type:"button",className:"grid place-items-center rounded-md p-1.5 text-custom-text-200 hover:text-custom-text-100 hover:bg-custom-background-90 outline-none ".concat(l?"w-full":""),onClick:function(){return a(function(e){return!e})},children:(0,r.jsx)(z.Z,{fontSize:"small"})}),(0,r.jsx)("button",{type:"button",className:"grid place-items-center rounded-md p-1.5 text-custom-text-200 hover:text-custom-text-100 hover:bg-custom-background-90 outline-none md:hidden",onClick:function(){return t(!1)},children:(0,r.jsx)(T.Z,{fontSize:"small"})}),(0,r.jsx)("button",{type:"button",className:"hidden md:grid place-items-center rounded-md p-1.5 text-custom-text-200 hover:text-custom-text-100 hover:bg-custom-background-90 outline-none ".concat(l?"w-full":""),onClick:function(){return u()},children:(0,r.jsx)(T.Z,{fontSize:"small",className:"duration-300 ".concat(l?"rotate-180":"")})})]}),(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)(w.u,{show:s,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,r.jsx)("div",{className:"absolute bottom-2 ".concat(l?"left-full":"left-[-75px]"," space-y-2 rounded-sm bg-custom-background-80 p-1 shadow-md"),ref:o,children:D.map(function(e){var t=e.name,n=e.Icon,s=e.href,a=e.onClick;return s?(0,r.jsx)(S(),{href:s,children:(0,r.jsxs)("a",{target:"_blank",className:"flex items-center gap-x-2 whitespace-nowrap rounded-md px-2 py-1 text-xs hover:bg-custom-background-90",children:[(0,r.jsx)(n,{className:"h-4 w-4 text-custom-text-200"}),(0,r.jsx)("span",{className:"text-sm",children:t})]})},t):(0,r.jsxs)("button",{type:"button",onClick:a||void 0,className:"flex w-full items-center gap-x-2 whitespace-nowrap rounded-md px-2 py-1 text-xs hover:bg-custom-background-90",children:[(0,r.jsx)(n,{className:"h-4 w-4 text-custom-sidebar-text-200"}),(0,r.jsx)("span",{className:"text-sm",children:t})]},t)})})})})]})})},U=n(37184),P=n(75155),L=function(e){var t=e.issues,n=e.type,s=(0,y.useRouter)().query.workspaceSlug,a=function(e){var t=new Date,s=0;return Math.ceil(("overdue"===n?Math.abs(t.valueOf()-e.valueOf()):Math.abs(e.valueOf()-t.valueOf()))/864e5)};return(0,r.jsxs)("div",{children:[(0,r.jsxs)("h3",{className:"mb-2 font-semibold capitalize",children:[n," Issues"]}),t?(0,r.jsxs)("div",{className:"h-[calc(100%-2.25rem)] rounded-[10px] border border-custom-border-200 bg-custom-background-100 p-4 text-sm",children:[(0,r.jsxs)("div",{className:"mb-2 grid grid-cols-4 gap-2 rounded-lg px-3 py-2 font-medium ".concat("overdue"===n?"bg-red-500/20 bg-opacity-20":"bg-custom-background-80"),children:[(0,r.jsx)("h4",{className:"capitalize",children:n}),(0,r.jsx)("h4",{className:"col-span-2",children:"Issue"}),(0,r.jsx)("h4",{children:"Due Date"})]}),(0,r.jsx)("div",{className:"max-h-72 overflow-y-scroll",children:t.length>0?t.map(function(e){var t=a(new Date(e.target_date));return(0,r.jsx)(S(),{href:"/".concat(s,"/projects/").concat(e.project_id,"/issues/").concat(e.id),children:(0,r.jsx)("a",{children:(0,r.jsxs)("div",{className:"grid grid-cols-4 gap-2 px-3 py-2",children:[(0,r.jsxs)("h5",{className:"flex cursor-default items-center gap-2 ".concat("overdue"===n?t>6?"text-red-500":"text-yellow-400":""),children:["overdue"===n&&(0,r.jsx)(U,{className:"h-3.5 w-3.5"}),t," ",t>1?"days":"day"]}),(0,r.jsx)("h5",{className:"col-span-2",children:(0,P.aF)(e.name,30)}),(0,r.jsx)("h5",{className:"cursor-default",children:(0,c.T3)(new Date(e.target_date))})]})})},e.id)}):(0,r.jsx)("div",{className:"grid h-full place-items-center",children:(0,r.jsxs)("div",{className:"my-5 flex flex-col items-center gap-4",children:[(0,r.jsx)(R.kS,{height:60,width:60}),(0,r.jsxs)("span",{className:"text-custom-text-200",children:["No issues found. Use"," ",(0,r.jsx)("pre",{className:"inline rounded bg-custom-background-80 px-2 py-1",children:"C"})," ","shortcut to create a new issue"]})]})})})]}):(0,r.jsx)(o.aN,{children:(0,r.jsx)(o.aN.Item,{height:"200"})})]})},O=n(6154),W=function(e){var t=e.groupedIssues;return(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"mb-2 font-semibold",children:"Issues by States"}),(0,r.jsx)("div",{className:"rounded-[10px] border border-custom-border-200 bg-custom-background-100 p-4",children:(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-4",children:[(0,r.jsx)("div",{className:"sm:col-span-3",children:(0,r.jsx)(o.HD,{data:null!==(s=null==t?void 0:t.map(function(e){return{id:e.state_group,label:e.state_group,value:e.state_count,color:O.h[e.state_group.toLowerCase()]}}))&&void 0!==s?s:[],height:"320px",innerRadius:.6,cornerRadius:5,padAngle:2,enableArcLabels:!0,arcLabelsTextColor:"#000000",enableArcLinkLabels:!1,activeInnerRadiusOffset:5,colors:function(e){return e.data.color},tooltip:function(e){return(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-custom-border-200 bg-custom-background-90 p-2 text-xs",children:[(0,r.jsxs)("span",{className:"text-custom-text-200 capitalize",children:[e.datum.label," issues:"]})," ",e.datum.value]})},margin:{top:32,right:0,bottom:32,left:0},theme:{background:"transparent"}})}),(0,r.jsx)("div",{className:"flex sm:block items-center gap-3 flex-wrap justify-center sm:space-y-2 sm:self-end sm:justify-self-end sm:px-8 sm:pb-8",children:null==t?void 0:t.map(function(e){return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"h-2 w-2",style:{backgroundColor:O.h[e.state_group]}}),(0,r.jsxs)("div",{className:"capitalize text-custom-text-200 text-xs whitespace-nowrap",children:[e.state_group,"- ",e.state_count]})]},e.state_group)})})]})})]})},B=n(34740),q=function(e){var t=e.data;return(0,r.jsxs)("div",{className:"grid grid-cols-1 rounded-[10px] border border-custom-border-200 bg-custom-background-100 lg:grid-cols-3",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 divide-y divide-custom-border-200 border-b border-custom-border-200 lg:border-r lg:border-b-0",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsxs)("div",{className:"basis-1/2 p-4",children:[(0,r.jsx)("h4",{className:"text-sm",children:"Issues assigned to you"}),(0,r.jsx)("h5",{className:"mt-2 text-2xl font-semibold",children:t?t.assigned_issues_count:(0,r.jsx)(o.aN,{children:(0,r.jsx)(o.aN.Item,{height:"25px",width:"50%"})})})]}),(0,r.jsxs)("div",{className:"basis-1/2 border-l border-custom-border-200 p-4",children:[(0,r.jsx)("h4",{className:"text-sm",children:"Pending issues"}),(0,r.jsx)("h5",{className:"mt-2 text-2xl font-semibold",children:t?t.pending_issues_count:(0,r.jsx)(o.aN,{children:(0,r.jsx)(o.aN.Item,{height:"25px",width:"50%"})})})]})]}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsxs)("div",{className:"basis-1/2 p-4",children:[(0,r.jsx)("h4",{className:"text-sm",children:"Completed issues"}),(0,r.jsx)("h5",{className:"mt-2 text-2xl font-semibold",children:t?t.completed_issues_count:(0,r.jsx)(o.aN,{children:(0,r.jsx)(o.aN.Item,{height:"25px",width:"50%"})})})]}),(0,r.jsxs)("div",{className:"basis-1/2 border-l border-custom-border-200 p-4",children:[(0,r.jsx)("h4",{className:"text-sm",children:"Issues due by this week"}),(0,r.jsx)("h5",{className:"mt-2 text-2xl font-semibold",children:t?t.issues_due_week_count:(0,r.jsx)(o.aN,{children:(0,r.jsx)(o.aN.Item,{height:"25px",width:"50%"})})})]})]})]}),(0,r.jsxs)("div",{className:"p-4 lg:col-span-2",children:[(0,r.jsxs)("h3",{className:"mb-2 font-semibold capitalize flex items-center gap-2",children:["Activity Graph",(0,r.jsx)(o.u,{tooltipContent:"Your profile activity graph is a record of actions you've performed on issues across the workspace.",className:"w-72 border border-custom-border-200",children:(0,r.jsx)(B,{className:"h-3 w-3"})})]}),(0,r.jsx)(u,{activities:null==t?void 0:t.issue_activities})]})]})},J=n(90479),G=function(){return(0,r.jsxs)("div",{className:"mb-8 space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-2xl font-semibold",children:"Workspace Settings"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-custom-text-200",children:"This information will be displayed to every member of the workspace."})]}),(0,r.jsx)(J.Z,{})]})},V=n(38617),H=n(39708),Y=n(84337),Q=n(9400),K=n(25914),X=n(99205),$=n(73957),ee=n(16084),et=function(){var e,t,n,s,a,c=(0,y.useRouter)(),l=c.query.workspaceSlug,u=(0,Y.Z)(),d=u.user,h=u.mutateUser,p=(0,Z.Z)().collapsed,x=(0,V.F)().setTheme,g=(0,v.Z)().setToastAlert,b=(0,Q.Z)(),j=b.activeWorkspace,N=b.workspaces,k=function(e){K.Z.updateUser({last_workspace_id:null==e?void 0:e.id}).then(function(){h(),c.push("/".concat(e.slug,"/"))}).catch(function(){return g({type:"error",title:"Error!",message:"Failed to navigate to the workspace. Please try again."})})},_=(s=(0,m.Z)(function(){return(0,f.__generator)(this,function(e){switch(e.label){case 0:return[4,X.Z.signOut().then(function(){h(void 0),c.push("/"),x("dark")}).catch(function(){return g({type:"error",title:"Error!",message:"Failed to sign out. Please try again."})})];case 1:return e.sent(),[2]}})}),function(){return s.apply(this,arguments)});return(0,r.jsxs)(H.v,{as:"div",className:"relative col-span-4 inline-block w-full px-4 pt-4 text-left",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)(H.v.Button,{className:"text-custom-sidebar-text-200 flex w-full items-center rounded-sm text-sm font-medium focus:outline-none",children:(0,r.jsxs)("div",{className:"flex w-full items-center gap-x-2 rounded-sm bg-custom-sidebar-background-80 p-1 ".concat(p?"justify-center":""),children:[(0,r.jsx)("div",{className:"relative grid h-6 w-6 place-items-center rounded bg-gray-700 uppercase text-white",children:(null==j?void 0:j.logo)&&""!==j.logo?(0,r.jsx)("img",{src:j.logo,className:"absolute top-0 left-0 h-full w-full object-cover rounded",alt:"Workspace Logo"}):null!==(t=null==j?void 0:null===(e=j.name)||void 0===e?void 0:e.charAt(0))&&void 0!==t?t:"..."}),!p&&(0,r.jsx)("h4",{className:"text-custom-text-100",children:(null==j?void 0:j.name)?(0,P.aF)(j.name,14):"Loading..."})]})}),!p&&(0,r.jsx)(S(),{href:"/".concat(l,"/me/profile"),children:(0,r.jsx)("a",{children:(0,r.jsx)("div",{className:"flex flex-grow justify-end",children:(0,r.jsx)(o.qE,{user:d,height:"28px",width:"28px",fontSize:"14px"})})})})]}),(0,r.jsx)(w.u,{as:i.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,r.jsxs)(H.v.Items,{className:"fixed left-4 z-20 mt-1 flex flex-col w-full max-w-[17rem] origin-top-left rounded-md border border-custom-sidebar-border-200 bg-custom-sidebar-background-90 shadow-lg outline-none",children:[(0,r.jsxs)("div",{className:"flex flex-col items-start justify-start gap-3 p-3",children:[(0,r.jsx)("div",{className:"text-sm text-custom-sidebar-text-200",children:null==d?void 0:d.email}),(0,r.jsx)("span",{className:"text-sm font-semibold text-custom-sidebar-text-200",children:"Workspace"}),N?(0,r.jsxs)("div",{className:"flex h-full w-full flex-col items-start justify-start gap-3.5",children:[N.length>0?N.map(function(e){return(0,r.jsx)(H.v.Item,{children:function(t){var s,a=t.active;return(0,r.jsxs)("button",{type:"button",onClick:function(){return k(e)},className:"flex w-full items-center justify-between gap-1 rounded-md text-sm text-custom-sidebar-text-100",children:[(0,r.jsxs)("div",{className:"flex items-center justify-start gap-2.5",children:[(0,r.jsx)("span",{className:"relative flex h-6 w-6 items-center justify-center rounded bg-gray-700 p-2 text-xs uppercase text-white",children:(null==e?void 0:e.logo)&&""!==e.logo?(0,r.jsx)("img",{src:e.logo,className:"absolute top-0 left-0 h-full w-full object-cover rounded",alt:"Workspace Logo"}):null!==(n=null==e?void 0:null===(s=e.name)||void 0===s?void 0:s.charAt(0))&&void 0!==n?n:"..."}),(0,r.jsx)("h5",{className:"text-sm ".concat(l===e.slug?"":"text-custom-text-200"),children:(0,P.aF)(e.name,18)})]}),(0,r.jsx)("span",{className:"p-1",children:(0,r.jsx)($,{className:"h-3 w-3.5 text-custom-sidebar-text-100 ".concat(a||e.id===(null==j?void 0:j.id)?"opacity-100":"opacity-0")})})]})}},e.id)}):(0,r.jsx)("p",{children:"No workspace found!"}),(0,r.jsxs)(H.v.Item,{as:"button",type:"button",onClick:function(){c.push("/create-workspace")},className:"flex w-full items-center gap-1 text-sm text-custom-sidebar-text-200",children:[(0,r.jsx)(ee,{className:"h-3 w-3"}),"Create Workspace"]})]}):(0,r.jsx)("div",{className:"w-full",children:(0,r.jsxs)(o.aN,{className:"space-y-2",children:[(0,r.jsx)(o.aN.Item,{height:"30px"}),(0,r.jsx)(o.aN.Item,{height:"30px"})]})})]}),(0,r.jsx)("div",{className:"flex w-full flex-col items-start justify-start gap-2 border-t border-custom-sidebar-border-200 px-3 py-2 text-sm",children:[{name:"Workspace Settings",href:"/".concat(l,"/settings")},{name:"Workspace Invites",href:"/invitations"},{name:"My Profile",href:"/".concat(l,"/me/profile")},].map(function(e,t){return(0,r.jsx)(H.v.Item,{as:"div",className:"flex w-full items-center justify-start rounded px-2 py-1 text-sm text-custom-sidebar-text-200 hover:bg-custom-sidebar-background-80",children:(0,r.jsx)(S(),{href:e.href,children:(0,r.jsx)("a",{className:"w-full",children:e.name})})},t)})}),(0,r.jsx)("div",{className:"w-full border-t border-t-custom-sidebar-border-100 px-3 py-2",children:(0,r.jsx)(H.v.Item,{as:"button",type:"button",className:"flex w-full items-center justify-start rounded px-2 py-1 text-sm text-red-600 hover:bg-custom-sidebar-background-80",onClick:_,children:"Sign out"})})]})})]})},en=n(96577),es=n.n(en),ea=[{label:"1 day",value:new Date(new Date().getTime()+864e5)},{label:"3 days",value:new Date(new Date().getTime()+2592e5)},{label:"5 days",value:new Date(new Date().getTime()+432e6)},{label:"1 week",value:new Date(new Date().getTime()+6048e5)},{label:"2 weeks",value:new Date(new Date().getTime()+12096e5)},{label:"Custom",value:null},],er=function(e){var t,n,s,a,i,l,u=e.notification,d=e.markNotificationReadStatus,m=e.markNotificationArchivedStatus,f=e.setSelectedNotificationForSnooze,h=e.markSnoozeNotification,p=(0,y.useRouter)(),x=p.query.workspaceSlug,g=(0,v.Z)().setToastAlert;return(0,r.jsxs)("div",{onClick:function(){d(u.id),p.push("/".concat(x,"/projects/").concat(u.project,"/issues/").concat(u.data.issue.id))},className:"group w-full flex items-center gap-4 p-3 pl-6 relative cursor-pointer ".concat(null===u.read_at?"bg-custom-primary-70/5":"hover:bg-custom-background-200"),children:[null===u.read_at&&(0,r.jsx)("span",{className:"absolute top-1/2 left-2 -translate-y-1/2 w-1.5 h-1.5 bg-custom-primary-100 rounded-full"}),(0,r.jsx)("div",{className:"relative w-12 h-12 rounded-full",children:u.triggered_by_details.avatar&&""!==u.triggered_by_details.avatar?(0,r.jsx)("div",{className:"h-12 w-12 rounded-full",children:(0,r.jsx)(es(),{src:u.triggered_by_details.avatar,alt:"Profile Image",layout:"fill",objectFit:"cover",className:"rounded-full"})}):(0,r.jsx)("div",{className:"w-12 h-12 bg-custom-background-80 rounded-full flex justify-center items-center",children:(0,r.jsx)("span",{className:"text-custom-text-100 font-medium text-lg",children:(null===(t=u.triggered_by_details.first_name)||void 0===t?void 0:t[0])?null===(n=u.triggered_by_details.first_name)||void 0===n?void 0:null===(s=n[0])||void 0===s?void 0:s.toUpperCase():(0,r.jsx)(o.JO,{iconName:"person",className:"h-6 w-6"})})})}),(0,r.jsxs)("div",{className:"space-y-2.5 w-full overflow-hidden",children:[(0,r.jsxs)("div",{className:"text-sm w-full break-words",children:[(0,r.jsxs)("span",{className:"font-semibold",children:[u.triggered_by_details.first_name," ",u.triggered_by_details.last_name," "]}),"comment"!==u.data.issue_activity.field&&u.data.issue_activity.verb," ","comment"===u.data.issue_activity.field?"commented":"None"===u.data.issue_activity.field?null:(0,P.y2)(u.data.issue_activity.field)," ","comment"!==u.data.issue_activity.field&&"None"!==u.data.issue_activity.field?"to":"",(0,r.jsxs)("span",{className:"font-semibold",children:[" ","None"!==u.data.issue_activity.field?"comment"!==u.data.issue_activity.field?"target_date"===u.data.issue_activity.field?(0,c.T3)(u.data.issue_activity.new_value):"attachment"===u.data.issue_activity.field?"the issue":(0,P.Cb)(u.data.issue_activity.new_value).length>55?(0,P.Cb)(u.data.issue_activity.new_value).slice(0,50)+"...":(0,P.Cb)(u.data.issue_activity.new_value):(0,r.jsxs)("span",{children:['"',u.data.issue_activity.new_value.length>55?(null==u?void 0:null===(a=u.data)||void 0===a?void 0:null===(i=a.issue_activity)||void 0===i?void 0:null===(l=i.issue_comment)||void 0===l?void 0:l.slice(0,50))+"...":u.data.issue_activity.issue_comment,'"']}):"the issue and assigned it to you."]})]}),(0,r.jsxs)("div",{className:"flex justify-between gap-2 text-xs",children:[(0,r.jsx)("p",{className:"text-custom-text-300",children:(0,P.aF)("".concat(u.data.issue.identifier,"-").concat(u.data.issue.sequence_id," ").concat(u.data.issue.name),50)}),u.snoozed_till?(0,r.jsxs)("p",{className:"text-custom-text-300 flex items-center justify-end gap-x-1 flex-shrink-0",children:[(0,r.jsx)(o.JO,{iconName:"schedule",className:"!text-base -my-0.5"}),(0,r.jsxs)("span",{children:["Till ",(0,c.BK)(u.snoozed_till),","," ",(0,c.lK)(u.snoozed_till)]})]}):(0,r.jsx)("p",{className:"text-custom-text-300 flex-shrink-0",children:(0,c.jL)(u.created_at)})]})]}),(0,r.jsxs)("div",{className:"absolute py-1 gap-x-3 right-3 top-3 hidden group-hover:flex",children:[[{id:1,name:u.read_at?"Mark as unread":"Mark as read",icon:"chat_bubble",onClick:function(){d(u.id).then(function(){g({title:u.read_at?"Notification marked as unread":"Notification marked as read",type:"success"})})}},{id:2,name:u.archived_at?"Unarchive":"Archive",icon:u.archived_at?"unarchive":"archive",onClick:function(){m(u.id).then(function(){g({title:u.archived_at?"Notification un-archived":"Notification archived",type:"success"})})}},].map(function(e){return(0,r.jsx)(o.u,{tooltipContent:e.name,children:(0,r.jsx)("button",{type:"button",onClick:function(t){t.stopPropagation(),e.onClick()},className:"text-sm flex w-full items-center gap-x-2 bg-custom-background-80 hover:bg-custom-background-100 p-0.5 rounded outline-none",children:(0,r.jsx)(o.JO,{iconName:e.icon,className:"h-5 w-5 text-custom-text-300"})},e.id)})}),(0,r.jsx)(o.u,{tooltipContent:"Snooze",children:(0,r.jsx)("div",{children:(0,r.jsx)(o.fR,{menuButtonOnClick:function(e){e.stopPropagation()},customButton:(0,r.jsx)("button",{type:"button",className:"text-sm flex w-full items-center gap-x-2 bg-custom-background-80 hover:bg-custom-background-100 p-0.5 rounded",children:(0,r.jsx)(o.JO,{iconName:"schedule",className:"h-5 w-5 text-custom-text-300"})}),optionsClassName:"!z-20",children:ea.map(function(e){return(0,r.jsx)(o.fR.MenuItem,{renderAs:"button",onClick:function(t){if(t.stopPropagation(),!e.value){f(u.id);return}h(u.id,e.value).then(function(){g({title:"Notification snoozed till ".concat((0,c.oB)(e.value)),type:"success"})})},children:e.label},e.label)})})})})]})]})},ei=n(43913),eo=n(47842),ec=n(70865),el=n(96670),eu=n(66635),ed=n(48700),em=function(){var e,t,n,s,a,r,o=(0,y.useRouter)().query.workspaceSlug,c=(0,i.useState)(!1),l=c[0],u=c[1],d=(0,i.useState)(!1),p=d[0],x=d[1],v=(0,i.useState)(!1),b=v[0],j=v[1],N=(0,i.useState)(null),w=N[0],k=N[1],_=(0,i.useState)("assigned"),A=_[0],C=_[1],S=(0,i.useMemo)(function(){return{type:l||p||b?void 0:A,snoozed:l,archived:p,read:!b&&null,per_page:2}},[p,b,A,l]),Z=(0,eu.ZP)(o?function(e,t){return(0,g.Be)(e,t,o.toString(),S)}:function(){return null},(n=(0,m.Z)(function(e){return(0,f.__generator)(this,function(t){switch(t.label){case 0:return[4,ed.Z.getNotifications(e)];case 1:return[2,t.sent()]}})}),function(e){return n.apply(this,arguments)})),I=Z.data,M=Z.size,z=Z.setSize,T=Z.isLoading,F=Z.isValidating,R=Z.mutate,D=T||M>0&&I&&void 0===I[M-1],E=(null==I?void 0:null===(e=I[0])||void 0===e?void 0:null===(t=e.results)||void 0===t?void 0:t.length)===0,U=I?I.map(function(e){return e.results}).flat():void 0,P=E||I&&I[I.length-1].next_page_results,L=F&&I&&I.length===M,O=(0,h.ZP)(o?(0,g.WC)(o.toString()):null,function(){return o?ed.Z.getUnreadNotificationsCount(o.toString()):null}),W=O.data,B=O.mutate,q=function(e){var t="read"===e?-1:1;B(function(e){if(!e)return e;var n="assigned"===A?"my_issues":"created"===A?"created_issues":"watching_issues";return(0,el.Z)((0,ec.Z)({},e),(0,eo.Z)({},n,e[n]+t))},!1)},J=function(e,t){R(function(n){if(!n)return n;var s=Math.floor(n.map(function(e){return e.results}).flat().findIndex(function(t){return t.id===e})/2),a=n[s].results.findIndex(function(t){return t.id===e});if(-1===a||(a=-1===a?0:a%2,-1===s||-1===a))return n;var r=Object.keys(t)[0];return n[s].results[a][r]=t[r],n},!1)},G=function(e){R(function(t){if(!t)return t;var n=Math.floor(t.map(function(e){return e.results}).flat().findIndex(function(t){return t.id===e})/2),s=t[n].results.findIndex(function(t){return t.id===e});return -1===s||(s=-1===s?0:s%2,-1===n||-1===s||t[n].results.splice(s,1)),t},!1)},V=(s=(0,m.Z)(function(e){var t,n;return(0,f.__generator)(this,function(s){switch(s.label){case 0:if(!o)return[2];if(q((n=(null===(t=null==U?void 0:U.find(function(t){return t.id===e}))||void 0===t?void 0:t.read_at)!==null)?"unread":"read"),J(e,{read_at:n?null:new Date}),!n)return[3,2];return[4,ed.Z.markUserNotificationAsUnread(o.toString(),e).catch(function(){throw Error("Something went wrong")}).finally(function(){B()})];case 1:return s.sent(),[3,4];case 2:return[4,ed.Z.markUserNotificationAsRead(o.toString(),e).catch(function(){throw Error("Something went wrong")}).finally(function(){B()})];case 3:s.sent(),s.label=4;case 4:return[2]}})}),function(e){return s.apply(this,arguments)}),H=(a=(0,m.Z)(function(e){var t,n;return(0,f.__generator)(this,function(s){switch(s.label){case 0:if(!o)return[2];if((n=(null===(t=null==U?void 0:U.find(function(t){return t.id===e}))||void 0===t?void 0:t.archived_at)!==null)?p&&G(e):(q("read"),G(e)),!n)return[3,2];return[4,ed.Z.markUserNotificationAsUnarchived(o.toString(),e).catch(function(){throw Error("Something went wrong")}).finally(function(){R(),B()})];case 1:return s.sent(),[3,4];case 2:return[4,ed.Z.markUserNotificationAsArchived(o.toString(),e).catch(function(){throw Error("Something went wrong")}).finally(function(){R(),B()})];case 3:s.sent(),s.label=4;case 4:return[2]}})}),function(e){return a.apply(this,arguments)}),Y=(r=(0,m.Z)(function(e,t){var n,s;return(0,f.__generator)(this,function(a){switch(a.label){case 0:if(!o)return[2];if(s=(null===(n=null==U?void 0:U.find(function(t){return t.id===e}))||void 0===n?void 0:n.snoozed_till)!==null,J(e,{snoozed_till:s?null:t}),!s)return[3,2];return[4,ed.Z.patchUserNotification(o.toString(),e,{snoozed_till:null}).finally(function(){R()})];case 1:return a.sent(),[3,4];case 2:return[4,ed.Z.patchUserNotification(o.toString(),e,{snoozed_till:t}).catch(function(){Error("Something went wrong")}).finally(function(){R()})];case 3:a.sent(),a.label=4;case 4:return[2]}})}),function(e,t){return r.apply(this,arguments)});return{notifications:U,notificationMutate:R,markNotificationReadStatus:V,markNotificationArchivedStatus:H,markSnoozeNotification:Y,snoozed:l,setSnoozed:u,archived:p,setArchived:x,readNotification:b,setReadNotification:j,selectedNotificationForSnooze:w,setSelectedNotificationForSnooze:k,selectedTab:A,setSelectedTab:C,totalNotificationCount:W?W.created_issues+W.watching_issues+W.my_issues:null,notificationCount:W,mutateNotificationCount:B,setSize:z,isLoading:T,isLoadingMore:D,hasMore:P,isRefreshing:L}},ef=n(11593),eh={src:"/_next/static/media/notification.2dbe8957.svg",height:114,width:225},ep=function(){var e=em(),t=e.notifications,n=e.archived,s=e.readNotification,a=e.selectedNotificationForSnooze,c=e.selectedTab,l=e.setArchived,u=e.setReadNotification,d=e.setSelectedNotificationForSnooze,m=e.setSelectedTab,f=e.setSnoozed,h=e.snoozed,p=e.notificationMutate,x=e.markNotificationArchivedStatus,v=e.markNotificationReadStatus,g=e.markSnoozeNotification,b=e.notificationCount,j=e.totalNotificationCount,N=e.setSize,y=e.isLoadingMore,k=e.hasMore,_=e.isRefreshing,A=(0,Z.Z)().collapsed;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eg,{isOpen:null!==a,onClose:function(){return d(null)},onSubmit:g,notification:(null==t?void 0:t.find(function(e){return e.id===a}))||null,onSuccess:function(){d(null)}}),(0,r.jsx)(ei.J,{className:"relative w-full",children:function(e){var a=e.open,C=e.close;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.u,{tooltipContent:"Notifications",position:"right",className:"ml-2",disabled:!A,children:(0,r.jsxs)(ei.J.Button,{className:"group flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-sm font-medium outline-none ".concat(a?"bg-custom-primary-100/10 text-custom-primary-100":"text-custom-sidebar-text-200 hover:bg-custom-sidebar-background-80"," ").concat(A?"justify-center":""),children:[(0,r.jsx)(ef.Z,{fontSize:"small"}),A?null:(0,r.jsx)("span",{children:"Notifications"}),j&&j>0?(0,r.jsx)("span",{className:"ml-auto bg-custom-primary-300 rounded-full text-xs text-white px-1.5",children:(0,P.gw)(j)}):null]})}),(0,r.jsx)(w.u,{as:i.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:(0,r.jsxs)(ei.J.Panel,{className:"absolute bg-custom-background-100 flex flex-col left-0 md:left-full ml-8 z-10 top-0 md:w-[36rem] w-[20rem] h-[50vh] border border-custom-border-300 shadow-lg rounded-xl",children:[(0,r.jsx)(ej,{notificationCount:b,notificationMutate:p,closePopover:C,isRefreshing:_,snoozed:h,archived:n,readNotification:s,selectedTab:c,setSnoozed:f,setArchived:l,setReadNotification:u,setSelectedTab:m}),t?t.length>0?(0,r.jsxs)("div",{className:"h-full overflow-y-auto",children:[(0,r.jsx)("div",{className:"divide-y divide-custom-border-100",children:t.map(function(e){return(0,r.jsx)(er,{notification:e,markNotificationArchivedStatus:x,markNotificationReadStatus:v,setSelectedNotificationForSnooze:d,markSnoozeNotification:g},e.id)})}),y&&(0,r.jsxs)("div",{className:"my-6 flex justify-center items-center text-sm",children:[(0,r.jsxs)("div",{role:"status",children:[(0,r.jsxs)("svg",{"aria-hidden":"true",className:"mr-2 h-6 w-6 animate-spin fill-blue-600 text-custom-text-200",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),(0,r.jsx)("span",{className:"sr-only",children:"Loading..."})]}),(0,r.jsx)("p",{children:"Loading notifications"})]}),k&&!y&&(0,r.jsx)("button",{type:"button",className:"text-custom-primary-100 my-6 flex justify-center items-center w-full text-sm font-medium",disabled:y,onClick:function(){N(function(e){return e+1})},children:"Load More"})]}):(0,r.jsx)("div",{className:"grid h-full w-full place-items-center overflow-hidden scale-75",children:(0,r.jsx)(o.ub,{title:"You're updated with all the notifications",description:"You have read all the notifications.",image:eh,isFullScreen:!1})}):(0,r.jsxs)(o.aN,{className:"p-5 space-y-4 overflow-y-auto",children:[(0,r.jsx)(o.aN.Item,{height:"50px"}),(0,r.jsx)(o.aN.Item,{height:"50px"}),(0,r.jsx)(o.aN.Item,{height:"50px"}),(0,r.jsx)(o.aN.Item,{height:"50px"}),(0,r.jsx)(o.aN.Item,{height:"50px"})]})]})})]})}})]})},ex={time:null,date:null,period:"AM"},ev=(0,c.JA)(),eg=function(e){var t,n=e.isOpen,s=e.onClose,a=e.notification,c=e.onSuccess,l=e.onSubmit,u=(0,y.useRouter)().query.workspaceSlug,d=(0,v.Z)().setToastAlert,h=(0,p.cI)({defaultValues:ex}),x=h.formState.isSubmitting,g=h.reset,b=h.handleSubmit,j=h.control,N=h.watch,_=h.setValue,A=function(){var e=new Date,t=N("date");if(!t||e.toDateString()!==new Date(t).toDateString())return ev;var n=e.getHours(),s=e.getMinutes();return ev.filter(function(e){var t=parseInt(e.value.split(":")[0]),a=parseInt(e.value.split(":")[1]);return"PM"===N("period")&&12!==t&&(t+=12),!(t<n)&&(t!==n||!(a<s))})},C=(t=(0,m.Z)(function(e){var t,n,s,r,i;return(0,f.__generator)(this,function(o){switch(o.label){case 0:if(!u||!a||!e.date||!e.time)return[2];return t=e.period,n=e.time.split(":"),s=parseInt("".concat("AM"===t?n[0]:parseInt(n[0])+12===24?"00":parseInt(n[0])+12)),r=parseInt(n[1]),(i=new Date(e.date)).setHours(s),i.setMinutes(r),[4,l(a.id,i).then(function(){S(),c(),d({title:"Notification snoozed",message:"Notification snoozed successfully",type:"success"})})];case 1:return o.sent(),[2]}})}),function(e){return t.apply(this,arguments)}),S=function(){s();var e=setTimeout(function(){g((0,ec.Z)({},ex)),clearTimeout(e)},500)};return(0,r.jsx)(w.u.Root,{show:n,as:i.Fragment,children:(0,r.jsxs)(k.V,{as:"div",className:"relative z-20",onClose:S,children:[(0,r.jsx)(w.u.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,r.jsx)("div",{className:"fixed inset-0 bg-custom-backdrop bg-opacity-50 transition-opacity"})}),(0,r.jsx)("div",{className:"fixed inset-0 z-20 overflow-y-auto",children:(0,r.jsx)("div",{className:"flex items-center justify-center min-h-full p-4 text-center",children:(0,r.jsx)(w.u.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,r.jsx)(k.V.Panel,{className:"relative transform rounded-lg border border-custom-border-100 bg-custom-background-100 p-5 text-left shadow-xl transition-all sm:w-full sm:max-w-2xl",children:(0,r.jsxs)("form",{onSubmit:b(C),children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)(k.V.Title,{as:"h3",className:"text-lg font-medium leading-6 text-custom-text-100",children:"Customize Snooze Time"}),(0,r.jsx)("div",{children:(0,r.jsx)("button",{type:"button",onClick:S,children:(0,r.jsx)(o.JO,{iconName:"close",className:"w-5 h-5 text-custom-text-100"})})})]}),(0,r.jsxs)("div",{className:"mt-5 flex items-center gap-3",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h6",{className:"block text-sm font-medium text-custom-text-400 mb-2",children:"Pick a date"}),(0,r.jsx)(p.Qr,{name:"date",control:j,rules:{required:"Please select a date"},render:function(e){var t=e.field,n=t.value,s=t.onChange;return(0,r.jsx)(o.z4,{placeholder:"Select date",value:n,onChange:function(e){_("time",null),s(e)},className:"px-3 py-2 w-full rounded-md border border-custom-border-300 bg-custom-background-100 text-custom-text-100 focus:outline-none !text-sm",noBorder:!0,minDate:new Date})}})]}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h6",{className:"block text-sm font-medium text-custom-text-400 mb-2",children:"Pick a time"}),(0,r.jsx)(p.Qr,{control:j,name:"time",rules:{required:"Please select a time"},render:function(e){var t=e.field,n=t.value,s=t.onChange;return(0,r.jsxs)(o.AP,{value:n,onChange:s,label:(0,r.jsx)("div",{className:"truncate",children:n?(0,r.jsxs)("span",{children:[n," ",N("period").toLowerCase()]}):(0,r.jsx)("span",{className:"text-custom-text-400 text-sm",children:"Select a time"})}),width:"w-full",input:!0,children:[(0,r.jsxs)("div",{className:"w-full rounded overflow-hidden h-9 mb-2 flex",children:[(0,r.jsx)("div",{onClick:function(){_("period","AM")},className:"w-1/2 h-full cursor-pointer flex justify-center items-center text-center ".concat("AM"===N("period")?"bg-custom-primary-100/90 text-custom-primary-0":"bg-custom-background-80"),children:"AM"}),(0,r.jsx)("div",{onClick:function(){_("period","PM")},className:"w-1/2 h-full cursor-pointer flex justify-center items-center text-center ".concat("PM"===N("period")?"bg-custom-primary-100/90 text-custom-primary-0":"bg-custom-background-80"),children:"PM"})]}),A().length>0?A().map(function(e,t){return(0,r.jsx)(o.AP.Option,{value:e.value,children:(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)("span",{className:"ml-3 block truncate",children:e.label})})},"".concat(e,"-").concat(t))}):(0,r.jsx)("p",{className:"text-custom-text-200 text-center p-3",children:"No available time for this date."})]})}})]})]}),(0,r.jsx)("div",{className:"mt-5 flex items-center justify-between gap-2",children:(0,r.jsxs)("div",{className:"w-full flex items-center gap-2 justify-end",children:[(0,r.jsx)(o.kq,{onClick:S,children:"Cancel"}),(0,r.jsx)(o.KM,{type:"submit",loading:x,children:x?"Submitting...":"Submit"})]})})]})})})})})]})})},eb=n(99644),ej=function(e){var t,n=e.notificationCount,s=e.notificationMutate,a=e.closePopover,i=e.isRefreshing,c=e.snoozed,l=e.archived,u=e.readNotification,d=e.selectedTab,m=e.setSnoozed,f=e.setArchived,h=e.setReadNotification,p=e.setSelectedTab,x=(0,y.useRouter)().query.workspaceSlug,v=(0,eb.Z)(null!==(t=null==x?void 0:x.toString())&&void 0!==t?t:""),g=v.isOwner,b=v.isMember,j=[{label:"My Issues",value:"assigned",unreadCount:null==n?void 0:n.my_issues},{label:"Created by me",value:"created",unreadCount:null==n?void 0:n.created_issues},{label:"Subscribed",value:"watching",unreadCount:null==n?void 0:n.watching_issues},];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-5 pt-5",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold mb-2",children:"Notifications"}),(0,r.jsxs)("div",{className:"flex gap-x-4 justify-center items-center text-custom-text-200",children:[(0,r.jsx)(o.u,{tooltipContent:"Refresh",children:(0,r.jsx)("button",{type:"button",onClick:function(){s()},children:(0,r.jsx)(o.JO,{iconName:"refresh",className:"".concat(i?"animate-spin":"")})})}),(0,r.jsx)(o.u,{tooltipContent:"Unread notifications",children:(0,r.jsx)("button",{type:"button",onClick:function(){m(!1),f(!1),h(function(e){return!e})},children:(0,r.jsx)(o.JO,{iconName:"filter_list"})})}),(0,r.jsx)(o.u,{tooltipContent:"Snoozed notifications",children:(0,r.jsx)("button",{type:"button",onClick:function(){f(!1),h(!1),m(function(e){return!e})},children:(0,r.jsx)(o.JO,{iconName:"schedule"})})}),(0,r.jsx)(o.u,{tooltipContent:"Archived notifications",children:(0,r.jsx)("button",{type:"button",onClick:function(){m(!1),h(!1),f(function(e){return!e})},children:(0,r.jsx)(o.JO,{iconName:"archive"})})}),(0,r.jsx)("button",{type:"button",onClick:function(){return a()},children:(0,r.jsx)(o.JO,{iconName:"close"})})]})]}),(0,r.jsx)("div",{className:"border-b border-custom-border-300 w-full px-5 mt-5",children:c||l||u?(0,r.jsx)("button",{type:"button",onClick:function(){m(!1),f(!1),h(!1)},children:(0,r.jsxs)("h4",{className:"flex items-center gap-2 pb-4",children:[(0,r.jsx)(o.JO,{iconName:"arrow_back"}),(0,r.jsx)("span",{className:"ml-2 font-medium",children:c?"Snoozed Notifications":u?"Unread Notifications":"Archived Notifications"})]})}):(0,r.jsx)("nav",{className:"flex space-x-5 overflow-x-auto","aria-label":"Tabs",children:j.map(function(e){return"created"===e.value?b||g?(0,r.jsxs)("button",{type:"button",onClick:function(){return p(e.value)},className:"whitespace-nowrap border-b-2 pb-4 px-1 text-sm font-medium outline-none ".concat(e.value===d?"border-custom-primary-100 text-custom-primary-100":"border-transparent text-custom-text-200"),children:[e.label,e.unreadCount&&e.unreadCount>0?(0,r.jsx)("span",{className:"ml-2 rounded-full text-xs px-2 py-0.5 ".concat(e.value===d?"bg-custom-primary-100 text-white":"bg-custom-background-80 text-custom-text-200"),children:(0,P.gw)(e.unreadCount)}):null]},e.value):null:(0,r.jsxs)("button",{type:"button",onClick:function(){return p(e.value)},className:"whitespace-nowrap border-b-2 pb-4 px-1 text-sm font-medium ".concat(e.value===d?"border-custom-primary-100 text-custom-primary-100":"border-transparent text-custom-text-200"),children:[e.label,e.unreadCount&&e.unreadCount>0?(0,r.jsx)("span",{className:"ml-2 rounded-full text-xs px-2 py-0.5 ".concat(e.value===d?"bg-custom-primary-100 text-white":"bg-custom-background-80 text-custom-text-200"),children:(0,P.gw)(e.unreadCount)}):null]},e.value)})})})]})},eN=n(75819),ey=n(86447),ew=n(40447),ek=n(79694),e_=function(){var e,t=(0,y.useRouter)(),n=t.query.workspaceSlug,s=(0,Z.Z)().collapsed;return(0,r.jsxs)("div",{className:"w-full cursor-pointer space-y-2 px-4 mt-5",children:[[{Icon:eN.Z,name:"Dashboard",href:"/".concat(n)},{Icon:ey.Z,name:"Analytics",href:"/".concat(n,"/analytics")},{Icon:ew.Z,name:"Projects",href:"/".concat(n,"/projects")},{Icon:ek.Z,name:"My Issues",href:"/".concat(n,"/me/my-issues")},].map(function(e,n){var a="Settings"===e.name?t.asPath.includes(e.href):t.asPath===e.href;return(0,r.jsx)(S(),{href:e.href,children:(0,r.jsx)("a",{className:"block w-full",children:(0,r.jsx)(o.u,{tooltipContent:e.name,position:"right",className:"ml-2",disabled:!s,children:(0,r.jsxs)("div",{className:"group flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-sm font-medium outline-none ".concat(a?"bg-custom-primary-100/10 text-custom-primary-100":"text-custom-sidebar-text-200 hover:bg-custom-sidebar-background-80 focus:bg-custom-sidebar-background-80"," ").concat(s?"justify-center":""),children:[(0,r.jsx)(e.Icon,{fontSize:"small"}),!s&&e.name]})})})},n)}),(0,r.jsx)(ep,{})]})}},52970:function(e,t,n){n.d(t,{NB:function(){return r},Qh:function(){return c},SQ:function(){return s},gg:function(){return i},y8:function(){return a},z1:function(){return o}});var s=[{key:0,label:"Private",icon:"lock"},{key:2,label:"Public",icon:"public"},],a={backlog:"Backlog",unstarted:"Unstarted",started:"Started",completed:"Completed",cancelled:"Cancelled"},r=["urgent","high","medium","low",null],i=["January","February","March","April","May","June","July","August","September","October","November","December",],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=[{label:"1 Month",value:1},{label:"3 Months",value:3},{label:"6 Months",value:6},{label:"9 Months",value:9},{label:"12 Months",value:12},]},75302:function(e,t,n){n.d(t,{HB:function(){return r},VZ:function(){return c},h1:function(){return i},pR:function(){return o}});var s=n(57247),a=n(31355),r={5:"Guest",10:"Viewer",15:"Member",20:"Admin"},i=["Just myself","2-10","11-50","51-200","201-500","500+"],o=[{value:"Product / Project Manager",label:"Product / Project Manager"},{value:"Development / Engineering",label:"Development / Engineering"},{value:"Founder / Executive",label:"Founder / Executive"},{value:"Freelancer / Consultant",label:"Freelancer / Consultant"},{value:"Marketing / Growth",label:"Marketing / Growth"},{value:"Sales / Business Development",label:"Sales / Business Development"},{value:"Support / Operations",label:"Support / Operations"},{value:"Student / Professor",label:"Student / Professor"},{value:"Human Resources",label:"Human Resources"},{value:"Other",label:"Other"},],c=[{provider:"github",type:"import",title:"GitHub",description:"Import issues from GitHub repositories and sync them.",logo:s.Z},{provider:"jira",type:"import",title:"Jira",description:"Import issues and epics from Jira projects and epics.",logo:a.Z},]},98286:function(e,t,n){var s=n(2784),a=function(e,t){var n=function(n){e.current&&!e.current.contains(n.target)&&t()};(0,s.useEffect)(function(){return document.addEventListener("click",n),function(){document.removeEventListener("click",n)}})};t.Z=a},1451:function(e,t,n){var s=n(2784),a=n(83776),r=function(){return(0,s.useContext)(a.nN)};t.Z=r},84337:function(e,t,n){n.d(t,{Z:function(){return c}});var s=n(2784),a=n(5632),r=n(3255),i=n(25914),o=n(44646);function c(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=n.redirectTo,l=void 0===c?"":c,u=n.redirectIfFound,d=void 0!==u&&u,m=n.options,f=(0,a.useRouter)(),h=(0,r.ZP)(o.VI,function(){return i.Z.currentUser()},void 0===m?{}:m),p=h.data,x=h.isLoading,v=h.error,g=h.mutate,b=v?void 0:p;return(0,s.useEffect)(function(){if(l&&b&&(l&&!d||d&&b)){f.push(l);return}},[b,d,l,f]),{user:b,isUserLoading:x,mutateUser:g,userError:v,assignedIssuesLength:null!==(e=null==b?void 0:b.assigned_issues)&&void 0!==e?e:0,workspaceInvitesLength:null!==(t=null==b?void 0:b.workspace_invites)&&void 0!==t?t:0}}},99644:function(e,t,n){var s=n(3255),a=n(60356),r=n(44646),i=n(84337),o=function(e,t){t=null==t||t;var n=(0,i.Z)().user,o=(0,s.ZP)(e&&t?(0,r.YW)(e):null,e&&t?function(){return a.Z.workspaceMembers(e)}:null),c=o.data,l=o.error,u=null==c?void 0:c.some(function(e){return e.member.id===(null==n?void 0:n.id)}),d=null==c?void 0:c.some(function(e){return e.member.id===(null==n?void 0:n.id)&&20===e.role}),m=null==c?void 0:c.some(function(e){return e.member.id===(null==n?void 0:n.id)&&15===e.role}),f=null==c?void 0:c.some(function(e){return e.member.id===(null==n?void 0:n.id)&&10===e.role}),h=null==c?void 0:c.some(function(e){return e.member.id===(null==n?void 0:n.id)&&5===e.role});return{workspaceMembers:c,workspaceMemberErrors:l,hasJoined:u,isOwner:d,isMember:m,isViewer:f,isGuest:h}};t.Z=o},9400:function(e,t,n){var s=n(5632),a=n(3255),r=n(60356),i=n(44646),o=function(){var e=(0,s.useRouter)().query.workspaceSlug,t=(0,a.ZP)(i.Lq,function(){return r.Z.userWorkspaces()}),n=t.data,o=t.error,c=t.mutate,l=null==n?void 0:n.find(function(t){return t.slug===e});return{workspaces:n,error:o,activeWorkspace:l,mutateWorkspaces:c}};t.Z=o},82400:function(e,t,n){var s=n(52322),a=function(e){var t=e.children,n=e.gradient;return(0,s.jsx)("div",{className:"h-screen w-full overflow-hidden ".concat(void 0!==n&&n?"":"bg-custom-background-100"),children:t})};t.Z=a},90479:function(e,t,n){var s=n(52322),a=n(39097),r=n.n(a),i=n(5632),o=function(e){var t=e.profilePage,n=(0,i.useRouter)(),a=n.query,o=a.workspaceSlug,c=a.projectId,l=[{label:"General",href:"/".concat(o,"/settings")},{label:"Members",href:"/".concat(o,"/settings/members")},{label:"Billing & Plans",href:"/".concat(o,"/settings/billing")},{label:"Integrations",href:"/".concat(o,"/settings/integrations")},{label:"Import/Export",href:"/".concat(o,"/settings/import-export")},],u=[{label:"General",href:"/".concat(o,"/projects/").concat(c,"/settings")},{label:"Control",href:"/".concat(o,"/projects/").concat(c,"/settings/control")},{label:"Members",href:"/".concat(o,"/projects/").concat(c,"/settings/members")},{label:"Features",href:"/".concat(o,"/projects/").concat(c,"/settings/features")},{label:"States",href:"/".concat(o,"/projects/").concat(c,"/settings/states")},{label:"Labels",href:"/".concat(o,"/projects/").concat(c,"/settings/labels")},{label:"Integrations",href:"/".concat(o,"/projects/").concat(c,"/settings/integrations")},{label:"Estimates",href:"/".concat(o,"/projects/").concat(c,"/settings/estimates")},{label:"Automations",href:"/".concat(o,"/projects/").concat(c,"/settings/automations")},],d=[{label:"General",href:"/".concat(o,"/me/profile")},{label:"Activity",href:"/".concat(o,"/me/profile/activity")},{label:"Preferences",href:"/".concat(o,"/me/profile/preferences")},];return(0,s.jsx)("div",{className:"flex flex-wrap gap-4",children:(void 0!==t&&t?d:c?u:l).map(function(e){return(0,s.jsx)(r(),{href:e.href,children:(0,s.jsx)("a",{children:(0,s.jsx)("div",{className:"rounded-full border px-5 py-1.5 text-sm outline-none ".concat(("Import/Export"===e.label?n.asPath.includes(e.href):n.asPath===e.href)?"border-custom-primary bg-custom-primary text-white":"border-custom-border-200 bg-custom-background-100 hover:bg-custom-background-90"),children:e.label})})},e.href)})})};t.Z=o},99205:function(e,t,n){var s,a=n(98788),r=n(90581),i=n(64297),o=n(45460),c=n(5163),l=function(e){(0,i.Z)(n,e);var t=(0,o.Z)(n);function n(){return(0,r.Z)(this,n),t.call(this,"https://boarding.plane.so")}var s=n.prototype;return s.emailLogin=function(e){var t=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(n){return[2,t.post("/api/sign-in/",e,{headers:{}}).then(function(e){var n,s;return t.setAccessToken(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.access_token),t.setRefreshToken(null==e?void 0:null===(s=e.data)||void 0===s?void 0:s.refresh_token),null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.emailSignUp=function(e){var t=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(n){return[2,t.post("/api/sign-up/",e,{headers:{}}).then(function(e){var n,s;return t.setAccessToken(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.access_token),t.setRefreshToken(null==e?void 0:null===(s=e.data)||void 0===s?void 0:s.refresh_token),null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.socialAuth=function(e){var t=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(n){return[2,t.post("/api/social-auth/",e,{headers:{}}).then(function(e){var n,s;return t.setAccessToken(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.access_token),t.setRefreshToken(null==e?void 0:null===(s=e.data)||void 0===s?void 0:s.refresh_token),null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.emailCode=function(e){var t=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(n){return[2,t.post("/api/magic-generate/",e,{headers:{}}).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.magicSignIn=function(e){var t=this;return(0,a.Z)(function(){var n,s,a;return(0,c.__generator)(this,function(r){switch(r.label){case 0:return[4,t.post("/api/magic-sign-in/",e,{headers:{}})];case 1:if((null==(n=r.sent())?void 0:n.status)===200)return t.setAccessToken(null==n?void 0:null===(s=n.data)||void 0===s?void 0:s.access_token),t.setRefreshToken(null==n?void 0:null===(a=n.data)||void 0===a?void 0:a.refresh_token),[2,null==n?void 0:n.data];throw n.response.data}})})()},s.signOut=function(){var e=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(t){return[2,e.post("/api/sign-out/",{refresh_token:e.getRefreshToken()}).then(function(t){return e.purgeAccessToken(),e.purgeRefreshToken(),null==t?void 0:t.data}).catch(function(t){var n;throw e.purgeAccessToken(),e.purgeRefreshToken(),null==t?void 0:null===(n=t.response)||void 0===n?void 0:n.data})]})})()},n}(n(71797).Z);t.Z=new l},48700:function(e,t,n){var s,a=n(98788),r=n(90581),i=n(64297),o=n(45460),c=n(5163),l=new(function(e){(0,i.Z)(n,e);var t=(0,o.Z)(n);function n(){return(0,r.Z)(this,n),t.call(this,"https://boarding.plane.so")}var s=n.prototype;return s.getUserNotifications=function(e,t){var n=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(s){return[2,n.get("/api/workspaces/".concat(e,"/users/notifications"),{params:t}).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.getUserNotificationDetailById=function(e,t){var n=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(s){return[2,n.get("/api/workspaces/".concat(e,"/users/notifications/").concat(t,"/")).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.markUserNotificationAsRead=function(e,t){var n=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(s){return[2,n.post("/api/workspaces/".concat(e,"/users/notifications/").concat(t,"/read/")).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.markUserNotificationAsUnread=function(e,t){var n=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(s){return[2,n.delete("/api/workspaces/".concat(e,"/users/notifications/").concat(t,"/read/")).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.markUserNotificationAsArchived=function(e,t){var n=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(s){return[2,n.post("/api/workspaces/".concat(e,"/users/notifications/").concat(t,"/archive/")).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.markUserNotificationAsUnarchived=function(e,t){var n=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(s){return[2,n.delete("/api/workspaces/".concat(e,"/users/notifications/").concat(t,"/archive/")).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.patchUserNotification=function(e,t,n){var s=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(a){return[2,s.patch("/api/workspaces/".concat(e,"/users/notifications/").concat(t,"/"),n).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.deleteUserNotification=function(e,t){var n=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(s){return[2,n.delete("/api/workspaces/".concat(e,"/users/notifications/").concat(t,"/")).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.subscribeToIssueNotifications=function(e,t,n){var s=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(a){return[2,s.post("/api/workspaces/".concat(e,"/projects/").concat(t,"/issues/").concat(n,"/subscribe/")).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.getIssueNotificationSubscriptionStatus=function(e,t,n){var s=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(a){return[2,s.get("/api/workspaces/".concat(e,"/projects/").concat(t,"/issues/").concat(n,"/subscribe/")).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.unsubscribeFromIssueNotifications=function(e,t,n){var s=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(a){return[2,s.delete("/api/workspaces/".concat(e,"/projects/").concat(t,"/issues/").concat(n,"/subscribe/")).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.getUnreadNotificationsCount=function(e){var t=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(n){return[2,t.get("/api/workspaces/".concat(e,"/users/notifications/unread/")).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},s.getNotifications=function(e){var t=this;return(0,a.Z)(function(){return(0,c.__generator)(this,function(n){return[2,t.get(e).then(function(e){return null==e?void 0:e.data}).catch(function(e){var t;throw null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data})]})})()},n}(n(71797).Z));t.Z=l}}]);