@techdocs/cli 0.0.0-nightly-20250114022708 → 0.0.0-nightly-20250116022939
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.
- package/CHANGELOG.md +17 -5
- package/dist/commands/index.cjs.js +3 -0
- package/dist/commands/index.cjs.js.map +1 -1
- package/dist/embedded-app/.config-schema.json +261 -1246
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/main.21d5632b.js +553 -0
- package/dist/embedded-app/static/main.21d5632b.js.map +1 -0
- package/dist/embedded-app/static/{module-material-table.84f30b2f.js → module-material-table.d6e8d890.js} +2 -2
- package/dist/embedded-app/static/{module-material-table.84f30b2f.js.map → module-material-table.d6e8d890.js.map} +1 -1
- package/dist/embedded-app/static/module-material-ui.b24ef3a3.js +24 -0
- package/dist/embedded-app/static/module-material-ui.b24ef3a3.js.map +1 -0
- package/dist/embedded-app/static/{runtime.a6c99f76.js → runtime.21d5632b.js} +1 -1
- package/dist/embedded-app/static/{runtime.a6c99f76.js.map → runtime.21d5632b.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.a6c99f76.js → vendor.21d5632b.js} +43 -43
- package/dist/embedded-app/static/vendor.21d5632b.js.map +1 -0
- package/dist/lib/PublisherConfig.cjs.js +4 -1
- package/dist/lib/PublisherConfig.cjs.js.map +1 -1
- package/dist/package.json.cjs.js +1 -1
- package/package.json +6 -6
- package/dist/embedded-app/static/main.a6c99f76.js +0 -553
- package/dist/embedded-app/static/main.a6c99f76.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.909829ed.js +0 -24
- package/dist/embedded-app/static/module-material-ui.909829ed.js.map +0 -1
- package/dist/embedded-app/static/vendor.a6c99f76.js.map +0 -1
|
@@ -1,553 +0,0 @@
|
|
|
1
|
-
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(H,b,t)=>{"use strict";t.d(b,{c:()=>n});const n=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(H,b,t)=>{"use strict";t.d(b,{P:()=>d,_P:()=>a,oQ:()=>n});const n="default",a="backstage.io/view-url",d="backstage.io/edit-url",x="kubernetes.io/api-server",m="kubernetes.io/api-server-certificate-authority",h="kubernetes.io/auth-provider"},6820:(H,b,t)=>{"use strict";t.d(b,{KU:()=>x,U2:()=>m,sM:()=>d});var n=t(72348);function a(h){let u=h.indexOf(":");const g=h.indexOf("/");g!==-1&&g<u&&(u=-1);const p=u===-1?void 0:h.slice(0,u),v=g===-1?void 0:h.slice(u+1,g),E=h.slice(Math.max(u+1,g+1));if(p===""||v===""||E==="")throw new TypeError(`Entity reference "${h}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:p,namespace:v,name:E}}function d(h){return{kind:h.kind,namespace:h.metadata.namespace||n.oQ,name:h.metadata.name}}function x(h,u){if(!h)throw new Error("Entity reference must not be empty");const g=u?.defaultKind,p=u?.defaultNamespace||n.oQ;let v,E,y;if(typeof h=="string"){const P=a(h);v=P.kind??g,E=P.namespace??p,y=P.name}else v=h.kind??g,E=h.namespace??p,y=h.name;if(v)if(E){if(!y){const P=JSON.stringify(h);throw new Error(`Entity reference ${P} had missing or empty name`)}}else{const P=JSON.stringify(h);throw new Error(`Entity reference ${P} had missing or empty namespace`)}else{const P=JSON.stringify(h);throw new Error(`Entity reference ${P} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:v,namespace:E,name:y}}function m(h){let u,g,p;return"metadata"in h?(u=h.kind,g=h.metadata.namespace??n.oQ,p=h.metadata.name):(u=h.kind,g=h.namespace??n.oQ,p=h.name),`${u.toLocaleLowerCase("en-US")}:${g.toLocaleLowerCase("en-US")}/${p.toLocaleLowerCase("en-US")}`}},51372:(H,b,t)=>{"use strict";t.d(b,{fT:()=>g,jn:()=>P,nC:()=>u,sA:()=>T,vv:()=>n});const n="ownedBy",a="ownerOf",d="consumesApi",x="apiConsumedBy",m="providesApi",h="apiProvidedBy",u="dependsOn",g="dependencyOf",p="parentOf",v="childOf",E="memberOf",y="hasMember",P="partOf",T="hasPart"},17736:(H,b,t)=>{"use strict";t.d(b,{Eo:()=>n,I4:()=>d});const n="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},78692:(H,b,t)=>{"use strict";t.d(b,{Cr:()=>h,KL:()=>m,aY:()=>x});var n=t(6820),a=t(17736);const d=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function x(u){if(typeof u!="string")throw new TypeError(`Unable to parse location ref '${u}', unexpected argument ${typeof u}`);const g=u.indexOf(":");if(g<0)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const p=u.substring(0,g).trim(),v=u.substring(g+1).trim();if(!p||!v)throw new TypeError(`Unable to parse location ref '${u}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(p==="http"||p==="https")throw new TypeError(`Invalid location ref '${u}', please prefix it with 'url:', e.g. 'url:${u}'`);if(d.test(v))throw new TypeError(`Invalid location ref '${u}', target is a javascript: URL`);return{type:p,target:v}}function m(u){const{type:g,target:p}=u;if(g){if(!p)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(p))throw new TypeError(`Invalid location ref '${g}:${p}', target is a javascript: URL`);return`${g}:${p}`}function h(u){const g=u.metadata?.annotations?.[a.I4]??u.metadata?.annotations?.[a.Eo];if(!g)throw new Error(`Entity '${(0,n.U2)(u)}' is missing location`);return x(g)}},77310:(H,b,t)=>{"use strict";t.d(b,{z:()=>p});var n=t(31085),a=t(10394),d=t(54917),x=t(14041),m=t(69578),h=t(40697),u=t(25577),g=t(37916);function p(v){const{text:E,language:y,showLineNumbers:P=!1,highlightedNumbers:T,customStyle:M,showCopyCodeButton:S=!1}=v,B=(0,d.A)(),F=B.palette.type==="dark"?h.A:u.A,L=B.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,n.jsxs)(a.A,{position:"relative",children:[(0,n.jsx)(m.A,{customStyle:M,language:y,style:F,showLineNumbers:P,wrapLines:!0,lineNumberStyle:{color:B.palette.textVerySubtle},lineProps:Q=>T?.includes(Q)?{style:{backgroundColor:L}}:{},children:E}),S&&(0,n.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,n.jsx)(g.l,{text:E})})]})}},37916:(H,b,t)=>{"use strict";t.d(b,{l:()=>E});var n=t(31085),a=t(72427),d=t(39837),x=t(29365),m=t(71677),h=t(99594),u=t(14041),g=t(36338),p=t(10315),v=t(87849);function E(y){const{t:P}=(0,v.i)(p.O),{text:T,tooltipDelay:M=1e3,tooltipText:S=P("copyTextButton.tooltipText"),"aria-label":B="Copy text"}=y,F=(0,a.gf)(d.m),[L,Q]=(0,u.useState)(!1),[{error:G},k]=(0,g.A)();(0,u.useEffect)(()=>{G&&F.post(G)},[G,F]);const W=_=>{_.stopPropagation(),Q(!0),k(T)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(m.Ay,{id:"copy-test-tooltip",title:S,placement:"top",leaveDelay:M,onClose:()=>Q(!1),open:L,children:(0,n.jsx)(x.A,{onClick:W,"aria-label":B,children:(0,n.jsx)(h.A,{})})})})}},44186:(H,b,t)=>{"use strict";t.d(b,{p:()=>P});var n=t(31085),a=t(42899),d=t(58837),x=t(72501),m=t(14041);const h=t.p+"static/missingAnnotation.67f79e98..svg",u=t.p+"static/noInformation.4b426325..svg",g=t.p+"static/createComponent.975d1e1e..svg",p=t.p+"static/noBuild.1715fa71..svg",v=(0,d.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),E=({missing:T})=>{const M=v();switch(T){case"field":return(0,n.jsx)("img",{src:h,className:M.generalImg,alt:"annotation is missing"});case"info":return(0,n.jsx)("img",{src:u,alt:"no Information",className:M.generalImg});case"content":return(0,n.jsx)("img",{src:g,alt:"create Component",className:M.generalImg});case"data":return(0,n.jsx)("img",{src:p,alt:"no Build",className:M.generalImg});default:return null}},y=(0,d.A)(T=>({root:{backgroundColor:T.palette.background.default,padding:T.spacing(2,0,0,0)},action:{marginTop:T.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function P(T){const{title:M,description:S,missing:B,action:F}=T,L=y();return(0,n.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:L.root,spacing:2,children:[(0,n.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,n.jsxs)(a.A,{container:!0,direction:"column",children:[(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(x.A,{variant:"h5",children:M})}),(0,n.jsx)(a.A,{item:!0,xs:!0,children:(0,n.jsx)(x.A,{variant:"body1",children:S})}),(0,n.jsx)(a.A,{item:!0,xs:!0,className:L.action,children:F})]})}),(0,n.jsx)(a.A,{item:!0,xs:12,md:6,className:L.imageContainer,children:typeof B=="string"?(0,n.jsx)(E,{missing:B}):B.customImage})]})}},22020:(H,b,t)=>{"use strict";t.d(b,{b:()=>E});var n=t(31085),a=t(58837),d=t(58007),x=t(8109),m=t(5951),h=t(14041),u=t(37916),g=t(88640);const p=(0,a.A)(y=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:y.spacing(2)},divider:{margin:y.spacing(2)}}),{name:"BackstageErrorPanel"}),v=({error:y,message:P,stack:T,children:M})=>{const S=p();return(0,n.jsxs)(d.A,{dense:!0,children:[(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:S.text},primary:"Error",secondary:y}),(0,n.jsx)(u.l,{text:y})]}),(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:S.text},primary:"Message",secondary:P}),(0,n.jsx)(u.l,{text:P})]}),T&&(0,n.jsxs)(x.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:S.text},primary:"Stack Trace",secondary:T}),(0,n.jsx)(u.l,{text:T})]}),M]})};function E(y){const{title:P,error:T,defaultExpanded:M,titleFormat:S,children:B}=y;return(0,n.jsx)(g.B,{severity:"error",title:P??T.message,defaultExpanded:M,titleFormat:S,children:(0,n.jsx)(v,{error:T.name,message:T.message,stack:T.stack,children:B})})}},18956:(H,b,t)=>{"use strict";t.d(b,{m:()=>u});var n=t(31085),a=t(14041),d=t(72501),x=t(58837),m=t(31129);const h=(0,x.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function u(p){const{isFavorite:v}=p,E=h();return(0,n.jsx)(d.A,{component:"span",className:v?E.icon:E.iconBorder,children:v?(0,n.jsx)(m.Gg,{}):(0,n.jsx)(m.KG,{})})}function g(p){const{id:v,title:E,isFavorite:y,onToggle:P,...T}=p;return _jsx(Tooltip,{id:v,title:E,children:_jsx(IconButton,{"aria-label":E,id:v,onClick:()=>P(!y),color:"inherit",...T,children:_jsx(u,{isFavorite:y})})})}},72072:(H,b,t)=>{"use strict";t.d(b,{N_:()=>Z});var n=t(31085),a=t(72427),d=t(65461),x=t(93368),m=t(49203),h=t(58837),u=t(72501),g=t(53373),p=t.n(g),v=t(45250),E=t.n(v),y=t(14041),P=t(18690),T=t(73657),M=t(39330),S=t(82266);function B(){const[Y]=(0,P.AV)((0,n.jsx)(P.qh,{index:!0,element:(0,n.jsx)("div",{})}));return!Y.index}const F=(0,h.A)(Y=>({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",userSelect:"none",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"},externalLinkIcon:{verticalAlign:"bottom",marginLeft:Y.spacing(.5)}}),{name:"Link"}),L=()=>{const X=(0,S.n)().getSystemIcon("externalLink")||M.A,ct=F();return(0,n.jsx)(X,{className:ct.externalLinkIcon})},Q=Y=>/^([a-z+.-]+):/.test(Y),G=/^[\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,k=window.open;if(k&&!k.__backstage){const Y=function(...ct){const dt=String(ct[0]);if(G.test(dt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return k.apply(this,ct)};Y.__backstage=!0,window.open=Y}const W=()=>{try{return(0,a.gf)(d.U).getOptionalString("app.baseUrl")}catch{return}},_=()=>{const Y="http://sample.dev",X=W()??"/",{pathname:ct}=new URL(X,Y);return(0,v.trimEnd)(ct,"/")},N=Y=>{let X=String(Y);const ct=_(),dt=Q(X),Et=X.startsWith(ct);return!dt&&!Et&&(X=ct.concat(X)),X},rt=Y=>Y instanceof Array?Y.map(rt).join(" ").trim():typeof Y=="object"&&Y?rt(Y?.props?.children):["string","number"].includes(typeof Y)?String(Y):"",Z=y.forwardRef(({onClick:Y,noTrack:X,externalLinkIcon:ct,...dt},Et)=>{const It=F(),Pt=(0,x.s)(),lt=B()?N(dt.to):dt.to,it=rt(dt.children)||lt,mt=Q(lt),ut=mt&&!!/^https?:/.exec(lt);if(G.test(lt))throw new Error("Link component rejected javascript: URL as a security precaution");const Ot=St=>{Y?.(St),X||Pt.captureEvent("click",it,{attributes:{to:lt}})};return mt?(0,n.jsxs)(m.A,{...ut?{target:"_blank",rel:"noopener"}:{},...dt,...dt["aria-label"]?{"aria-label":`${dt["aria-label"]}, Opens in a new window`}:{},ref:Et,href:lt,onClick:Ot,className:p()(It.externalLink,dt.className),children:[dt.children,ct&&(0,n.jsx)(L,{}),(0,n.jsx)(u.A,{component:"span",className:It.visuallyHidden,children:", Opens in a new window"})]}):(0,n.jsx)(m.A,{...dt,ref:Et,component:T.N_,to:lt,onClick:Ot})})},73896:(H,b,t)=>{"use strict";t.d(b,{z:()=>h});var n=t(31085),a=t(64947),d=t(14041),x=t(72072);const m=d.forwardRef((g,p)=>(0,n.jsx)(x.N_,{ref:p,...g,color:"initial"})),h=d.forwardRef((g,p)=>(0,n.jsx)(a.A,{ref:p,component:m,...g})),u=null},4650:(H,b,t)=>{"use strict";t.d(b,{h:()=>E});var n=t(31085),a=t(58837),d=t(45872),x=t(61125),m=t(14041),h=t(77310);const u=(0,a.A)(y=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${y.palette.border}`},"& th, & td":{border:`1px solid ${y.palette.border}`,padding:y.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:y.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:y.palette.background.paper},"& tr":{backgroundColor:y.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:y.palette.background.default},"& a":{color:y.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),g=(y,P)=>P?typeof P=="string"?y+P:m.Children.toArray(P.props.children).reduce(g,y):y,p=({level:y,children:P})=>{const S=m.Children.toArray(P).reduce(g,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${y}`,{id:S},P)},v={code:({inline:y,className:P,children:T,...M})=>{const S=String(T).replace(/\n+$/,""),B=/language-(\w+)/.exec(P||"");return!y&&B?(0,n.jsx)(h.z,{language:B[1],text:S}):(0,n.jsx)("code",{className:P,...M,children:T})},h1:p,h2:p,h3:p,h4:p,h5:p,h6:p};function E(y){const{content:P,dialect:T="gfm",linkTarget:M,transformLinkUri:S,transformImageUri:B,className:F}=y,L=u();return(0,n.jsx)(d.$,{remarkPlugins:T==="gfm"?[x.A]:[],className:`${L.markdown} ${F??""}`.trim(),children:P,components:v,linkTarget:M,transformLinkUri:S,transformImageUri:B})}},68146:(H,b,t)=>{"use strict";t.d(b,{k:()=>h});var n=t(31085),a=t(10394),d=t(88951),x=t(54917),m=t(14041);function h(u){const g=(0,x.A)(),[p,v]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const E=setTimeout(()=>v(!0),g.transitions.duration.short);return()=>clearTimeout(E)},[g.transitions.duration.short]),p?(0,n.jsx)(d.A,{...u,"data-testid":"progress"}):(0,n.jsx)(a.A,{display:"none","data-testid":"progress"})}},66917:(H,b,t)=>{"use strict";t.d(b,{w:()=>_});var n=t(31085),a=t(10394),d=t(69076),x=t(67720),m=t(95061),h=t(41857),u=t(48543),g=t(26343),p=t(81215),v=t(87051),E=t(12398),y=t(58837),P=t(72501),T=t(14041),M=t(10437);const S=(0,y.A)(N=>(0,E.A)({icon:{position:"absolute",right:N.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),F=()=>{const N=S();return(0,n.jsx)(M.A,{className:N.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},L=(0,y.A)(N=>(0,E.A)({icon:{position:"absolute",right:N.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),G=()=>{const N=L();return(0,n.jsx)(M.A,{className:N.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},k=(0,v.A)(N=>(0,E.A)({root:{"label + &":{marginTop:N.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:N.palette.primary.main}},input:{borderRadius:N.shape.borderRadius,position:"relative",backgroundColor:N.palette.background.paper,border:"1px solid #ced4da",fontSize:N.typography.body1.fontSize,padding:N.spacing(1.25,3.25,1.25,1.5),transition:N.transitions.create(["border-color","box-shadow"]),"&:focus":{background:N.palette.background.paper,borderRadius:N.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(h.A),W=(0,y.A)(N=>(0,E.A)({formControl:{margin:N.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:N.typography.body2.fontSize,fontFamily:N.typography.fontFamily,color:N.palette.text.primary,"&.Mui-focused":{color:N.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:N.typography.body2.fontSize,fontFamily:N.typography.fontFamily,color:N.palette.text.primary,"&.Mui-focused":{color:N.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function _(N){const{multiple:rt,items:Z,label:Y,placeholder:X,selected:ct,onChange:dt,triggerReset:Et,native:It=!1,disabled:Pt=!1,margin:lt,"data-testid":it="select"}=N,mt=W(),[ut,Ot]=(0,T.useState)(ct||(rt?[]:"")),[St,ft]=(0,T.useState)(!1);(0,T.useEffect)(()=>{Ot(rt?[]:"")},[Et,rt]),(0,T.useEffect)(()=>{Ot(ct||(rt?[]:""))},[ct,rt]);const At=et=>{Ot(et.target.value),dt(et.target.value)},pt=et=>{if(Pt){et.preventDefault();return}ft(U=>rt&&!(et.target instanceof HTMLElement)?!0:!U)},tt=()=>{ft(!1)},Ct=et=>()=>{const U=ut.filter(V=>V!==et);Ot(U),dt(U)};return(0,n.jsx)(a.A,{className:mt.root,children:(0,n.jsxs)(m.A,{className:mt.formControl,children:[(0,n.jsx)(u.A,{className:mt.formLabel,children:Y}),(0,n.jsxs)(p.A,{"aria-label":Y,value:ut,native:It,disabled:Pt,"data-testid":it,displayEmpty:!0,multiple:rt,margin:lt,onChange:At,open:St,onOpen:pt,onClose:tt,input:(0,n.jsx)(k,{}),label:Y,renderValue:et=>rt&&ut.length!==0?(0,n.jsx)(a.A,{className:mt.chips,children:et.map(U=>{const V=Z.find(vt=>vt.value===U);return V?(0,n.jsx)(x.A,{label:V?.label,clickable:!0,onDelete:Ct(U),className:mt.chip},V?.value):!1})}):(0,n.jsx)(P.A,{children:ut.length===0?X||"":Z.find(U=>U.value===et)?.label}),IconComponent:()=>St?(0,n.jsx)(G,{}):(0,n.jsx)(F,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!X&&!rt&&(0,n.jsx)(g.A,{value:[],children:X}),It?Z&&Z.map(et=>(0,n.jsx)("option",{value:et.value,children:et.label},et.value)):Z&&Z.map(et=>(0,n.jsxs)(g.A,{value:et.value,children:[rt&&(0,n.jsx)(d.A,{color:"primary",checked:ut.includes(et.value)||!1,className:mt.checkbox}),et.label]},et.value))]})]})})}},27586:(H,b,t)=>{"use strict";t.d(b,{Y:()=>Z});var n=t(31085),a=t(82266),d=t(72427),x=t(65461),m=t(10394),h=t(64947),u=t(93453),g=t(29365),p=t(68804),v=t(5951),E=t(26343),y=t(28233),P=t(55197),T=t(58837),M=t(72501),S=t(5893),B=t(14041),F=t(10795),L=t(31129),Q=t(72072),G=t(10315),k=t(87849);const W=(0,T.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),_=({icon:Y})=>{const X=(0,a.n)(),ct=Y?X.getSystemIcon(Y)??L.NT:L.NT;return(0,n.jsx)(ct,{})},N=({link:Y})=>(0,n.jsx)(Q.N_,{to:Y.url,children:Y.title??Y.url}),rt=({item:Y})=>(0,n.jsxs)(E.A,{button:!1,children:[(0,n.jsx)(p.A,{children:(0,n.jsx)(_,{icon:Y.icon})}),(0,n.jsx)(v.A,{primary:Y.title,secondary:Y.links?.reduce((X,ct,dt)=>[...X,dt>0&&(0,n.jsx)("br",{},dt),(0,n.jsx)(N,{link:ct},ct.url)],[])})]});function Z(Y){const{t:X}=(0,k.i)(G.O),{title:ct,items:dt,children:Et}=Y,{items:It}=(0,F.l)(),[Pt,lt]=(0,B.useState)(!1),[it,mt]=(0,B.useState)(null),ut=W(),Ot=(0,d.gf)(x.U).getOptionalConfig("app.support"),St=(0,S.A)(pt=>pt.breakpoints.down("sm")),ft=pt=>{mt(pt.currentTarget),lt(!0)},At=()=>{lt(!1)};return Ot?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.A,{display:"flex",ml:1,children:St?(0,n.jsx)(g.A,{color:"primary",size:"small",onClick:ft,"data-testid":"support-button","aria-label":"Support",children:(0,n.jsx)(L.NT,{})}):(0,n.jsx)(h.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:ft,startIcon:(0,n.jsx)(L.NT,{}),children:X("supportButton.title")})}),(0,n.jsxs)(P.Ay,{"data-testid":"support-button-popover",open:Pt,anchorEl:it,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:At,children:[(0,n.jsxs)(y.A,{className:ut.popoverList,autoFocusItem:!!it,children:[ct&&(0,n.jsx)(E.A,{button:!1,alignItems:"flex-start",className:ut.menuItem,children:(0,n.jsx)(M.A,{variant:"subtitle1",children:ct})}),B.Children.map(Et,(pt,tt)=>(0,n.jsx)(E.A,{button:!1,alignItems:"flex-start",className:ut.menuItem,children:pt},`child-${tt}`)),(dt??It).map((pt,tt)=>(0,n.jsx)(rt,{item:pt},`item-${tt}`))]}),(0,n.jsx)(u.A,{children:(0,n.jsx)(h.A,{color:"primary",onClick:At,"aria-label":"Close",children:X("supportButton.close")})})]})]}):null}},14209:(H,b,t)=>{"use strict";t.d(b,{X:()=>tt});var n=t(31085),a=t(25301),d=t(10394),x=t(29365),m=t(87051),h=t(58837),u=t(54917),g=t(72501),p=t(83313),v=t(89019),E=t(62461),y=t(68887),P=t(63798),T=t(64704),M=t(6774),S=t(75625),B=t(65859),F=t(45917),L=t(5416),Q=t(33494),G=t(80113),k=t(26229),W=t(46802),_=t(45250),N=t(14041),rt=t(64947),Z=t(66917),Y=t(10315),X=t(87849);const ct=(0,h.A)(U=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:U.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:U.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${U.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:U.spacing(2)}}}),{name:"BackstageTableFilters"}),dt=U=>{const V=ct(),{onChangeFilters:vt}=U,{t:Dt}=(0,X.i)(Y.O),[xt,Lt]=(0,N.useState)({...U.selectedFilters}),[Wt,_t]=(0,N.useState)(!1),Ut=()=>{Lt({}),_t(Nt=>!Nt)};return(0,N.useEffect)(()=>{vt(xt)},[xt,vt]),(0,n.jsxs)(d.A,{className:V.root,children:[(0,n.jsxs)(d.A,{className:V.header,children:[(0,n.jsx)(d.A,{className:V.value,children:Dt("table.filter.title")}),(0,n.jsx)(rt.A,{color:"primary",onClick:Ut,children:Dt("table.filter.clearAll")})]}),(0,n.jsx)(d.A,{className:V.filters,children:U.filters?.length&&U.filters.map(Nt=>(0,n.jsx)(Z.w,{triggerReset:Wt,...Nt.element,selected:xt[Nt.element.label],onChange:ce=>Lt({...xt,[Nt.element.label]:ce})},Nt.element.label))})]})};var Et=t(78467);function It(U){return(0,n.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:U.colSpan,children:(0,n.jsx)(d.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,n.jsx)(Et.A,{size:"5rem"})})})})})}const Pt={Add:(0,N.forwardRef)((U,V)=>(0,n.jsx)(p.A,{...U,ref:V})),Check:(0,N.forwardRef)((U,V)=>(0,n.jsx)(E.A,{...U,ref:V})),Clear:(0,N.forwardRef)((U,V)=>(0,n.jsx)(T.A,{...U,ref:V})),Delete:(0,N.forwardRef)((U,V)=>(0,n.jsx)(M.A,{...U,ref:V})),DetailPanel:(0,N.forwardRef)((U,V)=>(0,n.jsx)(P.A,{...U,ref:V})),Edit:(0,N.forwardRef)((U,V)=>(0,n.jsx)(S.A,{...U,ref:V})),Export:(0,N.forwardRef)((U,V)=>(0,n.jsx)(k.A,{...U,ref:V})),Filter:(0,N.forwardRef)((U,V)=>(0,n.jsx)(B.A,{...U,ref:V})),FirstPage:(0,N.forwardRef)((U,V)=>(0,n.jsx)(L.A,{...U,ref:V})),LastPage:(0,N.forwardRef)((U,V)=>(0,n.jsx)(Q.A,{...U,ref:V})),NextPage:(0,N.forwardRef)((U,V)=>(0,n.jsx)(P.A,{...U,ref:V})),PreviousPage:(0,N.forwardRef)((U,V)=>(0,n.jsx)(y.A,{...U,ref:V})),ResetSearch:(0,N.forwardRef)((U,V)=>(0,n.jsx)(T.A,{...U,ref:V})),Search:(0,N.forwardRef)((U,V)=>(0,n.jsx)(F.A,{...U,ref:V})),SortArrow:(0,N.forwardRef)((U,V)=>(0,n.jsx)(v.A,{...U,ref:V})),ThirdStateCheck:(0,N.forwardRef)((U,V)=>(0,n.jsx)(G.A,{...U,ref:V})),ViewColumn:(0,N.forwardRef)((U,V)=>(0,n.jsx)(W.A,{...U,ref:V}))};function lt(U,V){const vt=V.split(".");let Dt=U[vt[0]];for(let xt=1;xt<vt.length;++xt){if(Dt===void 0)return Dt;const Lt=vt[xt];Dt=Dt[Lt]}return Dt}const it=(0,m.A)(U=>({header:{padding:U.spacing(1,2,1,2.5),borderTop:`1px solid ${U.palette.grey.A100}`,borderBottom:`1px solid ${U.palette.grey.A100}`,fontWeight:U.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(a.rV),mt=(0,m.A)(U=>({root:{padding:U.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:U.typography.fontWeightBold}},searchField:{paddingRight:U.spacing(2)}}),{name:"BackstageTableToolbar"})(a.Nb),ut=(0,h.A)(U=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:U.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Ot=(0,h.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function St(U,V){return U.map(vt=>{const Dt=vt.headerStyle??{};let xt=vt.cellStyle||{};if(vt.highlight)if(Dt.color=V.palette.textContrast,typeof xt=="object")xt.fontWeight=V.typography.fontWeightBold;else{const Lt=xt;xt=(Wt,_t,Ut)=>({...Lt(Wt,_t,Ut),fontWeight:V.typography.fontWeightBold})}return{...vt,headerStyle:Dt,cellStyle:xt}})}function ft(U,V){return(0,_.transform)(U,(vt,Dt,xt)=>{(0,_.isEqual)(Dt,V[xt])||(vt[xt]=Dt)})}const At={search:"",filtersOpen:!1,filters:{}};function pt(U){const{toolbarRef:V,setSearch:vt,hasFilters:Dt,selectedFiltersLength:xt,toggleFilters:Lt}=U,Wt=ut(),_t=(0,N.useCallback)(Ut=>{U.onSearchChanged(Ut),vt(Ut)},[U,vt]);return Dt?(0,n.jsxs)(d.A,{className:Wt.root,children:[(0,n.jsxs)(d.A,{className:Wt.root,children:[(0,n.jsx)(x.A,{onClick:Lt,"aria-label":"filter list",children:(0,n.jsx)(B.A,{})}),(0,n.jsxs)(g.A,{className:Wt.title,children:["Filters (",xt,")"]})]}),(0,n.jsx)(mt,{...U,ref:V,onSearchChanged:_t})]}):(0,n.jsx)(mt,{...U,ref:V,onSearchChanged:_t})}function tt(U){const{data:V,columns:vt,emptyContent:Dt,options:xt,title:Lt,subtitle:Wt,localization:_t,filters:Ut,initialState:Nt,onStateChange:ce,components:Vt,isLoading:Ft,style:Kt,...ee}=U,Fe=Ot(),nn=(0,u.A)(),Ye={...At,...Nt},[Qe,re]=(0,N.useState)(Ye.filtersOpen),Ze=(0,N.useCallback)(()=>re(ye=>!ye),[re]),[oe,Ie]=(0,N.useState)(Ye.filters),[Je,he]=(0,N.useState)(Ye.search);(0,N.useEffect)(()=>{if(ce){const ye=ft({search:Je,filtersOpen:Qe,filters:oe},At);ce(ye)}},[Je,Qe,oe,ce]);const Xe=(0,N.useCallback)(ye=>vt.find(Ne=>Ne.title===ye)?.field,[vt]),hn=(0,N.useMemo)(()=>{if(typeof V=="function"||!oe)return V;const ye=Object.values(oe);return V&&ye.flat().length?V.filter(We=>!!Object.entries(oe).filter(([,Ke])=>!!Ke.length).every(([Ke,Me])=>{const Be=lt(We,Xe(Ke));return Array.isArray(Be)&&Array.isArray(Me)?Be.some(R=>Me.includes(R)):Array.isArray(Be)?Be.includes(Me):Array.isArray(Me)?Me.includes(Be):Be===Me})):V},[V,oe,Xe]),sn=Object.values(oe).flat().length,rn=!!Ut?.length,De=(0,N.useCallback)(ye=>(0,n.jsx)(pt,{setSearch:he,hasFilters:rn,selectedFiltersLength:sn,toggleFilters:Ze,...ye}),[Ze,rn,sn,he]),Le=typeof V!="function"&&V.length===0,ke=vt.length,on=(0,N.useMemo)(()=>Ct({hasNoRows:Le,emptyContent:Dt,columnCount:ke,loading:Ft}),[Le,Dt,ke,Ft]);return(0,n.jsxs)(d.A,{className:Fe.root,children:[Qe&&V&&typeof V!="function"&&Ut?.length&&(0,n.jsx)(dt,{filters:et(Ut,V,vt),selectedFilters:oe,onChangeFilters:Ie}),(0,n.jsx)(a.Ay,{components:{Header:it,Body:on,Toolbar:De,...Vt},options:xt,columns:St(vt,nn),icons:Pt,title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.A,{variant:"h5",component:"h2",children:Lt}),Wt&&(0,n.jsx)(g.A,{color:"textSecondary",variant:"body1",children:Wt})]}),data:hn,style:{width:"100%",...Kt},localization:{toolbar:{searchPlaceholder:"Search",searchTooltip:"Search"},..._t},...ee})]})}tt.icons=Object.freeze(Pt);function Ct({columnCount:U,emptyContent:V,hasNoRows:vt,loading:Dt}){return xt=>Dt?(0,n.jsx)(It,{colSpan:U}):V&&vt?(0,n.jsx)("tbody",{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:U,children:V})})}):(0,n.jsx)(a.C6,{...xt})}function et(U,V,vt){const Dt=Lt=>{const Wt=new Set,_t=Ut=>{Ut!=null&&Wt.add(Ut)};return V&&V.forEach(Ut=>{const Nt=lt(Ut,vt.find(ce=>ce.title===Lt)?.field);Array.isArray(Nt)?Nt.forEach(_t):_t(Nt)}),Wt},xt=Lt=>({placeholder:"All results",label:Lt.column,multiple:Lt.type==="multiple-select",items:[...Dt(Lt.column)].sort().map(Wt=>({label:Wt,value:Wt}))});return U.map(Lt=>({type:Lt.type,element:xt(Lt)}))}},88640:(H,b,t)=>{"use strict";t.d(b,{B:()=>Q});var n=t(31085),a=t(268),d=t(58837),x=t(8973),m=t(29655),h=t(91567),u=t(42899),g=t(72501),p=t(9181),v=t(6924),E=t(14041),y=t(4650);const P=(G,k)=>(k.palette.type==="light"?a.e$:a.a)(k.palette[G].light,.6),T=(G,k)=>(k.palette.type==="light"?a.a:a.e$)(k.palette[G].light,.9),M=(0,d.A)(G=>({root:{marginRight:G.spacing(1),fill:({severity:k})=>P(k,G)}})),S=({severity:G})=>{const k=M({severity:G});return(0,n.jsx)(p.A,{classes:k})},B=({severity:G})=>{const k=M({severity:G});return(0,n.jsx)(v.A,{classes:k})},F=(0,d.A)(G=>({panel:{backgroundColor:({severity:k})=>T(k,G),color:({severity:k})=>P(k,G),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:k})=>P(k,G),fontWeight:G.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:k})=>P(k,G),backgroundColor:({severity:k})=>T(k,G)},details:{width:"100%",display:"block",color:G.palette.textContrast,backgroundColor:G.palette.background.default,border:`1px solid ${G.palette.border}`,padding:G.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),L=G=>G.charAt(0).toLocaleUpperCase("en-US")+G.slice(1);function Q(G){const{severity:k="warning",title:W,titleFormat:_,message:N,children:rt,defaultExpanded:Z}=G,Y=F({severity:k}),X=L(k)+(W?`: ${W}`:"");return(0,n.jsxs)(x.A,{defaultExpanded:Z??!1,className:Y.panel,role:"alert",children:[(0,n.jsxs)(m.A,{expandIcon:(0,n.jsx)(B,{severity:k}),className:Y.summary,children:[(0,n.jsx)(S,{severity:k}),(0,n.jsx)(g.A,{className:Y.summaryText,variant:"subtitle1",children:_==="markdown"?(0,n.jsx)(y.h,{content:X,className:Y.markdownContent}):X})]}),(N||rt)&&(0,n.jsx)(h.A,{children:(0,n.jsxs)(u.A,{container:!0,children:[N&&(0,n.jsx)(u.A,{item:!0,xs:12,children:(0,n.jsx)(g.A,{className:Y.message,variant:"body1",children:N})}),rt&&(0,n.jsx)(u.A,{item:!0,xs:12,className:Y.details,children:rt})]})})]})}},10795:(H,b,t)=>{"use strict";t.d(b,{l:()=>h});var n=t(72427),a=t(65461),d=t(10315),x=t(87849);const m=()=>{const{t:u}=(0,x.i)(d.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:u("supportConfig.default.title"),icon:"warning",links:[{title:u("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function h(){const p=(0,n.Q2)().get(a.U)?.getOptionalConfig("app.support"),v=m();return p?{url:p.getString("url"),items:p.getConfigArray("items").flatMap(E=>({title:E.getString("title"),icon:E.getOptionalString("icon"),links:(E.getOptionalConfigArray("links")??[]).flatMap(y=>({url:y.getString("url"),title:y.getOptionalString("title")??""}))}))}:v}},31129:(H,b,t)=>{"use strict";t.d(b,{Gg:()=>B,KG:()=>F,NT:()=>T,z9:()=>m});var n=t(31085),a=t(82266),d=t(27799),x=t(14041);function m(L){const{id:Q,Fallback:G=d.A,...k}=L,_=(0,a.n)().getSystemIcon(Q)??G;return(0,n.jsx)(_,{...k})}function h(L){return _jsx(m,{id:"brokenImage",...L})}function u(L){return _jsx(m,{id:"catalog",...L})}function g(L){return _jsx(m,{id:"chat",...L})}function p(L){return _jsx(m,{id:"dashboard",...L})}function v(L){return _jsx(m,{id:"docs",...L})}function E(L){return _jsx(m,{id:"email",...L})}function y(L){return _jsx(m,{id:"github",...L})}function P(L){return _jsx(m,{id:"group",...L})}function T(L){return(0,n.jsx)(m,{id:"help",...L})}function M(L){return _jsx(m,{id:"user",...L})}function S(L){return _jsx(m,{id:"warning",...L})}function B(L){return(0,n.jsx)(m,{id:"star",...L})}function F(L){return(0,n.jsx)(m,{id:"unstarred",...L})}},26280:(H,b,t)=>{"use strict";t.d(b,{U:()=>u});var n=t(31085),a=t(58837),d=t(53373),x=t.n(d),m=t(14041);const h=(0,a.A)(g=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:g.spacing(3),paddingBottom:g.spacing(3),paddingLeft:g.spacing(2),paddingRight:g.spacing(2),[g.breakpoints.up("sm")]:{paddingLeft:g.spacing(3),paddingRight:g.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function u(g){const{className:p,stretch:v,noPadding:E,children:y,...P}=g,T=h();return(0,n.jsx)("article",{...P,className:x()(T.root,p,{[T.stretch]:v,[T.noPadding]:E}),children:y})}},59428:(H,b,t)=>{"use strict";t.d(b,{d:()=>p});var n=t(31085),a=t(10394),d=t(58837),x=t(72501),m=t(14041),h=t(93285);const u=v=>(0,d.A)(E=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:E.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:E.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),g=({title:v,className:E})=>(0,n.jsx)(x.A,{variant:"h4",component:"h2",className:E,"data-testid":"header-title",children:v});function p(v){const{description:E,title:y,titleComponent:P=void 0,children:T,textAlign:M="left"}=v,S=u({textAlign:M})(),B=P||(0,n.jsx)(g,{title:y,className:S.title});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.m,{title:y}),(0,n.jsxs)(a.A,{className:S.container,children:[(0,n.jsxs)(a.A,{className:S.leftItemsBox,children:[B,E&&(0,n.jsx)(x.A,{className:S.description,variant:"body2",children:E})]}),(0,n.jsx)(a.A,{className:S.rightItemsBox,children:T})]})]})}},12173:(H,b,t)=>{"use strict";t.d(b,{M:()=>F});var n=t(31085),a=t(42899),d=t(58837),x=t(72501),m=t(14041),h=t(18690),u=t(72072),g=t(10795);const p=t.p+"static/mic-drop.fe3ef4d0..svg",v=(0,d.A)(L=>({micDrop:{maxWidth:"60%",bottom:L.spacing(2),right:L.spacing(2),[L.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:L.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),E=()=>{const L=v();return(0,n.jsx)("img",{src:p,className:L.micDrop,alt:"Girl dropping mic from her hands"})};var y=t(77310),P=t(87849),T=t(10315);const M=(0,d.A)(L=>({title:{paddingBottom:L.spacing(5),[L.breakpoints.down("xs")]:{paddingBottom:L.spacing(4),fontSize:L.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function S(L){const{stack:Q}=L,G=M(),{t:k}=(0,P.i)(T.O),[W,_]=(0,m.useState)(!1);return W?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.A,{variant:"h6",className:G.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>_(!1),children:k("errorPage.showLessDetails")})}),(0,n.jsx)(y.z,{text:Q,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,n.jsx)(x.A,{variant:"h6",className:G.title,children:(0,n.jsx)(u.N_,{to:"#",onClick:()=>_(!0),children:k("errorPage.showMoreDetails")})})}const B=(0,d.A)(L=>({container:{padding:L.spacing(8),[L.breakpoints.down("xs")]:{padding:L.spacing(2)}},title:{paddingBottom:L.spacing(5),[L.breakpoints.down("xs")]:{paddingBottom:L.spacing(4),fontSize:L.typography.h3.fontSize}},subtitle:{color:L.palette.textSubtle}}),{name:"BackstageErrorPage"});function F(L){const{status:Q="",statusMessage:G,additionalInfo:k,supportUrl:W,stack:_}=L,N=B(),rt=(0,h.Zp)(),Z=(0,g.l)(),{t:Y}=(0,P.i)(T.O);return(0,n.jsxs)(a.A,{container:!0,className:N.container,children:[(0,n.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,n.jsx)(x.A,{"data-testid":"error",variant:"body1",className:N.subtitle,children:Y("errorPage.subtitle",{status:Q,statusMessage:G})}),(0,n.jsx)(x.A,{variant:"body1",className:N.subtitle,children:k}),(0,n.jsx)(x.A,{variant:"h2",className:N.title,children:Y("errorPage.title")}),(0,n.jsxs)(x.A,{variant:"h6",className:N.title,children:[(0,n.jsx)(u.N_,{to:"#","data-testid":"go-back-link",onClick:()=>rt(-1),children:Y("errorPage.goBack")}),"... or please"," ",(0,n.jsx)(u.N_,{to:W||Z.url,children:"contact support"})," if you think this is a bug."]}),_&&(0,n.jsx)(S,{stack:_})]}),(0,n.jsx)(E,{})]})}},69814:(H,b,t)=>{"use strict";t.d(b,{Y:()=>rt});var n=t(31085),a=t(72427),d=t(65461),x=t(10394),m=t(42899),h=t(58837),u=t(71677),g=t(72501),p=t(14041),v=t(93285),E=t(72072),y=t(45634),P=t(58007),T=t(8109),M=t(55197),S=t(87051);const B=(0,S.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(g.A),F=(0,S.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(x.A),L=(0,S.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(x.A);function Q(Z){const{children:Y,...X}=Z,[ct,dt]=p.useState(null),Et=p.Children.toArray(Y),[It,Pt,...lt]=Et,it=lt.length?lt.pop():Et[Et.length-1],mt=Et.length>3,ut=ft=>{dt(ft.currentTarget)},Ot=()=>{dt(null)},St=!!ct;return(0,n.jsxs)(p.Fragment,{children:[(0,n.jsxs)(y.A,{"aria-label":"breadcrumb",...X,children:[Et.length>1&&(0,n.jsx)(F,{clone:!0,children:It}),Et.length>2&&(0,n.jsx)(F,{clone:!0,children:Pt}),mt&&(0,n.jsx)(B,{onClick:ut,children:"..."}),(0,n.jsx)(L,{children:it})]}),(0,n.jsx)(M.Ay,{open:St,anchorEl:ct,onClose:Ot,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,n.jsx)(P.A,{children:lt.map((ft,At)=>(0,n.jsx)(T.A,{button:!0,children:(0,n.jsx)(F,{clone:!0,children:ft})},At))})})]})}var G=t(73524);const k=(0,h.A)(Z=>({header:{gridArea:"pageHeader",padding:Z.spacing(3),width:"100%",boxShadow:Z.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:Z.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[Z.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:Z.page.fontColor,wordBreak:"break-word",fontSize:Z.typography.h3.fontSize,marginBottom:0},subtitle:{color:Z.page.fontColor,opacity:.8,display:"inline-block",marginTop:Z.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:Z.spacing(1),color:Z.page.fontColor},breadcrumb:{color:Z.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-Z.spacing(.3),marginBottom:Z.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-Z.spacing(.3),marginBottom:Z.spacing(.3)}}),{name:"BackstageHeader"}),W=({type:Z,typeLink:Y,classes:X,pageTitle:ct})=>Z?Y?(0,n.jsxs)(Q,{className:X.breadcrumb,children:[(0,n.jsx)(E.N_,{to:Y,children:Z}),(0,n.jsx)(g.A,{children:ct})]}):(0,n.jsx)(g.A,{className:X.type,children:Z}):null,_=({pageTitle:Z,classes:Y,tooltip:X})=>{const{contentRef:ct}=(0,G.H)(),dt=(0,n.jsx)(g.A,{ref:ct,tabIndex:-1,className:Y.title,variant:"h1",children:Z});return X?(0,n.jsx)(u.Ay,{title:X,placement:"top-start",children:dt}):dt},N=({classes:Z,subtitle:Y})=>Y?typeof Y!="string"?(0,n.jsx)(n.Fragment,{children:Y}):(0,n.jsx)(g.A,{className:Z.subtitle,variant:"subtitle2",component:"span",children:Y}):null;function rt(Z){const{children:Y,pageTitleOverride:X,style:ct,subtitle:dt,title:Et,tooltip:It,type:Pt,typeLink:lt}=Z,it=k(),ut=(0,a.gf)(d.U).getOptionalString("app.title")||"Backstage",Ot=X||Et,St=Et||X,ft=`${Ot} | %s | ${ut}`,At=`${Ot} | ${ut}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v.m,{titleTemplate:ft,defaultTitle:At}),(0,n.jsxs)("header",{style:ct,className:it.header,children:[(0,n.jsxs)(x.A,{className:it.leftItemsBox,children:[(0,n.jsx)(W,{classes:it,type:Pt,typeLink:lt,pageTitle:St}),(0,n.jsx)(_,{classes:it,pageTitle:St,tooltip:It}),(0,n.jsx)(N,{classes:it,subtitle:dt})]}),(0,n.jsx)(m.A,{container:!0,className:it.rightItemsBox,spacing:4,children:Y})]})]})}},24504:(H,b,t)=>{"use strict";t.d(b,{Y:()=>h});var n=t(31085),a=t(14041),d=t(58837),x=t(50868);const m=(0,d.A)(u=>({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",[u.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function h(u){const{themeId:g,children:p}=u,v=m();return(0,n.jsx)(x.A,{theme:E=>({...E,page:E.getPageTheme({themeId:g})}),children:(0,n.jsx)("main",{className:v.root,children:p})})}},27155:(H,b,t)=>{"use strict";t.d(b,{d:()=>m});var n=t(31085),a=t(14041),d=t(69814),x=t(24504);function m(h){const{themeId:u,children:g,...p}=h;return(0,n.jsxs)(x.Y,{themeId:u,children:[(0,n.jsx)(d.Y,{...p}),g]})}},73524:(H,b,t)=>{"use strict";t.d(b,{G:()=>y,H:()=>P});var n=t(31085),a=t(10394),d=t(58837),x=t(5893),m=t(14041),h=t(72664),u=function(T){return T.SIDEBAR_PIN_STATE="sidebarPinState",T}(u||{});const g={getSidebarPinState(){let T;try{T=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!T},setSidebarPinState(T){return window.localStorage.setItem("sidebarPinState",JSON.stringify(T))}};var p=t(34435);const v=(0,d.A)(T=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[T.breakpoints.up("sm")]:{paddingLeft:M=>M.isPinned?M.sidebarConfig.drawerWidthOpen:M.sidebarConfig.drawerWidthClosed},[T.breakpoints.down("xs")]:{paddingBottom:M=>M.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),E=(0,m.createContext)({content:{contentRef:void 0}});function y(T){const[M,S]=(0,m.useState)(()=>g.getSidebarPinState()),{sidebarConfig:B}=(0,m.useContext)(h.yY),F=(0,m.useRef)(null),L=(0,m.useMemo)(()=>({content:{contentRef:F}}),[F]);(0,m.useEffect)(()=>{g.setSidebarPinState(M)},[M]);const Q=(0,x.A)(W=>W.breakpoints.down("xs"),{noSsr:!0}),G=()=>S(!M),k=v({isPinned:M,sidebarConfig:B});return(0,n.jsx)(p.qj,{value:{isPinned:M,toggleSidebarPinState:G,isMobile:Q},children:(0,n.jsx)(E.Provider,{value:L,children:(0,n.jsx)(a.A,{className:k.root,children:T.children})})})}function P(){const{content:T}=(0,m.useContext)(E);return{focusContent:(0,m.useCallback)(()=>{T?.contentRef?.current?.focus()},[T]),contentRef:T?.contentRef}}},34435:(H,b,t)=>{"use strict";t.d(b,{Ut:()=>p,qj:()=>g});var n=t(31085),a=t(43836),d=t(10602),x=t(14041);const m={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},h=(0,x.createContext)(m),u=(0,a.tK)("sidebar-pin-state-context");function g(v){const{children:E,value:y}=v;return(0,n.jsx)(h.Provider,{value:y,children:(0,n.jsx)(u.Provider,{value:(0,d.B)({1:y}),children:E})})}const p=()=>{const v=(0,x.useContext)(u),E=(0,x.useContext)(h);if(v===void 0)return E||m;const y=v.atVersion(1);if(y===void 0)throw new Error("No context found for version 1.");return y}},72664:(H,b,t)=>{"use strict";t.d(b,{Rv:()=>h,U1:()=>E,hC:()=>m,i8:()=>g,yY:()=>v});var n=t(14041);const a=72,d=24,x=18,m={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:x,userBadgeDiameter:a-x*2,mobileSidebarHeight:56},h=y=>({...m,...y,iconContainerWidth:m.drawerWidthClosed,iconSize:m.drawerWidthClosed-m.iconPadding*2,userBadgeDiameter:m.drawerWidthClosed-m.userBadgePadding*2}),u={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:m.defaultOpenDelayMs+200},g=y=>({...u,...y}),p="@backstage/core/sidebar-intro-dismissed",v=(0,n.createContext)({sidebarConfig:m,submenuConfig:u}),E=(0,n.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(H,b,t)=>{"use strict";t.d(b,{O:()=>a});var n=t(93184);const a=(0,n.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
|
|
2
|
-
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"}},alertDisplay:{message_one:"({{ count }} older message)",message_other:"({{ count }} older messages)"},autoLogout:{stillTherePrompt:{title:"Logging out due to inactivity",buttonText:"Yes! Don't log me out"}},proxiedSignInPage:{title:"You do not appear to be signed in. Please try reloading the browser page."}}})},25862:(H,b,t)=>{"use strict";t.d(b,{Ig:()=>u,pn:()=>h});var n=t(31085),a=t(43836),d=t(10602),x=t(14041);const m=(0,a.tK)("analytics-context"),h=()=>{const p=(0,x.useContext)(m);if(p===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const v=p.atVersion(1);if(v===void 0)throw new Error("No context found for version 1.");return v},u=p=>{const{attributes:v,children:E}=p,P={...h(),...v},T=(0,d.B)({1:P});return(0,n.jsx)(m.Provider,{value:T,children:E})};function g(p,v){const E=y=>_jsx(u,{attributes:v,children:_jsx(p,{...y})});return E.displayName=`WithAnalyticsContext(${p.displayName||p.name||"Component"})`,E}},67237:(H,b,t)=>{"use strict";t.d(b,{J:()=>x,t:()=>d});var n=t(63544);const a=(0,n.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),d="_ROUTABLE-EXTENSION-RENDERED";class x{analyticsApi;context;constructor(h,u={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=u,a.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{a.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender}),a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),a.beforeUnloadRegistered=!0)}setContext(h){this.context=h}captureEvent(h,u,{value:g,attributes:p}={}){const{_routeNodeType:v,...E}=this.context;if(h===d){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...E,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(y){console.warn("Error during analytics event capture. %o",y)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&v==="gathered"&&E.pluginId==="root"){a.mostRecentGatheredNavigation={action:h,subject:u,value:g,attributes:p,context:E};return}try{this.analyticsApi.captureEvent({action:h,subject:u,value:g,attributes:p,context:E})}catch(y){console.warn("Error during analytics event capture. %o",y)}}}},93368:(H,b,t)=>{"use strict";t.d(b,{s:()=>u});var n=t(25862),a=t(72427),d=t(99303),x=t(14041),m=t(67237);function h(){try{return(0,a.gf)(d.c)}catch{return{captureEvent:()=>{}}}}function u(){const g=(0,x.useRef)(null),p=(0,n.pn)(),v=h();function E(){return g.current===null&&(g.current=new m.J(v)),g.current}const y=E();return y.setContext(p),y}},36017:(H,b,t)=>{"use strict";t.d(b,{k:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.alert"})},99303:(H,b,t)=>{"use strict";t.d(b,{c:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.analytics"})},65461:(H,b,t)=>{"use strict";t.d(b,{U:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.config"})},57405:(H,b,t)=>{"use strict";t.d(b,{I:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.discovery"})},39837:(H,b,t)=>{"use strict";t.d(b,{m:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.error"})},63636:(H,b,t)=>{"use strict";t.d(b,{B:()=>d,S:()=>a});var n=t(55309),a=function(x){return x[x.None=0]="None",x[x.Active=1]="Active",x}({});const d=(0,n.y)({id:"core.featureflags"})},70795:(H,b,t)=>{"use strict";t.d(b,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.fetch"})},16009:(H,b,t)=>{"use strict";t.d(b,{K:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.identity"})},56038:(H,b,t)=>{"use strict";t.d(b,{J:()=>a});var n=t(55309);const a=(0,n.y)({id:"core.translation"})},55309:(H,b,t)=>{"use strict";t.d(b,{y:()=>a});class n{config;constructor(x){if(this.config=x,!x.id.split(".").flatMap(h=>h.split("-")).every(h=>h.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${x.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function a(d){return new n(d)}},12935:(H,b,t)=>{"use strict";t.d(b,{b:()=>n});function n(a,d){return"id"in a?{api:a,deps:{},factory:()=>d}:a}},72427:(H,b,t)=>{"use strict";t.d(b,{Q2:()=>m,gf:()=>h});var n=t(31085),a=t(14041),d=t(43836),x=t(97142);function m(){const g=(0,d.qO)("api-context");if(!g)throw new x.EH("API context is not available");const p=g.atVersion(1);if(!p)throw new x.EH("ApiContext v1 not available");return p}function h(g){const v=m().get(g);if(!v)throw new x.EH(`No implementation available for ${g}`);return v}function u(g){return function(v){const E=P=>{const T=m(),M={};for(const S in g)if(g.hasOwnProperty(S)){const B=g[S],F=T.get(B);if(!F)throw new NotImplementedError(`No implementation available for ${B}`);M[S]=F}return _jsx(v,{...P,...M})},y=v.displayName||v.name||"Component";return E.displayName=`withApis(${y})`,E}}},82266:(H,b,t)=>{"use strict";t.d(b,{n:()=>a});var n=t(43836);const a=()=>{const d=(0,n.qO)("app-context");if(!d)throw new Error("App context is not available");const x=d.atVersion(1);if(!x)throw new Error("AppContext v1 not available");return x}},19402:(H,b,t)=>{"use strict";t.d(b,{E:()=>m,h:()=>x});var n=t(63544);const a=(0,n.Q)("component-data-store",()=>new WeakMap),d="__backstage_data";function x(h,u,g){const p=h;let v=p[d]??a.get(h);if(v||(v={map:new Map},Object.defineProperty(p,d,{enumerable:!1,configurable:!0,writable:!1,value:v}),a.set(h,v)),v.map.has(u)){const E=h.displayName||h.name;throw new Error(`Attempted to attach duplicate data "${u}" to component "${E}"`)}v.map.set(u,g)}function m(h,u){if(!h)return;const g=h.type;if(!g)return;const p=g[d]??a.get(g);if(p)return p.map.get(u)}},88758:(H,b,t)=>{"use strict";t.d(b,{NC:()=>E,zZ:()=>y,QJ:()=>v});var n=t(31085),a=t(14041),d=t(93368),x=t(25862),m=t(82266),h=t(9222),u=t(19402);class g extends a.Component{static getDerivedStateFromError(T){return{error:T}}state={error:void 0};handleErrorReset=()=>{this.setState({error:void 0})};render(){const{error:T}=this.state,{app:M,plugin:S}=this.props,{ErrorBoundaryFallback:B}=M.getComponents();return T?(0,n.jsx)(B,{error:T,resetError:this.handleErrorReset,plugin:S}):this.props.children}}var p=t(67237);function v(P){const{component:T,mountPoint:M,name:S}=P;return y({component:{lazy:()=>T().then(B=>{const F=Q=>{const G=(0,d.s)();try{(0,h.S)(M)}catch(k){if(typeof k=="object"&&k!==null){const{message:W}=k;if(typeof W=="string"&&W.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 k}return(0,a.useEffect)(()=>{G.captureEvent(p.t,"")},[G]),(0,n.jsx)(B,{...Q})},L=S||B.displayName||B.name||"LazyComponent";return F.displayName=`RoutableExtension(${L})`,F},B=>L=>{const Q=(0,m.n)(),{BootErrorPage:G}=Q.getComponents();return(0,n.jsx)(G,{step:"load-chunk",error:B})})},data:{"core.mountPoint":M},name:S})}function E(P){const{component:T,name:M}=P;return y({component:T,name:M})}function y(P){const{data:T={},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 S;if("lazy"in P.component){const F=P.component.lazy;S=(0,a.lazy)(()=>F().then(L=>({default:L})))}else S=P.component.sync;const B=M||S.displayName||S.name||"Component";return{expose(F){const L=Q=>{const G=(0,m.n)(),{Progress:k}=G.getComponents(),W=T?.["core.mountPoint"];return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(k,{}),children:(0,n.jsx)(g,{app:G,plugin:F,children:(0,n.jsx)(x.Ig,{attributes:{pluginId:F.getId(),...M&&{extension:M},...W&&{routeRef:W.id}},children:(0,n.jsx)(S,{...Q})})})})};(0,u.h)(L,"core.plugin",F),(0,u.h)(L,"core.extensionName",M);for(const[Q,G]of Object.entries(T))(0,u.h)(L,Q,G);return L.displayName=`Extension(${B})`,L}}}},82442:(H,b,t)=>{"use strict";t.d(b,{O:()=>u});var n=t(14041),a=t(19402),d=t(72427),x=t(63636);function m(g,p,v,E){return n.Children.toArray(g).flatMap(y=>{if(!(0,n.isValidElement)(y))return[];if(y.type===n.Fragment)return m(y.props.children,p,v,E);if((0,a.E)(y,"core.featureFlagged")){const P=y.props;return("with"in P?p.isActive(P.with):!p.isActive(P.without))?m(y.props.children,p,v,E):[]}if(v===void 0||v(y))return[y];if(E)throw new Error(E);return m(y.props.children,p,v,E)})}class h{node;featureFlagsApi;constructor(p,v){this.node=p,this.featureFlagsApi=v}selectByComponentData(p){const v=m(this.node,this.featureFlagsApi,E=>(0,a.E)(E,p.key)!==void 0,p.withStrictError);return new h(v,this.featureFlagsApi)}findComponentData(p){return m(this.node,this.featureFlagsApi,E=>(0,a.E)(E,p.key)!==void 0).map(E=>(0,a.E)(E,p.key)).filter(E=>E!==void 0)}getElements(){return m(this.node,this.featureFlagsApi)}}function u(g,p,v=[]){const E=(0,d.gf)(x.B),y=new h(g,E);return(0,n.useMemo)(()=>p(y),[g,...v])}},9803:(H,b,t)=>{"use strict";t.d(b,{i:()=>a});class n{config;constructor(x){this.config=x}getId(){return this.config.id}getApis(){return this.config.apis??[]}getFeatureFlags(){return this.config.featureFlags?.slice()??[]}get routes(){return this.config.routes??{}}get externalRoutes(){return this.config.externalRoutes??{}}provide(x){return x.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(d){return new n(d)}},34569:(H,b,t)=>{"use strict";t.d(b,{H:()=>d});var n=t(59598);class a{id;params;[x=n.b];constructor(h,u){this.id=h,this.params=u,this[x]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function d(m){return new a(m.id,m.params??[])}var x},59598:(H,b,t)=>{"use strict";t.d(b,{b:()=>a});var n=t(63544);const a=(0,n.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(H,b,t)=>{"use strict";t.d(b,{S:()=>x});var n=t(14041),a=t(18690),d=t(43836);function x(m){const{pathname:h}=(0,a.zy)(),u=(0,d.qO)("routing-context");if(!u)throw new Error("Routing context is not available");const g=u.atVersion(1),p=(0,n.useMemo)(()=>g&&g.resolve(m,{pathname:h}),[g,m,h]);if(!u)throw new Error("useRouteRef used outside of routing context");if(!g)throw new Error("RoutingContext v1 not available");const v="optional"in m&&m.optional;if(!p&&!v)throw new Error(`No path for ${m}`);return p}},93184:(H,b,t)=>{"use strict";t.d(b,{h:()=>x,v:()=>m});var n=t(99833);function a(h){const u=new Array;function g(p,v){for(const[E,y]of Object.entries(p))typeof y=="string"?u.push([v+E,y]):g(y,`${v}${E}.`)}return g(h,""),Object.fromEntries(u)}class d{#t;#n;#e;constructor(u){this.#t=u.id,this.#n=a(u.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#n}setDefaultResource(u){this.#e=u}getDefaultResource(){return this.#e}toString(){return`TranslationRef{id=${this.id}}`}}function x(h){const u=new d(h);return h.translations&&u.setDefaultResource((0,n.o)({ref:u,translations:h.translations})),u}function m(h){const u=h;if(u.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${u.$$type}'`);if(u.version!=="v1")throw new Error(`Invalid translation ref, bad version '${u.version}'`);return u}},99833:(H,b,t)=>{"use strict";t.d(b,{Y:()=>n,o:()=>a});function n(d){const x=d;if(x.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${x.$$type}'`);if(x.version!=="v1")throw new Error(`Invalid translation resource, bad version '${x.version}'`);return x}function a(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([x,m])=>({language:x,loader:()=>m().then(h=>{const u=h.default;return{messages:u?.$$type==="@backstage/TranslationMessages"?u.messages:u}})}))}}},87849:(H,b,t)=>{"use strict";t.d(b,{i:()=>h});var n=t(14041),a=t(72427),d=t(39837),x=t(56038);const m=new WeakSet,h=u=>{const g=(0,a.gf)(d.m),p=(0,a.gf)(x.J),[v,E]=(0,n.useState)(()=>p.getTranslation(u)),y=(0,n.useMemo)(()=>p.translation$(u),[p,u]),P=(0,n.useCallback)(M=>{if(!m.has(u)){const S=`Failed to load translation resource '${u.id}'; caused by ${M}`;console.error(S),g.post(new Error(S)),m.add(u)}},[g,u]);(0,n.useEffect)(()=>{const M=y.subscribe({next(S){S.ready&&E(S)},error(S){P(S)}});return()=>{M.unsubscribe()}},[y,P]);const T=(0,n.useRef)(!0);if((0,n.useEffect)(()=>{T.current?T.current=!1:E(p.getTranslation(u))},[p,u]),!v.ready)throw new Promise(M=>{const S=y.subscribe({next(B){B.ready&&(S.unsubscribe(),M())},error(B){S.unsubscribe(),P(B),M()}})});return{t:v.t}}},70835:(H,b,t)=>{"use strict";t.d(b,{o:()=>d});var n=t(59750);async function a(x){try{const m=await x.text();if(m){if(x.headers.get("content-type")?.startsWith("application/json"))try{const h=JSON.parse(m);if(h.error&&h.response)return h}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}, ${m}`},response:{statusCode:x.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${x.status} ${x.statusText}`},response:{statusCode:x.status}}}class d extends Error{response;body;cause;statusCode;statusText;static async fromResponse(m){const h=await a(m),u=h.response.statusCode||m.status,g=m.statusText,p=`Request failed with ${u} ${g}`,v=(0,n.cy)(h.error);return new d({message:p,response:m,data:h,cause:v,statusCode:u,statusText:g})}constructor(m){super(m.message),this.name="ResponseError",this.response=m.response,this.body=m.data,this.cause=m.cause,this.statusCode=m.statusCode,this.statusText=m.statusText}}},93007:(H,b,t)=>{"use strict";t.d(b,{b:()=>n});function n(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const x=d;return!(typeof x.name!="string"||x.name===""||typeof x.message!="string")}function a(d){if(typeof d!="object"||d===null||Array.isArray(d))throw new Error(`Encountered invalid error, not an object, got '${d}'`);const x=d;if(typeof x.name!="string"||x.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof x.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},97142:(H,b,t)=>{"use strict";t.d(b,{m_:()=>u,EH:()=>v});var n=t(93007),a=t(59750);class d extends Error{cause;constructor(T,M){let S=T;if(M!==void 0){const B=(0,a.M5)(M);S?S+=`; caused by ${B}`:S=`caused by ${B}`}super(S),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,n.b)(M)?M:void 0}}class x extends null{name="InputError"}class m extends null{name="AuthenticationError"}class h extends null{name="NotAllowedError"}class u extends d{name="NotFoundError"}class g extends null{name="ConflictError"}class p extends null{name="NotModifiedError"}class v extends d{name="NotImplementedError"}class E extends null{}class y extends d{constructor(T,M){super(T,M),this.name=(0,n.b)(M)?M.name:"Error"}}},59750:(H,b,t)=>{"use strict";t.d(b,{M5:()=>h,cy:()=>m});var n=t(69655),a=t.n(n),d=t(93007);function x(u,g){const v={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(u)};return g?.includeStack||(delete v.stack,v.cause&&typeof v.cause=="object"&&"stack"in v.cause&&delete v.cause.stack),v}function m(u){const g=(0,n.deserializeError)(u);return u.stack||(g.stack=void 0),g}function h(u){if((0,d.b)(u)){const g=String(u);return g!=="[object Object]"?g:`${u.name}: ${u.message}`}return`unknown error '${u}'`}},96726:(H,b,t)=>{"use strict";t.d(b,{L:()=>Me,Y:()=>Be});var n=t(59869);const a="amazonaws.com";function d(R){const l=R.getOptionalString("endpoint"),A=R.getOptionalBoolean("s3ForcePathStyle")??!1;let D,nt;if(l){try{const kt=new URL(l);D=kt.host,nt=kt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${l}' is not a valid URL`)}if(nt!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${l}'`)}else D=a;const ht=R.getOptionalString("accessKeyId"),st=R.getOptionalString("secretAccessKey")?.trim(),Tt=R.getOptionalString("roleArn"),Rt=R.getOptionalString("externalId");return{host:D,endpoint:l,s3ForcePathStyle:A,accessKeyId:ht,secretAccessKey:st,roleArn:Tt,externalId:Rt}}function x(R){const l=R.map(d);return l.some(A=>A.host===a)||l.push({host:a}),l}class m{integrationConfig;static factory=({config:l})=>{const A=x(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,n.oS)(A.map(D=>new m(D)),D=>D.config.host)};get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return l}}const h="console.aws.amazon.com";function u(R){const l=R.getOptionalString("accessKeyId"),A=R.getOptionalString("secretAccessKey")?.trim(),D=R.getOptionalString("roleArn"),nt=R.getOptionalString("externalId"),ht=R.getString("region");return{host:R.getOptionalString("host")||`${ht}.${h}`,accessKeyId:l,secretAccessKey:A,roleArn:D,externalId:nt,region:ht}}function g(R){return R.map(u)}class p{integrationConfig;static factory=({config:l})=>{const A=g(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,n.oS)(A.map(D=>new p(D)),D=>D.config.host)};get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){const D=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!D)throw new Error("");const[,nt]=D;return v(l,nt,"edit")}}function v(R,l,A){const D=A==="edit"?"files/edit":A;return R.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${D}/`)}const E="GB";class y{static fromRepoUrl(l){const A=new URL(l);let D,nt,ht;const st=A.pathname.split("/").map(ae=>decodeURIComponent(ae));if(st[2]==="_git"?(D=st[1],nt=ht=st[3]):st[3]==="_git"?(D=st[1],nt=st[2],ht=st[4]):st[4]==="_git"&&(D=`${st[1]}/${st[2]}`,nt=st[3],ht=st[5]),!D||!nt||!ht)throw new Error("Azure URL must point to a git repository");const Tt=A.searchParams.get("path")??void 0;let Rt;const kt=A.searchParams.get("version");if(kt){if(kt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Rt=kt.slice(2)}return new y(A.origin,D,nt,ht,Tt,Rt)}#t;#n;#e;#s;#r;#o;constructor(l,A,D,nt,ht,st){this.#t=l,this.#n=A,this.#e=D,this.#s=nt,this.#r=ht,this.#o=st}#a=(...l)=>{const A=new URL(this.#t);return A.pathname=l.map(D=>encodeURIComponent(D)).join("/"),A};toRepoUrl(){let l;return this.#e===this.#s?l=this.#a(this.#n,"_git",this.#s):l=this.#a(this.#n,this.#e,"_git",this.#s),this.#r&&l.searchParams.set("path",this.#r),this.#o&&l.searchParams.set("version",E+this.#o),l.toString()}toFileUrl(){if(!this.#r)throw new Error("Azure URL must point to a specific path to be able to download a file");const l=this.#a(this.#n,this.#e,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("api-version","6.0"),l.searchParams.set("path",this.#r),this.#o&&l.searchParams.set("version",this.#o),l.toString()}toArchiveUrl(){const l=this.#a(this.#n,this.#e,"_apis","git","repositories",this.#s,"items");return l.searchParams.set("recursionLevel","full"),l.searchParams.set("download","true"),l.searchParams.set("api-version","6.0"),this.#r&&l.searchParams.set("scopePath",this.#r),this.#o&&l.searchParams.set("version",this.#o),l.toString()}toCommitsUrl(){const l=this.#a(this.#n,this.#e,"_apis","git","repositories",this.#s,"commits");return l.searchParams.set("api-version","6.0"),this.#o&&l.searchParams.set("searchCriteria.itemVersion.version",this.#o),l.toString()}getOwner(){return this.#n}getProject(){return this.#e}getRepo(){return this.#s}getPath(){return this.#r}getRef(){return this.#o}}const P="dev.azure.com",T=["clientId","clientSecret","tenantId","personalAccessToken"],M=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function S(R){for(const l of M.entries()){const[A,D]=l,nt=T.filter(ht=>!D.includes(ht));if(D.every(ht=>R[ht]!==void 0)&&nt.every(ht=>R[ht]===void 0))return{kind:A,organizations:R.organizations,...D.reduce((ht,st)=>(ht[st]=R[st],ht),{})}}throw new Error("is not a valid credential")}function B(R){const l=R.getOptionalString("host")??P;let A=R.getOptionalConfigArray("credentials")?.map(ht=>({organizations:ht.getOptionalStringArray("organizations"),personalAccessToken:ht.getOptionalString("personalAccessToken")?.trim(),tenantId:ht.getOptionalString("tenantId"),clientId:ht.getOptionalString("clientId"),clientSecret:ht.getOptionalString("clientSecret")?.trim()}));const D=R.getOptionalString("token")?.trim();if(R.getOptional("credential")!==void 0&&R.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(R.getOptional("token")!==void 0&&R.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(D!==void 0){const ht=[{personalAccessToken:D}];A=A?.concat(ht)??ht}if(R.getOptional("credential")!==void 0){const ht=[{organizations:R.getOptionalStringArray("credential.organizations"),token:R.getOptionalString("credential.token")?.trim(),tenantId:R.getOptionalString("credential.tenantId"),clientId:R.getOptionalString("credential.clientId"),clientSecret:R.getOptionalString("credential.clientSecret")?.trim()}];A=A?.concat(ht)??ht}if(!(0,n.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let nt;if(A!==void 0){const ht=A?.reduce((st,Tt,Rt)=>{let kt;try{S(Tt)}catch(ae){kt=ae.message}return kt!==void 0&&st.push(`credential at position ${Rt+1} ${kt}`),st},Array.of()).concat(Object.entries(A.filter(st=>st.organizations!==void 0&&st.organizations.length>0).reduce((st,Tt,Rt)=>(Tt.organizations?.forEach(kt=>{st[kt]||(st[kt]=[]),st[kt].push(Rt+1)}),st),{})).filter(([st,Tt])=>Tt.length>1).reduce((st,[Tt,Rt])=>(st.push(`organization ${Tt} is specified multiple times in credentials at positions ${Rt.slice(0,Rt.length-1).join(", ")} and ${Rt[Rt.length-1]}`),st),Array.of()));if(ht?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${ht.join("; ")}`);if(nt=A.map(st=>S(st)),nt.some(st=>st.kind!=="PersonalAccessToken")&&l!==P)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${P}`);if(nt.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:nt}}function F(R){const l=R.map(B);return l.some(A=>A.host===P)||l.push({host:P}),l}class L{integrationConfig;static factory=({config:l})=>{const A=F(l.getOptionalConfigArray("integrations.azure")??[]);return(0,n.oS)(A.map(D=>new L(D)),D=>D.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:A,base:D}=l;if((0,n.AY)(A))return A;try{const nt=y.fromRepoUrl(D),ht=new URL(D),st=new URL(`https://a.com${nt.getPath()??""}`),Tt=new URL(A,st).pathname;return ht.searchParams.set("path",Tt),l.lineNumber&&(ht.searchParams.set("line",String(l.lineNumber)),ht.searchParams.set("lineEnd",String(l.lineNumber+1)),ht.searchParams.set("lineStartColumn","1"),ht.searchParams.set("lineEndColumn","1")),ht.toString()}catch{return new URL(A,D).toString()}}resolveEditUrl(l){return l}}var Q=t(52536),G=t.n(Q);const k="bitbucket.org",W="https://api.bitbucket.org/2.0";function _(R){const l=k,A=W,D=R.getString("username"),nt=R.getString("appPassword")?.trim();return{host:l,apiBaseUrl:A,username:D,appPassword:nt}}function N(R){const l=R.map(_);return l.length===0&&l.push({host:k,apiBaseUrl:W}),l}class rt{integrationConfig;static factory=({config:l})=>{const A=N(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,n.oS)(A.map(D=>new rt(D)),D=>D.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 A=(0,n.ku)(l);if(l.lineNumber){const D=new URL(A);return D.hash=`lines-${l.lineNumber}`,D.toString()}return A}resolveEditUrl(l){const A=G()(l),D=new URL(l);return D.searchParams.set("mode","edit"),D.searchParams.set("at",A.ref),D.toString()}}var Z=t(45250);const Y="bitbucket.org",X="https://api.bitbucket.org/2.0";function ct(R){const l=R.getOptionalString("host")??Y;let A=R.getOptionalString("apiBaseUrl");const D=R.getOptionalString("token")?.trim(),nt=R.getOptionalString("username"),ht=R.getOptionalString("appPassword")?.trim();if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return A?A=(0,Z.trimEnd)(A,"/"):l===Y?A=X:A=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:A,token:D,username:nt,appPassword:ht}}function dt(R){const l=R.map(ct);return l.some(A=>A.host===Y)||l.push({host:Y,apiBaseUrl:X}),l}class Et{integrationConfig;static factory=({config:l})=>{const A=dt(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,n.oS)(A.map(D=>new Et(D)),D=>D.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 A=(0,n.ku)(l);if(!l.lineNumber)return A;const D=new URL(A);return this.integrationConfig.host==="bitbucket.org"?D.hash=`lines-${l.lineNumber}`:D.hash=`${l.lineNumber}`,D.toString()}resolveEditUrl(l){const A=G()(l),D=new URL(l);return D.searchParams.set("mode","edit"),D.searchParams.set("spa","0"),D.searchParams.set("at",A.ref),D.toString()}}function It(R){const l=R.getString("host");let A=R.getOptionalString("apiBaseUrl");const D=R.getOptionalString("token")?.trim(),nt=R.getOptionalString("username"),ht=R.getOptionalString("password");if(!(0,n.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return A?A=(0,Z.trimEnd)(A,"/"):A=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:A,token:D,username:nt,password:ht}}function Pt(R){return R.map(It)}class lt{integrationConfig;static factory=({config:l})=>{const A=Pt(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,n.oS)(A.map(D=>new lt(D)),D=>D.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 A=(0,n.ku)(l);if(l.lineNumber){const D=new URL(A);return D.hash=l.lineNumber.toString(),D.toString()}return A}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function it(R){const l=R.getString("host");let A=R.getOptionalString("baseUrl"),D=R.getOptionalString("cloneUrl"),nt=R.getString("gitilesBaseUrl");const ht=R.getOptionalString("username"),st=R.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(A&&!(0,n.AY)(A))throw new Error(`Invalid Gerrit integration config, '${A}' is not a valid baseUrl`);if(D&&!(0,n.AY)(D))throw new Error(`Invalid Gerrit integration config, '${D}' is not a valid cloneUrl`);if(!(0,n.AY)(nt))throw new Error(`Invalid Gerrit integration config, '${nt}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${l}' is not a valid host`);return A?A=(0,Z.trimEnd)(A,"/"):A=`https://${l}`,nt?nt=(0,Z.trimEnd)(nt,"/"):nt=`https://${l}`,D?D=(0,Z.trimEnd)(D,"/"):D=A,{host:l,baseUrl:A,cloneUrl:D,gitilesBaseUrl:nt,username:ht,password:st}}function mt(R){return R.map(it)}var ut=t(1048).hp;const Ot=")]}'";function St(R,l){const A=new URL(R.gitilesBaseUrl),D=new URL(l),ht=D.pathname.substring(D.pathname.startsWith("/a/")?2:0).replace(A.pathname,"").split("/").filter(Te=>!!Te),st=ht.indexOf("+");if(st<=0)throw new Error(`Unable to parse project from url: ${l}`);const Tt=trimStart(ht.slice(0,st).join("/"),"/"),Rt=ht.indexOf("heads");if(Rt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const kt=ht[Rt+1],ae=ht.slice(Rt+2).join("/");return{branch:kt,filePath:ae===""?"/":ae,project:Tt}}function ft(R,l){const A=new URL(R.gitilesBaseUrl),D=new URL(l),ht=(0,Z.trimStart)(D.pathname.substring(D.pathname.startsWith("/a/")?2:0).replace(A.pathname,""),"/").split("/").filter(ge=>!!ge),st=(0,Z.takeWhile)(ht,ge=>ge!=="+");if(st.length===0)throw new Error(`Unable to parse gitiles url: ${l}`);const Tt=ht.slice(st.length+1),Rt=(0,Z.join)(st,"/");if(Tt.length>0&&Tt[0]==="HEAD"){const ge=Tt.shift(),zt=(0,Z.join)(Tt,"/");return{project:Rt,ref:ge,refType:"head",path:zt||"/",basePath:(0,Z.trimEnd)(l.replace(zt,""),"/")}}if(Tt.length>0&&Tt[0].length===40){const ge=Tt.shift(),zt=(0,Z.join)(Tt,"/");return{project:Rt,ref:ge,refType:"sha",path:zt||"/",basePath:(0,Z.trimEnd)(l.replace(zt,""),"/")}}const kt=(0,Z.join)(Tt,"/"),Te=/^refs\/(?<refsReference>heads|tags)\/(?<ref>.*?)(\/|$)/.exec(kt);if(Te){const ge=Te[0];let zt;const{refsReference:pe,ref:ne}=Te.groups||{},_e=kt.replace(ge,"");switch(pe){case"heads":zt="branch";break;case"tags":zt="tag";break;default:throw new Error(`Unable to parse gitiles url: ${l}`)}return{project:Rt,ref:ne,refType:zt,path:_e||"/",basePath:(0,Z.trimEnd)(l.replace(_e,""),"/")}}throw new Error(`Unable to parse gitiles : ${l}`)}function At(R,l,A,D){return`${R.gitilesBaseUrl}/${l}/+/refs/heads/${A}/${trimStart(D,"/")}`}function pt(R,l,A,D){const nt=D==="/"||D===""?".tar.gz":`/${D}.tar.gz`;return`${Ct(R)}/${l}/+archive/refs/heads/${A}${nt}`}function tt(R){return R.password?"/a/":"/"}function Ct(R){if(!R.baseUrl||!R.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(R.gitilesBaseUrl.startsWith(R.baseUrl))return R.gitilesBaseUrl.replace(R.baseUrl.concat("/"),R.baseUrl.concat(tt(R)));if(R.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return R.gitilesBaseUrl}function et(R,l){const{branch:A,project:D}=St(R,l);return`${R.baseUrl}${tt(R)}projects/${encodeURIComponent(D)}/branches/${A}`}function U(R,l){const{project:A}=St(R,l);return`${R.cloneUrl}${tt(R)}${A}`}function V(R,l){const{branch:A,filePath:D,project:nt}=St(R,l);return`${R.baseUrl}${tt(R)}projects/${encodeURIComponent(nt)}/branches/${A}/files/${encodeURIComponent(D)}/content`}function vt(R){return`${R.baseUrl}${tt(R)}projects/`}function Dt(R){const l={};if(!R.password)return l;const A=ut.from(`${R.username}:${R.password}`,"utf8");return l.Authorization=`Basic ${A.toString("base64")}`,{headers:l}}async function xt(R){const l=await R.text();if(l.startsWith(Ot))try{return JSON.parse(l.slice(Ot.length))}catch(A){throw new Error(`Invalid response from Gerrit: ${l.slice(0,10)} - ${A}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${l.slice(0,10)}`)}class Lt{integrationConfig;static factory=({config:l})=>{const A=mt(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,n.oS)(A.map(D=>new Lt(D)),D=>D.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:A,base:D,lineNumber:nt}=l;let ht;if(A.startsWith("/")){const{basePath:st}=ft(this.config,D);return st+A}return A?ht=new URL(A,D):ht=new URL(D),nt&&(ht.hash=nt.toString()),ht.toString()}resolveEditUrl(l){return l}}var Wt=t(36021);const _t="gitlab.com",Ut="https://gitlab.com/api/v4";function Nt(R){const l=R.getString("host");let A=R.getOptionalString("apiBaseUrl");const D=R.getOptionalString("token")?.trim();let nt=R.getOptionalString("baseUrl");if(A?A=(0,Z.trimEnd)(A,"/"):l===_t&&(A=Ut),nt?nt=(0,Z.trimEnd)(nt,"/"):nt=`https://${l}`,(0,n.HO)(l)){if(!A||!(0,n.AY)(A))throw new Error(`Invalid GitLab integration config, '${A}' is not a valid apiBaseUrl`);if(!(0,n.AY)(nt))throw new Error(`Invalid GitLab integration config, '${nt}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${l}' is not a valid host`);return{host:l,token:D,apiBaseUrl:A,baseUrl:nt}}function ce(R){const l=R.map(Nt);return l.some(A=>A.host===_t)||l.push({host:_t,apiBaseUrl:Ut,baseUrl:`https://${_t}`}),l}function Vt(R){let l="";return R.host!==_t&&(l=new URL(R.baseUrl).pathname),trimEnd(l,"/")}class Ft{integrationConfig;static factory=({config:l})=>{const A=ce(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,n.oS)(A.map(D=>new Ft(D)),D=>D.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return Kt(l,"edit")}}function Kt(R,l){return R.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function ee(R){const l=R.getString("host");let A=R.getOptionalString("baseUrl");const D=R.getOptionalString("username"),nt=R.getOptionalString("password")?.trim();if((0,n.HO)(l)){if(A&&!(0,n.AY)(A))throw new Error(`Invalid Gitea integration config, '${A}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${l}' is not a valid host`);return A?A=(0,Z.trimEnd)(A,"/"):A=`https://${l}`,{host:l,baseUrl:A,username:D,password:nt}}var Fe=t(1048).hp;function nn(R,l){const A=oe(R,l);return`${A.url}/${A.owner}/${A.name}/_edit/${A.ref}/${A.path}`}function Ye(R,l){const A=oe(R,l);return`${A.url}/api/v1/repos/${A.owner}/${A.name}/contents/${A.path}?ref=${A.ref}`}function Qe(R,l){const A=oe(R,l);return`${A.url}/api/v1/repos/${A.owner}/${A.name}/archive/${A.ref}.tar.gz`}function re(R,l){const A=oe(R,l);return`${A.url}/api/v1/repos/${A.owner}/${A.name}/git/commits/${A.ref}`}function Ze(R){const l={},{username:A,password:D}=R;return D?(A?l.Authorization=`basic ${Fe.from(`${A}:${D}`).toString("base64")}`:l.Authorization=`token ${D}`,{headers:l}):l}function oe(R,l){const A=R.baseUrl??`https://${R.host}`;try{const[D,nt,ht,st,Tt,Rt,...kt]=l.replace(A,"").split("/"),ae=kt.join("/").replace(/^\//,"");return{url:A,owner:nt,name:ht,ref:Rt,path:ae}}catch(D){throw new Error(`Incorrect URL: ${l}, ${D}`)}}class Ie{config;static factory=({config:l})=>{const D=(l.getOptionalConfigArray("integrations.gitea")??[]).map(nt=>ee(nt));return(0,n.oS)(D.map(nt=>new Ie(nt)),nt=>nt.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return nn(this.config,l)}}function Je(R){const l=R.getString("host"),A=R.getOptionalString("token"),D=R.getOptionalString("apiKey");if(!(0,n.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:D,token:A}}function he(R,l){const A=De(R,l);return`${A.baseUrl}/ng/account/${A.accountId}/module/code${A.orgName!==""?`/orgs/${A.orgName}`:""}${A.projectName!==""?`/projects/${A.projectName}`:""}/repos/${A.repoName}/files/${A.branch}/~/${A.path}`}function Xe(R,l){const A=De(R,l);let D=`${A.baseUrl}/gateway/code/api/v1/repos/${A.accountId}`;return A.orgName&&(D+=`/${A.orgName}`),A.projectName&&(D+=`/${A.projectName}`),D+=`/${A.repoName}/+/raw/${A.path}?routingId=${A.accountId}&git_ref=refs/heads/${A.refString}`,D}function hn(R,l){const A=De(R,l);let D=`${A.baseUrl}/gateway/code/api/v1/repos/${A.accountId}`;return A.orgName&&(D+=`/${A.orgName}`),A.projectName&&(D+=`/${A.projectName}`),D+=`/${A.repoName}/+/archive/${A.branch}.zip?routingId=${A.accountId}`,D}function sn(R,l){const A=De(R,l);let D=`${A.baseUrl}/gateway/code/api/v1/repos/${A.accountId}`;return A.orgName&&(D+=`/${A.orgName}`),A.projectName&&(D+=`/${A.projectName}`),D+=`/${A.repoName}/+/content?routingId=${A.accountId}&include_commit=true&git_ref=refs/heads/${A.branch}`,D}function rn(R){const l={},{token:A,apiKey:D}=R;return D?l["x-api-key"]=D:A&&(l.Authorization=`Bearer ${A}`),{headers:l}}function De(R,l){const A=`https://${R.host}`;try{const D=new URL(l),nt=D.pathname.split("/").filter(de=>de!==""),ht=D.pathname.split("/"),st=nt.findIndex(de=>de==="account")+1,Tt=nt[st],Rt=nt.findIndex(de=>de==="orgs"),kt=Rt!==-1?nt[Rt+1]:"",ae=nt.findIndex(de=>de==="projects"),Te=ae!==-1?nt[ae+1]:"",ge=nt.findIndex((de,an)=>de==="repos"&&an>Math.max(st,Rt,ae))+1,zt=nt[ge],pe=ht.slice(ht.findIndex(de=>de==="files"||de==="edit")+1),ne=pe.findIndex(de=>de==="~"),_e=pe.slice(0,ne).join("/"),ze=ne!==-1?pe.slice(ne+1).join("/").replace(/^\//,""):"";return{baseUrl:A,accountId:Tt,orgName:kt,projectName:Te,refString:_e,path:ze,repoName:zt,refDashStr:pe.slice(0,ne).join("-"),branch:ne!==-1?pe.slice(0,ne).join("/"):pe.join("/")}}catch(D){throw new Error(`Incorrect URL: ${l}, ${D}`)}}class Le{config;static factory=({config:l})=>{const D=(l.getOptionalConfigArray("integrations.harness")??[]).map(nt=>Je(nt));return(0,n.oS)(D.map(nt=>new Le(nt)),nt=>nt.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return he(this.config,l)}}const ke="blob.core.windows.net";function on(R){const l=R.getOptionalString("endpoint"),A=R.getString("accountName"),D=R.getOptionalString("accountKey")?.trim(),nt=R.getOptionalString("sasToken")?.trim(),ht=R.getOptionalString("connectionString")?.trim(),st=R.getOptionalString("endpointSuffix")?.trim();let Tt,Rt;if(l){try{const ae=new URL(l);Tt=ae.host,Rt=ae.pathname}catch{throw new Error(`invalid azureBlobStorage integration config, endpoint '${l}' is not a valid URL`)}if(Rt!=="/")throw new Error(`invalid azureBlobStorage integration config, endpoints cannot contain path, got '${l}'`)}else Tt=ke;const kt=R.has("aadCredential")?{clientId:R.getString("aadCredential.clientId"),tenantId:R.getString("aadCredential.tenantId"),clientSecret:R.getString("aadCredential.clientSecret")?.trim()}:void 0;if(D&&nt)throw new Error(`Invalid Azure Blob Storage config for ${A}: Both account key and SAS token cannot be used simultaneously.`);if(kt&&(D||nt))throw new Error(`Invalid Azure Blob Storage config for ${A}: Cannot use both Azure AD credentials and account keys/SAS tokens for the same account.`);return{host:Tt,endpoint:l,accountName:A,accountKey:D,sasToken:nt,connectionString:ht,endpointSuffix:st,aadCredential:kt}}function ye(R){const l=R.map(on);return l.some(A=>A.host===ke)||l.push({host:ke}),l}class Ne{integrationConfig;static factory=({config:l})=>{const A=ye(l.getOptionalConfigArray("integrations.azureBlobStorage")??[]);return(0,n.oS)(A.map(D=>new Ne(D)),D=>D.config.host)};get type(){return"azureBlobStorage"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,n.ku)(l)}resolveEditUrl(l){return l}}class We{byType;static fromConfig(l){return new We({awsS3:m.factory({config:l}),awsCodeCommit:p.factory({config:l}),azureBlobStorage:Ne.factory({config:l}),azure:L.factory({config:l}),bitbucket:Et.factory({config:l}),bitbucketCloud:rt.factory({config:l}),bitbucketServer:lt.factory({config:l}),gerrit:Lt.factory({config:l}),github:Wt.U.factory({config:l}),gitlab:Ft.factory({config:l}),gitea:Ie.factory({config:l}),harness:Le.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 A=Object.values(this.byType).map(D=>D.byUrl(l)).filter(Boolean);if(A.length>1){const D=A.filter(nt=>!(nt instanceof Et));D.length!==0&&(A=D)}return A[0]}byHost(l){return Object.values(this.byType).map(A=>A.byHost(l)).find(Boolean)}resolveUrl(l){const A=this.byUrl(l.base);return A?A.resolveUrl(l):(0,n.ku)(l)}resolveEditUrl(l){const A=this.byUrl(l);return A?A.resolveEditUrl(l):l}}var Ke=t(55309);class Me{static fromConfig(l){return We.fromConfig(l)}}const Be=(0,Ke.y)({id:"integration.scmintegrations"})},36021:(H,b,t)=>{"use strict";t.d(b,{U:()=>g,F:()=>p});var n=t(59869),a=t(45250);const d="github.com",x="https://api.github.com",m="https://raw.githubusercontent.com";function h(v){const E=v.getOptionalString("host")??d;let y=v.getOptionalString("apiBaseUrl"),P=v.getOptionalString("rawBaseUrl");const T=v.getOptionalString("token")?.trim(),M=v.getOptionalConfigArray("apps")?.map(S=>({appId:S.getNumber("appId"),clientId:S.getString("clientId"),clientSecret:S.getString("clientSecret"),webhookSecret:S.getString("webhookSecret"),privateKey:S.getString("privateKey"),allowedInstallationOwners:S.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,n.HO)(E))throw new Error(`Invalid GitHub integration config, '${E}' is not a valid host`);return y?y=(0,a.trimEnd)(y,"/"):E===d&&(y=x),P?P=(0,a.trimEnd)(P,"/"):E===d&&(P=m),{host:E,apiBaseUrl:y,rawBaseUrl:P,token:T,apps:M}}function u(v){const E=v.map(h);return E.some(y=>y.host===d)||E.push({host:d,apiBaseUrl:x,rawBaseUrl:m}),E}class g{integrationConfig;static factory=({config:E})=>{const y=u(E.getOptionalConfigArray("integrations.github")??[]);return(0,n.oS)(y.map(P=>new g(P)),P=>P.config.host)};constructor(E){this.integrationConfig=E}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(E){return p((0,n.ku)(E),"tree")}resolveEditUrl(E){return p(E,"edit")}parseRateLimitInfo(E){return{isRateLimited:E.status===429||E.status===403&&E.headers.get("x-ratelimit-remaining")==="0"}}}function p(v,E){return v.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(y,P,T,M)=>`//${P}/${T}/${M}/${E}/`)}},59869:(H,b,t)=>{"use strict";t.d(b,{AY:()=>h,HO:()=>m,ku:()=>g,oS:()=>u});var n=t(52536),a=t.n(n),d=t(45250),x=t.n(d);function m(v){const E=new URL("http://example.com");return E.host=v,E.host===v}function h(v){try{return new URL(v),!0}catch{return!1}}function u(v,E){return{list(){return v},byUrl(y){try{const P=typeof y=="string"?new URL(y):y;return v.find(T=>E(T)===P.host)}catch{return}},byHost(y){return v.find(P=>E(P)===y)}}}function g(v){const{url:E,base:y,lineNumber:P}=v;try{return new URL(E),E}catch{}let T;if(E.startsWith("/")){const{href:M,filepath:S}=a()(y);T=new URL(M);const B=(0,d.trimEnd)(T.pathname.substring(0,T.pathname.length-S.length),"/");T.pathname=`${B}${E}`}else T=new URL(E,y);return T.search=new URL(y).search,P&&(T.hash=`L${P}`),T.toString()}function p(v){beforeAll(()=>v.listen({onUnhandledRequest:"error"})),afterAll(()=>v.close()),afterEach(()=>v.resetHandlers())}},47149:(H,b,t)=>{"use strict";var n={};t.r(n),t.d(n,{TechDocsPlugin:()=>h.Ju});var a=t(31085),d=t(14041),x=t(25873),m=t(18690),h=t(39278),u=t(8915),g=t(72020),p=t(99730),v=t(64947),E=t(12173),y=t(22020),P=t(68146),T=t(73657);function M({children:r}){return(0,m.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(m.fS,{children:r})}const S=()=>(0,a.jsx)(E.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),B=({step:r,error:e})=>{let s="";return r==="load-config"?s=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(s=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(M,{children:(0,a.jsx)(E.M,{statusMessage:s,stack:e.stack})})},F=({error:r,resetError:e,plugin:s})=>(0,a.jsx)(y.b,{title:`Error in ${s?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(v.A,{variant:"outlined",onClick:e,children:"Retry"})}),L={Progress:P.k,Router:T.Kd,NotFoundErrorPage:S,BootErrorPage:B,ErrorBoundaryFallback:F},Q="Invalid discovery URL pattern,";class G{parts;static compile(e){const s=e.split(/\{\{\s*pluginId\s*\}\}/),o=s.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${Q} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${Q} URL must not have a hash`);if(i.search)throw new Error(`${Q} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${Q} URL must not end with a slash`);return new G(s)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}var k=t(96403),W=t.n(k);class _{isClosed=!1;terminatingError;observable=new(W())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}));subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class N{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(W())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(s.next(this.currentValue),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(s=>s.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(s=>s.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,s,o){const i=typeof e=="function"?{next:e,error:s,complete:o}:e;return this.observable.subscribe(i)}}class rt{subject=new _;post(e){this.subject.next(e)}alert$(){return this.subject}}class Z{captureEvent(e){}}class Y{alertApi;errorApi;constructor(e,s){this.alertApi=e,this.errorApi=s}post(e,s){return s?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,s)}error$(){return this.errorApi.error$()}}class X{subject=new _;post(e,s){this.subject.next({error:e,context:s})}error$(){return this.subject}}class ct{static forward(e,s){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,s)})}}const dt=new Map;class Et{namespace;errorApi;constructor(e,s){this.namespace=e,this.errorApi=s,this.subscribers=new Set,this.observable=new(W())(o=>(this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}static hasSubscribed=!1;static create(e){return new Et(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,o]of dt.entries())e.key?.startsWith(s)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let s,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(s=JSON.parse(i,(c,O)=>(typeof O=="object"&&O!==null&&Object.freeze(O),O)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:s,presence:o}}forBucket(e){const s=`${this.namespace}/${e}`;return dt.has(s)||dt.set(s,new Et(s,this.errorApi)),dt.get(s)}async set(e,s){localStorage.setItem(this.getKeyName(e),JSON.stringify(s)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return Et.hasSubscribed||(Et.addStorageEventListener(),Et.hasSubscribed=!0),this.observable.filter(({key:s})=>s===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const s=e?.slice(`${this.namespace}/`.length);s.includes("/")||this.notifyChanges(decodeURIComponent(s))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const s=this.snapshot(e);for(const o of this.subscribers)o.next(s)}subscribers;observable}function It(r){let e=r.baseImplementation||t.g.fetch;const s=[r.middleware??[]].flat().reverse();for(const o of s)e=o.apply(e);return{fetch:e}}class Pt{identityApi;allowUrl;headerName;headerValue;static create(e){const s=lt(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new Pt(e.identityApi,s,o,i)}constructor(e,s,o,i){this.identityApi=e,this.allowUrl=s,this.headerName=o,this.headerValue=i}apply(e){return async(s,o)=>{const i=new Request(s,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(s,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function lt(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?it(r.urlPrefixAllowlist):r.config?it([r.config.getString("backend.baseUrl")]):()=>!1}function it(r){const e=r.map(s=>s.replace(/\/$/,""));return s=>e.some(o=>s===o||s.startsWith(`${o}/`))}function mt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class ut{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(s,o)=>{const i=new Request(s,o),c="plugin://";if(!i.url.startsWith(c))return e(s,o);const{hostname:O,pathname:C,search:w,hash:z,username:q,password:gt}=new URL(`http://${i.url.substring(c.length)}`);let at=await this.discoveryApi.getBaseUrl(O);if(q||gt){const Mt=new URL(at),Ht=`${q}${gt?`:${gt}`:""}@`;at=`${Mt.protocol}//${Ht}${Mt.host}${Mt.pathname}`}const yt=`${mt(at,C)}${w}${z}`;return e(yt,typeof s=="string"||Ot(s)?o:s)}}}function Ot(r){return typeof r=="object"&&r?.constructor===URL}class St{static resolvePluginProtocol(e){return new ut(e.discoveryApi)}static injectIdentityAuth(e){return Pt.create(e)}constructor(){}}function ft(r,e){for(const s of e)if(!r.has(s))return!1;return!0}function At(r,...e){const s=new Set(r);for(const o of e)for(const i of o)s.add(i);return s}class pt{requests=[];subject=new N(this.getCurrentPending());request(e){return new Promise((s,o)=>{this.requests.push({scopes:e,resolve:s,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,s){this.requests=this.requests.filter(o=>ft(e,o.scopes)?(o.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(s=>s.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((s,o)=>At(s,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:s=>{e&&this.resolve(e,s)},reject:s=>{e&&this.reject(s)}}}}class tt{subject=new N([]);currentRequests=[];handlerCount=0;createAuthRequester(e){const s=new pt,o=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),O=this.makeAuthRequest(i,e);O?c[o]=O:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>s.request(i)}makeAuthRequest(e,s){const{scopes:o}=e;if(o)return{provider:s.provider,trigger:async()=>{const i=await s.onAuthRequest(o);e.resolve(i)},reject:()=>{const i=new Error("Login failed, rejected by user");i.name="RejectedError",e.reject(i)}}}authRequest$(){return this.subject}}function Ct(r){return new Promise((e,s)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,O=window.screen.height/2-i/2,C=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${O},left=${c}`);let w="";if(!C||typeof C.closed>"u"||C.closed){const at=new Error("Failed to open auth popup.");at.name="PopupRejectedError",s(at);return}const z=at=>{if(at.source!==C||at.origin!==r.origin)return;const{data:yt}=at;if(yt.type==="config_info"){w=yt.targetOrigin;return}if(yt.type!=="authorization_response")return;const Mt=yt;if("error"in Mt){const Ht=new Error(Mt.error.message);Ht.name=Mt.error.name,s(Ht)}else e(Mt.response);gt()},q=setInterval(()=>{if(C.closed){const at=`Login failed, ${w&&w!==window.location.origin?`Incorrect app origin, expected ${w}`:"popup was closed"}`,yt=new Error(at);yt.name="PopupClosedError",s(yt),gt()}},100);function gt(){window.removeEventListener("message",z),clearInterval(q)}window.addEventListener("message",z)})}let et=!1;function U(r){return[...r].join(" ")}class V{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:s,discoveryApi:o,environment:i,provider:c,joinScopes:O=U,oauthRequestApi:C,sessionTransform:w=q=>q,popupOptions:z}=e;!et&&!s&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),et=!0),this.enableExperimentalRedirectFlow=s?s.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=C.createAuthRequester({provider:c,onAuthRequest:async q=>this.enableExperimentalRedirectFlow?this.executeRedirect(q):this.showPopup(q)}),this.discoveryApi=o,this.environment=i,this.provider=c,this.joinScopesFunc=O,this.sessionTransform=w,this.popupOptions=z}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const s=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!s.ok){const i=new Error(`Auth refresh request failed, ${s.statusText}`);throw i.status=s.status,i}const o=await s.json();if(o.error){const i=new Error(o.error.message);throw o.error.name&&(i.name=o.error.name),i}return await this.sessionTransform(o)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(s=>{throw new Error(`Logout request failed, ${s}`)});if(!e.ok){const s=new Error(`Logout request failed, ${e.statusText}`);throw s.status=e.status,s}}async showPopup(e){const s=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:s,origin:window.location.origin,flow:"popup"}),i=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,c=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,O=await Ct({url:o,name:`${this.provider.title} Login`,origin:new URL(o).origin,width:i,height:c});return await this.sessionTransform(O)}async executeRedirect(e){const s=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:s,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,s){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...s,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const s=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return s?`?${s}`:""}}function vt(r,e){for(const s of e)if(!r.has(s))return!1;return!0}class Dt{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,s){if(!e)return!1;if(!s||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return vt(o,s)}getExtendedScope(e,s){const o=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const i=this.options.sessionScopes(e);for(const c of i)o.add(c)}if(s)for(const i of s)o.add(i);return o}}var xt=t(55309),Lt=function(r){return r.SignedIn="SignedIn",r.SignedOut="SignedOut",r}({});const Wt=(0,xt.y)({id:"core.auth.google"}),_t=(0,xt.y)({id:"core.auth.github"}),Ut=(0,xt.y)({id:"core.auth.okta"}),Nt=(0,xt.y)({id:"core.auth.gitlab"}),ce=(0,xt.y)({id:"core.auth.microsoft"}),Vt=(0,xt.y)({id:"core.auth.onelogin"}),Ft=(0,xt.y)({id:"core.auth.bitbucket"}),Kt=(0,xt.y)({id:"core.auth.bitbucket-server"}),ee=(0,xt.y)({id:"core.auth.atlassian"}),Fe=(0,xt.y)({id:"core.auth.vmware-cloud"});class nn{subject=new N(Lt.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Lt.SignedIn:Lt.SignedOut))}sessionState$(){return this.subject}}class Ye{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new nn;refreshPromise;currentSession;constructor(e){const{connector:s,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=s,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new Dt({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 vt(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!e.instantPopup)try{const s=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=s,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession(this.helper.getExtendedScope(this.currentSession,e));try{const s=await this.refreshPromise;if(!this.helper.sessionExistsAndHasScope(s,e))throw new Error("Refreshed session did not receive the required scopes");return this.stateTracker.setIsSignedIn(!0),s}finally{delete this.refreshPromise}}}const Qe={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class re{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Qe,oauthRequestApi:O,defaultScopes:C=[],scopeTransform:w=at=>at,popupOptions:z}=e,q=new V({configApi:s,discoveryApi:o,environment:i,provider:c,oauthRequestApi:O,sessionTransform({backstageIdentity:at,...yt}){const Mt={...yt,providerInfo:{idToken:yt.providerInfo.idToken,accessToken:yt.providerInfo.accessToken,scopes:re.normalizeScopes(w,yt.providerInfo.scope),expiresAt:yt.providerInfo.expiresInSeconds?new Date(Date.now()+yt.providerInfo.expiresInSeconds*1e3):void 0}};return at&&(Mt.backstageIdentity={token:at.token,identity:at.identity,expiresAt:at.expiresInSeconds?new Date(Date.now()+at.expiresInSeconds*1e3):void 0}),Mt},popupOptions:z}),gt=new Ye({connector:q,defaultScopes:new Set(C),sessionScopes:at=>at.providerInfo.scopes,sessionShouldRefresh:at=>{let yt=1/0;return at.providerInfo?.expiresAt&&(yt=Math.min(yt,(at.providerInfo.expiresAt.getTime()-Date.now())/1e3)),at.backstageIdentity?.expiresAt&&(yt=Math.min(yt,(at.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),yt<60*3}});return new re({sessionManager:gt,scopeTransform:w})}sessionManager;scopeTransform;constructor(e){this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,s){const o=re.normalizeScopes(this.scopeTransform,e);return(await this.sessionManager.getSession({...s,scopes:o}))?.providerInfo.accessToken??""}async getIdToken(e={}){return(await this.sessionManager.getSession({...e,scopes:new Set(["openid"])}))?.providerInfo.idToken??""}async getBackstageIdentity(e={}){return(await this.sessionManager.getSession(e))?.backstageIdentity}async getProfile(e={}){return(await this.sessionManager.getSession(e))?.profile}static normalizeScopes(e,s){if(!s)return new Set;const o=Array.isArray(s)?s:s.split(/[\s|,]/).filter(Boolean);return new Set(e(o))}}const Ze={id:"google",title:"Google",icon:()=>null},oe="https://www.googleapis.com/auth/";class Ie{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:O=Ze,defaultScopes:C=["openid",`${oe}userinfo.email`,`${oe}userinfo.profile`]}=e;return re.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:O,environment:c,defaultScopes:C,scopeTransform(w){return w.map(z=>z==="openid"?z:z==="profile"||z==="email"?`${oe}userinfo.${z}`:z.startsWith(oe)?z:`${oe}${z}`)}})}}const Je={id:"microsoft",title:"Microsoft",icon:()=>null};class he{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new he(e)}constructor(e){const{configApi:s,environment:o="development",provider:i=Je,oauthRequestApi:c,discoveryApi:O,defaultScopes:C=["openid","offline_access","profile","email","User.Read"],scopeTransform:w=z=>z.concat("offline_access")}=e;this.configApi=s,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=O,this.scopeTransform=w,this.oauth2={[he.MicrosoftGraphID]:re.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:C})}}microsoftGraph(){return this.oauth2[he.MicrosoftGraphID]}static resourceForScopes(e){const s=[...new Set(e.split(" ").map(he.resourceForScope).filter(i=>i!=="openid"))];if(s.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${s.join(", ")}. Access tokens can only have a single audience.`));const o=s[0]??he.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const s=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(s){const{resourceURI:o}=s;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return he.MicrosoftGraphID}}async getAccessToken(e,s){const o=e===void 0?he.MicrosoftGraphID:await he.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=re.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,s)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}}const Xe={id:"github",title:"GitHub",icon:()=>null};class hn{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Xe,oauthRequestApi:O,defaultScopes:C=["read:user"]}=e;return re.create({configApi:s,discoveryApi:o,oauthRequestApi:O,provider:c,environment:i,defaultScopes:C})}}const sn={id:"okta",title:"Okta",icon:()=>null},rn=new Set(["openid","profile","email","phone","address","groups","offline_access"]),De="okta.";class Le{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=sn,oauthRequestApi:O,defaultScopes:C=["openid","email","profile","offline_access"]}=e;return re.create({configApi:s,discoveryApi:o,oauthRequestApi:O,provider:c,environment:i,defaultScopes:C,scopeTransform(w){return w.map(z=>rn.has(z)||z.startsWith(De)?z:`${De}${z}`)}})}}const ke={id:"gitlab",title:"GitLab",icon:()=>null};class on{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=ke,oauthRequestApi:O,defaultScopes:C=["read_user"]}=e;return re.create({configApi:s,discoveryApi:o,oauthRequestApi:O,provider:c,environment:i,defaultScopes:C})}}const ye={id:"onelogin",title:"onelogin",icon:()=>null},Ne=new Set(["openid","profile","email","phone","address","groups","offline_access"]),We="onelogin.";class Ke{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=ye,oauthRequestApi:O}=e;return re.create({configApi:s,discoveryApi:o,oauthRequestApi:O,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(C){return C.map(w=>Ne.has(w)||w.startsWith(We)?w:`${We}${w}`)}})}}const Me={id:"bitbucket",title:"Bitbucket",icon:()=>null};class Be{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=Me,oauthRequestApi:O,defaultScopes:C=["account"]}=e;return re.create({configApi:s,discoveryApi:o,oauthRequestApi:O,provider:c,environment:i,defaultScopes:C})}}const R={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class l{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=R,oauthRequestApi:O,defaultScopes:C=["PROJECT_ADMIN"]}=e;return re.create({configApi:s,discoveryApi:o,oauthRequestApi:O,provider:c,environment:i,defaultScopes:C})}}const A={id:"atlassian",title:"Atlassian",icon:()=>null};class D{static create(e){const{configApi:s,discoveryApi:o,environment:i="development",provider:c=A,oauthRequestApi:O}=e;return re.create({configApi:s,discoveryApi:o,oauthRequestApi:O,provider:c,environment:i})}}const nt={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class ht{static create(e){const{configApi:s,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:O=nt,defaultScopes:C=["openid"]}=e;return re.create({configApi:s,discoveryApi:o,oauthRequestApi:i,provider:O,environment:c,defaultScopes:C})}}var st=t(12935),Tt=t(57405),Rt=t(65461),kt=t(36017),ae=t(99303),Te=t(39837);const ge=(0,xt.y)({id:"core.storage"});var zt=t(70795),pe=t(16009);const ne=(0,xt.y)({id:"core.oauthrequest"});var _e=t(96824),ze=t(70835),de=t(10288),an=t.n(de),Ln=t(20938),Gt=t(46195),qe=t(54241);const gn=Gt.z.lazy(()=>Gt.z.object({rule:Gt.z.string(),resourceType:Gt.z.string(),params:Gt.z.record(Gt.z.any()).optional()}).or(Gt.z.object({anyOf:Gt.z.array(gn).nonempty()})).or(Gt.z.object({allOf:Gt.z.array(gn).nonempty()})).or(Gt.z.object({not:gn}))),ss=Gt.z.object({result:Gt.z.literal(qe.b.ALLOW).or(Gt.z.literal(qe.b.DENY))}),Ws=Gt.z.union([Gt.z.object({result:Gt.z.literal(qe.b.ALLOW).or(Gt.z.literal(qe.b.DENY))}),Gt.z.object({result:Gt.z.literal(qe.b.CONDITIONAL),pluginId:Gt.z.string(),resourceType:Gt.z.string(),conditions:gn})]),rs=(r,e)=>Gt.z.object({items:Gt.z.array(Gt.z.intersection(Gt.z.object({id:Gt.z.string()}),r)).refine(s=>s.length===e.size&&s.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class os{enabled;discovery;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1}async authorize(e,s){return this.makeRequest(e,ss,s)}async authorizeConditional(e,s){return this.makeRequest(e,Ws,s)}async makeRequest(e,s,o){if(!this.enabled)return e.map(q=>({result:qe.b.ALLOW}));const i={items:e.map(q=>({id:Ln.A(),...q}))},c=await this.discovery.getBaseUrl("permission"),O=await an()(`${c}/authorize`,{method:"POST",body:JSON.stringify(i),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!O.ok)throw await ze.o.fromResponse(O);const C=await O.json(),z=rs(s,new Set(i.items.map(({id:q})=>q))).parse(C).items.reduce((q,gt)=>(q[gt.id]=gt,q),{});return i.items.map(q=>z[q.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class xn{permissionClient;identityApi;constructor(e,s){this.permissionClient=e,this.identityApi=s}static create(e){const{config:s,discovery:o,identity:i}=e,c=new os({discovery:o,config:s});return new xn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const as=[(0,st.b)({api:Tt.I,deps:{configApi:Rt.U},factory:({configApi:r})=>G.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,st.b)({api:kt.k,deps:{},factory:()=>new rt}),(0,st.b)({api:ae.c,deps:{},factory:()=>new Z}),(0,st.b)({api:Te.m,deps:{alertApi:kt.k},factory:({alertApi:r})=>{const e=new Y(r,new X);return ct.forward(e,{hidden:!1}),e}}),(0,st.b)({api:ge,deps:{errorApi:Te.m},factory:({errorApi:r})=>Et.create({errorApi:r})}),(0,st.b)({api:zt.a,deps:{configApi:Rt.U,identityApi:pe.K,discoveryApi:Tt.I},factory:({configApi:r,identityApi:e,discoveryApi:s})=>It({middleware:[St.resolvePluginProtocol({discoveryApi:s}),St.injectIdentityAuth({identityApi:e,config:r})]})}),(0,st.b)({api:ne,deps:{},factory:()=>new tt}),(0,st.b)({api:Wt,deps:{discoveryApi:Tt.I,oauthRequestApi:ne,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Ie.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,st.b)({api:ce,deps:{discoveryApi:Tt.I,oauthRequestApi:ne,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>he.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,st.b)({api:_t,deps:{discoveryApi:Tt.I,oauthRequestApi:ne,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>hn.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:s.getOptionalString("auth.environment")})}),(0,st.b)({api:Ut,deps:{discoveryApi:Tt.I,oauthRequestApi:ne,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Le.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,st.b)({api:Nt,deps:{discoveryApi:Tt.I,oauthRequestApi:ne,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>on.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,st.b)({api:Vt,deps:{discoveryApi:Tt.I,oauthRequestApi:ne,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Ke.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,st.b)({api:Ft,deps:{discoveryApi:Tt.I,oauthRequestApi:ne,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>Be.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:s.getOptionalString("auth.environment")})}),(0,st.b)({api:Kt,deps:{discoveryApi:Tt.I,oauthRequestApi:ne,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>l.create({configApi:s,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"],environment:s.getOptionalString("auth.environment")})}),(0,st.b)({api:ee,deps:{discoveryApi:Tt.I,oauthRequestApi:ne,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>D.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,st.b)({api:Fe,deps:{discoveryApi:Tt.I,oauthRequestApi:ne,configApi:Rt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:s})=>ht.create({configApi:s,discoveryApi:r,oauthRequestApi:e,environment:s.getOptionalString("auth.environment")})}),(0,st.b)({api:_e.x,deps:{discovery:Tt.I,identity:pe.K,config:Rt.U},factory:({config:r,discovery:e,identity:s})=>xn.create({config:r,discovery:e,identity:s})})];var Cn=t(14451),is=t(27799),Mn=t(94389),cs=t(20947),Bn=t(20473),ls=t(45917),jn=t(39347),pn=t(63309),ds=t(82451),us=t(85121),Un=t(17400),hs=t(42226),gs=t(69550),$n=t(52755),Fn=t(89350),ps=t(8911),bn=t(33602),Sn=t(48108),fs=t(77225),Nn=t(55700),kn=t(71865),ms=t(80109),vs=t(15303),ys=t(39330);const Es={brokenImage:is.A,catalog:ps.A,scaffolder:cs.A,techdocs:Bn.A,search:ls.A,chat:jn.A,dashboard:pn.A,docs:ds.A,email:us.A,github:hs.A,group:bn.A,help:gs.A,"kind:api":Un.A,"kind:component":Fn.A,"kind:domain":Cn.A,"kind:group":bn.A,"kind:location":$n.A,"kind:system":Mn.A,"kind:user":Sn.A,"kind:resource":Nn.A,"kind:template":kn.A,user:Sn.A,warning:fs.A,star:ms.A,unstarred:vs.A,externalLink:ys.A};var As=t(58733),xs=t(55288),Cs=t(91360),bs=t(50868),Ss=t(12285),Os=t(87271),Wn=t(64636);Wn.A.configure(r=>`v5-${r}`);const Ps=(0,xs.A)({productionPrefix:"jss4-"});function Kn(r){const{children:e,theme:s,noCssBaseline:o=!1}=r,i=s.getTheme("v4"),c=s.getTheme("v5");let O;o||(O=(0,a.jsx)(As.Ay,{}));let C=(0,a.jsxs)(a.Fragment,{children:[O,e]});return i&&(C=(0,a.jsx)(Cs.Ay,{generateClassName:Ps,children:(0,a.jsx)(bs.A,{theme:i,children:C})})),c&&(C=(0,a.jsx)(Ss.A,{injectFirst:!0,children:(0,a.jsx)(Os.A,{theme:c,children:C})})),C}const zn={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 Ts=t(98392),On=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")`},be={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 Ue(r){const{colors:e,shape:s,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,O=`${s}, ${c}`,C=o?.fontColor??"#FFFFFF";return{colors:e,shape:s,backgroundImage:O,fontColor:C}}const Rs={home:Ue({colors:be.teal,shape:je.wave}),documentation:Ue({colors:be.pinkSea,shape:je.wave2}),tool:Ue({colors:be.purpleSky,shape:je.round}),service:Ue({colors:be.marineBlue,shape:je.wave}),website:Ue({colors:be.veryBlue,shape:je.wave}),library:Ue({colors:be.rubyRed,shape:je.wave}),other:Ue({colors:be.darkGrey,shape:je.wave}),app:Ue({colors:be.toastyOrange,shape:je.wave}),apis:Ue({colors:be.teal,shape:je.wave2}),card:Ue({colors:be.greens,shape:je.wave})},Hn=16,ws='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',f="home",I={htmlFontSize:Hn,fontFamily:ws,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 j(r){const{palette:e,htmlFontSize:s=Hn,fontFamily:o=ws,defaultPageTheme:i=f,pageTheme:c=Rs,typography:O}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return I.htmlFontSize=s,I.fontFamily=o,{palette:e,typography:O??I,page:c[i],getPageTheme:({themeId:C})=>c[C]??c[i]}}var $=t(80012);const K={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"},"&.Mui-active":{fontWeight:"bold",color:"inherit"}}}},MuiListItemText:{styleOverrides:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}},MuiButton:{styleOverrides:{text:{padding:void 0}}},MuiChip:{styleOverrides:{root:({theme:r})=>({marginRight:r.spacing(1),marginBottom:r.spacing(1)}),label:({theme:r})=>({lineHeight:r.spacing(2.5),fontWeight:r.typography.fontWeightMedium,fontSize:r.spacing(1.75)}),labelSmall:({theme:r})=>({fontSize:r.spacing(1.5)}),deleteIcon:({theme:r})=>({width:r.spacing(3),height:r.spacing(3),margin:r.spacing(0,.75,0,-.75)}),deleteIconSmall:({theme:r})=>({width:r.spacing(2),height:r.spacing(2),margin:r.spacing(0,.5,0,-.5)})}},MuiCard:{styleOverrides:{root:{display:"flex",flexDirection:"column"}}},MuiCardHeader:{styleOverrides:{root:{paddingBottom:0}}},MuiCardContent:{styleOverrides:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}}},MuiCardActions:{styleOverrides:{root:{justifyContent:"flex-end"}}},MuiLink:{defaultProps:{underline:"hover"}},MuiPaper:{styleOverrides:{root:{backgroundImage:"unset"}}}},J=r=>(...e)=>{const s=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return s.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function ot(r,e){if(!e||typeof e=="string")return;const s=typeof e=="function"?e(r):e;if(s)return{"@global":s}}function bt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const s={...r},o=r.spacing(1);return typeof o=="number"&&(s.spacing=J(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:s})]:[i,c]))}return e}}const wt=/^&.Mui-([\w-]+)$/;function $t(r){let e=r;if(!r||typeof r!="object")return e;for(const s of Object.keys(r)){const o=r[s];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,O=c.match(wt);if(O){const[,C]=O,{[c]:w,...z}=o;w&&(e={...e,[s]:z,[C]:w})}}}return e}function Bt(r,e={}){const s={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?s[i]=ot(r,c.styleOverrides):s[i]=$t(bt(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:s,props:o}}class jt{#t=new Map;constructor(e,s){this.#t=new Map,e&&this.#t.set("v4",e),s&&this.#t.set("v5",s)}getTheme(e){return this.#t.get(e)}}function Xt(r){const e=j(r),s={...K,...r.components},o=(0,On.A)({...e,components:s}),i=Bt(o,s),c={...(0,Ts.A)(e),...i};return new jt(c,o)}function Yt(r){const e=adaptV4Theme(r),s=createTheme(r);return new jt(s,createV5Theme(e))}const le={light:Xt({palette:zn.light}),dark:Xt({palette:zn.dark})};var Qt=t(75962),ie=t(87145);const ue=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(ie.A,{}),Provider:({children:r})=>(0,a.jsx)(Kn,{theme:le.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(Qt.A,{}),Provider:({children:r})=>(0,a.jsx)(Kn,{theme:le.dark,children:r})}];var qt=t(73466),Zt=t(39067),Jt=t.n(Zt);class te{holders;constructor(...e){this.holders=e}get(e){for(const s of this.holders){const o=s.get(e);if(o)return o}}}var se=t(43836),Se=t(10602);const Re=(0,se.tK)("api-context"),tn=r=>{const{apis:e,children:s}=r,o=(0,d.useContext)(Re)?.atVersion(1),i=o?new te(e,o):e;return(0,a.jsx)(Re.Provider,{value:(0,Se.B)({1:i}),children:s})};tn.propTypes={apis:Jt().shape({get:Jt().func.isRequired}).isRequired,children:Jt().node};const cn=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function He(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Ee(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Ee):Object.fromEntries(Object.entries(r).map(([e,s])=>[e,Ee(s)]))}function ln(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:ln(e);if(typeof r!="object"||Array.isArray(r))return r;const s=He(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(s)])){const c=ln(r[i],s[i]);c!==void 0&&(o[i]=c)}return o}function Is(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 $e={type(r,e,s,o){return`Invalid type in config for key '${r}' in '${e}', got ${s}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,s){return`Unable to convert config value for key '${r}' in '${e}' to a ${s}`}};class fn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new fn(void 0):e.reduce((s,{data:o,context:i,filteredKeys:c,deprecatedKeys:O})=>{const C=new fn(o,i,s);if(C.filteredKeys=c,O)for(const{key:w,description:z}of O)console.warn(`The configuration key '${w}' of ${i} is deprecated and may be removed soon. ${z||""}`);return C},void 0)}constructor(e,s="mock-config",o,i=""){this.data=e,this.context=s,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const s=this.readValue(e);return s===null?!1:s!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],s=this.fallback?.keys()??[];return[...new Set([...e,...s])].filter(o=>this.data?.[o]!==null)}get(e){const s=this.getOptional(e);if(s===void 0)throw new Error($e.missing(this.fullKey(e??""),this.context));return s}getOptional(e){const s=Ee(this.readValue(e)),o=this.fallback?.getOptional(e);if(s!==null)return s===void 0?ln(o):o===void 0?ln(s):ln(s,o)}getConfig(e){const s=this.getOptionalConfig(e);if(s===void 0)throw new Error($e.missing(this.fullKey(e),this.context));return s}getOptionalConfig(e){const s=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(He(s))return this.copy(s,e,o);if(s!==null){if(s!==void 0)throw new TypeError($e.type(this.fullKey(e),this.context,Is(s),"object"));return o}}getConfigArray(e){const s=this.getOptionalConfigArray(e);if(s===void 0)throw new Error($e.missing(this.fullKey(e),this.context));return s}getOptionalConfigArray(e){const s=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!He(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(s)return s.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const s=this.getOptionalNumber(e);if(s===void 0)throw new Error($e.missing(this.fullKey(e),this.context));return s}getOptionalNumber(e){const s=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof s=="number"||s===void 0)return s;const o=Number(s);if(!Number.isFinite(o))throw new Error($e.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const s=this.getOptionalBoolean(e);if(s===void 0)throw new Error($e.missing(this.fullKey(e),this.context));return s}getOptionalBoolean(e){const s=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof s=="boolean"||s===void 0)return s;const o=String(s).trim();if(/^(?:y|yes|true|1|on)$/i.test(o))return!0;if(/^(?:n|no|false|0|off)$/i.test(o))return!1;throw new Error($e.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const s=this.getOptionalString(e);if(s===void 0)throw new Error($e.missing(this.fullKey(e),this.context));return s}getOptionalString(e){return this.readConfigValue(e,s=>typeof s=="string"&&s!==""||{expected:"string"})}getStringArray(e){const s=this.getOptionalStringArray(e);if(s===void 0)throw new Error($e.missing(this.fullKey(e),this.context));return s}getOptionalStringArray(e){return this.readConfigValue(e,s=>{if(!Array.isArray(s))return{expected:"string-array"};for(const[o,i]of s.entries())if(typeof i!="string"||i==="")return{expected:"string-array",value:i,key:`${e}[${o}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,s,o){const i=new fn(e,this.context,o,this.fullKey(s));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,s){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,s);if(o===null)return;const i=s(o);if(i!==!0){const{key:c=e,value:O=o,expected:C}=i;throw new TypeError($e.type(this.fullKey(c),this.context,Is(O),C))}return o}readValue(e){const s=e?e.split("."):[];for(const i of s)if(!cn.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of s.entries())if(He(o))o=o[c];else if(o!=null){const O=this.fullKey(s.slice(0,i).join("."));throw new TypeError($e.type(O,this.context,Is(o),"object"))}return o}}const Pn="theme";class Vn{themes;static createWithStorage(e){const s=new Vn(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Pn)??void 0;return s.setActiveThemeId(o),s.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(Pn,i):window.localStorage.removeItem(Pn)}),window.addEventListener("storage",i=>{if(i.key===Pn){const c=localStorage.getItem(Pn)??void 0;s.setActiveThemeId(c)}}),s}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new N(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 mn=t(63636);function Ks(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 $r{registeredFeatureFlags=[];flags;registerFlag(e){Ks(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===mn.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[o,i]of Object.entries(e.states))this.flags.set(o,i);const s=Array.from(this.flags.entries()).filter(([,o])=>o===mn.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const s=JSON.parse(e);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const o=Object.entries(s).filter(([i,c])=>(Ks(i),c===mn.S.Active));return new Map(o)}catch{return new Map}}}const Gn=(0,xt.y)({id:"core.apptheme"}),zs=(0,xt.y)({id:"core.applanguage"});var Fr=t(56038),Hs=function(r){return r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static",r}(Hs||{});class Nr{factories=new Map;register(e,s){const o=Hs[e],i=this.factories.get(s.api.id);return i&&i.priority>=o?!1:(this.factories.set(s.api.id,{priority:o,factory:s}),!0)}get(e){const s=this.factories.get(e.id);if(s)return s.factory}getAllApis(){const e=new Set;for(const{factory:s}of this.factories.values())e.add(s.api);return e}}class Ds{factories;static validateFactories(e,s){for(const o of s){const i=[o],c=new Set;for(;i.length;){const O=i.shift(),C=e.get(O);if(C)for(const w of Object.values(C.deps)){if(w.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(w)||(c.add(w),i.push(w))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,s=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(s.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...s,i.api]),O=i.factory(c);return this.apis.set(e.id,O),O}loadDeps(e,s,o){const i={};for(const c in s)if(s.hasOwnProperty(c)){const O=s[c],C=this.load(O,o);if(!C)throw new Error(`No API factory available for dependency ${O} of dependent ${e}`);i[c]=C}return i}}function kr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const s=[{node:d.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;s.length!==0;){const{node:o,parent:i,contexts:c}=s.shift();d.Children.forEach(o,O=>{if(!(0,d.isValidElement)(O))return;const C={};for(const w in e)if(e.hasOwnProperty(w)){const z=e[w];C[w]=z.visit(z.accumulator,O,i,c[w])}for(const w of r.discoverers){const z=w(O);z&&s.push({node:z,parent:O,contexts:C})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Yn(r,e){return()=>({accumulator:r(),visit:e})}function Wr(r){return r.props?.children}function Kr(r){if(r.props?.path&&r.props?.element)return r.props?.element}var Ae=t(19402);const zr=Yn(()=>new Set,(r,e)=>{const s=(0,Ae.E)(e,"core.plugin");s&&r.add(s)});var Tn=t(72427);const Vs=r=>{const{children:e}=r,s=(0,Tn.gf)(mn.B),o="with"in r?s.isActive(r.with):!s.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,Ae.h)(Vs,"core.featureFlagged",!0);const Qn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Zn(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const Gs=r=>{const e=new Set;return r&&e.add(r),e};function Ys(r,e=new Array){return d.Children.forEach(r,s=>{if(!(0,d.isValidElement)(s))return;const o=(0,Ae.E)(s,"core.mountPoint");if(o){const i=(0,Ae.E)(s,"core.plugin");e.push({routeRef:o,plugin:i})}Ys(s.props.children,e)}),e}const Hr=Yn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(o?.isElementAncestor)return o;if(s?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,Ae.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${Zn(e)}"`);const O=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${Zn(e)}"`);const C=i.startsWith("/")?i.slice(1):i,w=e.props.element;if((0,Ae.E)(e,"core.gatherMountPoints")){if(w)throw new Error(`Mount point gatherers may not have an element prop "${Zn(e)}"`);const z={path:C,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Qn],plugins:new Set};return O.push(z),{obj:z,gatherPath:C,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(w){const[z,...q]=Ys(w);if(q.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!z)return o;const{routeRef:gt,plugin:at}=z,yt={path:C,element:"mounted",routeRefs:new Set([gt]),caseSensitive:!!e.props?.caseSensitive,children:[Qn],plugins:Gs(at)};return O.push(yt),r.paths.set(gt,C),r.parents.set(gt,o?.routeRef),{obj:yt,routeRef:gt??o?.routeRef,gatherPath:C,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${Zn(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const C=(0,Ae.E)(e,"core.plugin");return C&&o?.obj?.plugins.add(C),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Vr=Yn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,s,o)=>{if(s?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,O=o?.sticky;const C=e.props?.path,w=i?.children??r.objects,z=!!e.props?.caseSensitive;let q=o?.path;if((0,Ae.E)(e,"core.gatherMountPoints")){if(!C)throw new Error("Mount point gatherer must have a path");q=C}const gt=e.props?.element;let at=(0,Ae.E)(e,"core.mountPoint");if(!at&&(0,d.isValidElement)(gt)&&(at=(0,Ae.E)(gt,"core.mountPoint")),at){let Mt=C;if(q&&(Mt?q=void 0:Mt=q),!Mt)throw new Error("Mounted routable extension must have a path");r.paths.set(at,Mt),c&&O?(r.parents.set(at,c),C&&(c=at,O=!1)):(r.parents.set(at,c),c=at),C?(i={caseSensitive:z,path:C,element:"mounted",routeRefs:new Set([at]),children:[Qn],plugins:Gs((0,Ae.E)(e.props.element,"core.plugin"))},w.push(i)):i?.routeRefs.add(at)}if((0,Ae.E)(e,"core.gatherMountPoints")&&(O=!0),(0,Ae.E)(e,"core.gatherMountPoints")){if(!C)throw new Error("Mount point gatherer must have a path");at||(i={caseSensitive:z,path:C,element:"gathered",routeRefs:new Set,children:[Qn],plugins:o?.obj?.plugins||new Set},w.push(i))}return{obj:i,path:q,routeRef:c,sticky:O}}),Gr=Yn(()=>new Set,(r,e)=>{if(e.type===Vs){const s=e.props;r.add("with"in s?s.with:s.without)}});var Rn=t(21613),Yr=t(63544);const wn=(0,Yr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Qs(r){return r[wn]==="absolute"}function Zs(r){return r[wn]==="sub"}function Qr(r){return r[wn]==="external"}function Jn(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Zr=t(46155),Jr=t.n(Zr);function Xr(r,e,s){let o,i="";if(Qs(r))o=r;else if(Zs(r))o=r.parent,i=r.path;else if(Qr(r)){const C=s.get(r);if(!C)return[void 0,""];if(Qs(C))o=C;else if(Zs(C))o=C.parent,i=C.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${C}`)}else throw r[wn]?new Error(`Unknown or invalid route ref type, ${r[wn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!o)return[void 0,""];const c=e.get(o);if(c===void 0)return[void 0,""];const O=Jn(c,i);return[o,O]}function _r(r,e,s,o,i){const c=(0,Rn.ue)(i,e)??[],O=Array();let C=-1;for(let q=r;q&&(C=c.findIndex(gt=>gt.route.routeRefs.has(q)),C===-1);q=o.get(q))O.unshift(q);O.length===0&&(C-=1);const w=C===-1?"":c[C].pathname,z=O.slice(0,-1).map(q=>{const gt=s.get(q);if(gt===void 0)throw new Error(`No path for ${q}`);if(gt.includes(":"))throw new Error(`Cannot route to ${r} with parent ${q} as it has parameters`);return gt});return`${Jn(w,...z)}/`}class qr{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,s,o,i,c){this.routePaths=e,this.routeParents=s,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,s){const[o,i]=Xr(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof s=="string"?c=this.trimPath(s):s.pathname?c={...s,pathname:this.trimPath(s.pathname)}:c=s;const O=this.appBasePath+_r(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[w])=>{const z=w&&Jr()(w,q=>typeof q=="string"?q.replaceAll(/[&?#;\/]/g,gt=>encodeURIComponent(gt)):q);return Jn(O,(0,Rn.tW)(i,z))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const to=(0,se.tK)("routing-context"),eo=({routePaths:r,routeParents:e,routeObjects:s,routeBindings:o,basePath:i="",children:c})=>{const O=new qr(r,e,s,o,i),C=(0,Se.B)({1:O});return(0,a.jsx)(to.Provider,{value:C,children:c})};function no(r,e){const s=new Set(e.values());s.delete(void 0);for(const o of e.keys()){if(s.has(o))continue;let i=o,c="";for(;i;){const C=r.get(i);if(C===void 0)throw new Error(`No path for ${i}`);c=Jn(C,c),i=e.get(i)}const O=c.match(/:(\w+)/g);if(O){for(let C=0;C<O.length;C++)for(let w=C+1;w<O.length;w++)if(O[w]===O[C])throw new Error(`Parameter ${O[w]} is duplicated in path ${c}`)}}}function so(r,e){for(const s of e)if(s.externalRoutes){for(const[o,i]of Object.entries(s.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${s.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const ro=(0,se.tK)("app-context"),oo=({appContext:r,children:e})=>{const s=(0,Se.B)({1:r});return(0,a.jsx)(ro.Provider,{value:s,children:e})},Js="app",ao=`${Js}-auth-cookie-expires-at`,io=5*6e4,Xs=5e3,co=2,lo=5*6e4;function uo({discoveryApi:r,fetchApi:e,errorApi:s}){let o=!1,i,c=!0,O=Xs;const C="BroadcastChannel"in window?new BroadcastChannel(ao):void 0,w=at=>{const yt=(1+3*Math.random())*6e4;return Math.max(at-Date.now(),io)-yt},z=async()=>{try{const yt=`${await r.getBaseUrl(Js)}/.backstage/auth/v1/cookie`,Mt=await e.fetch(yt,{credentials:"include"});if(!Mt.ok)throw new Error(`Request failed with status ${Mt.status} ${Mt.statusText}, see request towards ${yt} for more details`);const Ht=await Mt.json();if(!Ht.expiresAt)throw new Error("No expiration date in response");const Ce=Date.parse(Ht.expiresAt);if(Number.isNaN(Ce))throw new Error("Invalid expiration date in response");c=!0,C?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Ce).toISOString()}}),gt(w(Ce))}catch(at){c?(c=!1,O=Xs):(O=Math.min(lo,O*co),console.error("Session cookie refresh failed",at),s.post(new Error("Session refresh failed, see developer console for details"))),gt(O)}},q=at=>{const{data:yt}=at;if(!(yt===null||typeof yt!="object")&&"action"in yt&&yt.action==="COOKIE_REFRESH_SUCCESS"){const Mt=Date.parse(yt.payload.expiresAt);if(Number.isNaN(Mt)){console.warn("Received invalid expiration from session refresh channel");return}gt(w(Mt))}};function gt(at){o||(i&&clearTimeout(i),i=setTimeout(z,at))}return C?.addEventListener("message",q),z(),()=>{o=!0,i&&clearTimeout(i),C?.removeEventListener("message",q),C?.close()}}function _s(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Ls(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}class ho{target;waitForTarget;resolveTarget=()=>{};signOutTargetUrl="/";#t;constructor(){this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}setTarget(e,s){this.target=e,this.signOutTargetUrl=s.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw _s("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ls("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw _s("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ls("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(s=>s.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Ls("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),await this.#t?.(),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if(this.#t)return;const s=uo(e);this.#t=async()=>{s();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var go=t(1394);function po(r,e,s){if(r!==void 0){const i=s.find(c=>c.id===r);if(i)return i}if(e){const i=s.find(c=>c.variant==="dark");if(i)return i}const o=s.find(i=>i.variant==="light");return o||s[0]}const fo=()=>{const r=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,s]=(0,d.useState)(r.matches);return(0,d.useEffect)(()=>{const o=i=>{s(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function qs({children:r}){const e=(0,Tn.gf)(Gn),s=(0,go.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?fo():!1,i=po(s,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const tr=async()=>mo();function mo(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=new Array,s=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(s){if(!Array.isArray(s))throw new Error("Static configuration has invalid format");e.push(...s)}const o=document.querySelectorAll('script[type="backstage.io/config"]');if(o.length>0)for(const c of o)try{const O=c.textContent;if(!O)throw new Error("tag is empty");let C;try{C=JSON.parse(O)}catch(w){throw new Error(`failed to parse config; ${w}`)}if(!Array.isArray(C))throw new Error("data is not an array");e.push(...C)}catch(O){throw new Error(`Failed to load config from script tag, ${O.message}`)}else if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const c=JSON.parse(r);Array.isArray(c)?e.push(...c):e.push({data:c,context:"env"})}catch(c){throw new Error(`Failed to load runtime configuration, ${c}`)}const i=window.__APP_CONFIG__;return i&&e.push({context:"window",data:i}),e}class vo{apis=[];add(e,s){return this.apis.push([e.id,s]),s}build(){return new vn(new Map(this.apis))}}class vn{apis;static builder(){return new vo}static from(e){return new vn(new Map(e.map(([s,o])=>[s.id,o])))}static with(e,s){return new vn(new Map([[e.id,s]]))}constructor(e){this.apis=e}with(e,s){return new vn(new Map([...this.apis,[e.id,s]]))}get(e){return this.apis.get(e.id)}}function yo(r){const e=new Map,s=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const O=`${o.getId()}.${i}`;if(e.has(O))throw new Error(`Unexpected duplicate route '${O}'`);e.set(O,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const O=`${o.getId()}.${i}`;if(s.has(O))throw new Error(`Unexpected duplicate external route '${O}'`);s.set(O,c)}}return{routes:e,externalRoutes:s}}function Eo(r,e,s){const o=yo(s),i=new Map,c=new Set;r&&r({bind:(w,z)=>{for(const[q,gt]of Object.entries(z)){const at=w[q];if(!at)throw new Error(`Key ${q} is not an existing external route`);if(!gt&&!at.optional)throw new Error(`External route ${q} is required but was ${gt===!1?"disabled":"not provided"}`);gt?i.set(at,gt):gt===!1&&c.add(at)}}});const O=e.getOptionalConfig("app.routes.bindings")?.get();if(O)for(const[C,w]of Object.entries(O)){if(!Ao(w))throw new Error(`Invalid config at app.routes.bindings['${C}'], value must be a non-empty string or false`);const z=o.externalRoutes.get(C);if(!z)throw new Error(`Invalid config at app.routes.bindings, '${C}' is not a valid external route`);if(!(i.has(z)||c.has(z)))if(w===!1)c.add(z);else{const q=o.routes.get(w);if(!q)throw new Error(`Invalid config at app.routes.bindings['${C}'], '${w}' is not a valid route`);i.set(z,q)}}for(const C of o.externalRoutes.values())if(!i.has(C)&&!c.has(C)){const w="getDefaultTarget"in C?C.getDefaultTarget():void 0;if(w){const z=o.routes.get(w);z&&i.set(C,z)}}return i}function Ao(r){return!!(r===!1||typeof r=="string"&&r)}function In(){const[r]=(0,m.AV)((0,a.jsx)(m.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const er=(0,d.createContext)(void 0);var nr=t(82266),sr=t(93368),xo=t(25862);const Co=(r,e)=>{try{const o=(0,Rn.ue)(e,{pathname:r})?.filter(w=>w?.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 O;i.plugins.size===1&&(O=i.plugins.values().next().value);const C=Object.entries(o?.params||{}).reduce((w,[z,q])=>(q!==void 0&&z!=="*"&&(w[z]=q),w),{});return{extension:"App",pluginId:O?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:C}}catch{return}},bo=({pathname:r,search:e,hash:s,attributes:o})=>{const i=(0,sr.s)();return(0,d.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${s}`,{attributes:o})},[i,r,e,s,o]),null},Xn=({routeObjects:r})=>{const{pathname:e,search:s,hash:o}=(0,m.zy)(),{params:i,...c}=Co(e,r)||{params:{}};return(0,a.jsx)(xo.Ig,{attributes:c,children:(0,a.jsx)(bo,{pathname:e,search:s,hash:o,attributes:i})})};function So(r){return In()?Ms(r):""}function Ms(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function rr({component:r,appIdentityProxy:e,children:s}){const[o,i]=(0,d.useState)(),c=(0,Tn.gf)(Rt.U),O=Ms(c);return o?(e.setTarget(o,{signOutTargetUrl:O||"/"}),(0,a.jsx)(a.Fragment,{children:s})):(0,a.jsx)(r,{onSignInSuccess:i})}function or(r){const{Router:e,SignInPage:s}=(0,nr.n)().getComponents(),o=(0,Tn.gf)(Rt.U),i=Ms(o),c=`${i}/*`,O=(0,d.useContext)(er);if(!O)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:C,appIdentityProxy:w}=O;return s?In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Xn,{routeObjects:C}),(0,a.jsx)(rr,{component:s,appIdentityProxy:w,children:(0,a.jsx)(m.BV,{children:(0,a.jsx)(m.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(Xn,{routeObjects:C}),(0,a.jsx)(rr,{component:s,appIdentityProxy:w,children:r.children})]}):(w.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}},{signOutTargetUrl:i||"/"}),In()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Xn,{routeObjects:C}),(0,a.jsx)(m.BV,{children:(0,a.jsx)(m.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(Xn,{routeObjects:C}),r.children]}))}(0,Ae.h)(or,"core.type","AppRouter");const Dn="language",Ve="en";class _n{static create(e){const s=e?.availableLanguages??[Ve];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ve))throw new Error(`Supported languages must include '${Ve}'`);const o=e?.defaultLanguage??Ve;if(!s.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new _n(s,o)}static createWithStorage(e){const s=_n.create(e);if(!window.localStorage)return s;const o=window.localStorage.getItem(Dn),{languages:i}=s.getAvailableLanguages();return o&&i.includes(o)&&s.setLanguage(o),s.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Dn)&&window.localStorage.setItem(Dn,c)}),window.addEventListener("storage",c=>{if(c.key===Dn){const O=localStorage.getItem(Dn)??void 0;O&&s.setLanguage(O)}}),s}#t;#n;#e;constructor(e,s){this.#t=e,this.#n=s,this.#e=new N({language:this.#n})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const s=e??Ve;if(s!==this.#n){if(s&&!this.#t.includes(s))throw new Error(`Failed to change language to '${s}', available languages are '${this.#t.join("', '")}'`);this.#n=s,this.#e.next({language:s})}}getLanguage(){return{language:this.#n}}language$(){return this.#e}}var Oo=t(47304),Po=t(99833),ar=t(93184);function ir(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class To{onLoad;#t;#n;#e;constructor(e){this.onLoad=e,this.#t=new Set,this.#n=new Map,this.#e=new Map}addTranslationResource(e){const s=(0,Po.Y)(e);for(const o of s.resources){const i=this.#s(o.language,s.id);this.#e.has(i)||this.#e.set(i,o.loader)}}#s(e,s){return`${e}/${s}`}needsLoading(e,s){const o=this.#s(e,s);return this.#e.get(o)?!this.#t.has(o):!1}async load(e,s){const o=this.#s(e,s),i=this.#e.get(o);if(!i||this.#t.has(o))return;const c=this.#n.get(o);if(c){await c;return}const O=i().then(C=>{this.onLoad({language:e,namespace:s,messages:C.messages}),this.#t.add(o)},C=>{throw this.#t.add(o),C});this.#n.set(o,O),await O}}class Bs{static create(e){const{languages:s}=e.languageApi.getAvailableLanguages(),o=(0,Oo.Q_)({fallbackLng:Ve,supportedLngs:s,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(o.init(),!o.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:i}=e.languageApi.getLanguage();i!==Ve&&o.changeLanguage(i);const c=new To(w=>{o.addResourceBundle(w.language,w.namespace,ir(w.messages),!1,!0)}),O=e?.resources||[];for(let w=O.length-1;w>=0;w--){const z=O[w];z.$$type==="@backstage/TranslationResource"?c.addTranslationResource(z):z.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(Ve,z.id,ir(z.messages),!0,!1)}const C=new Bs(o,c,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:w})=>{C.#o(w)}),C}#t;#n;#e;#s=new Set;#r=new Set;constructor(e,s,o){this.#t=e,this.#n=s,this.#e=o}getTranslation(e){const s=(0,ar.v)(e);return this.#i(s),this.#a(s)}translation$(e){const s=(0,ar.v)(e);return this.#i(s),new(W())(o=>{let i={};const c=()=>{i={};const C=i;this.#n.load(this.#e,s.id).then(()=>{if(C===i){const w=this.#a(s);w.ready&&o.next(w)}},w=>{C===i&&o.error(Array.isArray(w)?w[0]:w)})},O=()=>{const C=this.#a(s);C.ready?o.next(C):c()};return this.#n.needsLoading(this.#e,s.id)&&c(),this.#r.add(O),()=>{this.#r.delete(O)}})}#o(e){this.#e!==e&&(this.#e=e,this.#t.changeLanguage(e),this.#r.forEach(s=>s()))}#a(e){return this.#n.needsLoading(this.#e,e.id)?{ready:!1}:{ready:!0,t:this.#t.getFixedT(null,e.id)}}#i(e){if(this.#s.has(e.id))return;this.#s.add(e.id);const s=e.getDefaultMessages();this.#t.addResourceBundle(Ve,e.id,s,!0,!1);const o=e.getDefaultResource();o&&this.#n.addTranslationResource(o)}}function cr(r){const e=new URL(r);return e.protocol=document.location.protocol,e.hostname=document.location.hostname,e.port=document.location.port,e.toString().replace(/\/$/,"")}function Ro(r){const e=fn.fromConfigs(r),s=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,O;if(s&&o){const C=new URL(s).origin,w=new URL(o).origin;if(C===w){const z=cr(o);o!==z&&(c=z)}}if(s){const C=cr(s);s!==C&&(O=C)}return(O||c)&&(i=i.concat({data:{app:O&&{baseUrl:O},backend:c&&{baseUrl:c}},context:"relative-resolver"})),i}function wo(){return(document.querySelector('meta[name="backstage-app-mode"]')?.getAttribute("content")??"public")==="protected"}function Io(r,e,s){const o=!!r,i=(0,qt.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:w}=e;c=(0,a.jsx)(w,{})}else if(i.error){const{BootErrorPage:w}=e;c=(0,a.jsx)(w,{step:"load-config",error:i.error})}const{ThemeProvider:O=qs}=e;return c?{node:(0,a.jsx)(tn,{apis:vn.with(Gn,s),children:(0,a.jsx)(O,{children:c})})}:{api:fn.fromConfigs(i.value?.length?Ro(i.value):[])}}class Do{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 Lo{apiHolder;configApi;apis;icons;plugins;featureFlags;components;themes;configLoader;defaultApis;bindRoutes;appLanguageApi;translationResources;appIdentityProxy=new ho;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??tr,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new Nr,this.appLanguageApi=_n.createWithStorage({defaultLanguage:e.__experimentalTranslations?.defaultLanguage,availableLanguages:e.__experimentalTranslations?.availableLanguages}),this.translationResources=e.__experimentalTranslations?.resources??[]}getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const s=this.getProvider();return()=>(0,a.jsx)(s,{children:e})}#t=!1;getProvider(){if(this.#t)throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");this.#t=!0;const e=new Do(this);let s,o;return({children:c})=>{const O=(0,d.useRef)(!0),C=(0,d.useMemo)(()=>Vn.createWithStorage(this.themes),[]),{routing:w,featureFlags:z}=(0,d.useMemo)(()=>{const Ht=In();Ht&&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 Ce=kr({root:c,discoverers:[Wr,Kr],collectors:{routing:Ht?Vr:Hr,collectedPlugins:zr,featureFlags:Gr}});return Ce.collectedPlugins.forEach(we=>this.plugins.add(we)),this.verifyPlugins(this.plugins),this.getApiHolder(),Ce},[c]),q=Io(this.configLoader,this.components,C),gt="api"in q;if(gt){const{api:Ht}=q;this.configApi=Ht}if("node"in q)return q.node;if(o)throw o;if(!s)try{s=Eo(this.bindRoutes,q.api,this.plugins),no(w.paths,w.parents),so(s,this.plugins)}catch(Ht){throw o=Ht,Ht}if(gt&&O.current){O.current=!1;const Ht=this.getApiHolder().get(mn.B);if(Ht){for(const Pe of this.featureFlags)Ht.registerFlag({...Pe,pluginId:""});for(const Pe of this.plugins.values())if("getFeatureFlags"in Pe)for(const un of Pe.getFeatureFlags())Ht.registerFlag({name:un.name,pluginId:Pe.getId()});else for(const un of Pe.output())un.type==="feature-flag"&&Ht.registerFlag({name:un.name,pluginId:Pe.getId()});const Ce=Ht.getRegisteredFlags(),we=new Set(Ce.map(Pe=>Pe.name));for(const Pe of z)we.has(Pe)||Ht.registerFlag({name:Pe,pluginId:""})}}const{ThemeProvider:at=qs,Progress:yt}=this.components,Mt=this.getApiHolder();if(wo()){const Ht=Mt.get(Te.m),Ce=Mt.get(zt.a),we=Mt.get(Tt.I);if(!Ht||!Ce||!we)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Ht,fetchApi:Ce,discoveryApi:we})}return(0,a.jsx)(tn,{apis:Mt,children:(0,a.jsx)(oo,{appContext:e,children:(0,a.jsx)(at,{children:(0,a.jsx)(eo,{routePaths:w.paths,routeParents:w.parents,routeObjects:w.objects,routeBindings:s,basePath:So(q.api),children:(0,a.jsx)(er.Provider,{value:{routeObjects:w.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(d.Suspense,{fallback:(0,a.jsx)(yt,{}),children:c})})})})})})}}getRouter(){return or}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const s of e.getApis())this.apiFactoryRegistry.get(s.api)||this.apiFactoryRegistry.register("default",s);return Ds.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Gn,deps:{},factory:()=>Vn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:Rt.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:pe.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:zs,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Fr.J,deps:{languageApi:zs},factory:({languageApi:e})=>Bs.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:mn.B,deps:{},factory:()=>new $r});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const s of e.getApis())if(!this.apiFactoryRegistry.register("default",s))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${s.api}`);for(const e of this.apis)if(!this.apiFactoryRegistry.register("app",e))throw new Error(`Duplicate or forbidden API factory for ${e.api} in app`);return Ds.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Ds(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const s=new Set;for(const o of e){const i=o.getId();if(s.has(i))throw new Error(`Duplicate plugin found '${i}'`);s.add(i)}}}function Mo(r){return new Lo(r)}function Bo(r){return Mo({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...L,...r?.components},configLoader:r?.configLoader,defaultApis:as,icons:{...Es,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??ue})}var qn=t(82442);let lr=!1;const dr=r=>{const e=(0,nr.n)(),{NotFoundErrorPage:s}=e.getComponents(),o=(0,d.useMemo)(()=>In(),[]),c=[...(0,qn.O)(r.children,O=>O.getElements().flatMap(C=>{let w=C.props.path;if(w==="")return[];w=w?.replace(/\/\*$/,"")??"/";let z=o?C:C.props.element;return!o&&!z&&(z=C,lr||(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] />} />."),lr=!0)),[{path:w,element:z,children:C.props.children?[{path:w==="/"?"/":"*",element:C.props.children}]:void 0}]}).sort((C,w)=>w.path.localeCompare(C.path)).map(C=>({...C,path:C.path==="/"?"/":`${C.path}/*`}))),{path:"*",element:(0,a.jsx)(s,{})}];return(0,m.Ye)(c)};(0,Ae.h)(dr,"core.type","FlatRoutes");var yn=t(6820),jo=t(78692),Uo=t(86519);function $o(r){return!r.cursor}function Fo(r,e){if(!r.length)return[];const{maxCountPerChunk:s=1e3,maxStringLengthPerChunk:o=90*2**10,extraStringLengthPerRef:i=3}=e??{},c=[];let O=0,C=0,w=0;for(let z=0;z<r.length;++z){const q=r[z].length+i;w>0&&(C+q>o||w+1>s)&&(c.push(r.slice(O,z)),O=z,C=0,w=0),C+=q,w+=1}return c.push(r.slice(O,r.length)),c}const fe="catalog";var me=t(94214);class No{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:an()}}async analyzeLocation(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async deleteLocation(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"DELETE"})}async getEntities(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByQuery(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/entities/by-query{?fields,limit,offset,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntitiesByRefs(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/entities/by-refs{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByName(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityByUid(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getEntityFacets(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocation(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocationByEntity(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async getLocations(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"GET"})}async refreshEntity(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,s){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...s?.token&&{Authorization:`Bearer ${s?.token}`}},method:"POST",body:JSON.stringify(e.body)})}}class ko{apiClient;constructor(e){this.apiClient=new No(e)}async getEntityAncestors(e,s){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,yn.KU)(e.entityRef)},s))}async getLocationById(e,s){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},s))}async getLocationByEntity(e,s){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,yn.KU)(e)},s))}async getEntities(e,s){const{filter:o=[],fields:i=[],order:c,offset:O,limit:C,after:w}=e??{},z=[];if(c)for(const gt of[c].flat())gt&&z.push(`${gt.order}:${gt.field}`);return{items:await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:C,filter:this.getFilterValue(o),offset:O,after:w,order:c?z:void 0}},s))}}async getEntitiesByRefs(e,s){const o=async c=>{const O=await this.apiClient.getEntitiesByRefs({body:{entityRefs:c,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},s);if(!O.ok)throw await ze.o.fromResponse(O);return(await O.json()).items.map(w=>w??void 0)};let i;for(const c of Fo(e.entityRefs)){const O=await o(c);i?i.push(...O):i=O}return{items:i??[]}}async queryEntities(e={},s){const o={};if($o(e)){const{fields:i=[],filter:c,limit:O,offset:C,orderFields:w,fullTextFilter:z}=e;o.filter=this.getFilterValue(c),O!==void 0&&(o.limit=O),C!==void 0&&(o.offset=C),w!==void 0&&(o.orderField=(Array.isArray(w)?w:[w]).map(({field:gt,order:at})=>`${gt},${at}`)),i.length&&(o.fields=i);const q=z?.term?.trim();q&&(o.fullTextFilterTerm=q),z?.fields?.length&&(o.fullTextFilterFields=z.fields)}else{const{fields:i=[],limit:c,cursor:O}=e;o.cursor=O,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.requestRequired(await this.apiClient.getEntitiesByQuery({query:o},s))}async getEntityByRef(e,s){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,yn.KU)(e)},s))}async getEntityByName(e,s){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},s))}async refreshEntity(e,s){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},s);if(o.status!==200)throw new Error(await o.text())}async getEntityFacets(e,s){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},s))}async addLocation(e,s){const{type:o="url",target:i,dryRun:c}=e,O=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},s);if(O.status!==201)throw new Error(await O.text());const{location:C,entities:w,exists:z}=await O.json();if(!C)throw new Error(`Location wasn't added: ${i}`);return{location:C,entities:w,exists:z}}async getLocationByRef(e,s){return(await this.requestRequired(await this.apiClient.getLocations({},s))).map(i=>i.data).find(i=>e===(0,jo.KL)(i))}async removeLocationById(e,s){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},s))}async removeEntityByUid(e,s){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},s))}async validateEntity(e,s,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:s}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await ze.o.fromResponse(i);const{errors:c=[]}=await i.json();return{valid:!1,errors:c}}async requestIgnored(e){if(!e.ok)throw await ze.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await ze.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await ze.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const s=[];for(const o of[e].flat()){const i=[];for(const[c,O]of Object.entries(o))for(const C of[O].flat())C===Uo.c?i.push(c):typeof C=="string"&&i.push(`${c}=${C}`);i.length&&s.push(i.join(","))}return s}}var ur=t(7341),Wo=t(18),Ko=t(82292),hr=t(29207),En=t(95203),zo=t(9803),Oe=t(88758),Ho=t(54560),An=t(45250);async function Vo({storageApi:r}){const e=r.forBucket("settings"),s=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,An.isArray)(o))return;const i=new Set(s.snapshot("entityRefs").value??[]);o.filter(An.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,O,C,w])=>(0,yn.U2)({kind:O,namespace:C,name:w})).forEach(c=>i.add(c)),await s.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Go{settingsStore;starredEntities;constructor(e){Vo(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{this.starredEntities=new Set(s.value??[]),this.notifyChanges()}})}async toggleStarred(e){this.starredEntities.has(e)?this.starredEntities.delete(e):this.starredEntities.add(e),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}subscribers=new Set;observable=new(W())(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 js(r){const{years:e=0,months:s=0,weeks:o=0,days:i=0,hours:c=0,minutes:O=0,seconds:C=0,milliseconds:w=0}=r;return((((e*365+s*30+o*7+i)*24+c)*60+O)*60+C)*1e3+w}var Yo=t(25033),Qo=t.n(Yo),Zo=t(25295),Jo=t.n(Zo),Xo=t(88083);const _o={seconds:10},qo={milliseconds:50},ta={api:Un.A,component:Fn.A,system:Mn.A,resource:Nn.A,domain:Cn.A,location:$n.A,user:Sn.A,group:bn.A,template:kn.A};function gr(r){return{async:r.async,render:({entityRef:e,entity:s,context:o})=>({snapshot:(0,Xo.T)(s||e,o),loadEntity:r.async})}}class ts{static createLocal(){return new ts({renderer:gr({async:!1})})}static create(e){return new ts(e)}#t;#n;#e;#s;#r;constructor(e){const s=e.cacheTtl??_o,o=e.batchDelay??qo,i=e.renderer??gr({async:!0}),c={};if(Object.entries(ta).forEach(([O,C])=>{c[O.toLocaleLowerCase("en-US")]=C}),Object.entries(e.kindIcons??{}).forEach(([O,C])=>{c[O.toLocaleLowerCase("en-US")]=C}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#e=this.#a({cacheTtl:s,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#n=js(s),this.#t=new Map,this.#s=c,this.#r=i}forEntity(e,s){const{entityRef:o,kind:i,entity:c,needsLoad:O}=this.#o(e),C=at=>{const{snapshot:yt}=this.#r.render({entityRef:o,loading:at.loading,entity:at.entity,context:s||{}});return{...yt,entityRef:o,Icon:this.#i(yt.Icon,i)}};let w;try{w=C({loading:O,entity:c})}catch{w={primaryTitle:o,entityRef:o}}if(!O)return{snapshot:w,promise:Promise.resolve(w)};const z=Promise.resolve().then(()=>this.#e?.load(o)).then(at=>C({loading:!1,entity:at??c})).catch(()=>{}),q=new(W())(at=>{let yt=!1;return z.then(Mt=>{Mt&&at.next(Mt)}).finally(()=>{yt||at.complete()}),()=>{yt=!0}}),gt=z.then(at=>at??w);return{snapshot:w,update$:q,promise:gt}}#o(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,yn.U2)(e),needsLoad:!1};const s=this.#t.get(e),o=s?.entity,c=(!s||Date.now()-s.updatedAt>this.#n)&&this.#r.async!==!1&&this.#e!==void 0;return{entity:o,kind:(0,yn.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const s=js(e.cacheTtl),o=js(e.batchDelay);return new(Qo())(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"]}),O=Date.now();return i.forEach((C,w)=>{this.#t.set(C,{updatedAt:O,entity:c[w]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new(Jo())(s),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,s){return e||(e===!1?!1:this.#s[s.toLocaleLowerCase("en-US")])}}const xe=(0,zo.i)({id:"catalog",apis:[(0,st.b)({api:ur.v,deps:{discoveryApi:Tt.I,fetchApi:zt.a},factory:({discoveryApi:r,fetchApi:e})=>new ko({discoveryApi:r,fetchApi:e})}),(0,st.b)({api:Wo.a,deps:{storageApi:ge},factory:({storageApi:r})=>new Go({storageApi:r})}),(0,st.b)({api:Ko.n,deps:{catalogApi:ur.v},factory:({catalogApi:r})=>ts.create({catalogApi:r})})],routes:{catalogIndex:En.rQ,catalogEntity:hr.s},externalRoutes:{createComponent:En.qP,viewTechDoc:En.UJ,createFromTemplate:En.Zg,unregisterRedirect:En.pS}}),gi=xe.provide((0,Oe.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:En.rQ})),ea=xe.provide((0,Oe.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:hr.s})),pi=xe.provide((0,Oe.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(3720),t.e(1902),t.e(5724)]).then(t.bind(t,65724)).then(r=>r.AboutCard)}})),fi=xe.provide((0,Oe.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),mi=xe.provide((0,Oe.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),vi=xe.provide((0,Oe.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),yi=xe.provide((0,Oe.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),Ei=xe.provide((0,Oe.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),Ai=xe.provide((0,Oe.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),xi=xe.provide((0,Oe.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Ci=xe.provide((0,Oe.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),bi=xe.provide((0,Oe.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),Si=xe.provide((0,Oe.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),Oi=xe.provide((0,Oe.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),Pi=xe.provide((0,Ho.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var pr=t(96726),fr=t(26679);class na{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,s){const i=`${await this.getApiOrigin()}/${s}`,c=await fetch(`${i.endsWith("/")?i:`${i}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,s,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class sa{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:s,identityApi:o}){this.configApi=e,this.discoveryApi=s,this.identityApi=o}async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}}const ra=[(0,st.b)({api:fr.s,deps:{configApi:Rt.U,discoveryApi:Tt.I,identityApi:pe.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new na({configApi:r,discoveryApi:e,identityApi:s})}),(0,st.b)({api:fr.l,deps:{configApi:Rt.U,discoveryApi:Tt.I,identityApi:pe.K},factory:({configApi:r,discoveryApi:e,identityApi:s})=>new sa({configApi:r,discoveryApi:e,identityApi:s})}),(0,st.b)({api:pr.Y,deps:{configApi:Rt.U},factory:({configApi:r})=>pr.L.fromConfig(r)})],oa={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},aa={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function ia(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function ca(){const r=await tr(),e=await ia();return[...r,{context:"detected",data:e?oa:aa}]}var Ge=t(58837),la=t(3210);const da=(0,Ge.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),ua=()=>{const r=da();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,a.jsx)("path",{className:r.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"})})},ha=(0,Ge.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),ga=()=>{const r=ha();return(0,a.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,a.jsx)("path",{className:r.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"})})};var ve=t(72664);const mr={isOpen:!1,setOpen:()=>{}},vr=(0,d.createContext)(mr),yr=(0,se.tK)("sidebar-open-state-context");function Er(r){const{children:e,value:s}=r;return(0,a.jsx)(vr.Provider,{value:s,children:(0,a.jsx)(yr.Provider,{value:(0,Se.B)({1:s}),children:e})})}const Us=()=>{const r=(0,d.useContext)(yr),e=(0,d.useContext)(vr);if(r===void 0)return e||mr;const s=r.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s};var Ar=t(72072),xr=t(73524),en=t(10394),Cr=t(5893),pa=t(53373),dn=t.n(pa),fa=t(1125),br=t(29365),ma=t(73845),$s=t(72501),va=t(32881),ya=t(27326),Ea=t(13085);const Sr=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Fs=t(34435);const Aa=(0,Ge.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),xa=r=>{const{to:e,label:s,icon:o,value:i}=r,{sidebarConfig:c}=(0,d.useContext)(ve.yY),O=Aa({sidebarConfig:c}),C=(0,m.zy)(),{selectedMenuItemIndex:w,setSelectedMenuItemIndex:z}=(0,d.useContext)(Sr),q=(at,yt)=>{z(yt===w?-1:yt)},gt=i===w&&w>=0||i!==w&&!(w>=0)&&e===C.pathname;return(0,a.jsx)(Ea.A,{"aria-label":s,label:s,icon:o,component:Ar.N_,to:e||C.pathname,onChange:q,value:i,selected:gt,classes:O})},Or=r=>{const{children:e,to:s,label:o,icon:i,value:c}=r,{isMobile:O}=(0,Fs.Ut)();return O?(0,a.jsx)(xa,{to:s,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Pr=(0,Ge.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),Ca=r=>(0,An.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),ba=d.createElement(Or).type,Sa=({children:r,label:e="Menu",open:s,onClose:o})=>{const{sidebarConfig:i}=(0,d.useContext)(ve.yY),c=Pr({sidebarConfig:i});return(0,a.jsxs)(ma.Ay,{anchor:"bottom",open:s,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(en.A,{className:c.overlayHeader,children:[(0,a.jsx)($s.A,{variant:"h3",children:e}),(0,a.jsx)(br.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(va.A,{})})]}),(0,a.jsx)(en.A,{component:"nav",children:r})]})},Oa=r=>{const{sidebarConfig:e}=(0,d.useContext)(ve.yY),{children:s}=r,o=Pr({sidebarConfig:e}),i=(0,m.zy)(),[c,O]=(0,d.useState)(-1);(0,d.useEffect)(()=>{O(-1)},[i.pathname]);let C=(0,qn.O)(s,z=>z.getElements().filter(q=>q.type===ba));if(s)C.length?C=Ca(C):C.push((0,a.jsx)(Or,{icon:(0,a.jsx)(ya.A,{}),children:s},"default_menu"));else return null;const w=c>=0&&!C[c].props.to;return(0,a.jsx)(Er,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(Sr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:O},children:[(0,a.jsx)(Sa,{label:C[c]&&C[c].props.label,open:w,onClose:()=>O(-1),children:C[c]&&C[c].props.children}),(0,a.jsx)(fa.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:C})]})})};var Pa=t(87849),Ta=t(10315);const Tr=(0,Ge.A)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"},"@media print":{display:"none"}},drawerWidth:e=>({width:e.sidebarConfig.drawerWidthClosed}),drawerOpen:e=>({width:e.sidebarConfig.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var Ra=function(r){return r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open",r}(Ra||{});const wa=r=>{const{sidebarConfig:e}=(0,d.useContext)(ve.yY),{openDelayMs:s=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,O=Tr({sidebarConfig:e}),C=(0,Cr.A)(we=>we.breakpoints.down("md"),{noSsr:!0}),[w,z]=(0,d.useState)(0),q=(0,d.useRef)(),{isPinned:gt,toggleSidebarPinState:at}=(0,Fs.Ut)(),yt=()=>{gt||i||(q.current&&(clearTimeout(q.current),q.current=void 0),w!==2&&!C&&(q.current=window.setTimeout(()=>{q.current=void 0,z(2)},s),z(1)))},Mt=()=>{gt||i||(q.current&&(clearTimeout(q.current),q.current=void 0),w===1?z(0):w===2&&(q.current=window.setTimeout(()=>{q.current=void 0,z(0)},o)))},Ht=w===2&&!C||gt,Ce=we=>{we?(z(2),at()):(z(0),at())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Da,{}),(0,a.jsx)(Er,{value:{isOpen:Ht,setOpen:Ce},children:(0,a.jsx)(en.A,{className:O.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:yt,onFocus:i?()=>{}:yt,onMouseLeave:i?()=>{}:Mt,onBlur:i?()=>{}:Mt,children:(0,a.jsx)(en.A,{className:dn()(O.drawer,O.drawerWidth,{[O.drawerOpen]:Ht}),children:c})})})]})},Ia=r=>{const e=(0,ve.Rv)(r.sidebarOptions??{}),s=(0,ve.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:O}=r,{isMobile:C}=(0,Fs.Ut)();return C?(0,a.jsx)(Oa,{children:o}):(0,a.jsx)(ve.yY.Provider,{value:{sidebarConfig:e,submenuConfig:s},children:(0,a.jsx)(wa,{openDelayMs:c,closeDelayMs:O,disableExpandOnHover:i,children:o})})};function Da(){const{sidebarConfig:r}=(0,d.useContext)(ve.yY),{focusContent:e,contentRef:s}=(0,xr.H)(),o=Tr({sidebarConfig:r}),{t:i}=(0,Pa.i)(Ta.O);return s?.current?(0,a.jsx)(v.A,{onClick:e,variant:"contained",className:dn()(o.visuallyHidden),children:i("skipToContent")}):null}var La=t(94509),es=t(44209),Ma=t(79065),Ba=t(55704),Rr=t(62248);const ja=(0,Ge.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",opacity:0,[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create(["margin-left","opacity"],{easing:r.transitions.easing.sharp,duration:e.submenuConfig.defaultOpenDelayMs})},top:0,bottom:0,padding:0,background:r.palette.navigation.submenu?.background??"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:e.submenuConfig.drawerWidthClosed,transitionDelay:`${e.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:e=>({marginLeft:e.left,opacity:1,width:e.submenuConfig.drawerWidthOpen,[r.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:r.spacing(3),left:0,top:0}}),title:{fontSize:r.typography.h5.fontSize,fontWeight:r.typography.fontWeightMedium,color:r.palette.navigation.color,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Ua=r=>{const{isOpen:e}=Us(),{sidebarConfig:s,submenuConfig:o}=(0,d.useContext)(ve.yY),i=e?s.drawerWidthOpen:s.drawerWidthClosed,c=ja({left:i,submenuConfig:o}),{isHoveredOn:O}=(0,d.useContext)(ve.U1),[C,w]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{w(O)},[O]),(0,a.jsxs)(en.A,{className:dn()(c.drawer,{[c.drawerOpen]:C}),children:[(0,a.jsx)($s.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var $a=t(45810),wr=t.n($a);function Ir(r,e,s=!1){const o=new URLSearchParams(e.search).toString(),i=wr().parse(o),c=new URLSearchParams(r.search).toString(),O=wr().parse(c),C=s?An.isEqual:An.isMatch;return(0,An.isEqual)(e.pathname,r.pathname)&&C(O,i)}const Fa=r=>(0,Ge.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 ns(r){return(0,d.useMemo)(()=>Fa(r),[r])()}const Na=(r,e)=>(0,qn.O)(r.props.children,s=>{let o=!1;return s.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:O})=>o=o||Ir(e,(0,Rn.o1)(O)));return}i&&(o=Ir(e,(0,Rn.o1)(i)))}}),o},[e.pathname]);function Ns(r){return r.to===void 0}const ka=d.createElement(Ua).type,Wa=d.forwardRef(function({to:e,end:s,style:o,className:i,activeStyle:c,caseSensitive:O,activeClassName:C="active","aria-current":w="page",...z},q){let{pathname:gt}=(0,m.zy)(),{pathname:at}=(0,m.x$)(e);O||(gt=gt.toLocaleLowerCase("en-US"),at=at.toLocaleLowerCase("en-US"));let yt=gt===at;!yt&&!s&&(yt=gt.startsWith(`${at}/`));const Mt=yt?w:void 0;return(0,a.jsx)(T.N_,{...z,to:e,ref:q,"aria-current":Mt,style:{...o,...yt?c:void 0},className:dn()([typeof i!="function"?i:void 0,yt?C:void 0])})}),Dr=(0,d.forwardRef)((r,e)=>{const{icon:s,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:O=!1,onClick:C,noTrack:w,children:z,className:q,...gt}=r,{sidebarConfig:at}=(0,d.useContext)(ve.yY),yt=ns(at),{isOpen:Mt}=Us(),Ht=!Mt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Ce=(0,a.jsxs)(en.A,{style:Ht,children:[(0,a.jsx)(s,{fontSize:"small"}),!Mt&&c?(0,a.jsx)(Rr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),we=(0,a.jsx)(La.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:dn()({[yt.closedItemIcon]:!Mt}),children:Ce}),Pe=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(en.A,{"data-testid":"login-button",className:yt.iconContainer,children:we}),o&&(0,a.jsx)($s.A,{variant:"subtitle2",component:"span",className:yt.label,children:o}),(0,a.jsx)("div",{className:yt.secondaryAction,children:z})]}),un=Mt?Pe:we,Br={onClick:C,className:dn()(q,yt.root,Mt?yt.open:yt.closed,Ns(r)&&yt.buttonItem,{[yt.highlightable]:!O})},jr=(0,sr.s)(),{pathname:ks}=(0,m.x$)(!Ns(r)&&r.to?r.to:""),Ur=(0,d.useCallback)(li=>{if(!w){const di="click",ui=o??"Sidebar Item",hi=ks?{attributes:{to:ks}}:void 0;jr.captureEvent(di,ui,hi)}C?.(li)},[jr,o,ks,w,C]);return Ns(r)?(0,a.jsx)(v.A,{role:"button","aria-label":o,...Br,ref:e,onClick:Ur,children:un}):(0,a.jsx)(Wa,{...Br,activeClassName:yt.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...gt,onClick:Ur,children:un})}),Ka=({children:r,...e})=>{const{sidebarConfig:s}=(0,d.useContext)(ve.yY),o=ns(s),[i,c]=(0,d.useState)(!1),O=(0,m.zy)(),C=Na(r,O),w=(0,Cr.A)(at=>at.breakpoints.down("sm")),z=()=>{c(!0)},q=()=>{c(!1)},gt=()=>w?i?(0,a.jsx)(Ba.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ma.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(Rr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(ve.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:q,onTouchStart:i?q:z,onMouseEnter:z,className:dn()(i&&o.highlighted),children:[(0,a.jsx)(Dr,{hasSubmenu:!0,className:C?o.selected:"",...e,children:gt()}),i&&r]})})},Lr=(0,d.forwardRef)((r,e)=>{const[s]=(0,qn.O)(r.children,o=>o.getElements().filter(i=>i.type===ka));return s?(0,a.jsx)(Ka,{...r,children:s}):(0,a.jsx)(Dr,{...r,ref:e})});function wi(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[s,o]=useState(""),i=ns(e),c=r.icon?r.icon:SearchIcon,O=()=>{r.onSearch(s),o("")},C=gt=>{gt.key==="Enter"&&(gt.preventDefault(),O())},w=gt=>{o(gt.target.value)},z=gt=>{gt.preventDefault(),gt.stopPropagation()},q=gt=>{O(),gt.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Lr,{icon:c,to:r.to,onClick:q,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:s,onClick:z,onChange:w,onKeyDown:C,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Ii=(0,es.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Di=(0,es.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),za=(0,es.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ha=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),Li=(0,es.A)("div")(({theme:r})=>{const e=Ha(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Mi=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=ns(r),{isOpen:s,setOpen:o}=useSidebarOpenState();if(useMediaQuery(O=>O.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!s)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:s?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Va=(0,Ge.A)({root:{width:ve.hC.drawerWidthClosed,height:3*ve.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:ve.hC.drawerWidthClosed,marginLeft:24}}),Ga=()=>{const r=Va(),{isOpen:e}=Us();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(Ar.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(ua,{}):(0,a.jsx)(ga,{})})})},Ya=({children:r})=>(0,a.jsxs)(xr.G,{children:[(0,a.jsxs)(Ia,{children:[(0,a.jsx)(Ga,{}),(0,a.jsx)(za,{}),(0,a.jsx)(Lr,{icon:la.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Qa=t(71677),Za=t(62437),Ja=t(55484),Xa=t(45061),_a=t(67289);const qa=(0,Ge.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var ti=function(r){return r.LIGHT="light",r.DARK="dark",r}(ti||{});const ei=()=>{const r=(0,Tn.gf)(Gn),e=qa(),[s,o]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:Ja.A,title:"Dark theme"},dark:{icon:Za.A,title:"Light theme"}},{title:c,icon:O}=i[s],C=()=>{o(w=>{const z=w==="light"?"dark":"light";return r.setActiveThemeId(z),z})};return(0,a.jsx)(en.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Qa.Ay,{title:c,arrow:!0,children:(0,a.jsx)(br.A,{size:"small",onClick:C,children:(0,a.jsx)(O,{className:e.headerIcon})})})})},ni=()=>(0,a.jsxs)(h.Wj,{children:[(0,a.jsx)(Xa.T,{}),(0,a.jsx)(_a.p,{withSearch:!1})]}),si=(0,a.jsx)(ni,{}),Mr=Bo({apis:ra,configLoader:ca,plugins:Object.values(n)}),ri=Mr.getProvider(),oi=Mr.getRouter(),ai=h.Ju.provide((0,g.Hr)({name:"ThemeToggleAddon",component:ei,location:p.e.Header})),ii=(0,a.jsxs)(dr,{children:[(0,a.jsx)(m.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(m.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(ea,{})}),(0,a.jsx)(m.qh,{path:"/docs",element:(0,a.jsx)(h.$j,{}),children:(0,a.jsx)(u.K,{})}),(0,a.jsxs)(m.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(h.Wj,{}),children:[si,(0,a.jsx)(g.po,{children:(0,a.jsx)(ai,{})})]})]}),ci=()=>(0,a.jsx)(ri,{children:(0,a.jsx)(oi,{children:(0,a.jsx)(Ya,{children:ii})})});x.createRoot(document.getElementById("root")).render((0,a.jsx)(ci,{}))},43836:(H,b,t)=>{"use strict";t.d(b,{qO:()=>x,tK:()=>d});var n=t(14041),a=t(63544);function d(h){return(0,a.Q)(h,()=>(0,n.createContext)(void 0))}function x(h){return(0,n.useContext)(d(h))}function m(h){return{set(u){globalThis[`__@backstage/${h}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${h}__`]}}}},10602:(H,b,t)=>{"use strict";t.d(b,{B:()=>n});function n(a){Object.freeze(a);const d={atVersion(x){return a[x]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return a}}),d}},63544:(H,b,t)=>{"use strict";t.d(b,{Q:()=>x});function n(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=n(),d=m=>`__@backstage/${m}__`;function x(m,h){const u=d(m);let g=a[u];return g||(g=h(),a[u]=g,g)}},7341:(H,b,t)=>{"use strict";t.d(b,{v:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.service"})},82292:(H,b,t)=>{"use strict";t.d(b,{n:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.catalog.entity-presentation"})},88083:(H,b,t)=>{"use strict";t.d(b,{T:()=>m});var n=t(6820),a=t(72348),d=t(46123),x=t.n(d);function m(p,v){const{kind:E,namespace:y,name:P,title:T,description:M,displayName:S,type:B}=u(p),F=(0,n.U2)({kind:E||"unknown",namespace:y||a.oQ,name:P||"unknown"}),L=g({kind:E,namespace:y,name:P,context:v}),Q=[S,T,L].find(k=>k&&typeof k=="string"),G=[Q!==F?F:void 0,B,M].filter(k=>k&&typeof k=="string").join(" | ");return{entityRef:F,primaryTitle:Q,secondaryTitle:G||void 0,Icon:void 0}}const h=p=>!!p&&typeof p=="string";function u(p){if(typeof p=="string"){let v=p.indexOf(":");const E=p.indexOf("/");E!==-1&&E<v&&(v=-1);const y=v===-1?void 0:p.slice(0,v),P=E===-1?void 0:p.slice(v+1,E),T=p.slice(Math.max(v+1,E+1));return{kind:y,namespace:P,name:T}}if(typeof p=="object"&&p!==null){const v=[x()(p,"kind")].find(h),E=[x()(p,"metadata.namespace"),x()(p,"namespace")].find(h),y=[x()(p,"metadata.name"),x()(p,"name")].find(h),P=[x()(p,"metadata.title")].find(h),T=[x()(p,"metadata.description")].find(h),M=[x()(p,"spec.profile.displayName")].find(h),S=[x()(p,"spec.type")].find(h);return{kind:v,namespace:E,name:y,title:P,description:T,displayName:M,type:S}}return{}}function g(p){const v=p.kind?.toLocaleLowerCase("en-US")||"unknown",E=p.namespace||a.oQ,y=p.name||"unknown",P=p.context?.defaultKind?.toLocaleLowerCase("en-US"),T=p.context?.defaultNamespace?.toLocaleLowerCase("en-US");let M=y;return(T&&E.toLocaleLowerCase("en-US")!==T||E!==a.oQ)&&(M=`${E}/${M}`),P&&v.toLocaleLowerCase("en-US")!==P&&(M=`${v}:${M}`),M}},3169:(H,b,t)=>{"use strict";t.d(b,{f:()=>u});var n=t(6820),a=t(72427),d=t(14041),x=t(82292),m=t(88083);function h(g,p,v){const[E,y]=(0,d.useState)(g);return(0,d.useEffect)(()=>{y(g);const P=p?.subscribe({next:T=>{y(T)},complete:()=>{P?.unsubscribe()}});return()=>{P?.unsubscribe()}},v),E}function u(g,p){const E=(0,a.Q2)().get(x.n),y=[E,JSON.stringify(g),JSON.stringify(p||null)],P=(0,d.useMemo)(()=>{if(!E){const T=(0,m.T)(g,p);return{snapshot:T,promise:Promise.resolve(T)}}return E.forEntity(typeof g=="string"||"metadata"in g?g:(0,n.U2)(g),p)},y);return h(P.snapshot,P.update$,[P])}},18:(H,b,t)=>{"use strict";t.d(b,{a:()=>a});var n=t(55309);const a=(0,n.y)({id:"catalog-react.starred-entities"})},22995:(H,b,t)=>{"use strict";t.d(b,{Q:()=>k});var n=t(31085),a=t(10394),d=t(72501),x=t(4321),m=t(87263),h=t(16249),u=t(33145),g=t(58837),p=t(87051),v=t(12398),E=t(6924),y=t(20577),P=t(14041),T=t(45250),M=t.n(T),S=t(53373),B=t.n(S);const F=(0,g.A)(W=>({root:{margin:W.spacing(1,0)},label:{position:"relative",fontWeight:"bold",fontSize:W.typography.body2.fontSize,fontFamily:W.typography.fontFamily,color:W.palette.text.primary,"& > span":{top:0,left:0,position:"absolute"}}}),{name:"BackstageAutocomplete"}),L=(0,p.A)(W=>(0,v.A)({root:{},paper:{margin:0},hasClearIcon:{},hasPopupIcon:{},focused:{},inputRoot:{marginTop:24,backgroundColor:W.palette.background.paper,"$root$hasClearIcon$hasPopupIcon &":{paddingBlock:W.spacing(.75),paddingInlineStart:W.spacing(.75)},"$root$focused &":{outline:"none"},"$root &:hover > fieldset":{borderColor:"#ced4da"},"$root$focused & > fieldset":{borderWidth:1,borderColor:W.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:W.typography.body1.fontSize,paddingBlock:W.spacing(.8125)}}}),{name:"BackstageAutocompleteBase"})(y.Ay),Q=W=>(0,n.jsx)(m.A,{...W,transition:!0,placement:"bottom-start",children:({TransitionProps:_})=>(0,n.jsx)(u.A,{..._,style:{transformOrigin:"0 0 0"},children:(0,n.jsx)(a.A,{children:W.children})})}),G=W=>(0,n.jsx)(x.A,{...W,elevation:8});function k(W){const{label:_,name:N,LabelProps:rt,TextFieldProps:Z,...Y}=W,X=F(),ct=(0,P.useCallback)(Et=>(0,n.jsx)(h.A,{...(0,T.merge)(Et,Z),variant:"outlined"}),[Z]),dt=(0,n.jsx)(L,{size:"small",...Y,renderInput:Y.renderInput??ct,popupIcon:(0,n.jsx)(E.A,{"data-testid":`${N}-expand`}),PaperComponent:G,PopperComponent:Q});return(0,n.jsx)(a.A,{className:X.root,children:_?(0,n.jsxs)(d.A,{...rt,className:B()(X.label,rt?.className),component:"label",children:[(0,n.jsx)(a.A,{component:"span",children:_}),dt]}):dt})}},54203:(H,b,t)=>{"use strict";t.d(b,{GI:()=>M});var n=t(31085),a=t(14041),d=t(10394),x=t(64947),m=t(73845),h=t(42899),u=t(72501),g=t(5893),p=t(54917),v=t(65859),E=t(64630),y=t(87849);const P=S=>{const B=(0,g.A)(k=>k.breakpoints.down(S.options?.drawerBreakpoint??"md"),{noSsr:!0}),F=(0,p.A)(),[L,Q]=(0,a.useState)(!1),{t:G}=(0,y.i)(E.j);return B?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.A,{style:{marginTop:F.spacing(1),marginLeft:F.spacing(1)},onClick:()=>Q(!0),startIcon:(0,n.jsx)(v.A,{}),children:G("catalogFilter.buttonTitle")}),(0,n.jsx)(m.Ay,{open:L,onClose:()=>Q(!1),anchor:S.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,n.jsxs)(d.A,{m:2,children:[(0,n.jsx)(u.A,{variant:"h6",component:"h2",style:{marginBottom:F.spacing(1)},children:G("catalogFilter.title")}),S.children]})})]}):(0,n.jsx)(h.A,{item:!0,lg:2,children:S.children})},T=S=>(0,n.jsx)(h.A,{item:!0,xs:12,lg:10,children:S.children}),M=S=>(0,n.jsx)(h.A,{container:!0,style:{position:"relative"},children:S.children});M.Filters=P,M.Content=T},47144:(H,b,t)=>{"use strict";t.d(b,{y:()=>Q});var n=t(31085),a=t(10394),d=t(58837),x=t(14041),m=t(72427),h=t(73466),u=t(7341),g=t(69076),p=t(86901),v=t(44148),E=t(41260);const y=(0,n.jsx)(E.A,{fontSize:"small"}),P=(0,n.jsx)(v.A,{fontSize:"small"});function T({selected:G}){return(0,n.jsx)(g.A,{icon:y,checkedIcon:P,checked:G})}const M=(0,x.memo)(G=>{const{selected:k,value:W,availableOptions:_,showCounts:N}=G,rt=N?`${W} (${_?.[W]})`:W;return(0,n.jsx)(p.A,{control:(0,n.jsx)(T,{selected:k}),label:rt,onClick:Z=>Z.preventDefault()})});var S=t(21405),B=t(26796),F=t(22995);const L=(0,d.A)({root:{},label:{textTransform:"none",fontWeight:"bold"}},{name:"CatalogReactEntityAutocompletePicker"});function Q(G){const{label:k,name:W,path:_,showCounts:N,Filter:rt,InputProps:Z,initialSelectedOptions:Y=[],filtersForAvailableValues:X=["kind"]}=G,ct=L(),{updateFilters:dt,filters:Et,queryParameters:{[W]:It}}=(0,S.nK)(),Pt=(0,m.gf)(u.v),lt=X.map(pt=>Et[pt]),{value:it}=(0,h.A)(async()=>{const pt=_,{facets:tt}=await Pt.getEntityFacets({facets:[pt],filter:(0,B.Rr)(lt.filter(Boolean))});return Object.fromEntries(tt[pt].map(({value:Ct,count:et})=>[Ct,et]))},[...lt]),mt=(0,x.useMemo)(()=>[It].flat().filter(Boolean),[It]),[ut,Ot]=(0,x.useState)(mt.length?mt:Et[W]?.values??Y);(0,x.useEffect)(()=>{mt.length&&Ot(mt)},[mt]);const St=Object.keys(it??{}),ft=ut.length&&St.length;(0,x.useEffect)(()=>{dt({[W]:ft?new rt(ut):void 0})},[W,ft,ut,rt,dt]);const At=Et[W];return At&&typeof At=="object"&&!("values"in At)||!St.length?null:(0,n.jsx)(a.A,{className:ct.root,pb:1,pt:1,children:(0,n.jsx)(F.Q,{multiple:!0,disableCloseOnSelect:!0,label:k,name:`${String(W)}-picker`,options:St,value:ut,TextFieldProps:Z,onChange:(pt,tt)=>Ot(tt),renderOption:(pt,{selected:tt})=>(0,n.jsx)(M,{selected:tt,value:pt,availableOptions:it,showCounts:!!N})})})}},72987:(H,b,t)=>{"use strict";t.d(b,{t:()=>St});var n=t(31085),a=t(6820),d=t(10394),x=t(69076),m=t(86901),h=t(72501),u=t(71677),g=t(58837),p=t(44148),v=t(41260),E=t(14041),y=t(21405),P=t(92822),T=t(92367),M=t(48108),S=t(47966),B=t(90184),F=t(72427),L=t(87290),Q=t(7341);function G({enabled:ft}){const At=(0,F.gf)(Q.v),[pt]=(0,E.useState)(async()=>{if(!ft)return[];const tt="relations.ownedBy";return At.getEntityFacets({facets:[tt]}).then(Ct=>Ct.facets[tt].map(et=>et.value).map(et=>{const{kind:U,name:V,namespace:vt}=(0,a.KU)(et);return{apiVersion:"backstage.io/v1beta1",kind:U,metadata:{name:V,namespace:vt}}}).sort((et,U)=>et.kind.localeCompare(U.kind,"en-US")||et.metadata.namespace.localeCompare(U.metadata.namespace,"en-US")||et.metadata.name.localeCompare(U.metadata.name,"en-US"))).catch(()=>[])});return(0,L.A)(async(tt,Ct)=>{const et=await pt;if(!et)return{items:[]};const U=Ct?.limit??20,{text:V,start:vt}=k(tt),Dt=et.filter(Lt=>N(V,Lt)),xt=vt+U;return{items:Dt.slice(0,xt),..._({entities:Dt,limit:xt,payload:{text:V,start:xt}})}},[pt],{loading:!0,value:{items:[]}})}function k(ft){return W(ft)&&ft.cursor?JSON.parse(atob(ft.cursor)):{text:ft.text||"",start:0}}function W(ft){return!!ft.cursor}function _({entities:ft,limit:At,payload:pt}){return ft.length>At?{cursor:btoa(JSON.stringify(pt))}:{}}function N(ft,At){const pt=ft.trim();return At.kind.includes(pt)||At.metadata.namespace?.includes(pt)||At.metadata.name.includes(pt)}function rt(){const ft=(0,F.gf)(Q.v);return(0,L.A)(async(At,pt)=>{const tt=At,Ct=At,et=pt?.limit??20;if(Ct.cursor){const V=await ft.queryEntities({cursor:Ct.cursor,limit:et});return{cursor:V.pageInfo.nextCursor,items:[...Ct.items,...V.items]}}const U=await ft.queryEntities({fullTextFilter:{term:tt.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:et});return{cursor:U.pageInfo.nextCursor,items:U.items}},[],{loading:!0})}var Z=t(76842);function Y({mode:ft,initialSelectedOwnersRefs:At}){const pt=ft==="owners-only",tt=rt(),Ct=G({enabled:pt}),[et,U]=pt?Ct:tt;return[et,U,X({enabled:!pt,initialSelectedOwnersRefs:At})]}function X({enabled:ft,initialSelectedOwnersRefs:At}){const pt=(0,E.useRef)({}),tt=(0,F.gf)(Q.v),[,Ct]=(0,L.A)(async()=>{(await tt.getEntitiesByRefs({entityRefs:At})).items.forEach(U=>{U&&(pt.current[(0,a.U2)(U)]=U)})},[]);return(0,Z.u)(()=>{ft&&At.length>0&&Ct()}),{getEntity:et=>pt.current[et],setEntity:et=>{pt.current[(0,a.U2)(et)]=et}}}var ct=t(87051),dt=t(3169),Et=t(64630),It=t(87849),Pt=t(22995);const lt=(0,g.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),it=(0,ct.A)(ft=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(m.A),mt=(0,n.jsx)(v.A,{fontSize:"small"}),ut=(0,n.jsx)(p.A,{fontSize:"small"});function Ot(ft){const At=lt(),pt=ft.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:tt}=(0,dt.f)(ft.entity);return(0,n.jsx)(d.A,{className:At.fullWidth,children:(0,n.jsx)(it,{className:At.fullWidth,control:(0,n.jsx)(x.A,{icon:mt,checkedIcon:ut,checked:ft.isSelected}),onClick:Ct=>Ct.preventDefault(),label:(0,n.jsx)(u.Ay,{title:tt,children:(0,n.jsxs)(d.A,{display:"flex",alignItems:"center",children:[pt?(0,n.jsx)(S.A,{fontSize:"small"}):(0,n.jsx)(M.A,{fontSize:"small"}),"\xA0",(0,n.jsx)(d.A,{className:At.boxLabel,children:(0,n.jsx)(h.A,{noWrap:!0,children:tt})})]})})})})}const St=ft=>{const At=lt(),{mode:pt="owners-only"}=ft||{},{updateFilters:tt,filters:Ct,queryParameters:{owners:et}}=(0,y.nK)(),[U,V]=(0,E.useState)(""),{t:vt}=(0,It.i)(Et.j),Dt=(0,E.useMemo)(()=>[et].flat().filter(Boolean),[et]),[xt,Lt]=(0,E.useState)(Dt.length?Dt:Ct.owners?.values??[]),[{value:Wt,loading:_t},Ut,Nt]=Y({mode:pt,initialSelectedOwnersRefs:xt});(0,T.s)(()=>Ut({text:U}),[U,Ut],250);const ce=Wt?.items||[];return(0,E.useEffect)(()=>{if(Dt.length){const Vt=new P.N9(Dt);Lt(Vt.values)}},[Dt]),(0,E.useEffect)(()=>{tt({owners:xt.length?new P.N9(xt):void 0})},[xt,tt]),["user","group"].includes(Ct.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,n.jsx)(d.A,{className:At.root,pb:1,pt:1,children:(0,n.jsx)(Pt.Q,{label:vt("entityOwnerPicker.title"),multiple:!0,disableCloseOnSelect:!0,loading:_t,options:ce,value:xt,getOptionSelected:(Vt,Ft)=>typeof Ft=="string"?(0,a.U2)(Vt)===Ft:Vt===Ft,getOptionLabel:Vt=>{const Ft=typeof Vt=="string"?Nt.getEntity(Vt)||(0,a.KU)(Vt,{defaultKind:"group",defaultNamespace:"default"}):Vt;return(0,B.Z)(Ft,(0,B.S)(Ft))},onChange:(Vt,Ft)=>{V(""),Lt(Ft.map(Kt=>{const ee=typeof Kt=="string"?Kt:(0,a.U2)(Kt);return typeof Kt!="string"&&Nt.setEntity(Kt),ee}))},filterOptions:Vt=>Vt,renderOption:(Vt,{selected:Ft})=>(0,n.jsx)(Ot,{entity:Vt,isSelected:Ft}),name:"owner-picker",onInputChange:(Vt,Ft)=>{V(Ft)},ListboxProps:{onScroll:Vt=>{const Ft=Vt.currentTarget;Math.abs(Ft.scrollHeight-Ft.clientHeight-Ft.scrollTop)<1&&Wt?.cursor&&Ut({items:Wt.items,cursor:Wt.cursor})},"data-testid":"owner-picker-listbox"},LabelProps:{className:At.label},TextFieldProps:{className:At.input}})})}},8859:(H,b,t)=>{"use strict";t.d(b,{z:()=>T});var n=t(31085),a=t(6820),d=t(72348),x=t(72072),m=t(9222),h=t(14041),u=t(29207),g=t(10394),p=t(71677),v=t(58837),E=t(3169);const y=(0,v.A)(S=>({root:{display:"inline-flex",alignItems:"center",textDecoration:"inherit"},icon:{marginRight:S.spacing(.5),color:S.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),P=S=>{const{entityRef:B,hideIcon:F,disableTooltip:L,defaultKind:Q,defaultNamespace:G}=S,k=y(),{primaryTitle:W,secondaryTitle:_,Icon:N}=(0,E.f)(B,{defaultKind:Q,defaultNamespace:G});let rt=(0,n.jsx)(n.Fragment,{children:W});return rt=(0,n.jsxs)(g.A,{component:"span",className:k.root,children:[N&&!F?(0,n.jsx)(g.A,{component:"span",className:k.icon,children:(0,n.jsx)(N,{fontSize:"inherit"})}):null,rt]}),_&&!L&&(rt=(0,n.jsx)(p.Ay,{enterDelay:1500,title:_,children:rt})),rt},T=(0,h.forwardRef)((S,B)=>{const{entityRef:F,defaultKind:L,defaultNamespace:Q,title:G,children:k,hideIcon:W,disableTooltip:_,...N}=S,rt=M(S.entityRef),Z=k??G??(0,n.jsx)(P,{entityRef:F,defaultKind:L,defaultNamespace:Q,hideIcon:W,disableTooltip:_});return(0,n.jsx)(x.N_,{...N,ref:B,to:rt,children:Z})});function M(S){const B=(0,m.S)(u.s);let F,L,Q;if(typeof S=="string"){const k=(0,a.KU)(S);F=k.kind,L=k.namespace,Q=k.name}else"metadata"in S?(F=S.kind,L=S.metadata.namespace,Q=S.metadata.name):(F=S.kind,L=S.namespace,Q=S.name);F=F.toLocaleLowerCase("en-US"),L=L?.toLocaleLowerCase("en-US")??d.oQ;const G={kind:encodeURIComponent(F),namespace:encodeURIComponent(L),name:encodeURIComponent(Q)};return B(G)}},34428:(H,b,t)=>{"use strict";t.d(b,{i:()=>m});var n=t(31085),a=t(6820),d=t(14041),x=t(8859);function m(h){const{entityRefs:u,hideIcons:g,...p}=h;return(0,n.jsx)(n.Fragment,{children:u.map((v,E)=>{const y=typeof v=="string"?v:(0,a.U2)(v);return(0,n.jsxs)(d.Fragment,{children:[E>0&&", ",(0,n.jsx)(x.z,{...p,entityRef:v,hideIcon:g})]},`${E}.${y}`)})})}},90184:(H,b,t)=>{"use strict";t.d(b,{S:()=>x,Z:()=>m});var n=t(72348),a=t(46123),d=t.n(a);function x(h,u){const g=u?.defaultKind;let p,v,E;return"metadata"in h?(p=h.kind,v=h.metadata.namespace,E=h.metadata.name):(p=h.kind,v=h.namespace,E=h.name),(v===void 0||v==="")&&(v=n.oQ),u?.defaultNamespace!==void 0?u?.defaultNamespace===v&&(v=void 0):v===n.oQ&&(v=void 0),p=p.toLocaleLowerCase("en-US"),p=g&&g.toLocaleLowerCase("en-US")===p?void 0:p,`${p?`${p}:`:""}${v?`${v}/`:""}${E}`}function m(h,u){for(const g of["spec.profile.displayName","metadata.title"]){const p=d()(h,g);if(p&&typeof p=="string")return p}return u}},91035:(H,b,t)=>{"use strict";t.d(b,{m:()=>p});var n=t(31085),a=t(58837),d=t(14041),x=t(92822),m=t(47144),h=t(64630),u=t(87849);const g=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),p=v=>{const E=g(),{t:y}=(0,u.i)(h.j);return(0,n.jsx)(m.y,{label:y("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:x.q_,showCounts:v.showCounts,InputProps:{className:E.input}})}},67626:(H,b,t)=>{"use strict";t.d(b,{y:()=>Pt});var n=t(31085),a=t(72427),d=t(65461),x=t(40703),m=t(58007),h=t(68804),u=t(65569),g=t(5951),p=t(26343),v=t(72501),E=t(58837),y=t(9684),P=t(31129),T=t(14041),M=t(92822),S=t(21405),B=t(16009),F=t(45250),L=t(73466),Q=t(7341),G=t(26796),k=t(87290),W=t(48899);function _(){const lt=(0,a.gf)(B.K),it=(0,a.gf)(Q.v),{filters:mt}=(0,S.nK)(),{value:ut,loading:Ot}=(0,L.A)(async()=>(await lt.getBackstageIdentity()).ownershipEntityRefs,[]),{user:St,owners:ft,...At}=mt,pt=(0,G.$3)((0,F.compact)(Object.values(At))),[{value:tt,loading:Ct},et]=(0,k.A)(async V=>{const vt=N(V.owners,V.ownershipEntityRefs);if(vt===void 0)return 0;const{["metadata.name"]:Dt,...xt}=V.filter.filter,{totalItems:Lt}=await it.queryEntities({...V.filter,filter:{...xt,"relations.ownedBy":vt},limit:0});return Lt},[],{loading:!0});return(0,W.A)(()=>{Object.keys(pt.filter).length!==0&&ut!==void 0&&et({ownershipEntityRefs:ut,owners:ft,filter:pt})},[ut,ft,pt]),{count:tt,loading:Ot||Ct,filter:(0,T.useMemo)(()=>M.tN.owned(ut??[]),[ut]),ownershipEntityRefs:ut}}function N(lt,it){if(it===void 0)return;const mt=lt?.values??[];if(mt.length){const ut=(0,F.intersection)(mt,it);return ut.length===0?void 0:ut}return it}function rt(){const lt=(0,a.gf)(Q.v),{filters:it}=(0,S.nK)(),mt=(0,T.useRef)(),ut=(0,T.useMemo)(()=>{const{user:ft,...At}=it,pt=(0,F.compact)(Object.values(At)),tt=(0,G.$3)(pt),Ct={...tt,limit:0};return Object.keys(tt.filter).length===0?(mt.current=void 0,mt.current):(0,F.isEqual)(Ct,mt.current)?mt.current:(mt.current=Ct,Ct)},[it]),{value:Ot,loading:St}=(0,L.A)(async()=>{if(ut===void 0)return 0;const{totalItems:ft}=await lt.queryEntities(ut);return ft},[ut]);return{count:Ot,loading:St}}var Z=t(6820),Y=t(56889);function X(){const lt=(0,a.gf)(Q.v),{filters:it}=(0,S.nK)(),{starredEntities:mt}=(0,Y.I)(),ut=(0,T.useRef)(),Ot=(0,T.useMemo)(()=>{const{user:pt,...tt}=it,Ct=(0,F.compact)(Object.values(tt)),et=(0,G.$3)(Ct),V={...et,filter:{...et.filter,["metadata.name"]:Array.from(mt).map(vt=>(0,Z.KU)(vt).name)},limit:1e3};return(0,F.isEqual)(V,ut.current)?ut.current:(ut.current=V,V)},[it,mt]),{value:St,loading:ft}=(0,L.A)(async()=>mt.size?(await lt.queryEntities(Ot)).items.map(tt=>(0,Z.U2)({kind:tt.kind,namespace:tt.metadata.namespace,name:tt.metadata.name})).filter(tt=>mt.has(tt)).length:0,[Ot,mt]),At=(0,T.useMemo)(()=>M.tN.starred(Array.from(mt)),[mt]);return{count:St,loading:ft,filter:At}}var ct=t(87849),dt=t(64630);const Et=(0,E.A)(lt=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:lt.spacing(1,0,1,0)},title:{margin:lt.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:lt.palette.text.primary},menuItem:{minHeight:lt.spacing(6)},groupWrapper:{margin:lt.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function It(lt,it){return[{name:it("userListPicker.personalFilter.title"),items:[{id:"owned",label:it("userListPicker.personalFilter.ownedLabel"),icon:y.A},{id:"starred",label:it("userListPicker.personalFilter.starredLabel"),icon:P.Gg}]},{name:lt,items:[{id:"all",label:it("userListPicker.orgFilterAllLabel")}]}]}const Pt=lt=>{const{initialFilter:it,availableFilters:mt}=lt,ut=Et(),Ot=(0,a.gf)(d.U),{t:St}=(0,ct.i)(dt.j),ft=Ot.getOptionalString("organization.name")??St("userListPicker.defaultOrgName"),{filters:At,updateFilters:pt,queryParameters:{kind:tt,user:Ct}}=(0,S.nK)(),et=["starred","all"],U=It(ft,St).map(Kt=>({...Kt,items:Kt.items.filter(({id:ee})=>["group","user"].some(Fe=>Fe===tt)?et.includes(ee):!mt||mt.includes(ee))})).filter(({items:Kt})=>!!Kt.length),{count:V,loading:vt,filter:Dt}=_(),{count:xt}=rt(),{count:Lt,filter:Wt,loading:_t}=X(),Ut=(0,T.useMemo)(()=>[Ct].flat()[0],[Ct]),[Nt,ce]=(0,T.useState)(Ut??it),Vt=(0,T.useMemo)(()=>({all:xt,starred:Lt,owned:V}),[Lt,V,xt]);(0,T.useEffect)(()=>{Ut&&ce(Ut)},[Ut]);const Ft=vt||_t;return(0,T.useEffect)(()=>{!Ft&&Nt&&Nt!=="all"&&Vt[Nt]===0&&ce("all")},[Ft,Vt,Nt,ce]),(0,T.useEffect)(()=>{if(!Nt||Ft)return;pt({user:Nt==="owned"?Dt:Nt==="starred"?Wt:M.tN.all()})},[Nt,Wt,Dt,pt,Ft]),(0,n.jsx)(x.A,{className:ut.root,children:U.map(Kt=>(0,n.jsxs)(T.Fragment,{children:[(0,n.jsx)(v.A,{variant:"subtitle2",component:"span",className:ut.title,children:Kt.name}),(0,n.jsx)(x.A,{className:ut.groupWrapper,children:(0,n.jsx)(m.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":Kt.name,children:Kt.items.map((ee,Fe)=>(0,n.jsxs)(p.A,{role:"none presentation",divider:Fe!==Kt.items.length-1,onClick:()=>ce(ee.id),selected:ee.id===At.user?.value,className:ut.menuItem,disabled:Vt[ee.id]===0,"data-testid":`user-picker-${ee.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[ee.icon&&(0,n.jsx)(h.A,{className:ut.listIcon,children:(0,n.jsx)(ee.icon,{fontSize:"small"})}),(0,n.jsx)(g.A,{children:(0,n.jsxs)(v.A,{variant:"body1",children:[ee.label," "]})}),(0,n.jsx)(u.A,{children:Vt[ee.id]??"-"})]},ee.id))})})]},Kt.name))})}},92822:(H,b,t)=>{"use strict";t.d(b,{I5:()=>p,Kf:()=>P,N9:()=>g,V3:()=>u,gM:()=>x,gZ:()=>y,mT:()=>T,qA:()=>m,q_:()=>h,tN:()=>E,z:()=>v});var n=t(6820),a=t(51372),d=t(67871);class x{value;label;constructor(S,B){this.value=S,this.label=B}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class m{value;constructor(S){this.value=S}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class h{values;constructor(S){this.values=S}filterEntity(S){return this.values.every(B=>(S.metadata.tags??[]).includes(B))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class u{value;constructor(S){this.value=S}filterEntity(S){const B=this.toUpperArray(this.value.split(/\s/)),F=this.toUpperArray([S.metadata.tags]),L=this.toUpperArray([S.metadata.name,S.metadata.title,S.spec?.profile?.displayName]);for(const Q of B)if(F.every(G=>G!==Q)&&L.every(G=>!G.includes(Q)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(S){return S.flat().filter(B=>!!B).map(B=>B.toLocaleUpperCase("en-US"))}}class g{values;constructor(S){this.values=S.reduce((B,F)=>{try{return B.push((0,n.U2)((0,n.KU)(F,{defaultKind:"Group"}))),B}catch{return B}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(S){return this.values.some(B=>(0,d.t)(S,a.vv).some(F=>(0,n.U2)(F)===B))}toQueryValue(){return this.values}}class p{values;constructor(S){this.values=S}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(S){return this.values.some(B=>S.spec?.lifecycle===B)}toQueryValue(){return this.values}}class v{values;constructor(S){this.values=S}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(S){return this.values.some(B=>S.metadata.namespace===B)}toQueryValue(){return this.values}}class E{value;refs;constructor(S,B){this.value=S,this.refs=B}static owned(S){return new E("owned",S)}static all(){return new E("all")}static starred(S){return new E("starred",S)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(S=>(0,n.KU)(S).name)??[]}:{}}filterEntity(S){if(this.value==="starred")return this.refs?.includes((0,n.U2)(S))??!0;if(this.value==="owned"){const B=(0,d.t)(S,a.vv);return this.refs?.some(F=>B.some(L=>(0,n.U2)(L)===F))??!1}return!0}toQueryValue(){return this.value}}class y{value;isOwnedEntity;isStarredEntity;constructor(S,B,F){this.value=S,this.isOwnedEntity=B,this.isStarredEntity=F}filterEntity(S){switch(this.value){case"owned":return this.isOwnedEntity(S);case"starred":return this.isStarredEntity(S);default:return!0}}toQueryValue(){return this.value}}class P{value;constructor(S){this.value=S}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(S){const B=S.metadata.annotations?.["backstage.io/orphan"];return B!==void 0&&this.value.toString()===B}}class T{value;constructor(S){this.value=S}filterEntity(S){const B=S?.status?.items?.length>0;return B!==void 0&&this.value===B}}},21405:(H,b,t)=>{"use strict";t.d(b,{B9:()=>M,nK:()=>S});var n=t(31085),a=t(45250),d=t.n(a),x=t(45810),m=t.n(x),h=t(14041),u=t(18690),g=t(87290),p=t(22771),v=t(71581),E=t(7341),y=t(26796),P=t(72427);const T=(0,h.createContext)(void 0),M=B=>{const F=(0,v.A)(),L=(0,P.gf)(E.v),[Q,G]=(0,h.useState)({}),k=(0,u.zy)(),_=B.pagination===!0?"cursor":typeof B.pagination=="object"?B.pagination.mode??"cursor":"none",N=typeof B.pagination=="object"?B.pagination.limit??20:20,{queryParameters:rt,cursor:Z,offset:Y,limit:X}=(0,h.useMemo)(()=>{const tt=m().parse(k.search,{ignoreQueryPrefix:!0});let Ct=N;if(typeof tt.limit=="string"){const U=Number.parseInt(tt.limit,10);isNaN(U)||(Ct=U)}const et=typeof tt.offset=="string"&&_==="offset"?Number.parseInt(tt.offset,10):void 0;return{queryParameters:tt.filters??{},cursor:typeof tt.cursor=="string"&&_==="cursor"?tt.cursor:void 0,offset:_==="offset"&&et&&!isNaN(et)?et:void 0,limit:Ct}},[_,k.search,N]),[ct,dt]=(0,h.useState)(Z),[Et,It]=(0,h.useState)(Y),[Pt,lt]=(0,h.useState)(X),[it,mt]=(0,h.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:{},offset:Et,limit:Pt})),[{loading:ut,error:Ot},St]=(0,g.A)(async()=>{const tt=(0,a.compact)(Object.values(Q)),Ct=Object.keys(Q).reduce((et,U)=>{const V=Q[U];return V?.toQueryValue&&(et[U]=V.toQueryValue()),et},{});if(_!=="none")if(ct){if(ct!==it.appliedCursor){const et=(0,y.be)(tt),U=await L.queryEntities({cursor:ct,limit:Pt});mt({appliedFilters:Q,appliedCursor:ct,backendEntities:U.items,entities:U.items.filter(et),pageInfo:U.pageInfo,totalItems:U.totalItems})}}else{const et=(0,y.be)(tt),U=(0,y.$3)(tt),V=(0,y.$3)((0,a.compact)(Object.values(it.appliedFilters)));if(_==="offset"&&(it.limit!==Pt||it.offset!==Et)||!(0,a.isEqual)(V,U)){const vt=await L.queryEntities({...U,limit:Pt,offset:Et,orderFields:[{field:"metadata.name",order:"asc"}]});mt({appliedFilters:Q,backendEntities:vt.items,entities:vt.items.filter(et),pageInfo:vt.pageInfo,totalItems:vt.totalItems,limit:Pt,offset:Et})}}else{const et=(0,y.be)(tt),U=(0,y.Rr)(tt),V=(0,y.Rr)((0,a.compact)(Object.values(it.appliedFilters)));if((0,a.isEqual)(V,U)){const vt=it.backendEntities.filter(et);mt({appliedFilters:Q,backendEntities:it.backendEntities,entities:vt,totalItems:vt.length})}else{const vt=await L.getEntities({filter:U}),Dt=vt.items.filter(et);mt({appliedFilters:Q,backendEntities:vt.items,entities:Dt,totalItems:Dt.length})}}if(F()){const et=m().parse(k.search,{ignoreQueryPrefix:!0}),U=m().stringify({...et,filters:Ct,cursor:ct,offset:Et,limit:Pt},{addQueryPrefix:!0,arrayFormat:"repeat"}),V=`${window.location.pathname}${U}`;window.history?.replaceState(null,document.title,V)}},[L,rt,Q,it,ct,_,Pt,Et],{loading:!0});(0,p.A)(St,10,[Q,ct,Pt,Et]);const ft=(0,h.useCallback)(tt=>{dt(void 0),G(Ct=>{const et=typeof tt=="function"?tt(Ct):tt;return{...Ct,...et}})},[]),At=(0,h.useMemo)(()=>{if(_!=="cursor")return;const tt=it.pageInfo?.prevCursor,Ct=it.pageInfo?.nextCursor;return{prev:tt?()=>dt(tt):void 0,next:Ct?()=>dt(Ct):void 0}},[_,it.pageInfo]),pt=(0,h.useMemo)(()=>({filters:it.appliedFilters,entities:it.entities,backendEntities:it.backendEntities,updateFilters:ft,queryParameters:rt,loading:ut,error:Ot,pageInfo:At,totalItems:it.totalItems,limit:Pt,offset:Et,setLimit:lt,setOffset:It,paginationMode:_}),[it,ft,rt,ut,Ot,At,Pt,Et,_,lt,It]);return(0,n.jsx)(T.Provider,{value:pt,children:B.children})};function S(){const B=(0,h.useContext)(T);if(!B)throw new Error("useEntityList must be used within EntityListProvider");return B}},56889:(H,b,t)=>{"use strict";t.d(b,{I:()=>u});var n=t(6820),a=t(72427),d=t(14041),x=t(1394),m=t(18);function h(g){return typeof g=="string"?g:(0,n.U2)(g)}function u(){const g=(0,a.gf)(m.a),p=(0,x.A)((0,d.useMemo)(()=>g.starredEntitie$(),[g]),new Set),v=(0,d.useCallback)(y=>p.has(h(y)),[p]),E=(0,d.useCallback)(y=>g.toggleStarred(h(y)).then(),[g]);return{starredEntities:p,toggleStarredEntity:E,isStarredEntity:v}}},29207:(H,b,t)=>{"use strict";t.d(b,{s:()=>d});var n=t(34569),a=t(63544);const d=(0,a.Q)("catalog:entity-route-ref",()=>(0,n.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function x(m){return{kind:m.kind.toLocaleLowerCase("en-US"),namespace:m.metadata.namespace?.toLocaleLowerCase("en-US")??DEFAULT_NAMESPACE,name:m.metadata.name}}},64630:(H,b,t)=>{"use strict";t.d(b,{j:()=>a});var n=t(93184);const a=(0,n.h)({id:"catalog-react",messages:{catalogFilter:{title:"Filters",buttonTitle:"Filters"},entityKindPicker:{title:"Kind",errorMessage:"Failed to load entity kinds"},entityLifecyclePicker:{title:"Lifecycle"},entityNamespacePicker:{title:"Namespace"},entityOwnerPicker:{title:"Owner"},entityProcessingStatusPicker:{title:"Processing Status"},entityTagPicker:{title:"Tags"},entityPeekAheadPopover:{title:"Drill into the entity to see all of the tags.",emailCardAction:{title:"Email {{email}}",subTitle:"mailto {{email}}"},entityCardActionsTitle:"Show details"},entitySearchBar:{placeholder:"Search"},entityTypePicker:{title:"Type",errorMessage:"Failed to load entity types",optionAllTitle:"all"},favoriteEntity:{addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites"},inspectEntityDialog:{title:"Entity Inspector",closeButtonTitle:"Close",ancestryPage:{title:"Ancestry"},colocatedPage:{title:"Colocated",description:"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).",alertNoLocation:"Entity had no location information.",alertNoEntity:"There were no other entities on this location."},jsonPage:{title:"Entity as JSON",description:"This is the raw entity data as received from the catalog, on JSON form."},overviewPage:{title:"Overview"},yamlPage:{title:"Entity as YAML",description:"This is the raw entity data as received from the catalog, on YAML form."}},unregisterEntityDialog:{title:"Are you sure you want to unregister this entity?",cancelButtonTitle:"Cancel",deleteButtonTitle:"Delete Entity",deleteEntitySuccessMessage:"Removed entity {{entityName}}",bootstrapState:{title:'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.',advancedDescription:"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.",advancedOptions:"Advanced Options"},onlyDeleteStateTitle:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.",unregisterState:{title:"This action will unregister the following entities:",subTitle:"Located at the following location:",description:"To undo, just re-register the entity in {{appTitle}}.",unregisterButtonTitle:"Unregister Location",advancedOptions:"Advanced Options",advancedDescription:"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."},errorStateTitle:"Internal error: Unknown state"},userListPicker:{defaultOrgName:"Company",personalFilter:{title:"Personal",ownedLabel:"Owned",starredLabel:"Starred"},orgFilterAllLabel:"All"}}})},26796:(H,b,t)=>{"use strict";t.d(b,{$3:()=>d,Rr:()=>x,be:()=>m});var n=t(92822);function a(h){return!!h.getFullTextFilters}function d(h){const u=h.reduce((p,v)=>({...p,...v.getCatalogFilters?v.getCatalogFilters():{}}),{}),g=h.find(a)?.getFullTextFilters();return{filter:u,fullTextFilter:g}}function x(h){const u={};return h.forEach(g=>{g instanceof n.q_||g instanceof n.N9||g instanceof n.I5||g instanceof n.z||g instanceof n.tN||g instanceof n.Kf||g instanceof n.V3||g instanceof n.gZ||Object.assign(u,g.getCatalogFilters?.()||{})}),u}function m(h){return u=>h.every(g=>!g.filterEntity||g.filterEntity(u))}},67871:(H,b,t)=>{"use strict";t.d(b,{t:()=>a});var n=t(6820);function a(d,x,m){let h=d?.relations?.filter(u=>u.type===x).map(u=>(0,n.KU)(u.targetRef))||[];return m?.kind&&(h=h.filter(u=>u.kind.toLocaleLowerCase("en-US")===m.kind.toLocaleLowerCase("en-US"))),h}},95203:(H,b,t)=>{"use strict";t.d(b,{qP:()=>h,Zg:()=>g,rQ:()=>v,pS:()=>p,UJ:()=>u});var n=t(59598);class a{id;params;optional;defaultTarget;[x=n.b];constructor(y,P,T,M){this.id=y,this.params=P,this.optional=T,this.defaultTarget=M,this[x]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function d(E){return new a(E.id,E.params??[],!!E.optional,E?.defaultTarget)}var x,m=t(34569);const h=d({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),u=d({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),g=d({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),p=d({id:"catalog:unregister-redirect",optional:!0}),v=(0,m.H)({id:"catalog"})},54241:(H,b,t)=>{"use strict";t.d(b,{b:()=>n});var n=function(a){return a.DENY="DENY",a.ALLOW="ALLOW",a.CONDITIONAL="CONDITIONAL",a}({})},96824:(H,b,t)=>{"use strict";t.d(b,{x:()=>a});var n=t(55309);const a=(0,n.y)({id:"plugin.permission.api"})},70734:(H,b,t)=>{"use strict";t.d(b,{e:()=>m});var n=t(31085),a=t(14041),d=t(58837);const x=(0,d.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),m=h=>{const{text:u,preTag:g,postTag:p}=h,v=x(),E=(0,a.useMemo)(()=>u.split(new RegExp(`(${g}.+?${p})`)),[p,g,u]);return(0,n.jsx)(n.Fragment,{children:E.map((y,P)=>y.includes(g)?(0,n.jsx)("mark",{className:v.highlight,children:y.replace(new RegExp(`${g}|${p}`,"g"),"")},P):y)})}},54560:(H,b,t)=>{"use strict";t.d(b,{ec:()=>p});var n=t(31085),a=t(14041),d=t(93368),x=t(88758),m=t(8109);const h="search.results.list.items.extensions.v1",u=(y,P)=>{for(const T of y)if(!(!isValidElement(T)||!getComponentData(T,h)?.(P)))return cloneElement(T,{rank:P.rank,highlight:P.highlight,result:P.document,...T.props});return null},g=y=>{const{rank:P,result:T,noTrack:M,children:S,alignItems:B="flex-start",...F}=y,L=(0,d.s)(),Q=(0,a.useCallback)(()=>{M||T&&L.captureEvent("discover",T.title,{attributes:{to:T.location},value:P})},[P,T,M,L]);return(0,n.jsx)(m.A,{divider:!0,alignItems:B,onClickCapture:Q,...F,children:S})},p=y=>{const{name:P,component:T,predicate:M=()=>!0}=y;return(0,x.zZ)({name:P,component:{lazy:()=>T().then(S=>B=>(0,n.jsx)(g,{rank:B.rank,result:B.result,noTrack:B.noTrack,children:(0,a.createElement)(S,B)}))},data:{[h]:M}})},v=y=>{const P=useElementFilter(y,T=>T.selectByComponentData({key:h}).getElements(),[y]);return useCallback((T,M)=>{const S=u(P,T);return _jsx(Fragment,{children:S??_jsx(g,{rank:T.rank,result:T.document,children:_jsx(DefaultResultListItem,{rank:T.rank,highlight:T.highlight,result:T.document})})},M)},[P])},E=y=>{const{results:P,children:T,...M}=y,S=v(T);return _jsx(List,{...M,children:P.map(S)})}},86202:(H,b,t)=>{"use strict";t.d(b,{A:()=>n,G:()=>a});const n="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity"},72020:(H,b,t)=>{"use strict";t.d(b,{AF:()=>g,Hr:()=>E,Wm:()=>u,YR:()=>M,po:()=>p});var n=t(31085),a=t(14041),d=t(18690),x=t(19402),m=t(88758),h=t(82442);const u="techdocs.addons.addon.v1",g="techdocs.addons.wrapper.v1",p=()=>null;(0,x.h)(p,g,!0);const v=S=>`${u}.${S.toLocaleLowerCase("en-US")}`;function E(S){const{name:B,component:F}=S;return(0,m.zZ)({name:B,component:{sync:L=>(0,n.jsx)(F,{...L})},data:{[u]:S,[v(B)]:!0}})}const y=(S,B)=>S.selectByComponentData({key:B}).getElements()[0],P=S=>S.selectByComponentData({key:g}).selectByComponentData({key:u}),T=S=>S.selectByComponentData({key:g}).findComponentData({key:u}),M=()=>{const S=(0,d.P1)(),B=(0,h.O)(S,P),F=(0,h.O)(S,T),L=(0,a.useCallback)(k=>{if(!B||!k)return null;const W=v(k.name);return y(B,W)??null},[B]),Q=(0,a.useCallback)(k=>{const W=F.find(_=>_.name===k);return W?L(W):null},[F,L]),G=(0,a.useCallback)(k=>{const W=F.filter(_=>_.location===k);return W.length?W.map(L):null},[F,L]);return{renderComponentByName:Q,renderComponentsByLocation:G}}},26679:(H,b,t)=>{"use strict";t.d(b,{l:()=>a,s:()=>d});var n=t(55309);const a=(0,n.y)({id:"plugin.techdocs.service"}),d=(0,n.y)({id:"plugin.techdocs.storageservice"})},86892:(H,b,t)=>{"use strict";t.d(b,{R:()=>S,V:()=>B});var n=t(31085),a=t(14041),d=t(73466),x=t(28966),m=t(6820),h=t(43836),u=t(10602),g=t(72427),p=t(65461),v=t(25862),E=t(26679);function y(F,L){return L.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(F.kind=F.kind.toLocaleLowerCase(),F.name=F.name.toLocaleLowerCase(),F.namespace=F.namespace.toLocaleLowerCase()),F}const P=(F,L)=>(0,m.U2)(F)===(0,m.U2)(L),T={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},M=(0,h.tK)("techdocs-reader-page-context"),S=(0,a.memo)(F=>{const{entityRef:L,children:Q}=F,G=(0,g.gf)(E.l),k=(0,g.gf)(p.U),W=(0,d.A)(async()=>G.getEntityMetadata(L),[L]),_=(0,x.A)(async()=>G.getTechDocsMetadata(L),[L]),[N,rt]=(0,a.useState)(T.title),[Z,Y]=(0,a.useState)(T.subtitle),[X,ct]=(0,a.useState)(T.shadowRoot);(0,a.useEffect)(()=>{X&&!_.value&&!_.loading&&_.retry()},[_.value,_.loading,X,_.retry,_]);const dt={metadata:_,entityRef:y(L,k),entityMetadata:W,shadowRoot:X,setShadowRoot:ct,title:N,setTitle:rt,subtitle:Z,setSubtitle:Y},Et=(0,u.B)({1:dt});return(0,n.jsx)(v.Ig,{attributes:{entityRef:(0,m.U2)(L)},children:(0,n.jsx)(M.Provider,{value:Et,children:Q instanceof Function?Q(dt):Q})})},(F,L)=>P(F.entityRef,L.entityRef)),B=()=>{const F=(0,a.useContext)(M);if(F===void 0)return T;const L=F.atVersion(1);if(L===void 0)throw new Error("No context found for version 1.");return L}},99730:(H,b,t)=>{"use strict";t.d(b,{e:()=>n});const n=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(H,b,t)=>{"use strict";t.d(b,{V:()=>n});function n(a,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},8915:(H,b,t)=>{"use strict";t.d(b,{K:()=>Pt});var n=t(31085),a=t(14041),d=t(26280),x=t(59428),m=t(27586),h=t(21405),u=t(54203),g=t(67626),p=t(72987),v=t(91035),E=t(81859),y=t(86519),P=t(86202);class T{getCatalogFilters(){return{[`metadata.annotations.${P.A}`]:y.c}}}const M=()=>{const{updateFilters:lt}=(0,h.nK)();return(0,a.useEffect)(()=>{lt({techdocs:new T})},[lt]),null};var S=t(36338),B=t(45250),F=t(88640),L=t(77310),Q=t(9222),G=t(72427),k=t(65461),W=t(56889),_=t(27125),N=t(14209),rt=t(92822);function Z(lt){const{actions:it,columns:mt,data:ut,isLoading:Ot,options:St}=lt,{updateFilters:ft,setLimit:At,setOffset:pt,limit:tt,totalItems:Ct,offset:et}=(0,h.nK)(),[U,V]=a.useState(et&&tt?Math.floor(et/tt):0);return(0,a.useEffect)(()=>{Ct&&U*tt>=Ct?pt(Math.max(0,Ct-tt)):pt(Math.max(0,U*tt))},[pt,U,tt,Ct]),(0,n.jsx)(N.X,{columns:mt,data:ut,options:{paginationPosition:"both",pageSizeOptions:[5,10,20,50,100],pageSize:tt,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,...St},actions:it,onSearchChange:vt=>ft({text:vt?new rt.V3(vt):void 0}),page:U,onPageChange:vt=>{V(vt)},onRowsPerPageChange:vt=>{At(vt)},totalCount:Ct,localization:{pagination:{labelDisplayedRows:""}},isLoading:Ot})}function Y(lt){const{actions:it,columns:mt,data:ut,next:Ot,prev:St,title:ft,isLoading:At,options:pt,...tt}=lt;return(0,n.jsx)(N.X,{title:At?"":ft,columns:mt,data:ut,options:{paginationPosition:"both",...pt,pageSizeOptions:[],showFirstLastPageButtons:!1,pageSize:Number.MAX_SAFE_INTEGER,emptyRowsWhenPaging:!1,actionsColumnIndex:-1},onPageChange:Ct=>{Ct>0?Ot?.():St?.()},page:St?1:0,totalCount:Ot?Number.MAX_VALUE:Number.MAX_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}},isLoading:At,...tt})}var X=t(84295),ct=t(42717),dt=t(82779),Et=t(23747);const It=lt=>{const{columns:it,actions:mt,options:ut}=lt,{loading:Ot,error:St,entities:ft,filters:At,paginationMode:pt,pageInfo:tt}=(0,h.nK)(),{isStarredEntity:Ct,toggleStarredEntity:et}=(0,W.I)(),[,U]=(0,S.A)(),V=(0,Q.S)(dt.Oc),vt=(0,G.gf)(k.U),Dt=(0,B.capitalize)(At.user?.value??"all"),xt=[X.f.createCopyDocsUrlAction(U),X.f.createStarEntityAction(Ct,et)],Lt=(0,Et.H)(ft,V,vt);return pt==="cursor"?(0,n.jsx)(Y,{columns:it||ct.F,isLoading:Ot,title:Dt,actions:mt||xt,options:ut,data:Lt,next:tt?.next,prev:tt?.prev}):pt==="offset"?(0,n.jsx)(Z,{columns:it||ct.F,isLoading:Ot,title:Dt,actions:mt||xt,options:ut,data:Lt}):St?(0,n.jsx)(F.B,{severity:"error",title:"Could not load available documentation.",children:(0,n.jsx)(L.z,{language:"text",text:St.toString()})}):(0,n.jsx)(_.o,{title:Dt,entities:ft,loading:Ot,actions:mt||xt,columns:it,options:ut})};It.columns=ct.B,It.actions=X.f;const Pt=lt=>{const{initialFilter:it="owned",columns:mt,actions:ut,ownerPickerMode:Ot,pagination:St}=lt;return(0,n.jsx)(E.S,{children:(0,n.jsxs)(d.U,{children:[(0,n.jsx)(x.d,{title:"",children:(0,n.jsx)(m.Y,{children:"Discover documentation in your ecosystem."})}),(0,n.jsx)(h.B9,{pagination:St,children:(0,n.jsxs)(u.GI,{children:[(0,n.jsxs)(u.GI.Filters,{children:[(0,n.jsx)(M,{}),(0,n.jsx)(g.y,{initialFilter:it}),(0,n.jsx)(p.t,{mode:Ot}),(0,n.jsx)(v.m,{})]}),(0,n.jsx)(u.GI.Content,{children:(0,n.jsx)(It,{actions:ut,columns:mt})})]})})]})})}},27125:(H,b,t)=>{"use strict";t.d(b,{o:()=>T});var n=t(31085),a=t(14041),d=t(36338),x=t(9222),m=t(72427),h=t(65461),u=t(82779),g=t(14209),p=t(44186),v=t(73896),E=t(84295),y=t(42717),P=t(23747);const T=M=>{const{entities:S,title:B,loading:F,columns:L,actions:Q,options:G}=M,[,k]=(0,d.A)(),W=(0,x.S)(u.Oc),_=(0,m.gf)(h.U);if(!S)return null;const N=(0,P.H)(S,W,_),rt=[E.f.createCopyDocsUrlAction(k)],Z=20,Y=N&&N.length>Z;return(0,n.jsx)(n.Fragment,{children:F||N&&N.length>0?(0,n.jsx)(g.X,{isLoading:F,options:{paging:Y,pageSize:Z,search:!0,actionsColumnIndex:-1,...G},data:N,columns:L||y.F,actions:Q||rt,title:B?`${B} (${N.length})`:`All (${N.length})`}):(0,n.jsx)(p.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,n.jsx)(v.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};T.columns=y.B,T.actions=E.f},84295:(H,b,t)=>{"use strict";t.d(b,{f:()=>m});var n=t(31085),a=t(14041),d=t(55290),x=t(18956);const m={createCopyDocsUrlAction(h){return u=>({icon:()=>(0,n.jsx)(d.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>h(`${window.location.origin}${u.resolved.docsUrl}`)})},createStarEntityAction(h,u){return g=>{const p=g.entity,v=h(p);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,n.jsx)(x.m,{isFavorite:v}),tooltip:v?"Remove from favorites":"Add to favorites",onClick:()=>u(p)}}}}},42717:(H,b,t)=>{"use strict";t.d(b,{B:()=>v,F:()=>E});var n=t(31085),a=t(14041),d=t(10394),x=t(58837);const m=(0,x.A)(y=>({value:{marginBottom:y.spacing(.75)},subvalue:{color:y.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function h(y){const{value:P,subvalue:T}=y,M=m();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{className:M.value,children:P}),(0,n.jsx)(d.A,{className:M.subvalue,children:T})]})}var u=t(72072),g=t(34428);function p(y){return y.metadata.title||y.metadata.name}const v={createTitleColumn(y){return{...v.createNameColumn(),field:"entity.metadata.title",hidden:y?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(y,P)=>{const T=p(y.entity).toLocaleLowerCase(),M=p(P.entity).toLocaleLowerCase();return T.localeCompare(M)},render:y=>(0,n.jsx)(h,{value:(0,n.jsx)(u.N_,{to:y.resolved.docsUrl,children:p(y.entity)}),subvalue:y.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:y})=>(0,n.jsx)(g.i,{entityRefs:y.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}},E=[v.createTitleColumn({hidden:!0}),v.createNameColumn(),v.createOwnerColumn(),v.createKindColumn(),v.createTypeColumn()]},23747:(H,b,t)=>{"use strict";t.d(b,{H:()=>m});var n=t(51372),a=t(67871),d=t(90184),x=t(95768);function m(h,u,g){return h.map(p=>{const v=(0,a.t)(p,n.vv);return{entity:p,resolved:{docsUrl:u({namespace:(0,x.V)(p.metadata.namespace??"default",g),kind:(0,x.V)(p.kind,g),name:(0,x.V)(p.metadata.name,g)}),ownedByRelations:v,ownedByRelationsTitle:v.map(E=>(0,d.S)(E,{defaultKind:"group"})).join(", ")}}})}},81859:(H,b,t)=>{"use strict";t.d(b,{S:()=>h});var n=t(31085),a=t(14041),d=t(27155),x=t(72427),m=t(65461);const h=u=>{const{children:g}=u,v=`Documentation available in ${(0,x.gf)(m.U).getOptionalString("organization.name")??"Backstage"}`;return(0,n.jsx)(d.d,{title:"Documentation",subtitle:v,themeId:"documentation",children:g})}},39278:(H,b,t)=>{"use strict";t.d(b,{$j:()=>L,Wj:()=>Q,Ju:()=>M});var n=t(26679),a=t(70835),d=t(97142),x=t(92110);class m{configApi;discoveryApi;fetchApi;constructor(W){this.configApi=W.configApi,this.discoveryApi=W.discoveryApi,this.fetchApi=W.fetchApi}async getCookie(){const _=`${await this.getApiOrigin()}/cookie`,N=await this.fetchApi.fetch(`${_}`,{credentials:"include"});if(!N.ok)throw await a.o.fromResponse(N);return await N.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(W){const{kind:_,namespace:N,name:rt}=W,Y=`${await this.getApiOrigin()}/metadata/techdocs/${N}/${_}/${rt}`,X=await this.fetchApi.fetch(`${Y}`);if(!X.ok)throw await a.o.fromResponse(X);return await X.json()}async getEntityMetadata(W){const{kind:_,namespace:N,name:rt}=W,Y=`${await this.getApiOrigin()}/metadata/entity/${N}/${_}/${rt}`,X=await this.fetchApi.fetch(`${Y}`);if(!X.ok)throw await a.o.fromResponse(X);return await X.json()}}class h{configApi;discoveryApi;fetchApi;constructor(W){this.configApi=W.configApi,this.discoveryApi=W.discoveryApi,this.fetchApi=W.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(W,_){const{kind:N,namespace:rt,name:Z}=W,X=`${await this.getStorageUrl()}/${rt}/${N}/${Z}/${_}`,ct=await this.fetchApi.fetch(`${X.endsWith("/")?X:`${X}/`}index.html`);let dt="";switch(ct.status){case 404:throw dt="Page not found. ",_||(dt+="This could be because there is no index.md file in the root of the docs directory of this repository."),new d.m_(dt);case 500:throw dt="Could not generate documentation or an error in the TechDocs backend. ",new Error(dt);default:break}return ct.text()}async syncEntityDocs(W,_=()=>{}){const{kind:N,namespace:rt,name:Z}=W,X=`${await this.getApiOrigin()}/sync/${rt}/${N}/${Z}`;return new Promise((ct,dt)=>{const Et=new AbortController;(0,x.y)(X,{fetch:this.fetchApi.fetch,signal:Et.signal,onmessage(It){if(It.event==="log")It.data&&_(JSON.parse(It.data));else if(It.event==="finish"){let Pt=!1;It.data&&({updated:Pt}=JSON.parse(It.data)),ct(Pt?"updated":"cached")}else It.event==="error"&&dt(new Error(It.data))},onerror(It){Et.abort(),dt(It)}})})}async getBaseUrl(W,_,N){const{kind:rt,namespace:Z,name:Y}=_,ct=`${await this.getApiOrigin()}/static/docs/${Z}/${rt}/${Y}/${N}`;return new URL(W,ct.endsWith("/")?ct:`${ct}/`).toString()}}var u=t(82779),g=t(9803),p=t(12935),v=t(65461),E=t(57405),y=t(70795),P=t(88758),T=t(54560);const M=(0,g.i)({id:"techdocs",apis:[(0,p.b)({api:n.s,deps:{configApi:v.U,discoveryApi:E.I,fetchApi:y.a},factory:({configApi:k,discoveryApi:W,fetchApi:_})=>new h({configApi:k,discoveryApi:W,fetchApi:_})}),(0,p.b)({api:n.l,deps:{configApi:v.U,discoveryApi:E.I,fetchApi:y.a},factory:({configApi:k,discoveryApi:W,fetchApi:_})=>new m({configApi:k,discoveryApi:W,fetchApi:_})})],routes:{root:u.rQ,docRoot:u.Oc,entityContent:u.Ri}}),S=M.provide((0,P.QJ)({name:"TechdocsPage",component:()=>t.e(8803).then(t.bind(t,38803)).then(k=>k.Router),mountPoint:u.rQ})),B=M.provide((0,P.QJ)({name:"EntityTechdocsContent",component:()=>t.e(8803).then(t.bind(t,38803)).then(k=>k.LegacyEmbeddedDocsRouter),mountPoint:u.Ri})),F=M.provide((0,P.QJ)({name:"TechDocsCustomHome",component:()=>t.e(4487).then(t.bind(t,94487)).then(k=>k.TechDocsCustomHome),mountPoint:u.rQ})),L=M.provide((0,P.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(k=>k.TechDocsIndexPage),mountPoint:u.rQ})),Q=M.provide((0,P.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(k=>k.TechDocsReaderPage),mountPoint:u.Oc})),G=M.provide((0,T.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(k=>k.TechDocsSearchResultListItem),predicate:k=>k.type==="techdocs"}))},67289:(H,b,t)=>{"use strict";t.d(b,{p:()=>Hn});var n=t(31085),a=t(14041),d=t(42899),x=t(58837),m=t(86892),h=t(9394),u=t(91360),g=t(22856);const p="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",v=f=>{(0,a.useEffect)(()=>{if(!f)return()=>{};const I=f.querySelectorAll('head > link[rel="stylesheet"]');let j=I?.length??0;const $=new CustomEvent(p);if(!j)return f.dispatchEvent($),()=>{};const K=()=>{--j===0&&f.dispatchEvent($)};return I?.forEach(J=>{J.addEventListener("load",K)}),()=>{I?.forEach(J=>{J.removeEventListener("load",K)})}},[f])},E=f=>{const[I,j]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!f)return()=>{};j(!0);const $=f.style;$.setProperty("opacity","0");const K=()=>{j(!1),$.setProperty("opacity","1")};return f.addEventListener(p,K),()=>{f.removeEventListener(p,K)}},[f]),I},y=f=>{const{element:I,onAppend:j,children:$}=f,[K,J]=(0,a.useState)((0,h.vt)({...(0,g.A)(),insertionPoint:void 0}));v(I);const ot=(0,a.useCallback)(bt=>{if(!I||!bt)return;J((0,h.vt)({...(0,g.A)(),insertionPoint:I.querySelector("head")||void 0}));let wt=bt.shadowRoot;wt||(wt=bt.attachShadow({mode:"open"})),wt.replaceChildren(I),typeof j=="function"&&j(wt)},[I,j]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(u.Ay,{jss:K,sheetsManager:new Map,children:[(0,n.jsx)("div",{ref:ot,"data-testid":"techdocs-native-shadowroot"}),$]})})};var P=t(12784);const T=()=>{const{shadowRoot:f}=(0,m.V)();return f},M=f=>{const I=T(),[j,$]=(0,a.useState)(I?.firstChild);return(0,a.useEffect)(()=>{let K;return I&&(K=new MutationObserver(()=>{$(I?.firstChild)}),K.observe(I,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>K?.disconnect()},[I]),!j||!(j instanceof HTMLElement)?[]:f.map(K=>j.querySelectorAll(K)).filter(K=>K.length).map(K=>Array.from(K)).flat()},S=f=>f.toString()&&f.rangeCount&&f.getRangeAt(0).getBoundingClientRect().top,B=(f=0)=>{const I=T(),[j,$]=useState(null),K=useMemo(()=>debounce(()=>{const J=I,ot=J.getSelection?J.getSelection():document.getSelection();ot&&S(ot)?$(ot):$(null)},f),[I,$,f]);return useEffect(()=>(window.document.addEventListener("selectionchange",K),()=>{K.cancel(),window.document.removeEventListener("selectionchange",K)}),[K]),j};var F=t(12173),L=t(26280),Q=t(68146),G=t(45250),k=t(73466),W=t(5877),_=t(43836),N=t(10602),rt=t(72427),Z=t(93368),Y=t(25862),X=t(65461),ct=t(55309);const dt=(0,ct.y)({id:"plugin.search.queryservice"});class Et{mockedResults;constructor(I){this.mockedResults=I}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const It=(0,_.tK)("search-context"),Pt=()=>{const f=(0,a.useContext)(It);if(!f)throw new Error("useSearch must be used within a SearchContextProvider");const I=f.atVersion(1);if(!I)throw new Error("No SearchContext v1 found");return I},lt=()=>(0,a.useContext)(It)!==void 0,it={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},mt=(f=it)=>{const I=(0,rt.gf)(dt),j=(0,Z.s)(),[$,K]=(0,a.useState)(f.term),[J,ot]=(0,a.useState)(f.types),[bt,wt]=(0,a.useState)(f.filters),[$t,Bt]=(0,a.useState)(f.pageLimit),[jt,Xt]=(0,a.useState)(f.pageCursor),Yt=(0,W.A)($),le=(0,W.A)(bt),Qt=(0,k.A)(async()=>{const te=await I.query({term:$,types:J,filters:bt,pageLimit:$t,pageCursor:jt});return $&&j.captureEvent("search",$,{value:Qt.value?.numberOfResults??void 0}),te},[$,J,bt,$t,jt]),ie=!Qt.loading&&!Qt.error&&Qt.value?.nextPageCursor,ue=!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)(()=>{Yt!==void 0&&$!==Yt&&Xt(void 0)},[$,Yt,Xt]),(0,a.useEffect)(()=>{le!==void 0&&!(0,G.isEqual)(bt,le)&&Xt(void 0)},[bt,le,Xt]),{result:Qt,term:$,setTerm:K,types:J,setTypes:ot,filters:bt,setFilters:wt,pageLimit:$t,setPageLimit:Bt,pageCursor:jt,setPageCursor:Xt,fetchNextPage:ie?qt:void 0,fetchPreviousPage:ue?Zt:void 0}},ut=f=>{const{initialState:I,children:j}=f,$=mt(I);return(0,n.jsx)(Y.Ig,{attributes:{searchTypes:$.types.sort().join(",")},children:(0,n.jsx)(It.Provider,{value:(0,N.B)({1:$}),children:j})})},Ot=f=>{const{initialState:I,inheritParentContextIfAvailable:j,children:$}=f,K=lt(),J=(0,rt.gf)(X.U),ot=I??{},bt=J.has("search.query.pageLimit")?{pageLimit:J.getNumber("search.query.pageLimit")}:{},wt={...it,...ot,...bt};return K&&j?(0,n.jsx)(n.Fragment,{children:$}):(0,n.jsx)(ut,{initialState:wt,children:$})};var St=t(78467),ft=t(20577),At=t(82266),pt=t(29365),tt=t(34839),Ct=t(16249),et=t(64947),U=t(45917),V=t(22771);const vt=(0,a.forwardRef)((f,I)=>{const{onChange:j,onKeyDown:$=()=>{},onClear:K=()=>{},onSubmit:J=()=>{},debounceTime:ot=200,clearButton:bt=!0,fullWidth:wt=!0,value:$t,label:Bt,placeholder:jt,inputProps:Xt={},InputProps:Yt={},endAdornment:le,...Qt}=f,ie=(0,rt.gf)(X.U),[ue,qt]=(0,a.useState)(""),Zt=(0,a.useRef)("");(0,a.useEffect)(()=>{qt(Ee=>Ee===Zt.current?String($t):Ee)},[$t,Zt]),(0,V.A)(()=>{Zt.current=ue,j(ue)},ot,[ue]);const Jt=(0,a.useCallback)(Ee=>{qt(Ee.target.value)},[qt]),te=(0,a.useCallback)(Ee=>{$&&$(Ee),J&&Ee.key==="Enter"&&J()},[$,J]),se=(0,a.useCallback)(()=>{Zt.current="",j(""),qt(""),K&&K()},[j,K]),Se=Bt?void 0:"Search",Re=jt??`Search in ${ie.getOptionalString("app.title")||"Backstage"}`,tn=(0,At.n)().getSystemIcon("search")||U.A,cn=(0,n.jsx)(tt.A,{position:"start",children:(0,n.jsx)(pt.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,n.jsx)(tn,{})})}),He=(0,n.jsx)(tt.A,{position:"end",children:(0,n.jsx)(et.A,{"aria-label":"Clear",size:"small",onClick:se,onKeyDown:Ee=>{Ee.key==="Enter"&&Ee.stopPropagation()},children:"Clear"})});return(0,n.jsx)(Ot,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(Ct.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:I,value:ue,label:Bt,placeholder:Re,InputProps:{startAdornment:cn,endAdornment:bt?He:le,...Yt},inputProps:{"aria-label":Se,...Xt},fullWidth:wt,onChange:Jt,onKeyDown:te,...Qt})})}),Dt=(0,a.forwardRef)((f,I)=>{const{value:j="",onChange:$,...K}=f,{term:J,setTerm:ot}=Pt();(0,a.useEffect)(()=>{j&&ot(String(j))},[j,ot]);const bt=(0,a.useCallback)(wt=>{$?$(wt):ot(wt)},[$,ot]);return(0,n.jsx)(Ot,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(Y.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,n.jsx)(vt,{...K,ref:I,value:J,onChange:bt})})})}),xt=(0,x.A)(f=>({loading:{right:f.spacing(1),position:"absolute"}})),Lt=f=>I=>(0,n.jsx)(Ot,{inheritParentContextIfAvailable:!0,children:(0,n.jsx)(f,{...I})}),Wt=()=>{const f=xt();return(0,n.jsx)(St.A,{className:f.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},_t=Lt(function(I){const{loading:j,value:$,onChange:K=()=>{},options:J=[],getOptionLabel:ot=Zt=>String(Zt),inputPlaceholder:bt,inputDebounceTime:wt,freeSolo:$t=!0,fullWidth:Bt=!0,clearOnBlur:jt=!1,"data-testid":Xt="search-autocomplete",...Yt}=I,{setTerm:le}=Pt(),Qt=(0,a.useCallback)(Zt=>Zt?typeof Zt=="string"?Zt:ot(Zt):"",[ot]),ie=(0,a.useMemo)(()=>Qt($),[$,Qt]),ue=(0,a.useCallback)((Zt,Jt,te,se)=>{le(Qt(Jt)),K(Zt,Jt,te,se)},[Qt,le,K]),qt=(0,a.useCallback)(({InputProps:{ref:Zt,className:Jt,endAdornment:te},InputLabelProps:se,...Se})=>(0,n.jsx)(Dt,{...Se,ref:Zt,clearButton:!1,value:ie,placeholder:bt,debounceTime:wt,endAdornment:j?(0,n.jsx)(Wt,{}):te,InputProps:{className:Jt}}),[j,ie,bt,wt]);return(0,n.jsx)(ft.Ay,{...Yt,"data-testid":Xt,value:$,onChange:ue,options:J,getOptionLabel:ot,renderInput:qt,freeSolo:$t,fullWidth:Bt,clearOnBlur:jt})});var Ut=t(18690),Nt=t(27698);const ce=f=>f?.document,Vt=f=>{const{entityId:I,entityTitle:j,debounceTime:$=150,searchResultUrlMapper:K}=f,[J,ot]=(0,a.useState)(!1),bt=(0,Ut.Zp)(),{setFilters:wt,term:$t,result:{loading:Bt,value:jt}}=Pt(),[Xt,Yt]=(0,a.useState)([]);(0,a.useEffect)(()=>{let qt=!0;if(qt&&jt){const Zt=jt.results.slice(0,10);Yt(Zt)}return()=>{qt=!1}},[Bt,jt]);const{kind:le,name:Qt,namespace:ie}=I;(0,a.useEffect)(()=>{wt(qt=>({...qt,kind:le,namespace:ie,name:Qt}))},[le,ie,Qt,wt]);const ue=(qt,Zt)=>{if(ce(Zt)){const{location:Jt}=Zt.document;bt(K?K(Jt):Jt)}};return(0,n.jsx)(_t,{"data-testid":"techdocs-search-bar",size:"small",open:J&&!!$t,getOptionLabel:()=>"",filterOptions:qt=>qt,onClose:()=>{ot(!1)},onOpen:()=>{ot(!0)},onChange:ue,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Xt,renderOption:({document:qt,highlight:Zt})=>(0,n.jsx)(Nt.TechDocsSearchResultListItem,{result:qt,lineClamp:3,asListItem:!1,asLink:!1,title:qt.title,highlight:Zt}),loading:Bt,inputDebounceTime:$,inputPlaceholder:`Search ${j||I.name} docs`,freeSolo:!1})},Ft=f=>{const I={term:"",types:["techdocs"],pageCursor:"",filters:f.entityId};return(0,n.jsx)(Ot,{initialState:I,children:(0,n.jsx)(Vt,{...f})})};var Kt=t(74219);const ee=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(f=>({default:f.RealLogViewer})));function Fe(f){const{Progress:I}=(0,At.n)().getComponents();return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(I,{}),children:(0,n.jsx)(ee,{...f})})}var nn=t(73845),Ye=t(72501),Qe=t(12398),re=t(32881);const Ze=(0,x.A)(f=>(0,Qe.A)({paper:{width:"100%",[f.breakpoints.up("sm")]:{width:"75%"},[f.breakpoints.up("md")]:{width:"50%"},padding:f.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:f.palette.background.default}})),oe=({buildLog:f,onClose:I})=>{const j=Ze(),$=f.length===0?"Waiting for logs...":f.join(`
|
|
8
|
-
`);return(0,n.jsxs)(d.A,{container:!0,direction:"column",className:j.root,spacing:0,wrap:"nowrap",children:[(0,n.jsxs)(d.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,n.jsx)(Ye.A,{variant:"h5",children:"Build Details"}),(0,n.jsx)(pt.A,{title:"Close the drawer",onClick:I,color:"inherit",children:(0,n.jsx)(re.A,{})},"dismiss")]}),(0,n.jsx)(d.A,{item:!0,xs:!0,children:(0,n.jsx)(Fe,{text:$,classes:{root:j.logs}})})]})},Ie=({buildLog:f})=>{const I=Ze(),[j,$]=(0,a.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(et.A,{color:"inherit",onClick:()=>$(!0),children:"Show Build Logs"}),(0,n.jsx)(nn.Ay,{classes:{paper:I.paper},anchor:"right",open:j,onClose:()=>$(!1),children:(0,n.jsx)(oe,{buildLog:f,onClose:()=>$(!1)})})]})},Je=({errorMessage:f})=>{const I=(0,rt.gf)(X.U).getOptionalString("techdocs.builder"),j=(0,Z.s)(),{entityRef:$}=(0,m.V)(),K=(0,Ut.zy)();(0,a.useEffect)(()=>{const{pathname:ot,search:bt,hash:wt}=K;j.captureEvent("not-found",`${ot}${bt}${wt}`,{attributes:$})},[j,$,K]);let J="";return[void 0,"local"].includes(I)||(J="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),(0,n.jsx)(F.M,{status:"404",statusMessage:f||"Documentation not found",additionalInfo:J})};var he=t(28966),Xe=t(26679);function hn({contentLoading:f,content:I,activeSyncState:j}){return f||j==="BUILD_READY_RELOAD"||!I&&j==="CHECKING"?"CHECKING":!I&&j==="BUILDING"?"INITIAL_BUILD":I?j==="BUILDING"?"CONTENT_STALE_REFRESHING":j==="BUILD_READY"?"CONTENT_STALE_READY":j==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function sn(f,I){const j={...f};switch(I.type){case"sync":I.state==="CHECKING"&&(j.buildLog=[]),j.activeSyncState=I.state,j.syncError=I.syncError;break;case"contentLoading":j.contentLoading=!0,j.contentError=void 0;break;case"content":typeof I.path=="string"&&(j.path=I.path),j.contentLoading=!1,j.content=I.content,j.contentError=I.contentError;break;case"buildLog":j.buildLog=j.buildLog.concat(I.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(j.activeSyncState)&&["contentLoading","content"].includes(I.type)&&(j.activeSyncState="UP_TO_DATE",j.buildLog=[]),j}function rn(f,I,j,$){const[K,J]=(0,a.useReducer)(sn,{activeSyncState:"CHECKING",path:$,contentLoading:!0,buildLog:[]}),ot=(0,rt.gf)(Xe.s),{retry:bt}=(0,he.A)(async()=>{J({type:"contentLoading"});try{const Bt=await ot.getEntityDocs({kind:f,namespace:I,name:j},$);return J({type:"content",content:Bt,path:$}),Bt}catch(Bt){J({type:"content",contentError:Bt,path:$})}},[ot,f,I,j,$]),wt=(0,a.useRef)({content:void 0,reload:()=>{}});wt.current={content:K.content,reload:bt},(0,k.A)(async()=>{J({type:"sync",state:"CHECKING"});const Bt=setTimeout(()=>{J({type:"sync",state:"BUILDING"})},1e3);try{switch(await ot.syncEntityDocs({kind:f,namespace:I,name:j},Xt=>{J({type:"buildLog",log:Xt})})){case"updated":wt.current.content?J({type:"sync",state:"BUILD_READY"}):(wt.current.reload(),J({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":J({type:"sync",state:"UP_TO_DATE"});break;default:J({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(jt){J({type:"sync",state:"ERROR",syncError:jt})}finally{clearTimeout(Bt)}},[f,j,I,ot,J,wt]);const $t=(0,a.useMemo)(()=>hn({activeSyncState:K.activeSyncState,contentLoading:K.contentLoading,content:K.content}),[K.activeSyncState,K.content,K.contentLoading]);return(0,a.useMemo)(()=>({state:$t,contentReload:bt,path:K.path,content:K.content,contentErrorMessage:K.contentError?.toString(),syncErrorMessage:K.syncError?.toString(),buildLog:K.buildLog}),[$t,bt,K.path,K.content,K.contentError,K.syncError,K.buildLog])}const De=(0,a.createContext)({}),Le=()=>(0,a.useContext)(De),ke=f=>{const{children:I}=f,{"*":j=""}=(0,Ut.g)(),{entityRef:$}=(0,m.V)(),{kind:K,namespace:J,name:ot}=$,bt=rn(K,J,ot,j);return(0,n.jsx)(De.Provider,{value:bt,children:I instanceof Function?I(bt):I})},on=f=>I=>(0,n.jsx)(ke,{children:(0,n.jsx)(f,{...I})}),ye=(0,x.A)(f=>({root:{marginBottom:f.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),Ne=()=>{let f=null;const I=ye(),{state:j,contentReload:$,contentErrorMessage:K,syncErrorMessage:J,buildLog:ot}=Le();return j==="INITIAL_BUILD"&&(f=(0,n.jsx)(Kt.A,{classes:{root:I.root},variant:"outlined",severity:"info",icon:(0,n.jsx)(St.A,{size:"24px"}),action:(0,n.jsx)(Ie,{buildLog:ot}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),j==="CONTENT_STALE_REFRESHING"&&(f=(0,n.jsx)(Kt.A,{variant:"outlined",severity:"info",icon:(0,n.jsx)(St.A,{size:"24px"}),action:(0,n.jsx)(Ie,{buildLog:ot}),classes:{root:I.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),j==="CONTENT_STALE_READY"&&(f=(0,n.jsx)(Kt.A,{variant:"outlined",severity:"success",action:(0,n.jsx)(et.A,{color:"inherit",onClick:()=>$(),children:"Refresh"}),classes:{root:I.root},children:"A newer version of this documentation is now available, please refresh to view."})),j==="CONTENT_STALE_ERROR"&&(f=(0,n.jsxs)(Kt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(Ie,{buildLog:ot}),classes:{root:I.root,message:I.message},children:["Building a newer version of this documentation failed."," ",J]})),j==="CONTENT_NOT_FOUND"&&(f=(0,n.jsxs)(n.Fragment,{children:[J&&(0,n.jsxs)(Kt.A,{variant:"outlined",severity:"error",action:(0,n.jsx)(Ie,{buildLog:ot}),classes:{root:I.root,message:I.message},children:["Building a newer version of this documentation failed."," ",J]}),(0,n.jsx)(Je,{errorMessage:K})]})),f};var We=t(5893),Ke=t(54917),Me=t(96726),Be=t(71651),R=t.n(Be);const l=/main\.[A-Fa-f0-9]{8}\.min\.css$/,A=/^https:\/\/fonts\.googleapis\.com/,D=/^https:\/\/fonts\.gstatic\.com/,nt=f=>f.nodeName==="LINK",ht=f=>{const I=f?.getAttribute("href")||"",j=I.match(l),$=I.match(A),K=I.match(D);return j||$||K},st=f=>(nt(f)&&!ht(f)&&f.remove(),f),Tt=f=>f.nodeName==="IFRAME",Rt=(f,I)=>{const j=f.getAttribute("src")||"";try{const{host:$}=new URL(j);return I.includes($)}catch{return!1}},kt=f=>I=>(Tt(I)&&!Rt(I,f)&&I.remove(),I),ae=()=>{const f=(0,rt.gf)(X.U);return(0,a.useMemo)(()=>f.getOptionalConfig("techdocs.sanitizer"),[f])},Te=()=>{const f=ae();return(0,a.useCallback)(async I=>{const j=f?.getOptionalStringArray("allowedIframeHosts");R().addHook("beforeSanitizeElements",st);const $=["link","meta"];j&&($.push("iframe"),R().addHook("beforeSanitizeElements",kt(j))),R().addHook("uponSanitizeElement",(ot,bt)=>{bt.tagName==="meta"&&(ot.getAttribute("http-equiv")==="refresh"&&ot.getAttribute("content")?.includes("url=")||ot.parentNode?.removeChild(ot))}),R().addHook("uponSanitizeAttribute",(ot,bt)=>{ot.tagName!=="meta"&&(bt.attrName==="http-equiv"||bt.attrName==="content")&&ot.removeAttribute(bt.attrName)});const K=f?.getOptionalString("allowedCustomElementTagNameRegExp"),J=f?.getOptionalString("allowedCustomElementAttributeNameRegExp");return R().sanitize(I.outerHTML,{ADD_TAGS:$,FORBID_TAGS:["style"],ADD_ATTR:["http-equiv","content"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0,CUSTOM_ELEMENT_HANDLING:{tagNameCheck:K?new RegExp(K):void 0,attributeNameCheck:J?new RegExp(J):void 0}})},[f])};var ge=t(34435),zt=t(268);const pe=({theme:f})=>`
|
|
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: ${f.palette.text.primary};
|
|
18
|
-
--md-default-fg-color--light: ${f.palette.text.secondary};
|
|
19
|
-
--md-default-fg-color--lighter: ${(0,zt.a)(f.palette.text.secondary,.7)};
|
|
20
|
-
--md-default-fg-color--lightest: ${(0,zt.a)(f.palette.text.secondary,.3)};
|
|
21
|
-
|
|
22
|
-
/* BACKGROUND */
|
|
23
|
-
--md-default-bg-color:${f.palette.background.default};
|
|
24
|
-
--md-default-bg-color--light: ${f.palette.background.paper};
|
|
25
|
-
--md-default-bg-color--lighter: ${(0,zt.a)(f.palette.background.paper,.7)};
|
|
26
|
-
--md-default-bg-color--lightest: ${(0,zt.a)(f.palette.background.paper,.3)};
|
|
27
|
-
|
|
28
|
-
/* PRIMARY */
|
|
29
|
-
--md-primary-fg-color: ${f.palette.primary.main};
|
|
30
|
-
--md-primary-fg-color--light: ${f.palette.primary.light};
|
|
31
|
-
--md-primary-fg-color--dark: ${f.palette.primary.dark};
|
|
32
|
-
--md-primary-bg-color: ${f.palette.primary.contrastText};
|
|
33
|
-
--md-primary-bg-color--light: ${(0,zt.a)(f.palette.primary.contrastText,.7)};
|
|
34
|
-
|
|
35
|
-
/* ACCENT */
|
|
36
|
-
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
37
|
-
--md-accent-fg-color--transparent: ${(0,zt.X4)(f.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: ${f.shadows[1]};
|
|
43
|
-
--md-shadow-z2: ${f.shadows[2]};
|
|
44
|
-
--md-shadow-z3: ${f.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: ${f.palette.text.primary};
|
|
87
|
-
--md-code-bg-color: ${f.palette.code?.background??f.palette.background.paper};
|
|
88
|
-
--md-code-hl-color: ${(0,zt.X4)(f.palette.warning.main,.5)};
|
|
89
|
-
--md-code-hl-color--light: var(--md-code-hl-color);
|
|
90
|
-
--md-code-hl-keyword-color: ${f.palette.type==="dark"?f.palette.primary.light:f.palette.primary.dark};
|
|
91
|
-
--md-code-hl-function-color: ${f.palette.type==="dark"?f.palette.secondary.light:f.palette.secondary.dark};
|
|
92
|
-
--md-code-hl-string-color: ${f.palette.type==="dark"?f.palette.success.light:f.palette.success.dark};
|
|
93
|
-
--md-code-hl-number-color: ${f.palette.type==="dark"?f.palette.error.light:f.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: ${f.palette.link};
|
|
107
|
-
--md-typeset-table-color: ${f.palette.text.primary};
|
|
108
|
-
--md-typeset-table-color--light: ${(0,zt.X4)(f.palette.text.primary,.05)};
|
|
109
|
-
--md-typeset-del-color: ${f.palette.type==="dark"?(0,zt.X4)(f.palette.error.dark,.5):(0,zt.X4)(f.palette.error.light,.5)};
|
|
110
|
-
--md-typeset-ins-color: ${f.palette.type==="dark"?(0,zt.X4)(f.palette.success.dark,.5):(0,zt.X4)(f.palette.success.light,.5)};
|
|
111
|
-
--md-typeset-mark-color: ${f.palette.type==="dark"?(0,zt.X4)(f.palette.warning.dark,.5):(0,zt.X4)(f.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
|
-
`,ne=({theme:f})=>`
|
|
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: ${f.typography.fontFamily};
|
|
140
|
-
font-family: var(--md-text-font-family);
|
|
141
|
-
background-color: unset;
|
|
142
|
-
}
|
|
143
|
-
`,_e="224px",ze=({theme:f,sidebar:I})=>`
|
|
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:${f.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: ${f.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: ${I.isPinned?`calc(-16rem + ${_e})`:"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
|
-
`,de=["h1","h2","h3","h4","h5","h6"],an=/(em)|(rem)/gi,Ln=/var\(|\)/gi,Gt=({theme:f})=>`
|
|
390
|
-
/*================== Typeset ==================*/
|
|
391
|
-
|
|
392
|
-
.md-typeset {
|
|
393
|
-
font-size: var(--md-typeset-font-size);
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
${de.reduce((I,j)=>{const $=f.typography.htmlFontSize??16,K=f.typography[j],{lineHeight:J,fontFamily:ot,fontWeight:bt,fontSize:wt}=K,$t=Bt=>{if(typeof Bt=="number")return $t(`${Bt/$*.6}rem`);if(typeof Bt=="string"){if(Bt.match(Ln)){const jt=window.getComputedStyle(document.body).getPropertyValue(Bt.replaceAll(Ln,""));if(jt!=="")return $t(jt)}else if(Bt.match(an))return`calc(${Bt.replace(an,"")} * var(--md-typeset-font-size))`}return Bt};return I.concat(`
|
|
397
|
-
.md-typeset ${j} {
|
|
398
|
-
color: var(--md-default-fg-color);
|
|
399
|
-
line-height: ${J};
|
|
400
|
-
font-family: ${ot};
|
|
401
|
-
font-weight: ${bt};
|
|
402
|
-
font-size: ${$t(wt)};
|
|
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 ${f.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: ${f.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
|
-
`,qe=()=>`
|
|
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
|
-
`,gn=({theme:f})=>`
|
|
470
|
-
/*================== Extensions ==================*/
|
|
471
|
-
|
|
472
|
-
/* HIGHLIGHT */
|
|
473
|
-
.highlight .md-clipboard:after {
|
|
474
|
-
content: unset;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
.highlight .nx {
|
|
478
|
-
color: ${f.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
/* CODE HILITE */
|
|
482
|
-
.codehilite .gd {
|
|
483
|
-
background-color: ${f.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
.codehilite .gi {
|
|
487
|
-
background-color: ${f.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: ${f.palette.action.disabledBackground};
|
|
518
|
-
}
|
|
519
|
-
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
520
|
-
background-color: ${f.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
|
-
`,ss={dark:["#only-light","#gh-light-mode-only"],light:["#only-dark","#gh-dark-mode-only"]},rs=[pe,ne,ze,Gt,qe,gn,({theme:f})=>`
|
|
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
|
-
${ss[f.palette.type].map(I=>`img[src$="${I}"]`).join(", ")} {
|
|
546
|
-
display: none;
|
|
547
|
-
}
|
|
548
|
-
`],os=()=>(0,ge.Ut)(),xn=()=>{const f=os(),I=(0,Ke.A)();return(0,a.useMemo)(()=>{const j={theme:I,sidebar:f};return rs.reduce(($,K)=>$+K(j),"")},[I,f])},as=()=>{const f=xn();return(0,a.useCallback)(I=>(I.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${f}</style>`),I),[f])},Cn=async(f,I)=>{let j;if(typeof f=="string")j=new DOMParser().parseFromString(f,"text/html").documentElement;else if(f instanceof Element)j=f;else throw new Error("dom is not a recognized type");for(const $ of I)j=await $(j);return j},is=(f,I,j)=>{const $=f==="src"&&I.endsWith(".svg"),K=!I.match(/^([a-z]*:)?\/\//i),J=I.startsWith(j);return $&&(K||J)},Mn=({techdocsStorageApi:f,entityId:I,path:j})=>async $=>{const K=await f.getApiOrigin(),J=async(ot,bt)=>{for(const wt of ot)if(wt.hasAttribute(bt)){const $t=wt.getAttribute(bt);if(!$t)return;const Bt=await f.getBaseUrl($t,I,j);if(is(bt,$t,K))try{const Xt=await(await fetch(Bt,{credentials:"include"})).text();wt.setAttribute(bt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Xt)))}`)}catch{wt.setAttribute("alt",`Error: ${$t}`)}else wt.setAttribute(bt,Bt)}};return await Promise.all([J($.querySelectorAll("img"),"src"),J($.querySelectorAll("script"),"src"),J($.querySelectorAll("source"),"src"),J($.querySelectorAll("link"),"href"),J($.querySelectorAll("a[download]"),"href")]),$},cs=()=>f=>(((j,$)=>{Array.from(j).filter(K=>K.hasAttribute($)).forEach(K=>{const J=K.getAttribute($);if(J){J.match(/^https?:\/\//i)&&K.setAttribute("target","_blank");try{const ot=Bn(window.location.href);K.setAttribute($,new URL(J,ot).toString())}catch{K.replaceWith(K.textContent||J)}}})})(Array.from(f.getElementsByTagName("a")),"href"),f);function Bn(f){const I=new URL(f);return!I.pathname.endsWith("/")&&!I.pathname.endsWith(".html")&&(I.pathname+="/"),I.toString()}var ls=t(27326);let jn;jn=Promise.resolve().then(t.t.bind(t,25873,19));function pn(f,I){jn.then(j=>{"createRoot"in j?j.createRoot(I).render(f):j.render(f,I)})}const ds=()=>f=>{const I=f.querySelector('.md-header label[for="__drawer"]'),j=f.querySelector("article");if(!I||!j)return f;const $=I.cloneNode();return pn(a.createElement(ls.A),$),$.id="toggle-sidebar",$.title="Toggle Sidebar",$.classList.add("md-content__button"),$.style.setProperty("padding","0 0 0 5px"),$.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),j?.prepend($),f},us=()=>f=>(f.querySelector(".md-header")?.remove(),f),Un=()=>f=>(f.querySelector(".md-footer .md-copyright")?.remove(),f.querySelector(".md-footer-copyright")?.remove(),f);var hs=t(36021),gs=t(90292),$n=t(52536),Fn=t.n($n);const ps=f=>I=>{const j=I.querySelector('[title="Edit this page"]');if(!j||!j.href)return I;const $=new URL(j.href),K=f.byUrl($);if(K?.type!=="github"&&K?.type!=="gitlab")return I;const J=I.querySelector("article>h1")?.childNodes[0].textContent||"",ot=encodeURIComponent(`Documentation Feedback: ${J}`),bt=encodeURIComponent(`Page source:
|
|
549
|
-
${j.href}
|
|
550
|
-
|
|
551
|
-
Feedback:`),wt=K?.type==="github"?(0,hs.F)($.href,"blob"):$.href,$t=Fn()(wt),Bt=`/${$t.organization}/${$t.name}`,jt=j.cloneNode();switch(K?.type){case"gitlab":jt.href=`${$.origin}${Bt}/issues/new?issue[title]=${ot}&issue[description]=${bt}`;break;case"github":jt.href=`${$.origin}${Bt}/issues/new?title=${ot}&body=${bt}`;break;default:return I}return pn(a.createElement(gs.A),jt),jt.style.paddingLeft="5px",jt.title="Leave feedback for this page",jt.id="git-feedback-link",j?.insertAdjacentElement("beforebegin",jt),I};var bn=t(38097);const Sn=(0,x.A)(f=>({button:{color:f.palette.primary.light,textDecoration:"underline"}})),fs=({message:f,handleButtonClick:I,autoHideDuration:j})=>{const $=Sn(),[K,J]=(0,a.useState)(!0),ot=()=>J(!1);return(0,n.jsx)(bn.A,{open:K,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:j,color:"primary",onClose:ot,message:f,action:(0,n.jsx)(et.A,{classes:{root:$.button},size:"small",onClick:()=>{ot(),I()},children:"Redirect now"})})},Nn=(f,I)=>{const $=K=>{const J=Bn(window.location.href),ot=new URL(K,J);if(ot.hostname!==window.location.hostname){const wt=window.location.pathname,$t=wt.indexOf(I),Bt=wt.slice(0,$t+I.length);return new URL(Bt,J).href}return ot.href};return K=>{for(const J of Array.from(K.querySelectorAll("meta")))if(J.getAttribute("http-equiv")==="refresh"){const ot=J.getAttribute("content")?.split("url=");if(!ot||ot.length<2)return K;const bt=ot[1],wt=$(bt);if(window.location.href===wt)return K;const $t=document.createElement("div");return pn((0,n.jsx)(fs,{message:"This TechDocs page is no longer maintained. Will automatically redirect to the designated replacement.",handleButtonClick:()=>f(wt),autoHideDuration:3e3}),$t),document.body.appendChild($t),setTimeout(()=>{f(wt)},3e3),K}return K}},kn=()=>f=>(setTimeout(()=>{const I=f?.querySelectorAll("li.md-nav__item--active");I.length!==0&&(I.forEach($=>{const K=$?.querySelector("input");K?.checked||K?.click()}),I[I.length-1].scrollIntoView())},200),f);var ms=t(50868),vs=t(10437),ys=t(71677),Es=t(87051),As=t(36338);const xs=(0,Es.A)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(ys.Ay),Cs=()=>(0,n.jsx)(vs.A,{children:(0,n.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),bs=({text:f})=>{const[I,j]=(0,a.useState)(!1),[,$]=(0,As.A)(),K=(0,a.useCallback)(()=>{$(f),j(!0)},[f,$]),J=(0,a.useCallback)(()=>{j(!1)},[j]);return(0,n.jsx)(xs,{title:"Copied to clipboard",placement:"left",open:I,onClose:J,leaveDelay:1e3,children:(0,n.jsx)(pt.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:K,children:(0,n.jsx)(Cs,{})})})},Ss=f=>I=>{const j=I.querySelectorAll("pre > code");for(const $ of j){const K=$.textContent||"",J=document.createElement("div");$?.parentElement?.prepend(J),pn((0,n.jsx)(ms.A,{theme:f,children:(0,n.jsx)(bs,{text:K})}),J)}return I},Os=({baseUrl:f,onClick:I})=>j=>(Array.from(j.getElementsByTagName("a")).forEach($=>{$.addEventListener("click",K=>{const ot=$.getAttribute("href");ot&&ot.startsWith(f)&&!$.hasAttribute("download")&&(K.preventDefault(),I(K,ot))})}),j),Wn=({onLoading:f,onLoaded:I})=>j=>(f(),j.addEventListener(p,function $(){I(),j.removeEventListener(p,$)}),j);function Ps(f,I){const j=new URL(I),$=`${j.origin}${j.pathname.replace(/\/$/,"")}`,K=f.replace($,"").replace(/^\/+/,""),J=new URL(`http://localhost/${K}`);return`${J.pathname}${J.search}${J.hash}`}function Kn(){const f=(0,a.useRef)((0,Ut.Zp)()),j=(0,rt.gf)(X.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(K=>{let J=K;if(j)try{J=Ps(K,j)}catch{}f.current(J)},[j])}const zn="screen and (max-width: 76.1875em)",Ts=f=>{const I=Kn(),j=(0,Ke.A)(),$=(0,We.A)(zn),K=Te(),J=as(),ot=(0,Z.s)(),bt=(0,rt.gf)(Xe.s),wt=(0,rt.gf)(Me.Y),{state:$t,path:Bt,content:jt}=Le(),{"*":Xt=""}=(0,Ut.g)(),[Yt,le]=(0,a.useState)(null),Qt=E(Yt),ie=(0,a.useCallback)(()=>{if(!Yt)return;Yt.querySelectorAll(".md-sidebar").forEach(te=>{if($)te.style.top="0px";else{const Se=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Re=Yt.getBoundingClientRect().top??0;const cn=Yt.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Re<Se&&(Re=Se);const He=Math.max(Re,0)+cn;te.style.top=`${He}px`;const ln=Yt.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;te.style.height=`${ln-He}px`}te.style.setProperty("opacity","1")})},[Yt,$]);(0,a.useEffect)(()=>(window.addEventListener("resize",ie),window.addEventListener("scroll",ie,!0),()=>{window.removeEventListener("resize",ie),window.removeEventListener("scroll",ie,!0)}),[Yt,ie]);const ue=(0,a.useCallback)(()=>{if(!Yt)return;const Jt=Yt.querySelector(".md-footer");Jt&&(Jt.style.width=`${Yt.getBoundingClientRect().width}px`)},[Yt]);(0,a.useEffect)(()=>(window.addEventListener("resize",ue),()=>{window.removeEventListener("resize",ue)}),[Yt,ue]),(0,a.useEffect)(()=>{Qt||(ue(),ie())},[$t,Qt,ue,ie]);const qt=(0,a.useCallback)((Jt,te)=>Cn(Jt,[K,Mn({techdocsStorageApi:bt,entityId:f,path:te}),cs(),ds(),us(),Un(),ps(wt),J]),[f,wt,bt,K,J]),Zt=(0,a.useCallback)(async Jt=>Cn(Jt,[Nn(I,f.name),kn(),Ss(j),Os({baseUrl:window.location.origin,onClick:(te,se)=>{const Se=te.ctrlKey||te.metaKey,Re=new URL(se),tn=te.target?.innerText||se,cn=se.replace(window.location.origin,"");ot.captureEvent("click",tn,{attributes:{to:cn}}),Re.hash?Se?window.open(se,"_blank"):(window.location.pathname!==Re.pathname?I(se):window.history.pushState(null,document.title,Re.hash),Jt?.querySelector(`[id="${Re.hash.slice(1)}"]`)?.scrollIntoView()):Se?window.open(se,"_blank"):I(se)}}),Wn({onLoading:()=>{},onLoaded:()=>{Jt.querySelector(".md-nav__title")?.removeAttribute("for")}}),Wn({onLoading:()=>{Array.from(Jt.querySelectorAll(".md-sidebar")).forEach(se=>{se.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[j,I,ot,f.name]);return(0,a.useEffect)(()=>{if(!jt)return()=>{};let Jt=!0;return qt(jt,Bt).then(async te=>{if(!te?.innerHTML||!Jt||Xt!==Bt)return;window.scroll({top:0});const se=await Zt(te);le(se)}),()=>{Jt=!1}},[jt,Xt,Bt,qt,Zt]),Yt};var On=t(41883),je=t(72020),be=t(99730);const Ue=()=>{const f=(0,je.YR)(),{shadowRoot:I}=(0,m.V)(),j=I?.querySelector('[data-md-component="content"]'),$=I?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let K=$?.querySelector('[data-techdocs-addons-location="primary sidebar"]');K||(K=document.createElement("div"),K.setAttribute("data-techdocs-addons-location","primary sidebar"),$?.prepend(K));const J=I?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let ot=J?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return ot||(ot=document.createElement("div"),ot.setAttribute("data-techdocs-addons-location","secondary sidebar"),J?.prepend(ot)),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(On.A,{container:K,children:f.renderComponentsByLocation(be.e.PrimarySidebar)}),(0,n.jsx)(On.A,{container:j,children:f.renderComponentsByLocation(be.e.Content)}),(0,n.jsx)(On.A,{container:ot,children:f.renderComponentsByLocation(be.e.SecondarySidebar)})]})},Rs=(0,x.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Hn=on(f=>{const{withSearch:I=!0,searchResultUrlMapper:j,onReady:$}=f,K=Rs(),{entityMetadata:{value:J,loading:ot},entityRef:bt,setShadowRoot:wt}=(0,m.V)(),{state:$t}=Le(),Bt=Ts(bt),jt=window.location.pathname,Xt=window.location.hash,Yt=E(Bt),[le]=M([`[id="${Xt.slice(1)}"]`]);(0,a.useEffect)(()=>{Yt||(Xt?le&&le.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[jt,Xt,le,Yt]);const Qt=(0,a.useCallback)(ie=>{wt(ie),$ instanceof Function&&$()},[wt,$]);return ot===!1&&!J?(0,n.jsx)(F.M,{status:"404",statusMessage:"PAGE NOT FOUND"}):Bt?(0,n.jsx)(L.U,{children:(0,n.jsxs)(d.A,{container:!0,children:[(0,n.jsx)(d.A,{xs:12,item:!0,children:(0,n.jsx)(Ne,{})}),I&&(0,n.jsx)(d.A,{className:K.search,xs:"auto",item:!0,children:(0,n.jsx)(Ft,{entityId:bt,entityTitle:J?.metadata?.title,searchResultUrlMapper:j})}),(0,n.jsxs)(d.A,{xs:12,item:!0,children:[($t==="CHECKING"||Yt)&&(0,n.jsx)(Q.k,{}),(0,n.jsx)(y,{element:Bt,onAppend:Qt,children:(0,n.jsx)(Ue,{})})]})]})}):(0,n.jsx)(L.U,{children:(0,n.jsx)(d.A,{container:!0,children:(0,n.jsx)(d.A,{xs:12,item:!0,children:(0,n.jsx)(Ne,{})})})})}),ws=null},45061:(H,b,t)=>{"use strict";t.d(b,{T:()=>Y});var n=t(31085),a=t(14041),d=t(93285),x=t(42899),m=t(4387),h=t(13660),u=t(72020),g=t(86892),p=t(99730),v=t(67871),E=t(8859),y=t(34428),P=t(51372),T=t(58837),M=t(268),S=t(72501),B=t(72072);const F=(0,T.A)(X=>({root:{textAlign:"left"},label:{color:X.page.fontColor,fontWeight:X.typography.fontWeightBold,letterSpacing:0,fontSize:X.typography.fontSize,marginBottom:X.spacing(1)/2,lineHeight:1},value:{color:(0,M.X4)(X.page.fontColor,.8),fontSize:X.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),L=({value:X,className:ct,typographyRootComponent:dt})=>(0,n.jsx)(S.A,{component:dt??(typeof X=="string"?"p":"span"),className:ct,children:X});function Q(X){const{label:ct,value:dt,url:Et,contentTypograpyRootComponent:It}=X,Pt=F(),lt=(0,n.jsx)(L,{className:Pt.value,value:dt||"<Unknown>",typographyRootComponent:It});return(0,n.jsx)(x.A,{item:!0,children:(0,n.jsxs)(S.A,{component:"span",className:Pt.root,children:[(0,n.jsx)(S.A,{className:Pt.label,children:ct}),Et?(0,n.jsx)(B.N_,{to:Et,children:lt}):lt]})})}var G=t(69814),k=t(72427),W=t(65461),_=t(9222),N=t(45250),rt=t(82779);const Z=(0,n.jsx)(m.A,{animation:"wave",variant:"text",height:40}),Y=X=>{const{children:ct}=X,dt=(0,u.YR)(),Et=(0,k.gf)(W.U),{title:It,setTitle:Pt,subtitle:lt,setSubtitle:it,entityRef:mt,metadata:{value:ut,loading:Ot},entityMetadata:{value:St,loading:ft}}=(0,g.V)();(0,a.useEffect)(()=>{ut&&(Pt(ut.site_name),it(()=>{let{site_description:Lt}=ut;return(!Lt||Lt==="None")&&(Lt=""),Lt}))},[ut,Pt,it]);const At=Et.getOptional("app.title")||"Backstage",pt=[It,lt,At].filter(Boolean).join(" | "),{locationMetadata:tt,spec:Ct}=St||{},et=Ct?.lifecycle,U=St?(0,v.t)(St,P.vv):[],V=(0,_.S)(rt.rQ)(),vt=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Q,{label:(0,N.capitalize)(St?.kind||"entity"),value:(0,n.jsx)(E.z,{color:"inherit",entityRef:mt,title:St?.metadata.title,defaultKind:"Component"})}),U.length>0&&(0,n.jsx)(Q,{label:"Owner",value:(0,n.jsx)(y.i,{color:"inherit",entityRefs:U,defaultKind:"group"})}),et?(0,n.jsx)(Q,{label:"Lifecycle",value:String(et)}):null,tt&&tt.type!=="dir"&&tt.type!=="file"?(0,n.jsx)(Q,{label:"",value:(0,n.jsxs)(x.A,{container:!0,direction:"column",alignItems:"center",children:[(0,n.jsx)(x.A,{style:{padding:0},item:!0,children:(0,n.jsx)(h.A,{style:{marginTop:"-25px"}})}),(0,n.jsx)(x.A,{style:{padding:0},item:!0,children:"Source"})]}),url:tt.target}):null]});return!ft&&St===void 0||!Ot&&ut===void 0?null:(0,n.jsxs)(G.Y,{type:"Documentation",typeLink:V,title:It||Z,subtitle:lt===""?void 0:lt||Z,children:[(0,n.jsx)(d.A,{titleTemplate:"%s",children:(0,n.jsx)("title",{children:pt})}),vt,ct,dt.renderComponentsByLocation(p.e.Header)]})}},82779:(H,b,t)=>{"use strict";t.d(b,{Oc:()=>d,Ri:()=>x,rQ:()=>a});var n=t(34569);const a=(0,n.H)({id:"techdocs:index-page"}),d=(0,n.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),x=(0,n.H)({id:"techdocs:catalog-reader-view"})},27698:(H,b,t)=>{"use strict";t.r(b),t.d(b,{TechDocsSearchResultListItem:()=>v});var n=t(31085),a=t(14041),d=t(68804),x=t(5951),m=t(58837),h=t(72501),u=t(72072),g=t(70734);const p=(0,m.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),v=E=>{const{result:y,highlight:P,lineClamp:T=5,asListItem:M=!0,asLink:S=!0,title:B,icon:F}=E,L=p(),Q=({children:W})=>S?(0,n.jsx)(u.N_,{noTrack:!0,to:y.location,children:W}):(0,n.jsx)(n.Fragment,{children:W}),G=()=>{const W=P?.fields.title?(0,n.jsx)(g.e,{text:P.fields.title,preTag:P.preTag,postTag:P.postTag}):y.title,_=P?.fields.entityTitle?(0,n.jsx)(g.e,{text:P.fields.entityTitle,preTag:P.preTag,postTag:P.postTag}):y.entityTitle,N=P?.fields.name?(0,n.jsx)(g.e,{text:P.fields.name,preTag:P.preTag,postTag:P.postTag}):y.name;return y?(0,n.jsx)(x.A,{className:L.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,n.jsx)(Q,{children:B||(0,n.jsxs)(n.Fragment,{children:[W," | ",_??N," docs"]})}),secondary:(0,n.jsx)(h.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:T,overflow:"hidden"},color:"textSecondary",variant:"body2",children:P?.fields.text?(0,n.jsx)(g.e,{text:P.fields.text,preTag:P.preTag,postTag:P.postTag}):y.text})}):null},k=({children:W})=>M?(0,n.jsxs)(n.Fragment,{children:[F&&(0,n.jsx)(d.A,{children:typeof F=="function"?F(y):F}),(0,n.jsx)("div",{className:L.flexContainer,children:W})]}):(0,n.jsx)(n.Fragment,{children:W});return(0,n.jsx)(k,{children:(0,n.jsx)(G,{})})}},97184:(H,b,t)=>{const a=document.querySelector('meta[name="backstage-public-path"]')?.getAttribute("content");a&&(t.p=a)},86973:()=>{}},H=>{var b=n=>H(H.s=n);H.O(0,[1751,1888,5067,1678,235,6587,1975,5042,7400,4538,4121],()=>(b(97184),b(47149)));var t=H.O()}]);})();
|
|
552
|
-
|
|
553
|
-
//# sourceMappingURL=main.a6c99f76.js.map
|