1!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0.801.0-argo"}}catch(e){}}();try{e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(t=(new e.Error).stack)&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5e06ec8e-6c7e-43fe-86cd-eae713829d2d",e._sentryDebugIdIdentifier="sentry-dbid-5e06ec8e-6c7e-43fe-86cd-eae713829d2d")}catch(e){}var e,t;import{r as n,k as r}from"./2cgeiK2Dds2kPoCbQx4L.js";import{L as a,S as s,h as o,B as i,a as l,I as c,D as d,T as p,N as y,b as u}from"./DdKOPSkSoc1JCZJbHlDQ.js";import{ag as f,ah as g,ai as b,p as m,n as h,aj as w,L as C,ak as v}from"./DkhUXYYy8j3-AYS5W8Pz.js";import"./CvU4F0mFr4LFm8n_PZke.js";import"./CtuDX74FmEANn4s4gLf4.js";import"./DlcYog42HntHm6v_cXI1.js";import"./BQ6YEpTr0ORpsFu2fTWn.js";const j=n.forwardRef(({title:e,titleId:t,...r},a)=>n.createElement("svg",{width:14,height:12,viewBox:"0 0 14 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?n.createElement("title",{id:t},e):null,n.createElement("path",{d:"M0.815224 12C0.693002 12 0.581891 11.9694 0.481891 11.9083C0.381891 11.8472 0.304113 11.7667 0.248558 11.6667C0.193002 11.5667 0.162447 11.4583 0.156891 11.3417C0.151335 11.225 0.181891 11.1111 0.248558 11L6.41522 0.333333C6.48189 0.222222 6.568 0.138889 6.67356 0.0833333C6.77911 0.0277778 6.88745 0 6.99856 0C7.10967 0 7.218 0.0277778 7.32356 0.0833333C7.42911 0.138889 7.51522 0.222222 7.58189 0.333333L13.7486 11C13.8152 11.1111 13.8458 11.225 13.8402 11.3417C13.8347 11.4583 13.8041 11.5667 13.7486 11.6667C13.693 11.7667 13.6152 11.8472 13.5152 11.9083C13.4152 11.9694 13.3041 12 13.1819 12H0.815224ZM6.99856 10C7.18745 10 7.34578 9.93611 7.47356 9.80833C7.60134 9.68056 7.66522 9.52222 7.66522 9.33333C7.66522 9.14444 7.60134 8.98611 7.47356 8.85833C7.34578 8.73056 7.18745 8.66667 6.99856 8.66667C6.80967 8.66667 6.65134 8.73056 6.52356 8.85833C6.39578 8.98611 6.33189 9.14444 6.33189 9.33333C6.33189 9.52222 6.39578 9.68056 6.52356 9.80833C6.65134 9.93611 6.80967 10 6.99856 10ZM6.99856 8C7.18745 8 7.34578 7.93611 7.47356 7.80833C7.60134 7.68056 7.66522 7.52222 7.66522 7.33333V5.33333C7.66522 5.14444 7.60134 4.98611 7.47356 4.85833C7.34578 4.73056 7.18745 4.66667 6.99856 4.66667C6.80967 4.66667 6.65134 4.73056 6.52356 4.85833C6.39578 4.98611 6.33189 5.14444 6.33189 5.33333V7.33333C6.33189 7.52222 6.39578 7.68056 6.52356 7.80833C6.65134 7.93611 6.80967 8 6.99856 8Z"})));function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(t){k(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function k(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const I=e=>{let{color:t="rgb(var(--warning-6))",size:n=20,style:a={}}=e;return r.jsx(j,{style:O({color:t,fontSize:"".concat(n,"px"),width:"".concat(n,"px"),height:"".concat(n,"px")},a)})},_="_main-content-wrapper_14s7w_1",P="_main-content_14s7w_1",S="_no-api-keys-wrapper_14s7w_18",N="_api-key-item-card_14s7w_25",T="_api-key-item-card-footer_14s7w_31",D="_api-key-item-actions_14s7w_35",A=e=>{let{keyType:t,labeledValue:m,onReset:h}=e;const[w,C]=n.useState(!1),[v,j]=n.useState(!1),{isCopySuccessIconVisible:x,showCopySuccessIcon:O}=f(),k=g.has(t);return r.jsxs("div",{className:N,children:[r.jsx(a,{nsInteractionMode:o.INFORMATIONAL,nsSize:s.XL,nsSubtitle:m.description,nsSubtitleProps:{style:{font:"var(--typography-body-xs)"}},nsText:m.label,nsTextProps:{style:{font:"var(--typography-label-strong-md)"}},style:{padding:"20px 24px"}}),r.jsx(a,{className:T,nsInteractionMode:o.INFORMATIONAL,nsSize:s.XL,nsText:m.value,nsTrailSlot:r.jsxs("div",{className:D,children:[k&&r.jsx(i,{loading:w,nsIcon:"autorenew",nsImportance:c.SECONDARY,nsSize:s.MD,nsVariant:l.ICON,onClick:()=>j(!0)}),r.jsx(i,{disabled:w,nsIcon:x?"check":"content_copy",nsImportance:c.SECONDARY,nsSize:s.MD,nsVariant:l.ICON,onClick:()=>((e,t)=>{try{b(e)?O():u.error("Failed to copy ".concat(t,". Please try again."))}catch(n){u.error("Failed to copy ".concat(t,". Please try again."))}})(m.value,m.label)})]}),style:{padding:"0 24px"}}),r.jsx(d,{muiDialogContentProps:{style:{gap:16,paddingTop:"var(--padding-none)",paddingRight:"var(--padding-xl)",paddingBottom:"var(--padding-xs)",paddingLeft:"var(--padding-xl)"}}
1,nsArtworkIcon:r.jsx(I,{color:"var(--items-primary-warning)",size:40}),nsArtworkTint:p.WARNING,nsBottomActionBarProps:{nsPrimaryButtonLabel:"Reset",nsPrimaryButtonOnClick:async()=>{C(!0);try{await(null==h?void 0:h(t)),u.success("Your ".concat(m.label," has been successfully reset"))}catch(e){u.error("Failed to reset ".concat(m.label,". Please try again."))}finally{j(!1),C(!1)}},nsPrimaryButtonProps:{loading:w},nsSecondaryButtonLabel:"Cancel",nsSecondaryButtonOnClick:()=>j(!1)},nsDialogTitle:"Reset ".concat(m.label,"?"),nsHasActionBar:!0,onClose:()=>j(!1),open:v,children:r.jsx(y,{style:{font:"var(--typography-body-sm)",color:"var(--items-secondary)"},children:"This will immediately invalidate your current key. All integrations using this key will stop working until you update them with the new key."})})]})},E=()=>{var e;const{state:t}=n.useContext(m),a=null==t||null===(e=t.userBasicData)||void 0===e?void 0:e.currentAccountId,{loading:s,data:o,refresh:i}=h(async()=>{if(!a)throw new Error("No account ID available");return await w.getApiKeys({accountId:a})},{refreshDeps:[a]}),l=async e=>{await w.rotateApiKey({keyType:e,noErrorTip:!0}),i()},c=(null==o?void 0:o.keys)&&Object.keys(o.keys).length>0;return r.jsx(C,{children:r.jsx("div",{className:_,children:r.jsx(v,{isLoading:s,children:r.jsx("div",{className:P,children:c?Object.entries(o.keys).map(e=>{let[t,n]=e;return r.jsx(A,{keyType:t,labeledValue:n,onReset:l},t)}):r.jsx("div",{className:S,children:r.jsx(y,{style:{font:"var(--typography-heading-md)"},children:"No API keys found for this account."})})})})})})};export{E 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.