PageSourceSearch

https://app.contio.ai/assets/WorkspaceTab-Bk1gxCqj.js

js contio.ai collected 2026-09-24 13:21:52 UTC 26,038 bytes, 1 lines download raw bytes

1import{a as e,j as t,h as a}from"./react-query-DbGahily.js";import{aZ as s,aV as o,G as r,t as n,ad as i,at as l,L as c,cM as d,ae as m,ca as p,c9 as u,cQ as x,ab as h,bj as g}from"./index-D2w6--me.js";import{S as f}from"./Select-C5a8jY6I.js";import"./PhoneInput-DotRGYUf.js";import"./command-DQ0mZgSF.js";import{I as y}from"./IndustryCombobox-oezZBb7I.js";import{S as b}from"./SettingsFormRow-Dt7CvFP4.js";import{u as v,a as w,b as j,c as k,w as _}from"./useWorkspaceMutations-BB9C57LJ.js";import{t as N}from"./notifications-2QZES2T9.js";import{S}from"./SettingsLoading-CSKhDUHQ.js";import{S as C}from"./SlackIcon-DBquRrAi.js";import{I as z,a as A}from"./IntegrationDetailDialog-n2dmSfxp.js";import{b as E}from"./integrationCatalog-DhpdWVqg.js";import{a as I,S as W}from"./SettingsSection-NqYIFN3L.js";import{u as F,a as T,A as R}from"./useAIMemory-DMTr8k7D.js";import{F as D,aJ as $,aW as q}from"./fontawesome-DBd3jlEg.js";import{L as P}from"./router-Da9mPixd.js";import{l as M,n as L}from"./useWorkspaceMergeQueries-BLyq8zwp.js";import"./react-vendor-6ULW7vKx.js";import"./ui-utils-4YCDwm7v.js";import"./state-management-C8FSCvW-.js";import"./date-fns-core-B257BzXA.js";import"./radix-ui-Bm2DdM33.js";import"./api-utils-DeT0SS0P.js";import"./tiptap-complete-BDArfEOb.js";import"./collaboration-protocols-oLklGwa8.js";import"./collaboration-provider-DYKWCpdb.js";import"./lucide-icons-jmdBoKez.js";import"./virtualization-BoefKlzQ.js";import"./react-day-picker-BRaEi7x0.js";import"./phone-input-Bx3whqRZ.js";import"./command-utils-BGhG4SQz.js";import"./CrmCombobox-dlQHL1FK.js";import"./CrmJobRolesService-CNq9a9WR.js";import"./searchable-combobox-C1E3NQGk.js";import"./workspaceApi-DeXgQpZJ.js";import"./integrationStatus-2bOShG1j.js";import"./collapsible-CudBw1uJ.js";import"./PromptFieldEditor-Dln58LUs.js";import"./AiMemoryService-70MLt2x3.js";import"./MergeService-CjP636pF.js";function O({canEdit:a}){const{data:n,isLoading:i}=v(),l=w(),c=n?.slack_config,[d,m]=e.useState(""),[p,u]=e.useState(""),[x,h]=e.useState(""),g=e.useRef(!1);e.useEffect(()=>{n&&!g.current&&(g.current=!0,u(c?.default_channel_id??""))},[n,c]);const f=c?.default_channel_id??"",y=l.isPending,b=async(e,t)=>{if(!a)return;const s=e.trim(),o=t.trim();if(""!==s||o!==f)if(o)if(s||c?.has_bot_token){h("");try{await l.mutateAsync({slack_config:{...s?{bot_token:s}:{},default_channel_id:o}}),m("")}catch(n){r.error("Slack config update failed:",n)}}else h("");else h("Default Channel ID is required for workflow message delivery")};return t.jsxs("div",{className:"flex flex-col gap-4","data-testid":"workspace-slack-settings-section",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(s,{htmlFor:"slack-bot-token",children:"Bot Token"}),t.jsx(o,{id:"slack-bot-token",type:"password",placeholder:c?.has_bot_token?"••••••••••••••••":"xoxb-your-token-here",value:d,onChange:e=>m(e.target.value),onBlur:()=>{b(d,p)},disabled:i||y||!a,"data-testid":"slack-bot-token-input"}),t.jsx("p",{className:"text-xs text-gray-500",children:c?.has_bot_token?"Enter a new token to replace the existing one.":"Enter your Slack Bot Token (starts with xoxb-)."})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(s,{htmlFor:"slack-channel-id",children:"Default Channel ID"}),t.jsx(o,{id:"slack-channel-id",type:"text",placeholder:"C0123456789",value:p,onChange:e=>u(e.target.value),onBlur:()=>{b(d,p)},disabled:i||y||!a,color:x?"error":"default","data-testid":"slack-channel-id-input"}),t.jsx("p",{className:"text-xs text-gray-500",children:"Required. The default channel for messages."}),x&&t.jsx("p",{className:"text-sm text-destructive",role:"alert","data-testid":"slack-config-error",children:x})]})]})}const B="workspace-slack",K="Sends workflow messages to your team from a Slack app you install once for the whole workspace.";function U(a){const s=n.c(18),{canEdit:o}=a,{data:l}=v(),c=w(),[d,m]=e.useState(!1),p=l?.slack_config,u=!!p?.has_bot_token,x=u&&!p?.default_channel_id;let h;s[0]!==c?(h=async()=>{try{await c.mutateAsync({slack_config:null}),m(!1)}catch(e){const t=e;
1r.error("Slack config deletion failed:",t)}},s[0]=c,s[1]=h):h=s[1];const g=h;let f,y,b,j,k,_;return s[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("h3",{className:"text-md leading-4 font-bold",children:"Workspace Integrations"}),t.jsx("p",{className:"text-sm text-gray-contio-600",children:"Connected once for everyone in this workspace."})]}),s[2]=f):f=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(C,{}),s[3]=y):y=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(b=()=>m(!0),s[4]=b):b=s[4],s[5]!==u||s[6]!==x?(j=t.jsx("div",{className:"grid grid-cols-1 items-stretch gap-4",children:t.jsx(A,{cardKey:B,title:"Slack",description:K,icon:y,isConnected:u,categoryLabel:E.chat,needsConfiguration:x,onOpen:b})}),s[5]=u,s[6]=x,s[7]=j):j=s[7],s[8]!==o||s[9]!==g||s[10]!==u||s[11]!==d||s[12]!==x||s[13]!==c?(k=d&&t.jsx(z,{open:!0,onOpenChange:m,integration:{integration_name:B,status:u?"configured":"empty",title:"Slack",description:K,icon:t.jsx(C,{}),largeIcon:t.jsx(C,{className:"size-14"})},category:"chat",needsConfiguration:x,settingsSection:t.jsx(O,{canEdit:o}),actions:t.jsxs("div",{className:"flex w-full flex-col gap-2",children:[o&&u&&t.jsx(i,{color:"danger",variant:"outline",size:"default",className:"w-full",onClick:()=>{g()},disabled:c.isPending,"data-testid":"workspace-slack-remove",children:c.isPending?"Removing…":"Remove Integration"}),t.jsx("p",{className:"text-sm text-gray-contio-600","data-testid":"workspace-slack-hint",children:o?"Changes save as you make them. Removing the integration deletes the stored token.":"Only workspace admins can change these settings."})]})}),s[8]=o,s[9]=g,s[10]=u,s[11]=d,s[12]=x,s[13]=c,s[14]=k):k=s[14],s[15]!==j||s[16]!==k?(_=t.jsxs("section",{className:"flex w-full max-w-sm flex-col gap-4","data-testid":"workspace-integrations",children:[f,j,k]}),s[15]=j,s[16]=k,s[17]=_):_=s[17],_}const V=/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/;const G=[{value:"draft_only",displayText:"Draft only"},{value:"allowlisted_domains",displayText:"Allowlisted domains"},{value:"live",displayText:"Live"}],J={draft_only:"AI-drafted emails to people outside your workspace are always saved as drafts for you to review and send.",allowlisted_domains:"AI-drafted emails are sent automatically only to recipients at the domains below. Everyone else gets a draft.",live:"AI-drafted emails to people outside your workspace are sent automatically without review."};function Q(a){const o=n.c(56),{id:r,mode:d,allowedDomains:m,onSave:p,isSaving:u,readOnly:x}=a,h=void 0!==u&&u,g=void 0!==x&&x,[y,b]=e.useState(null),[v,w]=e.useState(""),[j,k]=e.useState(""),_=y??d,N="allowlisted_domains"===_,S=m.length>0,C=g||h,z=`${r}-mode`,A=`${r}-mode-description`,E=`${r}-domain-input`,I=`${r}-domain-error`;let W;o[0]!==d?(W=G.find(e=>e.value===d)?.displayText??d,o[0]=d,o[1]=W):W=o[1];const F=W;let T;o[2]!==p?(T=(e,t,a)=>p(e,t).then(()=>b(null),()=>{b(null),void 0!==a&&w(a)}),o[2]=p,o[3]=T):T=o[3];const R=T;let q;o[4]!==m||o[5]!==_||o[6]!==S||o[7]!==R?(q=e=>{const t=e;t!==_&&(k(""),"allowlisted_domains"!==t||S?(b(t),R(t,"allowlisted_domains"===t?[...m]:[])):b(t))},o[4]=m,o[5]=_,o[6]=S,o[7]=R,o[8]=q):q=o[8];const P=q;let M;o[9]!==m||o[10]!==v||o[11]!==R?(M=()=>{const e=function(e){let t=e.trim().toLowerCase();return t.startsWith("@")&&(t=t.slice(1)),t.startsWith("www.")&&(t=t.slice(4)),t.endsWith(".")&&(t=t.slice(0,-1)),""===t?{ok:!1,error:"Enter a domain, for example acme.com."}:t.length>253||!V.test(t)?{ok:!1,error:`"${e.trim()}" is not a valid domain.`}:{ok:!0,domain:t}}(v);e.ok?m.includes(e.domain)?k(`${e.domain} is already on the list.`):(k(""),w(""),R("allowlisted_domains",[...m,e.domain],v)):k(e.error)},o[9]=m,o[10]=v,o[11]=R,o[12]=M):M=o[12];const L=M;let O;o[13]!==m||o[14]!==R?(O=e=>{const t=m.filter(t=>t!==e);0!==t.length&&(k(""),R("allowlisted_domains",t))},o[13]=m,o[14]=R,o[15]=O):O=o[15];const B=O;let K;o[16]!==L?(K=e=>{"Enter"!==e.key&&","!==e.key||(e.preventDefault(),L())},o[16]=L,o[17]=K):K=o[17];const U=K;let Q,Z,H,X,Y;o[18]!==z?(Q=t.jsx(s,{htmlFor:z,className:"text-md font-bold",children:"Exter
1nal email sending"}),o[18]=z,o[19]=Q):Q=o[19],o[20]!==g?(Z=g&&t.jsx("span",{className:"shrink-0 rounded-full bg-gray-contio-100 px-2 py-1 text-xs font-semibold text-gray-contio-600","data-testid":"external-send-read-only-badge",children:"Read only"}),o[20]=g,o[21]=Z):Z=o[21],o[22]!==Z||o[23]!==Q?(H=t.jsxs("div",{className:"flex w-full items-start justify-between gap-4",children:[Q,Z]}),o[22]=Z,o[23]=Q,o[24]=H):H=o[24],o[25]===Symbol.for("react.memo_cache_sentinel")?(X=[...G],o[25]=X):X=o[25],o[26]!==C||o[27]!==A||o[28]!==_||o[29]!==P||o[30]!==z?(Y=t.jsx(f,{id:z,selectItems:X,value:_,onChange:P,disabled:C,"aria-label":"External email sending mode","aria-describedby":A,className:"h-[var(--height-button-lg)] w-full"}),o[26]=C,o[27]=A,o[28]=_,o[29]=P,o[30]=z,o[31]=Y):Y=o[31];const ee=J[_];let te,ae,se,oe;return o[32]!==A||o[33]!==ee?(te=t.jsx("p",{id:A,className:"text-sm text-gray-contio-600","data-testid":"external-send-mode-description",children:ee}),o[32]=A,o[33]=ee,o[34]=te):te=o[34],o[35]!==Y||o[36]!==te?(ae=t.jsxs("div",{className:"max-w-sm space-y-2","data-testid":"external-send-mode-select",children:[Y,te]}),o[35]=Y,o[36]=te,o[37]=ae):ae=o[37],o[38]!==m||o[39]!==j||o[40]!==I||o[41]!==v||o[42]!==E||o[43]!==L||o[44]!==U||o[45]!==B||o[46]!==S||o[47]!==N||o[48]!==h||o[49]!==F||o[50]!==g?(se=N&&t.jsxs("div",{className:"max-w-sm space-y-3","data-testid":"external-send-allowlist",children:[t.jsx(s,{htmlFor:E,className:"text-sm font-semibold",children:"Allowed domains"}),S?t.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Allowed domains",children:m.map(e=>{const a=1===m.length;return t.jsxs("li",{className:"inline-flex items-center gap-1 rounded-full border border-gray-contio-200 bg-white py-0.5 pr-1 pl-3 text-sm text-gray-contio-800","data-testid":`external-send-domain-${e}`,children:[t.jsx("span",{children:e}),!g&&t.jsx(i,{type:"button",color:"muted",variant:"ghost",size:"icon-sm",className:"size-6 rounded-full","aria-label":a?`Cannot remove ${e}: at least one domain is required. Change the mode instead.`:`Remove ${e}`,title:a?"At least one domain is required. Change the mode to remove it.":void 0,disabled:h||a,onClick:()=>B(e),"data-testid":`external-send-domain-remove-${e}`,children:t.jsx(D,{icon:$,className:"size-3","aria-hidden":!0})})]},e)})}):t.jsxs("p",{className:"text-sm text-coral-contio-700",role:"status","data-testid":"external-send-allowlist-empty",children:["Add at least one domain to save this mode. Until then, the saved policy (",F,") stays in effect."]}),!g&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx(l,{id:E,type:"text",inputMode:"url",autoComplete:"off",placeholder:"acme.com",value:v,onChange:e=>{w(e.target.value),j&&k("")},onKeyDown:U,disabled:h,"aria-invalid":!!j||void 0,"aria-describedby":j?I:void 0,className:c("flex-1",j&&"border-destructive"),"data-testid":"external-send-domain-input"}),t.jsx(i,{type:"button",color:"success",variant:"solid",size:"default",loading:h,disabled:h||""===v.trim(),onClick:L,"data-testid":"external-send-domain-add",children:"Add"})]}),j&&t.jsx("p",{id:I,className:"text-sm text-destructive",role:"alert","data-testid":"external-send-domain-error",children:j})]})]}),o[38]=m,o[39]=j,o[40]=I,o[41]=v,o[42]=E,o[43]=L,o[44]=U,o[45]=B,o[46]=S,o[47]=N,o[48]=h,o[49]=F,o[50]=g,o[51]=se):se=o[51],o[52]!==H||o[53]!==ae||o[54]!==se?(oe=t.jsxs("div",{className:"flex w-full flex-col gap-4","data-testid":"external-send-policy-editor",children:[H,ae,se]}),o[52]=H,o[53]=ae,o[54]=se,o[55]=oe):oe=o[55],oe}function Z(e){const a=n.c(12),{sourceWorkspaceName:s,className:o}=e,r=s??"Another workspace";let i,l,m,p,u,x,h;
1return a[0]!==o?(i=c("flex max-w-xl items-center gap-4 rounded-lg border border-brand-contio-300 bg-brand-contio-50 p-4",o),a[0]=o,a[1]=i):i=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(D,{icon:q,className:"text-base text-brand-contio-600","aria-hidden":!0}),a[2]=l):l=a[2],a[3]!==r?(m=t.jsxs("p",{className:"text-sm font-bold text-gray-contio-900",children:[r," wants to merge into this workspace"]}),a[3]=r,a[4]=m):m=a[4],a[5]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("p",{className:"text-sm text-gray-contio-700",children:"This merge is waiting for an admin of this workspace to approve or decline it."}),a[5]=p):p=a[5],a[6]!==m?(u=t.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[m,p]}),a[6]=m,a[7]=u):u=a[7],a[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(P,{to:d,className:"shrink-0 rounded-[var(--radius-button-sm)] border border-brand-contio-600 px-[var(--spacing-button-md-padding-x)] py-[var(--spacing-button-md-padding-y)] text-[length:var(--button-font-size-md)] font-bold whitespace-nowrap text-brand-contio-700 transition-colors hover:bg-brand-contio-600 hover:text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-contio-700","data-testid":"merge-pending-approval-link",children:"Review request"}),a[8]=x):x=a[8],a[9]!==i||a[10]!==u?(h=t.jsxs("div",{role:"status","aria-label":"Pending merge approval",className:i,"data-testid":"merge-pending-approval-banner",children:[l,u,x]}),a[9]=i,a[10]=u,a[11]=h):h=a[11],h}const H=[{value:"1-9",displayText:"1-9"},{value:"10-99",displayText:"10-99"},{value:"100-499",displayText:"100-499"},{value:"500+",displayText:"500+"}],X=[{scope:"chat",label:"Chat memory",description:"Shared context for chats, attachment analysis, chat titles, and Daily Briefs.",placeholder:"For example: Use our product terminology when answering questions."},{scope:"projects",label:"Projects memory",description:"Shared context for autonomous AI project runs.",placeholder:"For example: External emails always come from the assigned account owner."},{scope:"summaries",label:"Summaries memory",description:"Shared context for meeting summaries, action items, live questions, and next-step emails, reports, and documents. Generated content may be shared with meeting participants.",placeholder:"For example: Keep customer summaries action-oriented and flag pricing discussions."}],Y=()=>{const o=n.c(125),{user:d}=m(),C=d?.workspace?.id,z=M(C),{data:A,isLoading:E,isError:D,error:$,refetch:q}=v();let O;o[0]===Symbol.for("react.memo_cache_sentinel")?(O={successToast:!1},o[0]=O):O=o[0];const B=w(O);let K,V;o[1]!==C?(K=_(C),o[1]=C,o[2]=K):K=o[2],o[3]!==K?(V={mutationKey:K},o[3]=K,o[4]=V):V=o[4];const G=a(V)>0,J=B.isPending||G,Y=e.useRef(!1);let ne,ie;o[5]!==D?(ne=()=>{D&&!Y.current&&(Y.current=!0,N.error("Failed to load workspace settings. Please try again.")),D||(Y.current=!1)},ie=[D],o[5]=D,o[6]=ne,o[7]=ie):(ne=o[6],ie=o[7]),e.useEffect(ne,ie);const{data:le}=j();let ce;o[8]===Symbol.for("react.memo_cache_sentinel")?(ce={successToast:!1},o[8]=ce):ce=o[8];const de=k(ce),me=A?.name??"",pe=le?.company_size??"",ue=le?.primary_industry_id??"",[xe,he]=e.useState(null),[ge,fe]=e.useState(""),[ye,be]=e.useState(null),[ve,we]=e.useState(null),je=xe??me,ke=ye??pe,_e=ve??ue,[Ne,Se]=e.useState(null),Ce=Ne??(A?.remove_external_participants_from_meetings??!0);let ze;if(o[9]!==d){const e=p(d);ze=u("edit_workspace_settings",e),o[9]=d,o[10]=ze}else ze=o[10];const Ae=ze.hasPermission,Ee=F(),Ie=T();let We;o[11]!==Ae?(We=e=>Ae?e.trim().length<1?"Workspace name is required":e.trim().length>255?"Workspace name must be less than 255 characters":"":"",o[11]=Ae,o[12]=We):We=o[12];const Fe=We;let Te;o[13]!==ge||o[14]!==Fe?(Te=e=>{he(e),ge&&fe(Fe(e))},o[13]=ge,o[14]=Fe,o[15]=Te):Te=o[15];const Re=Te,De=e.useRef(null);let $e;o[16]!==J||o[17]!==xe||o[18]!==me||o[19]!==B||o[20]!==Fe?($e=()=>{if(null===xe)return;if(J)return;const e=Fe(xe);if(fe(e),e)return;const t=xe.trim();t!==me.trim()?(De.current=t,B.mutateAsync({name:t}).catch(ee).finally(()=>{De.current=null,he(null)})):he(null)},o[16]=J,o[17]=xe,o[18]=me,o[19]=B,o[20]=Fe,o[21]=$e):$e=o[21];const qe=$e,Pe=e.useRef(te);let Me,Le,Oe,Be;o[22]!==Ae||o[23]!==xe||o[24]!==me||o[25]!==B||o[26]!==Fe?(Me=()=>{Pe.current=()=>{if(null===xe||!Ae)return;if(Fe(xe))return;const e=xe.trim();e!==me.trim()&&e!==De.current&&B.mutateAsync({name:e}).catch(ae)}},o[22]=Ae,o[23]=xe,o[24]=me,o[25]=B,o[26]=Fe,o[27]=Me):Me=o[27],e.useEffect(Me),o[28]===Symbol.for("react.memo_cache_sentinel")?(Le=()=>()=>Pe.current(),Oe=[],o[28]=Le,o[29]=Oe):(Le=o[28],Oe=o[29]),e.useEffect(Le,Oe),o[30]!==pe||o[31]!==de?(Be=e=>{e!==pe&&(be(e),de.mutateAsync({companySize:e}).catch(se).finally(()=>be(null)))},o[30]=pe,o[31]=de,o[32]=Be):Be=o[32];const Ke=Be;let Ue;o[33]!==ue||o[34]!==de?(Ue=e=>{e&&e!==ue&&(we(e),de.mutateAsync({primaryIndustryId:e}).catch(oe).finally(()=>we(null)))},o[33]=ue,o[34]=de,o[35]=Ue):Ue=o[35];const Ve=Ue;let Ge;o[36]!==J||o[37]!==Ce||o[38]!==B?(Ge=async e=>{if(J)return;const t=Ce;Se(e);try{await B.mutateAsync({remove_external_participants_from_meetings:e}),Se(null)}catch(a){const e=a;r.error("Remove external participants update failed:",e),Se(t)}},o[36]=J,o[37]=Ce,o[38]=B,o[39]=Ge):Ge=o[39];const Je=Ge,{mutateAsync:Qe}=B;let Ze;o[40]!==Qe?(Ze=(e,t)=>Qe({external_send_mode:e,allowed_domains:t}),o[40]=Qe,o[41]=Ze):Ze=o[41];const He=Ze,Xe=J||de.isPending;if(E){let e,a;return o[42]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(h,{title:"Workspace Settings"}),o[42]=e):e=o[42],o[43]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex h-full flex-col",children:[e,t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto bg-gray-contio-50 p-4 pb-22",children:t.jsx(S,{testId:"workspace-sett
1ings-loading"})})]}),o[43]=a):a=o[43],a}if(D){const e=$ instanceof Error&&$.message?$.message:"Something went wrong loading your workspace settings.";let a,s,r,n;return o[44]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(h,{title:"Workspace Settings"}),o[44]=a):a=o[44],o[45]!==e?(s=t.jsx("p",{className:"text-sm text-destructive",children:e}),o[45]=e,o[46]=s):s=o[46],o[47]!==q?(r=t.jsx(i,{type:"button",color:"success",variant:"solid",onClick:()=>{q()},"data-testid":"workspace-settings-retry-button",children:"Try again"}),o[47]=q,o[48]=r):r=o[48],o[49]!==s||o[50]!==r?(n=t.jsxs("div",{className:"flex h-full flex-col",children:[a,t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto bg-gray-contio-50 p-4 pb-22",children:t.jsxs("div",{className:"w-full max-w-2xl space-y-4",role:"alert","data-testid":"workspace-settings-error",children:[s,r]})})]}),o[49]=s,o[50]=r,o[51]=n):n=o[51],n}let Ye;o[52]===Symbol.for("react.memo_cache_sentinel")?(Ye=t.jsx(h,{title:"Workspace Settings"}),o[52]=Ye):Ye=o[52];const et=Ae?"Enter workspace name":"";let tt;o[53]!==Ae||o[54]!==Re?(tt=Ae?e=>Re(e.target.value):void 0,o[53]=Ae,o[54]=Re,o[55]=tt):tt=o[55];const at=Ae?qe:void 0,st=Ae?re:void 0,ot=Xe||!Ae,rt=ge?"border-destructive":"",nt=Ae?"":"cursor-not-allowed bg-gray-50 text-gray-800";let it,lt,ct,dt;o[56]!==rt||o[57]!==nt?(it=c(rt,nt),o[56]=rt,o[57]=nt,o[58]=it):it=o[58],o[59]!==et||o[60]!==tt||o[61]!==at||o[62]!==st||o[63]!==ot||o[64]!==it||o[65]!==je?(lt=t.jsx(l,{id:"workspace-name",type:"text",placeholder:et,value:je,onChange:tt,onBlur:at,onKeyDown:st,disabled:ot,className:it}),o[59]=et,o[60]=tt,o[61]=at,o[62]=st,o[63]=ot,o[64]=it,o[65]=je,o[66]=lt):lt=o[66],o[67]!==ge?(ct=ge&&t.jsx("p",{id:"workspace-name-error",className:"text-sm text-destructive",role:"alert","data-testid":"workspace-name-error",children:ge}),o[67]=ge,o[68]=ct):ct=o[68],o[69]!==lt||o[70]!==ct?(dt=t.jsxs(b,{htmlFor:"workspace-name",label:"Workspace Name",children:[lt,ct]}),o[69]=lt,o[70]=ct,o[71]=dt):dt=o[71];const mt=Xe||!Ae;let pt;o[72]!==ke||o[73]!==Ke||o[74]!==mt?(pt=t.jsx(b,{htmlFor:"workspace-org-size",label:"Organization Size",children:t.jsx(f,{id:"workspace-org-size",selectItems:H,value:ke,onChange:Ke,placeholder:"Select organization size",disabled:mt,"aria-label":"Organization Size",className:"h-[var(--height-button-lg)] w-full"})}),o[72]=ke,o[73]=Ke,o[74]=mt,o[75]=pt):pt=o[75];const ut=Xe||!Ae;let xt,ht;o[76]!==Ve||o[77]!==_e||o[78]!==ut?(xt=t.jsx(b,{htmlFor:"workspace-industry",label:"Industry",children:t.jsx(y,{id:"workspace-industry",value:_e,onValueChange:Ve,placeholder:"Select an industry",disabled:ut})}),o[76]=Ve,o[77]=_e,o[78]=ut,o[79]=xt):xt=o[79],o[80]!==dt||o[81]!==pt||o[82]!==xt?(ht=t.jsxs("div",{className:"max-w-sm space-y-5",children:[dt,pt,xt]}),o[80]=dt,o[81]=pt,o[82]=xt,o[83]=ht):ht=o[83];const gt=Ce?"border-brand-contio-500":"border-gray-contio-200";let ft,yt;
1o[84]!==gt?(ft=c("flex max-w-sm items-center gap-4 rounded-lg border bg-white p-3 shadow-sm transition-colors",gt),o[84]=gt,o[85]=ft):ft=o[85],o[86]===Symbol.for("react.memo_cache_sentinel")?(yt=t.jsxs("div",{className:"flex-1 space-y-0",children:[t.jsx(s,{htmlFor:"remove-external-participants-switch",className:"text-md font-bold",children:"Remove external people after meetings"}),t.jsx("div",{className:"max-w-2xs text-sm text-gray-contio-600",children:"Enabling this allows external attendees to access the agenda, but not the meeting recap."})]}),o[86]=yt):yt=o[86];const bt=!Ae||J;let vt,wt;o[87]!==Je||o[88]!==Ce||o[89]!==bt?(vt=t.jsx(g,{id:"remove-external-participants-switch",checked:Ce,onCheckedChange:Je,disabled:bt,"aria-label":"Remove external people after meetings","data-testid":"remove-external-participants-switch",className:"shrink-0 data-[state=checked]:!bg-[var(--color-brand-contio-600)]"}),o[87]=Je,o[88]=Ce,o[89]=bt,o[90]=vt):vt=o[90],o[91]!==ft||o[92]!==vt?(wt=t.jsxs("div",{className:ft,children:[yt,vt]}),o[91]=ft,o[92]=vt,o[93]=wt):wt=o[93];const jt=A?.external_send_mode??"draft_only";let kt;o[94]!==A?.allowed_domains?(kt=A?.allowed_domains??[],o[94]=A?.allowed_domains,o[95]=kt):kt=o[95];const _t=!Ae;let Nt,St,Ct,zt,At,Et,It,Wt;return o[96]!==He||o[97]!==J||o[98]!==jt||o[99]!==kt||o[100]!==_t?(Nt=t.jsx(I,{className:"max-w-sm p-4",children:t.jsx(Q,{id:"workspace-external-send",mode:jt,allowedDomains:kt,isSaving:J,readOnly:_t,onSave:He})}),o[96]=He,o[97]=J,o[98]=jt,o[99]=kt,o[100]=_t,o[101]=Nt):Nt=o[101],o[102]!==Ee||o[103]!==Ae||o[104]!==Ie||o[105]!==d?.workspace?.id?(St=X.map(e=>{const{scope:a,label:s,description:o,placeholder:r}=e;return t.jsx(I,{className:"p-4",children:t.jsx(R,{id:`workspace-ai-memory-${a}`,label:s,description:o,value:Ee.data?.workspace?.[a]?.memory??"",placeholder:r,isLoading:Ee.isLoading,isUnavailable:Ee.isError,isSaving:Ie.isPending&&Ie.variables?.scope===a,readOnly:!Ae,onSave:e=>Ie.mutateAsync({scope:a,memory:e})})},`${d?.workspace?.id}-${a}`)}),o[102]=Ee,o[103]=Ae,o[104]=Ie,o[105]=d?.workspace?.id,o[106]=St):St=o[106],o[107]!==St?(Ct=t.jsx(W,{title:"AI Memory",collapsible:!0,children:t.jsx("div",{className:"max-w-sm space-y-4",children:St})}),o[107]=St,o[108]=Ct):Ct=o[108],o[109]===Symbol.for("react.memo_cache_sentinel")?(zt=["workflow_templates"],o[109]=zt):zt=o[109],o[110]!==Ae?(At=t.jsx(x,{requiredFlags:zt,children:t.jsx(U,{canEdit:Ae})}),o[110]=Ae,o[111]=At):At=o[111],o[112]!==Ae||o[113]!==z?(Et=Ae&&t.jsxs(x,{requiredFlags:["workspace_merge"],children:[L(z.data)&&t.jsx(Z,{sourceWorkspaceName:z.data?.source_workspace_name}),t.jsxs("div",{className:"flex max-w-sm items-center gap-4 roun
1ded-lg border border-gray-contio-200 bg-white p-3 shadow-sm","data-testid":"merge-workspace-row",children:[t.jsxs("div",{className:"flex-1 space-y-0",children:[t.jsx("div",{className:"text-md font-bold",children:"Merge this workspace"}),t.jsx("div",{className:"max-w-2xs text-sm text-gray-contio-600",children:"Move this workspace's people and content into another workspace. This cannot be undone."})]}),t.jsx(P,{to:"/settings/workspace/merge",className:"shrink-0 rounded-[var(--radius-button-sm)] border border-gray-contio-600 px-[var(--spacing-button-md-padding-x)] py-[var(--spacing-button-md-padding-y)] text-[length:var(--button-font-size-md)] font-bold whitespace-nowrap text-gray-contio-600 transition-colors hover:bg-gray-contio-600 hover:text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-contio-700","data-testid":"merge-workspace-link",children:"Start a merge"})]})]}),o[112]=Ae,o[113]=z,o[114]=Et):Et=o[114],o[115]!==Ae?(It=Ae&&t.jsx(x,{requiredFlags:["workspace_archive"],children:t.jsxs("div",{className:"flex max-w-sm items-center gap-4 roun
1ded-lg border border-gray-contio-200 bg-white p-3 shadow-sm","data-testid":"archive-workspace-row",children:[t.jsxs("div",{className:"flex-1 space-y-0",children:[t.jsx("div",{className:"text-md font-bold",children:"Archive"}),t.jsx("div",{className:"max-w-2xs text-sm text-gray-contio-600",children:"Export this workspace as a portable archive, or import an archive into it."})]}),t.jsx(P,{to:"/settings/workspace/archive",className:"shrink-0 rounded-[var(--radius-button-sm)] border border-gray-contio-600 px-[var(--spacing-button-md-padding-x)] py-[var(--spacing-button-md-padding-y)] text-[length:var(--button-font-size-md)] font-bold whitespace-nowrap text-gray-contio-600 transition-colors hover:bg-gray-contio-600 hover:text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-contio-700","data-testid":"archive-workspace-link",children:"Manage archives"})]})}),o[115]=Ae,o[116]=It):It=o[116],o[117]!==ht||o[118]!==wt||o[119]!==Nt||o[120]!==Ct||o[121]!==At||o[122]!==Et||o[123]!==It?(Wt=t.jsxs("div",{className:"flex h-full flex-col",children:[Ye,t.jsxs("div",{className:"min-h-0 flex-1 space-y-8 overflow-y-auto bg-gray-contio-50 p-4 pb-22",children:[ht,wt,Nt,Ct,At,Et,It]})]}),o[117]=ht,o[118]=wt,o[119]=Nt,o[120]=Ct,o[121]=At,o[122]=Et,o[123]=It,o[124]=Wt):Wt=o[124],Wt};function ee(e){r.error("Workspace name update failed:",e)}function te(){}function ae(e){r.error("Workspace name update failed:",e)}function se(e){r.error("Workspace organization size update failed:",e)}function oe(e){r.error("Workspace industry update failed:",e)}function re(e){"Enter"===e.key&&e.currentTarget.blur()}export{Y as default};

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.