@techdocs/cli 1.9.3-next.2 → 1.9.3-next.3

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,553 +0,0 @@
1
- (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(H,S,t)=>{"use strict";t.d(S,{c:()=>s});const s=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(H,S,t)=>{"use strict";t.d(S,{P:()=>A,_P:()=>a,oQ:()=>s});const s="default",a="backstage.io/view-url",A="backstage.io/edit-url",p="kubernetes.io/api-server",b="kubernetes.io/api-server-certificate-authority",g="kubernetes.io/auth-provider"},6820:(H,S,t)=>{"use strict";t.d(S,{KU:()=>p,U2:()=>b,sM:()=>A});var s=t(72348);function a(g){let u=g.indexOf(":");const f=g.indexOf("/");f!==-1&&f<u&&(u=-1);const d=u===-1?void 0:g.slice(0,u),v=f===-1?void 0:g.slice(u+1,f),h=g.slice(Math.max(u+1,f+1));if(d===""||v===""||h==="")throw new TypeError(`Entity reference "${g}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:d,namespace:v,name:h}}function A(g){return{kind:g.kind,namespace:g.metadata.namespace||s.oQ,name:g.metadata.name}}function p(g,u){if(!g)throw new Error("Entity reference must not be empty");const f=u?.defaultKind,d=u?.defaultNamespace||s.oQ;let v,h,x;if(typeof g=="string"){const O=a(g);v=O.kind??f,h=O.namespace??d,x=O.name}else v=g.kind??f,h=g.namespace??d,x=g.name;if(v)if(h){if(!x){const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty name`)}}else{const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty namespace`)}else{const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:v,namespace:h,name:x}}function b(g){let u,f,d;return"metadata"in g?(u=g.kind,f=g.metadata.namespace??s.oQ,d=g.metadata.name):(u=g.kind,f=g.namespace??s.oQ,d=g.name),`${u.toLocaleLowerCase("en-US")}:${f.toLocaleLowerCase("en-US")}/${d.toLocaleLowerCase("en-US")}`}},51372:(H,S,t)=>{"use strict";t.d(S,{fT:()=>f,jn:()=>O,nC:()=>u,sA:()=>P,vv:()=>s});const s="ownedBy",a="ownerOf",A="consumesApi",p="apiConsumedBy",b="providesApi",g="apiProvidedBy",u="dependsOn",f="dependencyOf",d="parentOf",v="childOf",h="memberOf",x="hasMember",O="partOf",P="hasPart"},17736:(H,S,t)=>{"use strict";t.d(S,{Eo:()=>s,I4:()=>A});const s="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",A="backstage.io/source-location"},78692:(H,S,t)=>{"use strict";t.d(S,{Cr:()=>g,KL:()=>b,aY:()=>p});var s=t(6820),a=t(17736);const A=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function p(u){if(typeof u!="string")throw new TypeError(`Unable to parse location ref '${u}', unexpected argument ${typeof u}`);const f=u.indexOf(":");if(f<0)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const d=u.substring(0,f).trim(),v=u.substring(f+1).trim();if(!d||!v)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(d==="http"||d==="https")throw new TypeError(`Invalid location ref '${u}', please prefix it with 'url:', e.g. 'url:${u}'`);if(A.test(v))throw new TypeError(`Invalid location ref '${u}', target is a javascript: URL`);return{type:d,target:v}}function b(u){const{type:f,target:d}=u;if(f){if(!d)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(A.test(d))throw new TypeError(`Invalid location ref '${f}:${d}', target is a javascript: URL`);return`${f}:${d}`}function g(u){const f=u.metadata?.annotations?.[a.I4]??u.metadata?.annotations?.[a.Eo];if(!f)throw new Error(`Entity '${(0,s.U2)(u)}' is missing location`);return p(f)}},77310:(H,S,t)=>{"use strict";t.d(S,{z:()=>f});var s=t(31085),a=t(10394),A=t(54917),p=t(69578),b=t(40697),g=t(25577),u=t(37916);function f(d){const{text:v,language:h,showLineNumbers:x=!1,highlightedNumbers:O,customStyle:P,showCopyCodeButton:B=!1}=d,M=(0,A.A)(),I=M.palette.type==="dark"?b.A:g.A,D=M.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,s.jsxs)(a.A,{position:"relative",children:[(0,s.jsx)(p.A,{customStyle:P,language:h,style:I,showLineNumbers:x,wrapLines:!0,lineNumberStyle:{color:M.palette.textVerySubtle},lineProps:$=>O?.includes($)?{style:{backgroundColor:D}}:{},children:v}),B&&(0,s.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,s.jsx)(u.l,{text:v})})]})}},37916:(H,S,t)=>{"use strict";t.d(S,{l:()=>h});var s=t(31085),a=t(72427),A=t(39837),p=t(29365),b=t(71677),g=t(99594),u=t(14041),f=t(36338),d=t(10315),v=t(87849);function h(x){const{t:O}=(0,v.i)(d.O),{text:P,tooltipDelay:B=1e3,tooltipText:M=O("copyTextButton.tooltipText"),"aria-label":I="Copy text"}=x,D=(0,a.gf)(A.m),[$,k]=(0,u.useState)(!1),[{error:X},z]=(0,f.A)();(0,u.useEffect)(()=>{X&&D.post(X)},[X,D]);const Y=K=>{K.stopPropagation(),k(!0),z(P)};return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(b.Ay,{id:"copy-test-tooltip",title:M,placement:"top",leaveDelay:B,onClose:()=>k(!1),open:$,children:(0,s.jsx)(p.A,{onClick:Y,"aria-label":I,children:(0,s.jsx)(g.A,{})})})})}},44186:(H,S,t)=>{"use strict";t.d(S,{p:()=>x});var s=t(31085),a=t(42899),A=t(58837),p=t(72501);const b=t.p+"static/missingAnnotation.67f79e98.svg",g=t.p+"static/noInformation.4b426325.svg",u=t.p+"static/createComponent.975d1e1e.svg",f=t.p+"static/noBuild.1715fa71.svg",d=(0,A.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),v=({missing:O})=>{const P=d();switch(O){case"field":return(0,s.jsx)("img",{src:b,className:P.generalImg,alt:"annotation is missing"});case"info":return(0,s.jsx)("img",{src:g,alt:"no Information",className:P.generalImg});case"content":return(0,s.jsx)("img",{src:u,alt:"create Component",className:P.generalImg});case"data":return(0,s.jsx)("img",{src:f,alt:"no Build",className:P.generalImg});default:return null}},h=(0,A.A)(O=>({root:{backgroundColor:O.palette.background.default,padding:O.spacing(2,0,0,0)},action:{marginTop:O.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function x(O){const{title:P,description:B,missing:M,action:I}=O,D=h();return(0,s.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:D.root,spacing:2,children:[(0,s.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,s.jsxs)(a.A,{container:!0,direction:"column",children:[(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(p.A,{variant:"h5",children:P})}),(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(p.A,{variant:"body1",children:B})}),(0,s.jsx)(a.A,{item:!0,xs:!0,className:D.action,children:I})]})}),(0,s.jsx)(a.A,{item:!0,xs:12,md:6,className:D.imageContainer,children:typeof M=="string"?(0,s.jsx)(v,{missing:M}):M.customImage})]})}},22020:(H,S,t)=>{"use strict";t.d(S,{b:()=>v});var s=t(31085),a=t(58837),A=t(58007),p=t(8109),b=t(5951),g=t(37916),u=t(88640);const f=(0,a.A)(h=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:h.spacing(2)},divider:{margin:h.spacing(2)}}),{name:"BackstageErrorPanel"}),d=({error:h,message:x,stack:O,children:P})=>{const B=f();return(0,s.jsxs)(A.A,{dense:!0,children:[(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Error",secondary:h}),(0,s.jsx)(g.l,{text:h})]}),(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Message",secondary:x}),(0,s.jsx)(g.l,{text:x})]}),O&&(0,s.jsxs)(p.A,{alignItems:"flex-start",children:[(0,s.jsx)(b.A,{classes:{secondary:B.text},primary:"Stack Trace",secondary:O}),(0,s.jsx)(g.l,{text:O})]}),P]})};function v(h){const{title:x,error:O,defaultExpanded:P,titleFormat:B,children:M}=h;return(0,s.jsx)(u.B,{severity:"error",title:x??O.message,defaultExpanded:P,titleFormat:B,children:(0,s.jsx)(d,{error:O.name,message:O.message,stack:O.stack,children:M})})}},18956:(H,S,t)=>{"use strict";t.d(S,{m:()=>g});var s=t(31085),a=t(72501),A=t(58837),p=t(31129);const b=(0,A.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function g(f){const{isFavorite:d}=f,v=b();return(0,s.jsx)(a.A,{component:"span",className:d?v.icon:v.iconBorder,children:d?(0,s.jsx)(p.Gg,{}):(0,s.jsx)(p.KG,{})})}function u(f){const{id:d,title:v,isFavorite:h,onToggle:x,...O}=f;return _jsx(Tooltip,{id:d,title:v,children:_jsx(IconButton,{"aria-label":v,id:d,onClick:()=>x(!h),color:"inherit",...O,children:_jsx(g,{isFavorite:h})})})}},72072:(H,S,t)=>{"use strict";t.d(S,{N_:()=>Q});var s=t(31085),a=t(82266),A=t(72427),p=t(65461),b=t(93368),g=t(49203),u=t(58837),f=t(72501),d=t(53373),v=t.n(d),h=t(45250),x=t.n(h),O=t(14041),P=t(18690),B=t(73657),M=t(39330);function I(){const[J]=(0,P.AV)((0,s.jsx)(P.qh,{index:!0,element:(0,s.jsx)("div",{})}));return!J.index}const D=(0,u.A)(J=>({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",userSelect:"none",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"},externalLinkIcon:{verticalAlign:"bottom",marginLeft:J.spacing(.5)}}),{name:"Link"}),$=()=>{const ct=(0,a.n)().getSystemIcon("externalLink")||M.A,pt=D();return(0,s.jsx)(ct,{className:pt.externalLinkIcon})},k=J=>/^([a-z+.-]+):/.test(J),X=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,z=window.open;if(z&&!z.__backstage){const J=function(...pt){const yt=String(pt[0]);if(X.test(yt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return z.apply(this,pt)};J.__backstage=!0,window.open=J}const Y=()=>{try{return(0,A.gf)(p.U).getOptionalString("app.baseUrl")}catch{return}},K=()=>{const J="http://sample.dev",ct=Y()??"/",{pathname:pt}=new URL(ct,J);return(0,h.trimEnd)(pt,"/")},dt=J=>{let ct=String(J);const pt=K(),yt=k(ct),xt=ct.startsWith(pt);return!yt&&!xt&&(ct=pt.concat(ct)),ct},G=J=>J instanceof Array?J.map(G).join(" ").trim():typeof J=="object"&&J?G(J?.props?.children):["string","number"].includes(typeof J)?String(J):"",Q=(0,O.forwardRef)(({onClick:J,noTrack:ct,externalLinkIcon:pt,...yt},xt)=>{const Pt=D(),Rt=(0,b.s)(),ut=I()?dt(yt.to):yt.to,lt=G(yt.children)||ut,bt=k(ut),gt=bt&&!!/^https?:/.exec(ut);if(X.test(ut))throw new Error("Link component rejected javascript: URL as a security precaution");const Ot=Tt=>{J?.(Tt),ct||Rt.captureEvent("click",lt,{attributes:{to:ut}})};return bt?(0,s.jsxs)(g.A,{...gt?{target:"_blank",rel:"noopener"}:{},...yt,...yt["aria-label"]?{"aria-label":`${yt["aria-label"]}, Opens in a new window`}:{},ref:xt,href:ut,onClick:Ot,className:v()(Pt.externalLink,yt.className),children:[yt.children,pt&&(0,s.jsx)($,{}),(0,s.jsx)(f.A,{component:"span",className:Pt.visuallyHidden,children:", Opens in a new window"})]}):(0,s.jsx)(g.A,{...yt,ref:xt,component:B.N_,to:ut,onClick:Ot})})},73896:(H,S,t)=>{"use strict";t.d(S,{z:()=>g});var s=t(31085),a=t(64947),A=t(14041),p=t(72072);const b=(0,A.forwardRef)((f,d)=>(0,s.jsx)(p.N_,{ref:d,...f,color:"initial"})),g=(0,A.forwardRef)((f,d)=>(0,s.jsx)(a.A,{ref:d,component:b,...f})),u=null},4650:(H,S,t)=>{"use strict";t.d(S,{h:()=>h});var s=t(31085),a=t(58837),A=t(45872),p=t(61125),b=t(14041),g=t(77310);const u=(0,a.A)(x=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${x.palette.border}`},"& th, & td":{border:`1px solid ${x.palette.border}`,padding:x.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:x.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:x.palette.background.paper},"& tr":{backgroundColor:x.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:x.palette.background.default},"& a":{color:x.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),f=(x,O)=>O?typeof O=="string"?x+O:b.Children.toArray(O.props.children).reduce(f,x):x,d=({level:x,children:O})=>{const M=b.Children.toArray(O).reduce(f,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return(0,b.createElement)(`h${x}`,{id:M},O)},v={code:({inline:x,className:O,children:P,...B})=>{const M=String(P).replace(/\n+$/,""),I=/language-(\w+)/.exec(O||"");return!x&&I?(0,s.jsx)(g.z,{language:I[1],text:M}):(0,s.jsx)("code",{className:O,...B,children:P})},h1:d,h2:d,h3:d,h4:d,h5:d,h6:d};function h(x){const{content:O,dialect:P="gfm",linkTarget:B,transformLinkUri:M,transformImageUri:I,className:D}=x,$=u();return(0,s.jsx)(A.$,{remarkPlugins:P==="gfm"?[p.A]:[],className:`${$.markdown} ${D??""}`.trim(),children:O,components:v,linkTarget:B,transformLinkUri:M,transformImageUri:I})}},68146:(H,S,t)=>{"use strict";t.d(S,{k:()=>g});var s=t(31085),a=t(10394),A=t(88951),p=t(54917),b=t(14041);function g(u){const f=(0,p.A)(),[d,v]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{const h=setTimeout(()=>v(!0),f.transitions.duration.short);return()=>clearTimeout(h)},[f.transitions.duration.short]),d?(0,s.jsx)(A.A,{...u,"data-testid":"progress"}):(0,s.jsx)(a.A,{display:"none","data-testid":"progress"})}},66917:(H,S,t)=>{"use strict";t.d(S,{w:()=>dt});var s=t(31085),a=t(10394),A=t(69076),p=t(67720),b=t(95061),g=t(41857),u=t(48543),f=t(26343),d=t(81215),v=t(87051),h=t(12398),x=t(58837),O=t(72501),P=t(92399),B=t(14041),M=t(10437);const I=(0,x.A)(G=>(0,h.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),$=()=>{const G=I();return(0,s.jsx)(M.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},k=(0,x.A)(G=>(0,h.A)({icon:{position:"absolute",right:G.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),z=()=>{const G=k();return(0,s.jsx)(M.A,{className:G.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},Y=(0,v.A)(G=>(0,h.A)({root:{"label + &":{marginTop:G.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:G.palette.primary.main}},input:{borderRadius:G.shape.borderRadius,position:"relative",backgroundColor:G.palette.background.paper,border:"1px solid #ced4da",fontSize:G.typography.body1.fontSize,padding:G.spacing(1.25,3.25,1.25,1.5),transition:G.transitions.create(["border-color","box-shadow"]),"&:focus":{background:G.palette.background.paper,borderRadius:G.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(g.A),K=(0,x.A)(G=>(0,h.A)({formControl:{margin:G.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"&.Mui-focused":{color:G.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:G.typography.body2.fontSize,fontFamily:G.typography.fontFamily,color:G.palette.text.primary,"&.Mui-focused":{color:G.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function dt(G){const{multiple:Q,items:J,label:ct,placeholder:pt,selected:yt,onChange:xt,triggerReset:Pt,native:Rt=!1,disabled:ut=!1,margin:lt,"data-testid":bt="select"}=G,gt=K(),[Ot,Tt]=(0,B.useState)(yt||(Q?[]:"")),[it,ft]=(0,B.useState)(!1);(0,B.useEffect)(()=>{Tt(Q?[]:"")},[Pt,Q]),(0,B.useEffect)(()=>{Tt(yt||(Q?[]:""))},[yt,Q]);const Et=j=>{Tt(j.target.value),xt(j.target.value)},et=j=>{if(ut){j.preventDefault();return}ft(V=>Q&&!(j.target instanceof HTMLElement)?!0:!V)},At=()=>{ft(!1)},ot=j=>()=>{const V=Ot.filter(nt=>nt!==j);Tt(V),xt(V)};return(0,s.jsx)(a.A,{className:gt.root,children:(0,s.jsxs)(b.A,{className:gt.formControl,children:[(0,s.jsx)(u.A,{className:gt.formLabel,children:ct}),(0,s.jsxs)(d.A,{"aria-label":ct,value:Ot,native:Rt,disabled:ut,"data-testid":bt,displayEmpty:!0,multiple:Q,margin:lt,onChange:Et,open:it,onOpen:et,onClose:At,input:(0,s.jsx)(Y,{}),label:ct,renderValue:j=>Q&&Ot.length!==0?(0,s.jsx)(a.A,{className:gt.chips,children:j.map(V=>{const nt=J.find(St=>St.value===V);return nt?(0,s.jsx)(p.A,{"data-testid":"chip",label:nt?.label,clickable:!0,deleteIcon:(0,s.jsx)(P.A,{"data-testid":"cancel-icon",onMouseDown:St=>St.stopPropagation()}),onDelete:ot(V),className:gt.chip},nt?.value):!1})}):(0,s.jsx)(O.A,{children:Ot.length===0?pt||"":J.find(V=>V.value===j)?.label}),IconComponent:()=>it?(0,s.jsx)(z,{}):(0,s.jsx)($,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!pt&&!Q&&(0,s.jsx)(f.A,{value:[],children:pt}),Rt?J&&J.map(j=>(0,s.jsx)("option",{value:j.value,children:j.label},j.value)):J&&J.map(j=>(0,s.jsxs)(f.A,{value:j.value,children:[Q&&(0,s.jsx)(A.A,{color:"primary",checked:Ot.includes(j.value)||!1,className:gt.checkbox}),j.label]},j.value))]})]})})}},27586:(H,S,t)=>{"use strict";t.d(S,{Y:()=>Q});var s=t(31085),a=t(82266),A=t(72427),p=t(65461),b=t(10394),g=t(64947),u=t(93453),f=t(29365),d=t(68804),v=t(5951),h=t(26343),x=t(28233),O=t(55197),P=t(58837),B=t(72501),M=t(5893),I=t(14041),D=t(10795),$=t(31129),k=t(72072),X=t(10315),z=t(87849);const Y=(0,P.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),K=({icon:J})=>{const ct=(0,a.n)(),pt=J?ct.getSystemIcon(J)??$.NT:$.NT;return(0,s.jsx)(pt,{})},dt=({link:J})=>(0,s.jsx)(k.N_,{to:J.url,children:J.title??J.url}),G=({item:J})=>(0,s.jsxs)(h.A,{button:!1,children:[(0,s.jsx)(d.A,{children:(0,s.jsx)(K,{icon:J.icon})}),(0,s.jsx)(v.A,{primary:J.title,secondary:J.links?.reduce((ct,pt,yt)=>[...ct,yt>0&&(0,s.jsx)("br",{},yt),(0,s.jsx)(dt,{link:pt},pt.url)],[])})]});function Q(J){const{t:ct}=(0,z.i)(X.O),{title:pt,items:yt,children:xt}=J,{items:Pt}=(0,D.l)(),[Rt,ut]=(0,I.useState)(!1),[lt,bt]=(0,I.useState)(null),gt=Y(),Ot=(0,A.gf)(p.U).getOptionalConfig("app.support"),Tt=(0,M.A)(Et=>Et.breakpoints.down("sm")),it=Et=>{bt(Et.currentTarget),ut(!0)},ft=()=>{ut(!1)};return Ot?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.A,{display:"flex",ml:1,children:Tt?(0,s.jsx)(f.A,{color:"primary",size:"small",onClick:it,"data-testid":"support-button","aria-label":"Support",children:(0,s.jsx)($.NT,{})}):(0,s.jsx)(g.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:it,startIcon:(0,s.jsx)($.NT,{}),children:ct("supportButton.title")})}),(0,s.jsxs)(O.Ay,{"data-testid":"support-button-popover",open:Rt,anchorEl:lt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ft,children:[(0,s.jsxs)(x.A,{className:gt.popoverList,autoFocusItem:!!lt,children:[pt&&(0,s.jsx)(h.A,{button:!1,alignItems:"flex-start",className:gt.menuItem,children:(0,s.jsx)(B.A,{variant:"subtitle1",children:pt})}),I.Children.map(xt,(Et,et)=>(0,s.jsx)(h.A,{button:!1,alignItems:"flex-start",className:gt.menuItem,children:Et},`child-${et}`)),(yt??Pt).map((Et,et)=>(0,s.jsx)(G,{item:Et},`item-${et}`))]}),(0,s.jsx)(u.A,{children:(0,s.jsx)(g.A,{color:"primary",onClick:ft,"aria-label":"Close",children:ct("supportButton.close")})})]})]}):null}},14209:(H,S,t)=>{"use strict";t.d(S,{X:()=>et});var s=t(31085),a=t(87849),A=t(25301),p=t(10394),b=t(29365),g=t(87051),u=t(58837),f=t(54917),d=t(72501),v=t(83313),h=t(89019),x=t(62461),O=t(68887),P=t(63798),B=t(64704),M=t(6774),I=t(75625),D=t(65859),$=t(45917),k=t(5416),X=t(33494),z=t(80113),Y=t(26229),K=t(46802),dt=t(45250),G=t(14041),Q=t(10315),J=t(64947),ct=t(66917);const pt=(0,u.A)(j=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:j.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:j.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${j.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:j.spacing(2)}}}),{name:"BackstageTableFilters"}),yt=j=>{const V=pt(),{onChangeFilters:nt}=j,{t:St}=(0,a.i)(Q.O),[ht,Bt]=(0,G.useState)({...j.selectedFilters}),[Wt,Ut]=(0,G.useState)(!1),Jt=()=>{Bt({}),Ut(Kt=>!Kt)};return(0,G.useEffect)(()=>{nt(ht)},[ht,nt]),(0,s.jsxs)(p.A,{className:V.root,children:[(0,s.jsxs)(p.A,{className:V.header,children:[(0,s.jsx)(p.A,{className:V.value,children:St("table.filter.title")}),(0,s.jsx)(J.A,{color:"primary",onClick:Jt,children:St("table.filter.clearAll")})]}),(0,s.jsx)(p.A,{className:V.filters,children:j.filters?.length&&j.filters.map(Kt=>(0,s.jsx)(ct.w,{triggerReset:Wt,...Kt.element,selected:ht[Kt.element.label],onChange:te=>Bt({...ht,[Kt.element.label]:te})},Kt.element.label))})]})};var xt=t(78467);function Pt(j){return(0,s.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:j.colSpan,children:(0,s.jsx)(p.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,s.jsx)(xt.A,{size:"5rem"})})})})})}const Rt={Add:(0,G.forwardRef)((j,V)=>(0,s.jsx)(v.A,{...j,ref:V})),Check:(0,G.forwardRef)((j,V)=>(0,s.jsx)(x.A,{...j,ref:V})),Clear:(0,G.forwardRef)((j,V)=>(0,s.jsx)(B.A,{...j,ref:V})),Delete:(0,G.forwardRef)((j,V)=>(0,s.jsx)(M.A,{...j,ref:V})),DetailPanel:(0,G.forwardRef)((j,V)=>(0,s.jsx)(P.A,{...j,ref:V})),Edit:(0,G.forwardRef)((j,V)=>(0,s.jsx)(I.A,{...j,ref:V})),Export:(0,G.forwardRef)((j,V)=>(0,s.jsx)(Y.A,{...j,ref:V})),Filter:(0,G.forwardRef)((j,V)=>(0,s.jsx)(D.A,{...j,ref:V})),FirstPage:(0,G.forwardRef)((j,V)=>(0,s.jsx)(k.A,{...j,ref:V})),LastPage:(0,G.forwardRef)((j,V)=>(0,s.jsx)(X.A,{...j,ref:V})),NextPage:(0,G.forwardRef)((j,V)=>(0,s.jsx)(P.A,{...j,ref:V})),PreviousPage:(0,G.forwardRef)((j,V)=>(0,s.jsx)(O.A,{...j,ref:V})),ResetSearch:(0,G.forwardRef)((j,V)=>(0,s.jsx)(B.A,{...j,ref:V})),Search:(0,G.forwardRef)((j,V)=>(0,s.jsx)($.A,{...j,ref:V})),SortArrow:(0,G.forwardRef)((j,V)=>(0,s.jsx)(h.A,{...j,ref:V})),ThirdStateCheck:(0,G.forwardRef)((j,V)=>(0,s.jsx)(z.A,{...j,ref:V})),ViewColumn:(0,G.forwardRef)((j,V)=>(0,s.jsx)(K.A,{...j,ref:V}))};function ut(j,V){const nt=V.split(".");let St=j[nt[0]];for(let ht=1;ht<nt.length;++ht){if(St===void 0)return St;const Bt=nt[ht];St=St[Bt]}return St}const lt=(0,g.A)(j=>({header:{padding:j.spacing(1,2,1,2.5),borderTop:`1px solid ${j.palette.grey.A100}`,borderBottom:`1px solid ${j.palette.grey.A100}`,fontWeight:j.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(A.rV),bt=(0,g.A)(j=>({root:{padding:j.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:j.typography.fontWeightBold}},searchField:{paddingRight:j.spacing(2)}}),{name:"BackstageTableToolbar"})(A.Nb),gt=(0,u.A)(j=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:j.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Ot=(0,u.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Tt(j,V){return j.map(nt=>{const St=nt.headerStyle??{};let ht=nt.cellStyle||{};if(nt.highlight)if(St.color=V.palette.textContrast,typeof ht=="object")ht.fontWeight=V.typography.fontWeightBold;else{const Bt=ht;ht=(Wt,Ut,Jt)=>({...Bt(Wt,Ut,Jt),fontWeight:V.typography.fontWeightBold})}return{...nt,headerStyle:St,cellStyle:ht}})}function it(j,V){return(0,dt.transform)(j,(nt,St,ht)=>{(0,dt.isEqual)(St,V[ht])||(nt[ht]=St)})}const ft={search:"",filtersOpen:!1,filters:{}};function Et(j){const{toolbarRef:V,setSearch:nt,hasFilters:St,selectedFiltersLength:ht,toggleFilters:Bt}=j,{t:Wt}=(0,a.i)(Q.O),Ut=gt(),Jt=(0,G.useCallback)(Kt=>{j.onSearchChanged(Kt),nt(Kt)},[j,nt]);return St?(0,s.jsxs)(p.A,{className:Ut.root,children:[(0,s.jsxs)(p.A,{className:Ut.root,children:[(0,s.jsx)(b.A,{onClick:Bt,"aria-label":"filter list",children:(0,s.jsx)(D.A,{})}),(0,s.jsxs)(d.A,{className:Ut.title,children:[Wt("table.filter.title")," (",ht,")"]})]}),(0,s.jsx)(bt,{...j,ref:V,onSearchChanged:Jt})]}):(0,s.jsx)(bt,{...j,ref:V,onSearchChanged:Jt})}function et(j){const{data:V,columns:nt,emptyContent:St,options:ht,title:Bt,subtitle:Wt,localization:Ut,filters:Jt,initialState:Kt,onStateChange:te,components:jt,isLoading:Ft,style:le,...he}=j,{t:Yt}=(0,a.i)(Q.O),re=Ot(),de=(0,f.A)(),Ve={...ft,...Kt},[se,on]=(0,G.useState)(Ve.filtersOpen),Te=(0,G.useCallback)(()=>on(Ee=>!Ee),[on]),[De,Ke]=(0,G.useState)(Ve.filters),[pe,Ge]=(0,G.useState)(Ve.search);(0,G.useEffect)(()=>{if(te){const Ee=it({search:pe,filtersOpen:se,filters:De},ft);te(Ee)}},[pe,se,De,te]);const tn=(0,G.useCallback)(Ee=>nt.find(Ze=>Ze.title===Ee)?.field,[nt]),hn=(0,G.useMemo)(()=>{if(typeof V=="function"||!De)return V;const Ee=Object.values(De);return V&&Ee.flat().length?V.filter(He=>!!Object.entries(De).filter(([,ke])=>!!ke.length).every(([ke,Me])=>{const Ae=ut(He,tn(ke));return Array.isArray(Ae)&&Array.isArray(Me)?Ae.some(cn=>Me.includes(cn)):Array.isArray(Ae)?Ae.includes(Me):Array.isArray(Me)?Me.includes(Ae):Ae===Me})):V},[V,De,tn]),an=Object.values(De).flat().length,Ye=!!Jt?.length,en=(0,G.useCallback)(Ee=>(0,s.jsx)(Et,{setSearch:Ge,hasFilters:Ye,selectedFiltersLength:an,toggleFilters:Te,...Ee}),[Te,Ye,an,Ge]),Ne=typeof V!="function"&&V.length===0,ze=nt.length,Qe=(0,G.useMemo)(()=>At({hasNoRows:Ne,emptyContent:St,columnCount:ze,loading:Ft}),[Ne,St,ze,Ft]);return(0,s.jsxs)(p.A,{className:re.root,children:[se&&V&&typeof V!="function"&&Jt?.length&&(0,s.jsx)(yt,{filters:ot(Jt,V,nt,Yt),selectedFilters:De,onChangeFilters:Ke}),(0,s.jsx)(A.Ay,{components:{Header:lt,Body:Qe,Toolbar:en,...jt},options:ht,columns:Tt(nt,de),icons:Rt,title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.A,{variant:"h5",component:"h2",children:Bt}),Wt&&(0,s.jsx)(d.A,{color:"textSecondary",variant:"body1",children:Wt})]}),data:hn,style:{width:"100%",...le},localization:{...Ut,body:{emptyDataSourceMessage:Yt("table.body.emptyDataSourceMessage"),...Ut?.body},pagination:{firstTooltip:Yt("table.pagination.firstTooltip"),labelDisplayedRows:Yt("table.pagination.labelDisplayedRows"),labelRowsSelect:Yt("table.pagination.labelRowsSelect"),lastTooltip:Yt("table.pagination.lastTooltip"),nextTooltip:Yt("table.pagination.nextTooltip"),previousTooltip:Yt("table.pagination.previousTooltip"),...Ut?.pagination},toolbar:{searchPlaceholder:Yt("table.toolbar.search"),searchTooltip:Yt("table.toolbar.search"),...Ut?.toolbar}},...he})]})}et.icons=Object.freeze(Rt);function At({columnCount:j,emptyContent:V,hasNoRows:nt,loading:St}){return ht=>St?(0,s.jsx)(Pt,{colSpan:j}):V&&nt?(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:j,children:V})})}):(0,s.jsx)(A.C6,{...ht})}function ot(j,V,nt,St){const ht=Wt=>{const Ut=new Set,Jt=Kt=>{Kt!=null&&Ut.add(Kt)};return V&&V.forEach(Kt=>{const te=ut(Kt,nt.find(jt=>jt.title===Wt)?.field);Array.isArray(te)?te.forEach(Jt):Jt(te)}),Ut},Bt=Wt=>({placeholder:St("table.filter.placeholder"),label:Wt.column,multiple:Wt.type==="multiple-select",items:[...ht(Wt.column)].sort().map(Ut=>({label:Ut,value:Ut}))});return j.map(Wt=>({type:Wt.type,element:Bt(Wt)}))}},88640:(H,S,t)=>{"use strict";t.d(S,{B:()=>$});var s=t(31085),a=t(268),A=t(58837),p=t(8973),b=t(29655),g=t(91567),u=t(42899),f=t(72501),d=t(9181),v=t(6924),h=t(4650);const x=(k,X)=>(X.palette.type==="light"?a.e$:a.a)(X.palette[k].light,.6),O=(k,X)=>(X.palette.type==="light"?a.a:a.e$)(X.palette[k].light,.9),P=(0,A.A)(k=>({root:{marginRight:k.spacing(1),fill:({severity:X})=>x(X,k)}})),B=({severity:k})=>{const X=P({severity:k});return(0,s.jsx)(d.A,{classes:X})},M=({severity:k})=>{const X=P({severity:k});return(0,s.jsx)(v.A,{classes:X})},I=(0,A.A)(k=>({panel:{backgroundColor:({severity:X})=>O(X,k),color:({severity:X})=>x(X,k),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:X})=>x(X,k),fontWeight:k.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:X})=>x(X,k),backgroundColor:({severity:X})=>O(X,k)},details:{width:"100%",display:"block",color:k.palette.textContrast,backgroundColor:k.palette.background.default,border:`1px solid ${k.palette.border}`,padding:k.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),D=k=>k.charAt(0).toLocaleUpperCase("en-US")+k.slice(1);function $(k){const{severity:X="warning",title:z,titleFormat:Y,message:K,children:dt,defaultExpanded:G}=k,Q=I({severity:X}),J=D(X)+(z?`: ${z}`:"");return(0,s.jsxs)(p.A,{defaultExpanded:G??!1,className:Q.panel,role:"alert",children:[(0,s.jsxs)(b.A,{expandIcon:(0,s.jsx)(M,{severity:X}),className:Q.summary,children:[(0,s.jsx)(B,{severity:X}),(0,s.jsx)(f.A,{className:Q.summaryText,variant:"subtitle1",children:Y==="markdown"?(0,s.jsx)(h.h,{content:J,className:Q.markdownContent}):J})]}),(K||dt)&&(0,s.jsx)(g.A,{children:(0,s.jsxs)(u.A,{container:!0,children:[K&&(0,s.jsx)(u.A,{item:!0,xs:12,children:(0,s.jsx)(f.A,{className:Q.message,variant:"body1",children:K})}),dt&&(0,s.jsx)(u.A,{item:!0,xs:12,className:Q.details,children:dt})]})})]})}},10795:(H,S,t)=>{"use strict";t.d(S,{l:()=>g});var s=t(72427),a=t(65461),A=t(10315),p=t(87849);const b=()=>{const{t:u}=(0,p.i)(A.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 g(){const d=(0,s.Q2)().get(a.U)?.getOptionalConfig("app.support"),v=b();return d?{url:d.getString("url"),items:d.getConfigArray("items").flatMap(h=>({title:h.getString("title"),icon:h.getOptionalString("icon"),links:(h.getOptionalConfigArray("links")??[]).flatMap(x=>({url:x.getString("url"),title:x.getOptionalString("title")??""}))}))}:v}},31129:(H,S,t)=>{"use strict";t.d(S,{Gg:()=>M,KG:()=>I,NT:()=>O,z9:()=>p});var s=t(31085),a=t(82266),A=t(27799);function p(D){const{id:$,Fallback:k=A.A,...X}=D,Y=(0,a.n)().getSystemIcon($)??k;return(0,s.jsx)(Y,{...X})}function b(D){return _jsx(p,{id:"brokenImage",...D})}function g(D){return _jsx(p,{id:"catalog",...D})}function u(D){return _jsx(p,{id:"chat",...D})}function f(D){return _jsx(p,{id:"dashboard",...D})}function d(D){return _jsx(p,{id:"docs",...D})}function v(D){return _jsx(p,{id:"email",...D})}function h(D){return _jsx(p,{id:"github",...D})}function x(D){return _jsx(p,{id:"group",...D})}function O(D){return(0,s.jsx)(p,{id:"help",...D})}function P(D){return _jsx(p,{id:"user",...D})}function B(D){return _jsx(p,{id:"warning",...D})}function M(D){return(0,s.jsx)(p,{id:"star",...D})}function I(D){return(0,s.jsx)(p,{id:"unstarred",...D})}},26280:(H,S,t)=>{"use strict";t.d(S,{U:()=>g});var s=t(31085),a=t(58837),A=t(53373),p=t.n(A);const b=(0,a.A)(u=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:u.spacing(3),paddingBottom:u.spacing(3),paddingLeft:u.spacing(2),paddingRight:u.spacing(2),[u.breakpoints.up("sm")]:{paddingLeft:u.spacing(3),paddingRight:u.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function g(u){const{className:f,stretch:d,noPadding:v,children:h,...x}=u,O=b();return(0,s.jsx)("article",{...x,className:p()(O.root,f,{[O.stretch]:d,[O.noPadding]:v}),children:h})}},59428:(H,S,t)=>{"use strict";t.d(S,{d:()=>d});var s=t(31085),a=t(10394),A=t(58837),p=t(72501),b=t(93285);const g=v=>(0,A.A)(h=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:h.spacing(2),textAlign:v.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:h.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),u=({title:v,className:h})=>(0,s.jsx)(p.A,{variant:"h4",component:"h2",className:h,"data-testid":"header-title",children:v}),f=({description:v,className:h})=>v?(0,s.jsx)(p.A,{variant:"body2",className:h,"data-testid":"header-description",children:v}):null;function d(v){const{description:h,title:x,titleComponent:O=void 0,children:P,descriptionComponent:B=void 0,textAlign:M="left"}=v,I=g({textAlign:M})(),D=O||(0,s.jsx)(u,{title:x,className:I.title}),$=B||(0,s.jsx)(f,{description:h,className:I.description});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.m,{title:x}),(0,s.jsxs)(a.A,{className:I.container,children:[(0,s.jsxs)(a.A,{className:I.leftItemsBox,children:[D,$]}),(0,s.jsx)(a.A,{className:I.rightItemsBox,children:P})]})]})}},12173:(H,S,t)=>{"use strict";t.d(S,{M:()=>D});var s=t(31085),a=t(42899),A=t(58837),p=t(72501),b=t(18690),g=t(72072),u=t(10795);const f=t.p+"static/mic-drop.fe3ef4d0.svg",d=(0,A.A)($=>({micDrop:{maxWidth:"60%",bottom:$.spacing(2),right:$.spacing(2),[$.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:$.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),v=()=>{const $=d();return(0,s.jsx)("img",{src:f,className:$.micDrop,alt:"Girl dropping mic from her hands"})};var h=t(14041),x=t(77310),O=t(87849),P=t(10315);const B=(0,A.A)($=>({title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function M($){const{stack:k}=$,X=B(),{t:z}=(0,O.i)(P.O),[Y,K]=(0,h.useState)(!1);return Y?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{variant:"h6",className:X.title,children:(0,s.jsx)(g.N_,{to:"#",onClick:()=>K(!1),children:z("errorPage.showLessDetails")})}),(0,s.jsx)(x.z,{text:k,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,s.jsx)(p.A,{variant:"h6",className:X.title,children:(0,s.jsx)(g.N_,{to:"#",onClick:()=>K(!0),children:z("errorPage.showMoreDetails")})})}const I=(0,A.A)($=>({container:{padding:$.spacing(8),[$.breakpoints.down("xs")]:{padding:$.spacing(2)}},title:{paddingBottom:$.spacing(5),[$.breakpoints.down("xs")]:{paddingBottom:$.spacing(4),fontSize:$.typography.h3.fontSize}},subtitle:{color:$.palette.textSubtle}}),{name:"BackstageErrorPage"});function D($){const{status:k="",statusMessage:X,additionalInfo:z,supportUrl:Y,stack:K}=$,dt=I(),G=(0,b.Zp)(),Q=(0,u.l)(),{t:J}=(0,O.i)(P.O);return(0,s.jsxs)(a.A,{container:!0,className:dt.container,children:[(0,s.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,s.jsx)(p.A,{"data-testid":"error",variant:"body1",className:dt.subtitle,children:J("errorPage.subtitle",{status:k,statusMessage:X})}),(0,s.jsx)(p.A,{variant:"body1",className:dt.subtitle,children:z}),(0,s.jsx)(p.A,{variant:"h2",className:dt.title,children:J("errorPage.title")}),(0,s.jsxs)(p.A,{variant:"h6",className:dt.title,children:[(0,s.jsx)(g.N_,{to:"#","data-testid":"go-back-link",onClick:()=>G(-1),children:J("errorPage.goBack")}),"... or please"," ",(0,s.jsx)(g.N_,{to:Y||Q.url,children:"contact support"})," if you think this is a bug."]}),K&&(0,s.jsx)(M,{stack:K})]}),(0,s.jsx)(v,{})]})}},69814:(H,S,t)=>{"use strict";t.d(S,{Y:()=>G});var s=t(31085),a=t(72427),A=t(65461),p=t(10394),b=t(42899),g=t(58837),u=t(71677),f=t(72501),d=t(93285),v=t(72072),h=t(45634),x=t(58007),O=t(8109),P=t(55197),B=t(87051),M=t(14041);const I=(0,B.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(f.A),D=(0,B.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(p.A),$=(0,B.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(p.A);function k(Q){const{children:J,...ct}=Q,[pt,yt]=(0,M.useState)(null),xt=M.Children.toArray(J),[Pt,Rt,...ut]=xt,lt=ut.length?ut.pop():xt[xt.length-1],bt=xt.length>3,gt=it=>{yt(it.currentTarget)},Ot=()=>{yt(null)},Tt=!!pt;return(0,s.jsxs)(M.Fragment,{children:[(0,s.jsxs)(h.A,{"aria-label":"breadcrumb",...ct,children:[xt.length>1&&(0,s.jsx)(D,{clone:!0,children:Pt}),xt.length>2&&(0,s.jsx)(D,{clone:!0,children:Rt}),bt&&(0,s.jsx)(I,{onClick:gt,children:"..."}),(0,s.jsx)($,{children:lt})]}),(0,s.jsx)(P.Ay,{open:Tt,anchorEl:pt,onClose:Ot,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,s.jsx)(x.A,{children:ut.map((it,ft)=>(0,s.jsx)(O.A,{button:!0,children:(0,s.jsx)(D,{clone:!0,children:it})},ft))})})]})}var X=t(73524);const z=(0,g.A)(Q=>({header:{gridArea:"pageHeader",padding:Q.spacing(3),width:"100%",boxShadow:Q.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:Q.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[Q.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:Q.page.fontColor,wordBreak:"break-word",fontSize:Q.typography.h3.fontSize,marginBottom:0},subtitle:{color:Q.page.fontColor,opacity:.8,display:"inline-block",marginTop:Q.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:Q.spacing(1),color:Q.page.fontColor},breadcrumb:{color:Q.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-Q.spacing(.3),marginBottom:Q.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-Q.spacing(.3),marginBottom:Q.spacing(.3)}}),{name:"BackstageHeader"}),Y=({type:Q,typeLink:J,classes:ct,pageTitle:pt})=>Q?J?(0,s.jsxs)(k,{className:ct.breadcrumb,children:[(0,s.jsx)(v.N_,{to:J,children:Q}),(0,s.jsx)(f.A,{children:pt})]}):(0,s.jsx)(f.A,{className:ct.type,children:Q}):null,K=({pageTitle:Q,classes:J,tooltip:ct})=>{const{contentRef:pt}=(0,X.H)(),yt=(0,s.jsx)(f.A,{ref:pt,tabIndex:-1,className:J.title,variant:"h1",children:Q});return ct?(0,s.jsx)(u.Ay,{title:ct,placement:"top-start",children:yt}):yt},dt=({classes:Q,subtitle:J})=>J?typeof J!="string"?(0,s.jsx)(s.Fragment,{children:J}):(0,s.jsx)(f.A,{className:Q.subtitle,variant:"subtitle2",component:"span",children:J}):null;function G(Q){const{children:J,pageTitleOverride:ct,style:pt,subtitle:yt,title:xt,tooltip:Pt,type:Rt,typeLink:ut}=Q,lt=z(),gt=(0,a.gf)(A.U).getOptionalString("app.title")||"Backstage",Ot=ct||xt,Tt=xt||ct,it=`${Ot} | %s | ${gt}`,ft=`${Ot} | ${gt}`;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.m,{titleTemplate:it,defaultTitle:ft}),(0,s.jsxs)("header",{style:pt,className:lt.header,children:[(0,s.jsxs)(p.A,{className:lt.leftItemsBox,children:[(0,s.jsx)(Y,{classes:lt,type:Rt,typeLink:ut,pageTitle:Tt}),(0,s.jsx)(K,{classes:lt,pageTitle:Tt,tooltip:Pt}),(0,s.jsx)(dt,{classes:lt,subtitle:yt})]}),(0,s.jsx)(b.A,{container:!0,className:lt.rightItemsBox,spacing:4,children:J})]})]})}},24504:(H,S,t)=>{"use strict";t.d(S,{Y:()=>u});var s=t(31085),a=t(58837),A=t(50868),p=t(53373),b=t.n(p);const g=(0,a.A)(f=>({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",[f.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function u(f){const{themeId:d,className:v,children:h}=f,x=g();return(0,s.jsx)(A.A,{theme:O=>({...O,page:O.getPageTheme({themeId:d})}),children:(0,s.jsx)("main",{className:b()(x.root,v),children:h})})}},27155:(H,S,t)=>{"use strict";t.d(S,{d:()=>p});var s=t(31085),a=t(69814),A=t(24504);function p(b){const{themeId:g,children:u,...f}=b;return(0,s.jsxs)(A.Y,{themeId:g,children:[(0,s.jsx)(a.Y,{...f}),u]})}},73524:(H,S,t)=>{"use strict";t.d(S,{G:()=>x,H:()=>O});var s=t(31085),a=t(10394),A=t(58837),p=t(5893),b=t(14041),g=t(72664),u=function(P){return P.SIDEBAR_PIN_STATE="sidebarPinState",P}(u||{});const f={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 d=t(34435);const v=(0,A.A)(P=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[P.breakpoints.up("sm")]:{paddingLeft:B=>B.isPinned?B.sidebarConfig.drawerWidthOpen:B.sidebarConfig.drawerWidthClosed},[P.breakpoints.down("xs")]:{paddingBottom:B=>B.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),h=(0,b.createContext)({content:{contentRef:void 0}});function x(P){const[B,M]=(0,b.useState)(()=>f.getSidebarPinState()),{sidebarConfig:I}=(0,b.useContext)(g.yY),D=(0,b.useRef)(null),$=(0,b.useMemo)(()=>({content:{contentRef:D}}),[D]);(0,b.useEffect)(()=>{f.setSidebarPinState(B)},[B]);const k=(0,p.A)(Y=>Y.breakpoints.down("xs"),{noSsr:!0}),X=()=>M(!B),z=v({isPinned:B,sidebarConfig:I});return(0,s.jsx)(d.qj,{value:{isPinned:B,toggleSidebarPinState:X,isMobile:k},children:(0,s.jsx)(h.Provider,{value:$,children:(0,s.jsx)(a.A,{className:z.root,children:P.children})})})}function O(){const{content:P}=(0,b.useContext)(h);return{focusContent:(0,b.useCallback)(()=>{P?.contentRef?.current?.focus()},[P]),contentRef:P?.contentRef}}},34435:(H,S,t)=>{"use strict";t.d(S,{Ut:()=>d,qj:()=>f});var s=t(31085),a=t(43836),A=t(10602),p=t(14041);const b={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},g=(0,p.createContext)(b),u=(0,a.tK)("sidebar-pin-state-context");function f(v){const{children:h,value:x}=v;return(0,s.jsx)(g.Provider,{value:x,children:(0,s.jsx)(u.Provider,{value:(0,A.B)({1:x}),children:h})})}const d=()=>{const v=(0,p.useContext)(u),h=(0,p.useContext)(g);if(v===void 0)return h||b;const x=v.atVersion(1);if(x===void 0)throw new Error("No context found for version 1.");return x}},72664:(H,S,t)=>{"use strict";t.d(S,{Rv:()=>g,U1:()=>h,hC:()=>b,i8:()=>f,yY:()=>v});var s=t(14041);const a=72,A=24,p=18,b={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-A*2,iconPadding:A,selectedIndicatorWidth:3,userBadgePadding:p,userBadgeDiameter:a-p*2,mobileSidebarHeight:56},g=x=>({...b,...x,iconContainerWidth:b.drawerWidthClosed,iconSize:b.drawerWidthClosed-b.iconPadding*2,userBadgeDiameter:b.drawerWidthClosed-b.userBadgePadding*2}),u={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:b.defaultOpenDelayMs+200},f=x=>({...u,...x}),d="@backstage/core/sidebar-intro-dismissed",v=(0,s.createContext)({sidebarConfig:b,submenuConfig:u}),h=(0,s.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(H,S,t)=>{"use strict";t.d(S,{O:()=>a});var s=t(93184);const a=(0,s.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
2
- 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 }} newer message)",message_other:"({{ count }} newer messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."}}})},25862:(H,S,t)=>{"use strict";t.d(S,{Ig:()=>u,pn:()=>g});var s=t(31085),a=t(43836),A=t(10602),p=t(14041);const b=(0,a.tK)("analytics-context"),g=()=>{const d=(0,p.useContext)(b);if(d===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const v=d.atVersion(1);if(v===void 0)throw new Error("No context found for version 1.");return v},u=d=>{const{attributes:v,children:h}=d,O={...g(),...v},P=(0,A.B)({1:O});return(0,s.jsx)(b.Provider,{value:P,children:h})};function f(d,v){const h=x=>_jsx(u,{attributes:v,children:_jsx(d,{...x})});return h.displayName=`WithAnalyticsContext(${d.displayName||d.name||"Component"})`,h}},67237:(H,S,t)=>{"use strict";t.d(S,{J:()=>p,t:()=>A});var s=t(63544);const a=(0,s.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),A="_ROUTABLE-EXTENSION-RENDERED";class p{analyticsApi;context;constructor(g,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=g,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(g){this.context=g}captureEvent(g,u,{value:f,attributes:d}={}){const{_routeNodeType:v,...h}=this.context;if(g===A){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...h,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(x){console.warn("Error during analytics event capture. %o",x)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(g==="navigate"&&v==="gathered"&&h.pluginId==="root"){a.mostRecentGatheredNavigation={action:g,subject:u,value:f,attributes:d,context:h};return}try{this.analyticsApi.captureEvent({action:g,subject:u,value:f,attributes:d,context:h})}catch(x){console.warn("Error during analytics event capture. %o",x)}}}},93368:(H,S,t)=>{"use strict";t.d(S,{s:()=>u});var s=t(25862),a=t(72427),A=t(99303),p=t(14041),b=t(67237);function g(){try{return(0,a.gf)(A.c)}catch{return{captureEvent:()=>{}}}}function u(){const f=(0,p.useRef)(null),d=(0,s.pn)(),v=g();function h(){return f.current===null&&(f.current=new b.J(v)),f.current}const x=h();return x.setContext(d),x}},36017:(H,S,t)=>{"use strict";t.d(S,{k:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.alert"})},99303:(H,S,t)=>{"use strict";t.d(S,{c:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.analytics"})},65461:(H,S,t)=>{"use strict";t.d(S,{U:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.config"})},57405:(H,S,t)=>{"use strict";t.d(S,{I:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.discovery"})},39837:(H,S,t)=>{"use strict";t.d(S,{m:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.error"})},63636:(H,S,t)=>{"use strict";t.d(S,{B:()=>A,S:()=>a});var s=t(55309),a=function(p){return p[p.None=0]="None",p[p.Active=1]="Active",p}({});const A=(0,s.y)({id:"core.featureflags"})},70795:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.fetch"})},16009:(H,S,t)=>{"use strict";t.d(S,{K:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.identity"})},56038:(H,S,t)=>{"use strict";t.d(S,{J:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.translation"})},55309:(H,S,t)=>{"use strict";t.d(S,{y:()=>a});class s{config;constructor(p){if(this.config=p,!p.id.split(".").flatMap(g=>g.split("-")).every(g=>g.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${p.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function a(A){return new s(A)}},12935:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(a,A){return"id"in a?{api:a,deps:{},factory:()=>A}:a}},72427:(H,S,t)=>{"use strict";t.d(S,{Q2:()=>p,gf:()=>b});var s=t(31085),a=t(43836),A=t(97142);function p(){const u=(0,a.qO)("api-context");if(!u)throw new A.EH("API context is not available");const f=u.atVersion(1);if(!f)throw new A.EH("ApiContext v1 not available");return f}function b(u){const d=p().get(u);if(!d)throw new A.EH(`No implementation available for ${u}`);return d}function g(u){return function(d){const v=x=>{const O=p(),P={};for(const B in u)if(u.hasOwnProperty(B)){const M=u[B],I=O.get(M);if(!I)throw new NotImplementedError(`No implementation available for ${M}`);P[B]=I}return _jsx(d,{...x,...P})},h=d.displayName||d.name||"Component";return v.displayName=`withApis(${h})`,v}}},82266:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(43836);const a=()=>{const A=(0,s.qO)("app-context");if(!A)throw new Error("App context is not available");const p=A.atVersion(1);if(!p)throw new Error("AppContext v1 not available");return p}},19402:(H,S,t)=>{"use strict";t.d(S,{E:()=>b,h:()=>p});var s=t(63544);const a=(0,s.Q)("component-data-store",()=>new WeakMap),A="__backstage_data";function p(g,u,f){const d=g;let v=d[A]??a.get(g);if(v||(v={map:new Map},Object.defineProperty(d,A,{enumerable:!1,configurable:!0,writable:!1,value:v}),a.set(g,v)),v.map.has(u)){const h=g.displayName||g.name;throw new Error(`Attempted to attach duplicate data "${u}" to component "${h}"`)}v.map.set(u,f)}function b(g,u){if(!g)return;const f=g.type;if(!f)return;const d=f[A]??a.get(f);if(d)return d.map.get(u)}},88758:(H,S,t)=>{"use strict";t.d(S,{NC:()=>x,zZ:()=>O,QJ:()=>h});var s=t(31085),a=t(14041),A=t(93368),p=t(25862),b=t(82266),g=t(9222),u=t(19402);class f extends a.Component{static getDerivedStateFromError(B){return{error:B}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:B}=this.state,{app:M,plugin:I}=this.props,{ErrorBoundaryFallback:D}=M.getComponents();return B?(0,s.jsx)(D,{error:B,resetError:this.handleErrorReset,plugin:I}):this.props.children}}var d=t(67237),v=t(97142);function h(P){const{component:B,mountPoint:M,name:I}=P;return O({component:{lazy:()=>B().then(D=>{const $=X=>{const z=(0,A.s)();try{(0,g.S)(M)}catch(Y){if(typeof Y=="object"&&Y!==null){const{message:K}=Y;if(typeof K=="string"&&K.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${M} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw Y}return(0,a.useEffect)(()=>{z.captureEvent(d.t,"")},[z]),(0,s.jsx)(D,{...X})},k=I||D.displayName||D.name||"LazyComponent";return $.displayName=`RoutableExtension(${k})`,$})},data:{"core.mountPoint":M},name:I})}function x(P){const{component:B,name:M}=P;return O({component:B,name:M})}function O(P){const{data:B={},name:M}=P;M||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let I;if("lazy"in P.component){const $=P.component.lazy;I=(0,a.lazy)(()=>$().then(k=>({default:k}),k=>{const X=M?` of the ${M} extension`:"";throw new v.HK(`Failed lazy loading${X}, try to reload the page`,k)}))}else I=P.component.sync;const D=M||I.displayName||I.name||"Component";return{expose($){const k=X=>{const z=(0,b.n)(),{Progress:Y}=z.getComponents(),K=B?.["core.mountPoint"];return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(Y,{}),children:(0,s.jsx)(f,{app:z,plugin:$,children:(0,s.jsx)(p.Ig,{attributes:{pluginId:$.getId(),...M&&{extension:M},...K&&{routeRef:K.id}},children:(0,s.jsx)(I,{...X})})})})};(0,u.h)(k,"core.plugin",$),(0,u.h)(k,"core.extensionName",M);for(const[X,z]of Object.entries(B))(0,u.h)(k,X,z);return k.displayName=`Extension(${D})`,k}}}},82442:(H,S,t)=>{"use strict";t.d(S,{O:()=>u});var s=t(14041),a=t(19402),A=t(72427),p=t(63636);function b(f,d,v,h){return s.Children.toArray(f).flatMap(x=>{if(!(0,s.isValidElement)(x))return[];if(x.type===s.Fragment)return b(x.props.children,d,v,h);if((0,a.E)(x,"core.featureFlagged")){const O=x.props;return("with"in O?d.isActive(O.with):!d.isActive(O.without))?b(x.props.children,d,v,h):[]}if(v===void 0||v(x))return[x];if(h)throw new Error(h);return b(x.props.children,d,v,h)})}class g{node;featureFlagsApi;constructor(d,v){this.node=d,this.featureFlagsApi=v}selectByComponentData(d){const v=b(this.node,this.featureFlagsApi,h=>(0,a.E)(h,d.key)!==void 0,d.withStrictError);return new g(v,this.featureFlagsApi)}findComponentData(d){return b(this.node,this.featureFlagsApi,h=>(0,a.E)(h,d.key)!==void 0).map(h=>(0,a.E)(h,d.key)).filter(h=>h!==void 0)}getElements(){return b(this.node,this.featureFlagsApi)}}function u(f,d,v=[]){const h=(0,A.gf)(p.B),x=new g(f,h);return(0,s.useMemo)(()=>d(x),[f,...v])}},9803:(H,S,t)=>{"use strict";t.d(S,{i:()=>a});class s{config;constructor(p){this.config=p}getId(){return this.config.id}getApis(){return this.config.apis??[]}getFeatureFlags(){return this.config.featureFlags?.slice()??[]}get routes(){return this.config.routes??{}}get externalRoutes(){return this.config.externalRoutes??{}}provide(p){return p.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(A){return new s(A)}},34569:(H,S,t)=>{"use strict";t.d(S,{H:()=>A});var s=t(59598);class a{id;params;[p=s.b];constructor(g,u){this.id=g,this.params=u,this[p]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function A(b){return new a(b.id,b.params??[])}var p},59598:(H,S,t)=>{"use strict";t.d(S,{b:()=>a});var s=t(63544);const a=(0,s.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,S,t)=>{"use strict";t.d(S,{S:()=>p});var s=t(14041),a=t(18690),A=t(43836);function p(b){const{pathname:g}=(0,a.zy)(),u=(0,A.qO)("routing-context");if(!u)throw new Error("Routing context is not available");const f=u.atVersion(1),d=(0,s.useMemo)(()=>f&&f.resolve(b,{pathname:g}),[f,b,g]);if(!u)throw new Error("useRouteRef used outside of routing context");if(!f)throw new Error("RoutingContext v1 not available");const v="optional"in b&&b.optional;if(!d&&!v)throw new Error(`No path for ${b}`);return d}},93184:(H,S,t)=>{"use strict";t.d(S,{h:()=>p,v:()=>b});var s=t(99833);function a(g){const u=new Array;function f(d,v){for(const[h,x]of Object.entries(d))typeof x=="string"?u.push([v+h,x]):f(x,`${v}${h}.`)}return f(g,""),Object.fromEntries(u)}class A{#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 p(g){const u=new A(g);return g.translations&&u.setDefaultResource((0,s.o)({ref:u,translations:g.translations})),u}function b(g){const u=g;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:()=>s,o:()=>a});function s(A){const p=A;if(p.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${p.$$type}'`);if(p.version!=="v1")throw new Error(`Invalid translation resource, bad version '${p.version}'`);return p}function a(A){return{$$type:"@backstage/TranslationResource",version:"v1",id:A.ref.id,resources:Object.entries(A.translations).map(([p,b])=>({language:p,loader:()=>b().then(g=>{const u=g.default;return{messages:u?.$$type==="@backstage/TranslationMessages"?u.messages:u}})}))}}},87849:(H,S,t)=>{"use strict";t.d(S,{i:()=>g});var s=t(14041),a=t(72427),A=t(39837),p=t(56038);const b=new WeakSet,g=u=>{const f=(0,a.gf)(A.m),d=(0,a.gf)(p.J),[v,h]=(0,s.useState)(()=>d.getTranslation(u)),x=(0,s.useMemo)(()=>d.translation$(u),[d,u]),O=(0,s.useCallback)(B=>{if(!b.has(u)){const M=`Failed to load translation resource '${u.id}'; caused by ${B}`;console.error(M),f.post(new Error(M)),b.add(u)}},[f,u]);(0,s.useEffect)(()=>{const B=x.subscribe({next(M){M.ready&&h(M)},error(M){O(M)}});return()=>{B.unsubscribe()}},[x,O]);const P=(0,s.useRef)(!0);if((0,s.useEffect)(()=>{P.current?P.current=!1:h(d.getTranslation(u))},[d,u]),!v.ready)throw new Promise(B=>{const M=x.subscribe({next(I){I.ready&&(M.unsubscribe(),B())},error(I){M.unsubscribe(),O(I),B()}})});return{t:v.t}}},70835:(H,S,t)=>{"use strict";t.d(S,{o:()=>A});var s=t(59750);async function a(p){try{const b=await p.text();if(b){if(p.headers.get("content-type")?.startsWith("application/json"))try{const g=JSON.parse(b);if(g.error&&g.response)return g}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}, ${b}`},response:{statusCode:p.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${p.status} ${p.statusText}`},response:{statusCode:p.status}}}class A extends Error{response;body;cause;statusCode;statusText;static async fromResponse(b){const g=await a(b),u=g.response.statusCode||b.status,f=b.statusText,d=`Request failed with ${u} ${f}`,v=(0,s.cy)(g.error);return new A({message:d,response:b,data:g,cause:v,statusCode:u,statusText:f})}constructor(b){super(b.message),this.name="ResponseError",this.response=b.response,this.body=b.data,this.cause=b.cause,this.statusCode=b.statusCode,this.statusText=b.statusText}}},93007:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(A){if(typeof A!="object"||A===null||Array.isArray(A))return!1;const p=A;return!(typeof p.name!="string"||p.name===""||typeof p.message!="string")}function a(A){if(typeof A!="object"||A===null||Array.isArray(A))throw new Error(`Encountered invalid error, not an object, got '${A}'`);const p=A;if(typeof p.name!="string"||p.name==="")throw new Error(`Encountered error object without a name, got '${A}'`);if(typeof p.message!="string")throw new Error(`Encountered error object without a message, got '${A}'`)}},97142:(H,S,t)=>{"use strict";t.d(S,{HK:()=>x,m_:()=>u,EH:()=>v});var s=t(93007),a=t(59750);class A extends Error{cause;constructor(P,B){let M=P;if(B!==void 0){const I=(0,a.M5)(B);M?M+=`; caused by ${I}`:M=`caused by ${I}`}super(M),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,s.b)(B)?B:void 0}}class p extends null{name="InputError"}class b extends null{name="AuthenticationError"}class g extends null{name="NotAllowedError"}class u extends A{name="NotFoundError"}class f extends null{name="ConflictError"}class d extends null{name="NotModifiedError"}class v extends A{name="NotImplementedError"}class h extends null{}class x extends A{constructor(P,B){super(P,B),this.name=(0,s.b)(B)?B.name:"Error"}}},59750:(H,S,t)=>{"use strict";t.d(S,{M5:()=>g,cy:()=>b});var s=t(69655),a=t.n(s),A=t(93007);function p(u,f){const v={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(u)};return f?.includeStack||(delete v.stack,v.cause&&typeof v.cause=="object"&&"stack"in v.cause&&delete v.cause.stack),v}function b(u){const f=(0,s.deserializeError)(u);return u.stack||(f.stack=void 0),f}function g(u){if((0,A.b)(u)){const f=String(u);return f!=="[object Object]"?f:`${u.name}: ${u.message}`}return`unknown error '${u}'`}},96726:(H,S,t)=>{"use strict";t.d(S,{L:()=>Ae,Y:()=>cn});var s=t(59869);const a="amazonaws.com";function A(w){const l=w.getOptionalString("endpoint"),E=w.getOptionalBoolean("s3ForcePathStyle")??!1;let R,Z;if(l){try{const Vt=new URL(l);R=Vt.host,Z=Vt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(Z!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else R=a;const q=w.getOptionalString("accessKeyId"),st=w.getOptionalString("secretAccessKey")?.trim(),Mt=w.getOptionalString("roleArn"),zt=w.getOptionalString("externalId");return{host:R,endpoint:l,s3ForcePathStyle:E,accessKeyId:q,secretAccessKey:st,roleArn:Mt,externalId:zt}}function p(w){const l=w.map(A);return l.some(E=>E.host===a)||l.push({host:a}),l}class b{integrationConfig;static factory=({config:l})=>{const E=p(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,s.oS)(E.map(R=>new b(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,s.ku)(l)}resolveEditUrl(l){return l}}const g="console.aws.amazon.com";function u(w){const l=w.getOptionalString("accessKeyId"),E=w.getOptionalString("secretAccessKey")?.trim(),R=w.getOptionalString("roleArn"),Z=w.getOptionalString("externalId"),q=w.getString("region");return{host:w.getOptionalString("host")||`${q}.${g}`,accessKeyId:l,secretAccessKey:E,roleArn:R,externalId:Z,region:q}}function f(w){return w.map(u)}class d{integrationConfig;static factory=({config:l})=>{const E=f(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,s.oS)(E.map(R=>new d(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,s.ku)(l)}resolveEditUrl(l){const R=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!R)throw new Error("");const[,Z]=R;return v(l,Z,"edit")}}function v(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 h="GB";class x{static fromRepoUrl(l){const E=new URL(l);let R,Z,q;const st=E.pathname.split("/").map(oe=>decodeURIComponent(oe));if(st[2]==="_git"?(R=st[1],Z=q=st[3]):st[3]==="_git"?(R=st[1],Z=st[2],q=st[4]):st[4]==="_git"&&(R=`${st[1]}/${st[2]}`,Z=st[3],q=st[5]),!R||!Z||!q)throw new Error("Azure URL must point to a git repository");const Mt=E.searchParams.get("path")??void 0;let zt;const Vt=E.searchParams.get("version");if(Vt){if(Vt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");zt=Vt.slice(2)}return new x(E.origin,R,Z,q,Mt,zt)}#t;#e;#n;#s;#o;#r;constructor(l,E,R,Z,q,st){this.#t=l,this.#e=E,this.#n=R,this.#s=Z,this.#o=q,this.#r=st}#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.#o&&l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",h+this.#r),l.toString()}toFileUrl(){if(!this.#o)throw new Error("Azure URL must point to a specific path to be able to download a file");const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("api-version","6.0"),l.searchParams.set("path",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toArchiveUrl(){const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("recursionLevel","full"),l.searchParams.set("download","true"),l.searchParams.set("api-version","6.0"),this.#o&&l.searchParams.set("scopePath",this.#o),this.#r&&l.searchParams.set("version",this.#r),l.toString()}toCommitsUrl(){const l=this.#a(this.#e,this.#n,"_apis","git","repositories",this.#s,"commits");return l.searchParams.set("api-version","6.0"),this.#r&&l.searchParams.set("searchCriteria.itemVersion.version",this.#r),l.toString()}getOwner(){return this.#e}getProject(){return this.#n}getRepo(){return this.#s}getPath(){return this.#o}getRef(){return this.#r}}const O="dev.azure.com",P=["clientId","clientSecret","tenantId","personalAccessToken"],B=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function M(w){for(const l of B.entries()){const[E,R]=l,Z=P.filter(q=>!R.includes(q));if(R.every(q=>w[q]!==void 0)&&Z.every(q=>w[q]===void 0))return{kind:E,organizations:w.organizations,...R.reduce((q,st)=>(q[st]=w[st],q),{})}}throw new Error("is not a valid credential")}function I(w){const l=w.getOptionalString("host")??O;let E=w.getOptionalConfigArray("credentials")?.map(q=>({organizations:q.getOptionalStringArray("organizations"),personalAccessToken:q.getOptionalString("personalAccessToken")?.trim(),tenantId:q.getOptionalString("tenantId"),clientId:q.getOptionalString("clientId"),clientSecret:q.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 q=[{personalAccessToken:R}];E=E?.concat(q)??q}if(w.getOptional("credential")!==void 0){const q=[{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(q)??q}if(!(0,s.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let Z;if(E!==void 0){const q=E?.reduce((st,Mt,zt)=>{let Vt;try{M(Mt)}catch(oe){Vt=oe.message}return Vt!==void 0&&st.push(`credential at position ${zt+1} ${Vt}`),st},Array.of()).concat(Object.entries(E.filter(st=>st.organizations!==void 0&&st.organizations.length>0).reduce((st,Mt,zt)=>(Mt.organizations?.forEach(Vt=>{st[Vt]||(st[Vt]=[]),st[Vt].push(zt+1)}),st),{})).filter(([st,Mt])=>Mt.length>1).reduce((st,[Mt,zt])=>(st.push(`organization ${Mt} is specified multiple times in credentials at positions ${zt.slice(0,zt.length-1).join(", ")} and ${zt[zt.length-1]}`),st),Array.of()));if(q?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${q.join("; ")}`);if(Z=E.map(st=>M(st)),Z.some(st=>st.kind!=="PersonalAccessToken")&&l!==O)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${O}`);if(Z.filter(st=>st.organizations===void 0||st.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${l}, you cannot specify multiple credentials without organizations`)}return{host:l,credentials:Z,commitSigningKey:w.getOptionalString("commitSigningKey")}}function D(w){const l=w.map(I);return l.some(E=>E.host===O)||l.push({host:O}),l}class ${integrationConfig;static factory=({config:l})=>{const E=D(l.getOptionalConfigArray("integrations.azure")??[]);return(0,s.oS)(E.map(R=>new $(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,s.AY)(E))return E;try{const Z=x.fromRepoUrl(R),q=new URL(R),st=new URL(`https://a.com${Z.getPath()??""}`),Mt=new URL(E,st).pathname;return q.searchParams.set("path",Mt),l.lineNumber&&(q.searchParams.set("line",String(l.lineNumber)),q.searchParams.set("lineEnd",String(l.lineNumber+1)),q.searchParams.set("lineStartColumn","1"),q.searchParams.set("lineEndColumn","1")),q.toString()}catch{return new URL(E,R).toString()}}resolveEditUrl(l){return l}}var k=t(52536),X=t.n(k);const z="bitbucket.org",Y="https://api.bitbucket.org/2.0";function K(w){const l=z,E=Y,R=w.getString("username"),Z=w.getString("appPassword")?.trim();return{host:l,apiBaseUrl:E,username:R,appPassword:Z,commitSigningKey:w.getOptionalString("commitSigningKey")}}function dt(w){const l=w.map(K);return l.length===0&&l.push({host:z,apiBaseUrl:Y}),l}class G{integrationConfig;static factory=({config:l})=>{const E=dt(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,s.oS)(E.map(R=>new G(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,s.ku)(l);if(l.lineNumber){const R=new URL(E);return R.hash=`lines-${l.lineNumber}`,R.toString()}return E}resolveEditUrl(l){const E=X()(l),R=new URL(l);return R.searchParams.set("mode","edit"),R.searchParams.set("at",E.ref),R.toString()}}var Q=t(45250);const J="bitbucket.org",ct="https://api.bitbucket.org/2.0";function pt(w){const l=w.getOptionalString("host")??J;let E=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim(),Z=w.getOptionalString("username"),q=w.getOptionalString("appPassword")?.trim();if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):l===J?E=ct:E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:R,username:Z,appPassword:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function yt(w){const l=w.map(pt);return l.some(E=>E.host===J)||l.push({host:J,apiBaseUrl:ct}),l}class xt{integrationConfig;static factory=({config:l})=>{const E=yt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,s.oS)(E.map(R=>new xt(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,s.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=X()(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 Pt(w){const l=w.getString("host");let E=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim(),Z=w.getOptionalString("username"),q=w.getOptionalString("password");if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:E,token:R,username:Z,password:q,commitSigningKey:w.getOptionalString("commitSigningKey")}}function Rt(w){return w.map(Pt)}class ut{integrationConfig;static factory=({config:l})=>{const E=Rt(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,s.oS)(E.map(R=>new ut(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,s.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 lt(w){const l=w.getString("host");let E=w.getOptionalString("baseUrl"),R=w.getOptionalString("cloneUrl");const Z=w.getOptionalBoolean("disableEditUrl");let q=w.getString("gitilesBaseUrl");const st=w.getOptionalString("username"),Mt=w.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.AY)(E))throw new Error(`Invalid Gerrit integration config, '${E}' is not a valid baseUrl`);if(R&&!(0,s.AY)(R))throw new Error(`Invalid Gerrit integration config, '${R}' is not a valid cloneUrl`);if(!(0,s.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,Q.trimEnd)(E,"/"):E=`https://${l}`,R?R=(0,Q.trimEnd)(R,"/"):R=E,q=(0,Q.trimEnd)(q,"/"),{host:l,baseUrl:E,cloneUrl:R,disableEditUrl:Z,gitilesBaseUrl:q,username:st,password:Mt,commitSigningKey:w.getOptionalString("commitSigningKey")}}function bt(w){return w.map(lt)}var gt=t(1048).hp;const Ot=")]}'";function Tt(w,l){const E=new URL(w.gitilesBaseUrl),R=new URL(l),q=R.pathname.substring(R.pathname.startsWith("/a/")?2:0).replace(E.pathname,"").split("/").filter(_t=>!!_t),st=q.indexOf("+");if(st<=0)throw new Error(`Unable to parse project from url: ${l}`);const Mt=trimStart(q.slice(0,st).join("/"),"/"),zt=q.indexOf("heads");if(zt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const Vt=q[zt+1],oe=q.slice(zt+2).join("/");return{branch:Vt,filePath:oe===""?"/":oe,project:Mt}}function it(w,l){const E=new URL(w.gitilesBaseUrl),R=new URL(l),q=(0,Q.trimStart)(R.pathname.substring(R.pathname.startsWith("/a/")?2:0).replace(E.pathname,""),"/").split("/").filter(ge=>!!ge),st=(0,Q.takeWhile)(q,ge=>ge!=="+");if(st.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Mt=q.slice(st.length+1),zt=(0,Q.join)(st,"/");if(Mt.length>0&&Mt[0]==="HEAD"){const ge=Mt.shift(),ee=(0,Q.join)(Mt,"/");return{project:zt,ref:ge,refType:"head",path:ee||"/",basePath:(0,Q.trimEnd)(l.replace(ee,""),"/")}}if(Mt.length>0&&Mt[0].length===40){const ge=Mt.shift(),ee=(0,Q.join)(Mt,"/");return{project:zt,ref:ge,refType:"sha",path:ee||"/",basePath:(0,Q.trimEnd)(l.replace(ee,""),"/")}}const Vt=(0,Q.join)(Mt,"/"),_t=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(Vt);if(_t){const ge=_t[0];let ee;const{refsReference:Be,ref:me}=_t.groups||{},nn=Vt.replace(ge,"");switch(Be){case"heads":ee="branch";break;case"tags":ee="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:zt,ref:me,refType:ee,path:nn||"/",basePath:(0,Q.trimEnd)(l.replace(nn,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function ft(w,l,E,R){return`${w.gitilesBaseUrl}/${l}/+/refs/heads/${E}/${trimStart(R,"/")}`}function Et(w,l,E,R){return`${w.baseUrl}/admin/repos/edit/repo/${l}/branch/refs/heads/${E}/file/${(0,Q.trimStart)(R,"/")}`}function et(w,l,E,R){const Z=R==="/"||R===""?".tar.gz":`/${R}.tar.gz`;return`${j(w)}/${l}/+archive/refs/heads/${E}${Z}`}function At(w,l){const{path:E,ref:R,project:Z,refType:q}=it(w,l),st=E==="/"||E===""?".tar.gz":`/${E}.tar.gz`;if(q==="branch")return`${j(w)}/${Z}/+archive/refs/heads/${R}${st}`;if(q==="sha")return`${j(w)}/${Z}/+archive/${R}${st}`;throw new Error(`Unsupported gitiles ref type: ${q}`)}function ot(w){return w.password?"/a/":"/"}function j(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(ot(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 V(w,l){const{branch:E,project:R}=Tt(w,l);return`${w.baseUrl}${ot(w)}projects/${encodeURIComponent(R)}/branches/${E}`}function nt(w,l){const{project:E}=Tt(w,l);return`${w.cloneUrl}${ot(w)}${E}`}function St(w,l){const{ref:E,refType:R,path:Z,project:q}=it(w,l);if(R==="branch")return`${w.baseUrl}${ot(w)}projects/${encodeURIComponent(q)}/branches/${E}/files/${encodeURIComponent(Z)}/content`;if(R==="sha")return`${w.baseUrl}${ot(w)}projects/${encodeURIComponent(q)}/commits/${E}/files/${encodeURIComponent(Z)}/content`;throw new Error(`Unsupported gitiles ref type: ${R}`)}function ht(w){return`${w.baseUrl}${ot(w)}projects/`}function Bt(w){const l={};if(!w.password)return l;const E=gt.from(`${w.username}:${w.password}`,"utf8");return l.Authorization=`Basic ${E.toString("base64")}`,{headers:l}}async function Wt(w){const l=await w.text();if(l.startsWith(Ot))try{return JSON.parse(l.slice(Ot.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=bt(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,s.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:Z}=l;let q;if(E.startsWith("/")){const{basePath:st}=it(this.config,R);return st+E}return E?q=new URL(E,R):q=new URL(R),Z&&(q.hash=Z.toString()),q.toString()}resolveEditUrl(l){if(this.config.disableEditUrl)return l;const E=it(this.config,l);return Et(this.config,E.project,E.ref,E.path)}}var Jt=t(36021);const Kt="gitlab.com",te="https://gitlab.com/api/v4";function jt(w){const l=w.getString("host");let E=w.getOptionalString("apiBaseUrl");const R=w.getOptionalString("token")?.trim();let Z=w.getOptionalString("baseUrl");if(E?E=(0,Q.trimEnd)(E,"/"):l===Kt&&(E=te),Z?Z=(0,Q.trimEnd)(Z,"/"):Z=`https://${l}`,(0,s.HO)(l)){if(!E||!(0,s.AY)(E))throw new Error(`Invalid GitLab integration config, '${E}' is not a valid apiBaseUrl`);if(!(0,s.AY)(Z))throw new Error(`Invalid GitLab integration config, '${Z}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:R,apiBaseUrl:E,baseUrl:Z,commitSigningKey:w.getOptionalString("commitSigningKey")}}function Ft(w){const l=w.map(jt);return l.some(E=>E.host===Kt)||l.push({host:Kt,apiBaseUrl:te,baseUrl:`https://${Kt}`}),l}function le(w){let l="";return w.host!==Kt&&(l=new URL(w.baseUrl).pathname),trimEnd(l,"/")}class he{integrationConfig;static factory=({config:l})=>{const E=Ft(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,s.oS)(E.map(R=>new he(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,s.ku)(l)}resolveEditUrl(l){return Yt(l,"edit")}}function Yt(w,l){return w.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function re(w){const l=w.getString("host");let E=w.getOptionalString("baseUrl");const R=w.getOptionalString("username"),Z=w.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(E&&!(0,s.AY)(E))throw new Error(`Invalid Gitea integration config, '${E}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${l}' is not a valid host`);return E?E=(0,Q.trimEnd)(E,"/"):E=`https://${l}`,{host:l,baseUrl:E,username:R,password:Z,commitSigningKey:w.getOptionalString("commitSigningKey")}}var de=t(1048).hp;function Ve(w,l){const E=Ke(w,l);return`${E.url}/${E.owner}/${E.name}/_edit/${E.ref}/${E.path}`}function se(w,l){const E=Ke(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/contents/${E.path}?ref=${E.ref}`}function on(w,l){const E=Ke(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/archive/${E.ref}.tar.gz`}function Te(w,l){const E=Ke(w,l);return`${E.url}/api/v1/repos/${E.owner}/${E.name}/git/commits/${E.ref}`}function De(w){const l={},{username:E,password:R}=w;return R?(E?l.Authorization=`basic ${de.from(`${E}:${R}`).toString("base64")}`:l.Authorization=`token ${R}`,{headers:l}):l}function Ke(w,l){const E=w.baseUrl??`https://${w.host}`;try{const[R,Z,q,st,Mt,zt,...Vt]=l.replace(E,"").split("/"),oe=Vt.join("/").replace(/^\//,"");return{url:E,owner:Z,name:q,ref:zt,path:oe}}catch(R){throw new Error(`Incorrect URL: ${l}, ${R}`)}}class pe{config;static factory=({config:l})=>{const R=(l.getOptionalConfigArray("integrations.gitea")??[]).map(Z=>re(Z));return(0,s.oS)(R.map(Z=>new pe(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return Ve(this.config,l)}}function Ge(w){const l=w.getString("host"),E=w.getOptionalString("token"),R=w.getOptionalString("apiKey");if(!(0,s.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:R,token:E}}function tn(w,l){const E=Ne(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 hn(w,l){const E=Ne(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 an(w,l){const E=Ne(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 Ye(w,l){const E=Ne(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 en(w){const l={},{token:E,apiKey:R}=w;return R?l["x-api-key"]=R:E&&(l.Authorization=`Bearer ${E}`),{headers:l}}function Ne(w,l){const E=`https://${w.host}`;try{const R=new URL(l),Z=R.pathname.split("/").filter(ie=>ie!==""),q=R.pathname.split("/"),st=Z.findIndex(ie=>ie==="account")+1,Mt=Z[st],zt=Z.findIndex(ie=>ie==="orgs"),Vt=zt!==-1?Z[zt+1]:"",oe=Z.findIndex(ie=>ie==="projects"),_t=oe!==-1?Z[oe+1]:"",ge=Z.findIndex((ie,Nt)=>ie==="repos"&&Nt>Math.max(st,zt,oe))+1,ee=Z[ge],Be=q.slice(q.findIndex(ie=>ie==="files"||ie==="edit")+1),me=Be.findIndex(ie=>ie==="~"),nn=Be.slice(0,me).join("/"),ln=me!==-1?Be.slice(me+1).join("/").replace(/^\//,""):"";return{baseUrl:E,accountId:Mt,orgName:Vt,projectName:_t,refString:nn,path:ln,repoName:ee,refDashStr:Be.slice(0,me).join("-"),branch:me!==-1?Be.slice(0,me).join("/"):Be.join("/")}}catch(R){throw new Error(`Incorrect URL: ${l}, ${R}`)}}class ze{config;static factory=({config:l})=>{const R=(l.getOptionalConfigArray("integrations.harness")??[]).map(Z=>Ge(Z));return(0,s.oS)(R.map(Z=>new ze(Z)),Z=>Z.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return tn(this.config,l)}}const Qe="blob.core.windows.net";function Ee(w){const l=w.getOptionalString("endpoint"),E=w.getString("accountName"),R=w.getOptionalString("accountKey")?.trim(),Z=w.getOptionalString("sasToken")?.trim(),q=w.getOptionalString("connectionString")?.trim(),st=w.getOptionalString("endpointSuffix")?.trim();let Mt,zt;if(l){try{const oe=new URL(l);Mt=oe.host,zt=oe.pathname}catch{throw new Error(`invalid azureBlobStorage integration config, endpoint '${l}' is not a valid URL`)}if(zt!=="/")throw new Error(`invalid azureBlobStorage integration config, endpoints cannot contain path, got '${l}'`)}else Mt=Qe;const Vt=w.has("aadCredential")?{clientId:w.getString("aadCredential.clientId"),tenantId:w.getString("aadCredential.tenantId"),clientSecret:w.getString("aadCredential.clientSecret")?.trim()}:void 0;if(R&&Z)throw new Error(`Invalid Azure Blob Storage config for ${E}: Both account key and SAS token cannot be used simultaneously.`);if(Vt&&(R||Z))throw new Error(`Invalid Azure Blob Storage config for ${E}: Cannot use both Azure AD credentials and account keys/SAS tokens for the same account.`);return{host:Mt,endpoint:l,accountName:E,accountKey:R,sasToken:Z,connectionString:q,endpointSuffix:st,aadCredential:Vt}}function Ze(w){const l=w.map(Ee);return l.some(E=>E.host===Qe)||l.push({host:Qe}),l}class He{integrationConfig;static factory=({config:l})=>{const E=Ze(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,s.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,s.ku)(l)}resolveEditUrl(l){return l}}class ke{byType;static fromConfig(l){return new ke({awsS3:b.factory({config:l}),awsCodeCommit:d.factory({config:l}),azureBlobStorage:He.factory({config:l}),azure:$.factory({config:l}),bitbucket:xt.factory({config:l}),bitbucketCloud:G.factory({config:l}),bitbucketServer:ut.factory({config:l}),gerrit:Ut.factory({config:l}),github:Jt.U.factory({config:l}),gitlab:he.factory({config:l}),gitea:pe.factory({config:l}),harness:ze.factory({config:l})})}constructor(l){this.byType=l}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}get azureBlobStorage(){return this.byType.azureBlobStorage}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}get gitea(){return this.byType.gitea}get harness(){return this.byType.harness}list(){return Object.values(this.byType).flatMap(l=>l.list())}byUrl(l){let E=Object.values(this.byType).map(R=>R.byUrl(l)).filter(Boolean);if(E.length>1){const R=E.filter(Z=>!(Z instanceof xt));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,s.ku)(l)}resolveEditUrl(l){const E=this.byUrl(l);return E?E.resolveEditUrl(l):l}}var Me=t(55309);class Ae{static fromConfig(l){return ke.fromConfig(l)}}const cn=(0,Me.y)({id:"integration.scmintegrations"})},36021:(H,S,t)=>{"use strict";t.d(S,{U:()=>f,F:()=>d});var s=t(59869),a=t(45250);const A="github.com",p="https://api.github.com",b="https://raw.githubusercontent.com";function g(v){const h=v.getOptionalString("host")??A;let x=v.getOptionalString("apiBaseUrl"),O=v.getOptionalString("rawBaseUrl");const P=v.getOptionalString("token")?.trim(),B=v.getOptionalConfigArray("apps")?.map(M=>({appId:M.getNumber("appId"),clientId:M.getString("clientId"),clientSecret:M.getString("clientSecret"),webhookSecret:M.getOptionalString("webhookSecret"),privateKey:M.getString("privateKey"),allowedInstallationOwners:M.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,s.HO)(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return x?x=(0,a.trimEnd)(x,"/"):h===A&&(x=p),O?O=(0,a.trimEnd)(O,"/"):h===A&&(O=b),{host:h,apiBaseUrl:x,rawBaseUrl:O,token:P,apps:B}}function u(v){const h=v.map(g);return h.some(x=>x.host===A)||h.push({host:A,apiBaseUrl:p,rawBaseUrl:b}),h}class f{integrationConfig;static factory=({config:h})=>{const x=u(h.getOptionalConfigArray("integrations.github")??[]);return(0,s.oS)(x.map(O=>new f(O)),O=>O.config.host)};constructor(h){this.integrationConfig=h}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return d((0,s.ku)(h),"tree")}resolveEditUrl(h){return d(h,"edit")}parseRateLimitInfo(h){return{isRateLimited:h.status===429||h.status===403&&h.headers.get("x-ratelimit-remaining")==="0"}}}function d(v,h){return v.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(x,O,P,B)=>`//${O}/${P}/${B}/${h}/`)}},59869:(H,S,t)=>{"use strict";t.d(S,{AY:()=>g,HO:()=>b,ku:()=>f,oS:()=>u});var s=t(52536),a=t.n(s),A=t(45250),p=t.n(A);function b(v){const h=new URL("http://example.com");return h.host=v,h.host===v}function g(v){try{return new URL(v),!0}catch{return!1}}function u(v,h){return{list(){return v},byUrl(x){try{const O=typeof x=="string"?new URL(x):x;return v.find(P=>h(P)===O.host)}catch{return}},byHost(x){return v.find(O=>h(O)===x)}}}function f(v){const{url:h,base:x,lineNumber:O}=v;try{return new URL(h),h}catch{}let P;if(h.startsWith("/")){const{href:B,filepath:M}=a()(x);P=new URL(B);const I=(0,A.trimEnd)(P.pathname.substring(0,P.pathname.length-M.length),"/");P.pathname=`${I}${h}`}else P=new URL(h,x);return P.search=new URL(x).search,O&&(P.hash=`L${O}`),P.toString()}function d(v){beforeAll(()=>v.listen({onUnhandledRequest:"error"})),afterAll(()=>v.close()),afterEach(()=>v.resetHandlers())}},71543:(H,S,t)=>{"use strict";var s={};t.r(s),t.d(s,{TechDocsPlugin:()=>b.Ju});var a=t(31085),A=t(25873),p=t(18690),b=t(39278),g=t(8915),u=t(72020),f=t(99730),d=t(64947),v=t(12173),h=t(22020),x=t(68146),O=t(73657);function P({children:r}){return(0,p.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(p.fS,{children:r})}const B=()=>(0,a.jsx)(v.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),M=({step:r,error:e})=>{let n="";return r==="load-config"?n=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(n=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(P,{children:(0,a.jsx)(v.M,{statusMessage:n,stack:e.stack})})},I=({error:r,resetError:e,plugin:n})=>(0,a.jsx)(h.b,{title:`Error in ${n?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(d.A,{variant:"outlined",onClick:e,children:"Retry"})}),D={Progress:x.k,Router:O.Kd,NotFoundErrorPage:B,BootErrorPage:M,ErrorBoundaryFallback:I},$="Invalid discovery URL pattern,";class k{parts;static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),o=n.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${$} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${$} URL must not have a hash`);if(i.search)throw new Error(`${$} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${$} URL must not end with a slash`);return new k(n)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}class X{endpoints;defaultEndpoint;static fromConfig(e,n){const o=n?.pathPattern??"/api/{{ pluginId }}",i=e.getString("backend.baseUrl"),c=e.getOptionalConfigArray("discovery.endpoints")?.flatMap(C=>{const y=typeof C.get("target")=="object"?C.getOptionalString("target.external"):C.getString("target");if(!y)return[];const T=k.compile(y);return C.getStringArray("plugins").map(N=>[N,T])});return new X(new Map(c),k.compile(`${i}${o}`))}constructor(e,n){this.endpoints=e,this.defaultEndpoint=n}async getBaseUrl(e){const n=this.endpoints.get(e);return n?n.getBaseUrl(e):this.defaultEndpoint.getBaseUrl(e)}}var z=t(96403),Y=t.n(z);class K{isClosed=!1;terminatingError;observable=new(Y())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}));subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class dt{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Y())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class G{subject=new K;post(e){this.subject.next(e)}alert$(){return this.subject}}class Q{captureEvent(e){}}class J{alertApi;errorApi;constructor(e,n){this.alertApi=e,this.errorApi=n}post(e,n){return n?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}}class ct{subject=new K;post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}}class pt{static forward(e,n){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,n)})}}const yt=new Map;class xt{namespace;errorApi;constructor(e,n){this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(Y())(o=>(this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}static hasSubscribed=!1;static create(e){return new xt(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[n,o]of yt.entries())e.key?.startsWith(n)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let n,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(n=JSON.parse(i,(c,C)=>(typeof C=="object"&&C!==null&&Object.freeze(C),C)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:o}}forBucket(e){const n=`${this.namespace}/${e}`;return yt.has(n)||yt.set(n,new xt(n,this.errorApi)),yt.get(n)}async set(e,n){localStorage.setItem(this.getKeyName(e),JSON.stringify(n)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return xt.hasSubscribed||(xt.addStorageEventListener(),xt.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const n=e?.slice(`${this.namespace}/`.length);n.includes("/")||this.notifyChanges(decodeURIComponent(n))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const n=this.snapshot(e);for(const o of this.subscribers)o.next(n)}subscribers;observable}function Pt(r){let e=r.baseImplementation||t.g.fetch;const n=[r.middleware??[]].flat().reverse();for(const o of n)e=o.apply(e);return{fetch:e}}class Rt{identityApi;allowUrl;headerName;headerValue;static create(e){const n=ut(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new Rt(e.identityApi,n,o,i)}static getDiscoveryUrlPrefixes(e){return(e.getOptionalConfigArray("discovery.endpoints")||[]).flatMap(o=>{const i=typeof o.get("target")=="object"?o.getString("target.external"):o.getString("target");return o.getStringArray("plugins").map(C=>i.replace(/\{\{\s*pluginId\s*\}\}/g,C))})}constructor(e,n,o,i){this.identityApi=e,this.allowUrl=n,this.headerName=o,this.headerValue=i}apply(e){return async(n,o)=>{const i=new Request(n,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(n,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function ut(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?lt(r.urlPrefixAllowlist):r.config?lt([r.config.getString("backend.baseUrl"),...Rt.getDiscoveryUrlPrefixes(r.config)]):()=>!1}function lt(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(o=>n===o||n.startsWith(`${o}/`))}function bt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class gt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(n,o)=>{const i=new Request(n,o),c="plugin://";if(!i.url.startsWith(c))return e(n,o);const{hostname:C,pathname:y,search:T,hash:N,username:tt,password:mt}=new URL(`http://${i.url.substring(c.length)}`);let at=await this.discoveryApi.getBaseUrl(C);if(tt||mt){const Dt=new URL(at),Gt=`${tt}${mt?`:${mt}`:""}@`;at=`${Dt.protocol}//${Gt}${Dt.host}${Dt.pathname}`}const vt=`${bt(at,y)}${T}${N}`;return e(vt,typeof n=="string"||Ot(n)?o:n)}}}function Ot(r){return typeof r=="object"&&r?.constructor===URL}class Tt{static resolvePluginProtocol(e){return new gt(e.discoveryApi)}static injectIdentityAuth(e){return Rt.create(e)}constructor(){}}function it(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function ft(r,...e){const n=new Set(r);for(const o of e)for(const i of o)n.add(i);return n}class Et{requests=[];subject=new dt(this.getCurrentPending());request(e){return new Promise((n,o)=>{this.requests.push({scopes:e,resolve:n,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(o=>it(e,o.scopes)?(o.resolve(n),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(n=>n.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((n,o)=>ft(n,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}}class et{subject=new dt([]);currentRequests=[];handlerCount=0;createAuthRequester(e){const n=new Et,o=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),C=this.makeAuthRequest(i,e);C?c[o]=C:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>n.request(i)}makeAuthRequest(e,n){const{scopes:o}=e;if(o)return{provider:n.provider,trigger:async()=>{const i=await n.onAuthRequest(o);e.resolve(i)},reject:()=>{const i=new Error("Login failed, rejected by user");i.name="RejectedError",e.reject(i)}}}authRequest$(){return this.subject}}function At(r){return new Promise((e,n)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,C=window.screen.height/2-i/2,y=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${C},left=${c}`);let T="";if(!y||typeof y.closed>"u"||y.closed){const at=new Error("Failed to open auth popup.");at.name="PopupRejectedError",n(at);return}const N=at=>{if(at.source!==y||at.origin!==r.origin)return;const{data:vt}=at;if(vt.type==="config_info"){T=vt.targetOrigin;return}if(vt.type!=="authorization_response")return;const Dt=vt;if("error"in Dt){const Gt=new Error(Dt.error.message);Gt.name=Dt.error.name,n(Gt)}else e(Dt.response);mt()},tt=setInterval(()=>{if(y.closed){const at=`Login failed, ${T&&T!==window.location.origin?`Incorrect app origin, expected ${T}`:"popup was closed"}`,vt=new Error(at);vt.name="PopupClosedError",n(vt),mt()}},100);function mt(){window.removeEventListener("message",N),clearInterval(tt)}window.addEventListener("message",N)})}let ot=!1;function j(r){return[...r].join(" ")}class V{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:n,discoveryApi:o,environment:i,provider:c,joinScopes:C=j,oauthRequestApi:y,sessionTransform:T=tt=>tt,popupOptions:N}=e;!ot&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),ot=!0),this.enableExperimentalRedirectFlow=n?n.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=y.createAuthRequester({provider:c,onAuthRequest:async tt=>this.enableExperimentalRedirectFlow?this.executeRedirect(tt):this.showPopup(tt)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=C,this.sessionTransform=T,this.popupOptions=N}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const n=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!n.ok){const i=new Error(`Auth refresh request failed, ${n.statusText}`);throw i.status=n.status,i}const o=await n.json();if(o.error){const i=new Error(o.error.message);throw o.error.name&&(i.name=o.error.name),i}return await this.sessionTransform(o)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(n=>{throw new Error(`Logout request failed, ${n}`)});if(!e.ok){const n=new Error(`Logout request failed, ${e.statusText}`);throw n.status=e.status,n}}async showPopup(e){const n=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:n,origin:window.location.origin,flow:"popup"}),i=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,c=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,C=await At({url:o,name:`${this.provider.title} Login`,origin:new URL(o).origin,width:i,height:c});return await this.sessionTransform(C)}async executeRedirect(e){const n=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:n,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,n){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...n,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return n?`?${n}`:""}}function nt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class St{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return nt(o,n)}getExtendedScope(e,n){const o=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const i=this.options.sessionScopes(e);for(const c of i)o.add(c)}if(n)for(const i of n)o.add(i);return o}}var ht=t(55309),Bt=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Wt=(0,ht.y)({id:"core.auth.google"}),Ut=(0,ht.y)({id:"core.auth.github"}),Jt=(0,ht.y)({id:"core.auth.okta"}),Kt=(0,ht.y)({id:"core.auth.gitlab"}),te=(0,ht.y)({id:"core.auth.microsoft"}),jt=(0,ht.y)({id:"core.auth.onelogin"}),Ft=(0,ht.y)({id:"core.auth.bitbucket"}),le=(0,ht.y)({id:"core.auth.bitbucket-server"}),he=(0,ht.y)({id:"core.auth.atlassian"}),Yt=(0,ht.y)({id:"core.auth.vmware-cloud"});class re{subject=new dt(Bt.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Bt.SignedIn:Bt.SignedOut))}sessionState$(){return this.subject}}class de{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new re;refreshPromise;currentSession;constructor(e){const{connector:n,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=n,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new St({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 nt(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!e.instantPopup)try{const n=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=n,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession(this.helper.getExtendedScope(this.currentSession,e));try{const n=await this.refreshPromise;if(!this.helper.sessionExistsAndHasScope(n,e))throw new Error("Refreshed session did not receive the required scopes");return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}}const Ve={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class se{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Ve,oauthRequestApi:C,defaultScopes:y=[],scopeTransform:T=at=>at,popupOptions:N}=e,tt=new V({configApi:n,discoveryApi:o,environment:i,provider:c,oauthRequestApi:C,sessionTransform({backstageIdentity:at,...vt}){const Dt={...vt,providerInfo:{idToken:vt.providerInfo.idToken,accessToken:vt.providerInfo.accessToken,scopes:se.normalizeScopes(T,vt.providerInfo.scope),expiresAt:vt.providerInfo.expiresInSeconds?new Date(Date.now()+vt.providerInfo.expiresInSeconds*1e3):void 0}};return at&&(Dt.backstageIdentity={token:at.token,identity:at.identity,expiresAt:at.expiresInSeconds?new Date(Date.now()+at.expiresInSeconds*1e3):void 0}),Dt},popupOptions:N}),mt=new de({connector:tt,defaultScopes:new Set(y),sessionScopes:at=>at.providerInfo.scopes,sessionShouldRefresh:at=>{let vt=1/0;return at.providerInfo?.expiresAt&&(vt=Math.min(vt,(at.providerInfo.expiresAt.getTime()-Date.now())/1e3)),at.backstageIdentity?.expiresAt&&(vt=Math.min(vt,(at.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),vt<60*3}});return new se({sessionManager:mt,scopeTransform:T})}sessionManager;scopeTransform;constructor(e){this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const o=se.normalizeScopes(this.scopeTransform,e);return(await this.sessionManager.getSession({...n,scopes:o}))?.providerInfo.accessToken??""}async getIdToken(e={}){return(await this.sessionManager.getSession({...e,scopes:new Set(["openid"])}))?.providerInfo.idToken??""}async getBackstageIdentity(e={}){return(await this.sessionManager.getSession(e))?.backstageIdentity}async getProfile(e={}){return(await this.sessionManager.getSession(e))?.profile}static normalizeScopes(e,n){if(!n)return new Set;const o=Array.isArray(n)?n:n.split(/[\s|,]/).filter(Boolean);return new Set(e(o))}}const on={id:"google",title:"Google",icon:()=>null},Te="https://www.googleapis.com/auth/";class De{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:C=on,defaultScopes:y=["openid",`${Te}userinfo.email`,`${Te}userinfo.profile`]}=e;return se.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:C,environment:c,defaultScopes:y,scopeTransform(T){return T.map(N=>N==="openid"?N:N==="profile"||N==="email"?`${Te}userinfo.${N}`:N.startsWith(Te)?N:`${Te}${N}`)}})}}const Ke={id:"microsoft",title:"Microsoft",icon:()=>null};class pe{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new pe(e)}constructor(e){const{configApi:n,environment:o="development",provider:i=Ke,oauthRequestApi:c,discoveryApi:C,defaultScopes:y=["openid","offline_access","profile","email","User.Read"],scopeTransform:T=N=>N.concat("offline_access")}=e;this.configApi=n,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=C,this.scopeTransform=T,this.oauth2={[pe.MicrosoftGraphID]:se.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:y})}}microsoftGraph(){return this.oauth2[pe.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(pe.resourceForScope).filter(i=>i!=="openid"))];if(n.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${n.join(", ")}. Access tokens can only have a single audience.`));const o=n[0]??pe.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const n=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(n){const{resourceURI:o}=n;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return pe.MicrosoftGraphID}}async getAccessToken(e,n){const o=e===void 0?pe.MicrosoftGraphID:await pe.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=se.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,n)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}}const Ge={id:"github",title:"GitHub",icon:()=>null};class tn{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Ge,oauthRequestApi:C,defaultScopes:y=["read:user"]}=e;return se.create({configApi:n,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:y})}}const hn={id:"okta",title:"Okta",icon:()=>null},an=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Ye="okta.";class en{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=hn,oauthRequestApi:C,defaultScopes:y=["openid","email","profile","offline_access"]}=e;return se.create({configApi:n,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:y,scopeTransform(T){return T.map(N=>an.has(N)||N.startsWith(Ye)?N:`${Ye}${N}`)}})}}const Ne={id:"gitlab",title:"GitLab",icon:()=>null};class ze{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Ne,oauthRequestApi:C,defaultScopes:y=["read_user"]}=e;return se.create({configApi:n,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:y})}}const Qe={id:"onelogin",title:"onelogin",icon:()=>null},Ee=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Ze="onelogin.";class He{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Qe,oauthRequestApi:C}=e;return se.create({configApi:n,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(y){return y.map(T=>Ee.has(T)||T.startsWith(Ze)?T:`${Ze}${T}`)}})}}const ke={id:"bitbucket",title:"Bitbucket",icon:()=>null};class Me{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=ke,oauthRequestApi:C,defaultScopes:y=["account"]}=e;return se.create({configApi:n,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:y})}}const Ae={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class cn{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Ae,oauthRequestApi:C,defaultScopes:y=["PROJECT_ADMIN"]}=e;return se.create({configApi:n,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i,defaultScopes:y})}}const w={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=w,oauthRequestApi:C}=e;return se.create({configApi:n,discoveryApi:o,oauthRequestApi:C,provider:c,environment:i})}}const E={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class R{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:C=E,defaultScopes:y=["openid"]}=e;return se.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:C,environment:c,defaultScopes:y})}}var Z=t(12935),q=t(57405),st=t(65461),Mt=t(36017),zt=t(99303),Vt=t(39837);const oe=(0,ht.y)({id:"core.storage"});var _t=t(70795),ge=t(16009);const ee=(0,ht.y)({id:"core.oauthrequest"});var Be=t(96824),me=t(70835),nn=t(10288),ln=t.n(nn),ie=t(20938),Nt=t(46195),We=t(54241),ns=t(13646);const pn=Nt.z.lazy(()=>Nt.z.object({rule:Nt.z.string(),resourceType:Nt.z.string(),params:Nt.z.record(Nt.z.any()).optional()}).or(Nt.z.object({anyOf:Nt.z.array(pn).nonempty()})).or(Nt.z.object({allOf:Nt.z.array(pn).nonempty()})).or(Nt.z.object({not:pn}))),zs=Nt.z.object({result:Nt.z.literal(We.b.ALLOW).or(Nt.z.literal(We.b.DENY))}),ss=Nt.z.object({result:Nt.z.array(Nt.z.union([Nt.z.literal(We.b.ALLOW),Nt.z.literal(We.b.DENY)]))}),rs=Nt.z.union([Nt.z.object({result:Nt.z.literal(We.b.ALLOW).or(Nt.z.literal(We.b.DENY))}),Nt.z.object({result:Nt.z.literal(We.b.CONDITIONAL),pluginId:Nt.z.string(),resourceType:Nt.z.string(),conditions:pn})]),os=(r,e)=>Nt.z.object({items:Nt.z.array(Nt.z.intersection(Nt.z.object({id:Nt.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class as{enabled;discovery;enableBatchedRequests;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1,this.enableBatchedRequests=e.config.getOptionalBoolean("permission.EXPERIMENTAL_enableBatchedRequests")??!1}async authorize(e,n){return this.enabled?this.enableBatchedRequests?this.makeBatchedRequest(e,n):this.makeRequest(e,zs,n):e.map(o=>({result:We.b.ALLOW}))}async authorizeConditional(e,n){return this.enabled?this.makeRequest(e,rs,n):e.map(o=>({result:We.b.ALLOW}))}async makeRequest(e,n,o){const i={items:e.map(y=>({id:ie.A(),...y}))},C=(await this.makeRawRequest(i,n,o)).items.reduce((y,T)=>(y[T.id]=T,y),{});return i.items.map(y=>C[y.id])}async makeBatchedRequest(e,n){const o={};for(const C of e){const{permission:y,resourceRef:T}=C;(0,ns.OL)(y)?(o[y.name]||={permission:y,resourceRef:[],id:ie.A()},T&&o[y.name].resourceRef?.push(T)):o[y.name]||={permission:y,id:ie.A()}}const c=(await this.makeRawRequest({items:Object.values(o)},ss,n)).items.reduce((C,y)=>(C[y.id]=y,C),{});return e.map(C=>{const{id:y}=o[C.permission.name],T=c[y];return{result:C.resourceRef?T.result.shift():T.result[0]}})}async makeRawRequest(e,n,o){const i=await this.discovery.getBaseUrl("permission"),c=await ln()(`${i}/authorize`,{method:"POST",body:JSON.stringify(e),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!c.ok)throw await me.o.fromResponse(c);const C=await c.json();return os(n,new Set(e.items.map(({id:y})=>y))).parse(C)}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class gn{permissionClient;identityApi;constructor(e,n){this.permissionClient=e,this.identityApi=n}static create(e){const{config:n,discovery:o,identity:i}=e,c=new as({discovery:o,config:n});return new gn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const is=[(0,Z.b)({api:q.I,deps:{configApi:st.U},factory:({configApi:r})=>X.fromConfig(r)}),(0,Z.b)({api:Mt.k,deps:{},factory:()=>new G}),(0,Z.b)({api:zt.c,deps:{},factory:()=>new Q}),(0,Z.b)({api:Vt.m,deps:{alertApi:Mt.k},factory:({alertApi:r})=>{const e=new J(r,new ct);return pt.forward(e,{hidden:!1}),e}}),(0,Z.b)({api:oe,deps:{errorApi:Vt.m},factory:({errorApi:r})=>xt.create({errorApi:r})}),(0,Z.b)({api:_t.a,deps:{configApi:st.U,identityApi:ge.K,discoveryApi:q.I},factory:({configApi:r,identityApi:e,discoveryApi:n})=>Pt({middleware:[Tt.resolvePluginProtocol({discoveryApi:n}),Tt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,Z.b)({api:ee,deps:{},factory:()=>new et}),(0,Z.b)({api:Wt,deps:{discoveryApi:q.I,oauthRequestApi:ee,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>De.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:te,deps:{discoveryApi:q.I,oauthRequestApi:ee,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>pe.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Ut,deps:{discoveryApi:q.I,oauthRequestApi:ee,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>tn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Jt,deps:{discoveryApi:q.I,oauthRequestApi:ee,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>en.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Kt,deps:{discoveryApi:q.I,oauthRequestApi:ee,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ze.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:jt,deps:{discoveryApi:q.I,oauthRequestApi:ee,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>He.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Ft,deps:{discoveryApi:q.I,oauthRequestApi:ee,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Me.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:le,deps:{discoveryApi:q.I,oauthRequestApi:ee,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>cn.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:he,deps:{discoveryApi:q.I,oauthRequestApi:ee,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>l.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Yt,deps:{discoveryApi:q.I,oauthRequestApi:ee,configApi:st.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>R.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,Z.b)({api:Be.x,deps:{discovery:q.I,identity:ge.K,config:st.U},factory:({config:r,discovery:e,identity:n})=>gn.create({config:r,discovery:e,identity:n})})];var jn=t(14451),cs=t(27799),Sn=t(94389),ls=t(20947),Un=t(20473),fn=t(45917),ds=t(39347),us=t(63309),hs=t(82451),ps=t(85121),$n=t(17400),gs=t(42226),fs=t(69550),Fn=t(52755),Nn=t(89350),ms=t(8911),On=t(33602),Pn=t(48108),ys=t(77225),kn=t(55700),Wn=t(71865),vs=t(80109),Es=t(15303),As=t(39330);const xs={brokenImage:cs.A,catalog:ms.A,scaffolder:ls.A,techdocs:Un.A,search:fn.A,chat:ds.A,dashboard:us.A,docs:hs.A,email:ps.A,github:gs.A,group:On.A,help:fs.A,"kind:api":$n.A,"kind:component":Nn.A,"kind:domain":jn.A,"kind:group":On.A,"kind:location":Fn.A,"kind:system":Sn.A,"kind:user":Pn.A,"kind:resource":kn.A,"kind:template":Wn.A,user:Pn.A,warning:ys.A,star:vs.A,unstarred:Es.A,externalLink:As.A};var Cs=t(58733),bs=t(55288),Ss=t(91360),Os=t(50868),Kn=t(12285),Ps=t(87271),ws=t(64636);ws.A.configure(r=>`v5-${r}`);const Ts=(0,bs.A)({productionPrefix:"jss4-"});function zn(r){const{children:e,theme:n,noCssBaseline:o=!1}=r,i=n.getTheme("v4"),c=n.getTheme("v5");let C;o||(C=(0,a.jsx)(Cs.Ay,{}));let y=(0,a.jsxs)(a.Fragment,{children:[C,e]});return i&&(y=(0,a.jsx)(Ss.Ay,{generateClassName:Ts,children:(0,a.jsx)(Os.A,{theme:i,children:y})})),c&&(y=(0,a.jsx)(Kn.A,{injectFirst:!0,children:(0,a.jsx)(Ps.A,{theme:c,children:y})})),y}const mn={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 Rs=t(98392),wn=t(17161);const je={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:n,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,C=`${n}, ${c}`,y=o?.fontColor??"#FFFFFF";return{colors:e,shape:n,backgroundImage:C,fontColor:y}}const Hs={home:$e({colors:Ue.teal,shape:je.wave}),documentation:$e({colors:Ue.pinkSea,shape:je.wave2}),tool:$e({colors:Ue.purpleSky,shape:je.round}),service:$e({colors:Ue.marineBlue,shape:je.wave}),website:$e({colors:Ue.veryBlue,shape:je.wave}),library:$e({colors:Ue.rubyRed,shape:je.wave}),other:$e({colors:Ue.darkGrey,shape:je.wave}),app:$e({colors:Ue.toastyOrange,shape:je.wave}),apis:$e({colors:Ue.teal,shape:je.wave2}),card:$e({colors:Ue.greens,shape:je.wave})},m=16,L='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',U="home",F={htmlFontSize:m,fontFamily:L,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 W(r){const{palette:e,htmlFontSize:n=m,fontFamily:o=L,defaultPageTheme:i=U,pageTheme:c=Hs,typography:C}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return F.htmlFontSize=n,F.fontFamily=o,{palette:e,typography:C??F,page:c[i],getPageTheme:({themeId:y})=>c[y]??c[i]}}var _=t(80012);const rt={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,_.a)(r.palette.textVerySubtle,.2):(0,_.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,_.a)(r.palette.textVerySubtle,.2):(0,_.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,_.e$)(r.palette.link,.3),background:(0,_.a)(r.palette.link,.95)},[r.breakpoints.up("md")]:{minWidth:120,fontSize:r.typography.pxToRem(14),fontWeight:500}}),textColorPrimary:({theme:r})=>({color:r.palette.link})}},MuiTableSortLabel:{styleOverrides:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"},"&:focus svg":{opacity:.5},"&.Mui-active":{fontWeight:"bold",color:"inherit"}}}},MuiListItemText:{styleOverrides:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}},MuiButton:{styleOverrides:{text:{padding:void 0}}},MuiChip:{styleOverrides:{root:({theme:r})=>({marginRight:r.spacing(1),marginBottom:r.spacing(1)}),label:({theme:r})=>({lineHeight:r.spacing(2.5),fontWeight:r.typography.fontWeightMedium,fontSize:r.spacing(1.75)}),labelSmall:({theme:r})=>({fontSize:r.spacing(1.5)}),deleteIcon:({theme:r})=>({width:r.spacing(3),height:r.spacing(3),margin:r.spacing(0,.75,0,-.75)}),deleteIconSmall:({theme:r})=>({width:r.spacing(2),height:r.spacing(2),margin:r.spacing(0,.5,0,-.5)})}},MuiCard:{styleOverrides:{root:{display:"flex",flexDirection:"column"}}},MuiCardHeader:{styleOverrides:{root:{paddingBottom:0}}},MuiCardContent:{styleOverrides:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}}},MuiCardActions:{styleOverrides:{root:{justifyContent:"flex-end"}}},MuiLink:{defaultProps:{underline:"hover"}},MuiPaper:{styleOverrides:{root:{backgroundImage:"unset"}}}},wt=r=>(...e)=>{const n=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return n.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function It(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function $t(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},o=r.spacing(1);return typeof o=="number"&&(n.spacing=wt(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:n})]:[i,c]))}return e}}const Lt=/^&.Mui-([\w-]+)$/;function kt(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const o=r[n];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,C=c.match(Lt);if(C){const[,y]=C,{[c]:T,...N}=o;T&&(e={...e,[n]:N,[y]:T})}}}return e}function Xt(r,e={}){const n={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?n[i]=It(r,c.styleOverrides):n[i]=kt($t(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:n,props:o}}class fe{#t=new Map;constructor(e,n){this.#t=new Map,e&&this.#t.set("v4",e),n&&this.#t.set("v5",n)}getTheme(e){return this.#t.get(e)}}function Ht(r){const e=W(r),n={...rt,...r.components},o=(0,wn.A)({...e,components:n}),i=Xt(o,n),c={...(0,Rs.A)(e),...i};return new fe(c,o)}function qt(r){const e=adaptV4Theme(r),n=createTheme(r);return new fe(n,createV5Theme(e))}const ye={light:Ht({palette:mn.light}),dark:Ht({palette:mn.dark})};var ae=t(75962),Qt=t(87145);const Zt=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(Qt.A,{}),Provider:({children:r})=>(0,a.jsx)(zn,{theme:ye.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(ae.A,{}),Provider:({children:r})=>(0,a.jsx)(zn,{theme:ye.dark,children:r})}];var Ct=t(14041),ne=t(73466),ce=t(39067),ue=t.n(ce);class Je{holders;constructor(...e){this.holders=e}get(e){for(const n of this.holders){const o=n.get(e);if(o)return o}}}var xe=t(43836),Xe=t(10602);const sn=(0,xe.tK)("api-context"),ve=r=>{const{apis:e,children:n}=r,o=(0,Ct.useContext)(sn)?.atVersion(1),i=o?new Je(e,o):e;return(0,a.jsx)(sn.Provider,{value:(0,Xe.B)({1:i}),children:n})};ve.propTypes={apis:ue().shape({get:ue().func.isRequired}).isRequired,children:ue().node};const Vs=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function yn(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Is(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Is):Object.fromEntries(Object.entries(r).map(([e,n])=>[e,Is(n)]))}function Tn(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:Tn(e);if(typeof r!="object"||Array.isArray(r))return r;const n=yn(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(n)])){const c=Tn(r[i],n[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 Fe={type(r,e,n,o){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class vn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new vn(void 0):e.reduce((n,{data:o,context:i,filteredKeys:c,deprecatedKeys:C})=>{const y=new vn(o,i,n);if(y.filteredKeys=c,C)for(const{key:T,description:N}of C)console.warn(`The configuration key '${T}' of ${i} is deprecated and may be removed soon. ${N||""}`);return y},void 0)}constructor(e,n="mock-config",o,i=""){this.data=e,this.context=n,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const n=this.readValue(e);return n===null?!1:n!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],n=this.fallback?.keys()??[];return[...new Set([...e,...n])].filter(o=>this.data?.[o]!==null)}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(Fe.missing(this.fullKey(e??""),this.context));return n}getOptional(e){const n=Is(this.readValue(e)),o=this.fallback?.getOptional(e);if(n!==null)return n===void 0?Tn(o):o===void 0?Tn(n):Tn(n,o)}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(Fe.missing(this.fullKey(e),this.context));return n}getOptionalConfig(e){const n=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(yn(n))return this.copy(n,e,o);if(n!==null){if(n!==void 0)throw new TypeError(Fe.type(this.fullKey(e),this.context,Ds(n),"object"));return o}}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(Fe.missing(this.fullKey(e),this.context));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!yn(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(n)return n.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(Fe.missing(this.fullKey(e),this.context));return n}getOptionalNumber(e){const n=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const o=Number(n);if(!Number.isFinite(o))throw new Error(Fe.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(Fe.missing(this.fullKey(e),this.context));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const o=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(o))return!0;if(/^(?:n|no|false|0|off)$/i.test(o))return!1;throw new Error(Fe.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(Fe.missing(this.fullKey(e),this.context));return n}getOptionalString(e){return this.readConfigValue(e,n=>typeof n=="string"&&n!==""||{expected:"string"})}getStringArray(e){const n=this.getOptionalStringArray(e);if(n===void 0)throw new Error(Fe.missing(this.fullKey(e),this.context));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[o,i]of n.entries())if(typeof i!="string"||i==="")return{expected:"string-array",value:i,key:`${e}[${o}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,o){const i=new vn(e,this.context,o,this.fullKey(n));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,n){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,n);if(o===null)return;const i=n(o);if(i!==!0){const{key:c=e,value:C=o,expected:y}=i;throw new TypeError(Fe.type(this.fullKey(c),this.context,Ds(C),y))}return o}readValue(e){const n=e?e.split("."):[];for(const i of n)if(!Vs.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of n.entries())if(yn(o))o=o[c];else if(o!=null){const C=this.fullKey(n.slice(0,i).join("."));throw new TypeError(Fe.type(C,this.context,Ds(o),"object"))}return o}}const Rn="theme";class Hn{themes;static createWithStorage(e){const n=new Hn(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(Rn)??void 0;return n.setActiveThemeId(o),n.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(Rn,i):window.localStorage.removeItem(Rn)}),window.addEventListener("storage",i=>{if(i.key===Rn){const c=localStorage.getItem(Rn)??void 0;n.setActiveThemeId(c)}}),n}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new dt(void 0)}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}}var En=t(63636);function Gs(r){if(r.length<3)throw new Error(`The '${r}' feature flag must have a minimum length of three characters.`);if(r.length>150)throw new Error(`The '${r}' feature flag must not exceed 150 characters.`);if(!r.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${r}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class Wr{registeredFeatureFlags=[];flags;registerFlag(e){Gs(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===En.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[o,i]of Object.entries(e.states))this.flags.set(o,i);const n=Array.from(this.flags.entries()).filter(([,o])=>o===En.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(n)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))return new Map;const o=Object.entries(n).filter(([i,c])=>(Gs(i),c===En.S.Active));return new Map(o)}catch{return new Map}}}const Vn=(0,ht.y)({id:"core.apptheme"}),Ys=(0,ht.y)({id:"core.applanguage"});var Kr=t(56038),Qs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Qs||{});class zr{factories=new Map;register(e,n){const o=Qs[e],i=this.factories.get(n.api.id);return i&&i.priority>=o?!1:(this.factories.set(n.api.id,{priority:o,factory:n}),!0)}get(e){const n=this.factories.get(e.id);if(n)return n.factory}getAllApis(){const e=new Set;for(const{factory:n}of this.factories.values())e.add(n.api);return e}}class Ls{factories;static validateFactories(e,n){for(const o of n){const i=[o],c=new Set;for(;i.length;){const C=i.shift(),y=e.get(C);if(y)for(const T of Object.values(y.deps)){if(T.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(T)||(c.add(T),i.push(T))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,n=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(n.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...n,i.api]),C=i.factory(c);return this.apis.set(e.id,C),C}loadDeps(e,n,o){const i={};for(const c in n)if(n.hasOwnProperty(c)){const C=n[c],y=this.load(C,o);if(!y)throw new Error(`No API factory available for dependency ${C} of dependent ${e}`);i[c]=y}return i}}function Hr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const n=[{node:Ct.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:o,parent:i,contexts:c}=n.shift();Ct.Children.forEach(o,C=>{if(!(0,Ct.isValidElement)(C))return;const y={};for(const T in e)if(e.hasOwnProperty(T)){const N=e[T];y[T]=N.visit(N.accumulator,C,i,c[T])}for(const T of r.discoverers){const N=T(C);N&&n.push({node:N,parent:C,contexts:y})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Gn(r,e){return()=>({accumulator:r(),visit:e})}function Vr(r){return r.props?.children}function Gr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Oe=t(19402);const Yr=Gn(()=>new Set,(r,e)=>{const n=(0,Oe.E)(e,"core.plugin");n&&r.add(n)});var In=t(72427);const Zs=r=>{const{children:e}=r,n=(0,In.gf)(En.B),o="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Oe.h)(Zs,"core.featureFlagged",!0);const Yn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Qn(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Js=r=>{const e=new Set;return r&&e.add(r),e};function Xs(r,e=new Array){return Ct.Children.forEach(r,n=>{if(!(0,Ct.isValidElement)(n))return;const o=(0,Oe.E)(n,"core.mountPoint");if(o){const i=(0,Oe.E)(n,"core.plugin");e.push({routeRef:o,plugin:i})}Xs(n.props.children,e)}),e}const Qr=Gn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(o?.isElementAncestor)return o;if(n?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,Oe.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${Qn(e)}"`);const C=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${Qn(e)}"`);const y=i.startsWith("/")?i.slice(1):i,T=e.props.element;if((0,Oe.E)(e,"core.gatherMountPoints")){if(T)throw new Error(`Mount point gatherers may not have an element prop "${Qn(e)}"`);const N={path:y,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Yn],plugins:new Set};return C.push(N),{obj:N,gatherPath:y,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(T){const[N,...tt]=Xs(T);if(tt.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!N)return o;const{routeRef:mt,plugin:at}=N,vt={path:y,element:"mounted",routeRefs:new Set([mt]),caseSensitive:!!e.props?.caseSensitive,children:[Yn],plugins:Js(at)};return C.push(vt),r.paths.set(mt,y),r.parents.set(mt,o?.routeRef),{obj:vt,routeRef:mt??o?.routeRef,gatherPath:y,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${Qn(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const y=(0,Oe.E)(e,"core.plugin");return y&&o?.obj?.plugins.add(y),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Zr=Gn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(n?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,C=o?.sticky;const y=e.props?.path,T=i?.children??r.objects,N=!!e.props?.caseSensitive;let tt=o?.path;if((0,Oe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");tt=y}const mt=e.props?.element;let at=(0,Oe.E)(e,"core.mountPoint");if(!at&&(0,Ct.isValidElement)(mt)&&(at=(0,Oe.E)(mt,"core.mountPoint")),at){let Dt=y;if(tt&&(Dt?tt=void 0:Dt=tt),!Dt)throw new Error("Mounted routable extension must have a path");r.paths.set(at,Dt),c&&C?(r.parents.set(at,c),y&&(c=at,C=!1)):(r.parents.set(at,c),c=at),y?(i={caseSensitive:N,path:y,element:"mounted",routeRefs:new Set([at]),children:[Yn],plugins:Js((0,Oe.E)(e.props.element,"core.plugin"))},T.push(i)):i?.routeRefs.add(at)}if((0,Oe.E)(e,"core.gatherMountPoints")&&(C=!0),(0,Oe.E)(e,"core.gatherMountPoints")){if(!y)throw new Error("Mount point gatherer must have a path");at||(i={caseSensitive:N,path:y,element:"gathered",routeRefs:new Set,children:[Yn],plugins:o?.obj?.plugins||new Set},T.push(i))}return{obj:i,path:tt,routeRef:c,sticky:C}}),Jr=Gn(()=>new Set,(r,e)=>{if(e.type===Zs){const n=e.props;r.add("with"in n?n.with:n.without)}});var Dn=t(21613),Xr=t(63544);const Ln=(0,Xr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function _s(r){return r[Ln]==="absolute"}function qs(r){return r[Ln]==="sub"}function _r(r){return r[Ln]==="external"}function Zn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var qr=t(46155),to=t.n(qr);function eo(r,e,n){let o,i="";if(_s(r))o=r;else if(qs(r))o=r.parent,i=r.path;else if(_r(r)){const y=n.get(r);if(!y)return[void 0,""];if(_s(y))o=y;else if(qs(y))o=y.parent,i=y.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${y}`)}else throw r[Ln]?new Error(`Unknown or invalid route ref type, ${r[Ln]}`):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 C=Zn(c,i);return[o,C]}function no(r,e,n,o,i){const c=(0,Dn.ue)(i,e)??[],C=Array();let y=-1;for(let tt=r;tt&&(y=c.findIndex(mt=>mt.route.routeRefs.has(tt)),y===-1);tt=o.get(tt))C.unshift(tt);C.length===0&&(y-=1);const T=y===-1?"":c[y].pathname,N=C.slice(0,-1).map(tt=>{const mt=n.get(tt);if(mt===void 0)throw new Error(`No path for ${tt}`);if(mt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${tt} as it has parameters`);return mt});return`${Zn(T,...N)}/`}class so{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,n,o,i,c){this.routePaths=e,this.routeParents=n,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,n){const[o,i]=eo(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof n=="string"?c=this.trimPath(n):n.pathname?c={...n,pathname:this.trimPath(n.pathname)}:c=n;const C=this.appBasePath+no(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[T])=>{const N=T&&to()(T,tt=>typeof tt=="string"?tt.replaceAll(/[&?#;\/]/g,mt=>encodeURIComponent(mt)):tt);return Zn(C,(0,Dn.tW)(i,N))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const ro=(0,xe.tK)("routing-context"),oo=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:o,basePath:i="",children:c})=>{const C=new so(r,e,n,o,i),y=(0,Xe.B)({1:C});return(0,a.jsx)(ro.Provider,{value:y,children:c})};function ao(r,e){const n=new Set(e.values());n.delete(void 0);for(const o of e.keys()){if(n.has(o))continue;let i=o,c="";for(;i;){const y=r.get(i);if(y===void 0)throw new Error(`No path for ${i}`);c=Zn(y,c),i=e.get(i)}const C=c.match(/:(\w+)/g);if(C){for(let y=0;y<C.length;y++)for(let T=y+1;T<C.length;T++)if(C[T]===C[y])throw new Error(`Parameter ${C[T]} is duplicated in path ${c}`)}}}function io(r,e){for(const n of e)if(n.externalRoutes){for(const[o,i]of Object.entries(n.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const co=(0,xe.tK)("app-context"),lo=({appContext:r,children:e})=>{const n=(0,Xe.B)({1:r});return(0,a.jsx)(co.Provider,{value:n,children:e})},tr="app",uo=`${tr}-auth-cookie-expires-at`,ho=5*6e4,er=5e3,po=2,go=5*6e4;function fo({discoveryApi:r,fetchApi:e,errorApi:n}){let o=!1,i,c=!0,C=er;const y="BroadcastChannel"in window?new BroadcastChannel(uo):void 0,T=at=>{const vt=(1+3*Math.random())*6e4;return Math.max(at-Date.now(),ho)-vt},N=async()=>{try{const vt=`${await r.getBaseUrl(tr)}/.backstage/auth/v1/cookie`,Dt=await e.fetch(vt,{credentials:"include"});if(!Dt.ok)throw new Error(`Request failed with status ${Dt.status} ${Dt.statusText}, see request towards ${vt} for more details`);const Gt=await Dt.json();if(!Gt.expiresAt)throw new Error("No expiration date in response");const we=Date.parse(Gt.expiresAt);if(Number.isNaN(we))throw new Error("Invalid expiration date in response");c=!0,y?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(we).toISOString()}}),mt(T(we))}catch(at){c?(c=!1,C=er):(C=Math.min(go,C*po),console.error("Session cookie refresh failed",at),n.post(new Error("Session refresh failed, see developer console for details"))),mt(C)}},tt=at=>{const{data:vt}=at;if(!(vt===null||typeof vt!="object")&&"action"in vt&&vt.action==="COOKIE_REFRESH_SUCCESS"){const Dt=Date.parse(vt.payload.expiresAt);if(Number.isNaN(Dt)){console.warn("Received invalid expiration from session refresh channel");return}mt(T(Dt))}};function mt(at){o||(i&&clearTimeout(i),i=setTimeout(N,at))}return y?.addEventListener("message",tt),N(),()=>{o=!0,i&&clearTimeout(i),y?.removeEventListener("message",tt),y?.close()}}function nr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Ms(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class mo{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw nr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ms("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw nr("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(n=>n.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return 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 n=fo(e);this.#t=async()=>{n();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var yo=t(1394);function vo(r,e,n){if(r!==void 0){const i=n.find(c=>c.id===r);if(i)return i}if(e){const i=n.find(c=>c.variant==="dark");if(i)return i}const o=n.find(i=>i.variant==="light");return o||n[0]}const Eo=()=>{const r=(0,Ct.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,Ct.useState)(r.matches);return(0,Ct.useEffect)(()=>{const o=i=>{n(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function sr({children:r}){const e=(0,In.gf)(Vn),n=(0,yo.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?Eo():!1,i=vo(n,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const rr=async()=>Ao();function Ao(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,n=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(n){if(!Array.isArray(n))throw new Error("Static configuration has invalid format");e.push(...n)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const C=c.textContent;if(!C)throw new Error("tag is empty");let y;try{y=JSON.parse(C)}catch(T){throw new Error(`failed to parse config; ${T}`)}if(!Array.isArray(y))throw new Error("data is not an array");e.push(...y)}catch(C){throw new Error(`Failed to load config from script tag, ${C.message}`)}else if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const c=JSON.parse(r);Array.isArray(c)?e.push(...c):e.push({data:c,context:"env"})}catch(c){throw new Error(`Failed to load runtime configuration, ${c}`)}const i=window.__APP_CONFIG__;return i&&e.push({context:"window",data:i}),e}class xo{apis=[];add(e,n){return this.apis.push([e.id,n]),n}build(){return new An(new Map(this.apis))}}class An{apis;static builder(){return new xo}static from(e){return new An(new Map(e.map(([n,o])=>[n.id,o])))}static with(e,n){return new An(new Map([[e.id,n]]))}constructor(e){this.apis=e}with(e,n){return new An(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}}function Co(r){const e=new Map,n=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const C=`${o.getId()}.${i}`;if(e.has(C))throw new Error(`Unexpected duplicate route '${C}'`);e.set(C,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const C=`${o.getId()}.${i}`;if(n.has(C))throw new Error(`Unexpected duplicate external route '${C}'`);n.set(C,c)}}return{routes:e,externalRoutes:n}}function bo(r,e,n){const o=Co(n),i=new Map,c=new Set;r&&r({bind:(T,N)=>{for(const[tt,mt]of Object.entries(N)){const at=T[tt];if(!at)throw new Error(`Key ${tt} is not an existing external route`);if(!mt&&!at.optional)throw new Error(`External route ${tt} is required but was ${mt===!1?"disabled":"not provided"}`);mt?i.set(at,mt):mt===!1&&c.add(at)}}});const C=e.getOptionalConfig("app.routes.bindings")?.get();if(C)for(const[y,T]of Object.entries(C)){if(!So(T))throw new Error(`Invalid config at app.routes.bindings['${y}'], value must be a non-empty string or false`);const N=o.externalRoutes.get(y);if(!N)throw new Error(`Invalid config at app.routes.bindings, '${y}' is not a valid external route`);if(!(i.has(N)||c.has(N)))if(T===!1)c.add(N);else{const tt=o.routes.get(T);if(!tt)throw new Error(`Invalid config at app.routes.bindings['${y}'], '${T}' is not a valid route`);i.set(N,tt)}}for(const y of o.externalRoutes.values())if(!i.has(y)&&!c.has(y)){const T="getDefaultTarget"in y?y.getDefaultTarget():void 0;if(T){const N=o.routes.get(T);N&&i.set(y,N)}}return i}function So(r){return!!(r===!1||typeof r=="string"&&r)}function Mn(){const[r]=(0,p.AV)((0,a.jsx)(p.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const or=(0,Ct.createContext)(void 0);var ar=t(82266),ir=t(93368),Oo=t(25862);const Po=(r,e)=>{try{const o=(0,Dn.ue)(e,{pathname:r})?.filter(T=>T?.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 C;i.plugins.size===1&&(C=i.plugins.values().next().value);const y=Object.entries(o?.params||{}).reduce((T,[N,tt])=>(tt!==void 0&&N!=="*"&&(T[N]=tt),T),{});return{extension:"App",pluginId:C?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:y}}catch{return}},wo=({pathname:r,search:e,hash:n,attributes:o})=>{const i=(0,ir.s)();return(0,Ct.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${n}`,{attributes:o})},[i,r,e,n,o]),null},Jn=({routeObjects:r})=>{const{pathname:e,search:n,hash:o}=(0,p.zy)(),{params:i,...c}=Po(e,r)||{params:{}};return(0,a.jsx)(Oo.Ig,{attributes:c,children:(0,a.jsx)(wo,{pathname:e,search:n,hash:o,attributes:i})})};function To(r){return Mn()?Bs(r):""}function Bs(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function cr({component:r,appIdentityProxy:e,children:n}){const[o,i]=(0,Ct.useState)(),c=(0,In.gf)(st.U),C=Bs(c);return o?(e.setTarget(o,{signOutTargetUrl:C||"/"}),(0,a.jsx)(a.Fragment,{children:n})):(0,a.jsx)(r,{onSignInSuccess:i})}function lr(r){const{Router:e,SignInPage:n}=(0,ar.n)().getComponents(),o=(0,In.gf)(st.U),i=Bs(o),c=`${i}/*`,C=(0,Ct.useContext)(or);if(!C)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:y,appIdentityProxy:T}=C;return n?Mn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Jn,{routeObjects:y}),(0,a.jsx)(cr,{component:n,appIdentityProxy:T,children:(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(Jn,{routeObjects:y}),(0,a.jsx)(cr,{component:n,appIdentityProxy:T,children:r.children})]}):(T.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||"/"}),Mn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Jn,{routeObjects:y}),(0,a.jsx)(p.BV,{children:(0,a.jsx)(p.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(Jn,{routeObjects:y}),r.children]}))}(0,Oe.h)(lr,"core.type","AppRouter");const Bn="language",_e="en";class Xn{static create(e){const n=e?.availableLanguages??[_e];if(n.length!==new Set(n).size)throw new Error(`Supported languages may not contain duplicates, got '${n.join("', '")}'`);if(!n.includes(_e))throw new Error(`Supported languages must include '${_e}'`);const o=e?.defaultLanguage??_e;if(!n.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new Xn(n,o)}static createWithStorage(e){const n=Xn.create(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(Bn),{languages:i}=n.getAvailableLanguages();return o&&i.includes(o)&&n.setLanguage(o),n.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Bn)&&window.localStorage.setItem(Bn,c)}),window.addEventListener("storage",c=>{if(c.key===Bn){const C=localStorage.getItem(Bn)??void 0;C&&n.setLanguage(C)}}),n}#t;#e;#n;constructor(e,n){this.#t=e,this.#e=n,this.#n=new dt({language:this.#e})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const n=e??_e;if(n!==this.#e){if(n&&!this.#t.includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${this.#t.join("', '")}'`);this.#e=n,this.#n.next({language:n})}}getLanguage(){return{language:this.#e}}language$(){return this.#n}}var Ro=t(47304),Io=t(99833),dr=t(93184);function ur(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Do{onLoad;#t;#e;#n;constructor(e){this.onLoad=e,this.#t=new Set,this.#e=new Map,this.#n=new Map}addTranslationResource(e){const n=(0,Io.Y)(e);for(const o of n.resources){const i=this.#s(o.language,n.id);this.#n.has(i)||this.#n.set(i,o.loader)}}#s(e,n){return`${e}/${n}`}needsLoading(e,n){const o=this.#s(e,n);return this.#n.get(o)?!this.#t.has(o):!1}async load(e,n){const o=this.#s(e,n),i=this.#n.get(o);if(!i||this.#t.has(o))return;const c=this.#e.get(o);if(c){await c;return}const C=i().then(y=>{this.onLoad({language:e,namespace:n,messages:y.messages}),this.#t.add(o)},y=>{throw this.#t.add(o),y});this.#e.set(o,C),await C}}class js{#t;#e;#n;static fromI18n(e){const n=e.services.interpolator,o=n.format;let i;return n.format=(c,C,y,T)=>C?o(c,C,y,T):i?.(c,C,y,T)??c,new js(Math.random().toString(36).substring(2,8),c=>{i=c})}constructor(e,n){this.#t=n,this.#e=e,this.#n=new RegExp(`\\$${e}\\(([^)]+)\\)`)}wrapT(e){return(n,o)=>{let i;this.#t(y=>{if((0,Ct.isValidElement)(y)){i||(i=new Map);const T=i.size.toString();return i.set(T,y),`$${this.#e}(${T})`}return y});const c=e(n,o);if(!i)return c;const C=c.split(this.#n);return(0,Ct.createElement)(Ct.Fragment,null,...C.map((y,T)=>T%2===0?y:i?.get(y)).filter(Boolean))}}}class Us{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),o=(0,Ro.Q_)({fallbackLng:_e,supportedLngs:n,interpolation:{escapeValue:!1,alwaysFormat:!0},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const i=js.fromI18n(o),{language:c}=e.languageApi.getLanguage();c!==_e&&o.changeLanguage(c);const C=new Do(N=>{o.addResourceBundle(N.language,N.namespace,ur(N.messages),!1,!0)}),y=e?.resources||[];for(let N=y.length-1;N>=0;N--){const tt=y[N];tt.$$type==="@backstage/TranslationResource"?C.addTranslationResource(tt):tt.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(_e,tt.id,ur(tt.messages),!0,!1)}const T=new Us(o,C,e.languageApi.getLanguage().language,i);return e.languageApi.language$().subscribe(({language:N})=>{T.#a(N)}),T}#t;#e;#n;#s;#o=new Set;#r=new Set;constructor(e,n,o,i){this.#t=e,this.#e=n,this.#n=o,this.#s=i}getTranslation(e){const n=(0,dr.v)(e);return this.#c(n),this.#i(n)}translation$(e){const n=(0,dr.v)(e);return this.#c(n),new(Y())(o=>{let i={};const c=()=>{i={};const y=i;this.#e.load(this.#n,n.id).then(()=>{if(y===i){const T=this.#i(n);T.ready&&o.next(T)}},T=>{y===i&&o.error(Array.isArray(T)?T[0]:T)})},C=()=>{const y=this.#i(n);y.ready?o.next(y):c()};return this.#e.needsLoading(this.#n,n.id)&&c(),this.#r.add(C),()=>{this.#r.delete(C)}})}#a(e){this.#n!==e&&(this.#n=e,this.#t.changeLanguage(e),this.#r.forEach(n=>n()))}#i(e){if(this.#e.needsLoading(this.#n,e.id))return{ready:!1};const n=this.#t.getFixedT(null,e.id);return{ready:!0,t:this.#s.wrapT(n)}}#c(e){if(this.#o.has(e.id))return;this.#o.add(e.id);const n=e.getDefaultMessages();this.#t.addResourceBundle(_e,e.id,n,!0,!1);const o=e.getDefaultResource();o&&this.#e.addTranslationResource(o)}}function hr(r){const e=new URL(r);return e.protocol=document.location.protocol,e.hostname=document.location.hostname,e.port=document.location.port,e.toString().replace(/\/$/,"")}function Lo(r){const e=vn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,C;if(n&&o){const y=new URL(n).origin,T=new URL(o).origin;if(y===T){const N=hr(o);o!==N&&(c=N)}}if(n){const y=hr(n);n!==y&&(C=y)}return(C||c)&&(i=i.concat({data:{app:C&&{baseUrl:C},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function Mo(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Bo(r,e,n){const o=!!r,i=(0,ne.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:T}=e;c=(0,a.jsx)(T,{})}else if(i.error){const{BootErrorPage:T}=e;c=(0,a.jsx)(T,{step:"load-config",error:i.error})}const{ThemeProvider:C=sr}=e;return c?{node:(0,a.jsx)(ve,{apis:An.with(Vn,n),children:(0,a.jsx)(C,{children:c})})}:{api:vn.fromConfigs(i.value?.length?Lo(i.value):[])}}class jo{app;constructor(e){this.app=e}getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}}class Uo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new mo;apiFactoryRegistry;constructor(e){this.apis=e.apis??[],this.icons=e.icons,this.plugins=new Set(e.plugins??[]),this.featureFlags=e.featureFlags??[],this.components=e.components,this.themes=e.themes,this.configLoader=e.configLoader??rr,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new zr,this.appLanguageApi=Xn.createWithStorage({defaultLanguage:e.__experimentalTranslations?.defaultLanguage,availableLanguages:e.__experimentalTranslations?.availableLanguages}),this.translationResources=e.__experimentalTranslations?.resources??[]}getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const n=this.getProvider();return()=>(0,a.jsx)(n,{children:e})}#t=!1;getProvider(){if(this.#t)throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");this.#t=!0;const e=new jo(this);let n,o;return({children:c})=>{const C=(0,Ct.useRef)(!0),y=(0,Ct.useMemo)(()=>Hn.createWithStorage(this.themes),[]),{routing:T,featureFlags:N}=(0,Ct.useMemo)(()=>{const Gt=Mn();Gt&&console.warn(`
4
- DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
5
- Please migrate to use React Router v6 stable.
6
- See https://backstage.io/docs/tutorials/react-router-stable-migration
7
- `);const we=Hr({root:c,discoverers:[Vr,Gr],collectors:{routing:Gt?Zr:Qr,collectedPlugins:Yr,featureFlags:Jr}});return we.collectedPlugins.forEach(Le=>this.plugins.add(Le)),this.verifyPlugins(this.plugins),this.getApiHolder(),we},[c]),tt=Bo(this.configLoader,this.components,y),mt="api"in tt;if(mt){const{api:Gt}=tt;this.configApi=Gt}if("node"in tt)return tt.node;if(o)throw o;if(!n)try{n=bo(this.bindRoutes,tt.api,this.plugins),ao(T.paths,T.parents),io(n,this.plugins)}catch(Gt){throw o=Gt,Gt}if(mt&&C.current){C.current=!1;const Gt=this.getApiHolder().get(En.B);if(Gt){for(const Ie of this.featureFlags)Gt.registerFlag({...Ie,pluginId:""});for(const Ie of this.plugins.values())if("getFeatureFlags"in Ie)for(const un of Ie.getFeatureFlags())Gt.registerFlag({name:un.name,pluginId:Ie.getId()});else for(const un of Ie.output())un.type==="feature-flag"&&Gt.registerFlag({name:un.name,pluginId:Ie.getId()});const we=Gt.getRegisteredFlags(),Le=new Set(we.map(Ie=>Ie.name));for(const Ie of N)Le.has(Ie)||Gt.registerFlag({name:Ie,pluginId:""})}}const{ThemeProvider:at=sr,Progress:vt}=this.components,Dt=this.getApiHolder();if(Mo()){const Gt=Dt.get(Vt.m),we=Dt.get(_t.a),Le=Dt.get(q.I);if(!Gt||!we||!Le)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Gt,fetchApi:we,discoveryApi:Le})}return(0,a.jsx)(ve,{apis:Dt,children:(0,a.jsx)(lo,{appContext:e,children:(0,a.jsx)(at,{children:(0,a.jsx)(oo,{routePaths:T.paths,routeParents:T.parents,routeObjects:T.objects,routeBindings:n,basePath:To(tt.api),children:(0,a.jsx)(or.Provider,{value:{routeObjects:T.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(Ct.Suspense,{fallback:(0,a.jsx)(vt,{}),children:c})})})})})})}}getRouter(){return lr}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const n of e.getApis())this.apiFactoryRegistry.get(n.api)||this.apiFactoryRegistry.register("default",n);return Ls.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Vn,deps:{},factory:()=>Hn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:st.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:ge.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Ys,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Kr.J,deps:{languageApi:Ys},factory:({languageApi:e})=>Us.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:En.B,deps:{},factory:()=>new Wr});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const n of e.getApis())if(!this.apiFactoryRegistry.register("default",n))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${n.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 n=new Set;for(const o of e){const i=o.getId();if(n.has(i))throw new Error(`Duplicate plugin found '${i}'`);n.add(i)}}}function $o(r){return new Uo(r)}function Fo(r){return $o({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...D,...r?.components},configLoader:r?.configLoader,defaultApis:is,icons:{...xs,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??Zt})}var _n=t(82442);let pr=!1;const gr=r=>{const e=(0,ar.n)(),{NotFoundErrorPage:n}=e.getComponents(),o=(0,Ct.useMemo)(()=>Mn(),[]),c=[...(0,_n.O)(r.children,C=>C.getElements().flatMap(y=>{let T=y.props.path;if(T==="")return[];T=T?.replace(/\/\*$/,"")??"/";let N=o?y:y.props.element;return!o&&!N&&(N=y,pr||(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] />} />."),pr=!0)),[{path:T,element:N,children:y.props.children?[{path:T==="/"?"/":"*",element:y.props.children}]:void 0}]}).sort((y,T)=>T.path.localeCompare(y.path)).map(y=>({...y,path:y.path==="/"?"/":`${y.path}/*`}))),{path:"*",element:(0,a.jsx)(n,{})}];return(0,p.Ye)(c)};(0,Oe.h)(gr,"core.type","FlatRoutes");var xn=t(6820),No=t(78692),ko=t(86519);function Wo(r){return!r.cursor}function Ko(r,e){if(!r.length)return[];const{maxCountPerChunk:n=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let C=0,y=0,T=0;for(let N=0;N<r.length;++N){const tt=r[N].length+i;T>0&&(y+tt>o||T+1>n)&&(c.push(r.slice(C,N)),C=N,y=0,T=0),y+=tt,T+=1}return c.push(r.slice(C,r.length)),c}const Ce="catalog";var be=t(94214);class zo{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:ln()}}async deleteEntityByUid(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"DELETE"})}async getEntities(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntitiesByQuery(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntitiesByRefs(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityByName(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityByUid(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityFacets(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async refreshEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async analyzeLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"DELETE"})}async getLocation(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocationByEntity(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocations(e,n){const o=await this.discoveryApi.getBaseUrl(Ce),c=be.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}}class Ho{apiClient;constructor(e){this.apiClient=new zo(e)}async getEntityAncestors(e,n){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,xn.KU)(e.entityRef)},n))}async getLocations(e,n){return{items:(await this.requestRequired(await this.apiClient.getLocations(e??{},n))).map(i=>i.data)}}async getLocationById(e,n){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},n))}async getLocationByEntity(e,n){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,xn.KU)(e)},n))}async getEntities(e,n){const{filter:o=[],fields:i=[],order:c,offset:C,limit:y,after:T}=e??{},N=[];if(c)for(const mt of[c].flat())mt&&N.push(`${mt.order}:${mt.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:y,filter:this.getFilterValue(o),offset:C,after:T,order:c?N:void 0}},n))}}async getEntitiesByRefs(e,n){const o=async c=>{const C=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},n);if(!C.ok)throw await me.o.fromResponse(C);return(await C.json()).items.map(T=>T??void 0)};let i;for(const c of Ko(e.entityRefs)){const C=await o(c);i?i.push(...C):i=C}return{items:i??[]}}async queryEntities(e={},n){const o={};if(Wo(e)){const{fields:i=[],filter:c,limit:C,offset:y,orderFields:T,fullTextFilter:N}=e;o.filter=this.getFilterValue(c),C!==void 0&&(o.limit=C),y!==void 0&&(o.offset=y),T!==void 0&&(o.orderField=(Array.isArray(T)?T:[T]).map(({field:mt,order:at})=>`${mt},${at}`)),i.length&&(o.fields=i);const tt=N?.term?.trim();tt&&(o.fullTextFilterTerm=tt),N?.fields?.length&&(o.fullTextFilterFields=N.fields)}else{const{fields:i=[],limit:c,cursor:C}=e;o.cursor=C,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.requestRequired(await this.apiClient.getEntitiesByQuery({query:o},n))}async getEntityByRef(e,n){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,xn.KU)(e)},n))}async getEntityByName(e,n){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},n))}async refreshEntity(e,n){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},n);if(o.status!==200)throw new Error(await o.text())}async getEntityFacets(e,n){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},n))}async addLocation(e,n){const{type:o="url",target:i,dryRun:c}=e,C=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},n);if(C.status!==201)throw new Error(await C.text());const{location:y,entities:T,exists:N}=await C.json();if(!y)throw new Error(`Location wasn't added: ${i}`);return{location:y,entities:T,exists:N}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocations({},n))).map(i=>i.data).find(i=>e===(0,No.KL)(i))}async removeLocationById(e,n){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},n))}async removeEntityByUid(e,n){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},n))}async validateEntity(e,n,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:n}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await me.o.fromResponse(i);const{errors:c=[]}=await i.json();return{valid:!1,errors:c}}async requestIgnored(e){if(!e.ok)throw await me.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await me.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await me.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const n=[];for(const o of[e].flat()){const i=[];for(const[c,C]of Object.entries(o))for(const y of[C].flat())y===ko.c?i.push(c):typeof y=="string"&&i.push(`${c}=${y}`);i.length&&n.push(i.join(","))}return n}}var fr=t(7341),Vo=t(18),Go=t(82292),mr=t(29207),Cn=t(95203),Yo=t(9803),Re=t(88758),Qo=t(54560),bn=t(45250);async function Zo({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,bn.isArray)(o))return;const i=new Set(n.snapshot("entityRefs").value??[]);o.filter(bn.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,C,y,T])=>(0,xn.U2)({kind:C,namespace:y,name:T})).forEach(c=>i.add(c)),await n.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Jo{settingsStore;starredEntities;constructor(e){Zo(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:n=>{this.starredEntities=new Set(n.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 $s(r){const{years:e=0,months:n=0,weeks:o=0,days:i=0,hours:c=0,minutes:C=0,seconds:y=0,milliseconds:T=0}=r;return((((e*365+n*30+o*7+i)*24+c)*60+C)*60+y)*1e3+T}var Xo=t(25033),_o=t.n(Xo),qo=t(88083);const ta={seconds:10},ea={milliseconds:50},na={api:$n.A,component:Nn.A,system:Sn.A,resource:kn.A,domain:jn.A,location:Fn.A,user:Pn.A,group:On.A,template:Wn.A};function yr(r){return{async:r.async,render:({entityRef:e,entity:n,context:o})=>({snapshot:(0,qo.T)(n||e,o),loadEntity:r.async})}}class sa extends Map{#t;#e=new Map;constructor(e){super(),this.#t=e}set(e,n){const o=super.set(e,n);return this.#e.set(e,Date.now()),o}get(e){if(!this.has(e))return;const n=this.#e.get(e);if(Date.now()-n>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 qn{static createLocal(){return new qn({renderer:yr({async:!1})})}static create(e){return new qn(e)}#t;#e;#n;#s;#o;constructor(e){const n=e.cacheTtl??ta,o=e.batchDelay??ea,i=e.renderer??yr({async:!0}),c={};if(Object.entries(na).forEach(([C,y])=>{c[C.toLocaleLowerCase("en-US")]=y}),Object.entries(e.kindIcons??{}).forEach(([C,y])=>{c[C.toLocaleLowerCase("en-US")]=y}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#n=this.#a({cacheTtl:n,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#e=$s(n),this.#t=new Map,this.#s=c,this.#o=i}forEntity(e,n){const{entityRef:o,kind:i,entity:c,needsLoad:C}=this.#r(e),y=at=>{const{snapshot:vt}=this.#o.render({entityRef:o,loading:at.loading,entity:at.entity,context:n||{}});return{...vt,entityRef:o,Icon:this.#i(vt.Icon,i)}};let T;try{T=y({loading:C,entity:c})}catch{T={primaryTitle:o,entityRef:o}}if(!C)return{snapshot:T,promise:Promise.resolve(T)};const N=Promise.resolve().then(()=>this.#n?.load(o)).then(at=>y({loading:!1,entity:at??c})).catch(()=>{}),tt=new(Y())(at=>{let vt=!1;return N.then(Dt=>{Dt&&at.next(Dt)}).finally(()=>{vt||at.complete()}),()=>{vt=!0}}),mt=N.then(at=>at??T);return{snapshot:T,update$:tt,promise:mt}}#r(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,xn.U2)(e),needsLoad:!1};const n=this.#t.get(e),o=n?.entity,c=(!n||Date.now()-n.updatedAt>this.#e)&&this.#o.async!==!1&&this.#n!==void 0;return{entity:o,kind:(0,xn.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const n=$s(e.cacheTtl),o=$s(e.batchDelay);return new(_o())(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"]}),C=Date.now();return i.forEach((y,T)=>{this.#t.set(y,{updatedAt:C,entity:c[T]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new sa(n),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,n){return e||(e===!1?!1:this.#s[n.toLocaleLowerCase("en-US")])}}const Pe=(0,Yo.i)({id:"catalog",apis:[(0,Z.b)({api:fr.v,deps:{discoveryApi:q.I,fetchApi:_t.a},factory:({discoveryApi:r,fetchApi:e})=>new Ho({discoveryApi:r,fetchApi:e})}),(0,Z.b)({api:Vo.a,deps:{storageApi:oe},factory:({storageApi:r})=>new Jo({storageApi:r})}),(0,Z.b)({api:Go.n,deps:{catalogApi:fr.v},factory:({catalogApi:r})=>qn.create({catalogApi:r})})],routes:{catalogIndex:Cn.rQ,catalogEntity:mr.s},externalRoutes:{createComponent:Cn.qP,viewTechDoc:Cn.UJ,createFromTemplate:Cn.Zg,unregisterRedirect:Cn.pS}}),mi=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:Cn.rQ})),ra=Pe.provide((0,Re.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:mr.s})),yi=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)}})),vi=Pe.provide((0,Re.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),Ei=Pe.provide((0,Re.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),Ai=Pe.provide((0,Re.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),xi=Pe.provide((0,Re.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ci=Pe.provide((0,Re.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),bi=Pe.provide((0,Re.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),Si=Pe.provide((0,Re.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Oi=Pe.provide((0,Re.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),Pi=Pe.provide((0,Re.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),wi=Pe.provide((0,Re.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),Ti=Pe.provide((0,Re.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),Ri=Pe.provide((0,Qo.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var vr=t(96726),Er=t(26679);class oa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:n,identityApi:o}){this.configApi=e,this.discoveryApi=n,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,n){const i=`${await this.getApiOrigin()}/${n}`,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,n,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class aa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:n,identityApi:o}){this.configApi=e,this.discoveryApi=n,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 ia=[(0,Z.b)({api:Er.s,deps:{configApi:st.U,discoveryApi:q.I,identityApi:ge.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new oa({configApi:r,discoveryApi:e,identityApi:n})}),(0,Z.b)({api:Er.l,deps:{configApi:st.U,discoveryApi:q.I,identityApi:ge.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new aa({configApi:r,discoveryApi:e,identityApi:n})}),(0,Z.b)({api:vr.Y,deps:{configApi:st.U},factory:({configApi:r})=>vr.L.fromConfig(r)})],ca={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},la={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function da(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ua(){const r=await rr(),e=await da();return[...r,{context:"detected",data:e?ca:la}]}var qe=t(58837),ha=t(3210);const pa=(0,qe.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),ga=()=>{const r=pa();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"})})},fa=(0,qe.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),ma=()=>{const r=fa();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 Se=t(72664);const Ar={isOpen:!1,setOpen:()=>{}},xr=(0,Ct.createContext)(Ar),Cr=(0,xe.tK)("sidebar-open-state-context");function br(r){const{children:e,value:n}=r;return(0,a.jsx)(xr.Provider,{value:n,children:(0,a.jsx)(Cr.Provider,{value:(0,Xe.B)({1:n}),children:e})})}const Fs=()=>{const r=(0,Ct.useContext)(Cr),e=(0,Ct.useContext)(xr);if(r===void 0)return e||Ar;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var Sr=t(72072),Or=t(73524),rn=t(10394),Pr=t(5893),ya=t(53373),dn=t.n(ya),va=t(1125),wr=t(29365),Ea=t(73845),Ns=t(72501),Aa=t(32881),xa=t(27326),Ca=t(13085);const Tr=(0,Ct.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var ks=t(34435);const ba=(0,qe.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"}})),Sa=r=>{const{to:e,label:n,icon:o,value:i}=r,{sidebarConfig:c}=(0,Ct.useContext)(Se.yY),C=ba({sidebarConfig:c}),y=(0,p.zy)(),{selectedMenuItemIndex:T,setSelectedMenuItemIndex:N}=(0,Ct.useContext)(Tr),tt=(at,vt)=>{N(vt===T?-1:vt)},mt=i===T&&T>=0||i!==T&&!(T>=0)&&e===y.pathname;return(0,a.jsx)(Ca.A,{"aria-label":n,label:n,icon:o,component:Sr.N_,to:e||y.pathname,onChange:tt,value:i,selected:mt,classes:C})},Rr=r=>{const{children:e,to:n,label:o,icon:i,value:c}=r,{isMobile:C}=(0,ks.Ut)();return C?(0,a.jsx)(Sa,{to:n,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Ir=(0,qe.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`})})),Oa=r=>(0,bn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),Pa=(0,Ct.createElement)(Rr).type,wa=({children:r,label:e="Menu",open:n,onClose:o})=>{const{sidebarConfig:i}=(0,Ct.useContext)(Se.yY),c=Ir({sidebarConfig:i});return(0,a.jsxs)(Ea.Ay,{anchor:"bottom",open:n,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(rn.A,{className:c.overlayHeader,children:[(0,a.jsx)(Ns.A,{variant:"h3",children:e}),(0,a.jsx)(wr.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(Aa.A,{})})]}),(0,a.jsx)(rn.A,{component:"nav",children:r})]})},Ta=r=>{const{sidebarConfig:e}=(0,Ct.useContext)(Se.yY),{children:n}=r,o=Ir({sidebarConfig:e}),i=(0,p.zy)(),[c,C]=(0,Ct.useState)(-1);(0,Ct.useEffect)(()=>{C(-1)},[i.pathname]);let y=(0,_n.O)(n,N=>N.getElements().filter(tt=>tt.type===Pa));if(n)y.length?y=Oa(y):y.push((0,a.jsx)(Rr,{icon:(0,a.jsx)(xa.A,{}),children:n},"default_menu"));else return null;const T=c>=0&&!y[c].props.to;return(0,a.jsx)(br,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(Tr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:C},children:[(0,a.jsx)(wa,{label:y[c]&&y[c].props.label,open:T,onClose:()=>C(-1),children:y[c]&&y[c].props.children}),(0,a.jsx)(va.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:y})]})})};var Ra=t(87849),Ia=t(10315);const Dr=(0,qe.A)(r=>({root:{left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,position:"fixed"},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",left:0,top:0,bottom:0,position:"absolute",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 Da=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(Da||{});const La=r=>{const{sidebarConfig:e}=(0,Ct.useContext)(Se.yY),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,C=Dr({sidebarConfig:e}),y=(0,Pr.A)(Le=>Le.breakpoints.down("md"),{noSsr:!0}),[T,N]=(0,Ct.useState)(0),tt=(0,Ct.useRef)(),{isPinned:mt,toggleSidebarPinState:at}=(0,ks.Ut)(),vt=()=>{mt||i||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),T!==2&&!y&&(tt.current=window.setTimeout(()=>{tt.current=void 0,N(2)},n),N(1)))},Dt=()=>{mt||i||(tt.current&&(clearTimeout(tt.current),tt.current=void 0),T===1?N(0):T===2&&(tt.current=window.setTimeout(()=>{tt.current=void 0,N(0)},o)))},Gt=T===2&&!y||mt,we=Le=>{Le?(N(2),at()):(N(0),at())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Ba,{}),(0,a.jsx)(br,{value:{isOpen:Gt,setOpen:we},children:(0,a.jsx)(rn.A,{className:C.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:vt,onFocus:i?()=>{}:vt,onMouseLeave:i?()=>{}:Dt,onBlur:i?()=>{}:Dt,children:(0,a.jsx)(rn.A,{className:dn()(C.drawer,C.drawerWidth,{[C.drawerOpen]:Gt}),children:c})})})]})},Ma=r=>{const e=(0,Se.Rv)(r.sidebarOptions??{}),n=(0,Se.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:C}=r,{isMobile:y}=(0,ks.Ut)();return y?(0,a.jsx)(Ta,{children:o}):(0,a.jsx)(Se.yY.Provider,{value:{sidebarConfig:e,submenuConfig:n},children:(0,a.jsx)(La,{openDelayMs:c,closeDelayMs:C,disableExpandOnHover:i,children:o})})};function Ba(){const{sidebarConfig:r}=(0,Ct.useContext)(Se.yY),{focusContent:e,contentRef:n}=(0,Or.H)(),o=Dr({sidebarConfig:r}),{t:i}=(0,Ra.i)(Ia.O);return n?.current?(0,a.jsx)(d.A,{onClick:e,variant:"contained",className:dn()(o.visuallyHidden),children:i("skipToContent")}):null}var ja=t(94509),ts=t(58502),Ua=t(79065),$a=t(55704),Lr=t(62248);const Fa=(0,qe.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"}),Na=r=>{const{isOpen:e}=Fs(),{sidebarConfig:n,submenuConfig:o}=(0,Ct.useContext)(Se.yY),i=e?n.drawerWidthOpen:n.drawerWidthClosed,c=Fa({left:i,submenuConfig:o}),{isHoveredOn:C}=(0,Ct.useContext)(Se.U1),[y,T]=(0,Ct.useState)(!1);return(0,Ct.useEffect)(()=>{T(C)},[C]),(0,a.jsxs)(rn.A,{className:dn()(c.drawer,{[c.drawerOpen]:y}),children:[(0,a.jsx)(Ns.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var ka=t(45810),Mr=t.n(ka);function Br(r,e,n=!1){const o=new URLSearchParams(e.search).toString(),i=Mr().parse(o),c=new URLSearchParams(r.search).toString(),C=Mr().parse(c),y=n?bn.isEqual:bn.isMatch;return(0,bn.isEqual)(e.pathname,r.pathname)&&y(C,i)}const Wa=r=>(0,qe.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 es(r){return(0,Ct.useMemo)(()=>Wa(r),[r])()}const Ka=(r,e)=>(0,_n.O)(r.props.children,n=>{let o=!1;return n.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:C})=>o=o||Br(e,(0,Dn.o1)(C)));return}i&&(o=Br(e,(0,Dn.o1)(i)))}}),o},[e.pathname]);function Ws(r){return r.to===void 0}const za=(0,Ct.createElement)(Na).type,Ha=(0,Ct.forwardRef)(function({to:e,end:n,style:o,className:i,activeStyle:c,caseSensitive:C,activeClassName:y="active","aria-current":T="page",...N},tt){let{pathname:mt}=(0,p.zy)(),{pathname:at}=(0,p.x$)(e);C||(mt=mt.toLocaleLowerCase("en-US"),at=at.toLocaleLowerCase("en-US"));let vt=mt===at;!vt&&!n&&(vt=mt.startsWith(`${at}/`));const Dt=vt?T:void 0;return(0,a.jsx)(O.N_,{...N,to:e,ref:tt,"aria-current":Dt,style:{...o,...vt?c:void 0},className:dn()([typeof i!="function"?i:void 0,vt?y:void 0])})}),jr=(0,Ct.forwardRef)((r,e)=>{const{icon:n,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:C=!1,onClick:y,noTrack:T,children:N,className:tt,...mt}=r,{sidebarConfig:at}=(0,Ct.useContext)(Se.yY),vt=es(at),{isOpen:Dt}=Fs(),Gt=!Dt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},we=(0,a.jsxs)(rn.A,{style:Gt,children:[(0,a.jsx)(n,{fontSize:"small"}),!Dt&&c?(0,a.jsx)(Lr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Le=(0,a.jsx)(ja.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:dn()({[vt.closedItemIcon]:!Dt}),children:we}),Ie=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(rn.A,{"data-testid":"login-button",className:vt.iconContainer,children:Le}),o&&(0,a.jsx)(Ns.A,{variant:"subtitle2",component:"span",className:vt.label,children:o}),(0,a.jsx)("div",{className:vt.secondaryAction,children:N})]}),un=Dt?Ie:Le,Fr={onClick:y,className:dn()(tt,vt.root,Dt?vt.open:vt.closed,Ws(r)&&vt.buttonItem,{[vt.highlightable]:!C})},Nr=(0,ir.s)(),{pathname:Ks}=(0,p.x$)(!Ws(r)&&r.to?r.to:""),kr=(0,Ct.useCallback)(hi=>{if(!T){const pi="click",gi=o??"Sidebar Item",fi=Ks?{attributes:{to:Ks}}:void 0;Nr.captureEvent(pi,gi,fi)}y?.(hi)},[Nr,o,Ks,T,y]);return Ws(r)?(0,a.jsx)(d.A,{role:"button","aria-label":o,...Fr,ref:e,onClick:kr,children:un}):(0,a.jsx)(Ha,{...Fr,activeClassName:vt.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...mt,onClick:kr,children:un})}),Va=({children:r,...e})=>{const{sidebarConfig:n}=(0,Ct.useContext)(Se.yY),o=es(n),[i,c]=(0,Ct.useState)(!1),C=(0,p.zy)(),y=Ka(r,C),T=(0,Pr.A)(at=>at.breakpoints.down("sm")),N=()=>{c(!0)},tt=()=>{c(!1)},mt=()=>T?i?(0,a.jsx)($a.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ua.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(Lr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(Se.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:tt,onTouchStart:i?tt:N,onMouseEnter:N,className:dn()(i&&o.highlighted),children:[(0,a.jsx)(jr,{hasSubmenu:!0,className:y?o.selected:"",...e,children:mt()}),i&&r]})})},Ur=(0,Ct.forwardRef)((r,e)=>{const[n]=(0,_n.O)(r.children,o=>o.getElements().filter(i=>i.type===za));return n?(0,a.jsx)(Va,{...r,children:n}):(0,a.jsx)(jr,{...r,ref:e})});function Li(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,o]=useState(""),i=es(e),c=r.icon?r.icon:SearchIcon,C=()=>{r.onSearch(n),o("")},y=mt=>{mt.key==="Enter"&&(mt.preventDefault(),C())},T=mt=>{o(mt.target.value)},N=mt=>{mt.preventDefault(),mt.stopPropagation()},tt=mt=>{C(),mt.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Ur,{icon:c,to:r.to,onClick:tt,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:N,onChange:T,onKeyDown:y,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Mi=(0,ts.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Bi=(0,ts.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),Ga=(0,ts.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ya=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),ji=(0,ts.A)("div")(({theme:r})=>{const e=Ya(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Ui=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=es(r),{isOpen:n,setOpen:o}=useSidebarOpenState();if(useMediaQuery(C=>C.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!n)};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:n?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Qa=(0,qe.A)({root:{width:Se.hC.drawerWidthClosed,height:3*Se.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Se.hC.drawerWidthClosed,marginLeft:24}}),Za=()=>{const r=Qa(),{isOpen:e}=Fs();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(Sr.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(ga,{}):(0,a.jsx)(ma,{})})})},Ja=({children:r})=>(0,a.jsxs)(Or.G,{children:[(0,a.jsxs)(Ma,{children:[(0,a.jsx)(Za,{}),(0,a.jsx)(Ga,{}),(0,a.jsx)(Ur,{icon:ha.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Xa=t(71677),_a=t(62437),qa=t(55484),ti=t(45061),ei=t(67289);const ni=(0,qe.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 si=function(r){return r.LIGHT="light",r.DARK="dark",r}(si||{});const ri=()=>{const r=(0,In.gf)(Vn),e=ni(),[n,o]=(0,Ct.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:qa.A,title:"Dark theme"},dark:{icon:_a.A,title:"Light theme"}},{title:c,icon:C}=i[n],y=()=>{o(T=>{const N=T==="light"?"dark":"light";return r.setActiveThemeId(N),N})};return(0,a.jsx)(rn.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Xa.Ay,{title:c,arrow:!0,children:(0,a.jsx)(wr.A,{size:"small",onClick:y,children:(0,a.jsx)(C,{className:e.headerIcon})})})})},oi=()=>(0,a.jsxs)(b.Wj,{children:[(0,a.jsx)(ti.T,{}),(0,a.jsx)(ei.p,{withSearch:!1})]}),ai=(0,a.jsx)(oi,{}),$r=Fo({apis:ia,configLoader:ua,plugins:Object.values(s)}),ii=$r.getProvider(),ci=$r.getRouter(),li=b.Ju.provide((0,u.Hr)({name:"ThemeToggleAddon",component:ri,location:f.e.Header})),di=(0,a.jsxs)(gr,{children:[(0,a.jsx)(p.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(p.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(ra,{})}),(0,a.jsx)(p.qh,{path:"/docs",element:(0,a.jsx)(b.$j,{}),children:(0,a.jsx)(g.K,{})}),(0,a.jsxs)(p.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(b.Wj,{}),children:[ai,(0,a.jsx)(u.po,{children:(0,a.jsx)(li,{})})]})]}),ui=()=>(0,a.jsx)(ii,{children:(0,a.jsx)(ci,{children:(0,a.jsx)(Ja,{children:di})})});A.createRoot(document.getElementById("root")).render((0,a.jsx)(ui,{}))},43836:(H,S,t)=>{"use strict";t.d(S,{qO:()=>p,tK:()=>A});var s=t(14041),a=t(63544);function A(g){return(0,a.Q)(g,()=>(0,s.createContext)(void 0))}function p(g){return(0,s.useContext)(A(g))}function b(g){return{set(u){globalThis[`__@backstage/${g}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${g}__`]}}}},10602:(H,S,t)=>{"use strict";t.d(S,{B:()=>s});function s(a){Object.freeze(a);const A={atVersion(p){return a[p]}};return Object.defineProperty(A,"$map",{configurable:!0,enumerable:!0,get(){return a}}),A}},63544:(H,S,t)=>{"use strict";t.d(S,{Q:()=>p});function s(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=s(),A=b=>`__@backstage/${b}__`;function p(b,g){const u=A(b);let f=a[u];return f||(f=g(),a[u]=f,f)}},7341:(H,S,t)=>{"use strict";t.d(S,{v:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.catalog.service"})},82292:(H,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.catalog.entity-presentation"})},88083:(H,S,t)=>{"use strict";t.d(S,{T:()=>b});var s=t(6820),a=t(72348),A=t(46123),p=t.n(A);function b(d,v){const{kind:h,namespace:x,name:O,title:P,description:B,displayName:M,type:I}=u(d),D=(0,s.U2)({kind:h||"unknown",namespace:x||a.oQ,name:O||"unknown"}),$=f({kind:h,namespace:x,name:O,context:v}),k=[M,P,$].find(z=>z&&typeof z=="string"),X=[k!==D?D:void 0,I,B].filter(z=>z&&typeof z=="string").join(" | ");return{entityRef:D,primaryTitle:k,secondaryTitle:X||void 0,Icon:void 0}}const g=d=>!!d&&typeof d=="string";function u(d){if(typeof d=="string"){let v=d.indexOf(":");const h=d.indexOf("/");h!==-1&&h<v&&(v=-1);const x=v===-1?void 0:d.slice(0,v),O=h===-1?void 0:d.slice(v+1,h),P=d.slice(Math.max(v+1,h+1));return{kind:x,namespace:O,name:P}}if(typeof d=="object"&&d!==null){const v=[p()(d,"kind")].find(g),h=[p()(d,"metadata.namespace"),p()(d,"namespace")].find(g),x=[p()(d,"metadata.name"),p()(d,"name")].find(g),O=[p()(d,"metadata.title")].find(g),P=[p()(d,"metadata.description")].find(g),B=[p()(d,"spec.profile.displayName")].find(g),M=[p()(d,"spec.type")].find(g);return{kind:v,namespace:h,name:x,title:O,description:P,displayName:B,type:M}}return{}}function f(d){const v=d.kind?.toLocaleLowerCase("en-US")||"unknown",h=d.namespace||a.oQ,x=d.name||"unknown",O=d.context?.defaultKind?.toLocaleLowerCase("en-US"),P=d.context?.defaultNamespace?.toLocaleLowerCase("en-US");let B=x;return(P&&h.toLocaleLowerCase("en-US")!==P||h!==a.oQ)&&(B=`${h}/${B}`),O&&v.toLocaleLowerCase("en-US")!==O&&(B=`${v}:${B}`),B}},3169:(H,S,t)=>{"use strict";t.d(S,{f:()=>u});var s=t(6820),a=t(72427),A=t(14041),p=t(82292),b=t(88083);function g(f,d,v){const[h,x]=(0,A.useState)(f);return(0,A.useEffect)(()=>{x(f);const O=d?.subscribe({next:P=>{x(P)},complete:()=>{O?.unsubscribe()}});return()=>{O?.unsubscribe()}},v),h}function u(f,d){const h=(0,a.Q2)().get(p.n),x=[h,JSON.stringify(f),JSON.stringify(d||null)],O=(0,A.useMemo)(()=>{if(!h){const P=(0,b.T)(f,d);return{snapshot:P,promise:Promise.resolve(P)}}return h.forEntity(typeof f=="string"||"metadata"in f?f:(0,s.U2)(f),d)},x);return g(O.snapshot,O.update$,[O])}},18:(H,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"catalog-react.starred-entities"})},22995:(H,S,t)=>{"use strict";t.d(S,{Q:()=>z});var s=t(31085),a=t(10394),A=t(72501),p=t(4321),b=t(87263),g=t(16249),u=t(33145),f=t(58837),d=t(87051),v=t(12398),h=t(6924),x=t(20577),O=t(14041),P=t(45250),B=t.n(P),M=t(53373),I=t.n(M);const D=(0,f.A)(Y=>({root:{margin:Y.spacing(1,0)},label:{position:"relative",fontWeight:"bold",fontSize:Y.typography.body2.fontSize,fontFamily:Y.typography.fontFamily,color:Y.palette.text.primary,"& > span":{top:0,left:0,position:"absolute"}}}),{name:"BackstageAutocomplete"}),$=(0,d.A)(Y=>(0,v.A)({root:{},paper:{margin:0},hasClearIcon:{},hasPopupIcon:{},focused:{},inputRoot:{marginTop:24,backgroundColor:Y.palette.background.paper,"$root$hasClearIcon$hasPopupIcon &":{paddingBlock:Y.spacing(.75),paddingInlineStart:Y.spacing(.75)},"$root$focused &":{outline:"none"},"$root &:hover > fieldset":{borderColor:"#ced4da"},"$root$focused & > fieldset":{borderWidth:1,borderColor:Y.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:Y.typography.body1.fontSize,paddingBlock:Y.spacing(.8125)}}}),{name:"BackstageAutocompleteBase"})(x.Ay),k=Y=>(0,s.jsx)(b.A,{...Y,transition:!0,placement:"bottom-start",children:({TransitionProps:K})=>(0,s.jsx)(u.A,{...K,style:{transformOrigin:"0 0 0"},children:(0,s.jsx)(a.A,{children:Y.children})})}),X=Y=>(0,s.jsx)(p.A,{...Y,elevation:8});function z(Y){const{label:K,name:dt,LabelProps:G,TextFieldProps:Q,...J}=Y,ct=D(),pt=(0,O.useCallback)(xt=>(0,s.jsx)(g.A,{...(0,P.merge)(xt,Q),variant:"outlined"}),[Q]),yt=(0,s.jsx)($,{size:"small",...J,renderInput:J.renderInput??pt,popupIcon:(0,s.jsx)(h.A,{"data-testid":`${dt}-expand`}),PaperComponent:X,PopperComponent:k});return(0,s.jsx)(a.A,{className:ct.root,children:K?(0,s.jsxs)(A.A,{...G,className:I()(ct.label,G?.className),component:"label",children:[(0,s.jsx)(a.A,{component:"span",children:K}),yt]}):yt})}},54203:(H,S,t)=>{"use strict";t.d(S,{GI:()=>B});var s=t(31085),a=t(14041),A=t(10394),p=t(64947),b=t(73845),g=t(42899),u=t(72501),f=t(5893),d=t(54917),v=t(65859),h=t(64630),x=t(87849);const O=M=>{const I=(0,f.A)(z=>z.breakpoints.down(M.options?.drawerBreakpoint??"md"),{noSsr:!0}),D=(0,d.A)(),[$,k]=(0,a.useState)(!1),{t:X}=(0,x.i)(h.j);return I?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.A,{style:{marginTop:D.spacing(1),marginLeft:D.spacing(1)},onClick:()=>k(!0),startIcon:(0,s.jsx)(v.A,{}),children:X("catalogFilter.buttonTitle")}),(0,s.jsx)(b.Ay,{open:$,onClose:()=>k(!1),anchor:M.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,s.jsxs)(A.A,{m:2,children:[(0,s.jsx)(u.A,{variant:"h6",component:"h2",style:{marginBottom:D.spacing(1)},children:X("catalogFilter.title")}),M.children]})})]}):(0,s.jsx)(g.A,{item:!0,lg:2,children:M.children})},P=M=>(0,s.jsx)(g.A,{item:!0,xs:12,lg:10,children:M.children}),B=M=>(0,s.jsx)(g.A,{container:!0,style:{position:"relative"},children:M.children});B.Filters=O,B.Content=P},47144:(H,S,t)=>{"use strict";t.d(S,{y:()=>X});var s=t(31085),a=t(10394),A=t(58837),p=t(14041),b=t(72427),g=t(73466),u=t(7341),f=t(69076),d=t(86901),v=t(44148),h=t(41260);const x=(0,s.jsx)(h.A,{fontSize:"small"}),O=(0,s.jsx)(v.A,{fontSize:"small"});function P({selected:z}){return(0,s.jsx)(f.A,{icon:x,checkedIcon:O,checked:z})}const B=(0,p.memo)(z=>{const{selected:Y,value:K,availableOptions:dt,showCounts:G}=z,Q=G?`${K} (${dt?.[K]})`:K;return(0,s.jsx)(d.A,{control:(0,s.jsx)(P,{selected:Y}),label:Q,onClick:J=>J.preventDefault()})});var M=t(21405),I=t(26796),D=t(22995),$=t(45250);const k=(0,A.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function X(z){const{label:Y,name:K,path:dt,showCounts:G,Filter:Q,InputProps:J,initialSelectedOptions:ct=[],filtersForAvailableValues:pt=["kind"],hidden:yt}=z,xt=k(),{updateFilters:Pt,filters:Rt,queryParameters:{[K]:ut}}=(0,M.nK)(),lt=(0,b.gf)(u.v),bt=pt.map(ot=>Rt[ot]),{value:gt}=(0,g.A)(async()=>{const ot=dt,{facets:j}=await lt.getEntityFacets({facets:[ot],filter:(0,I.Rr)(bt.filter(Boolean))});return Object.fromEntries(j[ot].map(({value:V,count:nt})=>[V,nt]))},[...bt]),Ot=(0,p.useMemo)(()=>[ut].flat().filter(Boolean),[ut]),Tt=Rt[K]?.values,[it,ft]=(0,p.useState)(Ot.length?Ot:Tt??ct);(0,p.useEffect)(()=>{Ot.length&&ft(Ot)},[Ot]);const Et=Object.keys(gt??{}),et=it.length&&Et.length;(0,p.useEffect)(()=>{Pt({[K]:et?new Q(it):void 0})},[K,et,it,Q,Pt]),(0,p.useEffect)(()=>{if(!et)return;const ot=Tt??[];(0,$.isEqual)(ot,it)||ft(ot)},[Tt]);const At=Rt[K];return At&&typeof At=="object"&&!("values"in At)||!Et.length||yt?null:(0,s.jsx)(a.A,{className:xt.root,pb:1,pt:1,children:(0,s.jsx)(D.Q,{multiple:!0,disableCloseOnSelect:!0,label:Y,name:`${String(K)}-picker`,options:Et,value:it,TextFieldProps:J,onChange:(ot,j)=>ft(j),renderOption:(ot,{selected:j})=>(0,s.jsx)(B,{selected:j,value:ot,availableOptions:gt,showCounts:!!G})})})}},72987:(H,S,t)=>{"use strict";t.d(S,{t:()=>Tt});var s=t(31085),a=t(6820),A=t(10394),p=t(69076),b=t(86901),g=t(72501),u=t(71677),f=t(58837),d=t(44148),v=t(41260),h=t(14041),x=t(21405),O=t(92822),P=t(92367),B=t(48108),M=t(47966),I=t(90184),D=t(72427),$=t(87290),k=t(7341);function X({enabled:it}){const ft=(0,D.gf)(k.v),[Et]=(0,h.useState)(async()=>{if(!it)return[];const et="relations.ownedBy";return ft.getEntityFacets({facets:[et]}).then(At=>At.facets[et].map(ot=>ot.value).map(ot=>{const{kind:j,name:V,namespace:nt}=(0,a.KU)(ot);return{apiVersion:"backstage.io/v1beta1",kind:j,metadata:{name:V,namespace:nt}}}).sort((ot,j)=>ot.kind.localeCompare(j.kind,"en-US")||ot.metadata.namespace.localeCompare(j.metadata.namespace,"en-US")||ot.metadata.name.localeCompare(j.metadata.name,"en-US"))).catch(()=>[])});return(0,$.A)(async(et,At)=>{const ot=await Et;if(!ot)return{items:[]};const j=At?.limit??20,{text:V,start:nt}=z(et),St=ot.filter(Bt=>dt(V,Bt)),ht=nt+j;return{items:St.slice(0,ht),...K({entities:St,limit:ht,payload:{text:V,start:ht}})}},[Et],{loading:!0,value:{items:[]}})}function z(it){return Y(it)&&it.cursor?JSON.parse(atob(it.cursor)):{text:it.text||"",start:0}}function Y(it){return!!it.cursor}function K({entities:it,limit:ft,payload:Et}){return it.length>ft?{cursor:btoa(JSON.stringify(Et))}:{}}function dt(it,ft){const Et=it.trim();return ft.kind.includes(Et)||ft.metadata.namespace?.includes(Et)||ft.metadata.name.includes(Et)}function G(){const it=(0,D.gf)(k.v);return(0,$.A)(async(ft,Et)=>{const et=ft,At=ft,ot=Et?.limit??20;if(At.cursor){const V=await it.queryEntities({cursor:At.cursor,limit:ot});return{cursor:V.pageInfo.nextCursor,items:[...At.items,...V.items]}}const j=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:ot});return{cursor:j.pageInfo.nextCursor,items:j.items}},[],{loading:!0})}var Q=t(76842);function J({mode:it,initialSelectedOwnersRefs:ft}){const Et=it==="owners-only",et=G(),At=X({enabled:Et}),[ot,j]=Et?At:et;return[ot,j,ct({enabled:!Et,initialSelectedOwnersRefs:ft})]}function ct({enabled:it,initialSelectedOwnersRefs:ft}){const Et=(0,h.useRef)({}),et=(0,D.gf)(k.v),[,At]=(0,$.A)(async()=>{(await et.getEntitiesByRefs({entityRefs:ft})).items.forEach(j=>{j&&(Et.current[(0,a.U2)(j)]=j)})},[]);return(0,Q.u)(()=>{it&&ft.length>0&&At()}),{getEntity:ot=>Et.current[ot],setEntity:ot=>{Et.current[(0,a.U2)(ot)]=ot}}}var pt=t(87051),yt=t(3169),xt=t(64630),Pt=t(87849),Rt=t(22995);const ut=(0,f.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),lt=(0,pt.A)(it=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(b.A),bt=(0,s.jsx)(v.A,{fontSize:"small"}),gt=(0,s.jsx)(d.A,{fontSize:"small"});function Ot(it){const ft=ut(),Et=it.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:et}=(0,yt.f)(it.entity);return(0,s.jsx)(A.A,{className:ft.fullWidth,children:(0,s.jsx)(lt,{className:ft.fullWidth,control:(0,s.jsx)(p.A,{icon:bt,checkedIcon:gt,checked:it.isSelected}),onClick:At=>At.preventDefault(),label:(0,s.jsx)(u.Ay,{title:et,children:(0,s.jsxs)(A.A,{display:"flex",alignItems:"center",children:[Et?(0,s.jsx)(M.A,{fontSize:"small"}):(0,s.jsx)(B.A,{fontSize:"small"}),"\xA0",(0,s.jsx)(A.A,{className:ft.boxLabel,children:(0,s.jsx)(g.A,{noWrap:!0,children:et})})]})})})})}const Tt=it=>{const ft=ut(),{mode:Et="owners-only"}=it||{},{updateFilters:et,filters:At,queryParameters:{owners:ot}}=(0,x.nK)(),[j,V]=(0,h.useState)(""),{t:nt}=(0,Pt.i)(xt.j),St=(0,h.useMemo)(()=>[ot].flat().filter(Boolean),[ot]),[ht,Bt]=(0,h.useState)(St.length?St:At.owners?.values??[]),[{value:Wt,loading:Ut},Jt,Kt]=J({mode:Et,initialSelectedOwnersRefs:ht});(0,P.s)(()=>Jt({text:j}),[j,Jt],250);const te=Wt?.items||[];return(0,h.useEffect)(()=>{if(St.length){const jt=new O.N9(St);Bt(jt.values)}},[St]),(0,h.useEffect)(()=>{et({owners:ht.length?new O.N9(ht):void 0})},[ht,et]),["user","group"].includes(At.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,s.jsx)(A.A,{className:ft.root,pb:1,pt:1,children:(0,s.jsx)(Rt.Q,{label:nt("entityOwnerPicker.title"),multiple:!0,disableCloseOnSelect:!0,loading:Ut,options:te,value:ht,getOptionSelected:(jt,Ft)=>typeof Ft=="string"?(0,a.U2)(jt)===Ft:jt===Ft,getOptionLabel:jt=>{const Ft=typeof jt=="string"?Kt.getEntity(jt)||(0,a.KU)(jt,{defaultKind:"group",defaultNamespace:"default"}):jt;return(0,I.Z)(Ft,(0,I.S)(Ft))},onChange:(jt,Ft)=>{V(""),Bt(Ft.map(le=>{const he=typeof le=="string"?le:(0,a.U2)(le);return typeof le!="string"&&Kt.setEntity(le),he}))},filterOptions:jt=>jt,renderOption:(jt,{selected:Ft})=>(0,s.jsx)(Ot,{entity:jt,isSelected:Ft}),name:"owner-picker",onInputChange:(jt,Ft)=>{V(Ft)},ListboxProps:{onScroll:jt=>{const Ft=jt.currentTarget;Math.abs(Ft.scrollHeight-Ft.clientHeight-Ft.scrollTop)<1&&Wt?.cursor&&Jt({items:Wt.items,cursor:Wt.cursor})},"data-testid":"owner-picker-listbox"},LabelProps:{className:ft.label},TextFieldProps:{className:ft.input}})})}},8859:(H,S,t)=>{"use strict";t.d(S,{z:()=>x});var s=t(31085),a=t(72072),A=t(9222),p=t(14041),b=t(29207),g=t(10394),u=t(71677),f=t(58837),d=t(3169);const v=(0,f.A)(P=>({root:{display:"inline-flex",alignItems:"center",textDecoration:"inherit"},icon:{marginRight:P.spacing(.5),color:P.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),h=P=>{const{entityRef:B,hideIcon:M,disableTooltip:I,defaultKind:D,defaultNamespace:$}=P,k=v(),{primaryTitle:X,secondaryTitle:z,Icon:Y}=(0,d.f)(B,{defaultKind:D,defaultNamespace:$});let K=(0,s.jsx)(s.Fragment,{children:X});return K=(0,s.jsxs)(g.A,{component:"span",className:k.root,children:[Y&&!M?(0,s.jsx)(g.A,{component:"span",className:k.icon,children:(0,s.jsx)(Y,{fontSize:"inherit"})}):null,K]}),z&&!I&&(K=(0,s.jsx)(u.Ay,{enterDelay:1500,title:z,children:K})),K},x=(0,p.forwardRef)((P,B)=>{const{entityRef:M,defaultKind:I,defaultNamespace:D,title:$,children:k,hideIcon:X,disableTooltip:z,...Y}=P,K=O(P.entityRef),dt=k??$??(0,s.jsx)(h,{entityRef:M,defaultKind:I,defaultNamespace:D,hideIcon:X,disableTooltip:z});return(0,s.jsx)(a.N_,{...Y,ref:B,to:K,children:dt})});function O(P){const B=(0,A.S)(b.s),M=(0,b.$)(P,{encodeParams:!0});return B(M)}},34428:(H,S,t)=>{"use strict";t.d(S,{i:()=>b});var s=t(31085),a=t(6820),A=t(14041),p=t(8859);function b(g){const{entityRefs:u,hideIcons:f,...d}=g;return(0,s.jsx)(s.Fragment,{children:u.map((v,h)=>{const x=typeof v=="string"?v:(0,a.U2)(v);return(0,s.jsxs)(A.Fragment,{children:[h>0&&", ",(0,s.jsx)(p.z,{...d,entityRef:v,hideIcon:f})]},`${h}.${x}`)})})}},90184:(H,S,t)=>{"use strict";t.d(S,{S:()=>p,Z:()=>b});var s=t(72348),a=t(46123),A=t.n(a);function p(g,u){const f=u?.defaultKind;let d,v,h;return"metadata"in g?(d=g.kind,v=g.metadata.namespace,h=g.metadata.name):(d=g.kind,v=g.namespace,h=g.name),(v===void 0||v==="")&&(v=s.oQ),u?.defaultNamespace!==void 0?u?.defaultNamespace===v&&(v=void 0):v===s.oQ&&(v=void 0),d=d.toLocaleLowerCase("en-US"),d=f&&f.toLocaleLowerCase("en-US")===d?void 0:d,`${d?`${d}:`:""}${v?`${v}/`:""}${h}`}function b(g,u){for(const f of["spec.profile.displayName","metadata.title"]){const d=A()(g,f);if(d&&typeof d=="string")return d}return u}},91035:(H,S,t)=>{"use strict";t.d(S,{m:()=>f});var s=t(31085),a=t(58837),A=t(92822),p=t(47144),b=t(64630),g=t(87849);const u=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),f=d=>{const v=u(),{t:h}=(0,g.i)(b.j);return(0,s.jsx)(p.y,{label:h("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:A.q_,showCounts:d.showCounts,InputProps:{className:v.input},initialSelectedOptions:d.initialFilter?d.initialFilter:[],hidden:d.hidden})}},67626:(H,S,t)=>{"use strict";t.d(S,{y:()=>Rt});var s=t(31085),a=t(72427),A=t(65461),p=t(40703),b=t(58007),g=t(68804),u=t(65569),f=t(5951),d=t(26343),v=t(72501),h=t(58837),x=t(9684),O=t(31129),P=t(14041),B=t(92822),M=t(21405),I=t(16009),D=t(45250),$=t(73466),k=t(7341),X=t(26796),z=t(87290),Y=t(48899);function K(){const ut=(0,a.gf)(I.K),lt=(0,a.gf)(k.v),{filters:bt}=(0,M.nK)(),{value:gt,loading:Ot}=(0,$.A)(async()=>(await ut.getBackstageIdentity()).ownershipEntityRefs,[]),{user:Tt,owners:it,...ft}=bt,{orderFields:Et,...et}=(0,X.$3)((0,D.compact)(Object.values(ft))),[{value:At,loading:ot},j]=(0,z.A)(async nt=>{const St=dt(nt.owners,nt.ownershipEntityRefs);if(St===void 0)return 0;const{["metadata.name"]:ht,...Bt}=nt.filter.filter,{totalItems:Wt}=await lt.queryEntities({...nt.filter,filter:{...Bt,"relations.ownedBy":St},limit:0});return Wt},[],{loading:!0});return(0,Y.A)(()=>{Object.keys(et.filter).length!==0&&gt!==void 0&&j({ownershipEntityRefs:gt,owners:it,filter:et})},[gt,it,et]),{count:At,loading:Ot||ot,filter:(0,P.useMemo)(()=>B.tN.owned(gt??[]),[gt]),ownershipEntityRefs:gt}}function dt(ut,lt){if(lt===void 0)return;const bt=ut?.values??[];if(bt.length){const gt=(0,D.intersection)(bt,lt);return gt.length===0?void 0:gt}return lt}function G(){const ut=(0,a.gf)(k.v),{filters:lt}=(0,M.nK)(),bt=(0,P.useRef)(),gt=(0,P.useMemo)(()=>{const{user:it,...ft}=lt,Et=(0,D.compact)(Object.values(ft)),{orderFields:et,...At}=(0,X.$3)(Et),ot={...At,limit:0};return Object.keys(At.filter).length===0?(bt.current=void 0,bt.current):(0,D.isEqual)(ot,bt.current)?bt.current:(bt.current=ot,ot)},[lt]),{value:Ot,loading:Tt}=(0,$.A)(async()=>{if(gt===void 0)return 0;const{totalItems:it}=await ut.queryEntities(gt);return it},[gt]);return{count:Ot,loading:Tt}}var Q=t(6820),J=t(56889);function ct(){const ut=(0,a.gf)(k.v),{filters:lt}=(0,M.nK)(),{starredEntities:bt}=(0,J.I)(),gt=(0,P.useRef)(),Ot=(0,P.useMemo)(()=>{const{user:Et,...et}=lt,At=(0,D.compact)(Object.values(et)),{orderFields:ot,...j}=(0,X.$3)(At),nt={...j,filter:{...j.filter,["metadata.name"]:Array.from(bt).map(St=>(0,Q.KU)(St).name)},limit:1e3};return(0,D.isEqual)(nt,gt.current)?gt.current:(gt.current=nt,nt)},[lt,bt]),{value:Tt,loading:it}=(0,$.A)(async()=>bt.size?(await ut.queryEntities(Ot)).items.map(et=>(0,Q.U2)({kind:et.kind,namespace:et.metadata.namespace,name:et.metadata.name})).filter(et=>bt.has(et)).length:0,[Ot,bt]),ft=(0,P.useMemo)(()=>B.tN.starred(Array.from(bt)),[bt]);return{count:Tt,loading:it,filter:ft}}var pt=t(87849),yt=t(64630);const xt=(0,h.A)(ut=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:ut.spacing(1,0,1,0)},title:{margin:ut.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:ut.palette.text.primary},menuItem:{minHeight:ut.spacing(6)},groupWrapper:{margin:ut.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Pt(ut,lt){return[{name:lt("userListPicker.personalFilter.title"),items:[{id:"owned",label:lt("userListPicker.personalFilter.ownedLabel"),icon:x.A},{id:"starred",label:lt("userListPicker.personalFilter.starredLabel"),icon:O.Gg}]},{name:ut,items:[{id:"all",label:lt("userListPicker.orgFilterAllLabel")}]}]}const Rt=ut=>{const{initialFilter:lt,availableFilters:bt,hidden:gt,alwaysKeepFilters:Ot}=ut,Tt=xt(),it=(0,a.gf)(A.U),{t:ft}=(0,pt.i)(yt.j),Et=it.getOptionalString("organization.name")??ft("userListPicker.defaultOrgName"),{filters:et,updateFilters:At,queryParameters:{kind:ot,user:j}}=(0,M.nK)(),V=["starred","all"],nt=Pt(Et,ft).map(Yt=>({...Yt,items:Yt.items.filter(({id:re})=>["group","user"].some(de=>de===ot)?V.includes(re):!bt||bt.includes(re))})).filter(({items:Yt})=>!!Yt.length),{count:St,loading:ht,filter:Bt}=K(),{count:Wt}=G(),{count:Ut,filter:Jt,loading:Kt}=ct(),te=(0,P.useMemo)(()=>[j].flat()[0],[j]),[jt,Ft]=(0,P.useState)(te??lt),le=(0,P.useMemo)(()=>({all:Wt,starred:Ut,owned:St}),[Ut,St,Wt]);(0,P.useEffect)(()=>{te&&Ft(te)},[te]);const he=ht||Kt;return(0,P.useEffect)(()=>{!he&&jt&&jt!=="all"&&le[jt]===0&&!Ot&&Ft("all")},[he,le,jt,Ft,Ot]),(0,P.useEffect)(()=>{if(!jt||he)return;At({user:jt==="owned"?Bt:jt==="starred"?Jt:B.tN.all()})},[jt,Jt,Bt,At,he]),gt?null:(0,s.jsx)(p.A,{className:Tt.root,children:nt.map(Yt=>(0,s.jsxs)(P.Fragment,{children:[(0,s.jsx)(v.A,{variant:"subtitle2",component:"span",className:Tt.title,children:Yt.name}),(0,s.jsx)(p.A,{className:Tt.groupWrapper,children:(0,s.jsx)(b.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":Yt.name,children:Yt.items.map((re,de)=>(0,s.jsxs)(d.A,{role:"none presentation",divider:de!==Yt.items.length-1,onClick:()=>Ft(re.id),selected:re.id===et.user?.value,className:Tt.menuItem,disabled:le[re.id]===0,"data-testid":`user-picker-${re.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[re.icon&&(0,s.jsx)(g.A,{className:Tt.listIcon,children:(0,s.jsx)(re.icon,{fontSize:"small"})}),(0,s.jsx)(f.A,{children:(0,s.jsxs)(v.A,{variant:"body1",children:[re.label," "]})}),(0,s.jsx)(u.A,{children:le[re.id]??"-"})]},re.id))})})]},Yt.name))})}},92822:(H,S,t)=>{"use strict";t.d(S,{I5:()=>d,Kf:()=>O,N9:()=>f,V3:()=>u,gM:()=>p,gZ:()=>x,mT:()=>P,qA:()=>b,q_:()=>g,tN:()=>h,z:()=>v});var s=t(6820),a=t(51372),A=t(67871);class p{value;label;constructor(I,D){this.value=I,this.label=D}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class b{value;constructor(I){this.value=I}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class g{values;constructor(I){this.values=I}filterEntity(I){return this.values.every(D=>(I.metadata.tags??[]).includes(D))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class u{value;constructor(I){this.value=I}filterEntity(I){const D=this.toUpperArray(this.value.split(/\s/)),$=this.toUpperArray([I.metadata.tags]),k=this.toUpperArray([I.metadata.name,I.metadata.title,I.spec?.profile?.displayName]);for(const X of D)if($.every(z=>z!==X)&&k.every(z=>!z.includes(X)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(I){return I.flat().filter(D=>!!D).map(D=>D.toLocaleUpperCase("en-US"))}}class f{values;constructor(I){this.values=I.reduce((D,$)=>{try{return D.push((0,s.U2)((0,s.KU)($,{defaultKind:"Group"}))),D}catch{return D}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(I){return this.values.some(D=>(0,A.t)(I,a.vv).some($=>(0,s.U2)($)===D))}toQueryValue(){return this.values}}class d{values;constructor(I){this.values=I}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(I){return this.values.some(D=>I.spec?.lifecycle===D)}toQueryValue(){return this.values}}class v{values;constructor(I){this.values=I}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(I){return this.values.some(D=>I.metadata.namespace===D)}toQueryValue(){return this.values}}class h{value;refs;constructor(I,D){this.value=I,this.refs=D}static owned(I){return new h("owned",I)}static all(){return new h("all")}static starred(I){return new h("starred",I)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(I=>(0,s.KU)(I).name)??[]}:{}}filterEntity(I){if(this.value==="starred")return this.refs?.includes((0,s.U2)(I))??!0;if(this.value==="owned"){const D=(0,A.t)(I,a.vv);return this.refs?.some($=>D.some(k=>(0,s.U2)(k)===$))??!1}return!0}toQueryValue(){return this.value}}class x{value;isOwnedEntity;isStarredEntity;constructor(I,D,$){this.value=I,this.isOwnedEntity=D,this.isStarredEntity=$}filterEntity(I){switch(this.value){case"owned":return this.isOwnedEntity(I);case"starred":return this.isStarredEntity(I);default:return!0}}toQueryValue(){return this.value}}class O{value;constructor(I){this.value=I}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(I){const D=I.metadata.annotations?.["backstage.io/orphan"];return D!==void 0&&this.value.toString()===D}}class P{value;constructor(I){this.value=I}filterEntity(I){const D=I?.status?.items?.length>0;return D!==void 0&&this.value===D}}class B{values;constructor(I){this.values=I}getOrderFilters(){return this.values.map(([I,D])=>({field:I,order:D}))}toQueryValue(){return this.values.flat()}}},21405:(H,S,t)=>{"use strict";t.d(S,{B9:()=>B,nK:()=>M});var s=t(31085),a=t(45250),A=t.n(a),p=t(45810),b=t.n(p),g=t(14041),u=t(18690),f=t(87290),d=t(22771),v=t(71581),h=t(7341),x=t(26796),O=t(72427);const P=(0,g.createContext)(void 0),B=I=>{const D=(0,v.A)(),$=(0,O.gf)(h.v),[k,X]=(0,g.useState)({}),z=(0,u.zy)(),K=I.pagination===!0?"cursor":typeof I.pagination=="object"?I.pagination.mode??"cursor":"none",dt=typeof I.pagination=="object"?I.pagination.limit??20:20,{queryParameters:G,cursor:Q,offset:J,limit:ct}=(0,g.useMemo)(()=>{const et=b().parse(z.search,{ignoreQueryPrefix:!0});let At=dt;if(typeof et.limit=="string"){const j=Number.parseInt(et.limit,10);isNaN(j)||(At=j)}const ot=typeof et.offset=="string"&&K==="offset"?Number.parseInt(et.offset,10):void 0;return{queryParameters:et.filters??{},cursor:typeof et.cursor=="string"&&K==="cursor"?et.cursor:void 0,offset:K==="offset"&&ot&&!isNaN(ot)?ot:void 0,limit:At}},[K,z.search,dt]),[pt,yt]=(0,g.useState)(Q),[xt,Pt]=(0,g.useState)(J),[Rt,ut]=(0,g.useState)(ct),[lt,bt]=(0,g.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:{},offset:xt,limit:Rt})),[{loading:gt,error:Ot},Tt]=(0,f.A)(async()=>{const et=k.kind?.value?.toLocaleLowerCase("en-US"),At=et==="user"||et==="group"?{...k,owners:void 0}:k,ot=(0,a.compact)(Object.values(At)),j=Object.keys(k).reduce((V,nt)=>{const St=k[nt];return St?.toQueryValue&&(V[nt]=St.toQueryValue()),V},{});if(K!=="none")if(pt){if(pt!==lt.appliedCursor){const V=(0,x.be)(ot),nt=await $.queryEntities({cursor:pt,limit:Rt});bt({appliedFilters:k,appliedCursor:pt,backendEntities:nt.items,entities:nt.items.filter(V),pageInfo:nt.pageInfo,totalItems:nt.totalItems})}}else{const V=(0,x.be)(ot),nt=(0,x.$3)(ot),St=(0,x.$3)((0,a.compact)(Object.values(lt.appliedFilters)));if(K==="offset"&&(lt.limit!==Rt||lt.offset!==xt)||!(0,a.isEqual)(St,nt)){const ht=await $.queryEntities({...nt,limit:Rt,offset:xt});bt({appliedFilters:k,backendEntities:ht.items,entities:ht.items.filter(V),pageInfo:ht.pageInfo,totalItems:ht.totalItems,limit:Rt,offset:xt})}}else{const V=(0,x.be)(ot),nt=(0,x.Rr)(ot),St=(0,x.Rr)((0,a.compact)(Object.values(lt.appliedFilters)));if((0,a.isEqual)(St,nt)){const ht=lt.backendEntities.filter(V);bt({appliedFilters:k,backendEntities:lt.backendEntities,entities:ht,totalItems:ht.length})}else{const ht=await $.getEntities({filter:nt}),Bt=ht.items.filter(V);bt({appliedFilters:k,backendEntities:ht.items,entities:Bt,totalItems:Bt.length})}}if(D()){const V=b().parse(z.search,{ignoreQueryPrefix:!0}),nt=b().stringify({...V,filters:j,cursor:pt,offset:xt,limit:Rt},{addQueryPrefix:!0,arrayFormat:"repeat"}),St=`${window.location.pathname}${nt}`;window.history?.replaceState(null,document.title,St)}},[$,G,k,lt,pt,K,Rt,xt],{loading:!0});(0,d.A)(Tt,10,[k,pt,Rt,xt]);const it=(0,g.useCallback)(et=>{K==="cursor"?yt(void 0):K==="offset"&&Pt(0),X(At=>{const ot=typeof et=="function"?et(At):et;return{...At,...ot}})},[K]),ft=(0,g.useMemo)(()=>{if(K!=="cursor")return;const et=lt.pageInfo?.prevCursor,At=lt.pageInfo?.nextCursor;return{prev:et?()=>yt(et):void 0,next:At?()=>yt(At):void 0}},[K,lt.pageInfo]),Et=(0,g.useMemo)(()=>({filters:lt.appliedFilters,entities:lt.entities,backendEntities:lt.backendEntities,updateFilters:it,queryParameters:G,loading:gt,error:Ot,pageInfo:ft,totalItems:lt.totalItems,limit:Rt,offset:xt,setLimit:ut,setOffset:Pt,paginationMode:K}),[lt,it,G,gt,Ot,ft,Rt,xt,K,ut,Pt]);return(0,s.jsx)(P.Provider,{value:Et,children:I.children})};function M(){const I=(0,g.useContext)(P);if(!I)throw new Error("useEntityList must be used within EntityListProvider");return I}},56889:(H,S,t)=>{"use strict";t.d(S,{I:()=>u});var s=t(6820),a=t(72427),A=t(14041),p=t(1394),b=t(18);function g(f){return typeof f=="string"?f:(0,s.U2)(f)}function u(){const f=(0,a.gf)(b.a),d=(0,p.A)((0,A.useMemo)(()=>f.starredEntitie$(),[f]),new Set),v=(0,A.useCallback)(x=>d.has(g(x)),[d]),h=(0,A.useCallback)(x=>f.toggleStarred(g(x)).then(),[f]);return{starredEntities:d,toggleStarredEntity:h,isStarredEntity:v}}},29207:(H,S,t)=>{"use strict";t.d(S,{$:()=>g,s:()=>b});var s=t(6820),a=t(72348),A=t(34569),p=t(63544);const b=(0,p.Q)("catalog:entity-route-ref",()=>(0,A.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function g(u,f){let d,v,h;if(typeof u=="string"){const O=(0,s.KU)(u);d=O.kind,v=O.namespace,h=O.name}else"metadata"in u?(d=u.kind,v=u.metadata.namespace,h=u.metadata.name):(d=u.kind,v=u.namespace,h=u.name);d=d.toLocaleLowerCase("en-US"),v=v?.toLocaleLowerCase("en-US")??a.oQ;const{encodeParams:x=!1}=f||{};return x&&(d=encodeURIComponent(d),v=encodeURIComponent(v),h=encodeURIComponent(h)),{kind:d,namespace:v,name:h}}},64630:(H,S,t)=>{"use strict";t.d(S,{j:()=>a});var s=t(93184);const a=(0,s.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:()=>p,Rr:()=>b,be:()=>g});var s=t(92822);function a(u){return!!u.getFullTextFilters}function A(u){return!!u.getOrderFilters}function p(u){const f=u.reduce((h,x)=>({...h,...x.getCatalogFilters?x.getCatalogFilters():{}}),{}),d=u.find(a)?.getFullTextFilters(),v=u.find(A)?.getOrderFilters()||[{field:"metadata.name",order:"asc"}];return{filter:f,fullTextFilter:d,orderFields:v}}function b(u){const f={};return u.forEach(d=>{d instanceof s.q_||d instanceof s.N9||d instanceof s.I5||d instanceof s.z||d instanceof s.tN||d instanceof s.Kf||d instanceof s.V3||d instanceof s.gZ||Object.assign(f,d.getCatalogFilters?.()||{})}),f}function g(u){return f=>u.every(d=>!d.filterEntity||d.filterEntity(f))}},67871:(H,S,t)=>{"use strict";t.d(S,{t:()=>a});var s=t(6820);function a(A,p,b){let g=A?.relations?.filter(u=>u.type===p).map(u=>(0,s.KU)(u.targetRef))||[];return b?.kind&&(g=g.filter(u=>u.kind.toLocaleLowerCase("en-US")===b.kind.toLocaleLowerCase("en-US"))),g}},95203:(H,S,t)=>{"use strict";t.d(S,{qP:()=>g,Zg:()=>f,rQ:()=>v,pS:()=>d,UJ:()=>u});var s=t(59598);class a{id;params;optional;defaultTarget;[p=s.b];constructor(x,O,P,B){this.id=x,this.params=O,this.optional=P,this.defaultTarget=B,this[p]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function A(h){return new a(h.id,h.params??[],!!h.optional,h?.defaultTarget)}var p,b=t(34569);const g=A({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),u=A({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),f=A({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),d=A({id:"catalog:unregister-redirect",optional:!0}),v=(0,b.H)({id:"catalog"})},13646:(H,S,t)=>{"use strict";t.d(S,{OL:()=>a});function s(f,d){return f.name===d.name}function a(f,d){return"resourceType"in f?!d||f.resourceType===d:!1}function A(f){return f.attributes.action==="create"}function p(f){return f.attributes.action==="read"}function b(f){return f.attributes.action==="update"}function g(f){return f.attributes.action==="delete"}function u(f){return{authorize:async(d,v)=>await f.authorize(d,v),authorizeConditional(d,v){const h=d;return f.authorize(h,v)}}}},54241:(H,S,t)=>{"use strict";t.d(S,{b:()=>s});var s=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 s=t(55309);const a=(0,s.y)({id:"plugin.permission.api"})},70734:(H,S,t)=>{"use strict";t.d(S,{e:()=>b});var s=t(31085),a=t(14041),A=t(58837);const p=(0,A.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),b=g=>{const{text:u,preTag:f,postTag:d}=g,v=p(),h=(0,a.useMemo)(()=>u.split(new RegExp(`(${f}.+?${d})`)),[d,f,u]);return(0,s.jsx)(s.Fragment,{children:h.map((x,O)=>x.includes(f)?(0,s.jsx)("mark",{className:v.highlight,children:x.replace(new RegExp(`${f}|${d}`,"g"),"")},O):x)})}},54560:(H,S,t)=>{"use strict";t.d(S,{ec:()=>d});var s=t(31085),a=t(14041),A=t(93368),p=t(88758),b=t(8109);const g="search.results.list.items.extensions.v1",u=(x,O)=>{for(const P of x)if(!(!isValidElement(P)||!getComponentData(P,g)?.(O)))return cloneElement(P,{rank:O.rank,highlight:O.highlight,result:O.document,...P.props});return null},f=x=>{const{rank:O,result:P,noTrack:B,children:M,alignItems:I="flex-start",...D}=x,$=(0,A.s)(),k=(0,a.useCallback)(()=>{B||P&&$.captureEvent("discover",P.title,{attributes:{to:P.location},value:O})},[O,P,B,$]);return(0,s.jsx)(b.A,{divider:!0,alignItems:I,onClickCapture:k,...D,children:M})},d=x=>{const{name:O,component:P,predicate:B=()=>!0}=x;return(0,p.zZ)({name:O,component:{lazy:()=>P().then(M=>I=>(0,s.jsx)(f,{rank:I.rank,result:I.result,noTrack:I.noTrack,children:(0,a.createElement)(M,I)}))},data:{[g]:B}})},v=x=>{const O=useElementFilter(x,P=>P.selectByComponentData({key:g}).getElements(),[x]);return useCallback((P,B)=>{const M=u(O,P);return _jsx(Fragment,{children:M??_jsx(f,{rank:P.rank,result:P.document,children:_jsx(DefaultResultListItem,{rank:P.rank,highlight:P.highlight,result:P.document})})},B)},[O])},h=x=>{const{results:O,children:P,...B}=x,M=v(P);return _jsx(List,{...B,children:O.map(M)})}},86202:(H,S,t)=>{"use strict";t.d(S,{A:()=>s,G:()=>a});const s="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity"},72020:(H,S,t)=>{"use strict";t.d(S,{AF:()=>f,Hr:()=>h,Wm:()=>u,YR:()=>B,po:()=>d});var s=t(31085),a=t(14041),A=t(18690),p=t(19402),b=t(88758),g=t(82442);const u="techdocs.addons.addon.v1",f="techdocs.addons.wrapper.v1",d=()=>null;(0,p.h)(d,f,!0);const v=M=>`${u}.${M.toLocaleLowerCase("en-US")}`;function h(M){const{name:I,component:D}=M;return(0,b.zZ)({name:I,component:{sync:$=>(0,s.jsx)(D,{...$})},data:{[u]:M,[v(I)]:!0}})}const x=(M,I)=>M.selectByComponentData({key:I}).getElements()[0],O=M=>M.selectByComponentData({key:f}).selectByComponentData({key:u}),P=M=>M.selectByComponentData({key:f}).findComponentData({key:u}),B=()=>{const M=(0,A.P1)(),I=(0,g.O)(M,O),D=(0,g.O)(M,P),$=(0,a.useCallback)(z=>{if(!I||!z)return null;const Y=v(z.name);return x(I,Y)??null},[I]),k=(0,a.useCallback)(z=>{const Y=D.find(K=>K.name===z);return Y?$(Y):null},[D,$]),X=(0,a.useCallback)(z=>{const Y=D.filter(K=>K.location===z);return Y.length?Y.map($):null},[D,$]);return{renderComponentByName:k,renderComponentsByLocation:X}}},26679:(H,S,t)=>{"use strict";t.d(S,{l:()=>a,s:()=>A});var s=t(55309);const a=(0,s.y)({id:"plugin.techdocs.service"}),A=(0,s.y)({id:"plugin.techdocs.storageservice"})},86892:(H,S,t)=>{"use strict";t.d(S,{R:()=>M,V:()=>I});var s=t(31085),a=t(14041),A=t(73466),p=t(28966),b=t(6820),g=t(43836),u=t(10602),f=t(72427),d=t(65461),v=t(25862),h=t(26679);function x(D,$){return $.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(D.kind=D.kind.toLocaleLowerCase(),D.name=D.name.toLocaleLowerCase(),D.namespace=D.namespace.toLocaleLowerCase()),D}const O=(D,$)=>(0,b.U2)(D)===(0,b.U2)($),P={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},B=(0,g.tK)("techdocs-reader-page-context"),M=(0,a.memo)(D=>{const{entityRef:$,children:k}=D,X=(0,f.gf)(h.l),z=(0,f.gf)(d.U),Y=(0,A.A)(async()=>X.getEntityMetadata($),[$]),K=(0,p.A)(async()=>X.getTechDocsMetadata($),[$]),[dt,G]=(0,a.useState)(P.title),[Q,J]=(0,a.useState)(P.subtitle),[ct,pt]=(0,a.useState)(P.shadowRoot);(0,a.useEffect)(()=>{ct&&!K.value&&!K.loading&&K.retry()},[K.value,K.loading,ct,K.retry,K]);const yt={metadata:K,entityRef:x($,z),entityMetadata:Y,shadowRoot:ct,setShadowRoot:pt,title:dt,setTitle:G,subtitle:Q,setSubtitle:J},xt=(0,u.B)({1:yt});return(0,s.jsx)(v.Ig,{attributes:{entityRef:(0,b.U2)($)},children:(0,s.jsx)(B.Provider,{value:xt,children:k instanceof Function?k(yt):k})})},(D,$)=>O(D.entityRef,$.entityRef)),I=()=>{const D=(0,a.useContext)(B);if(D===void 0)return P;const $=D.atVersion(1);if($===void 0)throw new Error("No context found for version 1.");return $}},99730:(H,S,t)=>{"use strict";t.d(S,{e:()=>s});const s=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(H,S,t)=>{"use strict";t.d(S,{V:()=>s});function s(a,A){return A.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},8915:(H,S,t)=>{"use strict";t.d(S,{K:()=>Rt});var s=t(31085),a=t(59428),A=t(27586),p=t(26280),b=t(21405),g=t(54203),u=t(67626),f=t(72987),d=t(91035),v=t(81859),h=t(14041),x=t(86519),O=t(86202);class P{getCatalogFilters(){return{[`metadata.annotations.${O.A}`]:x.c}}}const B=()=>{const{updateFilters:ut}=(0,b.nK)();return(0,h.useEffect)(()=>{ut({techdocs:new P})},[ut]),null};var M=t(36338),I=t(45250),D=t(88640),$=t(77310),k=t(9222),X=t(72427),z=t(65461),Y=t(56889),K=t(27125),dt=t(14209),G=t(92822);function Q(ut){const{actions:lt,columns:bt,data:gt,isLoading:Ot,options:Tt}=ut,{updateFilters:it,setLimit:ft,setOffset:Et,limit:et,totalItems:At,offset:ot}=(0,b.nK)(),[j,V]=(0,h.useState)(ot&&et?Math.floor(ot/et):0);return(0,h.useEffect)(()=>{At&&j*et>=At?Et(Math.max(0,At-et)):Et(Math.max(0,j*et))},[Et,j,et,At]),(0,s.jsx)(dt.X,{columns:bt,data:gt,options:{paginationPosition:"both",pageSizeOptions:[5,10,20,50,100],pageSize:et,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,...Tt},actions:lt,onSearchChange:nt=>it({text:nt?new G.V3(nt):void 0}),page:j,onPageChange:nt=>{V(nt)},onRowsPerPageChange:nt=>{ft(nt)},totalCount:At,localization:{pagination:{labelDisplayedRows:""}},isLoading:Ot})}function J(ut){const{actions:lt,columns:bt,data:gt,next:Ot,prev:Tt,title:it,isLoading:ft,options:Et,...et}=ut;return(0,s.jsx)(dt.X,{title:ft?"":it,columns:bt,data:gt,options:{paginationPosition:"both",...Et,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1,actionsColumnIndex:-1},onPageChange:At=>{At>0?Ot?.():Tt?.()},page:Tt?1:0,totalCount:Ot?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},isLoading:ft,...et})}var ct=t(84295),pt=t(42717),yt=t(82779),xt=t(23747);const Pt=ut=>{const{columns:lt,actions:bt,options:gt}=ut,{loading:Ot,error:Tt,entities:it,filters:ft,paginationMode:Et,pageInfo:et}=(0,b.nK)(),{isStarredEntity:At,toggleStarredEntity:ot}=(0,Y.I)(),[,j]=(0,M.A)(),V=(0,k.S)(yt.Oc),nt=(0,X.gf)(z.U),St=(0,I.capitalize)(ft.user?.value??"all"),ht=[ct.f.createCopyDocsUrlAction(j),ct.f.createStarEntityAction(At,ot)],Bt=(0,xt.H)(it,V,nt);return Et==="cursor"?(0,s.jsx)(J,{columns:lt||pt.F,isLoading:Ot,title:St,actions:bt||ht,options:gt,data:Bt,next:et?.next,prev:et?.prev}):Et==="offset"?(0,s.jsx)(Q,{columns:lt||pt.F,isLoading:Ot,title:St,actions:bt||ht,options:gt,data:Bt}):Tt?(0,s.jsx)(D.B,{severity:"error",title:"Could not load available documentation.",children:(0,s.jsx)($.z,{language:"text",text:Tt.toString()})}):(0,s.jsx)(K.o,{title:St,entities:it,loading:Ot,actions:bt||ht,columns:lt,options:gt})};Pt.columns=pt.B,Pt.actions=ct.f;const Rt=ut=>{const{initialFilter:lt="owned",columns:bt,actions:gt,ownerPickerMode:Ot,pagination:Tt,options:it,PageWrapper:ft,CustomHeader:Et}=ut,et=ft||v.S,At=Et||(()=>(0,s.jsx)(a.d,{title:"",children:(0,s.jsx)(A.Y,{children:"Discover documentation in your ecosystem."})}));return(0,s.jsx)(et,{children:(0,s.jsxs)(p.U,{children:[(0,s.jsx)(At,{}),(0,s.jsx)(b.B9,{pagination:Tt,children:(0,s.jsxs)(g.GI,{children:[(0,s.jsxs)(g.GI.Filters,{children:[(0,s.jsx)(B,{}),(0,s.jsx)(u.y,{initialFilter:lt}),(0,s.jsx)(f.t,{mode:Ot}),(0,s.jsx)(d.m,{})]}),(0,s.jsx)(g.GI.Content,{children:(0,s.jsx)(Pt,{actions:gt,columns:bt,options:it})})]})})]})})}},27125:(H,S,t)=>{"use strict";t.d(S,{o:()=>O});var s=t(31085),a=t(36338),A=t(9222),p=t(72427),b=t(65461),g=t(82779),u=t(14209),f=t(44186),d=t(73896),v=t(84295),h=t(42717),x=t(23747);const O=P=>{const{entities:B,title:M,loading:I,columns:D,actions:$,options:k}=P,[,X]=(0,a.A)(),z=(0,A.S)(g.Oc),Y=(0,p.gf)(b.U);if(!B)return null;const K=(0,x.H)(B,z,Y),dt=[v.f.createCopyDocsUrlAction(X)],G=20,Q=K&&K.length>G;return(0,s.jsx)(s.Fragment,{children:I||K&&K.length>0?(0,s.jsx)(u.X,{isLoading:I,options:{paging:Q,pageSize:G,search:!0,actionsColumnIndex:-1,...k},data:K,columns:D||h.F,actions:$||dt,title:M?`${M} (${K.length})`:`All (${K.length})`}):(0,s.jsx)(f.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,s.jsx)(d.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};O.columns=h.B,O.actions=v.f},84295:(H,S,t)=>{"use strict";t.d(S,{f:()=>p});var s=t(31085),a=t(55290),A=t(18956);const p={createCopyDocsUrlAction(b){return g=>({icon:()=>(0,s.jsx)(a.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>b(`${window.location.origin}${g.resolved.docsUrl}`)})},createStarEntityAction(b,g){return u=>{const f=u.entity,d=b(f);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,s.jsx)(A.m,{isFavorite:d}),tooltip:d?"Remove from favorites":"Add to favorites",onClick:()=>g(f)}}}}},42717:(H,S,t)=>{"use strict";t.d(S,{B:()=>d,F:()=>v});var s=t(31085),a=t(10394),A=t(58837);const p=(0,A.A)(h=>({value:{marginBottom:h.spacing(.75)},subvalue:{color:h.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function b(h){const{value:x,subvalue:O}=h,P=p();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{className:P.value,children:x}),(0,s.jsx)(a.A,{className:P.subvalue,children:O})]})}var g=t(72072),u=t(34428);function f(h){return h.metadata.title||h.metadata.name}const d={createTitleColumn(h){return{...d.createNameColumn(),field:"entity.metadata.title",hidden:h?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(h,x)=>{const O=f(h.entity).toLocaleLowerCase(),P=f(x.entity).toLocaleLowerCase();return O.localeCompare(P)},render:h=>(0,s.jsx)(b,{value:(0,s.jsx)(g.N_,{to:h.resolved.docsUrl,children:f(h.entity)}),subvalue:h.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:h})=>(0,s.jsx)(u.i,{entityRefs:h.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}},v=[d.createTitleColumn({hidden:!0}),d.createNameColumn(),d.createOwnerColumn(),d.createKindColumn(),d.createTypeColumn()]},23747:(H,S,t)=>{"use strict";t.d(S,{H:()=>b});var s=t(51372),a=t(67871),A=t(90184),p=t(95768);function b(g,u,f){return g.map(d=>{const v=(0,a.t)(d,s.vv);return{entity:d,resolved:{docsUrl:u({namespace:(0,p.V)(d.metadata.namespace??"default",f),kind:(0,p.V)(d.kind,f),name:(0,p.V)(d.metadata.name,f)}),ownedByRelations:v,ownedByRelationsTitle:v.map(h=>(0,A.S)(h,{defaultKind:"group"})).join(", ")}}})}},81859:(H,S,t)=>{"use strict";t.d(S,{S:()=>b});var s=t(31085),a=t(27155),A=t(72427),p=t(65461);const b=g=>{const{children:u,CustomPageWrapper:f}=g,v=`Documentation available in ${(0,A.gf)(p.U).getOptionalString("organization.name")??"Backstage"}`;return(0,s.jsx)(s.Fragment,{children:f?(0,s.jsx)(f,{children:u}):(0,s.jsx)(a.d,{title:"Documentation",subtitle:v,themeId:"documentation",children:u})})}},39278:(H,S,t)=>{"use strict";t.d(S,{$j:()=>$,Wj:()=>k,Ju:()=>B});var s=t(26679),a=t(70835),A=t(97142),p=t(92110);class b{configApi;discoveryApi;fetchApi;constructor(Y){this.configApi=Y.configApi,this.discoveryApi=Y.discoveryApi,this.fetchApi=Y.fetchApi}async getCookie(){const K=`${await this.getApiOrigin()}/cookie`,dt=await this.fetchApi.fetch(`${K}`,{credentials:"include"});if(!dt.ok)throw await a.o.fromResponse(dt);return await dt.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(Y){const{kind:K,namespace:dt,name:G}=Y,J=`${await this.getApiOrigin()}/metadata/techdocs/${dt}/${K}/${G}`,ct=await this.fetchApi.fetch(`${J}`);if(!ct.ok)throw await a.o.fromResponse(ct);return await ct.json()}async getEntityMetadata(Y){const{kind:K,namespace:dt,name:G}=Y,J=`${await this.getApiOrigin()}/metadata/entity/${dt}/${K}/${G}`,ct=await this.fetchApi.fetch(`${J}`);if(!ct.ok)throw await a.o.fromResponse(ct);return await ct.json()}}class g{configApi;discoveryApi;fetchApi;constructor(Y){this.configApi=Y.configApi,this.discoveryApi=Y.discoveryApi,this.fetchApi=Y.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(Y,K){const{kind:dt,namespace:G,name:Q}=Y,ct=`${await this.getStorageUrl()}/${G}/${dt}/${Q}/${K}`,pt=await this.fetchApi.fetch(`${ct.endsWith("/")?ct:`${ct}/`}index.html`);let yt="";switch(pt.status){case 404:throw yt="Page not found. ",K||(yt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new A.m_(yt);case 500:throw yt="Could not generate documentation or an error in the TechDocs backend. ",new Error(yt);default:break}return pt.text()}async syncEntityDocs(Y,K=()=>{}){const{kind:dt,namespace:G,name:Q}=Y,ct=`${await this.getApiOrigin()}/sync/${G}/${dt}/${Q}`;return new Promise((pt,yt)=>{const xt=new AbortController;(0,p.y)(ct,{fetch:this.fetchApi.fetch,signal:xt.signal,onmessage(Pt){if(Pt.event==="log")Pt.data&&K(JSON.parse(Pt.data));else if(Pt.event==="finish"){let Rt=!1;Pt.data&&({updated:Rt}=JSON.parse(Pt.data)),pt(Rt?"updated":"cached")}else Pt.event==="error"&&yt(new Error(Pt.data))},onerror(Pt){throw xt.abort(),yt(Pt),Pt}})})}async getBaseUrl(Y,K,dt){const{kind:G,namespace:Q,name:J}=K,pt=`${await this.getApiOrigin()}/static/docs/${Q}/${G}/${J}/${dt}`;return new URL(Y,pt.endsWith("/")?pt:`${pt}/`).toString()}}var u=t(82779),f=t(9803),d=t(12935),v=t(65461),h=t(57405),x=t(70795),O=t(88758),P=t(54560);const B=(0,f.i)({id:"techdocs",apis:[(0,d.b)({api:s.s,deps:{configApi:v.U,discoveryApi:h.I,fetchApi:x.a},factory:({configApi:z,discoveryApi:Y,fetchApi:K})=>new g({configApi:z,discoveryApi:Y,fetchApi:K})}),(0,d.b)({api:s.l,deps:{configApi:v.U,discoveryApi:h.I,fetchApi:x.a},factory:({configApi:z,discoveryApi:Y,fetchApi:K})=>new b({configApi:z,discoveryApi:Y,fetchApi:K})})],routes:{root:u.rQ,docRoot:u.Oc,entityContent:u.Ri}}),M=B.provide((0,O.QJ)({name:"TechdocsPage",component:()=>t.e(8803).then(t.bind(t,38803)).then(z=>z.Router),mountPoint:u.rQ})),I=B.provide((0,O.QJ)({name:"EntityTechdocsContent",component:()=>t.e(8803).then(t.bind(t,38803)).then(z=>z.LegacyEmbeddedDocsRouter),mountPoint:u.Ri})),D=B.provide((0,O.QJ)({name:"TechDocsCustomHome",component:()=>t.e(5470).then(t.bind(t,25470)).then(z=>z.TechDocsCustomHome),mountPoint:u.rQ})),$=B.provide((0,O.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(z=>z.TechDocsIndexPage),mountPoint:u.rQ})),k=B.provide((0,O.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(z=>z.TechDocsReaderPage),mountPoint:u.Oc})),X=B.provide((0,P.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(z=>z.TechDocsSearchResultListItem),predicate:z=>z.type==="techdocs"}))},67289:(H,S,t)=>{"use strict";t.d(S,{p:()=>$e});var s=t(31085),a=t(14041),A=t(42899),p=t(58837),b=t(86892),g=t(9394),u=t(91360),f=t(22856);const d="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",v=m=>{(0,a.useEffect)(()=>{if(!m)return()=>{};const L=m.querySelectorAll('head > link[rel="stylesheet"]');let U=L?.length??0;const F=new CustomEvent(d);if(!U)return m.dispatchEvent(F),()=>{};const W=()=>{--U===0&&m.dispatchEvent(F)};return L?.forEach(_=>{_.addEventListener("load",W)}),()=>{L?.forEach(_=>{_.removeEventListener("load",W)})}},[m])},h=m=>{const[L,U]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!m)return()=>{};U(!0);const F=m.style;F.setProperty("opacity","0");const W=()=>{U(!1),F.setProperty("opacity","1")};return m.addEventListener(d,W),()=>{m.removeEventListener(d,W)}},[m]),L},x=m=>{const{element:L,onAppend:U,children:F}=m,[W,_]=(0,a.useState)((0,g.vt)({...(0,f.A)(),insertionPoint:void 0}));v(L);const rt=(0,a.useCallback)(wt=>{if(!L||!wt)return;_((0,g.vt)({...(0,f.A)(),insertionPoint:L.querySelector("head")||void 0}));let It=wt.shadowRoot;It||(It=wt.attachShadow({mode:"open"})),It.replaceChildren(L),typeof U=="function"&&U(It)},[L,U]);return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(u.Ay,{jss:W,sheetsManager:new Map,children:[(0,s.jsx)("div",{ref:rt,"data-testid":"techdocs-native-shadowroot"}),F]})})};var O=t(12784);const P=()=>{const{shadowRoot:m}=(0,b.V)();return m},B=m=>{const L=P(),[U,F]=(0,a.useState)(L?.firstChild);return(0,a.useEffect)(()=>{let W;return L&&(W=new MutationObserver(()=>{F(L?.firstChild)}),W.observe(L,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>W?.disconnect()},[L]),!U||!(U instanceof HTMLElement)?[]:m.map(W=>U.querySelectorAll(W)).filter(W=>W.length).map(W=>Array.from(W)).flat()},M=m=>m.toString()&&m.rangeCount&&m.getRangeAt(0).getBoundingClientRect().top,I=(m=0)=>{const L=P(),[U,F]=useState(null),W=useMemo(()=>debounce(()=>{const _=L,rt=_.getSelection?_.getSelection():document.getSelection();rt&&M(rt)?F(rt):F(null)},m),[L,F,m]);return useEffect(()=>(window.document.addEventListener("selectionchange",W),()=>{W.cancel(),window.document.removeEventListener("selectionchange",W)}),[W]),U};var D=t(26280),$=t(68146),k=t(45250),X=t(73466),z=t(5877),Y=t(43836),K=t(10602),dt=t(72427),G=t(93368),Q=t(25862),J=t(65461),ct=t(55309);const pt=(0,ct.y)({id:"plugin.search.queryservice"});class yt{mockedResults;constructor(L){this.mockedResults=L}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const xt=(0,Y.tK)("search-context"),Pt=()=>{const m=(0,a.useContext)(xt);if(!m)throw new Error("useSearch must be used within a SearchContextProvider");const L=m.atVersion(1);if(!L)throw new Error("No SearchContext v1 found");return L},Rt=()=>(0,a.useContext)(xt)!==void 0,ut={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},lt=(m=ut)=>{const L=(0,dt.gf)(pt),U=(0,G.s)(),[F,W]=(0,a.useState)(m.term),[_,rt]=(0,a.useState)(m.types),[wt,It]=(0,a.useState)(m.filters),[$t,Lt]=(0,a.useState)(m.pageLimit),[kt,Xt]=(0,a.useState)(m.pageCursor),fe=(0,z.A)(F),Ht=(0,z.A)(wt),qt=(0,X.A)(async()=>{const ne=await L.query({term:F,types:_,filters:wt,pageLimit:$t,pageCursor:kt});return F&&U.captureEvent("search",F,{value:ne.numberOfResults}),ne},[F,_,wt,$t,kt]),ye=!qt.loading&&!qt.error&&qt.value?.nextPageCursor,ae=!qt.loading&&!qt.error&&qt.value?.previousPageCursor,Qt=(0,a.useCallback)(()=>{Xt(qt.value?.nextPageCursor)},[qt.value?.nextPageCursor]),Zt=(0,a.useCallback)(()=>{Xt(qt.value?.previousPageCursor)},[qt.value?.previousPageCursor]);return(0,a.useEffect)(()=>{fe!==void 0&&F!==fe&&Xt(void 0)},[F,fe,Xt]),(0,a.useEffect)(()=>{Ht!==void 0&&!(0,k.isEqual)(wt,Ht)&&Xt(void 0)},[wt,Ht,Xt]),{result:qt,term:F,setTerm:W,types:_,setTypes:rt,filters:wt,setFilters:It,pageLimit:$t,setPageLimit:Lt,pageCursor:kt,setPageCursor:Xt,fetchNextPage:ye?Qt:void 0,fetchPreviousPage:ae?Zt:void 0}},bt=m=>{const{initialState:L,children:U}=m,F=lt(L);return(0,s.jsx)(Q.Ig,{attributes:{searchTypes:F.types.sort().join(",")},children:(0,s.jsx)(xt.Provider,{value:(0,K.B)({1:F}),children:U})})},gt=m=>{const{initialState:L,inheritParentContextIfAvailable:U,children:F}=m,W=Rt(),_=(0,dt.gf)(J.U),rt=L??{},wt=_.has("search.query.pageLimit")?{pageLimit:_.getNumber("search.query.pageLimit")}:{},It={...ut,...rt,...wt};return W&&U?(0,s.jsx)(s.Fragment,{children:F}):(0,s.jsx)(bt,{initialState:It,children:F})};var Ot=t(78467),Tt=t(20577),it=t(82266),ft=t(29365),Et=t(34839),et=t(16249),At=t(64947),ot=t(45917),j=t(22771);const V=(0,a.forwardRef)((m,L)=>{const{onChange:U,onKeyDown:F=()=>{},onClear:W=()=>{},onSubmit:_=()=>{},debounceTime:rt=200,clearButton:wt=!0,fullWidth:It=!0,value:$t,label:Lt,placeholder:kt,inputProps:Xt={},InputProps:fe={},endAdornment:Ht,...qt}=m,ye=(0,dt.gf)(J.U),[ae,Qt]=(0,a.useState)(""),Zt=(0,a.useRef)("");(0,a.useEffect)(()=>{Qt(ve=>ve===Zt.current?String($t):ve)},[$t,Zt]),(0,j.A)(()=>{Zt.current=ae,U(ae)},rt,[ae]);const Ct=(0,a.useCallback)(ve=>{Qt(ve.target.value)},[Qt]),ne=(0,a.useCallback)(ve=>{F&&F(ve),_&&ve.key==="Enter"&&_()},[F,_]),ce=(0,a.useCallback)(()=>{Zt.current="",U(""),Qt(""),W&&W()},[U,W]),ue=Lt?void 0:"Search",Je=kt??`Search in ${ye.getOptionalString("app.title")||"Backstage"}`,xe=(0,it.n)().getSystemIcon("search")||ot.A,Xe=(0,s.jsx)(Et.A,{position:"start",children:(0,s.jsx)(ft.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,s.jsx)(xe,{})})}),sn=(0,s.jsx)(Et.A,{position:"end",children:(0,s.jsx)(At.A,{"aria-label":"Clear",size:"small",onClick:ce,onKeyDown:ve=>{ve.key==="Enter"&&ve.stopPropagation()},children:"Clear"})});return(0,s.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(et.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:L,value:ae,label:Lt,placeholder:Je,InputProps:{startAdornment:Xe,endAdornment:wt?sn:Ht,...fe},inputProps:{"aria-label":ue,...Xt},fullWidth:It,onChange:Ct,onKeyDown:ne,...qt})})}),nt=(0,a.forwardRef)((m,L)=>{const{value:U="",onChange:F,...W}=m,{term:_,setTerm:rt}=Pt();(0,a.useEffect)(()=>{U&&rt(String(U))},[U,rt]);const wt=(0,a.useCallback)(It=>{F?F(It):rt(It)},[F,rt]);return(0,s.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(Q.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,s.jsx)(V,{...W,ref:L,value:_,onChange:wt})})})}),St=(0,p.A)(m=>({loading:{right:m.spacing(1),position:"absolute"}})),ht=m=>L=>(0,s.jsx)(gt,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(m,{...L})}),Bt=()=>{const m=St();return(0,s.jsx)(Ot.A,{className:m.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Wt=ht(function(L){const{loading:U,value:F,onChange:W=()=>{},options:_=[],getOptionLabel:rt=Zt=>String(Zt),inputPlaceholder:wt,inputDebounceTime:It,freeSolo:$t=!0,fullWidth:Lt=!0,clearOnBlur:kt=!1,"data-testid":Xt="search-autocomplete",...fe}=L,{setTerm:Ht}=Pt(),qt=(0,a.useCallback)(Zt=>Zt?typeof Zt=="string"?Zt:rt(Zt):"",[rt]),ye=(0,a.useMemo)(()=>qt(F),[F,qt]),ae=(0,a.useCallback)((Zt,Ct,ne,ce)=>{Ht(qt(Ct)),W(Zt,Ct,ne,ce)},[qt,Ht,W]),Qt=(0,a.useCallback)(({InputProps:{ref:Zt,className:Ct,endAdornment:ne},InputLabelProps:ce,...ue})=>(0,s.jsx)(nt,{...ue,ref:Zt,clearButton:!1,value:ye,placeholder:wt,debounceTime:It,endAdornment:U?(0,s.jsx)(Bt,{}):ne,InputProps:{className:Ct}}),[U,ye,wt,It]);return(0,s.jsx)(Tt.Ay,{...fe,"data-testid":Xt,value:F,onChange:ae,options:_,getOptionLabel:rt,renderInput:Qt,freeSolo:$t,fullWidth:Lt,clearOnBlur:kt})});var Ut=t(18690),Jt=t(27698);const Kt=m=>m?.document,te=m=>{const{entityId:L,entityTitle:U,debounceTime:F=150,searchResultUrlMapper:W}=m,[_,rt]=(0,a.useState)(!1),wt=(0,Ut.Zp)(),{setFilters:It,term:$t,result:{loading:Lt,value:kt}}=Pt(),[Xt,fe]=(0,a.useState)([]);(0,a.useEffect)(()=>{let Qt=!0;if(Qt&&kt){const Zt=kt.results.slice(0,10);fe(Zt)}return()=>{Qt=!1}},[Lt,kt]);const{kind:Ht,name:qt,namespace:ye}=L;(0,a.useEffect)(()=>{It(Qt=>({...Qt,kind:Ht,namespace:ye,name:qt}))},[Ht,ye,qt,It]);const ae=(Qt,Zt)=>{if(Kt(Zt)){const{location:Ct}=Zt.document;wt(W?W(Ct):Ct)}};return(0,s.jsx)(Wt,{"data-testid":"techdocs-search-bar",size:"small",open:_&&!!$t,getOptionLabel:()=>"",filterOptions:Qt=>Qt,onClose:()=>{rt(!1)},onOpen:()=>{rt(!0)},onChange:ae,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Xt,renderOption:({document:Qt,highlight:Zt})=>(0,s.jsx)(Jt.TechDocsSearchResultListItem,{result:Qt,lineClamp:3,asListItem:!1,asLink:!1,title:Qt.title,highlight:Zt}),loading:Lt,inputDebounceTime:F,inputPlaceholder:`Search ${U||L.name} docs`,freeSolo:!1})},jt=m=>{const L={term:"",types:["techdocs"],pageCursor:"",filters:m.entityId};return(0,s.jsx)(gt,{initialState:L,children:(0,s.jsx)(te,{...m})})};var Ft=t(74219);const le=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(m=>({default:m.RealLogViewer})));function he(m){const{Progress:L}=(0,it.n)().getComponents();return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(L,{}),children:(0,s.jsx)(le,{...m})})}var Yt=t(73845),re=t(72501),de=t(12398),Ve=t(32881);const se=(0,p.A)(m=>(0,de.A)({paper:{width:"100%",[m.breakpoints.up("sm")]:{width:"75%"},[m.breakpoints.up("md")]:{width:"50%"},padding:m.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:m.palette.background.default}})),on=({buildLog:m,onClose:L})=>{const U=se(),F=m.length===0?"Waiting for logs...":m.join(`
8
- `);return(0,s.jsxs)(A.A,{container:!0,direction:"column",className:U.root,spacing:0,wrap:"nowrap",children:[(0,s.jsxs)(A.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,s.jsx)(re.A,{variant:"h5",children:"Build Details"}),(0,s.jsx)(ft.A,{title:"Close the drawer",onClick:L,color:"inherit",children:(0,s.jsx)(Ve.A,{})},"dismiss")]}),(0,s.jsx)(A.A,{item:!0,xs:!0,children:(0,s.jsx)(he,{text:F,classes:{root:U.logs}})})]})},Te=({buildLog:m})=>{const L=se(),[U,F]=(0,a.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(At.A,{color:"inherit",onClick:()=>F(!0),children:"Show Build Logs"}),(0,s.jsx)(Yt.Ay,{classes:{paper:L.paper},anchor:"right",open:U,onClose:()=>F(!1),children:(0,s.jsx)(on,{buildLog:m,onClose:()=>F(!1)})})]})};var De=t(12173);const Ke=({errorMessage:m})=>{const L=(0,dt.gf)(J.U).getOptionalString("techdocs.builder"),U=(0,G.s)(),{entityRef:F}=(0,b.V)(),W=(0,Ut.zy)();(0,a.useEffect)(()=>{const{pathname:rt,search:wt,hash:It}=W;U.captureEvent("not-found",`${rt}${wt}${It}`,{attributes:F})},[U,F,W]);let _="";return[void 0,"local"].includes(L)||(_="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,s.jsx)(De.M,{status:"404",statusMessage:m||"Documentation not found",additionalInfo:_})};var pe=t(28966),Ge=t(26679);function tn({contentLoading:m,content:L,activeSyncState:U}){return m||U==="BUILD_READY_RELOAD"||!L&&U==="CHECKING"?"CHECKING":!L&&U==="BUILDING"?"INITIAL_BUILD":L?U==="BUILDING"?"CONTENT_STALE_REFRESHING":U==="BUILD_READY"?"CONTENT_STALE_READY":U==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function hn(m,L){const U={...m};switch(L.type){case"sync":L.state==="CHECKING"&&(U.buildLog=[]),U.activeSyncState=L.state,U.syncError=L.syncError;break;case"contentLoading":U.contentLoading=!0,U.contentError=void 0;break;case"content":typeof L.path=="string"&&(U.path=L.path),U.contentLoading=!1,U.content=L.content,U.contentError=L.contentError;break;case"buildLog":U.buildLog=U.buildLog.concat(L.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(U.activeSyncState)&&["contentLoading","content"].includes(L.type)&&(U.activeSyncState="UP_TO_DATE",U.buildLog=[]),U}function an(m,L,U,F){const[W,_]=(0,a.useReducer)(hn,{activeSyncState:"CHECKING",path:F,contentLoading:!0,buildLog:[]}),rt=(0,dt.gf)(Ge.s),{retry:wt}=(0,pe.A)(async()=>{_({type:"contentLoading"});try{const Lt=await rt.getEntityDocs({kind:m,namespace:L,name:U},F);return _({type:"content",content:Lt,path:F}),Lt}catch(Lt){_({type:"content",contentError:Lt,path:F})}},[rt,m,L,U,F]),It=(0,a.useRef)({content:void 0,reload:()=>{}});It.current={content:W.content,reload:wt},(0,X.A)(async()=>{_({type:"sync",state:"CHECKING"});const Lt=setTimeout(()=>{_({type:"sync",state:"BUILDING"})},1e3);try{switch(await rt.syncEntityDocs({kind:m,namespace:L,name:U},Xt=>{_({type:"buildLog",log:Xt})})){case"updated":It.current.content?_({type:"sync",state:"BUILD_READY"}):(It.current.reload(),_({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":_({type:"sync",state:"UP_TO_DATE"});break;default:_({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(kt){_({type:"sync",state:"ERROR",syncError:kt})}finally{clearTimeout(Lt)}},[m,U,L,rt,_,It]);const $t=(0,a.useMemo)(()=>tn({activeSyncState:W.activeSyncState,contentLoading:W.contentLoading,content:W.content}),[W.activeSyncState,W.content,W.contentLoading]);return(0,a.useMemo)(()=>({state:$t,contentReload:wt,path:W.path,content:W.content,contentErrorMessage:W.contentError?.toString(),syncErrorMessage:W.syncError?.toString(),buildLog:W.buildLog}),[$t,wt,W.path,W.content,W.contentError,W.syncError,W.buildLog])}const Ye=(0,a.createContext)({}),en=()=>(0,a.useContext)(Ye),Ne=m=>{const{children:L}=m,{"*":U=""}=(0,Ut.g)(),{entityRef:F}=(0,b.V)(),{kind:W,namespace:_,name:rt}=F,wt=an(W,_,rt,U);return(0,s.jsx)(Ye.Provider,{value:wt,children:L instanceof Function?L(wt):L})},ze=m=>L=>(0,s.jsx)(Ne,{children:(0,s.jsx)(m,{...L})}),Qe=(0,p.A)(m=>({root:{marginBottom:m.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),Ee=()=>{let m=null;const L=Qe(),{state:U,contentReload:F,contentErrorMessage:W,syncErrorMessage:_,buildLog:rt}=en();return U==="INITIAL_BUILD"&&(m=(0,s.jsx)(Ft.A,{classes:{root:L.root},variant:"outlined",severity:"info",icon:(0,s.jsx)(Ot.A,{size:"24px"}),action:(0,s.jsx)(Te,{buildLog:rt}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),U==="CONTENT_STALE_REFRESHING"&&(m=(0,s.jsx)(Ft.A,{variant:"outlined",severity:"info",icon:(0,s.jsx)(Ot.A,{size:"24px"}),action:(0,s.jsx)(Te,{buildLog:rt}),classes:{root:L.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),U==="CONTENT_STALE_READY"&&(m=(0,s.jsx)(Ft.A,{variant:"outlined",severity:"success",action:(0,s.jsx)(At.A,{color:"inherit",onClick:()=>F(),children:"Refresh"}),classes:{root:L.root},children:"A newer version of this documentation is now available, please refresh to view."})),U==="CONTENT_STALE_ERROR"&&(m=(0,s.jsxs)(Ft.A,{variant:"outlined",severity:"error",action:(0,s.jsx)(Te,{buildLog:rt}),classes:{root:L.root,message:L.message},children:["Building a newer version of this documentation failed."," ",_]})),U==="CONTENT_NOT_FOUND"&&(m=(0,s.jsxs)(s.Fragment,{children:[_&&(0,s.jsxs)(Ft.A,{variant:"outlined",severity:"error",action:(0,s.jsx)(Te,{buildLog:rt}),classes:{root:L.root,message:L.message},children:["Building a newer version of this documentation failed."," ",_]}),(0,s.jsx)(Ke,{errorMessage:W})]})),m};var Ze=t(5893),He=t(54917),ke=t(96726),Me=t(71651),Ae=t.n(Me);const cn=/main\.[A-Fa-f0-9]{8}\.min\.css$/,w=/^https:\/\/fonts\.googleapis\.com/,l=/^https:\/\/fonts\.gstatic\.com/,E=m=>m.nodeName==="LINK",R=m=>{const L=m?.getAttribute("href")||"",U=L.match(cn),F=L.match(w),W=L.match(l);return U||F||W},Z=m=>(E(m)&&!R(m)&&m.remove(),m),q=m=>m.nodeName==="IFRAME",st=(m,L)=>{const U=m.getAttribute("src")||"";try{const{host:F}=new URL(U);return L.includes(F)}catch{return!1}},Mt=m=>L=>(q(L)&&!st(L,m)&&L.remove(),L),zt=()=>{const m=(0,dt.gf)(J.U);return(0,a.useMemo)(()=>m.getOptionalConfig("techdocs.sanitizer"),[m])},Vt=()=>{const m=zt();return(0,a.useCallback)(async L=>{const U=m?.getOptionalStringArray("allowedIframeHosts");Ae().addHook("beforeSanitizeElements",Z);const F=["link","meta"];U&&(F.push("iframe"),Ae().addHook("beforeSanitizeElements",Mt(U))),Ae().addHook("uponSanitizeElement",(rt,wt)=>{wt.tagName==="meta"&&(rt.getAttribute("http-equiv")==="refresh"&&rt.getAttribute("content")?.includes("url=")||rt.parentNode?.removeChild(rt))}),Ae().addHook("uponSanitizeAttribute",(rt,wt)=>{rt.tagName!=="meta"&&(wt.attrName==="http-equiv"||wt.attrName==="content")&&rt.removeAttribute(wt.attrName)});const W=m?.getOptionalString("allowedCustomElementTagNameRegExp"),_=m?.getOptionalString("allowedCustomElementAttributeNameRegExp");return Ae().sanitize(L.outerHTML,{ADD_TAGS:F,FORBID_TAGS:["style"],ADD_ATTR:["http-equiv","content","dominant-baseline"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:W?new RegExp(W):void 0,attributeNameCheck:_?new RegExp(_):void 0}})},[m])};var oe=t(34435),_t=t(268);const ge=({theme:m})=>`
9
- /*================== Variables ==================*/
10
- /*
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.
12
- As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
13
- */
14
-
15
- :host {
16
- /* FONT */
17
- --md-default-fg-color: ${m.palette.text.primary};
18
- --md-default-fg-color--light: ${m.palette.text.secondary};
19
- --md-default-fg-color--lighter: ${(0,_t.a)(m.palette.text.secondary,.7)};
20
- --md-default-fg-color--lightest: ${(0,_t.a)(m.palette.text.secondary,.3)};
21
-
22
- /* BACKGROUND */
23
- --md-default-bg-color:${m.palette.background.default};
24
- --md-default-bg-color--light: ${m.palette.background.paper};
25
- --md-default-bg-color--lighter: ${(0,_t.a)(m.palette.background.paper,.7)};
26
- --md-default-bg-color--lightest: ${(0,_t.a)(m.palette.background.paper,.3)};
27
-
28
- /* PRIMARY */
29
- --md-primary-fg-color: ${m.palette.primary.main};
30
- --md-primary-fg-color--light: ${m.palette.primary.light};
31
- --md-primary-fg-color--dark: ${m.palette.primary.dark};
32
- --md-primary-bg-color: ${m.palette.primary.contrastText};
33
- --md-primary-bg-color--light: ${(0,_t.a)(m.palette.primary.contrastText,.7)};
34
-
35
- /* ACCENT */
36
- --md-accent-fg-color: var(--md-primary-fg-color);
37
- --md-accent-fg-color--transparent: ${(0,_t.X4)(m.palette.primary.main,.1)};
38
- --md-accent-bg-color: var(--md-primary-bg-color);
39
- --md-accent-bg-color--light: var(--md-primary-bg-color--light);
40
-
41
- /* SHADOW */
42
- --md-shadow-z1: ${m.shadows[1]};
43
- --md-shadow-z2: ${m.shadows[2]};
44
- --md-shadow-z3: ${m.shadows[3]};
45
-
46
- /* EXTENSIONS */
47
- --md-admonition-fg-color: var(--md-default-fg-color);
48
- --md-admonition-bg-color: var(--md-default-bg-color);
49
- /* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
50
- --md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
51
- --md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
52
- --md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
53
- --md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
54
- --md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
55
- --md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
56
- --md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
57
- --md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
58
- --md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
59
- --md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
60
- --md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
61
- --md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
62
- --md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
63
- --md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
64
- --md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
65
- --md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
66
- --md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
67
- --md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
68
- --md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
69
- --md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
70
- --md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
71
- --md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
72
- --md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
73
- --md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
74
- --md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
75
- --md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
76
-
77
- --md-status--updated: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>cellphone-arrow-down</title><path d="M17,1H7A2,2 0 0,0 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3A2,2 0 0,0 17,1M17,19H7V5H17V19M16,13H13V8H11V13H8L12,17L16,13Z" /></svg>');
78
- --md-status: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m-1 15h2v-6h-2v6Z"/></svg>');
79
- --md-status--new: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m23 12-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12m-10 5h-2v-2h2v2m0-4h-2V7h2v6Z"/></svg>');
80
- --md-status--deprecated: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3H9m0 5h2v9H9V8m4 0h2v9h-2V8Z"/></svg>');
81
- --md-status--encrypted: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4m0 6c1.4 0 2.8 1.1 2.8 2.5V11c.6 0 1.2.6 1.2 1.3v3.5c0 .6-.6 1.2-1.3 1.2H9.2c-.6 0-1.2-.6-1.2-1.3v-3.5c0-.6.6-1.2 1.2-1.2V9.5C9.2 8.1 10.6 7 12 7m0 1.2c-.8 0-1.5.5-1.5 1.3V11h3V9.5c0-.8-.7-1.3-1.5-1.3Z"/></svg>');
82
- }
83
-
84
- :host > * {
85
- /* CODE */
86
- --md-code-fg-color: ${m.palette.text.primary};
87
- --md-code-bg-color: ${m.palette.code?.background??m.palette.background.paper};
88
- --md-code-hl-color: ${(0,_t.X4)(m.palette.warning.main,.5)};
89
- --md-code-hl-color--light: var(--md-code-hl-color);
90
- --md-code-hl-keyword-color: ${m.palette.type==="dark"?m.palette.primary.light:m.palette.primary.dark};
91
- --md-code-hl-function-color: ${m.palette.type==="dark"?m.palette.secondary.light:m.palette.secondary.dark};
92
- --md-code-hl-string-color: ${m.palette.type==="dark"?m.palette.success.light:m.palette.success.dark};
93
- --md-code-hl-number-color: ${m.palette.type==="dark"?m.palette.error.light:m.palette.error.dark};
94
- --md-code-hl-constant-color: var(--md-code-hl-function-color);
95
- --md-code-hl-special-color: var(--md-code-hl-function-color);
96
- --md-code-hl-name-color: var(--md-code-fg-color);
97
- --md-code-hl-comment-color: var(--md-default-fg-color--light);
98
- --md-code-hl-generic-color: var(--md-default-fg-color--light);
99
- --md-code-hl-variable-color: var(--md-default-fg-color--light);
100
- --md-code-hl-operator-color: var(--md-default-fg-color--light);
101
- --md-code-hl-punctuation-color: var(--md-default-fg-color--light);
102
-
103
- /* TYPESET */
104
- --md-typeset-font-size: 1rem;
105
- --md-typeset-color: var(--md-default-fg-color);
106
- --md-typeset-a-color: ${m.palette.link};
107
- --md-typeset-table-color: ${m.palette.text.primary};
108
- --md-typeset-table-color--light: ${(0,_t.X4)(m.palette.text.primary,.05)};
109
- --md-typeset-del-color: ${m.palette.type==="dark"?(0,_t.X4)(m.palette.error.dark,.5):(0,_t.X4)(m.palette.error.light,.5)};
110
- --md-typeset-ins-color: ${m.palette.type==="dark"?(0,_t.X4)(m.palette.success.dark,.5):(0,_t.X4)(m.palette.success.light,.5)};
111
- --md-typeset-mark-color: ${m.palette.type==="dark"?(0,_t.X4)(m.palette.warning.dark,.5):(0,_t.X4)(m.palette.warning.light,.5)};
112
- --md-typeset-kbd-color: var(--md-code-bg-color);
113
- --md-typeset-kbd-accent-color var(--md-code-bg-color);
114
- --md-typeset-kbd-border-color: var(--md-default-fg-color--light);
115
- }
116
-
117
- @media screen and (max-width: 76.1875em) {
118
- :host > * {
119
- /* TYPESET */
120
- --md-typeset-font-size: .9rem;
121
- }
122
- }
123
-
124
- @media screen and (max-width: 600px) {
125
- :host > * {
126
- /* TYPESET */
127
- --md-typeset-font-size: .7rem;
128
- }
129
- }
130
-
131
- --md-footer-bg-color: var(--md-default-bg-color);
132
- --md-footer-bg-color--dark: var(--md-default-bg-color);
133
- `,ee=({theme:m})=>`
134
- /*================== Reset ==================*/
135
-
136
- body {
137
- --md-text-color: var(--md-default-fg-color);
138
- --md-text-link-color: var(--md-accent-fg-color);
139
- --md-text-font-family: ${m.typography.fontFamily};
140
- font-family: var(--md-text-font-family);
141
- background-color: unset;
142
- }
143
- `,Be="224px",me=({theme:m,sidebar:L})=>`
144
- /*================== Layout ==================*/
145
-
146
- /* mkdocs material v9 compat */
147
- .md-nav__title {
148
- color: var(--md-default-fg-color);
149
- }
150
-
151
- .md-grid {
152
- max-width: 100%;
153
- margin: 0;
154
- }
155
-
156
- .md-nav {
157
- font-size: calc(var(--md-typeset-font-size) * 0.9);
158
- }
159
- .md-nav__link:not(:has(svg)) {
160
- display: flex;
161
- align-items: center;
162
- justify-content: space-between;
163
- }
164
- .md-nav__link:has(svg) > .md-ellipsis {
165
- flex-grow: 1;
166
- }
167
- .md-nav__icon {
168
- height: 20px !important;
169
- width: 20px !important;
170
- margin-left:${m.spacing(1)}px;
171
- }
172
- .md-nav__icon svg {
173
- margin: 0;
174
- width: 20px !important;
175
- height: 20px !important;
176
- }
177
- .md-nav__icon:after {
178
- width: 20px !important;
179
- height: 20px !important;
180
- }
181
- .md-status--updated::after {
182
- -webkit-mask-image: var(--md-status--updated);
183
- mask-image: var(--md-status--updated);
184
- }
185
-
186
- .md-nav__item--active > .md-nav__link, a.md-nav__link--active {
187
- text-decoration: underline;
188
- color: var(--md-typeset-a-color);
189
- }
190
- .md-nav__link--active > .md-status:after {
191
- background-color: var(--md-typeset-a-color);
192
- }
193
- .md-nav__link[href]:hover > .md-status:after {
194
- background-color: var(--md-accent-fg-color);
195
- }
196
-
197
- .md-main__inner {
198
- margin-top: 0;
199
- }
200
-
201
- .md-sidebar {
202
- bottom: 75px;
203
- position: fixed;
204
- width: 16rem;
205
- overflow-y: auto;
206
- overflow-x: hidden;
207
- scrollbar-color: rgb(193, 193, 193) #eee;
208
- scrollbar-width: thin;
209
- }
210
- .md-sidebar .md-sidebar__scrollwrap {
211
- width: calc(16rem);
212
- overflow-y: hidden;
213
- }
214
- @supports selector(::-webkit-scrollbar) {
215
- [dir=ltr] .md-sidebar__inner {
216
- padding-right: calc(100% - 15.1rem);
217
- }
218
- }
219
- .md-sidebar--secondary {
220
- right: ${m.spacing(3)}px;
221
- }
222
- .md-sidebar::-webkit-scrollbar {
223
- width: 5px;
224
- }
225
- .md-sidebar::-webkit-scrollbar-button {
226
- width: 5px;
227
- height: 5px;
228
- }
229
- .md-sidebar::-webkit-scrollbar-track {
230
- background: #eee;
231
- border: 1 px solid rgb(250, 250, 250);
232
- box-shadow: 0px 0px 3px #dfdfdf inset;
233
- border-radius: 3px;
234
- }
235
- .md-sidebar::-webkit-scrollbar-thumb {
236
- width: 5px;
237
- background: rgb(193, 193, 193);
238
- border: transparent;
239
- border-radius: 3px;
240
- }
241
- .md-sidebar::-webkit-scrollbar-thumb:hover {
242
- background: rgb(125, 125, 125);
243
- }
244
-
245
- .md-content {
246
- max-width: calc(100% - 16rem * 2);
247
- margin-left: 16rem;
248
- margin-bottom: 50px;
249
- }
250
-
251
- .md-content > .md-sidebar {
252
- left: 16rem;
253
- }
254
-
255
- .md-footer {
256
- position: fixed;
257
- bottom: 0px;
258
- pointer-events: none;
259
- }
260
-
261
- .md-footer-nav__link, .md-footer__link {
262
- pointer-events: all;
263
- }
264
-
265
- .md-footer__title {
266
- background-color: unset;
267
- }
268
- .md-footer-nav__link, .md-footer__link {
269
- width: 16rem;
270
- }
271
-
272
- .md-dialog {
273
- background-color: unset;
274
- }
275
-
276
- @media screen and (min-width: 76.25em) {
277
- .md-sidebar {
278
- height: auto;
279
- }
280
- }
281
-
282
- @media screen and (max-width: 76.1875em) {
283
- .md-nav {
284
- transition: none !important;
285
- background-color: var(--md-default-bg-color)
286
- }
287
- .md-nav--primary .md-nav__title {
288
- cursor: auto;
289
- color: var(--md-default-fg-color);
290
- font-weight: 700;
291
- white-space: normal;
292
- line-height: 1rem;
293
- height: auto;
294
- display: flex;
295
- flex-flow: column;
296
- row-gap: 1.6rem;
297
- padding: 1.2rem .8rem .8rem;
298
- background-color: var(--md-default-bg-color);
299
- }
300
- .md-nav--primary .md-nav__title~.md-nav__list {
301
- box-shadow: none;
302
- }
303
- .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
304
- border-top: none;
305
- }
306
- .md-nav--primary .md-nav__title .md-nav__button {
307
- display: none;
308
- }
309
- .md-nav--primary .md-nav__title .md-nav__icon {
310
- color: var(--md-default-fg-color);
311
- position: static;
312
- height: auto;
313
- margin: 0 0 0 -0.2rem;
314
- }
315
- .md-nav--primary > .md-nav__title [for="none"] {
316
- padding-top: 0;
317
- }
318
- .md-nav--primary .md-nav__item {
319
- border-top: none;
320
- }
321
- .md-nav--primary :is(.md-nav__title,.md-nav__item) {
322
- font-size : var(--md-typeset-font-size);
323
- }
324
- .md-nav .md-source {
325
- display: none;
326
- }
327
-
328
- .md-sidebar {
329
- height: 100%;
330
- }
331
- .md-sidebar--primary {
332
- width: 16rem !important;
333
- z-index: 200;
334
- left: ${L.isPinned?`calc(-16rem + ${Be})`:"calc(-16rem + 72px)"} !important;
335
- }
336
- .md-sidebar--secondary:not([hidden]) {
337
- display: none;
338
- }
339
-
340
- [data-md-toggle=drawer]:checked~.md-container .md-sidebar--primary {
341
- transform: translateX(16rem);
342
- }
343
-
344
- .md-content {
345
- max-width: 100%;
346
- margin-left: 0;
347
- }
348
-
349
- .md-header__button {
350
- margin: 0.4rem 0;
351
- margin-left: 0.4rem;
352
- padding: 0;
353
- }
354
-
355
- .md-overlay {
356
- left: 0;
357
- }
358
-
359
- .md-footer {
360
- position: static;
361
- padding-left: 0;
362
- }
363
- .md-footer-nav__link {
364
- /* footer links begin to overlap at small sizes without setting width */
365
- width: 50%;
366
- }
367
- }
368
-
369
- @media screen and (max-width: 600px) {
370
- .md-sidebar--primary {
371
- left: -16rem !important;
372
- width: 16rem;
373
- }
374
- }
375
-
376
-
377
- @media print {
378
- .md-sidebar,
379
- #toggle-sidebar {
380
- display: none;
381
- }
382
-
383
- .md-content {
384
- margin: 0;
385
- width: 100%;
386
- max-width: 100%;
387
- }
388
- }
389
- `,nn=["h1","h2","h3","h4","h5","h6"],ln=/(em)|(rem)/gi,ie=/var\(|\)/gi,Nt=({theme:m})=>`
390
- /*================== Typeset ==================*/
391
-
392
- .md-typeset {
393
- font-size: var(--md-typeset-font-size);
394
- }
395
-
396
- ${nn.reduce((L,U)=>{const F=m.typography.htmlFontSize??16,W=m.typography[U],{lineHeight:_,fontFamily:rt,fontWeight:wt,fontSize:It}=W,$t=Lt=>{if(typeof Lt=="number")return $t(`${Lt/F*.6}rem`);if(typeof Lt=="string"){if(Lt.match(ie)){const kt=window.getComputedStyle(document.body).getPropertyValue(Lt.replaceAll(ie,""));if(kt!=="")return $t(kt)}else if(Lt.match(ln))return`calc(${Lt.replace(ln,"")} * var(--md-typeset-font-size))`}return Lt};return L.concat(`
397
- .md-typeset ${U} {
398
- color: var(--md-default-fg-color);
399
- line-height: ${_};
400
- font-family: ${rt};
401
- font-weight: ${wt};
402
- font-size: ${$t(It)};
403
- }
404
- `)},"")}
405
-
406
- .md-typeset .md-content__button {
407
- color: var(--md-default-fg-color);
408
- }
409
-
410
- .md-typeset hr {
411
- border-bottom: 0.05rem dotted ${m.palette.divider};
412
- }
413
-
414
- .md-typeset details {
415
- font-size: var(--md-typeset-font-size) !important;
416
- }
417
- .md-typeset details summary {
418
- padding-left: 2.5rem !important;
419
- }
420
- .md-typeset details summary:before,
421
- .md-typeset details summary:after {
422
- top: 50% !important;
423
- width: 20px !important;
424
- height: 20px !important;
425
- transform: rotate(0deg) translateY(-50%) !important;
426
- }
427
- .md-typeset details[open] > summary:after {
428
- transform: rotate(90deg) translateX(-50%) !important;
429
- }
430
-
431
- .md-typeset blockquote {
432
- color: var(--md-default-fg-color--light);
433
- border-left: 0.2rem solid var(--md-default-fg-color--light);
434
- }
435
-
436
- .md-typeset table:not([class]) {
437
- font-size: var(--md-typeset-font-size);
438
- border: 1px solid var(--md-default-fg-color);
439
- border-bottom: none;
440
- border-collapse: collapse;
441
- border-radius: ${m.shape.borderRadius}px;
442
- }
443
- .md-typeset table:not([class]) th {
444
- font-weight: bold;
445
- }
446
- .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
447
- border-bottom: 1px solid var(--md-default-fg-color);
448
- }
449
-
450
- .md-typeset pre > code::-webkit-scrollbar-thumb {
451
- background-color: hsla(0, 0%, 0%, 0.32);
452
- }
453
- .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
454
- background-color: hsla(0, 0%, 0%, 0.87);
455
- }
456
-
457
- .md-typeset code {
458
- word-break: keep-all;
459
- }
460
- `,We=()=>`
461
- /*================== Animations ==================*/
462
- /*
463
- Disable CSS animations on link colors as they lead to issues in dark mode.
464
- The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
465
- */
466
- .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
467
- transition: none;
468
- }
469
- `,ns=({theme:m})=>`
470
- /*================== Extensions ==================*/
471
-
472
- /* HIGHLIGHT */
473
- .highlight .md-clipboard:after {
474
- content: unset;
475
- }
476
-
477
- .highlight .nx {
478
- color: ${m.palette.type==="dark"?"#ff53a3":"#ec407a"};
479
- }
480
-
481
- /* CODE HILITE */
482
- .codehilite .gd {
483
- background-color: ${m.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
484
- }
485
-
486
- .codehilite .gi {
487
- background-color: ${m.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
488
- }
489
-
490
- /* TABBED */
491
- .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
492
- .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
493
- .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
494
- .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
495
- .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
496
- .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
497
- .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
498
- .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
499
- .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
500
- .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
501
- .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
502
- .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
503
- .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
504
- .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
505
- .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
506
- .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
507
- .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
508
- .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
509
- .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
510
- .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
511
- color: var(--md-accent-fg-color);
512
- border-color: var(--md-accent-fg-color);
513
- }
514
-
515
- /* TASK-LIST */
516
- .task-list-control .task-list-indicator::before {
517
- background-color: ${m.palette.action.disabledBackground};
518
- }
519
- .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
520
- background-color: ${m.palette.success.main};
521
- }
522
-
523
- /* ADMONITION */
524
- .admonition {
525
- font-size: var(--md-typeset-font-size) !important;
526
- }
527
- .admonition .admonition-title {
528
- padding-left: 2.5rem !important;
529
- }
530
-
531
- .admonition .admonition-title:before {
532
- top: 50% !important;
533
- width: 20px !important;
534
- height: 20px !important;
535
- transform: translateY(-50%) !important;
536
- }
537
- `,pn={dark:["#only-light","#gh-light-mode-only"],light:["#only-dark","#gh-dark-mode-only"]},ss=[ge,ee,me,Nt,We,ns,({theme:m})=>`
538
- /*================== Palette ==================*/
539
- /*
540
- When color palette toggle is enabled in material theme for Mkdocs, there is a possibility to show conditionally
541
- images by adding #only-dark or #only-light to resource hash. Backstage doesn't use mkdocs color palette mechanism,
542
- so there is a need to add css rules from palette*.css manually.
543
- */
544
-
545
- ${pn[m.palette.type].map(L=>`img[src$="${L}"]`).join(", ")} {
546
- display: none;
547
- }
548
- `],rs=()=>(0,oe.Ut)(),os=()=>{const m=rs(),L=(0,He.A)();return(0,a.useMemo)(()=>{const U={theme:L,sidebar:m};return ss.reduce((F,W)=>F+W(U),"")},[L,m])},as=()=>{const m=os();return(0,a.useCallback)(L=>(L.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${m}</style>`),L),[m])},gn=async(m,L)=>{let U;if(typeof m=="string")U=new DOMParser().parseFromString(m,"text/html").documentElement;else if(m instanceof Element)U=m;else throw new Error("dom is not a recognized type");for(const F of L)U=await F(U);return U},is=(m,L,U)=>{const F=new URL(L,"https://ignored.com").pathname,W=m==="src"&&F.endsWith(".svg"),_=!L.match(/^([a-z]*:)?\/\//i),rt=L.startsWith(U);return W&&(_||rt)},jn=({techdocsStorageApi:m,entityId:L,path:U})=>async F=>{const W=await m.getApiOrigin(),_=async(rt,wt)=>{for(const It of rt)if(It.hasAttribute(wt)){const $t=It.getAttribute(wt);if(!$t)return;const Lt=await m.getBaseUrl($t,L,U);if(is(wt,$t,W))try{const Xt=await(await fetch(Lt,{credentials:"include"})).text();It.setAttribute(wt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Xt)))}`)}catch{It.setAttribute("alt",`Error: ${$t}`)}else It.setAttribute(wt,Lt)}};return await Promise.all([_(F.querySelectorAll("img"),"src"),_(F.querySelectorAll("script"),"src"),_(F.querySelectorAll("source"),"src"),_(F.querySelectorAll("link"),"href"),_(F.querySelectorAll("a[download]"),"href")]),F},cs=()=>m=>(((U,F)=>{Array.from(U).filter(W=>W.hasAttribute(F)).forEach(W=>{const _=W.getAttribute(F);if(_){_.match(/^https?:\/\//i)&&W.setAttribute("target","_blank");try{const rt=Sn(window.location.href);W.setAttribute(F,new URL(_,rt).toString())}catch{W.replaceWith(W.textContent||_)}}})})(Array.from(m.getElementsByTagName("a")),"href"),m);function Sn(m){const L=new URL(m);return!L.pathname.endsWith("/")&&!L.pathname.endsWith(".html")&&(L.pathname+="/"),L.toString()}var ls=t(27326);let Un;Un=Promise.resolve().then(t.t.bind(t,25873,19));function fn(m,L){Un.then(U=>{"createRoot"in U?U.createRoot(L).render(m):U.render(m,L)})}const ds=()=>m=>{const L=m.querySelector('.md-header label[for="__drawer"]'),U=m.querySelector("article");if(!L||!U)return m;const F=L.cloneNode();return fn((0,a.createElement)(ls.A),F),F.id="toggle-sidebar",F.title="Toggle Sidebar",F.classList.add("md-content__button"),F.style.setProperty("padding","0 0 0 5px"),F.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),U?.prepend(F),m},us=()=>m=>(m.querySelector(".md-header")?.remove(),m),hs=()=>m=>(m.querySelector(".md-footer .md-copyright")?.remove(),m.querySelector(".md-footer-copyright")?.remove(),m);var ps=t(36021),$n=t(90292),gs=t(52536),fs=t.n(gs);const Fn=m=>L=>{const U=L.querySelector('[title="Edit this page"]');if(!U||!U.href)return L;const F=new URL(U.href),W=m.byUrl(F);if(W?.type!=="github"&&W?.type!=="gitlab")return L;const _=L.querySelector("article>h1")?.childNodes[0].textContent||"",rt=encodeURIComponent(`Documentation Feedback: ${_}`),wt=encodeURIComponent(`Page source:
549
- ${U.href}
550
-
551
- Feedback:`),It=W?.type==="github"?(0,ps.F)(F.href,"blob"):F.href,$t=fs()(It),Lt=`/${$t.organization}/${$t.name}`,kt=U.cloneNode();switch(W?.type){case"gitlab":kt.href=`${F.origin}${Lt}/issues/new?issue[title]=${rt}&issue[description]=${wt}`;break;case"github":kt.href=`${F.origin}${Lt}/issues/new?title=${rt}&body=${wt}`;break;default:return L}return fn((0,a.createElement)($n.A),kt),kt.style.paddingLeft="5px",kt.title="Leave feedback for this page",kt.id="git-feedback-link",U?.insertAdjacentElement("beforebegin",kt),L};var Nn=t(38097);const ms=(0,p.A)(m=>({button:{color:m.palette.primary.light,textDecoration:"underline"}})),On=({message:m,handleButtonClick:L,autoHideDuration:U})=>{const F=ms(),[W,_]=(0,a.useState)(!0),rt=()=>_(!1);return(0,s.jsx)(Nn.A,{open:W,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:U,color:"primary",onClose:rt,message:m,action:(0,s.jsx)(At.A,{classes:{root:F.button},size:"small",onClick:()=>{rt(),L()},children:"Redirect now"})})},Pn=(m,L)=>{const F=W=>{const _=Sn(window.location.href),rt=new URL(W,_);if(rt.hostname!==window.location.hostname){const It=window.location.pathname,$t=It.indexOf(L),Lt=It.slice(0,$t+L.length);return new URL(Lt,_).href}return rt.href};return W=>{for(const _ of Array.from(W.querySelectorAll("meta")))if(_.getAttribute("http-equiv")==="refresh"){const rt=_.getAttribute("content")?.split("url=");if(!rt||rt.length<2)return W;const wt=rt[1],It=F(wt);if(window.location.href===It)return W;const $t=document.createElement("div");return fn((0,s.jsx)(On,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>m(It),autoHideDuration:3e3}),$t),document.body.appendChild($t),setTimeout(()=>{m(It)},3e3),W}return W}},ys=()=>m=>(setTimeout(()=>{const L=m?.querySelectorAll("li.md-nav__item--active");L.length!==0&&(L.forEach(F=>{const W=F?.querySelector("input");W?.checked||W?.click()}),L[L.length-1].scrollIntoView())},200),m);var kn=t(50868),Wn=t(10437),vs=t(71677),Es=t(87051),As=t(36338);const xs=(0,Es.A)(m=>({tooltip:{fontSize:"inherit",color:m.palette.text.primary,margin:0,padding:m.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(vs.Ay),Cs=()=>(0,s.jsx)(Wn.A,{children:(0,s.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),bs=({text:m})=>{const[L,U]=(0,a.useState)(!1),[,F]=(0,As.A)(),W=(0,a.useCallback)(()=>{F(m),U(!0)},[m,F]),_=(0,a.useCallback)(()=>{U(!1)},[U]);return(0,s.jsx)(xs,{title:"Copied to clipboard",placement:"left",open:L,onClose:_,leaveDelay:1e3,children:(0,s.jsx)(ft.A,{style:{position:"absolute"},className:"md-clipboard md-icon",onClick:W,"aria-label":"Copy to clipboard",children:(0,s.jsx)(Cs,{})})})},Ss=m=>L=>{const U=L.querySelectorAll("pre > code");for(const F of U){const W=F.textContent||"",_=document.createElement("div");F?.parentElement?.prepend(_),fn((0,s.jsx)(kn.A,{theme:m,children:(0,s.jsx)(bs,{text:W})}),_)}return L},Os=({baseUrl:m,onClick:L})=>U=>(Array.from(U.getElementsByTagName("a")).forEach(F=>{F.addEventListener("click",W=>{const rt=F.getAttribute("href");rt&&rt.startsWith(m)&&!F.hasAttribute("download")&&(W.preventDefault(),L(W,rt))})}),U),Kn=({onLoading:m,onLoaded:L})=>U=>(m(),U.addEventListener(d,function F(){L(),U.removeEventListener(d,F)}),U);function Ps(m,L){const U=new URL(L),F=`${U.origin}${U.pathname.replace(/\/$/,"")}`,W=m.replace(F,"").replace(/^\/+/,""),_=new URL(`http://localhost/${W}`);return`${_.pathname}${_.search}${_.hash}`}function ws(){const m=(0,a.useRef)((0,Ut.Zp)()),U=(0,dt.gf)(J.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(W=>{let _=W;if(U)try{_=Ps(W,U)}catch{}m.current(_)},[U])}const Ts="screen and (max-width: 76.1875em)",zn=m=>{const L=ws(),U=(0,He.A)(),F=(0,Ze.A)(Ts),W=Vt(),_=as(),rt=(0,G.s)(),wt=(0,dt.gf)(Ge.s),It=(0,dt.gf)(ke.Y),$t=(0,dt.gf)(J.U),{state:Lt,path:kt,content:Xt}=en(),{"*":fe=""}=(0,Ut.g)(),[Ht,qt]=(0,a.useState)(null),ye=h(Ht),ae=(0,a.useCallback)(()=>{if(!Ht)return;Ht.querySelectorAll(".md-sidebar").forEach(ce=>{if(F)ce.style.top="0px";else{const Je=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let xe=Ht.getBoundingClientRect().top??0;const sn=Ht.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;xe<Je&&(xe=Je);const ve=Math.max(xe,0)+sn;ce.style.top=`${ve}px`;const yn=Ht.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;ce.style.height=`${yn-ve}px`}ce.style.setProperty("opacity","1")})},[Ht,F]);(0,a.useEffect)(()=>(window.addEventListener("resize",ae),window.addEventListener("scroll",ae,!0),()=>{window.removeEventListener("resize",ae),window.removeEventListener("scroll",ae,!0)}),[Ht,ae]);const Qt=(0,a.useCallback)(()=>{if(!Ht)return;const ne=Ht.querySelector(".md-footer");ne&&(ne.style.width=`${Ht.getBoundingClientRect().width}px`)},[Ht]);(0,a.useEffect)(()=>(window.addEventListener("resize",Qt),()=>{window.removeEventListener("resize",Qt)}),[Ht,Qt]),(0,a.useEffect)(()=>{ye||(Qt(),ae())},[Lt,ye,Qt,ae]);const Zt=(0,a.useCallback)((ne,ce)=>gn(ne,[W,jn({techdocsStorageApi:wt,entityId:m,path:ce}),cs(),ds(),us(),hs(),Fn(It),_]),[m,It,wt,W,_]),Ct=(0,a.useCallback)(async ne=>gn(ne,[Pn(L,m.name),ys(),Ss(U),Os({baseUrl:$t.getOptionalString("app.baseUrl")||window.location.origin,onClick:(ce,ue)=>{const Je=ce.ctrlKey||ce.metaKey,xe=new URL(ue),Xe=ce.target?.innerText||ue,sn=ue.replace(window.location.origin,"");rt.captureEvent("click",Xe,{attributes:{to:sn}}),xe.hash?Je?window.open(ue,"_blank"):(window.location.pathname!==xe.pathname?L(ue):window.history.pushState(null,document.title,xe.hash),ne?.querySelector(`[id="${xe.hash.slice(1)}"]`)?.scrollIntoView(),ne?.querySelector(`[id="${xe.hash.slice(1)}"]`)?.querySelector("a, button, [tabindex]")?.focus()):Je?window.open(ue,"_blank"):L(ue)}}),Kn({onLoading:()=>{},onLoaded:()=>{ne.querySelector(".md-nav__title")?.removeAttribute("for")}}),Kn({onLoading:()=>{Array.from(ne.querySelectorAll(".md-sidebar")).forEach(ue=>{ue.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[U,L,rt,m.name,$t]);return(0,a.useEffect)(()=>{if(!Xt)return()=>{};let ne=!0;return Zt(Xt,kt).then(async ce=>{if(!ce?.innerHTML||!ne||fe!==kt)return;window.scroll({top:0});const ue=await Ct(ce);qt(ue)}),()=>{ne=!1}},[Xt,fe,kt,Zt,Ct]),Ht};var mn=t(41883),Rs=t(72020),wn=t(99730);const je=()=>{const m=(0,Rs.YR)(),{shadowRoot:L}=(0,b.V)(),U=L?.querySelector('[data-md-component="content"]'),F=L?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let W=F?.querySelector('[data-techdocs-addons-location="primary sidebar"]');W||(W=document.createElement("div"),W.setAttribute("data-techdocs-addons-location","primary sidebar"),F?.prepend(W));const _=L?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let rt=_?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return rt||(rt=document.createElement("div"),rt.setAttribute("data-techdocs-addons-location","secondary sidebar"),_?.prepend(rt)),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(mn.A,{container:W,children:m.renderComponentsByLocation(wn.e.PrimarySidebar)}),(0,s.jsx)(mn.A,{container:U,children:m.renderComponentsByLocation(wn.e.Content)}),(0,s.jsx)(mn.A,{container:rt,children:m.renderComponentsByLocation(wn.e.SecondarySidebar)})]})},Ue=(0,p.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),$e=ze(m=>{const{withSearch:L=!0,searchResultUrlMapper:U,onReady:F}=m,W=Ue(),{entityMetadata:{value:_,loading:rt},entityRef:wt,setShadowRoot:It}=(0,b.V)(),{state:$t}=en(),Lt=zn(wt),kt=window.location.pathname,Xt=window.location.hash,fe=h(Lt),[Ht]=B([`[id="${Xt.slice(1)}"]`]),qt=(0,it.n)(),{NotFoundErrorPage:ye}=qt.getComponents();(0,a.useEffect)(()=>{fe||(Xt?Ht&&Ht.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[kt,Xt,Ht,fe]);const ae=(0,a.useCallback)(Qt=>{It(Qt),F instanceof Function&&F()},[It,F]);return rt===!1&&!_?(0,s.jsx)(ye,{}):Lt?(0,s.jsx)(D.U,{children:(0,s.jsxs)(A.A,{container:!0,children:[(0,s.jsx)(A.A,{xs:12,item:!0,children:(0,s.jsx)(Ee,{})}),L&&(0,s.jsx)(A.A,{className:W.search,xs:"auto",item:!0,children:(0,s.jsx)(jt,{entityId:wt,entityTitle:_?.metadata?.title,searchResultUrlMapper:U})}),(0,s.jsxs)(A.A,{xs:12,item:!0,children:[($t==="CHECKING"||fe)&&(0,s.jsx)($.k,{}),(0,s.jsx)(x,{element:Lt,onAppend:ae,children:(0,s.jsx)(je,{})})]})]})}):(0,s.jsx)(D.U,{children:(0,s.jsx)(A.A,{container:!0,children:(0,s.jsx)(A.A,{xs:12,item:!0,children:(0,s.jsx)(Ee,{})})})})}),Hs=null},45061:(H,S,t)=>{"use strict";t.d(S,{T:()=>xt});var s=t(31085),a=t(14041),A=t(93285),p=t(42899),b=t(4387),g=t(13660),u=t(72020),f=t(86892),d=t(99730),v=t(82292),h=t(67871),x=t(8859),O=t(34428),P=t(51372),B=t(6820),M=t(58837),I=t(268),D=t(72501),$=t(72072);const k=(0,M.A)(Pt=>({root:{textAlign:"left"},label:{color:Pt.page.fontColor,fontWeight:Pt.typography.fontWeightBold,letterSpacing:0,fontSize:Pt.typography.fontSize,marginBottom:Pt.spacing(1)/2,lineHeight:1},value:{color:(0,I.X4)(Pt.page.fontColor,.8),fontSize:Pt.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),X=({value:Pt,className:Rt,typographyRootComponent:ut})=>(0,s.jsx)(D.A,{component:ut??(typeof Pt=="string"?"p":"span"),className:Rt,children:Pt});function z(Pt){const{label:Rt,value:ut,url:lt,contentTypograpyRootComponent:bt}=Pt,gt=k(),Ot=(0,s.jsx)(X,{className:gt.value,value:ut||"<Unknown>",typographyRootComponent:bt});return(0,s.jsx)(p.A,{item:!0,children:(0,s.jsxs)(D.A,{component:"span",className:gt.root,children:[(0,s.jsx)(D.A,{className:gt.label,children:Rt}),lt?(0,s.jsx)($.N_,{to:lt,children:Ot}):Ot]})})}var Y=t(69814),K=t(72427),dt=t(65461),G=t(9222),Q=t(56005),J=t.n(Q),ct=t(82779),pt=t(18690);const yt=(0,s.jsx)(b.A,{animation:"wave",variant:"text",height:40}),xt=Pt=>{const{children:Rt}=Pt,ut=(0,u.YR)(),lt=(0,K.gf)(dt.U),bt=(0,K.gf)(v.n),{"*":gt=""}=(0,pt.g)(),{title:Ot,setTitle:Tt,subtitle:it,setSubtitle:ft,entityRef:Et,metadata:{value:et,loading:At},entityMetadata:{value:ot,loading:j}}=(0,f.V)();(0,a.useEffect)(()=>{et&&(Tt(et.site_name),ft(()=>{let{site_description:de}=et;return(!de||de==="None")&&(de=""),de}))},[et,Tt,ft]);const V=lt.getOptional("app.title")||"Backstage",{locationMetadata:nt,spec:St}=ot||{},ht=St?.lifecycle,Bt=ot?(0,h.t)(ot,P.vv):[],Wt=(0,G.S)(ct.rQ)(),Ut=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(z,{label:J()(ot?.kind||"entity"),value:(0,s.jsx)(x.z,{color:"inherit",entityRef:Et,title:ot?.metadata.title,defaultKind:"Component"})}),Bt.length>0&&(0,s.jsx)(z,{label:"Owner",value:(0,s.jsx)(O.i,{color:"inherit",entityRefs:Bt,defaultKind:"group"})}),ht?(0,s.jsx)(z,{label:"Lifecycle",value:String(ht)}):null,nt&&nt.type!=="dir"&&nt.type!=="file"?(0,s.jsx)(z,{label:"",value:(0,s.jsxs)(p.A,{container:!0,direction:"column",alignItems:"center",children:[(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:(0,s.jsx)(g.A,{style:{marginTop:"-25px"}})}),(0,s.jsx)(p.A,{style:{padding:0},item:!0,children:"Source"})]}),url:nt.target}):null]});if(!j&&ot===void 0||!At&&et===void 0)return null;const te=(0,B.U2)(Et),jt=bt.forEntity(te).snapshot.primaryTitle,Ft=de=>de.replace(/\/$/,""),le=de=>de.replace(/-/g," ").split(" ").map(J()).join(" ");let he=[];gt!==""&&(he=Ft(gt).split("/").slice(0,3).map(le));const re=[V,jt,...he].join(" | ");return(0,s.jsxs)(Y.Y,{type:"Documentation",typeLink:Wt,title:Ot||yt,subtitle:it===""?void 0:it||yt,children:[(0,s.jsx)(A.A,{titleTemplate:"%s",children:(0,s.jsx)("title",{children:re})}),Ut,Rt,ut.renderComponentsByLocation(d.e.Header)]})}},82779:(H,S,t)=>{"use strict";t.d(S,{Oc:()=>A,Ri:()=>p,rQ:()=>a});var s=t(34569);const a=(0,s.H)({id:"techdocs:index-page"}),A=(0,s.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),p=(0,s.H)({id:"techdocs:catalog-reader-view"})},27698:(H,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>d});var s=t(31085),a=t(68804),A=t(5951),p=t(58837),b=t(72501),g=t(72072),u=t(70734);const f=(0,p.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),d=v=>{const{result:h,highlight:x,lineClamp:O=5,asListItem:P=!0,asLink:B=!0,title:M,icon:I}=v,D=f(),$=({children:z})=>B?(0,s.jsx)(g.N_,{noTrack:!0,to:h.location,children:z}):(0,s.jsx)(s.Fragment,{children:z}),k=()=>{const z=x?.fields.title?(0,s.jsx)(u.e,{text:x.fields.title,preTag:x.preTag,postTag:x.postTag}):h.title,Y=x?.fields.entityTitle?(0,s.jsx)(u.e,{text:x.fields.entityTitle,preTag:x.preTag,postTag:x.postTag}):h.entityTitle,K=x?.fields.name?(0,s.jsx)(u.e,{text:x.fields.name,preTag:x.preTag,postTag:x.postTag}):h.name;return h?(0,s.jsx)(A.A,{className:D.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,s.jsx)($,{children:M||(0,s.jsxs)(s.Fragment,{children:[z," | ",Y??K," docs"]})}),secondary:(0,s.jsx)(b.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:O,overflow:"hidden"},color:"textSecondary",variant:"body2",children:x?.fields.text?(0,s.jsx)(u.e,{text:x.fields.text,preTag:x.preTag,postTag:x.postTag}):h.text})}):null},X=({children:z})=>P?(0,s.jsxs)(s.Fragment,{children:[I&&(0,s.jsx)(a.A,{children:typeof I=="function"?I(h):I}),(0,s.jsx)("div",{className:D.flexContainer,children:z})]}):(0,s.jsx)(s.Fragment,{children:z});return(0,s.jsx)(X,{children:(0,s.jsx)(k,{})})}},97184:(H,S,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var S=s=>H(H.s=s);H.O(0,[1751,1888,5067,1678,235,6587,5042,7400,1975,4538,4121],()=>(S(97184),S(71543)));var t=H.O()}]);})();
552
-
553
- //# sourceMappingURL=main.70a3bb94.js.map