@techdocs/cli 1.9.4-next.2 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(H,S,t)=>{"use strict";t.d(S,{c:()=>s});const s=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(H,S,t)=>{"use strict";t.d(S,{P:()=>x,_P:()=>a,oQ:()=>s});const s="default",a="backstage.io/view-url",x="backstage.io/edit-url",p="kubernetes.io/api-server",b="kubernetes.io/api-server-certificate-authority",h="kubernetes.io/auth-provider"},6820:(H,S,t)=>{"use strict";t.d(S,{KU:()=>p,U2:()=>b,sM:()=>x});var s=t(72348);function a(h){let d=h.indexOf(":");const m=h.indexOf("/");m!==-1&&m<d&&(d=-1);const u=d===-1?void 0:h.slice(0,d),v=m===-1?void 0:h.slice(d+1,m),g=h.slice(Math.max(d+1,m+1));if(u===""||v===""||g==="")throw new TypeError(`Entity reference "${h}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:u,namespace:v,name:g}}function x(h){return{kind:h.kind,namespace:h.metadata.namespace||s.oQ,name:h.metadata.name}}function p(h,d){if(!h)throw new Error("Entity reference must not be empty");const m=d?.defaultKind,u=d?.defaultNamespace||s.oQ;let v,g,C;if(typeof h=="string"){const O=a(h);v=O.kind??m,g=O.namespace??u,C=O.name}else v=h.kind??m,g=h.namespace??u,C=h.name;if(v)if(g){if(!C){const O=JSON.stringify(h);throw new Error(`Entity reference ${O} had missing or empty name`)}}else{const O=JSON.stringify(h);throw new Error(`Entity reference ${O} had missing or empty namespace`)}else{const O=JSON.stringify(h);throw new Error(`Entity reference ${O} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:v,namespace:g,name:C}}function b(h){let d,m,u;return"metadata"in h?(d=h.kind,m=h.metadata.namespace??s.oQ,u=h.metadata.name):(d=h.kind,m=h.namespace??s.oQ,u=h.name),`${d.toLocaleLowerCase("en-US")}:${m.toLocaleLowerCase("en-US")}/${u.toLocaleLowerCase("en-US")}`}},51372:(H,S,t)=>{"use strict";t.d(S,{fT:()=>m,jn:()=>O,nC:()=>d,sA:()=>P,vv:()=>s});const s="ownedBy",a="ownerOf",x="consumesApi",p="apiConsumedBy",b="providesApi",h="apiProvidedBy",d="dependsOn",m="dependencyOf",u="parentOf",v="childOf",g="memberOf",C="hasMember",O="partOf",P="hasPart"},17736:(H,S,t)=>{"use strict";t.d(S,{Eo:()=>s,I4:()=>x});const s="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",x="backstage.io/source-location"},78692:(H,S,t)=>{"use strict";t.d(S,{Cr:()=>h,KL:()=>b,aY:()=>p});var s=t(6820),a=t(17736);const x=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function p(d){if(typeof d!="string")throw new TypeError(`Unable to parse location ref '${d}', unexpected argument ${typeof d}`);const m=d.indexOf(":");if(m<0)throw new TypeError(`Unable to parse location ref '${d}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const u=d.substring(0,m).trim(),v=d.substring(m+1).trim();if(!u||!v)throw new TypeError(`Unable to parse location ref '${d}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(u==="http"||u==="https")throw new TypeError(`Invalid location ref '${d}', please prefix it with 'url:', e.g. 'url:${d}'`);if(x.test(v))throw new TypeError(`Invalid location ref '${d}', target is a javascript: URL`);return{type:u,target:v}}function b(d){const{type:m,target:u}=d;if(m){if(!u)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(x.test(u))throw new TypeError(`Invalid location ref '${m}:${u}', target is a javascript: URL`);return`${m}:${u}`}function h(d){const m=d.metadata?.annotations?.[a.I4]??d.metadata?.annotations?.[a.Eo];if(!m)throw new Error(`Entity '${(0,s.U2)(d)}' is missing location`);return p(m)}},77310:(H,S,t)=>{"use strict";t.d(S,{z:()=>m});var s=t(31085),a=t(10394),x=t(54917),p=t(69578),b=t(40697),h=t(25577),d=t(37916);function m(u){const{text:v,language:g,showLineNumbers:C=!1,highlightedNumbers:O,customStyle:P,showCopyCodeButton:B=!1}=u,L=(0,x.A)(),I=L.palette.type==="dark"?b.A:h.A,M=L.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,s.jsxs)(a.A,{position:"relative",children:[(0,s.jsx)(p.A,{customStyle:P,language:g,style:I,showLineNumbers:C,wrapLines:!0,lineNumberStyle:{color:L.palette.textVerySubtle},lineProps:$=>O?.includes($)?{style:{backgroundColor:M}}:{},children:v}),B&&(0,s.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,s.jsx)(d.l,{text:v})})]})}},37916:(H,S,t)=>{"use strict";t.d(S,{l:()=>g});var s=t(31085),a=t(72427),x=t(39837),p=t(29365),b=t(71677),h=t(99594),d=t(14041),m=t(36338),u=t(10315),v=t(87849);function g(C){const{t:O}=(0,v.i)(u.O),{text:P,tooltipDelay:B=1e3,tooltipText:L=O("copyTextButton.tooltipText"),"aria-label":I="Copy text"}=C,M=(0,a.gf)(x.m),[$,W]=(0,d.useState)(!1),[{error:X},z]=(0,m.A)();(0,d.useEffect)(()=>{X&&M.post(X)},[X,M]);const Y=K=>{K.stopPropagation(),W(!0),z(P)};return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(b.Ay,{id:"copy-test-tooltip",title:L,placement:"top",leaveDelay:B,onClose:()=>W(!1),open:$,children:(0,s.jsx)(p.A,{onClick:Y,"aria-label":I,children:(0,s.jsx)(h.A,{})})})})}},44186:(H,S,t)=>{"use strict";t.d(S,{p:()=>C});var s=t(31085),a=t(42899),x=t(58837),p=t(72501);const b=t.p+"static/missingAnnotation.67f79e98.svg",h=t.p+"static/noInformation.4b426325.svg",d=t.p+"static/createComponent.975d1e1e.svg",m=t.p+"static/noBuild.1715fa71.svg",u=(0,x.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),v=({missing:O})=>{const P=u();switch(O){case"field":return(0,s.jsx)("img",{src:b,className:P.generalImg,alt:"annotation is missing"});case"info":return(0,s.jsx)("img",{src:h,alt:"no Information",className:P.generalImg});case"content":return(0,s.jsx)("img",{src:d,alt:"create Component",className:P.generalImg});case"data":return(0,s.jsx)("img",{src:m,alt:"no Build",className:P.generalImg});default:return null}},g=(0,x.A)(O=>({root:{backgroundColor:O.palette.background.default,padding:O.spacing(2,0,0,0)},action:{marginTop:O.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function C(O){const{title:P,description:B,missing:L,action:I}=O,M=g();return(0,s.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:M.root,spacing:2,children:[(0,s.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,s.jsxs)(a.A,{container:!0,direction:"column",children:[(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(p.A,{variant:"h5",children:P})}),(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(p.A,{variant:"body1",children:B})}),(0,s.jsx)(a.A,{item:!0,xs:!0,className:M.action,children:I})]})}),(0,s.jsx)(a.A,{item:!0,xs:12,md:6,className:M.imageContainer,children:typeof L=="string"?(0,s.jsx)(v,{missing:L}):L.customImage})]})}},22020:(H,S,t)=>{"use strict";t.d(S,{b:()=>v});var s=t(31085),a=t(58837),x=t(58007),p=t(8109),b=t(5951),h=t(37916),d=t(88640);const m=(0,a.A)(g=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:g.spacing(2)},divider:{margin:g.spacing(2)}}),{name:"BackstageErrorPanel"}),u=({error:g,message:C,stack:O,children:P})=>{const B=m();return(0,s.jsxs)(x.A,{dense:!0,children:[(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Error",secondary:g}),(0,s.jsx)(h.l,{text:g})]}),(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Message",secondary:C}),(0,s.jsx)(h.l,{text:C})]}),O&&(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Stack Trace",secondary:O}),(0,s.jsx)(h.l,{text:O})]}),P]})};function v(g){const{title:C,error:O,defaultExpanded:P,titleFormat:B,children:L}=g;return(0,s.jsx)(d.B,{severity:"error",title:C??O.message,defaultExpanded:P,titleFormat:B,children:(0,s.jsx)(u,{error:O.name,message:O.message,stack:O.stack,children:L})})}},18956:(H,S,t)=>{"use strict";t.d(S,{m:()=>h});var s=t(31085),a=t(72501),x=t(58837),p=t(31129);const b=(0,x.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function h(m){const{isFavorite:u}=m,v=b();return(0,s.jsx)(a.A,{component:"span",className:u?v.icon:v.iconBorder,children:u?(0,s.jsx)(p.Gg,{}):(0,s.jsx)(p.KG,{})})}function d(m){const{id:u,title:v,isFavorite:g,onToggle:C,...O}=m;return _jsx(Tooltip,{id:u,title:v,children:_jsx(IconButton,{"aria-label":v,id:u,onClick:()=>C(!g),color:"inherit",...O,children:_jsx(h,{isFavorite:g})})})}},72072:(H,S,t)=>{"use strict";t.d(S,{N_:()=>Q});var s=t(31085),a=t(82266),x=t(72427),p=t(65461),b=t(93368),h=t(49203),d=t(58837),m=t(72501),u=t(53373),v=t.n(u),g=t(45250),C=t.n(g),O=t(14041),P=t(18690),B=t(73657),L=t(39330);function I(){const[J]=(0,P.AV)((0,s.jsx)(P.qh,{index:!0,element:(0,s.jsx)("div",{})}));return!J.index}const M=(0,d.A)(J=>({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",userSelect:"none",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"},externalLinkIcon:{verticalAlign:"bottom",marginLeft:J.spacing(.5)}}),{name:"Link"}),$=()=>{const ct=(0,a.n)().getSystemIcon("externalLink")||L.A,pt=M();return(0,s.jsx)(ct,{className:pt.externalLinkIcon})},W=J=>/^([a-z+.-]+):/.test(J),X=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,z=window.open;if(z&&!z.__backstage){const J=function(...pt){const yt=String(pt[0]);if(X.test(yt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return z.apply(this,pt)};J.__backstage=!0,window.open=J}const Y=()=>{try{return(0,x.gf)(p.U).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const J="http://sample.dev",ct=Y()??"/",{pathname:pt}=new URL(ct,J);return(0,g.trimEnd)(pt,"/")},dt=J=>{let ct=String(J);const pt=K(),yt=W(ct),At=ct.startsWith(pt);return!yt&&!At&&(ct=pt.concat(ct)),ct},G=J=>J instanceof Array?J.map(G).join(" ").trim():typeof J=="object"&&J?G(J?.props?.children):["string","number"].includes(typeof J)?String(J):"",Q=(0,O.forwardRef)(({onClick:J,noTrack:ct,externalLinkIcon:pt,...yt},At)=>{const Ot=M(),It=(0,b.s)(),ut=I()?dt(yt.to):yt.to,lt=G(yt.children)||ut,xt=W(ut),gt=xt&&!!/^https?:/.exec(ut);if(X.test(ut))throw new Error("Link component rejected javascript: URL as a security precaution");const bt=Rt=>{J?.(Rt),ct||It.captureEvent("click",lt,{attributes:{to:ut}})};return xt?(0,s.jsxs)(h.A,{...gt?{target:"_blank",rel:"noopener"}:{},...yt,...yt["aria-label"]?{"aria-label":`${yt["aria-label"]}, Opens in a new window`}:{},ref:At,href:ut,onClick:bt,className:v()(Ot.externalLink,yt.className),children:[yt.children,pt&&(0,s.jsx)($,{}),(0,s.jsx)(m.A,{component:"span",className:Ot.visuallyHidden,children:", Opens in a new window"})]}):(0,s.jsx)(h.A,{...yt,ref:At,component:B.N_,to:ut,onClick:bt})})},73896:(H,S,t)=>{"use strict";t.d(S,{z:()=>h});var s=t(31085),a=t(64947),x=t(14041),p=t(72072);const b=(0,x.forwardRef)((m,u)=>(0,s.jsx)(p.N_,{ref:u,...m,color:"initial"})),h=(0,x.forwardRef)((m,u)=>(0,s.jsx)(a.A,{ref:u,component:b,...m})),d=null},4650:(H,S,t)=>{"use strict";t.d(S,{h:()=>g});var s=t(31085),a=t(58837),x=t(45872),p=t(61125),b=t(14041),h=t(77310);const d=(0,a.A)(C=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${C.palette.border}`},"& th, & td":{border:`1px solid ${C.palette.border}`,padding:C.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:C.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:C.palette.background.paper},"& tr":{backgroundColor:C.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:C.palette.background.default},"& a":{color:C.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),m=(C,O)=>O?typeof O=="string"?C+O:b.Children.toArray(O.props.children).reduce(m,C):C,u=({level:C,children:O})=>{const L=b.Children.toArray(O).reduce(m,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return(0,b.createElement)(`h${C}`,{id:L},O)},v={code:({inline:C,className:O,children:P,...B})=>{const L=String(P).replace(/\n+$/,""),I=/language-(\w+)/.exec(O||"");return!C&&I?(0,s.jsx)(h.z,{language:I[1],text:L}):(0,s.jsx)("code",{className:O,...B,children:P})},h1:u,h2:u,h3:u,h4:u,h5:u,h6:u};function g(C){const{content:O,dialect:P="gfm",linkTarget:B,transformLinkUri:L,transformImageUri:I,className:M}=C,$=d();return(0,s.jsx)(x.$,{remarkPlugins:P==="gfm"?[p.A]:[],className:`${$.markdown} ${M??""}`.trim(),children:O,components:v,linkTarget:B,transformLinkUri:L,transformImageUri:I})}},68146:(H,S,t)=>{"use strict";t.d(S,{k:()=>h});var s=t(31085),a=t(10394),x=t(88951),p=t(54917),b=t(14041);function h(d){const m=(0,p.A)(),[u,v]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{const g=setTimeout(()=>v(!0),m.transitions.duration.short);return()=>clearTimeout(g)},[m.transitions.duration.short]),u?(0,s.jsx)(x.A,{...d,"data-testid":"progress"}):(0,s.jsx)(a.A,{display:"none","data-testid":"progress"})}},66917:(H,S,t)=>{"use strict";t.d(S,{w:()=>dt});var s=t(31085),a=t(10394),x=t(69076),p=t(67720),b=t(95061),h=t(41857),d=t(48543),m=t(26343),u=t(81215),v=t(87051),g=t(12398),C=t(58837),O=t(72501),P=t(92399),B=t(14041),L=t(10437);const I=(0,C.A)(G=>(0,g.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),$=()=>{const G=I();return(0,s.jsx)(L.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},W=(0,C.A)(G=>(0,g.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),z=()=>{const G=W();return(0,s.jsx)(L.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},Y=(0,v.A)(G=>(0,g.A)({root:{"label + &":{marginTop:G.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:G.palette.primary.main}},input:{borderRadius:G.shape.borderRadius,position:"relative",backgroundColor:G.palette.background.paper,border:"1px solid #ced4da",fontSize:G.typography.body1.fontSize,padding:G.spacing(1.25,3.25,1.25,1.5),transition:G.transitions.create(["border-color","box-shadow"]),"&:focus":{background:G.palette.background.paper,borderRadius:G.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(h.A),K=(0,C.A)(G=>(0,g.A)({formControl:{margin:G.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"&.Mui-focused":{color:G.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"&.Mui-focused":{color:G.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function dt(G){const{multiple:Q,items:J,label:ct,placeholder:pt,selected:yt,onChange:At,triggerReset:Ot,native:It=!1,disabled:ut=!1,margin:lt,"data-testid":xt="select"}=G,gt=K(),[bt,Rt]=(0,B.useState)(yt||(Q?[]:"")),[it,ft]=(0,B.useState)(!1);(0,B.useEffect)(()=>{Rt(Q?[]:"")},[Ot,Q]),(0,B.useEffect)(()=>{Rt(yt||(Q?[]:""))},[yt,Q]);const vt=U=>{Rt(U.target.value),At(U.target.value)},st=U=>{if(ut){U.preventDefault();return}ft(V=>Q&&!(U.target instanceof HTMLElement)?!0:!V)},Et=()=>{ft(!1)},at=U=>()=>{const V=bt.filter(rt=>rt!==U);Rt(V),At(V)};return(0,s.jsx)(a.A,{className:gt.root,children:(0,s.jsxs)(b.A,{className:gt.formControl,children:[(0,s.jsx)(d.A,{className:gt.formLabel,children:ct}),(0,s.jsxs)(u.A,{"aria-label":ct,value:bt,native:It,disabled:ut,"data-testid":xt,displayEmpty:!0,multiple:Q,margin:lt,onChange:vt,open:it,onOpen:st,onClose:Et,input:(0,s.jsx)(Y,{}),label:ct,renderValue:U=>Q&&bt.length!==0?(0,s.jsx)(a.A,{className:gt.chips,children:U.map(V=>{const rt=J.find(Ct=>Ct.value===V);return rt?(0,s.jsx)(p.A,{"data-testid":"chip",label:rt?.label,clickable:!0,deleteIcon:(0,s.jsx)(P.A,{"data-testid":"cancel-icon",onMouseDown:Ct=>Ct.stopPropagation()}),onDelete:at(V),className:gt.chip},rt?.value):!1})}):(0,s.jsx)(O.A,{children:bt.length===0?pt||"":J.find(V=>V.value===U)?.label}),IconComponent:()=>it?(0,s.jsx)(z,{}):(0,s.jsx)($,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!pt&&!Q&&(0,s.jsx)(m.A,{value:[],children:pt}),It?J&&J.map(U=>(0,s.jsx)("option",{value:U.value,children:U.label},U.value)):J&&J.map(U=>(0,s.jsxs)(m.A,{value:U.value,children:[Q&&(0,s.jsx)(x.A,{color:"primary",checked:bt.includes(U.value)||!1,className:gt.checkbox}),U.label]},U.value))]})]})})}},27586:(H,S,t)=>{"use strict";t.d(S,{Y:()=>Q});var s=t(31085),a=t(82266),x=t(72427),p=t(65461),b=t(10394),h=t(64947),d=t(93453),m=t(29365),u=t(68804),v=t(5951),g=t(26343),C=t(28233),O=t(55197),P=t(58837),B=t(72501),L=t(5893),I=t(14041),M=t(10795),$=t(31129),W=t(72072),X=t(10315),z=t(87849);const Y=(0,P.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),K=({icon:J})=>{const ct=(0,a.n)(),pt=J?ct.getSystemIcon(J)??$.NT:$.NT;return(0,s.jsx)(pt,{})},dt=({link:J})=>(0,s.jsx)(W.N_,{to:J.url,children:J.title??J.url}),G=({item:J})=>(0,s.jsxs)(g.A,{button:!1,children:[(0,s.jsx)(u.A,{children:(0,s.jsx)(K,{icon:J.icon})}),(0,s.jsx)(v.A,{primary:J.title,secondary:J.links?.reduce((ct,pt,yt)=>[...ct,yt>0&&(0,s.jsx)("br",{},yt),(0,s.jsx)(dt,{link:pt},pt.url)],[])})]});function Q(J){const{t:ct}=(0,z.i)(X.O),{title:pt,items:yt,children:At}=J,{items:Ot}=(0,M.l)(),[It,ut]=(0,I.useState)(!1),[lt,xt]=(0,I.useState)(null),gt=Y(),bt=(0,x.gf)(p.U).getOptionalConfig("app.support"),Rt=(0,L.A)(vt=>vt.breakpoints.down("sm")),it=vt=>{xt(vt.currentTarget),ut(!0)},ft=()=>{ut(!1)};return bt?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.A,{display:"flex",ml:1,children:Rt?(0,s.jsx)(m.A,{color:"primary",size:"small",onClick:it,"data-testid":"support-button","aria-label":"Support",children:(0,s.jsx)($.NT,{})}):(0,s.jsx)(h.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:it,startIcon:(0,s.jsx)($.NT,{}),children:ct("supportButton.title")})}),(0,s.jsxs)(O.Ay,{"data-testid":"support-button-popover",open:It,anchorEl:lt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ft,children:[(0,s.jsxs)(C.A,{className:gt.popoverList,autoFocusItem:!!lt,children:[pt&&(0,s.jsx)(g.A,{button:!1,alignItems:"flex-start",className:gt.menuItem,children:(0,s.jsx)(B.A,{variant:"subtitle1",children:pt})}),I.Children.map(At,(vt,st)=>(0,s.jsx)(g.A,{button:!1,alignItems:"flex-start",className:gt.menuItem,children:vt},`child-${st}`)),(yt??Ot).map((vt,st)=>(0,s.jsx)(G,{item:vt},`item-${st}`))]}),(0,s.jsx)(d.A,{children:(0,s.jsx)(h.A,{color:"primary",onClick:ft,"aria-label":"Close",children:ct("supportButton.close")})})]})]}):null}},14209:(H,S,t)=>{"use strict";t.d(S,{X:()=>st});var s=t(31085),a=t(87849),x=t(25301),p=t(10394),b=t(29365),h=t(87051),d=t(58837),m=t(54917),u=t(72501),v=t(83313),g=t(89019),C=t(62461),O=t(68887),P=t(63798),B=t(64704),L=t(6774),I=t(75625),M=t(65859),$=t(45917),W=t(5416),X=t(33494),z=t(80113),Y=t(26229),K=t(46802),dt=t(45250),G=t(14041),Q=t(10315),J=t(64947),ct=t(66917);const pt=(0,d.A)(U=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:U.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:U.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${U.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:U.spacing(2)}}}),{name:"BackstageTableFilters"}),yt=U=>{const V=pt(),{onChangeFilters:rt}=U,{t:Ct}=(0,a.i)(Q.O),[ht,Bt]=(0,G.useState)({...U.selectedFilters}),[Nt,kt]=(0,G.useState)(!1),Jt=()=>{Bt({}),kt(Wt=>!Wt)};return(0,G.useEffect)(()=>{rt(ht)},[ht,rt]),(0,s.jsxs)(p.A,{className:V.root,children:[(0,s.jsxs)(p.A,{className:V.header,children:[(0,s.jsx)(p.A,{className:V.value,children:Ct("table.filter.title")}),(0,s.jsx)(J.A,{color:"primary",onClick:Jt,children:Ct("table.filter.clearAll")})]}),(0,s.jsx)(p.A,{className:V.filters,children:U.filters?.length&&U.filters.map(Wt=>(0,s.jsx)(ct.w,{triggerReset:Nt,...Wt.element,selected:ht[Wt.element.label],onChange:Vt=>Bt({...ht,[Wt.element.label]:Vt})},Wt.element.label))})]})};var At=t(78467);function Ot(U){return(0,s.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:U.colSpan,children:(0,s.jsx)(p.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,s.jsx)(At.A,{size:"5rem"})})})})})}const It={Add:(0,G.forwardRef)((U,V)=>(0,s.jsx)(v.A,{...U,ref:V})),Check:(0,G.forwardRef)((U,V)=>(0,s.jsx)(C.A,{...U,ref:V})),Clear:(0,G.forwardRef)((U,V)=>(0,s.jsx)(B.A,{...U,ref:V})),Delete:(0,G.forwardRef)((U,V)=>(0,s.jsx)(L.A,{...U,ref:V})),DetailPanel:(0,G.forwardRef)((U,V)=>(0,s.jsx)(P.A,{...U,ref:V})),Edit:(0,G.forwardRef)((U,V)=>(0,s.jsx)(I.A,{...U,ref:V})),Export:(0,G.forwardRef)((U,V)=>(0,s.jsx)(Y.A,{...U,ref:V})),Filter:(0,G.forwardRef)((U,V)=>(0,s.jsx)(M.A,{...U,ref:V})),FirstPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(W.A,{...U,ref:V})),LastPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(X.A,{...U,ref:V})),NextPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(P.A,{...U,ref:V})),PreviousPage:(0,G.forwardRef)((U,V)=>(0,s.jsx)(O.A,{...U,ref:V})),ResetSearch:(0,G.forwardRef)((U,V)=>(0,s.jsx)(B.A,{...U,ref:V})),Search:(0,G.forwardRef)((U,V)=>(0,s.jsx)($.A,{...U,ref:V})),SortArrow:(0,G.forwardRef)((U,V)=>(0,s.jsx)(g.A,{...U,ref:V})),ThirdStateCheck:(0,G.forwardRef)((U,V)=>(0,s.jsx)(z.A,{...U,ref:V})),ViewColumn:(0,G.forwardRef)((U,V)=>(0,s.jsx)(K.A,{...U,ref:V}))};function ut(U,V){const rt=V.split(".");let Ct=U[rt[0]];for(let ht=1;ht<rt.length;++ht){if(Ct===void 0)return Ct;const Bt=rt[ht];Ct=Ct[Bt]}return Ct}const lt=(0,h.A)(U=>({header:{padding:U.spacing(1,2,1,2.5),borderTop:`1px solid ${U.palette.grey.A100}`,borderBottom:`1px solid ${U.palette.grey.A100}`,fontWeight:U.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(x.rV),xt=(0,h.A)(U=>({root:{padding:U.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:U.typography.fontWeightBold}},searchField:{paddingRight:U.spacing(2)}}),{name:"BackstageTableToolbar"})(x.Nb),gt=(0,d.A)(U=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:U.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),bt=(0,d.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Rt(U,V){return U.map(rt=>{const Ct=rt.headerStyle??{};let ht=rt.cellStyle||{};if(rt.highlight)if(Ct.color=V.palette.textContrast,typeof ht=="object")ht.fontWeight=V.typography.fontWeightBold;else{const Bt=ht;ht=(Nt,kt,Jt)=>({...Bt(Nt,kt,Jt),fontWeight:V.typography.fontWeightBold})}return{...rt,headerStyle:Ct,cellStyle:ht}})}function it(U,V){return(0,dt.transform)(U,(rt,Ct,ht)=>{(0,dt.isEqual)(Ct,V[ht])||(rt[ht]=Ct)})}const ft={search:"",filtersOpen:!1,filters:{}};function vt(U){const{toolbarRef:V,setSearch:rt,hasFilters:Ct,selectedFiltersLength:ht,toggleFilters:Bt}=U,{t:Nt}=(0,a.i)(Q.O),kt=gt(),Jt=(0,G.useCallback)(Wt=>{U.onSearchChanged(Wt),rt(Wt)},[U,rt]);return Ct?(0,s.jsxs)(p.A,{className:kt.root,children:[(0,s.jsxs)(p.A,{className:kt.root,children:[(0,s.jsx)(b.A,{onClick:Bt,"aria-label":"filter list",children:(0,s.jsx)(M.A,{})}),(0,s.jsxs)(u.A,{className:kt.title,children:[Nt("table.filter.title")," (",ht,")"]})]}),(0,s.jsx)(xt,{...U,ref:V,onSearchChanged:Jt})]}):(0,s.jsx)(xt,{...U,ref:V,onSearchChanged:Jt})}function st(U){const{data:V,columns:rt,emptyContent:Ct,options:ht,title:Bt,subtitle:Nt,localization:kt,filters:Jt,initialState:Wt,onStateChange:Vt,components:jt,isLoading:Gt,style:ce,...he}=U,{t:Kt}=(0,a.i)(Q.O),ne=bt(),le=(0,m.A)(),Ye={...ft,...Wt},[ee,on]=(0,G.useState)(Ye.filtersOpen),We=(0,G.useCallback)(()=>on(be=>!be),[on]),[Re,Ve]=(0,G.useState)(Ye.filters),[se,qe]=(0,G.useState)(Ye.search);(0,G.useEffect)(()=>{if(Vt){const be=it({search:se,filtersOpen:ee,filters:Re},ft);Vt(be)}},[se,ee,Re,Vt]);const tn=(0,G.useCallback)(be=>rt.find(Qe=>Qe.title===be)?.field,[rt]),hn=(0,G.useMemo)(()=>{if(typeof V=="function"||!Re)return V;const be=Object.values(Re);return V&&be.flat().length?V.filter(Ze=>!!Object.entries(Re).filter(([,je])=>!!je.length).every(([je,Ue])=>{const Le=ut(Ze,tn(je));return Array.isArray(Le)&&Array.isArray(Ue)?Le.some(an=>Ue.includes(an)):Array.isArray(Le)?Le.includes(Ue):Array.isArray(Ue)?Ue.includes(Le):Le===Ue})):V},[V,Re,tn]),en=Object.values(Re).flat().length,nn=!!Jt?.length,pn=(0,G.useCallback)(be=>(0,s.jsx)(vt,{setSearch:qe,hasFilters:nn,selectedFiltersLength:en,toggleFilters:We,...be}),[We,nn,en,qe]),Ke=typeof V!="function"&&V.length===0,ze=rt.length,He=(0,G.useMemo)(()=>Et({hasNoRows:Ke,emptyContent:Ct,columnCount:ze,loading:Gt}),[Ke,Ct,ze,Gt]);return(0,s.jsxs)(p.A,{className:ne.root,children:[ee&&V&&typeof V!="function"&&Jt?.length&&(0,s.jsx)(yt,{filters:at(Jt,V,rt,Kt),selectedFilters:Re,onChangeFilters:Ve}),(0,s.jsx)(x.Ay,{components:{Header:lt,Body:He,Toolbar:pn,...jt},options:ht,columns:Rt(rt,le),icons:It,title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{variant:"h5",component:"h2",children:Bt}),Nt&&(0,s.jsx)(u.A,{color:"textSecondary",variant:"body1",children:Nt})]}),data:hn,style:{width:"100%",...ce},localization:{...kt,body:{emptyDataSourceMessage:Kt("table.body.emptyDataSourceMessage"),...kt?.body},pagination:{firstTooltip:Kt("table.pagination.firstTooltip"),labelDisplayedRows:Kt("table.pagination.labelDisplayedRows"),labelRowsSelect:Kt("table.pagination.labelRowsSelect"),lastTooltip:Kt("table.pagination.lastTooltip"),nextTooltip:Kt("table.pagination.nextTooltip"),previousTooltip:Kt("table.pagination.previousTooltip"),...kt?.pagination},header:{actions:Kt("table.header.actions"),...kt?.header},toolbar:{searchPlaceholder:Kt("table.toolbar.search"),searchTooltip:Kt("table.toolbar.search"),...kt?.toolbar}},...he})]})}st.icons=Object.freeze(It);function Et({columnCount:U,emptyContent:V,hasNoRows:rt,loading:Ct}){return ht=>Ct?(0,s.jsx)(Ot,{colSpan:U}):V&&rt?(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:U,children:V})})}):(0,s.jsx)(x.C6,{...ht})}function at(U,V,rt,Ct){const ht=Nt=>{const kt=new Set,Jt=Wt=>{Wt!=null&&kt.add(Wt)};return V&&V.forEach(Wt=>{const Vt=ut(Wt,rt.find(jt=>jt.title===Nt)?.field);Array.isArray(Vt)?Vt.forEach(Jt):Jt(Vt)}),kt},Bt=Nt=>({placeholder:Ct("table.filter.placeholder"),label:Nt.column,multiple:Nt.type==="multiple-select",items:[...ht(Nt.column)].sort().map(kt=>({label:kt,value:kt}))});return U.map(Nt=>({type:Nt.type,element:Bt(Nt)}))}},88640:(H,S,t)=>{"use strict";t.d(S,{B:()=>$});var s=t(31085),a=t(268),x=t(58837),p=t(8973),b=t(29655),h=t(91567),d=t(42899),m=t(72501),u=t(9181),v=t(6924),g=t(4650);const C=(W,X)=>(X.palette.type==="light"?a.e$:a.a)(X.palette[W].light,.6),O=(W,X)=>(X.palette.type==="light"?a.a:a.e$)(X.palette[W].light,.9),P=(0,x.A)(W=>({root:{marginRight:W.spacing(1),fill:({severity:X})=>C(X,W)}})),B=({severity:W})=>{const X=P({severity:W});return(0,s.jsx)(u.A,{classes:X})},L=({severity:W})=>{const X=P({severity:W});return(0,s.jsx)(v.A,{classes:X})},I=(0,x.A)(W=>({panel:{backgroundColor:({severity:X})=>O(X,W),color:({severity:X})=>C(X,W),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:X})=>C(X,W),fontWeight:W.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:X})=>C(X,W),backgroundColor:({severity:X})=>O(X,W)},details:{width:"100%",display:"block",color:W.palette.textContrast,backgroundColor:W.palette.background.default,border:`1px solid ${W.palette.border}`,padding:W.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),M=W=>W.charAt(0).toLocaleUpperCase("en-US")+W.slice(1);function $(W){const{severity:X="warning",title:z,titleFormat:Y,message:K,children:dt,defaultExpanded:G}=W,Q=I({severity:X}),J=M(X)+(z?`: ${z}`:"");return(0,s.jsxs)(p.A,{defaultExpanded:G??!1,className:Q.panel,role:"alert",children:[(0,s.jsxs)(b.A,{expandIcon:(0,s.jsx)(L,{severity:X}),className:Q.summary,children:[(0,s.jsx)(B,{severity:X}),(0,s.jsx)(m.A,{className:Q.summaryText,variant:"subtitle1",children:Y==="markdown"?(0,s.jsx)(g.h,{content:J,className:Q.markdownContent}):J})]}),(K||dt)&&(0,s.jsx)(h.A,{children:(0,s.jsxs)(d.A,{container:!0,children:[K&&(0,s.jsx)(d.A,{item:!0,xs:12,children:(0,s.jsx)(m.A,{className:Q.message,variant:"body1",children:K})}),dt&&(0,s.jsx)(d.A,{item:!0,xs:12,className:Q.details,children:dt})]})})]})}},10795:(H,S,t)=>{"use strict";t.d(S,{l:()=>h});var s=t(72427),a=t(65461),x=t(10315),p=t(87849);const b=()=>{const{t:d}=(0,p.i)(x.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:d("supportConfig.default.title"),icon:"warning",links:[{title:d("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function h(){const u=(0,s.Q2)().get(a.U)?.getOptionalConfig("app.support"),v=b();return u?{url:u.getString("url"),items:u.getConfigArray("items").flatMap(g=>({title:g.getString("title"),icon:g.getOptionalString("icon"),links:(g.getOptionalConfigArray("links")??[]).flatMap(C=>({url:C.getString("url"),title:C.getOptionalString("title")??""}))}))}:v}},31129:(H,S,t)=>{"use strict";t.d(S,{Gg:()=>L,KG:()=>I,NT:()=>O,z9:()=>p});var s=t(31085),a=t(82266),x=t(27799);function p(M){const{id:$,Fallback:W=x.A,...X}=M,Y=(0,a.n)().getSystemIcon($)??W;return(0,s.jsx)(Y,{...X})}function b(M){return _jsx(p,{id:"brokenImage",...M})}function h(M){return _jsx(p,{id:"catalog",...M})}function d(M){return _jsx(p,{id:"chat",...M})}function m(M){return _jsx(p,{id:"dashboard",...M})}function u(M){return _jsx(p,{id:"docs",...M})}function v(M){return _jsx(p,{id:"email",...M})}function g(M){return _jsx(p,{id:"github",...M})}function C(M){return _jsx(p,{id:"group",...M})}function O(M){return(0,s.jsx)(p,{id:"help",...M})}function P(M){return _jsx(p,{id:"user",...M})}function B(M){return _jsx(p,{id:"warning",...M})}function L(M){return(0,s.jsx)(p,{id:"star",...M})}function I(M){return(0,s.jsx)(p,{id:"unstarred",...M})}},26280:(H,S,t)=>{"use strict";t.d(S,{U:()=>h});var s=t(31085),a=t(58837),x=t(53373),p=t.n(x);const b=(0,a.A)(d=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:d.spacing(3),paddingBottom:d.spacing(3),paddingLeft:d.spacing(2),paddingRight:d.spacing(2),[d.breakpoints.up("sm")]:{paddingLeft:d.spacing(3),paddingRight:d.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function h(d){const{className:m,stretch:u,noPadding:v,children:g,...C}=d,O=b();return(0,s.jsx)("article",{...C,className:p()(O.root,m,{[O.stretch]:u,[O.noPadding]:v}),children:g})}},59428:(H,S,t)=>{"use strict";t.d(S,{d:()=>u});var s=t(31085),a=t(10394),x=t(58837),p=t(72501),b=t(93285);const h=v=>(0,x.A)(g=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:g.spacing(2),textAlign:v.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:g.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),d=({title:v,className:g})=>(0,s.jsx)(p.A,{variant:"h4",component:"h2",className:g,"data-testid":"header-title",children:v}),m=({description:v,className:g})=>v?(0,s.jsx)(p.A,{variant:"body2",className:g,"data-testid":"header-description",children:v}):null;function u(v){const{description:g,title:C,titleComponent:O=void 0,children:P,descriptionComponent:B=void 0,textAlign:L="left"}=v,I=h({textAlign:L})(),M=O||(0,s.jsx)(d,{title:C,className:I.title}),$=B||(0,s.jsx)(m,{description:g,className:I.description});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.m,{title:C}),(0,s.jsxs)(a.A,{className:I.container,children:[(0,s.jsxs)(a.A,{className:I.leftItemsBox,children:[M,$]}),(0,s.jsx)(a.A,{className:I.rightItemsBox,children:P})]})]})}},12173:(H,S,t)=>{"use strict";t.d(S,{M:()=>M});var s=t(31085),a=t(42899),x=t(58837),p=t(72501),b=t(18690),h=t(72072),d=t(10795);const m=t.p+"static/mic-drop.fe3ef4d0.svg",u=(0,x.A)($=>({micDrop:{maxWidth:"60%",bottom:$.spacing(2),right:$.spacing(2),[$.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:$.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),v=()=>{const $=u();return(0,s.jsx)("img",{src:m,className:$.micDrop,alt:"Girl dropping mic from her hands"})};var g=t(14041),C=t(77310),O=t(87849),P=t(10315);const B=(0,x.A)($=>({title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function L($){const{stack:W}=$,X=B(),{t:z}=(0,O.i)(P.O),[Y,K]=(0,g.useState)(!1);return Y?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{variant:"h6",className:X.title,children:(0,s.jsx)(h.N_,{to:"#",onClick:()=>K(!1),children:z("errorPage.showLessDetails")})}),(0,s.jsx)(C.z,{text:W,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,s.jsx)(p.A,{variant:"h6",className:X.title,children:(0,s.jsx)(h.N_,{to:"#",onClick:()=>K(!0),children:z("errorPage.showMoreDetails")})})}const I=(0,x.A)($=>({container:{padding:$.spacing(8),[$.breakpoints.down("xs")]:{padding:$.spacing(2)}},title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}},subtitle:{color:$.palette.textSubtle}}),{name:"BackstageErrorPage"});function M($){const{status:W="",statusMessage:X,additionalInfo:z,supportUrl:Y,stack:K}=$,dt=I(),G=(0,b.Zp)(),Q=(0,d.l)(),{t:J}=(0,O.i)(P.O);return(0,s.jsxs)(a.A,{container:!0,className:dt.container,children:[(0,s.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,s.jsx)(p.A,{"data-testid":"error",variant:"body1",className:dt.subtitle,children:J("errorPage.subtitle",{status:W,statusMessage:X})}),(0,s.jsx)(p.A,{variant:"body1",className:dt.subtitle,children:z}),(0,s.jsx)(p.A,{variant:"h2",className:dt.title,children:J("errorPage.title")}),(0,s.jsxs)(p.A,{variant:"h6",className:dt.title,children:[(0,s.jsx)(h.N_,{to:"#","data-testid":"go-back-link",onClick:()=>G(-1),children:J("errorPage.goBack")}),"... or please"," ",(0,s.jsx)(h.N_,{to:Y||Q.url,children:"contact support"})," if you think this is a bug."]}),K&&(0,s.jsx)(L,{stack:K})]}),(0,s.jsx)(v,{})]})}},69814:(H,S,t)=>{"use strict";t.d(S,{Y:()=>G});var s=t(31085),a=t(72427),x=t(65461),p=t(10394),b=t(42899),h=t(58837),d=t(71677),m=t(72501),u=t(93285),v=t(72072),g=t(45634),C=t(58007),O=t(8109),P=t(55197),B=t(87051),L=t(14041);const I=(0,B.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(m.A),M=(0,B.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(p.A),$=(0,B.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(p.A);function W(Q){const{children:J,...ct}=Q,[pt,yt]=(0,L.useState)(null),At=L.Children.toArray(J),[Ot,It,...ut]=At,lt=ut.length?ut.pop():At[At.length-1],xt=At.length>3,gt=it=>{yt(it.currentTarget)},bt=()=>{yt(null)},Rt=!!pt;return(0,s.jsxs)(L.Fragment,{children:[(0,s.jsxs)(g.A,{"aria-label":"breadcrumb",...ct,children:[At.length>1&&(0,s.jsx)(M,{clone:!0,children:Ot}),At.length>2&&(0,s.jsx)(M,{clone:!0,children:It}),xt&&(0,s.jsx)(I,{onClick:gt,children:"..."}),(0,s.jsx)($,{children:lt})]}),(0,s.jsx)(P.Ay,{open:Rt,anchorEl:pt,onClose:bt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,s.jsx)(C.A,{children:ut.map((it,ft)=>(0,s.jsx)(O.A,{button:!0,children:(0,s.jsx)(M,{clone:!0,children:it})},ft))})})]})}var X=t(73524);const z=(0,h.A)(Q=>({header:{gridArea:"pageHeader",padding:Q.spacing(3),width:"100%",boxShadow:Q.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:Q.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[Q.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:Q.page.fontColor,wordBreak:"break-word",fontSize:Q.typography.h3.fontSize,marginBottom:0},subtitle:{color:Q.page.fontColor,opacity:.8,display:"inline-block",marginTop:Q.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:Q.spacing(1),color:Q.page.fontColor},breadcrumb:{color:Q.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-Q.spacing(.3),marginBottom:Q.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-Q.spacing(.3),marginBottom:Q.spacing(.3)}}),{name:"BackstageHeader"}),Y=({type:Q,typeLink:J,classes:ct,pageTitle:pt})=>Q?J?(0,s.jsxs)(W,{className:ct.breadcrumb,children:[(0,s.jsx)(v.N_,{to:J,children:Q}),(0,s.jsx)(m.A,{children:pt})]}):(0,s.jsx)(m.A,{className:ct.type,children:Q}):null,K=({pageTitle:Q,classes:J,tooltip:ct})=>{const{contentRef:pt}=(0,X.H)(),yt=(0,s.jsx)(m.A,{ref:pt,tabIndex:-1,className:J.title,variant:"h1",children:Q});return ct?(0,s.jsx)(d.Ay,{title:ct,placement:"top-start",children:yt}):yt},dt=({classes:Q,subtitle:J})=>J?typeof J!="string"?(0,s.jsx)(s.Fragment,{children:J}):(0,s.jsx)(m.A,{className:Q.subtitle,variant:"subtitle2",component:"span",children:J}):null;function G(Q){const{children:J,pageTitleOverride:ct,style:pt,subtitle:yt,title:At,tooltip:Ot,type:It,typeLink:ut}=Q,lt=z(),gt=(0,a.gf)(x.U).getOptionalString("app.title")||"Backstage",bt=ct||At,Rt=At||ct,it=`${bt} | %s | ${gt}`,ft=`${bt} | ${gt}`;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.m,{titleTemplate:it,defaultTitle:ft}),(0,s.jsxs)("header",{style:pt,className:lt.header,children:[(0,s.jsxs)(p.A,{className:lt.leftItemsBox,children:[(0,s.jsx)(Y,{classes:lt,type:It,typeLink:ut,pageTitle:Rt}),(0,s.jsx)(K,{classes:lt,pageTitle:Rt,tooltip:Ot}),(0,s.jsx)(dt,{classes:lt,subtitle:yt})]}),(0,s.jsx)(b.A,{container:!0,className:lt.rightItemsBox,spacing:4,children:J})]})]})}},24504:(H,S,t)=>{"use strict";t.d(S,{Y:()=>d});var s=t(31085),a=t(58837),x=t(50868),p=t(53373),b=t.n(p);const h=(0,a.A)(m=>({root:{display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",overflowY:"auto",height:"100vh",[m.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function d(m){const{themeId:u,className:v,children:g}=m,C=h();return(0,s.jsx)(x.A,{theme:O=>({...O,page:O.getPageTheme({themeId:u})}),children:(0,s.jsx)("main",{className:b()(C.root,v),children:g})})}},27155:(H,S,t)=>{"use strict";t.d(S,{d:()=>p});var s=t(31085),a=t(69814),x=t(24504);function p(b){const{themeId:h,children:d,...m}=b;return(0,s.jsxs)(x.Y,{themeId:h,children:[(0,s.jsx)(a.Y,{...m}),d]})}},73524:(H,S,t)=>{"use strict";t.d(S,{G:()=>C,H:()=>O});var s=t(31085),a=t(10394),x=t(58837),p=t(5893),b=t(14041),h=t(72664),d=function(P){return P.SIDEBAR_PIN_STATE="sidebarPinState",P}(d||{});const m={getSidebarPinState(){let P;try{P=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!P},setSidebarPinState(P){return window.localStorage.setItem("sidebarPinState",JSON.stringify(P))}};var u=t(34435);const v=(0,x.A)(P=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[P.breakpoints.up("sm")]:{paddingLeft:B=>B.isPinned?B.sidebarConfig.drawerWidthOpen:B.sidebarConfig.drawerWidthClosed},[P.breakpoints.down("xs")]:{paddingBottom:B=>B.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),g=(0,b.createContext)({content:{contentRef:void 0}});function C(P){const[B,L]=(0,b.useState)(()=>m.getSidebarPinState()),{sidebarConfig:I}=(0,b.useContext)(h.yY),M=(0,b.useRef)(null),$=(0,b.useMemo)(()=>({content:{contentRef:M}}),[M]);(0,b.useEffect)(()=>{m.setSidebarPinState(B)},[B]);const W=(0,p.A)(Y=>Y.breakpoints.down("xs"),{noSsr:!0}),X=()=>L(!B),z=v({isPinned:B,sidebarConfig:I});return(0,s.jsx)(u.qj,{value:{isPinned:B,toggleSidebarPinState:X,isMobile:W},children:(0,s.jsx)(g.Provider,{value:$,children:(0,s.jsx)(a.A,{className:z.root,children:P.children})})})}function O(){const{content:P}=(0,b.useContext)(g);return{focusContent:(0,b.useCallback)(()=>{P?.contentRef?.current?.focus()},[P]),contentRef:P?.contentRef}}},34435:(H,S,t)=>{"use strict";t.d(S,{Ut:()=>u,qj:()=>m});var s=t(31085),a=t(43836),x=t(10602),p=t(14041);const b={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},h=(0,p.createContext)(b),d=(0,a.tK)("sidebar-pin-state-context");function m(v){const{children:g,value:C}=v;return(0,s.jsx)(h.Provider,{value:C,children:(0,s.jsx)(d.Provider,{value:(0,x.B)({1:C}),children:g})})}const u=()=>{const v=(0,p.useContext)(d),g=(0,p.useContext)(h);if(v===void 0)return g||b;const C=v.atVersion(1);if(C===void 0)throw new Error("No context found for version 1.");return C}},72664:(H,S,t)=>{"use strict";t.d(S,{Rv:()=>h,U1:()=>g,hC:()=>b,i8:()=>m,yY:()=>v});var s=t(14041);const a=72,x=24,p=18,b={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-x*2,iconPadding:x,selectedIndicatorWidth:3,userBadgePadding:p,userBadgeDiameter:a-p*2,mobileSidebarHeight:56},h=C=>({...b,...C,iconContainerWidth:b.drawerWidthClosed,iconSize:b.drawerWidthClosed-b.iconPadding*2,userBadgeDiameter:b.drawerWidthClosed-b.userBadgePadding*2}),d={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:b.defaultOpenDelayMs+200},m=C=>({...d,...C}),u="@backstage/core/sidebar-intro-dismissed",v=(0,s.createContext)({sidebarConfig:b,submenuConfig:d}),g=(0,s.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(H,S,t)=>{"use strict";t.d(S,{O:()=>a});var s=t(93184);const a=(0,s.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
2
2
  This selection will not be stored.`,userId:"User ID",tokenInvalid:"Token is not a valid OpenID Connect JWT Token",continue:"Continue",idToken:"ID Token (optional)"},guestProvider:{title:"Guest",subtitle:`Enter as a Guest User.
3
- You will not have a verified identity, meaning some features might be unavailable.`,enter:"Enter"}},skipToContent:"Skip to content",copyTextButton:{tooltipText:"Text copied to clipboard"},simpleStepper:{reset:"Reset",finish:"Finish",next:"Next",skip:"Skip",back:"Back"},errorPage:{subtitle:"ERROR {{status}}: {{statusMessage}}",title:"Looks like someone dropped the mic!",goBack:"Go back",showMoreDetails:"Show more details",showLessDetails:"Show less details"},emptyState:{missingAnnotation:{title:"Missing Annotation",actionTitle:"Add the annotation to your component YAML as shown in the highlighted example below:",readMore:"Read more"}},supportConfig:{default:{title:"Support Not Configured",linkTitle:"Add `app.support` config key"}},errorBoundary:{title:"Please contact {{slackChannel}} for help."},oauthRequestDialog:{title:"Login Required",authRedirectTitle:"This will trigger a http redirect to OAuth Login.",login:"Log in",rejectAll:"Reject All"},supportButton:{title:"Support",close:"Close"},table:{filter:{title:"Filters",clearAll:"Clear all",placeholder:"All results"},body:{emptyDataSourceMessage:"No records to display"},pagination:{firstTooltip:"First Page",labelDisplayedRows:"{from}-{to} of {count}",labelRowsSelect:"rows",lastTooltip:"Last Page",nextTooltip:"Next Page",previousTooltip:"Previous Page"},toolbar:{search:"Filter"},header:{actions:"Actions"}},alertDisplay:{message_one:"({{ count }} newer message)",message_other:"({{ count }} newer messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."}}})},25862:(H,S,t)=>{"use strict";t.d(S,{Ig:()=>d,pn:()=>h});var s=t(31085),a=t(43836),x=t(10602),p=t(14041);const b=(0,a.tK)("analytics-context"),h=()=>{const u=(0,p.useContext)(b);if(u===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const v=u.atVersion(1);if(v===void 0)throw new Error("No context found for version 1.");return v},d=u=>{const{attributes:v,children:g}=u,O={...h(),...v},P=(0,x.B)({1:O});return(0,s.jsx)(b.Provider,{value:P,children:g})};function m(u,v){const g=C=>_jsx(d,{attributes:v,children:_jsx(u,{...C})});return g.displayName=`WithAnalyticsContext(${u.displayName||u.name||"Component"})`,g}},67237:(H,S,t)=>{"use strict";t.d(S,{J:()=>p,t:()=>x});var s=t(63544);const a=(0,s.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),x="_ROUTABLE-EXTENSION-RENDERED";class p{analyticsApi;context;constructor(h,d={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=d,a.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{a.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender}),a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),a.beforeUnloadRegistered=!0)}setContext(h){this.context=h}captureEvent(h,d,{value:m,attributes:u}={}){const{_routeNodeType:v,...g}=this.context;if(h===x){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...g,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(C){console.warn("Error during analytics event capture. %o",C)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&v==="gathered"&&g.pluginId==="root"){a.mostRecentGatheredNavigation={action:h,subject:d,value:m,attributes:u,context:g};return}try{this.analyticsApi.captureEvent({action:h,subject:d,value:m,attributes:u,context:g})}catch(C){console.warn("Error during analytics event capture. %o",C)}}}},93368:(H,S,t)=>{"use strict";t.d(S,{s:()=>d});var s=t(25862),a=t(72427),x=t(99303),p=t(14041),b=t(67237);function h(){try{return(0,a.gf)(x.c)}catch{return{captureEvent:()=>{}}}}function d(){const m=(0,p.useRef)(null),u=(0,s.pn)(),v=h();function g(){return m.current===null&&(m.current=new b.J(v)),m.current}const C=g();return C.setContext(u),C}},36017:(H,S,t)=>{"use strict";t.d(S,{k:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.alert"})},99303:(H,S,t)=>{"use strict";t.d(S,{c:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.analytics"})},65461:(H,S,t)=>{"use strict";t.d(S,{U:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.config"})},57405:(H,S,t)=>{"use strict";t.d(S,{I:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.discovery"})},39837:(H,S,t)=>{"use strict";t.d(S,{m:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.error"})},63636:(H,S,t)=>{"use strict";t.d(S,{B:()=>x,S:()=>a});var s=t(55309),a=function(p){return p[p.None=0]="None",p[p.Active=1]="Active",p}({});const x=(0,s.y)({id:"core.featureflags"})},70795:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.fetch"})},16009:(H,S,t)=>{"use strict";t.d(S,{K:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.identity"})},56038:(H,S,t)=>{"use strict";t.d(S,{J:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.translation"})},55309:(H,S,t)=>{"use strict";t.d(S,{y:()=>a});class s{config;constructor(p){if(this.config=p,!p.id.split(".").flatMap(h=>h.split("-")).every(h=>h.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${p.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function a(x){return new s(x)}},12935:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(a,x){return"id"in a?{api:a,deps:{},factory:()=>x}:a}},72427:(H,S,t)=>{"use strict";t.d(S,{Q2:()=>p,gf:()=>b});var s=t(31085),a=t(43836),x=t(97142);function p(){const d=(0,a.qO)("api-context");if(!d)throw new x.EH("API context is not available");const m=d.atVersion(1);if(!m)throw new x.EH("ApiContext v1 not available");return m}function b(d){const u=p().get(d);if(!u)throw new x.EH(`No implementation available for ${d}`);return u}function h(d){return function(u){const v=C=>{const O=p(),P={};for(const B in d)if(d.hasOwnProperty(B)){const L=d[B],I=O.get(L);if(!I)throw new NotImplementedError(`No implementation available for ${L}`);P[B]=I}return _jsx(u,{...C,...P})},g=u.displayName||u.name||"Component";return v.displayName=`withApis(${g})`,v}}},82266:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(43836);const a=()=>{const x=(0,s.qO)("app-context");if(!x)throw new Error("App context is not available");const p=x.atVersion(1);if(!p)throw new Error("AppContext v1 not available");return p}},19402:(H,S,t)=>{"use strict";t.d(S,{E:()=>b,h:()=>p});var s=t(63544);const a=(0,s.Q)("component-data-store",()=>new WeakMap),x="__backstage_data";function p(h,d,m){const u=h;let v=u[x]??a.get(h);if(v||(v={map:new Map},Object.defineProperty(u,x,{enumerable:!1,configurable:!0,writable:!1,value:v}),a.set(h,v)),v.map.has(d)){const g=h.displayName||h.name;throw new Error(`Attempted to attach duplicate data "${d}" to component "${g}"`)}v.map.set(d,m)}function b(h,d){if(!h)return;const m=h.type;if(!m)return;const u=m[x]??a.get(m);if(u)return u.map.get(d)}},88758:(H,S,t)=>{"use strict";t.d(S,{NC:()=>C,zZ:()=>O,QJ:()=>g});var s=t(31085),a=t(14041),x=t(93368),p=t(25862),b=t(82266),h=t(9222),d=t(19402);class m extends a.Component{static getDerivedStateFromError(B){return{error:B}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:B}=this.state,{app:L,plugin:I}=this.props,{ErrorBoundaryFallback:M}=L.getComponents();return B?(0,s.jsx)(M,{error:B,resetError:this.handleErrorReset,plugin:I}):this.props.children}}var u=t(67237),v=t(97142);function g(P){const{component:B,mountPoint:L,name:I}=P;return O({component:{lazy:()=>B().then(M=>{const $=X=>{const z=(0,x.s)();try{(0,h.S)(L)}catch(Y){if(typeof Y=="object"&&Y!==null){const{message:K}=Y;if(typeof K=="string"&&K.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${L} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw Y}return(0,a.useEffect)(()=>{z.captureEvent(u.t,"")},[z]),(0,s.jsx)(M,{...X})},W=I||M.displayName||M.name||"LazyComponent";return $.displayName=`RoutableExtension(${W})`,$})},data:{"core.mountPoint":L},name:I})}function C(P){const{component:B,name:L}=P;return O({component:B,name:L})}function O(P){const{data:B={},name:L}=P;L||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let I;if("lazy"in P.component){const $=P.component.lazy;I=(0,a.lazy)(()=>$().then(W=>({default:W}),W=>{const X=L?` of the ${L} extension`:"";throw new v.HK(`Failed lazy loading${X}, try to reload the page`,W)}))}else I=P.component.sync;const M=L||I.displayName||I.name||"Component";return{expose($){const W=X=>{const z=(0,b.n)(),{Progress:Y}=z.getComponents(),K=B?.["core.mountPoint"];return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(Y,{}),children:(0,s.jsx)(m,{app:z,plugin:$,children:(0,s.jsx)(p.Ig,{attributes:{pluginId:$.getId(),...L&&{extension:L},...K&&{routeRef:K.id}},children:(0,s.jsx)(I,{...X})})})})};(0,d.h)(W,"core.plugin",$),(0,d.h)(W,"core.extensionName",L);for(const[X,z]of Object.entries(B))(0,d.h)(W,X,z);return W.displayName=`Extension(${M})`,W}}}},82442:(H,S,t)=>{"use strict";t.d(S,{O:()=>d});var s=t(14041),a=t(19402),x=t(72427),p=t(63636);function b(m,u,v,g){return s.Children.toArray(m).flatMap(C=>{if(!(0,s.isValidElement)(C))return[];if(C.type===s.Fragment)return b(C.props.children,u,v,g);if((0,a.E)(C,"core.featureFlagged")){const O=C.props;return("with"in O?u.isActive(O.with):!u.isActive(O.without))?b(C.props.children,u,v,g):[]}if(v===void 0||v(C))return[C];if(g)throw new Error(g);return b(C.props.children,u,v,g)})}class h{node;featureFlagsApi;constructor(u,v){this.node=u,this.featureFlagsApi=v}selectByComponentData(u){const v=b(this.node,this.featureFlagsApi,g=>(0,a.E)(g,u.key)!==void 0,u.withStrictError);return new h(v,this.featureFlagsApi)}findComponentData(u){return b(this.node,this.featureFlagsApi,g=>(0,a.E)(g,u.key)!==void 0).map(g=>(0,a.E)(g,u.key)).filter(g=>g!==void 0)}getElements(){return b(this.node,this.featureFlagsApi)}}function d(m,u,v=[]){const g=(0,x.gf)(p.B),C=new h(m,g);return(0,s.useMemo)(()=>u(C),[m,...v])}},9803:(H,S,t)=>{"use strict";t.d(S,{i:()=>a});class s{config;constructor(p){this.config=p}getId(){return this.config.id}getApis(){return this.config.apis??[]}getFeatureFlags(){return this.config.featureFlags?.slice()??[]}get routes(){return this.config.routes??{}}get externalRoutes(){return this.config.externalRoutes??{}}provide(p){return p.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(x){return new s(x)}},34569:(H,S,t)=>{"use strict";t.d(S,{H:()=>x});var s=t(59598);class a{id;params;[p=s.b];constructor(h,d){this.id=h,this.params=d,this[p]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function x(b){return new a(b.id,b.params??[])}var p},59598:(H,S,t)=>{"use strict";t.d(S,{b:()=>a});var s=t(63544);const a=(0,s.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,S,t)=>{"use strict";t.d(S,{S:()=>p});var s=t(14041),a=t(18690),x=t(43836);function p(b){const{pathname:h}=(0,a.zy)(),d=(0,x.qO)("routing-context");if(!d)throw new Error("Routing context is not available");const m=d.atVersion(1),u=(0,s.useMemo)(()=>m&&m.resolve(b,{pathname:h}),[m,b,h]);if(!d)throw new Error("useRouteRef used outside of routing context");if(!m)throw new Error("RoutingContext v1 not available");const v="optional"in b&&b.optional;if(!u&&!v)throw new Error(`No path for ${b}`);return u}},93184:(H,S,t)=>{"use strict";t.d(S,{h:()=>p,v:()=>b});var s=t(99833);function a(h){const d=new Array;function m(u,v){for(const[g,C]of Object.entries(u))typeof C=="string"?d.push([v+g,C]):m(C,`${v}${g}.`)}return m(h,""),Object.fromEntries(d)}class x{#t;#e;#n;constructor(d){this.#t=d.id,this.#e=a(d.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#e}setDefaultResource(d){this.#n=d}getDefaultResource(){return this.#n}toString(){return`TranslationRef{id=${this.id}}`}}function p(h){const d=new x(h);return h.translations&&d.setDefaultResource((0,s.o)({ref:d,translations:h.translations})),d}function b(h){const d=h;if(d.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${d.$$type}'`);if(d.version!=="v1")throw new Error(`Invalid translation ref, bad version '${d.version}'`);return d}},99833:(H,S,t)=>{"use strict";t.d(S,{Y:()=>s,o:()=>a});function s(x){const p=x;if(p.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${p.$$type}'`);if(p.version!=="v1")throw new Error(`Invalid translation resource, bad version '${p.version}'`);return p}function a(x){return{$$type:"@backstage/TranslationResource",version:"v1",id:x.ref.id,resources:Object.entries(x.translations).map(([p,b])=>({language:p,loader:()=>b().then(h=>{const d=h.default;return{messages:d?.$$type==="@backstage/TranslationMessages"?d.messages:d}})}))}}},87849:(H,S,t)=>{"use strict";t.d(S,{i:()=>h});var s=t(14041),a=t(72427),x=t(39837),p=t(56038);const b=new WeakSet,h=d=>{const m=(0,a.gf)(x.m),u=(0,a.gf)(p.J),[v,g]=(0,s.useState)(()=>u.getTranslation(d)),C=(0,s.useMemo)(()=>u.translation$(d),[u,d]),O=(0,s.useCallback)(B=>{if(!b.has(d)){const L=`Failed to load translation resource '${d.id}'; caused by ${B}`;console.error(L),m.post(new Error(L)),b.add(d)}},[m,d]);(0,s.useEffect)(()=>{const B=C.subscribe({next(L){L.ready&&g(L)},error(L){O(L)}});return()=>{B.unsubscribe()}},[C,O]);const P=(0,s.useRef)(!0);if((0,s.useEffect)(()=>{P.current?P.current=!1:g(u.getTranslation(d))},[u,d]),!v.ready)throw new Promise(B=>{const L=C.subscribe({next(I){I.ready&&(L.unsubscribe(),B())},error(I){L.unsubscribe(),O(I),B()}})});return{t:v.t}}},70835:(H,S,t)=>{"use strict";t.d(S,{o:()=>x});var s=t(59750);async function a(p){try{const b=await p.text();if(b){if(p.headers.get("content-type")?.startsWith("application/json"))try{const h=JSON.parse(b);if(h.error&&h.response)return h}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}, ${b}`},response:{statusCode:p.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}`},response:{statusCode:p.status}}}class x extends Error{response;body;cause;statusCode;statusText;static async fromResponse(b){const h=await a(b),d=h.response.statusCode||b.status,m=b.statusText,u=`Request failed with ${d} ${m}`,v=(0,s.cy)(h.error);return new x({message:u,response:b,data:h,cause:v,statusCode:d,statusText:m})}constructor(b){super(b.message),this.name="ResponseError",this.response=b.response,this.body=b.data,this.cause=b.cause,this.statusCode=b.statusCode,this.statusText=b.statusText}}},93007:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(x){if(typeof x!="object"||x===null||Array.isArray(x))return!1;const p=x;return!(typeof p.name!="string"||p.name===""||typeof p.message!="string")}function a(x){if(typeof x!="object"||x===null||Array.isArray(x))throw new Error(`Encountered invalid error, not an object, got '${x}'`);const p=x;if(typeof p.name!="string"||p.name==="")throw new Error(`Encountered error object without a name, got '${x}'`);if(typeof p.message!="string")throw new Error(`Encountered error object without a message, got '${x}'`)}},97142:(H,S,t)=>{"use strict";t.d(S,{HK:()=>C,m_:()=>d,EH:()=>v});var s=t(93007),a=t(59750);class x extends Error{cause;constructor(P,B){let L=P;if(B!==void 0){const I=(0,a.M5)(B);L?L+=`; caused by ${I}`:L=`caused by ${I}`}super(L),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,s.b)(B)?B:void 0}}class p extends null{name="InputError"}class b extends null{name="AuthenticationError"}class h extends null{name="NotAllowedError"}class d extends x{name="NotFoundError"}class m extends null{name="ConflictError"}class u extends null{name="NotModifiedError"}class v extends x{name="NotImplementedError"}class g extends null{}class C extends x{constructor(P,B){super(P,B),this.name=(0,s.b)(B)?B.name:"Error"}}},59750:(H,S,t)=>{"use strict";t.d(S,{M5:()=>h,cy:()=>b});var s=t(69655),a=t.n(s),x=t(93007);function p(d,m){const v={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(d)};return m?.includeStack||(delete v.stack,v.cause&&typeof v.cause=="object"&&"stack"in v.cause&&delete v.cause.stack),v}function b(d){const m=(0,s.deserializeError)(d);return d.stack||(m.stack=void 0),m}function h(d){if((0,x.b)(d)){const m=String(d);return m!=="[object Object]"?m:`${d.name}: ${d.message}`}return`unknown error '${d}'`}},96726:(H,S,t)=>{"use strict";t.d(S,{L:()=>Le,Y:()=>an});var s=t(59869);const a="amazonaws.com";function x(T){const l=T.getOptionalString("endpoint"),E=T.getOptionalBoolean("s3ForcePathStyle")??!1;let w,Z;if(l){try{const Yt=new URL(l);w=Yt.host,Z=Yt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(Z!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else w=a;const _=T.getOptionalString("accessKeyId"),ot=T.getOptionalString("secretAccessKey")?.trim(),Mt=T.getOptionalString("roleArn"),zt=T.getOptionalString("externalId");return{host:w,endpoint:l,s3ForcePathStyle:E,accessKeyId:_,secretAccessKey:ot,roleArn:Mt,externalId:zt}}function p(T){const l=T.map(x);return l.some(E=>E.host===a)||l.push({host:a}),l}class b{integrationConfig;static factory=({config:l})=>{const E=p(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,s.oS)(E.map(w=>new b(w)),w=>w.config.host)};get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return l}}const h="console.aws.amazon.com";function d(T){const l=T.getOptionalString("accessKeyId"),E=T.getOptionalString("secretAccessKey")?.trim(),w=T.getOptionalString("roleArn"),Z=T.getOptionalString("externalId"),_=T.getString("region");return{host:T.getOptionalString("host")||`${_}.${h}`,accessKeyId:l,secretAccessKey:E,roleArn:w,externalId:Z,region:_}}function m(T){return T.map(d)}class u{integrationConfig;static factory=({config:l})=>{const E=m(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,s.oS)(E.map(w=>new u(w)),w=>w.config.host)};get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){const w=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!w)throw new Error("");const[,Z]=w;return v(l,Z,"edit")}}function v(T,l,E){const w=E==="edit"?"files/edit":E;return T.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${w}/`)}const g="GB";class C{static fromRepoUrl(l){const E=new URL(l);let w,Z,_;const ot=E.pathname.split("/").map(re=>decodeURIComponent(re));if(ot[2]==="_git"?(w=ot[1],Z=_=ot[3]):ot[3]==="_git"?(w=ot[1],Z=ot[2],_=ot[4]):ot[4]==="_git"&&(w=`${ot[1]}/${ot[2]}`,Z=ot[3],_=ot[5]),!w||!Z||!_)throw new Error("Azure URL must point to a git repository");const Mt=E.searchParams.get("path")??void 0;let zt;const Yt=E.searchParams.get("version");if(Yt){if(Yt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");zt=Yt.slice(2)}return new C(E.origin,w,Z,_,Mt,zt)}#t;#e;#n;#s;#o;#r;constructor(l,E,w,Z,_,ot){this.#t=l,this.#e=E,this.#n=w,this.#s=Z,this.#o=_,this.#r=ot}#a=(...l)=>{const E=new URL(this.#t);return E.pathname=l.map(w=>encodeURIComponent(w)).join("/"),E};toRepoUrl(){let l;return this.#n===this.#s?l=this.#a(this.#e,"_git",this.#s):l=this.#a(this.#e,this.#n,"_git",this.#s),this.#o&&l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",g+this.#r),l.toString()}toFileUrl(){if(!this.#o)throw new Error("Azure URL must point to a specific path to be able to download a file");const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("api-version","6.0"),l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toArchiveUrl(){const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("recursionLevel","full"),l.searchParams.set("download","true"),l.searchParams.set("api-version","6.0"),this.#o&&l.searchParams.set("scopePath",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toCommitsUrl(){const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"commits");return l.searchParams.set("api-version","6.0"),this.#r&&l.searchParams.set("searchCriteria.itemVersion.version",this.#r),l.toString()}getOwner(){return this.#e}getProject(){return this.#n}getRepo(){return this.#s}getPath(){return this.#o}getRef(){return this.#r}}const O="dev.azure.com",P=["clientId","clientSecret","managedIdentityClientId","tenantId","personalAccessToken"],B=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["ManagedIdentityClientAssertion",["clientId","managedIdentityClientId","tenantId"]],["PersonalAccessToken",["personalAccessToken"]]]);function L(T){for(const l of B.entries()){const[E,w]=l,Z=P.filter(_=>!w.includes(_));if(w.every(_=>T[_]!==void 0)&&Z.every(_=>T[_]===void 0))return{kind:E,organizations:T.organizations,...w.reduce((_,ot)=>(_[ot]=T[ot],_),{})}}throw new Error("is not a valid credential")}function I(T){const l=T.getOptionalString("host")??O;let E=T.getOptionalConfigArray("credentials")?.map(_=>({organizations:_.getOptionalStringArray("organizations"),personalAccessToken:_.getOptionalString("personalAccessToken")?.trim(),tenantId:_.getOptionalString("tenantId")?.trim(),clientId:_.getOptionalString("clientId")?.trim(),clientSecret:_.getOptionalString("clientSecret")?.trim(),managedIdentityClientId:_.getOptionalString("managedIdentityClientId")?.trim()}));const w=T.getOptionalString("token")?.trim();if(T.getOptional("credential")!==void 0&&T.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(T.getOptional("token")!==void 0&&T.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(w!==void 0){const _=[{personalAccessToken:w}];E=E?.concat(_)??_}if(T.getOptional("credential")!==void 0){const _=[{organizations:T.getOptionalStringArray("credential.organizations"),token:T.getOptionalString("credential.token")?.trim(),tenantId:T.getOptionalString("credential.tenantId"),clientId:T.getOptionalString("credential.clientId"),clientSecret:T.getOptionalString("credential.clientSecret")?.trim()}];E=E?.concat(_)??_}if(!(0,s.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let Z;if(E!==void 0){const _=E?.reduce((ot,Mt,zt)=>{let Yt;try{L(Mt)}catch(re){Yt=re.message}return Yt!==void 0&&ot.push(`credential at position ${zt+1} ${Yt}`),ot},Array.of()).concat(Object.entries(E.filter(ot=>ot.organizations!==void 0&&ot.organizations.length>0).reduce((ot,Mt,zt)=>(Mt.organizations?.forEach(Yt=>{ot[Yt]||(ot[Yt]=[]),ot[Yt].push(zt+1)}),ot),{})).filter(([ot,Mt])=>Mt.length>1).reduce((ot,[Mt,zt])=>(ot.push(`organization ${Mt} is specified multiple times in credentials at positions ${zt.slice(0,zt.length-1).join(", ")} and ${zt[zt.length-1]}`),ot),Array.of()));if(_?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${_.join("; ")}`);if(Z=E.map(ot=>L(ot)),Z.some(ot=>ot.kind!=="PersonalAccessToken")&&l!==O)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${O}`);if(Z.filter(ot=>ot.organizations===void 0||ot.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${l}, you cannot specify multiple credentials without organizations`)}return{host:l,credentials:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function M(T){const l=T.map(I);return l.some(E=>E.host===O)||l.push({host:O}),l}class ${integrationConfig;static factory=({config:l})=>{const E=M(l.getOptionalConfigArray("integrations.azure")??[]);return(0,s.oS)(E.map(w=>new $(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const{url:E,base:w}=l;if((0,s.AY)(E))return E;try{const Z=C.fromRepoUrl(w),_=new URL(w),ot=new URL(`https://a.com${Z.getPath()??""}`),Mt=new URL(E,ot).pathname;return _.searchParams.set("path",Mt),l.lineNumber&&(_.searchParams.set("line",String(l.lineNumber)),_.searchParams.set("lineEnd",String(l.lineNumber+1)),_.searchParams.set("lineStartColumn","1"),_.searchParams.set("lineEndColumn","1")),_.toString()}catch{return new URL(E,w).toString()}}resolveEditUrl(l){return l}}var W=t(52536),X=t.n(W);const z="bitbucket.org",Y="https://api.bitbucket.org/2.0";function K(T){const l=z,E=Y,w=T.getString("username"),Z=T.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:w,appPassword:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function dt(T){const l=T.map(K);return l.length===0&&l.push({host:z,apiBaseUrl:Y}),l}class G{integrationConfig;static factory=({config:l})=>{const E=dt(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,s.oS)(E.map(w=>new G(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,s.ku)(l);if(l.lineNumber){const w=new URL(E);return w.hash=`lines-${l.lineNumber}`,w.toString()}return E}resolveEditUrl(l){const E=X()(l),w=new URL(l);return w.searchParams.set("mode","edit"),w.searchParams.set("at",E.ref),w.toString()}}var Q=t(45250);const J="bitbucket.org",ct="https://api.bitbucket.org/2.0";function pt(T){const l=T.getOptionalString("host")??J;let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim(),Z=T.getOptionalString("username"),_=T.getOptionalString("appPassword")?.trim();if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):l===J?E=ct:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:w,username:Z,appPassword:_,commitSigningKey:T.getOptionalString("commitSigningKey")}}function yt(T){const l=T.map(pt);return l.some(E=>E.host===J)||l.push({host:J,apiBaseUrl:ct}),l}class At{integrationConfig;static factory=({config:l})=>{const E=yt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,s.oS)(E.map(w=>new At(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,s.ku)(l);if(!l.lineNumber)return E;const w=new URL(E);return this.integrationConfig.host==="bitbucket.org"?w.hash=`lines-${l.lineNumber}`:w.hash=`${l.lineNumber}`,w.toString()}resolveEditUrl(l){const E=X()(l),w=new URL(l);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",E.ref),w.toString()}}function Ot(T){const l=T.getString("host");let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim(),Z=T.getOptionalString("username"),_=T.getOptionalString("password");if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:w,username:Z,password:_,commitSigningKey:T.getOptionalString("commitSigningKey")}}function It(T){return T.map(Ot)}class ut{integrationConfig;static factory=({config:l})=>{const E=It(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,s.oS)(E.map(w=>new ut(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,s.ku)(l);if(l.lineNumber){const w=new URL(E);return w.hash=l.lineNumber.toString(),w.toString()}return E}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function lt(T){const l=T.getString("host");let E=T.getOptionalString("baseUrl"),w=T.getOptionalString("cloneUrl");const Z=T.getOptionalBoolean("disableEditUrl");let _=T.getString("gitilesBaseUrl");const ot=T.getOptionalString("username"),Mt=T.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(w&&!(0,s.AY)(w))throw new Error(`Invalid Gerrit integration config, '${w}' is not a valid cloneUrl`);if(!(0,s.AY)(_))throw new Error(`Invalid Gerrit integration config, '${_}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}`,w?w=(0,Q.trimEnd)(w,"/"):w=E,_=(0,Q.trimEnd)(_,"/"),{host:l,baseUrl:E,cloneUrl:w,disableEditUrl:Z,gitilesBaseUrl:_,username:ot,password:Mt,commitSigningKey:T.getOptionalString("commitSigningKey")}}function xt(T){return T.map(lt)}var gt=t(1048).hp;const bt=")]}'";function Rt(T,l){const E=new URL(T.gitilesBaseUrl),w=new URL(l),_=w.pathname.substring(w.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(Me=>!!Me),ot=_.indexOf("+");if(ot<=0)throw new Error(`Unable to parse project from url: ${l}`);const Mt=trimStart(_.slice(0,ot).join("/"),"/"),zt=_.indexOf("heads");if(zt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const Yt=_[zt+1],re=_.slice(zt+2).join("/");return{branch:Yt,filePath:re===""?"/":re,project:Mt}}function it(T,l){const E=new URL(T.gitilesBaseUrl),w=new URL(l),_=(0,Q.trimStart)(w.pathname.substring(w.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(pe=>!!pe),ot=(0,Q.takeWhile)(_,pe=>pe!=="+");if(ot.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Mt=_.slice(ot.length+1),zt=(0,Q.join)(ot,"/");if(Mt.length>0&&Mt[0]==="HEAD"){const pe=Mt.shift(),qt=(0,Q.join)(Mt,"/");return{project:zt,ref:pe,refType:"head",path:qt||"/",basePath:(0,Q.trimEnd)(l.replace(qt,""),"/")}}if(Mt.length>0&&Mt[0].length===40){const pe=Mt.shift(),qt=(0,Q.join)(Mt,"/");return{project:zt,ref:pe,refType:"sha",path:qt||"/",basePath:(0,Q.trimEnd)(l.replace(qt,""),"/")}}const Yt=(0,Q.join)(Mt,"/"),Me=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(Yt);if(Me){const pe=Me[0];let qt;const{refsReference:te,ref:ge}=Me.groups||{},sn=Yt.replace(pe,"");switch(te){case"heads":qt="branch";break;case"tags":qt="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:zt,ref:ge,refType:qt,path:sn||"/",basePath:(0,Q.trimEnd)(l.replace(sn,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function ft(T,l,E,w){return`${T.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(w,"/")}`}function vt(T,l,E,w){return`${T.baseUrl}/admin/repos/edit/repo/${l}/branch/refs/heads/${E}/file/${(0,Q.trimStart)(w,"/")}`}function st(T,l,E,w){const Z=w==="/"||w===""?".tar.gz":`/${w}.tar.gz`;return`${U(T)}/${l}/+archive/refs/heads/${E}${Z}`}function Et(T,l){const{path:E,ref:w,project:Z,refType:_}=it(T,l),ot=E==="/"||E===""?".tar.gz":`/${E}.tar.gz`;if(_==="branch")return`${U(T)}/${Z}/+archive/refs/heads/${w}${ot}`;if(_==="sha")return`${U(T)}/${Z}/+archive/${w}${ot}`;throw new Error(`Unsupported gitiles ref type: ${_}`)}function at(T){return T.password?"/a/":"/"}function U(T){if(!T.baseUrl||!T.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(T.gitilesBaseUrl.startsWith(T.baseUrl))return T.gitilesBaseUrl.replace(T.baseUrl.concat("/"),T.baseUrl.concat(at(T)));if(T.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return T.gitilesBaseUrl}function V(T,l){const{branch:E,project:w}=Rt(T,l);return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(w)}/branches/${E}`}function rt(T,l){const{project:E}=Rt(T,l);return`${T.cloneUrl}${at(T)}${E}`}function Ct(T,l){const{ref:E,refType:w,path:Z,project:_}=it(T,l);if(w==="branch")return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(_)}/branches/${E}/files/${encodeURIComponent(Z)}/content`;if(w==="sha")return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(_)}/commits/${E}/files/${encodeURIComponent(Z)}/content`;throw new Error(`Unsupported gitiles ref type: ${w}`)}function ht(T){return`${T.baseUrl}${at(T)}projects/`}function Bt(T){const l={};if(!T.password)return l;const E=gt.from(`${T.username}:${T.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function Nt(T){const l=await T.text();if(l.startsWith(bt))try{return JSON.parse(l.slice(bt.length))}catch(E){throw new Error(`Invalid response from Gerrit: ${l.slice(0,10)} - ${E}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${l.slice(0,10)}`)}class kt{integrationConfig;static factory=({config:l})=>{const E=xt(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,s.oS)(E.map(w=>new kt(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const{url:E,base:w,lineNumber:Z}=l;let _;if(E.startsWith("/")){const{basePath:ot}=it(this.config,w);return ot+E}return E?_=new URL(E,w):_=new URL(w),Z&&(_.hash=Z.toString()),_.toString()}resolveEditUrl(l){if(this.config.disableEditUrl)return l;const E=it(this.config,l);return vt(this.config,E.project,E.ref,E.path)}}var Jt=t(36021);const Wt="gitlab.com",Vt="https://gitlab.com/api/v4";function jt(T){const l=T.getString("host");let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim();let Z=T.getOptionalString("baseUrl");if(E?E=(0,Q.trimEnd)(E,"/"):l===Wt&&(E=Vt),Z?Z=(0,Q.trimEnd)(Z,"/"):Z=`https://${l}`,(0,s.HO)(l)){if(!E||!(0,s.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,s.AY)(Z))throw new Error(`Invalid GitLab integration config, '${Z}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:w,apiBaseUrl:E,baseUrl:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function Gt(T){const l=T.map(jt);return l.some(E=>E.host===Wt)||l.push({host:Wt,apiBaseUrl:Vt,baseUrl:`https://${Wt}`}),l}function ce(T){let l="";return T.host!==Wt&&(l=new URL(T.baseUrl).pathname),trimEnd(l,"/")}class he{integrationConfig;static factory=({config:l})=>{const E=Gt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,s.oS)(E.map(w=>new he(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return Kt(l,"edit")}}function Kt(T,l){return T.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function ne(T){const l=T.getString("host");let E=T.getOptionalString("baseUrl");const w=T.getOptionalString("username"),Z=T.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.AY)(E))throw new Error(`Invalid Gitea integration config, '${E}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:w,password:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}var le=t(1048).hp;function Ye(T,l){const E=Ve(T,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function ee(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function on(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function We(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function Re(T){const l={},{username:E,password:w}=T;return w?(E?l.Authorization=`basic ${le.from(`${E}:${w}`).toString("base64")}`:l.Authorization=`token ${w}`,{headers:l}):l}function Ve(T,l){const E=T.baseUrl??`https://${T.host}`;try{const[w,Z,_,ot,Mt,zt,...Yt]=l.replace(E,"").split("/"),re=Yt.join("/").replace(/^\//,"");return{url:E,owner:Z,name:_,ref:zt,path:re}}catch(w){throw new Error(`Incorrect URL: ${l}, ${w}`)}}class se{config;static factory=({config:l})=>{const w=(l.getOptionalConfigArray("integrations.gitea")??[]).map(Z=>ne(Z));return(0,s.oS)(w.map(Z=>new se(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return Ye(this.config,l)}}function qe(T){const l=T.getString("host"),E=T.getOptionalString("token"),w=T.getOptionalString("apiKey");if(!(0,s.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:w,token:E}}function tn(T,l){const E=Ke(T,l);return`${E.baseUrl}/ng/account/${E.accountId}/module/code${E.orgName!==""?`/orgs/${E.orgName}`:""}${E.projectName!==""?`/projects/${E.projectName}`:""}/repos/${E.repoName}/files/${E.branch}/~/${E.path}`}function hn(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/raw/${E.path}?routingId=${E.accountId}&git_ref=refs/heads/${E.refString}`,w}function en(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/archive/${E.branch}.zip?routingId=${E.accountId}`,w}function nn(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/content?routingId=${E.accountId}&include_commit=true&git_ref=refs/heads/${E.branch}`,w}function pn(T){const l={},{token:E,apiKey:w}=T;return w?l["x-api-key"]=w:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function Ke(T,l){const E=`https://${T.host}`;try{const w=new URL(l),Z=w.pathname.split("/").filter(de=>de!==""),_=w.pathname.split("/"),ot=Z.findIndex(de=>de==="account")+1,Mt=Z[ot],zt=Z.findIndex(de=>de==="orgs"),Yt=zt!==-1?Z[zt+1]:"",re=Z.findIndex(de=>de==="projects"),Me=re!==-1?Z[re+1]:"",pe=Z.findIndex((de,$t)=>de==="repos"&&$t>Math.max(ot,zt,re))+1,qt=Z[pe],te=_.slice(_.findIndex(de=>de==="files"||de==="edit")+1),ge=te.findIndex(de=>de==="~"),sn=te.slice(0,ge).join("/"),gn=ge!==-1?te.slice(ge+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Mt,orgName:Yt,projectName:Me,refString:sn,path:gn,repoName:qt,refDashStr:te.slice(0,ge).join("-"),branch:ge!==-1?te.slice(0,ge).join("/"):te.join("/")}}catch(w){throw new Error(`Incorrect URL: ${l}, ${w}`)}}class ze{config;static factory=({config:l})=>{const w=(l.getOptionalConfigArray("integrations.harness")??[]).map(Z=>qe(Z));return(0,s.oS)(w.map(Z=>new ze(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return tn(this.config,l)}}const He="blob.core.windows.net";function be(T){const l=T.getOptionalString("endpoint"),E=T.getString("accountName"),w=T.getOptionalString("accountKey")?.trim(),Z=T.getOptionalString("sasToken")?.trim(),_=T.getOptionalString("connectionString")?.trim(),ot=T.getOptionalString("endpointSuffix")?.trim();let Mt,zt;if(l){try{const re=new URL(l);Mt=re.host,zt=re.pathname}catch{throw new Error(`invalid azureBlobStorage integration config, endpoint '${l}' is not a valid URL`)}if(zt!=="/")throw new Error(`invalid azureBlobStorage integration config, endpoints cannot contain path, got '${l}'`)}else Mt=He;const Yt=T.has("aadCredential")?{clientId:T.getString("aadCredential.clientId"),tenantId:T.getString("aadCredential.tenantId"),clientSecret:T.getString("aadCredential.clientSecret")?.trim()}:void 0;if(w&&Z)throw new Error(`Invalid Azure Blob Storage config for ${E}: Both account key and SAS token cannot be used simultaneously.`);if(Yt&&(w||Z))throw new Error(`Invalid Azure Blob Storage config for ${E}: Cannot use both Azure AD credentials and account keys/SAS tokens for the same account.`);return{host:Mt,endpoint:l,accountName:E,accountKey:w,sasToken:Z,connectionString:_,endpointSuffix:ot,aadCredential:Yt}}function Qe(T){const l=T.map(be);return l.some(E=>E.host===He)||l.push({host:He}),l}class Ze{integrationConfig;static factory=({config:l})=>{const E=Qe(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,s.oS)(E.map(w=>new Ze(w)),w=>w.config.host)};get type(){return"azureBlobStorage"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return l}}class je{byType;static fromConfig(l){return new je({awsS3:b.factory({config:l}),awsCodeCommit:u.factory({config:l}),azureBlobStorage:Ze.factory({config:l}),azure:$.factory({config:l}),bitbucket:At.factory({config:l}),bitbucketCloud:G.factory({config:l}),bitbucketServer:ut.factory({config:l}),gerrit:kt.factory({config:l}),github:Jt.U.factory({config:l}),gitlab:he.factory({config:l}),gitea:se.factory({config:l}),harness:ze.factory({config:l})})}constructor(l){this.byType=l}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}get azureBlobStorage(){return this.byType.azureBlobStorage}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}get gitea(){return this.byType.gitea}get harness(){return this.byType.harness}list(){return Object.values(this.byType).flatMap(l=>l.list())}byUrl(l){let E=Object.values(this.byType).map(w=>w.byUrl(l)).filter(Boolean);if(E.length>1){const w=E.filter(Z=>!(Z instanceof At));w.length!==0&&(E=w)}return E[0]}byHost(l){return Object.values(this.byType).map(E=>E.byHost(l)).find(Boolean)}resolveUrl(l){const E=this.byUrl(l.base);return E?E.resolveUrl(l):(0,s.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var Ue=t(55309);class Le{static fromConfig(l){return je.fromConfig(l)}}const an=(0,Ue.y)({id:"integration.scmintegrations"})},36021:(H,S,t)=>{"use strict";t.d(S,{U:()=>m,F:()=>u});var s=t(59869),a=t(45250);const x="github.com",p="https://api.github.com",b="https://raw.githubusercontent.com";function h(v){const g=v.getOptionalString("host")??x;let C=v.getOptionalString("apiBaseUrl"),O=v.getOptionalString("rawBaseUrl");const P=v.getOptionalString("token")?.trim(),B=v.getOptionalConfigArray("apps")?.map(L=>({appId:L.getNumber("appId"),clientId:L.getString("clientId"),clientSecret:L.getString("clientSecret"),webhookSecret:L.getOptionalString("webhookSecret"),privateKey:L.getString("privateKey"),allowedInstallationOwners:L.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,s.HO)(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return C?C=(0,a.trimEnd)(C,"/"):g===x&&(C=p),O?O=(0,a.trimEnd)(O,"/"):g===x&&(O=b),{host:g,apiBaseUrl:C,rawBaseUrl:O,token:P,apps:B}}function d(v){const g=v.map(h);return g.some(C=>C.host===x)||g.push({host:x,apiBaseUrl:p,rawBaseUrl:b}),g}class m{integrationConfig;static factory=({config:g})=>{const C=d(g.getOptionalConfigArray("integrations.github")??[]);return(0,s.oS)(C.map(O=>new m(O)),O=>O.config.host)};constructor(g){this.integrationConfig=g}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return u((0,s.ku)(g),"tree")}resolveEditUrl(g){return u(g,"edit")}parseRateLimitInfo(g){return{isRateLimited:g.status===429||g.status===403&&g.headers.get("x-ratelimit-remaining")==="0"}}}function u(v,g){return v.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,O,P,B)=>`//${O}/${P}/${B}/${g}/`)}},59869:(H,S,t)=>{"use strict";t.d(S,{AY:()=>h,HO:()=>b,ku:()=>m,oS:()=>d});var s=t(52536),a=t.n(s),x=t(45250),p=t.n(x);function b(v){const g=new URL("http://example.com");return g.host=v,g.host===v}function h(v){try{return new URL(v),!0}catch{return!1}}function d(v,g){return{list(){return v},byUrl(C){try{const O=typeof C=="string"?new URL(C):C;return v.find(P=>g(P)===O.host)}catch{return}},byHost(C){return v.find(O=>g(O)===C)}}}function m(v){const{url:g,base:C,lineNumber:O}=v;try{return new URL(g),g}catch{}let P;if(g.startsWith("/")){const{href:B,filepath:L}=a()(C);P=new URL(B);const I=(0,x.trimEnd)(P.pathname.substring(0,P.pathname.length-L.length),"/");P.pathname=`${I}${g}`}else P=new URL(g,C);return P.search=new URL(C).search,O&&(P.hash=`L${O}`),P.toString()}function u(v){beforeAll(()=>v.listen({onUnhandledRequest:"error"})),afterAll(()=>v.close()),afterEach(()=>v.resetHandlers())}},71543:(H,S,t)=>{"use strict";var s={};t.r(s),t.d(s,{TechDocsPlugin:()=>b.Ju});var a=t(31085),x=t(25873),p=t(18690),b=t(39278),h=t(8915),d=t(72020),m=t(99730),u=t(64947),v=t(12173),g=t(22020),C=t(68146),O=t(73657);function P({children:r}){return(0,p.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(p.fS,{children:r})}const B=()=>(0,a.jsx)(v.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),L=({step:r,error:e})=>{let n="";return r==="load-config"?n=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(n=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(P,{children:(0,a.jsx)(v.M,{statusMessage:n,stack:e.stack})})},I=({error:r,resetError:e,plugin:n})=>(0,a.jsx)(g.b,{title:`Error in ${n?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(u.A,{variant:"outlined",onClick:e,children:"Retry"})}),M={Progress:C.k,Router:O.Kd,NotFoundErrorPage:B,BootErrorPage:L,ErrorBoundaryFallback:I},$="Invalid discovery URL pattern,";class W{parts;static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),o=n.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${$} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${$} URL must not have a hash`);if(i.search)throw new Error(`${$} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${$} URL must not end with a slash`);return new W(n)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}class X{endpoints;defaultEndpoint;static fromConfig(e,n){const o=n?.pathPattern??"/api/{{ pluginId }}",i=e.getString("backend.baseUrl"),c=e.getOptionalConfigArray("discovery.endpoints")?.flatMap(A=>{const y=typeof A.get("target")=="object"?A.getOptionalString("target.external"):A.getString("target");if(!y)return[];const R=W.compile(y);return A.getStringArray("plugins").map(N=>[N,R])});return new X(new Map(c),W.compile(`${i}${o}`))}constructor(e,n){this.endpoints=e,this.defaultEndpoint=n}async getBaseUrl(e){const n=this.endpoints.get(e);return n?n.getBaseUrl(e):this.defaultEndpoint.getBaseUrl(e)}}var z=t(96403),Y=t.n(z);class K{isClosed=!1;terminatingError;observable=new(Y())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}));subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class dt{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Y())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class G{subject=new K;post(e){this.subject.next(e)}alert$(){return this.subject}}class Q{captureEvent(e){}}class J{alertApi;errorApi;constructor(e,n){this.alertApi=e,this.errorApi=n}post(e,n){return n?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}}class ct{subject=new K;post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}}class pt{static forward(e,n){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,n)})}}const yt=new Map;class At{namespace;errorApi;constructor(e,n){this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(Y())(o=>(this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}static hasSubscribed=!1;static create(e){return new At(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[n,o]of yt.entries())e.key?.startsWith(n)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let n,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(n=JSON.parse(i,(c,A)=>(typeof A=="object"&&A!==null&&Object.freeze(A),A)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:o}}forBucket(e){const n=`${this.namespace}/${e}`;return yt.has(n)||yt.set(n,new At(n,this.errorApi)),yt.get(n)}async set(e,n){localStorage.setItem(this.getKeyName(e),JSON.stringify(n)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return At.hasSubscribed||(At.addStorageEventListener(),At.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const n=e?.slice(`${this.namespace}/`.length);n.includes("/")||this.notifyChanges(decodeURIComponent(n))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const n=this.snapshot(e);for(const o of this.subscribers)o.next(n)}subscribers;observable}function Ot(r){let e=r.baseImplementation||t.g.fetch;const n=[r.middleware??[]].flat().reverse();for(const o of n)e=o.apply(e);return{fetch:e}}class It{identityApi;allowUrl;headerName;headerValue;static create(e){const n=ut(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new It(e.identityApi,n,o,i)}static getDiscoveryUrlPrefixes(e){return(e.getOptionalConfigArray("discovery.endpoints")||[]).flatMap(o=>{const i=typeof o.get("target")=="object"?o.getString("target.external"):o.getString("target");return o.getStringArray("plugins").map(A=>i.replace(/\{\{\s*pluginId\s*\}\}/g,A))})}constructor(e,n,o,i){this.identityApi=e,this.allowUrl=n,this.headerName=o,this.headerValue=i}apply(e){return async(n,o)=>{const i=new Request(n,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(n,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function ut(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?lt(r.urlPrefixAllowlist):r.config?lt([r.config.getString("backend.baseUrl"),...It.getDiscoveryUrlPrefixes(r.config)]):()=>!1}function lt(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(o=>n===o||n.startsWith(`${o}/`))}function xt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class gt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(n,o)=>{const i=new Request(n,o),c="plugin://";if(!i.url.startsWith(c))return e(n,o);const{hostname:A,pathname:y,search:R,hash:N,username:tt,password:mt}=new URL(`http://${i.url.substring(c.length)}`);let St=await this.discoveryApi.getBaseUrl(A);if(tt||mt){const Dt=new URL(St),Zt=`${tt}${mt?`:${mt}`:""}@`;St=`${Dt.protocol}//${Zt}${Dt.host}${Dt.pathname}`}const Tt=`${xt(St,y)}${R}${N}`;return e(Tt,typeof n=="string"||bt(n)?o:n)}}}function bt(r){return typeof r=="object"&&r?.constructor===URL}class Rt{static resolvePluginProtocol(e){return new gt(e.discoveryApi)}static injectIdentityAuth(e){return It.create(e)}constructor(){}}function it(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function ft(r,...e){const n=new Set(r);for(const o of e)for(const i of o)n.add(i);return n}class vt{requests=[];subject=new dt(this.getCurrentPending());request(e){return new Promise((n,o)=>{this.requests.push({scopes:e,resolve:n,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(o=>it(e,o.scopes)?(o.resolve(n),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(n=>n.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((n,o)=>ft(n,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}}class st{subject=new K;currentRequests=[];handlerCount=0;createAuthRequester(e){const n=new vt,o=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),A=this.makeAuthRequest(i,e);A?c[o]=A:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>n.request(i)}makeAuthRequest(e,n){const{scopes:o}=e;if(o)return{provider:n.provider,trigger:async()=>{const i=await n.onAuthRequest(o);e.resolve(i)},reject:()=>{const i=new Error("Login failed, rejected by user");i.name="RejectedError",e.reject(i)}}}authRequest$(){return this.subject}}function Et(r){return new Promise((e,n)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,A=window.screen.height/2-i/2,y=new URL(r.url).origin,R=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${A},left=${c}`);let N="";if(!R||typeof R.closed>"u"||R.closed){const Tt=new Error("Failed to open auth popup.");Tt.name="PopupRejectedError",n(Tt);return}const tt=Tt=>{if(Tt.source!==R||Tt.origin!==y)return;const{data:Dt}=Tt;if(Dt.type==="config_info"){N=Dt.targetOrigin;return}if(Dt.type!=="authorization_response")return;const Zt=Dt;if("error"in Zt){const me=new Error(Zt.error.message);me.name=Zt.error.name,n(me)}else e(Zt.response);St()},mt=setInterval(()=>{if(R.closed){const Tt=`Login failed, ${N&&N!==window.location.origin?`Incorrect app origin, expected ${N}`:"popup was closed"}`,Dt=new Error(Tt);Dt.name="PopupClosedError",n(Dt),St()}},100);function St(){window.removeEventListener("message",tt),clearInterval(mt)}window.addEventListener("message",tt)})}let at=!1;function U(r){return[...r].join(" ")}class V{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:n,discoveryApi:o,environment:i,provider:c,joinScopes:A=U,oauthRequestApi:y,sessionTransform:R=tt=>tt,popupOptions:N}=e;!at&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),at=!0),this.enableExperimentalRedirectFlow=n?n.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=y.createAuthRequester({provider:c,onAuthRequest:async tt=>this.enableExperimentalRedirectFlow?this.executeRedirect(tt):this.showPopup(tt)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=A,this.sessionTransform=R,this.popupOptions=N}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const n=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e.scopes)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!n.ok){const i=new Error(`Auth refresh request failed, ${n.statusText}`);throw i.status=n.status,i}const o=await n.json();if(o.error){const i=new Error(o.error.message);throw o.error.name&&(i.name=o.error.name),i}return await this.sessionTransform(o)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(n=>{throw new Error(`Logout request failed, ${n}`)});if(!e.ok){const n=new Error(`Logout request failed, ${e.statusText}`);throw n.status=e.status,n}}async showPopup(e){const n=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:n,origin:window.location.origin,flow:"popup"}),i=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,c=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,A=await Et({url:o,name:`${this.provider.title} Login`,width:i,height:c});return await this.sessionTransform(A)}async executeRedirect(e){const n=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:n,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,n){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...n,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return n?`?${n}`:""}}function rt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Ct{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return rt(o,n)}getExtendedScope(e,n){const o=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const i=this.options.sessionScopes(e);for(const c of i)o.add(c)}if(n)for(const i of n)o.add(i);return o}}var ht=t(55309),Bt=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Nt=(0,ht.y)({id:"core.auth.google"}),kt=(0,ht.y)({id:"core.auth.github"}),Jt=(0,ht.y)({id:"core.auth.okta"}),Wt=(0,ht.y)({id:"core.auth.gitlab"}),Vt=(0,ht.y)({id:"core.auth.microsoft"}),jt=(0,ht.y)({id:"core.auth.onelogin"}),Gt=(0,ht.y)({id:"core.auth.bitbucket"}),ce=(0,ht.y)({id:"core.auth.bitbucket-server"}),he=(0,ht.y)({id:"core.auth.atlassian"}),Kt=(0,ht.y)({id:"core.auth.vmware-cloud"});class ne{subject=new dt(Bt.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Bt.SignedIn:Bt.SignedOut))}sessionState$(){return this.subject}}class le{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new ne;refreshPromise;currentSession;constructor(e){const{connector:n,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=n,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new Ct({sessionScopes:i,defaultScopes:o})}async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const o=await this.collapsedSessionRefresh(e.scopes),i=this.sessionScopesFunc(this.currentSession),c=this.sessionScopesFunc(o);return rt(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!e.instantPopup)try{const n=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=n,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession({scopes:this.helper.getExtendedScope(this.currentSession,e)});try{const n=await this.refreshPromise;if(!this.helper.sessionExistsAndHasScope(n,e))throw new Error("Refreshed session did not receive the required scopes");return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}}const Ye={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class ee{static createAuthConnector(e){if("authConnector"in e)return e.authConnector;const{scopeTransform:n=N=>N,configApi:o,discoveryApi:i,environment:c="development",provider:A=Ye,oauthRequestApi:y,popupOptions:R}=e;return new V({configApi:o,discoveryApi:i,environment:c,provider:A,oauthRequestApi:y,sessionTransform({backstageIdentity:N,...tt}){const mt={...tt,providerInfo:{idToken:tt.providerInfo.idToken,accessToken:tt.providerInfo.accessToken,scopes:ee.normalizeScopes(tt.providerInfo.scope,{scopeTransform:n}),expiresAt:tt.providerInfo.expiresInSeconds?new Date(Date.now()+tt.providerInfo.expiresInSeconds*1e3):void 0}};return N&&(mt.backstageIdentity={token:N.token,identity:N.identity,expiresAt:N.expiresInSeconds?new Date(Date.now()+N.expiresInSeconds*1e3):void 0}),mt},popupOptions:R})}static create(e){const{defaultScopes:n=[],scopeTransform:o=A=>A}=e,i=ee.createAuthConnector(e),c=new le({connector:i,defaultScopes:new Set(n),sessionScopes:A=>A.providerInfo.scopes,sessionShouldRefresh:A=>{let y=1/0;return A.providerInfo?.expiresAt&&(y=Math.min(y,(A.providerInfo.expiresAt.getTime()-Date.now())/1e3)),A.backstageIdentity?.expiresAt&&(y=Math.min(y,(A.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),y<60*3}});return new ee({sessionManager:c,scopeTransform:o})}sessionManager;scopeTransform;constructor(e){this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const o=ee.normalizeScopes(e,{scopeTransform:this.scopeTransform});return(await this.sessionManager.getSession({...n,scopes:o}))?.providerInfo.accessToken??""}async getIdToken(e={}){return(await this.sessionManager.getSession({...e,scopes:new Set(["openid"])}))?.providerInfo.idToken??""}async getBackstageIdentity(e={}){return(await this.sessionManager.getSession(e))?.backstageIdentity}async getProfile(e={}){return(await this.sessionManager.getSession(e))?.profile}static normalizeScopes(e,n){if(!e)return new Set;const o=Array.isArray(e)?e:e.split(/[\s|,]/).filter(Boolean),i=n?n.scopeTransform(o):o;return new Set(i)}}const on={id:"google",title:"Google",icon:()=>null},We="https://www.googleapis.com/auth/";class Re{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:A=on,defaultScopes:y=["openid",`${We}userinfo.email`,`${We}userinfo.profile`]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:A,environment:c,defaultScopes:y,scopeTransform(R){return R.map(N=>N==="openid"?N:N==="profile"||N==="email"?`${We}userinfo.${N}`:N.startsWith(We)?N:`${We}${N}`)}})}}const Ve={id:"microsoft",title:"Microsoft",icon:()=>null};class se{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new se(e)}constructor(e){const{configApi:n,environment:o="development",provider:i=Ve,oauthRequestApi:c,discoveryApi:A,defaultScopes:y=["openid","offline_access","profile","email","User.Read"],scopeTransform:R=N=>N.concat("offline_access")}=e;this.configApi=n,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=A,this.scopeTransform=R,this.oauth2={[se.MicrosoftGraphID]:ee.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:y})}}microsoftGraph(){return this.oauth2[se.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(se.resourceForScope).filter(i=>i!=="openid"))];if(n.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${n.join(", ")}. Access tokens can only have a single audience.`));const o=n[0]??se.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const n=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(n){const{resourceURI:o}=n;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return se.MicrosoftGraphID}}async getAccessToken(e,n){const o=e===void 0?se.MicrosoftGraphID:await se.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=ee.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,n)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}}const qe={id:"github",title:"GitHub",icon:()=>null};class tn{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=qe,oauthRequestApi:A,defaultScopes:y=["read:user"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const hn={id:"okta",title:"Okta",icon:()=>null},en=new Set(["openid","profile","email","phone","address","groups","offline_access"]),nn="okta.";class pn{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=hn,oauthRequestApi:A,defaultScopes:y=["openid","email","profile","offline_access"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y,scopeTransform(R){return R.map(N=>en.has(N)||N.startsWith(nn)?N:`${nn}${N}`)}})}}const Ke={id:"gitlab",title:"GitLab",icon:()=>null};class ze{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Ke,oauthRequestApi:A,defaultScopes:y=["read_user"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const He={id:"onelogin",title:"onelogin",icon:()=>null},be=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Qe="onelogin.";class Ze{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=He,oauthRequestApi:A}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(y){return y.map(R=>be.has(R)||R.startsWith(Qe)?R:`${Qe}${R}`)}})}}const je={id:"bitbucket",title:"Bitbucket",icon:()=>null};class Ue{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=je,oauthRequestApi:A,defaultScopes:y=["account"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const Le={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class an{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Le,oauthRequestApi:A,defaultScopes:y=["PROJECT_ADMIN"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const T={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=T,oauthRequestApi:A}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i})}}const E={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class w{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:A=E,defaultScopes:y=["openid"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:A,environment:c,defaultScopes:y})}}var Z=t(12935),_=t(57405),ot=t(65461),Mt=t(36017),zt=t(99303),Yt=t(39837);const re=(0,ht.y)({id:"core.storage"});var Me=t(70795),pe=t(16009);const qt=(0,ht.y)({id:"core.oauthrequest"});var te=t(96824),ge=t(70835),sn=t(10288),gn=t.n(sn),de=t(20938),$t=t(46195),$e=t(54241),Ln=t(13646);const fn=$t.z.lazy(()=>$t.z.object({rule:$t.z.string(),resourceType:$t.z.string(),params:$t.z.record($t.z.any()).optional()}).or($t.z.object({anyOf:$t.z.array(fn).nonempty()})).or($t.z.object({allOf:$t.z.array(fn).nonempty()})).or($t.z.object({not:fn}))),Mn=$t.z.object({result:$t.z.literal($e.b.ALLOW).or($t.z.literal($e.b.DENY))}),as=$t.z.object({result:$t.z.array($t.z.union([$t.z.literal($e.b.ALLOW),$t.z.literal($e.b.DENY)]))}).or(Mn),is=$t.z.union([$t.z.object({result:$t.z.literal($e.b.ALLOW).or($t.z.literal($e.b.DENY))}),$t.z.object({result:$t.z.literal($e.b.CONDITIONAL),pluginId:$t.z.string(),resourceType:$t.z.string(),conditions:fn})]),Hs=(r,e)=>$t.z.object({items:$t.z.array($t.z.intersection($t.z.object({id:$t.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class cs{enabled;discovery;enableBatchedRequests;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1,this.enableBatchedRequests=e.config.getOptionalBoolean("permission.EXPERIMENTAL_enableBatchedRequests")??!1}async authorize(e,n){return this.enabled?this.enableBatchedRequests?this.makeBatchedRequest(e,n):this.makeRequest(e,Mn,n):e.map(o=>({result:$e.b.ALLOW}))}async authorizeConditional(e,n){return this.enabled?this.makeRequest(e,is,n):e.map(o=>({result:$e.b.ALLOW}))}async makeRequest(e,n,o){const i={items:e.map(y=>({id:de.A(),...y}))},A=(await this.makeRawRequest(i,n,o)).items.reduce((y,R)=>(y[R.id]=R,y),{});return i.items.map(y=>A[y.id])}async makeBatchedRequest(e,n){const o={};for(const A of e){const{permission:y,resourceRef:R}=A;(0,Ln.OL)(y)?(o[y.name]||={permission:y,resourceRef:[],id:de.A()},R&&o[y.name].resourceRef?.push(R)):o[y.name]||={permission:y,id:de.A()}}const c=(await this.makeRawRequest({items:Object.values(o)},as,n)).items.reduce((A,y)=>(A[y.id]=y,A),{});return e.map(A=>{const{id:y}=o[A.permission.name],R=c[y];return Array.isArray(R.result)?{result:A.resourceRef?R.result.shift():R.result[0]}:{result:R.result}})}async makeRawRequest(e,n,o){const i=await this.discovery.getBaseUrl("permission"),c=await gn()(`${i}/authorize`,{method:"POST",body:JSON.stringify(e),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!c.ok)throw await ge.o.fromResponse(c);const A=await c.json();return Hs(n,new Set(e.items.map(({id:y})=>y))).parse(A)}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class bn{permissionClient;identityApi;constructor(e,n){this.permissionClient=e,this.identityApi=n}static create(e){const{config:n,discovery:o,identity:i}=e,c=new cs({discovery:o,config:n});return new bn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const ls=[(0,Z.b)({api:_.I,deps:{configApi:ot.U},factory:({configApi:r})=>X.fromConfig(r)}),(0,Z.b)({api:Mt.k,deps:{},factory:()=>new G}),(0,Z.b)({api:zt.c,deps:{},factory:()=>new Q}),(0,Z.b)({api:Yt.m,deps:{alertApi:Mt.k},factory:({alertApi:r})=>{const e=new J(r,new ct);return pt.forward(e,{hidden:!1}),e}}),(0,Z.b)({api:re,deps:{errorApi:Yt.m},factory:({errorApi:r})=>At.create({errorApi:r})}),(0,Z.b)({api:Me.a,deps:{configApi:ot.U,identityApi:pe.K,discoveryApi:_.I},factory:({configApi:r,identityApi:e,discoveryApi:n})=>Ot({middleware:[Rt.resolvePluginProtocol({discoveryApi:n}),Rt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Z.b)({api:qt,deps:{},factory:()=>new st}),(0,Z.b)({api:Nt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Re.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Vt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>se.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:kt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>tn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Jt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>pn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Wt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:jt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Gt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ue.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:ce,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>an.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:he,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>l.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Kt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>w.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:te.x,deps:{discovery:_.I,identity:pe.K,config:ot.U},factory:({config:r,discovery:e,identity:n})=>bn.create({config:r,discovery:e,identity:n})})];var Bn=t(14451),jn=t(27799),Un=t(94389),ds=t(20947),us=t(20473),$n=t(45917),hs=t(39347),Fn=t(63309),mn=t(82451),ps=t(85121),Nn=t(17400),gs=t(42226),fs=t(69550),kn=t(52755),Wn=t(89350),ms=t(8911),Sn=t(33602),On=t(48108),ys=t(77225),Kn=t(55700),zn=t(71865),vs=t(80109),Es=t(15303),As=t(39330);const xs={brokenImage:jn.A,catalog:ms.A,scaffolder:ds.A,techdocs:us.A,search:$n.A,chat:hs.A,dashboard:Fn.A,docs:mn.A,email:ps.A,github:gs.A,group:Sn.A,help:fs.A,"kind:api":Nn.A,"kind:component":Wn.A,"kind:domain":Bn.A,"kind:group":Sn.A,"kind:location":kn.A,"kind:system":Un.A,"kind:user":On.A,"kind:resource":Kn.A,"kind:template":zn.A,user:On.A,warning:ys.A,star:vs.A,unstarred:Es.A,externalLink:As.A};var Cs=t(58733),bs=t(55288),Ss=t(91360),Os=t(50868),Ps=t(12285),Ts=t(87271),Rs=t(64636);Rs.A.configure(r=>`v5-${r}`);const Hn=(0,bs.A)({productionPrefix:"jss4-"});function Vn(r){const{children:e,theme:n,noCssBaseline:o=!1}=r,i=n.getTheme("v4"),c=n.getTheme("v5");let A;o||(A=(0,a.jsx)(Cs.Ay,{}));let y=(0,a.jsxs)(a.Fragment,{children:[A,e]});return i&&(y=(0,a.jsx)(Ss.Ay,{generateClassName:Hn,children:(0,a.jsx)(Os.A,{theme:i,children:y})})),c&&(y=(0,a.jsx)(Ps.A,{injectFirst:!0,children:(0,a.jsx)(Ts.A,{theme:c,children:y})})),y}const Gn={light:{type:"light",mode:"light",background:{default:"#F8F8F8",paper:"#FFFFFF"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#1F5493",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#1F5493"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",closeButtonColor:"#FFFFFF",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:"#FFD600",navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},dark:{type:"dark",mode:"dark",background:{default:"#333333",paper:"#424242"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",closeButtonColor:"#FFFFFF",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:"#FFD600",navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}}};var ws=t(98392),Is=t(17161);const Fe={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},Ne={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function we(r){const{colors:e,shape:n,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,A=`${n}, ${c}`,y=o?.fontColor??"#FFFFFF";return{colors:e,shape:n,backgroundImage:A,fontColor:y}}const Ds={home:we({colors:Ne.teal,shape:Fe.wave}),documentation:we({colors:Ne.pinkSea,shape:Fe.wave2}),tool:we({colors:Ne.purpleSky,shape:Fe.round}),service:we({colors:Ne.marineBlue,shape:Fe.wave}),website:we({colors:Ne.veryBlue,shape:Fe.wave}),library:we({colors:Ne.rubyRed,shape:Fe.wave}),other:we({colors:Ne.darkGrey,shape:Fe.wave}),app:we({colors:Ne.toastyOrange,shape:Fe.wave}),apis:we({colors:Ne.teal,shape:Fe.wave2}),card:we({colors:Ne.greens,shape:Fe.wave})},yn=16,Yn='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',Ls="home",Pn={htmlFontSize:yn,fontFamily:Yn,h1:{fontSize:54,fontWeight:700,marginBottom:10},h2:{fontSize:40,fontWeight:700,marginBottom:8},h3:{fontSize:32,fontWeight:700,marginBottom:6},h4:{fontWeight:700,fontSize:28,marginBottom:6},h5:{fontWeight:700,fontSize:24,marginBottom:4},h6:{fontWeight:700,fontSize:20,marginBottom:2}};function Vs(r){const{palette:e,htmlFontSize:n=yn,fontFamily:o=Yn,defaultPageTheme:i=Ls,pageTheme:c=Ds,typography:A}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return Pn.htmlFontSize=n,Pn.fontFamily=o,{palette:e,typography:A??Pn,page:c[i],getPageTheme:({themeId:y})=>c[y]??c[i]}}var f=t(80012);const D={MuiCssBaseline:{styleOverrides:r=>({html:{height:"100%",fontFamily:r.typography.fontFamily},body:{height:"100%",fontFamily:r.typography.fontFamily,overscrollBehaviorY:"none",fontSize:"0.875rem",lineHeight:1.43,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:r.palette.background.paper,width:"1em"},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:r.palette.textVerySubtle,border:`3px solid ${r.palette.background.paper}`},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:r.palette.mode==="dark"?(0,f.a)(r.palette.textVerySubtle,.2):(0,f.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,f.a)(r.palette.textVerySubtle,.2):(0,f.e$)(r.palette.textVerySubtle,.2)}},a:{color:"inherit",textDecoration:"none"}})},MuiGrid:{defaultProps:{spacing:2}},MuiSwitch:{defaultProps:{color:"primary"}},MuiTableRow:{styleOverrides:{root:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.default}}),hover:{"&:hover":{cursor:"pointer"}},head:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.paper}})}},MuiTableCell:{styleOverrides:{root:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:r.spacing(3,2,3,2.5),borderBottom:0}),sizeSmall:({theme:r})=>({padding:r.spacing(1.5,2,1.5,2.5)}),head:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",color:r.palette.textSubtle,fontWeight:"normal",lineHeight:"1"})}},MuiTabs:{styleOverrides:{root:{minHeight:24}}},MuiTab:{styleOverrides:{root:({theme:r})=>({color:r.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,f.e$)(r.palette.link,.3),background:(0,f.a)(r.palette.link,.95)},[r.breakpoints.up("md")]:{minWidth:120,fontSize:r.typography.pxToRem(14),fontWeight:500}}),textColorPrimary:({theme:r})=>({color:r.palette.link})}},MuiTableSortLabel:{styleOverrides:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"},"&:focus svg":{opacity:.5},"&.Mui-active":{fontWeight:"bold",color:"inherit"}}}},MuiListItemText:{styleOverrides:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}},MuiButton:{styleOverrides:{text:{padding:void 0}}},MuiChip:{styleOverrides:{root:({theme:r})=>({marginRight:r.spacing(1),marginBottom:r.spacing(1)}),label:({theme:r})=>({lineHeight:r.spacing(2.5),fontWeight:r.typography.fontWeightMedium,fontSize:r.spacing(1.75)}),labelSmall:({theme:r})=>({fontSize:r.spacing(1.5)}),deleteIcon:({theme:r})=>({width:r.spacing(3),height:r.spacing(3),margin:r.spacing(0,.75,0,-.75)}),deleteIconSmall:({theme:r})=>({width:r.spacing(2),height:r.spacing(2),margin:r.spacing(0,.5,0,-.5)})}},MuiCard:{styleOverrides:{root:{display:"flex",flexDirection:"column"}}},MuiCardHeader:{styleOverrides:{root:{paddingBottom:0}}},MuiCardContent:{styleOverrides:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}}},MuiCardActions:{styleOverrides:{root:{justifyContent:"flex-end"}}},MuiLink:{defaultProps:{underline:"hover"}},MuiPaper:{styleOverrides:{root:{backgroundImage:"unset"}}}},j=r=>(...e)=>{const n=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return n.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function F(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function k(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},o=r.spacing(1);return typeof o=="number"&&(n.spacing=j(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:n})]:[i,c]))}return e}}const q=/^&.Mui-([\w-]+)$/;function et(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const o=r[n];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,A=c.match(q);if(A){const[,y]=A,{[c]:R,...N}=o;R&&(e={...e,[n]:N,[y]:R})}}}return e}function Pt(r,e={}){const n={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?n[i]=F(r,c.styleOverrides):n[i]=et(k(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:n,props:o}}class wt{#t=new Map;constructor(e,n){this.#t=new Map,e&&this.#t.set("v4",e),n&&this.#t.set("v5",n)}getTheme(e){return this.#t.get(e)}}function Ut(r){const e=Vs(r),n={...D,...r.components},o=(0,Is.A)({...e,components:n}),i=Pt(o,n),c={...(0,ws.A)(e),...i};return new wt(c,o)}function Lt(r){const e=adaptV4Theme(r),n=createTheme(r);return new wt(n,createV5Theme(e))}const Ft={light:Ut({palette:Gn.light}),dark:Ut({palette:Gn.dark})};var Xt=t(75962),fe=t(87145);const ue=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(fe.A,{}),Provider:({children:r})=>(0,a.jsx)(Vn,{theme:Ft.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(Xt.A,{}),Provider:({children:r})=>(0,a.jsx)(Vn,{theme:Ft.dark,children:r})}];var nt=t(14041),Se=t(73466),ye=t(39067),Ht=t.n(ye);class Qt{holders;constructor(...e){this.holders=e}get(e){for(const n of this.holders){const o=n.get(e);if(o)return o}}}var ie=t(43836),ve=t(10602);const oe=(0,ie.tK)("api-context"),ae=r=>{const{apis:e,children:n}=r,o=(0,nt.useContext)(oe)?.atVersion(1),i=o?new Qt(e,o):e;return(0,a.jsx)(oe.Provider,{value:(0,ve.B)({1:i}),children:n})};ae.propTypes={apis:Ht().shape({get:Ht().func.isRequired}).isRequired,children:Ht().node};const Ee=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function ke(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Oe(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Oe):Object.fromEntries(Object.entries(r).map(([e,n])=>[e,Oe(n)]))}function Ge(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:Ge(e);if(typeof r!="object"||Array.isArray(r))return r;const n=ke(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(n)])){const c=Ge(r[i],n[i]);c!==void 0&&(o[i]=c)}return o}function Je(r){if(r===null)return"null";if(Array.isArray(r))return"array";const e=typeof r;return e==="number"&&isNaN(r)?"nan":e==="string"&&r===""?"empty-string":e}const _t={type(r,e,n,o){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class cn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new cn(void 0):e.reduce((n,{data:o,context:i,filteredKeys:c,deprecatedKeys:A})=>{const y=new cn(o,i,n);if(y.filteredKeys=c,A)for(const{key:R,description:N}of A)console.warn(`The configuration key '${R}' of ${i} is deprecated and may be removed soon. ${N||""}`);return y},void 0)}constructor(e,n="mock-config",o,i=""){this.data=e,this.context=n,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const n=this.readValue(e);return n===null?!1:n!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],n=this.fallback?.keys()??[];return[...new Set([...e,...n])].filter(o=>this.data?.[o]!==null)}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e??""),this.context));return n}getOptional(e){const n=Oe(this.readValue(e)),o=this.fallback?.getOptional(e);if(n!==null)return n===void 0?Ge(o):o===void 0?Ge(n):Ge(n,o)}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalConfig(e){const n=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(ke(n))return this.copy(n,e,o);if(n!==null){if(n!==void 0)throw new TypeError(_t.type(this.fullKey(e),this.context,Je(n),"object"));return o}}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!ke(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(n)return n.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalNumber(e){const n=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const o=Number(n);if(!Number.isFinite(o))throw new Error(_t.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const o=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(o))return!0;if(/^(?:n|no|false|0|off)$/i.test(o))return!1;throw new Error(_t.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalString(e){return this.readConfigValue(e,n=>typeof n=="string"&&n!==""||{expected:"string"})}getStringArray(e){const n=this.getOptionalStringArray(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[o,i]of n.entries())if(typeof i!="string"||i==="")return{expected:"string-array",value:i,key:`${e}[${o}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,o){const i=new cn(e,this.context,o,this.fullKey(n));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,n){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,n);if(o===null)return;const i=n(o);if(i!==!0){const{key:c=e,value:A=o,expected:y}=i;throw new TypeError(_t.type(this.fullKey(c),this.context,Je(A),y))}return o}readValue(e){const n=e?e.split("."):[];for(const i of n)if(!Ee.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of n.entries())if(ke(o))o=o[c];else if(o!=null){const A=this.fullKey(n.slice(0,i).join("."));throw new TypeError(_t.type(A,this.context,Je(o),"object"))}return o}}const ln="theme";class Qn{themes;static createWithStorage(e){const n=new Qn(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(ln)??void 0;return n.setActiveThemeId(o),n.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(ln,i):window.localStorage.removeItem(ln)}),window.addEventListener("storage",i=>{if(i.key===ln){const c=localStorage.getItem(ln)??void 0;n.setActiveThemeId(c)}}),n}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new dt(void 0)}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}}var vn=t(63636);function Gs(r){if(r.length<3)throw new Error(`The '${r}' feature flag must have a minimum length of three characters.`);if(r.length>150)throw new Error(`The '${r}' feature flag must not exceed 150 characters.`);if(!r.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${r}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class Wr{registeredFeatureFlags=[];flags;registerFlag(e){Gs(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===vn.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[o,i]of Object.entries(e.states))this.flags.set(o,i);const n=Array.from(this.flags.entries()).filter(([,o])=>o===vn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(n)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))return new Map;const o=Object.entries(n).filter(([i,c])=>(Gs(i),c===vn.S.Active));return new Map(o)}catch{return new Map}}}const Zn=(0,ht.y)({id:"core.apptheme"}),Ys=(0,ht.y)({id:"core.applanguage"});var Kr=t(56038),Qs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Qs||{});class zr{factories=new Map;register(e,n){const o=Qs[e],i=this.factories.get(n.api.id);return i&&i.priority>=o?!1:(this.factories.set(n.api.id,{priority:o,factory:n}),!0)}get(e){const n=this.factories.get(e.id);if(n)return n.factory}getAllApis(){const e=new Set;for(const{factory:n}of this.factories.values())e.add(n.api);return e}}class Ms{factories;static validateFactories(e,n){for(const o of n){const i=[o],c=new Set;for(;i.length;){const A=i.shift(),y=e.get(A);if(y)for(const R of Object.values(y.deps)){if(R.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(R)||(c.add(R),i.push(R))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,n=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(n.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...n,i.api]),A=i.factory(c);return this.apis.set(e.id,A),A}loadDeps(e,n,o){const i={};for(const c in n)if(n.hasOwnProperty(c)){const A=n[c],y=this.load(A,o);if(!y)throw new Error(`No API factory available for dependency ${A} of dependent ${e}`);i[c]=y}return i}}function Hr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const n=[{node:nt.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:o,parent:i,contexts:c}=n.shift();nt.Children.forEach(o,A=>{if(!(0,nt.isValidElement)(A))return;const y={};for(const R in e)if(e.hasOwnProperty(R)){const N=e[R];y[R]=N.visit(N.accumulator,A,i,c[R])}for(const R of r.discoverers){const N=R(A);N&&n.push({node:N,parent:A,contexts:y})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Jn(r,e){return()=>({accumulator:r(),visit:e})}function Vr(r){return r.props?.children}function Gr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Pe=t(19402);const Yr=Jn(()=>new Set,(r,e)=>{const n=(0,Pe.E)(e,"core.plugin");n&&r.add(n)});var Tn=t(72427);const Zs=r=>{const{children:e}=r,n=(0,Tn.gf)(vn.B),o="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Pe.h)(Zs,"core.featureFlagged",!0);const Xn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function _n(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Js=r=>{const e=new Set;return r&&e.add(r),e};function Xs(r,e=new Array){return nt.Children.forEach(r,n=>{if(!(0,nt.isValidElement)(n))return;const o=(0,Pe.E)(n,"core.mountPoint");if(o){const i=(0,Pe.E)(n,"core.plugin");e.push({routeRef:o,plugin:i})}Xs(n.props.children,e)}),e}const Qr=Jn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(o?.isElementAncestor)return o;if(n?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,Pe.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${_n(e)}"`);const A=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${_n(e)}"`);const y=i.startsWith("/")?i.slice(1):i,R=e.props.element;if((0,Pe.E)(e,"core.gatherMountPoints")){if(R)throw new Error(`Mount point gatherers may not have an element prop "${_n(e)}"`);const N={path:y,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Xn],plugins:new Set};return A.push(N),{obj:N,gatherPath:y,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(R){const[N,...tt]=Xs(R);if(tt.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!N)return o;const{routeRef:mt,plugin:St}=N,Tt={path:y,element:"mounted",routeRefs:new Set([mt]),caseSensitive:!!e.props?.caseSensitive,children:[Xn],plugins:Js(St)};return A.push(Tt),r.paths.set(mt,y),r.parents.set(mt,o?.routeRef),{obj:Tt,routeRef:mt??o?.routeRef,gatherPath:y,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${_n(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const y=(0,Pe.E)(e,"core.plugin");return y&&o?.obj?.plugins.add(y),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Zr=Jn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(n?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,A=o?.sticky;const y=e.props?.path,R=i?.children??r.objects,N=!!e.props?.caseSensitive;let tt=o?.path;if((0,Pe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");tt=y}const mt=e.props?.element;let St=(0,Pe.E)(e,"core.mountPoint");if(!St&&(0,nt.isValidElement)(mt)&&(St=(0,Pe.E)(mt,"core.mountPoint")),St){let Dt=y;if(tt&&(Dt?tt=void 0:Dt=tt),!Dt)throw new Error("Mounted routable extension must have a path");r.paths.set(St,Dt),c&&A?(r.parents.set(St,c),y&&(c=St,A=!1)):(r.parents.set(St,c),c=St),y?(i={caseSensitive:N,path:y,element:"mounted",routeRefs:new Set([St]),children:[Xn],plugins:Js((0,Pe.E)(e.props.element,"core.plugin"))},R.push(i)):i?.routeRefs.add(St)}if((0,Pe.E)(e,"core.gatherMountPoints")&&(A=!0),(0,Pe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");St||(i={caseSensitive:N,path:y,element:"gathered",routeRefs:new Set,children:[Xn],plugins:o?.obj?.plugins||new Set},R.push(i))}return{obj:i,path:tt,routeRef:c,sticky:A}}),Jr=Jn(()=>new Set,(r,e)=>{if(e.type===Zs){const n=e.props;r.add("with"in n?n.with:n.without)}});var Rn=t(21613),Xr=t(63544);const wn=(0,Xr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function _s(r){return r[wn]==="absolute"}function qs(r){return r[wn]==="sub"}function _r(r){return r[wn]==="external"}function qn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var qr=t(46155),to=t.n(qr);function eo(r,e,n){let o,i="";if(_s(r))o=r;else if(qs(r))o=r.parent,i=r.path;else if(_r(r)){const y=n.get(r);if(!y)return[void 0,""];if(_s(y))o=y;else if(qs(y))o=y.parent,i=y.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${y}`)}else throw r[wn]?new Error(`Unknown or invalid route ref type, ${r[wn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!o)return[void 0,""];const c=e.get(o);if(c===void 0)return[void 0,""];const A=qn(c,i);return[o,A]}function no(r,e,n,o,i){const c=(0,Rn.ue)(i,e)??[],A=Array();let y=-1;for(let tt=r;tt&&(y=c.findIndex(mt=>mt.route.routeRefs.has(tt)),y===-1);tt=o.get(tt))A.unshift(tt);A.length===0&&(y-=1);const R=y===-1?"":c[y].pathname,N=A.slice(0,-1).map(tt=>{const mt=n.get(tt);if(mt===void 0)throw new Error(`No path for ${tt}`);if(mt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${tt} as it has parameters`);return mt});return`${qn(R,...N)}/`}class so{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,n,o,i,c){this.routePaths=e,this.routeParents=n,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,n){const[o,i]=eo(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof n=="string"?c=this.trimPath(n):n.pathname?c={...n,pathname:this.trimPath(n.pathname)}:c=n;const A=this.appBasePath+no(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[R])=>{const N=R&&to()(R,tt=>typeof tt=="string"?tt.replaceAll(/[&?#;\/]/g,mt=>encodeURIComponent(mt)):tt);return qn(A,(0,Rn.tW)(i,N))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const ro=(0,ie.tK)("routing-context"),oo=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:o,basePath:i="",children:c})=>{const A=new so(r,e,n,o,i),y=(0,ve.B)({1:A});return(0,a.jsx)(ro.Provider,{value:y,children:c})};function ao(r,e){const n=new Set(e.values());n.delete(void 0);for(const o of e.keys()){if(n.has(o))continue;let i=o,c="";for(;i;){const y=r.get(i);if(y===void 0)throw new Error(`No path for ${i}`);c=qn(y,c),i=e.get(i)}const A=c.match(/:(\w+)/g);if(A){for(let y=0;y<A.length;y++)for(let R=y+1;R<A.length;R++)if(A[R]===A[y])throw new Error(`Parameter ${A[R]} is duplicated in path ${c}`)}}}function io(r,e){for(const n of e)if(n.externalRoutes){for(const[o,i]of Object.entries(n.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const co=(0,ie.tK)("app-context"),lo=({appContext:r,children:e})=>{const n=(0,ve.B)({1:r});return(0,a.jsx)(co.Provider,{value:n,children:e})},tr="app",uo=`${tr}-auth-cookie-expires-at`,ho=5*6e4,er=5e3,po=2,go=5*6e4;function fo({discoveryApi:r,fetchApi:e,errorApi:n}){let o=!1,i,c=!0,A=er;const y="BroadcastChannel"in window?new BroadcastChannel(uo):void 0,R=St=>{const Tt=(1+3*Math.random())*6e4;return Math.max(St-Date.now(),ho)-Tt},N=async()=>{try{const Tt=`${await r.getBaseUrl(tr)}/.backstage/auth/v1/cookie`,Dt=await e.fetch(Tt,{credentials:"include"});if(!Dt.ok)throw new Error(`Request failed with status ${Dt.status} ${Dt.statusText}, see request towards ${Tt} for more details`);const Zt=await Dt.json();if(!Zt.expiresAt)throw new Error("No expiration date in response");const me=Date.parse(Zt.expiresAt);if(Number.isNaN(me))throw new Error("Invalid expiration date in response");c=!0,y?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(me).toISOString()}}),mt(R(me))}catch(St){c?(c=!1,A=er):(A=Math.min(go,A*po),console.error("Session cookie refresh failed",St),n.post(new Error("Session refresh failed, see developer console for details"))),mt(A)}},tt=St=>{const{data:Tt}=St;if(!(Tt===null||typeof Tt!="object")&&"action"in Tt&&Tt.action==="COOKIE_REFRESH_SUCCESS"){const Dt=Date.parse(Tt.payload.expiresAt);if(Number.isNaN(Dt)){console.warn("Received invalid expiration from session refresh channel");return}mt(R(Dt))}};function mt(St){o||(i&&clearTimeout(i),i=setTimeout(N,St))}return y?.addEventListener("message",tt),N(),()=>{o=!0,i&&clearTimeout(i),y?.removeEventListener("message",tt),y?.close()}}function nr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Bs(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class mo{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw nr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Bs("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw nr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Bs("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(n=>n.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Bs("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),await this.#t?.(),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if(this.#t)return;const n=fo(e);this.#t=async()=>{n();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var yo=t(1394);function vo(r,e,n){if(r!==void 0){const i=n.find(c=>c.id===r);if(i)return i}if(e){const i=n.find(c=>c.variant==="dark");if(i)return i}const o=n.find(i=>i.variant==="light");return o||n[0]}const Eo=()=>{const r=(0,nt.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,nt.useState)(r.matches);return(0,nt.useEffect)(()=>{const o=i=>{n(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function sr({children:r}){const e=(0,Tn.gf)(Zn),n=(0,yo.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?Eo():!1,i=vo(n,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const rr=async()=>Ao();function Ao(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,n=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(n){if(!Array.isArray(n))throw new Error("Static configuration has invalid format");e.push(...n)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const A=c.textContent;if(!A)throw new Error("tag is empty");let y;try{y=JSON.parse(A)}catch(R){throw new Error(`failed to parse config; ${R}`)}if(!Array.isArray(y))throw new Error("data is not an array");e.push(...y)}catch(A){throw new Error(`Failed to load config from script tag, ${A.message}`)}else if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const c=JSON.parse(r);Array.isArray(c)?e.push(...c):e.push({data:c,context:"env"})}catch(c){throw new Error(`Failed to load runtime configuration, ${c}`)}const i=window.__APP_CONFIG__;return i&&e.push({context:"window",data:i}),e}class xo{apis=[];add(e,n){return this.apis.push([e.id,n]),n}build(){return new En(new Map(this.apis))}}class En{apis;static builder(){return new xo}static from(e){return new En(new Map(e.map(([n,o])=>[n.id,o])))}static with(e,n){return new En(new Map([[e.id,n]]))}constructor(e){this.apis=e}with(e,n){return new En(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}}function Co(r){const e=new Map,n=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const A=`${o.getId()}.${i}`;if(e.has(A))throw new Error(`Unexpected duplicate route '${A}'`);e.set(A,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const A=`${o.getId()}.${i}`;if(n.has(A))throw new Error(`Unexpected duplicate external route '${A}'`);n.set(A,c)}}return{routes:e,externalRoutes:n}}function bo(r,e,n){const o=Co(n),i=new Map,c=new Set;r&&r({bind:(R,N)=>{for(const[tt,mt]of Object.entries(N)){const St=R[tt];if(!St)throw new Error(`Key ${tt} is not an existing external route`);if(!mt&&!St.optional)throw new Error(`External route ${tt} is required but was ${mt===!1?"disabled":"not provided"}`);mt?i.set(St,mt):mt===!1&&c.add(St)}}});const A=e.getOptionalConfig("app.routes.bindings")?.get();if(A)for(const[y,R]of Object.entries(A)){if(!So(R))throw new Error(`Invalid config at app.routes.bindings['${y}'], value must be a non-empty string or false`);const N=o.externalRoutes.get(y);if(!N)throw new Error(`Invalid config at app.routes.bindings, '${y}' is not a valid external route`);if(!(i.has(N)||c.has(N)))if(R===!1)c.add(N);else{const tt=o.routes.get(R);if(!tt)throw new Error(`Invalid config at app.routes.bindings['${y}'], '${R}' is not a valid route`);i.set(N,tt)}}for(const y of o.externalRoutes.values())if(!i.has(y)&&!c.has(y)){const R="getDefaultTarget"in y?y.getDefaultTarget():void 0;if(R){const N=o.routes.get(R);N&&i.set(y,N)}}return i}function So(r){return!!(r===!1||typeof r=="string"&&r)}function In(){const[r]=(0,p.AV)((0,a.jsx)(p.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const or=(0,nt.createContext)(void 0);var ar=t(82266),ir=t(93368),Oo=t(25862);const Po=(r,e)=>{try{const o=(0,Rn.ue)(e,{pathname:r})?.filter(R=>R?.route.routeRefs?.size>0).pop(),i=o?.route;if(!i||i.path===""&&r!=="/")return;let c;i.routeRefs.size===1&&(c=i.routeRefs.values().next().value);let A;i.plugins.size===1&&(A=i.plugins.values().next().value);const y=Object.entries(o?.params||{}).reduce((R,[N,tt])=>(tt!==void 0&&N!=="*"&&(R[N]=tt),R),{});return{extension:"App",pluginId:A?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:y}}catch{return}},To=({pathname:r,search:e,hash:n,attributes:o})=>{const i=(0,ir.s)();return(0,nt.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${n}`,{attributes:o})},[i,r,e,n,o]),null},ts=({routeObjects:r})=>{const{pathname:e,search:n,hash:o}=(0,p.zy)(),{params:i,...c}=Po(e,r)||{params:{}};return(0,a.jsx)(Oo.Ig,{attributes:c,children:(0,a.jsx)(To,{pathname:e,search:n,hash:o,attributes:i})})};function Ro(r){return In()?js(r):""}function js(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function cr({component:r,appIdentityProxy:e,children:n}){const[o,i]=(0,nt.useState)(),c=(0,Tn.gf)(ot.U),A=js(c);return o?(e.setTarget(o,{signOutTargetUrl:A||"/"}),(0,a.jsx)(a.Fragment,{children:n})):(0,a.jsx)(r,{onSignInSuccess:i})}function lr(r){const{Router:e,SignInPage:n}=(0,ar.n)().getComponents(),o=(0,Tn.gf)(ot.U),i=js(o),c=`${i}/*`,A=(0,nt.useContext)(or);if(!A)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:y,appIdentityProxy:R}=A;return n?In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(cr,{component:n,appIdentityProxy:R,children:(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(cr,{component:n,appIdentityProxy:R,children:r.children})]}):(R.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}},{signOutTargetUrl:i||"/"}),In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(ts,{routeObjects:y}),r.children]}))}(0,Pe.h)(lr,"core.type","AppRouter");const Dn="language",Xe="en";class es{static create(e){const n=e?.availableLanguages??[Xe];if(n.length!==new Set(n).size)throw new Error(`Supported languages may not contain duplicates, got '${n.join("', '")}'`);if(!n.includes(Xe))throw new Error(`Supported languages must include '${Xe}'`);const o=e?.defaultLanguage??Xe;if(!n.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new es(n,o)}static createWithStorage(e){const n=es.create(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(Dn),{languages:i}=n.getAvailableLanguages();return o&&i.includes(o)&&n.setLanguage(o),n.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Dn)&&window.localStorage.setItem(Dn,c)}),window.addEventListener("storage",c=>{if(c.key===Dn){const A=localStorage.getItem(Dn)??void 0;A&&n.setLanguage(A)}}),n}#t;#e;#n;constructor(e,n){this.#t=e,this.#e=n,this.#n=new dt({language:this.#e})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const n=e??Xe;if(n!==this.#e){if(n&&!this.#t.includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${this.#t.join("', '")}'`);this.#e=n,this.#n.next({language:n})}}getLanguage(){return{language:this.#e}}language$(){return this.#n}}var wo=t(47304),Io=t(99833),dr=t(93184);function ur(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Do{onLoad;#t;#e;#n;constructor(e){this.onLoad=e,this.#t=new Set,this.#e=new Map,this.#n=new Map}addTranslationResource(e){const n=(0,Io.Y)(e);for(const o of n.resources){const i=this.#s(o.language,n.id);this.#n.has(i)||this.#n.set(i,o.loader)}}#s(e,n){return`${e}/${n}`}needsLoading(e,n){const o=this.#s(e,n);return this.#n.get(o)?!this.#t.has(o):!1}async load(e,n){const o=this.#s(e,n),i=this.#n.get(o);if(!i||this.#t.has(o))return;const c=this.#e.get(o);if(c){await c;return}const A=i().then(y=>{this.onLoad({language:e,namespace:n,messages:y.messages}),this.#t.add(o)},y=>{throw this.#t.add(o),y});this.#e.set(o,A),await A}}class Us{#t;#e;#n;static fromI18n(e){const n=e.services.interpolator,o=n.format;let i;return n.format=(c,A,y,R)=>A?o(c,A,y,R):i?.(c,A,y,R)??c,new Us(Math.random().toString(36).substring(2,8),c=>{i=c})}constructor(e,n){this.#t=n,this.#e=e,this.#n=new RegExp(`\\$${e}\\(([^)]+)\\)`)}wrapT(e){return(n,o)=>{let i;this.#t(y=>{if((0,nt.isValidElement)(y)){i||(i=new Map);const R=i.size.toString();return i.set(R,y),`$${this.#e}(${R})`}return y});const c=e(n,o);if(!i)return c;const A=c.split(this.#n);return(0,nt.createElement)(nt.Fragment,null,...A.map((y,R)=>R%2===0?y:i?.get(y)).filter(Boolean))}}}class $s{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),o=(0,wo.Q_)({fallbackLng:Xe,supportedLngs:n,interpolation:{escapeValue:!1,alwaysFormat:!0},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const i=Us.fromI18n(o),{language:c}=e.languageApi.getLanguage();c!==Xe&&o.changeLanguage(c);const A=new Do(N=>{o.addResourceBundle(N.language,N.namespace,ur(N.messages),!1,!0)}),y=e?.resources||[];for(let N=y.length-1;N>=0;N--){const tt=y[N];tt.$$type==="@backstage/TranslationResource"?A.addTranslationResource(tt):tt.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Xe,tt.id,ur(tt.messages),!0,!1)}const R=new $s(o,A,e.languageApi.getLanguage().language,i);return e.languageApi.language$().subscribe(({language:N})=>{R.#a(N)}),R}#t;#e;#n;#s;#o=new Set;#r=new Set;constructor(e,n,o,i){this.#t=e,this.#e=n,this.#n=o,this.#s=i}getTranslation(e){const n=(0,dr.v)(e);return this.#c(n),this.#i(n)}translation$(e){const n=(0,dr.v)(e);return this.#c(n),new(Y())(o=>{let i={};const c=()=>{i={};const y=i;this.#e.load(this.#n,n.id).then(()=>{if(y===i){const R=this.#i(n);R.ready&&o.next(R)}},R=>{y===i&&o.error(Array.isArray(R)?R[0]:R)})},A=()=>{const y=this.#i(n);y.ready?o.next(y):c()};return this.#e.needsLoading(this.#n,n.id)&&c(),this.#r.add(A),()=>{this.#r.delete(A)}})}#a(e){this.#n!==e&&(this.#n=e,this.#t.changeLanguage(e),this.#r.forEach(n=>n()))}#i(e){if(this.#e.needsLoading(this.#n,e.id))return{ready:!1};const n=this.#t.getFixedT(null,e.id);return{ready:!0,t:this.#s.wrapT(n)}}#c(e){if(this.#o.has(e.id))return;this.#o.add(e.id);const n=e.getDefaultMessages();this.#t.addResourceBundle(Xe,e.id,n,!0,!1);const o=e.getDefaultResource();o&&this.#e.addTranslationResource(o)}}function hr(r){const e=new URL(r);return e.protocol=document.location.protocol,e.hostname=document.location.hostname,e.port=document.location.port,e.toString().replace(/\/$/,"")}function Lo(r){const e=cn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,A;if(n&&o){const y=new URL(n).origin,R=new URL(o).origin;if(y===R){const N=hr(o);o!==N&&(c=N)}}if(n){const y=hr(n);n!==y&&(A=y)}return(A||c)&&(i=i.concat({data:{app:A&&{baseUrl:A},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Mo(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Bo(r,e,n){const o=!!r,i=(0,Se.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:R}=e;c=(0,a.jsx)(R,{})}else if(i.error){const{BootErrorPage:R}=e;c=(0,a.jsx)(R,{step:"load-config",error:i.error})}const{ThemeProvider:A=sr}=e;return c?{node:(0,a.jsx)(ae,{apis:En.with(Zn,n),children:(0,a.jsx)(A,{children:c})})}:{api:cn.fromConfigs(i.value?.length?Lo(i.value):[])}}class jo{app;constructor(e){this.app=e}getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}}class Uo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new mo;apiFactoryRegistry;constructor(e){this.apis=e.apis??[],this.icons=e.icons,this.plugins=new Set(e.plugins??[]),this.featureFlags=e.featureFlags??[],this.components=e.components,this.themes=e.themes,this.configLoader=e.configLoader??rr,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new zr,this.appLanguageApi=es.createWithStorage({defaultLanguage:e.__experimentalTranslations?.defaultLanguage,availableLanguages:e.__experimentalTranslations?.availableLanguages}),this.translationResources=e.__experimentalTranslations?.resources??[]}getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const n=this.getProvider();return()=>(0,a.jsx)(n,{children:e})}#t=!1;getProvider(){if(this.#t)throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");this.#t=!0;const e=new jo(this);let n,o;return({children:c})=>{const A=(0,nt.useRef)(!0),y=(0,nt.useMemo)(()=>Qn.createWithStorage(this.themes),[]),{routing:R,featureFlags:N}=(0,nt.useMemo)(()=>{const Zt=In();Zt&&console.warn(`
3
+ You will not have a verified identity, meaning some features might be unavailable.`,enter:"Enter"}},skipToContent:"Skip to content",copyTextButton:{tooltipText:"Text copied to clipboard"},simpleStepper:{reset:"Reset",finish:"Finish",next:"Next",skip:"Skip",back:"Back"},errorPage:{subtitle:"ERROR {{status}}: {{statusMessage}}",title:"Looks like someone dropped the mic!",goBack:"Go back",showMoreDetails:"Show more details",showLessDetails:"Show less details"},emptyState:{missingAnnotation:{title:"Missing Annotation",actionTitle:"Add the annotation to your component YAML as shown in the highlighted example below:",readMore:"Read more"}},supportConfig:{default:{title:"Support Not Configured",linkTitle:"Add `app.support` config key"}},errorBoundary:{title:"Please contact {{slackChannel}} for help."},oauthRequestDialog:{title:"Login Required",authRedirectTitle:"This will trigger a http redirect to OAuth Login.",login:"Log in",rejectAll:"Reject All"},supportButton:{title:"Support",close:"Close"},table:{filter:{title:"Filters",clearAll:"Clear all",placeholder:"All results"},body:{emptyDataSourceMessage:"No records to display"},pagination:{firstTooltip:"First Page",labelDisplayedRows:"{from}-{to} of {count}",labelRowsSelect:"rows",lastTooltip:"Last Page",nextTooltip:"Next Page",previousTooltip:"Previous Page"},toolbar:{search:"Filter"},header:{actions:"Actions"}},alertDisplay:{message_one:"({{ count }} newer message)",message_other:"({{ count }} newer messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."}}})},25862:(H,S,t)=>{"use strict";t.d(S,{Ig:()=>d,pn:()=>h});var s=t(31085),a=t(43836),x=t(10602),p=t(14041);const b=(0,a.tK)("analytics-context"),h=()=>{const u=(0,p.useContext)(b);if(u===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const v=u.atVersion(1);if(v===void 0)throw new Error("No context found for version 1.");return v},d=u=>{const{attributes:v,children:g}=u,O={...h(),...v},P=(0,x.B)({1:O});return(0,s.jsx)(b.Provider,{value:P,children:g})};function m(u,v){const g=C=>_jsx(d,{attributes:v,children:_jsx(u,{...C})});return g.displayName=`WithAnalyticsContext(${u.displayName||u.name||"Component"})`,g}},67237:(H,S,t)=>{"use strict";t.d(S,{J:()=>p,t:()=>x});var s=t(63544);const a=(0,s.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),x="_ROUTABLE-EXTENSION-RENDERED";class p{analyticsApi;context;constructor(h,d={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=d,a.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{a.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender}),a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),a.beforeUnloadRegistered=!0)}setContext(h){this.context=h}captureEvent(h,d,{value:m,attributes:u}={}){const{_routeNodeType:v,...g}=this.context;if(h===x){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...g,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(C){console.warn("Error during analytics event capture. %o",C)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&v==="gathered"&&g.pluginId==="root"){a.mostRecentGatheredNavigation={action:h,subject:d,value:m,attributes:u,context:g};return}try{this.analyticsApi.captureEvent({action:h,subject:d,value:m,attributes:u,context:g})}catch(C){console.warn("Error during analytics event capture. %o",C)}}}},93368:(H,S,t)=>{"use strict";t.d(S,{s:()=>d});var s=t(25862),a=t(72427),x=t(99303),p=t(14041),b=t(67237);function h(){try{return(0,a.gf)(x.c)}catch{return{captureEvent:()=>{}}}}function d(){const m=(0,p.useRef)(null),u=(0,s.pn)(),v=h();function g(){return m.current===null&&(m.current=new b.J(v)),m.current}const C=g();return C.setContext(u),C}},36017:(H,S,t)=>{"use strict";t.d(S,{k:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.alert"})},99303:(H,S,t)=>{"use strict";t.d(S,{c:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.analytics"})},65461:(H,S,t)=>{"use strict";t.d(S,{U:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.config"})},57405:(H,S,t)=>{"use strict";t.d(S,{I:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.discovery"})},39837:(H,S,t)=>{"use strict";t.d(S,{m:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.error"})},63636:(H,S,t)=>{"use strict";t.d(S,{B:()=>x,S:()=>a});var s=t(55309),a=function(p){return p[p.None=0]="None",p[p.Active=1]="Active",p}({});const x=(0,s.y)({id:"core.featureflags"})},70795:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.fetch"})},16009:(H,S,t)=>{"use strict";t.d(S,{K:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.identity"})},56038:(H,S,t)=>{"use strict";t.d(S,{J:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.translation"})},55309:(H,S,t)=>{"use strict";t.d(S,{y:()=>a});class s{config;constructor(p){if(this.config=p,!p.id.split(".").flatMap(h=>h.split("-")).every(h=>h.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${p.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function a(x){return new s(x)}},12935:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(a,x){return"id"in a?{api:a,deps:{},factory:()=>x}:a}},72427:(H,S,t)=>{"use strict";t.d(S,{Q2:()=>p,gf:()=>b});var s=t(31085),a=t(43836),x=t(97142);function p(){const d=(0,a.qO)("api-context");if(!d)throw new x.EH("API context is not available");const m=d.atVersion(1);if(!m)throw new x.EH("ApiContext v1 not available");return m}function b(d){const u=p().get(d);if(!u)throw new x.EH(`No implementation available for ${d}`);return u}function h(d){return function(u){const v=C=>{const O=p(),P={};for(const B in d)if(d.hasOwnProperty(B)){const L=d[B],I=O.get(L);if(!I)throw new NotImplementedError(`No implementation available for ${L}`);P[B]=I}return _jsx(u,{...C,...P})},g=u.displayName||u.name||"Component";return v.displayName=`withApis(${g})`,v}}},82266:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(43836);const a=()=>{const x=(0,s.qO)("app-context");if(!x)throw new Error("App context is not available");const p=x.atVersion(1);if(!p)throw new Error("AppContext v1 not available");return p}},19402:(H,S,t)=>{"use strict";t.d(S,{E:()=>b,h:()=>p});var s=t(63544);const a=(0,s.Q)("component-data-store",()=>new WeakMap),x="__backstage_data";function p(h,d,m){const u=h;let v=u[x]??a.get(h);if(v||(v={map:new Map},Object.defineProperty(u,x,{enumerable:!1,configurable:!0,writable:!1,value:v}),a.set(h,v)),v.map.has(d)){const g=h.displayName||h.name;throw new Error(`Attempted to attach duplicate data "${d}" to component "${g}"`)}v.map.set(d,m)}function b(h,d){if(!h)return;const m=h.type;if(!m)return;const u=m[x]??a.get(m);if(u)return u.map.get(d)}},88758:(H,S,t)=>{"use strict";t.d(S,{NC:()=>C,zZ:()=>O,QJ:()=>g});var s=t(31085),a=t(14041),x=t(93368),p=t(25862),b=t(82266),h=t(9222),d=t(19402);class m extends a.Component{static getDerivedStateFromError(B){return{error:B}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:B}=this.state,{app:L,plugin:I}=this.props,{ErrorBoundaryFallback:M}=L.getComponents();return B?(0,s.jsx)(M,{error:B,resetError:this.handleErrorReset,plugin:I}):this.props.children}}var u=t(67237),v=t(97142);function g(P){const{component:B,mountPoint:L,name:I}=P;return O({component:{lazy:()=>B().then(M=>{const $=X=>{const z=(0,x.s)();try{(0,h.S)(L)}catch(Y){if(typeof Y=="object"&&Y!==null){const{message:K}=Y;if(typeof K=="string"&&K.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${L} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw Y}return(0,a.useEffect)(()=>{z.captureEvent(u.t,"")},[z]),(0,s.jsx)(M,{...X})},W=I||M.displayName||M.name||"LazyComponent";return $.displayName=`RoutableExtension(${W})`,$})},data:{"core.mountPoint":L},name:I})}function C(P){const{component:B,name:L}=P;return O({component:B,name:L})}function O(P){const{data:B={},name:L}=P;L||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let I;if("lazy"in P.component){const $=P.component.lazy;I=(0,a.lazy)(()=>$().then(W=>({default:W}),W=>{const X=L?` of the ${L} extension`:"";throw new v.HK(`Failed lazy loading${X}, try to reload the page`,W)}))}else I=P.component.sync;const M=L||I.displayName||I.name||"Component";return{expose($){const W=X=>{const z=(0,b.n)(),{Progress:Y}=z.getComponents(),K=B?.["core.mountPoint"];return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(Y,{}),children:(0,s.jsx)(m,{app:z,plugin:$,children:(0,s.jsx)(p.Ig,{attributes:{pluginId:$.getId(),...L&&{extension:L},...K&&{routeRef:K.id}},children:(0,s.jsx)(I,{...X})})})})};(0,d.h)(W,"core.plugin",$),(0,d.h)(W,"core.extensionName",L);for(const[X,z]of Object.entries(B))(0,d.h)(W,X,z);return W.displayName=`Extension(${M})`,W}}}},82442:(H,S,t)=>{"use strict";t.d(S,{O:()=>d});var s=t(14041),a=t(19402),x=t(72427),p=t(63636);function b(m,u,v,g){return s.Children.toArray(m).flatMap(C=>{if(!(0,s.isValidElement)(C))return[];if(C.type===s.Fragment)return b(C.props.children,u,v,g);if((0,a.E)(C,"core.featureFlagged")){const O=C.props;return("with"in O?u.isActive(O.with):!u.isActive(O.without))?b(C.props.children,u,v,g):[]}if(v===void 0||v(C))return[C];if(g)throw new Error(g);return b(C.props.children,u,v,g)})}class h{node;featureFlagsApi;constructor(u,v){this.node=u,this.featureFlagsApi=v}selectByComponentData(u){const v=b(this.node,this.featureFlagsApi,g=>(0,a.E)(g,u.key)!==void 0,u.withStrictError);return new h(v,this.featureFlagsApi)}findComponentData(u){return b(this.node,this.featureFlagsApi,g=>(0,a.E)(g,u.key)!==void 0).map(g=>(0,a.E)(g,u.key)).filter(g=>g!==void 0)}getElements(){return b(this.node,this.featureFlagsApi)}}function d(m,u,v=[]){const g=(0,x.gf)(p.B),C=new h(m,g);return(0,s.useMemo)(()=>u(C),[m,...v])}},9803:(H,S,t)=>{"use strict";t.d(S,{i:()=>a});class s{config;constructor(p){this.config=p}getId(){return this.config.id}getApis(){return this.config.apis??[]}getFeatureFlags(){return this.config.featureFlags?.slice()??[]}get routes(){return this.config.routes??{}}get externalRoutes(){return this.config.externalRoutes??{}}provide(p){return p.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(x){return new s(x)}},34569:(H,S,t)=>{"use strict";t.d(S,{H:()=>x});var s=t(59598);class a{id;params;[p=s.b];constructor(h,d){this.id=h,this.params=d,this[p]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function x(b){return new a(b.id,b.params??[])}var p},59598:(H,S,t)=>{"use strict";t.d(S,{b:()=>a});var s=t(63544);const a=(0,s.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,S,t)=>{"use strict";t.d(S,{S:()=>p});var s=t(14041),a=t(18690),x=t(43836);function p(b){const{pathname:h}=(0,a.zy)(),d=(0,x.qO)("routing-context");if(!d)throw new Error("Routing context is not available");const m=d.atVersion(1),u=(0,s.useMemo)(()=>m&&m.resolve(b,{pathname:h}),[m,b,h]);if(!d)throw new Error("useRouteRef used outside of routing context");if(!m)throw new Error("RoutingContext v1 not available");const v="optional"in b&&b.optional;if(!u&&!v)throw new Error(`No path for ${b}`);return u}},93184:(H,S,t)=>{"use strict";t.d(S,{h:()=>p,v:()=>b});var s=t(99833);function a(h){const d=new Array;function m(u,v){for(const[g,C]of Object.entries(u))typeof C=="string"?d.push([v+g,C]):m(C,`${v}${g}.`)}return m(h,""),Object.fromEntries(d)}class x{#t;#e;#n;constructor(d){this.#t=d.id,this.#e=a(d.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#e}setDefaultResource(d){this.#n=d}getDefaultResource(){return this.#n}toString(){return`TranslationRef{id=${this.id}}`}}function p(h){const d=new x(h);return h.translations&&d.setDefaultResource((0,s.o)({ref:d,translations:h.translations})),d}function b(h){const d=h;if(d.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${d.$$type}'`);if(d.version!=="v1")throw new Error(`Invalid translation ref, bad version '${d.version}'`);return d}},99833:(H,S,t)=>{"use strict";t.d(S,{Y:()=>s,o:()=>a});function s(x){const p=x;if(p.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${p.$$type}'`);if(p.version!=="v1")throw new Error(`Invalid translation resource, bad version '${p.version}'`);return p}function a(x){return{$$type:"@backstage/TranslationResource",version:"v1",id:x.ref.id,resources:Object.entries(x.translations).map(([p,b])=>({language:p,loader:()=>b().then(h=>{const d=h.default;return{messages:d?.$$type==="@backstage/TranslationMessages"?d.messages:d}})}))}}},87849:(H,S,t)=>{"use strict";t.d(S,{i:()=>h});var s=t(14041),a=t(72427),x=t(39837),p=t(56038);const b=new WeakSet,h=d=>{const m=(0,a.gf)(x.m),u=(0,a.gf)(p.J),[v,g]=(0,s.useState)(()=>u.getTranslation(d)),C=(0,s.useMemo)(()=>u.translation$(d),[u,d]),O=(0,s.useCallback)(B=>{if(!b.has(d)){const L=`Failed to load translation resource '${d.id}'; caused by ${B}`;console.error(L),m.post(new Error(L)),b.add(d)}},[m,d]);(0,s.useEffect)(()=>{const B=C.subscribe({next(L){L.ready&&g(L)},error(L){O(L)}});return()=>{B.unsubscribe()}},[C,O]);const P=(0,s.useRef)(!0);if((0,s.useEffect)(()=>{P.current?P.current=!1:g(u.getTranslation(d))},[u,d]),!v.ready)throw new Promise(B=>{const L=C.subscribe({next(I){I.ready&&(L.unsubscribe(),B())},error(I){L.unsubscribe(),O(I),B()}})});return{t:v.t}}},70835:(H,S,t)=>{"use strict";t.d(S,{o:()=>x});var s=t(59750);async function a(p){try{const b=await p.text();if(b){if(p.headers.get("content-type")?.startsWith("application/json"))try{const h=JSON.parse(b);if(h.error&&h.response)return h}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}, ${b}`},response:{statusCode:p.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}`},response:{statusCode:p.status}}}class x extends Error{response;body;cause;statusCode;statusText;static async fromResponse(b){const h=await a(b),d=h.response.statusCode||b.status,m=b.statusText,u=`Request failed with ${d} ${m}`,v=(0,s.cy)(h.error);return new x({message:u,response:b,data:h,cause:v,statusCode:d,statusText:m})}constructor(b){super(b.message),this.name="ResponseError",this.response=b.response,this.body=b.data,this.cause=b.cause,this.statusCode=b.statusCode,this.statusText=b.statusText}}},93007:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(x){if(typeof x!="object"||x===null||Array.isArray(x))return!1;const p=x;return!(typeof p.name!="string"||p.name===""||typeof p.message!="string")}function a(x){if(typeof x!="object"||x===null||Array.isArray(x))throw new Error(`Encountered invalid error, not an object, got '${x}'`);const p=x;if(typeof p.name!="string"||p.name==="")throw new Error(`Encountered error object without a name, got '${x}'`);if(typeof p.message!="string")throw new Error(`Encountered error object without a message, got '${x}'`)}},97142:(H,S,t)=>{"use strict";t.d(S,{HK:()=>C,m_:()=>d,EH:()=>v});var s=t(93007),a=t(59750);class x extends Error{cause;constructor(P,B){let L=P;if(B!==void 0){const I=(0,a.M5)(B);L?L+=`; caused by ${I}`:L=`caused by ${I}`}super(L),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,s.b)(B)?B:void 0}}class p extends null{name="InputError"}class b extends null{name="AuthenticationError"}class h extends null{name="NotAllowedError"}class d extends x{name="NotFoundError"}class m extends null{name="ConflictError"}class u extends null{name="NotModifiedError"}class v extends x{name="NotImplementedError"}class g extends null{}class C extends x{constructor(P,B){super(P,B),this.name=(0,s.b)(B)?B.name:"Error"}}},59750:(H,S,t)=>{"use strict";t.d(S,{M5:()=>h,cy:()=>b});var s=t(69655),a=t.n(s),x=t(93007);function p(d,m){const v={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(d)};return m?.includeStack||(delete v.stack,v.cause&&typeof v.cause=="object"&&"stack"in v.cause&&delete v.cause.stack),v}function b(d){const m=(0,s.deserializeError)(d);return d.stack||(m.stack=void 0),m}function h(d){if((0,x.b)(d)){const m=String(d);return m!=="[object Object]"?m:`${d.name}: ${d.message}`}return`unknown error '${d}'`}},96726:(H,S,t)=>{"use strict";t.d(S,{L:()=>Le,Y:()=>an});var s=t(59869);const a="amazonaws.com";function x(T){const l=T.getOptionalString("endpoint"),E=T.getOptionalBoolean("s3ForcePathStyle")??!1;let w,Z;if(l){try{const Yt=new URL(l);w=Yt.host,Z=Yt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(Z!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else w=a;const _=T.getOptionalString("accessKeyId"),ot=T.getOptionalString("secretAccessKey")?.trim(),Mt=T.getOptionalString("roleArn"),zt=T.getOptionalString("externalId");return{host:w,endpoint:l,s3ForcePathStyle:E,accessKeyId:_,secretAccessKey:ot,roleArn:Mt,externalId:zt}}function p(T){const l=T.map(x);return l.some(E=>E.host===a)||l.push({host:a}),l}class b{integrationConfig;static factory=({config:l})=>{const E=p(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,s.oS)(E.map(w=>new b(w)),w=>w.config.host)};get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return l}}const h="console.aws.amazon.com";function d(T){const l=T.getOptionalString("accessKeyId"),E=T.getOptionalString("secretAccessKey")?.trim(),w=T.getOptionalString("roleArn"),Z=T.getOptionalString("externalId"),_=T.getString("region");return{host:T.getOptionalString("host")||`${_}.${h}`,accessKeyId:l,secretAccessKey:E,roleArn:w,externalId:Z,region:_}}function m(T){return T.map(d)}class u{integrationConfig;static factory=({config:l})=>{const E=m(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,s.oS)(E.map(w=>new u(w)),w=>w.config.host)};get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){const w=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!w)throw new Error("");const[,Z]=w;return v(l,Z,"edit")}}function v(T,l,E){const w=E==="edit"?"files/edit":E;return T.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${w}/`)}const g="GB";class C{static fromRepoUrl(l){const E=new URL(l);let w,Z,_;const ot=E.pathname.split("/").map(re=>decodeURIComponent(re));if(ot[2]==="_git"?(w=ot[1],Z=_=ot[3]):ot[3]==="_git"?(w=ot[1],Z=ot[2],_=ot[4]):ot[4]==="_git"&&(w=`${ot[1]}/${ot[2]}`,Z=ot[3],_=ot[5]),!w||!Z||!_)throw new Error("Azure URL must point to a git repository");const Mt=E.searchParams.get("path")??void 0;let zt;const Yt=E.searchParams.get("version");if(Yt){if(Yt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");zt=Yt.slice(2)}return new C(E.origin,w,Z,_,Mt,zt)}#t;#e;#n;#s;#o;#r;constructor(l,E,w,Z,_,ot){this.#t=l,this.#e=E,this.#n=w,this.#s=Z,this.#o=_,this.#r=ot}#a=(...l)=>{const E=new URL(this.#t);return E.pathname=l.map(w=>encodeURIComponent(w)).join("/"),E};toRepoUrl(){let l;return this.#n===this.#s?l=this.#a(this.#e,"_git",this.#s):l=this.#a(this.#e,this.#n,"_git",this.#s),this.#o&&l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",g+this.#r),l.toString()}toFileUrl(){if(!this.#o)throw new Error("Azure URL must point to a specific path to be able to download a file");const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("api-version","6.0"),l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toArchiveUrl(){const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("recursionLevel","full"),l.searchParams.set("download","true"),l.searchParams.set("api-version","6.0"),this.#o&&l.searchParams.set("scopePath",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toCommitsUrl(){const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"commits");return l.searchParams.set("api-version","6.0"),this.#r&&l.searchParams.set("searchCriteria.itemVersion.version",this.#r),l.toString()}getOwner(){return this.#e}getProject(){return this.#n}getRepo(){return this.#s}getPath(){return this.#o}getRef(){return this.#r}}const O="dev.azure.com",P=["clientId","clientSecret","managedIdentityClientId","tenantId","personalAccessToken"],B=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["ManagedIdentityClientAssertion",["clientId","managedIdentityClientId","tenantId"]],["PersonalAccessToken",["personalAccessToken"]]]);function L(T){for(const l of B.entries()){const[E,w]=l,Z=P.filter(_=>!w.includes(_));if(w.every(_=>T[_]!==void 0)&&Z.every(_=>T[_]===void 0))return{kind:E,organizations:T.organizations,...w.reduce((_,ot)=>(_[ot]=T[ot],_),{})}}throw new Error("is not a valid credential")}function I(T){const l=T.getOptionalString("host")??O;let E=T.getOptionalConfigArray("credentials")?.map(_=>({organizations:_.getOptionalStringArray("organizations"),personalAccessToken:_.getOptionalString("personalAccessToken")?.trim(),tenantId:_.getOptionalString("tenantId")?.trim(),clientId:_.getOptionalString("clientId")?.trim(),clientSecret:_.getOptionalString("clientSecret")?.trim(),managedIdentityClientId:_.getOptionalString("managedIdentityClientId")?.trim()}));const w=T.getOptionalString("token")?.trim();if(T.getOptional("credential")!==void 0&&T.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(T.getOptional("token")!==void 0&&T.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(w!==void 0){const _=[{personalAccessToken:w}];E=E?.concat(_)??_}if(T.getOptional("credential")!==void 0){const _=[{organizations:T.getOptionalStringArray("credential.organizations"),token:T.getOptionalString("credential.token")?.trim(),tenantId:T.getOptionalString("credential.tenantId"),clientId:T.getOptionalString("credential.clientId"),clientSecret:T.getOptionalString("credential.clientSecret")?.trim()}];E=E?.concat(_)??_}if(!(0,s.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let Z;if(E!==void 0){const _=E?.reduce((ot,Mt,zt)=>{let Yt;try{L(Mt)}catch(re){Yt=re.message}return Yt!==void 0&&ot.push(`credential at position ${zt+1} ${Yt}`),ot},Array.of()).concat(Object.entries(E.filter(ot=>ot.organizations!==void 0&&ot.organizations.length>0).reduce((ot,Mt,zt)=>(Mt.organizations?.forEach(Yt=>{ot[Yt]||(ot[Yt]=[]),ot[Yt].push(zt+1)}),ot),{})).filter(([ot,Mt])=>Mt.length>1).reduce((ot,[Mt,zt])=>(ot.push(`organization ${Mt} is specified multiple times in credentials at positions ${zt.slice(0,zt.length-1).join(", ")} and ${zt[zt.length-1]}`),ot),Array.of()));if(_?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${_.join("; ")}`);if(Z=E.map(ot=>L(ot)),Z.some(ot=>ot.kind!=="PersonalAccessToken")&&l!==O)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${O}`);if(Z.filter(ot=>ot.organizations===void 0||ot.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${l}, you cannot specify multiple credentials without organizations`)}return{host:l,credentials:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function M(T){const l=T.map(I);return l.some(E=>E.host===O)||l.push({host:O}),l}class ${integrationConfig;static factory=({config:l})=>{const E=M(l.getOptionalConfigArray("integrations.azure")??[]);return(0,s.oS)(E.map(w=>new $(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const{url:E,base:w}=l;if((0,s.AY)(E))return E;try{const Z=C.fromRepoUrl(w),_=new URL(w),ot=new URL(`https://a.com${Z.getPath()??""}`),Mt=new URL(E,ot).pathname;return _.searchParams.set("path",Mt),l.lineNumber&&(_.searchParams.set("line",String(l.lineNumber)),_.searchParams.set("lineEnd",String(l.lineNumber+1)),_.searchParams.set("lineStartColumn","1"),_.searchParams.set("lineEndColumn","1")),_.toString()}catch{return new URL(E,w).toString()}}resolveEditUrl(l){return l}}var W=t(52536),X=t.n(W);const z="bitbucket.org",Y="https://api.bitbucket.org/2.0";function K(T){const l=z,E=Y,w=T.getString("username"),Z=T.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:w,appPassword:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function dt(T){const l=T.map(K);return l.length===0&&l.push({host:z,apiBaseUrl:Y}),l}class G{integrationConfig;static factory=({config:l})=>{const E=dt(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,s.oS)(E.map(w=>new G(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,s.ku)(l);if(l.lineNumber){const w=new URL(E);return w.hash=`lines-${l.lineNumber}`,w.toString()}return E}resolveEditUrl(l){const E=X()(l),w=new URL(l);return w.searchParams.set("mode","edit"),w.searchParams.set("at",E.ref),w.toString()}}var Q=t(45250);const J="bitbucket.org",ct="https://api.bitbucket.org/2.0";function pt(T){const l=T.getOptionalString("host")??J;let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim(),Z=T.getOptionalString("username"),_=T.getOptionalString("appPassword")?.trim();if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):l===J?E=ct:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:w,username:Z,appPassword:_,commitSigningKey:T.getOptionalString("commitSigningKey")}}function yt(T){const l=T.map(pt);return l.some(E=>E.host===J)||l.push({host:J,apiBaseUrl:ct}),l}class At{integrationConfig;static factory=({config:l})=>{const E=yt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,s.oS)(E.map(w=>new At(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,s.ku)(l);if(!l.lineNumber)return E;const w=new URL(E);return this.integrationConfig.host==="bitbucket.org"?w.hash=`lines-${l.lineNumber}`:w.hash=`${l.lineNumber}`,w.toString()}resolveEditUrl(l){const E=X()(l),w=new URL(l);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",E.ref),w.toString()}}function Ot(T){const l=T.getString("host");let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim(),Z=T.getOptionalString("username"),_=T.getOptionalString("password");if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:w,username:Z,password:_,commitSigningKey:T.getOptionalString("commitSigningKey")}}function It(T){return T.map(Ot)}class ut{integrationConfig;static factory=({config:l})=>{const E=It(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,s.oS)(E.map(w=>new ut(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const E=(0,s.ku)(l);if(l.lineNumber){const w=new URL(E);return w.hash=l.lineNumber.toString(),w.toString()}return E}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function lt(T){const l=T.getString("host");let E=T.getOptionalString("baseUrl"),w=T.getOptionalString("cloneUrl");const Z=T.getOptionalBoolean("disableEditUrl");let _=T.getString("gitilesBaseUrl");const ot=T.getOptionalString("username"),Mt=T.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(w&&!(0,s.AY)(w))throw new Error(`Invalid Gerrit integration config, '${w}' is not a valid cloneUrl`);if(!(0,s.AY)(_))throw new Error(`Invalid Gerrit integration config, '${_}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}`,w?w=(0,Q.trimEnd)(w,"/"):w=E,_=(0,Q.trimEnd)(_,"/"),{host:l,baseUrl:E,cloneUrl:w,disableEditUrl:Z,gitilesBaseUrl:_,username:ot,password:Mt,commitSigningKey:T.getOptionalString("commitSigningKey")}}function xt(T){return T.map(lt)}var gt=t(1048).hp;const bt=")]}'";function Rt(T,l){const E=new URL(T.gitilesBaseUrl),w=new URL(l),_=w.pathname.substring(w.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(Me=>!!Me),ot=_.indexOf("+");if(ot<=0)throw new Error(`Unable to parse project from url: ${l}`);const Mt=trimStart(_.slice(0,ot).join("/"),"/"),zt=_.indexOf("heads");if(zt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const Yt=_[zt+1],re=_.slice(zt+2).join("/");return{branch:Yt,filePath:re===""?"/":re,project:Mt}}function it(T,l){const E=new URL(T.gitilesBaseUrl),w=new URL(l),_=(0,Q.trimStart)(w.pathname.substring(w.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(pe=>!!pe),ot=(0,Q.takeWhile)(_,pe=>pe!=="+");if(ot.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Mt=_.slice(ot.length+1),zt=(0,Q.join)(ot,"/");if(Mt.length>0&&Mt[0]==="HEAD"){const pe=Mt.shift(),qt=(0,Q.join)(Mt,"/");return{project:zt,ref:pe,refType:"head",path:qt||"/",basePath:(0,Q.trimEnd)(l.replace(qt,""),"/")}}if(Mt.length>0&&Mt[0].length===40){const pe=Mt.shift(),qt=(0,Q.join)(Mt,"/");return{project:zt,ref:pe,refType:"sha",path:qt||"/",basePath:(0,Q.trimEnd)(l.replace(qt,""),"/")}}const Yt=(0,Q.join)(Mt,"/"),Me=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(Yt);if(Me){const pe=Me[0];let qt;const{refsReference:te,ref:ge}=Me.groups||{},sn=Yt.replace(pe,"");switch(te){case"heads":qt="branch";break;case"tags":qt="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:zt,ref:ge,refType:qt,path:sn||"/",basePath:(0,Q.trimEnd)(l.replace(sn,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function ft(T,l,E,w){return`${T.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(w,"/")}`}function vt(T,l,E,w){return`${T.baseUrl}/admin/repos/edit/repo/${l}/branch/refs/heads/${E}/file/${(0,Q.trimStart)(w,"/")}`}function st(T,l,E,w){const Z=w==="/"||w===""?".tar.gz":`/${w}.tar.gz`;return`${U(T)}/${l}/+archive/refs/heads/${E}${Z}`}function Et(T,l){const{path:E,ref:w,project:Z,refType:_}=it(T,l),ot=E==="/"||E===""?".tar.gz":`/${E}.tar.gz`;if(_==="branch")return`${U(T)}/${Z}/+archive/refs/heads/${w}${ot}`;if(_==="sha")return`${U(T)}/${Z}/+archive/${w}${ot}`;throw new Error(`Unsupported gitiles ref type: ${_}`)}function at(T){return T.password?"/a/":"/"}function U(T){if(!T.baseUrl||!T.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(T.gitilesBaseUrl.startsWith(T.baseUrl))return T.gitilesBaseUrl.replace(T.baseUrl.concat("/"),T.baseUrl.concat(at(T)));if(T.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return T.gitilesBaseUrl}function V(T,l){const{branch:E,project:w}=Rt(T,l);return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(w)}/branches/${E}`}function rt(T,l){const{project:E}=Rt(T,l);return`${T.cloneUrl}${at(T)}${E}`}function Ct(T,l){const{ref:E,refType:w,path:Z,project:_}=it(T,l);if(w==="branch")return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(_)}/branches/${E}/files/${encodeURIComponent(Z)}/content`;if(w==="sha")return`${T.baseUrl}${at(T)}projects/${encodeURIComponent(_)}/commits/${E}/files/${encodeURIComponent(Z)}/content`;throw new Error(`Unsupported gitiles ref type: ${w}`)}function ht(T){return`${T.baseUrl}${at(T)}projects/`}function Bt(T){const l={};if(!T.password)return l;const E=gt.from(`${T.username}:${T.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function Nt(T){const l=await T.text();if(l.startsWith(bt))try{return JSON.parse(l.slice(bt.length))}catch(E){throw new Error(`Invalid response from Gerrit: ${l.slice(0,10)} - ${E}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${l.slice(0,10)}`)}class kt{integrationConfig;static factory=({config:l})=>{const E=xt(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,s.oS)(E.map(w=>new kt(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){const{url:E,base:w,lineNumber:Z}=l;let _;if(E.startsWith("/")){const{basePath:ot}=it(this.config,w);return ot+E}return E?_=new URL(E,w):_=new URL(w),Z&&(_.hash=Z.toString()),_.toString()}resolveEditUrl(l){if(this.config.disableEditUrl)return l;const E=it(this.config,l);return vt(this.config,E.project,E.ref,E.path)}}var Jt=t(36021);const Wt="gitlab.com",Vt="https://gitlab.com/api/v4";function jt(T){const l=T.getString("host");let E=T.getOptionalString("apiBaseUrl");const w=T.getOptionalString("token")?.trim();let Z=T.getOptionalString("baseUrl");if(E?E=(0,Q.trimEnd)(E,"/"):l===Wt&&(E=Vt),Z?Z=(0,Q.trimEnd)(Z,"/"):Z=`https://${l}`,(0,s.HO)(l)){if(!E||!(0,s.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,s.AY)(Z))throw new Error(`Invalid GitLab integration config, '${Z}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:w,apiBaseUrl:E,baseUrl:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}function Gt(T){const l=T.map(jt);return l.some(E=>E.host===Wt)||l.push({host:Wt,apiBaseUrl:Vt,baseUrl:`https://${Wt}`}),l}function ce(T){let l="";return T.host!==Wt&&(l=new URL(T.baseUrl).pathname),trimEnd(l,"/")}class he{integrationConfig;static factory=({config:l})=>{const E=Gt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,s.oS)(E.map(w=>new he(w)),w=>w.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return Kt(l,"edit")}}function Kt(T,l){return T.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function ne(T){const l=T.getString("host");let E=T.getOptionalString("baseUrl");const w=T.getOptionalString("username"),Z=T.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.AY)(E))throw new Error(`Invalid Gitea integration config, '${E}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:w,password:Z,commitSigningKey:T.getOptionalString("commitSigningKey")}}var le=t(1048).hp;function Ye(T,l){const E=Ve(T,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function ee(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function on(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function We(T,l){const E=Ve(T,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function Re(T){const l={},{username:E,password:w}=T;return w?(E?l.Authorization=`basic ${le.from(`${E}:${w}`).toString("base64")}`:l.Authorization=`token ${w}`,{headers:l}):l}function Ve(T,l){const E=T.baseUrl??`https://${T.host}`;try{const[w,Z,_,ot,Mt,zt,...Yt]=l.replace(E,"").split("/"),re=Yt.join("/").replace(/^\//,"");return{url:E,owner:Z,name:_,ref:zt,path:re}}catch(w){throw new Error(`Incorrect URL: ${l}, ${w}`)}}class se{config;static factory=({config:l})=>{const w=(l.getOptionalConfigArray("integrations.gitea")??[]).map(Z=>ne(Z));return(0,s.oS)(w.map(Z=>new se(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return Ye(this.config,l)}}function qe(T){const l=T.getString("host"),E=T.getOptionalString("token"),w=T.getOptionalString("apiKey");if(!(0,s.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:w,token:E}}function tn(T,l){const E=Ke(T,l);return`${E.baseUrl}/ng/account/${E.accountId}/module/code${E.orgName!==""?`/orgs/${E.orgName}`:""}${E.projectName!==""?`/projects/${E.projectName}`:""}/repos/${E.repoName}/files/${E.branch}/~/${E.path}`}function hn(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/raw/${E.path}?routingId=${E.accountId}&git_ref=refs/heads/${E.refString}`,w}function en(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/archive/${E.branch}.zip?routingId=${E.accountId}`,w}function nn(T,l){const E=Ke(T,l);let w=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(w+=`/${E.orgName}`),E.projectName&&(w+=`/${E.projectName}`),w+=`/${E.repoName}/+/content?routingId=${E.accountId}&include_commit=true&git_ref=refs/heads/${E.branch}`,w}function pn(T){const l={},{token:E,apiKey:w}=T;return w?l["x-api-key"]=w:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function Ke(T,l){const E=`https://${T.host}`;try{const w=new URL(l),Z=w.pathname.split("/").filter(de=>de!==""),_=w.pathname.split("/"),ot=Z.findIndex(de=>de==="account")+1,Mt=Z[ot],zt=Z.findIndex(de=>de==="orgs"),Yt=zt!==-1?Z[zt+1]:"",re=Z.findIndex(de=>de==="projects"),Me=re!==-1?Z[re+1]:"",pe=Z.findIndex((de,$t)=>de==="repos"&&$t>Math.max(ot,zt,re))+1,qt=Z[pe],te=_.slice(_.findIndex(de=>de==="files"||de==="edit")+1),ge=te.findIndex(de=>de==="~"),sn=te.slice(0,ge).join("/"),gn=ge!==-1?te.slice(ge+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Mt,orgName:Yt,projectName:Me,refString:sn,path:gn,repoName:qt,refDashStr:te.slice(0,ge).join("-"),branch:ge!==-1?te.slice(0,ge).join("/"):te.join("/")}}catch(w){throw new Error(`Incorrect URL: ${l}, ${w}`)}}class ze{config;static factory=({config:l})=>{const w=(l.getOptionalConfigArray("integrations.harness")??[]).map(Z=>qe(Z));return(0,s.oS)(w.map(Z=>new ze(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return tn(this.config,l)}}const He="blob.core.windows.net";function be(T){const l=T.getOptionalString("endpoint"),E=T.getString("accountName"),w=T.getOptionalString("accountKey")?.trim(),Z=T.getOptionalString("sasToken")?.trim(),_=T.getOptionalString("connectionString")?.trim(),ot=T.getOptionalString("endpointSuffix")?.trim();let Mt,zt;if(l){try{const re=new URL(l);Mt=re.host,zt=re.pathname}catch{throw new Error(`invalid azureBlobStorage integration config, endpoint '${l}' is not a valid URL`)}if(zt!=="/")throw new Error(`invalid azureBlobStorage integration config, endpoints cannot contain path, got '${l}'`)}else Mt=He;const Yt=T.has("aadCredential")?{clientId:T.getString("aadCredential.clientId"),tenantId:T.getString("aadCredential.tenantId"),clientSecret:T.getString("aadCredential.clientSecret")?.trim()}:void 0;if(w&&Z)throw new Error(`Invalid Azure Blob Storage config for ${E}: Both account key and SAS token cannot be used simultaneously.`);if(Yt&&(w||Z))throw new Error(`Invalid Azure Blob Storage config for ${E}: Cannot use both Azure AD credentials and account keys/SAS tokens for the same account.`);return{host:Mt,endpoint:l,accountName:E,accountKey:w,sasToken:Z,connectionString:_,endpointSuffix:ot,aadCredential:Yt}}function Qe(T){const l=T.map(be);return l.some(E=>E.host===He)||l.push({host:He}),l}class Ze{integrationConfig;static factory=({config:l})=>{const E=Qe(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,s.oS)(E.map(w=>new Ze(w)),w=>w.config.host)};get type(){return"azureBlobStorage"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return l}}class je{byType;static fromConfig(l){return new je({awsS3:b.factory({config:l}),awsCodeCommit:u.factory({config:l}),azureBlobStorage:Ze.factory({config:l}),azure:$.factory({config:l}),bitbucket:At.factory({config:l}),bitbucketCloud:G.factory({config:l}),bitbucketServer:ut.factory({config:l}),gerrit:kt.factory({config:l}),github:Jt.U.factory({config:l}),gitlab:he.factory({config:l}),gitea:se.factory({config:l}),harness:ze.factory({config:l})})}constructor(l){this.byType=l}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}get azureBlobStorage(){return this.byType.azureBlobStorage}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}get gitea(){return this.byType.gitea}get harness(){return this.byType.harness}list(){return Object.values(this.byType).flatMap(l=>l.list())}byUrl(l){let E=Object.values(this.byType).map(w=>w.byUrl(l)).filter(Boolean);if(E.length>1){const w=E.filter(Z=>!(Z instanceof At));w.length!==0&&(E=w)}return E[0]}byHost(l){return Object.values(this.byType).map(E=>E.byHost(l)).find(Boolean)}resolveUrl(l){const E=this.byUrl(l.base);return E?E.resolveUrl(l):(0,s.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var Ue=t(55309);class Le{static fromConfig(l){return je.fromConfig(l)}}const an=(0,Ue.y)({id:"integration.scmintegrations"})},36021:(H,S,t)=>{"use strict";t.d(S,{U:()=>m,F:()=>u});var s=t(59869),a=t(45250);const x="github.com",p="https://api.github.com",b="https://raw.githubusercontent.com";function h(v){const g=v.getOptionalString("host")??x;let C=v.getOptionalString("apiBaseUrl"),O=v.getOptionalString("rawBaseUrl");const P=v.getOptionalString("token")?.trim(),B=v.getOptionalConfigArray("apps")?.map(L=>({appId:L.getNumber("appId"),clientId:L.getString("clientId"),clientSecret:L.getString("clientSecret"),webhookSecret:L.getOptionalString("webhookSecret"),privateKey:L.getString("privateKey"),allowedInstallationOwners:L.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,s.HO)(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return C?C=(0,a.trimEnd)(C,"/"):g===x&&(C=p),O?O=(0,a.trimEnd)(O,"/"):g===x&&(O=b),{host:g,apiBaseUrl:C,rawBaseUrl:O,token:P,apps:B}}function d(v){const g=v.map(h);return g.some(C=>C.host===x)||g.push({host:x,apiBaseUrl:p,rawBaseUrl:b}),g}class m{integrationConfig;static factory=({config:g})=>{const C=d(g.getOptionalConfigArray("integrations.github")??[]);return(0,s.oS)(C.map(O=>new m(O)),O=>O.config.host)};constructor(g){this.integrationConfig=g}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return u((0,s.ku)(g),"tree")}resolveEditUrl(g){return u(g,"edit")}parseRateLimitInfo(g){return{isRateLimited:g.status===429||g.status===403&&g.headers.get("x-ratelimit-remaining")==="0"}}}function u(v,g){return v.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,O,P,B)=>`//${O}/${P}/${B}/${g}/`)}},59869:(H,S,t)=>{"use strict";t.d(S,{AY:()=>h,HO:()=>b,ku:()=>m,oS:()=>d});var s=t(52536),a=t.n(s),x=t(45250),p=t.n(x);function b(v){const g=new URL("http://example.com");return g.host=v,g.host===v}function h(v){try{return new URL(v),!0}catch{return!1}}function d(v,g){return{list(){return v},byUrl(C){try{const O=typeof C=="string"?new URL(C):C;return v.find(P=>g(P)===O.host)}catch{return}},byHost(C){return v.find(O=>g(O)===C)}}}function m(v){const{url:g,base:C,lineNumber:O}=v;try{return new URL(g),g}catch{}let P;if(g.startsWith("/")){const{href:B,filepath:L}=a()(C);P=new URL(B);const I=(0,x.trimEnd)(P.pathname.substring(0,P.pathname.length-L.length),"/");P.pathname=`${I}${g}`}else P=new URL(g,C);return P.search=new URL(C).search,O&&(P.hash=`L${O}`),P.toString()}function u(v){beforeAll(()=>v.listen({onUnhandledRequest:"error"})),afterAll(()=>v.close()),afterEach(()=>v.resetHandlers())}},71543:(H,S,t)=>{"use strict";var s={};t.r(s),t.d(s,{TechDocsPlugin:()=>b.Ju});var a=t(31085),x=t(25873),p=t(18690),b=t(39278),h=t(8915),d=t(72020),m=t(99730),u=t(64947),v=t(12173),g=t(22020),C=t(68146),O=t(73657);function P({children:r}){return(0,p.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(p.fS,{children:r})}const B=()=>(0,a.jsx)(v.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),L=({step:r,error:e})=>{let n="";return r==="load-config"?n=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(n=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(P,{children:(0,a.jsx)(v.M,{statusMessage:n,stack:e.stack})})},I=({error:r,resetError:e,plugin:n})=>(0,a.jsx)(g.b,{title:`Error in ${n?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(u.A,{variant:"outlined",onClick:e,children:"Retry"})}),M={Progress:C.k,Router:O.Kd,NotFoundErrorPage:B,BootErrorPage:L,ErrorBoundaryFallback:I},$="Invalid discovery URL pattern,";class W{parts;static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),o=n.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${$} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${$} URL must not have a hash`);if(i.search)throw new Error(`${$} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${$} URL must not end with a slash`);return new W(n)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}class X{endpoints;defaultEndpoint;static fromConfig(e,n){const o=n?.pathPattern??"/api/{{ pluginId }}",i=e.getString("backend.baseUrl"),c=e.getOptionalConfigArray("discovery.endpoints")?.flatMap(A=>{const y=typeof A.get("target")=="object"?A.getOptionalString("target.external"):A.getString("target");if(!y)return[];const R=W.compile(y);return A.getStringArray("plugins").map(N=>[N,R])});return new X(new Map(c),W.compile(`${i}${o}`))}constructor(e,n){this.endpoints=e,this.defaultEndpoint=n}async getBaseUrl(e){const n=this.endpoints.get(e);return n?n.getBaseUrl(e):this.defaultEndpoint.getBaseUrl(e)}}var z=t(96403),Y=t.n(z);class K{isClosed=!1;terminatingError;observable=new(Y())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}));subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class dt{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Y())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class G{subject=new K;post(e){this.subject.next(e)}alert$(){return this.subject}}class Q{captureEvent(e){}}class J{alertApi;errorApi;constructor(e,n){this.alertApi=e,this.errorApi=n}post(e,n){return n?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}}class ct{subject=new K;post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}}class pt{static forward(e,n){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,n)})}}const yt=new Map;class At{namespace;errorApi;constructor(e,n){this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(Y())(o=>(this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}static hasSubscribed=!1;static create(e){return new At(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[n,o]of yt.entries())e.key?.startsWith(n)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let n,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(n=JSON.parse(i,(c,A)=>(typeof A=="object"&&A!==null&&Object.freeze(A),A)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:o}}forBucket(e){const n=`${this.namespace}/${e}`;return yt.has(n)||yt.set(n,new At(n,this.errorApi)),yt.get(n)}async set(e,n){localStorage.setItem(this.getKeyName(e),JSON.stringify(n)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return At.hasSubscribed||(At.addStorageEventListener(),At.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const n=e?.slice(`${this.namespace}/`.length);n.includes("/")||this.notifyChanges(decodeURIComponent(n))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const n=this.snapshot(e);for(const o of this.subscribers)o.next(n)}subscribers;observable}function Ot(r){let e=r.baseImplementation||t.g.fetch;const n=[r.middleware??[]].flat().reverse();for(const o of n)e=o.apply(e);return{fetch:e}}class It{identityApi;allowUrl;headerName;headerValue;static create(e){const n=ut(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new It(e.identityApi,n,o,i)}static getDiscoveryUrlPrefixes(e){return(e.getOptionalConfigArray("discovery.endpoints")||[]).flatMap(o=>{const i=typeof o.get("target")=="object"?o.getString("target.external"):o.getString("target");return o.getStringArray("plugins").map(A=>i.replace(/\{\{\s*pluginId\s*\}\}/g,A))})}constructor(e,n,o,i){this.identityApi=e,this.allowUrl=n,this.headerName=o,this.headerValue=i}apply(e){return async(n,o)=>{const i=new Request(n,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(n,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function ut(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?lt(r.urlPrefixAllowlist):r.config?lt([r.config.getString("backend.baseUrl"),...It.getDiscoveryUrlPrefixes(r.config)]):()=>!1}function lt(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(o=>n===o||n.startsWith(`${o}/`))}function xt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class gt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(n,o)=>{const i=new Request(n,o),c="plugin://";if(!i.url.startsWith(c))return e(n,o);const{hostname:A,pathname:y,search:R,hash:N,username:tt,password:mt}=new URL(`http://${i.url.substring(c.length)}`);let St=await this.discoveryApi.getBaseUrl(A);if(tt||mt){const Dt=new URL(St),Zt=`${tt}${mt?`:${mt}`:""}@`;St=`${Dt.protocol}//${Zt}${Dt.host}${Dt.pathname}`}const Tt=`${xt(St,y)}${R}${N}`;return e(Tt,typeof n=="string"||bt(n)?o:n)}}}function bt(r){return typeof r=="object"&&r?.constructor===URL}class Rt{static resolvePluginProtocol(e){return new gt(e.discoveryApi)}static injectIdentityAuth(e){return It.create(e)}constructor(){}}function it(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function ft(r,...e){const n=new Set(r);for(const o of e)for(const i of o)n.add(i);return n}class vt{requests=[];subject=new dt(this.getCurrentPending());request(e){return new Promise((n,o)=>{this.requests.push({scopes:e,resolve:n,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(o=>it(e,o.scopes)?(o.resolve(n),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(n=>n.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((n,o)=>ft(n,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}}class st{subject=new K;currentRequests=[];handlerCount=0;createAuthRequester(e){const n=new vt,o=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),A=this.makeAuthRequest(i,e);A?c[o]=A:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>n.request(i)}makeAuthRequest(e,n){const{scopes:o}=e;if(o)return{provider:n.provider,trigger:async()=>{const i=await n.onAuthRequest(o);e.resolve(i)},reject:()=>{const i=new Error("Login failed, rejected by user");i.name="RejectedError",e.reject(i)}}}authRequest$(){return this.subject}}function Et(r){return new Promise((e,n)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,A=window.screen.height/2-i/2,y=new URL(r.url).origin,R=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${A},left=${c}`);let N="";if(!R||typeof R.closed>"u"||R.closed){const Tt=new Error("Failed to open auth popup.");Tt.name="PopupRejectedError",n(Tt);return}const tt=Tt=>{if(Tt.source!==R||Tt.origin!==y)return;const{data:Dt}=Tt;if(Dt.type==="config_info"){N=Dt.targetOrigin;return}if(Dt.type!=="authorization_response")return;const Zt=Dt;if("error"in Zt){const me=new Error(Zt.error.message);me.name=Zt.error.name,n(me)}else e(Zt.response);St()},mt=setInterval(()=>{if(R.closed){const Tt=`Login failed, ${N&&N!==window.location.origin?`Incorrect app origin, expected ${N}`:"popup was closed"}`,Dt=new Error(Tt);Dt.name="PopupClosedError",n(Dt),St()}},100);function St(){window.removeEventListener("message",tt),clearInterval(mt)}window.addEventListener("message",tt)})}let at=!1;function U(r){return[...r].join(" ")}class V{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:n,discoveryApi:o,environment:i,provider:c,joinScopes:A=U,oauthRequestApi:y,sessionTransform:R=tt=>tt,popupOptions:N}=e;!at&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),at=!0),this.enableExperimentalRedirectFlow=n?n.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=y.createAuthRequester({provider:c,onAuthRequest:async tt=>this.enableExperimentalRedirectFlow?this.executeRedirect(tt):this.showPopup(tt)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=A,this.sessionTransform=R,this.popupOptions=N}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const n=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e.scopes)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!n.ok){const i=new Error(`Auth refresh request failed, ${n.statusText}`);throw i.status=n.status,i}const o=await n.json();if(o.error){const i=new Error(o.error.message);throw o.error.name&&(i.name=o.error.name),i}return await this.sessionTransform(o)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(n=>{throw new Error(`Logout request failed, ${n}`)});if(!e.ok){const n=new Error(`Logout request failed, ${e.statusText}`);throw n.status=e.status,n}}async showPopup(e){const n=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:n,origin:window.location.origin,flow:"popup"}),i=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,c=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,A=await Et({url:o,name:`${this.provider.title} Login`,width:i,height:c});return await this.sessionTransform(A)}async executeRedirect(e){const n=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:n,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,n){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...n,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return n?`?${n}`:""}}function rt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class Ct{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return rt(o,n)}getExtendedScope(e,n){const o=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const i=this.options.sessionScopes(e);for(const c of i)o.add(c)}if(n)for(const i of n)o.add(i);return o}}var ht=t(55309),Bt=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Nt=(0,ht.y)({id:"core.auth.google"}),kt=(0,ht.y)({id:"core.auth.github"}),Jt=(0,ht.y)({id:"core.auth.okta"}),Wt=(0,ht.y)({id:"core.auth.gitlab"}),Vt=(0,ht.y)({id:"core.auth.microsoft"}),jt=(0,ht.y)({id:"core.auth.onelogin"}),Gt=(0,ht.y)({id:"core.auth.bitbucket"}),ce=(0,ht.y)({id:"core.auth.bitbucket-server"}),he=(0,ht.y)({id:"core.auth.atlassian"}),Kt=(0,ht.y)({id:"core.auth.vmware-cloud"});class ne{subject=new dt(Bt.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Bt.SignedIn:Bt.SignedOut))}sessionState$(){return this.subject}}class le{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new ne;refreshPromise;currentSession;constructor(e){const{connector:n,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=n,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new Ct({sessionScopes:i,defaultScopes:o})}async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const o=await this.collapsedSessionRefresh(e.scopes),i=this.sessionScopesFunc(this.currentSession),c=this.sessionScopesFunc(o);return rt(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!e.instantPopup)try{const n=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=n,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession({scopes:this.helper.getExtendedScope(this.currentSession,e)});try{const n=await this.refreshPromise;if(!this.helper.sessionExistsAndHasScope(n,e))throw new Error("Refreshed session did not receive the required scopes");return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}}const Ye={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class ee{static createAuthConnector(e){if("authConnector"in e)return e.authConnector;const{scopeTransform:n=N=>N,configApi:o,discoveryApi:i,environment:c="development",provider:A=Ye,oauthRequestApi:y,popupOptions:R}=e;return new V({configApi:o,discoveryApi:i,environment:c,provider:A,oauthRequestApi:y,sessionTransform({backstageIdentity:N,...tt}){const mt={...tt,providerInfo:{idToken:tt.providerInfo.idToken,accessToken:tt.providerInfo.accessToken,scopes:ee.normalizeScopes(tt.providerInfo.scope,{scopeTransform:n}),expiresAt:tt.providerInfo.expiresInSeconds?new Date(Date.now()+tt.providerInfo.expiresInSeconds*1e3):void 0}};return N&&(mt.backstageIdentity={token:N.token,identity:N.identity,expiresAt:N.expiresInSeconds?new Date(Date.now()+N.expiresInSeconds*1e3):void 0}),mt},popupOptions:R})}static create(e){const{defaultScopes:n=[],scopeTransform:o=A=>A}=e,i=ee.createAuthConnector(e),c=new le({connector:i,defaultScopes:new Set(n),sessionScopes:A=>A.providerInfo.scopes,sessionShouldRefresh:A=>{let y=1/0;return A.providerInfo?.expiresAt&&(y=Math.min(y,(A.providerInfo.expiresAt.getTime()-Date.now())/1e3)),A.backstageIdentity?.expiresAt&&(y=Math.min(y,(A.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),y<60*3}});return new ee({sessionManager:c,scopeTransform:o})}sessionManager;scopeTransform;constructor(e){this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const o=ee.normalizeScopes(e,{scopeTransform:this.scopeTransform});return(await this.sessionManager.getSession({...n,scopes:o}))?.providerInfo.accessToken??""}async getIdToken(e={}){return(await this.sessionManager.getSession({...e,scopes:new Set(["openid"])}))?.providerInfo.idToken??""}async getBackstageIdentity(e={}){return(await this.sessionManager.getSession(e))?.backstageIdentity}async getProfile(e={}){return(await this.sessionManager.getSession(e))?.profile}static normalizeScopes(e,n){if(!e)return new Set;const o=Array.isArray(e)?e:e.split(/[\s|,]/).filter(Boolean),i=n?n.scopeTransform(o):o;return new Set(i)}}const on={id:"google",title:"Google",icon:()=>null},We="https://www.googleapis.com/auth/";class Re{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:A=on,defaultScopes:y=["openid",`${We}userinfo.email`,`${We}userinfo.profile`]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:A,environment:c,defaultScopes:y,scopeTransform(R){return R.map(N=>N==="openid"?N:N==="profile"||N==="email"?`${We}userinfo.${N}`:N.startsWith(We)?N:`${We}${N}`)}})}}const Ve={id:"microsoft",title:"Microsoft",icon:()=>null};class se{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new se(e)}constructor(e){const{configApi:n,environment:o="development",provider:i=Ve,oauthRequestApi:c,discoveryApi:A,defaultScopes:y=["openid","offline_access","profile","email","User.Read"],scopeTransform:R=N=>N.concat("offline_access")}=e;this.configApi=n,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=A,this.scopeTransform=R,this.oauth2={[se.MicrosoftGraphID]:ee.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:y})}}microsoftGraph(){return this.oauth2[se.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(se.resourceForScope).filter(i=>i!=="openid"))];if(n.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${n.join(", ")}. Access tokens can only have a single audience.`));const o=n[0]??se.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const n=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(n){const{resourceURI:o}=n;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return se.MicrosoftGraphID}}async getAccessToken(e,n){const o=e===void 0?se.MicrosoftGraphID:await se.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=ee.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,n)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}}const qe={id:"github",title:"GitHub",icon:()=>null};class tn{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=qe,oauthRequestApi:A,defaultScopes:y=["read:user"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const hn={id:"okta",title:"Okta",icon:()=>null},en=new Set(["openid","profile","email","phone","address","groups","offline_access"]),nn="okta.";class pn{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=hn,oauthRequestApi:A,defaultScopes:y=["openid","email","profile","offline_access"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y,scopeTransform(R){return R.map(N=>en.has(N)||N.startsWith(nn)?N:`${nn}${N}`)}})}}const Ke={id:"gitlab",title:"GitLab",icon:()=>null};class ze{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Ke,oauthRequestApi:A,defaultScopes:y=["read_user"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const He={id:"onelogin",title:"onelogin",icon:()=>null},be=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Qe="onelogin.";class Ze{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=He,oauthRequestApi:A}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(y){return y.map(R=>be.has(R)||R.startsWith(Qe)?R:`${Qe}${R}`)}})}}const je={id:"bitbucket",title:"Bitbucket",icon:()=>null};class Ue{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=je,oauthRequestApi:A,defaultScopes:y=["account"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const Le={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class an{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Le,oauthRequestApi:A,defaultScopes:y=["PROJECT_ADMIN"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i,defaultScopes:y})}}const T={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=T,oauthRequestApi:A}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:A,provider:c,environment:i})}}const E={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class w{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:A=E,defaultScopes:y=["openid"]}=e;return ee.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:A,environment:c,defaultScopes:y})}}var Z=t(12935),_=t(57405),ot=t(65461),Mt=t(36017),zt=t(99303),Yt=t(39837);const re=(0,ht.y)({id:"core.storage"});var Me=t(70795),pe=t(16009);const qt=(0,ht.y)({id:"core.oauthrequest"});var te=t(96824),ge=t(70835),sn=t(10288),gn=t.n(sn),de=t(20938),$t=t(7578),$e=t(54241),Ln=t(13646);const fn=$t.z.lazy(()=>$t.z.object({rule:$t.z.string(),resourceType:$t.z.string(),params:$t.z.record($t.z.any()).optional()}).or($t.z.object({anyOf:$t.z.array(fn).nonempty()})).or($t.z.object({allOf:$t.z.array(fn).nonempty()})).or($t.z.object({not:fn}))),Mn=$t.z.object({result:$t.z.literal($e.b.ALLOW).or($t.z.literal($e.b.DENY))}),as=$t.z.object({result:$t.z.array($t.z.union([$t.z.literal($e.b.ALLOW),$t.z.literal($e.b.DENY)]))}).or(Mn),is=$t.z.union([$t.z.object({result:$t.z.literal($e.b.ALLOW).or($t.z.literal($e.b.DENY))}),$t.z.object({result:$t.z.literal($e.b.CONDITIONAL),pluginId:$t.z.string(),resourceType:$t.z.string(),conditions:fn})]),Hs=(r,e)=>$t.z.object({items:$t.z.array($t.z.intersection($t.z.object({id:$t.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class cs{enabled;discovery;enableBatchedRequests;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1,this.enableBatchedRequests=e.config.getOptionalBoolean("permission.EXPERIMENTAL_enableBatchedRequests")??!1}async authorize(e,n){return this.enabled?this.enableBatchedRequests?this.makeBatchedRequest(e,n):this.makeRequest(e,Mn,n):e.map(o=>({result:$e.b.ALLOW}))}async authorizeConditional(e,n){return this.enabled?this.makeRequest(e,is,n):e.map(o=>({result:$e.b.ALLOW}))}async makeRequest(e,n,o){const i={items:e.map(y=>({id:de.A(),...y}))},A=(await this.makeRawRequest(i,n,o)).items.reduce((y,R)=>(y[R.id]=R,y),{});return i.items.map(y=>A[y.id])}async makeBatchedRequest(e,n){const o={};for(const A of e){const{permission:y,resourceRef:R}=A;(0,Ln.OL)(y)?(o[y.name]||={permission:y,resourceRef:[],id:de.A()},R&&o[y.name].resourceRef?.push(R)):o[y.name]||={permission:y,id:de.A()}}const c=(await this.makeRawRequest({items:Object.values(o)},as,n)).items.reduce((A,y)=>(A[y.id]=y,A),{});return e.map(A=>{const{id:y}=o[A.permission.name],R=c[y];return Array.isArray(R.result)?{result:A.resourceRef?R.result.shift():R.result[0]}:{result:R.result}})}async makeRawRequest(e,n,o){const i=await this.discovery.getBaseUrl("permission"),c=await gn()(`${i}/authorize`,{method:"POST",body:JSON.stringify(e),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!c.ok)throw await ge.o.fromResponse(c);const A=await c.json();return Hs(n,new Set(e.items.map(({id:y})=>y))).parse(A)}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class bn{permissionClient;identityApi;constructor(e,n){this.permissionClient=e,this.identityApi=n}static create(e){const{config:n,discovery:o,identity:i}=e,c=new cs({discovery:o,config:n});return new bn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const ls=[(0,Z.b)({api:_.I,deps:{configApi:ot.U},factory:({configApi:r})=>X.fromConfig(r)}),(0,Z.b)({api:Mt.k,deps:{},factory:()=>new G}),(0,Z.b)({api:zt.c,deps:{},factory:()=>new Q}),(0,Z.b)({api:Yt.m,deps:{alertApi:Mt.k},factory:({alertApi:r})=>{const e=new J(r,new ct);return pt.forward(e,{hidden:!1}),e}}),(0,Z.b)({api:re,deps:{errorApi:Yt.m},factory:({errorApi:r})=>At.create({errorApi:r})}),(0,Z.b)({api:Me.a,deps:{configApi:ot.U,identityApi:pe.K,discoveryApi:_.I},factory:({configApi:r,identityApi:e,discoveryApi:n})=>Ot({middleware:[Rt.resolvePluginProtocol({discoveryApi:n}),Rt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Z.b)({api:qt,deps:{},factory:()=>new st}),(0,Z.b)({api:Nt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Re.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Vt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>se.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:kt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>tn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Jt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>pn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Wt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:jt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Gt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ue.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:ce,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>an.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:he,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>l.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Kt,deps:{discoveryApi:_.I,oauthRequestApi:qt,configApi:ot.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>w.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:te.x,deps:{discovery:_.I,identity:pe.K,config:ot.U},factory:({config:r,discovery:e,identity:n})=>bn.create({config:r,discovery:e,identity:n})})];var Bn=t(14451),jn=t(27799),Un=t(94389),ds=t(20947),us=t(20473),$n=t(45917),hs=t(39347),Fn=t(63309),mn=t(82451),ps=t(85121),Nn=t(17400),gs=t(42226),fs=t(69550),kn=t(52755),Wn=t(89350),ms=t(8911),Sn=t(33602),On=t(48108),ys=t(77225),Kn=t(55700),zn=t(71865),vs=t(80109),Es=t(15303),As=t(39330);const xs={brokenImage:jn.A,catalog:ms.A,scaffolder:ds.A,techdocs:us.A,search:$n.A,chat:hs.A,dashboard:Fn.A,docs:mn.A,email:ps.A,github:gs.A,group:Sn.A,help:fs.A,"kind:api":Nn.A,"kind:component":Wn.A,"kind:domain":Bn.A,"kind:group":Sn.A,"kind:location":kn.A,"kind:system":Un.A,"kind:user":On.A,"kind:resource":Kn.A,"kind:template":zn.A,user:On.A,warning:ys.A,star:vs.A,unstarred:Es.A,externalLink:As.A};var Cs=t(58733),bs=t(55288),Ss=t(91360),Os=t(50868),Ps=t(12285),Ts=t(87271),Rs=t(64636);Rs.A.configure(r=>`v5-${r}`);const Hn=(0,bs.A)({productionPrefix:"jss4-"});function Vn(r){const{children:e,theme:n,noCssBaseline:o=!1}=r,i=n.getTheme("v4"),c=n.getTheme("v5");let A;o||(A=(0,a.jsx)(Cs.Ay,{}));let y=(0,a.jsxs)(a.Fragment,{children:[A,e]});return i&&(y=(0,a.jsx)(Ss.Ay,{generateClassName:Hn,children:(0,a.jsx)(Os.A,{theme:i,children:y})})),c&&(y=(0,a.jsx)(Ps.A,{injectFirst:!0,children:(0,a.jsx)(Ts.A,{theme:c,children:y})})),y}const Gn={light:{type:"light",mode:"light",background:{default:"#F8F8F8",paper:"#FFFFFF"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#1F5493",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#1F5493"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",closeButtonColor:"#FFFFFF",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:"#FFD600",navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},dark:{type:"dark",mode:"dark",background:{default:"#333333",paper:"#424242"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",closeButtonColor:"#FFFFFF",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:"#FFD600",navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}}};var ws=t(98392),Is=t(17161);const Fe={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},Ne={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function we(r){const{colors:e,shape:n,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,A=`${n}, ${c}`,y=o?.fontColor??"#FFFFFF";return{colors:e,shape:n,backgroundImage:A,fontColor:y}}const Ds={home:we({colors:Ne.teal,shape:Fe.wave}),documentation:we({colors:Ne.pinkSea,shape:Fe.wave2}),tool:we({colors:Ne.purpleSky,shape:Fe.round}),service:we({colors:Ne.marineBlue,shape:Fe.wave}),website:we({colors:Ne.veryBlue,shape:Fe.wave}),library:we({colors:Ne.rubyRed,shape:Fe.wave}),other:we({colors:Ne.darkGrey,shape:Fe.wave}),app:we({colors:Ne.toastyOrange,shape:Fe.wave}),apis:we({colors:Ne.teal,shape:Fe.wave2}),card:we({colors:Ne.greens,shape:Fe.wave})},yn=16,Yn='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',Ls="home",Pn={htmlFontSize:yn,fontFamily:Yn,h1:{fontSize:54,fontWeight:700,marginBottom:10},h2:{fontSize:40,fontWeight:700,marginBottom:8},h3:{fontSize:32,fontWeight:700,marginBottom:6},h4:{fontWeight:700,fontSize:28,marginBottom:6},h5:{fontWeight:700,fontSize:24,marginBottom:4},h6:{fontWeight:700,fontSize:20,marginBottom:2}};function Vs(r){const{palette:e,htmlFontSize:n=yn,fontFamily:o=Yn,defaultPageTheme:i=Ls,pageTheme:c=Ds,typography:A}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return Pn.htmlFontSize=n,Pn.fontFamily=o,{palette:e,typography:A??Pn,page:c[i],getPageTheme:({themeId:y})=>c[y]??c[i]}}var f=t(80012);const D={MuiCssBaseline:{styleOverrides:r=>({html:{height:"100%",fontFamily:r.typography.fontFamily},body:{height:"100%",fontFamily:r.typography.fontFamily,overscrollBehaviorY:"none",fontSize:"0.875rem",lineHeight:1.43,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:r.palette.background.paper,width:"1em"},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:r.palette.textVerySubtle,border:`3px solid ${r.palette.background.paper}`},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:r.palette.mode==="dark"?(0,f.a)(r.palette.textVerySubtle,.2):(0,f.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,f.a)(r.palette.textVerySubtle,.2):(0,f.e$)(r.palette.textVerySubtle,.2)}},a:{color:"inherit",textDecoration:"none"}})},MuiGrid:{defaultProps:{spacing:2}},MuiSwitch:{defaultProps:{color:"primary"}},MuiTableRow:{styleOverrides:{root:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.default}}),hover:{"&:hover":{cursor:"pointer"}},head:({theme:r})=>({"&:nth-of-type(odd)":{backgroundColor:r.palette.background.paper}})}},MuiTableCell:{styleOverrides:{root:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:r.spacing(3,2,3,2.5),borderBottom:0}),sizeSmall:({theme:r})=>({padding:r.spacing(1.5,2,1.5,2.5)}),head:({theme:r})=>({wordBreak:"break-word",overflow:"hidden",color:r.palette.textSubtle,fontWeight:"normal",lineHeight:"1"})}},MuiTabs:{styleOverrides:{root:{minHeight:24}}},MuiTab:{styleOverrides:{root:({theme:r})=>({color:r.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,f.e$)(r.palette.link,.3),background:(0,f.a)(r.palette.link,.95)},[r.breakpoints.up("md")]:{minWidth:120,fontSize:r.typography.pxToRem(14),fontWeight:500}}),textColorPrimary:({theme:r})=>({color:r.palette.link})}},MuiTableSortLabel:{styleOverrides:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"},"&:focus svg":{opacity:.5},"&.Mui-active":{fontWeight:"bold",color:"inherit"}}}},MuiListItemText:{styleOverrides:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}},MuiButton:{styleOverrides:{text:{padding:void 0}}},MuiChip:{styleOverrides:{root:({theme:r})=>({marginRight:r.spacing(1),marginBottom:r.spacing(1)}),label:({theme:r})=>({lineHeight:r.spacing(2.5),fontWeight:r.typography.fontWeightMedium,fontSize:r.spacing(1.75)}),labelSmall:({theme:r})=>({fontSize:r.spacing(1.5)}),deleteIcon:({theme:r})=>({width:r.spacing(3),height:r.spacing(3),margin:r.spacing(0,.75,0,-.75)}),deleteIconSmall:({theme:r})=>({width:r.spacing(2),height:r.spacing(2),margin:r.spacing(0,.5,0,-.5)})}},MuiCard:{styleOverrides:{root:{display:"flex",flexDirection:"column"}}},MuiCardHeader:{styleOverrides:{root:{paddingBottom:0}}},MuiCardContent:{styleOverrides:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}}},MuiCardActions:{styleOverrides:{root:{justifyContent:"flex-end"}}},MuiLink:{defaultProps:{underline:"hover"}},MuiPaper:{styleOverrides:{root:{backgroundImage:"unset"}}}},j=r=>(...e)=>{const n=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return n.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function F(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function k(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},o=r.spacing(1);return typeof o=="number"&&(n.spacing=j(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:n})]:[i,c]))}return e}}const q=/^&.Mui-([\w-]+)$/;function et(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const o=r[n];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,A=c.match(q);if(A){const[,y]=A,{[c]:R,...N}=o;R&&(e={...e,[n]:N,[y]:R})}}}return e}function Pt(r,e={}){const n={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?n[i]=F(r,c.styleOverrides):n[i]=et(k(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:n,props:o}}class wt{#t=new Map;constructor(e,n){this.#t=new Map,e&&this.#t.set("v4",e),n&&this.#t.set("v5",n)}getTheme(e){return this.#t.get(e)}}function Ut(r){const e=Vs(r),n={...D,...r.components},o=(0,Is.A)({...e,components:n}),i=Pt(o,n),c={...(0,ws.A)(e),...i};return new wt(c,o)}function Lt(r){const e=adaptV4Theme(r),n=createTheme(r);return new wt(n,createV5Theme(e))}const Ft={light:Ut({palette:Gn.light}),dark:Ut({palette:Gn.dark})};var Xt=t(75962),fe=t(87145);const ue=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(fe.A,{}),Provider:({children:r})=>(0,a.jsx)(Vn,{theme:Ft.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(Xt.A,{}),Provider:({children:r})=>(0,a.jsx)(Vn,{theme:Ft.dark,children:r})}];var nt=t(14041),Se=t(73466),ye=t(39067),Ht=t.n(ye);class Qt{holders;constructor(...e){this.holders=e}get(e){for(const n of this.holders){const o=n.get(e);if(o)return o}}}var ie=t(43836),ve=t(10602);const oe=(0,ie.tK)("api-context"),ae=r=>{const{apis:e,children:n}=r,o=(0,nt.useContext)(oe)?.atVersion(1),i=o?new Qt(e,o):e;return(0,a.jsx)(oe.Provider,{value:(0,ve.B)({1:i}),children:n})};ae.propTypes={apis:Ht().shape({get:Ht().func.isRequired}).isRequired,children:Ht().node};const Ee=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function ke(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Oe(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Oe):Object.fromEntries(Object.entries(r).map(([e,n])=>[e,Oe(n)]))}function Ge(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:Ge(e);if(typeof r!="object"||Array.isArray(r))return r;const n=ke(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(n)])){const c=Ge(r[i],n[i]);c!==void 0&&(o[i]=c)}return o}function Je(r){if(r===null)return"null";if(Array.isArray(r))return"array";const e=typeof r;return e==="number"&&isNaN(r)?"nan":e==="string"&&r===""?"empty-string":e}const _t={type(r,e,n,o){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class cn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new cn(void 0):e.reduce((n,{data:o,context:i,filteredKeys:c,deprecatedKeys:A})=>{const y=new cn(o,i,n);if(y.filteredKeys=c,A)for(const{key:R,description:N}of A)console.warn(`The configuration key '${R}' of ${i} is deprecated and may be removed soon. ${N||""}`);return y},void 0)}constructor(e,n="mock-config",o,i=""){this.data=e,this.context=n,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const n=this.readValue(e);return n===null?!1:n!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],n=this.fallback?.keys()??[];return[...new Set([...e,...n])].filter(o=>this.data?.[o]!==null)}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e??""),this.context));return n}getOptional(e){const n=Oe(this.readValue(e)),o=this.fallback?.getOptional(e);if(n!==null)return n===void 0?Ge(o):o===void 0?Ge(n):Ge(n,o)}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalConfig(e){const n=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(ke(n))return this.copy(n,e,o);if(n!==null){if(n!==void 0)throw new TypeError(_t.type(this.fullKey(e),this.context,Je(n),"object"));return o}}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!ke(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(n)return n.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalNumber(e){const n=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const o=Number(n);if(!Number.isFinite(o))throw new Error(_t.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const o=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(o))return!0;if(/^(?:n|no|false|0|off)$/i.test(o))return!1;throw new Error(_t.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalString(e){return this.readConfigValue(e,n=>typeof n=="string"&&n!==""||{expected:"string"})}getStringArray(e){const n=this.getOptionalStringArray(e);if(n===void 0)throw new Error(_t.missing(this.fullKey(e),this.context));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[o,i]of n.entries())if(typeof i!="string"||i==="")return{expected:"string-array",value:i,key:`${e}[${o}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,o){const i=new cn(e,this.context,o,this.fullKey(n));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,n){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,n);if(o===null)return;const i=n(o);if(i!==!0){const{key:c=e,value:A=o,expected:y}=i;throw new TypeError(_t.type(this.fullKey(c),this.context,Je(A),y))}return o}readValue(e){const n=e?e.split("."):[];for(const i of n)if(!Ee.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of n.entries())if(ke(o))o=o[c];else if(o!=null){const A=this.fullKey(n.slice(0,i).join("."));throw new TypeError(_t.type(A,this.context,Je(o),"object"))}return o}}const ln="theme";class Qn{themes;static createWithStorage(e){const n=new Qn(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(ln)??void 0;return n.setActiveThemeId(o),n.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(ln,i):window.localStorage.removeItem(ln)}),window.addEventListener("storage",i=>{if(i.key===ln){const c=localStorage.getItem(ln)??void 0;n.setActiveThemeId(c)}}),n}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new dt(void 0)}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}}var vn=t(63636);function Gs(r){if(r.length<3)throw new Error(`The '${r}' feature flag must have a minimum length of three characters.`);if(r.length>150)throw new Error(`The '${r}' feature flag must not exceed 150 characters.`);if(!r.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${r}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class Wr{registeredFeatureFlags=[];flags;registerFlag(e){Gs(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===vn.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[o,i]of Object.entries(e.states))this.flags.set(o,i);const n=Array.from(this.flags.entries()).filter(([,o])=>o===vn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(n)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))return new Map;const o=Object.entries(n).filter(([i,c])=>(Gs(i),c===vn.S.Active));return new Map(o)}catch{return new Map}}}const Zn=(0,ht.y)({id:"core.apptheme"}),Ys=(0,ht.y)({id:"core.applanguage"});var Kr=t(56038),Qs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Qs||{});class zr{factories=new Map;register(e,n){const o=Qs[e],i=this.factories.get(n.api.id);return i&&i.priority>=o?!1:(this.factories.set(n.api.id,{priority:o,factory:n}),!0)}get(e){const n=this.factories.get(e.id);if(n)return n.factory}getAllApis(){const e=new Set;for(const{factory:n}of this.factories.values())e.add(n.api);return e}}class Ms{factories;static validateFactories(e,n){for(const o of n){const i=[o],c=new Set;for(;i.length;){const A=i.shift(),y=e.get(A);if(y)for(const R of Object.values(y.deps)){if(R.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(R)||(c.add(R),i.push(R))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,n=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(n.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...n,i.api]),A=i.factory(c);return this.apis.set(e.id,A),A}loadDeps(e,n,o){const i={};for(const c in n)if(n.hasOwnProperty(c)){const A=n[c],y=this.load(A,o);if(!y)throw new Error(`No API factory available for dependency ${A} of dependent ${e}`);i[c]=y}return i}}function Hr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const n=[{node:nt.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:o,parent:i,contexts:c}=n.shift();nt.Children.forEach(o,A=>{if(!(0,nt.isValidElement)(A))return;const y={};for(const R in e)if(e.hasOwnProperty(R)){const N=e[R];y[R]=N.visit(N.accumulator,A,i,c[R])}for(const R of r.discoverers){const N=R(A);N&&n.push({node:N,parent:A,contexts:y})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Jn(r,e){return()=>({accumulator:r(),visit:e})}function Vr(r){return r.props?.children}function Gr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Pe=t(19402);const Yr=Jn(()=>new Set,(r,e)=>{const n=(0,Pe.E)(e,"core.plugin");n&&r.add(n)});var Tn=t(72427);const Zs=r=>{const{children:e}=r,n=(0,Tn.gf)(vn.B),o="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Pe.h)(Zs,"core.featureFlagged",!0);const Xn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function _n(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Js=r=>{const e=new Set;return r&&e.add(r),e};function Xs(r,e=new Array){return nt.Children.forEach(r,n=>{if(!(0,nt.isValidElement)(n))return;const o=(0,Pe.E)(n,"core.mountPoint");if(o){const i=(0,Pe.E)(n,"core.plugin");e.push({routeRef:o,plugin:i})}Xs(n.props.children,e)}),e}const Qr=Jn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(o?.isElementAncestor)return o;if(n?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,Pe.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${_n(e)}"`);const A=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${_n(e)}"`);const y=i.startsWith("/")?i.slice(1):i,R=e.props.element;if((0,Pe.E)(e,"core.gatherMountPoints")){if(R)throw new Error(`Mount point gatherers may not have an element prop "${_n(e)}"`);const N={path:y,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Xn],plugins:new Set};return A.push(N),{obj:N,gatherPath:y,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(R){const[N,...tt]=Xs(R);if(tt.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!N)return o;const{routeRef:mt,plugin:St}=N,Tt={path:y,element:"mounted",routeRefs:new Set([mt]),caseSensitive:!!e.props?.caseSensitive,children:[Xn],plugins:Js(St)};return A.push(Tt),r.paths.set(mt,y),r.parents.set(mt,o?.routeRef),{obj:Tt,routeRef:mt??o?.routeRef,gatherPath:y,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${_n(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const y=(0,Pe.E)(e,"core.plugin");return y&&o?.obj?.plugins.add(y),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Zr=Jn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(n?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,A=o?.sticky;const y=e.props?.path,R=i?.children??r.objects,N=!!e.props?.caseSensitive;let tt=o?.path;if((0,Pe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");tt=y}const mt=e.props?.element;let St=(0,Pe.E)(e,"core.mountPoint");if(!St&&(0,nt.isValidElement)(mt)&&(St=(0,Pe.E)(mt,"core.mountPoint")),St){let Dt=y;if(tt&&(Dt?tt=void 0:Dt=tt),!Dt)throw new Error("Mounted routable extension must have a path");r.paths.set(St,Dt),c&&A?(r.parents.set(St,c),y&&(c=St,A=!1)):(r.parents.set(St,c),c=St),y?(i={caseSensitive:N,path:y,element:"mounted",routeRefs:new Set([St]),children:[Xn],plugins:Js((0,Pe.E)(e.props.element,"core.plugin"))},R.push(i)):i?.routeRefs.add(St)}if((0,Pe.E)(e,"core.gatherMountPoints")&&(A=!0),(0,Pe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");St||(i={caseSensitive:N,path:y,element:"gathered",routeRefs:new Set,children:[Xn],plugins:o?.obj?.plugins||new Set},R.push(i))}return{obj:i,path:tt,routeRef:c,sticky:A}}),Jr=Jn(()=>new Set,(r,e)=>{if(e.type===Zs){const n=e.props;r.add("with"in n?n.with:n.without)}});var Rn=t(21613),Xr=t(63544);const wn=(0,Xr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function _s(r){return r[wn]==="absolute"}function qs(r){return r[wn]==="sub"}function _r(r){return r[wn]==="external"}function qn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var qr=t(46155),to=t.n(qr);function eo(r,e,n){let o,i="";if(_s(r))o=r;else if(qs(r))o=r.parent,i=r.path;else if(_r(r)){const y=n.get(r);if(!y)return[void 0,""];if(_s(y))o=y;else if(qs(y))o=y.parent,i=y.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${y}`)}else throw r[wn]?new Error(`Unknown or invalid route ref type, ${r[wn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!o)return[void 0,""];const c=e.get(o);if(c===void 0)return[void 0,""];const A=qn(c,i);return[o,A]}function no(r,e,n,o,i){const c=(0,Rn.ue)(i,e)??[],A=Array();let y=-1;for(let tt=r;tt&&(y=c.findIndex(mt=>mt.route.routeRefs.has(tt)),y===-1);tt=o.get(tt))A.unshift(tt);A.length===0&&(y-=1);const R=y===-1?"":c[y].pathname,N=A.slice(0,-1).map(tt=>{const mt=n.get(tt);if(mt===void 0)throw new Error(`No path for ${tt}`);if(mt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${tt} as it has parameters`);return mt});return`${qn(R,...N)}/`}class so{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,n,o,i,c){this.routePaths=e,this.routeParents=n,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,n){const[o,i]=eo(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof n=="string"?c=this.trimPath(n):n.pathname?c={...n,pathname:this.trimPath(n.pathname)}:c=n;const A=this.appBasePath+no(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[R])=>{const N=R&&to()(R,tt=>typeof tt=="string"?tt.replaceAll(/[&?#;\/]/g,mt=>encodeURIComponent(mt)):tt);return qn(A,(0,Rn.tW)(i,N))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const ro=(0,ie.tK)("routing-context"),oo=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:o,basePath:i="",children:c})=>{const A=new so(r,e,n,o,i),y=(0,ve.B)({1:A});return(0,a.jsx)(ro.Provider,{value:y,children:c})};function ao(r,e){const n=new Set(e.values());n.delete(void 0);for(const o of e.keys()){if(n.has(o))continue;let i=o,c="";for(;i;){const y=r.get(i);if(y===void 0)throw new Error(`No path for ${i}`);c=qn(y,c),i=e.get(i)}const A=c.match(/:(\w+)/g);if(A){for(let y=0;y<A.length;y++)for(let R=y+1;R<A.length;R++)if(A[R]===A[y])throw new Error(`Parameter ${A[R]} is duplicated in path ${c}`)}}}function io(r,e){for(const n of e)if(n.externalRoutes){for(const[o,i]of Object.entries(n.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const co=(0,ie.tK)("app-context"),lo=({appContext:r,children:e})=>{const n=(0,ve.B)({1:r});return(0,a.jsx)(co.Provider,{value:n,children:e})},tr="app",uo=`${tr}-auth-cookie-expires-at`,ho=5*6e4,er=5e3,po=2,go=5*6e4;function fo({discoveryApi:r,fetchApi:e,errorApi:n}){let o=!1,i,c=!0,A=er;const y="BroadcastChannel"in window?new BroadcastChannel(uo):void 0,R=St=>{const Tt=(1+3*Math.random())*6e4;return Math.max(St-Date.now(),ho)-Tt},N=async()=>{try{const Tt=`${await r.getBaseUrl(tr)}/.backstage/auth/v1/cookie`,Dt=await e.fetch(Tt,{credentials:"include"});if(!Dt.ok)throw new Error(`Request failed with status ${Dt.status} ${Dt.statusText}, see request towards ${Tt} for more details`);const Zt=await Dt.json();if(!Zt.expiresAt)throw new Error("No expiration date in response");const me=Date.parse(Zt.expiresAt);if(Number.isNaN(me))throw new Error("Invalid expiration date in response");c=!0,y?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(me).toISOString()}}),mt(R(me))}catch(St){c?(c=!1,A=er):(A=Math.min(go,A*po),console.error("Session cookie refresh failed",St),n.post(new Error("Session refresh failed, see developer console for details"))),mt(A)}},tt=St=>{const{data:Tt}=St;if(!(Tt===null||typeof Tt!="object")&&"action"in Tt&&Tt.action==="COOKIE_REFRESH_SUCCESS"){const Dt=Date.parse(Tt.payload.expiresAt);if(Number.isNaN(Dt)){console.warn("Received invalid expiration from session refresh channel");return}mt(R(Dt))}};function mt(St){o||(i&&clearTimeout(i),i=setTimeout(N,St))}return y?.addEventListener("message",tt),N(),()=>{o=!0,i&&clearTimeout(i),y?.removeEventListener("message",tt),y?.close()}}function nr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Bs(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class mo{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw nr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Bs("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw nr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Bs("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(n=>n.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Bs("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),await this.#t?.(),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if(this.#t)return;const n=fo(e);this.#t=async()=>{n();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var yo=t(1394);function vo(r,e,n){if(r!==void 0){const i=n.find(c=>c.id===r);if(i)return i}if(e){const i=n.find(c=>c.variant==="dark");if(i)return i}const o=n.find(i=>i.variant==="light");return o||n[0]}const Eo=()=>{const r=(0,nt.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,nt.useState)(r.matches);return(0,nt.useEffect)(()=>{const o=i=>{n(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function sr({children:r}){const e=(0,Tn.gf)(Zn),n=(0,yo.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?Eo():!1,i=vo(n,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const rr=async()=>Ao();function Ao(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,n=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(n){if(!Array.isArray(n))throw new Error("Static configuration has invalid format");e.push(...n)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const A=c.textContent;if(!A)throw new Error("tag is empty");let y;try{y=JSON.parse(A)}catch(R){throw new Error(`failed to parse config; ${R}`)}if(!Array.isArray(y))throw new Error("data is not an array");e.push(...y)}catch(A){throw new Error(`Failed to load config from script tag, ${A.message}`)}else if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const c=JSON.parse(r);Array.isArray(c)?e.push(...c):e.push({data:c,context:"env"})}catch(c){throw new Error(`Failed to load runtime configuration, ${c}`)}const i=window.__APP_CONFIG__;return i&&e.push({context:"window",data:i}),e}class xo{apis=[];add(e,n){return this.apis.push([e.id,n]),n}build(){return new En(new Map(this.apis))}}class En{apis;static builder(){return new xo}static from(e){return new En(new Map(e.map(([n,o])=>[n.id,o])))}static with(e,n){return new En(new Map([[e.id,n]]))}constructor(e){this.apis=e}with(e,n){return new En(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}}function Co(r){const e=new Map,n=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const A=`${o.getId()}.${i}`;if(e.has(A))throw new Error(`Unexpected duplicate route '${A}'`);e.set(A,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const A=`${o.getId()}.${i}`;if(n.has(A))throw new Error(`Unexpected duplicate external route '${A}'`);n.set(A,c)}}return{routes:e,externalRoutes:n}}function bo(r,e,n){const o=Co(n),i=new Map,c=new Set;r&&r({bind:(R,N)=>{for(const[tt,mt]of Object.entries(N)){const St=R[tt];if(!St)throw new Error(`Key ${tt} is not an existing external route`);if(!mt&&!St.optional)throw new Error(`External route ${tt} is required but was ${mt===!1?"disabled":"not provided"}`);mt?i.set(St,mt):mt===!1&&c.add(St)}}});const A=e.getOptionalConfig("app.routes.bindings")?.get();if(A)for(const[y,R]of Object.entries(A)){if(!So(R))throw new Error(`Invalid config at app.routes.bindings['${y}'], value must be a non-empty string or false`);const N=o.externalRoutes.get(y);if(!N)throw new Error(`Invalid config at app.routes.bindings, '${y}' is not a valid external route`);if(!(i.has(N)||c.has(N)))if(R===!1)c.add(N);else{const tt=o.routes.get(R);if(!tt)throw new Error(`Invalid config at app.routes.bindings['${y}'], '${R}' is not a valid route`);i.set(N,tt)}}for(const y of o.externalRoutes.values())if(!i.has(y)&&!c.has(y)){const R="getDefaultTarget"in y?y.getDefaultTarget():void 0;if(R){const N=o.routes.get(R);N&&i.set(y,N)}}return i}function So(r){return!!(r===!1||typeof r=="string"&&r)}function In(){const[r]=(0,p.AV)((0,a.jsx)(p.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const or=(0,nt.createContext)(void 0);var ar=t(82266),ir=t(93368),Oo=t(25862);const Po=(r,e)=>{try{const o=(0,Rn.ue)(e,{pathname:r})?.filter(R=>R?.route.routeRefs?.size>0).pop(),i=o?.route;if(!i||i.path===""&&r!=="/")return;let c;i.routeRefs.size===1&&(c=i.routeRefs.values().next().value);let A;i.plugins.size===1&&(A=i.plugins.values().next().value);const y=Object.entries(o?.params||{}).reduce((R,[N,tt])=>(tt!==void 0&&N!=="*"&&(R[N]=tt),R),{});return{extension:"App",pluginId:A?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:y}}catch{return}},To=({pathname:r,search:e,hash:n,attributes:o})=>{const i=(0,ir.s)();return(0,nt.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${n}`,{attributes:o})},[i,r,e,n,o]),null},ts=({routeObjects:r})=>{const{pathname:e,search:n,hash:o}=(0,p.zy)(),{params:i,...c}=Po(e,r)||{params:{}};return(0,a.jsx)(Oo.Ig,{attributes:c,children:(0,a.jsx)(To,{pathname:e,search:n,hash:o,attributes:i})})};function Ro(r){return In()?js(r):""}function js(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function cr({component:r,appIdentityProxy:e,children:n}){const[o,i]=(0,nt.useState)(),c=(0,Tn.gf)(ot.U),A=js(c);return o?(e.setTarget(o,{signOutTargetUrl:A||"/"}),(0,a.jsx)(a.Fragment,{children:n})):(0,a.jsx)(r,{onSignInSuccess:i})}function lr(r){const{Router:e,SignInPage:n}=(0,ar.n)().getComponents(),o=(0,Tn.gf)(ot.U),i=js(o),c=`${i}/*`,A=(0,nt.useContext)(or);if(!A)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:y,appIdentityProxy:R}=A;return n?In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(cr,{component:n,appIdentityProxy:R,children:(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(cr,{component:n,appIdentityProxy:R,children:r.children})]}):(R.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}},{signOutTargetUrl:i||"/"}),In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(ts,{routeObjects:y}),(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(ts,{routeObjects:y}),r.children]}))}(0,Pe.h)(lr,"core.type","AppRouter");const Dn="language",Xe="en";class es{static create(e){const n=e?.availableLanguages??[Xe];if(n.length!==new Set(n).size)throw new Error(`Supported languages may not contain duplicates, got '${n.join("', '")}'`);if(!n.includes(Xe))throw new Error(`Supported languages must include '${Xe}'`);const o=e?.defaultLanguage??Xe;if(!n.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new es(n,o)}static createWithStorage(e){const n=es.create(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(Dn),{languages:i}=n.getAvailableLanguages();return o&&i.includes(o)&&n.setLanguage(o),n.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Dn)&&window.localStorage.setItem(Dn,c)}),window.addEventListener("storage",c=>{if(c.key===Dn){const A=localStorage.getItem(Dn)??void 0;A&&n.setLanguage(A)}}),n}#t;#e;#n;constructor(e,n){this.#t=e,this.#e=n,this.#n=new dt({language:this.#e})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const n=e??Xe;if(n!==this.#e){if(n&&!this.#t.includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${this.#t.join("', '")}'`);this.#e=n,this.#n.next({language:n})}}getLanguage(){return{language:this.#e}}language$(){return this.#n}}var wo=t(47304),Io=t(99833),dr=t(93184);function ur(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Do{onLoad;#t;#e;#n;constructor(e){this.onLoad=e,this.#t=new Set,this.#e=new Map,this.#n=new Map}addTranslationResource(e){const n=(0,Io.Y)(e);for(const o of n.resources){const i=this.#s(o.language,n.id);this.#n.has(i)||this.#n.set(i,o.loader)}}#s(e,n){return`${e}/${n}`}needsLoading(e,n){const o=this.#s(e,n);return this.#n.get(o)?!this.#t.has(o):!1}async load(e,n){const o=this.#s(e,n),i=this.#n.get(o);if(!i||this.#t.has(o))return;const c=this.#e.get(o);if(c){await c;return}const A=i().then(y=>{this.onLoad({language:e,namespace:n,messages:y.messages}),this.#t.add(o)},y=>{throw this.#t.add(o),y});this.#e.set(o,A),await A}}class Us{#t;#e;#n;static fromI18n(e){const n=e.services.interpolator,o=n.format;let i;return n.format=(c,A,y,R)=>A?o(c,A,y,R):i?.(c,A,y,R)??c,new Us(Math.random().toString(36).substring(2,8),c=>{i=c})}constructor(e,n){this.#t=n,this.#e=e,this.#n=new RegExp(`\\$${e}\\(([^)]+)\\)`)}wrapT(e){return(n,o)=>{let i;this.#t(y=>{if((0,nt.isValidElement)(y)){i||(i=new Map);const R=i.size.toString();return i.set(R,y),`$${this.#e}(${R})`}return y});const c=e(n,o);if(!i)return c;const A=c.split(this.#n);return(0,nt.createElement)(nt.Fragment,null,...A.map((y,R)=>R%2===0?y:i?.get(y)).filter(Boolean))}}}class $s{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),o=(0,wo.Q_)({fallbackLng:Xe,supportedLngs:n,interpolation:{escapeValue:!1,alwaysFormat:!0},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const i=Us.fromI18n(o),{language:c}=e.languageApi.getLanguage();c!==Xe&&o.changeLanguage(c);const A=new Do(N=>{o.addResourceBundle(N.language,N.namespace,ur(N.messages),!1,!0)}),y=e?.resources||[];for(let N=y.length-1;N>=0;N--){const tt=y[N];tt.$$type==="@backstage/TranslationResource"?A.addTranslationResource(tt):tt.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Xe,tt.id,ur(tt.messages),!0,!1)}const R=new $s(o,A,e.languageApi.getLanguage().language,i);return e.languageApi.language$().subscribe(({language:N})=>{R.#a(N)}),R}#t;#e;#n;#s;#o=new Set;#r=new Set;constructor(e,n,o,i){this.#t=e,this.#e=n,this.#n=o,this.#s=i}getTranslation(e){const n=(0,dr.v)(e);return this.#c(n),this.#i(n)}translation$(e){const n=(0,dr.v)(e);return this.#c(n),new(Y())(o=>{let i={};const c=()=>{i={};const y=i;this.#e.load(this.#n,n.id).then(()=>{if(y===i){const R=this.#i(n);R.ready&&o.next(R)}},R=>{y===i&&o.error(Array.isArray(R)?R[0]:R)})},A=()=>{const y=this.#i(n);y.ready?o.next(y):c()};return this.#e.needsLoading(this.#n,n.id)&&c(),this.#r.add(A),()=>{this.#r.delete(A)}})}#a(e){this.#n!==e&&(this.#n=e,this.#t.changeLanguage(e),this.#r.forEach(n=>n()))}#i(e){if(this.#e.needsLoading(this.#n,e.id))return{ready:!1};const n=this.#t.getFixedT(null,e.id);return{ready:!0,t:this.#s.wrapT(n)}}#c(e){if(this.#o.has(e.id))return;this.#o.add(e.id);const n=e.getDefaultMessages();this.#t.addResourceBundle(Xe,e.id,n,!0,!1);const o=e.getDefaultResource();o&&this.#e.addTranslationResource(o)}}function hr(r){const e=new URL(r);return e.protocol=document.location.protocol,e.hostname=document.location.hostname,e.port=document.location.port,e.toString().replace(/\/$/,"")}function Lo(r){const e=cn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,A;if(n&&o){const y=new URL(n).origin,R=new URL(o).origin;if(y===R){const N=hr(o);o!==N&&(c=N)}}if(n){const y=hr(n);n!==y&&(A=y)}return(A||c)&&(i=i.concat({data:{app:A&&{baseUrl:A},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Mo(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Bo(r,e,n){const o=!!r,i=(0,Se.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:R}=e;c=(0,a.jsx)(R,{})}else if(i.error){const{BootErrorPage:R}=e;c=(0,a.jsx)(R,{step:"load-config",error:i.error})}const{ThemeProvider:A=sr}=e;return c?{node:(0,a.jsx)(ae,{apis:En.with(Zn,n),children:(0,a.jsx)(A,{children:c})})}:{api:cn.fromConfigs(i.value?.length?Lo(i.value):[])}}class jo{app;constructor(e){this.app=e}getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}}class Uo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new mo;apiFactoryRegistry;constructor(e){this.apis=e.apis??[],this.icons=e.icons,this.plugins=new Set(e.plugins??[]),this.featureFlags=e.featureFlags??[],this.components=e.components,this.themes=e.themes,this.configLoader=e.configLoader??rr,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new zr,this.appLanguageApi=es.createWithStorage({defaultLanguage:e.__experimentalTranslations?.defaultLanguage,availableLanguages:e.__experimentalTranslations?.availableLanguages}),this.translationResources=e.__experimentalTranslations?.resources??[]}getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const n=this.getProvider();return()=>(0,a.jsx)(n,{children:e})}#t=!1;getProvider(){if(this.#t)throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");this.#t=!0;const e=new jo(this);let n,o;return({children:c})=>{const A=(0,nt.useRef)(!0),y=(0,nt.useMemo)(()=>Qn.createWithStorage(this.themes),[]),{routing:R,featureFlags:N}=(0,nt.useMemo)(()=>{const Zt=In();Zt&&console.warn(`
4
4
  DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
5
5
  Please migrate to use React Router v6 stable.
6
6
  See https://backstage.io/docs/tutorials/react-router-stable-migration
@@ -548,6 +548,6 @@ ${is[f.palette.type].map(D=>`img[src$="${D}"]`).join(", ")} {
548
548
  `],bn=()=>(0,qt.Ut)(),ls=()=>{const f=bn(),D=(0,Le.A)();return(0,a.useMemo)(()=>{const j={theme:D,sidebar:f};return cs.reduce((F,k)=>F+k(j),"")},[D,f])},Bn=()=>{const f=ls();return(0,a.useCallback)(D=>(D.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${f}</style>`),D),[f])},jn=async(f,D)=>{let j;if(typeof f=="string")j=new DOMParser().parseFromString(f,"text/html").documentElement;else if(f instanceof Element)j=f;else throw new Error("dom is not a recognized type");for(const F of D)j=await F(j);return j},Un=(f,D,j)=>{const F=new URL(D,"https://ignored.com").pathname,k=f==="src"&&F.endsWith(".svg"),q=!D.match(/^([a-z]*:)?\/\//i),et=D.startsWith(j);return k&&(q||et)},ds=({techdocsStorageApi:f,entityId:D,path:j})=>async F=>{const k=await f.getApiOrigin(),q=async(et,Pt)=>{for(const wt of et)if(wt.hasAttribute(Pt)){const Ut=wt.getAttribute(Pt);if(!Ut)return;const Lt=await f.getBaseUrl(Ut,D,j);if(Un(Pt,Ut,k))try{const Xt=await(await fetch(Lt,{credentials:"include"})).text();wt.setAttribute(Pt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Xt)))}`)}catch{wt.setAttribute("alt",`Error: ${Ut}`)}else wt.setAttribute(Pt,Lt)}};return await Promise.all([q(F.querySelectorAll("img"),"src"),q(F.querySelectorAll("script"),"src"),q(F.querySelectorAll("source"),"src"),q(F.querySelectorAll("link"),"href"),q(F.querySelectorAll("a[download]"),"href")]),F},us=()=>f=>(((j,F)=>{Array.from(j).filter(k=>k.hasAttribute(F)).forEach(k=>{const q=k.getAttribute(F);if(q){q.match(/^https?:\/\//i)&&k.setAttribute("target","_blank");try{const et=$n(window.location.href);k.setAttribute(F,new URL(q,et).toString())}catch{k.replaceWith(k.textContent||q)}}})})(Array.from(f.getElementsByTagName("a")),"href"),f);function $n(f){const D=new URL(f);return!D.pathname.endsWith("/")&&!D.pathname.endsWith(".html")&&(D.pathname+="/"),D.toString()}var hs=t(27326);let Fn;Fn=Promise.resolve().then(t.t.bind(t,25873,19));function mn(f,D){Fn.then(j=>{"createRoot"in j?j.createRoot(D).render(f):j.render(f,D)})}const ps=()=>f=>{const D=f.querySelector('.md-header label[for="__drawer"]'),j=f.querySelector("article");if(!D||!j)return f;const F=D.cloneNode();return mn((0,a.createElement)(hs.A),F),F.id="toggle-sidebar",F.title="Toggle Sidebar",F.classList.add("md-content__button"),F.style.setProperty("padding","0 0 0 5px"),F.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),j?.prepend(F),f},Nn=()=>f=>(f.querySelector(".md-header")?.remove(),f),gs=()=>f=>(f.querySelector(".md-footer .md-copyright")?.remove(),f.querySelector(".md-footer-copyright")?.remove(),f);var fs=t(36021),kn=t(90292),Wn=t(52536),ms=t.n(Wn);const Sn=f=>D=>{const j=D.querySelector('[title="Edit this page"]');if(!j||!j.href)return D;const F=new URL(j.href),k=f.byUrl(F);if(k?.type!=="github"&&k?.type!=="gitlab")return D;const q=D.querySelector("article>h1")?.childNodes[0].textContent||"",et=encodeURIComponent(`Documentation Feedback: ${q}`),Pt=encodeURIComponent(`Page source:
549
549
  ${j.href}
550
550
 
551
- Feedback:`),wt=k?.type==="github"?(0,fs.F)(F.href,"blob"):F.href,Ut=ms()(wt),Lt=`/${Ut.organization}/${Ut.name}`,Ft=j.cloneNode();switch(k?.type){case"gitlab":Ft.href=`${F.origin}${Lt}/issues/new?issue[title]=${et}&issue[description]=${Pt}`;break;case"github":Ft.href=`${F.origin}${Lt}/issues/new?title=${et}&body=${Pt}`;break;default:return D}return mn((0,a.createElement)(kn.A),Ft),Ft.style.paddingLeft="5px",Ft.title="Leave feedback for this page",Ft.id="git-feedback-link",j?.insertAdjacentElement("beforebegin",Ft),D};var On=t(38097);const ys=(0,p.A)(f=>({button:{color:f.palette.primary.light,textDecoration:"underline"}})),Kn=({message:f,handleButtonClick:D,autoHideDuration:j})=>{const F=ys(),[k,q]=(0,a.useState)(!0),et=()=>q(!1);return(0,s.jsx)(On.A,{open:k,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:j,color:"primary",onClose:et,message:f,action:(0,s.jsx)(Et.A,{classes:{root:F.button},size:"small",onClick:()=>{et(),D()},children:"Redirect now"})})},zn=(f,D)=>{const F=k=>{const q=$n(window.location.href),et=new URL(k,q);if(et.hostname!==window.location.hostname){const wt=window.location.pathname,Ut=wt.indexOf(D),Lt=wt.slice(0,Ut+D.length);return new URL(Lt,q).href}return et.href};return k=>{for(const q of Array.from(k.querySelectorAll("meta")))if(q.getAttribute("http-equiv")==="refresh"){const et=q.getAttribute("content")?.split("url=");if(!et||et.length<2)return k;const Pt=et[1],wt=F(Pt);if(window.location.href===wt)return k;const Ut=document.createElement("div");return mn((0,s.jsx)(Kn,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>f(wt),autoHideDuration:3e3}),Ut),document.body.appendChild(Ut),setTimeout(()=>{f(wt)},3e3),k}return k}},vs=()=>f=>(setTimeout(()=>{const D=f?.querySelectorAll("li.md-nav__item--active");D.length!==0&&(D.forEach(F=>{const k=F?.querySelector("input");k?.checked||k?.click()}),D[D.length-1].scrollIntoView())},200),f);var Es=t(50868),As=t(10437),xs=t(71677),Cs=t(87051),bs=t(36338);const Ss=(0,Cs.A)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(xs.Ay),Os=()=>(0,s.jsx)(As.A,{children:(0,s.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),Ps=({text:f})=>{const[D,j]=(0,a.useState)(!1),[,F]=(0,bs.A)(),k=(0,a.useCallback)(()=>{F(f),j(!0)},[f,F]),q=(0,a.useCallback)(()=>{j(!1)},[j]);return(0,s.jsx)(Ss,{title:"Copied to clipboard",placement:"left",open:D,onClose:q,leaveDelay:1e3,children:(0,s.jsx)(ft.A,{style:{position:"absolute"},className:"md-clipboard md-icon",onClick:k,"aria-label":"Copy to clipboard",children:(0,s.jsx)(Os,{})})})},Ts=f=>D=>{const j=D.querySelectorAll("pre > code");for(const F of j){const k=F.textContent||"",q=document.createElement("div");F?.parentElement?.prepend(q),mn((0,s.jsx)(Es.A,{theme:f,children:(0,s.jsx)(Ps,{text:k})}),q)}return D},Rs=({baseUrl:f,onClick:D})=>j=>(Array.from(j.getElementsByTagName("a")).forEach(F=>{F.addEventListener("click",k=>{const et=F.getAttribute("href");et&&et.startsWith(f)&&!F.hasAttribute("download")&&(k.preventDefault(),D(k,et))})}),j),Hn=({onLoading:f,onLoaded:D})=>j=>(f(),j.addEventListener(u,function F(){D(),j.removeEventListener(u,F)}),j);function Vn(){return f=>(f.querySelectorAll("label.md-nav__link[for]").forEach(j=>{j.setAttribute("tabIndex","0"),j.addEventListener("keydown",F=>{const k=F;if(k.key==="Enter"||k.key===" "){const q=j.getAttribute("for");if(!q)return;const et=f.querySelector(`#${q}`);et&&et.type==="checkbox"&&(et.checked=!et.checked,et.dispatchEvent(new Event("change",{bubbles:!0})),F.preventDefault(),F.stopPropagation())}})}),f)}function Gn(f,D){const j=new URL(D),F=`${j.origin}${j.pathname.replace(/\/$/,"")}`,k=f.replace(F,"").replace(/^\/+/,""),q=new URL(`http://localhost/${k}`);return`${q.pathname}${q.search}${q.hash}`}function ws(){const f=(0,a.useRef)((0,Vt.Zp)()),j=(0,dt.gf)(J.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(k=>{let q=k;if(j)try{q=Gn(k,j)}catch{}f.current(q)},[j])}const Is="screen and (max-width: 76.1875em)",Fe=f=>{const D=(0,Vt.zy)(),j=(0,Vt.Zp)(),{"*":F=""}=(0,Vt.g)();(0,a.useLayoutEffect)(()=>{F===""&&f!==""&&j(`${D.pathname}${f}`,{replace:!0})},[])},Ne=(f,D)=>{const j=ws(),F=(0,Le.A)(),k=(0,Ue.A)(Is),q=pe(),et=Bn(),Pt=(0,G.s)(),wt=(0,dt.gf)(en.s),Ut=(0,dt.gf)(an.Y),Lt=(0,dt.gf)(J.U),{state:Ft,path:Xt,content:fe}=He(),{"*":ue=""}=(0,Vt.g)(),[nt,Se]=(0,a.useState)(null),ye=g(nt);Fe(D);const Ht=(0,a.useCallback)(()=>{if(!nt)return;nt.querySelectorAll(".md-sidebar").forEach(ae=>{if(k)ae.style.top="0px";else{const ke=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Oe=nt.getBoundingClientRect().top??0;const Je=nt.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Oe<ke&&(Oe=ke);const _t=Math.max(Oe,0)+Je;ae.style.top=`${_t}px`;const ln=nt.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;ae.style.height=`${ln-_t}px`}ae.style.setProperty("opacity","1")})},[nt,k]);(0,a.useEffect)(()=>(window.addEventListener("resize",Ht),window.addEventListener("scroll",Ht,!0),()=>{window.removeEventListener("resize",Ht),window.removeEventListener("scroll",Ht,!0)}),[nt,Ht]);const Qt=(0,a.useCallback)(()=>{if(!nt)return;const oe=nt.querySelector(".md-footer");oe&&(oe.style.width=`${nt.getBoundingClientRect().width}px`)},[nt]);(0,a.useEffect)(()=>(window.addEventListener("resize",Qt),()=>{window.removeEventListener("resize",Qt)}),[nt,Qt]),(0,a.useEffect)(()=>{ye||(Qt(),Ht())},[Ft,ye,Qt,Ht]);const ie=(0,a.useCallback)((oe,ae)=>jn(oe,[q,ds({techdocsStorageApi:wt,entityId:f,path:ae}),us(),ps(),Nn(),gs(),Sn(Ut),et]),[f,Ut,wt,q,et]),ve=(0,a.useCallback)(async oe=>jn(oe,[zn(j,f.name),vs(),Ts(F),Rs({baseUrl:Lt.getOptionalString("app.baseUrl")||window.location.origin,onClick:(ae,Ee)=>{const ke=ae.ctrlKey||ae.metaKey,Oe=new URL(Ee),Ge=ae.target?.innerText||Ee,Je=Ee.replace(window.location.origin,"");Pt.captureEvent("click",Ge,{attributes:{to:Je}}),Oe.hash?ke?window.open(Ee,"_blank"):(window.location.pathname!==Oe.pathname?j(Ee):window.history.pushState(null,document.title,Oe.hash),oe?.querySelector(`[id="${Oe.hash.slice(1)}"]`)?.scrollIntoView(),oe?.querySelector(`[id="${Oe.hash.slice(1)}"]`)?.querySelector("a, button, [tabindex]")?.focus()):ke?window.open(Ee,"_blank"):j(Ee)}}),Hn({onLoading:()=>{},onLoaded:()=>{oe.querySelector(".md-nav__title")?.removeAttribute("for")}}),Hn({onLoading:()=>{Array.from(oe.querySelectorAll(".md-sidebar")).forEach(Ee=>{Ee.style.setProperty("opacity","0")})},onLoaded:()=>{}}),Vn()]),[F,j,Pt,f.name,Lt]);return(0,a.useEffect)(()=>{if(!fe)return()=>{};let oe=!0;return ie(fe,Xt).then(async ae=>{if(!ae?.innerHTML||!oe||ue!==Xt)return;window.scroll({top:0});const Ee=await ve(ae);Se(Ee)}),()=>{oe=!1}},[fe,ue,Xt,ie,ve]),nt};var we=t(41883),Ds=t(72020),yn=t(99730);const Yn=()=>{const f=(0,Ds.YR)(),{shadowRoot:D}=(0,b.V)(),j=D?.querySelector('[data-md-component="content"]'),F=D?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let k=F?.querySelector('[data-techdocs-addons-location="primary sidebar"]');k||(k=document.createElement("div"),k.setAttribute("data-techdocs-addons-location","primary sidebar"),F?.prepend(k));const q=D?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let et=q?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return et||(et=document.createElement("div"),et.setAttribute("data-techdocs-addons-location","secondary sidebar"),q?.prepend(et)),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(we.A,{container:k,children:f.renderComponentsByLocation(yn.e.PrimarySidebar)}),(0,s.jsx)(we.A,{container:j,children:f.renderComponentsByLocation(yn.e.Content)}),(0,s.jsx)(we.A,{container:et,children:f.renderComponentsByLocation(yn.e.SecondarySidebar)})]})},Ls=(0,p.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Pn=Qe(f=>{const{withSearch:D=!0,searchResultUrlMapper:j,onReady:F}=f,k=Ls(),{entityMetadata:{value:q,loading:et},entityRef:Pt,setShadowRoot:wt}=(0,b.V)(),{state:Ut}=He(),Lt=Ne(Pt,f.defaultPath),Ft=window.location.pathname,Xt=window.location.hash,fe=g(Lt),[ue]=B([`[id="${Xt.slice(1)}"]`]),nt=(0,it.n)(),{NotFoundErrorPage:Se}=nt.getComponents();(0,a.useEffect)(()=>{fe||(Xt?ue&&ue.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Ft,Xt,ue,fe]);const ye=(0,a.useCallback)(Ht=>{wt(Ht),F instanceof Function&&F()},[wt,F]);return et===!1&&!q?(0,s.jsx)(Se,{}):Lt?(0,s.jsx)(M.U,{children:(0,s.jsxs)(x.A,{container:!0,children:[(0,s.jsx)(x.A,{xs:12,item:!0,children:(0,s.jsx)(je,{})}),D&&(0,s.jsx)(x.A,{className:k.search,xs:"auto",item:!0,children:(0,s.jsx)(he,{entityId:Pt,entityTitle:q?.metadata?.title,searchResultUrlMapper:j})}),(0,s.jsxs)(x.A,{xs:12,item:!0,children:[(Ut==="CHECKING"||fe)&&(0,s.jsx)($.k,{}),(0,s.jsx)(C,{element:Lt,onAppend:ye,children:(0,s.jsx)(Yn,{})})]})]})}):(0,s.jsx)(M.U,{children:(0,s.jsx)(x.A,{container:!0,children:(0,s.jsx)(x.A,{xs:12,item:!0,children:(0,s.jsx)(je,{})})})})}),Vs=null},45061:(H,S,t)=>{"use strict";t.d(S,{T:()=>At});var s=t(31085),a=t(14041),x=t(93285),p=t(42899),b=t(4387),h=t(13660),d=t(72020),m=t(88572),u=t(99730),v=t(82292),g=t(67871),C=t(8859),O=t(34428),P=t(51372),B=t(6820),L=t(58837),I=t(268),M=t(72501),$=t(72072);const W=(0,L.A)(Ot=>({root:{textAlign:"left"},label:{color:Ot.page.fontColor,fontWeight:Ot.typography.fontWeightBold,letterSpacing:0,fontSize:Ot.typography.fontSize,marginBottom:Ot.spacing(1)/2,lineHeight:1},value:{color:(0,I.X4)(Ot.page.fontColor,.8),fontSize:Ot.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),X=({value:Ot,className:It,typographyRootComponent:ut})=>(0,s.jsx)(M.A,{component:ut??(typeof Ot=="string"?"p":"span"),className:It,children:Ot});function z(Ot){const{label:It,value:ut,url:lt,contentTypograpyRootComponent:xt}=Ot,gt=W(),bt=(0,s.jsx)(X,{className:gt.value,value:ut||"<Unknown>",typographyRootComponent:xt});return(0,s.jsx)(p.A,{item:!0,children:(0,s.jsxs)(M.A,{component:"span",className:gt.root,children:[(0,s.jsx)(M.A,{className:gt.label,children:It}),lt?(0,s.jsx)($.N_,{to:lt,children:bt}):bt]})})}var Y=t(69814),K=t(72427),dt=t(65461),G=t(9222),Q=t(56005),J=t.n(Q),ct=t(82779),pt=t(18690);const yt=(0,s.jsx)(b.A,{animation:"wave",variant:"text",height:40}),At=Ot=>{const{children:It}=Ot,ut=(0,d.YR)(),lt=(0,K.gf)(dt.U),xt=(0,K.gf)(v.n),{"*":gt=""}=(0,pt.g)(),{title:bt,setTitle:Rt,subtitle:it,setSubtitle:ft,entityRef:vt,metadata:{value:st,loading:Et},entityMetadata:{value:at,loading:U}}=(0,m.V)();(0,a.useEffect)(()=>{st&&(Rt(st.site_name),ft(()=>{let{site_description:le}=st;return(!le||le==="None")&&(le=""),le}))},[st,Rt,ft]);const V=lt.getOptional("app.title")||"Backstage",{locationMetadata:rt,spec:Ct}=at||{},ht=Ct?.lifecycle,Bt=at?(0,g.t)(at,P.vv):[],Nt=(0,G.S)(ct.rQ)(),kt=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(z,{label:J()(at?.kind||"entity"),value:(0,s.jsx)(C.z,{color:"inherit",entityRef:vt,title:at?.metadata.title,defaultKind:"Component"})}),Bt.length>0&&(0,s.jsx)(z,{label:"Owner",value:(0,s.jsx)(O.i,{color:"inherit",entityRefs:Bt,defaultKind:"group"})}),ht?(0,s.jsx)(z,{label:"Lifecycle",value:String(ht)}):null,rt&&rt.type!=="dir"&&rt.type!=="file"?(0,s.jsx)(z,{label:"",value:(0,s.jsxs)(p.A,{container:!0,direction:"column",alignItems:"center",children:[(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:(0,s.jsx)(h.A,{style:{marginTop:"-25px"}})}),(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:"Source"})]}),url:rt.target}):null]});if(!U&&at===void 0||!Et&&st===void 0)return null;const Vt=(0,B.U2)(vt),jt=xt.forEntity(Vt).snapshot.primaryTitle,Gt=le=>le.replace(/\/$/,""),ce=le=>le.replace(/-/g," ").split(" ").map(J()).join(" ");let he=[];gt!==""&&(he=Gt(gt).split("/").slice(0,3).map(ce));const ne=[V,jt,...he].join(" | ");return(0,s.jsxs)(Y.Y,{type:"Documentation",typeLink:Nt,title:bt||yt,subtitle:it===""?void 0:it||yt,children:[(0,s.jsx)(x.A,{titleTemplate:"%s",children:(0,s.jsx)("title",{children:ne})}),kt,It,ut.renderComponentsByLocation(u.e.Header)]})}},82779:(H,S,t)=>{"use strict";t.d(S,{Oc:()=>x,Ri:()=>p,rQ:()=>a});var s=t(34569);const a=(0,s.H)({id:"techdocs:index-page"}),x=(0,s.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),p=(0,s.H)({id:"techdocs:catalog-reader-view"})},27698:(H,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>u});var s=t(31085),a=t(68804),x=t(5951),p=t(58837),b=t(72501),h=t(72072),d=t(70734);const m=(0,p.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),u=v=>{const{result:g,highlight:C,lineClamp:O=5,asListItem:P=!0,asLink:B=!0,title:L,icon:I}=v,M=m(),$=({children:z})=>B?(0,s.jsx)(h.N_,{noTrack:!0,to:g.location,children:z}):(0,s.jsx)(s.Fragment,{children:z}),W=()=>{const z=C?.fields.title?(0,s.jsx)(d.e,{text:C.fields.title,preTag:C.preTag,postTag:C.postTag}):g.title,Y=C?.fields.entityTitle?(0,s.jsx)(d.e,{text:C.fields.entityTitle,preTag:C.preTag,postTag:C.postTag}):g.entityTitle,K=C?.fields.name?(0,s.jsx)(d.e,{text:C.fields.name,preTag:C.preTag,postTag:C.postTag}):g.name;return g?(0,s.jsx)(x.A,{className:M.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,s.jsx)($,{children:L||(0,s.jsxs)(s.Fragment,{children:[z," | ",Y??K," docs"]})}),secondary:(0,s.jsx)(b.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:O,overflow:"hidden"},color:"textSecondary",variant:"body2",children:C?.fields.text?(0,s.jsx)(d.e,{text:C.fields.text,preTag:C.preTag,postTag:C.postTag}):g.text})}):null},X=({children:z})=>P?(0,s.jsxs)(s.Fragment,{children:[I&&(0,s.jsx)(a.A,{children:typeof I=="function"?I(g):I}),(0,s.jsx)("div",{className:M.flexContainer,children:z})]}):(0,s.jsx)(s.Fragment,{children:z});return(0,s.jsx)(X,{children:(0,s.jsx)(W,{})})}},97184:(H,S,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var S=s=>H(H.s=s);H.O(0,[1751,1888,5067,1678,235,6587,5042,7400,1975,4538,4121],()=>(S(97184),S(71543)));var t=H.O()}]);})();
551
+ Feedback:`),wt=k?.type==="github"?(0,fs.F)(F.href,"blob"):F.href,Ut=ms()(wt),Lt=`/${Ut.organization}/${Ut.name}`,Ft=j.cloneNode();switch(k?.type){case"gitlab":Ft.href=`${F.origin}${Lt}/issues/new?issue[title]=${et}&issue[description]=${Pt}`;break;case"github":Ft.href=`${F.origin}${Lt}/issues/new?title=${et}&body=${Pt}`;break;default:return D}return mn((0,a.createElement)(kn.A),Ft),Ft.style.paddingLeft="5px",Ft.title="Leave feedback for this page",Ft.id="git-feedback-link",j?.insertAdjacentElement("beforebegin",Ft),D};var On=t(38097);const ys=(0,p.A)(f=>({button:{color:f.palette.primary.light,textDecoration:"underline"}})),Kn=({message:f,handleButtonClick:D,autoHideDuration:j})=>{const F=ys(),[k,q]=(0,a.useState)(!0),et=()=>q(!1);return(0,s.jsx)(On.A,{open:k,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:j,color:"primary",onClose:et,message:f,action:(0,s.jsx)(Et.A,{classes:{root:F.button},size:"small",onClick:()=>{et(),D()},children:"Redirect now"})})},zn=(f,D)=>{const F=k=>{const q=$n(window.location.href),et=new URL(k,q);if(et.hostname!==window.location.hostname){const wt=window.location.pathname,Ut=wt.indexOf(D),Lt=wt.slice(0,Ut+D.length);return new URL(Lt,q).href}return et.href};return k=>{for(const q of Array.from(k.querySelectorAll("meta")))if(q.getAttribute("http-equiv")==="refresh"){const et=q.getAttribute("content")?.split("url=");if(!et||et.length<2)return k;const Pt=et[1],wt=F(Pt);if(window.location.href===wt)return k;const Ut=document.createElement("div");return mn((0,s.jsx)(Kn,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>f(wt),autoHideDuration:3e3}),Ut),document.body.appendChild(Ut),setTimeout(()=>{f(wt)},3e3),k}return k}},vs=()=>f=>(setTimeout(()=>{const D=f?.querySelectorAll("li.md-nav__item--active");D.length!==0&&(D.forEach(F=>{const k=F?.querySelector("input");k?.checked||k?.click()}),D[D.length-1].scrollIntoView())},200),f);var Es=t(50868),As=t(10437),xs=t(71677),Cs=t(87051),bs=t(36338);const Ss=(0,Cs.A)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(xs.Ay),Os=()=>(0,s.jsx)(As.A,{children:(0,s.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),Ps=({text:f})=>{const[D,j]=(0,a.useState)(!1),[,F]=(0,bs.A)(),k=(0,a.useCallback)(()=>{F(f),j(!0)},[f,F]),q=(0,a.useCallback)(()=>{j(!1)},[j]);return(0,s.jsx)(Ss,{title:"Copied to clipboard",placement:"left",open:D,onClose:q,leaveDelay:1e3,children:(0,s.jsx)(ft.A,{style:{position:"absolute"},className:"md-clipboard md-icon",onClick:k,"aria-label":"Copy to clipboard",children:(0,s.jsx)(Os,{})})})},Ts=f=>D=>{const j=D.querySelectorAll("pre > code");for(const F of j){const k=F.textContent||"",q=document.createElement("div");F?.parentElement?.prepend(q),mn((0,s.jsx)(Es.A,{theme:f,children:(0,s.jsx)(Ps,{text:k})}),q)}return D},Rs=({baseUrl:f,onClick:D})=>j=>(Array.from(j.getElementsByTagName("a")).forEach(F=>{F.addEventListener("click",k=>{const et=F.getAttribute("href");et&&et.startsWith(f)&&!F.hasAttribute("download")&&(k.preventDefault(),D(k,et))})}),j),Hn=({onLoading:f,onLoaded:D})=>j=>(f(),j.addEventListener(u,function F(){D(),j.removeEventListener(u,F)}),j);function Vn(){return f=>(f.querySelectorAll("label.md-nav__link[for]").forEach(j=>{j.setAttribute("tabIndex","0"),j.addEventListener("keydown",F=>{const k=F;if(k.key==="Enter"||k.key===" "){const q=j.getAttribute("for");if(!q)return;const et=f.querySelector(`#${q}`);et&&et.type==="checkbox"&&(et.checked=!et.checked,et.dispatchEvent(new Event("change",{bubbles:!0})),F.preventDefault(),F.stopPropagation())}})}),f)}function Gn(f,D){const j=new URL(D),F=`${j.origin}${j.pathname.replace(/\/$/,"")}`,k=f.replace(F,"").replace(/^\/+/,""),q=new URL(`http://localhost/${k}`);return`${q.pathname}${q.search}${q.hash}`}function ws(){const f=(0,a.useRef)((0,Vt.Zp)()),j=(0,dt.gf)(J.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(k=>{let q=k;if(j)try{q=Gn(k,j)}catch{}f.current(q)},[j])}const Is="screen and (max-width: 76.1875em)",Fe=f=>{const D=(0,Vt.zy)(),j=(0,Vt.Zp)(),{"*":F=""}=(0,Vt.g)();(0,a.useLayoutEffect)(()=>{F===""&&f!==""&&j(`${D.pathname}${f}`,{replace:!0})},[])},Ne=(f,D)=>{const j=ws(),F=(0,Le.A)(),k=(0,Ue.A)(Is),q=pe(),et=Bn(),Pt=(0,G.s)(),wt=(0,dt.gf)(en.s),Ut=(0,dt.gf)(an.Y),Lt=(0,dt.gf)(J.U),{state:Ft,path:Xt,content:fe}=He(),{"*":ue=""}=(0,Vt.g)(),[nt,Se]=(0,a.useState)(null),ye=g(nt);Fe(D);const Ht=(0,a.useCallback)(()=>{if(!nt)return;nt.querySelectorAll(".md-sidebar").forEach(ae=>{if(k)ae.style.top="0px";else{const ke=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Oe=nt.getBoundingClientRect().top??0;const Je=nt.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Oe<ke&&(Oe=ke);const _t=Math.max(Oe,0)+Je;ae.style.top=`${_t}px`;const ln=nt.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;ae.style.height=`${ln-_t}px`}ae.style.setProperty("opacity","1")})},[nt,k]);(0,a.useEffect)(()=>(window.addEventListener("resize",Ht),window.addEventListener("scroll",Ht,!0),()=>{window.removeEventListener("resize",Ht),window.removeEventListener("scroll",Ht,!0)}),[nt,Ht]);const Qt=(0,a.useCallback)(()=>{if(!nt)return;const oe=nt.querySelector(".md-footer");oe&&(oe.style.width=`${nt.getBoundingClientRect().width}px`)},[nt]);(0,a.useEffect)(()=>(window.addEventListener("resize",Qt),()=>{window.removeEventListener("resize",Qt)}),[nt,Qt]),(0,a.useEffect)(()=>{ye||(Qt(),Ht())},[Ft,ye,Qt,Ht]);const ie=(0,a.useCallback)((oe,ae)=>jn(oe,[q,ds({techdocsStorageApi:wt,entityId:f,path:ae}),us(),ps(),Nn(),gs(),Sn(Ut),et]),[f,Ut,wt,q,et]),ve=(0,a.useCallback)(async oe=>jn(oe,[zn(j,f.name),vs(),Ts(F),Rs({baseUrl:Lt.getOptionalString("app.baseUrl")||window.location.origin,onClick:(ae,Ee)=>{const ke=ae.ctrlKey||ae.metaKey,Oe=new URL(Ee),Ge=ae.target?.innerText||Ee,Je=Ee.replace(window.location.origin,"");Pt.captureEvent("click",Ge,{attributes:{to:Je}}),Oe.hash?ke?window.open(Ee,"_blank"):(window.location.pathname!==Oe.pathname?j(Ee):window.history.pushState(null,document.title,Oe.hash),oe?.querySelector(`[id="${Oe.hash.slice(1)}"]`)?.scrollIntoView(),oe?.querySelector(`[id="${Oe.hash.slice(1)}"]`)?.querySelector("a, button, [tabindex]")?.focus()):ke?window.open(Ee,"_blank"):j(Ee)}}),Hn({onLoading:()=>{},onLoaded:()=>{oe.querySelector(".md-nav__title")?.removeAttribute("for")}}),Hn({onLoading:()=>{Array.from(oe.querySelectorAll(".md-sidebar")).forEach(Ee=>{Ee.style.setProperty("opacity","0")})},onLoaded:()=>{}}),Vn()]),[F,j,Pt,f.name,Lt]);return(0,a.useEffect)(()=>{if(!fe)return()=>{};let oe=!0;return ie(fe,Xt).then(async ae=>{if(!ae?.innerHTML||!oe||ue!==Xt)return;window.scroll({top:0});const Ee=await ve(ae);Se(Ee)}),()=>{oe=!1}},[fe,ue,Xt,ie,ve]),nt};var we=t(41883),Ds=t(72020),yn=t(99730);const Yn=()=>{const f=(0,Ds.YR)(),{shadowRoot:D}=(0,b.V)(),j=D?.querySelector('[data-md-component="content"]'),F=D?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let k=F?.querySelector('[data-techdocs-addons-location="primary sidebar"]');k||(k=document.createElement("div"),k.setAttribute("data-techdocs-addons-location","primary sidebar"),F?.prepend(k));const q=D?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let et=q?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return et||(et=document.createElement("div"),et.setAttribute("data-techdocs-addons-location","secondary sidebar"),q?.prepend(et)),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(we.A,{container:k,children:f.renderComponentsByLocation(yn.e.PrimarySidebar)}),(0,s.jsx)(we.A,{container:j,children:f.renderComponentsByLocation(yn.e.Content)}),(0,s.jsx)(we.A,{container:et,children:f.renderComponentsByLocation(yn.e.SecondarySidebar)})]})},Ls=(0,p.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Pn=Qe(f=>{const{withSearch:D=!0,searchResultUrlMapper:j,onReady:F}=f,k=Ls(),{entityMetadata:{value:q,loading:et},entityRef:Pt,setShadowRoot:wt}=(0,b.V)(),{state:Ut}=He(),Lt=Ne(Pt,f.defaultPath),Ft=window.location.pathname,Xt=window.location.hash,fe=g(Lt),[ue]=B([`[id="${Xt.slice(1)}"]`]),nt=(0,it.n)(),{NotFoundErrorPage:Se}=nt.getComponents();(0,a.useEffect)(()=>{fe||(Xt?ue&&ue.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Ft,Xt,ue,fe]);const ye=(0,a.useCallback)(Ht=>{wt(Ht),F instanceof Function&&F()},[wt,F]);return et===!1&&!q?(0,s.jsx)(Se,{}):Lt?(0,s.jsx)(M.U,{children:(0,s.jsxs)(x.A,{container:!0,children:[(0,s.jsx)(x.A,{xs:12,item:!0,children:(0,s.jsx)(je,{})}),D&&(0,s.jsx)(x.A,{className:k.search,xs:"auto",item:!0,children:(0,s.jsx)(he,{entityId:Pt,entityTitle:q?.metadata?.title,searchResultUrlMapper:j})}),(0,s.jsxs)(x.A,{xs:12,item:!0,children:[(Ut==="CHECKING"||fe)&&(0,s.jsx)($.k,{}),(0,s.jsx)(C,{element:Lt,onAppend:ye,children:(0,s.jsx)(Yn,{})})]})]})}):(0,s.jsx)(M.U,{children:(0,s.jsx)(x.A,{container:!0,children:(0,s.jsx)(x.A,{xs:12,item:!0,children:(0,s.jsx)(je,{})})})})}),Vs=null},45061:(H,S,t)=>{"use strict";t.d(S,{T:()=>At});var s=t(31085),a=t(14041),x=t(93285),p=t(42899),b=t(4387),h=t(13660),d=t(72020),m=t(88572),u=t(99730),v=t(82292),g=t(67871),C=t(8859),O=t(34428),P=t(51372),B=t(6820),L=t(58837),I=t(268),M=t(72501),$=t(72072);const W=(0,L.A)(Ot=>({root:{textAlign:"left"},label:{color:Ot.page.fontColor,fontWeight:Ot.typography.fontWeightBold,letterSpacing:0,fontSize:Ot.typography.fontSize,marginBottom:Ot.spacing(1)/2,lineHeight:1},value:{color:(0,I.X4)(Ot.page.fontColor,.8),fontSize:Ot.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),X=({value:Ot,className:It,typographyRootComponent:ut})=>(0,s.jsx)(M.A,{component:ut??(typeof Ot=="string"?"p":"span"),className:It,children:Ot});function z(Ot){const{label:It,value:ut,url:lt,contentTypograpyRootComponent:xt}=Ot,gt=W(),bt=(0,s.jsx)(X,{className:gt.value,value:ut||"<Unknown>",typographyRootComponent:xt});return(0,s.jsx)(p.A,{item:!0,children:(0,s.jsxs)(M.A,{component:"span",className:gt.root,children:[(0,s.jsx)(M.A,{className:gt.label,children:It}),lt?(0,s.jsx)($.N_,{to:lt,children:bt}):bt]})})}var Y=t(69814),K=t(72427),dt=t(65461),G=t(9222),Q=t(56005),J=t.n(Q),ct=t(82779),pt=t(18690);const yt=(0,s.jsx)(b.A,{animation:"wave",variant:"text",height:40}),At=Ot=>{const{children:It}=Ot,ut=(0,d.YR)(),lt=(0,K.gf)(dt.U),xt=(0,K.gf)(v.n),{"*":gt=""}=(0,pt.g)(),{title:bt,setTitle:Rt,subtitle:it,setSubtitle:ft,entityRef:vt,metadata:{value:st,loading:Et},entityMetadata:{value:at,loading:U}}=(0,m.V)();(0,a.useEffect)(()=>{st&&(Rt(st.site_name),ft(()=>{let{site_description:le}=st;return(!le||le==="None")&&(le=""),le}))},[st,Rt,ft]);const V=lt.getOptional("app.title")||"Backstage",{locationMetadata:rt,spec:Ct}=at||{},ht=Ct?.lifecycle,Bt=at?(0,g.t)(at,P.vv):[],Nt=(0,G.S)(ct.rQ)(),kt=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(z,{label:J()(at?.kind||"entity"),value:(0,s.jsx)(C.z,{color:"inherit",entityRef:vt,title:at?.metadata.title,defaultKind:"Component"})}),Bt.length>0&&(0,s.jsx)(z,{label:"Owner",value:(0,s.jsx)(O.i,{color:"inherit",entityRefs:Bt,defaultKind:"group"})}),ht?(0,s.jsx)(z,{label:"Lifecycle",value:String(ht)}):null,rt&&rt.type!=="dir"&&rt.type!=="file"?(0,s.jsx)(z,{label:"",value:(0,s.jsxs)(p.A,{container:!0,direction:"column",alignItems:"center",children:[(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:(0,s.jsx)(h.A,{style:{marginTop:"-25px"}})}),(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:"Source"})]}),url:rt.target}):null]});if(!U&&at===void 0||!Et&&st===void 0)return null;const Vt=(0,B.U2)(vt),jt=xt.forEntity(Vt).snapshot.primaryTitle,Gt=le=>le.replace(/\/$/,""),ce=le=>le.replace(/-/g," ").split(" ").map(J()).join(" ");let he=[];gt!==""&&(he=Gt(gt).split("/").slice(0,3).map(ce));const ne=[V,jt,...he].join(" | ");return(0,s.jsxs)(Y.Y,{type:"Documentation",typeLink:Nt,title:bt||yt,subtitle:it===""?void 0:it||yt,children:[(0,s.jsx)(x.A,{titleTemplate:"%s",children:(0,s.jsx)("title",{children:ne})}),kt,It,ut.renderComponentsByLocation(u.e.Header)]})}},82779:(H,S,t)=>{"use strict";t.d(S,{Oc:()=>x,Ri:()=>p,rQ:()=>a});var s=t(34569);const a=(0,s.H)({id:"techdocs:index-page"}),x=(0,s.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),p=(0,s.H)({id:"techdocs:catalog-reader-view"})},27698:(H,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>u});var s=t(31085),a=t(68804),x=t(5951),p=t(58837),b=t(72501),h=t(72072),d=t(70734);const m=(0,p.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),u=v=>{const{result:g,highlight:C,lineClamp:O=5,asListItem:P=!0,asLink:B=!0,title:L,icon:I}=v,M=m(),$=({children:z})=>B?(0,s.jsx)(h.N_,{noTrack:!0,to:g.location,children:z}):(0,s.jsx)(s.Fragment,{children:z}),W=()=>{const z=C?.fields.title?(0,s.jsx)(d.e,{text:C.fields.title,preTag:C.preTag,postTag:C.postTag}):g.title,Y=C?.fields.entityTitle?(0,s.jsx)(d.e,{text:C.fields.entityTitle,preTag:C.preTag,postTag:C.postTag}):g.entityTitle,K=C?.fields.name?(0,s.jsx)(d.e,{text:C.fields.name,preTag:C.preTag,postTag:C.postTag}):g.name;return g?(0,s.jsx)(x.A,{className:M.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,s.jsx)($,{children:L||(0,s.jsxs)(s.Fragment,{children:[z," | ",Y??K," docs"]})}),secondary:(0,s.jsx)(b.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:O,overflow:"hidden"},color:"textSecondary",variant:"body2",children:C?.fields.text?(0,s.jsx)(d.e,{text:C.fields.text,preTag:C.preTag,postTag:C.postTag}):g.text})}):null},X=({children:z})=>P?(0,s.jsxs)(s.Fragment,{children:[I&&(0,s.jsx)(a.A,{children:typeof I=="function"?I(g):I}),(0,s.jsx)("div",{className:M.flexContainer,children:z})]}):(0,s.jsx)(s.Fragment,{children:z});return(0,s.jsx)(X,{children:(0,s.jsx)(W,{})})}},97184:(H,S,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var S=s=>H(H.s=s);H.O(0,[1751,1888,5067,1678,235,5042,6587,7400,1975,4538,4121],()=>(S(97184),S(71543)));var t=H.O()}]);})();
552
552
 
553
- //# sourceMappingURL=main.a83e2ff3.js.map
553
+ //# sourceMappingURL=main.833f35c4.js.map