try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="73262045-4688-440a-a8fa-c9f039daf641",e._sentryDebugIdIdentifier="sentry-dbid-73262045-4688-440a-a8fa-c9f039daf641")}catch(e){}{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:anthropic-apps":!0})}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29375],{0x4c16bf80:(e,t,s)=>{s.d(t,{N:()=>i});var a=s(0x22102fd88),l=s(0xeefd50e9),n=s(0xb92ca58e);let i=e=>{let{isDetailedView:t,directoryServer:s,handleAddFirstPartyServer:i,handleRemoveFirstPartyServer:r,handleConnectFirstPartyServer:o,handleDisconnectFirstPartyServer:d}=e,{syncSourceType:c}=s,{enabledForOrg:u,connected:m}=(0,l.Ou)()[c]||{};return(0,a.jsx)(n.i,{handleAdd:()=>i(c),handleRemove:()=>r(c),handleConnect:()=>o(c),handleDisconnect:()=>d(c),isInstalled:u,isConnected:m,isDetailedView:t,connectedByDefault:!1})}},0x5d793911:(e,t,s)=>{s.d(t,{O:()=>n,U:()=>i});var a=s(0xfc89b4a4),l=s(0x1950735db);let n=()=>{let e=(0,a.useContext)(l.O);if(!e)throw Error("useExtensions must be used within ExtensionsProvider");return e},i=()=>{let{extensions:e,setExtensionSettings:t}=n();return async s=>{let a=e.find(e=>e.id===s);if(!a)return;let l=a.settings||{};await t(s,{...l,isEnabled:!l.isEnabled})}}},0x8f611b15:(e,t,s)=>{s.d(t,{DY:()=>d,g5:()=>o});var a=s(0x14de19ae8),l=s(0xfc89b4a4);let n="https://support.claude.com/en/articles/11725091-when-to-use-desktop-and-web-connectors",i="You understand that:\n- By adding this connector, the developer or other third parties may have access to the data submitted to or made available through the connector.\n- You are responsible for ensuring your organization has appropriate agreements to share data and have trained your workforce on how to use these features in accordance with applicable laws, legal requirements, and your internal compliance policies and procedures.\n- Anthropic is not responsible for third-party data handling.\n- Anthropic reviews connectors in its directory in accordance with its [MCP Directory Policy](".concat("https://support.claude.com/en/articles/11697096-anthropic-mcp-directory-policy",") and does not enter into BAAs with MCP Providers.\n\n[Learn more about pre-built connectors](").concat("https://support.claude.com/en/articles/11176164-pre-built-web-connectors-using-remote-mcp",") and [when to use desktop and web connectors.](").concat(n,")"),r="You understand that:\n- By adding this connector, your users, the developer, or other third parties may have access to the data submitted to or made available through the connector.\n- You are responsible for ensuring your organization has appropriate access controls, agreements to share data (if applicable), and have trained your workforce on how to use these features in accordance with applicable laws, legal requirements, and your internal compliance policies and procedures.\n- If you are connecting to internal tools and information, make sure these systems are in scope for your internal HIPAA compliance program.\n- Anthropic is not responsible for your or third-party data handling and does not evaluate these connectors or enter into Business Associate Agreements with MCP Providers.\n- Anthropic will not be liable for your use or any loss, damage, or liability arising from your workforce's use of connectors.\n\n[Learn more about custom connectors](".concat("https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp",") and [when to use desktop and web connectors.](").concat(n,")"),o=e=>"directory"===e?i:r,d=()=>{let e=(0,a.EK)("taint:hipaa_regulated"),t=(0,l.useCallback)(t=>e?[{type:"safe_for_phi",content_hash:"directory"===t?"026c416dc671602e7f2c70f3915f1b907d8bb1bf17d39abfac5db8a41cb8d118":"46d945e590f9903a485ea154b2e883af7d1bf4614c8d502c3a25c4069f3e9254"}]:[],[e]);return{isHipaaRegulated:e,createAttestation:t}}},0x92f6a5c5:(e,t,s)=>{s.d(t,{r:()=>o});var a=s(0x22102fd88),l=s(0x225bae024),n=s(0x1b370f49d),i=s(0x1a1f6dda6),r=s(0x38e6572);let o=e=>{let{onClick:t,className:s,children:o,disabled:d,...c}=e;return(0,a.jsx)(n.m,{tooltipContent:!d&&(0,a.jsx)(r.A,{defaultMessage:"Connect",id:"+vVZ/G11Zg"}),children:(0,a.jsx)(l.$,{className:(0,i.A)("!border-border-300 !rounded-lg",d?"!text-text-400":"hover:!bg-bg-200",s),disabled:d,onClick:e=>{e.stopPropagation(),null==t||t(e)},variant:"secondary",size:"icon_sm",...c,children:o})})}},0x9db246b7:(e,t,s)=>{s.d(t,{k:()=>i});var a=s(0x22102fd88),l=s(0xb92ca58e),n=s(0xe824fb1c);let i=e=>{let{isDetailedView:t,directoryServer:s,handleAddRemoteServer:i,handleRemoveRemoteServer:r,handleConnectRemoteServer:o,handleDisconnectRemoteServer:d}=e,c=(0,n.Uz)({type:"remote",directoryUuid:s.uuid})[0],u=!!c,m=!!(null==c?void 0:c.isConnected),x=!!c&&m&&!c.usedAuthentication;return(0,a.jsx)(l.i,{handleAdd:()=>i(s.uuid),handleRemove:()=>r(s.uuid),handleConnect:()=>o(s.uuid),handleDisconnect:()=>d(s.uuid),isInstalled:u,isConnected:m,isDetailedView:t,connectedByDefault:x})}},0xb92ca58e:(e,t,s)=>{s.d(t,{i:()=>x});var a=s(0x22102fd88),l=s(0x14de19ae8),n=s(0x225bae024),i=s(0x1b370f49d),r=s(0x141440998),o=s(0x88148a10),d=s(0x38e6572),c=s(0x25062734b),u=s(0x18175ce17),m=s(0x92f6a5c5);let x=e=>{let{isDetailedView:t,handleAdd:s,handleRemove:x,handleConnect:f,handleDisconnect:h,isInstalled:p,isConnected:g,connectedByDefault:b}=e,v=(0,c.vx)(),y=(0,l.mV)(),j="free"===(0,l.$b)(),w=(0,u.Kn)();if(j&&!w)return t?(0,a.jsx)(n.$,{variant:"secondary",size:"sm",className:"!rounded-lg !text-sm",href:"/upgrade?open_in_browser=1",target:"_blank",children:(0,a.jsx)(d.A,{defaultMessage:"Upgrade to connect",id:"33HAnsQE8u"})}):void 0;let N=!v&&!p;if(y&&v)if(p)return t?(0,a.jsx)(n.$,{variant:"secondary",size:"sm",className:"!rounded-lg !text-sm",onClick:x,children:(0,a.jsx)(d.A,{defaultMessage:"Remove from your team",id:"dl4er/5ODx"})}):(0,a.jsx)(r.S,{size:16,className:"transition-opacity m-2 text-accent-secondary-100"});else return t?(0,a.jsx)(n.$,{variant:"primary",size:"sm",className:"!rounded-lg !text-sm",onClick:s,children:(0,a.jsx)(d.A,{defaultMessage:"Add to your team",id:"Bq/DQi0LBe"})}):null;if(y&&!v)if(b)return t?(0,a.jsx)(n.$,{variant:"secondary",size:"sm",className:"!rounded-lg !text-sm",disabled:!0,children:(0,a.jsx)(d.A,{defaultMessage:"Connected by default",id:"VqhPBBbJWk"})}):(0,a.jsx)(r.S,{size:16,className:"transition-opacity m-2 text-text-500"});else if(g)return t?(0,a.jsx)(n.$,{variant:"secondary",size:"sm",className:"!rounded-lg !text-sm",onClick:h,children:(0,a.jsx)(d.A,{defaultMessage:"Disconnect",id:"qj1uhzynub"})}):(0,a.jsx)(r.S,{size:16,className:"transition-opacity m-2 text-text-500"});else return t?(0,a.jsx)(i.m,{tooltipContent:N?(0,a.jsx)(d.A,{defaultMessage:"Ask your admin to add this for your team",id:"q273cUNkwo"}):void 0,children:(0,a.jsx)("div",{children:(0,a.jsx)(n.$,{variant:"primary",size:"sm",className:"!rounded-lg !text-sm",disabled:N,onClick:f,children:(0,a.jsx)(d.A,{defaultMessage:"Connect",id:"+vVZ/G11Zg"})})})}):(0,a.jsx)(i.m,{tooltipContent:N?(0,a.jsx)(d.A,{defaultMessage:"Ask your admin to add this for your team",id:"q273cUNkwo"}):void 0,children:(0,a.jsx)("div",{children:(0,a.jsx)(m.r,{disabled:N,onClick:f,children:(0,a.jsx)(o.c,{size:16})})})});if(!y)if(p&&g)return t?(0,a.jsx)(n.$,{variant:"secondary",size:"sm",className:"!rounded-lg !text-sm",onClick:x,children:(0,a.jsx)(d.A,{defaultMessage:"Disconnect",id:"qj1uhzynub"})}):(0,a.jsx)(r.S,{size:16,className:"transition-opacity m-2 text-text-500"});else return t?(0,a.jsx)(n.$,{variant:"primary",size:"sm",className:"!rounded-lg !text-sm",onClick:p?f:s,children:(0,a.jsx)(d.A,{defaultMessage:"Connect",id:"+vVZ/G11Zg"})}):(0,a.jsx)(m.r,{onClick:p?f:s,children:(0,a.jsx)(o.c,{size:16})})}},0xcfcbb517:(e,t,s)=>{s.d(t,{x:()=>r});var a=s(0x2252bfeb8),l=s(0xfc89b4a4),n=s(0xd1a44e2e),i=s(0x1b910c896);let r=(null===a.Fd||void 0===a.Fd?void 0:a.Fd.getManifestCompatibilityResult)?e=>{let[t,s]=(0,l.useState)(null),[n,i]=(0,l.useState)(null);return((0,l.useEffect)(()=>{if(s(null),i(null),e){var t;null===a.Fd||void 0===a.Fd||null==(t=a.Fd.getManifestCompatibilityResult)||t.call(a.Fd,e).then(e=>{i(e)}).catch(e=>{s(e)})}},[e]),t)?{state:"error",error:t}:n?{state:"loaded",result:n}:{state:"loading"}}:e=>{var t,s;let a=c({manifest:e}),l=u(e,a.compatibility);return a.isChecking?{state:"loading"}:a.error?{state:"error",error:a.error}:{state:"loaded",result:{compatible:null!=(s=null==(t=a.compatibility)?void 0:t.compatible)&&s,requirements:l}}};var o=function(e){return e.platformMismatch="platform-mismatch",e.nodeVersionMismatch="node-version-mismatch",e.builtInNodeVersionMismatch="built-in-node-version-mismatch",e.noNodeInstalledAndNotNodeCommand="no-node-installed-and-not-node-command",e.noNodeAndNoBuiltInNode="no-node-and-no-built-in-node",e.pythonVersionMismatch="python-version-mismatch",e.noPythonInstalled="no-python-installed",e.claudeVersionMismatch="claude-version-mismatch",e.manifestVersionMismatch="manifest-version-mismatch",e}(o||{});let d=async e=>{try{var t;let s=await (null===a.Fd||void 0===a.Fd||null==(t=a.Fd.getCompatibilityCheckResult)?void 0:t.call(a.Fd));return function(e,t){var s,a,l;let r=[];if(!t)return r.push("claude-version-mismatch"),{compatible:!1,errorCodes:r};let o=function(e){var t;if(!(null==(t=e.compatibility)?void 0:t.platforms))return{compatible:!0};let s=(0,i.uV)();return s&&e.compatibility.platforms.includes(s)?{compatible:!0}:{compatible:!1,errorCodes:["platform-mismatch"]}}(e);!o.compatible&&o.errorCodes&&r.push(...o.errorCodes);let d=(s=e,a=t,(null==(l=s.compatibility)?void 0:l.claude_desktop)&&a.appVersion?(0,n.satisfies)(a.appVersion,s.compatibility.claude_desktop)?{compatible:!0}:{compatible:!1,errorCodes:["claude-version-mismatch"]}:{compatible:!0});!d.compatible&&d.errorCodes&&r.push(...d.errorCodes);let c=function(e,t){if(!t.supportedLatestMcpbManifestVersion)return{compatible:!0};let s=e.manifest_version||e.dxt_version;if(!s)return{compatible:!0};let a=parseFloat(String(s)),l=parseFloat(t.supportedLatestMcpbManifestVersion);return isNaN(a)||isNaN(l)?{compatible:!0}:a>l?{compatible:!1,errorCodes:["manifest-version-mismatch"]}:{compatible:!0}}(e,t);if(!c.compatible&&c.errorCodes&&r.push(...c.errorCodes),"node"===e.server.type){let s=function(e,t){var s,a;if("node"!==e.server.type)return{compatible:!0};let l=e.server.mcp_config.command,{builtInNodeVersion:i,nodeVersion:r}=t,o=null==(a=e.compatibility)||null==(s=a.runtimes)?void 0:s.node;if(r&&(!o||o&&(0,n.satisfies)(r,o)))return{compatible:!0};if(i){let e=l&&/^node(\.exe)?$/.test(l),t=!o||(0,n.satisfies)(i,o);return e||r?t?{compatible:!0}:{compatible:!1,errorCodes:["built-in-node-version-mismatch"]}:{compatible:!1,errorCodes:["no-node-installed-and-not-node-command"]}}return r||i?{compatible:!0}:{compatible:!1,errorCodes:["no-node-and-no-built-in-node"]}}(e,t);!s.compatible&&s.errorCodes&&r.push(...s.errorCodes)}else if("python"===e.server.type){let s=function(e,t){var s,a;if("python"!==e.server.type)return{compatible:!0};let{pythonVersion:l}=t,i=null==(a=e.compatibility)||null==(s=a.runtimes)?void 0:s.python;return l?i?(0,n.satisfies)(l,i)?{compatible:!0}:{compatible:!1,errorCodes:["python-version-mismatch"]}:{compatible:!0}:{compatible:!1,errorCodes:["no-python-installed"]}}(e,t);!s.compatible&&s.errorCodes&&r.push(...s.errorCodes)}return{compatible:0===r.length,...r.length>0&&{errorCodes:r}}}(e,s||null)}catch(e){return{compatible:!1,errorCodes:["claude-version-mismatch"]}}},c=e=>{let{manifest:t}=e,[s,a]=(0,l.useState)(null),[n,i]=(0,l.useState)(!1),[r,o]=(0,l.useState)(null),c=(0,l.useCallback)(async()=>{if(!t)return void a(null);i(!0),o(null);try{let e=await d(t);a(e)}catch(e){o(e instanceof Error?e:Error("Failed to check compatibility")),a(null)}finally{i(!1)}},[t]);return(0,l.useEffect)(()=>{t?c():(a(null),i(!1),o(null))},[t,c]),{compatibility:s,isChecking:n,error:r}},u=(e,t)=>{var s,a;let l=[],n=(0,i.uV)();if(!e||((e.manifest_version||e.dxt_version)&&l.push({name:"an update to Claude Desktop",met:!(null==t?void 0:t.errorCodes)||!t.errorCodes.includes("manifest-version-mismatch")}),!e.compatibility))return l;if(e.compatibility.platforms&&e.compatibility.platforms.length>0&&n){let s={win32:"Windows",darwin:"macOS",linux:"Linux"},a=s[n]||n,i=e.compatibility.platforms.map(e=>s[e]||e).join(", "),r=!(null==t?void 0:t.errorCodes)||!t.errorCodes.includes("platform-mismatch");l.push({name:r?a:i,met:r})}if(e.compatibility.claude_desktop&&l.push({name:"Claude Desktop ".concat(e.compatibility.claude_desktop),met:!(null==t?void 0:t.errorCodes)||!t.errorCodes.includes("claude-version-mismatch")}),"node"===e.server.type&&(null==(s=e.compatibility.runtimes)?void 0:s.node)){let s=["node-version-mismatch","no-node-installed-and-not-node-command","no-node-and-no-built-in-node","built-in-node-version-mismatch"];l.push({name:"Node.js ".concat(e.compatibility.runtimes.node),met:!(null==t?void 0:t.errorCodes)||!t.errorCodes.some(e=>s.includes(e))})}else if("node"===e.server.type){let e=["no-node-installed-and-not-node-command","no-node-and-no-built-in-node"];l.push({name:"Node.js",met:!(null==t?void 0:t.errorCodes)||!t.errorCodes.some(t=>e.includes(t))})}if("python"===e.server.type&&(null==(a=e.compatibility.runtimes)?void 0:a.python)){let s=["python-version-mismatch","no-python-installed"];l.push({name:"Python ".concat(e.compatibility.runtimes.python),met:!(null==t?void 0:t.errorCodes)||!t.errorCodes.some(e=>s.includes(e))})}else"python"===e.server.type&&l.push({name:"Python",met:!(null==t?void 0:t.errorCodes)||!t.errorCodes.includes("no-python-installed")});return l}},0x102661e8c:(e,t,s)=>{s.d(t,{X:()=>c});var a=s(0x22102fd88),l=s(0x139b5e710),n=s(0x225bae024),i=s(0x2252bfeb8),r=s(0xfc89b4a4),o=s(0x1ab0d1ca1),d=s(0x38e6572);let c=e=>{let{extension:t,size:s="normal",style:c}=e,u=(0,o.A)(),{addError:m}=(0,l.Yf)(),[x,f]=(0,r.useState)(null),[h,p]=(0,r.useState)(!0),[g,b]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(!t.id)return p(!1);try{var e;let s=await (null===i.Fd||void 0===i.Fd||null==(e=i.Fd.getIsUpdateAvailable)?void 0:e.call(i.Fd,t.id,t.manifest))||null;f(s)}catch(e){m((0,a.jsx)(d.A,{defaultMessage:"Failed to check for extension updates",id:"qmTCOIrDRY",description:"Error message when checking for extension updates fails"}),{error:e})}finally{p(!1)}})()},[t,m]);let v=async()=>{if(t.id&&x){b(!0);try{var e;await (null===i.Fd||void 0===i.Fd||null==(e=i.Fd.installDxtFromDirectory)?void 0:e.call(i.Fd,t.id,x))}catch(e){m((0,a.jsx)(d.A,{defaultMessage:"Failed to update extension",id:"II6Ozv49Lo",description:"Error message when extension update fails"}),{error:e})}finally{b(!1)}}};if(h||!x)return null;let y=u.formatMessage({defaultMessage:"Update available to v{version}. You are currently on v{currentVersion}.",id:"2Fd2dxtEBo",description:"Title for extension update button"},{version:x,currentVersion:t.manifest.version});return(0,a.jsx)(n.$,{variant:"primary",disabled:g,onClick:v,title:y,style:c,children:g?u.formatMessage({defaultMessage:"Updating...",id:"yugrR4jIsZ",description:"Button text while updating extension"}):"small"===s?u.formatMessage({defaultMessage:"Update",id:"rQoNAJyEVw",description:"Button to update extension (short version)"}):u.formatMessage({defaultMessage:"Update to {version}",id:"Wur112HVmK",description:"Button to update extension to specific version"},{version:x})})}},0x104725fb5:(e,t,s)=>{s.d(t,{H:()=>M});var a=s(0x22102fd88),l=s(0x23977865),n=s(0x1bd175d8c),i=s(0x141440998),r=s(0x5d793911),o=s(0x225bae024),d=s(0xfc89b4a4),c=s(0x38e6572),u=s(0x194bec1ed),m=s(0x8f611b15);let x=e=>{let{directoryServer:t,onAddToAllowlist:s,onRemoveFromAllowlist:l}=e,{isHipaaRegulated:n,createAttestation:i}=(0,m.DY)(),[r,x]=(0,d.useState)(!1),f=(0,d.useCallback)(()=>{t.isAllowlisted?null==l||l(t.uuid):n?x(!0):null==s||s(t.uuid)},[t,s,l,n]),h=(0,d.useCallback)(()=>{let e=i("directory");null==s||s(t.uuid,e),x(!1)},[t.uuid,s,i]),p=(0,d.useCallback)(()=>{x(!1)},[]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.$,{variant:"primary",size:"sm",onClick:f,children:t.isAllowlisted?(0,a.jsx)(c.A,{defaultMessage:"Remove from allowlist",id:"+IiLva9Ycy"}):(0,a.jsx)(c.A,{defaultMessage:"Add to your team",id:"Bq/DQi0LBe"})}),(0,a.jsx)(u.V,{isOpen:r,onClose:p,onContinue:h,serverName:t.name,connectorType:"directory"})]})};var f=s(0xf32c56dd),h=s(0x14de19ae8),p=s(0xbb84ce70),g=s(0x1b370f49d),b=s(0x2252bfeb8),v=s(0x1a1f6dda6),y=s(0x1ab0d1ca1),j=s(0xd1a44e2e),w=s(0xcfcbb517),N=s(0x1b910c896);let C=e=>{var t,s;let{directoryServer:l}=e,n=(0,y.A)(),{track:i}=(0,f.st)(),{activeOrganization:r}=(0,h.YL)(),[{installed:u,progress:m,installedVersion:x},C]=(0,d.useState)({installed:null,progress:null,installedVersion:null}),M=(0,w.x)(l.manifest),k="loaded"===M.state&&!1===M.result.compatible,F=("loaded"===M.state?M.result.requirements:[]).filter(e=>!e.met),A=null!=(s=null==r||null==(t=r.settings)?void 0:t.is_desktop_extension_allowlist_enabled)&&s,E=!!l.onDiskPath,S=A&&E,_=u&&x&&l.version&&l.onDiskPath&&j.gt(l.version,x);(0,d.useEffect)(()=>{var e;null===b.Fd||void 0===b.Fd||null==(e=b.Fd.onExtensionDownloadProgress)||e.call(b.Fd,(e,t)=>{e===l.uuid&&C(e=>({...e,installed:!1,progress:t}))})},[l.uuid]),(0,d.useEffect)(()=>{var e;C({installed:null,progress:null,installedVersion:null});let t=()=>{var e;null===b.Fd||void 0===b.Fd||null==(e=b.Fd.getInstalledExtensionsWithState)||e.call(b.Fd).then(e=>{let t=e.find(e=>e.id===l.uuid);C(e=>{var s;return{installed:!!t,progress:t?null:e.progress,installedVersion:null!=(s=null==t?void 0:t.manifest.version)?s:null}})})};return t(),null===b.Fd||void 0===b.Fd||null==(e=b.Fd.onExtensionsChanged)?void 0:e.call(b.Fd,t)},[l.uuid]);let z=(0,d.useCallback)(async()=>{var e,t,s,a,n,r,o;if(u&&!_)null===b.Fd||void 0===b.Fd||null==(e=b.Fd.deleteExtension)||e.call(b.Fd,l.uuid),C({installed:null,progress:null,installedVersion:null});else{l.onDiskPath?(null===b.Fd||void 0===b.Fd||null==(n=b.Fd.installExtensionFromPreview)||n.call(b.Fd,l.uuid,l.onDiskPath),C({installed:null,progress:null,installedVersion:null})):null===b.Fd||void 0===b.Fd||null==(r=b.Fd.installDxtFromDirectory)||r.call(b.Fd,l.uuid,null);let e=await (null===b.Fd||void 0===b.Fd||null==(t=b.Fd.getInstalledExtensionsWithState)?void 0:t.call(b.Fd)),d=(null!=(o=null==e?void 0:e.length)?o:0)+1,c=(0,N.k1)();i({event_key:"desktop_dxt_installed",extension_name:l.name,extension_author:(null==(s=l.author)?void 0:s.name)||"",extension_id:l.uuid,event_source:l.onDiskPath?"local_file":"directory",total_extensions_installed:d,app_version:c||"",extension_version:(null==(a=l.manifest)?void 0:a.version)||""})}},[l,u,_,i]);if(!1===u&&null!==m)return null;let D=null===u,P=(0,a.jsx)(o.$,{variant:"primary",size:"sm",className:(0,v.A)(null!==m&&"min-w-[8rem]","min-w-[6rem]"),onClick:z,disabled:null!==m||null===u||k||S,children:u?_?(0,a.jsx)(c.A,{defaultMessage:"Update",id:"BWpuKlRSA1"}):(0,a.jsx)(c.A,{defaultMessage:"Uninstall",id:"a8npXIgle+"}):D?(0,a.jsx)(p.j,{width:60,height:12}):(0,a.jsx)(c.A,{defaultMessage:"Install",id:"ubmFc8rrea"})});if(k&&!u||S){let e;if(S)e=n.formatMessage({defaultMessage:"This extension cannot be installed. Contact your organization owner.",id:"O3dmhm2fqZ"});else if(0===F.length)e=n.formatMessage({defaultMessage:"This extension is not compatible with your device.",id:"DyWnSo/uD3"});else if(1===F.length)e=n.formatMessage({defaultMessage:"This extension requires {requirement}.",id:"RWZ5Obf4In"},{requirement:F[0].name});else{let t=F.map(e=>e.name).join(", ");e=n.formatMessage({defaultMessage:"This extension requires: {requirements}.",id:"Tiuglra9gk"},{requirements:t})}return(0,a.jsx)(g.m,{tooltipContent:e,children:(0,a.jsx)("span",{className:"inline-block",children:P})})}return P},M=e=>{let{isDetailedView:t,directoryServer:s,isExtensionAdminView:o=!1,isAllowlistEnabled:d=!1,onAddToAllowlist:c,onRemoveFromAllowlist:u}=e,m=(0,n.V)(l.Wq),{extensions:f,isDirectoryEnabled:h}=(0,r.O)(),p=f.some(e=>e.id===s.uuid),g=!0===s.isAllowlisted;if(t)if(o&&d)return(0,a.jsx)(x,{directoryServer:s,onAddToAllowlist:c,onRemoveFromAllowlist:u});else if(m&&h)return(0,a.jsx)(C,{directoryServer:s});else return null;return(o?g:p)?(0,a.jsx)(i.S,{size:16,className:"transition-opacity m-2 text-accent-secondary-100"}):null}},0x11c200193:(e,t,s)=>{s.d(t,{Z:()=>d});var a=s(0xac309a83),l=s(0xfc89b4a4),n=s(0x156c4e43b);let i=n.Ik({servers:n.YO(n.Ik({url:n.Yj(),sensitiveDataTypes:n.YO(n.Yj())})).optional()}),r={};function o(e){return e.replace(/\/$/,"")}let d=()=>{let e=(0,a.iW)("sensitive_mcp_tools",r,i);return(0,l.useCallback)(t=>{var s;if(!t)return!1;let a=o(t);return(null!=(s=e.servers)?s:[]).some(e=>e.url&&o(e.url)===a)},[e.servers])}},0x194bec1ed:(e,t,s)=>{s.d(t,{V:()=>m});var a=s(0x22102fd88),l=s(0xb323e954),n=s(0x225bae024),i=s(0x183548b63),r=s(0xfc89b4a4),o=s(0x1ab0d1ca1),d=s(0x38e6572),c=s(0x8603234d),u=s(0x8f611b15);let m=(0,r.memo)(e=>{let{isOpen:t,onClose:s,onContinue:m,serverName:x,connectorType:f,loading:h=!1}=e,p=(0,o.A)(),[g,b]=(0,r.useState)(!1);(0,r.useEffect)(()=>{t&&b(!1)},[t,x]);let v=()=>{s(),b(!1)},y=(0,u.g5)(f),j="directory"===f?p.formatMessage({defaultMessage:"Grant Access to {serverName}",id:"QaZmSeioGe"},{serverName:x}):p.formatMessage({defaultMessage:"Grant Access to a Custom Connector",id:"WXWiETvvr+"}),w=(0,r.useMemo)(()=>({p:e=>{let{children:t}=e;return(0,a.jsx)("p",{className:"text-sm text-text-300 mb-3",children:t})},ul:e=>{let{children:t}=e;return(0,a.jsx)("ul",{className:"list-disc pl-5 space-y-2 text-sm text-text-300 mb-3",children:t})},li:e=>{let{children:t}=e;return(0,a.jsx)("li",{children:t})},a:e=>{let{href:t,children:s}=e;return(0,a.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-accent-secondary-100 hover:underline",children:s})}}),[]);return(0,a.jsx)(i.aF,{modalSize:"lg",isOpen:t,onClose:v,hasCloseButton:!0,className:"!p-8",title:j,children:(0,a.jsxs)("div",{className:"mt-5 space-y-4",children:[(0,a.jsx)(c.o,{components:w,children:y}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)("div",{className:"bg-bg-200 rounded-lg p-4",children:(0,a.jsx)(l.S,{id:"hipaa-attestation-checkbox",checked:g,onChange:e=>b(e),label:(0,a.jsx)("span",{className:"text-sm text-text-300 font-medium",children:(0,a.jsx)(d.A,{defaultMessage:"I have reviewed and accept these terms",id:"Z6yCsHDbzB"})}),align:"start",labelClassName:"!items-center"})})}),(0,a.jsxs)("div",{className:"flex justify-end mt-6 gap-3",children:[(0,a.jsx)(n.$,{variant:"secondary",size:"lg",onClick:v,disabled:h,children:(0,a.jsx)(d.A,{defaultMessage:"Cancel",id:"47FYwba+bI"})}),(0,a.jsx)(n.$,{variant:"primary",size:"lg",onClick:()=>{m()},disabled:!g,loading:h,children:(0,a.jsx)(d.A,{defaultMessage:"Continue",id:"acrOozm08x"})})]})]})})});m.displayName="HipaaAttestationModal"},0x194fcf3a1:(e,t,s)=>{s.d(t,{E:()=>n});var a=s(0x22102fd88),l=s(0x1a1f6dda6);let n=e=>{let{tag:t,className:s}=e;return t?(0,a.jsx)("div",{className:(0,l.A)("uppercase inline-flex items-center text-[0.5625rem] font-medium h-4 px-2 rounded-2xl ml-2.5 relative top-[1px] shrink-0 will-change-transform",("new chat"===t||"alpha"===t)&&"text-text-300 bg-bg-300/60",("pro"===t||"beta"===t)&&"text-accent-secondary-100 bg-accent-secondary-100/[8%]","upgrade"===t&&"border border-border-400 text-accent-secondary-000",s),children:t}):null}},0x1950735db:(e,t,s)=>{s.d(t,{O:()=>i,y:()=>r});var a=s(0x22102fd88),l=s(0x2252bfeb8),n=s(0xfc89b4a4);let i=(0,n.createContext)(void 0),r=e=>{let{children:t}=e,[s,r]=(0,n.useState)([]),[o,d]=(0,n.useState)(!0),[c,u]=(0,n.useState)(!1),[m,x]=(0,n.useState)(null),[f,h]=(0,n.useState)(!0),[p,g]=(0,n.useState)(!0),b=(0,n.useCallback)(async()=>{try{var e;d(!0),x(null);let t=await (null===l.Fd||void 0===l.Fd||null==(e=l.Fd.getInstalledExtensionsWithState)?void 0:e.call(l.Fd));t&&r(t),u(!0)}catch(e){x(e instanceof Error?e.message:"Failed to load extensions")}finally{d(!1)}},[]),v=(0,n.useCallback)(async(e,t)=>{try{var s;await (null===l.Fd||void 0===l.Fd||null==(s=l.Fd.setExtensionSettings)?void 0:s.call(l.Fd,e,t)),r(s=>s.map(s=>s.id===e?{...s,settings:{...s.settings,...t}}:s))}catch(e){x(e instanceof Error?e.message:"Failed to update extension settings"),await b()}},[b]),y=(0,n.useCallback)(async e=>{try{var t;await (null===l.Fd||void 0===l.Fd||null==(t=l.Fd.deleteExtension)?void 0:t.call(l.Fd,e)),r(t=>t.filter(t=>t.id!==e))}catch(e){x(e instanceof Error?e.message:"Failed to delete extension"),await b()}},[b]);(0,n.useEffect)(()=>{var e,t,s,a;b(),null===l.Fd||void 0===l.Fd||null==(e=l.Fd.isDirectoryEnabled)||e.call(l.Fd).then(h),null===l.Fd||void 0===l.Fd||null==(t=l.Fd.isExtensionsEnabled)||t.call(l.Fd).then(g);let n=null===l.Fd||void 0===l.Fd||null==(s=l.Fd.onExtensionsChanged)?void 0:s.call(l.Fd,()=>{b()}),i=null===l.Fd||void 0===l.Fd||null==(a=l.Fd.onExtensionSettingsChanged)?void 0:a.call(l.Fd,(e,t)=>{r(s=>s.map(s=>s.id===e?{...s,settings:{...s.settings,...t}}:s))});return()=>{null==n||n(),null==i||i()}},[b]);let j=(0,n.useCallback)(e=>s.find(t=>t.id===e),[s]),w=(0,n.useMemo)(()=>({extensions:s,isLoading:o,hasLoadedOnce:c,error:m,isDirectoryEnabled:f,isExtensionsEnabled:p,setExtensionSettings:v,deleteExtension:y,getExtensionById:j}),[y,m,s,j,f,p,o,v,c]);return(0,a.jsx)(i.Provider,{value:w,children:t})}},0x1e1f2a153:(e,t,s)=>{s.d(t,{C:()=>a.C,u:()=>a.u});var a=s(0xc459f9d1)},0x1eb0949d5:(e,t,s)=>{s.d(t,{S:()=>f});var a=s(0x22102fd88),l=s(0x139b5e710),n=s(0x2471dc42f),i=s(0x225bae024),r=s(0x2252bfeb8),o=s(0x12a3a86b6),d=s(0x1ab362a20),c=s(0x88148a10),u=s(0xfc89b4a4),m=s(0x1ab0d1ca1),x=s(0x38e6572);let f=e=>{let{manifest:t,settings:s,onSave:f,onCancel:h,className:p}=e,g=(0,m.A)(),{addError:b}=(0,l.Yf)(),[v,y]=(0,u.useState)({}),[j,w]=(0,u.useState)(!1),[N,C]=(0,u.useState)(!1),[M,k]=(0,u.useState)(!1);if((0,u.useEffect)(()=>{if(s.userConfig)y(s.userConfig);else if(t.user_config){let e={};for(let[s,a]of Object.entries(t.user_config))void 0!==a.default&&(e[s]=a.default);y(e)}},[t.user_config,s.userConfig]),!t.user_config)return null;let F=(e,t)=>{y(s=>({...s,[e]:t})),w(!0)},A=async()=>{C(!0);try{await f(v),w(!1),k(!0),setTimeout(()=>{k(!1)},1e4)}catch(e){b((0,a.jsx)(x.A,{defaultMessage:"Failed to save configuration",id:"k3HNr+oyR6",description:"Error message when extension configuration save fails"}),{error:e})}finally{C(!1)}};return(0,a.jsx)("div",{className:p,children:(0,a.jsxs)("div",{className:"break-inside-avoid",children:[Object.entries(t.user_config).map(e=>{let[t,s]=e;return(0,a.jsx)("div",{className:"mb-5",children:(0,a.jsxs)("label",{children:[(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("span",{className:"text-md",children:s.title}),s.required&&(0,a.jsx)("span",{className:"text-text-400 ml-1",children:(0,a.jsx)(x.A,{defaultMessage:"(Required)",id:"5Q3Kor4lDg",description:"Label indicating a configuration field is required"})})]}),s.description&&"boolean"!==s.type&&(0,a.jsx)("p",{className:"text-xs text-text-400 mt-2 mb-3",children:s.description}),(0,a.jsx)("div",{className:"mb-2 mt-2",children:((e,t)=>{let s=v[e],l="w-full px-3 py-2 border border-border-300/25 rounded-md text-sm text-text-100 bg-bg-100";switch(t.type){case"string":return(0,a.jsx)("input",{type:t.sensitive?"password":"text",value:s||"",onChange:t=>F(e,t.target.value),placeholder:t.description,className:l});case"number":return(0,a.jsx)("input",{type:"number",value:s||"",onChange:t=>F(e,t.target.value?Number(t.target.value):""),min:t.min,max:t.max,placeholder:t.description,className:l});case"boolean":return(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(n.j,{checked:s||!1,onChange:t=>F(e,t.target.checked)}),(0,a.jsx)("span",{className:"text-sm text-text-300",children:t.description})]});case"directory":case"file":if(!t.multiple)return(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,a.jsx)("input",{type:"text",value:s||"",onChange:t=>F(e,t.target.value),placeholder:g.formatMessage({defaultMessage:"{type} path",id:"p8XbPZF2o4",description:"Placeholder for directory or file path input"},{type:"directory"===t.type?"Directory":"File"}),className:"".concat(l," flex-1 w-auto")}),(0,a.jsx)(i.$,{variant:"secondary",onClick:async()=>{var s,a;let l="directory"===t.type?await (null===r.un||void 0===r.un||null==(s=r.un.getDirectoryPath)?void 0:s.call(r.un,!1)):await (null===r.un||void 0===r.un||null==(a=r.un.getFilePath)?void 0:a.call(r.un,!1));l&&F(e,l[0])},className:"px-3 py-1.5",children:g.formatMessage({defaultMessage:"Browse",id:"0TPgIp3K/q",description:"Button to browse for file/directory"})})]});{let n=s||[];return(0,a.jsxs)("div",{children:[n.map((s,c)=>(0,a.jsxs)("div",{className:"flex gap-2 mb-2 items-center",children:[(0,a.jsx)("input",{type:"text",value:s,onChange:t=>{let s=[...n];s[c]=t.target.value,F(e,s)},placeholder:g.formatMessage({defaultMessage:"{type} path",id:"p8XbPZF2o4",description:"Placeholder for directory or file path input"},{type:"directory"===t.type?"Directory":"File"}),className:"".concat(l," flex-1 w-auto")}),(0,a.jsx)(i.$,{variant:"ghost",size:"icon",onClick:async()=>{var s,a;let l="directory"===t.type?await (null===r.un||void 0===r.un||null==(s=r.un.getDirectoryPath)?void 0:s.call(r.un,!1)):await (null===r.un||void 0===r.un||null==(a=r.un.getFilePath)?void 0:a.call(r.un,!1));if(l){let t=[...n];t[c]=l[0],F(e,t)}},children:(0,a.jsx)(o.sj,{})}),(0,a.jsx)(i.$,{variant:"ghost",size:"icon",onClick:()=>{F(e,n.filter((e,t)=>t!==c))},children:(0,a.jsx)(d.u,{})})]},c)),(0,a.jsxs)(i.$,{variant:"secondary",onClick:()=>{F(e,[...n,""])},className:"mt-2",children:[(0,a.jsx)(c.c,{className:"mr-1.5",size:16}),g.formatMessage({defaultMessage:"Add {type}",id:"1ddlPuxY71",description:"Button to add a new path"},{type:t.type})]})]})}default:return null}})(t,s)})]})},t)}),(0,a.jsxs)("div",{className:"flex gap-3 mt-6 justify-between items-center",children:[h&&(0,a.jsx)(i.$,{variant:"secondary",onClick:h,disabled:N,children:g.formatMessage({defaultMessage:"Cancel",id:"zVjtFM8JfM",description:"Button to cancel configuration edit"})}),M&&(0,a.jsx)("span",{className:"text-sm text-accent-secondary-100",children:g.formatMessage({defaultMessage:"Changes saved",id:"jdKVJo/vQ6",description:"Message shown after configuration is saved"})}),!M&&(0,a.jsx)("div",{}),(0,a.jsx)(i.$,{variant:"primary",onClick:A,disabled:!j||N,children:g.formatMessage({defaultMessage:"Save",id:"NuymVHsb1A",description:"Button to save configuration"})})]})]})})}},0x24632911f:(e,t,s)=>{s.d(t,{u:()=>ee});var a=s(0x22102fd88),l=s(0x401a1006),n=s(0x225bae024),i=s(0x1cd2ec21c),r=s(0x22fc8d729),o=s(0x1e1f2a153),d=s(0x23977865),c=s(0x1bd175d8c),u=s(0xa6a34c14),m=s(0x18eb11a1c),x=s(0x1a1f6dda6),f=s(0xfc89b4a4),h=s(0x38e6572),p=s(0x1ab0d1ca1),g=s(0x25062734b),b=s(0x17509cc64),v=s(0x194fcf3a1),y=s(0x1037073d3),j=s(0x214c6246e),w=s(0x141440998),N=s(0xcfcbb517);let C=e=>{let{manifest:t}=e,s=(0,N.x)(t);return t&&("loaded"!==s.state||0!==s.result.requirements.length)?(0,a.jsxs)("div",{className:"py-7 border-b-0.5 border-border-300",children:[(0,a.jsx)("h4",{className:"text-sm font-medium mb-2",children:(0,a.jsx)(h.A,{defaultMessage:"Requirements",id:"T/GrW3GRjO",description:"Extension requirements section header"})}),"loading"===s.state?(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-300",children:[(0,a.jsx)(j.E,{size:16,className:"animate-spin"}),(0,a.jsx)(h.A,{defaultMessage:"Checking requirements...",id:"B3WNGMnvjq",description:"Loading state while checking extension requirements"})]}):"error"===s.state?(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-300",children:[(0,a.jsx)(j.E,{size:16,className:"animate-spin"}),(0,a.jsx)(h.A,{defaultMessage:"Error checking requirements...",id:"zwTmNQr7gL",description:"Error state while checking extension requirements"})]}):s.result.compatible?(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success-000",children:[(0,a.jsx)(w.S,{size:16,weight:"bold"}),(0,a.jsx)(h.A,{defaultMessage:"All requirements met",id:"aTEJ6YhqYE",description:"Success message when all extension requirements are satisfied"})]}):(0,a.jsx)("div",{className:"space-y-2",children:s.result.requirements.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm ".concat(e.met?"text-success-000":"text-warning-200"),children:[e.met?(0,a.jsx)(w.S,{size:16,weight:"bold"}):(0,a.jsx)(u.i,{size:16,weight:"bold"}),(0,a.jsx)("span",{children:e.name})]},t))}),"loaded"===s.state&&!s.result.compatible&&(0,a.jsx)(l.l,{className:"w-full mt-4",message:(0,a.jsx)(h.A,{defaultMessage:"This extension may not work correctly until all requirements are met.",id:"6EFoZgFJFB",description:"Warning message when extension requirements are not met"})})]}):null};var M=s(0x8603234d);let k=e=>{let{markdown:t,className:s=""}=e;return t?(0,a.jsx)("div",{className:"".concat(s," [&_ul]:list-disc [&_ul]:pl-6 [&_ul]:my-2 [&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:my-2 [&_li]:my-1 [&_p]:my-3 [&_p:first-child]:mt-0"),children:(0,a.jsx)(M.o,{className:"whitespace-pre-wrap",allowedElements:["p","br","strong","em","ul","ol","li","a","code","pre","h1","h2","h3","h4","h5","h6","blockquote"],components:{a:e=>{let{href:t,children:s}=e;if(!t||!t.startsWith("https://"))return(0,a.jsx)("span",{children:s});let l=String(s);return l===t||t.includes(l.replace(/\s/g,""))?(0,a.jsx)(r.Y,{href:t,target:"_blank",rel:"noopener noreferrer",children:s}):(0,a.jsxs)(r.Y,{href:t,target:"_blank",rel:"noopener noreferrer",children:[s," (",new URL(t).hostname,")"]})}},children:t})}):null};var F=s(0x11c200193),A=s(0x5d793911),E=s(0xe824fb1c),S=s(0x4c16bf80),_=s(0x2471dc42f),z=s(0x8f813b9c),D=s(0x2252bfeb8),P=s(0x81a5987a),V=s(0x176ac88f),q=s(0x18c2bb2d),O=s(0x4d348f95),I=s(0xd09fadb8),B=s.n(I),L=s(0x102661e8c),T=s(0x183548b63),R=s(0x1eb0949d5);let U=e=>{let{isOpen:t,onClose:s,extension:l,server:n}=e,i=!l||(0,P.OO)({manifest:l.manifest,userConfig:l.settings.userConfig}),r=(0,f.useCallback)(()=>{i||s()},[i,s]),o=(0,f.useCallback)(async e=>{var t;if(!l)return;let a={...l.settings,userConfig:e};await (null===D.Fd||void 0===D.Fd||null==(t=D.Fd.setExtensionSettings)?void 0:t.call(D.Fd,l.id,a)),(0,P.OO)({manifest:l.manifest,userConfig:e})||s()},[l,s]);return l&&t&&n?(0,a.jsx)(T.aF,{isOpen:t,onClose:r,modalSize:"lg",title:(0,a.jsxs)("div",{className:"font-ui inline-flex flex-row gap-2 items-center text-xl",children:[(0,a.jsx)(h.A,{defaultMessage:"Configure",id:"9t1iivhk67"}),(0,a.jsxs)("div",{className:"inline-flex flex-row gap-1 items-center",children:[(0,a.jsx)(y.z,{size:30,imageSize:20,type:"external",src:n.iconUrl,name:n.name}),(0,a.jsxs)("span",{className:"font-normal",children:[" ",n.name]})]})]}),children:(0,a.jsx)(R.S,{manifest:l.manifest,settings:l.settings,onSave:async e=>{await o(e)},onCancel:s})}):null},Y=e=>{let{directoryServer:t}=e,s=(0,p.A)(),{extensions:l}=(0,A.O)(),i=(0,O.useRouter)(),r=l.find(e=>e.id===t.uuid),[o,d]=(0,f.useState)(!1),c=(0,f.useCallback)(()=>{r&&i.push("/settings/desktop/extensions/".concat(r.id))},[i,r]),u=(0,A.U)(),m=(0,V.Z)(t.uuid),x=(0,V.Z)(r);(0,f.useEffect)(()=>{m===t.uuid&&!x&&r&&(0,P.OO)({manifest:r.manifest,userConfig:r.settings.userConfig})&&d(!0)},[t.uuid,x,m,r]);let[g,b]=(0,f.useState)(null);if((0,f.useEffect)(()=>{var e;null===D.Fd||void 0===D.Fd||null==(e=D.Fd.onExtensionDownloadProgress)||e.call(D.Fd,(e,s,a,l)=>{e===t.uuid&&b({progress:s,rBytes:a,tBytes:l})})},[t.uuid]),(0,f.useEffect)(()=>{b(null)},[t.uuid]),(0,f.useEffect)(()=>{r&&g&&b(null)},[g,r]),!r&&null!==g){let e=s.formatMessage({defaultMessage:"Installing...",id:"r9ELLACQn2"});return(0,a.jsx)(q.P.div,{initial:{height:0},animate:{height:"auto"},className:"overflow-hidden",children:(0,a.jsx)("div",{className:"flex items-center justify-between bg-bg-000 rounded-lg px-4 py-3 gap-4 mt-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[g.tBytes?(0,a.jsx)("span",{className:"font-medium text-text-300 text-sm",children:e}):(0,a.jsx)(z.A,{className:"text-sm",children:e}),g.tBytes?(0,a.jsxs)("span",{className:"text-text-500 text-sm",children:[B()(g.rBytes,{maximumFractionDigits:1,locale:s.locale})," / ",B()(g.tBytes,{maximumFractionDigits:1,locale:s.locale})]}):null]}),(0,a.jsx)("div",{className:"bg-bg-500 w-full h-2 rounded-full p-0.5 overflow-hidden",children:(0,a.jsx)("div",{className:"bg-accent-secondary-200 h-full rounded-full transition-width duration-500",style:{width:"".concat(g.progress,"%")}})})]})})})}return r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between bg-bg-000 rounded-lg px-4 py-3 gap-4 mt-4",children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:!r.settings.isEnabled&&(0,P.OO)({manifest:r.manifest,userConfig:r.settings.userConfig})?(0,a.jsx)("span",{className:"text-sm text-accent-secondary-100",children:s.formatMessage({defaultMessage:"This connector needs to be configured before it can be enabled.",id:"IhPSab4yuz",description:"Message shown when required config is missing"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"inline-block",onClick:()=>{u(r.id)},children:(0,a.jsx)(_.j,{checked:r.settings.isEnabled,readOnly:!0})}),(0,a.jsx)("span",{className:"text-sm font-medium",children:r.settings.isEnabled?s.formatMessage({defaultMessage:"Enabled",id:"cnxLJKBabd",description:"Extension enabled status"}):s.formatMessage({defaultMessage:"Disabled",id:"4PQSGeQCas",description:"Extension disabled status"})})]})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(L.X,{extension:r}),(0,a.jsx)(n.$,{variant:"secondary",size:"sm",onClick:c,children:(0,a.jsx)(h.A,{defaultMessage:"Configure",id:"9t1iivhk67"})})]})]}),(0,a.jsx)(U,{isOpen:o,extension:r||null,server:t,onClose:()=>{d(!1)}})]}):null};var W=s(0x104725fb5),Z=s(0x9db246b7),$=s(0x7dbd6363);let H="smooth",K=(0,f.memo)((0,f.forwardRef)((e,t)=>{let{gap:s=8,className:l,children:n,bleed:i=0,snap:r=!0}=e,o=(0,f.useRef)(null),[d,c]=(0,f.useState)(!1),[u,m]=(0,f.useState)(!1),h=(0,p.A)(),g=(0,f.useCallback)(()=>{let e=o.current;if(!e)return;let{scrollLeft:t,scrollWidth:s,clientWidth:a}=e,l=s>a;c(l&&t>1),m(l&&t{g();let e=o.current;if(!e)return;let t=new ResizeObserver(g);return t.observe(e),()=>t.disconnect()},[g,n]);let b=(0,f.useCallback)(()=>{let e=o.current;if(!e)return;let t=Array.from(e.children),s=e.scrollLeft+i,a=0;for(let e=t.length-1;e>=0;e--){let l=t[e];if(l.offsetLeft{let e=o.current;if(!e)return;let t=Array.from(e.children),s=e.scrollLeft+i,a=e.scrollWidth-e.clientWidth,l=a;for(let e of t)if(e.offsetLeft>s+1){l=Math.min(e.offsetLeft-i,a);break}e.scrollTo({left:l,behavior:H})},[i]),y=(0,f.useCallback)(()=>{g()},[g]),j=(0,f.useCallback)(e=>{"ArrowLeft"===e.key?(e.preventDefault(),b()):"ArrowRight"===e.key&&(e.preventDefault(),v())},[b,v]);return(0,a.jsxs)("div",{ref:t,className:(0,x.A)("min-w-0 flex flex-col gap-2",l),onKeyDown:j,children:[(0,a.jsx)("div",{ref:o,className:(0,x.A)("flex items-center overflow-x-auto",r&&"[&>*]:snap-start snap-x snap-mandatory"),style:{gap:s,paddingLeft:i,paddingRight:i,marginLeft:-i,marginRight:-i,scrollbarWidth:"none",...r&&{scrollPaddingLeft:i}},onScroll:y,tabIndex:0,children:n}),(d||u)&&(0,a.jsxs)("div",{className:"flex items-center gap-0",children:[(0,a.jsx)("button",{type:"button",onClick:b,disabled:!d,className:"flex items-center justify-center w-8 h-8 text-text-300 hover:text-text-100 disabled:opacity-30 disabled:pointer-events-none","aria-label":h.formatMessage({defaultMessage:"Scroll left",id:"jzFcrtq+o4"}),children:(0,a.jsx)($.CaretLeft,{size:16})}),(0,a.jsx)("button",{type:"button",onClick:v,disabled:!u,className:"flex items-center justify-center w-8 h-8 text-text-300 hover:text-text-100 disabled:opacity-30 disabled:pointer-events-none","aria-label":h.formatMessage({defaultMessage:"Scroll right",id:"+lsh8v//5g"}),children:(0,a.jsx)($.CaretRight,{size:16})})]})]})}));K.displayName="Carousel";let Q=(0,f.memo)(e=>{let{src:t,alt:s,height:l,width:n,naturalWidth:i,naturalHeight:r,borderRadius:o=8,onClick:d,className:c}=e,[u,m]=(0,f.useState)(!1),[h,g]=(0,f.useState)(!1),b=(0,p.A)(),v=null!=n?n:i&&r?i/r*l:l;if(h)return(0,a.jsxs)("div",{className:(0,x.A)("flex-shrink-0 bg-bg-300 flex flex-col items-center justify-center gap-1",c),style:{height:l,width:v,borderRadius:o},children:[(0,a.jsx)($.Warning,{size:20,className:"text-text-300"}),(0,a.jsx)("span",{className:"text-text-300 text-xs",children:b.formatMessage({defaultMessage:"Failed to load",id:"xs8uBJ7Dm7"})})]});let y=(0,a.jsxs)("div",{className:(0,x.A)("relative flex-shrink-0",c),style:{height:l,width:v},children:[!u&&(0,a.jsx)("div",{className:"absolute inset-0 bg-bg-300 animate-pulse",style:{borderRadius:o}}),(0,a.jsx)("img",{src:t,alt:s,onLoad:()=>m(!0),onError:()=>g(!0),className:(0,x.A)("w-full h-full object-cover",d&&"cursor-pointer"),style:{borderRadius:o},loading:"lazy"})]});return d?(0,a.jsx)("button",{type:"button",onClick:d,className:"flex-shrink-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-accent-secondary-100 focus-visible:ring-offset-2",style:{borderRadius:o},"aria-label":s,children:y}):y});Q.displayName="CarouselImage";var G=s(0x28db2c9a);let J=e=>{let{imageUrls:t}=e;return(null==t?void 0:t.length)?(0,a.jsx)(K,{className:"mt-7",gap:16,bleed:33,children:t.map((e,s)=>e.prompt?(0,a.jsx)(X,{prompt:e.prompt,imageUrl:e.imageUrl,isSingle:1===t.length},s):(0,a.jsx)(Q,{src:e.imageUrl,alt:"Screenshot ".concat(s+1),height:352,borderRadius:12},s))}):null},X=e=>{let{prompt:t,imageUrl:s,isSingle:l=!1}=e,[n,i]=(0,f.useState)(!1);return n?(0,a.jsx)("div",{className:"flex-shrink-0 flex flex-col items-center rounded-xl overflow-hidden bg-bg-200 px-6 pt-5 ".concat(l?"pb-[3.75rem]":"pb-5"),style:{[l?"maxHeight":"height"]:352,width:l?"100%":312},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4 min-h-0 w-full",style:{maxWidth:l?312:void 0},children:[(0,a.jsx)("div",{className:"self-end ml-11 bg-bg-400 rounded-lg px-4 py-2 text-xs text-text-000 leading-normal",children:t}),(0,a.jsx)("div",{className:"bg-bg-000 rounded-lg p-2 min-h-0 self-start flex",children:(0,a.jsx)("img",{src:s,alt:t,className:"rounded min-h-0 max-w-full object-contain object-left-top",loading:"lazy"})})]})}):(0,a.jsxs)("div",{className:"flex-shrink-0 relative",style:{height:352,width:l?"100%":312},children:[(0,a.jsx)(G.j,{height:352,width:"100%",rounded:"xl"}),(0,a.jsx)("img",{src:s,alt:t,className:"invisible absolute",onLoad:()=>i(!0)})]})},ee=e=>{let{directoryServer:t,isExtensionAdminView:s=!1,isAllowlistEnabled:l=!1,...n}=e,r=(0,c.V)(),o=(0,b.Ho)();return(0,a.jsxs)(i.r,{containerClassName:"max-h-full min-h-0",className:"max-h-full px-8 pb-10",children:[(0,a.jsx)(et,{directoryServer:t,isExtensionAdminView:s,isAllowlistEnabled:l,...n}),o&&(0,a.jsx)(J,{imageUrls:t.imageUrls}),"local"===t.type&&!s&&(0,a.jsx)(Y,{directoryServer:t}),(0,a.jsx)(es,{directoryServer:t,isExtensionAdminView:s}),"local"===t.type&&r&&!s?(0,a.jsx)(C,{manifest:t.manifest}):null,(0,a.jsx)(el,{directoryServer:t,shouldIncludeManifestName:s})]})},et=e=>{let{directoryServer:t,isExtensionAdminView:s=!1,isAllowlistEnabled:n=!1,...i}=e,r=(0,c.V)(),{isDirectoryEnabled:o}=(0,A.O)(),{iconUrl:d,name:m,oneLiner:x}=t,f=(0,F.Z)()("remote"===t.type?t.url:void 0);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex sm:flex-row flex-col gap-y-6 gap-x-4 mt-[1.125rem]",children:[(0,a.jsxs)("div",{className:"flex flex-row no-wrap gap-4 grow",children:[(0,a.jsx)(y.z,{size:60,imageSize:34,name:m,..."local"===t.type?{type:"external",src:d}:"firstParty"===t.type?{type:"syncSource",src:t.syncSourceType}:{type:"favicon",src:d}}),(0,a.jsxs)("div",{className:"flex flex-col font-ui grow sm:mt-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"text-text-100 text-2xl font-medium",children:m}),f&&(0,a.jsx)(v.E,{tag:"beta",className:"ml-0"})]}),(0,a.jsx)("p",{className:"font-base text-text-400 leading-normal",children:x})]})]}),(0,a.jsx)("div",{className:"flex items-center",children:"remote"===t.type?(0,a.jsx)(Z.k,{isDetailedView:!0,directoryServer:t,...i}):"firstParty"===t.type?(0,a.jsx)(S.N,{isDetailedView:!0,directoryServer:t,...i}):(0,a.jsx)(W.H,{isDetailedView:!0,directoryServer:t,isExtensionAdminView:s,isAllowlistEnabled:n,onAddToAllowlist:i.handleAddToAllowlist,onRemoveFromAllowlist:i.handleRemoveFromAllowlist})})]}),"local"!==t.type||r||s?null:(0,a.jsx)(l.l,{className:"mt-6 w-full",message:(0,a.jsx)(h.A,{defaultMessage:"Get Claude for Desktop to use this extension",id:"pJ3vQABZxc"}),button:{href:"https://claude.ai/download",target:"_blank",children:(0,a.jsx)(h.A,{defaultMessage:"Download",id:"5q3qC0sC3r"})}}),"local"===t.type&&t.onDiskPath?(0,a.jsx)(l.l,{variant:"danger",className:"mt-6 w-full",message:(0,a.jsx)(h.A,{defaultMessage:"Installing will grant access to everything on your computer.",id:"V/YZmv6ycC"}),icon:u.i}):null,"local"!==t.type||o?null:(0,a.jsx)(l.l,{className:"mt-6 w-full",message:(0,a.jsx)(h.A,{defaultMessage:"The Extensions Directory has been disabled on this device. Please contact your IT administrator for more information.",id:"uOwKLoFioe",description:"Message shown when viewing a local extension but the directory is disabled"})})]})},es=e=>{let{directoryServer:t,isExtensionAdminView:s=!1}=e,l=(0,p.A)(),n=(0,g.vx)(),i=(0,c.V)(),r=(0,c.V)(d.Wq),o=(0,E.Uz)({type:"remote",directoryUuid:t.uuid})[0],u="remote"===t.type&&!n&&!o,{description:m,toolNames:f,promptNames:b,author:v}=t;return(0,a.jsxs)("div",{className:"flex flex-col gap-7 py-7 border-b-0.5 border-border-300",children:[!!u&&(0,a.jsx)(ea,{children:(0,a.jsx)(h.A,{defaultMessage:"Ask your admin to add this for your team.",id:"Pf4A5vNvrs"})}),"local"===t.type&&i&&!r&&!s&&(0,a.jsx)(ea,{children:(0,a.jsx)(h.A,{defaultMessage:"To install this extension, update to the latest version of Claude Desktop",id:"B9KzONSVUz",description:"update claude for desktop prompt to install desktop extensions"})}),(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[!!m&&(0,a.jsx)(k,{className:"text-text-300 text-base",markdown:m}),!!(null==v?void 0:v.name)&&(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-text-300 text-base font-medium",children:(0,a.jsx)(h.A,{defaultMessage:"Developed by ",id:"4MPJbn/XP2",values:{a:()=>(null==v?void 0:v.url)?(0,a.jsx)("span",{className:"text-accent-secondary-000",children:(0,a.jsx)(eu,{name:v.name,url:v.url})}):v.name}})}),(0,a.jsx)("p",{className:"text-text-500 text-sm",children:"local"===t.type?(0,a.jsx)(h.A,{defaultMessage:"Only use extensions from developers you trust. Anthropic does not control which tools developers make available and cannot verify that they will work as intended or that they won't change.",id:"9/NIZHbeDd"}):(0,a.jsx)(h.A,{defaultMessage:"Only use connectors from developers you trust. Anthropic does not control which tools developers make available and cannot verify that they will work as intended or that they won't change.",id:"hqTrxTnjIg"})})]})]}),(0,a.jsx)("div",{className:"border-t-0.5 border-border-300"}),!!(f.length||b.length)&&(0,a.jsxs)("div",{className:(0,x.A)("grid gap-y-8 gap-x-4",f.length&&b.length?"grid-cols-1 sm:grid-cols-2":"grid-cols-1"),children:[!!f.length&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(er,{title:l.formatMessage({defaultMessage:"Tools",id:"nUT0LvZVOx"}),count:f.length}),(0,a.jsx)(en,{items:f})]}),!!b.length&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(er,{title:l.formatMessage({defaultMessage:"Prompts",id:"p7buKPIFPB"}),count:b.length}),(0,a.jsx)(en,{items:b})]})]})]})},ea=e=>{let{children:t}=e;return(0,a.jsx)("div",{className:"bg-bg-300 rounded-lg p-4 text-text-100 text-sm px-4 py-3",children:t})},el=e=>{var t;let{directoryServer:s,shouldIncludeManifestName:l=!1}=e,{didCopy:i,copyToClipboard:r}=(0,o.C)(),d=(0,p.A)(),{version:c,license:u,author:m,documentation:x,support:f,privacyPolicy:g}=s,b="remote"===s.type?s.url:null,v="local"===s.type&&null!=(t="privacy_policies"in s.manifest?s.manifest.privacy_policies:null)?t:[],y=v.length>0?v.map(e=>({name:d.formatMessage({defaultMessage:"Privacy Policy",id:"vx0nkZ8xpy"}),url:e})):g?[{name:d.formatMessage({defaultMessage:"Privacy Policy",id:"vx0nkZ8xpy"}),url:g}]:[],j=[...x?[{name:d.formatMessage({defaultMessage:"Documentation",id:"isGKnzG5uL"}),url:x}]:[],...f?[{name:d.formatMessage({defaultMessage:"Support",id:"HqRNN8pEq/"}),url:f}]:[],...y];return(0,a.jsxs)("div",{className:"flex flex-col gap-4 py-7",children:[(0,a.jsx)(eo,{children:(0,a.jsx)(h.A,{defaultMessage:"Details",id:"Lv0zJuL1jH"})}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[l&&"local"===s.type&&!!s.manifest.name&&(0,a.jsx)(ec,{subheading:d.formatMessage({defaultMessage:"Name",id:"HAlOn1ZsuY"}),children:s.manifest.name}),!!c&&(0,a.jsx)(ec,{subheading:d.formatMessage({defaultMessage:"Version",id:"I3b4hnFnDd"}),children:c}),!!u&&(0,a.jsx)(ec,{subheading:d.formatMessage({defaultMessage:"License",id:"HBxXD/YXNW"}),children:u}),!!(null==m?void 0:m.name)&&(0,a.jsx)(ec,{subheading:d.formatMessage({defaultMessage:"Author",id:"tWkQ2JF/jQ"}),children:m.url?(0,a.jsx)(eu,{name:m.name,url:m.url}):m.name}),!!b&&(0,a.jsx)(ec,{subheading:d.formatMessage({defaultMessage:"Connector URL",id:"CV2vjsP6Ub"}),children:(0,a.jsxs)("div",{className:"flex flex-row items-center gap-1",children:[b,(0,a.jsx)(n.$,{size:"icon_sm",variant:"ghost",className:"bg-bg-100 hover:opacity-100 -my-2",onClick:()=>void r(b),children:(0,a.jsx)(o.u,{didCopy:i})})]})}),!!j.length&&(0,a.jsx)(ec,{subheading:d.formatMessage({defaultMessage:"More info",id:"HOsSgXORHL"}),children:j.map(e=>(0,a.jsx)(eu,{name:e.name,url:e.url},e.name))})]})]})},en=e=>{var t,s;let{items:l}=e,n=f.useRef(null),i=f.useRef(null),[r,o]=(0,f.useState)(!1),[d,c]=(0,f.useState)(((null==(t=i.current)?void 0:t.offsetHeight)||0)>((null==(s=n.current)?void 0:s.offsetHeight)||0));return(0,f.useEffect)(()=>{var e,t;c(((null==(e=i.current)?void 0:e.offsetHeight)||0)>((null==(t=n.current)?void 0:t.offsetHeight)||0))},[l]),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5 items-start",children:[(0,a.jsx)("div",{ref:n,className:(0,x.A)("w-full",!r&&"max-h-[6.5rem] overflow-hidden"),children:(0,a.jsx)("div",{ref:i,className:(0,x.A)("flex flex-row gap-2.5 flex-wrap"),children:l.map(e=>(0,a.jsx)(ei,{children:e},e))})}),d&&!r&&(0,a.jsx)("button",{className:"text-text-300 hover:text-text-200 opacity-50 text-sm",onClick:()=>o(!0),children:(0,a.jsx)(h.A,{defaultMessage:"View all",id:"pFK6bJU0EM"})})]})},ei=e=>{let{children:t}=e;return(0,a.jsx)("div",{className:"inline-flex items-center h-7 rounded-full px-3 bg-bg-300 border-border-300 border-0.5 min-w-0",children:(0,a.jsx)("p",{className:"text-text-300 text-sm overflow-hidden text-ellipsis",children:t})})},er=e=>{let{count:t,title:s}=e;return(0,a.jsxs)("div",{className:"flex flex-row items-center gap-2 mb-0.5",children:[(0,a.jsx)(eo,{children:s}),(0,a.jsx)("div",{className:"flex items-center rounded text-[0.8125rem] text-text-500 h-[1.125rem] px-[0.3125rem] bg-bg-300",children:t})]})},eo=e=>{let{children:t}=e;return(0,a.jsx)("h3",{className:"text-text-100 font-medium text-base",children:t})},ed=e=>{let{children:t}=e;return(0,a.jsx)("h3",{className:"text-text-300 font-medium text-sm mb-0.5",children:t})},ec=e=>{let{subheading:t,children:s}=e;return(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(ed,{children:t}),(0,a.jsx)("div",{className:"flex flex-col gap-1 text-text-300 text-sm",children:s})]})},eu=e=>{let{name:t,url:s}=e;return(0,a.jsxs)(r.Y,{href:s,target:"_blank",className:"inline-flex items-center gap-1",children:[t,(0,a.jsx)(m.k,{size:16})]})}}}]);