@techdocs/cli 1.9.1 → 1.9.2-next.0

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,11 +1,11 @@
1
- (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(H,S,t)=>{"use strict";t.d(S,{c:()=>n});const n=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(H,S,t)=>{"use strict";t.d(S,{P:()=>d,_P:()=>a,oQ:()=>n});const n="default",a="backstage.io/view-url",d="backstage.io/edit-url",x="kubernetes.io/api-server",m="kubernetes.io/api-server-certificate-authority",h="kubernetes.io/auth-provider"},6820:(H,S,t)=>{"use strict";t.d(S,{KU:()=>x,U2:()=>m,sM:()=>d});var n=t(72348);function a(h){let u=h.indexOf(":");const p=h.indexOf("/");p!==-1&&p<u&&(u=-1);const g=u===-1?void 0:h.slice(0,u),y=p===-1?void 0:h.slice(u+1,p),A=h.slice(Math.max(u+1,p+1));if(g===""||y===""||A==="")throw new TypeError(`Entity reference "${h}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:g,namespace:y,name:A}}function d(h){return{kind:h.kind,namespace:h.metadata.namespace||n.oQ,name:h.metadata.name}}function x(h,u){if(!h)throw new Error("Entity reference must not be empty");const p=u?.defaultKind,g=u?.defaultNamespace||n.oQ;let y,A,v;if(typeof h=="string"){const T=a(h);y=T.kind??p,A=T.namespace??g,v=T.name}else y=h.kind??p,A=h.namespace??g,v=h.name;if(y)if(A){if(!v){const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty name`)}}else{const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty namespace`)}else{const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:y,namespace:A,name:v}}function m(h){let u,p,g;return"metadata"in h?(u=h.kind,p=h.metadata.namespace??n.oQ,g=h.metadata.name):(u=h.kind,p=h.namespace??n.oQ,g=h.name),`${u.toLocaleLowerCase("en-US")}:${p.toLocaleLowerCase("en-US")}/${g.toLocaleLowerCase("en-US")}`}},51372:(H,S,t)=>{"use strict";t.d(S,{fT:()=>p,jn:()=>T,nC:()=>u,sA:()=>P,vv:()=>n});const n="ownedBy",a="ownerOf",d="consumesApi",x="apiConsumedBy",m="providesApi",h="apiProvidedBy",u="dependsOn",p="dependencyOf",g="parentOf",y="childOf",A="memberOf",v="hasMember",T="partOf",P="hasPart"},17736:(H,S,t)=>{"use strict";t.d(S,{Eo:()=>n,I4:()=>d});const n="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},78692:(H,S,t)=>{"use strict";t.d(S,{Cr:()=>h,KL:()=>m,aY:()=>x});var n=t(6820),a=t(17736);const d=/^[\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 x(u){if(typeof u!="string")throw new TypeError(`Unable to parse location ref '${u}', unexpected argument ${typeof u}`);const p=u.indexOf(":");if(p<0)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const g=u.substring(0,p).trim(),y=u.substring(p+1).trim();if(!g||!y)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(g==="http"||g==="https")throw new TypeError(`Invalid location ref '${u}', please prefix it with 'url:', e.g. 'url:${u}'`);if(d.test(y))throw new TypeError(`Invalid location ref '${u}', target is a javascript: URL`);return{type:g,target:y}}function m(u){const{type:p,target:g}=u;if(p){if(!g)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(g))throw new TypeError(`Invalid location ref '${p}:${g}', target is a javascript: URL`);return`${p}:${g}`}function h(u){const p=u.metadata?.annotations?.[a.I4]??u.metadata?.annotations?.[a.Eo];if(!p)throw new Error(`Entity '${(0,n.U2)(u)}' is missing location`);return x(p)}},77310:(H,S,t)=>{"use strict";t.d(S,{z:()=>g});var n=t(31085),a=t(10394),d=t(54917),x=t(14041),m=t(69578),h=t(40697),u=t(25577),p=t(37916);function g(y){const{text:A,language:v,showLineNumbers:T=!1,highlightedNumbers:P,customStyle:L,showCopyCodeButton:O=!1}=y,j=(0,d.A)(),$=j.palette.type==="dark"?h.A:u.A,M=j.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,n.jsxs)(a.A,{position:"relative",children:[(0,n.jsx)(m.A,{customStyle:L,language:v,style:$,showLineNumbers:T,wrapLines:!0,lineNumberStyle:{color:j.palette.textVerySubtle},lineProps:J=>P?.includes(J)?{style:{backgroundColor:M}}:{},children:A}),O&&(0,n.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,n.jsx)(p.l,{text:A})})]})}},37916:(H,S,t)=>{"use strict";t.d(S,{l:()=>A});var n=t(31085),a=t(72427),d=t(39837),x=t(29365),m=t(71677),h=t(99594),u=t(14041),p=t(36338),g=t(10315),y=t(87849);function A(v){const{t:T}=(0,y.i)(g.O),{text:P,tooltipDelay:L=1e3,tooltipText:O=T("copyTextButton.tooltipText"),"aria-label":j="Copy text"}=v,$=(0,a.gf)(d.m),[M,J]=(0,u.useState)(!1),[{error:Q},F]=(0,p.A)();(0,u.useEffect)(()=>{Q&&$.post(Q)},[Q,$]);const V=Y=>{Y.stopPropagation(),J(!0),F(P)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(m.Ay,{id:"copy-test-tooltip",title:O,placement:"top",leaveDelay:L,onClose:()=>J(!1),open:M,children:(0,n.jsx)(x.A,{onClick:V,"aria-label":j,children:(0,n.jsx)(h.A,{})})})})}},44186:(H,S,t)=>{"use strict";t.d(S,{p:()=>T});var n=t(31085),a=t(42899),d=t(58837),x=t(72501),m=t(14041);const h=t.p+"static/missingAnnotation.67f79e98.svg",u=t.p+"static/noInformation.4b426325.svg",p=t.p+"static/createComponent.975d1e1e.svg",g=t.p+"static/noBuild.1715fa71.svg",y=(0,d.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),A=({missing:P})=>{const L=y();switch(P){case"field":return(0,n.jsx)("img",{src:h,className:L.generalImg,alt:"annotation is missing"});case"info":return(0,n.jsx)("img",{src:u,alt:"no Information",className:L.generalImg});case"content":return(0,n.jsx)("img",{src:p,alt:"create Component",className:L.generalImg});case"data":return(0,n.jsx)("img",{src:g,alt:"no Build",className:L.generalImg});default:return null}},v=(0,d.A)(P=>({root:{backgroundColor:P.palette.background.default,padding:P.spacing(2,0,0,0)},action:{marginTop:P.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function T(P){const{title:L,description:O,missing:j,action:$}=P,M=v();return(0,n.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:M.root,spacing:2,children:[(0,n.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,n.jsxs)(a.A,{container:!0,direction:"column",children:[(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(x.A,{variant:"h5",children:L})}),(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(x.A,{variant:"body1",children:O})}),(0,n.jsx)(a.A,{item:!0,xs:!0,className:M.action,children:$})]})}),(0,n.jsx)(a.A,{item:!0,xs:12,md:6,className:M.imageContainer,children:typeof j=="string"?(0,n.jsx)(A,{missing:j}):j.customImage})]})}},22020:(H,S,t)=>{"use strict";t.d(S,{b:()=>A});var n=t(31085),a=t(58837),d=t(58007),x=t(8109),m=t(5951),h=t(14041),u=t(37916),p=t(88640);const g=(0,a.A)(v=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:v.spacing(2)},divider:{margin:v.spacing(2)}}),{name:"BackstageErrorPanel"}),y=({error:v,message:T,stack:P,children:L})=>{const O=g();return(0,n.jsxs)(d.A,{dense:!0,children:[(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Error",secondary:v}),(0,n.jsx)(u.l,{text:v})]}),(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Message",secondary:T}),(0,n.jsx)(u.l,{text:T})]}),P&&(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Stack Trace",secondary:P}),(0,n.jsx)(u.l,{text:P})]}),L]})};function A(v){const{title:T,error:P,defaultExpanded:L,titleFormat:O,children:j}=v;return(0,n.jsx)(p.B,{severity:"error",title:T??P.message,defaultExpanded:L,titleFormat:O,children:(0,n.jsx)(y,{error:P.name,message:P.message,stack:P.stack,children:j})})}},18956:(H,S,t)=>{"use strict";t.d(S,{m:()=>u});var n=t(31085),a=t(14041),d=t(72501),x=t(58837),m=t(31129);const h=(0,x.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function u(g){const{isFavorite:y}=g,A=h();return(0,n.jsx)(d.A,{component:"span",className:y?A.icon:A.iconBorder,children:y?(0,n.jsx)(m.Gg,{}):(0,n.jsx)(m.KG,{})})}function p(g){const{id:y,title:A,isFavorite:v,onToggle:T,...P}=g;return _jsx(Tooltip,{id:y,title:A,children:_jsx(IconButton,{"aria-label":A,id:y,onClick:()=>T(!v),color:"inherit",...P,children:_jsx(u,{isFavorite:v})})})}},72072:(H,S,t)=>{"use strict";t.d(S,{N_:()=>Z});var n=t(31085),a=t(72427),d=t(65461),x=t(93368),m=t(49203),h=t(58837),u=t(72501),p=t(53373),g=t.n(p),y=t(45250),A=t.n(y),v=t(14041),T=t(18690),P=t(73657),L=t(39330),O=t(82266);function j(){const[G]=(0,T.AV)((0,n.jsx)(T.qh,{index:!0,element:(0,n.jsx)("div",{})}));return!G.index}const $=(0,h.A)(G=>({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:G.spacing(.5)}}),{name:"Link"}),M=()=>{const at=(0,O.n)().getSystemIcon("externalLink")||L.A,pt=$();return(0,n.jsx)(at,{className:pt.externalLinkIcon})},J=G=>/^([a-z+.-]+):/.test(G),Q=/^[\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,F=window.open;if(F&&!F.__backstage){const G=function(...pt){const Et=String(pt[0]);if(Q.test(Et))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return F.apply(this,pt)};G.__backstage=!0,window.open=G}const V=()=>{try{return(0,a.gf)(d.U).getOptionalString("app.baseUrl")}catch{return}},Y=()=>{const G="http://sample.dev",at=V()??"/",{pathname:pt}=new URL(at,G);return(0,y.trimEnd)(pt,"/")},nt=G=>{let at=String(G);const pt=Y(),Et=J(at),bt=at.startsWith(pt);return!Et&&!bt&&(at=pt.concat(at)),at},W=G=>G instanceof Array?G.map(W).join(" ").trim():typeof G=="object"&&G?W(G?.props?.children):["string","number"].includes(typeof G)?String(G):"",Z=v.forwardRef(({onClick:G,noTrack:at,externalLinkIcon:pt,...Et},bt)=>{const At=$(),Dt=(0,x.s)(),lt=j()?nt(Et.to):Et.to,dt=W(Et.children)||lt,xt=J(lt),ft=xt&&!!/^https?:/.exec(lt);if(Q.test(lt))throw new Error("Link component rejected javascript: URL as a security precaution");const Ct=Pt=>{G?.(Pt),at||Dt.captureEvent("click",dt,{attributes:{to:lt}})};return xt?(0,n.jsxs)(m.A,{...ft?{target:"_blank",rel:"noopener"}:{},...Et,...Et["aria-label"]?{"aria-label":`${Et["aria-label"]}, Opens in a new window`}:{},ref:bt,href:lt,onClick:Ct,className:g()(At.externalLink,Et.className),children:[Et.children,pt&&(0,n.jsx)(M,{}),(0,n.jsx)(u.A,{component:"span",className:At.visuallyHidden,children:", Opens in a new window"})]}):(0,n.jsx)(m.A,{...Et,ref:bt,component:P.N_,to:lt,onClick:Ct})})},73896:(H,S,t)=>{"use strict";t.d(S,{z:()=>h});var n=t(31085),a=t(64947),d=t(14041),x=t(72072);const m=d.forwardRef((p,g)=>(0,n.jsx)(x.N_,{ref:g,...p,color:"initial"})),h=d.forwardRef((p,g)=>(0,n.jsx)(a.A,{ref:g,component:m,...p})),u=null},4650:(H,S,t)=>{"use strict";t.d(S,{h:()=>A});var n=t(31085),a=t(58837),d=t(45872),x=t(61125),m=t(14041),h=t(77310);const u=(0,a.A)(v=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${v.palette.border}`},"& th, & td":{border:`1px solid ${v.palette.border}`,padding:v.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:v.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:v.palette.background.paper},"& tr":{backgroundColor:v.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:v.palette.background.default},"& a":{color:v.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),p=(v,T)=>T?typeof T=="string"?v+T:m.Children.toArray(T.props.children).reduce(p,v):v,g=({level:v,children:T})=>{const O=m.Children.toArray(T).reduce(p,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${v}`,{id:O},T)},y={code:({inline:v,className:T,children:P,...L})=>{const O=String(P).replace(/\n+$/,""),j=/language-(\w+)/.exec(T||"");return!v&&j?(0,n.jsx)(h.z,{language:j[1],text:O}):(0,n.jsx)("code",{className:T,...L,children:P})},h1:g,h2:g,h3:g,h4:g,h5:g,h6:g};function A(v){const{content:T,dialect:P="gfm",linkTarget:L,transformLinkUri:O,transformImageUri:j,className:$}=v,M=u();return(0,n.jsx)(d.$,{remarkPlugins:P==="gfm"?[x.A]:[],className:`${M.markdown} ${$??""}`.trim(),children:T,components:y,linkTarget:L,transformLinkUri:O,transformImageUri:j})}},68146:(H,S,t)=>{"use strict";t.d(S,{k:()=>h});var n=t(31085),a=t(10394),d=t(88951),x=t(54917),m=t(14041);function h(u){const p=(0,x.A)(),[g,y]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const A=setTimeout(()=>y(!0),p.transitions.duration.short);return()=>clearTimeout(A)},[p.transitions.duration.short]),g?(0,n.jsx)(d.A,{...u,"data-testid":"progress"}):(0,n.jsx)(a.A,{display:"none","data-testid":"progress"})}},66917:(H,S,t)=>{"use strict";t.d(S,{w:()=>nt});var n=t(31085),a=t(10394),d=t(69076),x=t(67720),m=t(95061),h=t(41857),u=t(48543),p=t(26343),g=t(81215),y=t(87051),A=t(12398),v=t(58837),T=t(72501),P=t(92399),L=t(14041),O=t(10437);const j=(0,v.A)(W=>(0,A.A)({icon:{position:"absolute",right:W.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),M=()=>{const W=j();return(0,n.jsx)(O.A,{className:W.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},J=(0,v.A)(W=>(0,A.A)({icon:{position:"absolute",right:W.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),F=()=>{const W=J();return(0,n.jsx)(O.A,{className:W.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},V=(0,y.A)(W=>(0,A.A)({root:{"label + &":{marginTop:W.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:W.palette.primary.main}},input:{borderRadius:W.shape.borderRadius,position:"relative",backgroundColor:W.palette.background.paper,border:"1px solid #ced4da",fontSize:W.typography.body1.fontSize,padding:W.spacing(1.25,3.25,1.25,1.5),transition:W.transitions.create(["border-color","box-shadow"]),"&:focus":{background:W.palette.background.paper,borderRadius:W.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(h.A),Y=(0,v.A)(W=>(0,A.A)({formControl:{margin:W.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:W.typography.body2.fontSize,fontFamily:W.typography.fontFamily,color:W.palette.text.primary,"&.Mui-focused":{color:W.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:W.typography.body2.fontSize,fontFamily:W.typography.fontFamily,color:W.palette.text.primary,"&.Mui-focused":{color:W.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function nt(W){const{multiple:Z,items:G,label:at,placeholder:pt,selected:Et,onChange:bt,triggerReset:At,native:Dt=!1,disabled:lt=!1,margin:dt,"data-testid":xt="select"}=W,ft=Y(),[Ct,Pt]=(0,L.useState)(Et||(Z?[]:"")),[it,mt]=(0,L.useState)(!1);(0,L.useEffect)(()=>{Pt(Z?[]:"")},[At,Z]),(0,L.useEffect)(()=>{Pt(Et||(Z?[]:""))},[Et,Z]);const yt=B=>{Pt(B.target.value),bt(B.target.value)},et=B=>{if(lt){B.preventDefault();return}mt(z=>Z&&!(B.target instanceof HTMLElement)?!0:!z)},ht=()=>{mt(!1)},rt=B=>()=>{const z=Ct.filter(ut=>ut!==B);Pt(z),bt(z)};return(0,n.jsx)(a.A,{className:ft.root,children:(0,n.jsxs)(m.A,{className:ft.formControl,children:[(0,n.jsx)(u.A,{className:ft.formLabel,children:at}),(0,n.jsxs)(g.A,{"aria-label":at,value:Ct,native:Dt,disabled:lt,"data-testid":xt,displayEmpty:!0,multiple:Z,margin:dt,onChange:yt,open:it,onOpen:et,onClose:ht,input:(0,n.jsx)(V,{}),label:at,renderValue:B=>Z&&Ct.length!==0?(0,n.jsx)(a.A,{className:ft.chips,children:B.map(z=>{const ut=G.find(Ot=>Ot.value===z);return ut?(0,n.jsx)(x.A,{"data-testid":"chip",label:ut?.label,clickable:!0,deleteIcon:(0,n.jsx)(P.A,{"data-testid":"cancel-icon",onMouseDown:Ot=>Ot.stopPropagation()}),onDelete:rt(z),className:ft.chip},ut?.value):!1})}):(0,n.jsx)(T.A,{children:Ct.length===0?pt||"":G.find(z=>z.value===B)?.label}),IconComponent:()=>it?(0,n.jsx)(F,{}):(0,n.jsx)(M,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!pt&&!Z&&(0,n.jsx)(p.A,{value:[],children:pt}),Dt?G&&G.map(B=>(0,n.jsx)("option",{value:B.value,children:B.label},B.value)):G&&G.map(B=>(0,n.jsxs)(p.A,{value:B.value,children:[Z&&(0,n.jsx)(d.A,{color:"primary",checked:Ct.includes(B.value)||!1,className:ft.checkbox}),B.label]},B.value))]})]})})}},27586:(H,S,t)=>{"use strict";t.d(S,{Y:()=>Z});var n=t(31085),a=t(82266),d=t(72427),x=t(65461),m=t(10394),h=t(64947),u=t(93453),p=t(29365),g=t(68804),y=t(5951),A=t(26343),v=t(28233),T=t(55197),P=t(58837),L=t(72501),O=t(5893),j=t(14041),$=t(10795),M=t(31129),J=t(72072),Q=t(10315),F=t(87849);const V=(0,P.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),Y=({icon:G})=>{const at=(0,a.n)(),pt=G?at.getSystemIcon(G)??M.NT:M.NT;return(0,n.jsx)(pt,{})},nt=({link:G})=>(0,n.jsx)(J.N_,{to:G.url,children:G.title??G.url}),W=({item:G})=>(0,n.jsxs)(A.A,{button:!1,children:[(0,n.jsx)(g.A,{children:(0,n.jsx)(Y,{icon:G.icon})}),(0,n.jsx)(y.A,{primary:G.title,secondary:G.links?.reduce((at,pt,Et)=>[...at,Et>0&&(0,n.jsx)("br",{},Et),(0,n.jsx)(nt,{link:pt},pt.url)],[])})]});function Z(G){const{t:at}=(0,F.i)(Q.O),{title:pt,items:Et,children:bt}=G,{items:At}=(0,$.l)(),[Dt,lt]=(0,j.useState)(!1),[dt,xt]=(0,j.useState)(null),ft=V(),Ct=(0,d.gf)(x.U).getOptionalConfig("app.support"),Pt=(0,O.A)(yt=>yt.breakpoints.down("sm")),it=yt=>{xt(yt.currentTarget),lt(!0)},mt=()=>{lt(!1)};return Ct?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.A,{display:"flex",ml:1,children:Pt?(0,n.jsx)(p.A,{color:"primary",size:"small",onClick:it,"data-testid":"support-button","aria-label":"Support",children:(0,n.jsx)(M.NT,{})}):(0,n.jsx)(h.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:it,startIcon:(0,n.jsx)(M.NT,{}),children:at("supportButton.title")})}),(0,n.jsxs)(T.Ay,{"data-testid":"support-button-popover",open:Dt,anchorEl:dt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:mt,children:[(0,n.jsxs)(v.A,{className:ft.popoverList,autoFocusItem:!!dt,children:[pt&&(0,n.jsx)(A.A,{button:!1,alignItems:"flex-start",className:ft.menuItem,children:(0,n.jsx)(L.A,{variant:"subtitle1",children:pt})}),j.Children.map(bt,(yt,et)=>(0,n.jsx)(A.A,{button:!1,alignItems:"flex-start",className:ft.menuItem,children:yt},`child-${et}`)),(Et??At).map((yt,et)=>(0,n.jsx)(W,{item:yt},`item-${et}`))]}),(0,n.jsx)(u.A,{children:(0,n.jsx)(h.A,{color:"primary",onClick:mt,"aria-label":"Close",children:at("supportButton.close")})})]})]}):null}},14209:(H,S,t)=>{"use strict";t.d(S,{X:()=>et});var n=t(31085),a=t(87849),d=t(25301),x=t(10394),m=t(29365),h=t(87051),u=t(58837),p=t(54917),g=t(72501),y=t(83313),A=t(89019),v=t(62461),T=t(68887),P=t(63798),L=t(64704),O=t(6774),j=t(75625),$=t(65859),M=t(45917),J=t(5416),Q=t(33494),F=t(80113),V=t(26229),Y=t(46802),nt=t(45250),W=t(14041),Z=t(10315),G=t(64947),at=t(66917);const pt=(0,u.A)(B=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:B.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:B.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${B.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:B.spacing(2)}}}),{name:"BackstageTableFilters"}),Et=B=>{const z=pt(),{onChangeFilters:ut}=B,{t:Ot}=(0,a.i)(Z.O),[It,Lt]=(0,W.useState)({...B.selectedFilters}),[Ut,Nt]=(0,W.useState)(!1),Wt=()=>{Lt({}),Nt(Kt=>!Kt)};return(0,W.useEffect)(()=>{ut(It)},[It,ut]),(0,n.jsxs)(x.A,{className:z.root,children:[(0,n.jsxs)(x.A,{className:z.header,children:[(0,n.jsx)(x.A,{className:z.value,children:Ot("table.filter.title")}),(0,n.jsx)(G.A,{color:"primary",onClick:Wt,children:Ot("table.filter.clearAll")})]}),(0,n.jsx)(x.A,{className:z.filters,children:B.filters?.length&&B.filters.map(Kt=>(0,n.jsx)(at.w,{triggerReset:Ut,...Kt.element,selected:It[Kt.element.label],onChange:te=>Lt({...It,[Kt.element.label]:te})},Kt.element.label))})]})};var bt=t(78467);function At(B){return(0,n.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:B.colSpan,children:(0,n.jsx)(x.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,n.jsx)(bt.A,{size:"5rem"})})})})})}const Dt={Add:(0,W.forwardRef)((B,z)=>(0,n.jsx)(y.A,{...B,ref:z})),Check:(0,W.forwardRef)((B,z)=>(0,n.jsx)(v.A,{...B,ref:z})),Clear:(0,W.forwardRef)((B,z)=>(0,n.jsx)(L.A,{...B,ref:z})),Delete:(0,W.forwardRef)((B,z)=>(0,n.jsx)(O.A,{...B,ref:z})),DetailPanel:(0,W.forwardRef)((B,z)=>(0,n.jsx)(P.A,{...B,ref:z})),Edit:(0,W.forwardRef)((B,z)=>(0,n.jsx)(j.A,{...B,ref:z})),Export:(0,W.forwardRef)((B,z)=>(0,n.jsx)(V.A,{...B,ref:z})),Filter:(0,W.forwardRef)((B,z)=>(0,n.jsx)($.A,{...B,ref:z})),FirstPage:(0,W.forwardRef)((B,z)=>(0,n.jsx)(J.A,{...B,ref:z})),LastPage:(0,W.forwardRef)((B,z)=>(0,n.jsx)(Q.A,{...B,ref:z})),NextPage:(0,W.forwardRef)((B,z)=>(0,n.jsx)(P.A,{...B,ref:z})),PreviousPage:(0,W.forwardRef)((B,z)=>(0,n.jsx)(T.A,{...B,ref:z})),ResetSearch:(0,W.forwardRef)((B,z)=>(0,n.jsx)(L.A,{...B,ref:z})),Search:(0,W.forwardRef)((B,z)=>(0,n.jsx)(M.A,{...B,ref:z})),SortArrow:(0,W.forwardRef)((B,z)=>(0,n.jsx)(A.A,{...B,ref:z})),ThirdStateCheck:(0,W.forwardRef)((B,z)=>(0,n.jsx)(F.A,{...B,ref:z})),ViewColumn:(0,W.forwardRef)((B,z)=>(0,n.jsx)(Y.A,{...B,ref:z}))};function lt(B,z){const ut=z.split(".");let Ot=B[ut[0]];for(let It=1;It<ut.length;++It){if(Ot===void 0)return Ot;const Lt=ut[It];Ot=Ot[Lt]}return Ot}const dt=(0,h.A)(B=>({header:{padding:B.spacing(1,2,1,2.5),borderTop:`1px solid ${B.palette.grey.A100}`,borderBottom:`1px solid ${B.palette.grey.A100}`,fontWeight:B.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(d.rV),xt=(0,h.A)(B=>({root:{padding:B.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:B.typography.fontWeightBold}},searchField:{paddingRight:B.spacing(2)}}),{name:"BackstageTableToolbar"})(d.Nb),ft=(0,u.A)(B=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:B.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Ct=(0,u.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Pt(B,z){return B.map(ut=>{const Ot=ut.headerStyle??{};let It=ut.cellStyle||{};if(ut.highlight)if(Ot.color=z.palette.textContrast,typeof It=="object")It.fontWeight=z.typography.fontWeightBold;else{const Lt=It;It=(Ut,Nt,Wt)=>({...Lt(Ut,Nt,Wt),fontWeight:z.typography.fontWeightBold})}return{...ut,headerStyle:Ot,cellStyle:It}})}function it(B,z){return(0,nt.transform)(B,(ut,Ot,It)=>{(0,nt.isEqual)(Ot,z[It])||(ut[It]=Ot)})}const mt={search:"",filtersOpen:!1,filters:{}};function yt(B){const{toolbarRef:z,setSearch:ut,hasFilters:Ot,selectedFiltersLength:It,toggleFilters:Lt}=B,{t:Ut}=(0,a.i)(Z.O),Nt=ft(),Wt=(0,W.useCallback)(Kt=>{B.onSearchChanged(Kt),ut(Kt)},[B,ut]);return Ot?(0,n.jsxs)(x.A,{className:Nt.root,children:[(0,n.jsxs)(x.A,{className:Nt.root,children:[(0,n.jsx)(m.A,{onClick:Lt,"aria-label":"filter list",children:(0,n.jsx)($.A,{})}),(0,n.jsxs)(g.A,{className:Nt.title,children:[Ut("table.filter.title")," (",It,")"]})]}),(0,n.jsx)(xt,{...B,ref:z,onSearchChanged:Wt})]}):(0,n.jsx)(xt,{...B,ref:z,onSearchChanged:Wt})}function et(B){const{data:z,columns:ut,emptyContent:Ot,options:It,title:Lt,subtitle:Ut,localization:Nt,filters:Wt,initialState:Kt,onStateChange:te,components:jt,isLoading:kt,style:ee,...fe}=B,{t:Gt}=(0,a.i)(Z.O),ne=Ct(),de=(0,p.A)(),Xe={...mt,...Kt},[Ge,oe]=(0,W.useState)(Xe.filtersOpen),We=(0,W.useCallback)(()=>oe(ye=>!ye),[oe]),[ae,Ye]=(0,W.useState)(Xe.filters),[_e,ge]=(0,W.useState)(Xe.search);(0,W.useEffect)(()=>{if(te){const ye=it({search:_e,filtersOpen:Ge,filters:ae},mt);te(ye)}},[_e,Ge,ae,te]);const rn=(0,W.useCallback)(ye=>ut.find(He=>He.title===ye)?.field,[ut]),gn=(0,W.useMemo)(()=>{if(typeof z=="function"||!ae)return z;const ye=Object.values(ae);return z&&ye.flat().length?z.filter(ke=>!!Object.entries(ae).filter(([,Qe])=>!!Qe.length).every(([Qe,je])=>{const ve=lt(ke,rn(Qe));return Array.isArray(ve)&&Array.isArray(je)?ve.some(w=>je.includes(w)):Array.isArray(ve)?ve.includes(je):Array.isArray(je)?je.includes(ve):ve===je})):z},[z,ae,rn]),on=Object.values(ae).flat().length,qe=!!Wt?.length,De=(0,W.useCallback)(ye=>(0,n.jsx)(yt,{setSearch:ge,hasFilters:qe,selectedFiltersLength:on,toggleFilters:We,...ye}),[We,qe,on,ge]),Ke=typeof z!="function"&&z.length===0,ze=ut.length,an=(0,W.useMemo)(()=>ht({hasNoRows:Ke,emptyContent:Ot,columnCount:ze,loading:kt}),[Ke,Ot,ze,kt]);return(0,n.jsxs)(x.A,{className:ne.root,children:[Ge&&z&&typeof z!="function"&&Wt?.length&&(0,n.jsx)(Et,{filters:rt(Wt,z,ut,Gt),selectedFilters:ae,onChangeFilters:Ye}),(0,n.jsx)(d.Ay,{components:{Header:dt,Body:an,Toolbar:De,...jt},options:It,columns:Pt(ut,de),icons:Dt,title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.A,{variant:"h5",component:"h2",children:Lt}),Ut&&(0,n.jsx)(g.A,{color:"textSecondary",variant:"body1",children:Ut})]}),data:gn,style:{width:"100%",...ee},localization:{...Nt,body:{emptyDataSourceMessage:Gt("table.body.emptyDataSourceMessage"),...Nt?.body},pagination:{firstTooltip:Gt("table.pagination.firstTooltip"),labelDisplayedRows:Gt("table.pagination.labelDisplayedRows"),labelRowsSelect:Gt("table.pagination.labelRowsSelect"),lastTooltip:Gt("table.pagination.lastTooltip"),nextTooltip:Gt("table.pagination.nextTooltip"),previousTooltip:Gt("table.pagination.previousTooltip"),...Nt?.pagination},toolbar:{searchPlaceholder:Gt("table.toolbar.search"),searchTooltip:Gt("table.toolbar.search"),...Nt?.toolbar}},...fe})]})}et.icons=Object.freeze(Dt);function ht({columnCount:B,emptyContent:z,hasNoRows:ut,loading:Ot}){return It=>Ot?(0,n.jsx)(At,{colSpan:B}):z&&ut?(0,n.jsx)("tbody",{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:B,children:z})})}):(0,n.jsx)(d.C6,{...It})}function rt(B,z,ut,Ot){const It=Ut=>{const Nt=new Set,Wt=Kt=>{Kt!=null&&Nt.add(Kt)};return z&&z.forEach(Kt=>{const te=lt(Kt,ut.find(jt=>jt.title===Ut)?.field);Array.isArray(te)?te.forEach(Wt):Wt(te)}),Nt},Lt=Ut=>({placeholder:Ot("table.filter.placeholder"),label:Ut.column,multiple:Ut.type==="multiple-select",items:[...It(Ut.column)].sort().map(Nt=>({label:Nt,value:Nt}))});return B.map(Ut=>({type:Ut.type,element:Lt(Ut)}))}},88640:(H,S,t)=>{"use strict";t.d(S,{B:()=>J});var n=t(31085),a=t(268),d=t(58837),x=t(8973),m=t(29655),h=t(91567),u=t(42899),p=t(72501),g=t(9181),y=t(6924),A=t(14041),v=t(4650);const T=(Q,F)=>(F.palette.type==="light"?a.e$:a.a)(F.palette[Q].light,.6),P=(Q,F)=>(F.palette.type==="light"?a.a:a.e$)(F.palette[Q].light,.9),L=(0,d.A)(Q=>({root:{marginRight:Q.spacing(1),fill:({severity:F})=>T(F,Q)}})),O=({severity:Q})=>{const F=L({severity:Q});return(0,n.jsx)(g.A,{classes:F})},j=({severity:Q})=>{const F=L({severity:Q});return(0,n.jsx)(y.A,{classes:F})},$=(0,d.A)(Q=>({panel:{backgroundColor:({severity:F})=>P(F,Q),color:({severity:F})=>T(F,Q),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:F})=>T(F,Q),fontWeight:Q.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:F})=>T(F,Q),backgroundColor:({severity:F})=>P(F,Q)},details:{width:"100%",display:"block",color:Q.palette.textContrast,backgroundColor:Q.palette.background.default,border:`1px solid ${Q.palette.border}`,padding:Q.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),M=Q=>Q.charAt(0).toLocaleUpperCase("en-US")+Q.slice(1);function J(Q){const{severity:F="warning",title:V,titleFormat:Y,message:nt,children:W,defaultExpanded:Z}=Q,G=$({severity:F}),at=M(F)+(V?`: ${V}`:"");return(0,n.jsxs)(x.A,{defaultExpanded:Z??!1,className:G.panel,role:"alert",children:[(0,n.jsxs)(m.A,{expandIcon:(0,n.jsx)(j,{severity:F}),className:G.summary,children:[(0,n.jsx)(O,{severity:F}),(0,n.jsx)(p.A,{className:G.summaryText,variant:"subtitle1",children:Y==="markdown"?(0,n.jsx)(v.h,{content:at,className:G.markdownContent}):at})]}),(nt||W)&&(0,n.jsx)(h.A,{children:(0,n.jsxs)(u.A,{container:!0,children:[nt&&(0,n.jsx)(u.A,{item:!0,xs:12,children:(0,n.jsx)(p.A,{className:G.message,variant:"body1",children:nt})}),W&&(0,n.jsx)(u.A,{item:!0,xs:12,className:G.details,children:W})]})})]})}},10795:(H,S,t)=>{"use strict";t.d(S,{l:()=>h});var n=t(72427),a=t(65461),d=t(10315),x=t(87849);const m=()=>{const{t:u}=(0,x.i)(d.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:u("supportConfig.default.title"),icon:"warning",links:[{title:u("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function h(){const g=(0,n.Q2)().get(a.U)?.getOptionalConfig("app.support"),y=m();return g?{url:g.getString("url"),items:g.getConfigArray("items").flatMap(A=>({title:A.getString("title"),icon:A.getOptionalString("icon"),links:(A.getOptionalConfigArray("links")??[]).flatMap(v=>({url:v.getString("url"),title:v.getOptionalString("title")??""}))}))}:y}},31129:(H,S,t)=>{"use strict";t.d(S,{Gg:()=>j,KG:()=>$,NT:()=>P,z9:()=>m});var n=t(31085),a=t(82266),d=t(27799),x=t(14041);function m(M){const{id:J,Fallback:Q=d.A,...F}=M,Y=(0,a.n)().getSystemIcon(J)??Q;return(0,n.jsx)(Y,{...F})}function h(M){return _jsx(m,{id:"brokenImage",...M})}function u(M){return _jsx(m,{id:"catalog",...M})}function p(M){return _jsx(m,{id:"chat",...M})}function g(M){return _jsx(m,{id:"dashboard",...M})}function y(M){return _jsx(m,{id:"docs",...M})}function A(M){return _jsx(m,{id:"email",...M})}function v(M){return _jsx(m,{id:"github",...M})}function T(M){return _jsx(m,{id:"group",...M})}function P(M){return(0,n.jsx)(m,{id:"help",...M})}function L(M){return _jsx(m,{id:"user",...M})}function O(M){return _jsx(m,{id:"warning",...M})}function j(M){return(0,n.jsx)(m,{id:"star",...M})}function $(M){return(0,n.jsx)(m,{id:"unstarred",...M})}},26280:(H,S,t)=>{"use strict";t.d(S,{U:()=>u});var n=t(31085),a=t(58837),d=t(53373),x=t.n(d),m=t(14041);const h=(0,a.A)(p=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:p.spacing(3),paddingBottom:p.spacing(3),paddingLeft:p.spacing(2),paddingRight:p.spacing(2),[p.breakpoints.up("sm")]:{paddingLeft:p.spacing(3),paddingRight:p.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function u(p){const{className:g,stretch:y,noPadding:A,children:v,...T}=p,P=h();return(0,n.jsx)("article",{...T,className:x()(P.root,g,{[P.stretch]:y,[P.noPadding]:A}),children:v})}},59428:(H,S,t)=>{"use strict";t.d(S,{d:()=>y});var n=t(31085),a=t(10394),d=t(58837),x=t(72501),m=t(14041),h=t(93285);const u=A=>(0,d.A)(v=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:v.spacing(2),textAlign:A.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:v.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),p=({title:A,className:v})=>(0,n.jsx)(x.A,{variant:"h4",component:"h2",className:v,"data-testid":"header-title",children:A}),g=({description:A,className:v})=>A?(0,n.jsx)(x.A,{variant:"body2",className:v,"data-testid":"header-description",children:A}):null;function y(A){const{description:v,title:T,titleComponent:P=void 0,children:L,descriptionComponent:O=void 0,textAlign:j="left"}=A,$=u({textAlign:j})(),M=P||(0,n.jsx)(p,{title:T,className:$.title}),J=O||(0,n.jsx)(g,{description:v,className:$.description});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.m,{title:T}),(0,n.jsxs)(a.A,{className:$.container,children:[(0,n.jsxs)(a.A,{className:$.leftItemsBox,children:[M,J]}),(0,n.jsx)(a.A,{className:$.rightItemsBox,children:L})]})]})}},12173:(H,S,t)=>{"use strict";t.d(S,{M:()=>$});var n=t(31085),a=t(42899),d=t(58837),x=t(72501),m=t(14041),h=t(18690),u=t(72072),p=t(10795);const g=t.p+"static/mic-drop.fe3ef4d0.svg",y=(0,d.A)(M=>({micDrop:{maxWidth:"60%",bottom:M.spacing(2),right:M.spacing(2),[M.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:M.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),A=()=>{const M=y();return(0,n.jsx)("img",{src:g,className:M.micDrop,alt:"Girl dropping mic from her hands"})};var v=t(77310),T=t(87849),P=t(10315);const L=(0,d.A)(M=>({title:{paddingBottom:M.spacing(5),[M.breakpoints.down("xs")]:{paddingBottom:M.spacing(4),fontSize:M.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function O(M){const{stack:J}=M,Q=L(),{t:F}=(0,T.i)(P.O),[V,Y]=(0,m.useState)(!1);return V?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.A,{variant:"h6",className:Q.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>Y(!1),children:F("errorPage.showLessDetails")})}),(0,n.jsx)(v.z,{text:J,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,n.jsx)(x.A,{variant:"h6",className:Q.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>Y(!0),children:F("errorPage.showMoreDetails")})})}const j=(0,d.A)(M=>({container:{padding:M.spacing(8),[M.breakpoints.down("xs")]:{padding:M.spacing(2)}},title:{paddingBottom:M.spacing(5),[M.breakpoints.down("xs")]:{paddingBottom:M.spacing(4),fontSize:M.typography.h3.fontSize}},subtitle:{color:M.palette.textSubtle}}),{name:"BackstageErrorPage"});function $(M){const{status:J="",statusMessage:Q,additionalInfo:F,supportUrl:V,stack:Y}=M,nt=j(),W=(0,h.Zp)(),Z=(0,p.l)(),{t:G}=(0,T.i)(P.O);return(0,n.jsxs)(a.A,{container:!0,className:nt.container,children:[(0,n.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,n.jsx)(x.A,{"data-testid":"error",variant:"body1",className:nt.subtitle,children:G("errorPage.subtitle",{status:J,statusMessage:Q})}),(0,n.jsx)(x.A,{variant:"body1",className:nt.subtitle,children:F}),(0,n.jsx)(x.A,{variant:"h2",className:nt.title,children:G("errorPage.title")}),(0,n.jsxs)(x.A,{variant:"h6",className:nt.title,children:[(0,n.jsx)(u.N_,{to:"#","data-testid":"go-back-link",onClick:()=>W(-1),children:G("errorPage.goBack")}),"... or please"," ",(0,n.jsx)(u.N_,{to:V||Z.url,children:"contact support"})," if you think this is a bug."]}),Y&&(0,n.jsx)(O,{stack:Y})]}),(0,n.jsx)(A,{})]})}},69814:(H,S,t)=>{"use strict";t.d(S,{Y:()=>W});var n=t(31085),a=t(72427),d=t(65461),x=t(10394),m=t(42899),h=t(58837),u=t(71677),p=t(72501),g=t(14041),y=t(93285),A=t(72072),v=t(45634),T=t(58007),P=t(8109),L=t(55197),O=t(87051);const j=(0,O.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(p.A),$=(0,O.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(x.A),M=(0,O.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(x.A);function J(Z){const{children:G,...at}=Z,[pt,Et]=g.useState(null),bt=g.Children.toArray(G),[At,Dt,...lt]=bt,dt=lt.length?lt.pop():bt[bt.length-1],xt=bt.length>3,ft=it=>{Et(it.currentTarget)},Ct=()=>{Et(null)},Pt=!!pt;return(0,n.jsxs)(g.Fragment,{children:[(0,n.jsxs)(v.A,{"aria-label":"breadcrumb",...at,children:[bt.length>1&&(0,n.jsx)($,{clone:!0,children:At}),bt.length>2&&(0,n.jsx)($,{clone:!0,children:Dt}),xt&&(0,n.jsx)(j,{onClick:ft,children:"..."}),(0,n.jsx)(M,{children:dt})]}),(0,n.jsx)(L.Ay,{open:Pt,anchorEl:pt,onClose:Ct,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,n.jsx)(T.A,{children:lt.map((it,mt)=>(0,n.jsx)(P.A,{button:!0,children:(0,n.jsx)($,{clone:!0,children:it})},mt))})})]})}var Q=t(73524);const F=(0,h.A)(Z=>({header:{gridArea:"pageHeader",padding:Z.spacing(3),width:"100%",boxShadow:Z.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:Z.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[Z.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:Z.page.fontColor,wordBreak:"break-word",fontSize:Z.typography.h3.fontSize,marginBottom:0},subtitle:{color:Z.page.fontColor,opacity:.8,display:"inline-block",marginTop:Z.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:Z.spacing(1),color:Z.page.fontColor},breadcrumb:{color:Z.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-Z.spacing(.3),marginBottom:Z.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-Z.spacing(.3),marginBottom:Z.spacing(.3)}}),{name:"BackstageHeader"}),V=({type:Z,typeLink:G,classes:at,pageTitle:pt})=>Z?G?(0,n.jsxs)(J,{className:at.breadcrumb,children:[(0,n.jsx)(A.N_,{to:G,children:Z}),(0,n.jsx)(p.A,{children:pt})]}):(0,n.jsx)(p.A,{className:at.type,children:Z}):null,Y=({pageTitle:Z,classes:G,tooltip:at})=>{const{contentRef:pt}=(0,Q.H)(),Et=(0,n.jsx)(p.A,{ref:pt,tabIndex:-1,className:G.title,variant:"h1",children:Z});return at?(0,n.jsx)(u.Ay,{title:at,placement:"top-start",children:Et}):Et},nt=({classes:Z,subtitle:G})=>G?typeof G!="string"?(0,n.jsx)(n.Fragment,{children:G}):(0,n.jsx)(p.A,{className:Z.subtitle,variant:"subtitle2",component:"span",children:G}):null;function W(Z){const{children:G,pageTitleOverride:at,style:pt,subtitle:Et,title:bt,tooltip:At,type:Dt,typeLink:lt}=Z,dt=F(),ft=(0,a.gf)(d.U).getOptionalString("app.title")||"Backstage",Ct=at||bt,Pt=bt||at,it=`${Ct} | %s | ${ft}`,mt=`${Ct} | ${ft}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.m,{titleTemplate:it,defaultTitle:mt}),(0,n.jsxs)("header",{style:pt,className:dt.header,children:[(0,n.jsxs)(x.A,{className:dt.leftItemsBox,children:[(0,n.jsx)(V,{classes:dt,type:Dt,typeLink:lt,pageTitle:Pt}),(0,n.jsx)(Y,{classes:dt,pageTitle:Pt,tooltip:At}),(0,n.jsx)(nt,{classes:dt,subtitle:Et})]}),(0,n.jsx)(m.A,{container:!0,className:dt.rightItemsBox,spacing:4,children:G})]})]})}},24504:(H,S,t)=>{"use strict";t.d(S,{Y:()=>p});var n=t(31085),a=t(14041),d=t(58837),x=t(50868),m=t(53373),h=t.n(m);const u=(0,d.A)(g=>({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",[g.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function p(g){const{themeId:y,className:A,children:v}=g,T=u();return(0,n.jsx)(x.A,{theme:P=>({...P,page:P.getPageTheme({themeId:y})}),children:(0,n.jsx)("main",{className:h()(T.root,A),children:v})})}},27155:(H,S,t)=>{"use strict";t.d(S,{d:()=>m});var n=t(31085),a=t(14041),d=t(69814),x=t(24504);function m(h){const{themeId:u,children:p,...g}=h;return(0,n.jsxs)(x.Y,{themeId:u,children:[(0,n.jsx)(d.Y,{...g}),p]})}},73524:(H,S,t)=>{"use strict";t.d(S,{G:()=>v,H:()=>T});var n=t(31085),a=t(10394),d=t(58837),x=t(5893),m=t(14041),h=t(72664),u=function(P){return P.SIDEBAR_PIN_STATE="sidebarPinState",P}(u||{});const p={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 g=t(34435);const y=(0,d.A)(P=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[P.breakpoints.up("sm")]:{paddingLeft:L=>L.isPinned?L.sidebarConfig.drawerWidthOpen:L.sidebarConfig.drawerWidthClosed},[P.breakpoints.down("xs")]:{paddingBottom:L=>L.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),A=(0,m.createContext)({content:{contentRef:void 0}});function v(P){const[L,O]=(0,m.useState)(()=>p.getSidebarPinState()),{sidebarConfig:j}=(0,m.useContext)(h.yY),$=(0,m.useRef)(null),M=(0,m.useMemo)(()=>({content:{contentRef:$}}),[$]);(0,m.useEffect)(()=>{p.setSidebarPinState(L)},[L]);const J=(0,x.A)(V=>V.breakpoints.down("xs"),{noSsr:!0}),Q=()=>O(!L),F=y({isPinned:L,sidebarConfig:j});return(0,n.jsx)(g.qj,{value:{isPinned:L,toggleSidebarPinState:Q,isMobile:J},children:(0,n.jsx)(A.Provider,{value:M,children:(0,n.jsx)(a.A,{className:F.root,children:P.children})})})}function T(){const{content:P}=(0,m.useContext)(A);return{focusContent:(0,m.useCallback)(()=>{P?.contentRef?.current?.focus()},[P]),contentRef:P?.contentRef}}},34435:(H,S,t)=>{"use strict";t.d(S,{Ut:()=>g,qj:()=>p});var n=t(31085),a=t(43836),d=t(10602),x=t(14041);const m={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},h=(0,x.createContext)(m),u=(0,a.tK)("sidebar-pin-state-context");function p(y){const{children:A,value:v}=y;return(0,n.jsx)(h.Provider,{value:v,children:(0,n.jsx)(u.Provider,{value:(0,d.B)({1:v}),children:A})})}const g=()=>{const y=(0,x.useContext)(u),A=(0,x.useContext)(h);if(y===void 0)return A||m;const v=y.atVersion(1);if(v===void 0)throw new Error("No context found for version 1.");return v}},72664:(H,S,t)=>{"use strict";t.d(S,{Rv:()=>h,U1:()=>A,hC:()=>m,i8:()=>p,yY:()=>y});var n=t(14041);const a=72,d=24,x=18,m={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:x,userBadgeDiameter:a-x*2,mobileSidebarHeight:56},h=v=>({...m,...v,iconContainerWidth:m.drawerWidthClosed,iconSize:m.drawerWidthClosed-m.iconPadding*2,userBadgeDiameter:m.drawerWidthClosed-m.userBadgePadding*2}),u={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:m.defaultOpenDelayMs+200},p=v=>({...u,...v}),g="@backstage/core/sidebar-intro-dismissed",y=(0,n.createContext)({sidebarConfig:m,submenuConfig:u}),A=(0,n.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(H,S,t)=>{"use strict";t.d(S,{O:()=>a});var n=t(93184);const a=(0,n.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
1
+ (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(V,S,t)=>{"use strict";t.d(S,{c:()=>n});const n=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(V,S,t)=>{"use strict";t.d(S,{P:()=>d,_P:()=>a,oQ:()=>n});const n="default",a="backstage.io/view-url",d="backstage.io/edit-url",x="kubernetes.io/api-server",m="kubernetes.io/api-server-certificate-authority",h="kubernetes.io/auth-provider"},6820:(V,S,t)=>{"use strict";t.d(S,{KU:()=>x,U2:()=>m,sM:()=>d});var n=t(72348);function a(h){let u=h.indexOf(":");const p=h.indexOf("/");p!==-1&&p<u&&(u=-1);const g=u===-1?void 0:h.slice(0,u),y=p===-1?void 0:h.slice(u+1,p),A=h.slice(Math.max(u+1,p+1));if(g===""||y===""||A==="")throw new TypeError(`Entity reference "${h}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:g,namespace:y,name:A}}function d(h){return{kind:h.kind,namespace:h.metadata.namespace||n.oQ,name:h.metadata.name}}function x(h,u){if(!h)throw new Error("Entity reference must not be empty");const p=u?.defaultKind,g=u?.defaultNamespace||n.oQ;let y,A,v;if(typeof h=="string"){const T=a(h);y=T.kind??p,A=T.namespace??g,v=T.name}else y=h.kind??p,A=h.namespace??g,v=h.name;if(y)if(A){if(!v){const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty name`)}}else{const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty namespace`)}else{const T=JSON.stringify(h);throw new Error(`Entity reference ${T} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:y,namespace:A,name:v}}function m(h){let u,p,g;return"metadata"in h?(u=h.kind,p=h.metadata.namespace??n.oQ,g=h.metadata.name):(u=h.kind,p=h.namespace??n.oQ,g=h.name),`${u.toLocaleLowerCase("en-US")}:${p.toLocaleLowerCase("en-US")}/${g.toLocaleLowerCase("en-US")}`}},51372:(V,S,t)=>{"use strict";t.d(S,{fT:()=>p,jn:()=>T,nC:()=>u,sA:()=>P,vv:()=>n});const n="ownedBy",a="ownerOf",d="consumesApi",x="apiConsumedBy",m="providesApi",h="apiProvidedBy",u="dependsOn",p="dependencyOf",g="parentOf",y="childOf",A="memberOf",v="hasMember",T="partOf",P="hasPart"},17736:(V,S,t)=>{"use strict";t.d(S,{Eo:()=>n,I4:()=>d});const n="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},78692:(V,S,t)=>{"use strict";t.d(S,{Cr:()=>h,KL:()=>m,aY:()=>x});var n=t(6820),a=t(17736);const d=/^[\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 x(u){if(typeof u!="string")throw new TypeError(`Unable to parse location ref '${u}', unexpected argument ${typeof u}`);const p=u.indexOf(":");if(p<0)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const g=u.substring(0,p).trim(),y=u.substring(p+1).trim();if(!g||!y)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(g==="http"||g==="https")throw new TypeError(`Invalid location ref '${u}', please prefix it with 'url:', e.g. 'url:${u}'`);if(d.test(y))throw new TypeError(`Invalid location ref '${u}', target is a javascript: URL`);return{type:g,target:y}}function m(u){const{type:p,target:g}=u;if(p){if(!g)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(g))throw new TypeError(`Invalid location ref '${p}:${g}', target is a javascript: URL`);return`${p}:${g}`}function h(u){const p=u.metadata?.annotations?.[a.I4]??u.metadata?.annotations?.[a.Eo];if(!p)throw new Error(`Entity '${(0,n.U2)(u)}' is missing location`);return x(p)}},77310:(V,S,t)=>{"use strict";t.d(S,{z:()=>g});var n=t(31085),a=t(10394),d=t(54917),x=t(14041),m=t(69578),h=t(40697),u=t(25577),p=t(37916);function g(y){const{text:A,language:v,showLineNumbers:T=!1,highlightedNumbers:P,customStyle:L,showCopyCodeButton:O=!1}=y,j=(0,d.A)(),$=j.palette.type==="dark"?h.A:u.A,M=j.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,n.jsxs)(a.A,{position:"relative",children:[(0,n.jsx)(m.A,{customStyle:L,language:v,style:$,showLineNumbers:T,wrapLines:!0,lineNumberStyle:{color:j.palette.textVerySubtle},lineProps:J=>P?.includes(J)?{style:{backgroundColor:M}}:{},children:A}),O&&(0,n.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,n.jsx)(p.l,{text:A})})]})}},37916:(V,S,t)=>{"use strict";t.d(S,{l:()=>A});var n=t(31085),a=t(72427),d=t(39837),x=t(29365),m=t(71677),h=t(99594),u=t(14041),p=t(36338),g=t(10315),y=t(87849);function A(v){const{t:T}=(0,y.i)(g.O),{text:P,tooltipDelay:L=1e3,tooltipText:O=T("copyTextButton.tooltipText"),"aria-label":j="Copy text"}=v,$=(0,a.gf)(d.m),[M,J]=(0,u.useState)(!1),[{error:Q},F]=(0,p.A)();(0,u.useEffect)(()=>{Q&&$.post(Q)},[Q,$]);const G=H=>{H.stopPropagation(),J(!0),F(P)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(m.Ay,{id:"copy-test-tooltip",title:O,placement:"top",leaveDelay:L,onClose:()=>J(!1),open:M,children:(0,n.jsx)(x.A,{onClick:G,"aria-label":j,children:(0,n.jsx)(h.A,{})})})})}},44186:(V,S,t)=>{"use strict";t.d(S,{p:()=>T});var n=t(31085),a=t(42899),d=t(58837),x=t(72501),m=t(14041);const h=t.p+"static/missingAnnotation.67f79e98.svg",u=t.p+"static/noInformation.4b426325.svg",p=t.p+"static/createComponent.975d1e1e.svg",g=t.p+"static/noBuild.1715fa71.svg",y=(0,d.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),A=({missing:P})=>{const L=y();switch(P){case"field":return(0,n.jsx)("img",{src:h,className:L.generalImg,alt:"annotation is missing"});case"info":return(0,n.jsx)("img",{src:u,alt:"no Information",className:L.generalImg});case"content":return(0,n.jsx)("img",{src:p,alt:"create Component",className:L.generalImg});case"data":return(0,n.jsx)("img",{src:g,alt:"no Build",className:L.generalImg});default:return null}},v=(0,d.A)(P=>({root:{backgroundColor:P.palette.background.default,padding:P.spacing(2,0,0,0)},action:{marginTop:P.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function T(P){const{title:L,description:O,missing:j,action:$}=P,M=v();return(0,n.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:M.root,spacing:2,children:[(0,n.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,n.jsxs)(a.A,{container:!0,direction:"column",children:[(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(x.A,{variant:"h5",children:L})}),(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(x.A,{variant:"body1",children:O})}),(0,n.jsx)(a.A,{item:!0,xs:!0,className:M.action,children:$})]})}),(0,n.jsx)(a.A,{item:!0,xs:12,md:6,className:M.imageContainer,children:typeof j=="string"?(0,n.jsx)(A,{missing:j}):j.customImage})]})}},22020:(V,S,t)=>{"use strict";t.d(S,{b:()=>A});var n=t(31085),a=t(58837),d=t(58007),x=t(8109),m=t(5951),h=t(14041),u=t(37916),p=t(88640);const g=(0,a.A)(v=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:v.spacing(2)},divider:{margin:v.spacing(2)}}),{name:"BackstageErrorPanel"}),y=({error:v,message:T,stack:P,children:L})=>{const O=g();return(0,n.jsxs)(d.A,{dense:!0,children:[(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Error",secondary:v}),(0,n.jsx)(u.l,{text:v})]}),(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Message",secondary:T}),(0,n.jsx)(u.l,{text:T})]}),P&&(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:O.text},primary:"Stack Trace",secondary:P}),(0,n.jsx)(u.l,{text:P})]}),L]})};function A(v){const{title:T,error:P,defaultExpanded:L,titleFormat:O,children:j}=v;return(0,n.jsx)(p.B,{severity:"error",title:T??P.message,defaultExpanded:L,titleFormat:O,children:(0,n.jsx)(y,{error:P.name,message:P.message,stack:P.stack,children:j})})}},18956:(V,S,t)=>{"use strict";t.d(S,{m:()=>u});var n=t(31085),a=t(14041),d=t(72501),x=t(58837),m=t(31129);const h=(0,x.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function u(g){const{isFavorite:y}=g,A=h();return(0,n.jsx)(d.A,{component:"span",className:y?A.icon:A.iconBorder,children:y?(0,n.jsx)(m.Gg,{}):(0,n.jsx)(m.KG,{})})}function p(g){const{id:y,title:A,isFavorite:v,onToggle:T,...P}=g;return _jsx(Tooltip,{id:y,title:A,children:_jsx(IconButton,{"aria-label":A,id:y,onClick:()=>T(!v),color:"inherit",...P,children:_jsx(u,{isFavorite:v})})})}},72072:(V,S,t)=>{"use strict";t.d(S,{N_:()=>Z});var n=t(31085),a=t(72427),d=t(65461),x=t(93368),m=t(49203),h=t(58837),u=t(72501),p=t(53373),g=t.n(p),y=t(45250),A=t.n(y),v=t(14041),T=t(18690),P=t(73657),L=t(39330),O=t(82266);function j(){const[Y]=(0,T.AV)((0,n.jsx)(T.qh,{index:!0,element:(0,n.jsx)("div",{})}));return!Y.index}const $=(0,h.A)(Y=>({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:Y.spacing(.5)}}),{name:"Link"}),M=()=>{const at=(0,O.n)().getSystemIcon("externalLink")||L.A,pt=$();return(0,n.jsx)(at,{className:pt.externalLinkIcon})},J=Y=>/^([a-z+.-]+):/.test(Y),Q=/^[\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,F=window.open;if(F&&!F.__backstage){const Y=function(...pt){const Et=String(pt[0]);if(Q.test(Et))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return F.apply(this,pt)};Y.__backstage=!0,window.open=Y}const G=()=>{try{return(0,a.gf)(d.U).getOptionalString("app.baseUrl")}catch{return}},H=()=>{const Y="http://sample.dev",at=G()??"/",{pathname:pt}=new URL(at,Y);return(0,y.trimEnd)(pt,"/")},nt=Y=>{let at=String(Y);const pt=H(),Et=J(at),bt=at.startsWith(pt);return!Et&&!bt&&(at=pt.concat(at)),at},W=Y=>Y instanceof Array?Y.map(W).join(" ").trim():typeof Y=="object"&&Y?W(Y?.props?.children):["string","number"].includes(typeof Y)?String(Y):"",Z=v.forwardRef(({onClick:Y,noTrack:at,externalLinkIcon:pt,...Et},bt)=>{const At=$(),Dt=(0,x.s)(),lt=j()?nt(Et.to):Et.to,dt=W(Et.children)||lt,xt=J(lt),ft=xt&&!!/^https?:/.exec(lt);if(Q.test(lt))throw new Error("Link component rejected javascript: URL as a security precaution");const Ct=Pt=>{Y?.(Pt),at||Dt.captureEvent("click",dt,{attributes:{to:lt}})};return xt?(0,n.jsxs)(m.A,{...ft?{target:"_blank",rel:"noopener"}:{},...Et,...Et["aria-label"]?{"aria-label":`${Et["aria-label"]}, Opens in a new window`}:{},ref:bt,href:lt,onClick:Ct,className:g()(At.externalLink,Et.className),children:[Et.children,pt&&(0,n.jsx)(M,{}),(0,n.jsx)(u.A,{component:"span",className:At.visuallyHidden,children:", Opens in a new window"})]}):(0,n.jsx)(m.A,{...Et,ref:bt,component:P.N_,to:lt,onClick:Ct})})},73896:(V,S,t)=>{"use strict";t.d(S,{z:()=>h});var n=t(31085),a=t(64947),d=t(14041),x=t(72072);const m=d.forwardRef((p,g)=>(0,n.jsx)(x.N_,{ref:g,...p,color:"initial"})),h=d.forwardRef((p,g)=>(0,n.jsx)(a.A,{ref:g,component:m,...p})),u=null},4650:(V,S,t)=>{"use strict";t.d(S,{h:()=>A});var n=t(31085),a=t(58837),d=t(45872),x=t(61125),m=t(14041),h=t(77310);const u=(0,a.A)(v=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${v.palette.border}`},"& th, & td":{border:`1px solid ${v.palette.border}`,padding:v.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:v.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:v.palette.background.paper},"& tr":{backgroundColor:v.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:v.palette.background.default},"& a":{color:v.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),p=(v,T)=>T?typeof T=="string"?v+T:m.Children.toArray(T.props.children).reduce(p,v):v,g=({level:v,children:T})=>{const O=m.Children.toArray(T).reduce(p,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${v}`,{id:O},T)},y={code:({inline:v,className:T,children:P,...L})=>{const O=String(P).replace(/\n+$/,""),j=/language-(\w+)/.exec(T||"");return!v&&j?(0,n.jsx)(h.z,{language:j[1],text:O}):(0,n.jsx)("code",{className:T,...L,children:P})},h1:g,h2:g,h3:g,h4:g,h5:g,h6:g};function A(v){const{content:T,dialect:P="gfm",linkTarget:L,transformLinkUri:O,transformImageUri:j,className:$}=v,M=u();return(0,n.jsx)(d.$,{remarkPlugins:P==="gfm"?[x.A]:[],className:`${M.markdown} ${$??""}`.trim(),children:T,components:y,linkTarget:L,transformLinkUri:O,transformImageUri:j})}},68146:(V,S,t)=>{"use strict";t.d(S,{k:()=>h});var n=t(31085),a=t(10394),d=t(88951),x=t(54917),m=t(14041);function h(u){const p=(0,x.A)(),[g,y]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const A=setTimeout(()=>y(!0),p.transitions.duration.short);return()=>clearTimeout(A)},[p.transitions.duration.short]),g?(0,n.jsx)(d.A,{...u,"data-testid":"progress"}):(0,n.jsx)(a.A,{display:"none","data-testid":"progress"})}},66917:(V,S,t)=>{"use strict";t.d(S,{w:()=>nt});var n=t(31085),a=t(10394),d=t(69076),x=t(67720),m=t(95061),h=t(41857),u=t(48543),p=t(26343),g=t(81215),y=t(87051),A=t(12398),v=t(58837),T=t(72501),P=t(92399),L=t(14041),O=t(10437);const j=(0,v.A)(W=>(0,A.A)({icon:{position:"absolute",right:W.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),M=()=>{const W=j();return(0,n.jsx)(O.A,{className:W.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},J=(0,v.A)(W=>(0,A.A)({icon:{position:"absolute",right:W.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),F=()=>{const W=J();return(0,n.jsx)(O.A,{className:W.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},G=(0,y.A)(W=>(0,A.A)({root:{"label + &":{marginTop:W.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:W.palette.primary.main}},input:{borderRadius:W.shape.borderRadius,position:"relative",backgroundColor:W.palette.background.paper,border:"1px solid #ced4da",fontSize:W.typography.body1.fontSize,padding:W.spacing(1.25,3.25,1.25,1.5),transition:W.transitions.create(["border-color","box-shadow"]),"&:focus":{background:W.palette.background.paper,borderRadius:W.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(h.A),H=(0,v.A)(W=>(0,A.A)({formControl:{margin:W.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:W.typography.body2.fontSize,fontFamily:W.typography.fontFamily,color:W.palette.text.primary,"&.Mui-focused":{color:W.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:W.typography.body2.fontSize,fontFamily:W.typography.fontFamily,color:W.palette.text.primary,"&.Mui-focused":{color:W.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function nt(W){const{multiple:Z,items:Y,label:at,placeholder:pt,selected:Et,onChange:bt,triggerReset:At,native:Dt=!1,disabled:lt=!1,margin:dt,"data-testid":xt="select"}=W,ft=H(),[Ct,Pt]=(0,L.useState)(Et||(Z?[]:"")),[it,mt]=(0,L.useState)(!1);(0,L.useEffect)(()=>{Pt(Z?[]:"")},[At,Z]),(0,L.useEffect)(()=>{Pt(Et||(Z?[]:""))},[Et,Z]);const yt=B=>{Pt(B.target.value),bt(B.target.value)},et=B=>{if(lt){B.preventDefault();return}mt(z=>Z&&!(B.target instanceof HTMLElement)?!0:!z)},ht=()=>{mt(!1)},rt=B=>()=>{const z=Ct.filter(ut=>ut!==B);Pt(z),bt(z)};return(0,n.jsx)(a.A,{className:ft.root,children:(0,n.jsxs)(m.A,{className:ft.formControl,children:[(0,n.jsx)(u.A,{className:ft.formLabel,children:at}),(0,n.jsxs)(g.A,{"aria-label":at,value:Ct,native:Dt,disabled:lt,"data-testid":xt,displayEmpty:!0,multiple:Z,margin:dt,onChange:yt,open:it,onOpen:et,onClose:ht,input:(0,n.jsx)(G,{}),label:at,renderValue:B=>Z&&Ct.length!==0?(0,n.jsx)(a.A,{className:ft.chips,children:B.map(z=>{const ut=Y.find(Ot=>Ot.value===z);return ut?(0,n.jsx)(x.A,{"data-testid":"chip",label:ut?.label,clickable:!0,deleteIcon:(0,n.jsx)(P.A,{"data-testid":"cancel-icon",onMouseDown:Ot=>Ot.stopPropagation()}),onDelete:rt(z),className:ft.chip},ut?.value):!1})}):(0,n.jsx)(T.A,{children:Ct.length===0?pt||"":Y.find(z=>z.value===B)?.label}),IconComponent:()=>it?(0,n.jsx)(F,{}):(0,n.jsx)(M,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!pt&&!Z&&(0,n.jsx)(p.A,{value:[],children:pt}),Dt?Y&&Y.map(B=>(0,n.jsx)("option",{value:B.value,children:B.label},B.value)):Y&&Y.map(B=>(0,n.jsxs)(p.A,{value:B.value,children:[Z&&(0,n.jsx)(d.A,{color:"primary",checked:Ct.includes(B.value)||!1,className:ft.checkbox}),B.label]},B.value))]})]})})}},27586:(V,S,t)=>{"use strict";t.d(S,{Y:()=>Z});var n=t(31085),a=t(82266),d=t(72427),x=t(65461),m=t(10394),h=t(64947),u=t(93453),p=t(29365),g=t(68804),y=t(5951),A=t(26343),v=t(28233),T=t(55197),P=t(58837),L=t(72501),O=t(5893),j=t(14041),$=t(10795),M=t(31129),J=t(72072),Q=t(10315),F=t(87849);const G=(0,P.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),H=({icon:Y})=>{const at=(0,a.n)(),pt=Y?at.getSystemIcon(Y)??M.NT:M.NT;return(0,n.jsx)(pt,{})},nt=({link:Y})=>(0,n.jsx)(J.N_,{to:Y.url,children:Y.title??Y.url}),W=({item:Y})=>(0,n.jsxs)(A.A,{button:!1,children:[(0,n.jsx)(g.A,{children:(0,n.jsx)(H,{icon:Y.icon})}),(0,n.jsx)(y.A,{primary:Y.title,secondary:Y.links?.reduce((at,pt,Et)=>[...at,Et>0&&(0,n.jsx)("br",{},Et),(0,n.jsx)(nt,{link:pt},pt.url)],[])})]});function Z(Y){const{t:at}=(0,F.i)(Q.O),{title:pt,items:Et,children:bt}=Y,{items:At}=(0,$.l)(),[Dt,lt]=(0,j.useState)(!1),[dt,xt]=(0,j.useState)(null),ft=G(),Ct=(0,d.gf)(x.U).getOptionalConfig("app.support"),Pt=(0,O.A)(yt=>yt.breakpoints.down("sm")),it=yt=>{xt(yt.currentTarget),lt(!0)},mt=()=>{lt(!1)};return Ct?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.A,{display:"flex",ml:1,children:Pt?(0,n.jsx)(p.A,{color:"primary",size:"small",onClick:it,"data-testid":"support-button","aria-label":"Support",children:(0,n.jsx)(M.NT,{})}):(0,n.jsx)(h.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:it,startIcon:(0,n.jsx)(M.NT,{}),children:at("supportButton.title")})}),(0,n.jsxs)(T.Ay,{"data-testid":"support-button-popover",open:Dt,anchorEl:dt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:mt,children:[(0,n.jsxs)(v.A,{className:ft.popoverList,autoFocusItem:!!dt,children:[pt&&(0,n.jsx)(A.A,{button:!1,alignItems:"flex-start",className:ft.menuItem,children:(0,n.jsx)(L.A,{variant:"subtitle1",children:pt})}),j.Children.map(bt,(yt,et)=>(0,n.jsx)(A.A,{button:!1,alignItems:"flex-start",className:ft.menuItem,children:yt},`child-${et}`)),(Et??At).map((yt,et)=>(0,n.jsx)(W,{item:yt},`item-${et}`))]}),(0,n.jsx)(u.A,{children:(0,n.jsx)(h.A,{color:"primary",onClick:mt,"aria-label":"Close",children:at("supportButton.close")})})]})]}):null}},14209:(V,S,t)=>{"use strict";t.d(S,{X:()=>et});var n=t(31085),a=t(87849),d=t(25301),x=t(10394),m=t(29365),h=t(87051),u=t(58837),p=t(54917),g=t(72501),y=t(83313),A=t(89019),v=t(62461),T=t(68887),P=t(63798),L=t(64704),O=t(6774),j=t(75625),$=t(65859),M=t(45917),J=t(5416),Q=t(33494),F=t(80113),G=t(26229),H=t(46802),nt=t(45250),W=t(14041),Z=t(10315),Y=t(64947),at=t(66917);const pt=(0,u.A)(B=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:B.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:B.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${B.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:B.spacing(2)}}}),{name:"BackstageTableFilters"}),Et=B=>{const z=pt(),{onChangeFilters:ut}=B,{t:Ot}=(0,a.i)(Z.O),[It,Lt]=(0,W.useState)({...B.selectedFilters}),[Ut,Nt]=(0,W.useState)(!1),Wt=()=>{Lt({}),Nt(Kt=>!Kt)};return(0,W.useEffect)(()=>{ut(It)},[It,ut]),(0,n.jsxs)(x.A,{className:z.root,children:[(0,n.jsxs)(x.A,{className:z.header,children:[(0,n.jsx)(x.A,{className:z.value,children:Ot("table.filter.title")}),(0,n.jsx)(Y.A,{color:"primary",onClick:Wt,children:Ot("table.filter.clearAll")})]}),(0,n.jsx)(x.A,{className:z.filters,children:B.filters?.length&&B.filters.map(Kt=>(0,n.jsx)(at.w,{triggerReset:Ut,...Kt.element,selected:It[Kt.element.label],onChange:te=>Lt({...It,[Kt.element.label]:te})},Kt.element.label))})]})};var bt=t(78467);function At(B){return(0,n.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:B.colSpan,children:(0,n.jsx)(x.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,n.jsx)(bt.A,{size:"5rem"})})})})})}const Dt={Add:(0,W.forwardRef)((B,z)=>(0,n.jsx)(y.A,{...B,ref:z})),Check:(0,W.forwardRef)((B,z)=>(0,n.jsx)(v.A,{...B,ref:z})),Clear:(0,W.forwardRef)((B,z)=>(0,n.jsx)(L.A,{...B,ref:z})),Delete:(0,W.forwardRef)((B,z)=>(0,n.jsx)(O.A,{...B,ref:z})),DetailPanel:(0,W.forwardRef)((B,z)=>(0,n.jsx)(P.A,{...B,ref:z})),Edit:(0,W.forwardRef)((B,z)=>(0,n.jsx)(j.A,{...B,ref:z})),Export:(0,W.forwardRef)((B,z)=>(0,n.jsx)(G.A,{...B,ref:z})),Filter:(0,W.forwardRef)((B,z)=>(0,n.jsx)($.A,{...B,ref:z})),FirstPage:(0,W.forwardRef)((B,z)=>(0,n.jsx)(J.A,{...B,ref:z})),LastPage:(0,W.forwardRef)((B,z)=>(0,n.jsx)(Q.A,{...B,ref:z})),NextPage:(0,W.forwardRef)((B,z)=>(0,n.jsx)(P.A,{...B,ref:z})),PreviousPage:(0,W.forwardRef)((B,z)=>(0,n.jsx)(T.A,{...B,ref:z})),ResetSearch:(0,W.forwardRef)((B,z)=>(0,n.jsx)(L.A,{...B,ref:z})),Search:(0,W.forwardRef)((B,z)=>(0,n.jsx)(M.A,{...B,ref:z})),SortArrow:(0,W.forwardRef)((B,z)=>(0,n.jsx)(A.A,{...B,ref:z})),ThirdStateCheck:(0,W.forwardRef)((B,z)=>(0,n.jsx)(F.A,{...B,ref:z})),ViewColumn:(0,W.forwardRef)((B,z)=>(0,n.jsx)(H.A,{...B,ref:z}))};function lt(B,z){const ut=z.split(".");let Ot=B[ut[0]];for(let It=1;It<ut.length;++It){if(Ot===void 0)return Ot;const Lt=ut[It];Ot=Ot[Lt]}return Ot}const dt=(0,h.A)(B=>({header:{padding:B.spacing(1,2,1,2.5),borderTop:`1px solid ${B.palette.grey.A100}`,borderBottom:`1px solid ${B.palette.grey.A100}`,fontWeight:B.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(d.rV),xt=(0,h.A)(B=>({root:{padding:B.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:B.typography.fontWeightBold}},searchField:{paddingRight:B.spacing(2)}}),{name:"BackstageTableToolbar"})(d.Nb),ft=(0,u.A)(B=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:B.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Ct=(0,u.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Pt(B,z){return B.map(ut=>{const Ot=ut.headerStyle??{};let It=ut.cellStyle||{};if(ut.highlight)if(Ot.color=z.palette.textContrast,typeof It=="object")It.fontWeight=z.typography.fontWeightBold;else{const Lt=It;It=(Ut,Nt,Wt)=>({...Lt(Ut,Nt,Wt),fontWeight:z.typography.fontWeightBold})}return{...ut,headerStyle:Ot,cellStyle:It}})}function it(B,z){return(0,nt.transform)(B,(ut,Ot,It)=>{(0,nt.isEqual)(Ot,z[It])||(ut[It]=Ot)})}const mt={search:"",filtersOpen:!1,filters:{}};function yt(B){const{toolbarRef:z,setSearch:ut,hasFilters:Ot,selectedFiltersLength:It,toggleFilters:Lt}=B,{t:Ut}=(0,a.i)(Z.O),Nt=ft(),Wt=(0,W.useCallback)(Kt=>{B.onSearchChanged(Kt),ut(Kt)},[B,ut]);return Ot?(0,n.jsxs)(x.A,{className:Nt.root,children:[(0,n.jsxs)(x.A,{className:Nt.root,children:[(0,n.jsx)(m.A,{onClick:Lt,"aria-label":"filter list",children:(0,n.jsx)($.A,{})}),(0,n.jsxs)(g.A,{className:Nt.title,children:[Ut("table.filter.title")," (",It,")"]})]}),(0,n.jsx)(xt,{...B,ref:z,onSearchChanged:Wt})]}):(0,n.jsx)(xt,{...B,ref:z,onSearchChanged:Wt})}function et(B){const{data:z,columns:ut,emptyContent:Ot,options:It,title:Lt,subtitle:Ut,localization:Nt,filters:Wt,initialState:Kt,onStateChange:te,components:jt,isLoading:kt,style:ee,...fe}=B,{t:Gt}=(0,a.i)(Z.O),ne=Ct(),de=(0,p.A)(),Xe={...mt,...Kt},[Ge,oe]=(0,W.useState)(Xe.filtersOpen),We=(0,W.useCallback)(()=>oe(ye=>!ye),[oe]),[ae,Ye]=(0,W.useState)(Xe.filters),[_e,ge]=(0,W.useState)(Xe.search);(0,W.useEffect)(()=>{if(te){const ye=it({search:_e,filtersOpen:Ge,filters:ae},mt);te(ye)}},[_e,Ge,ae,te]);const rn=(0,W.useCallback)(ye=>ut.find(He=>He.title===ye)?.field,[ut]),gn=(0,W.useMemo)(()=>{if(typeof z=="function"||!ae)return z;const ye=Object.values(ae);return z&&ye.flat().length?z.filter(ke=>!!Object.entries(ae).filter(([,Qe])=>!!Qe.length).every(([Qe,je])=>{const ve=lt(ke,rn(Qe));return Array.isArray(ve)&&Array.isArray(je)?ve.some(w=>je.includes(w)):Array.isArray(ve)?ve.includes(je):Array.isArray(je)?je.includes(ve):ve===je})):z},[z,ae,rn]),on=Object.values(ae).flat().length,qe=!!Wt?.length,De=(0,W.useCallback)(ye=>(0,n.jsx)(yt,{setSearch:ge,hasFilters:qe,selectedFiltersLength:on,toggleFilters:We,...ye}),[We,qe,on,ge]),Ke=typeof z!="function"&&z.length===0,ze=ut.length,an=(0,W.useMemo)(()=>ht({hasNoRows:Ke,emptyContent:Ot,columnCount:ze,loading:kt}),[Ke,Ot,ze,kt]);return(0,n.jsxs)(x.A,{className:ne.root,children:[Ge&&z&&typeof z!="function"&&Wt?.length&&(0,n.jsx)(Et,{filters:rt(Wt,z,ut,Gt),selectedFilters:ae,onChangeFilters:Ye}),(0,n.jsx)(d.Ay,{components:{Header:dt,Body:an,Toolbar:De,...jt},options:It,columns:Pt(ut,de),icons:Dt,title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.A,{variant:"h5",component:"h2",children:Lt}),Ut&&(0,n.jsx)(g.A,{color:"textSecondary",variant:"body1",children:Ut})]}),data:gn,style:{width:"100%",...ee},localization:{...Nt,body:{emptyDataSourceMessage:Gt("table.body.emptyDataSourceMessage"),...Nt?.body},pagination:{firstTooltip:Gt("table.pagination.firstTooltip"),labelDisplayedRows:Gt("table.pagination.labelDisplayedRows"),labelRowsSelect:Gt("table.pagination.labelRowsSelect"),lastTooltip:Gt("table.pagination.lastTooltip"),nextTooltip:Gt("table.pagination.nextTooltip"),previousTooltip:Gt("table.pagination.previousTooltip"),...Nt?.pagination},toolbar:{searchPlaceholder:Gt("table.toolbar.search"),searchTooltip:Gt("table.toolbar.search"),...Nt?.toolbar}},...fe})]})}et.icons=Object.freeze(Dt);function ht({columnCount:B,emptyContent:z,hasNoRows:ut,loading:Ot}){return It=>Ot?(0,n.jsx)(At,{colSpan:B}):z&&ut?(0,n.jsx)("tbody",{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:B,children:z})})}):(0,n.jsx)(d.C6,{...It})}function rt(B,z,ut,Ot){const It=Ut=>{const Nt=new Set,Wt=Kt=>{Kt!=null&&Nt.add(Kt)};return z&&z.forEach(Kt=>{const te=lt(Kt,ut.find(jt=>jt.title===Ut)?.field);Array.isArray(te)?te.forEach(Wt):Wt(te)}),Nt},Lt=Ut=>({placeholder:Ot("table.filter.placeholder"),label:Ut.column,multiple:Ut.type==="multiple-select",items:[...It(Ut.column)].sort().map(Nt=>({label:Nt,value:Nt}))});return B.map(Ut=>({type:Ut.type,element:Lt(Ut)}))}},88640:(V,S,t)=>{"use strict";t.d(S,{B:()=>J});var n=t(31085),a=t(268),d=t(58837),x=t(8973),m=t(29655),h=t(91567),u=t(42899),p=t(72501),g=t(9181),y=t(6924),A=t(14041),v=t(4650);const T=(Q,F)=>(F.palette.type==="light"?a.e$:a.a)(F.palette[Q].light,.6),P=(Q,F)=>(F.palette.type==="light"?a.a:a.e$)(F.palette[Q].light,.9),L=(0,d.A)(Q=>({root:{marginRight:Q.spacing(1),fill:({severity:F})=>T(F,Q)}})),O=({severity:Q})=>{const F=L({severity:Q});return(0,n.jsx)(g.A,{classes:F})},j=({severity:Q})=>{const F=L({severity:Q});return(0,n.jsx)(y.A,{classes:F})},$=(0,d.A)(Q=>({panel:{backgroundColor:({severity:F})=>P(F,Q),color:({severity:F})=>T(F,Q),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:F})=>T(F,Q),fontWeight:Q.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:F})=>T(F,Q),backgroundColor:({severity:F})=>P(F,Q)},details:{width:"100%",display:"block",color:Q.palette.textContrast,backgroundColor:Q.palette.background.default,border:`1px solid ${Q.palette.border}`,padding:Q.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),M=Q=>Q.charAt(0).toLocaleUpperCase("en-US")+Q.slice(1);function J(Q){const{severity:F="warning",title:G,titleFormat:H,message:nt,children:W,defaultExpanded:Z}=Q,Y=$({severity:F}),at=M(F)+(G?`: ${G}`:"");return(0,n.jsxs)(x.A,{defaultExpanded:Z??!1,className:Y.panel,role:"alert",children:[(0,n.jsxs)(m.A,{expandIcon:(0,n.jsx)(j,{severity:F}),className:Y.summary,children:[(0,n.jsx)(O,{severity:F}),(0,n.jsx)(p.A,{className:Y.summaryText,variant:"subtitle1",children:H==="markdown"?(0,n.jsx)(v.h,{content:at,className:Y.markdownContent}):at})]}),(nt||W)&&(0,n.jsx)(h.A,{children:(0,n.jsxs)(u.A,{container:!0,children:[nt&&(0,n.jsx)(u.A,{item:!0,xs:12,children:(0,n.jsx)(p.A,{className:Y.message,variant:"body1",children:nt})}),W&&(0,n.jsx)(u.A,{item:!0,xs:12,className:Y.details,children:W})]})})]})}},10795:(V,S,t)=>{"use strict";t.d(S,{l:()=>h});var n=t(72427),a=t(65461),d=t(10315),x=t(87849);const m=()=>{const{t:u}=(0,x.i)(d.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:u("supportConfig.default.title"),icon:"warning",links:[{title:u("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function h(){const g=(0,n.Q2)().get(a.U)?.getOptionalConfig("app.support"),y=m();return g?{url:g.getString("url"),items:g.getConfigArray("items").flatMap(A=>({title:A.getString("title"),icon:A.getOptionalString("icon"),links:(A.getOptionalConfigArray("links")??[]).flatMap(v=>({url:v.getString("url"),title:v.getOptionalString("title")??""}))}))}:y}},31129:(V,S,t)=>{"use strict";t.d(S,{Gg:()=>j,KG:()=>$,NT:()=>P,z9:()=>m});var n=t(31085),a=t(82266),d=t(27799),x=t(14041);function m(M){const{id:J,Fallback:Q=d.A,...F}=M,H=(0,a.n)().getSystemIcon(J)??Q;return(0,n.jsx)(H,{...F})}function h(M){return _jsx(m,{id:"brokenImage",...M})}function u(M){return _jsx(m,{id:"catalog",...M})}function p(M){return _jsx(m,{id:"chat",...M})}function g(M){return _jsx(m,{id:"dashboard",...M})}function y(M){return _jsx(m,{id:"docs",...M})}function A(M){return _jsx(m,{id:"email",...M})}function v(M){return _jsx(m,{id:"github",...M})}function T(M){return _jsx(m,{id:"group",...M})}function P(M){return(0,n.jsx)(m,{id:"help",...M})}function L(M){return _jsx(m,{id:"user",...M})}function O(M){return _jsx(m,{id:"warning",...M})}function j(M){return(0,n.jsx)(m,{id:"star",...M})}function $(M){return(0,n.jsx)(m,{id:"unstarred",...M})}},26280:(V,S,t)=>{"use strict";t.d(S,{U:()=>u});var n=t(31085),a=t(58837),d=t(53373),x=t.n(d),m=t(14041);const h=(0,a.A)(p=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:p.spacing(3),paddingBottom:p.spacing(3),paddingLeft:p.spacing(2),paddingRight:p.spacing(2),[p.breakpoints.up("sm")]:{paddingLeft:p.spacing(3),paddingRight:p.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function u(p){const{className:g,stretch:y,noPadding:A,children:v,...T}=p,P=h();return(0,n.jsx)("article",{...T,className:x()(P.root,g,{[P.stretch]:y,[P.noPadding]:A}),children:v})}},59428:(V,S,t)=>{"use strict";t.d(S,{d:()=>y});var n=t(31085),a=t(10394),d=t(58837),x=t(72501),m=t(14041),h=t(93285);const u=A=>(0,d.A)(v=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:v.spacing(2),textAlign:A.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:v.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),p=({title:A,className:v})=>(0,n.jsx)(x.A,{variant:"h4",component:"h2",className:v,"data-testid":"header-title",children:A}),g=({description:A,className:v})=>A?(0,n.jsx)(x.A,{variant:"body2",className:v,"data-testid":"header-description",children:A}):null;function y(A){const{description:v,title:T,titleComponent:P=void 0,children:L,descriptionComponent:O=void 0,textAlign:j="left"}=A,$=u({textAlign:j})(),M=P||(0,n.jsx)(p,{title:T,className:$.title}),J=O||(0,n.jsx)(g,{description:v,className:$.description});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.m,{title:T}),(0,n.jsxs)(a.A,{className:$.container,children:[(0,n.jsxs)(a.A,{className:$.leftItemsBox,children:[M,J]}),(0,n.jsx)(a.A,{className:$.rightItemsBox,children:L})]})]})}},12173:(V,S,t)=>{"use strict";t.d(S,{M:()=>$});var n=t(31085),a=t(42899),d=t(58837),x=t(72501),m=t(14041),h=t(18690),u=t(72072),p=t(10795);const g=t.p+"static/mic-drop.fe3ef4d0.svg",y=(0,d.A)(M=>({micDrop:{maxWidth:"60%",bottom:M.spacing(2),right:M.spacing(2),[M.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:M.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),A=()=>{const M=y();return(0,n.jsx)("img",{src:g,className:M.micDrop,alt:"Girl dropping mic from her hands"})};var v=t(77310),T=t(87849),P=t(10315);const L=(0,d.A)(M=>({title:{paddingBottom:M.spacing(5),[M.breakpoints.down("xs")]:{paddingBottom:M.spacing(4),fontSize:M.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function O(M){const{stack:J}=M,Q=L(),{t:F}=(0,T.i)(P.O),[G,H]=(0,m.useState)(!1);return G?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.A,{variant:"h6",className:Q.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>H(!1),children:F("errorPage.showLessDetails")})}),(0,n.jsx)(v.z,{text:J,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,n.jsx)(x.A,{variant:"h6",className:Q.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>H(!0),children:F("errorPage.showMoreDetails")})})}const j=(0,d.A)(M=>({container:{padding:M.spacing(8),[M.breakpoints.down("xs")]:{padding:M.spacing(2)}},title:{paddingBottom:M.spacing(5),[M.breakpoints.down("xs")]:{paddingBottom:M.spacing(4),fontSize:M.typography.h3.fontSize}},subtitle:{color:M.palette.textSubtle}}),{name:"BackstageErrorPage"});function $(M){const{status:J="",statusMessage:Q,additionalInfo:F,supportUrl:G,stack:H}=M,nt=j(),W=(0,h.Zp)(),Z=(0,p.l)(),{t:Y}=(0,T.i)(P.O);return(0,n.jsxs)(a.A,{container:!0,className:nt.container,children:[(0,n.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,n.jsx)(x.A,{"data-testid":"error",variant:"body1",className:nt.subtitle,children:Y("errorPage.subtitle",{status:J,statusMessage:Q})}),(0,n.jsx)(x.A,{variant:"body1",className:nt.subtitle,children:F}),(0,n.jsx)(x.A,{variant:"h2",className:nt.title,children:Y("errorPage.title")}),(0,n.jsxs)(x.A,{variant:"h6",className:nt.title,children:[(0,n.jsx)(u.N_,{to:"#","data-testid":"go-back-link",onClick:()=>W(-1),children:Y("errorPage.goBack")}),"... or please"," ",(0,n.jsx)(u.N_,{to:G||Z.url,children:"contact support"})," if you think this is a bug."]}),H&&(0,n.jsx)(O,{stack:H})]}),(0,n.jsx)(A,{})]})}},69814:(V,S,t)=>{"use strict";t.d(S,{Y:()=>W});var n=t(31085),a=t(72427),d=t(65461),x=t(10394),m=t(42899),h=t(58837),u=t(71677),p=t(72501),g=t(14041),y=t(93285),A=t(72072),v=t(45634),T=t(58007),P=t(8109),L=t(55197),O=t(87051);const j=(0,O.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(p.A),$=(0,O.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(x.A),M=(0,O.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(x.A);function J(Z){const{children:Y,...at}=Z,[pt,Et]=g.useState(null),bt=g.Children.toArray(Y),[At,Dt,...lt]=bt,dt=lt.length?lt.pop():bt[bt.length-1],xt=bt.length>3,ft=it=>{Et(it.currentTarget)},Ct=()=>{Et(null)},Pt=!!pt;return(0,n.jsxs)(g.Fragment,{children:[(0,n.jsxs)(v.A,{"aria-label":"breadcrumb",...at,children:[bt.length>1&&(0,n.jsx)($,{clone:!0,children:At}),bt.length>2&&(0,n.jsx)($,{clone:!0,children:Dt}),xt&&(0,n.jsx)(j,{onClick:ft,children:"..."}),(0,n.jsx)(M,{children:dt})]}),(0,n.jsx)(L.Ay,{open:Pt,anchorEl:pt,onClose:Ct,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,n.jsx)(T.A,{children:lt.map((it,mt)=>(0,n.jsx)(P.A,{button:!0,children:(0,n.jsx)($,{clone:!0,children:it})},mt))})})]})}var Q=t(73524);const F=(0,h.A)(Z=>({header:{gridArea:"pageHeader",padding:Z.spacing(3),width:"100%",boxShadow:Z.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:Z.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[Z.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:Z.page.fontColor,wordBreak:"break-word",fontSize:Z.typography.h3.fontSize,marginBottom:0},subtitle:{color:Z.page.fontColor,opacity:.8,display:"inline-block",marginTop:Z.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:Z.spacing(1),color:Z.page.fontColor},breadcrumb:{color:Z.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-Z.spacing(.3),marginBottom:Z.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-Z.spacing(.3),marginBottom:Z.spacing(.3)}}),{name:"BackstageHeader"}),G=({type:Z,typeLink:Y,classes:at,pageTitle:pt})=>Z?Y?(0,n.jsxs)(J,{className:at.breadcrumb,children:[(0,n.jsx)(A.N_,{to:Y,children:Z}),(0,n.jsx)(p.A,{children:pt})]}):(0,n.jsx)(p.A,{className:at.type,children:Z}):null,H=({pageTitle:Z,classes:Y,tooltip:at})=>{const{contentRef:pt}=(0,Q.H)(),Et=(0,n.jsx)(p.A,{ref:pt,tabIndex:-1,className:Y.title,variant:"h1",children:Z});return at?(0,n.jsx)(u.Ay,{title:at,placement:"top-start",children:Et}):Et},nt=({classes:Z,subtitle:Y})=>Y?typeof Y!="string"?(0,n.jsx)(n.Fragment,{children:Y}):(0,n.jsx)(p.A,{className:Z.subtitle,variant:"subtitle2",component:"span",children:Y}):null;function W(Z){const{children:Y,pageTitleOverride:at,style:pt,subtitle:Et,title:bt,tooltip:At,type:Dt,typeLink:lt}=Z,dt=F(),ft=(0,a.gf)(d.U).getOptionalString("app.title")||"Backstage",Ct=at||bt,Pt=bt||at,it=`${Ct} | %s | ${ft}`,mt=`${Ct} | ${ft}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.m,{titleTemplate:it,defaultTitle:mt}),(0,n.jsxs)("header",{style:pt,className:dt.header,children:[(0,n.jsxs)(x.A,{className:dt.leftItemsBox,children:[(0,n.jsx)(G,{classes:dt,type:Dt,typeLink:lt,pageTitle:Pt}),(0,n.jsx)(H,{classes:dt,pageTitle:Pt,tooltip:At}),(0,n.jsx)(nt,{classes:dt,subtitle:Et})]}),(0,n.jsx)(m.A,{container:!0,className:dt.rightItemsBox,spacing:4,children:Y})]})]})}},24504:(V,S,t)=>{"use strict";t.d(S,{Y:()=>p});var n=t(31085),a=t(14041),d=t(58837),x=t(50868),m=t(53373),h=t.n(m);const u=(0,d.A)(g=>({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",[g.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function p(g){const{themeId:y,className:A,children:v}=g,T=u();return(0,n.jsx)(x.A,{theme:P=>({...P,page:P.getPageTheme({themeId:y})}),children:(0,n.jsx)("main",{className:h()(T.root,A),children:v})})}},27155:(V,S,t)=>{"use strict";t.d(S,{d:()=>m});var n=t(31085),a=t(14041),d=t(69814),x=t(24504);function m(h){const{themeId:u,children:p,...g}=h;return(0,n.jsxs)(x.Y,{themeId:u,children:[(0,n.jsx)(d.Y,{...g}),p]})}},73524:(V,S,t)=>{"use strict";t.d(S,{G:()=>v,H:()=>T});var n=t(31085),a=t(10394),d=t(58837),x=t(5893),m=t(14041),h=t(72664),u=function(P){return P.SIDEBAR_PIN_STATE="sidebarPinState",P}(u||{});const p={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 g=t(34435);const y=(0,d.A)(P=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[P.breakpoints.up("sm")]:{paddingLeft:L=>L.isPinned?L.sidebarConfig.drawerWidthOpen:L.sidebarConfig.drawerWidthClosed},[P.breakpoints.down("xs")]:{paddingBottom:L=>L.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),A=(0,m.createContext)({content:{contentRef:void 0}});function v(P){const[L,O]=(0,m.useState)(()=>p.getSidebarPinState()),{sidebarConfig:j}=(0,m.useContext)(h.yY),$=(0,m.useRef)(null),M=(0,m.useMemo)(()=>({content:{contentRef:$}}),[$]);(0,m.useEffect)(()=>{p.setSidebarPinState(L)},[L]);const J=(0,x.A)(G=>G.breakpoints.down("xs"),{noSsr:!0}),Q=()=>O(!L),F=y({isPinned:L,sidebarConfig:j});return(0,n.jsx)(g.qj,{value:{isPinned:L,toggleSidebarPinState:Q,isMobile:J},children:(0,n.jsx)(A.Provider,{value:M,children:(0,n.jsx)(a.A,{className:F.root,children:P.children})})})}function T(){const{content:P}=(0,m.useContext)(A);return{focusContent:(0,m.useCallback)(()=>{P?.contentRef?.current?.focus()},[P]),contentRef:P?.contentRef}}},34435:(V,S,t)=>{"use strict";t.d(S,{Ut:()=>g,qj:()=>p});var n=t(31085),a=t(43836),d=t(10602),x=t(14041);const m={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},h=(0,x.createContext)(m),u=(0,a.tK)("sidebar-pin-state-context");function p(y){const{children:A,value:v}=y;return(0,n.jsx)(h.Provider,{value:v,children:(0,n.jsx)(u.Provider,{value:(0,d.B)({1:v}),children:A})})}const g=()=>{const y=(0,x.useContext)(u),A=(0,x.useContext)(h);if(y===void 0)return A||m;const v=y.atVersion(1);if(v===void 0)throw new Error("No context found for version 1.");return v}},72664:(V,S,t)=>{"use strict";t.d(S,{Rv:()=>h,U1:()=>A,hC:()=>m,i8:()=>p,yY:()=>y});var n=t(14041);const a=72,d=24,x=18,m={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:x,userBadgeDiameter:a-x*2,mobileSidebarHeight:56},h=v=>({...m,...v,iconContainerWidth:m.drawerWidthClosed,iconSize:m.drawerWidthClosed-m.iconPadding*2,userBadgeDiameter:m.drawerWidthClosed-m.userBadgePadding*2}),u={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:m.defaultOpenDelayMs+200},p=v=>({...u,...v}),g="@backstage/core/sidebar-intro-dismissed",y=(0,n.createContext)({sidebarConfig:m,submenuConfig:u}),A=(0,n.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(V,S,t)=>{"use strict";t.d(S,{O:()=>a});var n=t(93184);const a=(0,n.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"}},alertDisplay:{message_one:"({{ count }} older message)",message_other:"({{ count }} older 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:()=>u,pn:()=>h});var n=t(31085),a=t(43836),d=t(10602),x=t(14041);const m=(0,a.tK)("analytics-context"),h=()=>{const g=(0,x.useContext)(m);if(g===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const y=g.atVersion(1);if(y===void 0)throw new Error("No context found for version 1.");return y},u=g=>{const{attributes:y,children:A}=g,T={...h(),...y},P=(0,d.B)({1:T});return(0,n.jsx)(m.Provider,{value:P,children:A})};function p(g,y){const A=v=>_jsx(u,{attributes:y,children:_jsx(g,{...v})});return A.displayName=`WithAnalyticsContext(${g.displayName||g.name||"Component"})`,A}},67237:(H,S,t)=>{"use strict";t.d(S,{J:()=>x,t:()=>d});var n=t(63544);const a=(0,n.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),d="_ROUTABLE-EXTENSION-RENDERED";class x{analyticsApi;context;constructor(h,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=u,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,u,{value:p,attributes:g}={}){const{_routeNodeType:y,...A}=this.context;if(h===d){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...A,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(v){console.warn("Error during analytics event capture. %o",v)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&y==="gathered"&&A.pluginId==="root"){a.mostRecentGatheredNavigation={action:h,subject:u,value:p,attributes:g,context:A};return}try{this.analyticsApi.captureEvent({action:h,subject:u,value:p,attributes:g,context:A})}catch(v){console.warn("Error during analytics event capture. %o",v)}}}},93368:(H,S,t)=>{"use strict";t.d(S,{s:()=>u});var n=t(25862),a=t(72427),d=t(99303),x=t(14041),m=t(67237);function h(){try{return(0,a.gf)(d.c)}catch{return{captureEvent:()=>{}}}}function u(){const p=(0,x.useRef)(null),g=(0,n.pn)(),y=h();function A(){return p.current===null&&(p.current=new m.J(y)),p.current}const v=A();return v.setContext(g),v}},36017:(H,S,t)=>{"use strict";t.d(S,{k:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.alert"})},99303:(H,S,t)=>{"use strict";t.d(S,{c:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.analytics"})},65461:(H,S,t)=>{"use strict";t.d(S,{U:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.config"})},57405:(H,S,t)=>{"use strict";t.d(S,{I:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.discovery"})},39837:(H,S,t)=>{"use strict";t.d(S,{m:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.error"})},63636:(H,S,t)=>{"use strict";t.d(S,{B:()=>d,S:()=>a});var n=t(55309),a=function(x){return x[x.None=0]="None",x[x.Active=1]="Active",x}({});const d=(0,n.y)({id:"core.featureflags"})},70795:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.fetch"})},16009:(H,S,t)=>{"use strict";t.d(S,{K:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.identity"})},56038:(H,S,t)=>{"use strict";t.d(S,{J:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.translation"})},55309:(H,S,t)=>{"use strict";t.d(S,{y:()=>a});class n{config;constructor(x){if(this.config=x,!x.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 '${x.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(d){return new n(d)}},12935:(H,S,t)=>{"use strict";t.d(S,{b:()=>n});function n(a,d){return"id"in a?{api:a,deps:{},factory:()=>d}:a}},72427:(H,S,t)=>{"use strict";t.d(S,{Q2:()=>m,gf:()=>h});var n=t(31085),a=t(14041),d=t(43836),x=t(97142);function m(){const p=(0,d.qO)("api-context");if(!p)throw new x.EH("API context is not available");const g=p.atVersion(1);if(!g)throw new x.EH("ApiContext v1 not available");return g}function h(p){const y=m().get(p);if(!y)throw new x.EH(`No implementation available for ${p}`);return y}function u(p){return function(y){const A=T=>{const P=m(),L={};for(const O in p)if(p.hasOwnProperty(O)){const j=p[O],$=P.get(j);if(!$)throw new NotImplementedError(`No implementation available for ${j}`);L[O]=$}return _jsx(y,{...T,...L})},v=y.displayName||y.name||"Component";return A.displayName=`withApis(${v})`,A}}},82266:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var n=t(43836);const a=()=>{const d=(0,n.qO)("app-context");if(!d)throw new Error("App context is not available");const x=d.atVersion(1);if(!x)throw new Error("AppContext v1 not available");return x}},19402:(H,S,t)=>{"use strict";t.d(S,{E:()=>m,h:()=>x});var n=t(63544);const a=(0,n.Q)("component-data-store",()=>new WeakMap),d="__backstage_data";function x(h,u,p){const g=h;let y=g[d]??a.get(h);if(y||(y={map:new Map},Object.defineProperty(g,d,{enumerable:!1,configurable:!0,writable:!1,value:y}),a.set(h,y)),y.map.has(u)){const A=h.displayName||h.name;throw new Error(`Attempted to attach duplicate data "${u}" to component "${A}"`)}y.map.set(u,p)}function m(h,u){if(!h)return;const p=h.type;if(!p)return;const g=p[d]??a.get(p);if(g)return g.map.get(u)}},88758:(H,S,t)=>{"use strict";t.d(S,{NC:()=>v,zZ:()=>T,QJ:()=>A});var n=t(31085),a=t(14041),d=t(93368),x=t(25862),m=t(82266),h=t(9222),u=t(19402);class p extends a.Component{static getDerivedStateFromError(L){return{error:L}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:L}=this.state,{app:O,plugin:j}=this.props,{ErrorBoundaryFallback:$}=O.getComponents();return L?(0,n.jsx)($,{error:L,resetError:this.handleErrorReset,plugin:j}):this.props.children}}var g=t(67237),y=t(97142);function A(P){const{component:L,mountPoint:O,name:j}=P;return T({component:{lazy:()=>L().then($=>{const M=Q=>{const F=(0,d.s)();try{(0,h.S)(O)}catch(V){if(typeof V=="object"&&V!==null){const{message:Y}=V;if(typeof Y=="string"&&Y.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${O} 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 V}return(0,a.useEffect)(()=>{F.captureEvent(g.t,"")},[F]),(0,n.jsx)($,{...Q})},J=j||$.displayName||$.name||"LazyComponent";return M.displayName=`RoutableExtension(${J})`,M})},data:{"core.mountPoint":O},name:j})}function v(P){const{component:L,name:O}=P;return T({component:L,name:O})}function T(P){const{data:L={},name:O}=P;O||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let j;if("lazy"in P.component){const M=P.component.lazy;j=(0,a.lazy)(()=>M().then(J=>({default:J}),J=>{const Q=O?` of the ${O} extension`:"";throw new y.HK(`Failed lazy loading${Q}, try to reload the page`,J)}))}else j=P.component.sync;const $=O||j.displayName||j.name||"Component";return{expose(M){const J=Q=>{const F=(0,m.n)(),{Progress:V}=F.getComponents(),Y=L?.["core.mountPoint"];return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(V,{}),children:(0,n.jsx)(p,{app:F,plugin:M,children:(0,n.jsx)(x.Ig,{attributes:{pluginId:M.getId(),...O&&{extension:O},...Y&&{routeRef:Y.id}},children:(0,n.jsx)(j,{...Q})})})})};(0,u.h)(J,"core.plugin",M),(0,u.h)(J,"core.extensionName",O);for(const[Q,F]of Object.entries(L))(0,u.h)(J,Q,F);return J.displayName=`Extension(${$})`,J}}}},82442:(H,S,t)=>{"use strict";t.d(S,{O:()=>u});var n=t(14041),a=t(19402),d=t(72427),x=t(63636);function m(p,g,y,A){return n.Children.toArray(p).flatMap(v=>{if(!(0,n.isValidElement)(v))return[];if(v.type===n.Fragment)return m(v.props.children,g,y,A);if((0,a.E)(v,"core.featureFlagged")){const T=v.props;return("with"in T?g.isActive(T.with):!g.isActive(T.without))?m(v.props.children,g,y,A):[]}if(y===void 0||y(v))return[v];if(A)throw new Error(A);return m(v.props.children,g,y,A)})}class h{node;featureFlagsApi;constructor(g,y){this.node=g,this.featureFlagsApi=y}selectByComponentData(g){const y=m(this.node,this.featureFlagsApi,A=>(0,a.E)(A,g.key)!==void 0,g.withStrictError);return new h(y,this.featureFlagsApi)}findComponentData(g){return m(this.node,this.featureFlagsApi,A=>(0,a.E)(A,g.key)!==void 0).map(A=>(0,a.E)(A,g.key)).filter(A=>A!==void 0)}getElements(){return m(this.node,this.featureFlagsApi)}}function u(p,g,y=[]){const A=(0,d.gf)(x.B),v=new h(p,A);return(0,n.useMemo)(()=>g(v),[p,...y])}},9803:(H,S,t)=>{"use strict";t.d(S,{i:()=>a});class n{config;constructor(x){this.config=x}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(x){return x.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(d){return new n(d)}},34569:(H,S,t)=>{"use strict";t.d(S,{H:()=>d});var n=t(59598);class a{id;params;[x=n.b];constructor(h,u){this.id=h,this.params=u,this[x]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function d(m){return new a(m.id,m.params??[])}var x},59598:(H,S,t)=>{"use strict";t.d(S,{b:()=>a});var n=t(63544);const a=(0,n.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,S,t)=>{"use strict";t.d(S,{S:()=>x});var n=t(14041),a=t(18690),d=t(43836);function x(m){const{pathname:h}=(0,a.zy)(),u=(0,d.qO)("routing-context");if(!u)throw new Error("Routing context is not available");const p=u.atVersion(1),g=(0,n.useMemo)(()=>p&&p.resolve(m,{pathname:h}),[p,m,h]);if(!u)throw new Error("useRouteRef used outside of routing context");if(!p)throw new Error("RoutingContext v1 not available");const y="optional"in m&&m.optional;if(!g&&!y)throw new Error(`No path for ${m}`);return g}},93184:(H,S,t)=>{"use strict";t.d(S,{h:()=>x,v:()=>m});var n=t(99833);function a(h){const u=new Array;function p(g,y){for(const[A,v]of Object.entries(g))typeof v=="string"?u.push([y+A,v]):p(v,`${y}${A}.`)}return p(h,""),Object.fromEntries(u)}class d{#t;#e;#n;constructor(u){this.#t=u.id,this.#e=a(u.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#e}setDefaultResource(u){this.#n=u}getDefaultResource(){return this.#n}toString(){return`TranslationRef{id=${this.id}}`}}function x(h){const u=new d(h);return h.translations&&u.setDefaultResource((0,n.o)({ref:u,translations:h.translations})),u}function m(h){const u=h;if(u.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${u.$$type}'`);if(u.version!=="v1")throw new Error(`Invalid translation ref, bad version '${u.version}'`);return u}},99833:(H,S,t)=>{"use strict";t.d(S,{Y:()=>n,o:()=>a});function n(d){const x=d;if(x.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${x.$$type}'`);if(x.version!=="v1")throw new Error(`Invalid translation resource, bad version '${x.version}'`);return x}function a(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([x,m])=>({language:x,loader:()=>m().then(h=>{const u=h.default;return{messages:u?.$$type==="@backstage/TranslationMessages"?u.messages:u}})}))}}},87849:(H,S,t)=>{"use strict";t.d(S,{i:()=>h});var n=t(14041),a=t(72427),d=t(39837),x=t(56038);const m=new WeakSet,h=u=>{const p=(0,a.gf)(d.m),g=(0,a.gf)(x.J),[y,A]=(0,n.useState)(()=>g.getTranslation(u)),v=(0,n.useMemo)(()=>g.translation$(u),[g,u]),T=(0,n.useCallback)(L=>{if(!m.has(u)){const O=`Failed to load translation resource '${u.id}'; caused by ${L}`;console.error(O),p.post(new Error(O)),m.add(u)}},[p,u]);(0,n.useEffect)(()=>{const L=v.subscribe({next(O){O.ready&&A(O)},error(O){T(O)}});return()=>{L.unsubscribe()}},[v,T]);const P=(0,n.useRef)(!0);if((0,n.useEffect)(()=>{P.current?P.current=!1:A(g.getTranslation(u))},[g,u]),!y.ready)throw new Promise(L=>{const O=v.subscribe({next(j){j.ready&&(O.unsubscribe(),L())},error(j){O.unsubscribe(),T(j),L()}})});return{t:y.t}}},70835:(H,S,t)=>{"use strict";t.d(S,{o:()=>d});var n=t(59750);async function a(x){try{const m=await x.text();if(m){if(x.headers.get("content-type")?.startsWith("application/json"))try{const h=JSON.parse(m);if(h.error&&h.response)return h}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}, ${m}`},response:{statusCode:x.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}`},response:{statusCode:x.status}}}class d extends Error{response;body;cause;statusCode;statusText;static async fromResponse(m){const h=await a(m),u=h.response.statusCode||m.status,p=m.statusText,g=`Request failed with ${u} ${p}`,y=(0,n.cy)(h.error);return new d({message:g,response:m,data:h,cause:y,statusCode:u,statusText:p})}constructor(m){super(m.message),this.name="ResponseError",this.response=m.response,this.body=m.data,this.cause=m.cause,this.statusCode=m.statusCode,this.statusText=m.statusText}}},93007:(H,S,t)=>{"use strict";t.d(S,{b:()=>n});function n(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const x=d;return!(typeof x.name!="string"||x.name===""||typeof x.message!="string")}function a(d){if(typeof d!="object"||d===null||Array.isArray(d))throw new Error(`Encountered invalid error, not an object, got '${d}'`);const x=d;if(typeof x.name!="string"||x.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof x.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},97142:(H,S,t)=>{"use strict";t.d(S,{HK:()=>v,m_:()=>u,EH:()=>y});var n=t(93007),a=t(59750);class d extends Error{cause;constructor(P,L){let O=P;if(L!==void 0){const j=(0,a.M5)(L);O?O+=`; caused by ${j}`:O=`caused by ${j}`}super(O),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,n.b)(L)?L:void 0}}class x extends null{name="InputError"}class m extends null{name="AuthenticationError"}class h extends null{name="NotAllowedError"}class u extends d{name="NotFoundError"}class p extends null{name="ConflictError"}class g extends null{name="NotModifiedError"}class y extends d{name="NotImplementedError"}class A extends null{}class v extends d{constructor(P,L){super(P,L),this.name=(0,n.b)(L)?L.name:"Error"}}},59750:(H,S,t)=>{"use strict";t.d(S,{M5:()=>h,cy:()=>m});var n=t(69655),a=t.n(n),d=t(93007);function x(u,p){const y={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(u)};return p?.includeStack||(delete y.stack,y.cause&&typeof y.cause=="object"&&"stack"in y.cause&&delete y.cause.stack),y}function m(u){const p=(0,n.deserializeError)(u);return u.stack||(p.stack=void 0),p}function h(u){if((0,d.b)(u)){const p=String(u);return p!=="[object Object]"?p:`${u.name}: ${u.message}`}return`unknown error '${u}'`}},96726:(H,S,t)=>{"use strict";t.d(S,{L:()=>je,Y:()=>ve});var n=t(59869);const a="amazonaws.com";function d(w){const l=w.getOptionalString("endpoint"),E=w.getOptionalBoolean("s3ForcePathStyle")??!1;let R,q;if(l){try{const zt=new URL(l);R=zt.host,q=zt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(q!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else R=a;const ct=w.getOptionalString("accessKeyId"),tt=w.getOptionalString("secretAccessKey")?.trim(),Tt=w.getOptionalString("roleArn"),wt=w.getOptionalString("externalId");return{host:R,endpoint:l,s3ForcePathStyle:E,accessKeyId:ct,secretAccessKey:tt,roleArn:Tt,externalId:wt}}function x(w){const l=w.map(d);return l.some(E=>E.host===a)||l.push({host:a}),l}class m{integrationConfig;static factory=({config:l})=>{const E=x(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,n.oS)(E.map(R=>new m(R)),R=>R.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,n.ku)(l)}resolveEditUrl(l){return l}}const h="console.aws.amazon.com";function u(w){const l=w.getOptionalString("accessKeyId"),E=w.getOptionalString("secretAccessKey")?.trim(),R=w.getOptionalString("roleArn"),q=w.getOptionalString("externalId"),ct=w.getString("region");return{host:w.getOptionalString("host")||`${ct}.${h}`,accessKeyId:l,secretAccessKey:E,roleArn:R,externalId:q,region:ct}}function p(w){return w.map(u)}class g{integrationConfig;static factory=({config:l})=>{const E=p(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,n.oS)(E.map(R=>new g(R)),R=>R.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,n.ku)(l)}resolveEditUrl(l){const R=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!R)throw new Error("");const[,q]=R;return y(l,q,"edit")}}function y(w,l,E){const R=E==="edit"?"files/edit":E;return w.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${R}/`)}const A="GB";class v{static fromRepoUrl(l){const E=new URL(l);let R,q,ct;const tt=E.pathname.split("/").map(ie=>decodeURIComponent(ie));if(tt[2]==="_git"?(R=tt[1],q=ct=tt[3]):tt[3]==="_git"?(R=tt[1],q=tt[2],ct=tt[4]):tt[4]==="_git"&&(R=`${tt[1]}/${tt[2]}`,q=tt[3],ct=tt[5]),!R||!q||!ct)throw new Error("Azure URL must point to a git repository");const Tt=E.searchParams.get("path")??void 0;let wt;const zt=E.searchParams.get("version");if(zt){if(zt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");wt=zt.slice(2)}return new v(E.origin,R,q,ct,Tt,wt)}#t;#e;#n;#s;#r;#o;constructor(l,E,R,q,ct,tt){this.#t=l,this.#e=E,this.#n=R,this.#s=q,this.#r=ct,this.#o=tt}#a=(...l)=>{const E=new URL(this.#t);return E.pathname=l.map(R=>encodeURIComponent(R)).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.#r&&l.searchParams.set("path",this.#r),this.#o&&l.searchParams.set("version",A+this.#o),l.toString()}toFileUrl(){if(!this.#r)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.#r),this.#o&&l.searchParams.set("version",this.#o),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.#r&&l.searchParams.set("scopePath",this.#r),this.#o&&l.searchParams.set("version",this.#o),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.#o&&l.searchParams.set("searchCriteria.itemVersion.version",this.#o),l.toString()}getOwner(){return this.#e}getProject(){return this.#n}getRepo(){return this.#s}getPath(){return this.#r}getRef(){return this.#o}}const T="dev.azure.com",P=["clientId","clientSecret","tenantId","personalAccessToken"],L=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function O(w){for(const l of L.entries()){const[E,R]=l,q=P.filter(ct=>!R.includes(ct));if(R.every(ct=>w[ct]!==void 0)&&q.every(ct=>w[ct]===void 0))return{kind:E,organizations:w.organizations,...R.reduce((ct,tt)=>(ct[tt]=w[tt],ct),{})}}throw new Error("is not a valid credential")}function j(w){const l=w.getOptionalString("host")??T;let E=w.getOptionalConfigArray("credentials")?.map(ct=>({organizations:ct.getOptionalStringArray("organizations"),personalAccessToken:ct.getOptionalString("personalAccessToken")?.trim(),tenantId:ct.getOptionalString("tenantId"),clientId:ct.getOptionalString("clientId"),clientSecret:ct.getOptionalString("clientSecret")?.trim()}));const R=w.getOptionalString("token")?.trim();if(w.getOptional("credential")!==void 0&&w.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(w.getOptional("token")!==void 0&&w.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(R!==void 0){const ct=[{personalAccessToken:R}];E=E?.concat(ct)??ct}if(w.getOptional("credential")!==void 0){const ct=[{organizations:w.getOptionalStringArray("credential.organizations"),token:w.getOptionalString("credential.token")?.trim(),tenantId:w.getOptionalString("credential.tenantId"),clientId:w.getOptionalString("credential.clientId"),clientSecret:w.getOptionalString("credential.clientSecret")?.trim()}];E=E?.concat(ct)??ct}if(!(0,n.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let q;if(E!==void 0){const ct=E?.reduce((tt,Tt,wt)=>{let zt;try{O(Tt)}catch(ie){zt=ie.message}return zt!==void 0&&tt.push(`credential at position ${wt+1} ${zt}`),tt},Array.of()).concat(Object.entries(E.filter(tt=>tt.organizations!==void 0&&tt.organizations.length>0).reduce((tt,Tt,wt)=>(Tt.organizations?.forEach(zt=>{tt[zt]||(tt[zt]=[]),tt[zt].push(wt+1)}),tt),{})).filter(([tt,Tt])=>Tt.length>1).reduce((tt,[Tt,wt])=>(tt.push(`organization ${Tt} is specified multiple times in credentials at positions ${wt.slice(0,wt.length-1).join(", ")} and ${wt[wt.length-1]}`),tt),Array.of()));if(ct?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${ct.join("; ")}`);if(q=E.map(tt=>O(tt)),q.some(tt=>tt.kind!=="PersonalAccessToken")&&l!==T)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${T}`);if(q.filter(tt=>tt.organizations===void 0||tt.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:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function $(w){const l=w.map(j);return l.some(E=>E.host===T)||l.push({host:T}),l}class M{integrationConfig;static factory=({config:l})=>{const E=$(l.getOptionalConfigArray("integrations.azure")??[]);return(0,n.oS)(E.map(R=>new M(R)),R=>R.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:R}=l;if((0,n.AY)(E))return E;try{const q=v.fromRepoUrl(R),ct=new URL(R),tt=new URL(`https://a.com${q.getPath()??""}`),Tt=new URL(E,tt).pathname;return ct.searchParams.set("path",Tt),l.lineNumber&&(ct.searchParams.set("line",String(l.lineNumber)),ct.searchParams.set("lineEnd",String(l.lineNumber+1)),ct.searchParams.set("lineStartColumn","1"),ct.searchParams.set("lineEndColumn","1")),ct.toString()}catch{return new URL(E,R).toString()}}resolveEditUrl(l){return l}}var J=t(52536),Q=t.n(J);const F="bitbucket.org",V="https://api.bitbucket.org/2.0";function Y(w){const l=F,E=V,R=w.getString("username"),q=w.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:R,appPassword:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function nt(w){const l=w.map(Y);return l.length===0&&l.push({host:F,apiBaseUrl:V}),l}class W{integrationConfig;static factory=({config:l})=>{const E=nt(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,n.oS)(E.map(R=>new W(R)),R=>R.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,n.ku)(l);if(l.lineNumber){const R=new URL(E);return R.hash=`lines-${l.lineNumber}`,R.toString()}return E}resolveEditUrl(l){const E=Q()(l),R=new URL(l);return R.searchParams.set("mode","edit"),R.searchParams.set("at",E.ref),R.toString()}}var Z=t(45250);const G="bitbucket.org",at="https://api.bitbucket.org/2.0";function pt(w){const l=w.getOptionalString("host")??G;let E=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim(),q=w.getOptionalString("username"),ct=w.getOptionalString("appPassword")?.trim();if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,Z.trimEnd)(E,"/"):l===G?E=at:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:R,username:q,appPassword:ct,commitSigningKey:w.getOptionalString("commitSigningKey")}}function Et(w){const l=w.map(pt);return l.some(E=>E.host===G)||l.push({host:G,apiBaseUrl:at}),l}class bt{integrationConfig;static factory=({config:l})=>{const E=Et(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,n.oS)(E.map(R=>new bt(R)),R=>R.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,n.ku)(l);if(!l.lineNumber)return E;const R=new URL(E);return this.integrationConfig.host==="bitbucket.org"?R.hash=`lines-${l.lineNumber}`:R.hash=`${l.lineNumber}`,R.toString()}resolveEditUrl(l){const E=Q()(l),R=new URL(l);return R.searchParams.set("mode","edit"),R.searchParams.set("spa","0"),R.searchParams.set("at",E.ref),R.toString()}}function At(w){const l=w.getString("host");let E=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim(),q=w.getOptionalString("username"),ct=w.getOptionalString("password");if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,Z.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:R,username:q,password:ct,commitSigningKey:w.getOptionalString("commitSigningKey")}}function Dt(w){return w.map(At)}class lt{integrationConfig;static factory=({config:l})=>{const E=Dt(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,n.oS)(E.map(R=>new lt(R)),R=>R.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,n.ku)(l);if(l.lineNumber){const R=new URL(E);return R.hash=l.lineNumber.toString(),R.toString()}return E}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function dt(w){const l=w.getString("host");let E=w.getOptionalString("baseUrl"),R=w.getOptionalString("cloneUrl"),q=w.getString("gitilesBaseUrl");const ct=w.getOptionalString("username"),tt=w.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(E&&!(0,n.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(R&&!(0,n.AY)(R))throw new Error(`Invalid Gerrit integration config, '${R}' is not a valid cloneUrl`);if(!(0,n.AY)(q))throw new Error(`Invalid Gerrit integration config, '${q}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return E?E=(0,Z.trimEnd)(E,"/"):E=`https://${l}`,q?q=(0,Z.trimEnd)(q,"/"):q=`https://${l}`,R?R=(0,Z.trimEnd)(R,"/"):R=E,{host:l,baseUrl:E,cloneUrl:R,gitilesBaseUrl:q,username:ct,password:tt,commitSigningKey:w.getOptionalString("commitSigningKey")}}function xt(w){return w.map(dt)}var ft=t(1048).hp;const Ct=")]}'";function Pt(w,l){const E=new URL(w.gitilesBaseUrl),R=new URL(l),ct=R.pathname.substring(R.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(Le=>!!Le),tt=ct.indexOf("+");if(tt<=0)throw new Error(`Unable to parse project from url: ${l}`);const Tt=trimStart(ct.slice(0,tt).join("/"),"/"),wt=ct.indexOf("heads");if(wt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const zt=ct[wt+1],ie=ct.slice(wt+2).join("/");return{branch:zt,filePath:ie===""?"/":ie,project:Tt}}function it(w,l){const E=new URL(w.gitilesBaseUrl),R=new URL(l),ct=(0,Z.trimStart)(R.pathname.substring(R.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(Yt=>!!Yt),tt=(0,Z.takeWhile)(ct,Yt=>Yt!=="+");if(tt.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Tt=ct.slice(tt.length+1),wt=(0,Z.join)(tt,"/");if(Tt.length>0&&Tt[0]==="HEAD"){const Yt=Tt.shift(),me=(0,Z.join)(Tt,"/");return{project:wt,ref:Yt,refType:"head",path:me||"/",basePath:(0,Z.trimEnd)(l.replace(me,""),"/")}}if(Tt.length>0&&Tt[0].length===40){const Yt=Tt.shift(),me=(0,Z.join)(Tt,"/");return{project:wt,ref:Yt,refType:"sha",path:me||"/",basePath:(0,Z.trimEnd)(l.replace(me,""),"/")}}const zt=(0,Z.join)(Tt,"/"),Le=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(zt);if(Le){const Yt=Le[0];let me;const{refsReference:Ee,ref:se}=Le.groups||{},tn=zt.replace(Yt,"");switch(Ee){case"heads":me="branch";break;case"tags":me="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:wt,ref:se,refType:me,path:tn||"/",basePath:(0,Z.trimEnd)(l.replace(tn,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function mt(w,l,E,R){return`${w.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(R,"/")}`}function yt(w,l,E,R){const q=R==="/"||R===""?".tar.gz":`/${R}.tar.gz`;return`${rt(w)}/${l}/+archive/refs/heads/${E}${q}`}function et(w,l){const{path:E,ref:R,project:q,refType:ct}=it(w,l),tt=E==="/"||E===""?".tar.gz":`/${E}.tar.gz`;if(ct==="branch")return`${rt(w)}/${q}/+archive/refs/heads/${R}${tt}`;if(ct==="sha")return`${rt(w)}/${q}/+archive/${R}${tt}`;throw new Error(`Unsupported gitiles ref type: ${ct}`)}function ht(w){return w.password?"/a/":"/"}function rt(w){if(!w.baseUrl||!w.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(w.gitilesBaseUrl.startsWith(w.baseUrl))return w.gitilesBaseUrl.replace(w.baseUrl.concat("/"),w.baseUrl.concat(ht(w)));if(w.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return w.gitilesBaseUrl}function B(w,l){const{branch:E,project:R}=Pt(w,l);return`${w.baseUrl}${ht(w)}projects/${encodeURIComponent(R)}/branches/${E}`}function z(w,l){const{project:E}=Pt(w,l);return`${w.cloneUrl}${ht(w)}${E}`}function ut(w,l){const{ref:E,refType:R,path:q,project:ct}=it(w,l);if(R==="branch")return`${w.baseUrl}${ht(w)}projects/${encodeURIComponent(ct)}/branches/${E}/files/${encodeURIComponent(q)}/content`;if(R==="sha")return`${w.baseUrl}${ht(w)}projects/${encodeURIComponent(ct)}/commits/${E}/files/${encodeURIComponent(q)}/content`;throw new Error(`Unsupported gitiles ref type: ${R}`)}function Ot(w){return`${w.baseUrl}${ht(w)}projects/`}function It(w){const l={};if(!w.password)return l;const E=ft.from(`${w.username}:${w.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function Lt(w){const l=await w.text();if(l.startsWith(Ct))try{return JSON.parse(l.slice(Ct.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 Ut{integrationConfig;static factory=({config:l})=>{const E=xt(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,n.oS)(E.map(R=>new Ut(R)),R=>R.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:R,lineNumber:q}=l;let ct;if(E.startsWith("/")){const{basePath:tt}=it(this.config,R);return tt+E}return E?ct=new URL(E,R):ct=new URL(R),q&&(ct.hash=q.toString()),ct.toString()}resolveEditUrl(l){return l}}var Nt=t(36021);const Wt="gitlab.com",Kt="https://gitlab.com/api/v4";function te(w){const l=w.getString("host");let E=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim();let q=w.getOptionalString("baseUrl");if(E?E=(0,Z.trimEnd)(E,"/"):l===Wt&&(E=Kt),q?q=(0,Z.trimEnd)(q,"/"):q=`https://${l}`,(0,n.HO)(l)){if(!E||!(0,n.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,n.AY)(q))throw new Error(`Invalid GitLab integration config, '${q}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:R,apiBaseUrl:E,baseUrl:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function jt(w){const l=w.map(te);return l.some(E=>E.host===Wt)||l.push({host:Wt,apiBaseUrl:Kt,baseUrl:`https://${Wt}`}),l}function kt(w){let l="";return w.host!==Wt&&(l=new URL(w.baseUrl).pathname),trimEnd(l,"/")}class ee{integrationConfig;static factory=({config:l})=>{const E=jt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,n.oS)(E.map(R=>new ee(R)),R=>R.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,n.ku)(l)}resolveEditUrl(l){return fe(l,"edit")}}function fe(w,l){return w.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function Gt(w){const l=w.getString("host");let E=w.getOptionalString("baseUrl");const R=w.getOptionalString("username"),q=w.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(E&&!(0,n.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,Z.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:R,password:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}var ne=t(1048).hp;function de(w,l){const E=ae(w,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function Xe(w,l){const E=ae(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function Ge(w,l){const E=ae(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function oe(w,l){const E=ae(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function We(w){const l={},{username:E,password:R}=w;return R?(E?l.Authorization=`basic ${ne.from(`${E}:${R}`).toString("base64")}`:l.Authorization=`token ${R}`,{headers:l}):l}function ae(w,l){const E=w.baseUrl??`https://${w.host}`;try{const[R,q,ct,tt,Tt,wt,...zt]=l.replace(E,"").split("/"),ie=zt.join("/").replace(/^\//,"");return{url:E,owner:q,name:ct,ref:wt,path:ie}}catch(R){throw new Error(`Incorrect URL: ${l}, ${R}`)}}class Ye{config;static factory=({config:l})=>{const R=(l.getOptionalConfigArray("integrations.gitea")??[]).map(q=>Gt(q));return(0,n.oS)(R.map(q=>new Ye(q)),q=>q.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return de(this.config,l)}}function _e(w){const l=w.getString("host"),E=w.getOptionalString("token"),R=w.getOptionalString("apiKey");if(!(0,n.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:R,token:E}}function ge(w,l){const E=De(w,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 rn(w,l){const E=De(w,l);let R=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(R+=`/${E.orgName}`),E.projectName&&(R+=`/${E.projectName}`),R+=`/${E.repoName}/+/raw/${E.path}?routingId=${E.accountId}&git_ref=refs/heads/${E.refString}`,R}function gn(w,l){const E=De(w,l);let R=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(R+=`/${E.orgName}`),E.projectName&&(R+=`/${E.projectName}`),R+=`/${E.repoName}/+/archive/${E.branch}.zip?routingId=${E.accountId}`,R}function on(w,l){const E=De(w,l);let R=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(R+=`/${E.orgName}`),E.projectName&&(R+=`/${E.projectName}`),R+=`/${E.repoName}/+/content?routingId=${E.accountId}&include_commit=true&git_ref=refs/heads/${E.branch}`,R}function qe(w){const l={},{token:E,apiKey:R}=w;return R?l["x-api-key"]=R:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function De(w,l){const E=`https://${w.host}`;try{const R=new URL(l),q=R.pathname.split("/").filter(ue=>ue!==""),ct=R.pathname.split("/"),tt=q.findIndex(ue=>ue==="account")+1,Tt=q[tt],wt=q.findIndex(ue=>ue==="orgs"),zt=wt!==-1?q[wt+1]:"",ie=q.findIndex(ue=>ue==="projects"),Le=ie!==-1?q[ie+1]:"",Yt=q.findIndex((ue,cn)=>ue==="repos"&&cn>Math.max(tt,wt,ie))+1,me=q[Yt],Ee=ct.slice(ct.findIndex(ue=>ue==="files"||ue==="edit")+1),se=Ee.findIndex(ue=>ue==="~"),tn=Ee.slice(0,se).join("/"),Ve=se!==-1?Ee.slice(se+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Tt,orgName:zt,projectName:Le,refString:tn,path:Ve,repoName:me,refDashStr:Ee.slice(0,se).join("-"),branch:se!==-1?Ee.slice(0,se).join("/"):Ee.join("/")}}catch(R){throw new Error(`Incorrect URL: ${l}, ${R}`)}}class Ke{config;static factory=({config:l})=>{const R=(l.getOptionalConfigArray("integrations.harness")??[]).map(q=>_e(q));return(0,n.oS)(R.map(q=>new Ke(q)),q=>q.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return ge(this.config,l)}}const ze="blob.core.windows.net";function an(w){const l=w.getOptionalString("endpoint"),E=w.getString("accountName"),R=w.getOptionalString("accountKey")?.trim(),q=w.getOptionalString("sasToken")?.trim(),ct=w.getOptionalString("connectionString")?.trim(),tt=w.getOptionalString("endpointSuffix")?.trim();let Tt,wt;if(l){try{const ie=new URL(l);Tt=ie.host,wt=ie.pathname}catch{throw new Error(`invalid azureBlobStorage integration config, endpoint '${l}' is not a valid URL`)}if(wt!=="/")throw new Error(`invalid azureBlobStorage integration config, endpoints cannot contain path, got '${l}'`)}else Tt=ze;const zt=w.has("aadCredential")?{clientId:w.getString("aadCredential.clientId"),tenantId:w.getString("aadCredential.tenantId"),clientSecret:w.getString("aadCredential.clientSecret")?.trim()}:void 0;if(R&&q)throw new Error(`Invalid Azure Blob Storage config for ${E}: Both account key and SAS token cannot be used simultaneously.`);if(zt&&(R||q))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:Tt,endpoint:l,accountName:E,accountKey:R,sasToken:q,connectionString:ct,endpointSuffix:tt,aadCredential:zt}}function ye(w){const l=w.map(an);return l.some(E=>E.host===ze)||l.push({host:ze}),l}class He{integrationConfig;static factory=({config:l})=>{const E=ye(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,n.oS)(E.map(R=>new He(R)),R=>R.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,n.ku)(l)}resolveEditUrl(l){return l}}class ke{byType;static fromConfig(l){return new ke({awsS3:m.factory({config:l}),awsCodeCommit:g.factory({config:l}),azureBlobStorage:He.factory({config:l}),azure:M.factory({config:l}),bitbucket:bt.factory({config:l}),bitbucketCloud:W.factory({config:l}),bitbucketServer:lt.factory({config:l}),gerrit:Ut.factory({config:l}),github:Nt.U.factory({config:l}),gitlab:ee.factory({config:l}),gitea:Ye.factory({config:l}),harness:Ke.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(R=>R.byUrl(l)).filter(Boolean);if(E.length>1){const R=E.filter(q=>!(q instanceof bt));R.length!==0&&(E=R)}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,n.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var Qe=t(55309);class je{static fromConfig(l){return ke.fromConfig(l)}}const ve=(0,Qe.y)({id:"integration.scmintegrations"})},36021:(H,S,t)=>{"use strict";t.d(S,{U:()=>p,F:()=>g});var n=t(59869),a=t(45250);const d="github.com",x="https://api.github.com",m="https://raw.githubusercontent.com";function h(y){const A=y.getOptionalString("host")??d;let v=y.getOptionalString("apiBaseUrl"),T=y.getOptionalString("rawBaseUrl");const P=y.getOptionalString("token")?.trim(),L=y.getOptionalConfigArray("apps")?.map(O=>({appId:O.getNumber("appId"),clientId:O.getString("clientId"),clientSecret:O.getString("clientSecret"),webhookSecret:O.getString("webhookSecret"),privateKey:O.getString("privateKey"),allowedInstallationOwners:O.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,n.HO)(A))throw new Error(`Invalid GitHub integration config, '${A}' is not a valid host`);return v?v=(0,a.trimEnd)(v,"/"):A===d&&(v=x),T?T=(0,a.trimEnd)(T,"/"):A===d&&(T=m),{host:A,apiBaseUrl:v,rawBaseUrl:T,token:P,apps:L}}function u(y){const A=y.map(h);return A.some(v=>v.host===d)||A.push({host:d,apiBaseUrl:x,rawBaseUrl:m}),A}class p{integrationConfig;static factory=({config:A})=>{const v=u(A.getOptionalConfigArray("integrations.github")??[]);return(0,n.oS)(v.map(T=>new p(T)),T=>T.config.host)};constructor(A){this.integrationConfig=A}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(A){return g((0,n.ku)(A),"tree")}resolveEditUrl(A){return g(A,"edit")}parseRateLimitInfo(A){return{isRateLimited:A.status===429||A.status===403&&A.headers.get("x-ratelimit-remaining")==="0"}}}function g(y,A){return y.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(v,T,P,L)=>`//${T}/${P}/${L}/${A}/`)}},59869:(H,S,t)=>{"use strict";t.d(S,{AY:()=>h,HO:()=>m,ku:()=>p,oS:()=>u});var n=t(52536),a=t.n(n),d=t(45250),x=t.n(d);function m(y){const A=new URL("http://example.com");return A.host=y,A.host===y}function h(y){try{return new URL(y),!0}catch{return!1}}function u(y,A){return{list(){return y},byUrl(v){try{const T=typeof v=="string"?new URL(v):v;return y.find(P=>A(P)===T.host)}catch{return}},byHost(v){return y.find(T=>A(T)===v)}}}function p(y){const{url:A,base:v,lineNumber:T}=y;try{return new URL(A),A}catch{}let P;if(A.startsWith("/")){const{href:L,filepath:O}=a()(v);P=new URL(L);const j=(0,d.trimEnd)(P.pathname.substring(0,P.pathname.length-O.length),"/");P.pathname=`${j}${A}`}else P=new URL(A,v);return P.search=new URL(v).search,T&&(P.hash=`L${T}`),P.toString()}function g(y){beforeAll(()=>y.listen({onUnhandledRequest:"error"})),afterAll(()=>y.close()),afterEach(()=>y.resetHandlers())}},71543:(H,S,t)=>{"use strict";var n={};t.r(n),t.d(n,{TechDocsPlugin:()=>h.Ju});var a=t(31085),d=t(14041),x=t(25873),m=t(18690),h=t(39278),u=t(8915),p=t(72020),g=t(99730),y=t(64947),A=t(12173),v=t(22020),T=t(68146),P=t(73657);function L({children:r}){return(0,m.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(m.fS,{children:r})}const O=()=>(0,a.jsx)(A.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),j=({step:r,error:e})=>{let s="";return r==="load-config"?s=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(s=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(L,{children:(0,a.jsx)(A.M,{statusMessage:s,stack:e.stack})})},$=({error:r,resetError:e,plugin:s})=>(0,a.jsx)(v.b,{title:`Error in ${s?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(y.A,{variant:"outlined",onClick:e,children:"Retry"})}),M={Progress:T.k,Router:P.Kd,NotFoundErrorPage:O,BootErrorPage:j,ErrorBoundaryFallback:$},J="Invalid discovery URL pattern,";class Q{parts;static compile(e){const s=e.split(/\{\{\s*pluginId\s*\}\}/),o=s.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${J} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${J} URL must not have a hash`);if(i.search)throw new Error(`${J} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${J} URL must not end with a slash`);return new Q(s)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}class F{endpoints;defaultEndpoint;static fromConfig(e,s){const o=s?.pathPattern??"/api/{{ pluginId }}",i=e.getString("backend.baseUrl"),c=e.getOptionalConfigArray("discovery.endpoints")?.flatMap(b=>{const C=typeof b.get("target")=="object"?b.getOptionalString("target.external"):b.getString("target");if(!C)return[];const I=Q.compile(C);return b.getStringArray("plugins").map(K=>[K,I])});return new F(new Map(c),Q.compile(`${i}${o}`))}constructor(e,s){this.endpoints=e,this.defaultEndpoint=s}async getBaseUrl(e){const s=this.endpoints.get(e);return s?s.getBaseUrl(e):this.defaultEndpoint.getBaseUrl(e)}}var V=t(96403),Y=t.n(V);class nt{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(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class W{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Y())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(s.next(this.currentValue),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}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(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class Z{subject=new nt;post(e){this.subject.next(e)}alert$(){return this.subject}}class G{captureEvent(e){}}class at{alertApi;errorApi;constructor(e,s){this.alertApi=e,this.errorApi=s}post(e,s){return s?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,s)}error$(){return this.errorApi.error$()}}class pt{subject=new nt;post(e,s){this.subject.next({error:e,context:s})}error$(){return this.subject}}class Et{static forward(e,s){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,s)})}}const bt=new Map;class At{namespace;errorApi;constructor(e,s){this.namespace=e,this.errorApi=s,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[s,o]of bt.entries())e.key?.startsWith(s)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let s,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(s=JSON.parse(i,(c,b)=>(typeof b=="object"&&b!==null&&Object.freeze(b),b)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:s,presence:o}}forBucket(e){const s=`${this.namespace}/${e}`;return bt.has(s)||bt.set(s,new At(s,this.errorApi)),bt.get(s)}async set(e,s){localStorage.setItem(this.getKeyName(e),JSON.stringify(s)),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:s})=>s===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const s=e?.slice(`${this.namespace}/`.length);s.includes("/")||this.notifyChanges(decodeURIComponent(s))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const s=this.snapshot(e);for(const o of this.subscribers)o.next(s)}subscribers;observable}function Dt(r){let e=r.baseImplementation||t.g.fetch;const s=[r.middleware??[]].flat().reverse();for(const o of s)e=o.apply(e);return{fetch:e}}class lt{identityApi;allowUrl;headerName;headerValue;static create(e){const s=dt(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new lt(e.identityApi,s,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(b=>i.replace(/\{\{\s*pluginId\s*\}\}/g,b))})}constructor(e,s,o,i){this.identityApi=e,this.allowUrl=s,this.headerName=o,this.headerValue=i}apply(e){return async(s,o)=>{const i=new Request(s,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(s,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function dt(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?xt(r.urlPrefixAllowlist):r.config?xt([r.config.getString("backend.baseUrl"),...lt.getDiscoveryUrlPrefixes(r.config)]):()=>!1}function xt(r){const e=r.map(s=>s.replace(/\/$/,""));return s=>e.some(o=>s===o||s.startsWith(`${o}/`))}function ft(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class Ct{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(s,o)=>{const i=new Request(s,o),c="plugin://";if(!i.url.startsWith(c))return e(s,o);const{hostname:b,pathname:C,search:I,hash:K,username:_,password:gt}=new URL(`http://${i.url.substring(c.length)}`);let ot=await this.discoveryApi.getBaseUrl(b);if(_||gt){const Mt=new URL(ot),Vt=`${_}${gt?`:${gt}`:""}@`;ot=`${Mt.protocol}//${Vt}${Mt.host}${Mt.pathname}`}const vt=`${ft(ot,C)}${I}${K}`;return e(vt,typeof s=="string"||Pt(s)?o:s)}}}function Pt(r){return typeof r=="object"&&r?.constructor===URL}class it{static resolvePluginProtocol(e){return new Ct(e.discoveryApi)}static injectIdentityAuth(e){return lt.create(e)}constructor(){}}function mt(r,e){for(const s of e)if(!r.has(s))return!1;return!0}function yt(r,...e){const s=new Set(r);for(const o of e)for(const i of o)s.add(i);return s}class et{requests=[];subject=new W(this.getCurrentPending());request(e){return new Promise((s,o)=>{this.requests.push({scopes:e,resolve:s,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,s){this.requests=this.requests.filter(o=>mt(e,o.scopes)?(o.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(s=>s.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((s,o)=>yt(s,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:s=>{e&&this.resolve(e,s)},reject:s=>{e&&this.reject(s)}}}}class ht{subject=new W([]);currentRequests=[];handlerCount=0;createAuthRequester(e){const s=new et,o=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),b=this.makeAuthRequest(i,e);b?c[o]=b:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>s.request(i)}makeAuthRequest(e,s){const{scopes:o}=e;if(o)return{provider:s.provider,trigger:async()=>{const i=await s.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 rt(r){return new Promise((e,s)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,b=window.screen.height/2-i/2,C=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${b},left=${c}`);let I="";if(!C||typeof C.closed>"u"||C.closed){const ot=new Error("Failed to open auth popup.");ot.name="PopupRejectedError",s(ot);return}const K=ot=>{if(ot.source!==C||ot.origin!==r.origin)return;const{data:vt}=ot;if(vt.type==="config_info"){I=vt.targetOrigin;return}if(vt.type!=="authorization_response")return;const Mt=vt;if("error"in Mt){const Vt=new Error(Mt.error.message);Vt.name=Mt.error.name,s(Vt)}else e(Mt.response);gt()},_=setInterval(()=>{if(C.closed){const ot=`Login failed, ${I&&I!==window.location.origin?`Incorrect app origin, expected ${I}`:"popup was closed"}`,vt=new Error(ot);vt.name="PopupClosedError",s(vt),gt()}},100);function gt(){window.removeEventListener("message",K),clearInterval(_)}window.addEventListener("message",K)})}let B=!1;function z(r){return[...r].join(" ")}class ut{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:s,discoveryApi:o,environment:i,provider:c,joinScopes:b=z,oauthRequestApi:C,sessionTransform:I=_=>_,popupOptions:K}=e;!B&&!s&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),B=!0),this.enableExperimentalRedirectFlow=s?s.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=C.createAuthRequester({provider:c,onAuthRequest:async _=>this.enableExperimentalRedirectFlow?this.executeRedirect(_):this.showPopup(_)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=b,this.sessionTransform=I,this.popupOptions=K}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const s=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!s.ok){const i=new Error(`Auth refresh request failed, ${s.statusText}`);throw i.status=s.status,i}const o=await s.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(s=>{throw new Error(`Logout request failed, ${s}`)});if(!e.ok){const s=new Error(`Logout request failed, ${e.statusText}`);throw s.status=e.status,s}}async showPopup(e){const s=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:s,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,b=await rt({url:o,name:`${this.provider.title} Login`,origin:new URL(o).origin,width:i,height:c});return await this.sessionTransform(b)}async executeRedirect(e){const s=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:s,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,s){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...s,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const s=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return s?`?${s}`:""}}function Ot(r,e){for(const s of e)if(!r.has(s))return!1;return!0}class It{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,s){if(!e)return!1;if(!s||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return Ot(o,s)}getExtendedScope(e,s){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(s)for(const i of s)o.add(i);return o}}var Lt=t(55309),Ut=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Nt=(0,Lt.y)({id:"core.auth.google"}),Wt=(0,Lt.y)({id:"core.auth.github"}),Kt=(0,Lt.y)({id:"core.auth.okta"}),te=(0,Lt.y)({id:"core.auth.gitlab"}),jt=(0,Lt.y)({id:"core.auth.microsoft"}),kt=(0,Lt.y)({id:"core.auth.onelogin"}),ee=(0,Lt.y)({id:"core.auth.bitbucket"}),fe=(0,Lt.y)({id:"core.auth.bitbucket-server"}),Gt=(0,Lt.y)({id:"core.auth.atlassian"}),ne=(0,Lt.y)({id:"core.auth.vmware-cloud"});class de{subject=new W(Ut.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Ut.SignedIn:Ut.SignedOut))}sessionState$(){return this.subject}}class Xe{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new de;refreshPromise;currentSession;constructor(e){const{connector:s,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=s,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new It({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 Ot(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!e.instantPopup)try{const s=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=s,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(this.helper.getExtendedScope(this.currentSession,e));try{const s=await this.refreshPromise;if(!this.helper.sessionExistsAndHasScope(s,e))throw new Error("Refreshed session did not receive the required scopes");return this.stateTracker.setIsSignedIn(!0),s}finally{delete this.refreshPromise}}}const Ge={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class oe{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Ge,oauthRequestApi:b,defaultScopes:C=[],scopeTransform:I=ot=>ot,popupOptions:K}=e,_=new ut({configApi:s,discoveryApi:o,environment:i,provider:c,oauthRequestApi:b,sessionTransform({backstageIdentity:ot,...vt}){const Mt={...vt,providerInfo:{idToken:vt.providerInfo.idToken,accessToken:vt.providerInfo.accessToken,scopes:oe.normalizeScopes(I,vt.providerInfo.scope),expiresAt:vt.providerInfo.expiresInSeconds?new Date(Date.now()+vt.providerInfo.expiresInSeconds*1e3):void 0}};return ot&&(Mt.backstageIdentity={token:ot.token,identity:ot.identity,expiresAt:ot.expiresInSeconds?new Date(Date.now()+ot.expiresInSeconds*1e3):void 0}),Mt},popupOptions:K}),gt=new Xe({connector:_,defaultScopes:new Set(C),sessionScopes:ot=>ot.providerInfo.scopes,sessionShouldRefresh:ot=>{let vt=1/0;return ot.providerInfo?.expiresAt&&(vt=Math.min(vt,(ot.providerInfo.expiresAt.getTime()-Date.now())/1e3)),ot.backstageIdentity?.expiresAt&&(vt=Math.min(vt,(ot.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),vt<60*3}});return new oe({sessionManager:gt,scopeTransform:I})}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,s){const o=oe.normalizeScopes(this.scopeTransform,e);return(await this.sessionManager.getSession({...s,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,s){if(!s)return new Set;const o=Array.isArray(s)?s:s.split(/[\s|,]/).filter(Boolean);return new Set(e(o))}}const We={id:"google",title:"Google",icon:()=>null},ae="https://www.googleapis.com/auth/";class Ye{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:b=We,defaultScopes:C=["openid",`${ae}userinfo.email`,`${ae}userinfo.profile`]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:b,environment:c,defaultScopes:C,scopeTransform(I){return I.map(K=>K==="openid"?K:K==="profile"||K==="email"?`${ae}userinfo.${K}`:K.startsWith(ae)?K:`${ae}${K}`)}})}}const _e={id:"microsoft",title:"Microsoft",icon:()=>null};class ge{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new ge(e)}constructor(e){const{configApi:s,environment:o="development",provider:i=_e,oauthRequestApi:c,discoveryApi:b,defaultScopes:C=["openid","offline_access","profile","email","User.Read"],scopeTransform:I=K=>K.concat("offline_access")}=e;this.configApi=s,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=b,this.scopeTransform=I,this.oauth2={[ge.MicrosoftGraphID]:oe.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:C})}}microsoftGraph(){return this.oauth2[ge.MicrosoftGraphID]}static resourceForScopes(e){const s=[...new Set(e.split(" ").map(ge.resourceForScope).filter(i=>i!=="openid"))];if(s.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${s.join(", ")}. Access tokens can only have a single audience.`));const o=s[0]??ge.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const s=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(s){const{resourceURI:o}=s;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return ge.MicrosoftGraphID}}async getAccessToken(e,s){const o=e===void 0?ge.MicrosoftGraphID:await ge.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=oe.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,s)}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 rn={id:"github",title:"GitHub",icon:()=>null};class gn{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=rn,oauthRequestApi:b,defaultScopes:C=["read:user"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:C})}}const on={id:"okta",title:"Okta",icon:()=>null},qe=new Set(["openid","profile","email","phone","address","groups","offline_access"]),De="okta.";class Ke{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=on,oauthRequestApi:b,defaultScopes:C=["openid","email","profile","offline_access"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:C,scopeTransform(I){return I.map(K=>qe.has(K)||K.startsWith(De)?K:`${De}${K}`)}})}}const ze={id:"gitlab",title:"GitLab",icon:()=>null};class an{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=ze,oauthRequestApi:b,defaultScopes:C=["read_user"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:C})}}const ye={id:"onelogin",title:"onelogin",icon:()=>null},He=new Set(["openid","profile","email","phone","address","groups","offline_access"]),ke="onelogin.";class Qe{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=ye,oauthRequestApi:b}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(C){return C.map(I=>He.has(I)||I.startsWith(ke)?I:`${ke}${I}`)}})}}const je={id:"bitbucket",title:"Bitbucket",icon:()=>null};class ve{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=je,oauthRequestApi:b,defaultScopes:C=["account"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:C})}}const w={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class l{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=w,oauthRequestApi:b,defaultScopes:C=["PROJECT_ADMIN"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:C})}}const E={id:"atlassian",title:"Atlassian",icon:()=>null};class R{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=E,oauthRequestApi:b}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i})}}const q={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class ct{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:b=q,defaultScopes:C=["openid"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:b,environment:c,defaultScopes:C})}}var tt=t(12935),Tt=t(57405),wt=t(65461),zt=t(36017),ie=t(99303),Le=t(39837);const Yt=(0,Lt.y)({id:"core.storage"});var me=t(70795),Ee=t(16009);const se=(0,Lt.y)({id:"core.oauthrequest"});var tn=t(96824),Ve=t(70835),ue=t(10288),cn=t.n(ue),rs=t(20938),Qt=t(46195),en=t(54241);const pn=Qt.z.lazy(()=>Qt.z.object({rule:Qt.z.string(),resourceType:Qt.z.string(),params:Qt.z.record(Qt.z.any()).optional()}).or(Qt.z.object({anyOf:Qt.z.array(pn).nonempty()})).or(Qt.z.object({allOf:Qt.z.array(pn).nonempty()})).or(Qt.z.object({not:pn}))),Ks=Qt.z.object({result:Qt.z.literal(en.b.ALLOW).or(Qt.z.literal(en.b.DENY))}),os=Qt.z.union([Qt.z.object({result:Qt.z.literal(en.b.ALLOW).or(Qt.z.literal(en.b.DENY))}),Qt.z.object({result:Qt.z.literal(en.b.CONDITIONAL),pluginId:Qt.z.string(),resourceType:Qt.z.string(),conditions:pn})]),as=(r,e)=>Qt.z.object({items:Qt.z.array(Qt.z.intersection(Qt.z.object({id:Qt.z.string()}),r)).refine(s=>s.length===e.size&&s.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class is{enabled;discovery;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1}async authorize(e,s){return this.makeRequest(e,Ks,s)}async authorizeConditional(e,s){return this.makeRequest(e,os,s)}async makeRequest(e,s,o){if(!this.enabled)return e.map(_=>({result:en.b.ALLOW}));const i={items:e.map(_=>({id:rs.A(),..._}))},c=await this.discovery.getBaseUrl("permission"),b=await cn()(`${c}/authorize`,{method:"POST",body:JSON.stringify(i),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!b.ok)throw await Ve.o.fromResponse(b);const C=await b.json(),K=as(s,new Set(i.items.map(({id:_})=>_))).parse(C).items.reduce((_,gt)=>(_[gt.id]=gt,_),{});return i.items.map(_=>K[_.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class Cn{permissionClient;identityApi;constructor(e,s){this.permissionClient=e,this.identityApi=s}static create(e){const{config:s,discovery:o,identity:i}=e,c=new is({discovery:o,config:s});return new Cn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const Ln=[(0,tt.b)({api:Tt.I,deps:{configApi:wt.U},factory:({configApi:r})=>F.fromConfig(r)}),(0,tt.b)({api:zt.k,deps:{},factory:()=>new Z}),(0,tt.b)({api:ie.c,deps:{},factory:()=>new G}),(0,tt.b)({api:Le.m,deps:{alertApi:zt.k},factory:({alertApi:r})=>{const e=new at(r,new pt);return Et.forward(e,{hidden:!1}),e}}),(0,tt.b)({api:Yt,deps:{errorApi:Le.m},factory:({errorApi:r})=>At.create({errorApi:r})}),(0,tt.b)({api:me.a,deps:{configApi:wt.U,identityApi:Ee.K,discoveryApi:Tt.I},factory:({configApi:r,identityApi:e,discoveryApi:s})=>Dt({middleware:[it.resolvePluginProtocol({discoveryApi:s}),it.injectIdentityAuth({identityApi:e,config:r})]})}),(0,tt.b)({api:se,deps:{},factory:()=>new ht}),(0,tt.b)({api:Nt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Ye.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:jt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ge.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:Wt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>gn.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:Kt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Ke.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:te,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>an.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:kt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Qe.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:ee,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ve.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:fe,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>l.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:Gt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>R.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:ne,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ct.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:tn.x,deps:{discovery:Tt.I,identity:Ee.K,config:wt.U},factory:({config:r,discovery:e,identity:s})=>Cn.create({config:r,discovery:e,identity:s})})];var Mn=t(14451),cs=t(27799),Bn=t(94389),jn=t(20947),ls=t(20473),Un=t(45917),fn=t(39347),ds=t(63309),us=t(82451),hs=t(85121),$n=t(17400),gs=t(42226),ps=t(69550),Fn=t(52755),Nn=t(89350),fs=t(8911),bn=t(33602),Sn=t(48108),ms=t(77225),kn=t(55700),Wn=t(71865),ys=t(80109),vs=t(15303),Es=t(39330);const As={brokenImage:cs.A,catalog:fs.A,scaffolder:jn.A,techdocs:ls.A,search:Un.A,chat:fn.A,dashboard:ds.A,docs:us.A,email:hs.A,github:gs.A,group:bn.A,help:ps.A,"kind:api":$n.A,"kind:component":Nn.A,"kind:domain":Mn.A,"kind:group":bn.A,"kind:location":Fn.A,"kind:system":Bn.A,"kind:user":Sn.A,"kind:resource":kn.A,"kind:template":Wn.A,user:Sn.A,warning:ms.A,star:ys.A,unstarred:vs.A,externalLink:Es.A};var xs=t(58733),Cs=t(55288),bs=t(91360),Ss=t(50868),Os=t(12285),Kn=t(87271),Ps=t(64636);Ps.A.configure(r=>`v5-${r}`);const Ts=(0,Cs.A)({productionPrefix:"jss4-"});function zn(r){const{children:e,theme:s,noCssBaseline:o=!1}=r,i=s.getTheme("v4"),c=s.getTheme("v5");let b;o||(b=(0,a.jsx)(xs.Ay,{}));let C=(0,a.jsxs)(a.Fragment,{children:[b,e]});return i&&(C=(0,a.jsx)(bs.Ay,{generateClassName:Ts,children:(0,a.jsx)(Ss.A,{theme:i,children:C})})),c&&(C=(0,a.jsx)(Os.A,{injectFirst:!0,children:(0,a.jsx)(Kn.A,{theme:c,children:C})})),C}const Hn={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 On=t(98392),ws=t(17161);const we={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")`},Ue={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 $e(r){const{colors:e,shape:s,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,b=`${s}, ${c}`,C=o?.fontColor??"#FFFFFF";return{colors:e,shape:s,backgroundImage:b,fontColor:C}}const Rs={home:$e({colors:Ue.teal,shape:we.wave}),documentation:$e({colors:Ue.pinkSea,shape:we.wave2}),tool:$e({colors:Ue.purpleSky,shape:we.round}),service:$e({colors:Ue.marineBlue,shape:we.wave}),website:$e({colors:Ue.veryBlue,shape:we.wave}),library:$e({colors:Ue.rubyRed,shape:we.wave}),other:$e({colors:Ue.darkGrey,shape:we.wave}),app:$e({colors:Ue.toastyOrange,shape:we.wave}),apis:$e({colors:Ue.teal,shape:we.wave2}),card:$e({colors:Ue.greens,shape:we.wave})},Is=16,f='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',D="home",U={htmlFontSize:Is,fontFamily:f,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 N(r){const{palette:e,htmlFontSize:s=Is,fontFamily:o=f,defaultPageTheme:i=D,pageTheme:c=Rs,typography:b}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return U.htmlFontSize=s,U.fontFamily=o,{palette:e,typography:b??U,page:c[i],getPageTheme:({themeId:C})=>c[C]??c[i]}}var k=t(80012);const X={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,k.a)(r.palette.textVerySubtle,.2):(0,k.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,k.a)(r.palette.textVerySubtle,.2):(0,k.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,k.e$)(r.palette.link,.3),background:(0,k.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"},"&.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"}}}},st=r=>(...e)=>{const s=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return s.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function St(r,e){if(!e||typeof e=="string")return;const s=typeof e=="function"?e(r):e;if(s)return{"@global":s}}function Rt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const s={...r},o=r.spacing(1);return typeof o=="number"&&(s.spacing=st(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:s})]:[i,c]))}return e}}const $t=/^&.Mui-([\w-]+)$/;function Bt(r){let e=r;if(!r||typeof r!="object")return e;for(const s of Object.keys(r)){const o=r[s];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,b=c.match($t);if(b){const[,C]=b,{[c]:I,...K}=o;I&&(e={...e,[s]:K,[C]:I})}}}return e}function Ft(r,e={}){const s={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?s[i]=St(r,c.styleOverrides):s[i]=Bt(Rt(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:s,props:o}}class Xt{#t=new Map;constructor(e,s){this.#t=new Map,e&&this.#t.set("v4",e),s&&this.#t.set("v5",s)}getTheme(e){return this.#t.get(e)}}function he(r){const e=N(r),s={...X,...r.components},o=(0,ws.A)({...e,components:s}),i=Ft(o,s),c={...(0,On.A)(e),...i};return new Xt(c,o)}function Ht(r){const e=adaptV4Theme(r),s=createTheme(r);return new Xt(s,createV5Theme(e))}const _t={light:he({palette:Hn.light}),dark:he({palette:Hn.dark})};var Ae=t(75962),re=t(87145);const Zt=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(re.A,{}),Provider:({children:r})=>(0,a.jsx)(zn,{theme:_t.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(Ae.A,{}),Provider:({children:r})=>(0,a.jsx)(zn,{theme:_t.dark,children:r})}];var Jt=t(73466),Se=t(39067),qt=t.n(Se);class ce{holders;constructor(...e){this.holders=e}get(e){for(const s of this.holders){const o=s.get(e);if(o)return o}}}var le=t(43836),Fe=t(10602);const Me=(0,le.tK)("api-context"),nn=r=>{const{apis:e,children:s}=r,o=(0,d.useContext)(Me)?.atVersion(1),i=o?new ce(e,o):e;return(0,a.jsx)(Me.Provider,{value:(0,Fe.B)({1:i}),children:s})};nn.propTypes={apis:qt().shape({get:qt().func.isRequired}).isRequired,children:qt().node};const ln=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function pe(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Vn(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Vn):Object.fromEntries(Object.entries(r).map(([e,s])=>[e,Vn(s)]))}function dn(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:dn(e);if(typeof r!="object"||Array.isArray(r))return r;const s=pe(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(s)])){const c=dn(r[i],s[i]);c!==void 0&&(o[i]=c)}return o}function Ds(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 Ne={type(r,e,s,o){return`Invalid type in config for key '${r}' in '${e}', got ${s}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,s){return`Unable to convert config value for key '${r}' in '${e}' to a ${s}`}};class mn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new mn(void 0):e.reduce((s,{data:o,context:i,filteredKeys:c,deprecatedKeys:b})=>{const C=new mn(o,i,s);if(C.filteredKeys=c,b)for(const{key:I,description:K}of b)console.warn(`The configuration key '${I}' of ${i} is deprecated and may be removed soon. ${K||""}`);return C},void 0)}constructor(e,s="mock-config",o,i=""){this.data=e,this.context=s,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const s=this.readValue(e);return s===null?!1:s!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],s=this.fallback?.keys()??[];return[...new Set([...e,...s])].filter(o=>this.data?.[o]!==null)}get(e){const s=this.getOptional(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e??""),this.context));return s}getOptional(e){const s=Vn(this.readValue(e)),o=this.fallback?.getOptional(e);if(s!==null)return s===void 0?dn(o):o===void 0?dn(s):dn(s,o)}getConfig(e){const s=this.getOptionalConfig(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalConfig(e){const s=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(pe(s))return this.copy(s,e,o);if(s!==null){if(s!==void 0)throw new TypeError(Ne.type(this.fullKey(e),this.context,Ds(s),"object"));return o}}getConfigArray(e){const s=this.getOptionalConfigArray(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalConfigArray(e){const s=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!pe(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(s)return s.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const s=this.getOptionalNumber(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalNumber(e){const s=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof s=="number"||s===void 0)return s;const o=Number(s);if(!Number.isFinite(o))throw new Error(Ne.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const s=this.getOptionalBoolean(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalBoolean(e){const s=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof s=="boolean"||s===void 0)return s;const o=String(s).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(Ne.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const s=this.getOptionalString(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalString(e){return this.readConfigValue(e,s=>typeof s=="string"&&s!==""||{expected:"string"})}getStringArray(e){const s=this.getOptionalStringArray(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalStringArray(e){return this.readConfigValue(e,s=>{if(!Array.isArray(s))return{expected:"string-array"};for(const[o,i]of s.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,s,o){const i=new mn(e,this.context,o,this.fullKey(s));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,s){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,s);if(o===null)return;const i=s(o);if(i!==!0){const{key:c=e,value:b=o,expected:C}=i;throw new TypeError(Ne.type(this.fullKey(c),this.context,Ds(b),C))}return o}readValue(e){const s=e?e.split("."):[];for(const i of s)if(!ln.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of s.entries())if(pe(o))o=o[c];else if(o!=null){const b=this.fullKey(s.slice(0,i).join("."));throw new TypeError(Ne.type(b,this.context,Ds(o),"object"))}return o}}const Pn="theme";class Gn{themes;static createWithStorage(e){const s=new Gn(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Pn)??void 0;return s.setActiveThemeId(o),s.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(Pn,i):window.localStorage.removeItem(Pn)}),window.addEventListener("storage",i=>{if(i.key===Pn){const c=localStorage.getItem(Pn)??void 0;s.setActiveThemeId(c)}}),s}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new W(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 yn=t(63636);function zs(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 Fr{registeredFeatureFlags=[];flags;registerFlag(e){zs(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===yn.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 s=Array.from(this.flags.entries()).filter(([,o])=>o===yn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const s=JSON.parse(e);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const o=Object.entries(s).filter(([i,c])=>(zs(i),c===yn.S.Active));return new Map(o)}catch{return new Map}}}const Yn=(0,Lt.y)({id:"core.apptheme"}),Hs=(0,Lt.y)({id:"core.applanguage"});var Nr=t(56038),Vs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Vs||{});class kr{factories=new Map;register(e,s){const o=Vs[e],i=this.factories.get(s.api.id);return i&&i.priority>=o?!1:(this.factories.set(s.api.id,{priority:o,factory:s}),!0)}get(e){const s=this.factories.get(e.id);if(s)return s.factory}getAllApis(){const e=new Set;for(const{factory:s}of this.factories.values())e.add(s.api);return e}}class Ls{factories;static validateFactories(e,s){for(const o of s){const i=[o],c=new Set;for(;i.length;){const b=i.shift(),C=e.get(b);if(C)for(const I of Object.values(C.deps)){if(I.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(I)||(c.add(I),i.push(I))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,s=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(s.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...s,i.api]),b=i.factory(c);return this.apis.set(e.id,b),b}loadDeps(e,s,o){const i={};for(const c in s)if(s.hasOwnProperty(c)){const b=s[c],C=this.load(b,o);if(!C)throw new Error(`No API factory available for dependency ${b} of dependent ${e}`);i[c]=C}return i}}function Wr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const s=[{node:d.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;s.length!==0;){const{node:o,parent:i,contexts:c}=s.shift();d.Children.forEach(o,b=>{if(!(0,d.isValidElement)(b))return;const C={};for(const I in e)if(e.hasOwnProperty(I)){const K=e[I];C[I]=K.visit(K.accumulator,b,i,c[I])}for(const I of r.discoverers){const K=I(b);K&&s.push({node:K,parent:b,contexts:C})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Qn(r,e){return()=>({accumulator:r(),visit:e})}function Kr(r){return r.props?.children}function zr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Oe=t(19402);const Hr=Qn(()=>new Set,(r,e)=>{const s=(0,Oe.E)(e,"core.plugin");s&&r.add(s)});var Tn=t(72427);const Gs=r=>{const{children:e}=r,s=(0,Tn.gf)(yn.B),o="with"in r?s.isActive(r.with):!s.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Oe.h)(Gs,"core.featureFlagged",!0);const Zn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Jn(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Ys=r=>{const e=new Set;return r&&e.add(r),e};function Qs(r,e=new Array){return d.Children.forEach(r,s=>{if(!(0,d.isValidElement)(s))return;const o=(0,Oe.E)(s,"core.mountPoint");if(o){const i=(0,Oe.E)(s,"core.plugin");e.push({routeRef:o,plugin:i})}Qs(s.props.children,e)}),e}const Vr=Qn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(o?.isElementAncestor)return o;if(s?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,Oe.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${Jn(e)}"`);const b=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${Jn(e)}"`);const C=i.startsWith("/")?i.slice(1):i,I=e.props.element;if((0,Oe.E)(e,"core.gatherMountPoints")){if(I)throw new Error(`Mount point gatherers may not have an element prop "${Jn(e)}"`);const K={path:C,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Zn],plugins:new Set};return b.push(K),{obj:K,gatherPath:C,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(I){const[K,..._]=Qs(I);if(_.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!K)return o;const{routeRef:gt,plugin:ot}=K,vt={path:C,element:"mounted",routeRefs:new Set([gt]),caseSensitive:!!e.props?.caseSensitive,children:[Zn],plugins:Ys(ot)};return b.push(vt),r.paths.set(gt,C),r.parents.set(gt,o?.routeRef),{obj:vt,routeRef:gt??o?.routeRef,gatherPath:C,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${Jn(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const C=(0,Oe.E)(e,"core.plugin");return C&&o?.obj?.plugins.add(C),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Gr=Qn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(s?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,b=o?.sticky;const C=e.props?.path,I=i?.children??r.objects,K=!!e.props?.caseSensitive;let _=o?.path;if((0,Oe.E)(e,"core.gatherMountPoints")){if(!C)throw new Error("Mount point gatherer must have a path");_=C}const gt=e.props?.element;let ot=(0,Oe.E)(e,"core.mountPoint");if(!ot&&(0,d.isValidElement)(gt)&&(ot=(0,Oe.E)(gt,"core.mountPoint")),ot){let Mt=C;if(_&&(Mt?_=void 0:Mt=_),!Mt)throw new Error("Mounted routable extension must have a path");r.paths.set(ot,Mt),c&&b?(r.parents.set(ot,c),C&&(c=ot,b=!1)):(r.parents.set(ot,c),c=ot),C?(i={caseSensitive:K,path:C,element:"mounted",routeRefs:new Set([ot]),children:[Zn],plugins:Ys((0,Oe.E)(e.props.element,"core.plugin"))},I.push(i)):i?.routeRefs.add(ot)}if((0,Oe.E)(e,"core.gatherMountPoints")&&(b=!0),(0,Oe.E)(e,"core.gatherMountPoints")){if(!C)throw new Error("Mount point gatherer must have a path");ot||(i={caseSensitive:K,path:C,element:"gathered",routeRefs:new Set,children:[Zn],plugins:o?.obj?.plugins||new Set},I.push(i))}return{obj:i,path:_,routeRef:c,sticky:b}}),Yr=Qn(()=>new Set,(r,e)=>{if(e.type===Gs){const s=e.props;r.add("with"in s?s.with:s.without)}});var wn=t(21613),Qr=t(63544);const Rn=(0,Qr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Zs(r){return r[Rn]==="absolute"}function Js(r){return r[Rn]==="sub"}function Zr(r){return r[Rn]==="external"}function Xn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Jr=t(46155),Xr=t.n(Jr);function _r(r,e,s){let o,i="";if(Zs(r))o=r;else if(Js(r))o=r.parent,i=r.path;else if(Zr(r)){const C=s.get(r);if(!C)return[void 0,""];if(Zs(C))o=C;else if(Js(C))o=C.parent,i=C.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${C}`)}else throw r[Rn]?new Error(`Unknown or invalid route ref type, ${r[Rn]}`):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 b=Xn(c,i);return[o,b]}function qr(r,e,s,o,i){const c=(0,wn.ue)(i,e)??[],b=Array();let C=-1;for(let _=r;_&&(C=c.findIndex(gt=>gt.route.routeRefs.has(_)),C===-1);_=o.get(_))b.unshift(_);b.length===0&&(C-=1);const I=C===-1?"":c[C].pathname,K=b.slice(0,-1).map(_=>{const gt=s.get(_);if(gt===void 0)throw new Error(`No path for ${_}`);if(gt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${_} as it has parameters`);return gt});return`${Xn(I,...K)}/`}class to{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,s,o,i,c){this.routePaths=e,this.routeParents=s,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,s){const[o,i]=_r(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof s=="string"?c=this.trimPath(s):s.pathname?c={...s,pathname:this.trimPath(s.pathname)}:c=s;const b=this.appBasePath+qr(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[I])=>{const K=I&&Xr()(I,_=>typeof _=="string"?_.replaceAll(/[&?#;\/]/g,gt=>encodeURIComponent(gt)):_);return Xn(b,(0,wn.tW)(i,K))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const eo=(0,le.tK)("routing-context"),no=({routePaths:r,routeParents:e,routeObjects:s,routeBindings:o,basePath:i="",children:c})=>{const b=new to(r,e,s,o,i),C=(0,Fe.B)({1:b});return(0,a.jsx)(eo.Provider,{value:C,children:c})};function so(r,e){const s=new Set(e.values());s.delete(void 0);for(const o of e.keys()){if(s.has(o))continue;let i=o,c="";for(;i;){const C=r.get(i);if(C===void 0)throw new Error(`No path for ${i}`);c=Xn(C,c),i=e.get(i)}const b=c.match(/:(\w+)/g);if(b){for(let C=0;C<b.length;C++)for(let I=C+1;I<b.length;I++)if(b[I]===b[C])throw new Error(`Parameter ${b[I]} is duplicated in path ${c}`)}}}function ro(r,e){for(const s of e)if(s.externalRoutes){for(const[o,i]of Object.entries(s.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${s.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const oo=(0,le.tK)("app-context"),ao=({appContext:r,children:e})=>{const s=(0,Fe.B)({1:r});return(0,a.jsx)(oo.Provider,{value:s,children:e})},Xs="app",io=`${Xs}-auth-cookie-expires-at`,co=5*6e4,_s=5e3,lo=2,uo=5*6e4;function ho({discoveryApi:r,fetchApi:e,errorApi:s}){let o=!1,i,c=!0,b=_s;const C="BroadcastChannel"in window?new BroadcastChannel(io):void 0,I=ot=>{const vt=(1+3*Math.random())*6e4;return Math.max(ot-Date.now(),co)-vt},K=async()=>{try{const vt=`${await r.getBaseUrl(Xs)}/.backstage/auth/v1/cookie`,Mt=await e.fetch(vt,{credentials:"include"});if(!Mt.ok)throw new Error(`Request failed with status ${Mt.status} ${Mt.statusText}, see request towards ${vt} for more details`);const Vt=await Mt.json();if(!Vt.expiresAt)throw new Error("No expiration date in response");const Te=Date.parse(Vt.expiresAt);if(Number.isNaN(Te))throw new Error("Invalid expiration date in response");c=!0,C?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Te).toISOString()}}),gt(I(Te))}catch(ot){c?(c=!1,b=_s):(b=Math.min(uo,b*lo),console.error("Session cookie refresh failed",ot),s.post(new Error("Session refresh failed, see developer console for details"))),gt(b)}},_=ot=>{const{data:vt}=ot;if(!(vt===null||typeof vt!="object")&&"action"in vt&&vt.action==="COOKIE_REFRESH_SUCCESS"){const Mt=Date.parse(vt.payload.expiresAt);if(Number.isNaN(Mt)){console.warn("Received invalid expiration from session refresh channel");return}gt(I(Mt))}};function gt(ot){o||(i&&clearTimeout(i),i=setTimeout(K,ot))}return C?.addEventListener("message",_),K(),()=>{o=!0,i&&clearTimeout(i),C?.removeEventListener("message",_),C?.close()}}function qs(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Ms(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class go{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,s){this.target=e,this.signOutTargetUrl=s.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw qs("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ms("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw qs("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ms("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(s=>s.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 Ms("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 s=ho(e);this.#t=async()=>{s();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var po=t(1394);function fo(r,e,s){if(r!==void 0){const i=s.find(c=>c.id===r);if(i)return i}if(e){const i=s.find(c=>c.variant==="dark");if(i)return i}const o=s.find(i=>i.variant==="light");return o||s[0]}const mo=()=>{const r=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,s]=(0,d.useState)(r.matches);return(0,d.useEffect)(()=>{const o=i=>{s(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function tr({children:r}){const e=(0,Tn.gf)(Yn),s=(0,po.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?mo():!1,i=fo(s,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const er=async()=>yo();function yo(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,s=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(s){if(!Array.isArray(s))throw new Error("Static configuration has invalid format");e.push(...s)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const b=c.textContent;if(!b)throw new Error("tag is empty");let C;try{C=JSON.parse(b)}catch(I){throw new Error(`failed to parse config; ${I}`)}if(!Array.isArray(C))throw new Error("data is not an array");e.push(...C)}catch(b){throw new Error(`Failed to load config from script tag, ${b.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 vo{apis=[];add(e,s){return this.apis.push([e.id,s]),s}build(){return new vn(new Map(this.apis))}}class vn{apis;static builder(){return new vo}static from(e){return new vn(new Map(e.map(([s,o])=>[s.id,o])))}static with(e,s){return new vn(new Map([[e.id,s]]))}constructor(e){this.apis=e}with(e,s){return new vn(new Map([...this.apis,[e.id,s]]))}get(e){return this.apis.get(e.id)}}function Eo(r){const e=new Map,s=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const b=`${o.getId()}.${i}`;if(e.has(b))throw new Error(`Unexpected duplicate route '${b}'`);e.set(b,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const b=`${o.getId()}.${i}`;if(s.has(b))throw new Error(`Unexpected duplicate external route '${b}'`);s.set(b,c)}}return{routes:e,externalRoutes:s}}function Ao(r,e,s){const o=Eo(s),i=new Map,c=new Set;r&&r({bind:(I,K)=>{for(const[_,gt]of Object.entries(K)){const ot=I[_];if(!ot)throw new Error(`Key ${_} is not an existing external route`);if(!gt&&!ot.optional)throw new Error(`External route ${_} is required but was ${gt===!1?"disabled":"not provided"}`);gt?i.set(ot,gt):gt===!1&&c.add(ot)}}});const b=e.getOptionalConfig("app.routes.bindings")?.get();if(b)for(const[C,I]of Object.entries(b)){if(!xo(I))throw new Error(`Invalid config at app.routes.bindings['${C}'], value must be a non-empty string or false`);const K=o.externalRoutes.get(C);if(!K)throw new Error(`Invalid config at app.routes.bindings, '${C}' is not a valid external route`);if(!(i.has(K)||c.has(K)))if(I===!1)c.add(K);else{const _=o.routes.get(I);if(!_)throw new Error(`Invalid config at app.routes.bindings['${C}'], '${I}' is not a valid route`);i.set(K,_)}}for(const C of o.externalRoutes.values())if(!i.has(C)&&!c.has(C)){const I="getDefaultTarget"in C?C.getDefaultTarget():void 0;if(I){const K=o.routes.get(I);K&&i.set(C,K)}}return i}function xo(r){return!!(r===!1||typeof r=="string"&&r)}function In(){const[r]=(0,m.AV)((0,a.jsx)(m.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const nr=(0,d.createContext)(void 0);var sr=t(82266),rr=t(93368),Co=t(25862);const bo=(r,e)=>{try{const o=(0,wn.ue)(e,{pathname:r})?.filter(I=>I?.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 b;i.plugins.size===1&&(b=i.plugins.values().next().value);const C=Object.entries(o?.params||{}).reduce((I,[K,_])=>(_!==void 0&&K!=="*"&&(I[K]=_),I),{});return{extension:"App",pluginId:b?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:C}}catch{return}},So=({pathname:r,search:e,hash:s,attributes:o})=>{const i=(0,rr.s)();return(0,d.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${s}`,{attributes:o})},[i,r,e,s,o]),null},_n=({routeObjects:r})=>{const{pathname:e,search:s,hash:o}=(0,m.zy)(),{params:i,...c}=bo(e,r)||{params:{}};return(0,a.jsx)(Co.Ig,{attributes:c,children:(0,a.jsx)(So,{pathname:e,search:s,hash:o,attributes:i})})};function Oo(r){return In()?Bs(r):""}function Bs(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function or({component:r,appIdentityProxy:e,children:s}){const[o,i]=(0,d.useState)(),c=(0,Tn.gf)(wt.U),b=Bs(c);return o?(e.setTarget(o,{signOutTargetUrl:b||"/"}),(0,a.jsx)(a.Fragment,{children:s})):(0,a.jsx)(r,{onSignInSuccess:i})}function ar(r){const{Router:e,SignInPage:s}=(0,sr.n)().getComponents(),o=(0,Tn.gf)(wt.U),i=Bs(o),c=`${i}/*`,b=(0,d.useContext)(nr);if(!b)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:C,appIdentityProxy:I}=b;return s?In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(_n,{routeObjects:C}),(0,a.jsx)(or,{component:s,appIdentityProxy:I,children:(0,a.jsx)(m.BV,{children:(0,a.jsx)(m.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(_n,{routeObjects:C}),(0,a.jsx)(or,{component:s,appIdentityProxy:I,children:r.children})]}):(I.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)(_n,{routeObjects:C}),(0,a.jsx)(m.BV,{children:(0,a.jsx)(m.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(_n,{routeObjects:C}),r.children]}))}(0,Oe.h)(ar,"core.type","AppRouter");const Dn="language",Ze="en";class qn{static create(e){const s=e?.availableLanguages??[Ze];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ze))throw new Error(`Supported languages must include '${Ze}'`);const o=e?.defaultLanguage??Ze;if(!s.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new qn(s,o)}static createWithStorage(e){const s=qn.create(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Dn),{languages:i}=s.getAvailableLanguages();return o&&i.includes(o)&&s.setLanguage(o),s.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Dn)&&window.localStorage.setItem(Dn,c)}),window.addEventListener("storage",c=>{if(c.key===Dn){const b=localStorage.getItem(Dn)??void 0;b&&s.setLanguage(b)}}),s}#t;#e;#n;constructor(e,s){this.#t=e,this.#e=s,this.#n=new W({language:this.#e})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const s=e??Ze;if(s!==this.#e){if(s&&!this.#t.includes(s))throw new Error(`Failed to change language to '${s}', available languages are '${this.#t.join("', '")}'`);this.#e=s,this.#n.next({language:s})}}getLanguage(){return{language:this.#e}}language$(){return this.#n}}var Po=t(47304),To=t(99833),ir=t(93184);function cr(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class wo{onLoad;#t;#e;#n;constructor(e){this.onLoad=e,this.#t=new Set,this.#e=new Map,this.#n=new Map}addTranslationResource(e){const s=(0,To.Y)(e);for(const o of s.resources){const i=this.#s(o.language,s.id);this.#n.has(i)||this.#n.set(i,o.loader)}}#s(e,s){return`${e}/${s}`}needsLoading(e,s){const o=this.#s(e,s);return this.#n.get(o)?!this.#t.has(o):!1}async load(e,s){const o=this.#s(e,s),i=this.#n.get(o);if(!i||this.#t.has(o))return;const c=this.#e.get(o);if(c){await c;return}const b=i().then(C=>{this.onLoad({language:e,namespace:s,messages:C.messages}),this.#t.add(o)},C=>{throw this.#t.add(o),C});this.#e.set(o,b),await b}}class js{static create(e){const{languages:s}=e.languageApi.getAvailableLanguages(),o=(0,Po.Q_)({fallbackLng:Ze,supportedLngs:s,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:i}=e.languageApi.getLanguage();i!==Ze&&o.changeLanguage(i);const c=new wo(I=>{o.addResourceBundle(I.language,I.namespace,cr(I.messages),!1,!0)}),b=e?.resources||[];for(let I=b.length-1;I>=0;I--){const K=b[I];K.$$type==="@backstage/TranslationResource"?c.addTranslationResource(K):K.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Ze,K.id,cr(K.messages),!0,!1)}const C=new js(o,c,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:I})=>{C.#o(I)}),C}#t;#e;#n;#s=new Set;#r=new Set;constructor(e,s,o){this.#t=e,this.#e=s,this.#n=o}getTranslation(e){const s=(0,ir.v)(e);return this.#i(s),this.#a(s)}translation$(e){const s=(0,ir.v)(e);return this.#i(s),new(Y())(o=>{let i={};const c=()=>{i={};const C=i;this.#e.load(this.#n,s.id).then(()=>{if(C===i){const I=this.#a(s);I.ready&&o.next(I)}},I=>{C===i&&o.error(Array.isArray(I)?I[0]:I)})},b=()=>{const C=this.#a(s);C.ready?o.next(C):c()};return this.#e.needsLoading(this.#n,s.id)&&c(),this.#r.add(b),()=>{this.#r.delete(b)}})}#o(e){this.#n!==e&&(this.#n=e,this.#t.changeLanguage(e),this.#r.forEach(s=>s()))}#a(e){return this.#e.needsLoading(this.#n,e.id)?{ready:!1}:{ready:!0,t:this.#t.getFixedT(null,e.id)}}#i(e){if(this.#s.has(e.id))return;this.#s.add(e.id);const s=e.getDefaultMessages();this.#t.addResourceBundle(Ze,e.id,s,!0,!1);const o=e.getDefaultResource();o&&this.#e.addTranslationResource(o)}}function lr(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 Ro(r){const e=mn.fromConfigs(r),s=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,b;if(s&&o){const C=new URL(s).origin,I=new URL(o).origin;if(C===I){const K=lr(o);o!==K&&(c=K)}}if(s){const C=lr(s);s!==C&&(b=C)}return(b||c)&&(i=i.concat({data:{app:b&&{baseUrl:b},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Io(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Do(r,e,s){const o=!!r,i=(0,Jt.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:I}=e;c=(0,a.jsx)(I,{})}else if(i.error){const{BootErrorPage:I}=e;c=(0,a.jsx)(I,{step:"load-config",error:i.error})}const{ThemeProvider:b=tr}=e;return c?{node:(0,a.jsx)(nn,{apis:vn.with(Yn,s),children:(0,a.jsx)(b,{children:c})})}:{api:mn.fromConfigs(i.value?.length?Ro(i.value):[])}}class Lo{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 Mo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new go;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??er,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new kr,this.appLanguageApi=qn.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 s=this.getProvider();return()=>(0,a.jsx)(s,{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 Lo(this);let s,o;return({children:c})=>{const b=(0,d.useRef)(!0),C=(0,d.useMemo)(()=>Gn.createWithStorage(this.themes),[]),{routing:I,featureFlags:K}=(0,d.useMemo)(()=>{const Vt=In();Vt&&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"}},alertDisplay:{message_one:"({{ count }} older message)",message_other:"({{ count }} older 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:(V,S,t)=>{"use strict";t.d(S,{Ig:()=>u,pn:()=>h});var n=t(31085),a=t(43836),d=t(10602),x=t(14041);const m=(0,a.tK)("analytics-context"),h=()=>{const g=(0,x.useContext)(m);if(g===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const y=g.atVersion(1);if(y===void 0)throw new Error("No context found for version 1.");return y},u=g=>{const{attributes:y,children:A}=g,T={...h(),...y},P=(0,d.B)({1:T});return(0,n.jsx)(m.Provider,{value:P,children:A})};function p(g,y){const A=v=>_jsx(u,{attributes:y,children:_jsx(g,{...v})});return A.displayName=`WithAnalyticsContext(${g.displayName||g.name||"Component"})`,A}},67237:(V,S,t)=>{"use strict";t.d(S,{J:()=>x,t:()=>d});var n=t(63544);const a=(0,n.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),d="_ROUTABLE-EXTENSION-RENDERED";class x{analyticsApi;context;constructor(h,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=u,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,u,{value:p,attributes:g}={}){const{_routeNodeType:y,...A}=this.context;if(h===d){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...A,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(v){console.warn("Error during analytics event capture. %o",v)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&y==="gathered"&&A.pluginId==="root"){a.mostRecentGatheredNavigation={action:h,subject:u,value:p,attributes:g,context:A};return}try{this.analyticsApi.captureEvent({action:h,subject:u,value:p,attributes:g,context:A})}catch(v){console.warn("Error during analytics event capture. %o",v)}}}},93368:(V,S,t)=>{"use strict";t.d(S,{s:()=>u});var n=t(25862),a=t(72427),d=t(99303),x=t(14041),m=t(67237);function h(){try{return(0,a.gf)(d.c)}catch{return{captureEvent:()=>{}}}}function u(){const p=(0,x.useRef)(null),g=(0,n.pn)(),y=h();function A(){return p.current===null&&(p.current=new m.J(y)),p.current}const v=A();return v.setContext(g),v}},36017:(V,S,t)=>{"use strict";t.d(S,{k:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.alert"})},99303:(V,S,t)=>{"use strict";t.d(S,{c:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.analytics"})},65461:(V,S,t)=>{"use strict";t.d(S,{U:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.config"})},57405:(V,S,t)=>{"use strict";t.d(S,{I:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.discovery"})},39837:(V,S,t)=>{"use strict";t.d(S,{m:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.error"})},63636:(V,S,t)=>{"use strict";t.d(S,{B:()=>d,S:()=>a});var n=t(55309),a=function(x){return x[x.None=0]="None",x[x.Active=1]="Active",x}({});const d=(0,n.y)({id:"core.featureflags"})},70795:(V,S,t)=>{"use strict";t.d(S,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.fetch"})},16009:(V,S,t)=>{"use strict";t.d(S,{K:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.identity"})},56038:(V,S,t)=>{"use strict";t.d(S,{J:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.translation"})},55309:(V,S,t)=>{"use strict";t.d(S,{y:()=>a});class n{config;constructor(x){if(this.config=x,!x.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 '${x.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(d){return new n(d)}},12935:(V,S,t)=>{"use strict";t.d(S,{b:()=>n});function n(a,d){return"id"in a?{api:a,deps:{},factory:()=>d}:a}},72427:(V,S,t)=>{"use strict";t.d(S,{Q2:()=>m,gf:()=>h});var n=t(31085),a=t(14041),d=t(43836),x=t(97142);function m(){const p=(0,d.qO)("api-context");if(!p)throw new x.EH("API context is not available");const g=p.atVersion(1);if(!g)throw new x.EH("ApiContext v1 not available");return g}function h(p){const y=m().get(p);if(!y)throw new x.EH(`No implementation available for ${p}`);return y}function u(p){return function(y){const A=T=>{const P=m(),L={};for(const O in p)if(p.hasOwnProperty(O)){const j=p[O],$=P.get(j);if(!$)throw new NotImplementedError(`No implementation available for ${j}`);L[O]=$}return _jsx(y,{...T,...L})},v=y.displayName||y.name||"Component";return A.displayName=`withApis(${v})`,A}}},82266:(V,S,t)=>{"use strict";t.d(S,{n:()=>a});var n=t(43836);const a=()=>{const d=(0,n.qO)("app-context");if(!d)throw new Error("App context is not available");const x=d.atVersion(1);if(!x)throw new Error("AppContext v1 not available");return x}},19402:(V,S,t)=>{"use strict";t.d(S,{E:()=>m,h:()=>x});var n=t(63544);const a=(0,n.Q)("component-data-store",()=>new WeakMap),d="__backstage_data";function x(h,u,p){const g=h;let y=g[d]??a.get(h);if(y||(y={map:new Map},Object.defineProperty(g,d,{enumerable:!1,configurable:!0,writable:!1,value:y}),a.set(h,y)),y.map.has(u)){const A=h.displayName||h.name;throw new Error(`Attempted to attach duplicate data "${u}" to component "${A}"`)}y.map.set(u,p)}function m(h,u){if(!h)return;const p=h.type;if(!p)return;const g=p[d]??a.get(p);if(g)return g.map.get(u)}},88758:(V,S,t)=>{"use strict";t.d(S,{NC:()=>v,zZ:()=>T,QJ:()=>A});var n=t(31085),a=t(14041),d=t(93368),x=t(25862),m=t(82266),h=t(9222),u=t(19402);class p extends a.Component{static getDerivedStateFromError(L){return{error:L}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:L}=this.state,{app:O,plugin:j}=this.props,{ErrorBoundaryFallback:$}=O.getComponents();return L?(0,n.jsx)($,{error:L,resetError:this.handleErrorReset,plugin:j}):this.props.children}}var g=t(67237),y=t(97142);function A(P){const{component:L,mountPoint:O,name:j}=P;return T({component:{lazy:()=>L().then($=>{const M=Q=>{const F=(0,d.s)();try{(0,h.S)(O)}catch(G){if(typeof G=="object"&&G!==null){const{message:H}=G;if(typeof H=="string"&&H.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${O} 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 G}return(0,a.useEffect)(()=>{F.captureEvent(g.t,"")},[F]),(0,n.jsx)($,{...Q})},J=j||$.displayName||$.name||"LazyComponent";return M.displayName=`RoutableExtension(${J})`,M})},data:{"core.mountPoint":O},name:j})}function v(P){const{component:L,name:O}=P;return T({component:L,name:O})}function T(P){const{data:L={},name:O}=P;O||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let j;if("lazy"in P.component){const M=P.component.lazy;j=(0,a.lazy)(()=>M().then(J=>({default:J}),J=>{const Q=O?` of the ${O} extension`:"";throw new y.HK(`Failed lazy loading${Q}, try to reload the page`,J)}))}else j=P.component.sync;const $=O||j.displayName||j.name||"Component";return{expose(M){const J=Q=>{const F=(0,m.n)(),{Progress:G}=F.getComponents(),H=L?.["core.mountPoint"];return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(G,{}),children:(0,n.jsx)(p,{app:F,plugin:M,children:(0,n.jsx)(x.Ig,{attributes:{pluginId:M.getId(),...O&&{extension:O},...H&&{routeRef:H.id}},children:(0,n.jsx)(j,{...Q})})})})};(0,u.h)(J,"core.plugin",M),(0,u.h)(J,"core.extensionName",O);for(const[Q,F]of Object.entries(L))(0,u.h)(J,Q,F);return J.displayName=`Extension(${$})`,J}}}},82442:(V,S,t)=>{"use strict";t.d(S,{O:()=>u});var n=t(14041),a=t(19402),d=t(72427),x=t(63636);function m(p,g,y,A){return n.Children.toArray(p).flatMap(v=>{if(!(0,n.isValidElement)(v))return[];if(v.type===n.Fragment)return m(v.props.children,g,y,A);if((0,a.E)(v,"core.featureFlagged")){const T=v.props;return("with"in T?g.isActive(T.with):!g.isActive(T.without))?m(v.props.children,g,y,A):[]}if(y===void 0||y(v))return[v];if(A)throw new Error(A);return m(v.props.children,g,y,A)})}class h{node;featureFlagsApi;constructor(g,y){this.node=g,this.featureFlagsApi=y}selectByComponentData(g){const y=m(this.node,this.featureFlagsApi,A=>(0,a.E)(A,g.key)!==void 0,g.withStrictError);return new h(y,this.featureFlagsApi)}findComponentData(g){return m(this.node,this.featureFlagsApi,A=>(0,a.E)(A,g.key)!==void 0).map(A=>(0,a.E)(A,g.key)).filter(A=>A!==void 0)}getElements(){return m(this.node,this.featureFlagsApi)}}function u(p,g,y=[]){const A=(0,d.gf)(x.B),v=new h(p,A);return(0,n.useMemo)(()=>g(v),[p,...y])}},9803:(V,S,t)=>{"use strict";t.d(S,{i:()=>a});class n{config;constructor(x){this.config=x}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(x){return x.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(d){return new n(d)}},34569:(V,S,t)=>{"use strict";t.d(S,{H:()=>d});var n=t(59598);class a{id;params;[x=n.b];constructor(h,u){this.id=h,this.params=u,this[x]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function d(m){return new a(m.id,m.params??[])}var x},59598:(V,S,t)=>{"use strict";t.d(S,{b:()=>a});var n=t(63544);const a=(0,n.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(V,S,t)=>{"use strict";t.d(S,{S:()=>x});var n=t(14041),a=t(18690),d=t(43836);function x(m){const{pathname:h}=(0,a.zy)(),u=(0,d.qO)("routing-context");if(!u)throw new Error("Routing context is not available");const p=u.atVersion(1),g=(0,n.useMemo)(()=>p&&p.resolve(m,{pathname:h}),[p,m,h]);if(!u)throw new Error("useRouteRef used outside of routing context");if(!p)throw new Error("RoutingContext v1 not available");const y="optional"in m&&m.optional;if(!g&&!y)throw new Error(`No path for ${m}`);return g}},93184:(V,S,t)=>{"use strict";t.d(S,{h:()=>x,v:()=>m});var n=t(99833);function a(h){const u=new Array;function p(g,y){for(const[A,v]of Object.entries(g))typeof v=="string"?u.push([y+A,v]):p(v,`${y}${A}.`)}return p(h,""),Object.fromEntries(u)}class d{#t;#e;#n;constructor(u){this.#t=u.id,this.#e=a(u.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#e}setDefaultResource(u){this.#n=u}getDefaultResource(){return this.#n}toString(){return`TranslationRef{id=${this.id}}`}}function x(h){const u=new d(h);return h.translations&&u.setDefaultResource((0,n.o)({ref:u,translations:h.translations})),u}function m(h){const u=h;if(u.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${u.$$type}'`);if(u.version!=="v1")throw new Error(`Invalid translation ref, bad version '${u.version}'`);return u}},99833:(V,S,t)=>{"use strict";t.d(S,{Y:()=>n,o:()=>a});function n(d){const x=d;if(x.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${x.$$type}'`);if(x.version!=="v1")throw new Error(`Invalid translation resource, bad version '${x.version}'`);return x}function a(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([x,m])=>({language:x,loader:()=>m().then(h=>{const u=h.default;return{messages:u?.$$type==="@backstage/TranslationMessages"?u.messages:u}})}))}}},87849:(V,S,t)=>{"use strict";t.d(S,{i:()=>h});var n=t(14041),a=t(72427),d=t(39837),x=t(56038);const m=new WeakSet,h=u=>{const p=(0,a.gf)(d.m),g=(0,a.gf)(x.J),[y,A]=(0,n.useState)(()=>g.getTranslation(u)),v=(0,n.useMemo)(()=>g.translation$(u),[g,u]),T=(0,n.useCallback)(L=>{if(!m.has(u)){const O=`Failed to load translation resource '${u.id}'; caused by ${L}`;console.error(O),p.post(new Error(O)),m.add(u)}},[p,u]);(0,n.useEffect)(()=>{const L=v.subscribe({next(O){O.ready&&A(O)},error(O){T(O)}});return()=>{L.unsubscribe()}},[v,T]);const P=(0,n.useRef)(!0);if((0,n.useEffect)(()=>{P.current?P.current=!1:A(g.getTranslation(u))},[g,u]),!y.ready)throw new Promise(L=>{const O=v.subscribe({next(j){j.ready&&(O.unsubscribe(),L())},error(j){O.unsubscribe(),T(j),L()}})});return{t:y.t}}},70835:(V,S,t)=>{"use strict";t.d(S,{o:()=>d});var n=t(59750);async function a(x){try{const m=await x.text();if(m){if(x.headers.get("content-type")?.startsWith("application/json"))try{const h=JSON.parse(m);if(h.error&&h.response)return h}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}, ${m}`},response:{statusCode:x.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}`},response:{statusCode:x.status}}}class d extends Error{response;body;cause;statusCode;statusText;static async fromResponse(m){const h=await a(m),u=h.response.statusCode||m.status,p=m.statusText,g=`Request failed with ${u} ${p}`,y=(0,n.cy)(h.error);return new d({message:g,response:m,data:h,cause:y,statusCode:u,statusText:p})}constructor(m){super(m.message),this.name="ResponseError",this.response=m.response,this.body=m.data,this.cause=m.cause,this.statusCode=m.statusCode,this.statusText=m.statusText}}},93007:(V,S,t)=>{"use strict";t.d(S,{b:()=>n});function n(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const x=d;return!(typeof x.name!="string"||x.name===""||typeof x.message!="string")}function a(d){if(typeof d!="object"||d===null||Array.isArray(d))throw new Error(`Encountered invalid error, not an object, got '${d}'`);const x=d;if(typeof x.name!="string"||x.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof x.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},97142:(V,S,t)=>{"use strict";t.d(S,{HK:()=>v,m_:()=>u,EH:()=>y});var n=t(93007),a=t(59750);class d extends Error{cause;constructor(P,L){let O=P;if(L!==void 0){const j=(0,a.M5)(L);O?O+=`; caused by ${j}`:O=`caused by ${j}`}super(O),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,n.b)(L)?L:void 0}}class x extends null{name="InputError"}class m extends null{name="AuthenticationError"}class h extends null{name="NotAllowedError"}class u extends d{name="NotFoundError"}class p extends null{name="ConflictError"}class g extends null{name="NotModifiedError"}class y extends d{name="NotImplementedError"}class A extends null{}class v extends d{constructor(P,L){super(P,L),this.name=(0,n.b)(L)?L.name:"Error"}}},59750:(V,S,t)=>{"use strict";t.d(S,{M5:()=>h,cy:()=>m});var n=t(69655),a=t.n(n),d=t(93007);function x(u,p){const y={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(u)};return p?.includeStack||(delete y.stack,y.cause&&typeof y.cause=="object"&&"stack"in y.cause&&delete y.cause.stack),y}function m(u){const p=(0,n.deserializeError)(u);return u.stack||(p.stack=void 0),p}function h(u){if((0,d.b)(u)){const p=String(u);return p!=="[object Object]"?p:`${u.name}: ${u.message}`}return`unknown error '${u}'`}},96726:(V,S,t)=>{"use strict";t.d(S,{L:()=>je,Y:()=>ve});var n=t(59869);const a="amazonaws.com";function d(w){const l=w.getOptionalString("endpoint"),E=w.getOptionalBoolean("s3ForcePathStyle")??!1;let R,q;if(l){try{const zt=new URL(l);R=zt.host,q=zt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(q!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else R=a;const ct=w.getOptionalString("accessKeyId"),tt=w.getOptionalString("secretAccessKey")?.trim(),Tt=w.getOptionalString("roleArn"),wt=w.getOptionalString("externalId");return{host:R,endpoint:l,s3ForcePathStyle:E,accessKeyId:ct,secretAccessKey:tt,roleArn:Tt,externalId:wt}}function x(w){const l=w.map(d);return l.some(E=>E.host===a)||l.push({host:a}),l}class m{integrationConfig;static factory=({config:l})=>{const E=x(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,n.oS)(E.map(R=>new m(R)),R=>R.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,n.ku)(l)}resolveEditUrl(l){return l}}const h="console.aws.amazon.com";function u(w){const l=w.getOptionalString("accessKeyId"),E=w.getOptionalString("secretAccessKey")?.trim(),R=w.getOptionalString("roleArn"),q=w.getOptionalString("externalId"),ct=w.getString("region");return{host:w.getOptionalString("host")||`${ct}.${h}`,accessKeyId:l,secretAccessKey:E,roleArn:R,externalId:q,region:ct}}function p(w){return w.map(u)}class g{integrationConfig;static factory=({config:l})=>{const E=p(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,n.oS)(E.map(R=>new g(R)),R=>R.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,n.ku)(l)}resolveEditUrl(l){const R=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!R)throw new Error("");const[,q]=R;return y(l,q,"edit")}}function y(w,l,E){const R=E==="edit"?"files/edit":E;return w.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${R}/`)}const A="GB";class v{static fromRepoUrl(l){const E=new URL(l);let R,q,ct;const tt=E.pathname.split("/").map(ie=>decodeURIComponent(ie));if(tt[2]==="_git"?(R=tt[1],q=ct=tt[3]):tt[3]==="_git"?(R=tt[1],q=tt[2],ct=tt[4]):tt[4]==="_git"&&(R=`${tt[1]}/${tt[2]}`,q=tt[3],ct=tt[5]),!R||!q||!ct)throw new Error("Azure URL must point to a git repository");const Tt=E.searchParams.get("path")??void 0;let wt;const zt=E.searchParams.get("version");if(zt){if(zt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");wt=zt.slice(2)}return new v(E.origin,R,q,ct,Tt,wt)}#t;#e;#n;#s;#r;#o;constructor(l,E,R,q,ct,tt){this.#t=l,this.#e=E,this.#n=R,this.#s=q,this.#r=ct,this.#o=tt}#a=(...l)=>{const E=new URL(this.#t);return E.pathname=l.map(R=>encodeURIComponent(R)).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.#r&&l.searchParams.set("path",this.#r),this.#o&&l.searchParams.set("version",A+this.#o),l.toString()}toFileUrl(){if(!this.#r)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.#r),this.#o&&l.searchParams.set("version",this.#o),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.#r&&l.searchParams.set("scopePath",this.#r),this.#o&&l.searchParams.set("version",this.#o),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.#o&&l.searchParams.set("searchCriteria.itemVersion.version",this.#o),l.toString()}getOwner(){return this.#e}getProject(){return this.#n}getRepo(){return this.#s}getPath(){return this.#r}getRef(){return this.#o}}const T="dev.azure.com",P=["clientId","clientSecret","tenantId","personalAccessToken"],L=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function O(w){for(const l of L.entries()){const[E,R]=l,q=P.filter(ct=>!R.includes(ct));if(R.every(ct=>w[ct]!==void 0)&&q.every(ct=>w[ct]===void 0))return{kind:E,organizations:w.organizations,...R.reduce((ct,tt)=>(ct[tt]=w[tt],ct),{})}}throw new Error("is not a valid credential")}function j(w){const l=w.getOptionalString("host")??T;let E=w.getOptionalConfigArray("credentials")?.map(ct=>({organizations:ct.getOptionalStringArray("organizations"),personalAccessToken:ct.getOptionalString("personalAccessToken")?.trim(),tenantId:ct.getOptionalString("tenantId"),clientId:ct.getOptionalString("clientId"),clientSecret:ct.getOptionalString("clientSecret")?.trim()}));const R=w.getOptionalString("token")?.trim();if(w.getOptional("credential")!==void 0&&w.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(w.getOptional("token")!==void 0&&w.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(R!==void 0){const ct=[{personalAccessToken:R}];E=E?.concat(ct)??ct}if(w.getOptional("credential")!==void 0){const ct=[{organizations:w.getOptionalStringArray("credential.organizations"),token:w.getOptionalString("credential.token")?.trim(),tenantId:w.getOptionalString("credential.tenantId"),clientId:w.getOptionalString("credential.clientId"),clientSecret:w.getOptionalString("credential.clientSecret")?.trim()}];E=E?.concat(ct)??ct}if(!(0,n.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let q;if(E!==void 0){const ct=E?.reduce((tt,Tt,wt)=>{let zt;try{O(Tt)}catch(ie){zt=ie.message}return zt!==void 0&&tt.push(`credential at position ${wt+1} ${zt}`),tt},Array.of()).concat(Object.entries(E.filter(tt=>tt.organizations!==void 0&&tt.organizations.length>0).reduce((tt,Tt,wt)=>(Tt.organizations?.forEach(zt=>{tt[zt]||(tt[zt]=[]),tt[zt].push(wt+1)}),tt),{})).filter(([tt,Tt])=>Tt.length>1).reduce((tt,[Tt,wt])=>(tt.push(`organization ${Tt} is specified multiple times in credentials at positions ${wt.slice(0,wt.length-1).join(", ")} and ${wt[wt.length-1]}`),tt),Array.of()));if(ct?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${ct.join("; ")}`);if(q=E.map(tt=>O(tt)),q.some(tt=>tt.kind!=="PersonalAccessToken")&&l!==T)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${T}`);if(q.filter(tt=>tt.organizations===void 0||tt.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:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function $(w){const l=w.map(j);return l.some(E=>E.host===T)||l.push({host:T}),l}class M{integrationConfig;static factory=({config:l})=>{const E=$(l.getOptionalConfigArray("integrations.azure")??[]);return(0,n.oS)(E.map(R=>new M(R)),R=>R.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:R}=l;if((0,n.AY)(E))return E;try{const q=v.fromRepoUrl(R),ct=new URL(R),tt=new URL(`https://a.com${q.getPath()??""}`),Tt=new URL(E,tt).pathname;return ct.searchParams.set("path",Tt),l.lineNumber&&(ct.searchParams.set("line",String(l.lineNumber)),ct.searchParams.set("lineEnd",String(l.lineNumber+1)),ct.searchParams.set("lineStartColumn","1"),ct.searchParams.set("lineEndColumn","1")),ct.toString()}catch{return new URL(E,R).toString()}}resolveEditUrl(l){return l}}var J=t(52536),Q=t.n(J);const F="bitbucket.org",G="https://api.bitbucket.org/2.0";function H(w){const l=F,E=G,R=w.getString("username"),q=w.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:R,appPassword:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function nt(w){const l=w.map(H);return l.length===0&&l.push({host:F,apiBaseUrl:G}),l}class W{integrationConfig;static factory=({config:l})=>{const E=nt(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,n.oS)(E.map(R=>new W(R)),R=>R.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,n.ku)(l);if(l.lineNumber){const R=new URL(E);return R.hash=`lines-${l.lineNumber}`,R.toString()}return E}resolveEditUrl(l){const E=Q()(l),R=new URL(l);return R.searchParams.set("mode","edit"),R.searchParams.set("at",E.ref),R.toString()}}var Z=t(45250);const Y="bitbucket.org",at="https://api.bitbucket.org/2.0";function pt(w){const l=w.getOptionalString("host")??Y;let E=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim(),q=w.getOptionalString("username"),ct=w.getOptionalString("appPassword")?.trim();if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,Z.trimEnd)(E,"/"):l===Y?E=at:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:R,username:q,appPassword:ct,commitSigningKey:w.getOptionalString("commitSigningKey")}}function Et(w){const l=w.map(pt);return l.some(E=>E.host===Y)||l.push({host:Y,apiBaseUrl:at}),l}class bt{integrationConfig;static factory=({config:l})=>{const E=Et(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,n.oS)(E.map(R=>new bt(R)),R=>R.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,n.ku)(l);if(!l.lineNumber)return E;const R=new URL(E);return this.integrationConfig.host==="bitbucket.org"?R.hash=`lines-${l.lineNumber}`:R.hash=`${l.lineNumber}`,R.toString()}resolveEditUrl(l){const E=Q()(l),R=new URL(l);return R.searchParams.set("mode","edit"),R.searchParams.set("spa","0"),R.searchParams.set("at",E.ref),R.toString()}}function At(w){const l=w.getString("host");let E=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim(),q=w.getOptionalString("username"),ct=w.getOptionalString("password");if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,Z.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:R,username:q,password:ct,commitSigningKey:w.getOptionalString("commitSigningKey")}}function Dt(w){return w.map(At)}class lt{integrationConfig;static factory=({config:l})=>{const E=Dt(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,n.oS)(E.map(R=>new lt(R)),R=>R.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,n.ku)(l);if(l.lineNumber){const R=new URL(E);return R.hash=l.lineNumber.toString(),R.toString()}return E}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function dt(w){const l=w.getString("host");let E=w.getOptionalString("baseUrl"),R=w.getOptionalString("cloneUrl"),q=w.getString("gitilesBaseUrl");const ct=w.getOptionalString("username"),tt=w.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(E&&!(0,n.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(R&&!(0,n.AY)(R))throw new Error(`Invalid Gerrit integration config, '${R}' is not a valid cloneUrl`);if(!(0,n.AY)(q))throw new Error(`Invalid Gerrit integration config, '${q}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return E?E=(0,Z.trimEnd)(E,"/"):E=`https://${l}`,q?q=(0,Z.trimEnd)(q,"/"):q=`https://${l}`,R?R=(0,Z.trimEnd)(R,"/"):R=E,{host:l,baseUrl:E,cloneUrl:R,gitilesBaseUrl:q,username:ct,password:tt,commitSigningKey:w.getOptionalString("commitSigningKey")}}function xt(w){return w.map(dt)}var ft=t(1048).hp;const Ct=")]}'";function Pt(w,l){const E=new URL(w.gitilesBaseUrl),R=new URL(l),ct=R.pathname.substring(R.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(Le=>!!Le),tt=ct.indexOf("+");if(tt<=0)throw new Error(`Unable to parse project from url: ${l}`);const Tt=trimStart(ct.slice(0,tt).join("/"),"/"),wt=ct.indexOf("heads");if(wt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const zt=ct[wt+1],ie=ct.slice(wt+2).join("/");return{branch:zt,filePath:ie===""?"/":ie,project:Tt}}function it(w,l){const E=new URL(w.gitilesBaseUrl),R=new URL(l),ct=(0,Z.trimStart)(R.pathname.substring(R.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(Yt=>!!Yt),tt=(0,Z.takeWhile)(ct,Yt=>Yt!=="+");if(tt.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Tt=ct.slice(tt.length+1),wt=(0,Z.join)(tt,"/");if(Tt.length>0&&Tt[0]==="HEAD"){const Yt=Tt.shift(),me=(0,Z.join)(Tt,"/");return{project:wt,ref:Yt,refType:"head",path:me||"/",basePath:(0,Z.trimEnd)(l.replace(me,""),"/")}}if(Tt.length>0&&Tt[0].length===40){const Yt=Tt.shift(),me=(0,Z.join)(Tt,"/");return{project:wt,ref:Yt,refType:"sha",path:me||"/",basePath:(0,Z.trimEnd)(l.replace(me,""),"/")}}const zt=(0,Z.join)(Tt,"/"),Le=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(zt);if(Le){const Yt=Le[0];let me;const{refsReference:Ee,ref:se}=Le.groups||{},tn=zt.replace(Yt,"");switch(Ee){case"heads":me="branch";break;case"tags":me="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:wt,ref:se,refType:me,path:tn||"/",basePath:(0,Z.trimEnd)(l.replace(tn,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function mt(w,l,E,R){return`${w.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(R,"/")}`}function yt(w,l,E,R){const q=R==="/"||R===""?".tar.gz":`/${R}.tar.gz`;return`${rt(w)}/${l}/+archive/refs/heads/${E}${q}`}function et(w,l){const{path:E,ref:R,project:q,refType:ct}=it(w,l),tt=E==="/"||E===""?".tar.gz":`/${E}.tar.gz`;if(ct==="branch")return`${rt(w)}/${q}/+archive/refs/heads/${R}${tt}`;if(ct==="sha")return`${rt(w)}/${q}/+archive/${R}${tt}`;throw new Error(`Unsupported gitiles ref type: ${ct}`)}function ht(w){return w.password?"/a/":"/"}function rt(w){if(!w.baseUrl||!w.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(w.gitilesBaseUrl.startsWith(w.baseUrl))return w.gitilesBaseUrl.replace(w.baseUrl.concat("/"),w.baseUrl.concat(ht(w)));if(w.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return w.gitilesBaseUrl}function B(w,l){const{branch:E,project:R}=Pt(w,l);return`${w.baseUrl}${ht(w)}projects/${encodeURIComponent(R)}/branches/${E}`}function z(w,l){const{project:E}=Pt(w,l);return`${w.cloneUrl}${ht(w)}${E}`}function ut(w,l){const{ref:E,refType:R,path:q,project:ct}=it(w,l);if(R==="branch")return`${w.baseUrl}${ht(w)}projects/${encodeURIComponent(ct)}/branches/${E}/files/${encodeURIComponent(q)}/content`;if(R==="sha")return`${w.baseUrl}${ht(w)}projects/${encodeURIComponent(ct)}/commits/${E}/files/${encodeURIComponent(q)}/content`;throw new Error(`Unsupported gitiles ref type: ${R}`)}function Ot(w){return`${w.baseUrl}${ht(w)}projects/`}function It(w){const l={};if(!w.password)return l;const E=ft.from(`${w.username}:${w.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function Lt(w){const l=await w.text();if(l.startsWith(Ct))try{return JSON.parse(l.slice(Ct.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 Ut{integrationConfig;static factory=({config:l})=>{const E=xt(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,n.oS)(E.map(R=>new Ut(R)),R=>R.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:R,lineNumber:q}=l;let ct;if(E.startsWith("/")){const{basePath:tt}=it(this.config,R);return tt+E}return E?ct=new URL(E,R):ct=new URL(R),q&&(ct.hash=q.toString()),ct.toString()}resolveEditUrl(l){return l}}var Nt=t(36021);const Wt="gitlab.com",Kt="https://gitlab.com/api/v4";function te(w){const l=w.getString("host");let E=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim();let q=w.getOptionalString("baseUrl");if(E?E=(0,Z.trimEnd)(E,"/"):l===Wt&&(E=Kt),q?q=(0,Z.trimEnd)(q,"/"):q=`https://${l}`,(0,n.HO)(l)){if(!E||!(0,n.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,n.AY)(q))throw new Error(`Invalid GitLab integration config, '${q}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:R,apiBaseUrl:E,baseUrl:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function jt(w){const l=w.map(te);return l.some(E=>E.host===Wt)||l.push({host:Wt,apiBaseUrl:Kt,baseUrl:`https://${Wt}`}),l}function kt(w){let l="";return w.host!==Wt&&(l=new URL(w.baseUrl).pathname),trimEnd(l,"/")}class ee{integrationConfig;static factory=({config:l})=>{const E=jt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,n.oS)(E.map(R=>new ee(R)),R=>R.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,n.ku)(l)}resolveEditUrl(l){return fe(l,"edit")}}function fe(w,l){return w.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function Gt(w){const l=w.getString("host");let E=w.getOptionalString("baseUrl");const R=w.getOptionalString("username"),q=w.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(E&&!(0,n.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,Z.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:R,password:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}var ne=t(1048).hp;function de(w,l){const E=ae(w,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function Xe(w,l){const E=ae(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function Ge(w,l){const E=ae(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function oe(w,l){const E=ae(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function We(w){const l={},{username:E,password:R}=w;return R?(E?l.Authorization=`basic ${ne.from(`${E}:${R}`).toString("base64")}`:l.Authorization=`token ${R}`,{headers:l}):l}function ae(w,l){const E=w.baseUrl??`https://${w.host}`;try{const[R,q,ct,tt,Tt,wt,...zt]=l.replace(E,"").split("/"),ie=zt.join("/").replace(/^\//,"");return{url:E,owner:q,name:ct,ref:wt,path:ie}}catch(R){throw new Error(`Incorrect URL: ${l}, ${R}`)}}class Ye{config;static factory=({config:l})=>{const R=(l.getOptionalConfigArray("integrations.gitea")??[]).map(q=>Gt(q));return(0,n.oS)(R.map(q=>new Ye(q)),q=>q.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return de(this.config,l)}}function _e(w){const l=w.getString("host"),E=w.getOptionalString("token"),R=w.getOptionalString("apiKey");if(!(0,n.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:R,token:E}}function ge(w,l){const E=De(w,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 rn(w,l){const E=De(w,l);let R=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(R+=`/${E.orgName}`),E.projectName&&(R+=`/${E.projectName}`),R+=`/${E.repoName}/+/raw/${E.path}?routingId=${E.accountId}&git_ref=refs/heads/${E.refString}`,R}function gn(w,l){const E=De(w,l);let R=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(R+=`/${E.orgName}`),E.projectName&&(R+=`/${E.projectName}`),R+=`/${E.repoName}/+/archive/${E.branch}.zip?routingId=${E.accountId}`,R}function on(w,l){const E=De(w,l);let R=`${E.baseUrl}/gateway/code/api/v1/repos/${E.accountId}`;return E.orgName&&(R+=`/${E.orgName}`),E.projectName&&(R+=`/${E.projectName}`),R+=`/${E.repoName}/+/content?routingId=${E.accountId}&include_commit=true&git_ref=refs/heads/${E.branch}`,R}function qe(w){const l={},{token:E,apiKey:R}=w;return R?l["x-api-key"]=R:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function De(w,l){const E=`https://${w.host}`;try{const R=new URL(l),q=R.pathname.split("/").filter(ue=>ue!==""),ct=R.pathname.split("/"),tt=q.findIndex(ue=>ue==="account")+1,Tt=q[tt],wt=q.findIndex(ue=>ue==="orgs"),zt=wt!==-1?q[wt+1]:"",ie=q.findIndex(ue=>ue==="projects"),Le=ie!==-1?q[ie+1]:"",Yt=q.findIndex((ue,cn)=>ue==="repos"&&cn>Math.max(tt,wt,ie))+1,me=q[Yt],Ee=ct.slice(ct.findIndex(ue=>ue==="files"||ue==="edit")+1),se=Ee.findIndex(ue=>ue==="~"),tn=Ee.slice(0,se).join("/"),Ve=se!==-1?Ee.slice(se+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Tt,orgName:zt,projectName:Le,refString:tn,path:Ve,repoName:me,refDashStr:Ee.slice(0,se).join("-"),branch:se!==-1?Ee.slice(0,se).join("/"):Ee.join("/")}}catch(R){throw new Error(`Incorrect URL: ${l}, ${R}`)}}class Ke{config;static factory=({config:l})=>{const R=(l.getOptionalConfigArray("integrations.harness")??[]).map(q=>_e(q));return(0,n.oS)(R.map(q=>new Ke(q)),q=>q.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return ge(this.config,l)}}const ze="blob.core.windows.net";function an(w){const l=w.getOptionalString("endpoint"),E=w.getString("accountName"),R=w.getOptionalString("accountKey")?.trim(),q=w.getOptionalString("sasToken")?.trim(),ct=w.getOptionalString("connectionString")?.trim(),tt=w.getOptionalString("endpointSuffix")?.trim();let Tt,wt;if(l){try{const ie=new URL(l);Tt=ie.host,wt=ie.pathname}catch{throw new Error(`invalid azureBlobStorage integration config, endpoint '${l}' is not a valid URL`)}if(wt!=="/")throw new Error(`invalid azureBlobStorage integration config, endpoints cannot contain path, got '${l}'`)}else Tt=ze;const zt=w.has("aadCredential")?{clientId:w.getString("aadCredential.clientId"),tenantId:w.getString("aadCredential.tenantId"),clientSecret:w.getString("aadCredential.clientSecret")?.trim()}:void 0;if(R&&q)throw new Error(`Invalid Azure Blob Storage config for ${E}: Both account key and SAS token cannot be used simultaneously.`);if(zt&&(R||q))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:Tt,endpoint:l,accountName:E,accountKey:R,sasToken:q,connectionString:ct,endpointSuffix:tt,aadCredential:zt}}function ye(w){const l=w.map(an);return l.some(E=>E.host===ze)||l.push({host:ze}),l}class He{integrationConfig;static factory=({config:l})=>{const E=ye(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,n.oS)(E.map(R=>new He(R)),R=>R.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,n.ku)(l)}resolveEditUrl(l){return l}}class ke{byType;static fromConfig(l){return new ke({awsS3:m.factory({config:l}),awsCodeCommit:g.factory({config:l}),azureBlobStorage:He.factory({config:l}),azure:M.factory({config:l}),bitbucket:bt.factory({config:l}),bitbucketCloud:W.factory({config:l}),bitbucketServer:lt.factory({config:l}),gerrit:Ut.factory({config:l}),github:Nt.U.factory({config:l}),gitlab:ee.factory({config:l}),gitea:Ye.factory({config:l}),harness:Ke.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(R=>R.byUrl(l)).filter(Boolean);if(E.length>1){const R=E.filter(q=>!(q instanceof bt));R.length!==0&&(E=R)}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,n.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var Qe=t(55309);class je{static fromConfig(l){return ke.fromConfig(l)}}const ve=(0,Qe.y)({id:"integration.scmintegrations"})},36021:(V,S,t)=>{"use strict";t.d(S,{U:()=>p,F:()=>g});var n=t(59869),a=t(45250);const d="github.com",x="https://api.github.com",m="https://raw.githubusercontent.com";function h(y){const A=y.getOptionalString("host")??d;let v=y.getOptionalString("apiBaseUrl"),T=y.getOptionalString("rawBaseUrl");const P=y.getOptionalString("token")?.trim(),L=y.getOptionalConfigArray("apps")?.map(O=>({appId:O.getNumber("appId"),clientId:O.getString("clientId"),clientSecret:O.getString("clientSecret"),webhookSecret:O.getString("webhookSecret"),privateKey:O.getString("privateKey"),allowedInstallationOwners:O.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,n.HO)(A))throw new Error(`Invalid GitHub integration config, '${A}' is not a valid host`);return v?v=(0,a.trimEnd)(v,"/"):A===d&&(v=x),T?T=(0,a.trimEnd)(T,"/"):A===d&&(T=m),{host:A,apiBaseUrl:v,rawBaseUrl:T,token:P,apps:L}}function u(y){const A=y.map(h);return A.some(v=>v.host===d)||A.push({host:d,apiBaseUrl:x,rawBaseUrl:m}),A}class p{integrationConfig;static factory=({config:A})=>{const v=u(A.getOptionalConfigArray("integrations.github")??[]);return(0,n.oS)(v.map(T=>new p(T)),T=>T.config.host)};constructor(A){this.integrationConfig=A}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(A){return g((0,n.ku)(A),"tree")}resolveEditUrl(A){return g(A,"edit")}parseRateLimitInfo(A){return{isRateLimited:A.status===429||A.status===403&&A.headers.get("x-ratelimit-remaining")==="0"}}}function g(y,A){return y.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(v,T,P,L)=>`//${T}/${P}/${L}/${A}/`)}},59869:(V,S,t)=>{"use strict";t.d(S,{AY:()=>h,HO:()=>m,ku:()=>p,oS:()=>u});var n=t(52536),a=t.n(n),d=t(45250),x=t.n(d);function m(y){const A=new URL("http://example.com");return A.host=y,A.host===y}function h(y){try{return new URL(y),!0}catch{return!1}}function u(y,A){return{list(){return y},byUrl(v){try{const T=typeof v=="string"?new URL(v):v;return y.find(P=>A(P)===T.host)}catch{return}},byHost(v){return y.find(T=>A(T)===v)}}}function p(y){const{url:A,base:v,lineNumber:T}=y;try{return new URL(A),A}catch{}let P;if(A.startsWith("/")){const{href:L,filepath:O}=a()(v);P=new URL(L);const j=(0,d.trimEnd)(P.pathname.substring(0,P.pathname.length-O.length),"/");P.pathname=`${j}${A}`}else P=new URL(A,v);return P.search=new URL(v).search,T&&(P.hash=`L${T}`),P.toString()}function g(y){beforeAll(()=>y.listen({onUnhandledRequest:"error"})),afterAll(()=>y.close()),afterEach(()=>y.resetHandlers())}},71543:(V,S,t)=>{"use strict";var n={};t.r(n),t.d(n,{TechDocsPlugin:()=>h.Ju});var a=t(31085),d=t(14041),x=t(25873),m=t(18690),h=t(39278),u=t(8915),p=t(72020),g=t(99730),y=t(64947),A=t(12173),v=t(22020),T=t(68146),P=t(73657);function L({children:r}){return(0,m.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(m.fS,{children:r})}const O=()=>(0,a.jsx)(A.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),j=({step:r,error:e})=>{let s="";return r==="load-config"?s=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(s=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(L,{children:(0,a.jsx)(A.M,{statusMessage:s,stack:e.stack})})},$=({error:r,resetError:e,plugin:s})=>(0,a.jsx)(v.b,{title:`Error in ${s?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(y.A,{variant:"outlined",onClick:e,children:"Retry"})}),M={Progress:T.k,Router:P.Kd,NotFoundErrorPage:O,BootErrorPage:j,ErrorBoundaryFallback:$},J="Invalid discovery URL pattern,";class Q{parts;static compile(e){const s=e.split(/\{\{\s*pluginId\s*\}\}/),o=s.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${J} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${J} URL must not have a hash`);if(i.search)throw new Error(`${J} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${J} URL must not end with a slash`);return new Q(s)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}class F{endpoints;defaultEndpoint;static fromConfig(e,s){const o=s?.pathPattern??"/api/{{ pluginId }}",i=e.getString("backend.baseUrl"),c=e.getOptionalConfigArray("discovery.endpoints")?.flatMap(b=>{const C=typeof b.get("target")=="object"?b.getOptionalString("target.external"):b.getString("target");if(!C)return[];const I=Q.compile(C);return b.getStringArray("plugins").map(K=>[K,I])});return new F(new Map(c),Q.compile(`${i}${o}`))}constructor(e,s){this.endpoints=e,this.defaultEndpoint=s}async getBaseUrl(e){const s=this.endpoints.get(e);return s?s.getBaseUrl(e):this.defaultEndpoint.getBaseUrl(e)}}var G=t(96403),H=t.n(G);class nt{isClosed=!1;terminatingError;observable=new(H())(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(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class W{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(H())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(s.next(this.currentValue),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}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(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class Z{subject=new nt;post(e){this.subject.next(e)}alert$(){return this.subject}}class Y{captureEvent(e){}}class at{alertApi;errorApi;constructor(e,s){this.alertApi=e,this.errorApi=s}post(e,s){return s?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,s)}error$(){return this.errorApi.error$()}}class pt{subject=new nt;post(e,s){this.subject.next({error:e,context:s})}error$(){return this.subject}}class Et{static forward(e,s){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,s)})}}const bt=new Map;class At{namespace;errorApi;constructor(e,s){this.namespace=e,this.errorApi=s,this.subscribers=new Set,this.observable=new(H())(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[s,o]of bt.entries())e.key?.startsWith(s)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let s,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(s=JSON.parse(i,(c,b)=>(typeof b=="object"&&b!==null&&Object.freeze(b),b)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:s,presence:o}}forBucket(e){const s=`${this.namespace}/${e}`;return bt.has(s)||bt.set(s,new At(s,this.errorApi)),bt.get(s)}async set(e,s){localStorage.setItem(this.getKeyName(e),JSON.stringify(s)),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:s})=>s===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const s=e?.slice(`${this.namespace}/`.length);s.includes("/")||this.notifyChanges(decodeURIComponent(s))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const s=this.snapshot(e);for(const o of this.subscribers)o.next(s)}subscribers;observable}function Dt(r){let e=r.baseImplementation||t.g.fetch;const s=[r.middleware??[]].flat().reverse();for(const o of s)e=o.apply(e);return{fetch:e}}class lt{identityApi;allowUrl;headerName;headerValue;static create(e){const s=dt(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new lt(e.identityApi,s,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(b=>i.replace(/\{\{\s*pluginId\s*\}\}/g,b))})}constructor(e,s,o,i){this.identityApi=e,this.allowUrl=s,this.headerName=o,this.headerValue=i}apply(e){return async(s,o)=>{const i=new Request(s,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(s,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function dt(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?xt(r.urlPrefixAllowlist):r.config?xt([r.config.getString("backend.baseUrl"),...lt.getDiscoveryUrlPrefixes(r.config)]):()=>!1}function xt(r){const e=r.map(s=>s.replace(/\/$/,""));return s=>e.some(o=>s===o||s.startsWith(`${o}/`))}function ft(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class Ct{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(s,o)=>{const i=new Request(s,o),c="plugin://";if(!i.url.startsWith(c))return e(s,o);const{hostname:b,pathname:C,search:I,hash:K,username:_,password:gt}=new URL(`http://${i.url.substring(c.length)}`);let ot=await this.discoveryApi.getBaseUrl(b);if(_||gt){const Mt=new URL(ot),Vt=`${_}${gt?`:${gt}`:""}@`;ot=`${Mt.protocol}//${Vt}${Mt.host}${Mt.pathname}`}const vt=`${ft(ot,C)}${I}${K}`;return e(vt,typeof s=="string"||Pt(s)?o:s)}}}function Pt(r){return typeof r=="object"&&r?.constructor===URL}class it{static resolvePluginProtocol(e){return new Ct(e.discoveryApi)}static injectIdentityAuth(e){return lt.create(e)}constructor(){}}function mt(r,e){for(const s of e)if(!r.has(s))return!1;return!0}function yt(r,...e){const s=new Set(r);for(const o of e)for(const i of o)s.add(i);return s}class et{requests=[];subject=new W(this.getCurrentPending());request(e){return new Promise((s,o)=>{this.requests.push({scopes:e,resolve:s,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,s){this.requests=this.requests.filter(o=>mt(e,o.scopes)?(o.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(s=>s.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((s,o)=>yt(s,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:s=>{e&&this.resolve(e,s)},reject:s=>{e&&this.reject(s)}}}}class ht{subject=new W([]);currentRequests=[];handlerCount=0;createAuthRequester(e){const s=new et,o=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),b=this.makeAuthRequest(i,e);b?c[o]=b:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>s.request(i)}makeAuthRequest(e,s){const{scopes:o}=e;if(o)return{provider:s.provider,trigger:async()=>{const i=await s.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 rt(r){return new Promise((e,s)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,b=window.screen.height/2-i/2,C=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${b},left=${c}`);let I="";if(!C||typeof C.closed>"u"||C.closed){const ot=new Error("Failed to open auth popup.");ot.name="PopupRejectedError",s(ot);return}const K=ot=>{if(ot.source!==C||ot.origin!==r.origin)return;const{data:vt}=ot;if(vt.type==="config_info"){I=vt.targetOrigin;return}if(vt.type!=="authorization_response")return;const Mt=vt;if("error"in Mt){const Vt=new Error(Mt.error.message);Vt.name=Mt.error.name,s(Vt)}else e(Mt.response);gt()},_=setInterval(()=>{if(C.closed){const ot=`Login failed, ${I&&I!==window.location.origin?`Incorrect app origin, expected ${I}`:"popup was closed"}`,vt=new Error(ot);vt.name="PopupClosedError",s(vt),gt()}},100);function gt(){window.removeEventListener("message",K),clearInterval(_)}window.addEventListener("message",K)})}let B=!1;function z(r){return[...r].join(" ")}class ut{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:s,discoveryApi:o,environment:i,provider:c,joinScopes:b=z,oauthRequestApi:C,sessionTransform:I=_=>_,popupOptions:K}=e;!B&&!s&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),B=!0),this.enableExperimentalRedirectFlow=s?s.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=C.createAuthRequester({provider:c,onAuthRequest:async _=>this.enableExperimentalRedirectFlow?this.executeRedirect(_):this.showPopup(_)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=b,this.sessionTransform=I,this.popupOptions=K}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const s=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!s.ok){const i=new Error(`Auth refresh request failed, ${s.statusText}`);throw i.status=s.status,i}const o=await s.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(s=>{throw new Error(`Logout request failed, ${s}`)});if(!e.ok){const s=new Error(`Logout request failed, ${e.statusText}`);throw s.status=e.status,s}}async showPopup(e){const s=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:s,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,b=await rt({url:o,name:`${this.provider.title} Login`,origin:new URL(o).origin,width:i,height:c});return await this.sessionTransform(b)}async executeRedirect(e){const s=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:s,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,s){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...s,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const s=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return s?`?${s}`:""}}function Ot(r,e){for(const s of e)if(!r.has(s))return!1;return!0}class It{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,s){if(!e)return!1;if(!s||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return Ot(o,s)}getExtendedScope(e,s){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(s)for(const i of s)o.add(i);return o}}var Lt=t(55309),Ut=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Nt=(0,Lt.y)({id:"core.auth.google"}),Wt=(0,Lt.y)({id:"core.auth.github"}),Kt=(0,Lt.y)({id:"core.auth.okta"}),te=(0,Lt.y)({id:"core.auth.gitlab"}),jt=(0,Lt.y)({id:"core.auth.microsoft"}),kt=(0,Lt.y)({id:"core.auth.onelogin"}),ee=(0,Lt.y)({id:"core.auth.bitbucket"}),fe=(0,Lt.y)({id:"core.auth.bitbucket-server"}),Gt=(0,Lt.y)({id:"core.auth.atlassian"}),ne=(0,Lt.y)({id:"core.auth.vmware-cloud"});class de{subject=new W(Ut.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Ut.SignedIn:Ut.SignedOut))}sessionState$(){return this.subject}}class Xe{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new de;refreshPromise;currentSession;constructor(e){const{connector:s,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=s,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new It({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 Ot(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!e.instantPopup)try{const s=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=s,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(this.helper.getExtendedScope(this.currentSession,e));try{const s=await this.refreshPromise;if(!this.helper.sessionExistsAndHasScope(s,e))throw new Error("Refreshed session did not receive the required scopes");return this.stateTracker.setIsSignedIn(!0),s}finally{delete this.refreshPromise}}}const Ge={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class oe{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Ge,oauthRequestApi:b,defaultScopes:C=[],scopeTransform:I=ot=>ot,popupOptions:K}=e,_=new ut({configApi:s,discoveryApi:o,environment:i,provider:c,oauthRequestApi:b,sessionTransform({backstageIdentity:ot,...vt}){const Mt={...vt,providerInfo:{idToken:vt.providerInfo.idToken,accessToken:vt.providerInfo.accessToken,scopes:oe.normalizeScopes(I,vt.providerInfo.scope),expiresAt:vt.providerInfo.expiresInSeconds?new Date(Date.now()+vt.providerInfo.expiresInSeconds*1e3):void 0}};return ot&&(Mt.backstageIdentity={token:ot.token,identity:ot.identity,expiresAt:ot.expiresInSeconds?new Date(Date.now()+ot.expiresInSeconds*1e3):void 0}),Mt},popupOptions:K}),gt=new Xe({connector:_,defaultScopes:new Set(C),sessionScopes:ot=>ot.providerInfo.scopes,sessionShouldRefresh:ot=>{let vt=1/0;return ot.providerInfo?.expiresAt&&(vt=Math.min(vt,(ot.providerInfo.expiresAt.getTime()-Date.now())/1e3)),ot.backstageIdentity?.expiresAt&&(vt=Math.min(vt,(ot.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),vt<60*3}});return new oe({sessionManager:gt,scopeTransform:I})}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,s){const o=oe.normalizeScopes(this.scopeTransform,e);return(await this.sessionManager.getSession({...s,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,s){if(!s)return new Set;const o=Array.isArray(s)?s:s.split(/[\s|,]/).filter(Boolean);return new Set(e(o))}}const We={id:"google",title:"Google",icon:()=>null},ae="https://www.googleapis.com/auth/";class Ye{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:b=We,defaultScopes:C=["openid",`${ae}userinfo.email`,`${ae}userinfo.profile`]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:b,environment:c,defaultScopes:C,scopeTransform(I){return I.map(K=>K==="openid"?K:K==="profile"||K==="email"?`${ae}userinfo.${K}`:K.startsWith(ae)?K:`${ae}${K}`)}})}}const _e={id:"microsoft",title:"Microsoft",icon:()=>null};class ge{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new ge(e)}constructor(e){const{configApi:s,environment:o="development",provider:i=_e,oauthRequestApi:c,discoveryApi:b,defaultScopes:C=["openid","offline_access","profile","email","User.Read"],scopeTransform:I=K=>K.concat("offline_access")}=e;this.configApi=s,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=b,this.scopeTransform=I,this.oauth2={[ge.MicrosoftGraphID]:oe.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:C})}}microsoftGraph(){return this.oauth2[ge.MicrosoftGraphID]}static resourceForScopes(e){const s=[...new Set(e.split(" ").map(ge.resourceForScope).filter(i=>i!=="openid"))];if(s.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${s.join(", ")}. Access tokens can only have a single audience.`));const o=s[0]??ge.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const s=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(s){const{resourceURI:o}=s;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return ge.MicrosoftGraphID}}async getAccessToken(e,s){const o=e===void 0?ge.MicrosoftGraphID:await ge.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=oe.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,s)}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 rn={id:"github",title:"GitHub",icon:()=>null};class gn{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=rn,oauthRequestApi:b,defaultScopes:C=["read:user"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:C})}}const on={id:"okta",title:"Okta",icon:()=>null},qe=new Set(["openid","profile","email","phone","address","groups","offline_access"]),De="okta.";class Ke{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=on,oauthRequestApi:b,defaultScopes:C=["openid","email","profile","offline_access"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:C,scopeTransform(I){return I.map(K=>qe.has(K)||K.startsWith(De)?K:`${De}${K}`)}})}}const ze={id:"gitlab",title:"GitLab",icon:()=>null};class an{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=ze,oauthRequestApi:b,defaultScopes:C=["read_user"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:C})}}const ye={id:"onelogin",title:"onelogin",icon:()=>null},He=new Set(["openid","profile","email","phone","address","groups","offline_access"]),ke="onelogin.";class Qe{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=ye,oauthRequestApi:b}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(C){return C.map(I=>He.has(I)||I.startsWith(ke)?I:`${ke}${I}`)}})}}const je={id:"bitbucket",title:"Bitbucket",icon:()=>null};class ve{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=je,oauthRequestApi:b,defaultScopes:C=["account"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:C})}}const w={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class l{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=w,oauthRequestApi:b,defaultScopes:C=["PROJECT_ADMIN"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i,defaultScopes:C})}}const E={id:"atlassian",title:"Atlassian",icon:()=>null};class R{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=E,oauthRequestApi:b}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:b,provider:c,environment:i})}}const q={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class ct{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:b=q,defaultScopes:C=["openid"]}=e;return oe.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:b,environment:c,defaultScopes:C})}}var tt=t(12935),Tt=t(57405),wt=t(65461),zt=t(36017),ie=t(99303),Le=t(39837);const Yt=(0,Lt.y)({id:"core.storage"});var me=t(70795),Ee=t(16009);const se=(0,Lt.y)({id:"core.oauthrequest"});var tn=t(96824),Ve=t(70835),ue=t(10288),cn=t.n(ue),rs=t(20938),Qt=t(46195),en=t(54241);const pn=Qt.z.lazy(()=>Qt.z.object({rule:Qt.z.string(),resourceType:Qt.z.string(),params:Qt.z.record(Qt.z.any()).optional()}).or(Qt.z.object({anyOf:Qt.z.array(pn).nonempty()})).or(Qt.z.object({allOf:Qt.z.array(pn).nonempty()})).or(Qt.z.object({not:pn}))),Ks=Qt.z.object({result:Qt.z.literal(en.b.ALLOW).or(Qt.z.literal(en.b.DENY))}),os=Qt.z.union([Qt.z.object({result:Qt.z.literal(en.b.ALLOW).or(Qt.z.literal(en.b.DENY))}),Qt.z.object({result:Qt.z.literal(en.b.CONDITIONAL),pluginId:Qt.z.string(),resourceType:Qt.z.string(),conditions:pn})]),as=(r,e)=>Qt.z.object({items:Qt.z.array(Qt.z.intersection(Qt.z.object({id:Qt.z.string()}),r)).refine(s=>s.length===e.size&&s.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class is{enabled;discovery;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1}async authorize(e,s){return this.makeRequest(e,Ks,s)}async authorizeConditional(e,s){return this.makeRequest(e,os,s)}async makeRequest(e,s,o){if(!this.enabled)return e.map(_=>({result:en.b.ALLOW}));const i={items:e.map(_=>({id:rs.A(),..._}))},c=await this.discovery.getBaseUrl("permission"),b=await cn()(`${c}/authorize`,{method:"POST",body:JSON.stringify(i),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!b.ok)throw await Ve.o.fromResponse(b);const C=await b.json(),K=as(s,new Set(i.items.map(({id:_})=>_))).parse(C).items.reduce((_,gt)=>(_[gt.id]=gt,_),{});return i.items.map(_=>K[_.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class Cn{permissionClient;identityApi;constructor(e,s){this.permissionClient=e,this.identityApi=s}static create(e){const{config:s,discovery:o,identity:i}=e,c=new is({discovery:o,config:s});return new Cn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const Ln=[(0,tt.b)({api:Tt.I,deps:{configApi:wt.U},factory:({configApi:r})=>F.fromConfig(r)}),(0,tt.b)({api:zt.k,deps:{},factory:()=>new Z}),(0,tt.b)({api:ie.c,deps:{},factory:()=>new Y}),(0,tt.b)({api:Le.m,deps:{alertApi:zt.k},factory:({alertApi:r})=>{const e=new at(r,new pt);return Et.forward(e,{hidden:!1}),e}}),(0,tt.b)({api:Yt,deps:{errorApi:Le.m},factory:({errorApi:r})=>At.create({errorApi:r})}),(0,tt.b)({api:me.a,deps:{configApi:wt.U,identityApi:Ee.K,discoveryApi:Tt.I},factory:({configApi:r,identityApi:e,discoveryApi:s})=>Dt({middleware:[it.resolvePluginProtocol({discoveryApi:s}),it.injectIdentityAuth({identityApi:e,config:r})]})}),(0,tt.b)({api:se,deps:{},factory:()=>new ht}),(0,tt.b)({api:Nt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Ye.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:jt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ge.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:Wt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>gn.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:Kt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Ke.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:te,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>an.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:kt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Qe.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:ee,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ve.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:fe,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>l.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:Gt,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>R.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:ne,deps:{discoveryApi:Tt.I,oauthRequestApi:se,configApi:wt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ct.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,tt.b)({api:tn.x,deps:{discovery:Tt.I,identity:Ee.K,config:wt.U},factory:({config:r,discovery:e,identity:s})=>Cn.create({config:r,discovery:e,identity:s})})];var Mn=t(14451),cs=t(27799),Bn=t(94389),jn=t(20947),ls=t(20473),Un=t(45917),fn=t(39347),ds=t(63309),us=t(82451),hs=t(85121),$n=t(17400),gs=t(42226),ps=t(69550),Fn=t(52755),Nn=t(89350),fs=t(8911),bn=t(33602),Sn=t(48108),ms=t(77225),kn=t(55700),Wn=t(71865),ys=t(80109),vs=t(15303),Es=t(39330);const As={brokenImage:cs.A,catalog:fs.A,scaffolder:jn.A,techdocs:ls.A,search:Un.A,chat:fn.A,dashboard:ds.A,docs:us.A,email:hs.A,github:gs.A,group:bn.A,help:ps.A,"kind:api":$n.A,"kind:component":Nn.A,"kind:domain":Mn.A,"kind:group":bn.A,"kind:location":Fn.A,"kind:system":Bn.A,"kind:user":Sn.A,"kind:resource":kn.A,"kind:template":Wn.A,user:Sn.A,warning:ms.A,star:ys.A,unstarred:vs.A,externalLink:Es.A};var xs=t(58733),Cs=t(55288),bs=t(91360),Ss=t(50868),Os=t(12285),Kn=t(87271),Ps=t(64636);Ps.A.configure(r=>`v5-${r}`);const Ts=(0,Cs.A)({productionPrefix:"jss4-"});function zn(r){const{children:e,theme:s,noCssBaseline:o=!1}=r,i=s.getTheme("v4"),c=s.getTheme("v5");let b;o||(b=(0,a.jsx)(xs.Ay,{}));let C=(0,a.jsxs)(a.Fragment,{children:[b,e]});return i&&(C=(0,a.jsx)(bs.Ay,{generateClassName:Ts,children:(0,a.jsx)(Ss.A,{theme:i,children:C})})),c&&(C=(0,a.jsx)(Os.A,{injectFirst:!0,children:(0,a.jsx)(Kn.A,{theme:c,children:C})})),C}const Hn={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 On=t(98392),ws=t(17161);const we={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")`},Ue={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 $e(r){const{colors:e,shape:s,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,b=`${s}, ${c}`,C=o?.fontColor??"#FFFFFF";return{colors:e,shape:s,backgroundImage:b,fontColor:C}}const Rs={home:$e({colors:Ue.teal,shape:we.wave}),documentation:$e({colors:Ue.pinkSea,shape:we.wave2}),tool:$e({colors:Ue.purpleSky,shape:we.round}),service:$e({colors:Ue.marineBlue,shape:we.wave}),website:$e({colors:Ue.veryBlue,shape:we.wave}),library:$e({colors:Ue.rubyRed,shape:we.wave}),other:$e({colors:Ue.darkGrey,shape:we.wave}),app:$e({colors:Ue.toastyOrange,shape:we.wave}),apis:$e({colors:Ue.teal,shape:we.wave2}),card:$e({colors:Ue.greens,shape:we.wave})},Is=16,f='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',D="home",U={htmlFontSize:Is,fontFamily:f,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 N(r){const{palette:e,htmlFontSize:s=Is,fontFamily:o=f,defaultPageTheme:i=D,pageTheme:c=Rs,typography:b}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return U.htmlFontSize=s,U.fontFamily=o,{palette:e,typography:b??U,page:c[i],getPageTheme:({themeId:C})=>c[C]??c[i]}}var k=t(80012);const X={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,k.a)(r.palette.textVerySubtle,.2):(0,k.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,k.a)(r.palette.textVerySubtle,.2):(0,k.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,k.e$)(r.palette.link,.3),background:(0,k.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"},"&.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"}}}},st=r=>(...e)=>{const s=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return s.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function St(r,e){if(!e||typeof e=="string")return;const s=typeof e=="function"?e(r):e;if(s)return{"@global":s}}function Rt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const s={...r},o=r.spacing(1);return typeof o=="number"&&(s.spacing=st(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:s})]:[i,c]))}return e}}const $t=/^&.Mui-([\w-]+)$/;function Bt(r){let e=r;if(!r||typeof r!="object")return e;for(const s of Object.keys(r)){const o=r[s];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,b=c.match($t);if(b){const[,C]=b,{[c]:I,...K}=o;I&&(e={...e,[s]:K,[C]:I})}}}return e}function Ft(r,e={}){const s={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?s[i]=St(r,c.styleOverrides):s[i]=Bt(Rt(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:s,props:o}}class Xt{#t=new Map;constructor(e,s){this.#t=new Map,e&&this.#t.set("v4",e),s&&this.#t.set("v5",s)}getTheme(e){return this.#t.get(e)}}function he(r){const e=N(r),s={...X,...r.components},o=(0,ws.A)({...e,components:s}),i=Ft(o,s),c={...(0,On.A)(e),...i};return new Xt(c,o)}function Ht(r){const e=adaptV4Theme(r),s=createTheme(r);return new Xt(s,createV5Theme(e))}const _t={light:he({palette:Hn.light}),dark:he({palette:Hn.dark})};var Ae=t(75962),re=t(87145);const Zt=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(re.A,{}),Provider:({children:r})=>(0,a.jsx)(zn,{theme:_t.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(Ae.A,{}),Provider:({children:r})=>(0,a.jsx)(zn,{theme:_t.dark,children:r})}];var Jt=t(73466),Se=t(39067),qt=t.n(Se);class ce{holders;constructor(...e){this.holders=e}get(e){for(const s of this.holders){const o=s.get(e);if(o)return o}}}var le=t(43836),Fe=t(10602);const Me=(0,le.tK)("api-context"),nn=r=>{const{apis:e,children:s}=r,o=(0,d.useContext)(Me)?.atVersion(1),i=o?new ce(e,o):e;return(0,a.jsx)(Me.Provider,{value:(0,Fe.B)({1:i}),children:s})};nn.propTypes={apis:qt().shape({get:qt().func.isRequired}).isRequired,children:qt().node};const ln=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function pe(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Vn(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Vn):Object.fromEntries(Object.entries(r).map(([e,s])=>[e,Vn(s)]))}function dn(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:dn(e);if(typeof r!="object"||Array.isArray(r))return r;const s=pe(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(s)])){const c=dn(r[i],s[i]);c!==void 0&&(o[i]=c)}return o}function Ds(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 Ne={type(r,e,s,o){return`Invalid type in config for key '${r}' in '${e}', got ${s}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,s){return`Unable to convert config value for key '${r}' in '${e}' to a ${s}`}};class mn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new mn(void 0):e.reduce((s,{data:o,context:i,filteredKeys:c,deprecatedKeys:b})=>{const C=new mn(o,i,s);if(C.filteredKeys=c,b)for(const{key:I,description:K}of b)console.warn(`The configuration key '${I}' of ${i} is deprecated and may be removed soon. ${K||""}`);return C},void 0)}constructor(e,s="mock-config",o,i=""){this.data=e,this.context=s,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const s=this.readValue(e);return s===null?!1:s!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],s=this.fallback?.keys()??[];return[...new Set([...e,...s])].filter(o=>this.data?.[o]!==null)}get(e){const s=this.getOptional(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e??""),this.context));return s}getOptional(e){const s=Vn(this.readValue(e)),o=this.fallback?.getOptional(e);if(s!==null)return s===void 0?dn(o):o===void 0?dn(s):dn(s,o)}getConfig(e){const s=this.getOptionalConfig(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalConfig(e){const s=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(pe(s))return this.copy(s,e,o);if(s!==null){if(s!==void 0)throw new TypeError(Ne.type(this.fullKey(e),this.context,Ds(s),"object"));return o}}getConfigArray(e){const s=this.getOptionalConfigArray(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalConfigArray(e){const s=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!pe(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(s)return s.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const s=this.getOptionalNumber(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalNumber(e){const s=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof s=="number"||s===void 0)return s;const o=Number(s);if(!Number.isFinite(o))throw new Error(Ne.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const s=this.getOptionalBoolean(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalBoolean(e){const s=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof s=="boolean"||s===void 0)return s;const o=String(s).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(Ne.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const s=this.getOptionalString(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalString(e){return this.readConfigValue(e,s=>typeof s=="string"&&s!==""||{expected:"string"})}getStringArray(e){const s=this.getOptionalStringArray(e);if(s===void 0)throw new Error(Ne.missing(this.fullKey(e),this.context));return s}getOptionalStringArray(e){return this.readConfigValue(e,s=>{if(!Array.isArray(s))return{expected:"string-array"};for(const[o,i]of s.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,s,o){const i=new mn(e,this.context,o,this.fullKey(s));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,s){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,s);if(o===null)return;const i=s(o);if(i!==!0){const{key:c=e,value:b=o,expected:C}=i;throw new TypeError(Ne.type(this.fullKey(c),this.context,Ds(b),C))}return o}readValue(e){const s=e?e.split("."):[];for(const i of s)if(!ln.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of s.entries())if(pe(o))o=o[c];else if(o!=null){const b=this.fullKey(s.slice(0,i).join("."));throw new TypeError(Ne.type(b,this.context,Ds(o),"object"))}return o}}const Pn="theme";class Gn{themes;static createWithStorage(e){const s=new Gn(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Pn)??void 0;return s.setActiveThemeId(o),s.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(Pn,i):window.localStorage.removeItem(Pn)}),window.addEventListener("storage",i=>{if(i.key===Pn){const c=localStorage.getItem(Pn)??void 0;s.setActiveThemeId(c)}}),s}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new W(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 yn=t(63636);function zs(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 Fr{registeredFeatureFlags=[];flags;registerFlag(e){zs(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===yn.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 s=Array.from(this.flags.entries()).filter(([,o])=>o===yn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const s=JSON.parse(e);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const o=Object.entries(s).filter(([i,c])=>(zs(i),c===yn.S.Active));return new Map(o)}catch{return new Map}}}const Yn=(0,Lt.y)({id:"core.apptheme"}),Hs=(0,Lt.y)({id:"core.applanguage"});var Nr=t(56038),Vs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Vs||{});class kr{factories=new Map;register(e,s){const o=Vs[e],i=this.factories.get(s.api.id);return i&&i.priority>=o?!1:(this.factories.set(s.api.id,{priority:o,factory:s}),!0)}get(e){const s=this.factories.get(e.id);if(s)return s.factory}getAllApis(){const e=new Set;for(const{factory:s}of this.factories.values())e.add(s.api);return e}}class Ls{factories;static validateFactories(e,s){for(const o of s){const i=[o],c=new Set;for(;i.length;){const b=i.shift(),C=e.get(b);if(C)for(const I of Object.values(C.deps)){if(I.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(I)||(c.add(I),i.push(I))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,s=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(s.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...s,i.api]),b=i.factory(c);return this.apis.set(e.id,b),b}loadDeps(e,s,o){const i={};for(const c in s)if(s.hasOwnProperty(c)){const b=s[c],C=this.load(b,o);if(!C)throw new Error(`No API factory available for dependency ${b} of dependent ${e}`);i[c]=C}return i}}function Wr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const s=[{node:d.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;s.length!==0;){const{node:o,parent:i,contexts:c}=s.shift();d.Children.forEach(o,b=>{if(!(0,d.isValidElement)(b))return;const C={};for(const I in e)if(e.hasOwnProperty(I)){const K=e[I];C[I]=K.visit(K.accumulator,b,i,c[I])}for(const I of r.discoverers){const K=I(b);K&&s.push({node:K,parent:b,contexts:C})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Qn(r,e){return()=>({accumulator:r(),visit:e})}function Kr(r){return r.props?.children}function zr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Oe=t(19402);const Hr=Qn(()=>new Set,(r,e)=>{const s=(0,Oe.E)(e,"core.plugin");s&&r.add(s)});var Tn=t(72427);const Gs=r=>{const{children:e}=r,s=(0,Tn.gf)(yn.B),o="with"in r?s.isActive(r.with):!s.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Oe.h)(Gs,"core.featureFlagged",!0);const Zn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Jn(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Ys=r=>{const e=new Set;return r&&e.add(r),e};function Qs(r,e=new Array){return d.Children.forEach(r,s=>{if(!(0,d.isValidElement)(s))return;const o=(0,Oe.E)(s,"core.mountPoint");if(o){const i=(0,Oe.E)(s,"core.plugin");e.push({routeRef:o,plugin:i})}Qs(s.props.children,e)}),e}const Vr=Qn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(o?.isElementAncestor)return o;if(s?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,Oe.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${Jn(e)}"`);const b=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${Jn(e)}"`);const C=i.startsWith("/")?i.slice(1):i,I=e.props.element;if((0,Oe.E)(e,"core.gatherMountPoints")){if(I)throw new Error(`Mount point gatherers may not have an element prop "${Jn(e)}"`);const K={path:C,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Zn],plugins:new Set};return b.push(K),{obj:K,gatherPath:C,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(I){const[K,..._]=Qs(I);if(_.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!K)return o;const{routeRef:gt,plugin:ot}=K,vt={path:C,element:"mounted",routeRefs:new Set([gt]),caseSensitive:!!e.props?.caseSensitive,children:[Zn],plugins:Ys(ot)};return b.push(vt),r.paths.set(gt,C),r.parents.set(gt,o?.routeRef),{obj:vt,routeRef:gt??o?.routeRef,gatherPath:C,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${Jn(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const C=(0,Oe.E)(e,"core.plugin");return C&&o?.obj?.plugins.add(C),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Gr=Qn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(s?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,b=o?.sticky;const C=e.props?.path,I=i?.children??r.objects,K=!!e.props?.caseSensitive;let _=o?.path;if((0,Oe.E)(e,"core.gatherMountPoints")){if(!C)throw new Error("Mount point gatherer must have a path");_=C}const gt=e.props?.element;let ot=(0,Oe.E)(e,"core.mountPoint");if(!ot&&(0,d.isValidElement)(gt)&&(ot=(0,Oe.E)(gt,"core.mountPoint")),ot){let Mt=C;if(_&&(Mt?_=void 0:Mt=_),!Mt)throw new Error("Mounted routable extension must have a path");r.paths.set(ot,Mt),c&&b?(r.parents.set(ot,c),C&&(c=ot,b=!1)):(r.parents.set(ot,c),c=ot),C?(i={caseSensitive:K,path:C,element:"mounted",routeRefs:new Set([ot]),children:[Zn],plugins:Ys((0,Oe.E)(e.props.element,"core.plugin"))},I.push(i)):i?.routeRefs.add(ot)}if((0,Oe.E)(e,"core.gatherMountPoints")&&(b=!0),(0,Oe.E)(e,"core.gatherMountPoints")){if(!C)throw new Error("Mount point gatherer must have a path");ot||(i={caseSensitive:K,path:C,element:"gathered",routeRefs:new Set,children:[Zn],plugins:o?.obj?.plugins||new Set},I.push(i))}return{obj:i,path:_,routeRef:c,sticky:b}}),Yr=Qn(()=>new Set,(r,e)=>{if(e.type===Gs){const s=e.props;r.add("with"in s?s.with:s.without)}});var wn=t(21613),Qr=t(63544);const Rn=(0,Qr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Zs(r){return r[Rn]==="absolute"}function Js(r){return r[Rn]==="sub"}function Zr(r){return r[Rn]==="external"}function Xn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Jr=t(46155),Xr=t.n(Jr);function _r(r,e,s){let o,i="";if(Zs(r))o=r;else if(Js(r))o=r.parent,i=r.path;else if(Zr(r)){const C=s.get(r);if(!C)return[void 0,""];if(Zs(C))o=C;else if(Js(C))o=C.parent,i=C.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${C}`)}else throw r[Rn]?new Error(`Unknown or invalid route ref type, ${r[Rn]}`):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 b=Xn(c,i);return[o,b]}function qr(r,e,s,o,i){const c=(0,wn.ue)(i,e)??[],b=Array();let C=-1;for(let _=r;_&&(C=c.findIndex(gt=>gt.route.routeRefs.has(_)),C===-1);_=o.get(_))b.unshift(_);b.length===0&&(C-=1);const I=C===-1?"":c[C].pathname,K=b.slice(0,-1).map(_=>{const gt=s.get(_);if(gt===void 0)throw new Error(`No path for ${_}`);if(gt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${_} as it has parameters`);return gt});return`${Xn(I,...K)}/`}class to{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,s,o,i,c){this.routePaths=e,this.routeParents=s,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,s){const[o,i]=_r(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof s=="string"?c=this.trimPath(s):s.pathname?c={...s,pathname:this.trimPath(s.pathname)}:c=s;const b=this.appBasePath+qr(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[I])=>{const K=I&&Xr()(I,_=>typeof _=="string"?_.replaceAll(/[&?#;\/]/g,gt=>encodeURIComponent(gt)):_);return Xn(b,(0,wn.tW)(i,K))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const eo=(0,le.tK)("routing-context"),no=({routePaths:r,routeParents:e,routeObjects:s,routeBindings:o,basePath:i="",children:c})=>{const b=new to(r,e,s,o,i),C=(0,Fe.B)({1:b});return(0,a.jsx)(eo.Provider,{value:C,children:c})};function so(r,e){const s=new Set(e.values());s.delete(void 0);for(const o of e.keys()){if(s.has(o))continue;let i=o,c="";for(;i;){const C=r.get(i);if(C===void 0)throw new Error(`No path for ${i}`);c=Xn(C,c),i=e.get(i)}const b=c.match(/:(\w+)/g);if(b){for(let C=0;C<b.length;C++)for(let I=C+1;I<b.length;I++)if(b[I]===b[C])throw new Error(`Parameter ${b[I]} is duplicated in path ${c}`)}}}function ro(r,e){for(const s of e)if(s.externalRoutes){for(const[o,i]of Object.entries(s.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${s.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const oo=(0,le.tK)("app-context"),ao=({appContext:r,children:e})=>{const s=(0,Fe.B)({1:r});return(0,a.jsx)(oo.Provider,{value:s,children:e})},Xs="app",io=`${Xs}-auth-cookie-expires-at`,co=5*6e4,_s=5e3,lo=2,uo=5*6e4;function ho({discoveryApi:r,fetchApi:e,errorApi:s}){let o=!1,i,c=!0,b=_s;const C="BroadcastChannel"in window?new BroadcastChannel(io):void 0,I=ot=>{const vt=(1+3*Math.random())*6e4;return Math.max(ot-Date.now(),co)-vt},K=async()=>{try{const vt=`${await r.getBaseUrl(Xs)}/.backstage/auth/v1/cookie`,Mt=await e.fetch(vt,{credentials:"include"});if(!Mt.ok)throw new Error(`Request failed with status ${Mt.status} ${Mt.statusText}, see request towards ${vt} for more details`);const Vt=await Mt.json();if(!Vt.expiresAt)throw new Error("No expiration date in response");const Te=Date.parse(Vt.expiresAt);if(Number.isNaN(Te))throw new Error("Invalid expiration date in response");c=!0,C?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Te).toISOString()}}),gt(I(Te))}catch(ot){c?(c=!1,b=_s):(b=Math.min(uo,b*lo),console.error("Session cookie refresh failed",ot),s.post(new Error("Session refresh failed, see developer console for details"))),gt(b)}},_=ot=>{const{data:vt}=ot;if(!(vt===null||typeof vt!="object")&&"action"in vt&&vt.action==="COOKIE_REFRESH_SUCCESS"){const Mt=Date.parse(vt.payload.expiresAt);if(Number.isNaN(Mt)){console.warn("Received invalid expiration from session refresh channel");return}gt(I(Mt))}};function gt(ot){o||(i&&clearTimeout(i),i=setTimeout(K,ot))}return C?.addEventListener("message",_),K(),()=>{o=!0,i&&clearTimeout(i),C?.removeEventListener("message",_),C?.close()}}function qs(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Ms(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class go{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,s){this.target=e,this.signOutTargetUrl=s.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw qs("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ms("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw qs("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ms("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(s=>s.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 Ms("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 s=ho(e);this.#t=async()=>{s();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var po=t(1394);function fo(r,e,s){if(r!==void 0){const i=s.find(c=>c.id===r);if(i)return i}if(e){const i=s.find(c=>c.variant==="dark");if(i)return i}const o=s.find(i=>i.variant==="light");return o||s[0]}const mo=()=>{const r=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,s]=(0,d.useState)(r.matches);return(0,d.useEffect)(()=>{const o=i=>{s(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function tr({children:r}){const e=(0,Tn.gf)(Yn),s=(0,po.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?mo():!1,i=fo(s,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const er=async()=>yo();function yo(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,s=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(s){if(!Array.isArray(s))throw new Error("Static configuration has invalid format");e.push(...s)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const b=c.textContent;if(!b)throw new Error("tag is empty");let C;try{C=JSON.parse(b)}catch(I){throw new Error(`failed to parse config; ${I}`)}if(!Array.isArray(C))throw new Error("data is not an array");e.push(...C)}catch(b){throw new Error(`Failed to load config from script tag, ${b.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 vo{apis=[];add(e,s){return this.apis.push([e.id,s]),s}build(){return new vn(new Map(this.apis))}}class vn{apis;static builder(){return new vo}static from(e){return new vn(new Map(e.map(([s,o])=>[s.id,o])))}static with(e,s){return new vn(new Map([[e.id,s]]))}constructor(e){this.apis=e}with(e,s){return new vn(new Map([...this.apis,[e.id,s]]))}get(e){return this.apis.get(e.id)}}function Eo(r){const e=new Map,s=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const b=`${o.getId()}.${i}`;if(e.has(b))throw new Error(`Unexpected duplicate route '${b}'`);e.set(b,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const b=`${o.getId()}.${i}`;if(s.has(b))throw new Error(`Unexpected duplicate external route '${b}'`);s.set(b,c)}}return{routes:e,externalRoutes:s}}function Ao(r,e,s){const o=Eo(s),i=new Map,c=new Set;r&&r({bind:(I,K)=>{for(const[_,gt]of Object.entries(K)){const ot=I[_];if(!ot)throw new Error(`Key ${_} is not an existing external route`);if(!gt&&!ot.optional)throw new Error(`External route ${_} is required but was ${gt===!1?"disabled":"not provided"}`);gt?i.set(ot,gt):gt===!1&&c.add(ot)}}});const b=e.getOptionalConfig("app.routes.bindings")?.get();if(b)for(const[C,I]of Object.entries(b)){if(!xo(I))throw new Error(`Invalid config at app.routes.bindings['${C}'], value must be a non-empty string or false`);const K=o.externalRoutes.get(C);if(!K)throw new Error(`Invalid config at app.routes.bindings, '${C}' is not a valid external route`);if(!(i.has(K)||c.has(K)))if(I===!1)c.add(K);else{const _=o.routes.get(I);if(!_)throw new Error(`Invalid config at app.routes.bindings['${C}'], '${I}' is not a valid route`);i.set(K,_)}}for(const C of o.externalRoutes.values())if(!i.has(C)&&!c.has(C)){const I="getDefaultTarget"in C?C.getDefaultTarget():void 0;if(I){const K=o.routes.get(I);K&&i.set(C,K)}}return i}function xo(r){return!!(r===!1||typeof r=="string"&&r)}function In(){const[r]=(0,m.AV)((0,a.jsx)(m.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const nr=(0,d.createContext)(void 0);var sr=t(82266),rr=t(93368),Co=t(25862);const bo=(r,e)=>{try{const o=(0,wn.ue)(e,{pathname:r})?.filter(I=>I?.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 b;i.plugins.size===1&&(b=i.plugins.values().next().value);const C=Object.entries(o?.params||{}).reduce((I,[K,_])=>(_!==void 0&&K!=="*"&&(I[K]=_),I),{});return{extension:"App",pluginId:b?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:C}}catch{return}},So=({pathname:r,search:e,hash:s,attributes:o})=>{const i=(0,rr.s)();return(0,d.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${s}`,{attributes:o})},[i,r,e,s,o]),null},_n=({routeObjects:r})=>{const{pathname:e,search:s,hash:o}=(0,m.zy)(),{params:i,...c}=bo(e,r)||{params:{}};return(0,a.jsx)(Co.Ig,{attributes:c,children:(0,a.jsx)(So,{pathname:e,search:s,hash:o,attributes:i})})};function Oo(r){return In()?Bs(r):""}function Bs(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function or({component:r,appIdentityProxy:e,children:s}){const[o,i]=(0,d.useState)(),c=(0,Tn.gf)(wt.U),b=Bs(c);return o?(e.setTarget(o,{signOutTargetUrl:b||"/"}),(0,a.jsx)(a.Fragment,{children:s})):(0,a.jsx)(r,{onSignInSuccess:i})}function ar(r){const{Router:e,SignInPage:s}=(0,sr.n)().getComponents(),o=(0,Tn.gf)(wt.U),i=Bs(o),c=`${i}/*`,b=(0,d.useContext)(nr);if(!b)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:C,appIdentityProxy:I}=b;return s?In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(_n,{routeObjects:C}),(0,a.jsx)(or,{component:s,appIdentityProxy:I,children:(0,a.jsx)(m.BV,{children:(0,a.jsx)(m.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(_n,{routeObjects:C}),(0,a.jsx)(or,{component:s,appIdentityProxy:I,children:r.children})]}):(I.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)(_n,{routeObjects:C}),(0,a.jsx)(m.BV,{children:(0,a.jsx)(m.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(_n,{routeObjects:C}),r.children]}))}(0,Oe.h)(ar,"core.type","AppRouter");const Dn="language",Ze="en";class qn{static create(e){const s=e?.availableLanguages??[Ze];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ze))throw new Error(`Supported languages must include '${Ze}'`);const o=e?.defaultLanguage??Ze;if(!s.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new qn(s,o)}static createWithStorage(e){const s=qn.create(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Dn),{languages:i}=s.getAvailableLanguages();return o&&i.includes(o)&&s.setLanguage(o),s.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Dn)&&window.localStorage.setItem(Dn,c)}),window.addEventListener("storage",c=>{if(c.key===Dn){const b=localStorage.getItem(Dn)??void 0;b&&s.setLanguage(b)}}),s}#t;#e;#n;constructor(e,s){this.#t=e,this.#e=s,this.#n=new W({language:this.#e})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const s=e??Ze;if(s!==this.#e){if(s&&!this.#t.includes(s))throw new Error(`Failed to change language to '${s}', available languages are '${this.#t.join("', '")}'`);this.#e=s,this.#n.next({language:s})}}getLanguage(){return{language:this.#e}}language$(){return this.#n}}var Po=t(47304),To=t(99833),ir=t(93184);function cr(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class wo{onLoad;#t;#e;#n;constructor(e){this.onLoad=e,this.#t=new Set,this.#e=new Map,this.#n=new Map}addTranslationResource(e){const s=(0,To.Y)(e);for(const o of s.resources){const i=this.#s(o.language,s.id);this.#n.has(i)||this.#n.set(i,o.loader)}}#s(e,s){return`${e}/${s}`}needsLoading(e,s){const o=this.#s(e,s);return this.#n.get(o)?!this.#t.has(o):!1}async load(e,s){const o=this.#s(e,s),i=this.#n.get(o);if(!i||this.#t.has(o))return;const c=this.#e.get(o);if(c){await c;return}const b=i().then(C=>{this.onLoad({language:e,namespace:s,messages:C.messages}),this.#t.add(o)},C=>{throw this.#t.add(o),C});this.#e.set(o,b),await b}}class js{static create(e){const{languages:s}=e.languageApi.getAvailableLanguages(),o=(0,Po.Q_)({fallbackLng:Ze,supportedLngs:s,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:i}=e.languageApi.getLanguage();i!==Ze&&o.changeLanguage(i);const c=new wo(I=>{o.addResourceBundle(I.language,I.namespace,cr(I.messages),!1,!0)}),b=e?.resources||[];for(let I=b.length-1;I>=0;I--){const K=b[I];K.$$type==="@backstage/TranslationResource"?c.addTranslationResource(K):K.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Ze,K.id,cr(K.messages),!0,!1)}const C=new js(o,c,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:I})=>{C.#o(I)}),C}#t;#e;#n;#s=new Set;#r=new Set;constructor(e,s,o){this.#t=e,this.#e=s,this.#n=o}getTranslation(e){const s=(0,ir.v)(e);return this.#i(s),this.#a(s)}translation$(e){const s=(0,ir.v)(e);return this.#i(s),new(H())(o=>{let i={};const c=()=>{i={};const C=i;this.#e.load(this.#n,s.id).then(()=>{if(C===i){const I=this.#a(s);I.ready&&o.next(I)}},I=>{C===i&&o.error(Array.isArray(I)?I[0]:I)})},b=()=>{const C=this.#a(s);C.ready?o.next(C):c()};return this.#e.needsLoading(this.#n,s.id)&&c(),this.#r.add(b),()=>{this.#r.delete(b)}})}#o(e){this.#n!==e&&(this.#n=e,this.#t.changeLanguage(e),this.#r.forEach(s=>s()))}#a(e){return this.#e.needsLoading(this.#n,e.id)?{ready:!1}:{ready:!0,t:this.#t.getFixedT(null,e.id)}}#i(e){if(this.#s.has(e.id))return;this.#s.add(e.id);const s=e.getDefaultMessages();this.#t.addResourceBundle(Ze,e.id,s,!0,!1);const o=e.getDefaultResource();o&&this.#e.addTranslationResource(o)}}function lr(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 Ro(r){const e=mn.fromConfigs(r),s=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,b;if(s&&o){const C=new URL(s).origin,I=new URL(o).origin;if(C===I){const K=lr(o);o!==K&&(c=K)}}if(s){const C=lr(s);s!==C&&(b=C)}return(b||c)&&(i=i.concat({data:{app:b&&{baseUrl:b},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Io(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Do(r,e,s){const o=!!r,i=(0,Jt.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:I}=e;c=(0,a.jsx)(I,{})}else if(i.error){const{BootErrorPage:I}=e;c=(0,a.jsx)(I,{step:"load-config",error:i.error})}const{ThemeProvider:b=tr}=e;return c?{node:(0,a.jsx)(nn,{apis:vn.with(Yn,s),children:(0,a.jsx)(b,{children:c})})}:{api:mn.fromConfigs(i.value?.length?Ro(i.value):[])}}class Lo{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 Mo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new go;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??er,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new kr,this.appLanguageApi=qn.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 s=this.getProvider();return()=>(0,a.jsx)(s,{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 Lo(this);let s,o;return({children:c})=>{const b=(0,d.useRef)(!0),C=(0,d.useMemo)(()=>Gn.createWithStorage(this.themes),[]),{routing:I,featureFlags:K}=(0,d.useMemo)(()=>{const Vt=In();Vt&&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
7
- `);const Te=Wr({root:c,discoverers:[Kr,zr],collectors:{routing:Vt?Gr:Vr,collectedPlugins:Hr,featureFlags:Yr}});return Te.collectedPlugins.forEach(Be=>this.plugins.add(Be)),this.verifyPlugins(this.plugins),this.getApiHolder(),Te},[c]),_=Do(this.configLoader,this.components,C),gt="api"in _;if(gt){const{api:Vt}=_;this.configApi=Vt}if("node"in _)return _.node;if(o)throw o;if(!s)try{s=Ao(this.bindRoutes,_.api,this.plugins),so(I.paths,I.parents),ro(s,this.plugins)}catch(Vt){throw o=Vt,Vt}if(gt&&b.current){b.current=!1;const Vt=this.getApiHolder().get(yn.B);if(Vt){for(const Ie of this.featureFlags)Vt.registerFlag({...Ie,pluginId:""});for(const Ie of this.plugins.values())if("getFeatureFlags"in Ie)for(const hn of Ie.getFeatureFlags())Vt.registerFlag({name:hn.name,pluginId:Ie.getId()});else for(const hn of Ie.output())hn.type==="feature-flag"&&Vt.registerFlag({name:hn.name,pluginId:Ie.getId()});const Te=Vt.getRegisteredFlags(),Be=new Set(Te.map(Ie=>Ie.name));for(const Ie of K)Be.has(Ie)||Vt.registerFlag({name:Ie,pluginId:""})}}const{ThemeProvider:ot=tr,Progress:vt}=this.components,Mt=this.getApiHolder();if(Io()){const Vt=Mt.get(Le.m),Te=Mt.get(me.a),Be=Mt.get(Tt.I);if(!Vt||!Te||!Be)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Vt,fetchApi:Te,discoveryApi:Be})}return(0,a.jsx)(nn,{apis:Mt,children:(0,a.jsx)(ao,{appContext:e,children:(0,a.jsx)(ot,{children:(0,a.jsx)(no,{routePaths:I.paths,routeParents:I.parents,routeObjects:I.objects,routeBindings:s,basePath:Oo(_.api),children:(0,a.jsx)(nr.Provider,{value:{routeObjects:I.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(d.Suspense,{fallback:(0,a.jsx)(vt,{}),children:c})})})})})})}}getRouter(){return ar}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const s of e.getApis())this.apiFactoryRegistry.get(s.api)||this.apiFactoryRegistry.register("default",s);return Ls.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Yn,deps:{},factory:()=>Gn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:wt.U,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:Ee.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Hs,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Nr.J,deps:{languageApi:Hs},factory:({languageApi:e})=>js.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:yn.B,deps:{},factory:()=>new Fr});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const s of e.getApis())if(!this.apiFactoryRegistry.register("default",s))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${s.api}`);for(const e of this.apis)if(!this.apiFactoryRegistry.register("app",e))throw new Error(`Duplicate or forbidden API factory for ${e.api} in app`);return Ls.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ls(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const s=new Set;for(const o of e){const i=o.getId();if(s.has(i))throw new Error(`Duplicate plugin found '${i}'`);s.add(i)}}}function Bo(r){return new Mo(r)}function jo(r){return Bo({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...M,...r?.components},configLoader:r?.configLoader,defaultApis:Ln,icons:{...As,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??Zt})}var ts=t(82442);let dr=!1;const ur=r=>{const e=(0,sr.n)(),{NotFoundErrorPage:s}=e.getComponents(),o=(0,d.useMemo)(()=>In(),[]),c=[...(0,ts.O)(r.children,b=>b.getElements().flatMap(C=>{let I=C.props.path;if(I==="")return[];I=I?.replace(/\/\*$/,"")??"/";let K=o?C:C.props.element;return!o&&!K&&(K=C,dr||(console.warn("DEPRECATION WARNING: All elements within <FlatRoutes> must be of type <Route> with an element prop. Existing usages of <Navigate key=[path] to=[to] /> should be replaced with <Route path=[path] element={<Navigate to=[to] />} />."),dr=!0)),[{path:I,element:K,children:C.props.children?[{path:I==="/"?"/":"*",element:C.props.children}]:void 0}]}).sort((C,I)=>I.path.localeCompare(C.path)).map(C=>({...C,path:C.path==="/"?"/":`${C.path}/*`}))),{path:"*",element:(0,a.jsx)(s,{})}];return(0,m.Ye)(c)};(0,Oe.h)(ur,"core.type","FlatRoutes");var En=t(6820),Uo=t(78692),$o=t(86519);function Fo(r){return!r.cursor}function No(r,e){if(!r.length)return[];const{maxCountPerChunk:s=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let b=0,C=0,I=0;for(let K=0;K<r.length;++K){const _=r[K].length+i;I>0&&(C+_>o||I+1>s)&&(c.push(r.slice(b,K)),b=K,C=0,I=0),C+=_,I+=1}return c.push(r.slice(b,r.length)),c}const xe="catalog";var Ce=t(94214);class ko{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:cn()}}async deleteEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async getEntities(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByQuery(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-query{?fields,limit,offset,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByRefs(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByName(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityFacets(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async refreshEntity(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async analyzeLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async getLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocationByEntity(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocations(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}}class Wo{apiClient;constructor(e){this.apiClient=new ko(e)}async getEntityAncestors(e,s){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,En.KU)(e.entityRef)},s))}async getLocationById(e,s){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},s))}async getLocationByEntity(e,s){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,En.KU)(e)},s))}async getEntities(e,s){const{filter:o=[],fields:i=[],order:c,offset:b,limit:C,after:I}=e??{},K=[];if(c)for(const gt of[c].flat())gt&&K.push(`${gt.order}:${gt.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:C,filter:this.getFilterValue(o),offset:b,after:I,order:c?K:void 0}},s))}}async getEntitiesByRefs(e,s){const o=async c=>{const b=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},s);if(!b.ok)throw await Ve.o.fromResponse(b);return(await b.json()).items.map(I=>I??void 0)};let i;for(const c of No(e.entityRefs)){const b=await o(c);i?i.push(...b):i=b}return{items:i??[]}}async queryEntities(e={},s){const o={};if(Fo(e)){const{fields:i=[],filter:c,limit:b,offset:C,orderFields:I,fullTextFilter:K}=e;o.filter=this.getFilterValue(c),b!==void 0&&(o.limit=b),C!==void 0&&(o.offset=C),I!==void 0&&(o.orderField=(Array.isArray(I)?I:[I]).map(({field:gt,order:ot})=>`${gt},${ot}`)),i.length&&(o.fields=i);const _=K?.term?.trim();_&&(o.fullTextFilterTerm=_),K?.fields?.length&&(o.fullTextFilterFields=K.fields)}else{const{fields:i=[],limit:c,cursor:b}=e;o.cursor=b,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.requestRequired(await this.apiClient.getEntitiesByQuery({query:o},s))}async getEntityByRef(e,s){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,En.KU)(e)},s))}async getEntityByName(e,s){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},s))}async refreshEntity(e,s){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},s);if(o.status!==200)throw new Error(await o.text())}async getEntityFacets(e,s){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},s))}async addLocation(e,s){const{type:o="url",target:i,dryRun:c}=e,b=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},s);if(b.status!==201)throw new Error(await b.text());const{location:C,entities:I,exists:K}=await b.json();if(!C)throw new Error(`Location wasn't added: ${i}`);return{location:C,entities:I,exists:K}}async getLocationByRef(e,s){return(await this.requestRequired(await this.apiClient.getLocations({},s))).map(i=>i.data).find(i=>e===(0,Uo.KL)(i))}async removeLocationById(e,s){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},s))}async removeEntityByUid(e,s){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},s))}async validateEntity(e,s,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:s}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await Ve.o.fromResponse(i);const{errors:c=[]}=await i.json();return{valid:!1,errors:c}}async requestIgnored(e){if(!e.ok)throw await Ve.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await Ve.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await Ve.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const s=[];for(const o of[e].flat()){const i=[];for(const[c,b]of Object.entries(o))for(const C of[b].flat())C===$o.c?i.push(c):typeof C=="string"&&i.push(`${c}=${C}`);i.length&&s.push(i.join(","))}return s}}var hr=t(7341),Ko=t(18),zo=t(82292),gr=t(29207),An=t(95203),Ho=t(9803),Re=t(88758),Vo=t(54560),xn=t(45250);async function Go({storageApi:r}){const e=r.forBucket("settings"),s=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,xn.isArray)(o))return;const i=new Set(s.snapshot("entityRefs").value??[]);o.filter(xn.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,b,C,I])=>(0,En.U2)({kind:b,namespace:C,name:I})).forEach(c=>i.add(c)),await s.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Yo{settingsStore;starredEntities;constructor(e){Go(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{this.starredEntities=new Set(s.value??[]),this.notifyChanges()}})}async toggleStarred(e){this.starredEntities.has(e)?this.starredEntities.delete(e):this.starredEntities.add(e),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}subscribers=new Set;observable=new(Y())(e=>(e.next(new Set(this.starredEntities)),this.subscribers.add(e),()=>{this.subscribers.delete(e)}));notifyChanges(){for(const e of this.subscribers)e.next(new Set(this.starredEntities))}}function Us(r){const{years:e=0,months:s=0,weeks:o=0,days:i=0,hours:c=0,minutes:b=0,seconds:C=0,milliseconds:I=0}=r;return((((e*365+s*30+o*7+i)*24+c)*60+b)*60+C)*1e3+I}var Qo=t(25033),Zo=t.n(Qo),Jo=t(88083);const Xo={seconds:10},_o={milliseconds:50},qo={api:$n.A,component:Nn.A,system:Bn.A,resource:kn.A,domain:Mn.A,location:Fn.A,user:Sn.A,group:bn.A,template:Wn.A};function pr(r){return{async:r.async,render:({entityRef:e,entity:s,context:o})=>({snapshot:(0,Jo.T)(s||e,o),loadEntity:r.async})}}class ta extends Map{#t;#e=new Map;constructor(e){super(),this.#t=e}set(e,s){const o=super.set(e,s);return this.#e.set(e,Date.now()),o}get(e){if(!this.has(e))return;const s=this.#e.get(e);if(Date.now()-s>this.#t){this.delete(e);return}return super.get(e)}delete(e){return this.#e.delete(e),super.delete(e)}clear(){return this.#e.clear(),super.clear()}}class es{static createLocal(){return new es({renderer:pr({async:!1})})}static create(e){return new es(e)}#t;#e;#n;#s;#r;constructor(e){const s=e.cacheTtl??Xo,o=e.batchDelay??_o,i=e.renderer??pr({async:!0}),c={};if(Object.entries(qo).forEach(([b,C])=>{c[b.toLocaleLowerCase("en-US")]=C}),Object.entries(e.kindIcons??{}).forEach(([b,C])=>{c[b.toLocaleLowerCase("en-US")]=C}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#n=this.#a({cacheTtl:s,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#e=Us(s),this.#t=new Map,this.#s=c,this.#r=i}forEntity(e,s){const{entityRef:o,kind:i,entity:c,needsLoad:b}=this.#o(e),C=ot=>{const{snapshot:vt}=this.#r.render({entityRef:o,loading:ot.loading,entity:ot.entity,context:s||{}});return{...vt,entityRef:o,Icon:this.#i(vt.Icon,i)}};let I;try{I=C({loading:b,entity:c})}catch{I={primaryTitle:o,entityRef:o}}if(!b)return{snapshot:I,promise:Promise.resolve(I)};const K=Promise.resolve().then(()=>this.#n?.load(o)).then(ot=>C({loading:!1,entity:ot??c})).catch(()=>{}),_=new(Y())(ot=>{let vt=!1;return K.then(Mt=>{Mt&&ot.next(Mt)}).finally(()=>{vt||ot.complete()}),()=>{vt=!0}}),gt=K.then(ot=>ot??I);return{snapshot:I,update$:_,promise:gt}}#o(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,En.U2)(e),needsLoad:!1};const s=this.#t.get(e),o=s?.entity,c=(!s||Date.now()-s.updatedAt>this.#e)&&this.#r.async!==!1&&this.#n!==void 0;return{entity:o,kind:(0,En.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const s=Us(e.cacheTtl),o=Us(e.batchDelay);return new(Zo())(async i=>{const{items:c}=await e.catalogApi.getEntitiesByRefs({entityRefs:i,fields:["kind","metadata.name","metadata.namespace","metadata.title","metadata.description","spec.profile.displayName","spec.type"]}),b=Date.now();return i.forEach((C,I)=>{this.#t.set(C,{updatedAt:b,entity:c[I]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new ta(s),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,s){return e||(e===!1?!1:this.#s[s.toLocaleLowerCase("en-US")])}}const Pe=(0,Ho.i)({id:"catalog",apis:[(0,tt.b)({api:hr.v,deps:{discoveryApi:Tt.I,fetchApi:me.a},factory:({discoveryApi:r,fetchApi:e})=>new Wo({discoveryApi:r,fetchApi:e})}),(0,tt.b)({api:Ko.a,deps:{storageApi:Yt},factory:({storageApi:r})=>new Yo({storageApi:r})}),(0,tt.b)({api:zo.n,deps:{catalogApi:hr.v},factory:({catalogApi:r})=>es.create({catalogApi:r})})],routes:{catalogIndex:An.rQ,catalogEntity:gr.s},externalRoutes:{createComponent:An.qP,viewTechDoc:An.UJ,createFromTemplate:An.Zg,unregisterRedirect:An.pS}}),gi=Pe.provide((0,Re.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(3720),t.e(5184),t.e(2177)]).then(t.bind(t,62177)).then(r=>r.CatalogPage),mountPoint:An.rQ})),ea=Pe.provide((0,Re.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:gr.s})),pi=Pe.provide((0,Re.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(3720),t.e(1902),t.e(5724)]).then(t.bind(t,65724)).then(r=>r.AboutCard)}})),fi=Pe.provide((0,Re.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),mi=Pe.provide((0,Re.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),yi=Pe.provide((0,Re.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),vi=Pe.provide((0,Re.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ei=Pe.provide((0,Re.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),Ai=Pe.provide((0,Re.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),xi=Pe.provide((0,Re.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Ci=Pe.provide((0,Re.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),bi=Pe.provide((0,Re.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),Si=Pe.provide((0,Re.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),Oi=Pe.provide((0,Re.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),Pi=Pe.provide((0,Vo.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var fr=t(96726),mr=t(26679);class na{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,s){const i=`${await this.getApiOrigin()}/${s}`,c=await fetch(`${i.endsWith("/")?i:`${i}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,s,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class sa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}}const ra=[(0,tt.b)({api:mr.s,deps:{configApi:wt.U,discoveryApi:Tt.I,identityApi:Ee.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new na({configApi:r,discoveryApi:e,identityApi:s})}),(0,tt.b)({api:mr.l,deps:{configApi:wt.U,discoveryApi:Tt.I,identityApi:Ee.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new sa({configApi:r,discoveryApi:e,identityApi:s})}),(0,tt.b)({api:fr.Y,deps:{configApi:wt.U},factory:({configApi:r})=>fr.L.fromConfig(r)})],oa={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},aa={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function ia(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ca(){const r=await er(),e=await ia();return[...r,{context:"detected",data:e?oa:aa}]}var Je=t(58837),la=t(3210);const da=(0,Je.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),ua=()=>{const r=da();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,a.jsx)("path",{className:r.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"})})},ha=(0,Je.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),ga=()=>{const r=ha();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,a.jsx)("path",{className:r.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"})})};var be=t(72664);const yr={isOpen:!1,setOpen:()=>{}},vr=(0,d.createContext)(yr),Er=(0,le.tK)("sidebar-open-state-context");function Ar(r){const{children:e,value:s}=r;return(0,a.jsx)(vr.Provider,{value:s,children:(0,a.jsx)(Er.Provider,{value:(0,Fe.B)({1:s}),children:e})})}const $s=()=>{const r=(0,d.useContext)(Er),e=(0,d.useContext)(vr);if(r===void 0)return e||yr;const s=r.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s};var xr=t(72072),Cr=t(73524),sn=t(10394),br=t(5893),pa=t(53373),un=t.n(pa),fa=t(1125),Sr=t(29365),ma=t(73845),Fs=t(72501),ya=t(32881),va=t(27326),Ea=t(13085);const Or=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Ns=t(34435);const Aa=(0,Je.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),xa=r=>{const{to:e,label:s,icon:o,value:i}=r,{sidebarConfig:c}=(0,d.useContext)(be.yY),b=Aa({sidebarConfig:c}),C=(0,m.zy)(),{selectedMenuItemIndex:I,setSelectedMenuItemIndex:K}=(0,d.useContext)(Or),_=(ot,vt)=>{K(vt===I?-1:vt)},gt=i===I&&I>=0||i!==I&&!(I>=0)&&e===C.pathname;return(0,a.jsx)(Ea.A,{"aria-label":s,label:s,icon:o,component:xr.N_,to:e||C.pathname,onChange:_,value:i,selected:gt,classes:b})},Pr=r=>{const{children:e,to:s,label:o,icon:i,value:c}=r,{isMobile:b}=(0,Ns.Ut)();return b?(0,a.jsx)(xa,{to:s,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Tr=(0,Je.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),Ca=r=>(0,xn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),ba=d.createElement(Pr).type,Sa=({children:r,label:e="Menu",open:s,onClose:o})=>{const{sidebarConfig:i}=(0,d.useContext)(be.yY),c=Tr({sidebarConfig:i});return(0,a.jsxs)(ma.Ay,{anchor:"bottom",open:s,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(sn.A,{className:c.overlayHeader,children:[(0,a.jsx)(Fs.A,{variant:"h3",children:e}),(0,a.jsx)(Sr.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(ya.A,{})})]}),(0,a.jsx)(sn.A,{component:"nav",children:r})]})},Oa=r=>{const{sidebarConfig:e}=(0,d.useContext)(be.yY),{children:s}=r,o=Tr({sidebarConfig:e}),i=(0,m.zy)(),[c,b]=(0,d.useState)(-1);(0,d.useEffect)(()=>{b(-1)},[i.pathname]);let C=(0,ts.O)(s,K=>K.getElements().filter(_=>_.type===ba));if(s)C.length?C=Ca(C):C.push((0,a.jsx)(Pr,{icon:(0,a.jsx)(va.A,{}),children:s},"default_menu"));else return null;const I=c>=0&&!C[c].props.to;return(0,a.jsx)(Ar,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(Or.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:b},children:[(0,a.jsx)(Sa,{label:C[c]&&C[c].props.label,open:I,onClose:()=>b(-1),children:C[c]&&C[c].props.children}),(0,a.jsx)(fa.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:C})]})})};var Pa=t(87849),Ta=t(10315);const wr=(0,Je.A)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"},"@media print":{display:"none"}},drawerWidth:e=>({width:e.sidebarConfig.drawerWidthClosed}),drawerOpen:e=>({width:e.sidebarConfig.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var wa=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(wa||{});const Ra=r=>{const{sidebarConfig:e}=(0,d.useContext)(be.yY),{openDelayMs:s=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,b=wr({sidebarConfig:e}),C=(0,br.A)(Be=>Be.breakpoints.down("md"),{noSsr:!0}),[I,K]=(0,d.useState)(0),_=(0,d.useRef)(),{isPinned:gt,toggleSidebarPinState:ot}=(0,Ns.Ut)(),vt=()=>{gt||i||(_.current&&(clearTimeout(_.current),_.current=void 0),I!==2&&!C&&(_.current=window.setTimeout(()=>{_.current=void 0,K(2)},s),K(1)))},Mt=()=>{gt||i||(_.current&&(clearTimeout(_.current),_.current=void 0),I===1?K(0):I===2&&(_.current=window.setTimeout(()=>{_.current=void 0,K(0)},o)))},Vt=I===2&&!C||gt,Te=Be=>{Be?(K(2),ot()):(K(0),ot())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Da,{}),(0,a.jsx)(Ar,{value:{isOpen:Vt,setOpen:Te},children:(0,a.jsx)(sn.A,{className:b.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:vt,onFocus:i?()=>{}:vt,onMouseLeave:i?()=>{}:Mt,onBlur:i?()=>{}:Mt,children:(0,a.jsx)(sn.A,{className:un()(b.drawer,b.drawerWidth,{[b.drawerOpen]:Vt}),children:c})})})]})},Ia=r=>{const e=(0,be.Rv)(r.sidebarOptions??{}),s=(0,be.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:b}=r,{isMobile:C}=(0,Ns.Ut)();return C?(0,a.jsx)(Oa,{children:o}):(0,a.jsx)(be.yY.Provider,{value:{sidebarConfig:e,submenuConfig:s},children:(0,a.jsx)(Ra,{openDelayMs:c,closeDelayMs:b,disableExpandOnHover:i,children:o})})};function Da(){const{sidebarConfig:r}=(0,d.useContext)(be.yY),{focusContent:e,contentRef:s}=(0,Cr.H)(),o=wr({sidebarConfig:r}),{t:i}=(0,Pa.i)(Ta.O);return s?.current?(0,a.jsx)(y.A,{onClick:e,variant:"contained",className:un()(o.visuallyHidden),children:i("skipToContent")}):null}var La=t(94509),ns=t(58502),Ma=t(79065),Ba=t(55704),Rr=t(62248);const ja=(0,Je.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",opacity:0,[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create(["margin-left","opacity"],{easing:r.transitions.easing.sharp,duration:e.submenuConfig.defaultOpenDelayMs})},top:0,bottom:0,padding:0,background:r.palette.navigation.submenu?.background??"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:e.submenuConfig.drawerWidthClosed,transitionDelay:`${e.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:e=>({marginLeft:e.left,opacity:1,width:e.submenuConfig.drawerWidthOpen,[r.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:r.spacing(3),left:0,top:0}}),title:{fontSize:r.typography.h5.fontSize,fontWeight:r.typography.fontWeightMedium,color:r.palette.navigation.color,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Ua=r=>{const{isOpen:e}=$s(),{sidebarConfig:s,submenuConfig:o}=(0,d.useContext)(be.yY),i=e?s.drawerWidthOpen:s.drawerWidthClosed,c=ja({left:i,submenuConfig:o}),{isHoveredOn:b}=(0,d.useContext)(be.U1),[C,I]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{I(b)},[b]),(0,a.jsxs)(sn.A,{className:un()(c.drawer,{[c.drawerOpen]:C}),children:[(0,a.jsx)(Fs.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var $a=t(45810),Ir=t.n($a);function Dr(r,e,s=!1){const o=new URLSearchParams(e.search).toString(),i=Ir().parse(o),c=new URLSearchParams(r.search).toString(),b=Ir().parse(c),C=s?xn.isEqual:xn.isMatch;return(0,xn.isEqual)(e.pathname,r.pathname)&&C(b,i)}const Fa=r=>(0,Je.A)(e=>({root:{color:e.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit",textTransform:"none"},closed:{width:r.drawerWidthClosed,justifyContent:"center"},open:{[e.breakpoints.up("sm")]:{width:r.drawerWidthOpen}},highlightable:{"&:hover":{background:e.palette.navigation.navItem?.hoverBackground??"#404040"}},highlighted:{background:e.palette.navigation.navItem?.hoverBackground??"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:r.iconContainerWidth,marginRight:-e.spacing(2),display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"0"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:e.typography.fontWeightBold,fontSize:e.typography.fontSize},searchFieldHTMLInput:{padding:e.spacing(2,0,2)},searchContainer:{width:r.drawerWidthOpen-r.iconContainerWidth},secondaryAction:{width:e.spacing(6),textAlign:"center",marginRight:e.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:e.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${r.selectedIndicatorWidth}px ${e.palette.navigation.indicator}`,color:e.palette.navigation.selectedColor},"&$closed":{width:r.drawerWidthClosed},"& $closedItemIcon":{paddingRight:r.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-r.selectedIndicatorWidth}}}),{name:"BackstageSidebarItem"});function ss(r){return(0,d.useMemo)(()=>Fa(r),[r])()}const Na=(r,e)=>(0,ts.O)(r.props.children,s=>{let o=!1;return s.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:b})=>o=o||Dr(e,(0,wn.o1)(b)));return}i&&(o=Dr(e,(0,wn.o1)(i)))}}),o},[e.pathname]);function ks(r){return r.to===void 0}const ka=d.createElement(Ua).type,Wa=d.forwardRef(function({to:e,end:s,style:o,className:i,activeStyle:c,caseSensitive:b,activeClassName:C="active","aria-current":I="page",...K},_){let{pathname:gt}=(0,m.zy)(),{pathname:ot}=(0,m.x$)(e);b||(gt=gt.toLocaleLowerCase("en-US"),ot=ot.toLocaleLowerCase("en-US"));let vt=gt===ot;!vt&&!s&&(vt=gt.startsWith(`${ot}/`));const Mt=vt?I:void 0;return(0,a.jsx)(P.N_,{...K,to:e,ref:_,"aria-current":Mt,style:{...o,...vt?c:void 0},className:un()([typeof i!="function"?i:void 0,vt?C:void 0])})}),Lr=(0,d.forwardRef)((r,e)=>{const{icon:s,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:b=!1,onClick:C,noTrack:I,children:K,className:_,...gt}=r,{sidebarConfig:ot}=(0,d.useContext)(be.yY),vt=ss(ot),{isOpen:Mt}=$s(),Vt=!Mt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Te=(0,a.jsxs)(sn.A,{style:Vt,children:[(0,a.jsx)(s,{fontSize:"small"}),!Mt&&c?(0,a.jsx)(Rr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Be=(0,a.jsx)(La.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:un()({[vt.closedItemIcon]:!Mt}),children:Te}),Ie=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(sn.A,{"data-testid":"login-button",className:vt.iconContainer,children:Be}),o&&(0,a.jsx)(Fs.A,{variant:"subtitle2",component:"span",className:vt.label,children:o}),(0,a.jsx)("div",{className:vt.secondaryAction,children:K})]}),hn=Mt?Ie:Be,jr={onClick:C,className:un()(_,vt.root,Mt?vt.open:vt.closed,ks(r)&&vt.buttonItem,{[vt.highlightable]:!b})},Ur=(0,rr.s)(),{pathname:Ws}=(0,m.x$)(!ks(r)&&r.to?r.to:""),$r=(0,d.useCallback)(li=>{if(!I){const di="click",ui=o??"Sidebar Item",hi=Ws?{attributes:{to:Ws}}:void 0;Ur.captureEvent(di,ui,hi)}C?.(li)},[Ur,o,Ws,I,C]);return ks(r)?(0,a.jsx)(y.A,{role:"button","aria-label":o,...jr,ref:e,onClick:$r,children:hn}):(0,a.jsx)(Wa,{...jr,activeClassName:vt.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...gt,onClick:$r,children:hn})}),Ka=({children:r,...e})=>{const{sidebarConfig:s}=(0,d.useContext)(be.yY),o=ss(s),[i,c]=(0,d.useState)(!1),b=(0,m.zy)(),C=Na(r,b),I=(0,br.A)(ot=>ot.breakpoints.down("sm")),K=()=>{c(!0)},_=()=>{c(!1)},gt=()=>I?i?(0,a.jsx)(Ba.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ma.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(Rr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(be.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:_,onTouchStart:i?_:K,onMouseEnter:K,className:un()(i&&o.highlighted),children:[(0,a.jsx)(Lr,{hasSubmenu:!0,className:C?o.selected:"",...e,children:gt()}),i&&r]})})},Mr=(0,d.forwardRef)((r,e)=>{const[s]=(0,ts.O)(r.children,o=>o.getElements().filter(i=>i.type===ka));return s?(0,a.jsx)(Ka,{...r,children:s}):(0,a.jsx)(Lr,{...r,ref:e})});function Ri(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[s,o]=useState(""),i=ss(e),c=r.icon?r.icon:SearchIcon,b=()=>{r.onSearch(s),o("")},C=gt=>{gt.key==="Enter"&&(gt.preventDefault(),b())},I=gt=>{o(gt.target.value)},K=gt=>{gt.preventDefault(),gt.stopPropagation()},_=gt=>{b(),gt.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Mr,{icon:c,to:r.to,onClick:_,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:s,onClick:K,onChange:I,onKeyDown:C,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Ii=(0,ns.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Di=(0,ns.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),za=(0,ns.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ha=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),Li=(0,ns.A)("div")(({theme:r})=>{const e=Ha(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Mi=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=ss(r),{isOpen:s,setOpen:o}=useSidebarOpenState();if(useMediaQuery(b=>b.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!s)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:s?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Va=(0,Je.A)({root:{width:be.hC.drawerWidthClosed,height:3*be.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:be.hC.drawerWidthClosed,marginLeft:24}}),Ga=()=>{const r=Va(),{isOpen:e}=$s();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(xr.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(ua,{}):(0,a.jsx)(ga,{})})})},Ya=({children:r})=>(0,a.jsxs)(Cr.G,{children:[(0,a.jsxs)(Ia,{children:[(0,a.jsx)(Ga,{}),(0,a.jsx)(za,{}),(0,a.jsx)(Mr,{icon:la.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Qa=t(71677),Za=t(62437),Ja=t(55484),Xa=t(45061),_a=t(67289);const qa=(0,Je.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var ti=function(r){return r.LIGHT="light",r.DARK="dark",r}(ti||{});const ei=()=>{const r=(0,Tn.gf)(Yn),e=qa(),[s,o]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:Ja.A,title:"Dark theme"},dark:{icon:Za.A,title:"Light theme"}},{title:c,icon:b}=i[s],C=()=>{o(I=>{const K=I==="light"?"dark":"light";return r.setActiveThemeId(K),K})};return(0,a.jsx)(sn.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Qa.Ay,{title:c,arrow:!0,children:(0,a.jsx)(Sr.A,{size:"small",onClick:C,children:(0,a.jsx)(b,{className:e.headerIcon})})})})},ni=()=>(0,a.jsxs)(h.Wj,{children:[(0,a.jsx)(Xa.T,{}),(0,a.jsx)(_a.p,{withSearch:!1})]}),si=(0,a.jsx)(ni,{}),Br=jo({apis:ra,configLoader:ca,plugins:Object.values(n)}),ri=Br.getProvider(),oi=Br.getRouter(),ai=h.Ju.provide((0,p.Hr)({name:"ThemeToggleAddon",component:ei,location:g.e.Header})),ii=(0,a.jsxs)(ur,{children:[(0,a.jsx)(m.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(m.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(ea,{})}),(0,a.jsx)(m.qh,{path:"/docs",element:(0,a.jsx)(h.$j,{}),children:(0,a.jsx)(u.K,{})}),(0,a.jsxs)(m.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(h.Wj,{}),children:[si,(0,a.jsx)(p.po,{children:(0,a.jsx)(ai,{})})]})]}),ci=()=>(0,a.jsx)(ri,{children:(0,a.jsx)(oi,{children:(0,a.jsx)(Ya,{children:ii})})});x.createRoot(document.getElementById("root")).render((0,a.jsx)(ci,{}))},43836:(H,S,t)=>{"use strict";t.d(S,{qO:()=>x,tK:()=>d});var n=t(14041),a=t(63544);function d(h){return(0,a.Q)(h,()=>(0,n.createContext)(void 0))}function x(h){return(0,n.useContext)(d(h))}function m(h){return{set(u){globalThis[`__@backstage/${h}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${h}__`]}}}},10602:(H,S,t)=>{"use strict";t.d(S,{B:()=>n});function n(a){Object.freeze(a);const d={atVersion(x){return a[x]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return a}}),d}},63544:(H,S,t)=>{"use strict";t.d(S,{Q:()=>x});function n(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=n(),d=m=>`__@backstage/${m}__`;function x(m,h){const u=d(m);let p=a[u];return p||(p=h(),a[u]=p,p)}},7341:(H,S,t)=>{"use strict";t.d(S,{v:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.service"})},82292:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.entity-presentation"})},88083:(H,S,t)=>{"use strict";t.d(S,{T:()=>m});var n=t(6820),a=t(72348),d=t(46123),x=t.n(d);function m(g,y){const{kind:A,namespace:v,name:T,title:P,description:L,displayName:O,type:j}=u(g),$=(0,n.U2)({kind:A||"unknown",namespace:v||a.oQ,name:T||"unknown"}),M=p({kind:A,namespace:v,name:T,context:y}),J=[O,P,M].find(F=>F&&typeof F=="string"),Q=[J!==$?$:void 0,j,L].filter(F=>F&&typeof F=="string").join(" | ");return{entityRef:$,primaryTitle:J,secondaryTitle:Q||void 0,Icon:void 0}}const h=g=>!!g&&typeof g=="string";function u(g){if(typeof g=="string"){let y=g.indexOf(":");const A=g.indexOf("/");A!==-1&&A<y&&(y=-1);const v=y===-1?void 0:g.slice(0,y),T=A===-1?void 0:g.slice(y+1,A),P=g.slice(Math.max(y+1,A+1));return{kind:v,namespace:T,name:P}}if(typeof g=="object"&&g!==null){const y=[x()(g,"kind")].find(h),A=[x()(g,"metadata.namespace"),x()(g,"namespace")].find(h),v=[x()(g,"metadata.name"),x()(g,"name")].find(h),T=[x()(g,"metadata.title")].find(h),P=[x()(g,"metadata.description")].find(h),L=[x()(g,"spec.profile.displayName")].find(h),O=[x()(g,"spec.type")].find(h);return{kind:y,namespace:A,name:v,title:T,description:P,displayName:L,type:O}}return{}}function p(g){const y=g.kind?.toLocaleLowerCase("en-US")||"unknown",A=g.namespace||a.oQ,v=g.name||"unknown",T=g.context?.defaultKind?.toLocaleLowerCase("en-US"),P=g.context?.defaultNamespace?.toLocaleLowerCase("en-US");let L=v;return(P&&A.toLocaleLowerCase("en-US")!==P||A!==a.oQ)&&(L=`${A}/${L}`),T&&y.toLocaleLowerCase("en-US")!==T&&(L=`${y}:${L}`),L}},3169:(H,S,t)=>{"use strict";t.d(S,{f:()=>u});var n=t(6820),a=t(72427),d=t(14041),x=t(82292),m=t(88083);function h(p,g,y){const[A,v]=(0,d.useState)(p);return(0,d.useEffect)(()=>{v(p);const T=g?.subscribe({next:P=>{v(P)},complete:()=>{T?.unsubscribe()}});return()=>{T?.unsubscribe()}},y),A}function u(p,g){const A=(0,a.Q2)().get(x.n),v=[A,JSON.stringify(p),JSON.stringify(g||null)],T=(0,d.useMemo)(()=>{if(!A){const P=(0,m.T)(p,g);return{snapshot:P,promise:Promise.resolve(P)}}return A.forEntity(typeof p=="string"||"metadata"in p?p:(0,n.U2)(p),g)},v);return h(T.snapshot,T.update$,[T])}},18:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"catalog-react.starred-entities"})},22995:(H,S,t)=>{"use strict";t.d(S,{Q:()=>F});var n=t(31085),a=t(10394),d=t(72501),x=t(4321),m=t(87263),h=t(16249),u=t(33145),p=t(58837),g=t(87051),y=t(12398),A=t(6924),v=t(20577),T=t(14041),P=t(45250),L=t.n(P),O=t(53373),j=t.n(O);const $=(0,p.A)(V=>({root:{margin:V.spacing(1,0)},label:{position:"relative",fontWeight:"bold",fontSize:V.typography.body2.fontSize,fontFamily:V.typography.fontFamily,color:V.palette.text.primary,"& > span":{top:0,left:0,position:"absolute"}}}),{name:"BackstageAutocomplete"}),M=(0,g.A)(V=>(0,y.A)({root:{},paper:{margin:0},hasClearIcon:{},hasPopupIcon:{},focused:{},inputRoot:{marginTop:24,backgroundColor:V.palette.background.paper,"$root$hasClearIcon$hasPopupIcon &":{paddingBlock:V.spacing(.75),paddingInlineStart:V.spacing(.75)},"$root$focused &":{outline:"none"},"$root &:hover > fieldset":{borderColor:"#ced4da"},"$root$focused & > fieldset":{borderWidth:1,borderColor:V.palette.primary.main}},popupIndicator:{padding:0,margin:0,color:"#616161","&:hover":{backgroundColor:"unset"},'& [class*="MuiTouchRipple-root"]':{display:"none"}},endAdornment:{"$root$hasClearIcon$hasPopupIcon &":{right:4}},input:{"$root$hasClearIcon$hasPopupIcon &":{fontSize:V.typography.body1.fontSize,paddingBlock:V.spacing(.8125)}}}),{name:"BackstageAutocompleteBase"})(v.Ay),J=V=>(0,n.jsx)(m.A,{...V,transition:!0,placement:"bottom-start",children:({TransitionProps:Y})=>(0,n.jsx)(u.A,{...Y,style:{transformOrigin:"0 0 0"},children:(0,n.jsx)(a.A,{children:V.children})})}),Q=V=>(0,n.jsx)(x.A,{...V,elevation:8});function F(V){const{label:Y,name:nt,LabelProps:W,TextFieldProps:Z,...G}=V,at=$(),pt=(0,T.useCallback)(bt=>(0,n.jsx)(h.A,{...(0,P.merge)(bt,Z),variant:"outlined"}),[Z]),Et=(0,n.jsx)(M,{size:"small",...G,renderInput:G.renderInput??pt,popupIcon:(0,n.jsx)(A.A,{"data-testid":`${nt}-expand`}),PaperComponent:Q,PopperComponent:J});return(0,n.jsx)(a.A,{className:at.root,children:Y?(0,n.jsxs)(d.A,{...W,className:j()(at.label,W?.className),component:"label",children:[(0,n.jsx)(a.A,{component:"span",children:Y}),Et]}):Et})}},54203:(H,S,t)=>{"use strict";t.d(S,{GI:()=>L});var n=t(31085),a=t(14041),d=t(10394),x=t(64947),m=t(73845),h=t(42899),u=t(72501),p=t(5893),g=t(54917),y=t(65859),A=t(64630),v=t(87849);const T=O=>{const j=(0,p.A)(F=>F.breakpoints.down(O.options?.drawerBreakpoint??"md"),{noSsr:!0}),$=(0,g.A)(),[M,J]=(0,a.useState)(!1),{t:Q}=(0,v.i)(A.j);return j?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.A,{style:{marginTop:$.spacing(1),marginLeft:$.spacing(1)},onClick:()=>J(!0),startIcon:(0,n.jsx)(y.A,{}),children:Q("catalogFilter.buttonTitle")}),(0,n.jsx)(m.Ay,{open:M,onClose:()=>J(!1),anchor:O.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,n.jsxs)(d.A,{m:2,children:[(0,n.jsx)(u.A,{variant:"h6",component:"h2",style:{marginBottom:$.spacing(1)},children:Q("catalogFilter.title")}),O.children]})})]}):(0,n.jsx)(h.A,{item:!0,lg:2,children:O.children})},P=O=>(0,n.jsx)(h.A,{item:!0,xs:12,lg:10,children:O.children}),L=O=>(0,n.jsx)(h.A,{container:!0,style:{position:"relative"},children:O.children});L.Filters=T,L.Content=P},47144:(H,S,t)=>{"use strict";t.d(S,{y:()=>Q});var n=t(31085),a=t(10394),d=t(58837),x=t(14041),m=t(72427),h=t(73466),u=t(7341),p=t(69076),g=t(86901),y=t(44148),A=t(41260);const v=(0,n.jsx)(A.A,{fontSize:"small"}),T=(0,n.jsx)(y.A,{fontSize:"small"});function P({selected:F}){return(0,n.jsx)(p.A,{icon:v,checkedIcon:T,checked:F})}const L=(0,x.memo)(F=>{const{selected:V,value:Y,availableOptions:nt,showCounts:W}=F,Z=W?`${Y} (${nt?.[Y]})`:Y;return(0,n.jsx)(g.A,{control:(0,n.jsx)(P,{selected:V}),label:Z,onClick:G=>G.preventDefault()})});var O=t(21405),j=t(26796),$=t(22995),M=t(45250);const J=(0,d.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function Q(F){const{label:V,name:Y,path:nt,showCounts:W,Filter:Z,InputProps:G,initialSelectedOptions:at=[],filtersForAvailableValues:pt=["kind"],hidden:Et}=F,bt=J(),{updateFilters:At,filters:Dt,queryParameters:{[Y]:lt}}=(0,O.nK)(),dt=(0,m.gf)(u.v),xt=pt.map(rt=>Dt[rt]),{value:ft}=(0,h.A)(async()=>{const rt=nt,{facets:B}=await dt.getEntityFacets({facets:[rt],filter:(0,j.Rr)(xt.filter(Boolean))});return Object.fromEntries(B[rt].map(({value:z,count:ut})=>[z,ut]))},[...xt]),Ct=(0,x.useMemo)(()=>[lt].flat().filter(Boolean),[lt]),Pt=Dt[Y]?.values,[it,mt]=(0,x.useState)(Ct.length?Ct:Pt??at);(0,x.useEffect)(()=>{Ct.length&&mt(Ct)},[Ct]);const yt=Object.keys(ft??{}),et=it.length&&yt.length;(0,x.useEffect)(()=>{At({[Y]:et?new Z(it):void 0})},[Y,et,it,Z,At]),(0,x.useEffect)(()=>{if(!et)return;const rt=Pt??[];(0,M.isEqual)(rt,it)||mt(rt)},[Pt]);const ht=Dt[Y];return ht&&typeof ht=="object"&&!("values"in ht)||!yt.length||Et?null:(0,n.jsx)(a.A,{className:bt.root,pb:1,pt:1,children:(0,n.jsx)($.Q,{multiple:!0,disableCloseOnSelect:!0,label:V,name:`${String(Y)}-picker`,options:yt,value:it,TextFieldProps:G,onChange:(rt,B)=>mt(B),renderOption:(rt,{selected:B})=>(0,n.jsx)(L,{selected:B,value:rt,availableOptions:ft,showCounts:!!W})})})}},72987:(H,S,t)=>{"use strict";t.d(S,{t:()=>Pt});var n=t(31085),a=t(6820),d=t(10394),x=t(69076),m=t(86901),h=t(72501),u=t(71677),p=t(58837),g=t(44148),y=t(41260),A=t(14041),v=t(21405),T=t(92822),P=t(92367),L=t(48108),O=t(47966),j=t(90184),$=t(72427),M=t(87290),J=t(7341);function Q({enabled:it}){const mt=(0,$.gf)(J.v),[yt]=(0,A.useState)(async()=>{if(!it)return[];const et="relations.ownedBy";return mt.getEntityFacets({facets:[et]}).then(ht=>ht.facets[et].map(rt=>rt.value).map(rt=>{const{kind:B,name:z,namespace:ut}=(0,a.KU)(rt);return{apiVersion:"backstage.io/v1beta1",kind:B,metadata:{name:z,namespace:ut}}}).sort((rt,B)=>rt.kind.localeCompare(B.kind,"en-US")||rt.metadata.namespace.localeCompare(B.metadata.namespace,"en-US")||rt.metadata.name.localeCompare(B.metadata.name,"en-US"))).catch(()=>[])});return(0,M.A)(async(et,ht)=>{const rt=await yt;if(!rt)return{items:[]};const B=ht?.limit??20,{text:z,start:ut}=F(et),Ot=rt.filter(Lt=>nt(z,Lt)),It=ut+B;return{items:Ot.slice(0,It),...Y({entities:Ot,limit:It,payload:{text:z,start:It}})}},[yt],{loading:!0,value:{items:[]}})}function F(it){return V(it)&&it.cursor?JSON.parse(atob(it.cursor)):{text:it.text||"",start:0}}function V(it){return!!it.cursor}function Y({entities:it,limit:mt,payload:yt}){return it.length>mt?{cursor:btoa(JSON.stringify(yt))}:{}}function nt(it,mt){const yt=it.trim();return mt.kind.includes(yt)||mt.metadata.namespace?.includes(yt)||mt.metadata.name.includes(yt)}function W(){const it=(0,$.gf)(J.v);return(0,M.A)(async(mt,yt)=>{const et=mt,ht=mt,rt=yt?.limit??20;if(ht.cursor){const z=await it.queryEntities({cursor:ht.cursor,limit:rt});return{cursor:z.pageInfo.nextCursor,items:[...ht.items,...z.items]}}const B=await it.queryEntities({fullTextFilter:{term:et.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:rt});return{cursor:B.pageInfo.nextCursor,items:B.items}},[],{loading:!0})}var Z=t(76842);function G({mode:it,initialSelectedOwnersRefs:mt}){const yt=it==="owners-only",et=W(),ht=Q({enabled:yt}),[rt,B]=yt?ht:et;return[rt,B,at({enabled:!yt,initialSelectedOwnersRefs:mt})]}function at({enabled:it,initialSelectedOwnersRefs:mt}){const yt=(0,A.useRef)({}),et=(0,$.gf)(J.v),[,ht]=(0,M.A)(async()=>{(await et.getEntitiesByRefs({entityRefs:mt})).items.forEach(B=>{B&&(yt.current[(0,a.U2)(B)]=B)})},[]);return(0,Z.u)(()=>{it&&mt.length>0&&ht()}),{getEntity:rt=>yt.current[rt],setEntity:rt=>{yt.current[(0,a.U2)(rt)]=rt}}}var pt=t(87051),Et=t(3169),bt=t(64630),At=t(87849),Dt=t(22995);const lt=(0,p.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),dt=(0,pt.A)(it=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(m.A),xt=(0,n.jsx)(y.A,{fontSize:"small"}),ft=(0,n.jsx)(g.A,{fontSize:"small"});function Ct(it){const mt=lt(),yt=it.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:et}=(0,Et.f)(it.entity);return(0,n.jsx)(d.A,{className:mt.fullWidth,children:(0,n.jsx)(dt,{className:mt.fullWidth,control:(0,n.jsx)(x.A,{icon:xt,checkedIcon:ft,checked:it.isSelected}),onClick:ht=>ht.preventDefault(),label:(0,n.jsx)(u.Ay,{title:et,children:(0,n.jsxs)(d.A,{display:"flex",alignItems:"center",children:[yt?(0,n.jsx)(O.A,{fontSize:"small"}):(0,n.jsx)(L.A,{fontSize:"small"}),"\xA0",(0,n.jsx)(d.A,{className:mt.boxLabel,children:(0,n.jsx)(h.A,{noWrap:!0,children:et})})]})})})})}const Pt=it=>{const mt=lt(),{mode:yt="owners-only"}=it||{},{updateFilters:et,filters:ht,queryParameters:{owners:rt}}=(0,v.nK)(),[B,z]=(0,A.useState)(""),{t:ut}=(0,At.i)(bt.j),Ot=(0,A.useMemo)(()=>[rt].flat().filter(Boolean),[rt]),[It,Lt]=(0,A.useState)(Ot.length?Ot:ht.owners?.values??[]),[{value:Ut,loading:Nt},Wt,Kt]=G({mode:yt,initialSelectedOwnersRefs:It});(0,P.s)(()=>Wt({text:B}),[B,Wt],250);const te=Ut?.items||[];return(0,A.useEffect)(()=>{if(Ot.length){const jt=new T.N9(Ot);Lt(jt.values)}},[Ot]),(0,A.useEffect)(()=>{et({owners:It.length?new T.N9(It):void 0})},[It,et]),["user","group"].includes(ht.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,n.jsx)(d.A,{className:mt.root,pb:1,pt:1,children:(0,n.jsx)(Dt.Q,{label:ut("entityOwnerPicker.title"),multiple:!0,disableCloseOnSelect:!0,loading:Nt,options:te,value:It,getOptionSelected:(jt,kt)=>typeof kt=="string"?(0,a.U2)(jt)===kt:jt===kt,getOptionLabel:jt=>{const kt=typeof jt=="string"?Kt.getEntity(jt)||(0,a.KU)(jt,{defaultKind:"group",defaultNamespace:"default"}):jt;return(0,j.Z)(kt,(0,j.S)(kt))},onChange:(jt,kt)=>{z(""),Lt(kt.map(ee=>{const fe=typeof ee=="string"?ee:(0,a.U2)(ee);return typeof ee!="string"&&Kt.setEntity(ee),fe}))},filterOptions:jt=>jt,renderOption:(jt,{selected:kt})=>(0,n.jsx)(Ct,{entity:jt,isSelected:kt}),name:"owner-picker",onInputChange:(jt,kt)=>{z(kt)},ListboxProps:{onScroll:jt=>{const kt=jt.currentTarget;Math.abs(kt.scrollHeight-kt.clientHeight-kt.scrollTop)<1&&Ut?.cursor&&Wt({items:Ut.items,cursor:Ut.cursor})},"data-testid":"owner-picker-listbox"},LabelProps:{className:mt.label},TextFieldProps:{className:mt.input}})})}},8859:(H,S,t)=>{"use strict";t.d(S,{z:()=>P});var n=t(31085),a=t(6820),d=t(72348),x=t(72072),m=t(9222),h=t(14041),u=t(29207),p=t(10394),g=t(71677),y=t(58837),A=t(3169);const v=(0,y.A)(O=>({root:{display:"inline-flex",alignItems:"center",textDecoration:"inherit"},icon:{marginRight:O.spacing(.5),color:O.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),T=O=>{const{entityRef:j,hideIcon:$,disableTooltip:M,defaultKind:J,defaultNamespace:Q}=O,F=v(),{primaryTitle:V,secondaryTitle:Y,Icon:nt}=(0,A.f)(j,{defaultKind:J,defaultNamespace:Q});let W=(0,n.jsx)(n.Fragment,{children:V});return W=(0,n.jsxs)(p.A,{component:"span",className:F.root,children:[nt&&!$?(0,n.jsx)(p.A,{component:"span",className:F.icon,children:(0,n.jsx)(nt,{fontSize:"inherit"})}):null,W]}),Y&&!M&&(W=(0,n.jsx)(g.Ay,{enterDelay:1500,title:Y,children:W})),W},P=(0,h.forwardRef)((O,j)=>{const{entityRef:$,defaultKind:M,defaultNamespace:J,title:Q,children:F,hideIcon:V,disableTooltip:Y,...nt}=O,W=L(O.entityRef),Z=F??Q??(0,n.jsx)(T,{entityRef:$,defaultKind:M,defaultNamespace:J,hideIcon:V,disableTooltip:Y});return(0,n.jsx)(x.N_,{...nt,ref:j,to:W,children:Z})});function L(O){const j=(0,m.S)(u.s);let $,M,J;if(typeof O=="string"){const F=(0,a.KU)(O);$=F.kind,M=F.namespace,J=F.name}else"metadata"in O?($=O.kind,M=O.metadata.namespace,J=O.metadata.name):($=O.kind,M=O.namespace,J=O.name);$=$.toLocaleLowerCase("en-US"),M=M?.toLocaleLowerCase("en-US")??d.oQ;const Q={kind:encodeURIComponent($),namespace:encodeURIComponent(M),name:encodeURIComponent(J)};return j(Q)}},34428:(H,S,t)=>{"use strict";t.d(S,{i:()=>m});var n=t(31085),a=t(6820),d=t(14041),x=t(8859);function m(h){const{entityRefs:u,hideIcons:p,...g}=h;return(0,n.jsx)(n.Fragment,{children:u.map((y,A)=>{const v=typeof y=="string"?y:(0,a.U2)(y);return(0,n.jsxs)(d.Fragment,{children:[A>0&&", ",(0,n.jsx)(x.z,{...g,entityRef:y,hideIcon:p})]},`${A}.${v}`)})})}},90184:(H,S,t)=>{"use strict";t.d(S,{S:()=>x,Z:()=>m});var n=t(72348),a=t(46123),d=t.n(a);function x(h,u){const p=u?.defaultKind;let g,y,A;return"metadata"in h?(g=h.kind,y=h.metadata.namespace,A=h.metadata.name):(g=h.kind,y=h.namespace,A=h.name),(y===void 0||y==="")&&(y=n.oQ),u?.defaultNamespace!==void 0?u?.defaultNamespace===y&&(y=void 0):y===n.oQ&&(y=void 0),g=g.toLocaleLowerCase("en-US"),g=p&&p.toLocaleLowerCase("en-US")===g?void 0:g,`${g?`${g}:`:""}${y?`${y}/`:""}${A}`}function m(h,u){for(const p of["spec.profile.displayName","metadata.title"]){const g=d()(h,p);if(g&&typeof g=="string")return g}return u}},91035:(H,S,t)=>{"use strict";t.d(S,{m:()=>g});var n=t(31085),a=t(58837),d=t(14041),x=t(92822),m=t(47144),h=t(64630),u=t(87849);const p=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),g=y=>{const A=p(),{t:v}=(0,u.i)(h.j);return(0,n.jsx)(m.y,{label:v("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:x.q_,showCounts:y.showCounts,InputProps:{className:A.input},initialSelectedOptions:y.initialFilter?y.initialFilter:[],hidden:y.hidden})}},67626:(H,S,t)=>{"use strict";t.d(S,{y:()=>Dt});var n=t(31085),a=t(72427),d=t(65461),x=t(40703),m=t(58007),h=t(68804),u=t(65569),p=t(5951),g=t(26343),y=t(72501),A=t(58837),v=t(9684),T=t(31129),P=t(14041),L=t(92822),O=t(21405),j=t(16009),$=t(45250),M=t(73466),J=t(7341),Q=t(26796),F=t(87290),V=t(48899);function Y(){const lt=(0,a.gf)(j.K),dt=(0,a.gf)(J.v),{filters:xt}=(0,O.nK)(),{value:ft,loading:Ct}=(0,M.A)(async()=>(await lt.getBackstageIdentity()).ownershipEntityRefs,[]),{user:Pt,owners:it,...mt}=xt,yt=(0,Q.$3)((0,$.compact)(Object.values(mt))),[{value:et,loading:ht},rt]=(0,F.A)(async z=>{const ut=nt(z.owners,z.ownershipEntityRefs);if(ut===void 0)return 0;const{["metadata.name"]:Ot,...It}=z.filter.filter,{totalItems:Lt}=await dt.queryEntities({...z.filter,filter:{...It,"relations.ownedBy":ut},limit:0});return Lt},[],{loading:!0});return(0,V.A)(()=>{Object.keys(yt.filter).length!==0&&ft!==void 0&&rt({ownershipEntityRefs:ft,owners:it,filter:yt})},[ft,it,yt]),{count:et,loading:Ct||ht,filter:(0,P.useMemo)(()=>L.tN.owned(ft??[]),[ft]),ownershipEntityRefs:ft}}function nt(lt,dt){if(dt===void 0)return;const xt=lt?.values??[];if(xt.length){const ft=(0,$.intersection)(xt,dt);return ft.length===0?void 0:ft}return dt}function W(){const lt=(0,a.gf)(J.v),{filters:dt}=(0,O.nK)(),xt=(0,P.useRef)(),ft=(0,P.useMemo)(()=>{const{user:it,...mt}=dt,yt=(0,$.compact)(Object.values(mt)),et=(0,Q.$3)(yt),ht={...et,limit:0};return Object.keys(et.filter).length===0?(xt.current=void 0,xt.current):(0,$.isEqual)(ht,xt.current)?xt.current:(xt.current=ht,ht)},[dt]),{value:Ct,loading:Pt}=(0,M.A)(async()=>{if(ft===void 0)return 0;const{totalItems:it}=await lt.queryEntities(ft);return it},[ft]);return{count:Ct,loading:Pt}}var Z=t(6820),G=t(56889);function at(){const lt=(0,a.gf)(J.v),{filters:dt}=(0,O.nK)(),{starredEntities:xt}=(0,G.I)(),ft=(0,P.useRef)(),Ct=(0,P.useMemo)(()=>{const{user:yt,...et}=dt,ht=(0,$.compact)(Object.values(et)),rt=(0,Q.$3)(ht),z={...rt,filter:{...rt.filter,["metadata.name"]:Array.from(xt).map(ut=>(0,Z.KU)(ut).name)},limit:1e3};return(0,$.isEqual)(z,ft.current)?ft.current:(ft.current=z,z)},[dt,xt]),{value:Pt,loading:it}=(0,M.A)(async()=>xt.size?(await lt.queryEntities(Ct)).items.map(et=>(0,Z.U2)({kind:et.kind,namespace:et.metadata.namespace,name:et.metadata.name})).filter(et=>xt.has(et)).length:0,[Ct,xt]),mt=(0,P.useMemo)(()=>L.tN.starred(Array.from(xt)),[xt]);return{count:Pt,loading:it,filter:mt}}var pt=t(87849),Et=t(64630);const bt=(0,A.A)(lt=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:lt.spacing(1,0,1,0)},title:{margin:lt.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:lt.palette.text.primary},menuItem:{minHeight:lt.spacing(6)},groupWrapper:{margin:lt.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function At(lt,dt){return[{name:dt("userListPicker.personalFilter.title"),items:[{id:"owned",label:dt("userListPicker.personalFilter.ownedLabel"),icon:v.A},{id:"starred",label:dt("userListPicker.personalFilter.starredLabel"),icon:T.Gg}]},{name:lt,items:[{id:"all",label:dt("userListPicker.orgFilterAllLabel")}]}]}const Dt=lt=>{const{initialFilter:dt,availableFilters:xt,hidden:ft,alwaysKeepFilters:Ct}=lt,Pt=bt(),it=(0,a.gf)(d.U),{t:mt}=(0,pt.i)(Et.j),yt=it.getOptionalString("organization.name")??mt("userListPicker.defaultOrgName"),{filters:et,updateFilters:ht,queryParameters:{kind:rt,user:B}}=(0,O.nK)(),z=["starred","all"],ut=At(yt,mt).map(Gt=>({...Gt,items:Gt.items.filter(({id:ne})=>["group","user"].some(de=>de===rt)?z.includes(ne):!xt||xt.includes(ne))})).filter(({items:Gt})=>!!Gt.length),{count:Ot,loading:It,filter:Lt}=Y(),{count:Ut}=W(),{count:Nt,filter:Wt,loading:Kt}=at(),te=(0,P.useMemo)(()=>[B].flat()[0],[B]),[jt,kt]=(0,P.useState)(te??dt),ee=(0,P.useMemo)(()=>({all:Ut,starred:Nt,owned:Ot}),[Nt,Ot,Ut]);(0,P.useEffect)(()=>{te&&kt(te)},[te]);const fe=It||Kt;return(0,P.useEffect)(()=>{!fe&&jt&&jt!=="all"&&ee[jt]===0&&!Ct&&kt("all")},[fe,ee,jt,kt,Ct]),(0,P.useEffect)(()=>{if(!jt||fe)return;ht({user:jt==="owned"?Lt:jt==="starred"?Wt:L.tN.all()})},[jt,Wt,Lt,ht,fe]),ft?null:(0,n.jsx)(x.A,{className:Pt.root,children:ut.map(Gt=>(0,n.jsxs)(P.Fragment,{children:[(0,n.jsx)(y.A,{variant:"subtitle2",component:"span",className:Pt.title,children:Gt.name}),(0,n.jsx)(x.A,{className:Pt.groupWrapper,children:(0,n.jsx)(m.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":Gt.name,children:Gt.items.map((ne,de)=>(0,n.jsxs)(g.A,{role:"none presentation",divider:de!==Gt.items.length-1,onClick:()=>kt(ne.id),selected:ne.id===et.user?.value,className:Pt.menuItem,disabled:ee[ne.id]===0,"data-testid":`user-picker-${ne.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[ne.icon&&(0,n.jsx)(h.A,{className:Pt.listIcon,children:(0,n.jsx)(ne.icon,{fontSize:"small"})}),(0,n.jsx)(p.A,{children:(0,n.jsxs)(y.A,{variant:"body1",children:[ne.label," "]})}),(0,n.jsx)(u.A,{children:ee[ne.id]??"-"})]},ne.id))})})]},Gt.name))})}},92822:(H,S,t)=>{"use strict";t.d(S,{I5:()=>g,Kf:()=>T,N9:()=>p,V3:()=>u,gM:()=>x,gZ:()=>v,mT:()=>P,qA:()=>m,q_:()=>h,tN:()=>A,z:()=>y});var n=t(6820),a=t(51372),d=t(67871);class x{value;label;constructor(O,j){this.value=O,this.label=j}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class m{value;constructor(O){this.value=O}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class h{values;constructor(O){this.values=O}filterEntity(O){return this.values.every(j=>(O.metadata.tags??[]).includes(j))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class u{value;constructor(O){this.value=O}filterEntity(O){const j=this.toUpperArray(this.value.split(/\s/)),$=this.toUpperArray([O.metadata.tags]),M=this.toUpperArray([O.metadata.name,O.metadata.title,O.spec?.profile?.displayName]);for(const J of j)if($.every(Q=>Q!==J)&&M.every(Q=>!Q.includes(J)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(O){return O.flat().filter(j=>!!j).map(j=>j.toLocaleUpperCase("en-US"))}}class p{values;constructor(O){this.values=O.reduce((j,$)=>{try{return j.push((0,n.U2)((0,n.KU)($,{defaultKind:"Group"}))),j}catch{return j}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(O){return this.values.some(j=>(0,d.t)(O,a.vv).some($=>(0,n.U2)($)===j))}toQueryValue(){return this.values}}class g{values;constructor(O){this.values=O}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(O){return this.values.some(j=>O.spec?.lifecycle===j)}toQueryValue(){return this.values}}class y{values;constructor(O){this.values=O}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(O){return this.values.some(j=>O.metadata.namespace===j)}toQueryValue(){return this.values}}class A{value;refs;constructor(O,j){this.value=O,this.refs=j}static owned(O){return new A("owned",O)}static all(){return new A("all")}static starred(O){return new A("starred",O)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(O=>(0,n.KU)(O).name)??[]}:{}}filterEntity(O){if(this.value==="starred")return this.refs?.includes((0,n.U2)(O))??!0;if(this.value==="owned"){const j=(0,d.t)(O,a.vv);return this.refs?.some($=>j.some(M=>(0,n.U2)(M)===$))??!1}return!0}toQueryValue(){return this.value}}class v{value;isOwnedEntity;isStarredEntity;constructor(O,j,$){this.value=O,this.isOwnedEntity=j,this.isStarredEntity=$}filterEntity(O){switch(this.value){case"owned":return this.isOwnedEntity(O);case"starred":return this.isStarredEntity(O);default:return!0}}toQueryValue(){return this.value}}class T{value;constructor(O){this.value=O}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(O){const j=O.metadata.annotations?.["backstage.io/orphan"];return j!==void 0&&this.value.toString()===j}}class P{value;constructor(O){this.value=O}filterEntity(O){const j=O?.status?.items?.length>0;return j!==void 0&&this.value===j}}},21405:(H,S,t)=>{"use strict";t.d(S,{B9:()=>L,nK:()=>O});var n=t(31085),a=t(45250),d=t.n(a),x=t(45810),m=t.n(x),h=t(14041),u=t(18690),p=t(87290),g=t(22771),y=t(71581),A=t(7341),v=t(26796),T=t(72427);const P=(0,h.createContext)(void 0),L=j=>{const $=(0,y.A)(),M=(0,T.gf)(A.v),[J,Q]=(0,h.useState)({}),F=(0,u.zy)(),Y=j.pagination===!0?"cursor":typeof j.pagination=="object"?j.pagination.mode??"cursor":"none",nt=typeof j.pagination=="object"?j.pagination.limit??20:20,{queryParameters:W,cursor:Z,offset:G,limit:at}=(0,h.useMemo)(()=>{const et=m().parse(F.search,{ignoreQueryPrefix:!0});let ht=nt;if(typeof et.limit=="string"){const B=Number.parseInt(et.limit,10);isNaN(B)||(ht=B)}const rt=typeof et.offset=="string"&&Y==="offset"?Number.parseInt(et.offset,10):void 0;return{queryParameters:et.filters??{},cursor:typeof et.cursor=="string"&&Y==="cursor"?et.cursor:void 0,offset:Y==="offset"&&rt&&!isNaN(rt)?rt:void 0,limit:ht}},[Y,F.search,nt]),[pt,Et]=(0,h.useState)(Z),[bt,At]=(0,h.useState)(G),[Dt,lt]=(0,h.useState)(at),[dt,xt]=(0,h.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:{},offset:bt,limit:Dt})),[{loading:ft,error:Ct},Pt]=(0,p.A)(async()=>{const et=(0,a.compact)(Object.values(J)),ht=Object.keys(J).reduce((rt,B)=>{const z=J[B];return z?.toQueryValue&&(rt[B]=z.toQueryValue()),rt},{});if(Y!=="none")if(pt){if(pt!==dt.appliedCursor){const rt=(0,v.be)(et),B=await M.queryEntities({cursor:pt,limit:Dt});xt({appliedFilters:J,appliedCursor:pt,backendEntities:B.items,entities:B.items.filter(rt),pageInfo:B.pageInfo,totalItems:B.totalItems})}}else{const rt=(0,v.be)(et),B=(0,v.$3)(et),z=(0,v.$3)((0,a.compact)(Object.values(dt.appliedFilters)));if(Y==="offset"&&(dt.limit!==Dt||dt.offset!==bt)||!(0,a.isEqual)(z,B)){const ut=await M.queryEntities({...B,limit:Dt,offset:bt,orderFields:[{field:"metadata.name",order:"asc"}]});xt({appliedFilters:J,backendEntities:ut.items,entities:ut.items.filter(rt),pageInfo:ut.pageInfo,totalItems:ut.totalItems,limit:Dt,offset:bt})}}else{const rt=(0,v.be)(et),B=(0,v.Rr)(et),z=(0,v.Rr)((0,a.compact)(Object.values(dt.appliedFilters)));if((0,a.isEqual)(z,B)){const ut=dt.backendEntities.filter(rt);xt({appliedFilters:J,backendEntities:dt.backendEntities,entities:ut,totalItems:ut.length})}else{const ut=await M.getEntities({filter:B}),Ot=ut.items.filter(rt);xt({appliedFilters:J,backendEntities:ut.items,entities:Ot,totalItems:Ot.length})}}if($()){const rt=m().parse(F.search,{ignoreQueryPrefix:!0}),B=m().stringify({...rt,filters:ht,cursor:pt,offset:bt,limit:Dt},{addQueryPrefix:!0,arrayFormat:"repeat"}),z=`${window.location.pathname}${B}`;window.history?.replaceState(null,document.title,z)}},[M,W,J,dt,pt,Y,Dt,bt],{loading:!0});(0,g.A)(Pt,10,[J,pt,Dt,bt]);const it=(0,h.useCallback)(et=>{Et(void 0),Q(ht=>{const rt=typeof et=="function"?et(ht):et;return{...ht,...rt}})},[]),mt=(0,h.useMemo)(()=>{if(Y!=="cursor")return;const et=dt.pageInfo?.prevCursor,ht=dt.pageInfo?.nextCursor;return{prev:et?()=>Et(et):void 0,next:ht?()=>Et(ht):void 0}},[Y,dt.pageInfo]),yt=(0,h.useMemo)(()=>({filters:dt.appliedFilters,entities:dt.entities,backendEntities:dt.backendEntities,updateFilters:it,queryParameters:W,loading:ft,error:Ct,pageInfo:mt,totalItems:dt.totalItems,limit:Dt,offset:bt,setLimit:lt,setOffset:At,paginationMode:Y}),[dt,it,W,ft,Ct,mt,Dt,bt,Y,lt,At]);return(0,n.jsx)(P.Provider,{value:yt,children:j.children})};function O(){const j=(0,h.useContext)(P);if(!j)throw new Error("useEntityList must be used within EntityListProvider");return j}},56889:(H,S,t)=>{"use strict";t.d(S,{I:()=>u});var n=t(6820),a=t(72427),d=t(14041),x=t(1394),m=t(18);function h(p){return typeof p=="string"?p:(0,n.U2)(p)}function u(){const p=(0,a.gf)(m.a),g=(0,x.A)((0,d.useMemo)(()=>p.starredEntitie$(),[p]),new Set),y=(0,d.useCallback)(v=>g.has(h(v)),[g]),A=(0,d.useCallback)(v=>p.toggleStarred(h(v)).then(),[p]);return{starredEntities:g,toggleStarredEntity:A,isStarredEntity:y}}},29207:(H,S,t)=>{"use strict";t.d(S,{s:()=>d});var n=t(34569),a=t(63544);const d=(0,a.Q)("catalog:entity-route-ref",()=>(0,n.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function x(m){return{kind:m.kind.toLocaleLowerCase("en-US"),namespace:m.metadata.namespace?.toLocaleLowerCase("en-US")??DEFAULT_NAMESPACE,name:m.metadata.name}}},64630:(H,S,t)=>{"use strict";t.d(S,{j:()=>a});var n=t(93184);const a=(0,n.h)({id:"catalog-react",messages:{catalogFilter:{title:"Filters",buttonTitle:"Filters"},entityKindPicker:{title:"Kind",errorMessage:"Failed to load entity kinds"},entityLifecyclePicker:{title:"Lifecycle"},entityNamespacePicker:{title:"Namespace"},entityOwnerPicker:{title:"Owner"},entityProcessingStatusPicker:{title:"Processing Status"},entityTagPicker:{title:"Tags"},entityPeekAheadPopover:{title:"Drill into the entity to see all of the tags.",emailCardAction:{title:"Email {{email}}",subTitle:"mailto {{email}}"},entityCardActionsTitle:"Show details"},entitySearchBar:{placeholder:"Search"},entityTypePicker:{title:"Type",errorMessage:"Failed to load entity types",optionAllTitle:"all"},favoriteEntity:{addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites"},inspectEntityDialog:{title:"Entity Inspector",closeButtonTitle:"Close",ancestryPage:{title:"Ancestry"},colocatedPage:{title:"Colocated",description:"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).",alertNoLocation:"Entity had no location information.",alertNoEntity:"There were no other entities on this location."},jsonPage:{title:"Entity as JSON",description:"This is the raw entity data as received from the catalog, on JSON form."},overviewPage:{title:"Overview"},yamlPage:{title:"Entity as YAML",description:"This is the raw entity data as received from the catalog, on YAML form."}},unregisterEntityDialog:{title:"Are you sure you want to unregister this entity?",cancelButtonTitle:"Cancel",deleteButtonTitle:"Delete Entity",deleteEntitySuccessMessage:"Removed entity {{entityName}}",bootstrapState:{title:'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.',advancedDescription:"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.",advancedOptions:"Advanced Options"},onlyDeleteStateTitle:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.",unregisterState:{title:"This action will unregister the following entities:",subTitle:"Located at the following location:",description:"To undo, just re-register the entity in {{appTitle}}.",unregisterButtonTitle:"Unregister Location",advancedOptions:"Advanced Options",advancedDescription:"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."},errorStateTitle:"Internal error: Unknown state"},userListPicker:{defaultOrgName:"Company",personalFilter:{title:"Personal",ownedLabel:"Owned",starredLabel:"Starred"},orgFilterAllLabel:"All"}}})},26796:(H,S,t)=>{"use strict";t.d(S,{$3:()=>d,Rr:()=>x,be:()=>m});var n=t(92822);function a(h){return!!h.getFullTextFilters}function d(h){const u=h.reduce((g,y)=>({...g,...y.getCatalogFilters?y.getCatalogFilters():{}}),{}),p=h.find(a)?.getFullTextFilters();return{filter:u,fullTextFilter:p}}function x(h){const u={};return h.forEach(p=>{p instanceof n.q_||p instanceof n.N9||p instanceof n.I5||p instanceof n.z||p instanceof n.tN||p instanceof n.Kf||p instanceof n.V3||p instanceof n.gZ||Object.assign(u,p.getCatalogFilters?.()||{})}),u}function m(h){return u=>h.every(p=>!p.filterEntity||p.filterEntity(u))}},67871:(H,S,t)=>{"use strict";t.d(S,{t:()=>a});var n=t(6820);function a(d,x,m){let h=d?.relations?.filter(u=>u.type===x).map(u=>(0,n.KU)(u.targetRef))||[];return m?.kind&&(h=h.filter(u=>u.kind.toLocaleLowerCase("en-US")===m.kind.toLocaleLowerCase("en-US"))),h}},95203:(H,S,t)=>{"use strict";t.d(S,{qP:()=>h,Zg:()=>p,rQ:()=>y,pS:()=>g,UJ:()=>u});var n=t(59598);class a{id;params;optional;defaultTarget;[x=n.b];constructor(v,T,P,L){this.id=v,this.params=T,this.optional=P,this.defaultTarget=L,this[x]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function d(A){return new a(A.id,A.params??[],!!A.optional,A?.defaultTarget)}var x,m=t(34569);const h=d({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),u=d({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),p=d({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),g=d({id:"catalog:unregister-redirect",optional:!0}),y=(0,m.H)({id:"catalog"})},54241:(H,S,t)=>{"use strict";t.d(S,{b:()=>n});var n=function(a){return a.DENY="DENY",a.ALLOW="ALLOW",a.CONDITIONAL="CONDITIONAL",a}({})},96824:(H,S,t)=>{"use strict";t.d(S,{x:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.permission.api"})},70734:(H,S,t)=>{"use strict";t.d(S,{e:()=>m});var n=t(31085),a=t(14041),d=t(58837);const x=(0,d.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),m=h=>{const{text:u,preTag:p,postTag:g}=h,y=x(),A=(0,a.useMemo)(()=>u.split(new RegExp(`(${p}.+?${g})`)),[g,p,u]);return(0,n.jsx)(n.Fragment,{children:A.map((v,T)=>v.includes(p)?(0,n.jsx)("mark",{className:y.highlight,children:v.replace(new RegExp(`${p}|${g}`,"g"),"")},T):v)})}},54560:(H,S,t)=>{"use strict";t.d(S,{ec:()=>g});var n=t(31085),a=t(14041),d=t(93368),x=t(88758),m=t(8109);const h="search.results.list.items.extensions.v1",u=(v,T)=>{for(const P of v)if(!(!isValidElement(P)||!getComponentData(P,h)?.(T)))return cloneElement(P,{rank:T.rank,highlight:T.highlight,result:T.document,...P.props});return null},p=v=>{const{rank:T,result:P,noTrack:L,children:O,alignItems:j="flex-start",...$}=v,M=(0,d.s)(),J=(0,a.useCallback)(()=>{L||P&&M.captureEvent("discover",P.title,{attributes:{to:P.location},value:T})},[T,P,L,M]);return(0,n.jsx)(m.A,{divider:!0,alignItems:j,onClickCapture:J,...$,children:O})},g=v=>{const{name:T,component:P,predicate:L=()=>!0}=v;return(0,x.zZ)({name:T,component:{lazy:()=>P().then(O=>j=>(0,n.jsx)(p,{rank:j.rank,result:j.result,noTrack:j.noTrack,children:(0,a.createElement)(O,j)}))},data:{[h]:L}})},y=v=>{const T=useElementFilter(v,P=>P.selectByComponentData({key:h}).getElements(),[v]);return useCallback((P,L)=>{const O=u(T,P);return _jsx(Fragment,{children:O??_jsx(p,{rank:P.rank,result:P.document,children:_jsx(DefaultResultListItem,{rank:P.rank,highlight:P.highlight,result:P.document})})},L)},[T])},A=v=>{const{results:T,children:P,...L}=v,O=y(P);return _jsx(List,{...L,children:T.map(O)})}},86202:(H,S,t)=>{"use strict";t.d(S,{A:()=>n,G:()=>a});const n="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity"},72020:(H,S,t)=>{"use strict";t.d(S,{AF:()=>p,Hr:()=>A,Wm:()=>u,YR:()=>L,po:()=>g});var n=t(31085),a=t(14041),d=t(18690),x=t(19402),m=t(88758),h=t(82442);const u="techdocs.addons.addon.v1",p="techdocs.addons.wrapper.v1",g=()=>null;(0,x.h)(g,p,!0);const y=O=>`${u}.${O.toLocaleLowerCase("en-US")}`;function A(O){const{name:j,component:$}=O;return(0,m.zZ)({name:j,component:{sync:M=>(0,n.jsx)($,{...M})},data:{[u]:O,[y(j)]:!0}})}const v=(O,j)=>O.selectByComponentData({key:j}).getElements()[0],T=O=>O.selectByComponentData({key:p}).selectByComponentData({key:u}),P=O=>O.selectByComponentData({key:p}).findComponentData({key:u}),L=()=>{const O=(0,d.P1)(),j=(0,h.O)(O,T),$=(0,h.O)(O,P),M=(0,a.useCallback)(F=>{if(!j||!F)return null;const V=y(F.name);return v(j,V)??null},[j]),J=(0,a.useCallback)(F=>{const V=$.find(Y=>Y.name===F);return V?M(V):null},[$,M]),Q=(0,a.useCallback)(F=>{const V=$.filter(Y=>Y.location===F);return V.length?V.map(M):null},[$,M]);return{renderComponentByName:J,renderComponentsByLocation:Q}}},26679:(H,S,t)=>{"use strict";t.d(S,{l:()=>a,s:()=>d});var n=t(55309);const a=(0,n.y)({id:"plugin.techdocs.service"}),d=(0,n.y)({id:"plugin.techdocs.storageservice"})},86892:(H,S,t)=>{"use strict";t.d(S,{R:()=>O,V:()=>j});var n=t(31085),a=t(14041),d=t(73466),x=t(28966),m=t(6820),h=t(43836),u=t(10602),p=t(72427),g=t(65461),y=t(25862),A=t(26679);function v($,M){return M.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||($.kind=$.kind.toLocaleLowerCase(),$.name=$.name.toLocaleLowerCase(),$.namespace=$.namespace.toLocaleLowerCase()),$}const T=($,M)=>(0,m.U2)($)===(0,m.U2)(M),P={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},L=(0,h.tK)("techdocs-reader-page-context"),O=(0,a.memo)($=>{const{entityRef:M,children:J}=$,Q=(0,p.gf)(A.l),F=(0,p.gf)(g.U),V=(0,d.A)(async()=>Q.getEntityMetadata(M),[M]),Y=(0,x.A)(async()=>Q.getTechDocsMetadata(M),[M]),[nt,W]=(0,a.useState)(P.title),[Z,G]=(0,a.useState)(P.subtitle),[at,pt]=(0,a.useState)(P.shadowRoot);(0,a.useEffect)(()=>{at&&!Y.value&&!Y.loading&&Y.retry()},[Y.value,Y.loading,at,Y.retry,Y]);const Et={metadata:Y,entityRef:v(M,F),entityMetadata:V,shadowRoot:at,setShadowRoot:pt,title:nt,setTitle:W,subtitle:Z,setSubtitle:G},bt=(0,u.B)({1:Et});return(0,n.jsx)(y.Ig,{attributes:{entityRef:(0,m.U2)(M)},children:(0,n.jsx)(L.Provider,{value:bt,children:J instanceof Function?J(Et):J})})},($,M)=>T($.entityRef,M.entityRef)),j=()=>{const $=(0,a.useContext)(L);if($===void 0)return P;const M=$.atVersion(1);if(M===void 0)throw new Error("No context found for version 1.");return M}},99730:(H,S,t)=>{"use strict";t.d(S,{e:()=>n});const n=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(H,S,t)=>{"use strict";t.d(S,{V:()=>n});function n(a,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},8915:(H,S,t)=>{"use strict";t.d(S,{K:()=>Dt});var n=t(31085),a=t(14041),d=t(59428),x=t(27586),m=t(26280),h=t(21405),u=t(54203),p=t(67626),g=t(72987),y=t(91035),A=t(81859),v=t(86519),T=t(86202);class P{getCatalogFilters(){return{[`metadata.annotations.${T.A}`]:v.c}}}const L=()=>{const{updateFilters:lt}=(0,h.nK)();return(0,a.useEffect)(()=>{lt({techdocs:new P})},[lt]),null};var O=t(36338),j=t(45250),$=t(88640),M=t(77310),J=t(9222),Q=t(72427),F=t(65461),V=t(56889),Y=t(27125),nt=t(14209),W=t(92822);function Z(lt){const{actions:dt,columns:xt,data:ft,isLoading:Ct,options:Pt}=lt,{updateFilters:it,setLimit:mt,setOffset:yt,limit:et,totalItems:ht,offset:rt}=(0,h.nK)(),[B,z]=a.useState(rt&&et?Math.floor(rt/et):0);return(0,a.useEffect)(()=>{ht&&B*et>=ht?yt(Math.max(0,ht-et)):yt(Math.max(0,B*et))},[yt,B,et,ht]),(0,n.jsx)(nt.X,{columns:xt,data:ft,options:{paginationPosition:"both",pageSizeOptions:[5,10,20,50,100],pageSize:et,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,...Pt},actions:dt,onSearchChange:ut=>it({text:ut?new W.V3(ut):void 0}),page:B,onPageChange:ut=>{z(ut)},onRowsPerPageChange:ut=>{mt(ut)},totalCount:ht,localization:{pagination:{labelDisplayedRows:""}},isLoading:Ct})}function G(lt){const{actions:dt,columns:xt,data:ft,next:Ct,prev:Pt,title:it,isLoading:mt,options:yt,...et}=lt;return(0,n.jsx)(nt.X,{title:mt?"":it,columns:xt,data:ft,options:{paginationPosition:"both",...yt,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1,actionsColumnIndex:-1},onPageChange:ht=>{ht>0?Ct?.():Pt?.()},page:Pt?1:0,totalCount:Ct?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},isLoading:mt,...et})}var at=t(84295),pt=t(42717),Et=t(82779),bt=t(23747);const At=lt=>{const{columns:dt,actions:xt,options:ft}=lt,{loading:Ct,error:Pt,entities:it,filters:mt,paginationMode:yt,pageInfo:et}=(0,h.nK)(),{isStarredEntity:ht,toggleStarredEntity:rt}=(0,V.I)(),[,B]=(0,O.A)(),z=(0,J.S)(Et.Oc),ut=(0,Q.gf)(F.U),Ot=(0,j.capitalize)(mt.user?.value??"all"),It=[at.f.createCopyDocsUrlAction(B),at.f.createStarEntityAction(ht,rt)],Lt=(0,bt.H)(it,z,ut);return yt==="cursor"?(0,n.jsx)(G,{columns:dt||pt.F,isLoading:Ct,title:Ot,actions:xt||It,options:ft,data:Lt,next:et?.next,prev:et?.prev}):yt==="offset"?(0,n.jsx)(Z,{columns:dt||pt.F,isLoading:Ct,title:Ot,actions:xt||It,options:ft,data:Lt}):Pt?(0,n.jsx)($.B,{severity:"error",title:"Could not load available documentation.",children:(0,n.jsx)(M.z,{language:"text",text:Pt.toString()})}):(0,n.jsx)(Y.o,{title:Ot,entities:it,loading:Ct,actions:xt||It,columns:dt,options:ft})};At.columns=pt.B,At.actions=at.f;const Dt=lt=>{const{initialFilter:dt="owned",columns:xt,actions:ft,ownerPickerMode:Ct,pagination:Pt,options:it,PageWrapper:mt,CustomHeader:yt}=lt,et=mt||A.S,ht=yt||(()=>(0,n.jsx)(d.d,{title:"",children:(0,n.jsx)(x.Y,{children:"Discover documentation in your ecosystem."})}));return(0,n.jsx)(et,{children:(0,n.jsxs)(m.U,{children:[(0,n.jsx)(ht,{}),(0,n.jsx)(h.B9,{pagination:Pt,children:(0,n.jsxs)(u.GI,{children:[(0,n.jsxs)(u.GI.Filters,{children:[(0,n.jsx)(L,{}),(0,n.jsx)(p.y,{initialFilter:dt}),(0,n.jsx)(g.t,{mode:Ct}),(0,n.jsx)(y.m,{})]}),(0,n.jsx)(u.GI.Content,{children:(0,n.jsx)(At,{actions:ft,columns:xt,options:it})})]})})]})})}},27125:(H,S,t)=>{"use strict";t.d(S,{o:()=>P});var n=t(31085),a=t(14041),d=t(36338),x=t(9222),m=t(72427),h=t(65461),u=t(82779),p=t(14209),g=t(44186),y=t(73896),A=t(84295),v=t(42717),T=t(23747);const P=L=>{const{entities:O,title:j,loading:$,columns:M,actions:J,options:Q}=L,[,F]=(0,d.A)(),V=(0,x.S)(u.Oc),Y=(0,m.gf)(h.U);if(!O)return null;const nt=(0,T.H)(O,V,Y),W=[A.f.createCopyDocsUrlAction(F)],Z=20,G=nt&&nt.length>Z;return(0,n.jsx)(n.Fragment,{children:$||nt&&nt.length>0?(0,n.jsx)(p.X,{isLoading:$,options:{paging:G,pageSize:Z,search:!0,actionsColumnIndex:-1,...Q},data:nt,columns:M||v.F,actions:J||W,title:j?`${j} (${nt.length})`:`All (${nt.length})`}):(0,n.jsx)(g.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,n.jsx)(y.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};P.columns=v.B,P.actions=A.f},84295:(H,S,t)=>{"use strict";t.d(S,{f:()=>m});var n=t(31085),a=t(14041),d=t(55290),x=t(18956);const m={createCopyDocsUrlAction(h){return u=>({icon:()=>(0,n.jsx)(d.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>h(`${window.location.origin}${u.resolved.docsUrl}`)})},createStarEntityAction(h,u){return p=>{const g=p.entity,y=h(g);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,n.jsx)(x.m,{isFavorite:y}),tooltip:y?"Remove from favorites":"Add to favorites",onClick:()=>u(g)}}}}},42717:(H,S,t)=>{"use strict";t.d(S,{B:()=>y,F:()=>A});var n=t(31085),a=t(14041),d=t(10394),x=t(58837);const m=(0,x.A)(v=>({value:{marginBottom:v.spacing(.75)},subvalue:{color:v.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function h(v){const{value:T,subvalue:P}=v,L=m();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{className:L.value,children:T}),(0,n.jsx)(d.A,{className:L.subvalue,children:P})]})}var u=t(72072),p=t(34428);function g(v){return v.metadata.title||v.metadata.name}const y={createTitleColumn(v){return{...y.createNameColumn(),field:"entity.metadata.title",hidden:v?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(v,T)=>{const P=g(v.entity).toLocaleLowerCase(),L=g(T.entity).toLocaleLowerCase();return P.localeCompare(L)},render:v=>(0,n.jsx)(h,{value:(0,n.jsx)(u.N_,{to:v.resolved.docsUrl,children:g(v.entity)}),subvalue:v.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:v})=>(0,n.jsx)(p.i,{entityRefs:v.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}},A=[y.createTitleColumn({hidden:!0}),y.createNameColumn(),y.createOwnerColumn(),y.createKindColumn(),y.createTypeColumn()]},23747:(H,S,t)=>{"use strict";t.d(S,{H:()=>m});var n=t(51372),a=t(67871),d=t(90184),x=t(95768);function m(h,u,p){return h.map(g=>{const y=(0,a.t)(g,n.vv);return{entity:g,resolved:{docsUrl:u({namespace:(0,x.V)(g.metadata.namespace??"default",p),kind:(0,x.V)(g.kind,p),name:(0,x.V)(g.metadata.name,p)}),ownedByRelations:y,ownedByRelationsTitle:y.map(A=>(0,d.S)(A,{defaultKind:"group"})).join(", ")}}})}},81859:(H,S,t)=>{"use strict";t.d(S,{S:()=>h});var n=t(31085),a=t(14041),d=t(27155),x=t(72427),m=t(65461);const h=u=>{const{children:p,CustomPageWrapper:g}=u,A=`Documentation available in ${(0,x.gf)(m.U).getOptionalString("organization.name")??"Backstage"}`;return(0,n.jsx)(n.Fragment,{children:g?(0,n.jsx)(g,{children:p}):(0,n.jsx)(d.d,{title:"Documentation",subtitle:A,themeId:"documentation",children:p})})}},39278:(H,S,t)=>{"use strict";t.d(S,{$j:()=>M,Wj:()=>J,Ju:()=>L});var n=t(26679),a=t(70835),d=t(97142),x=t(92110);class m{configApi;discoveryApi;fetchApi;constructor(V){this.configApi=V.configApi,this.discoveryApi=V.discoveryApi,this.fetchApi=V.fetchApi}async getCookie(){const Y=`${await this.getApiOrigin()}/cookie`,nt=await this.fetchApi.fetch(`${Y}`,{credentials:"include"});if(!nt.ok)throw await a.o.fromResponse(nt);return await nt.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(V){const{kind:Y,namespace:nt,name:W}=V,G=`${await this.getApiOrigin()}/metadata/techdocs/${nt}/${Y}/${W}`,at=await this.fetchApi.fetch(`${G}`);if(!at.ok)throw await a.o.fromResponse(at);return await at.json()}async getEntityMetadata(V){const{kind:Y,namespace:nt,name:W}=V,G=`${await this.getApiOrigin()}/metadata/entity/${nt}/${Y}/${W}`,at=await this.fetchApi.fetch(`${G}`);if(!at.ok)throw await a.o.fromResponse(at);return await at.json()}}class h{configApi;discoveryApi;fetchApi;constructor(V){this.configApi=V.configApi,this.discoveryApi=V.discoveryApi,this.fetchApi=V.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return this.configApi.getOptionalString("techdocs.storageUrl")??`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(V,Y){const{kind:nt,namespace:W,name:Z}=V,at=`${await this.getStorageUrl()}/${W}/${nt}/${Z}/${Y}`,pt=await this.fetchApi.fetch(`${at.endsWith("/")?at:`${at}/`}index.html`);let Et="";switch(pt.status){case 404:throw Et="Page not found. ",Y||(Et+="This could be because there is no index.md file in the root of the docs directory of this repository."),new d.m_(Et);case 500:throw Et="Could not generate documentation or an error in the TechDocs backend. ",new Error(Et);default:break}return pt.text()}async syncEntityDocs(V,Y=()=>{}){const{kind:nt,namespace:W,name:Z}=V,at=`${await this.getApiOrigin()}/sync/${W}/${nt}/${Z}`;return new Promise((pt,Et)=>{const bt=new AbortController;(0,x.y)(at,{fetch:this.fetchApi.fetch,signal:bt.signal,onmessage(At){if(At.event==="log")At.data&&Y(JSON.parse(At.data));else if(At.event==="finish"){let Dt=!1;At.data&&({updated:Dt}=JSON.parse(At.data)),pt(Dt?"updated":"cached")}else At.event==="error"&&Et(new Error(At.data))},onerror(At){throw bt.abort(),Et(At),At}})})}async getBaseUrl(V,Y,nt){const{kind:W,namespace:Z,name:G}=Y,pt=`${await this.getApiOrigin()}/static/docs/${Z}/${W}/${G}/${nt}`;return new URL(V,pt.endsWith("/")?pt:`${pt}/`).toString()}}var u=t(82779),p=t(9803),g=t(12935),y=t(65461),A=t(57405),v=t(70795),T=t(88758),P=t(54560);const L=(0,p.i)({id:"techdocs",apis:[(0,g.b)({api:n.s,deps:{configApi:y.U,discoveryApi:A.I,fetchApi:v.a},factory:({configApi:F,discoveryApi:V,fetchApi:Y})=>new h({configApi:F,discoveryApi:V,fetchApi:Y})}),(0,g.b)({api:n.l,deps:{configApi:y.U,discoveryApi:A.I,fetchApi:v.a},factory:({configApi:F,discoveryApi:V,fetchApi:Y})=>new m({configApi:F,discoveryApi:V,fetchApi:Y})})],routes:{root:u.rQ,docRoot:u.Oc,entityContent:u.Ri}}),O=L.provide((0,T.QJ)({name:"TechdocsPage",component:()=>t.e(8803).then(t.bind(t,38803)).then(F=>F.Router),mountPoint:u.rQ})),j=L.provide((0,T.QJ)({name:"EntityTechdocsContent",component:()=>t.e(8803).then(t.bind(t,38803)).then(F=>F.LegacyEmbeddedDocsRouter),mountPoint:u.Ri})),$=L.provide((0,T.QJ)({name:"TechDocsCustomHome",component:()=>t.e(5470).then(t.bind(t,25470)).then(F=>F.TechDocsCustomHome),mountPoint:u.rQ})),M=L.provide((0,T.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(F=>F.TechDocsIndexPage),mountPoint:u.rQ})),J=L.provide((0,T.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(F=>F.TechDocsReaderPage),mountPoint:u.Oc})),Q=L.provide((0,P.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(F=>F.TechDocsSearchResultListItem),predicate:F=>F.type==="techdocs"}))},67289:(H,S,t)=>{"use strict";t.d(S,{p:()=>Rs});var n=t(31085),a=t(14041),d=t(42899),x=t(58837),m=t(86892),h=t(9394),u=t(91360),p=t(22856);const g="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",y=f=>{(0,a.useEffect)(()=>{if(!f)return()=>{};const D=f.querySelectorAll('head > link[rel="stylesheet"]');let U=D?.length??0;const N=new CustomEvent(g);if(!U)return f.dispatchEvent(N),()=>{};const k=()=>{--U===0&&f.dispatchEvent(N)};return D?.forEach(X=>{X.addEventListener("load",k)}),()=>{D?.forEach(X=>{X.removeEventListener("load",k)})}},[f])},A=f=>{const[D,U]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!f)return()=>{};U(!0);const N=f.style;N.setProperty("opacity","0");const k=()=>{U(!1),N.setProperty("opacity","1")};return f.addEventListener(g,k),()=>{f.removeEventListener(g,k)}},[f]),D},v=f=>{const{element:D,onAppend:U,children:N}=f,[k,X]=(0,a.useState)((0,h.vt)({...(0,p.A)(),insertionPoint:void 0}));y(D);const st=(0,a.useCallback)(St=>{if(!D||!St)return;X((0,h.vt)({...(0,p.A)(),insertionPoint:D.querySelector("head")||void 0}));let Rt=St.shadowRoot;Rt||(Rt=St.attachShadow({mode:"open"})),Rt.replaceChildren(D),typeof U=="function"&&U(Rt)},[D,U]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(u.Ay,{jss:k,sheetsManager:new Map,children:[(0,n.jsx)("div",{ref:st,"data-testid":"techdocs-native-shadowroot"}),N]})})};var T=t(12784);const P=()=>{const{shadowRoot:f}=(0,m.V)();return f},L=f=>{const D=P(),[U,N]=(0,a.useState)(D?.firstChild);return(0,a.useEffect)(()=>{let k;return D&&(k=new MutationObserver(()=>{N(D?.firstChild)}),k.observe(D,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>k?.disconnect()},[D]),!U||!(U instanceof HTMLElement)?[]:f.map(k=>U.querySelectorAll(k)).filter(k=>k.length).map(k=>Array.from(k)).flat()},O=f=>f.toString()&&f.rangeCount&&f.getRangeAt(0).getBoundingClientRect().top,j=(f=0)=>{const D=P(),[U,N]=useState(null),k=useMemo(()=>debounce(()=>{const X=D,st=X.getSelection?X.getSelection():document.getSelection();st&&O(st)?N(st):N(null)},f),[D,N,f]);return useEffect(()=>(window.document.addEventListener("selectionchange",k),()=>{k.cancel(),window.document.removeEventListener("selectionchange",k)}),[k]),U};var $=t(26280),M=t(68146),J=t(45250),Q=t(73466),F=t(5877),V=t(43836),Y=t(10602),nt=t(72427),W=t(93368),Z=t(25862),G=t(65461),at=t(55309);const pt=(0,at.y)({id:"plugin.search.queryservice"});class Et{mockedResults;constructor(D){this.mockedResults=D}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const bt=(0,V.tK)("search-context"),At=()=>{const f=(0,a.useContext)(bt);if(!f)throw new Error("useSearch must be used within a SearchContextProvider");const D=f.atVersion(1);if(!D)throw new Error("No SearchContext v1 found");return D},Dt=()=>(0,a.useContext)(bt)!==void 0,lt={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},dt=(f=lt)=>{const D=(0,nt.gf)(pt),U=(0,W.s)(),[N,k]=(0,a.useState)(f.term),[X,st]=(0,a.useState)(f.types),[St,Rt]=(0,a.useState)(f.filters),[$t,Bt]=(0,a.useState)(f.pageLimit),[Ft,Xt]=(0,a.useState)(f.pageCursor),he=(0,F.A)(N),Ht=(0,F.A)(St),_t=(0,Q.A)(async()=>{const qt=await D.query({term:N,types:X,filters:St,pageLimit:$t,pageCursor:Ft});return N&&U.captureEvent("search",N,{value:qt.numberOfResults}),qt},[N,X,St,$t,Ft]),Ae=!_t.loading&&!_t.error&&_t.value?.nextPageCursor,re=!_t.loading&&!_t.error&&_t.value?.previousPageCursor,Zt=(0,a.useCallback)(()=>{Xt(_t.value?.nextPageCursor)},[_t.value?.nextPageCursor]),Jt=(0,a.useCallback)(()=>{Xt(_t.value?.previousPageCursor)},[_t.value?.previousPageCursor]);return(0,a.useEffect)(()=>{he!==void 0&&N!==he&&Xt(void 0)},[N,he,Xt]),(0,a.useEffect)(()=>{Ht!==void 0&&!(0,J.isEqual)(St,Ht)&&Xt(void 0)},[St,Ht,Xt]),{result:_t,term:N,setTerm:k,types:X,setTypes:st,filters:St,setFilters:Rt,pageLimit:$t,setPageLimit:Bt,pageCursor:Ft,setPageCursor:Xt,fetchNextPage:Ae?Zt:void 0,fetchPreviousPage:re?Jt:void 0}},xt=f=>{const{initialState:D,children:U}=f,N=dt(D);return(0,n.jsx)(Z.Ig,{attributes:{searchTypes:N.types.sort().join(",")},children:(0,n.jsx)(bt.Provider,{value:(0,Y.B)({1:N}),children:U})})},ft=f=>{const{initialState:D,inheritParentContextIfAvailable:U,children:N}=f,k=Dt(),X=(0,nt.gf)(G.U),st=D??{},St=X.has("search.query.pageLimit")?{pageLimit:X.getNumber("search.query.pageLimit")}:{},Rt={...lt,...st,...St};return k&&U?(0,n.jsx)(n.Fragment,{children:N}):(0,n.jsx)(xt,{initialState:Rt,children:N})};var Ct=t(78467),Pt=t(20577),it=t(82266),mt=t(29365),yt=t(34839),et=t(16249),ht=t(64947),rt=t(45917),B=t(22771);const z=(0,a.forwardRef)((f,D)=>{const{onChange:U,onKeyDown:N=()=>{},onClear:k=()=>{},onSubmit:X=()=>{},debounceTime:st=200,clearButton:St=!0,fullWidth:Rt=!0,value:$t,label:Bt,placeholder:Ft,inputProps:Xt={},InputProps:he={},endAdornment:Ht,..._t}=f,Ae=(0,nt.gf)(G.U),[re,Zt]=(0,a.useState)(""),Jt=(0,a.useRef)("");(0,a.useEffect)(()=>{Zt(pe=>pe===Jt.current?String($t):pe)},[$t,Jt]),(0,B.A)(()=>{Jt.current=re,U(re)},st,[re]);const Se=(0,a.useCallback)(pe=>{Zt(pe.target.value)},[Zt]),qt=(0,a.useCallback)(pe=>{N&&N(pe),X&&pe.key==="Enter"&&X()},[N,X]),ce=(0,a.useCallback)(()=>{Jt.current="",U(""),Zt(""),k&&k()},[U,k]),le=Bt?void 0:"Search",Fe=Ft??`Search in ${Ae.getOptionalString("app.title")||"Backstage"}`,Me=(0,it.n)().getSystemIcon("search")||rt.A,nn=(0,n.jsx)(yt.A,{position:"start",children:(0,n.jsx)(mt.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,n.jsx)(Me,{})})}),ln=(0,n.jsx)(yt.A,{position:"end",children:(0,n.jsx)(ht.A,{"aria-label":"Clear",size:"small",onClick:ce,onKeyDown:pe=>{pe.key==="Enter"&&pe.stopPropagation()},children:"Clear"})});return(0,n.jsx)(ft,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(et.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:D,value:re,label:Bt,placeholder:Fe,InputProps:{startAdornment:nn,endAdornment:St?ln:Ht,...he},inputProps:{"aria-label":le,...Xt},fullWidth:Rt,onChange:Se,onKeyDown:qt,..._t})})}),ut=(0,a.forwardRef)((f,D)=>{const{value:U="",onChange:N,...k}=f,{term:X,setTerm:st}=At();(0,a.useEffect)(()=>{U&&st(String(U))},[U,st]);const St=(0,a.useCallback)(Rt=>{N?N(Rt):st(Rt)},[N,st]);return(0,n.jsx)(ft,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(Z.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,n.jsx)(z,{...k,ref:D,value:X,onChange:St})})})}),Ot=(0,x.A)(f=>({loading:{right:f.spacing(1),position:"absolute"}})),It=f=>D=>(0,n.jsx)(ft,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(f,{...D})}),Lt=()=>{const f=Ot();return(0,n.jsx)(Ct.A,{className:f.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Ut=It(function(D){const{loading:U,value:N,onChange:k=()=>{},options:X=[],getOptionLabel:st=Jt=>String(Jt),inputPlaceholder:St,inputDebounceTime:Rt,freeSolo:$t=!0,fullWidth:Bt=!0,clearOnBlur:Ft=!1,"data-testid":Xt="search-autocomplete",...he}=D,{setTerm:Ht}=At(),_t=(0,a.useCallback)(Jt=>Jt?typeof Jt=="string"?Jt:st(Jt):"",[st]),Ae=(0,a.useMemo)(()=>_t(N),[N,_t]),re=(0,a.useCallback)((Jt,Se,qt,ce)=>{Ht(_t(Se)),k(Jt,Se,qt,ce)},[_t,Ht,k]),Zt=(0,a.useCallback)(({InputProps:{ref:Jt,className:Se,endAdornment:qt},InputLabelProps:ce,...le})=>(0,n.jsx)(ut,{...le,ref:Jt,clearButton:!1,value:Ae,placeholder:St,debounceTime:Rt,endAdornment:U?(0,n.jsx)(Lt,{}):qt,InputProps:{className:Se}}),[U,Ae,St,Rt]);return(0,n.jsx)(Pt.Ay,{...he,"data-testid":Xt,value:N,onChange:re,options:X,getOptionLabel:st,renderInput:Zt,freeSolo:$t,fullWidth:Bt,clearOnBlur:Ft})});var Nt=t(18690),Wt=t(27698);const Kt=f=>f?.document,te=f=>{const{entityId:D,entityTitle:U,debounceTime:N=150,searchResultUrlMapper:k}=f,[X,st]=(0,a.useState)(!1),St=(0,Nt.Zp)(),{setFilters:Rt,term:$t,result:{loading:Bt,value:Ft}}=At(),[Xt,he]=(0,a.useState)([]);(0,a.useEffect)(()=>{let Zt=!0;if(Zt&&Ft){const Jt=Ft.results.slice(0,10);he(Jt)}return()=>{Zt=!1}},[Bt,Ft]);const{kind:Ht,name:_t,namespace:Ae}=D;(0,a.useEffect)(()=>{Rt(Zt=>({...Zt,kind:Ht,namespace:Ae,name:_t}))},[Ht,Ae,_t,Rt]);const re=(Zt,Jt)=>{if(Kt(Jt)){const{location:Se}=Jt.document;St(k?k(Se):Se)}};return(0,n.jsx)(Ut,{"data-testid":"techdocs-search-bar",size:"small",open:X&&!!$t,getOptionLabel:()=>"",filterOptions:Zt=>Zt,onClose:()=>{st(!1)},onOpen:()=>{st(!0)},onChange:re,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Xt,renderOption:({document:Zt,highlight:Jt})=>(0,n.jsx)(Wt.TechDocsSearchResultListItem,{result:Zt,lineClamp:3,asListItem:!1,asLink:!1,title:Zt.title,highlight:Jt}),loading:Bt,inputDebounceTime:N,inputPlaceholder:`Search ${U||D.name} docs`,freeSolo:!1})},jt=f=>{const D={term:"",types:["techdocs"],pageCursor:"",filters:f.entityId};return(0,n.jsx)(ft,{initialState:D,children:(0,n.jsx)(te,{...f})})};var kt=t(74219);const ee=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(f=>({default:f.RealLogViewer})));function fe(f){const{Progress:D}=(0,it.n)().getComponents();return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(D,{}),children:(0,n.jsx)(ee,{...f})})}var Gt=t(73845),ne=t(72501),de=t(12398),Xe=t(32881);const Ge=(0,x.A)(f=>(0,de.A)({paper:{width:"100%",[f.breakpoints.up("sm")]:{width:"75%"},[f.breakpoints.up("md")]:{width:"50%"},padding:f.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:f.palette.background.default}})),oe=({buildLog:f,onClose:D})=>{const U=Ge(),N=f.length===0?"Waiting for logs...":f.join(`
8
- `);return(0,n.jsxs)(d.A,{container:!0,direction:"column",className:U.root,spacing:0,wrap:"nowrap",children:[(0,n.jsxs)(d.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,n.jsx)(ne.A,{variant:"h5",children:"Build Details"}),(0,n.jsx)(mt.A,{title:"Close the drawer",onClick:D,color:"inherit",children:(0,n.jsx)(Xe.A,{})},"dismiss")]}),(0,n.jsx)(d.A,{item:!0,xs:!0,children:(0,n.jsx)(fe,{text:N,classes:{root:U.logs}})})]})},We=({buildLog:f})=>{const D=Ge(),[U,N]=(0,a.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ht.A,{color:"inherit",onClick:()=>N(!0),children:"Show Build Logs"}),(0,n.jsx)(Gt.Ay,{classes:{paper:D.paper},anchor:"right",open:U,onClose:()=>N(!1),children:(0,n.jsx)(oe,{buildLog:f,onClose:()=>N(!1)})})]})};var ae=t(12173);const Ye=({errorMessage:f})=>{const D=(0,nt.gf)(G.U).getOptionalString("techdocs.builder"),U=(0,W.s)(),{entityRef:N}=(0,m.V)(),k=(0,Nt.zy)();(0,a.useEffect)(()=>{const{pathname:st,search:St,hash:Rt}=k;U.captureEvent("not-found",`${st}${St}${Rt}`,{attributes:N})},[U,N,k]);let X="";return[void 0,"local"].includes(D)||(X="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),(0,n.jsx)(ae.M,{status:"404",statusMessage:f||"Documentation not found",additionalInfo:X})};var _e=t(28966),ge=t(26679);function rn({contentLoading:f,content:D,activeSyncState:U}){return f||U==="BUILD_READY_RELOAD"||!D&&U==="CHECKING"?"CHECKING":!D&&U==="BUILDING"?"INITIAL_BUILD":D?U==="BUILDING"?"CONTENT_STALE_REFRESHING":U==="BUILD_READY"?"CONTENT_STALE_READY":U==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function gn(f,D){const U={...f};switch(D.type){case"sync":D.state==="CHECKING"&&(U.buildLog=[]),U.activeSyncState=D.state,U.syncError=D.syncError;break;case"contentLoading":U.contentLoading=!0,U.contentError=void 0;break;case"content":typeof D.path=="string"&&(U.path=D.path),U.contentLoading=!1,U.content=D.content,U.contentError=D.contentError;break;case"buildLog":U.buildLog=U.buildLog.concat(D.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(U.activeSyncState)&&["contentLoading","content"].includes(D.type)&&(U.activeSyncState="UP_TO_DATE",U.buildLog=[]),U}function on(f,D,U,N){const[k,X]=(0,a.useReducer)(gn,{activeSyncState:"CHECKING",path:N,contentLoading:!0,buildLog:[]}),st=(0,nt.gf)(ge.s),{retry:St}=(0,_e.A)(async()=>{X({type:"contentLoading"});try{const Bt=await st.getEntityDocs({kind:f,namespace:D,name:U},N);return X({type:"content",content:Bt,path:N}),Bt}catch(Bt){X({type:"content",contentError:Bt,path:N})}},[st,f,D,U,N]),Rt=(0,a.useRef)({content:void 0,reload:()=>{}});Rt.current={content:k.content,reload:St},(0,Q.A)(async()=>{X({type:"sync",state:"CHECKING"});const Bt=setTimeout(()=>{X({type:"sync",state:"BUILDING"})},1e3);try{switch(await st.syncEntityDocs({kind:f,namespace:D,name:U},Xt=>{X({type:"buildLog",log:Xt})})){case"updated":Rt.current.content?X({type:"sync",state:"BUILD_READY"}):(Rt.current.reload(),X({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":X({type:"sync",state:"UP_TO_DATE"});break;default:X({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Ft){X({type:"sync",state:"ERROR",syncError:Ft})}finally{clearTimeout(Bt)}},[f,U,D,st,X,Rt]);const $t=(0,a.useMemo)(()=>rn({activeSyncState:k.activeSyncState,contentLoading:k.contentLoading,content:k.content}),[k.activeSyncState,k.content,k.contentLoading]);return(0,a.useMemo)(()=>({state:$t,contentReload:St,path:k.path,content:k.content,contentErrorMessage:k.contentError?.toString(),syncErrorMessage:k.syncError?.toString(),buildLog:k.buildLog}),[$t,St,k.path,k.content,k.contentError,k.syncError,k.buildLog])}const qe=(0,a.createContext)({}),De=()=>(0,a.useContext)(qe),Ke=f=>{const{children:D}=f,{"*":U=""}=(0,Nt.g)(),{entityRef:N}=(0,m.V)(),{kind:k,namespace:X,name:st}=N,St=on(k,X,st,U);return(0,n.jsx)(qe.Provider,{value:St,children:D instanceof Function?D(St):D})},ze=f=>D=>(0,n.jsx)(Ke,{children:(0,n.jsx)(f,{...D})}),an=(0,x.A)(f=>({root:{marginBottom:f.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),ye=()=>{let f=null;const D=an(),{state:U,contentReload:N,contentErrorMessage:k,syncErrorMessage:X,buildLog:st}=De();return U==="INITIAL_BUILD"&&(f=(0,n.jsx)(kt.A,{classes:{root:D.root},variant:"outlined",severity:"info",icon:(0,n.jsx)(Ct.A,{size:"24px"}),action:(0,n.jsx)(We,{buildLog:st}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),U==="CONTENT_STALE_REFRESHING"&&(f=(0,n.jsx)(kt.A,{variant:"outlined",severity:"info",icon:(0,n.jsx)(Ct.A,{size:"24px"}),action:(0,n.jsx)(We,{buildLog:st}),classes:{root:D.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),U==="CONTENT_STALE_READY"&&(f=(0,n.jsx)(kt.A,{variant:"outlined",severity:"success",action:(0,n.jsx)(ht.A,{color:"inherit",onClick:()=>N(),children:"Refresh"}),classes:{root:D.root},children:"A newer version of this documentation is now available, please refresh to view."})),U==="CONTENT_STALE_ERROR"&&(f=(0,n.jsxs)(kt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(We,{buildLog:st}),classes:{root:D.root,message:D.message},children:["Building a newer version of this documentation failed."," ",X]})),U==="CONTENT_NOT_FOUND"&&(f=(0,n.jsxs)(n.Fragment,{children:[X&&(0,n.jsxs)(kt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(We,{buildLog:st}),classes:{root:D.root,message:D.message},children:["Building a newer version of this documentation failed."," ",X]}),(0,n.jsx)(Ye,{errorMessage:k})]})),f};var He=t(5893),ke=t(54917),Qe=t(96726),je=t(71651),ve=t.n(je);const w=/main\.[A-Fa-f0-9]{8}\.min\.css$/,l=/^https:\/\/fonts\.googleapis\.com/,E=/^https:\/\/fonts\.gstatic\.com/,R=f=>f.nodeName==="LINK",q=f=>{const D=f?.getAttribute("href")||"",U=D.match(w),N=D.match(l),k=D.match(E);return U||N||k},ct=f=>(R(f)&&!q(f)&&f.remove(),f),tt=f=>f.nodeName==="IFRAME",Tt=(f,D)=>{const U=f.getAttribute("src")||"";try{const{host:N}=new URL(U);return D.includes(N)}catch{return!1}},wt=f=>D=>(tt(D)&&!Tt(D,f)&&D.remove(),D),zt=()=>{const f=(0,nt.gf)(G.U);return(0,a.useMemo)(()=>f.getOptionalConfig("techdocs.sanitizer"),[f])},ie=()=>{const f=zt();return(0,a.useCallback)(async D=>{const U=f?.getOptionalStringArray("allowedIframeHosts");ve().addHook("beforeSanitizeElements",ct);const N=["link","meta"];U&&(N.push("iframe"),ve().addHook("beforeSanitizeElements",wt(U))),ve().addHook("uponSanitizeElement",(st,St)=>{St.tagName==="meta"&&(st.getAttribute("http-equiv")==="refresh"&&st.getAttribute("content")?.includes("url=")||st.parentNode?.removeChild(st))}),ve().addHook("uponSanitizeAttribute",(st,St)=>{st.tagName!=="meta"&&(St.attrName==="http-equiv"||St.attrName==="content")&&st.removeAttribute(St.attrName)});const k=f?.getOptionalString("allowedCustomElementTagNameRegExp"),X=f?.getOptionalString("allowedCustomElementAttributeNameRegExp");return ve().sanitize(D.outerHTML,{ADD_TAGS:N,FORBID_TAGS:["style"],ADD_ATTR:["http-equiv","content","dominant-baseline"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:k?new RegExp(k):void 0,attributeNameCheck:X?new RegExp(X):void 0}})},[f])};var Le=t(34435),Yt=t(268);const me=({theme:f})=>`
7
+ `);const Te=Wr({root:c,discoverers:[Kr,zr],collectors:{routing:Vt?Gr:Vr,collectedPlugins:Hr,featureFlags:Yr}});return Te.collectedPlugins.forEach(Be=>this.plugins.add(Be)),this.verifyPlugins(this.plugins),this.getApiHolder(),Te},[c]),_=Do(this.configLoader,this.components,C),gt="api"in _;if(gt){const{api:Vt}=_;this.configApi=Vt}if("node"in _)return _.node;if(o)throw o;if(!s)try{s=Ao(this.bindRoutes,_.api,this.plugins),so(I.paths,I.parents),ro(s,this.plugins)}catch(Vt){throw o=Vt,Vt}if(gt&&b.current){b.current=!1;const Vt=this.getApiHolder().get(yn.B);if(Vt){for(const Ie of this.featureFlags)Vt.registerFlag({...Ie,pluginId:""});for(const Ie of this.plugins.values())if("getFeatureFlags"in Ie)for(const hn of Ie.getFeatureFlags())Vt.registerFlag({name:hn.name,pluginId:Ie.getId()});else for(const hn of Ie.output())hn.type==="feature-flag"&&Vt.registerFlag({name:hn.name,pluginId:Ie.getId()});const Te=Vt.getRegisteredFlags(),Be=new Set(Te.map(Ie=>Ie.name));for(const Ie of K)Be.has(Ie)||Vt.registerFlag({name:Ie,pluginId:""})}}const{ThemeProvider:ot=tr,Progress:vt}=this.components,Mt=this.getApiHolder();if(Io()){const Vt=Mt.get(Le.m),Te=Mt.get(me.a),Be=Mt.get(Tt.I);if(!Vt||!Te||!Be)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Vt,fetchApi:Te,discoveryApi:Be})}return(0,a.jsx)(nn,{apis:Mt,children:(0,a.jsx)(ao,{appContext:e,children:(0,a.jsx)(ot,{children:(0,a.jsx)(no,{routePaths:I.paths,routeParents:I.parents,routeObjects:I.objects,routeBindings:s,basePath:Oo(_.api),children:(0,a.jsx)(nr.Provider,{value:{routeObjects:I.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(d.Suspense,{fallback:(0,a.jsx)(vt,{}),children:c})})})})})})}}getRouter(){return ar}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const s of e.getApis())this.apiFactoryRegistry.get(s.api)||this.apiFactoryRegistry.register("default",s);return Ls.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Yn,deps:{},factory:()=>Gn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:wt.U,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:Ee.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Hs,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Nr.J,deps:{languageApi:Hs},factory:({languageApi:e})=>js.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:yn.B,deps:{},factory:()=>new Fr});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const s of e.getApis())if(!this.apiFactoryRegistry.register("default",s))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${s.api}`);for(const e of this.apis)if(!this.apiFactoryRegistry.register("app",e))throw new Error(`Duplicate or forbidden API factory for ${e.api} in app`);return Ls.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ls(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const s=new Set;for(const o of e){const i=o.getId();if(s.has(i))throw new Error(`Duplicate plugin found '${i}'`);s.add(i)}}}function Bo(r){return new Mo(r)}function jo(r){return Bo({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...M,...r?.components},configLoader:r?.configLoader,defaultApis:Ln,icons:{...As,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??Zt})}var ts=t(82442);let dr=!1;const ur=r=>{const e=(0,sr.n)(),{NotFoundErrorPage:s}=e.getComponents(),o=(0,d.useMemo)(()=>In(),[]),c=[...(0,ts.O)(r.children,b=>b.getElements().flatMap(C=>{let I=C.props.path;if(I==="")return[];I=I?.replace(/\/\*$/,"")??"/";let K=o?C:C.props.element;return!o&&!K&&(K=C,dr||(console.warn("DEPRECATION WARNING: All elements within <FlatRoutes> must be of type <Route> with an element prop. Existing usages of <Navigate key=[path] to=[to] /> should be replaced with <Route path=[path] element={<Navigate to=[to] />} />."),dr=!0)),[{path:I,element:K,children:C.props.children?[{path:I==="/"?"/":"*",element:C.props.children}]:void 0}]}).sort((C,I)=>I.path.localeCompare(C.path)).map(C=>({...C,path:C.path==="/"?"/":`${C.path}/*`}))),{path:"*",element:(0,a.jsx)(s,{})}];return(0,m.Ye)(c)};(0,Oe.h)(ur,"core.type","FlatRoutes");var En=t(6820),Uo=t(78692),$o=t(86519);function Fo(r){return!r.cursor}function No(r,e){if(!r.length)return[];const{maxCountPerChunk:s=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let b=0,C=0,I=0;for(let K=0;K<r.length;++K){const _=r[K].length+i;I>0&&(C+_>o||I+1>s)&&(c.push(r.slice(b,K)),b=K,C=0,I=0),C+=_,I+=1}return c.push(r.slice(b,r.length)),c}const xe="catalog";var Ce=t(94214);class ko{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:cn()}}async deleteEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async getEntities(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByQuery(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-query{?fields,limit,offset,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByRefs(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByName(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityFacets(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async refreshEntity(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async analyzeLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async getLocation(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocationByEntity(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocations(e,s){const o=await this.discoveryApi.getBaseUrl(xe),c=Ce.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}}class Wo{apiClient;constructor(e){this.apiClient=new ko(e)}async getEntityAncestors(e,s){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,En.KU)(e.entityRef)},s))}async getLocationById(e,s){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},s))}async getLocationByEntity(e,s){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,En.KU)(e)},s))}async getEntities(e,s){const{filter:o=[],fields:i=[],order:c,offset:b,limit:C,after:I}=e??{},K=[];if(c)for(const gt of[c].flat())gt&&K.push(`${gt.order}:${gt.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:C,filter:this.getFilterValue(o),offset:b,after:I,order:c?K:void 0}},s))}}async getEntitiesByRefs(e,s){const o=async c=>{const b=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},s);if(!b.ok)throw await Ve.o.fromResponse(b);return(await b.json()).items.map(I=>I??void 0)};let i;for(const c of No(e.entityRefs)){const b=await o(c);i?i.push(...b):i=b}return{items:i??[]}}async queryEntities(e={},s){const o={};if(Fo(e)){const{fields:i=[],filter:c,limit:b,offset:C,orderFields:I,fullTextFilter:K}=e;o.filter=this.getFilterValue(c),b!==void 0&&(o.limit=b),C!==void 0&&(o.offset=C),I!==void 0&&(o.orderField=(Array.isArray(I)?I:[I]).map(({field:gt,order:ot})=>`${gt},${ot}`)),i.length&&(o.fields=i);const _=K?.term?.trim();_&&(o.fullTextFilterTerm=_),K?.fields?.length&&(o.fullTextFilterFields=K.fields)}else{const{fields:i=[],limit:c,cursor:b}=e;o.cursor=b,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.requestRequired(await this.apiClient.getEntitiesByQuery({query:o},s))}async getEntityByRef(e,s){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,En.KU)(e)},s))}async getEntityByName(e,s){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},s))}async refreshEntity(e,s){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},s);if(o.status!==200)throw new Error(await o.text())}async getEntityFacets(e,s){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},s))}async addLocation(e,s){const{type:o="url",target:i,dryRun:c}=e,b=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},s);if(b.status!==201)throw new Error(await b.text());const{location:C,entities:I,exists:K}=await b.json();if(!C)throw new Error(`Location wasn't added: ${i}`);return{location:C,entities:I,exists:K}}async getLocationByRef(e,s){return(await this.requestRequired(await this.apiClient.getLocations({},s))).map(i=>i.data).find(i=>e===(0,Uo.KL)(i))}async removeLocationById(e,s){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},s))}async removeEntityByUid(e,s){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},s))}async validateEntity(e,s,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:s}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await Ve.o.fromResponse(i);const{errors:c=[]}=await i.json();return{valid:!1,errors:c}}async requestIgnored(e){if(!e.ok)throw await Ve.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await Ve.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await Ve.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const s=[];for(const o of[e].flat()){const i=[];for(const[c,b]of Object.entries(o))for(const C of[b].flat())C===$o.c?i.push(c):typeof C=="string"&&i.push(`${c}=${C}`);i.length&&s.push(i.join(","))}return s}}var hr=t(7341),Ko=t(18),zo=t(82292),gr=t(29207),An=t(95203),Ho=t(9803),Re=t(88758),Vo=t(54560),xn=t(45250);async function Go({storageApi:r}){const e=r.forBucket("settings"),s=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,xn.isArray)(o))return;const i=new Set(s.snapshot("entityRefs").value??[]);o.filter(xn.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,b,C,I])=>(0,En.U2)({kind:b,namespace:C,name:I})).forEach(c=>i.add(c)),await s.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Yo{settingsStore;starredEntities;constructor(e){Go(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{this.starredEntities=new Set(s.value??[]),this.notifyChanges()}})}async toggleStarred(e){this.starredEntities.has(e)?this.starredEntities.delete(e):this.starredEntities.add(e),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}subscribers=new Set;observable=new(H())(e=>(e.next(new Set(this.starredEntities)),this.subscribers.add(e),()=>{this.subscribers.delete(e)}));notifyChanges(){for(const e of this.subscribers)e.next(new Set(this.starredEntities))}}function Us(r){const{years:e=0,months:s=0,weeks:o=0,days:i=0,hours:c=0,minutes:b=0,seconds:C=0,milliseconds:I=0}=r;return((((e*365+s*30+o*7+i)*24+c)*60+b)*60+C)*1e3+I}var Qo=t(25033),Zo=t.n(Qo),Jo=t(88083);const Xo={seconds:10},_o={milliseconds:50},qo={api:$n.A,component:Nn.A,system:Bn.A,resource:kn.A,domain:Mn.A,location:Fn.A,user:Sn.A,group:bn.A,template:Wn.A};function pr(r){return{async:r.async,render:({entityRef:e,entity:s,context:o})=>({snapshot:(0,Jo.T)(s||e,o),loadEntity:r.async})}}class ta extends Map{#t;#e=new Map;constructor(e){super(),this.#t=e}set(e,s){const o=super.set(e,s);return this.#e.set(e,Date.now()),o}get(e){if(!this.has(e))return;const s=this.#e.get(e);if(Date.now()-s>this.#t){this.delete(e);return}return super.get(e)}delete(e){return this.#e.delete(e),super.delete(e)}clear(){return this.#e.clear(),super.clear()}}class es{static createLocal(){return new es({renderer:pr({async:!1})})}static create(e){return new es(e)}#t;#e;#n;#s;#r;constructor(e){const s=e.cacheTtl??Xo,o=e.batchDelay??_o,i=e.renderer??pr({async:!0}),c={};if(Object.entries(qo).forEach(([b,C])=>{c[b.toLocaleLowerCase("en-US")]=C}),Object.entries(e.kindIcons??{}).forEach(([b,C])=>{c[b.toLocaleLowerCase("en-US")]=C}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#n=this.#a({cacheTtl:s,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#e=Us(s),this.#t=new Map,this.#s=c,this.#r=i}forEntity(e,s){const{entityRef:o,kind:i,entity:c,needsLoad:b}=this.#o(e),C=ot=>{const{snapshot:vt}=this.#r.render({entityRef:o,loading:ot.loading,entity:ot.entity,context:s||{}});return{...vt,entityRef:o,Icon:this.#i(vt.Icon,i)}};let I;try{I=C({loading:b,entity:c})}catch{I={primaryTitle:o,entityRef:o}}if(!b)return{snapshot:I,promise:Promise.resolve(I)};const K=Promise.resolve().then(()=>this.#n?.load(o)).then(ot=>C({loading:!1,entity:ot??c})).catch(()=>{}),_=new(H())(ot=>{let vt=!1;return K.then(Mt=>{Mt&&ot.next(Mt)}).finally(()=>{vt||ot.complete()}),()=>{vt=!0}}),gt=K.then(ot=>ot??I);return{snapshot:I,update$:_,promise:gt}}#o(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,En.U2)(e),needsLoad:!1};const s=this.#t.get(e),o=s?.entity,c=(!s||Date.now()-s.updatedAt>this.#e)&&this.#r.async!==!1&&this.#n!==void 0;return{entity:o,kind:(0,En.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const s=Us(e.cacheTtl),o=Us(e.batchDelay);return new(Zo())(async i=>{const{items:c}=await e.catalogApi.getEntitiesByRefs({entityRefs:i,fields:["kind","metadata.name","metadata.namespace","metadata.title","metadata.description","spec.profile.displayName","spec.type"]}),b=Date.now();return i.forEach((C,I)=>{this.#t.set(C,{updatedAt:b,entity:c[I]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new ta(s),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,s){return e||(e===!1?!1:this.#s[s.toLocaleLowerCase("en-US")])}}const Pe=(0,Ho.i)({id:"catalog",apis:[(0,tt.b)({api:hr.v,deps:{discoveryApi:Tt.I,fetchApi:me.a},factory:({discoveryApi:r,fetchApi:e})=>new Wo({discoveryApi:r,fetchApi:e})}),(0,tt.b)({api:Ko.a,deps:{storageApi:Yt},factory:({storageApi:r})=>new Yo({storageApi:r})}),(0,tt.b)({api:zo.n,deps:{catalogApi:hr.v},factory:({catalogApi:r})=>es.create({catalogApi:r})})],routes:{catalogIndex:An.rQ,catalogEntity:gr.s},externalRoutes:{createComponent:An.qP,viewTechDoc:An.UJ,createFromTemplate:An.Zg,unregisterRedirect:An.pS}}),gi=Pe.provide((0,Re.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(3720),t.e(5184),t.e(2177)]).then(t.bind(t,62177)).then(r=>r.CatalogPage),mountPoint:An.rQ})),ea=Pe.provide((0,Re.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:gr.s})),pi=Pe.provide((0,Re.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(3720),t.e(1902),t.e(5724)]).then(t.bind(t,65724)).then(r=>r.AboutCard)}})),fi=Pe.provide((0,Re.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),mi=Pe.provide((0,Re.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),yi=Pe.provide((0,Re.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),vi=Pe.provide((0,Re.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ei=Pe.provide((0,Re.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),Ai=Pe.provide((0,Re.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),xi=Pe.provide((0,Re.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Ci=Pe.provide((0,Re.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),bi=Pe.provide((0,Re.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),Si=Pe.provide((0,Re.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),Oi=Pe.provide((0,Re.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),Pi=Pe.provide((0,Vo.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var fr=t(96726),mr=t(26679);class na{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,s){const i=`${await this.getApiOrigin()}/${s}`,c=await fetch(`${i.endsWith("/")?i:`${i}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,s,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class sa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}}const ra=[(0,tt.b)({api:mr.s,deps:{configApi:wt.U,discoveryApi:Tt.I,identityApi:Ee.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new na({configApi:r,discoveryApi:e,identityApi:s})}),(0,tt.b)({api:mr.l,deps:{configApi:wt.U,discoveryApi:Tt.I,identityApi:Ee.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new sa({configApi:r,discoveryApi:e,identityApi:s})}),(0,tt.b)({api:fr.Y,deps:{configApi:wt.U},factory:({configApi:r})=>fr.L.fromConfig(r)})],oa={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},aa={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function ia(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ca(){const r=await er(),e=await ia();return[...r,{context:"detected",data:e?oa:aa}]}var Je=t(58837),la=t(3210);const da=(0,Je.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),ua=()=>{const r=da();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,a.jsx)("path",{className:r.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"})})},ha=(0,Je.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),ga=()=>{const r=ha();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,a.jsx)("path",{className:r.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"})})};var be=t(72664);const yr={isOpen:!1,setOpen:()=>{}},vr=(0,d.createContext)(yr),Er=(0,le.tK)("sidebar-open-state-context");function Ar(r){const{children:e,value:s}=r;return(0,a.jsx)(vr.Provider,{value:s,children:(0,a.jsx)(Er.Provider,{value:(0,Fe.B)({1:s}),children:e})})}const $s=()=>{const r=(0,d.useContext)(Er),e=(0,d.useContext)(vr);if(r===void 0)return e||yr;const s=r.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s};var xr=t(72072),Cr=t(73524),sn=t(10394),br=t(5893),pa=t(53373),un=t.n(pa),fa=t(1125),Sr=t(29365),ma=t(73845),Fs=t(72501),ya=t(32881),va=t(27326),Ea=t(13085);const Or=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Ns=t(34435);const Aa=(0,Je.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),xa=r=>{const{to:e,label:s,icon:o,value:i}=r,{sidebarConfig:c}=(0,d.useContext)(be.yY),b=Aa({sidebarConfig:c}),C=(0,m.zy)(),{selectedMenuItemIndex:I,setSelectedMenuItemIndex:K}=(0,d.useContext)(Or),_=(ot,vt)=>{K(vt===I?-1:vt)},gt=i===I&&I>=0||i!==I&&!(I>=0)&&e===C.pathname;return(0,a.jsx)(Ea.A,{"aria-label":s,label:s,icon:o,component:xr.N_,to:e||C.pathname,onChange:_,value:i,selected:gt,classes:b})},Pr=r=>{const{children:e,to:s,label:o,icon:i,value:c}=r,{isMobile:b}=(0,Ns.Ut)();return b?(0,a.jsx)(xa,{to:s,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Tr=(0,Je.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),Ca=r=>(0,xn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),ba=d.createElement(Pr).type,Sa=({children:r,label:e="Menu",open:s,onClose:o})=>{const{sidebarConfig:i}=(0,d.useContext)(be.yY),c=Tr({sidebarConfig:i});return(0,a.jsxs)(ma.Ay,{anchor:"bottom",open:s,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(sn.A,{className:c.overlayHeader,children:[(0,a.jsx)(Fs.A,{variant:"h3",children:e}),(0,a.jsx)(Sr.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(ya.A,{})})]}),(0,a.jsx)(sn.A,{component:"nav",children:r})]})},Oa=r=>{const{sidebarConfig:e}=(0,d.useContext)(be.yY),{children:s}=r,o=Tr({sidebarConfig:e}),i=(0,m.zy)(),[c,b]=(0,d.useState)(-1);(0,d.useEffect)(()=>{b(-1)},[i.pathname]);let C=(0,ts.O)(s,K=>K.getElements().filter(_=>_.type===ba));if(s)C.length?C=Ca(C):C.push((0,a.jsx)(Pr,{icon:(0,a.jsx)(va.A,{}),children:s},"default_menu"));else return null;const I=c>=0&&!C[c].props.to;return(0,a.jsx)(Ar,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(Or.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:b},children:[(0,a.jsx)(Sa,{label:C[c]&&C[c].props.label,open:I,onClose:()=>b(-1),children:C[c]&&C[c].props.children}),(0,a.jsx)(fa.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:C})]})})};var Pa=t(87849),Ta=t(10315);const wr=(0,Je.A)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"},"@media print":{display:"none"}},drawerWidth:e=>({width:e.sidebarConfig.drawerWidthClosed}),drawerOpen:e=>({width:e.sidebarConfig.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var wa=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(wa||{});const Ra=r=>{const{sidebarConfig:e}=(0,d.useContext)(be.yY),{openDelayMs:s=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,b=wr({sidebarConfig:e}),C=(0,br.A)(Be=>Be.breakpoints.down("md"),{noSsr:!0}),[I,K]=(0,d.useState)(0),_=(0,d.useRef)(),{isPinned:gt,toggleSidebarPinState:ot}=(0,Ns.Ut)(),vt=()=>{gt||i||(_.current&&(clearTimeout(_.current),_.current=void 0),I!==2&&!C&&(_.current=window.setTimeout(()=>{_.current=void 0,K(2)},s),K(1)))},Mt=()=>{gt||i||(_.current&&(clearTimeout(_.current),_.current=void 0),I===1?K(0):I===2&&(_.current=window.setTimeout(()=>{_.current=void 0,K(0)},o)))},Vt=I===2&&!C||gt,Te=Be=>{Be?(K(2),ot()):(K(0),ot())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Da,{}),(0,a.jsx)(Ar,{value:{isOpen:Vt,setOpen:Te},children:(0,a.jsx)(sn.A,{className:b.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:vt,onFocus:i?()=>{}:vt,onMouseLeave:i?()=>{}:Mt,onBlur:i?()=>{}:Mt,children:(0,a.jsx)(sn.A,{className:un()(b.drawer,b.drawerWidth,{[b.drawerOpen]:Vt}),children:c})})})]})},Ia=r=>{const e=(0,be.Rv)(r.sidebarOptions??{}),s=(0,be.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:b}=r,{isMobile:C}=(0,Ns.Ut)();return C?(0,a.jsx)(Oa,{children:o}):(0,a.jsx)(be.yY.Provider,{value:{sidebarConfig:e,submenuConfig:s},children:(0,a.jsx)(Ra,{openDelayMs:c,closeDelayMs:b,disableExpandOnHover:i,children:o})})};function Da(){const{sidebarConfig:r}=(0,d.useContext)(be.yY),{focusContent:e,contentRef:s}=(0,Cr.H)(),o=wr({sidebarConfig:r}),{t:i}=(0,Pa.i)(Ta.O);return s?.current?(0,a.jsx)(y.A,{onClick:e,variant:"contained",className:un()(o.visuallyHidden),children:i("skipToContent")}):null}var La=t(94509),ns=t(58502),Ma=t(79065),Ba=t(55704),Rr=t(62248);const ja=(0,Je.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",opacity:0,[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create(["margin-left","opacity"],{easing:r.transitions.easing.sharp,duration:e.submenuConfig.defaultOpenDelayMs})},top:0,bottom:0,padding:0,background:r.palette.navigation.submenu?.background??"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:e.submenuConfig.drawerWidthClosed,transitionDelay:`${e.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:e=>({marginLeft:e.left,opacity:1,width:e.submenuConfig.drawerWidthOpen,[r.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:r.spacing(3),left:0,top:0}}),title:{fontSize:r.typography.h5.fontSize,fontWeight:r.typography.fontWeightMedium,color:r.palette.navigation.color,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Ua=r=>{const{isOpen:e}=$s(),{sidebarConfig:s,submenuConfig:o}=(0,d.useContext)(be.yY),i=e?s.drawerWidthOpen:s.drawerWidthClosed,c=ja({left:i,submenuConfig:o}),{isHoveredOn:b}=(0,d.useContext)(be.U1),[C,I]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{I(b)},[b]),(0,a.jsxs)(sn.A,{className:un()(c.drawer,{[c.drawerOpen]:C}),children:[(0,a.jsx)(Fs.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var $a=t(45810),Ir=t.n($a);function Dr(r,e,s=!1){const o=new URLSearchParams(e.search).toString(),i=Ir().parse(o),c=new URLSearchParams(r.search).toString(),b=Ir().parse(c),C=s?xn.isEqual:xn.isMatch;return(0,xn.isEqual)(e.pathname,r.pathname)&&C(b,i)}const Fa=r=>(0,Je.A)(e=>({root:{color:e.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit",textTransform:"none"},closed:{width:r.drawerWidthClosed,justifyContent:"center"},open:{[e.breakpoints.up("sm")]:{width:r.drawerWidthOpen}},highlightable:{"&:hover":{background:e.palette.navigation.navItem?.hoverBackground??"#404040"}},highlighted:{background:e.palette.navigation.navItem?.hoverBackground??"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:r.iconContainerWidth,marginRight:-e.spacing(2),display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"0"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:e.typography.fontWeightBold,fontSize:e.typography.fontSize},searchFieldHTMLInput:{padding:e.spacing(2,0,2)},searchContainer:{width:r.drawerWidthOpen-r.iconContainerWidth},secondaryAction:{width:e.spacing(6),textAlign:"center",marginRight:e.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:e.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${r.selectedIndicatorWidth}px ${e.palette.navigation.indicator}`,color:e.palette.navigation.selectedColor},"&$closed":{width:r.drawerWidthClosed},"& $closedItemIcon":{paddingRight:r.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-r.selectedIndicatorWidth}}}),{name:"BackstageSidebarItem"});function ss(r){return(0,d.useMemo)(()=>Fa(r),[r])()}const Na=(r,e)=>(0,ts.O)(r.props.children,s=>{let o=!1;return s.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:b})=>o=o||Dr(e,(0,wn.o1)(b)));return}i&&(o=Dr(e,(0,wn.o1)(i)))}}),o},[e.pathname]);function ks(r){return r.to===void 0}const ka=d.createElement(Ua).type,Wa=d.forwardRef(function({to:e,end:s,style:o,className:i,activeStyle:c,caseSensitive:b,activeClassName:C="active","aria-current":I="page",...K},_){let{pathname:gt}=(0,m.zy)(),{pathname:ot}=(0,m.x$)(e);b||(gt=gt.toLocaleLowerCase("en-US"),ot=ot.toLocaleLowerCase("en-US"));let vt=gt===ot;!vt&&!s&&(vt=gt.startsWith(`${ot}/`));const Mt=vt?I:void 0;return(0,a.jsx)(P.N_,{...K,to:e,ref:_,"aria-current":Mt,style:{...o,...vt?c:void 0},className:un()([typeof i!="function"?i:void 0,vt?C:void 0])})}),Lr=(0,d.forwardRef)((r,e)=>{const{icon:s,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:b=!1,onClick:C,noTrack:I,children:K,className:_,...gt}=r,{sidebarConfig:ot}=(0,d.useContext)(be.yY),vt=ss(ot),{isOpen:Mt}=$s(),Vt=!Mt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Te=(0,a.jsxs)(sn.A,{style:Vt,children:[(0,a.jsx)(s,{fontSize:"small"}),!Mt&&c?(0,a.jsx)(Rr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Be=(0,a.jsx)(La.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:un()({[vt.closedItemIcon]:!Mt}),children:Te}),Ie=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(sn.A,{"data-testid":"login-button",className:vt.iconContainer,children:Be}),o&&(0,a.jsx)(Fs.A,{variant:"subtitle2",component:"span",className:vt.label,children:o}),(0,a.jsx)("div",{className:vt.secondaryAction,children:K})]}),hn=Mt?Ie:Be,jr={onClick:C,className:un()(_,vt.root,Mt?vt.open:vt.closed,ks(r)&&vt.buttonItem,{[vt.highlightable]:!b})},Ur=(0,rr.s)(),{pathname:Ws}=(0,m.x$)(!ks(r)&&r.to?r.to:""),$r=(0,d.useCallback)(li=>{if(!I){const di="click",ui=o??"Sidebar Item",hi=Ws?{attributes:{to:Ws}}:void 0;Ur.captureEvent(di,ui,hi)}C?.(li)},[Ur,o,Ws,I,C]);return ks(r)?(0,a.jsx)(y.A,{role:"button","aria-label":o,...jr,ref:e,onClick:$r,children:hn}):(0,a.jsx)(Wa,{...jr,activeClassName:vt.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...gt,onClick:$r,children:hn})}),Ka=({children:r,...e})=>{const{sidebarConfig:s}=(0,d.useContext)(be.yY),o=ss(s),[i,c]=(0,d.useState)(!1),b=(0,m.zy)(),C=Na(r,b),I=(0,br.A)(ot=>ot.breakpoints.down("sm")),K=()=>{c(!0)},_=()=>{c(!1)},gt=()=>I?i?(0,a.jsx)(Ba.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ma.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(Rr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(be.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:_,onTouchStart:i?_:K,onMouseEnter:K,className:un()(i&&o.highlighted),children:[(0,a.jsx)(Lr,{hasSubmenu:!0,className:C?o.selected:"",...e,children:gt()}),i&&r]})})},Mr=(0,d.forwardRef)((r,e)=>{const[s]=(0,ts.O)(r.children,o=>o.getElements().filter(i=>i.type===ka));return s?(0,a.jsx)(Ka,{...r,children:s}):(0,a.jsx)(Lr,{...r,ref:e})});function Ri(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[s,o]=useState(""),i=ss(e),c=r.icon?r.icon:SearchIcon,b=()=>{r.onSearch(s),o("")},C=gt=>{gt.key==="Enter"&&(gt.preventDefault(),b())},I=gt=>{o(gt.target.value)},K=gt=>{gt.preventDefault(),gt.stopPropagation()},_=gt=>{b(),gt.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Mr,{icon:c,to:r.to,onClick:_,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:s,onClick:K,onChange:I,onKeyDown:C,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Ii=(0,ns.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Di=(0,ns.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),za=(0,ns.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ha=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),Li=(0,ns.A)("div")(({theme:r})=>{const e=Ha(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Mi=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=ss(r),{isOpen:s,setOpen:o}=useSidebarOpenState();if(useMediaQuery(b=>b.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!s)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:s?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Va=(0,Je.A)({root:{width:be.hC.drawerWidthClosed,height:3*be.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:be.hC.drawerWidthClosed,marginLeft:24}}),Ga=()=>{const r=Va(),{isOpen:e}=$s();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(xr.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(ua,{}):(0,a.jsx)(ga,{})})})},Ya=({children:r})=>(0,a.jsxs)(Cr.G,{children:[(0,a.jsxs)(Ia,{children:[(0,a.jsx)(Ga,{}),(0,a.jsx)(za,{}),(0,a.jsx)(Mr,{icon:la.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Qa=t(71677),Za=t(62437),Ja=t(55484),Xa=t(45061),_a=t(67289);const qa=(0,Je.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var ti=function(r){return r.LIGHT="light",r.DARK="dark",r}(ti||{});const ei=()=>{const r=(0,Tn.gf)(Yn),e=qa(),[s,o]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:Ja.A,title:"Dark theme"},dark:{icon:Za.A,title:"Light theme"}},{title:c,icon:b}=i[s],C=()=>{o(I=>{const K=I==="light"?"dark":"light";return r.setActiveThemeId(K),K})};return(0,a.jsx)(sn.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Qa.Ay,{title:c,arrow:!0,children:(0,a.jsx)(Sr.A,{size:"small",onClick:C,children:(0,a.jsx)(b,{className:e.headerIcon})})})})},ni=()=>(0,a.jsxs)(h.Wj,{children:[(0,a.jsx)(Xa.T,{}),(0,a.jsx)(_a.p,{withSearch:!1})]}),si=(0,a.jsx)(ni,{}),Br=jo({apis:ra,configLoader:ca,plugins:Object.values(n)}),ri=Br.getProvider(),oi=Br.getRouter(),ai=h.Ju.provide((0,p.Hr)({name:"ThemeToggleAddon",component:ei,location:g.e.Header})),ii=(0,a.jsxs)(ur,{children:[(0,a.jsx)(m.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(m.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(ea,{})}),(0,a.jsx)(m.qh,{path:"/docs",element:(0,a.jsx)(h.$j,{}),children:(0,a.jsx)(u.K,{})}),(0,a.jsxs)(m.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(h.Wj,{}),children:[si,(0,a.jsx)(p.po,{children:(0,a.jsx)(ai,{})})]})]}),ci=()=>(0,a.jsx)(ri,{children:(0,a.jsx)(oi,{children:(0,a.jsx)(Ya,{children:ii})})});x.createRoot(document.getElementById("root")).render((0,a.jsx)(ci,{}))},43836:(V,S,t)=>{"use strict";t.d(S,{qO:()=>x,tK:()=>d});var n=t(14041),a=t(63544);function d(h){return(0,a.Q)(h,()=>(0,n.createContext)(void 0))}function x(h){return(0,n.useContext)(d(h))}function m(h){return{set(u){globalThis[`__@backstage/${h}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${h}__`]}}}},10602:(V,S,t)=>{"use strict";t.d(S,{B:()=>n});function n(a){Object.freeze(a);const d={atVersion(x){return a[x]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return a}}),d}},63544:(V,S,t)=>{"use strict";t.d(S,{Q:()=>x});function n(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=n(),d=m=>`__@backstage/${m}__`;function x(m,h){const u=d(m);let p=a[u];return p||(p=h(),a[u]=p,p)}},7341:(V,S,t)=>{"use strict";t.d(S,{v:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.service"})},82292:(V,S,t)=>{"use strict";t.d(S,{n:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.entity-presentation"})},88083:(V,S,t)=>{"use strict";t.d(S,{T:()=>m});var n=t(6820),a=t(72348),d=t(46123),x=t.n(d);function m(g,y){const{kind:A,namespace:v,name:T,title:P,description:L,displayName:O,type:j}=u(g),$=(0,n.U2)({kind:A||"unknown",namespace:v||a.oQ,name:T||"unknown"}),M=p({kind:A,namespace:v,name:T,context:y}),J=[O,P,M].find(F=>F&&typeof F=="string"),Q=[J!==$?$:void 0,j,L].filter(F=>F&&typeof F=="string").join(" | ");return{entityRef:$,primaryTitle:J,secondaryTitle:Q||void 0,Icon:void 0}}const h=g=>!!g&&typeof g=="string";function u(g){if(typeof g=="string"){let y=g.indexOf(":");const A=g.indexOf("/");A!==-1&&A<y&&(y=-1);const v=y===-1?void 0:g.slice(0,y),T=A===-1?void 0:g.slice(y+1,A),P=g.slice(Math.max(y+1,A+1));return{kind:v,namespace:T,name:P}}if(typeof g=="object"&&g!==null){const y=[x()(g,"kind")].find(h),A=[x()(g,"metadata.namespace"),x()(g,"namespace")].find(h),v=[x()(g,"metadata.name"),x()(g,"name")].find(h),T=[x()(g,"metadata.title")].find(h),P=[x()(g,"metadata.description")].find(h),L=[x()(g,"spec.profile.displayName")].find(h),O=[x()(g,"spec.type")].find(h);return{kind:y,namespace:A,name:v,title:T,description:P,displayName:L,type:O}}return{}}function p(g){const y=g.kind?.toLocaleLowerCase("en-US")||"unknown",A=g.namespace||a.oQ,v=g.name||"unknown",T=g.context?.defaultKind?.toLocaleLowerCase("en-US"),P=g.context?.defaultNamespace?.toLocaleLowerCase("en-US");let L=v;return(P&&A.toLocaleLowerCase("en-US")!==P||A!==a.oQ)&&(L=`${A}/${L}`),T&&y.toLocaleLowerCase("en-US")!==T&&(L=`${y}:${L}`),L}},3169:(V,S,t)=>{"use strict";t.d(S,{f:()=>u});var n=t(6820),a=t(72427),d=t(14041),x=t(82292),m=t(88083);function h(p,g,y){const[A,v]=(0,d.useState)(p);return(0,d.useEffect)(()=>{v(p);const T=g?.subscribe({next:P=>{v(P)},complete:()=>{T?.unsubscribe()}});return()=>{T?.unsubscribe()}},y),A}function u(p,g){const A=(0,a.Q2)().get(x.n),v=[A,JSON.stringify(p),JSON.stringify(g||null)],T=(0,d.useMemo)(()=>{if(!A){const P=(0,m.T)(p,g);return{snapshot:P,promise:Promise.resolve(P)}}return A.forEntity(typeof p=="string"||"metadata"in p?p:(0,n.U2)(p),g)},v);return h(T.snapshot,T.update$,[T])}},18:(V,S,t)=>{"use strict";t.d(S,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"catalog-react.starred-entities"})},22995:(V,S,t)=>{"use strict";t.d(S,{Q:()=>F});var n=t(31085),a=t(10394),d=t(72501),x=t(4321),m=t(87263),h=t(16249),u=t(33145),p=t(58837),g=t(87051),y=t(12398),A=t(6924),v=t(20577),T=t(14041),P=t(45250),L=t.n(P),O=t(53373),j=t.n(O);const $=(0,p.A)(G=>({root:{margin:G.spacing(1,0)},label:{position:"relative",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"& > span":{top:0,left:0,position:"absolute"}}}),{name:"BackstageAutocomplete"}),M=(0,g.A)(G=>(0,y.A)({root:{},paper:{margin:0},hasClearIcon:{},hasPopupIcon:{},focused:{},inputRoot:{marginTop:24,backgroundColor:G.palette.background.paper,"$root$hasClearIcon$hasPopupIcon &":{paddingBlock:G.spacing(.75),paddingInlineStart:G.spacing(.75)},"$root$focused &":{outline:"none"},"$root &:hover > fieldset":{borderColor:"#ced4da"},"$root$focused & > fieldset":{borderWidth:1,borderColor:G.palette.primary.main}},popupIndicator:{padding:0,margin:0,color:"#616161","&:hover":{backgroundColor:"unset"},'& [class*="MuiTouchRipple-root"]':{display:"none"}},endAdornment:{"$root$hasClearIcon$hasPopupIcon &":{right:4}},input:{"$root$hasClearIcon$hasPopupIcon &":{fontSize:G.typography.body1.fontSize,paddingBlock:G.spacing(.8125)}}}),{name:"BackstageAutocompleteBase"})(v.Ay),J=G=>(0,n.jsx)(m.A,{...G,transition:!0,placement:"bottom-start",children:({TransitionProps:H})=>(0,n.jsx)(u.A,{...H,style:{transformOrigin:"0 0 0"},children:(0,n.jsx)(a.A,{children:G.children})})}),Q=G=>(0,n.jsx)(x.A,{...G,elevation:8});function F(G){const{label:H,name:nt,LabelProps:W,TextFieldProps:Z,...Y}=G,at=$(),pt=(0,T.useCallback)(bt=>(0,n.jsx)(h.A,{...(0,P.merge)(bt,Z),variant:"outlined"}),[Z]),Et=(0,n.jsx)(M,{size:"small",...Y,renderInput:Y.renderInput??pt,popupIcon:(0,n.jsx)(A.A,{"data-testid":`${nt}-expand`}),PaperComponent:Q,PopperComponent:J});return(0,n.jsx)(a.A,{className:at.root,children:H?(0,n.jsxs)(d.A,{...W,className:j()(at.label,W?.className),component:"label",children:[(0,n.jsx)(a.A,{component:"span",children:H}),Et]}):Et})}},54203:(V,S,t)=>{"use strict";t.d(S,{GI:()=>L});var n=t(31085),a=t(14041),d=t(10394),x=t(64947),m=t(73845),h=t(42899),u=t(72501),p=t(5893),g=t(54917),y=t(65859),A=t(64630),v=t(87849);const T=O=>{const j=(0,p.A)(F=>F.breakpoints.down(O.options?.drawerBreakpoint??"md"),{noSsr:!0}),$=(0,g.A)(),[M,J]=(0,a.useState)(!1),{t:Q}=(0,v.i)(A.j);return j?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.A,{style:{marginTop:$.spacing(1),marginLeft:$.spacing(1)},onClick:()=>J(!0),startIcon:(0,n.jsx)(y.A,{}),children:Q("catalogFilter.buttonTitle")}),(0,n.jsx)(m.Ay,{open:M,onClose:()=>J(!1),anchor:O.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,n.jsxs)(d.A,{m:2,children:[(0,n.jsx)(u.A,{variant:"h6",component:"h2",style:{marginBottom:$.spacing(1)},children:Q("catalogFilter.title")}),O.children]})})]}):(0,n.jsx)(h.A,{item:!0,lg:2,children:O.children})},P=O=>(0,n.jsx)(h.A,{item:!0,xs:12,lg:10,children:O.children}),L=O=>(0,n.jsx)(h.A,{container:!0,style:{position:"relative"},children:O.children});L.Filters=T,L.Content=P},47144:(V,S,t)=>{"use strict";t.d(S,{y:()=>Q});var n=t(31085),a=t(10394),d=t(58837),x=t(14041),m=t(72427),h=t(73466),u=t(7341),p=t(69076),g=t(86901),y=t(44148),A=t(41260);const v=(0,n.jsx)(A.A,{fontSize:"small"}),T=(0,n.jsx)(y.A,{fontSize:"small"});function P({selected:F}){return(0,n.jsx)(p.A,{icon:v,checkedIcon:T,checked:F})}const L=(0,x.memo)(F=>{const{selected:G,value:H,availableOptions:nt,showCounts:W}=F,Z=W?`${H} (${nt?.[H]})`:H;return(0,n.jsx)(g.A,{control:(0,n.jsx)(P,{selected:G}),label:Z,onClick:Y=>Y.preventDefault()})});var O=t(21405),j=t(26796),$=t(22995),M=t(45250);const J=(0,d.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function Q(F){const{label:G,name:H,path:nt,showCounts:W,Filter:Z,InputProps:Y,initialSelectedOptions:at=[],filtersForAvailableValues:pt=["kind"],hidden:Et}=F,bt=J(),{updateFilters:At,filters:Dt,queryParameters:{[H]:lt}}=(0,O.nK)(),dt=(0,m.gf)(u.v),xt=pt.map(rt=>Dt[rt]),{value:ft}=(0,h.A)(async()=>{const rt=nt,{facets:B}=await dt.getEntityFacets({facets:[rt],filter:(0,j.Rr)(xt.filter(Boolean))});return Object.fromEntries(B[rt].map(({value:z,count:ut})=>[z,ut]))},[...xt]),Ct=(0,x.useMemo)(()=>[lt].flat().filter(Boolean),[lt]),Pt=Dt[H]?.values,[it,mt]=(0,x.useState)(Ct.length?Ct:Pt??at);(0,x.useEffect)(()=>{Ct.length&&mt(Ct)},[Ct]);const yt=Object.keys(ft??{}),et=it.length&&yt.length;(0,x.useEffect)(()=>{At({[H]:et?new Z(it):void 0})},[H,et,it,Z,At]),(0,x.useEffect)(()=>{if(!et)return;const rt=Pt??[];(0,M.isEqual)(rt,it)||mt(rt)},[Pt]);const ht=Dt[H];return ht&&typeof ht=="object"&&!("values"in ht)||!yt.length||Et?null:(0,n.jsx)(a.A,{className:bt.root,pb:1,pt:1,children:(0,n.jsx)($.Q,{multiple:!0,disableCloseOnSelect:!0,label:G,name:`${String(H)}-picker`,options:yt,value:it,TextFieldProps:Y,onChange:(rt,B)=>mt(B),renderOption:(rt,{selected:B})=>(0,n.jsx)(L,{selected:B,value:rt,availableOptions:ft,showCounts:!!W})})})}},72987:(V,S,t)=>{"use strict";t.d(S,{t:()=>Pt});var n=t(31085),a=t(6820),d=t(10394),x=t(69076),m=t(86901),h=t(72501),u=t(71677),p=t(58837),g=t(44148),y=t(41260),A=t(14041),v=t(21405),T=t(92822),P=t(92367),L=t(48108),O=t(47966),j=t(90184),$=t(72427),M=t(87290),J=t(7341);function Q({enabled:it}){const mt=(0,$.gf)(J.v),[yt]=(0,A.useState)(async()=>{if(!it)return[];const et="relations.ownedBy";return mt.getEntityFacets({facets:[et]}).then(ht=>ht.facets[et].map(rt=>rt.value).map(rt=>{const{kind:B,name:z,namespace:ut}=(0,a.KU)(rt);return{apiVersion:"backstage.io/v1beta1",kind:B,metadata:{name:z,namespace:ut}}}).sort((rt,B)=>rt.kind.localeCompare(B.kind,"en-US")||rt.metadata.namespace.localeCompare(B.metadata.namespace,"en-US")||rt.metadata.name.localeCompare(B.metadata.name,"en-US"))).catch(()=>[])});return(0,M.A)(async(et,ht)=>{const rt=await yt;if(!rt)return{items:[]};const B=ht?.limit??20,{text:z,start:ut}=F(et),Ot=rt.filter(Lt=>nt(z,Lt)),It=ut+B;return{items:Ot.slice(0,It),...H({entities:Ot,limit:It,payload:{text:z,start:It}})}},[yt],{loading:!0,value:{items:[]}})}function F(it){return G(it)&&it.cursor?JSON.parse(atob(it.cursor)):{text:it.text||"",start:0}}function G(it){return!!it.cursor}function H({entities:it,limit:mt,payload:yt}){return it.length>mt?{cursor:btoa(JSON.stringify(yt))}:{}}function nt(it,mt){const yt=it.trim();return mt.kind.includes(yt)||mt.metadata.namespace?.includes(yt)||mt.metadata.name.includes(yt)}function W(){const it=(0,$.gf)(J.v);return(0,M.A)(async(mt,yt)=>{const et=mt,ht=mt,rt=yt?.limit??20;if(ht.cursor){const z=await it.queryEntities({cursor:ht.cursor,limit:rt});return{cursor:z.pageInfo.nextCursor,items:[...ht.items,...z.items]}}const B=await it.queryEntities({fullTextFilter:{term:et.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:rt});return{cursor:B.pageInfo.nextCursor,items:B.items}},[],{loading:!0})}var Z=t(76842);function Y({mode:it,initialSelectedOwnersRefs:mt}){const yt=it==="owners-only",et=W(),ht=Q({enabled:yt}),[rt,B]=yt?ht:et;return[rt,B,at({enabled:!yt,initialSelectedOwnersRefs:mt})]}function at({enabled:it,initialSelectedOwnersRefs:mt}){const yt=(0,A.useRef)({}),et=(0,$.gf)(J.v),[,ht]=(0,M.A)(async()=>{(await et.getEntitiesByRefs({entityRefs:mt})).items.forEach(B=>{B&&(yt.current[(0,a.U2)(B)]=B)})},[]);return(0,Z.u)(()=>{it&&mt.length>0&&ht()}),{getEntity:rt=>yt.current[rt],setEntity:rt=>{yt.current[(0,a.U2)(rt)]=rt}}}var pt=t(87051),Et=t(3169),bt=t(64630),At=t(87849),Dt=t(22995);const lt=(0,p.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),dt=(0,pt.A)(it=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(m.A),xt=(0,n.jsx)(y.A,{fontSize:"small"}),ft=(0,n.jsx)(g.A,{fontSize:"small"});function Ct(it){const mt=lt(),yt=it.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:et}=(0,Et.f)(it.entity);return(0,n.jsx)(d.A,{className:mt.fullWidth,children:(0,n.jsx)(dt,{className:mt.fullWidth,control:(0,n.jsx)(x.A,{icon:xt,checkedIcon:ft,checked:it.isSelected}),onClick:ht=>ht.preventDefault(),label:(0,n.jsx)(u.Ay,{title:et,children:(0,n.jsxs)(d.A,{display:"flex",alignItems:"center",children:[yt?(0,n.jsx)(O.A,{fontSize:"small"}):(0,n.jsx)(L.A,{fontSize:"small"}),"\xA0",(0,n.jsx)(d.A,{className:mt.boxLabel,children:(0,n.jsx)(h.A,{noWrap:!0,children:et})})]})})})})}const Pt=it=>{const mt=lt(),{mode:yt="owners-only"}=it||{},{updateFilters:et,filters:ht,queryParameters:{owners:rt}}=(0,v.nK)(),[B,z]=(0,A.useState)(""),{t:ut}=(0,At.i)(bt.j),Ot=(0,A.useMemo)(()=>[rt].flat().filter(Boolean),[rt]),[It,Lt]=(0,A.useState)(Ot.length?Ot:ht.owners?.values??[]),[{value:Ut,loading:Nt},Wt,Kt]=Y({mode:yt,initialSelectedOwnersRefs:It});(0,P.s)(()=>Wt({text:B}),[B,Wt],250);const te=Ut?.items||[];return(0,A.useEffect)(()=>{if(Ot.length){const jt=new T.N9(Ot);Lt(jt.values)}},[Ot]),(0,A.useEffect)(()=>{et({owners:It.length?new T.N9(It):void 0})},[It,et]),["user","group"].includes(ht.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,n.jsx)(d.A,{className:mt.root,pb:1,pt:1,children:(0,n.jsx)(Dt.Q,{label:ut("entityOwnerPicker.title"),multiple:!0,disableCloseOnSelect:!0,loading:Nt,options:te,value:It,getOptionSelected:(jt,kt)=>typeof kt=="string"?(0,a.U2)(jt)===kt:jt===kt,getOptionLabel:jt=>{const kt=typeof jt=="string"?Kt.getEntity(jt)||(0,a.KU)(jt,{defaultKind:"group",defaultNamespace:"default"}):jt;return(0,j.Z)(kt,(0,j.S)(kt))},onChange:(jt,kt)=>{z(""),Lt(kt.map(ee=>{const fe=typeof ee=="string"?ee:(0,a.U2)(ee);return typeof ee!="string"&&Kt.setEntity(ee),fe}))},filterOptions:jt=>jt,renderOption:(jt,{selected:kt})=>(0,n.jsx)(Ct,{entity:jt,isSelected:kt}),name:"owner-picker",onInputChange:(jt,kt)=>{z(kt)},ListboxProps:{onScroll:jt=>{const kt=jt.currentTarget;Math.abs(kt.scrollHeight-kt.clientHeight-kt.scrollTop)<1&&Ut?.cursor&&Wt({items:Ut.items,cursor:Ut.cursor})},"data-testid":"owner-picker-listbox"},LabelProps:{className:mt.label},TextFieldProps:{className:mt.input}})})}},8859:(V,S,t)=>{"use strict";t.d(S,{z:()=>P});var n=t(31085),a=t(6820),d=t(72348),x=t(72072),m=t(9222),h=t(14041),u=t(29207),p=t(10394),g=t(71677),y=t(58837),A=t(3169);const v=(0,y.A)(O=>({root:{display:"inline-flex",alignItems:"center",textDecoration:"inherit"},icon:{marginRight:O.spacing(.5),color:O.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),T=O=>{const{entityRef:j,hideIcon:$,disableTooltip:M,defaultKind:J,defaultNamespace:Q}=O,F=v(),{primaryTitle:G,secondaryTitle:H,Icon:nt}=(0,A.f)(j,{defaultKind:J,defaultNamespace:Q});let W=(0,n.jsx)(n.Fragment,{children:G});return W=(0,n.jsxs)(p.A,{component:"span",className:F.root,children:[nt&&!$?(0,n.jsx)(p.A,{component:"span",className:F.icon,children:(0,n.jsx)(nt,{fontSize:"inherit"})}):null,W]}),H&&!M&&(W=(0,n.jsx)(g.Ay,{enterDelay:1500,title:H,children:W})),W},P=(0,h.forwardRef)((O,j)=>{const{entityRef:$,defaultKind:M,defaultNamespace:J,title:Q,children:F,hideIcon:G,disableTooltip:H,...nt}=O,W=L(O.entityRef),Z=F??Q??(0,n.jsx)(T,{entityRef:$,defaultKind:M,defaultNamespace:J,hideIcon:G,disableTooltip:H});return(0,n.jsx)(x.N_,{...nt,ref:j,to:W,children:Z})});function L(O){const j=(0,m.S)(u.s);let $,M,J;if(typeof O=="string"){const F=(0,a.KU)(O);$=F.kind,M=F.namespace,J=F.name}else"metadata"in O?($=O.kind,M=O.metadata.namespace,J=O.metadata.name):($=O.kind,M=O.namespace,J=O.name);$=$.toLocaleLowerCase("en-US"),M=M?.toLocaleLowerCase("en-US")??d.oQ;const Q={kind:encodeURIComponent($),namespace:encodeURIComponent(M),name:encodeURIComponent(J)};return j(Q)}},34428:(V,S,t)=>{"use strict";t.d(S,{i:()=>m});var n=t(31085),a=t(6820),d=t(14041),x=t(8859);function m(h){const{entityRefs:u,hideIcons:p,...g}=h;return(0,n.jsx)(n.Fragment,{children:u.map((y,A)=>{const v=typeof y=="string"?y:(0,a.U2)(y);return(0,n.jsxs)(d.Fragment,{children:[A>0&&", ",(0,n.jsx)(x.z,{...g,entityRef:y,hideIcon:p})]},`${A}.${v}`)})})}},90184:(V,S,t)=>{"use strict";t.d(S,{S:()=>x,Z:()=>m});var n=t(72348),a=t(46123),d=t.n(a);function x(h,u){const p=u?.defaultKind;let g,y,A;return"metadata"in h?(g=h.kind,y=h.metadata.namespace,A=h.metadata.name):(g=h.kind,y=h.namespace,A=h.name),(y===void 0||y==="")&&(y=n.oQ),u?.defaultNamespace!==void 0?u?.defaultNamespace===y&&(y=void 0):y===n.oQ&&(y=void 0),g=g.toLocaleLowerCase("en-US"),g=p&&p.toLocaleLowerCase("en-US")===g?void 0:g,`${g?`${g}:`:""}${y?`${y}/`:""}${A}`}function m(h,u){for(const p of["spec.profile.displayName","metadata.title"]){const g=d()(h,p);if(g&&typeof g=="string")return g}return u}},91035:(V,S,t)=>{"use strict";t.d(S,{m:()=>g});var n=t(31085),a=t(58837),d=t(14041),x=t(92822),m=t(47144),h=t(64630),u=t(87849);const p=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),g=y=>{const A=p(),{t:v}=(0,u.i)(h.j);return(0,n.jsx)(m.y,{label:v("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:x.q_,showCounts:y.showCounts,InputProps:{className:A.input},initialSelectedOptions:y.initialFilter?y.initialFilter:[],hidden:y.hidden})}},67626:(V,S,t)=>{"use strict";t.d(S,{y:()=>Dt});var n=t(31085),a=t(72427),d=t(65461),x=t(40703),m=t(58007),h=t(68804),u=t(65569),p=t(5951),g=t(26343),y=t(72501),A=t(58837),v=t(9684),T=t(31129),P=t(14041),L=t(92822),O=t(21405),j=t(16009),$=t(45250),M=t(73466),J=t(7341),Q=t(26796),F=t(87290),G=t(48899);function H(){const lt=(0,a.gf)(j.K),dt=(0,a.gf)(J.v),{filters:xt}=(0,O.nK)(),{value:ft,loading:Ct}=(0,M.A)(async()=>(await lt.getBackstageIdentity()).ownershipEntityRefs,[]),{user:Pt,owners:it,...mt}=xt,yt=(0,Q.$3)((0,$.compact)(Object.values(mt))),[{value:et,loading:ht},rt]=(0,F.A)(async z=>{const ut=nt(z.owners,z.ownershipEntityRefs);if(ut===void 0)return 0;const{["metadata.name"]:Ot,...It}=z.filter.filter,{totalItems:Lt}=await dt.queryEntities({...z.filter,filter:{...It,"relations.ownedBy":ut},limit:0});return Lt},[],{loading:!0});return(0,G.A)(()=>{Object.keys(yt.filter).length!==0&&ft!==void 0&&rt({ownershipEntityRefs:ft,owners:it,filter:yt})},[ft,it,yt]),{count:et,loading:Ct||ht,filter:(0,P.useMemo)(()=>L.tN.owned(ft??[]),[ft]),ownershipEntityRefs:ft}}function nt(lt,dt){if(dt===void 0)return;const xt=lt?.values??[];if(xt.length){const ft=(0,$.intersection)(xt,dt);return ft.length===0?void 0:ft}return dt}function W(){const lt=(0,a.gf)(J.v),{filters:dt}=(0,O.nK)(),xt=(0,P.useRef)(),ft=(0,P.useMemo)(()=>{const{user:it,...mt}=dt,yt=(0,$.compact)(Object.values(mt)),et=(0,Q.$3)(yt),ht={...et,limit:0};return Object.keys(et.filter).length===0?(xt.current=void 0,xt.current):(0,$.isEqual)(ht,xt.current)?xt.current:(xt.current=ht,ht)},[dt]),{value:Ct,loading:Pt}=(0,M.A)(async()=>{if(ft===void 0)return 0;const{totalItems:it}=await lt.queryEntities(ft);return it},[ft]);return{count:Ct,loading:Pt}}var Z=t(6820),Y=t(56889);function at(){const lt=(0,a.gf)(J.v),{filters:dt}=(0,O.nK)(),{starredEntities:xt}=(0,Y.I)(),ft=(0,P.useRef)(),Ct=(0,P.useMemo)(()=>{const{user:yt,...et}=dt,ht=(0,$.compact)(Object.values(et)),rt=(0,Q.$3)(ht),z={...rt,filter:{...rt.filter,["metadata.name"]:Array.from(xt).map(ut=>(0,Z.KU)(ut).name)},limit:1e3};return(0,$.isEqual)(z,ft.current)?ft.current:(ft.current=z,z)},[dt,xt]),{value:Pt,loading:it}=(0,M.A)(async()=>xt.size?(await lt.queryEntities(Ct)).items.map(et=>(0,Z.U2)({kind:et.kind,namespace:et.metadata.namespace,name:et.metadata.name})).filter(et=>xt.has(et)).length:0,[Ct,xt]),mt=(0,P.useMemo)(()=>L.tN.starred(Array.from(xt)),[xt]);return{count:Pt,loading:it,filter:mt}}var pt=t(87849),Et=t(64630);const bt=(0,A.A)(lt=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:lt.spacing(1,0,1,0)},title:{margin:lt.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:lt.palette.text.primary},menuItem:{minHeight:lt.spacing(6)},groupWrapper:{margin:lt.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function At(lt,dt){return[{name:dt("userListPicker.personalFilter.title"),items:[{id:"owned",label:dt("userListPicker.personalFilter.ownedLabel"),icon:v.A},{id:"starred",label:dt("userListPicker.personalFilter.starredLabel"),icon:T.Gg}]},{name:lt,items:[{id:"all",label:dt("userListPicker.orgFilterAllLabel")}]}]}const Dt=lt=>{const{initialFilter:dt,availableFilters:xt,hidden:ft,alwaysKeepFilters:Ct}=lt,Pt=bt(),it=(0,a.gf)(d.U),{t:mt}=(0,pt.i)(Et.j),yt=it.getOptionalString("organization.name")??mt("userListPicker.defaultOrgName"),{filters:et,updateFilters:ht,queryParameters:{kind:rt,user:B}}=(0,O.nK)(),z=["starred","all"],ut=At(yt,mt).map(Gt=>({...Gt,items:Gt.items.filter(({id:ne})=>["group","user"].some(de=>de===rt)?z.includes(ne):!xt||xt.includes(ne))})).filter(({items:Gt})=>!!Gt.length),{count:Ot,loading:It,filter:Lt}=H(),{count:Ut}=W(),{count:Nt,filter:Wt,loading:Kt}=at(),te=(0,P.useMemo)(()=>[B].flat()[0],[B]),[jt,kt]=(0,P.useState)(te??dt),ee=(0,P.useMemo)(()=>({all:Ut,starred:Nt,owned:Ot}),[Nt,Ot,Ut]);(0,P.useEffect)(()=>{te&&kt(te)},[te]);const fe=It||Kt;return(0,P.useEffect)(()=>{!fe&&jt&&jt!=="all"&&ee[jt]===0&&!Ct&&kt("all")},[fe,ee,jt,kt,Ct]),(0,P.useEffect)(()=>{if(!jt||fe)return;ht({user:jt==="owned"?Lt:jt==="starred"?Wt:L.tN.all()})},[jt,Wt,Lt,ht,fe]),ft?null:(0,n.jsx)(x.A,{className:Pt.root,children:ut.map(Gt=>(0,n.jsxs)(P.Fragment,{children:[(0,n.jsx)(y.A,{variant:"subtitle2",component:"span",className:Pt.title,children:Gt.name}),(0,n.jsx)(x.A,{className:Pt.groupWrapper,children:(0,n.jsx)(m.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":Gt.name,children:Gt.items.map((ne,de)=>(0,n.jsxs)(g.A,{role:"none presentation",divider:de!==Gt.items.length-1,onClick:()=>kt(ne.id),selected:ne.id===et.user?.value,className:Pt.menuItem,disabled:ee[ne.id]===0,"data-testid":`user-picker-${ne.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[ne.icon&&(0,n.jsx)(h.A,{className:Pt.listIcon,children:(0,n.jsx)(ne.icon,{fontSize:"small"})}),(0,n.jsx)(p.A,{children:(0,n.jsxs)(y.A,{variant:"body1",children:[ne.label," "]})}),(0,n.jsx)(u.A,{children:ee[ne.id]??"-"})]},ne.id))})})]},Gt.name))})}},92822:(V,S,t)=>{"use strict";t.d(S,{I5:()=>g,Kf:()=>T,N9:()=>p,V3:()=>u,gM:()=>x,gZ:()=>v,mT:()=>P,qA:()=>m,q_:()=>h,tN:()=>A,z:()=>y});var n=t(6820),a=t(51372),d=t(67871);class x{value;label;constructor(O,j){this.value=O,this.label=j}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class m{value;constructor(O){this.value=O}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class h{values;constructor(O){this.values=O}filterEntity(O){return this.values.every(j=>(O.metadata.tags??[]).includes(j))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class u{value;constructor(O){this.value=O}filterEntity(O){const j=this.toUpperArray(this.value.split(/\s/)),$=this.toUpperArray([O.metadata.tags]),M=this.toUpperArray([O.metadata.name,O.metadata.title,O.spec?.profile?.displayName]);for(const J of j)if($.every(Q=>Q!==J)&&M.every(Q=>!Q.includes(J)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(O){return O.flat().filter(j=>!!j).map(j=>j.toLocaleUpperCase("en-US"))}}class p{values;constructor(O){this.values=O.reduce((j,$)=>{try{return j.push((0,n.U2)((0,n.KU)($,{defaultKind:"Group"}))),j}catch{return j}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(O){return this.values.some(j=>(0,d.t)(O,a.vv).some($=>(0,n.U2)($)===j))}toQueryValue(){return this.values}}class g{values;constructor(O){this.values=O}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(O){return this.values.some(j=>O.spec?.lifecycle===j)}toQueryValue(){return this.values}}class y{values;constructor(O){this.values=O}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(O){return this.values.some(j=>O.metadata.namespace===j)}toQueryValue(){return this.values}}class A{value;refs;constructor(O,j){this.value=O,this.refs=j}static owned(O){return new A("owned",O)}static all(){return new A("all")}static starred(O){return new A("starred",O)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(O=>(0,n.KU)(O).name)??[]}:{}}filterEntity(O){if(this.value==="starred")return this.refs?.includes((0,n.U2)(O))??!0;if(this.value==="owned"){const j=(0,d.t)(O,a.vv);return this.refs?.some($=>j.some(M=>(0,n.U2)(M)===$))??!1}return!0}toQueryValue(){return this.value}}class v{value;isOwnedEntity;isStarredEntity;constructor(O,j,$){this.value=O,this.isOwnedEntity=j,this.isStarredEntity=$}filterEntity(O){switch(this.value){case"owned":return this.isOwnedEntity(O);case"starred":return this.isStarredEntity(O);default:return!0}}toQueryValue(){return this.value}}class T{value;constructor(O){this.value=O}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(O){const j=O.metadata.annotations?.["backstage.io/orphan"];return j!==void 0&&this.value.toString()===j}}class P{value;constructor(O){this.value=O}filterEntity(O){const j=O?.status?.items?.length>0;return j!==void 0&&this.value===j}}},21405:(V,S,t)=>{"use strict";t.d(S,{B9:()=>L,nK:()=>O});var n=t(31085),a=t(45250),d=t.n(a),x=t(45810),m=t.n(x),h=t(14041),u=t(18690),p=t(87290),g=t(22771),y=t(71581),A=t(7341),v=t(26796),T=t(72427);const P=(0,h.createContext)(void 0),L=j=>{const $=(0,y.A)(),M=(0,T.gf)(A.v),[J,Q]=(0,h.useState)({}),F=(0,u.zy)(),H=j.pagination===!0?"cursor":typeof j.pagination=="object"?j.pagination.mode??"cursor":"none",nt=typeof j.pagination=="object"?j.pagination.limit??20:20,{queryParameters:W,cursor:Z,offset:Y,limit:at}=(0,h.useMemo)(()=>{const et=m().parse(F.search,{ignoreQueryPrefix:!0});let ht=nt;if(typeof et.limit=="string"){const B=Number.parseInt(et.limit,10);isNaN(B)||(ht=B)}const rt=typeof et.offset=="string"&&H==="offset"?Number.parseInt(et.offset,10):void 0;return{queryParameters:et.filters??{},cursor:typeof et.cursor=="string"&&H==="cursor"?et.cursor:void 0,offset:H==="offset"&&rt&&!isNaN(rt)?rt:void 0,limit:ht}},[H,F.search,nt]),[pt,Et]=(0,h.useState)(Z),[bt,At]=(0,h.useState)(Y),[Dt,lt]=(0,h.useState)(at),[dt,xt]=(0,h.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:{},offset:bt,limit:Dt})),[{loading:ft,error:Ct},Pt]=(0,p.A)(async()=>{const et=(0,a.compact)(Object.values(J)),ht=Object.keys(J).reduce((rt,B)=>{const z=J[B];return z?.toQueryValue&&(rt[B]=z.toQueryValue()),rt},{});if(H!=="none")if(pt){if(pt!==dt.appliedCursor){const rt=(0,v.be)(et),B=await M.queryEntities({cursor:pt,limit:Dt});xt({appliedFilters:J,appliedCursor:pt,backendEntities:B.items,entities:B.items.filter(rt),pageInfo:B.pageInfo,totalItems:B.totalItems})}}else{const rt=(0,v.be)(et),B=(0,v.$3)(et),z=(0,v.$3)((0,a.compact)(Object.values(dt.appliedFilters)));if(H==="offset"&&(dt.limit!==Dt||dt.offset!==bt)||!(0,a.isEqual)(z,B)){const ut=await M.queryEntities({...B,limit:Dt,offset:bt,orderFields:[{field:"metadata.name",order:"asc"}]});xt({appliedFilters:J,backendEntities:ut.items,entities:ut.items.filter(rt),pageInfo:ut.pageInfo,totalItems:ut.totalItems,limit:Dt,offset:bt})}}else{const rt=(0,v.be)(et),B=(0,v.Rr)(et),z=(0,v.Rr)((0,a.compact)(Object.values(dt.appliedFilters)));if((0,a.isEqual)(z,B)){const ut=dt.backendEntities.filter(rt);xt({appliedFilters:J,backendEntities:dt.backendEntities,entities:ut,totalItems:ut.length})}else{const ut=await M.getEntities({filter:B}),Ot=ut.items.filter(rt);xt({appliedFilters:J,backendEntities:ut.items,entities:Ot,totalItems:Ot.length})}}if($()){const rt=m().parse(F.search,{ignoreQueryPrefix:!0}),B=m().stringify({...rt,filters:ht,cursor:pt,offset:bt,limit:Dt},{addQueryPrefix:!0,arrayFormat:"repeat"}),z=`${window.location.pathname}${B}`;window.history?.replaceState(null,document.title,z)}},[M,W,J,dt,pt,H,Dt,bt],{loading:!0});(0,g.A)(Pt,10,[J,pt,Dt,bt]);const it=(0,h.useCallback)(et=>{H==="cursor"?Et(void 0):H==="offset"&&At(0),Q(ht=>{const rt=typeof et=="function"?et(ht):et;return{...ht,...rt}})},[H]),mt=(0,h.useMemo)(()=>{if(H!=="cursor")return;const et=dt.pageInfo?.prevCursor,ht=dt.pageInfo?.nextCursor;return{prev:et?()=>Et(et):void 0,next:ht?()=>Et(ht):void 0}},[H,dt.pageInfo]),yt=(0,h.useMemo)(()=>({filters:dt.appliedFilters,entities:dt.entities,backendEntities:dt.backendEntities,updateFilters:it,queryParameters:W,loading:ft,error:Ct,pageInfo:mt,totalItems:dt.totalItems,limit:Dt,offset:bt,setLimit:lt,setOffset:At,paginationMode:H}),[dt,it,W,ft,Ct,mt,Dt,bt,H,lt,At]);return(0,n.jsx)(P.Provider,{value:yt,children:j.children})};function O(){const j=(0,h.useContext)(P);if(!j)throw new Error("useEntityList must be used within EntityListProvider");return j}},56889:(V,S,t)=>{"use strict";t.d(S,{I:()=>u});var n=t(6820),a=t(72427),d=t(14041),x=t(1394),m=t(18);function h(p){return typeof p=="string"?p:(0,n.U2)(p)}function u(){const p=(0,a.gf)(m.a),g=(0,x.A)((0,d.useMemo)(()=>p.starredEntitie$(),[p]),new Set),y=(0,d.useCallback)(v=>g.has(h(v)),[g]),A=(0,d.useCallback)(v=>p.toggleStarred(h(v)).then(),[p]);return{starredEntities:g,toggleStarredEntity:A,isStarredEntity:y}}},29207:(V,S,t)=>{"use strict";t.d(S,{s:()=>d});var n=t(34569),a=t(63544);const d=(0,a.Q)("catalog:entity-route-ref",()=>(0,n.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function x(m){return{kind:m.kind.toLocaleLowerCase("en-US"),namespace:m.metadata.namespace?.toLocaleLowerCase("en-US")??DEFAULT_NAMESPACE,name:m.metadata.name}}},64630:(V,S,t)=>{"use strict";t.d(S,{j:()=>a});var n=t(93184);const a=(0,n.h)({id:"catalog-react",messages:{catalogFilter:{title:"Filters",buttonTitle:"Filters"},entityKindPicker:{title:"Kind",errorMessage:"Failed to load entity kinds"},entityLifecyclePicker:{title:"Lifecycle"},entityNamespacePicker:{title:"Namespace"},entityOwnerPicker:{title:"Owner"},entityProcessingStatusPicker:{title:"Processing Status"},entityTagPicker:{title:"Tags"},entityPeekAheadPopover:{title:"Drill into the entity to see all of the tags.",emailCardAction:{title:"Email {{email}}",subTitle:"mailto {{email}}"},entityCardActionsTitle:"Show details"},entitySearchBar:{placeholder:"Search"},entityTypePicker:{title:"Type",errorMessage:"Failed to load entity types",optionAllTitle:"all"},favoriteEntity:{addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites"},inspectEntityDialog:{title:"Entity Inspector",closeButtonTitle:"Close",ancestryPage:{title:"Ancestry"},colocatedPage:{title:"Colocated",description:"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).",alertNoLocation:"Entity had no location information.",alertNoEntity:"There were no other entities on this location."},jsonPage:{title:"Entity as JSON",description:"This is the raw entity data as received from the catalog, on JSON form."},overviewPage:{title:"Overview"},yamlPage:{title:"Entity as YAML",description:"This is the raw entity data as received from the catalog, on YAML form."}},unregisterEntityDialog:{title:"Are you sure you want to unregister this entity?",cancelButtonTitle:"Cancel",deleteButtonTitle:"Delete Entity",deleteEntitySuccessMessage:"Removed entity {{entityName}}",bootstrapState:{title:'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.',advancedDescription:"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.",advancedOptions:"Advanced Options"},onlyDeleteStateTitle:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.",unregisterState:{title:"This action will unregister the following entities:",subTitle:"Located at the following location:",description:"To undo, just re-register the entity in {{appTitle}}.",unregisterButtonTitle:"Unregister Location",advancedOptions:"Advanced Options",advancedDescription:"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."},errorStateTitle:"Internal error: Unknown state"},userListPicker:{defaultOrgName:"Company",personalFilter:{title:"Personal",ownedLabel:"Owned",starredLabel:"Starred"},orgFilterAllLabel:"All"}}})},26796:(V,S,t)=>{"use strict";t.d(S,{$3:()=>d,Rr:()=>x,be:()=>m});var n=t(92822);function a(h){return!!h.getFullTextFilters}function d(h){const u=h.reduce((g,y)=>({...g,...y.getCatalogFilters?y.getCatalogFilters():{}}),{}),p=h.find(a)?.getFullTextFilters();return{filter:u,fullTextFilter:p}}function x(h){const u={};return h.forEach(p=>{p instanceof n.q_||p instanceof n.N9||p instanceof n.I5||p instanceof n.z||p instanceof n.tN||p instanceof n.Kf||p instanceof n.V3||p instanceof n.gZ||Object.assign(u,p.getCatalogFilters?.()||{})}),u}function m(h){return u=>h.every(p=>!p.filterEntity||p.filterEntity(u))}},67871:(V,S,t)=>{"use strict";t.d(S,{t:()=>a});var n=t(6820);function a(d,x,m){let h=d?.relations?.filter(u=>u.type===x).map(u=>(0,n.KU)(u.targetRef))||[];return m?.kind&&(h=h.filter(u=>u.kind.toLocaleLowerCase("en-US")===m.kind.toLocaleLowerCase("en-US"))),h}},95203:(V,S,t)=>{"use strict";t.d(S,{qP:()=>h,Zg:()=>p,rQ:()=>y,pS:()=>g,UJ:()=>u});var n=t(59598);class a{id;params;optional;defaultTarget;[x=n.b];constructor(v,T,P,L){this.id=v,this.params=T,this.optional=P,this.defaultTarget=L,this[x]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function d(A){return new a(A.id,A.params??[],!!A.optional,A?.defaultTarget)}var x,m=t(34569);const h=d({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),u=d({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),p=d({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),g=d({id:"catalog:unregister-redirect",optional:!0}),y=(0,m.H)({id:"catalog"})},54241:(V,S,t)=>{"use strict";t.d(S,{b:()=>n});var n=function(a){return a.DENY="DENY",a.ALLOW="ALLOW",a.CONDITIONAL="CONDITIONAL",a}({})},96824:(V,S,t)=>{"use strict";t.d(S,{x:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.permission.api"})},70734:(V,S,t)=>{"use strict";t.d(S,{e:()=>m});var n=t(31085),a=t(14041),d=t(58837);const x=(0,d.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),m=h=>{const{text:u,preTag:p,postTag:g}=h,y=x(),A=(0,a.useMemo)(()=>u.split(new RegExp(`(${p}.+?${g})`)),[g,p,u]);return(0,n.jsx)(n.Fragment,{children:A.map((v,T)=>v.includes(p)?(0,n.jsx)("mark",{className:y.highlight,children:v.replace(new RegExp(`${p}|${g}`,"g"),"")},T):v)})}},54560:(V,S,t)=>{"use strict";t.d(S,{ec:()=>g});var n=t(31085),a=t(14041),d=t(93368),x=t(88758),m=t(8109);const h="search.results.list.items.extensions.v1",u=(v,T)=>{for(const P of v)if(!(!isValidElement(P)||!getComponentData(P,h)?.(T)))return cloneElement(P,{rank:T.rank,highlight:T.highlight,result:T.document,...P.props});return null},p=v=>{const{rank:T,result:P,noTrack:L,children:O,alignItems:j="flex-start",...$}=v,M=(0,d.s)(),J=(0,a.useCallback)(()=>{L||P&&M.captureEvent("discover",P.title,{attributes:{to:P.location},value:T})},[T,P,L,M]);return(0,n.jsx)(m.A,{divider:!0,alignItems:j,onClickCapture:J,...$,children:O})},g=v=>{const{name:T,component:P,predicate:L=()=>!0}=v;return(0,x.zZ)({name:T,component:{lazy:()=>P().then(O=>j=>(0,n.jsx)(p,{rank:j.rank,result:j.result,noTrack:j.noTrack,children:(0,a.createElement)(O,j)}))},data:{[h]:L}})},y=v=>{const T=useElementFilter(v,P=>P.selectByComponentData({key:h}).getElements(),[v]);return useCallback((P,L)=>{const O=u(T,P);return _jsx(Fragment,{children:O??_jsx(p,{rank:P.rank,result:P.document,children:_jsx(DefaultResultListItem,{rank:P.rank,highlight:P.highlight,result:P.document})})},L)},[T])},A=v=>{const{results:T,children:P,...L}=v,O=y(P);return _jsx(List,{...L,children:T.map(O)})}},86202:(V,S,t)=>{"use strict";t.d(S,{A:()=>n,G:()=>a});const n="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity"},72020:(V,S,t)=>{"use strict";t.d(S,{AF:()=>p,Hr:()=>A,Wm:()=>u,YR:()=>L,po:()=>g});var n=t(31085),a=t(14041),d=t(18690),x=t(19402),m=t(88758),h=t(82442);const u="techdocs.addons.addon.v1",p="techdocs.addons.wrapper.v1",g=()=>null;(0,x.h)(g,p,!0);const y=O=>`${u}.${O.toLocaleLowerCase("en-US")}`;function A(O){const{name:j,component:$}=O;return(0,m.zZ)({name:j,component:{sync:M=>(0,n.jsx)($,{...M})},data:{[u]:O,[y(j)]:!0}})}const v=(O,j)=>O.selectByComponentData({key:j}).getElements()[0],T=O=>O.selectByComponentData({key:p}).selectByComponentData({key:u}),P=O=>O.selectByComponentData({key:p}).findComponentData({key:u}),L=()=>{const O=(0,d.P1)(),j=(0,h.O)(O,T),$=(0,h.O)(O,P),M=(0,a.useCallback)(F=>{if(!j||!F)return null;const G=y(F.name);return v(j,G)??null},[j]),J=(0,a.useCallback)(F=>{const G=$.find(H=>H.name===F);return G?M(G):null},[$,M]),Q=(0,a.useCallback)(F=>{const G=$.filter(H=>H.location===F);return G.length?G.map(M):null},[$,M]);return{renderComponentByName:J,renderComponentsByLocation:Q}}},26679:(V,S,t)=>{"use strict";t.d(S,{l:()=>a,s:()=>d});var n=t(55309);const a=(0,n.y)({id:"plugin.techdocs.service"}),d=(0,n.y)({id:"plugin.techdocs.storageservice"})},86892:(V,S,t)=>{"use strict";t.d(S,{R:()=>O,V:()=>j});var n=t(31085),a=t(14041),d=t(73466),x=t(28966),m=t(6820),h=t(43836),u=t(10602),p=t(72427),g=t(65461),y=t(25862),A=t(26679);function v($,M){return M.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||($.kind=$.kind.toLocaleLowerCase(),$.name=$.name.toLocaleLowerCase(),$.namespace=$.namespace.toLocaleLowerCase()),$}const T=($,M)=>(0,m.U2)($)===(0,m.U2)(M),P={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},L=(0,h.tK)("techdocs-reader-page-context"),O=(0,a.memo)($=>{const{entityRef:M,children:J}=$,Q=(0,p.gf)(A.l),F=(0,p.gf)(g.U),G=(0,d.A)(async()=>Q.getEntityMetadata(M),[M]),H=(0,x.A)(async()=>Q.getTechDocsMetadata(M),[M]),[nt,W]=(0,a.useState)(P.title),[Z,Y]=(0,a.useState)(P.subtitle),[at,pt]=(0,a.useState)(P.shadowRoot);(0,a.useEffect)(()=>{at&&!H.value&&!H.loading&&H.retry()},[H.value,H.loading,at,H.retry,H]);const Et={metadata:H,entityRef:v(M,F),entityMetadata:G,shadowRoot:at,setShadowRoot:pt,title:nt,setTitle:W,subtitle:Z,setSubtitle:Y},bt=(0,u.B)({1:Et});return(0,n.jsx)(y.Ig,{attributes:{entityRef:(0,m.U2)(M)},children:(0,n.jsx)(L.Provider,{value:bt,children:J instanceof Function?J(Et):J})})},($,M)=>T($.entityRef,M.entityRef)),j=()=>{const $=(0,a.useContext)(L);if($===void 0)return P;const M=$.atVersion(1);if(M===void 0)throw new Error("No context found for version 1.");return M}},99730:(V,S,t)=>{"use strict";t.d(S,{e:()=>n});const n=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(V,S,t)=>{"use strict";t.d(S,{V:()=>n});function n(a,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},8915:(V,S,t)=>{"use strict";t.d(S,{K:()=>Dt});var n=t(31085),a=t(14041),d=t(59428),x=t(27586),m=t(26280),h=t(21405),u=t(54203),p=t(67626),g=t(72987),y=t(91035),A=t(81859),v=t(86519),T=t(86202);class P{getCatalogFilters(){return{[`metadata.annotations.${T.A}`]:v.c}}}const L=()=>{const{updateFilters:lt}=(0,h.nK)();return(0,a.useEffect)(()=>{lt({techdocs:new P})},[lt]),null};var O=t(36338),j=t(45250),$=t(88640),M=t(77310),J=t(9222),Q=t(72427),F=t(65461),G=t(56889),H=t(27125),nt=t(14209),W=t(92822);function Z(lt){const{actions:dt,columns:xt,data:ft,isLoading:Ct,options:Pt}=lt,{updateFilters:it,setLimit:mt,setOffset:yt,limit:et,totalItems:ht,offset:rt}=(0,h.nK)(),[B,z]=a.useState(rt&&et?Math.floor(rt/et):0);return(0,a.useEffect)(()=>{ht&&B*et>=ht?yt(Math.max(0,ht-et)):yt(Math.max(0,B*et))},[yt,B,et,ht]),(0,n.jsx)(nt.X,{columns:xt,data:ft,options:{paginationPosition:"both",pageSizeOptions:[5,10,20,50,100],pageSize:et,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,...Pt},actions:dt,onSearchChange:ut=>it({text:ut?new W.V3(ut):void 0}),page:B,onPageChange:ut=>{z(ut)},onRowsPerPageChange:ut=>{mt(ut)},totalCount:ht,localization:{pagination:{labelDisplayedRows:""}},isLoading:Ct})}function Y(lt){const{actions:dt,columns:xt,data:ft,next:Ct,prev:Pt,title:it,isLoading:mt,options:yt,...et}=lt;return(0,n.jsx)(nt.X,{title:mt?"":it,columns:xt,data:ft,options:{paginationPosition:"both",...yt,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1,actionsColumnIndex:-1},onPageChange:ht=>{ht>0?Ct?.():Pt?.()},page:Pt?1:0,totalCount:Ct?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},isLoading:mt,...et})}var at=t(84295),pt=t(42717),Et=t(82779),bt=t(23747);const At=lt=>{const{columns:dt,actions:xt,options:ft}=lt,{loading:Ct,error:Pt,entities:it,filters:mt,paginationMode:yt,pageInfo:et}=(0,h.nK)(),{isStarredEntity:ht,toggleStarredEntity:rt}=(0,G.I)(),[,B]=(0,O.A)(),z=(0,J.S)(Et.Oc),ut=(0,Q.gf)(F.U),Ot=(0,j.capitalize)(mt.user?.value??"all"),It=[at.f.createCopyDocsUrlAction(B),at.f.createStarEntityAction(ht,rt)],Lt=(0,bt.H)(it,z,ut);return yt==="cursor"?(0,n.jsx)(Y,{columns:dt||pt.F,isLoading:Ct,title:Ot,actions:xt||It,options:ft,data:Lt,next:et?.next,prev:et?.prev}):yt==="offset"?(0,n.jsx)(Z,{columns:dt||pt.F,isLoading:Ct,title:Ot,actions:xt||It,options:ft,data:Lt}):Pt?(0,n.jsx)($.B,{severity:"error",title:"Could not load available documentation.",children:(0,n.jsx)(M.z,{language:"text",text:Pt.toString()})}):(0,n.jsx)(H.o,{title:Ot,entities:it,loading:Ct,actions:xt||It,columns:dt,options:ft})};At.columns=pt.B,At.actions=at.f;const Dt=lt=>{const{initialFilter:dt="owned",columns:xt,actions:ft,ownerPickerMode:Ct,pagination:Pt,options:it,PageWrapper:mt,CustomHeader:yt}=lt,et=mt||A.S,ht=yt||(()=>(0,n.jsx)(d.d,{title:"",children:(0,n.jsx)(x.Y,{children:"Discover documentation in your ecosystem."})}));return(0,n.jsx)(et,{children:(0,n.jsxs)(m.U,{children:[(0,n.jsx)(ht,{}),(0,n.jsx)(h.B9,{pagination:Pt,children:(0,n.jsxs)(u.GI,{children:[(0,n.jsxs)(u.GI.Filters,{children:[(0,n.jsx)(L,{}),(0,n.jsx)(p.y,{initialFilter:dt}),(0,n.jsx)(g.t,{mode:Ct}),(0,n.jsx)(y.m,{})]}),(0,n.jsx)(u.GI.Content,{children:(0,n.jsx)(At,{actions:ft,columns:xt,options:it})})]})})]})})}},27125:(V,S,t)=>{"use strict";t.d(S,{o:()=>P});var n=t(31085),a=t(14041),d=t(36338),x=t(9222),m=t(72427),h=t(65461),u=t(82779),p=t(14209),g=t(44186),y=t(73896),A=t(84295),v=t(42717),T=t(23747);const P=L=>{const{entities:O,title:j,loading:$,columns:M,actions:J,options:Q}=L,[,F]=(0,d.A)(),G=(0,x.S)(u.Oc),H=(0,m.gf)(h.U);if(!O)return null;const nt=(0,T.H)(O,G,H),W=[A.f.createCopyDocsUrlAction(F)],Z=20,Y=nt&&nt.length>Z;return(0,n.jsx)(n.Fragment,{children:$||nt&&nt.length>0?(0,n.jsx)(p.X,{isLoading:$,options:{paging:Y,pageSize:Z,search:!0,actionsColumnIndex:-1,...Q},data:nt,columns:M||v.F,actions:J||W,title:j?`${j} (${nt.length})`:`All (${nt.length})`}):(0,n.jsx)(g.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,n.jsx)(y.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};P.columns=v.B,P.actions=A.f},84295:(V,S,t)=>{"use strict";t.d(S,{f:()=>m});var n=t(31085),a=t(14041),d=t(55290),x=t(18956);const m={createCopyDocsUrlAction(h){return u=>({icon:()=>(0,n.jsx)(d.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>h(`${window.location.origin}${u.resolved.docsUrl}`)})},createStarEntityAction(h,u){return p=>{const g=p.entity,y=h(g);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,n.jsx)(x.m,{isFavorite:y}),tooltip:y?"Remove from favorites":"Add to favorites",onClick:()=>u(g)}}}}},42717:(V,S,t)=>{"use strict";t.d(S,{B:()=>y,F:()=>A});var n=t(31085),a=t(14041),d=t(10394),x=t(58837);const m=(0,x.A)(v=>({value:{marginBottom:v.spacing(.75)},subvalue:{color:v.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function h(v){const{value:T,subvalue:P}=v,L=m();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{className:L.value,children:T}),(0,n.jsx)(d.A,{className:L.subvalue,children:P})]})}var u=t(72072),p=t(34428);function g(v){return v.metadata.title||v.metadata.name}const y={createTitleColumn(v){return{...y.createNameColumn(),field:"entity.metadata.title",hidden:v?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(v,T)=>{const P=g(v.entity).toLocaleLowerCase(),L=g(T.entity).toLocaleLowerCase();return P.localeCompare(L)},render:v=>(0,n.jsx)(h,{value:(0,n.jsx)(u.N_,{to:v.resolved.docsUrl,children:g(v.entity)}),subvalue:v.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:v})=>(0,n.jsx)(p.i,{entityRefs:v.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}},A=[y.createTitleColumn({hidden:!0}),y.createNameColumn(),y.createOwnerColumn(),y.createKindColumn(),y.createTypeColumn()]},23747:(V,S,t)=>{"use strict";t.d(S,{H:()=>m});var n=t(51372),a=t(67871),d=t(90184),x=t(95768);function m(h,u,p){return h.map(g=>{const y=(0,a.t)(g,n.vv);return{entity:g,resolved:{docsUrl:u({namespace:(0,x.V)(g.metadata.namespace??"default",p),kind:(0,x.V)(g.kind,p),name:(0,x.V)(g.metadata.name,p)}),ownedByRelations:y,ownedByRelationsTitle:y.map(A=>(0,d.S)(A,{defaultKind:"group"})).join(", ")}}})}},81859:(V,S,t)=>{"use strict";t.d(S,{S:()=>h});var n=t(31085),a=t(14041),d=t(27155),x=t(72427),m=t(65461);const h=u=>{const{children:p,CustomPageWrapper:g}=u,A=`Documentation available in ${(0,x.gf)(m.U).getOptionalString("organization.name")??"Backstage"}`;return(0,n.jsx)(n.Fragment,{children:g?(0,n.jsx)(g,{children:p}):(0,n.jsx)(d.d,{title:"Documentation",subtitle:A,themeId:"documentation",children:p})})}},39278:(V,S,t)=>{"use strict";t.d(S,{$j:()=>M,Wj:()=>J,Ju:()=>L});var n=t(26679),a=t(70835),d=t(97142),x=t(92110);class m{configApi;discoveryApi;fetchApi;constructor(G){this.configApi=G.configApi,this.discoveryApi=G.discoveryApi,this.fetchApi=G.fetchApi}async getCookie(){const H=`${await this.getApiOrigin()}/cookie`,nt=await this.fetchApi.fetch(`${H}`,{credentials:"include"});if(!nt.ok)throw await a.o.fromResponse(nt);return await nt.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(G){const{kind:H,namespace:nt,name:W}=G,Y=`${await this.getApiOrigin()}/metadata/techdocs/${nt}/${H}/${W}`,at=await this.fetchApi.fetch(`${Y}`);if(!at.ok)throw await a.o.fromResponse(at);return await at.json()}async getEntityMetadata(G){const{kind:H,namespace:nt,name:W}=G,Y=`${await this.getApiOrigin()}/metadata/entity/${nt}/${H}/${W}`,at=await this.fetchApi.fetch(`${Y}`);if(!at.ok)throw await a.o.fromResponse(at);return await at.json()}}class h{configApi;discoveryApi;fetchApi;constructor(G){this.configApi=G.configApi,this.discoveryApi=G.discoveryApi,this.fetchApi=G.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return this.configApi.getOptionalString("techdocs.storageUrl")??`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(G,H){const{kind:nt,namespace:W,name:Z}=G,at=`${await this.getStorageUrl()}/${W}/${nt}/${Z}/${H}`,pt=await this.fetchApi.fetch(`${at.endsWith("/")?at:`${at}/`}index.html`);let Et="";switch(pt.status){case 404:throw Et="Page not found. ",H||(Et+="This could be because there is no index.md file in the root of the docs directory of this repository."),new d.m_(Et);case 500:throw Et="Could not generate documentation or an error in the TechDocs backend. ",new Error(Et);default:break}return pt.text()}async syncEntityDocs(G,H=()=>{}){const{kind:nt,namespace:W,name:Z}=G,at=`${await this.getApiOrigin()}/sync/${W}/${nt}/${Z}`;return new Promise((pt,Et)=>{const bt=new AbortController;(0,x.y)(at,{fetch:this.fetchApi.fetch,signal:bt.signal,onmessage(At){if(At.event==="log")At.data&&H(JSON.parse(At.data));else if(At.event==="finish"){let Dt=!1;At.data&&({updated:Dt}=JSON.parse(At.data)),pt(Dt?"updated":"cached")}else At.event==="error"&&Et(new Error(At.data))},onerror(At){throw bt.abort(),Et(At),At}})})}async getBaseUrl(G,H,nt){const{kind:W,namespace:Z,name:Y}=H,pt=`${await this.getApiOrigin()}/static/docs/${Z}/${W}/${Y}/${nt}`;return new URL(G,pt.endsWith("/")?pt:`${pt}/`).toString()}}var u=t(82779),p=t(9803),g=t(12935),y=t(65461),A=t(57405),v=t(70795),T=t(88758),P=t(54560);const L=(0,p.i)({id:"techdocs",apis:[(0,g.b)({api:n.s,deps:{configApi:y.U,discoveryApi:A.I,fetchApi:v.a},factory:({configApi:F,discoveryApi:G,fetchApi:H})=>new h({configApi:F,discoveryApi:G,fetchApi:H})}),(0,g.b)({api:n.l,deps:{configApi:y.U,discoveryApi:A.I,fetchApi:v.a},factory:({configApi:F,discoveryApi:G,fetchApi:H})=>new m({configApi:F,discoveryApi:G,fetchApi:H})})],routes:{root:u.rQ,docRoot:u.Oc,entityContent:u.Ri}}),O=L.provide((0,T.QJ)({name:"TechdocsPage",component:()=>t.e(8803).then(t.bind(t,38803)).then(F=>F.Router),mountPoint:u.rQ})),j=L.provide((0,T.QJ)({name:"EntityTechdocsContent",component:()=>t.e(8803).then(t.bind(t,38803)).then(F=>F.LegacyEmbeddedDocsRouter),mountPoint:u.Ri})),$=L.provide((0,T.QJ)({name:"TechDocsCustomHome",component:()=>t.e(5470).then(t.bind(t,25470)).then(F=>F.TechDocsCustomHome),mountPoint:u.rQ})),M=L.provide((0,T.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(F=>F.TechDocsIndexPage),mountPoint:u.rQ})),J=L.provide((0,T.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(F=>F.TechDocsReaderPage),mountPoint:u.Oc})),Q=L.provide((0,P.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(F=>F.TechDocsSearchResultListItem),predicate:F=>F.type==="techdocs"}))},67289:(V,S,t)=>{"use strict";t.d(S,{p:()=>Rs});var n=t(31085),a=t(14041),d=t(42899),x=t(58837),m=t(86892),h=t(9394),u=t(91360),p=t(22856);const g="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",y=f=>{(0,a.useEffect)(()=>{if(!f)return()=>{};const D=f.querySelectorAll('head > link[rel="stylesheet"]');let U=D?.length??0;const N=new CustomEvent(g);if(!U)return f.dispatchEvent(N),()=>{};const k=()=>{--U===0&&f.dispatchEvent(N)};return D?.forEach(X=>{X.addEventListener("load",k)}),()=>{D?.forEach(X=>{X.removeEventListener("load",k)})}},[f])},A=f=>{const[D,U]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!f)return()=>{};U(!0);const N=f.style;N.setProperty("opacity","0");const k=()=>{U(!1),N.setProperty("opacity","1")};return f.addEventListener(g,k),()=>{f.removeEventListener(g,k)}},[f]),D},v=f=>{const{element:D,onAppend:U,children:N}=f,[k,X]=(0,a.useState)((0,h.vt)({...(0,p.A)(),insertionPoint:void 0}));y(D);const st=(0,a.useCallback)(St=>{if(!D||!St)return;X((0,h.vt)({...(0,p.A)(),insertionPoint:D.querySelector("head")||void 0}));let Rt=St.shadowRoot;Rt||(Rt=St.attachShadow({mode:"open"})),Rt.replaceChildren(D),typeof U=="function"&&U(Rt)},[D,U]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(u.Ay,{jss:k,sheetsManager:new Map,children:[(0,n.jsx)("div",{ref:st,"data-testid":"techdocs-native-shadowroot"}),N]})})};var T=t(12784);const P=()=>{const{shadowRoot:f}=(0,m.V)();return f},L=f=>{const D=P(),[U,N]=(0,a.useState)(D?.firstChild);return(0,a.useEffect)(()=>{let k;return D&&(k=new MutationObserver(()=>{N(D?.firstChild)}),k.observe(D,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>k?.disconnect()},[D]),!U||!(U instanceof HTMLElement)?[]:f.map(k=>U.querySelectorAll(k)).filter(k=>k.length).map(k=>Array.from(k)).flat()},O=f=>f.toString()&&f.rangeCount&&f.getRangeAt(0).getBoundingClientRect().top,j=(f=0)=>{const D=P(),[U,N]=useState(null),k=useMemo(()=>debounce(()=>{const X=D,st=X.getSelection?X.getSelection():document.getSelection();st&&O(st)?N(st):N(null)},f),[D,N,f]);return useEffect(()=>(window.document.addEventListener("selectionchange",k),()=>{k.cancel(),window.document.removeEventListener("selectionchange",k)}),[k]),U};var $=t(26280),M=t(68146),J=t(45250),Q=t(73466),F=t(5877),G=t(43836),H=t(10602),nt=t(72427),W=t(93368),Z=t(25862),Y=t(65461),at=t(55309);const pt=(0,at.y)({id:"plugin.search.queryservice"});class Et{mockedResults;constructor(D){this.mockedResults=D}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const bt=(0,G.tK)("search-context"),At=()=>{const f=(0,a.useContext)(bt);if(!f)throw new Error("useSearch must be used within a SearchContextProvider");const D=f.atVersion(1);if(!D)throw new Error("No SearchContext v1 found");return D},Dt=()=>(0,a.useContext)(bt)!==void 0,lt={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},dt=(f=lt)=>{const D=(0,nt.gf)(pt),U=(0,W.s)(),[N,k]=(0,a.useState)(f.term),[X,st]=(0,a.useState)(f.types),[St,Rt]=(0,a.useState)(f.filters),[$t,Bt]=(0,a.useState)(f.pageLimit),[Ft,Xt]=(0,a.useState)(f.pageCursor),he=(0,F.A)(N),Ht=(0,F.A)(St),_t=(0,Q.A)(async()=>{const qt=await D.query({term:N,types:X,filters:St,pageLimit:$t,pageCursor:Ft});return N&&U.captureEvent("search",N,{value:qt.numberOfResults}),qt},[N,X,St,$t,Ft]),Ae=!_t.loading&&!_t.error&&_t.value?.nextPageCursor,re=!_t.loading&&!_t.error&&_t.value?.previousPageCursor,Zt=(0,a.useCallback)(()=>{Xt(_t.value?.nextPageCursor)},[_t.value?.nextPageCursor]),Jt=(0,a.useCallback)(()=>{Xt(_t.value?.previousPageCursor)},[_t.value?.previousPageCursor]);return(0,a.useEffect)(()=>{he!==void 0&&N!==he&&Xt(void 0)},[N,he,Xt]),(0,a.useEffect)(()=>{Ht!==void 0&&!(0,J.isEqual)(St,Ht)&&Xt(void 0)},[St,Ht,Xt]),{result:_t,term:N,setTerm:k,types:X,setTypes:st,filters:St,setFilters:Rt,pageLimit:$t,setPageLimit:Bt,pageCursor:Ft,setPageCursor:Xt,fetchNextPage:Ae?Zt:void 0,fetchPreviousPage:re?Jt:void 0}},xt=f=>{const{initialState:D,children:U}=f,N=dt(D);return(0,n.jsx)(Z.Ig,{attributes:{searchTypes:N.types.sort().join(",")},children:(0,n.jsx)(bt.Provider,{value:(0,H.B)({1:N}),children:U})})},ft=f=>{const{initialState:D,inheritParentContextIfAvailable:U,children:N}=f,k=Dt(),X=(0,nt.gf)(Y.U),st=D??{},St=X.has("search.query.pageLimit")?{pageLimit:X.getNumber("search.query.pageLimit")}:{},Rt={...lt,...st,...St};return k&&U?(0,n.jsx)(n.Fragment,{children:N}):(0,n.jsx)(xt,{initialState:Rt,children:N})};var Ct=t(78467),Pt=t(20577),it=t(82266),mt=t(29365),yt=t(34839),et=t(16249),ht=t(64947),rt=t(45917),B=t(22771);const z=(0,a.forwardRef)((f,D)=>{const{onChange:U,onKeyDown:N=()=>{},onClear:k=()=>{},onSubmit:X=()=>{},debounceTime:st=200,clearButton:St=!0,fullWidth:Rt=!0,value:$t,label:Bt,placeholder:Ft,inputProps:Xt={},InputProps:he={},endAdornment:Ht,..._t}=f,Ae=(0,nt.gf)(Y.U),[re,Zt]=(0,a.useState)(""),Jt=(0,a.useRef)("");(0,a.useEffect)(()=>{Zt(pe=>pe===Jt.current?String($t):pe)},[$t,Jt]),(0,B.A)(()=>{Jt.current=re,U(re)},st,[re]);const Se=(0,a.useCallback)(pe=>{Zt(pe.target.value)},[Zt]),qt=(0,a.useCallback)(pe=>{N&&N(pe),X&&pe.key==="Enter"&&X()},[N,X]),ce=(0,a.useCallback)(()=>{Jt.current="",U(""),Zt(""),k&&k()},[U,k]),le=Bt?void 0:"Search",Fe=Ft??`Search in ${Ae.getOptionalString("app.title")||"Backstage"}`,Me=(0,it.n)().getSystemIcon("search")||rt.A,nn=(0,n.jsx)(yt.A,{position:"start",children:(0,n.jsx)(mt.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,n.jsx)(Me,{})})}),ln=(0,n.jsx)(yt.A,{position:"end",children:(0,n.jsx)(ht.A,{"aria-label":"Clear",size:"small",onClick:ce,onKeyDown:pe=>{pe.key==="Enter"&&pe.stopPropagation()},children:"Clear"})});return(0,n.jsx)(ft,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(et.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:D,value:re,label:Bt,placeholder:Fe,InputProps:{startAdornment:nn,endAdornment:St?ln:Ht,...he},inputProps:{"aria-label":le,...Xt},fullWidth:Rt,onChange:Se,onKeyDown:qt,..._t})})}),ut=(0,a.forwardRef)((f,D)=>{const{value:U="",onChange:N,...k}=f,{term:X,setTerm:st}=At();(0,a.useEffect)(()=>{U&&st(String(U))},[U,st]);const St=(0,a.useCallback)(Rt=>{N?N(Rt):st(Rt)},[N,st]);return(0,n.jsx)(ft,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(Z.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,n.jsx)(z,{...k,ref:D,value:X,onChange:St})})})}),Ot=(0,x.A)(f=>({loading:{right:f.spacing(1),position:"absolute"}})),It=f=>D=>(0,n.jsx)(ft,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(f,{...D})}),Lt=()=>{const f=Ot();return(0,n.jsx)(Ct.A,{className:f.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Ut=It(function(D){const{loading:U,value:N,onChange:k=()=>{},options:X=[],getOptionLabel:st=Jt=>String(Jt),inputPlaceholder:St,inputDebounceTime:Rt,freeSolo:$t=!0,fullWidth:Bt=!0,clearOnBlur:Ft=!1,"data-testid":Xt="search-autocomplete",...he}=D,{setTerm:Ht}=At(),_t=(0,a.useCallback)(Jt=>Jt?typeof Jt=="string"?Jt:st(Jt):"",[st]),Ae=(0,a.useMemo)(()=>_t(N),[N,_t]),re=(0,a.useCallback)((Jt,Se,qt,ce)=>{Ht(_t(Se)),k(Jt,Se,qt,ce)},[_t,Ht,k]),Zt=(0,a.useCallback)(({InputProps:{ref:Jt,className:Se,endAdornment:qt},InputLabelProps:ce,...le})=>(0,n.jsx)(ut,{...le,ref:Jt,clearButton:!1,value:Ae,placeholder:St,debounceTime:Rt,endAdornment:U?(0,n.jsx)(Lt,{}):qt,InputProps:{className:Se}}),[U,Ae,St,Rt]);return(0,n.jsx)(Pt.Ay,{...he,"data-testid":Xt,value:N,onChange:re,options:X,getOptionLabel:st,renderInput:Zt,freeSolo:$t,fullWidth:Bt,clearOnBlur:Ft})});var Nt=t(18690),Wt=t(27698);const Kt=f=>f?.document,te=f=>{const{entityId:D,entityTitle:U,debounceTime:N=150,searchResultUrlMapper:k}=f,[X,st]=(0,a.useState)(!1),St=(0,Nt.Zp)(),{setFilters:Rt,term:$t,result:{loading:Bt,value:Ft}}=At(),[Xt,he]=(0,a.useState)([]);(0,a.useEffect)(()=>{let Zt=!0;if(Zt&&Ft){const Jt=Ft.results.slice(0,10);he(Jt)}return()=>{Zt=!1}},[Bt,Ft]);const{kind:Ht,name:_t,namespace:Ae}=D;(0,a.useEffect)(()=>{Rt(Zt=>({...Zt,kind:Ht,namespace:Ae,name:_t}))},[Ht,Ae,_t,Rt]);const re=(Zt,Jt)=>{if(Kt(Jt)){const{location:Se}=Jt.document;St(k?k(Se):Se)}};return(0,n.jsx)(Ut,{"data-testid":"techdocs-search-bar",size:"small",open:X&&!!$t,getOptionLabel:()=>"",filterOptions:Zt=>Zt,onClose:()=>{st(!1)},onOpen:()=>{st(!0)},onChange:re,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Xt,renderOption:({document:Zt,highlight:Jt})=>(0,n.jsx)(Wt.TechDocsSearchResultListItem,{result:Zt,lineClamp:3,asListItem:!1,asLink:!1,title:Zt.title,highlight:Jt}),loading:Bt,inputDebounceTime:N,inputPlaceholder:`Search ${U||D.name} docs`,freeSolo:!1})},jt=f=>{const D={term:"",types:["techdocs"],pageCursor:"",filters:f.entityId};return(0,n.jsx)(ft,{initialState:D,children:(0,n.jsx)(te,{...f})})};var kt=t(74219);const ee=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(f=>({default:f.RealLogViewer})));function fe(f){const{Progress:D}=(0,it.n)().getComponents();return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(D,{}),children:(0,n.jsx)(ee,{...f})})}var Gt=t(73845),ne=t(72501),de=t(12398),Xe=t(32881);const Ge=(0,x.A)(f=>(0,de.A)({paper:{width:"100%",[f.breakpoints.up("sm")]:{width:"75%"},[f.breakpoints.up("md")]:{width:"50%"},padding:f.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:f.palette.background.default}})),oe=({buildLog:f,onClose:D})=>{const U=Ge(),N=f.length===0?"Waiting for logs...":f.join(`
8
+ `);return(0,n.jsxs)(d.A,{container:!0,direction:"column",className:U.root,spacing:0,wrap:"nowrap",children:[(0,n.jsxs)(d.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,n.jsx)(ne.A,{variant:"h5",children:"Build Details"}),(0,n.jsx)(mt.A,{title:"Close the drawer",onClick:D,color:"inherit",children:(0,n.jsx)(Xe.A,{})},"dismiss")]}),(0,n.jsx)(d.A,{item:!0,xs:!0,children:(0,n.jsx)(fe,{text:N,classes:{root:U.logs}})})]})},We=({buildLog:f})=>{const D=Ge(),[U,N]=(0,a.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ht.A,{color:"inherit",onClick:()=>N(!0),children:"Show Build Logs"}),(0,n.jsx)(Gt.Ay,{classes:{paper:D.paper},anchor:"right",open:U,onClose:()=>N(!1),children:(0,n.jsx)(oe,{buildLog:f,onClose:()=>N(!1)})})]})};var ae=t(12173);const Ye=({errorMessage:f})=>{const D=(0,nt.gf)(Y.U).getOptionalString("techdocs.builder"),U=(0,W.s)(),{entityRef:N}=(0,m.V)(),k=(0,Nt.zy)();(0,a.useEffect)(()=>{const{pathname:st,search:St,hash:Rt}=k;U.captureEvent("not-found",`${st}${St}${Rt}`,{attributes:N})},[U,N,k]);let X="";return[void 0,"local"].includes(D)||(X="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),(0,n.jsx)(ae.M,{status:"404",statusMessage:f||"Documentation not found",additionalInfo:X})};var _e=t(28966),ge=t(26679);function rn({contentLoading:f,content:D,activeSyncState:U}){return f||U==="BUILD_READY_RELOAD"||!D&&U==="CHECKING"?"CHECKING":!D&&U==="BUILDING"?"INITIAL_BUILD":D?U==="BUILDING"?"CONTENT_STALE_REFRESHING":U==="BUILD_READY"?"CONTENT_STALE_READY":U==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function gn(f,D){const U={...f};switch(D.type){case"sync":D.state==="CHECKING"&&(U.buildLog=[]),U.activeSyncState=D.state,U.syncError=D.syncError;break;case"contentLoading":U.contentLoading=!0,U.contentError=void 0;break;case"content":typeof D.path=="string"&&(U.path=D.path),U.contentLoading=!1,U.content=D.content,U.contentError=D.contentError;break;case"buildLog":U.buildLog=U.buildLog.concat(D.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(U.activeSyncState)&&["contentLoading","content"].includes(D.type)&&(U.activeSyncState="UP_TO_DATE",U.buildLog=[]),U}function on(f,D,U,N){const[k,X]=(0,a.useReducer)(gn,{activeSyncState:"CHECKING",path:N,contentLoading:!0,buildLog:[]}),st=(0,nt.gf)(ge.s),{retry:St}=(0,_e.A)(async()=>{X({type:"contentLoading"});try{const Bt=await st.getEntityDocs({kind:f,namespace:D,name:U},N);return X({type:"content",content:Bt,path:N}),Bt}catch(Bt){X({type:"content",contentError:Bt,path:N})}},[st,f,D,U,N]),Rt=(0,a.useRef)({content:void 0,reload:()=>{}});Rt.current={content:k.content,reload:St},(0,Q.A)(async()=>{X({type:"sync",state:"CHECKING"});const Bt=setTimeout(()=>{X({type:"sync",state:"BUILDING"})},1e3);try{switch(await st.syncEntityDocs({kind:f,namespace:D,name:U},Xt=>{X({type:"buildLog",log:Xt})})){case"updated":Rt.current.content?X({type:"sync",state:"BUILD_READY"}):(Rt.current.reload(),X({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":X({type:"sync",state:"UP_TO_DATE"});break;default:X({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Ft){X({type:"sync",state:"ERROR",syncError:Ft})}finally{clearTimeout(Bt)}},[f,U,D,st,X,Rt]);const $t=(0,a.useMemo)(()=>rn({activeSyncState:k.activeSyncState,contentLoading:k.contentLoading,content:k.content}),[k.activeSyncState,k.content,k.contentLoading]);return(0,a.useMemo)(()=>({state:$t,contentReload:St,path:k.path,content:k.content,contentErrorMessage:k.contentError?.toString(),syncErrorMessage:k.syncError?.toString(),buildLog:k.buildLog}),[$t,St,k.path,k.content,k.contentError,k.syncError,k.buildLog])}const qe=(0,a.createContext)({}),De=()=>(0,a.useContext)(qe),Ke=f=>{const{children:D}=f,{"*":U=""}=(0,Nt.g)(),{entityRef:N}=(0,m.V)(),{kind:k,namespace:X,name:st}=N,St=on(k,X,st,U);return(0,n.jsx)(qe.Provider,{value:St,children:D instanceof Function?D(St):D})},ze=f=>D=>(0,n.jsx)(Ke,{children:(0,n.jsx)(f,{...D})}),an=(0,x.A)(f=>({root:{marginBottom:f.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),ye=()=>{let f=null;const D=an(),{state:U,contentReload:N,contentErrorMessage:k,syncErrorMessage:X,buildLog:st}=De();return U==="INITIAL_BUILD"&&(f=(0,n.jsx)(kt.A,{classes:{root:D.root},variant:"outlined",severity:"info",icon:(0,n.jsx)(Ct.A,{size:"24px"}),action:(0,n.jsx)(We,{buildLog:st}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),U==="CONTENT_STALE_REFRESHING"&&(f=(0,n.jsx)(kt.A,{variant:"outlined",severity:"info",icon:(0,n.jsx)(Ct.A,{size:"24px"}),action:(0,n.jsx)(We,{buildLog:st}),classes:{root:D.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),U==="CONTENT_STALE_READY"&&(f=(0,n.jsx)(kt.A,{variant:"outlined",severity:"success",action:(0,n.jsx)(ht.A,{color:"inherit",onClick:()=>N(),children:"Refresh"}),classes:{root:D.root},children:"A newer version of this documentation is now available, please refresh to view."})),U==="CONTENT_STALE_ERROR"&&(f=(0,n.jsxs)(kt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(We,{buildLog:st}),classes:{root:D.root,message:D.message},children:["Building a newer version of this documentation failed."," ",X]})),U==="CONTENT_NOT_FOUND"&&(f=(0,n.jsxs)(n.Fragment,{children:[X&&(0,n.jsxs)(kt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(We,{buildLog:st}),classes:{root:D.root,message:D.message},children:["Building a newer version of this documentation failed."," ",X]}),(0,n.jsx)(Ye,{errorMessage:k})]})),f};var He=t(5893),ke=t(54917),Qe=t(96726),je=t(71651),ve=t.n(je);const w=/main\.[A-Fa-f0-9]{8}\.min\.css$/,l=/^https:\/\/fonts\.googleapis\.com/,E=/^https:\/\/fonts\.gstatic\.com/,R=f=>f.nodeName==="LINK",q=f=>{const D=f?.getAttribute("href")||"",U=D.match(w),N=D.match(l),k=D.match(E);return U||N||k},ct=f=>(R(f)&&!q(f)&&f.remove(),f),tt=f=>f.nodeName==="IFRAME",Tt=(f,D)=>{const U=f.getAttribute("src")||"";try{const{host:N}=new URL(U);return D.includes(N)}catch{return!1}},wt=f=>D=>(tt(D)&&!Tt(D,f)&&D.remove(),D),zt=()=>{const f=(0,nt.gf)(Y.U);return(0,a.useMemo)(()=>f.getOptionalConfig("techdocs.sanitizer"),[f])},ie=()=>{const f=zt();return(0,a.useCallback)(async D=>{const U=f?.getOptionalStringArray("allowedIframeHosts");ve().addHook("beforeSanitizeElements",ct);const N=["link","meta"];U&&(N.push("iframe"),ve().addHook("beforeSanitizeElements",wt(U))),ve().addHook("uponSanitizeElement",(st,St)=>{St.tagName==="meta"&&(st.getAttribute("http-equiv")==="refresh"&&st.getAttribute("content")?.includes("url=")||st.parentNode?.removeChild(st))}),ve().addHook("uponSanitizeAttribute",(st,St)=>{st.tagName!=="meta"&&(St.attrName==="http-equiv"||St.attrName==="content")&&st.removeAttribute(St.attrName)});const k=f?.getOptionalString("allowedCustomElementTagNameRegExp"),X=f?.getOptionalString("allowedCustomElementAttributeNameRegExp");return ve().sanitize(D.outerHTML,{ADD_TAGS:N,FORBID_TAGS:["style"],ADD_ATTR:["http-equiv","content","dominant-baseline"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:k?new RegExp(k):void 0,attributeNameCheck:X?new RegExp(X):void 0}})},[f])};var Le=t(34435),Yt=t(268);const me=({theme:f})=>`
9
9
  /*================== Variables ==================*/
10
10
  /*
11
11
  As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
@@ -548,6 +548,6 @@ ${pn[f.palette.type].map(D=>`img[src$="${D}"]`).join(", ")} {
548
548
  `],as=()=>(0,Le.Ut)(),is=()=>{const f=as(),D=(0,ke.A)();return(0,a.useMemo)(()=>{const U={theme:D,sidebar:f};return os.reduce((N,k)=>N+k(U),"")},[D,f])},Cn=()=>{const f=is();return(0,a.useCallback)(D=>(D.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${f}</style>`),D),[f])},Ln=async(f,D)=>{let U;if(typeof f=="string")U=new DOMParser().parseFromString(f,"text/html").documentElement;else if(f instanceof Element)U=f;else throw new Error("dom is not a recognized type");for(const N of D)U=await N(U);return U},Mn=(f,D,U)=>{const N=new URL(D,"https://ignored.com").pathname,k=f==="src"&&N.endsWith(".svg"),X=!D.match(/^([a-z]*:)?\/\//i),st=D.startsWith(U);return k&&(X||st)},cs=({techdocsStorageApi:f,entityId:D,path:U})=>async N=>{const k=await f.getApiOrigin(),X=async(st,St)=>{for(const Rt of st)if(Rt.hasAttribute(St)){const $t=Rt.getAttribute(St);if(!$t)return;const Bt=await f.getBaseUrl($t,D,U);if(Mn(St,$t,k))try{const Xt=await(await fetch(Bt,{credentials:"include"})).text();Rt.setAttribute(St,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Xt)))}`)}catch{Rt.setAttribute("alt",`Error: ${$t}`)}else Rt.setAttribute(St,Bt)}};return await Promise.all([X(N.querySelectorAll("img"),"src"),X(N.querySelectorAll("script"),"src"),X(N.querySelectorAll("source"),"src"),X(N.querySelectorAll("link"),"href"),X(N.querySelectorAll("a[download]"),"href")]),N},Bn=()=>f=>(((U,N)=>{Array.from(U).filter(k=>k.hasAttribute(N)).forEach(k=>{const X=k.getAttribute(N);if(X){X.match(/^https?:\/\//i)&&k.setAttribute("target","_blank");try{const st=jn(window.location.href);k.setAttribute(N,new URL(X,st).toString())}catch{k.replaceWith(k.textContent||X)}}})})(Array.from(f.getElementsByTagName("a")),"href"),f);function jn(f){const D=new URL(f);return!D.pathname.endsWith("/")&&!D.pathname.endsWith(".html")&&(D.pathname+="/"),D.toString()}var ls=t(27326);let Un;Un=Promise.resolve().then(t.t.bind(t,25873,19));function fn(f,D){Un.then(U=>{"createRoot"in U?U.createRoot(D).render(f):U.render(f,D)})}const ds=()=>f=>{const D=f.querySelector('.md-header label[for="__drawer"]'),U=f.querySelector("article");if(!D||!U)return f;const N=D.cloneNode();return fn(a.createElement(ls.A),N),N.id="toggle-sidebar",N.title="Toggle Sidebar",N.classList.add("md-content__button"),N.style.setProperty("padding","0 0 0 5px"),N.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),U?.prepend(N),f},us=()=>f=>(f.querySelector(".md-header")?.remove(),f),hs=()=>f=>(f.querySelector(".md-footer .md-copyright")?.remove(),f.querySelector(".md-footer-copyright")?.remove(),f);var $n=t(36021),gs=t(90292),ps=t(52536),Fn=t.n(ps);const Nn=f=>D=>{const U=D.querySelector('[title="Edit this page"]');if(!U||!U.href)return D;const N=new URL(U.href),k=f.byUrl(N);if(k?.type!=="github"&&k?.type!=="gitlab")return D;const X=D.querySelector("article>h1")?.childNodes[0].textContent||"",st=encodeURIComponent(`Documentation Feedback: ${X}`),St=encodeURIComponent(`Page source:
549
549
  ${U.href}
550
550
 
551
- Feedback:`),Rt=k?.type==="github"?(0,$n.F)(N.href,"blob"):N.href,$t=Fn()(Rt),Bt=`/${$t.organization}/${$t.name}`,Ft=U.cloneNode();switch(k?.type){case"gitlab":Ft.href=`${N.origin}${Bt}/issues/new?issue[title]=${st}&issue[description]=${St}`;break;case"github":Ft.href=`${N.origin}${Bt}/issues/new?title=${st}&body=${St}`;break;default:return D}return fn(a.createElement(gs.A),Ft),Ft.style.paddingLeft="5px",Ft.title="Leave feedback for this page",Ft.id="git-feedback-link",U?.insertAdjacentElement("beforebegin",Ft),D};var fs=t(38097);const bn=(0,x.A)(f=>({button:{color:f.palette.primary.light,textDecoration:"underline"}})),Sn=({message:f,handleButtonClick:D,autoHideDuration:U})=>{const N=bn(),[k,X]=(0,a.useState)(!0),st=()=>X(!1);return(0,n.jsx)(fs.A,{open:k,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:U,color:"primary",onClose:st,message:f,action:(0,n.jsx)(ht.A,{classes:{root:N.button},size:"small",onClick:()=>{st(),D()},children:"Redirect now"})})},ms=(f,D)=>{const N=k=>{const X=jn(window.location.href),st=new URL(k,X);if(st.hostname!==window.location.hostname){const Rt=window.location.pathname,$t=Rt.indexOf(D),Bt=Rt.slice(0,$t+D.length);return new URL(Bt,X).href}return st.href};return k=>{for(const X of Array.from(k.querySelectorAll("meta")))if(X.getAttribute("http-equiv")==="refresh"){const st=X.getAttribute("content")?.split("url=");if(!st||st.length<2)return k;const St=st[1],Rt=N(St);if(window.location.href===Rt)return k;const $t=document.createElement("div");return fn((0,n.jsx)(Sn,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>f(Rt),autoHideDuration:3e3}),$t),document.body.appendChild($t),setTimeout(()=>{f(Rt)},3e3),k}return k}},kn=()=>f=>(setTimeout(()=>{const D=f?.querySelectorAll("li.md-nav__item--active");D.length!==0&&(D.forEach(N=>{const k=N?.querySelector("input");k?.checked||k?.click()}),D[D.length-1].scrollIntoView())},200),f);var Wn=t(50868),ys=t(10437),vs=t(71677),Es=t(87051),As=t(36338);const xs=(0,Es.A)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(vs.Ay),Cs=()=>(0,n.jsx)(ys.A,{children:(0,n.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"})}),bs=({text:f})=>{const[D,U]=(0,a.useState)(!1),[,N]=(0,As.A)(),k=(0,a.useCallback)(()=>{N(f),U(!0)},[f,N]),X=(0,a.useCallback)(()=>{U(!1)},[U]);return(0,n.jsx)(xs,{title:"Copied to clipboard",placement:"left",open:D,onClose:X,leaveDelay:1e3,children:(0,n.jsx)(mt.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:k,children:(0,n.jsx)(Cs,{})})})},Ss=f=>D=>{const U=D.querySelectorAll("pre > code");for(const N of U){const k=N.textContent||"",X=document.createElement("div");N?.parentElement?.prepend(X),fn((0,n.jsx)(Wn.A,{theme:f,children:(0,n.jsx)(bs,{text:k})}),X)}return D},Os=({baseUrl:f,onClick:D})=>U=>(Array.from(U.getElementsByTagName("a")).forEach(N=>{N.addEventListener("click",k=>{const st=N.getAttribute("href");st&&st.startsWith(f)&&!N.hasAttribute("download")&&(k.preventDefault(),D(k,st))})}),U),Kn=({onLoading:f,onLoaded:D})=>U=>(f(),U.addEventListener(g,function N(){D(),U.removeEventListener(g,N)}),U);function Ps(f,D){const U=new URL(D),N=`${U.origin}${U.pathname.replace(/\/$/,"")}`,k=f.replace(N,"").replace(/^\/+/,""),X=new URL(`http://localhost/${k}`);return`${X.pathname}${X.search}${X.hash}`}function Ts(){const f=(0,a.useRef)((0,Nt.Zp)()),U=(0,nt.gf)(G.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(k=>{let X=k;if(U)try{X=Ps(k,U)}catch{}f.current(X)},[U])}const zn="screen and (max-width: 76.1875em)",Hn=f=>{const D=Ts(),U=(0,ke.A)(),N=(0,He.A)(zn),k=ie(),X=Cn(),st=(0,W.s)(),St=(0,nt.gf)(ge.s),Rt=(0,nt.gf)(Qe.Y),$t=(0,nt.gf)(G.U),{state:Bt,path:Ft,content:Xt}=De(),{"*":he=""}=(0,Nt.g)(),[Ht,_t]=(0,a.useState)(null),Ae=A(Ht),re=(0,a.useCallback)(()=>{if(!Ht)return;Ht.querySelectorAll(".md-sidebar").forEach(ce=>{if(N)ce.style.top="0px";else{const Fe=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Me=Ht.getBoundingClientRect().top??0;const ln=Ht.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Me<Fe&&(Me=Fe);const pe=Math.max(Me,0)+ln;ce.style.top=`${pe}px`;const dn=Ht.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;ce.style.height=`${dn-pe}px`}ce.style.setProperty("opacity","1")})},[Ht,N]);(0,a.useEffect)(()=>(window.addEventListener("resize",re),window.addEventListener("scroll",re,!0),()=>{window.removeEventListener("resize",re),window.removeEventListener("scroll",re,!0)}),[Ht,re]);const Zt=(0,a.useCallback)(()=>{if(!Ht)return;const qt=Ht.querySelector(".md-footer");qt&&(qt.style.width=`${Ht.getBoundingClientRect().width}px`)},[Ht]);(0,a.useEffect)(()=>(window.addEventListener("resize",Zt),()=>{window.removeEventListener("resize",Zt)}),[Ht,Zt]),(0,a.useEffect)(()=>{Ae||(Zt(),re())},[Bt,Ae,Zt,re]);const Jt=(0,a.useCallback)((qt,ce)=>Ln(qt,[k,cs({techdocsStorageApi:St,entityId:f,path:ce}),Bn(),ds(),us(),hs(),Nn(Rt),X]),[f,Rt,St,k,X]),Se=(0,a.useCallback)(async qt=>Ln(qt,[ms(D,f.name),kn(),Ss(U),Os({baseUrl:$t.getOptionalString("app.baseUrl")||window.location.origin,onClick:(ce,le)=>{const Fe=ce.ctrlKey||ce.metaKey,Me=new URL(le),nn=ce.target?.innerText||le,ln=le.replace(window.location.origin,"");st.captureEvent("click",nn,{attributes:{to:ln}}),Me.hash?Fe?window.open(le,"_blank"):(window.location.pathname!==Me.pathname?D(le):window.history.pushState(null,document.title,Me.hash),qt?.querySelector(`[id="${Me.hash.slice(1)}"]`)?.scrollIntoView()):Fe?window.open(le,"_blank"):D(le)}}),Kn({onLoading:()=>{},onLoaded:()=>{qt.querySelector(".md-nav__title")?.removeAttribute("for")}}),Kn({onLoading:()=>{Array.from(qt.querySelectorAll(".md-sidebar")).forEach(le=>{le.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[U,D,st,f.name,$t]);return(0,a.useEffect)(()=>{if(!Xt)return()=>{};let qt=!0;return Jt(Xt,Ft).then(async ce=>{if(!ce?.innerHTML||!qt||he!==Ft)return;window.scroll({top:0});const le=await Se(ce);_t(le)}),()=>{qt=!1}},[Xt,he,Ft,Jt,Se]),Ht};var On=t(41883),ws=t(72020),we=t(99730);const Ue=()=>{const f=(0,ws.YR)(),{shadowRoot:D}=(0,m.V)(),U=D?.querySelector('[data-md-component="content"]'),N=D?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let k=N?.querySelector('[data-techdocs-addons-location="primary sidebar"]');k||(k=document.createElement("div"),k.setAttribute("data-techdocs-addons-location","primary sidebar"),N?.prepend(k));const X=D?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let st=X?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return st||(st=document.createElement("div"),st.setAttribute("data-techdocs-addons-location","secondary sidebar"),X?.prepend(st)),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(On.A,{container:k,children:f.renderComponentsByLocation(we.e.PrimarySidebar)}),(0,n.jsx)(On.A,{container:U,children:f.renderComponentsByLocation(we.e.Content)}),(0,n.jsx)(On.A,{container:st,children:f.renderComponentsByLocation(we.e.SecondarySidebar)})]})},$e=(0,x.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Rs=ze(f=>{const{withSearch:D=!0,searchResultUrlMapper:U,onReady:N}=f,k=$e(),{entityMetadata:{value:X,loading:st},entityRef:St,setShadowRoot:Rt}=(0,m.V)(),{state:$t}=De(),Bt=Hn(St),Ft=window.location.pathname,Xt=window.location.hash,he=A(Bt),[Ht]=L([`[id="${Xt.slice(1)}"]`]),_t=(0,it.n)(),{NotFoundErrorPage:Ae}=_t.getComponents();(0,a.useEffect)(()=>{he||(Xt?Ht&&Ht.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Ft,Xt,Ht,he]);const re=(0,a.useCallback)(Zt=>{Rt(Zt),N instanceof Function&&N()},[Rt,N]);return st===!1&&!X?(0,n.jsx)(Ae,{}):Bt?(0,n.jsx)($.U,{children:(0,n.jsxs)(d.A,{container:!0,children:[(0,n.jsx)(d.A,{xs:12,item:!0,children:(0,n.jsx)(ye,{})}),D&&(0,n.jsx)(d.A,{className:k.search,xs:"auto",item:!0,children:(0,n.jsx)(jt,{entityId:St,entityTitle:X?.metadata?.title,searchResultUrlMapper:U})}),(0,n.jsxs)(d.A,{xs:12,item:!0,children:[($t==="CHECKING"||he)&&(0,n.jsx)(M.k,{}),(0,n.jsx)(v,{element:Bt,onAppend:re,children:(0,n.jsx)(Ue,{})})]})]})}):(0,n.jsx)($.U,{children:(0,n.jsx)(d.A,{container:!0,children:(0,n.jsx)(d.A,{xs:12,item:!0,children:(0,n.jsx)(ye,{})})})})}),Is=null},45061:(H,S,t)=>{"use strict";t.d(S,{T:()=>bt});var n=t(31085),a=t(14041),d=t(93285),x=t(42899),m=t(4387),h=t(13660),u=t(72020),p=t(86892),g=t(99730),y=t(82292),A=t(67871),v=t(8859),T=t(34428),P=t(51372),L=t(6820),O=t(58837),j=t(268),$=t(72501),M=t(72072);const J=(0,O.A)(At=>({root:{textAlign:"left"},label:{color:At.page.fontColor,fontWeight:At.typography.fontWeightBold,letterSpacing:0,fontSize:At.typography.fontSize,marginBottom:At.spacing(1)/2,lineHeight:1},value:{color:(0,j.X4)(At.page.fontColor,.8),fontSize:At.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),Q=({value:At,className:Dt,typographyRootComponent:lt})=>(0,n.jsx)($.A,{component:lt??(typeof At=="string"?"p":"span"),className:Dt,children:At});function F(At){const{label:Dt,value:lt,url:dt,contentTypograpyRootComponent:xt}=At,ft=J(),Ct=(0,n.jsx)(Q,{className:ft.value,value:lt||"<Unknown>",typographyRootComponent:xt});return(0,n.jsx)(x.A,{item:!0,children:(0,n.jsxs)($.A,{component:"span",className:ft.root,children:[(0,n.jsx)($.A,{className:ft.label,children:Dt}),dt?(0,n.jsx)(M.N_,{to:dt,children:Ct}):Ct]})})}var V=t(69814),Y=t(72427),nt=t(65461),W=t(9222),Z=t(56005),G=t.n(Z),at=t(82779),pt=t(18690);const Et=(0,n.jsx)(m.A,{animation:"wave",variant:"text",height:40}),bt=At=>{const{children:Dt}=At,lt=(0,u.YR)(),dt=(0,Y.gf)(nt.U),xt=(0,Y.gf)(y.n),{"*":ft=""}=(0,pt.g)(),{title:Ct,setTitle:Pt,subtitle:it,setSubtitle:mt,entityRef:yt,metadata:{value:et,loading:ht},entityMetadata:{value:rt,loading:B}}=(0,p.V)();(0,a.useEffect)(()=>{et&&(Pt(et.site_name),mt(()=>{let{site_description:de}=et;return(!de||de==="None")&&(de=""),de}))},[et,Pt,mt]);const z=dt.getOptional("app.title")||"Backstage",{locationMetadata:ut,spec:Ot}=rt||{},It=Ot?.lifecycle,Lt=rt?(0,A.t)(rt,P.vv):[],Ut=(0,W.S)(at.rQ)(),Nt=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(F,{label:G()(rt?.kind||"entity"),value:(0,n.jsx)(v.z,{color:"inherit",entityRef:yt,title:rt?.metadata.title,defaultKind:"Component"})}),Lt.length>0&&(0,n.jsx)(F,{label:"Owner",value:(0,n.jsx)(T.i,{color:"inherit",entityRefs:Lt,defaultKind:"group"})}),It?(0,n.jsx)(F,{label:"Lifecycle",value:String(It)}):null,ut&&ut.type!=="dir"&&ut.type!=="file"?(0,n.jsx)(F,{label:"",value:(0,n.jsxs)(x.A,{container:!0,direction:"column",alignItems:"center",children:[(0,n.jsx)(x.A,{style:{padding:0},item:!0,children:(0,n.jsx)(h.A,{style:{marginTop:"-25px"}})}),(0,n.jsx)(x.A,{style:{padding:0},item:!0,children:"Source"})]}),url:ut.target}):null]});if(!B&&rt===void 0||!ht&&et===void 0)return null;const te=(0,L.U2)(yt),jt=xt.forEntity(te).snapshot.primaryTitle,kt=de=>de.replace(/\/$/,""),ee=de=>de.replace(/-/g," ").split(" ").map(G()).join(" ");let fe=[];ft!==""&&(fe=kt(ft).split("/").slice(0,3).map(ee));const ne=[z,jt,...fe].join(" | ");return(0,n.jsxs)(V.Y,{type:"Documentation",typeLink:Ut,title:Ct||Et,subtitle:it===""?void 0:it||Et,children:[(0,n.jsx)(d.A,{titleTemplate:"%s",children:(0,n.jsx)("title",{children:ne})}),Nt,Dt,lt.renderComponentsByLocation(g.e.Header)]})}},82779:(H,S,t)=>{"use strict";t.d(S,{Oc:()=>d,Ri:()=>x,rQ:()=>a});var n=t(34569);const a=(0,n.H)({id:"techdocs:index-page"}),d=(0,n.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),x=(0,n.H)({id:"techdocs:catalog-reader-view"})},27698:(H,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>y});var n=t(31085),a=t(14041),d=t(68804),x=t(5951),m=t(58837),h=t(72501),u=t(72072),p=t(70734);const g=(0,m.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),y=A=>{const{result:v,highlight:T,lineClamp:P=5,asListItem:L=!0,asLink:O=!0,title:j,icon:$}=A,M=g(),J=({children:V})=>O?(0,n.jsx)(u.N_,{noTrack:!0,to:v.location,children:V}):(0,n.jsx)(n.Fragment,{children:V}),Q=()=>{const V=T?.fields.title?(0,n.jsx)(p.e,{text:T.fields.title,preTag:T.preTag,postTag:T.postTag}):v.title,Y=T?.fields.entityTitle?(0,n.jsx)(p.e,{text:T.fields.entityTitle,preTag:T.preTag,postTag:T.postTag}):v.entityTitle,nt=T?.fields.name?(0,n.jsx)(p.e,{text:T.fields.name,preTag:T.preTag,postTag:T.postTag}):v.name;return v?(0,n.jsx)(x.A,{className:M.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,n.jsx)(J,{children:j||(0,n.jsxs)(n.Fragment,{children:[V," | ",Y??nt," docs"]})}),secondary:(0,n.jsx)(h.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:P,overflow:"hidden"},color:"textSecondary",variant:"body2",children:T?.fields.text?(0,n.jsx)(p.e,{text:T.fields.text,preTag:T.preTag,postTag:T.postTag}):v.text})}):null},F=({children:V})=>L?(0,n.jsxs)(n.Fragment,{children:[$&&(0,n.jsx)(d.A,{children:typeof $=="function"?$(v):$}),(0,n.jsx)("div",{className:M.flexContainer,children:V})]}):(0,n.jsx)(n.Fragment,{children:V});return(0,n.jsx)(F,{children:(0,n.jsx)(Q,{})})}},97184:(H,S,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var S=n=>H(H.s=n);H.O(0,[1751,1888,5067,1678,235,6587,1975,5042,7400,4538,4121],()=>(S(97184),S(71543)));var t=H.O()}]);})();
551
+ Feedback:`),Rt=k?.type==="github"?(0,$n.F)(N.href,"blob"):N.href,$t=Fn()(Rt),Bt=`/${$t.organization}/${$t.name}`,Ft=U.cloneNode();switch(k?.type){case"gitlab":Ft.href=`${N.origin}${Bt}/issues/new?issue[title]=${st}&issue[description]=${St}`;break;case"github":Ft.href=`${N.origin}${Bt}/issues/new?title=${st}&body=${St}`;break;default:return D}return fn(a.createElement(gs.A),Ft),Ft.style.paddingLeft="5px",Ft.title="Leave feedback for this page",Ft.id="git-feedback-link",U?.insertAdjacentElement("beforebegin",Ft),D};var fs=t(38097);const bn=(0,x.A)(f=>({button:{color:f.palette.primary.light,textDecoration:"underline"}})),Sn=({message:f,handleButtonClick:D,autoHideDuration:U})=>{const N=bn(),[k,X]=(0,a.useState)(!0),st=()=>X(!1);return(0,n.jsx)(fs.A,{open:k,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:U,color:"primary",onClose:st,message:f,action:(0,n.jsx)(ht.A,{classes:{root:N.button},size:"small",onClick:()=>{st(),D()},children:"Redirect now"})})},ms=(f,D)=>{const N=k=>{const X=jn(window.location.href),st=new URL(k,X);if(st.hostname!==window.location.hostname){const Rt=window.location.pathname,$t=Rt.indexOf(D),Bt=Rt.slice(0,$t+D.length);return new URL(Bt,X).href}return st.href};return k=>{for(const X of Array.from(k.querySelectorAll("meta")))if(X.getAttribute("http-equiv")==="refresh"){const st=X.getAttribute("content")?.split("url=");if(!st||st.length<2)return k;const St=st[1],Rt=N(St);if(window.location.href===Rt)return k;const $t=document.createElement("div");return fn((0,n.jsx)(Sn,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>f(Rt),autoHideDuration:3e3}),$t),document.body.appendChild($t),setTimeout(()=>{f(Rt)},3e3),k}return k}},kn=()=>f=>(setTimeout(()=>{const D=f?.querySelectorAll("li.md-nav__item--active");D.length!==0&&(D.forEach(N=>{const k=N?.querySelector("input");k?.checked||k?.click()}),D[D.length-1].scrollIntoView())},200),f);var Wn=t(50868),ys=t(10437),vs=t(71677),Es=t(87051),As=t(36338);const xs=(0,Es.A)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(vs.Ay),Cs=()=>(0,n.jsx)(ys.A,{children:(0,n.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"})}),bs=({text:f})=>{const[D,U]=(0,a.useState)(!1),[,N]=(0,As.A)(),k=(0,a.useCallback)(()=>{N(f),U(!0)},[f,N]),X=(0,a.useCallback)(()=>{U(!1)},[U]);return(0,n.jsx)(xs,{title:"Copied to clipboard",placement:"left",open:D,onClose:X,leaveDelay:1e3,children:(0,n.jsx)(mt.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:k,children:(0,n.jsx)(Cs,{})})})},Ss=f=>D=>{const U=D.querySelectorAll("pre > code");for(const N of U){const k=N.textContent||"",X=document.createElement("div");N?.parentElement?.prepend(X),fn((0,n.jsx)(Wn.A,{theme:f,children:(0,n.jsx)(bs,{text:k})}),X)}return D},Os=({baseUrl:f,onClick:D})=>U=>(Array.from(U.getElementsByTagName("a")).forEach(N=>{N.addEventListener("click",k=>{const st=N.getAttribute("href");st&&st.startsWith(f)&&!N.hasAttribute("download")&&(k.preventDefault(),D(k,st))})}),U),Kn=({onLoading:f,onLoaded:D})=>U=>(f(),U.addEventListener(g,function N(){D(),U.removeEventListener(g,N)}),U);function Ps(f,D){const U=new URL(D),N=`${U.origin}${U.pathname.replace(/\/$/,"")}`,k=f.replace(N,"").replace(/^\/+/,""),X=new URL(`http://localhost/${k}`);return`${X.pathname}${X.search}${X.hash}`}function Ts(){const f=(0,a.useRef)((0,Nt.Zp)()),U=(0,nt.gf)(Y.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(k=>{let X=k;if(U)try{X=Ps(k,U)}catch{}f.current(X)},[U])}const zn="screen and (max-width: 76.1875em)",Hn=f=>{const D=Ts(),U=(0,ke.A)(),N=(0,He.A)(zn),k=ie(),X=Cn(),st=(0,W.s)(),St=(0,nt.gf)(ge.s),Rt=(0,nt.gf)(Qe.Y),$t=(0,nt.gf)(Y.U),{state:Bt,path:Ft,content:Xt}=De(),{"*":he=""}=(0,Nt.g)(),[Ht,_t]=(0,a.useState)(null),Ae=A(Ht),re=(0,a.useCallback)(()=>{if(!Ht)return;Ht.querySelectorAll(".md-sidebar").forEach(ce=>{if(N)ce.style.top="0px";else{const Fe=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Me=Ht.getBoundingClientRect().top??0;const ln=Ht.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Me<Fe&&(Me=Fe);const pe=Math.max(Me,0)+ln;ce.style.top=`${pe}px`;const dn=Ht.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;ce.style.height=`${dn-pe}px`}ce.style.setProperty("opacity","1")})},[Ht,N]);(0,a.useEffect)(()=>(window.addEventListener("resize",re),window.addEventListener("scroll",re,!0),()=>{window.removeEventListener("resize",re),window.removeEventListener("scroll",re,!0)}),[Ht,re]);const Zt=(0,a.useCallback)(()=>{if(!Ht)return;const qt=Ht.querySelector(".md-footer");qt&&(qt.style.width=`${Ht.getBoundingClientRect().width}px`)},[Ht]);(0,a.useEffect)(()=>(window.addEventListener("resize",Zt),()=>{window.removeEventListener("resize",Zt)}),[Ht,Zt]),(0,a.useEffect)(()=>{Ae||(Zt(),re())},[Bt,Ae,Zt,re]);const Jt=(0,a.useCallback)((qt,ce)=>Ln(qt,[k,cs({techdocsStorageApi:St,entityId:f,path:ce}),Bn(),ds(),us(),hs(),Nn(Rt),X]),[f,Rt,St,k,X]),Se=(0,a.useCallback)(async qt=>Ln(qt,[ms(D,f.name),kn(),Ss(U),Os({baseUrl:$t.getOptionalString("app.baseUrl")||window.location.origin,onClick:(ce,le)=>{const Fe=ce.ctrlKey||ce.metaKey,Me=new URL(le),nn=ce.target?.innerText||le,ln=le.replace(window.location.origin,"");st.captureEvent("click",nn,{attributes:{to:ln}}),Me.hash?Fe?window.open(le,"_blank"):(window.location.pathname!==Me.pathname?D(le):window.history.pushState(null,document.title,Me.hash),qt?.querySelector(`[id="${Me.hash.slice(1)}"]`)?.scrollIntoView()):Fe?window.open(le,"_blank"):D(le)}}),Kn({onLoading:()=>{},onLoaded:()=>{qt.querySelector(".md-nav__title")?.removeAttribute("for")}}),Kn({onLoading:()=>{Array.from(qt.querySelectorAll(".md-sidebar")).forEach(le=>{le.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[U,D,st,f.name,$t]);return(0,a.useEffect)(()=>{if(!Xt)return()=>{};let qt=!0;return Jt(Xt,Ft).then(async ce=>{if(!ce?.innerHTML||!qt||he!==Ft)return;window.scroll({top:0});const le=await Se(ce);_t(le)}),()=>{qt=!1}},[Xt,he,Ft,Jt,Se]),Ht};var On=t(41883),ws=t(72020),we=t(99730);const Ue=()=>{const f=(0,ws.YR)(),{shadowRoot:D}=(0,m.V)(),U=D?.querySelector('[data-md-component="content"]'),N=D?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let k=N?.querySelector('[data-techdocs-addons-location="primary sidebar"]');k||(k=document.createElement("div"),k.setAttribute("data-techdocs-addons-location","primary sidebar"),N?.prepend(k));const X=D?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let st=X?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return st||(st=document.createElement("div"),st.setAttribute("data-techdocs-addons-location","secondary sidebar"),X?.prepend(st)),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(On.A,{container:k,children:f.renderComponentsByLocation(we.e.PrimarySidebar)}),(0,n.jsx)(On.A,{container:U,children:f.renderComponentsByLocation(we.e.Content)}),(0,n.jsx)(On.A,{container:st,children:f.renderComponentsByLocation(we.e.SecondarySidebar)})]})},$e=(0,x.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Rs=ze(f=>{const{withSearch:D=!0,searchResultUrlMapper:U,onReady:N}=f,k=$e(),{entityMetadata:{value:X,loading:st},entityRef:St,setShadowRoot:Rt}=(0,m.V)(),{state:$t}=De(),Bt=Hn(St),Ft=window.location.pathname,Xt=window.location.hash,he=A(Bt),[Ht]=L([`[id="${Xt.slice(1)}"]`]),_t=(0,it.n)(),{NotFoundErrorPage:Ae}=_t.getComponents();(0,a.useEffect)(()=>{he||(Xt?Ht&&Ht.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Ft,Xt,Ht,he]);const re=(0,a.useCallback)(Zt=>{Rt(Zt),N instanceof Function&&N()},[Rt,N]);return st===!1&&!X?(0,n.jsx)(Ae,{}):Bt?(0,n.jsx)($.U,{children:(0,n.jsxs)(d.A,{container:!0,children:[(0,n.jsx)(d.A,{xs:12,item:!0,children:(0,n.jsx)(ye,{})}),D&&(0,n.jsx)(d.A,{className:k.search,xs:"auto",item:!0,children:(0,n.jsx)(jt,{entityId:St,entityTitle:X?.metadata?.title,searchResultUrlMapper:U})}),(0,n.jsxs)(d.A,{xs:12,item:!0,children:[($t==="CHECKING"||he)&&(0,n.jsx)(M.k,{}),(0,n.jsx)(v,{element:Bt,onAppend:re,children:(0,n.jsx)(Ue,{})})]})]})}):(0,n.jsx)($.U,{children:(0,n.jsx)(d.A,{container:!0,children:(0,n.jsx)(d.A,{xs:12,item:!0,children:(0,n.jsx)(ye,{})})})})}),Is=null},45061:(V,S,t)=>{"use strict";t.d(S,{T:()=>bt});var n=t(31085),a=t(14041),d=t(93285),x=t(42899),m=t(4387),h=t(13660),u=t(72020),p=t(86892),g=t(99730),y=t(82292),A=t(67871),v=t(8859),T=t(34428),P=t(51372),L=t(6820),O=t(58837),j=t(268),$=t(72501),M=t(72072);const J=(0,O.A)(At=>({root:{textAlign:"left"},label:{color:At.page.fontColor,fontWeight:At.typography.fontWeightBold,letterSpacing:0,fontSize:At.typography.fontSize,marginBottom:At.spacing(1)/2,lineHeight:1},value:{color:(0,j.X4)(At.page.fontColor,.8),fontSize:At.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),Q=({value:At,className:Dt,typographyRootComponent:lt})=>(0,n.jsx)($.A,{component:lt??(typeof At=="string"?"p":"span"),className:Dt,children:At});function F(At){const{label:Dt,value:lt,url:dt,contentTypograpyRootComponent:xt}=At,ft=J(),Ct=(0,n.jsx)(Q,{className:ft.value,value:lt||"<Unknown>",typographyRootComponent:xt});return(0,n.jsx)(x.A,{item:!0,children:(0,n.jsxs)($.A,{component:"span",className:ft.root,children:[(0,n.jsx)($.A,{className:ft.label,children:Dt}),dt?(0,n.jsx)(M.N_,{to:dt,children:Ct}):Ct]})})}var G=t(69814),H=t(72427),nt=t(65461),W=t(9222),Z=t(56005),Y=t.n(Z),at=t(82779),pt=t(18690);const Et=(0,n.jsx)(m.A,{animation:"wave",variant:"text",height:40}),bt=At=>{const{children:Dt}=At,lt=(0,u.YR)(),dt=(0,H.gf)(nt.U),xt=(0,H.gf)(y.n),{"*":ft=""}=(0,pt.g)(),{title:Ct,setTitle:Pt,subtitle:it,setSubtitle:mt,entityRef:yt,metadata:{value:et,loading:ht},entityMetadata:{value:rt,loading:B}}=(0,p.V)();(0,a.useEffect)(()=>{et&&(Pt(et.site_name),mt(()=>{let{site_description:de}=et;return(!de||de==="None")&&(de=""),de}))},[et,Pt,mt]);const z=dt.getOptional("app.title")||"Backstage",{locationMetadata:ut,spec:Ot}=rt||{},It=Ot?.lifecycle,Lt=rt?(0,A.t)(rt,P.vv):[],Ut=(0,W.S)(at.rQ)(),Nt=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(F,{label:Y()(rt?.kind||"entity"),value:(0,n.jsx)(v.z,{color:"inherit",entityRef:yt,title:rt?.metadata.title,defaultKind:"Component"})}),Lt.length>0&&(0,n.jsx)(F,{label:"Owner",value:(0,n.jsx)(T.i,{color:"inherit",entityRefs:Lt,defaultKind:"group"})}),It?(0,n.jsx)(F,{label:"Lifecycle",value:String(It)}):null,ut&&ut.type!=="dir"&&ut.type!=="file"?(0,n.jsx)(F,{label:"",value:(0,n.jsxs)(x.A,{container:!0,direction:"column",alignItems:"center",children:[(0,n.jsx)(x.A,{style:{padding:0},item:!0,children:(0,n.jsx)(h.A,{style:{marginTop:"-25px"}})}),(0,n.jsx)(x.A,{style:{padding:0},item:!0,children:"Source"})]}),url:ut.target}):null]});if(!B&&rt===void 0||!ht&&et===void 0)return null;const te=(0,L.U2)(yt),jt=xt.forEntity(te).snapshot.primaryTitle,kt=de=>de.replace(/\/$/,""),ee=de=>de.replace(/-/g," ").split(" ").map(Y()).join(" ");let fe=[];ft!==""&&(fe=kt(ft).split("/").slice(0,3).map(ee));const ne=[z,jt,...fe].join(" | ");return(0,n.jsxs)(G.Y,{type:"Documentation",typeLink:Ut,title:Ct||Et,subtitle:it===""?void 0:it||Et,children:[(0,n.jsx)(d.A,{titleTemplate:"%s",children:(0,n.jsx)("title",{children:ne})}),Nt,Dt,lt.renderComponentsByLocation(g.e.Header)]})}},82779:(V,S,t)=>{"use strict";t.d(S,{Oc:()=>d,Ri:()=>x,rQ:()=>a});var n=t(34569);const a=(0,n.H)({id:"techdocs:index-page"}),d=(0,n.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),x=(0,n.H)({id:"techdocs:catalog-reader-view"})},27698:(V,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>y});var n=t(31085),a=t(14041),d=t(68804),x=t(5951),m=t(58837),h=t(72501),u=t(72072),p=t(70734);const g=(0,m.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),y=A=>{const{result:v,highlight:T,lineClamp:P=5,asListItem:L=!0,asLink:O=!0,title:j,icon:$}=A,M=g(),J=({children:G})=>O?(0,n.jsx)(u.N_,{noTrack:!0,to:v.location,children:G}):(0,n.jsx)(n.Fragment,{children:G}),Q=()=>{const G=T?.fields.title?(0,n.jsx)(p.e,{text:T.fields.title,preTag:T.preTag,postTag:T.postTag}):v.title,H=T?.fields.entityTitle?(0,n.jsx)(p.e,{text:T.fields.entityTitle,preTag:T.preTag,postTag:T.postTag}):v.entityTitle,nt=T?.fields.name?(0,n.jsx)(p.e,{text:T.fields.name,preTag:T.preTag,postTag:T.postTag}):v.name;return v?(0,n.jsx)(x.A,{className:M.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,n.jsx)(J,{children:j||(0,n.jsxs)(n.Fragment,{children:[G," | ",H??nt," docs"]})}),secondary:(0,n.jsx)(h.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:P,overflow:"hidden"},color:"textSecondary",variant:"body2",children:T?.fields.text?(0,n.jsx)(p.e,{text:T.fields.text,preTag:T.preTag,postTag:T.postTag}):v.text})}):null},F=({children:G})=>L?(0,n.jsxs)(n.Fragment,{children:[$&&(0,n.jsx)(d.A,{children:typeof $=="function"?$(v):$}),(0,n.jsx)("div",{className:M.flexContainer,children:G})]}):(0,n.jsx)(n.Fragment,{children:G});return(0,n.jsx)(F,{children:(0,n.jsx)(Q,{})})}},97184:(V,S,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},V=>{var S=n=>V(V.s=n);V.O(0,[1751,1888,5067,1678,235,6587,1975,5042,7400,4538,4121],()=>(S(97184),S(71543)));var t=V.O()}]);})();
552
552
 
553
- //# sourceMappingURL=main.53048bb6.js.map
553
+ //# sourceMappingURL=main.4f4fde3d.js.map