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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/embedded-app/.config-schema.json +115 -115
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/{124.a0a572f3.chunk.js → 124.7c4c81f4.chunk.js} +3 -3
  5. package/dist/embedded-app/static/124.7c4c81f4.chunk.js.map +1 -0
  6. package/dist/embedded-app/static/{2420.f9fbc916.chunk.js → 2420.1bc102de.chunk.js} +3 -3
  7. package/dist/embedded-app/static/2420.1bc102de.chunk.js.map +1 -0
  8. package/dist/embedded-app/static/4036.32efab46.chunk.js +3 -0
  9. package/dist/embedded-app/static/4036.32efab46.chunk.js.map +1 -0
  10. package/dist/embedded-app/static/{6271.1952ce76.chunk.js → 6271.d5297b21.chunk.js} +3 -3
  11. package/dist/embedded-app/static/6271.d5297b21.chunk.js.map +1 -0
  12. package/dist/embedded-app/static/{8384.96619c53.chunk.js → 8384.bfea9665.chunk.js} +3 -3
  13. package/dist/embedded-app/static/8384.bfea9665.chunk.js.map +1 -0
  14. package/dist/embedded-app/static/{898.815b96f0.chunk.js → 898.b3655147.chunk.js} +1 -1
  15. package/dist/embedded-app/static/{898.815b96f0.chunk.js.map → 898.b3655147.chunk.js.map} +1 -1
  16. package/dist/embedded-app/static/9605.92f660fa.chunk.js +11 -0
  17. package/dist/embedded-app/static/9605.92f660fa.chunk.js.map +1 -0
  18. package/dist/embedded-app/static/{9652.8daa9515.chunk.js → 9652.aec21fe8.chunk.js} +3 -3
  19. package/dist/embedded-app/static/9652.aec21fe8.chunk.js.map +1 -0
  20. package/dist/embedded-app/static/main.3d49bafb.js +509 -0
  21. package/dist/embedded-app/static/main.3d49bafb.js.map +1 -0
  22. package/dist/embedded-app/static/{module-material-table.695896b2.js → module-material-table.e3f26578.js} +2 -2
  23. package/dist/embedded-app/static/{module-material-table.695896b2.js.map → module-material-table.e3f26578.js.map} +1 -1
  24. package/dist/embedded-app/static/module-material-ui.f1846a3c.js +24 -0
  25. package/dist/embedded-app/static/module-material-ui.f1846a3c.js.map +1 -0
  26. package/dist/embedded-app/static/module-react-router-dom.0c2bb614.js +23 -0
  27. package/dist/embedded-app/static/module-react-router-dom.0c2bb614.js.map +1 -0
  28. package/dist/embedded-app/static/module-react-router.dac764ce.js +23 -0
  29. package/dist/embedded-app/static/module-react-router.dac764ce.js.map +1 -0
  30. package/dist/embedded-app/static/{runtime.6518d659.js → runtime.3d49bafb.js} +2 -2
  31. package/dist/embedded-app/static/{runtime.6518d659.js.map → runtime.3d49bafb.js.map} +1 -1
  32. package/dist/embedded-app/static/{vendor.6518d659.js → vendor.3d49bafb.js} +1 -1
  33. package/dist/embedded-app/static/{vendor.6518d659.js.map → vendor.3d49bafb.js.map} +1 -1
  34. package/dist/index.cjs.js +1 -1
  35. package/package.json +5 -5
  36. package/dist/embedded-app/static/124.a0a572f3.chunk.js.map +0 -1
  37. package/dist/embedded-app/static/2420.f9fbc916.chunk.js.map +0 -1
  38. package/dist/embedded-app/static/4036.a029793d.chunk.js +0 -3
  39. package/dist/embedded-app/static/4036.a029793d.chunk.js.map +0 -1
  40. package/dist/embedded-app/static/6271.1952ce76.chunk.js.map +0 -1
  41. package/dist/embedded-app/static/8384.96619c53.chunk.js.map +0 -1
  42. package/dist/embedded-app/static/9605.18e9db70.chunk.js +0 -11
  43. package/dist/embedded-app/static/9605.18e9db70.chunk.js.map +0 -1
  44. package/dist/embedded-app/static/9652.8daa9515.chunk.js.map +0 -1
  45. package/dist/embedded-app/static/main.6518d659.js +0 -509
  46. package/dist/embedded-app/static/main.6518d659.js.map +0 -1
  47. package/dist/embedded-app/static/module-material-ui.3807a580.js +0 -24
  48. package/dist/embedded-app/static/module-material-ui.3807a580.js.map +0 -1
  49. package/dist/embedded-app/static/module-react-router-dom.473a1e8a.js +0 -22
  50. package/dist/embedded-app/static/module-react-router-dom.473a1e8a.js.map +0 -1
  51. package/dist/embedded-app/static/module-react-router.933956ac.js +0 -22
  52. package/dist/embedded-app/static/module-react-router.933956ac.js.map +0 -1
@@ -1,509 +0,0 @@
1
- (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(G,S,t)=>{"use strict";t.d(S,{c:()=>s});const s=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(G,S,t)=>{"use strict";t.d(S,{P:()=>u,_P:()=>a,oQ:()=>s});const s="default",a="backstage.io/view-url",u="backstage.io/edit-url",C="kubernetes.io/api-server",f="kubernetes.io/api-server-certificate-authority",g="kubernetes.io/auth-provider"},6820:(G,S,t)=>{"use strict";t.d(S,{KU:()=>C,U2:()=>f,sM:()=>u});var s=t(72348);function a(g){let h=g.indexOf(":");const d=g.indexOf("/");d!==-1&&d<h&&(h=-1);const v=h===-1?void 0:g.slice(0,h),m=d===-1?void 0:g.slice(h+1,d),E=g.slice(Math.max(h+1,d+1));if(v===""||m===""||E==="")throw new TypeError(`Entity reference "${g}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:v,namespace:m,name:E}}function u(g){return{kind:g.kind,namespace:g.metadata.namespace||s.oQ,name:g.metadata.name}}function C(g,h){if(!g)throw new Error("Entity reference must not be empty");const d=h?.defaultKind,v=h?.defaultNamespace||s.oQ;let m,E,x;if(typeof g=="string"){const O=a(g);m=O.kind??d,E=O.namespace??v,x=O.name}else m=g.kind??d,E=g.namespace??v,x=g.name;if(m)if(E){if(!x){const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty name`)}}else{const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty namespace`)}else{const O=JSON.stringify(g);throw new Error(`Entity reference ${O} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:m,namespace:E,name:x}}function f(g){let h,d,v;return"metadata"in g?(h=g.kind,d=g.metadata.namespace??s.oQ,v=g.metadata.name):(h=g.kind,d=g.namespace??s.oQ,v=g.name),`${h.toLocaleLowerCase("en-US")}:${d.toLocaleLowerCase("en-US")}/${v.toLocaleLowerCase("en-US")}`}},51372:(G,S,t)=>{"use strict";t.d(S,{fT:()=>d,jn:()=>O,nC:()=>h,sA:()=>T,vv:()=>s});const s="ownedBy",a="ownerOf",u="consumesApi",C="apiConsumedBy",f="providesApi",g="apiProvidedBy",h="dependsOn",d="dependencyOf",v="parentOf",m="childOf",E="memberOf",x="hasMember",O="partOf",T="hasPart"},17736:(G,S,t)=>{"use strict";t.d(S,{Eo:()=>s,I4:()=>u});const s="backstage.io/managed-by-location",a="backstage.io/managed-by-origin-location",u="backstage.io/source-location"},78692:(G,S,t)=>{"use strict";t.d(S,{Cr:()=>g,KL:()=>f,aY:()=>C});var s=t(6820),a=t(17736);const u=/^[\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 C(h){if(typeof h!="string")throw new TypeError(`Unable to parse location ref '${h}', unexpected argument ${typeof h}`);const d=h.indexOf(":");if(d<0)throw new TypeError(`Unable to parse location ref '${h}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const v=h.substring(0,d).trim(),m=h.substring(d+1).trim();if(!v||!m)throw new TypeError(`Unable to parse location ref '${h}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(v==="http"||v==="https")throw new TypeError(`Invalid location ref '${h}', please prefix it with 'url:', e.g. 'url:${h}'`);if(u.test(m))throw new TypeError(`Invalid location ref '${h}', target is a javascript: URL`);return{type:v,target:m}}function f(h){const{type:d,target:v}=h;if(d){if(!v)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(u.test(v))throw new TypeError(`Invalid location ref '${d}:${v}', target is a javascript: URL`);return`${d}:${v}`}function g(h){const d=h.metadata?.annotations?.[a.I4]??h.metadata?.annotations?.[a.Eo];if(!d)throw new Error(`Entity '${(0,s.U2)(h)}' is missing location`);return C(d)}},77310:(G,S,t)=>{"use strict";t.d(S,{z:()=>v});var s=t(31085),a=t(10394),u=t(54917),C=t(14041),f=t(69578),g=t(40697),h=t(25577),d=t(37916);function v(m){const{text:E,language:x,showLineNumbers:O=!1,highlightedNumbers:T,customStyle:I,showCopyCodeButton:y=!1}=m,R=(0,u.A)(),F=R.palette.type==="dark"?g.A:h.A,B=R.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,s.jsxs)(a.A,{position:"relative",children:[(0,s.jsx)(f.A,{customStyle:I,language:x,style:F,showLineNumbers:O,wrapLines:!0,lineNumberStyle:{color:R.palette.textVerySubtle},lineProps:X=>T?.includes(X)?{style:{backgroundColor:B}}:{},children:E}),y&&(0,s.jsx)(a.A,{position:"absolute",top:0,right:0,children:(0,s.jsx)(d.l,{text:E})})]})}},37916:(G,S,t)=>{"use strict";t.d(S,{l:()=>E});var s=t(31085),a=t(72427),u=t(39837),C=t(29365),f=t(71677),g=t(99594),h=t(14041),d=t(36338),v=t(10315),m=t(87849);function E(x){const{t:O}=(0,m.i)(v.O),{text:T,tooltipDelay:I=1e3,tooltipText:y=O("copyTextButton.tooltipText"),"aria-label":R="Copy text"}=x,F=(0,a.gf)(u.m),[B,X]=(0,h.useState)(!1),[{error:V},k]=(0,d.A)();(0,h.useEffect)(()=>{V&&F.post(V)},[V,F]);const Q=Z=>{Z.stopPropagation(),X(!0),k(T)};return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(f.Ay,{id:"copy-test-tooltip",title:y,placement:"top",leaveDelay:I,onClose:()=>X(!1),open:B,children:(0,s.jsx)(C.A,{onClick:Q,"aria-label":R,children:(0,s.jsx)(g.A,{})})})})}},44186:(G,S,t)=>{"use strict";t.d(S,{p:()=>O});var s=t(31085),a=t(42899),u=t(58837),C=t(72501),f=t(14041);const g=t.p+"static/missingAnnotation.67f79e98..svg",h=t.p+"static/noInformation.4b426325..svg",d=t.p+"static/createComponent.975d1e1e..svg",v=t.p+"static/noBuild.1715fa71..svg",m=(0,u.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),E=({missing:T})=>{const I=m();switch(T){case"field":return(0,s.jsx)("img",{src:g,className:I.generalImg,alt:"annotation is missing"});case"info":return(0,s.jsx)("img",{src:h,alt:"no Information",className:I.generalImg});case"content":return(0,s.jsx)("img",{src:d,alt:"create Component",className:I.generalImg});case"data":return(0,s.jsx)("img",{src:v,alt:"no Build",className:I.generalImg});default:return null}},x=(0,u.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 O(T){const{title:I,description:y,missing:R,action:F}=T,B=x();return(0,s.jsxs)(a.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:B.root,spacing:2,children:[(0,s.jsx)(a.A,{item:!0,xs:12,md:6,children:(0,s.jsxs)(a.A,{container:!0,direction:"column",children:[(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(C.A,{variant:"h5",children:I})}),(0,s.jsx)(a.A,{item:!0,xs:!0,children:(0,s.jsx)(C.A,{variant:"body1",children:y})}),(0,s.jsx)(a.A,{item:!0,xs:!0,className:B.action,children:F})]})}),(0,s.jsx)(a.A,{item:!0,xs:12,md:6,className:B.imageContainer,children:typeof R=="string"?(0,s.jsx)(E,{missing:R}):R.customImage})]})}},22020:(G,S,t)=>{"use strict";t.d(S,{b:()=>E});var s=t(31085),a=t(58837),u=t(58007),C=t(8109),f=t(5951),g=t(14041),h=t(37916),d=t(88640);const v=(0,a.A)(x=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:x.spacing(2)},divider:{margin:x.spacing(2)}}),{name:"BackstageErrorPanel"}),m=({error:x,message:O,stack:T,children:I})=>{const y=v();return(0,s.jsxs)(u.A,{dense:!0,children:[(0,s.jsxs)(C.A,{alignItems:"flex-start",children:[(0,s.jsx)(f.A,{classes:{secondary:y.text},primary:"Error",secondary:x}),(0,s.jsx)(h.l,{text:x})]}),(0,s.jsxs)(C.A,{alignItems:"flex-start",children:[(0,s.jsx)(f.A,{classes:{secondary:y.text},primary:"Message",secondary:O}),(0,s.jsx)(h.l,{text:O})]}),T&&(0,s.jsxs)(C.A,{alignItems:"flex-start",children:[(0,s.jsx)(f.A,{classes:{secondary:y.text},primary:"Stack Trace",secondary:T}),(0,s.jsx)(h.l,{text:T})]}),I]})};function E(x){const{title:O,error:T,defaultExpanded:I,titleFormat:y,children:R}=x;return(0,s.jsx)(d.B,{severity:"error",title:O??T.message,defaultExpanded:I,titleFormat:y,children:(0,s.jsx)(m,{error:T.name,message:T.message,stack:T.stack,children:R})})}},72072:(G,S,t)=>{"use strict";t.d(S,{N_:()=>Z});var s=t(31085),a=t(72427),u=t(65461),C=t(93368),f=t(49203),g=t(58837),h=t(72501),d=t(53373),v=t.n(d),m=t(45250),E=t.n(m),x=t(14041),O=t(18690),T=t(73970);function I(){const[K]=(0,O.AV)((0,s.jsx)(O.qh,{index:!0,element:(0,s.jsx)("div",{})}));return!K.index}const y=(0,g.A)({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"}},{name:"Link"}),R=K=>/^([a-z+.-]+):/.test(K),F=/^[\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,B=window.open;if(B&&!B.__backstage){const K=function(...H){const tt=String(H[0]);if(F.test(tt))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return B.apply(this,H)};K.__backstage=!0,window.open=K}const X=()=>{try{return(0,a.gf)(u.U).getOptionalString("app.baseUrl")}catch{return}},V=()=>{const K="http://sample.dev",J=X()??"/",{pathname:H}=new URL(J,K);return(0,m.trimEnd)(H,"/")},k=K=>{let J=String(K);const H=V(),tt=R(J),Y=J.startsWith(H);return!tt&&!Y&&(J=H.concat(J)),J},Q=K=>K instanceof Array?K.map(Q).join(" ").trim():typeof K=="object"&&K?Q(K?.props?.children):["string","number"].includes(typeof K)?String(K):"",Z=x.forwardRef(({onClick:K,noTrack:J,...H},tt)=>{const Y=y(),lt=(0,C.s)(),ht=I()?k(H.to):H.to,xt=Q(H.children)||ht,yt=R(ht),St=yt&&!!/^https?:/.exec(ht);if(F.test(ht))throw new Error("Link component rejected javascript: URL as a security precaution");const vt=Et=>{K?.(Et),J||lt.captureEvent("click",xt,{attributes:{to:ht}})};return yt?(0,s.jsxs)(f.A,{...St?{target:"_blank",rel:"noopener"}:{},...H,...H["aria-label"]?{"aria-label":`${H["aria-label"]}, Opens in a new window`}:{},ref:tt,href:ht,onClick:vt,className:v()(Y.externalLink,H.className),children:[H.children,(0,s.jsx)(h.A,{component:"span",className:Y.visuallyHidden,children:", Opens in a new window"})]}):(0,s.jsx)(f.A,{...H,ref:tt,component:T.N_,to:ht,onClick:vt})})},73896:(G,S,t)=>{"use strict";t.d(S,{z:()=>g});var s=t(31085),a=t(64947),u=t(14041),C=t(72072);const f=u.forwardRef((d,v)=>(0,s.jsx)(C.N_,{ref:v,...d,color:"initial"})),g=u.forwardRef((d,v)=>(0,s.jsx)(a.A,{ref:v,component:f,...d})),h=null},4650:(G,S,t)=>{"use strict";t.d(S,{h:()=>E});var s=t(31085),a=t(58837),u=t(45872),C=t(61125),f=t(14041),g=t(77310);const h=(0,a.A)(x=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${x.palette.border}`},"& th, & td":{border:`1px solid ${x.palette.border}`,padding:x.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:x.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:x.palette.background.paper},"& tr":{backgroundColor:x.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:x.palette.background.default},"& a":{color:x.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),d=(x,O)=>O?typeof O=="string"?x+O:f.Children.toArray(O.props.children).reduce(d,x):x,v=({level:x,children:O})=>{const y=f.Children.toArray(O).reduce(d,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return f.createElement(`h${x}`,{id:y},O)},m={code:({inline:x,className:O,children:T,...I})=>{const y=String(T).replace(/\n+$/,""),R=/language-(\w+)/.exec(O||"");return!x&&R?(0,s.jsx)(g.z,{language:R[1],text:y}):(0,s.jsx)("code",{className:O,...I,children:T})},h1:v,h2:v,h3:v,h4:v,h5:v,h6:v};function E(x){const{content:O,dialect:T="gfm",linkTarget:I,transformLinkUri:y,transformImageUri:R,className:F}=x,B=h();return(0,s.jsx)(u.$,{remarkPlugins:T==="gfm"?[C.A]:[],className:`${B.markdown} ${F??""}`.trim(),children:O,components:m,linkTarget:I,transformLinkUri:y,transformImageUri:R})}},68146:(G,S,t)=>{"use strict";t.d(S,{k:()=>g});var s=t(31085),a=t(10394),u=t(88951),C=t(54917),f=t(14041);function g(h){const d=(0,C.A)(),[v,m]=(0,f.useState)(!1);return(0,f.useEffect)(()=>{const E=setTimeout(()=>m(!0),d.transitions.duration.short);return()=>clearTimeout(E)},[d.transitions.duration.short]),v?(0,s.jsx)(u.A,{...h,"data-testid":"progress"}):(0,s.jsx)(a.A,{display:"none"})}},66917:(G,S,t)=>{"use strict";t.d(S,{w:()=>Z});var s=t(31085),a=t(10394),u=t(69076),C=t(67720),f=t(95061),g=t(41857),h=t(48543),d=t(26343),v=t(81215),m=t(87051),E=t(12398),x=t(58837),O=t(72501),T=t(14041),I=t(10437);const y=(0,x.A)(K=>(0,E.A)({icon:{position:"absolute",right:K.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),F=()=>{const K=y();return(0,s.jsx)(I.A,{className:K.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})},B=(0,x.A)(K=>(0,E.A)({icon:{position:"absolute",right:K.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),V=()=>{const K=B();return(0,s.jsx)(I.A,{className:K.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})},k=(0,m.A)(K=>(0,E.A)({root:{"label + &":{marginTop:K.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:K.palette.primary.main}},input:{borderRadius:K.shape.borderRadius,position:"relative",backgroundColor:K.palette.background.paper,border:"1px solid #ced4da",fontSize:K.typography.body1.fontSize,padding:K.spacing(1.25,3.25,1.25,1.5),transition:K.transitions.create(["border-color","box-shadow"]),"&:focus":{background:K.palette.background.paper,borderRadius:K.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(g.A),Q=(0,x.A)(K=>(0,E.A)({formControl:{margin:K.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:K.typography.body2.fontSize,fontFamily:K.typography.fontFamily,color:K.palette.text.primary,"&.Mui-focused":{color:K.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:K.typography.body2.fontSize,fontFamily:K.typography.fontFamily,color:K.palette.text.primary,"&.Mui-focused":{color:K.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function Z(K){const{multiple:J,items:H,label:tt,placeholder:Y,selected:lt,onChange:ht,triggerReset:xt,native:yt=!1,disabled:St=!1,margin:vt,"data-testid":Et="select"}=K,dt=Q(),[gt,Ct]=(0,T.useState)(lt||(J?[]:"")),[pt,Pt]=(0,T.useState)(!1);(0,T.useEffect)(()=>{Ct(J?[]:"")},[xt,J]),(0,T.useEffect)(()=>{Ct(lt||(J?[]:""))},[lt,J]);const It=U=>{Ct(U.target.value),ht(U.target.value)},Ut=U=>{if(St){U.preventDefault();return}Pt(z=>J&&!(U.target instanceof HTMLElement)?!0:!z)},Mt=()=>{Pt(!1)},bt=U=>()=>{const z=gt.filter(rt=>rt!==U);Ct(z),ht(z)};return(0,s.jsx)(a.A,{className:dt.root,children:(0,s.jsxs)(f.A,{className:dt.formControl,children:[(0,s.jsx)(h.A,{className:dt.formLabel,children:tt}),(0,s.jsxs)(v.A,{"aria-label":tt,value:gt,native:yt,disabled:St,"data-testid":Et,displayEmpty:!0,multiple:J,margin:vt,onChange:It,open:pt,onOpen:Ut,onClose:Mt,input:(0,s.jsx)(k,{}),label:tt,renderValue:U=>J&&gt.length!==0?(0,s.jsx)(a.A,{className:dt.chips,children:U.map(z=>{const rt=H.find(mt=>mt.value===z);return rt?(0,s.jsx)(C.A,{label:rt?.label,clickable:!0,onDelete:bt(z),className:dt.chip},rt?.value):!1})}):(0,s.jsx)(O.A,{children:gt.length===0?Y||"":H.find(z=>z.value===U)?.label}),IconComponent:()=>pt?(0,s.jsx)(V,{}):(0,s.jsx)(F,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!Y&&!J&&(0,s.jsx)(d.A,{value:[],children:Y}),yt?H&&H.map(U=>(0,s.jsx)("option",{value:U.value,children:U.label},U.value)):H&&H.map(U=>(0,s.jsxs)(d.A,{value:U.value,children:[J&&(0,s.jsx)(u.A,{color:"primary",checked:gt.includes(U.value)||!1,className:dt.checkbox}),U.label]},U.value))]})]})})}},27586:(G,S,t)=>{"use strict";t.d(S,{Y:()=>K});var s=t(31085),a=t(82266),u=t(10394),C=t(64947),f=t(93453),g=t(29365),h=t(46423),d=t(5951),v=t(26343),m=t(28233),E=t(55197),x=t(58837),O=t(72501),T=t(5893),I=t(14041),y=t(10795),R=t(31129),F=t(72072),B=t(10315),X=t(87849);const V=(0,x.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),k=({icon:J})=>{const H=(0,a.n)(),tt=J?H.getSystemIcon(J)??R.NT:R.NT;return(0,s.jsx)(tt,{})},Q=({link:J})=>(0,s.jsx)(F.N_,{to:J.url,children:J.title??J.url}),Z=({item:J})=>(0,s.jsxs)(v.A,{children:[(0,s.jsx)(h.A,{children:(0,s.jsx)(k,{icon:J.icon})}),(0,s.jsx)(d.A,{primary:J.title,secondary:J.links?.reduce((H,tt,Y)=>[...H,Y>0&&(0,s.jsx)("br",{},Y),(0,s.jsx)(Q,{link:tt},tt.url)],[])})]});function K(J){const{t:H}=(0,X.i)(B.O),{title:tt,items:Y,children:lt}=J,{items:ht}=(0,y.l)(),[xt,yt]=(0,I.useState)(!1),[St,vt]=(0,I.useState)(null),Et=V(),dt=(0,T.A)(pt=>pt.breakpoints.down("sm")),gt=pt=>{vt(pt.currentTarget),yt(!0)},Ct=()=>{yt(!1)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{display:"flex",ml:1,children:dt?(0,s.jsx)(g.A,{color:"primary",size:"small",onClick:gt,"data-testid":"support-button","aria-label":"Support",children:(0,s.jsx)(R.NT,{})}):(0,s.jsx)(C.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:gt,startIcon:(0,s.jsx)(R.NT,{}),children:H("supportButton.title")})}),(0,s.jsxs)(E.Ay,{"data-testid":"support-button-popover",open:xt,anchorEl:St,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:Ct,children:[(0,s.jsxs)(m.A,{className:Et.popoverList,autoFocusItem:!!St,children:[tt&&(0,s.jsx)(v.A,{button:!1,alignItems:"flex-start",className:Et.menuItem,children:(0,s.jsx)(O.A,{variant:"subtitle1",children:tt})}),I.Children.map(lt,(pt,Pt)=>(0,s.jsx)(v.A,{alignItems:"flex-start",className:Et.menuItem,children:pt},`child-${Pt}`)),(Y??ht).map((pt,Pt)=>(0,s.jsx)(Z,{item:pt},`item-${Pt}`))]}),(0,s.jsx)(f.A,{children:(0,s.jsx)(C.A,{color:"primary",onClick:Ct,"aria-label":"Close",children:H("supportButton.close")})})]})]})}},14209:(G,S,t)=>{"use strict";t.d(S,{X:()=>Ut});var s=t(31085),a=t(25301),u=t(10394),C=t(29365),f=t(87051),g=t(58837),h=t(54917),d=t(72501),v=t(83313),m=t(89019),E=t(62461),x=t(68887),O=t(63798),T=t(64704),I=t(6774),y=t(75625),R=t(65859),F=t(5416),B=t(33494),X=t(80113),V=t(26229),k=t(46802),Q=t(45250),Z=t(14041),K=t(64947),J=t(66917),H=t(10315),tt=t(87849);const Y=(0,g.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"}),lt=U=>{const z=Y(),{onChangeFilters:rt}=U,{t:mt}=(0,tt.i)(H.O),[ut,ot]=(0,Z.useState)({...U.selectedFilters}),[At,$t]=(0,Z.useState)(!1),kt=()=>{ot({}),$t(jt=>!jt)};return(0,Z.useEffect)(()=>{rt(ut)},[ut,rt]),(0,s.jsxs)(u.A,{className:z.root,children:[(0,s.jsxs)(u.A,{className:z.header,children:[(0,s.jsx)(u.A,{className:z.value,children:mt("table.filter.title")}),(0,s.jsx)(K.A,{color:"primary",onClick:kt,children:mt("table.filter.clearAll")})]}),(0,s.jsx)(u.A,{className:z.filters,children:U.filters?.length&&U.filters.map(jt=>(0,s.jsx)(J.w,{triggerReset:At,...jt.element,selected:ut[jt.element.label],onChange:Vt=>ot({...ut,[jt.element.label]:Vt})},jt.element.label))})]})};var ht=t(78467);function xt(U){return(0,s.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:U.colSpan,children:(0,s.jsx)(u.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,s.jsx)(ht.A,{size:"5rem"})})})})})}const yt={Add:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(v.A,{...U,ref:z})),Check:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(E.A,{...U,ref:z})),Clear:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(T.A,{...U,ref:z})),Delete:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(I.A,{...U,ref:z})),DetailPanel:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(O.A,{...U,ref:z})),Edit:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(y.A,{...U,ref:z})),Export:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(V.A,{...U,ref:z})),Filter:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(R.A,{...U,ref:z})),FirstPage:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(F.A,{...U,ref:z})),LastPage:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(B.A,{...U,ref:z})),NextPage:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(O.A,{...U,ref:z})),PreviousPage:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(x.A,{...U,ref:z})),ResetSearch:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(T.A,{...U,ref:z})),Search:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(R.A,{...U,ref:z})),SortArrow:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(m.A,{...U,ref:z})),ThirdStateCheck:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(X.A,{...U,ref:z})),ViewColumn:(0,Z.forwardRef)((U,z)=>(0,s.jsx)(k.A,{...U,ref:z}))};function St(U,z){const rt=z.split(".");let mt=U[rt[0]];for(let ut=1;ut<rt.length;++ut){if(mt===void 0)return mt;const ot=rt[ut];mt=mt[ot]}return mt}const vt=(0,f.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),Et=(0,f.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),dt=(0,g.A)(U=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:U.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),gt=(0,g.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ct(U,z){return U.map(rt=>{const mt=rt.headerStyle??{};let ut=rt.cellStyle||{};if(rt.highlight)if(mt.color=z.palette.textContrast,typeof ut=="object")ut.fontWeight=z.typography.fontWeightBold;else{const ot=ut;ut=(At,$t,kt)=>({...ot(At,$t,kt),fontWeight:z.typography.fontWeightBold})}return{...rt,headerStyle:mt,cellStyle:ut}})}function pt(U,z){return(0,Q.transform)(U,(rt,mt,ut)=>{(0,Q.isEqual)(mt,z[ut])||(rt[ut]=mt)})}const Pt={search:"",filtersOpen:!1,filters:{}};function It(U){const{toolbarRef:z,setSearch:rt,hasFilters:mt,selectedFiltersLength:ut,toggleFilters:ot}=U,At=dt(),$t=(0,Z.useCallback)(kt=>{U.onSearchChanged(kt),rt(kt)},[U,rt]);return mt?(0,s.jsxs)(u.A,{className:At.root,children:[(0,s.jsxs)(u.A,{className:At.root,children:[(0,s.jsx)(C.A,{onClick:ot,"aria-label":"filter list",children:(0,s.jsx)(R.A,{})}),(0,s.jsxs)(d.A,{className:At.title,children:["Filters (",ut,")"]})]}),(0,s.jsx)(Et,{...U,ref:z,onSearchChanged:$t})]}):(0,s.jsx)(Et,{...U,ref:z,onSearchChanged:$t})}function Ut(U){const{data:z,columns:rt,emptyContent:mt,options:ut,title:ot,subtitle:At,localization:$t,filters:kt,initialState:jt,onStateChange:Vt,components:de,isLoading:ie,...ue}=U,Yt=gt(),ne=(0,h.A)(),Ft={...Pt,...jt},[Zt,Se]=(0,Z.useState)(Ft.filtersOpen),Ke=(0,Z.useCallback)(()=>Se(he=>!he),[Se]),[Gt,Ne]=(0,Z.useState)(Ft.filters),[ve,Ge]=(0,Z.useState)(Ft.search);(0,Z.useEffect)(()=>{if(Vt){const he=pt({search:ve,filtersOpen:Zt,filters:Gt},Pt);Vt(he)}},[ve,Zt,Gt,Vt]);const Be=(0,Z.useCallback)(he=>rt.find(Qe=>Qe.title===he)?.field,[rt]),Ee=(0,Z.useMemo)(()=>{if(typeof z=="function"||!Gt)return z;const he=Object.values(Gt);return z&&he.flat().length?z.filter(en=>!!Object.entries(Gt).filter(([,L])=>!!L.length).every(([L,l])=>{const A=St(en,Be(L));return Array.isArray(A)&&Array.isArray(l)?A.some(j=>l.includes(j)):Array.isArray(A)?A.includes(l):Array.isArray(l)?l.includes(A):A===l})):z},[z,Gt,Be]),tn=Object.values(Gt).flat().length,Ye=!!kt?.length,an=(0,Z.useCallback)(he=>(0,s.jsx)(It,{setSearch:Ge,hasFilters:Ye,selectedFiltersLength:tn,toggleFilters:Ke,...he}),[Ke,Ye,tn,Ge]),Ue=typeof z!="function"&&z.length===0,$e=rt.length,ke=(0,Z.useMemo)(()=>Mt({hasNoRows:Ue,emptyContent:mt,columnCount:$e,loading:ie}),[Ue,mt,$e,ie]);return(0,s.jsxs)(u.A,{className:Yt.root,children:[Zt&&z&&typeof z!="function"&&kt?.length&&(0,s.jsx)(lt,{filters:bt(kt,z,rt),selectedFilters:Gt,onChangeFilters:Ne}),(0,s.jsx)(a.Ay,{components:{Header:vt,Body:ke,Toolbar:an,...de},options:ut,columns:Ct(rt,ne),icons:yt,title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.A,{variant:"h5",component:"h2",children:ot}),At&&(0,s.jsx)(d.A,{color:"textSecondary",variant:"body1",children:At})]}),data:Ee,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"},...$t},...ue})]})}Ut.icons=Object.freeze(yt);function Mt({columnCount:U,emptyContent:z,hasNoRows:rt,loading:mt}){return ut=>mt?(0,s.jsx)(xt,{colSpan:U}):z&&rt?(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:U,children:z})})}):(0,s.jsx)(a.C6,{...ut})}function bt(U,z,rt){const mt=ot=>{const At=new Set,$t=kt=>{kt!=null&&At.add(kt)};return z&&z.forEach(kt=>{const jt=St(kt,rt.find(Vt=>Vt.title===ot)?.field);Array.isArray(jt)?jt.forEach($t):$t(jt)}),At},ut=ot=>({placeholder:"All results",label:ot.column,multiple:ot.type==="multiple-select",items:[...mt(ot.column)].sort().map(At=>({label:At,value:At}))});return U.map(ot=>({type:ot.type,element:ut(ot)}))}},88640:(G,S,t)=>{"use strict";t.d(S,{B:()=>X});var s=t(31085),a=t(268),u=t(58837),C=t(8973),f=t(29655),g=t(91567),h=t(42899),d=t(72501),v=t(9181),m=t(6924),E=t(14041),x=t(4650);const O=(V,k)=>(k.palette.type==="light"?a.e$:a.a)(k.palette[V].light,.6),T=(V,k)=>(k.palette.type==="light"?a.a:a.e$)(k.palette[V].light,.9),I=(0,u.A)(V=>({root:{marginRight:V.spacing(1),fill:({severity:k})=>O(k,V)}})),y=({severity:V})=>{const k=I({severity:V});return(0,s.jsx)(v.A,{classes:k})},R=({severity:V})=>{const k=I({severity:V});return(0,s.jsx)(m.A,{classes:k})},F=(0,u.A)(V=>({panel:{backgroundColor:({severity:k})=>T(k,V),color:({severity:k})=>O(k,V),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:k})=>O(k,V),fontWeight:V.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:k})=>O(k,V),backgroundColor:({severity:k})=>T(k,V)},details:{width:"100%",display:"block",color:V.palette.textContrast,backgroundColor:V.palette.background.default,border:`1px solid ${V.palette.border}`,padding:V.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),B=V=>V.charAt(0).toLocaleUpperCase("en-US")+V.slice(1);function X(V){const{severity:k="warning",title:Q,titleFormat:Z,message:K,children:J,defaultExpanded:H}=V,tt=F({severity:k}),Y=B(k)+(Q?`: ${Q}`:"");return(0,s.jsxs)(C.A,{defaultExpanded:H??!1,className:tt.panel,role:"alert",children:[(0,s.jsxs)(f.A,{expandIcon:(0,s.jsx)(R,{severity:k}),className:tt.summary,children:[(0,s.jsx)(y,{severity:k}),(0,s.jsx)(d.A,{className:tt.summaryText,variant:"subtitle1",children:Z==="markdown"?(0,s.jsx)(x.h,{content:Y,className:tt.markdownContent}):Y})]}),(K||J)&&(0,s.jsx)(g.A,{children:(0,s.jsxs)(h.A,{container:!0,children:[K&&(0,s.jsx)(h.A,{item:!0,xs:12,children:(0,s.jsx)(d.A,{className:tt.message,variant:"body1",children:K})}),J&&(0,s.jsx)(h.A,{item:!0,xs:12,className:tt.details,children:J})]})})]})}},10795:(G,S,t)=>{"use strict";t.d(S,{l:()=>g});var s=t(72427),a=t(65461),u=t(10315),C=t(87849);const f=()=>{const{t:h}=(0,C.i)(u.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:h("supportConfig.default.title"),icon:"warning",links:[{title:h("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function g(){const v=(0,s.Q2)().get(a.U)?.getOptionalConfig("app.support"),m=f();return v?{url:v.getString("url"),items:v.getConfigArray("items").flatMap(E=>({title:E.getString("title"),icon:E.getOptionalString("icon"),links:(E.getOptionalConfigArray("links")??[]).flatMap(x=>({url:x.getString("url"),title:x.getString("title")}))}))}:m}},31129:(G,S,t)=>{"use strict";t.d(S,{NT:()=>T,z9:()=>f});var s=t(31085),a=t(82266),u=t(27799),C=t(14041);function f(R){const{id:F,Fallback:B=u.A,...X}=R,k=(0,a.n)().getSystemIcon(F)??B;return(0,s.jsx)(k,{...X})}function g(R){return _jsx(f,{id:"brokenImage",...R})}function h(R){return _jsx(f,{id:"catalog",...R})}function d(R){return _jsx(f,{id:"chat",...R})}function v(R){return _jsx(f,{id:"dashboard",...R})}function m(R){return _jsx(f,{id:"docs",...R})}function E(R){return _jsx(f,{id:"email",...R})}function x(R){return _jsx(f,{id:"github",...R})}function O(R){return _jsx(f,{id:"group",...R})}function T(R){return(0,s.jsx)(f,{id:"help",...R})}function I(R){return _jsx(f,{id:"user",...R})}function y(R){return _jsx(f,{id:"warning",...R})}},26280:(G,S,t)=>{"use strict";t.d(S,{U:()=>h});var s=t(31085),a=t(58837),u=t(53373),C=t.n(u),f=t(14041);const g=(0,a.A)(d=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:d.spacing(3),paddingBottom:d.spacing(3),paddingLeft:d.spacing(2),paddingRight:d.spacing(2),[d.breakpoints.up("sm")]:{paddingLeft:d.spacing(3),paddingRight:d.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function h(d){const{className:v,stretch:m,noPadding:E,children:x,...O}=d,T=g();return(0,s.jsx)("article",{...O,className:C()(T.root,v,{[T.stretch]:m,[T.noPadding]:E}),children:x})}},59428:(G,S,t)=>{"use strict";t.d(S,{d:()=>v});var s=t(31085),a=t(10394),u=t(58837),C=t(72501),f=t(14041),g=t(93285);const h=m=>(0,u.A)(E=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:E.spacing(2),textAlign:m.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"}),d=({title:m="Unknown page",className:E})=>(0,s.jsx)(C.A,{variant:"h4",component:"h2",className:E,"data-testid":"header-title",children:m});function v(m){const{description:E,title:x,titleComponent:O=void 0,children:T,textAlign:I="left"}=m,y=h({textAlign:I})(),R=O||(0,s.jsx)(d,{title:x,className:y.title});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.m,{title:x}),(0,s.jsxs)(a.A,{className:y.container,children:[(0,s.jsxs)(a.A,{className:y.leftItemsBox,children:[R,E&&(0,s.jsx)(C.A,{className:y.description,variant:"body2",children:E})]}),(0,s.jsx)(a.A,{className:y.rightItemsBox,children:T})]})]})}},12173:(G,S,t)=>{"use strict";t.d(S,{M:()=>F});var s=t(31085),a=t(42899),u=t(58837),C=t(72501),f=t(14041),g=t(18690),h=t(72072),d=t(10795);const v=t.p+"static/mic-drop.fe3ef4d0..svg",m=(0,u.A)(B=>({micDrop:{maxWidth:"60%",bottom:B.spacing(2),right:B.spacing(2),[B.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:B.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),E=()=>{const B=m();return(0,s.jsx)("img",{src:v,className:B.micDrop,alt:"Girl dropping mic from her hands"})};var x=t(77310),O=t(87849),T=t(10315);const I=(0,u.A)(B=>({title:{paddingBottom:B.spacing(5),[B.breakpoints.down("xs")]:{paddingBottom:B.spacing(4),fontSize:B.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function y(B){const{stack:X}=B,V=I(),{t:k}=(0,O.i)(T.O),[Q,Z]=(0,f.useState)(!1);return Q?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.A,{variant:"h6",className:V.title,children:(0,s.jsx)(h.N_,{to:"#",onClick:()=>Z(!1),children:k("errorPage.showLessDetails")})}),(0,s.jsx)(x.z,{text:X,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,s.jsx)(C.A,{variant:"h6",className:V.title,children:(0,s.jsx)(h.N_,{to:"#",onClick:()=>Z(!0),children:k("errorPage.showMoreDetails")})})}const R=(0,u.A)(B=>({container:{padding:B.spacing(8),[B.breakpoints.down("xs")]:{padding:B.spacing(2)}},title:{paddingBottom:B.spacing(5),[B.breakpoints.down("xs")]:{paddingBottom:B.spacing(4),fontSize:B.typography.h3.fontSize}},subtitle:{color:B.palette.textSubtle}}),{name:"BackstageErrorPage"});function F(B){const{status:X="",statusMessage:V,additionalInfo:k,supportUrl:Q,stack:Z}=B,K=R(),J=(0,g.Zp)(),H=(0,d.l)(),{t:tt}=(0,O.i)(T.O);return(0,s.jsxs)(a.A,{container:!0,className:K.container,children:[(0,s.jsxs)(a.A,{item:!0,xs:12,sm:8,md:4,children:[(0,s.jsx)(C.A,{"data-testid":"error",variant:"body1",className:K.subtitle,children:tt("errorPage.subtitle",{status:X,statusMessage:V})}),(0,s.jsx)(C.A,{variant:"body1",className:K.subtitle,children:k}),(0,s.jsx)(C.A,{variant:"h2",className:K.title,children:tt("errorPage.title")}),(0,s.jsxs)(C.A,{variant:"h6",className:K.title,children:[(0,s.jsx)(h.N_,{to:"#","data-testid":"go-back-link",onClick:()=>J(-1),children:tt("errorPage.goBack")}),"... or please"," ",(0,s.jsx)(h.N_,{to:Q||H.url,children:"contact support"})," if you think this is a bug."]}),Z&&(0,s.jsx)(y,{stack:Z})]}),(0,s.jsx)(E,{})]})}},69814:(G,S,t)=>{"use strict";t.d(S,{Y:()=>J});var s=t(31085),a=t(72427),u=t(65461),C=t(10394),f=t(42899),g=t(58837),h=t(71677),d=t(72501),v=t(14041),m=t(93285),E=t(72072),x=t(45634),O=t(58007),T=t(8109),I=t(55197),y=t(87051);const R=(0,y.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(d.A),F=(0,y.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(C.A),B=(0,y.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(C.A);function X(H){const{children:tt,...Y}=H,[lt,ht]=v.useState(null),xt=v.Children.toArray(tt),[yt,St,...vt]=xt,Et=vt.length?vt.pop():xt[xt.length-1],dt=xt.length>3,gt=Pt=>{ht(Pt.currentTarget)},Ct=()=>{ht(null)},pt=!!lt;return(0,s.jsxs)(v.Fragment,{children:[(0,s.jsxs)(x.A,{"aria-label":"breadcrumb",...Y,children:[xt.length>1&&(0,s.jsx)(F,{clone:!0,children:yt}),xt.length>2&&(0,s.jsx)(F,{clone:!0,children:St}),dt&&(0,s.jsx)(R,{onClick:gt,children:"..."}),(0,s.jsx)(B,{children:Et})]}),(0,s.jsx)(I.Ay,{open:pt,anchorEl:lt,onClose:Ct,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,s.jsx)(O.A,{children:vt.map((Pt,It)=>(0,s.jsx)(T.A,{button:!0,children:(0,s.jsx)(F,{clone:!0,children:Pt})},It))})})]})}var V=t(73524);const k=(0,g.A)(H=>({header:{gridArea:"pageHeader",padding:H.spacing(3),width:"100%",boxShadow:H.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:H.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[H.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:H.page.fontColor,wordBreak:"break-word",fontSize:H.typography.h3.fontSize,marginBottom:0},subtitle:{color:H.page.fontColor,opacity:.8,display:"inline-block",marginTop:H.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:H.spacing(1),color:H.page.fontColor},breadcrumb:{color:H.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-H.spacing(.3),marginBottom:H.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-H.spacing(.3),marginBottom:H.spacing(.3)}}),{name:"BackstageHeader"}),Q=({type:H,typeLink:tt,classes:Y,pageTitle:lt})=>H?tt?(0,s.jsxs)(X,{className:Y.breadcrumb,children:[(0,s.jsx)(E.N_,{to:tt,children:H}),(0,s.jsx)(d.A,{children:lt})]}):(0,s.jsx)(d.A,{className:Y.type,children:H}):null,Z=({pageTitle:H,classes:tt,tooltip:Y})=>{const{contentRef:lt}=(0,V.H)(),ht=(0,s.jsx)(d.A,{ref:lt,tabIndex:-1,className:tt.title,variant:"h1",children:H});return Y?(0,s.jsx)(h.Ay,{title:Y,placement:"top-start",children:ht}):ht},K=({classes:H,subtitle:tt})=>tt?typeof tt!="string"?(0,s.jsx)(s.Fragment,{children:tt}):(0,s.jsx)(d.A,{className:H.subtitle,variant:"subtitle2",component:"span",children:tt}):null;function J(H){const{children:tt,pageTitleOverride:Y,style:lt,subtitle:ht,title:xt,tooltip:yt,type:St,typeLink:vt}=H,Et=k(),gt=(0,a.gf)(u.U).getOptionalString("app.title")||"Backstage",Ct=Y||xt,pt=xt||Y,Pt=`${Ct} | %s | ${gt}`,It=`${Ct} | ${gt}`;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m.m,{titleTemplate:Pt,defaultTitle:It}),(0,s.jsxs)("header",{style:lt,className:Et.header,children:[(0,s.jsxs)(C.A,{className:Et.leftItemsBox,children:[(0,s.jsx)(Q,{classes:Et,type:St,typeLink:vt,pageTitle:pt}),(0,s.jsx)(Z,{classes:Et,pageTitle:pt,tooltip:yt}),(0,s.jsx)(K,{classes:Et,subtitle:ht})]}),(0,s.jsx)(f.A,{container:!0,className:Et.rightItemsBox,spacing:4,children:tt})]})]})}},24504:(G,S,t)=>{"use strict";t.d(S,{Y:()=>g});var s=t(31085),a=t(14041),u=t(58837),C=t(50868);const f=(0,u.A)(h=>({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",[h.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function g(h){const{themeId:d,children:v}=h,m=f();return(0,s.jsx)(C.A,{theme:E=>({...E,page:E.getPageTheme({themeId:d})}),children:(0,s.jsx)("main",{className:m.root,children:v})})}},27155:(G,S,t)=>{"use strict";t.d(S,{d:()=>f});var s=t(31085),a=t(14041),u=t(69814),C=t(24504);function f(g){const{themeId:h,children:d,...v}=g;return(0,s.jsxs)(C.Y,{themeId:h,children:[(0,s.jsx)(u.Y,{...v}),d]})}},73524:(G,S,t)=>{"use strict";t.d(S,{G:()=>x,H:()=>O});var s=t(31085),a=t(10394),u=t(58837),C=t(5893),f=t(14041),g=t(72664),h;(function(T){T.SIDEBAR_PIN_STATE="sidebarPinState"})(h||(h={}));const d={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 v=t(34435);const m=(0,u.A)(T=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[T.breakpoints.up("sm")]:{paddingLeft:I=>I.isPinned?I.sidebarConfig.drawerWidthOpen:I.sidebarConfig.drawerWidthClosed},[T.breakpoints.down("xs")]:{paddingBottom:I=>I.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),E=(0,f.createContext)({content:{contentRef:void 0}});function x(T){const[I,y]=(0,f.useState)(()=>d.getSidebarPinState()),{sidebarConfig:R}=(0,f.useContext)(g.yY),F=(0,f.useRef)(null),B=(0,f.useMemo)(()=>({content:{contentRef:F}}),[F]);(0,f.useEffect)(()=>{d.setSidebarPinState(I)},[I]);const X=(0,C.A)(Q=>Q.breakpoints.down("xs"),{noSsr:!0}),V=()=>y(!I),k=m({isPinned:I,sidebarConfig:R});return(0,s.jsx)(v.qj,{value:{isPinned:I,toggleSidebarPinState:V,isMobile:X},children:(0,s.jsx)(E.Provider,{value:B,children:(0,s.jsx)(a.A,{className:k.root,children:T.children})})})}function O(){const{content:T}=(0,f.useContext)(E);return{focusContent:(0,f.useCallback)(()=>{T?.contentRef?.current?.focus()},[T]),contentRef:T?.contentRef}}},34435:(G,S,t)=>{"use strict";t.d(S,{Ut:()=>v,qj:()=>d});var s=t(31085),a=t(43836),u=t(10602),C=t(14041);const f={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},g=(0,C.createContext)(f),h=(0,a.tK)("sidebar-pin-state-context");function d(m){const{children:E,value:x}=m;return(0,s.jsx)(g.Provider,{value:x,children:(0,s.jsx)(h.Provider,{value:(0,u.B)({1:x}),children:E})})}const v=()=>{const m=(0,C.useContext)(h),E=(0,C.useContext)(g);if(m===void 0)return E||f;const x=m.atVersion(1);if(x===void 0)throw new Error("No context found for version 1.");return x}},72664:(G,S,t)=>{"use strict";t.d(S,{Rv:()=>g,U1:()=>E,hC:()=>f,i8:()=>d,yY:()=>m});var s=t(14041);const a=72,u=24,C=18,f={drawerWidthClosed:a,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:a,iconSize:a-u*2,iconPadding:u,selectedIndicatorWidth:3,userBadgePadding:C,userBadgeDiameter:a-C*2,mobileSidebarHeight:56},g=x=>({...f,...x,iconContainerWidth:f.drawerWidthClosed,iconSize:f.drawerWidthClosed-f.iconPadding*2,userBadgeDiameter:f.drawerWidthClosed-f.userBadgePadding*2}),h={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:f.defaultOpenDelayMs+200},d=x=>({...h,...x}),v="@backstage/core/sidebar-intro-dismissed",m=(0,s.createContext)({sidebarConfig:f,submenuConfig:h}),E=(0,s.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(G,S,t)=>{"use strict";t.d(S,{O:()=>a});var s=t(93184);const a=(0,s.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
2
- This selection will not be stored.`,userId:"User ID",tokenInvalid:"Token is not a valid OpenID Connect JWT Token",continue:"Continue",idToken:"ID Token (optional)"},guestProvider:{title:"Guest",subtitle:`Enter as a Guest User.
3
- You will not have a verified identity, meaning some features might be unavailable.`,enter:"Enter"}},skipToContent:"Skip to content",copyTextButton:{tooltipText:"Text copied to clipboard"},simpleStepper:{reset:"Reset",finish:"Finish",next:"Next",skip:"Skip",back:"Back"},errorPage:{subtitle:"ERROR {{status}}: {{statusMessage}}",title:"Looks like someone dropped the mic!",goBack:"Go back",showMoreDetails:"Show more details",showLessDetails:"Show less details"},emptyState:{missingAnnotation:{title:"Missing Annotation",actionTitle:"Add the annotation to your component YAML as shown in the highlighted example below:",readMore:"Read more"}},supportConfig:{default:{title:"Support Not Configured",linkTitle:"Add `app.support` config key"}},errorBoundary:{title:"Please contact {{slackChannel}} for help."},oauthRequestDialog:{title:"Login Required",authRedirectTitle:"This will trigger a http redirect to OAuth Login.",login:"Log in",rejectAll:"Reject All"},supportButton:{title:"Support",close:"Close"},table:{filter:{title:"Filters",clearAll:"Clear all"}},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:(G,S,t)=>{"use strict";t.d(S,{Ig:()=>h,pn:()=>g});var s=t(31085),a=t(43836),u=t(10602),C=t(14041);const f=(0,a.tK)("analytics-context"),g=()=>{const v=(0,C.useContext)(f);if(v===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const m=v.atVersion(1);if(m===void 0)throw new Error("No context found for version 1.");return m},h=v=>{const{attributes:m,children:E}=v,O={...g(),...m},T=(0,u.B)({1:O});return(0,s.jsx)(f.Provider,{value:T,children:E})};function d(v,m){const E=x=>_jsx(h,{attributes:m,children:_jsx(v,{...x})});return E.displayName=`WithAnalyticsContext(${v.displayName||v.name||"Component"})`,E}},67237:(G,S,t)=>{"use strict";t.d(S,{J:()=>C,t:()=>u});var s=t(63544);const a=(0,s.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),u="_ROUTABLE-EXTENSION-RENDERED";class C{analyticsApi;context;constructor(g,h={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=g,this.context=h,a.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{a.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender}),a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),a.beforeUnloadRegistered=!0)}setContext(g){this.context=g}captureEvent(g,h,{value:d,attributes:v}={}){const{_routeNodeType:m,...E}=this.context;if(g===u){a.mostRecentGatheredNavigation&&(a.mostRecentRoutableExtensionRender={context:{...E,extension:"App"}});return}if(a.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...a.mostRecentGatheredNavigation,...a.mostRecentRoutableExtensionRender})}catch(x){console.warn("Error during analytics event capture. %o",x)}a.mostRecentGatheredNavigation=void 0,a.mostRecentRoutableExtensionRender=void 0}if(g==="navigate"&&m==="gathered"&&E.pluginId==="root"){a.mostRecentGatheredNavigation={action:g,subject:h,value:d,attributes:v,context:E};return}try{this.analyticsApi.captureEvent({action:g,subject:h,value:d,attributes:v,context:E})}catch(x){console.warn("Error during analytics event capture. %o",x)}}}},93368:(G,S,t)=>{"use strict";t.d(S,{s:()=>h});var s=t(25862),a=t(72427),u=t(99303),C=t(14041),f=t(67237);function g(){try{return(0,a.gf)(u.c)}catch{return{captureEvent:()=>{}}}}function h(){const d=(0,C.useRef)(null),v=(0,s.pn)(),m=g();function E(){return d.current===null&&(d.current=new f.J(m)),d.current}const x=E();return x.setContext(v),x}},36017:(G,S,t)=>{"use strict";t.d(S,{k:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.alert"})},99303:(G,S,t)=>{"use strict";t.d(S,{c:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.analytics"})},65461:(G,S,t)=>{"use strict";t.d(S,{U:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.config"})},57405:(G,S,t)=>{"use strict";t.d(S,{I:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.discovery"})},39837:(G,S,t)=>{"use strict";t.d(S,{m:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.error"})},63636:(G,S,t)=>{"use strict";t.d(S,{B:()=>u,S:()=>a});var s=t(55309),a;(function(C){C[C.None=0]="None",C[C.Active=1]="Active"})(a||(a={}));const u=(0,s.y)({id:"core.featureflags"})},70795:(G,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.fetch"})},16009:(G,S,t)=>{"use strict";t.d(S,{K:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.identity"})},56038:(G,S,t)=>{"use strict";t.d(S,{J:()=>a});var s=t(55309);const a=(0,s.y)({id:"core.translation"})},55309:(G,S,t)=>{"use strict";t.d(S,{y:()=>a});class s{config;constructor(C){if(this.config=C,!C.id.split(".").flatMap(g=>g.split("-")).every(g=>g.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${C.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(u){return new s(u)}},12935:(G,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(a,u){return"id"in a?{api:a,deps:{},factory:()=>u}:a}},72427:(G,S,t)=>{"use strict";t.d(S,{Q2:()=>f,gf:()=>g});var s=t(31085),a=t(14041),u=t(43836),C=t(97142);function f(){const d=(0,u.qO)("api-context");if(!d)throw new C.EH("API context is not available");const v=d.atVersion(1);if(!v)throw new C.EH("ApiContext v1 not available");return v}function g(d){const m=f().get(d);if(!m)throw new C.EH(`No implementation available for ${d}`);return m}function h(d){return function(m){const E=O=>{const T=f(),I={};for(const y in d)if(d.hasOwnProperty(y)){const R=d[y],F=T.get(R);if(!F)throw new NotImplementedError(`No implementation available for ${R}`);I[y]=F}return _jsx(m,{...O,...I})},x=m.displayName||m.name||"Component";return E.displayName=`withApis(${x})`,E}}},82266:(G,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(43836);const a=()=>{const u=(0,s.qO)("app-context");if(!u)throw new Error("App context is not available");const C=u.atVersion(1);if(!C)throw new Error("AppContext v1 not available");return C}},19402:(G,S,t)=>{"use strict";t.d(S,{E:()=>f,h:()=>C});var s=t(63544);const a=(0,s.Q)("component-data-store",()=>new WeakMap),u="__backstage_data";function C(g,h,d){const v=g;let m=v[u]??a.get(g);if(m||(m={map:new Map},Object.defineProperty(v,u,{enumerable:!1,configurable:!0,writable:!1,value:m}),a.set(g,m)),m.map.has(h)){const E=g.displayName||g.name;throw new Error(`Attempted to attach duplicate data "${h}" to component "${E}"`)}m.map.set(h,d)}function f(g,h){if(!g)return;const d=g.type;if(!d)return;const v=d[u]??a.get(d);if(v)return v.map.get(h)}},88758:(G,S,t)=>{"use strict";t.d(S,{NC:()=>E,zZ:()=>x,QJ:()=>m});var s=t(31085),a=t(14041),u=t(93368),C=t(25862),f=t(82266),g=t(9222),h=t(19402);class d 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:I,plugin:y}=this.props,{ErrorBoundaryFallback:R}=I.getComponents();return T?(0,s.jsx)(R,{error:T,resetError:this.handleErrorReset,plugin:y}):this.props.children}}var v=t(67237);function m(O){const{component:T,mountPoint:I,name:y}=O;return x({component:{lazy:()=>T().then(R=>{const F=X=>{const V=(0,u.s)();try{(0,g.S)(I)}catch(k){if(typeof k=="object"&&k!==null){const{message:Q}=k;if(typeof Q=="string"&&Q.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${I} 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)(()=>{V.captureEvent(v.t,"")},[V]),(0,s.jsx)(R,{...X})},B=y||R.displayName||R.name||"LazyComponent";return F.displayName=`RoutableExtension(${B})`,F},R=>B=>{const X=(0,f.n)(),{BootErrorPage:V}=X.getComponents();return(0,s.jsx)(V,{step:"load-chunk",error:R})})},data:{"core.mountPoint":I},name:y})}function E(O){const{component:T,name:I}=O;return x({component:T,name:I})}function x(O){const{data:T={},name:I}=O;I||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let y;if("lazy"in O.component){const F=O.component.lazy;y=(0,a.lazy)(()=>F().then(B=>({default:B})))}else y=O.component.sync;const R=I||y.displayName||y.name||"Component";return{expose(F){const B=X=>{const V=(0,f.n)(),{Progress:k}=V.getComponents(),Q=T?.["core.mountPoint"];return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(k,{}),children:(0,s.jsx)(d,{app:V,plugin:F,children:(0,s.jsx)(C.Ig,{attributes:{pluginId:F.getId(),...I&&{extension:I},...Q&&{routeRef:Q.id}},children:(0,s.jsx)(y,{...X})})})})};(0,h.h)(B,"core.plugin",F),(0,h.h)(B,"core.extensionName",I);for(const[X,V]of Object.entries(T))(0,h.h)(B,X,V);return B.displayName=`Extension(${R})`,B}}}},82442:(G,S,t)=>{"use strict";t.d(S,{O:()=>h});var s=t(14041),a=t(19402),u=t(72427),C=t(63636);function f(d,v,m,E){return s.Children.toArray(d).flatMap(x=>{if(!(0,s.isValidElement)(x))return[];if(x.type===s.Fragment)return f(x.props.children,v,m,E);if((0,a.E)(x,"core.featureFlagged")){const O=x.props;return("with"in O?v.isActive(O.with):!v.isActive(O.without))?f(x.props.children,v,m,E):[]}if(m===void 0||m(x))return[x];if(E)throw new Error(E);return f(x.props.children,v,m,E)})}class g{node;featureFlagsApi;constructor(v,m){this.node=v,this.featureFlagsApi=m}selectByComponentData(v){const m=f(this.node,this.featureFlagsApi,E=>(0,a.E)(E,v.key)!==void 0,v.withStrictError);return new g(m,this.featureFlagsApi)}findComponentData(v){return f(this.node,this.featureFlagsApi,E=>(0,a.E)(E,v.key)!==void 0).map(E=>(0,a.E)(E,v.key)).filter(E=>E!==void 0)}getElements(){return f(this.node,this.featureFlagsApi)}}function h(d,v,m=[]){const E=(0,u.gf)(C.B),x=new g(d,E);return(0,s.useMemo)(()=>v(x),[d,...m])}},9803:(G,S,t)=>{"use strict";t.d(S,{i:()=>a});class s{config;constructor(C){this.config=C}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(C){return C.expose(this)}toString(){return`plugin{${this.config.id}}`}}function a(u){return new s(u)}},34569:(G,S,t)=>{"use strict";t.d(S,{H:()=>C});var s=t(59598);let a=s.b;class u{id;params;[a];constructor(g,h){this.id=g,this.params=h,this[a]="absolute"}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function C(f){return new u(f.id,f.params??[])}},59598:(G,S,t)=>{"use strict";t.d(S,{b:()=>a});var s=t(63544);const a=(0,s.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(G,S,t)=>{"use strict";t.d(S,{S:()=>C});var s=t(14041),a=t(18690),u=t(43836);function C(f){const{pathname:g}=(0,a.zy)(),h=(0,u.qO)("routing-context");if(!h)throw new Error("Routing context is not available");const d=h.atVersion(1),v=(0,s.useMemo)(()=>d&&d.resolve(f,{pathname:g}),[d,f,g]);if(!h)throw new Error("useRouteRef used outside of routing context");if(!d)throw new Error("RoutingContext v1 not available");const m="optional"in f&&f.optional;if(!v&&!m)throw new Error(`No path for ${f}`);return v}},93184:(G,S,t)=>{"use strict";t.d(S,{h:()=>C,v:()=>f});var s=t(99833);function a(g){const h=new Array;function d(v,m){for(const[E,x]of Object.entries(v))typeof x=="string"?h.push([m+E,x]):d(x,`${m}${E}.`)}return d(g,""),Object.fromEntries(h)}class u{#t;#n;#e;constructor(h){this.#t=h.id,this.#n=a(h.messages)}$$type="@backstage/TranslationRef";version="v1";get id(){return this.#t}get T(){throw new Error("Not implemented")}getDefaultMessages(){return this.#n}setDefaultResource(h){this.#e=h}getDefaultResource(){return this.#e}toString(){return`TranslationRef{id=${this.id}}`}}function C(g){const h=new u(g);return g.translations&&h.setDefaultResource((0,s.o)({ref:h,translations:g.translations})),h}function f(g){const h=g;if(h.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${h.$$type}'`);if(h.version!=="v1")throw new Error(`Invalid translation ref, bad version '${h.version}'`);return h}},99833:(G,S,t)=>{"use strict";t.d(S,{Y:()=>s,o:()=>a});function s(u){const C=u;if(C.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${C.$$type}'`);if(C.version!=="v1")throw new Error(`Invalid translation resource, bad version '${C.version}'`);return C}function a(u){return{$$type:"@backstage/TranslationResource",version:"v1",id:u.ref.id,resources:Object.entries(u.translations).map(([C,f])=>({language:C,loader:()=>f().then(g=>{const h=g.default;return{messages:h?.$$type==="@backstage/TranslationMessages"?h.messages:h}})}))}}},87849:(G,S,t)=>{"use strict";t.d(S,{i:()=>g});var s=t(14041),a=t(72427),u=t(39837),C=t(56038);const f=new WeakSet,g=h=>{const d=(0,a.gf)(u.m),v=(0,a.gf)(C.J),[m,E]=(0,s.useState)(()=>v.getTranslation(h)),x=(0,s.useMemo)(()=>v.translation$(h),[v,h]),O=(0,s.useCallback)(I=>{if(!f.has(h)){const y=`Failed to load translation resource '${h.id}'; caused by ${I}`;console.error(y),d.post(new Error(y)),f.add(h)}},[d,h]);(0,s.useEffect)(()=>{const I=x.subscribe({next(y){y.ready&&E(y)},error(y){O(y)}});return()=>{I.unsubscribe()}},[x,O]);const T=(0,s.useRef)(!0);if((0,s.useEffect)(()=>{T.current?T.current=!1:E(v.getTranslation(h))},[v,h]),!m.ready)throw new Promise(I=>{const y=x.subscribe({next(R){R.ready&&(y.unsubscribe(),I())},error(R){y.unsubscribe(),O(R),I()}})});return{t:m.t}}},70835:(G,S,t)=>{"use strict";t.d(S,{o:()=>u});var s=t(59750);async function a(C){try{const f=await C.text();if(f){if(C.headers.get("content-type")?.startsWith("application/json"))try{const g=JSON.parse(f);if(g.error&&g.response)return g}catch{}return{error:{name:"Error",message:`Request failed with status ${C.status} ${C.statusText}, ${f}`},response:{statusCode:C.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${C.status} ${C.statusText}`},response:{statusCode:C.status}}}class u extends Error{response;body;cause;statusCode;statusText;static async fromResponse(f){const g=await a(f),h=g.response.statusCode||f.status,d=f.statusText,v=`Request failed with ${h} ${d}`,m=(0,s.cy)(g.error);return new u({message:v,response:f,data:g,cause:m,statusCode:h,statusText:d})}constructor(f){super(f.message),this.name="ResponseError",this.response=f.response,this.body=f.data,this.cause=f.cause,this.statusCode=f.statusCode,this.statusText=f.statusText}}},93007:(G,S,t)=>{"use strict";t.d(S,{b:()=>s});function s(u){if(typeof u!="object"||u===null||Array.isArray(u))return!1;const C=u;return!(typeof C.name!="string"||C.name===""||typeof C.message!="string")}function a(u){if(typeof u!="object"||u===null||Array.isArray(u))throw new Error(`Encountered invalid error, not an object, got '${u}'`);const C=u;if(typeof C.name!="string"||C.name==="")throw new Error(`Encountered error object without a name, got '${u}'`);if(typeof C.message!="string")throw new Error(`Encountered error object without a message, got '${u}'`)}},97142:(G,S,t)=>{"use strict";t.d(S,{m_:()=>h,EH:()=>m});var s=t(93007),a=t(59750);class u extends Error{cause;constructor(T,I){let y=T;if(I!==void 0){const R=(0,a.M5)(I);y?y+=`; caused by ${R}`:y=`caused by ${R}`}super(y),Error.captureStackTrace?.(this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,s.b)(I)?I:void 0}}class C extends null{name="InputError"}class f extends null{name="AuthenticationError"}class g extends null{name="NotAllowedError"}class h extends u{name="NotFoundError"}class d extends null{name="ConflictError"}class v extends null{name="NotModifiedError"}class m extends u{name="NotImplementedError"}class E extends null{}class x extends u{constructor(T,I){super(T,I),this.name=(0,s.b)(I)?I.name:"Error"}}},59750:(G,S,t)=>{"use strict";t.d(S,{M5:()=>g,cy:()=>f});var s=t(69655),a=t.n(s),u=t(93007);function C(h,d){const m={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(h)};return d?.includeStack||delete m.stack,m}function f(h){const d=(0,s.deserializeError)(h);return h.stack||(d.stack=void 0),d}function g(h){if((0,u.b)(h)){const d=String(h);return d!=="[object Object]"?d:`${h.name}: ${h.message}`}return`unknown error '${h}'`}},3347:(G,S,t)=>{"use strict";t.d(S,{L:()=>Qe,Y:()=>en});var s=t(59869);const a="amazonaws.com";function u(L){const l=L.getOptionalString("endpoint"),A=L.getOptionalBoolean("s3ForcePathStyle")??!1;let j,nt;if(l){try{const Xt=new URL(l);j=Xt.host,nt=Xt.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 j=a;const it=L.getOptionalString("accessKeyId"),ft=L.getOptionalString("secretAccessKey")?.trim(),Jt=L.getOptionalString("roleArn"),Qt=L.getOptionalString("externalId");return{host:j,endpoint:l,s3ForcePathStyle:A,accessKeyId:it,secretAccessKey:ft,roleArn:Jt,externalId:Qt}}function C(L){const l=L.map(u);return l.some(A=>A.host===a)||l.push({host:a}),l}class f{integrationConfig;static factory=({config:l})=>{const A=C(l.getOptionalConfigArray("integrations.awsS3")??[]);return(0,s.oS)(A.map(j=>new f(j)),j=>j.config.host)};get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return l}}const g="console.aws.amazon.com";function h(L){const l=L.getOptionalString("accessKeyId"),A=L.getOptionalString("secretAccessKey")?.trim(),j=L.getOptionalString("roleArn"),nt=L.getOptionalString("externalId"),it=L.getString("region");return{host:L.getOptionalString("host")||`${it}.${g}`,accessKeyId:l,secretAccessKey:A,roleArn:j,externalId:nt,region:it}}function d(L){return L.map(h)}class v{integrationConfig;static factory=({config:l})=>{const A=d(l.getOptionalConfigArray("integrations.awsCodeCommit")??[]);return(0,s.oS)(A.map(j=>new v(j)),j=>j.config.host)};get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}constructor(l){this.integrationConfig=l}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){const j=new URL(l).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!j)throw new Error("");const[,nt]=j;return m(l,nt,"edit")}}function m(L,l,A){const j=A==="edit"?"files/edit":A;return L.replace(new RegExp(`/codesuite/codecommit/repositories/${l}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${l}/${j}/`)}const E="GB";class x{static fromRepoUrl(l){const A=new URL(l);let j,nt,it;const ft=A.pathname.split("/").map(ge=>decodeURIComponent(ge));if(ft[2]==="_git"?(j=ft[1],nt=it=ft[3]):ft[3]==="_git"?(j=ft[1],nt=ft[2],it=ft[4]):ft[4]==="_git"&&(j=`${ft[1]}/${ft[2]}`,nt=ft[3],it=ft[5]),!j||!nt||!it)throw new Error("Azure URL must point to a git repository");const Jt=A.searchParams.get("path")??void 0;let Qt;const Xt=A.searchParams.get("version");if(Xt){if(Xt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Qt=Xt.slice(2)}return new x(A.origin,j,nt,it,Jt,Qt)}#t;#n;#e;#s;#r;#o;constructor(l,A,j,nt,it,ft){this.#t=l,this.#n=A,this.#e=j,this.#s=nt,this.#r=it,this.#o=ft}#a=(...l)=>{const A=new URL(this.#t);return A.pathname=l.map(j=>encodeURIComponent(j)).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 O="dev.azure.com",T=["clientId","clientSecret","tenantId","personalAccessToken"],I=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function y(L){for(const l of I.entries()){const[A,j]=l,nt=T.filter(it=>!j.includes(it));if(j.every(it=>L[it]!==void 0)&&nt.every(it=>L[it]===void 0))return{kind:A,organizations:L.organizations,...j.reduce((it,ft)=>(it[ft]=L[ft],it),{})}}throw new Error("is not a valid credential")}function R(L){const l=L.getOptionalString("host")??O;let A=L.getOptionalConfigArray("credentials")?.map(it=>({organizations:it.getOptionalStringArray("organizations"),personalAccessToken:it.getOptionalString("personalAccessToken")?.trim(),tenantId:it.getOptionalString("tenantId"),clientId:it.getOptionalString("clientId"),clientSecret:it.getOptionalString("clientSecret")?.trim()}));const j=L.getOptionalString("token")?.trim();if(L.getOptional("credential")!==void 0&&L.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(L.getOptional("token")!==void 0&&L.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(j!==void 0){const it=[{personalAccessToken:j}];A=A?.concat(it)??it}if(L.getOptional("credential")!==void 0){const it=[{organizations:L.getOptionalStringArray("credential.organizations"),token:L.getOptionalString("credential.token")?.trim(),tenantId:L.getOptionalString("credential.tenantId"),clientId:L.getOptionalString("credential.clientId"),clientSecret:L.getOptionalString("credential.clientSecret")?.trim()}];A=A?.concat(it)??it}if(!(0,s.HO)(l))throw new Error(`Invalid Azure integration config, '${l}' is not a valid host`);let nt;if(A!==void 0){const it=A?.reduce((ft,Jt,Qt)=>{let Xt;try{y(Jt)}catch(ge){Xt=ge.message}return Xt!==void 0&&ft.push(`credential at position ${Qt+1} ${Xt}`),ft},Array.of()).concat(Object.entries(A.filter(ft=>ft.organizations!==void 0&&ft.organizations.length>0).reduce((ft,Jt,Qt)=>(Jt.organizations?.forEach(Xt=>{ft[Xt]||(ft[Xt]=[]),ft[Xt].push(Qt+1)}),ft),{})).filter(([ft,Jt])=>Jt.length>1).reduce((ft,[Jt,Qt])=>(ft.push(`organization ${Jt} is specified multiple times in credentials at positions ${Qt.slice(0,Qt.length-1).join(", ")} and ${Qt[Qt.length-1]}`),ft),Array.of()));if(it?.length>0)throw new Error(`Invalid Azure integration config for ${l}: ${it.join("; ")}`);if(nt=A.map(ft=>y(ft)),nt.some(ft=>ft.kind!=="PersonalAccessToken")&&l!==O)throw new Error(`Invalid Azure integration config for ${l}, only personal access tokens can be used with hosts other than ${O}`);if(nt.filter(ft=>ft.organizations===void 0||ft.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(L){const l=L.map(R);return l.some(A=>A.host===O)||l.push({host:O}),l}class B{integrationConfig;static factory=({config:l})=>{const A=F(l.getOptionalConfigArray("integrations.azure")??[]);return(0,s.oS)(A.map(j=>new B(j)),j=>j.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:j}=l;if((0,s.AY)(A))return A;try{const nt=x.fromRepoUrl(j),it=new URL(j),ft=new URL(`https://a.com${nt.getPath()??""}`),Jt=new URL(A,ft).pathname;return it.searchParams.set("path",Jt),l.lineNumber&&(it.searchParams.set("line",String(l.lineNumber)),it.searchParams.set("lineEnd",String(l.lineNumber+1)),it.searchParams.set("lineStartColumn","1"),it.searchParams.set("lineEndColumn","1")),it.toString()}catch{return new URL(A,j).toString()}}resolveEditUrl(l){return l}}var X=t(52536),V=t.n(X);const k="bitbucket.org",Q="https://api.bitbucket.org/2.0";function Z(L){const l=k,A=Q,j=L.getString("username"),nt=L.getString("appPassword")?.trim();return{host:l,apiBaseUrl:A,username:j,appPassword:nt}}function K(L){const l=L.map(Z);return l.length===0&&l.push({host:k,apiBaseUrl:Q}),l}class J{integrationConfig;static factory=({config:l})=>{const A=K(l.getOptionalConfigArray("integrations.bitbucketCloud")??[]);return(0,s.oS)(A.map(j=>new J(j)),j=>j.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,s.ku)(l);if(l.lineNumber){const j=new URL(A);return j.hash=`lines-${l.lineNumber}`,j.toString()}return A}resolveEditUrl(l){const A=V()(l),j=new URL(l);return j.searchParams.set("mode","edit"),j.searchParams.set("at",A.ref),j.toString()}}var H=t(45250);const tt="bitbucket.org",Y="https://api.bitbucket.org/2.0";function lt(L){const l=L.getOptionalString("host")??tt;let A=L.getOptionalString("apiBaseUrl");const j=L.getOptionalString("token")?.trim(),nt=L.getOptionalString("username"),it=L.getOptionalString("appPassword")?.trim();if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket integration config, '${l}' is not a valid host`);return A?A=(0,H.trimEnd)(A,"/"):l===tt?A=Y:A=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:A,token:j,username:nt,appPassword:it}}function ht(L){const l=L.map(lt);return l.some(A=>A.host===tt)||l.push({host:tt,apiBaseUrl:Y}),l}class xt{integrationConfig;static factory=({config:l})=>{const A=ht(l.getOptionalConfigArray("integrations.bitbucket")??[...l.getOptionalConfigArray("integrations.bitbucketCloud")??[],...l.getOptionalConfigArray("integrations.bitbucketServer")??[]]);return(0,s.oS)(A.map(j=>new xt(j)),j=>j.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,s.ku)(l);if(!l.lineNumber)return A;const j=new URL(A);return this.integrationConfig.host==="bitbucket.org"?j.hash=`lines-${l.lineNumber}`:j.hash=`${l.lineNumber}`,j.toString()}resolveEditUrl(l){const A=V()(l),j=new URL(l);return j.searchParams.set("mode","edit"),j.searchParams.set("spa","0"),j.searchParams.set("at",A.ref),j.toString()}}function yt(L){const l=L.getString("host");let A=L.getOptionalString("apiBaseUrl");const j=L.getOptionalString("token")?.trim(),nt=L.getOptionalString("username"),it=L.getOptionalString("password");if(!(0,s.HO)(l))throw new Error(`Invalid Bitbucket Server integration config, '${l}' is not a valid host`);return A?A=(0,H.trimEnd)(A,"/"):A=`https://${l}/rest/api/1.0`,{host:l,apiBaseUrl:A,token:j,username:nt,password:it}}function St(L){return L.map(yt)}class vt{integrationConfig;static factory=({config:l})=>{const A=St(l.getOptionalConfigArray("integrations.bitbucketServer")??[]);return(0,s.oS)(A.map(j=>new vt(j)),j=>j.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,s.ku)(l);if(l.lineNumber){const j=new URL(A);return j.hash=l.lineNumber.toString(),j.toString()}return A}resolveEditUrl(l){return l.includes("?")?l.substring(0,l.indexOf("?")):l}}function Et(L){const l=L.getString("host");let A=L.getOptionalString("baseUrl"),j=L.getOptionalString("cloneUrl"),nt=L.getString("gitilesBaseUrl");const it=L.getOptionalString("username"),ft=L.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(A&&!(0,s.AY)(A))throw new Error(`Invalid Gerrit integration config, '${A}' is not a valid baseUrl`);if(j&&!(0,s.AY)(j))throw new Error(`Invalid Gerrit integration config, '${j}' is not a valid cloneUrl`);if(!(0,s.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,H.trimEnd)(A,"/"):A=`https://${l}`,nt?nt=(0,H.trimEnd)(nt,"/"):nt=`https://${l}`,j?j=(0,H.trimEnd)(j,"/"):j=A,{host:l,baseUrl:A,cloneUrl:j,gitilesBaseUrl:nt,username:it,password:ft}}function dt(L){return L.map(Et)}var gt=t(1048).hp;const Ct=")]}'";function pt(L,l){const A=new URL(L.gitilesBaseUrl),j=new URL(l),it=j.pathname.substring(j.pathname.startsWith("/a/")?2:0).replace(A.pathname,"").split("/").filter(zt=>!!zt),ft=it.indexOf("+");if(ft<=0)throw new Error(`Unable to parse project from url: ${l}`);const Jt=(0,H.trimStart)(it.slice(0,ft).join("/"),"/"),Qt=it.indexOf("heads");if(Qt<=0)throw new Error(`Unable to parse branch from url: ${l}`);const Xt=it[Qt+1],ge=it.slice(Qt+2).join("/");return{branch:Xt,filePath:ge===""?"/":ge,project:Jt}}function Pt(L,l,A,j){return`${L.gitilesBaseUrl}/${l}/+/refs/heads/${A}/${(0,H.trimStart)(j,"/")}`}function It(L,l,A,j){const nt=j==="/"||j===""?".tar.gz":`/${j}.tar.gz`;return`${Mt(L)}/${l}/+archive/refs/heads/${A}${nt}`}function Ut(L){return L.password?"/a/":"/"}function Mt(L){if(!L.baseUrl||!L.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(L.gitilesBaseUrl.startsWith(L.baseUrl))return L.gitilesBaseUrl.replace(L.baseUrl.concat("/"),L.baseUrl.concat(Ut(L)));if(L.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return L.gitilesBaseUrl}function bt(L,l){const{branch:A,project:j}=pt(L,l);return`${L.baseUrl}${Ut(L)}projects/${encodeURIComponent(j)}/branches/${A}`}function U(L,l){const{project:A}=pt(L,l);return`${L.cloneUrl}${Ut(L)}${A}`}function z(L,l){const{branch:A,filePath:j,project:nt}=pt(L,l);return`${L.baseUrl}${Ut(L)}projects/${encodeURIComponent(nt)}/branches/${A}/files/${encodeURIComponent(j)}/content`}function rt(L){return`${L.baseUrl}${Ut(L)}projects/`}function mt(L){const l={};if(!L.password)return l;const A=gt.from(`${L.username}:${L.password}`,"utf8");return l.Authorization=`Basic ${A.toString("base64")}`,{headers:l}}async function ut(L){const l=await L.text();if(l.startsWith(Ct))try{return JSON.parse(l.slice(Ct.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 ot{integrationConfig;static factory=({config:l})=>{const A=dt(l.getOptionalConfigArray("integrations.gerrit")??[]);return(0,s.oS)(A.map(j=>new ot(j)),j=>j.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:j,lineNumber:nt}=l;let it;if(A.startsWith("/")){const{branch:ft,project:Jt}=pt(this.config,j);return Pt(this.config,Jt,ft,A)}return A?it=new URL(A,j):it=new URL(j),nt&&(it.hash=nt.toString()),it.toString()}resolveEditUrl(l){return l}}var At=t(36021);const $t="gitlab.com",kt="https://gitlab.com/api/v4";function jt(L){const l=L.getString("host");let A=L.getOptionalString("apiBaseUrl");const j=L.getOptionalString("token")?.trim();let nt=L.getOptionalString("baseUrl");if(A?A=(0,H.trimEnd)(A,"/"):l===$t&&(A=kt),nt?nt=(0,H.trimEnd)(nt,"/"):nt=`https://${l}`,(0,s.HO)(l)){if(!A||!(0,s.AY)(A))throw new Error(`Invalid GitLab integration config, '${A}' is not a valid apiBaseUrl`);if(!(0,s.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:j,apiBaseUrl:A,baseUrl:nt}}function Vt(L){const l=L.map(jt);return l.some(A=>A.host===$t)||l.push({host:$t,apiBaseUrl:kt,baseUrl:`https://${$t}`}),l}function de(L){let l="";return L.host!==$t&&(l=new URL(L.baseUrl).pathname),trimEnd(l,"/")}class ie{integrationConfig;static factory=({config:l})=>{const A=Vt(l.getOptionalConfigArray("integrations.gitlab")??[]);return(0,s.oS)(A.map(j=>new ie(j)),j=>j.config.host)};constructor(l){this.integrationConfig=l}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return ue(l,"edit")}}function ue(L,l){return L.replace(/\/\-\/(blob|tree|edit)\//,`/-/${l}/`)}function Yt(L){const l=L.getString("host");let A=L.getOptionalString("baseUrl");const j=L.getOptionalString("username"),nt=L.getOptionalString("password")?.trim();if((0,s.HO)(l)){if(A&&!(0,s.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,H.trimEnd)(A,"/"):A=`https://${l}`,{host:l,baseUrl:A,username:j,password:nt}}var ne=t(1048).hp;function Ft(L,l){const A=Ne(L,l);return`${A.url}/${A.owner}/${A.name}/_edit/${A.ref}/${A.path}`}function Zt(L,l){const A=Ne(L,l);return`${A.url}/api/v1/repos/${A.owner}/${A.name}/contents/${A.path}?ref=${A.ref}`}function Se(L,l){const A=Ne(L,l);return`${A.url}/api/v1/repos/${A.owner}/${A.name}/archive/${A.ref}.tar.gz`}function Ke(L,l){const A=Ne(L,l);return`${A.url}/api/v1/repos/${A.owner}/${A.name}/git/commits/${A.ref}`}function Gt(L){const l={},{username:A,password:j}=L;return j?(A?l.Authorization=`basic ${ne.from(`${A}:${j}`).toString("base64")}`:l.Authorization=`token ${j}`,{headers:l}):l}function Ne(L,l){const A=L.baseUrl??`https://${L.host}`;try{const[j,nt,it,ft,Jt,Qt,...Xt]=l.replace(A,"").split("/"),ge=Xt.join("/").replace(/^\//,"");return{url:A,owner:nt,name:it,ref:Qt,path:ge}}catch(j){throw new Error(`Incorrect URL: ${l}, ${j}`)}}class ve{config;static factory=({config:l})=>{const j=(l.getOptionalConfigArray("integrations.gitea")??[]).map(nt=>Yt(nt));return(0,s.oS)(j.map(nt=>new ve(nt)),nt=>nt.config.host)};constructor(l){this.config=l}get type(){return"gitea"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return Ft(this.config,l)}}function Ge(L){const l=L.getString("host"),A=L.getOptionalString("token"),j=L.getOptionalString("apiKey");if(!(0,s.HO)(l))throw new Error(`Invalid Harness Code integration config, '${l}' is not a valid host`);return{host:l,apiKey:j,token:A}}function Be(L,l){const A=Ue(L,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 Ee(L,l){const A=Ue(L,l);return`${A.baseUrl}/gateway/code/api/v1/repos/${A.accountId}/${A.orgName}${A.projectName!==""?`/${A.projectName}/`:"/"}${A.repoName}/+/raw/${A.path}?routingId=${A.accountId}&git_ref=refs/heads/${A.refString}`}function tn(L,l){const A=Ue(L,l);return`${A.baseUrl}/gateway/code/api/v1/repos/${A.accountId}/${A.orgName}${A.projectName!==""?`/${A.projectName}/`:"/"}${A.repoName}/+/archive/${A.branch}.zip?routingId=${A.accountId}`}function Ye(L,l){const A=Ue(L,l);return`${A.baseUrl}/gateway/code/api/v1/repos/${A.accountId}/${A.orgName}${A.projectName!==""?`/${A.projectName}/`:"/"}${A.repoName}/+/content?routingId=${A.accountId}&include_commit=true&git_ref=refs/heads/${A.branch}`}function an(L){const l={},{token:A,apiKey:j}=L;return j?l["x-api-key"]=j:A&&(l.Authorization=`Bearer ${A}`),{headers:l}}function Ue(L,l){const A=`https://${L.host}`;try{const j=new URL(l),nt=j.pathname.split("/").filter(re=>re!==""),it=j.pathname.split("/"),ft=nt.findIndex(re=>re==="account")+1,Jt=nt[ft],Qt=nt.findIndex(re=>re==="orgs"),Xt=Qt!==-1?nt[Qt+1]:"",ge=nt.findIndex(re=>re==="projects"),zt=ge!==-1?nt[ge+1]:"",se=nt.findIndex(re=>re==="repos")+1,ee=nt[se],Fe=it.slice(it.findIndex(re=>re==="files"||re==="edit")+1),We=Fe.findIndex(re=>re==="~"),nn=Fe.slice(0,We).join("/"),cn=We!==-1?Fe.slice(We+1).join("/").replace(/^\//,""):"";return{baseUrl:A,accountId:Jt,orgName:Xt,projectName:zt,refString:nn,path:cn,repoName:ee,refDashStr:Fe.slice(0,We).join("-"),branch:We!==-1?Fe.slice(0,We).join("/"):Fe.join("/")}}catch(j){throw new Error(`Incorrect URL: ${l}, ${j}`)}}class $e{config;static factory=({config:l})=>{const j=(l.getOptionalConfigArray("integrations.harness")??[]).map(nt=>Ge(nt));return(0,s.oS)(j.map(nt=>new $e(nt)),nt=>nt.config.host)};constructor(l){this.config=l}get type(){return"harness"}get title(){return this.config.host}resolveUrl(l){return(0,s.ku)(l)}resolveEditUrl(l){return Be(this.config,l)}}class ke{byType;static fromConfig(l){return new ke({awsS3:f.factory({config:l}),awsCodeCommit:v.factory({config:l}),azure:B.factory({config:l}),bitbucket:xt.factory({config:l}),bitbucketCloud:J.factory({config:l}),bitbucketServer:vt.factory({config:l}),gerrit:ot.factory({config:l}),github:At.U.factory({config:l}),gitlab:ie.factory({config:l}),gitea:ve.factory({config:l}),harness:$e.factory({config:l})})}constructor(l){this.byType=l}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}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(j=>j.byUrl(l)).filter(Boolean);if(A.length>1){const j=A.filter(nt=>!(nt instanceof xt));j.length!==0&&(A=j)}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,s.ku)(l)}resolveEditUrl(l){const A=this.byUrl(l);return A?A.resolveEditUrl(l):l}}var he=t(55309);class Qe{static fromConfig(l){return ke.fromConfig(l)}}const en=(0,he.y)({id:"integration.scmintegrations"})},36021:(G,S,t)=>{"use strict";t.d(S,{U:()=>d,F:()=>v});var s=t(59869),a=t(45250);const u="github.com",C="https://api.github.com",f="https://raw.githubusercontent.com";function g(m){const E=m.getOptionalString("host")??u;let x=m.getOptionalString("apiBaseUrl"),O=m.getOptionalString("rawBaseUrl");const T=m.getOptionalString("token")?.trim(),I=m.getOptionalConfigArray("apps")?.map(y=>({appId:y.getNumber("appId"),clientId:y.getString("clientId"),clientSecret:y.getString("clientSecret"),webhookSecret:y.getString("webhookSecret"),privateKey:y.getString("privateKey"),allowedInstallationOwners:y.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,s.HO)(E))throw new Error(`Invalid GitHub integration config, '${E}' is not a valid host`);return x?x=(0,a.trimEnd)(x,"/"):E===u&&(x=C),O?O=(0,a.trimEnd)(O,"/"):E===u&&(O=f),{host:E,apiBaseUrl:x,rawBaseUrl:O,token:T,apps:I}}function h(m){const E=m.map(g);return E.some(x=>x.host===u)||E.push({host:u,apiBaseUrl:C,rawBaseUrl:f}),E}class d{integrationConfig;static factory=({config:E})=>{const x=h(E.getOptionalConfigArray("integrations.github")??[]);return(0,s.oS)(x.map(O=>new d(O)),O=>O.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 v((0,s.ku)(E),"tree")}resolveEditUrl(E){return v(E,"edit")}parseRateLimitInfo(E){return{isRateLimited:E.status===429||E.status===403&&E.headers.get("x-ratelimit-remaining")==="0"}}}function v(m,E){return m.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(x,O,T,I)=>`//${O}/${T}/${I}/${E}/`)}},59869:(G,S,t)=>{"use strict";t.d(S,{AY:()=>g,HO:()=>f,ku:()=>d,oS:()=>h});var s=t(52536),a=t.n(s),u=t(45250),C=t.n(u);function f(m){const E=new URL("http://example.com");return E.host=m,E.host===m}function g(m){try{return new URL(m),!0}catch{return!1}}function h(m,E){return{list(){return m},byUrl(x){try{const O=typeof x=="string"?new URL(x):x;return m.find(T=>E(T)===O.host)}catch{return}},byHost(x){return m.find(O=>E(O)===x)}}}function d(m){const{url:E,base:x,lineNumber:O}=m;try{return new URL(E),E}catch{}let T;if(E.startsWith("/")){const{href:I,filepath:y}=a()(x);T=new URL(I);const R=(0,u.trimEnd)(T.pathname.substring(0,T.pathname.length-y.length),"/");T.pathname=`${R}${E}`}else T=new URL(E,x);return T.search=new URL(x).search,O&&(T.hash=`L${O}`),T.toString()}function v(m){beforeAll(()=>m.listen({onUnhandledRequest:"error"})),afterAll(()=>m.close()),afterEach(()=>m.resetHandlers())}},85318:(G,S,t)=>{"use strict";var s={};t.r(s),t.d(s,{TechDocsPlugin:()=>g.Ju});var a=t(31085),u=t(14041),C=t(25873),f=t(18690),g=t(39278),h=t(85920),d=t(72020),v=t(99730),m=t(64947),E=t(12173),x=t(22020),O=t(68146),T=t(73970);function I({children:r}){return(0,f.Ri)()?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsx)(f.fS,{children:r})}const y=()=>(0,a.jsx)(E.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),R=({step:r,error:e})=>{let n="";return r==="load-config"?n=`The configuration failed to load, someone should have a look at this error: ${e.message}`:r==="load-chunk"&&(n=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,a.jsx)(I,{children:(0,a.jsx)(E.M,{statusMessage:n,stack:e.stack})})},F=({error:r,resetError:e,plugin:n})=>(0,a.jsx)(x.b,{title:`Error in ${n?.getId()}`,defaultExpanded:!0,error:r,children:(0,a.jsx)(m.A,{variant:"outlined",onClick:e,children:"Retry"})}),B={Progress:O.k,Router:T.Kd,NotFoundErrorPage:y,BootErrorPage:R,ErrorBoundaryFallback:F},X="Invalid discovery URL pattern,";class V{parts;static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),o=n.join("pluginId");let i;try{i=new URL(o)}catch{throw new Error(`${X} URL '${o}' is invalid`)}if(i.hash)throw new Error(`${X} URL must not have a hash`);if(i.search)throw new Error(`${X} URL must not have a query`);if(o.endsWith("/"))throw new Error(`${X} URL must not end with a slash`);return new V(n)}constructor(e){this.parts=e}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}}var k=t(96403),Q=t.n(k);class Z{isClosed=!1;terminatingError;observable=new(Q())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}));subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class K{isClosed;currentValue;terminatingError;observable;constructor(e){this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(Q())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}subscribers=new Set;[Symbol.observable](){return this}get closed(){return this.isClosed}next(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=e,this.subscribers.forEach(n=>n.next(e))}error(e){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=e,this.subscribers.forEach(n=>n.error(e))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(e=>e.complete())}subscribe(e,n,o){const i=typeof e=="function"?{next:e,error:n,complete:o}:e;return this.observable.subscribe(i)}}class J{subject=new Z;post(e){this.subject.next(e)}alert$(){return this.subject}}class H{captureEvent(e){}}class tt{alertApi;errorApi;constructor(e,n){this.alertApi=e,this.errorApi=n}post(e,n){return n?.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}}class Y{subject=new Z;post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}}class lt{static forward(e,n){window.addEventListener("unhandledrejection",o=>{e.post(o.reason,n)})}}const ht=new Map;class xt{namespace;errorApi;constructor(e,n){this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(Q())(o=>(this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}static hasSubscribed=!1;static create(e){return new xt(e.namespace??"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[n,o]of ht.entries())e.key?.startsWith(n)&&o.handleStorageChange(e.key)})}get(e){return this.snapshot(e).value}snapshot(e){let n,o="absent";try{const i=localStorage.getItem(this.getKeyName(e));i&&(n=JSON.parse(i,(c,P)=>(typeof P=="object"&&P!==null&&Object.freeze(P),P)),o="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:o}}forBucket(e){const n=`${this.namespace}/${e}`;return ht.has(n)||ht.set(n,new xt(n,this.errorApi)),ht.get(n)}async set(e,n){localStorage.setItem(this.getKeyName(e),JSON.stringify(n)),this.notifyChanges(e)}async remove(e){localStorage.removeItem(this.getKeyName(e)),this.notifyChanges(e)}observe$(e){return xt.hasSubscribed||(xt.addStorageEventListener(),xt.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!e?.startsWith(this.namespace))return;const n=e?.slice(`${this.namespace}/`.length);n.includes("/")||this.notifyChanges(decodeURIComponent(n))}getKeyName(e){return`${this.namespace}/${encodeURIComponent(e)}`}notifyChanges(e){const n=this.snapshot(e);for(const o of this.subscribers)o.next(n)}subscribers;observable}function yt(r){let e=r.baseImplementation||t.g.fetch;const n=[r.middleware??[]].flat().reverse();for(const o of n)e=o.apply(e);return{fetch:e}}class St{identityApi;allowUrl;headerName;headerValue;static create(e){const n=vt(e),o=e.header?.name||"authorization",i=e.header?.value||(c=>`Bearer ${c}`);return new St(e.identityApi,n,o,i)}constructor(e,n,o,i){this.identityApi=e,this.allowUrl=n,this.headerName=o,this.headerValue=i}apply(e){return async(n,o)=>{const i=new Request(n,o),{token:c}=await this.identityApi.getCredentials();return i.headers.get(this.headerName)||typeof c!="string"||!c||!this.allowUrl(i.url)?e(n,o):(i.headers.set(this.headerName,this.headerValue(c)),e(i))}}}function vt(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?Et(r.urlPrefixAllowlist):r.config?Et([r.config.getString("backend.baseUrl")]):()=>!1}function Et(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(o=>n===o||n.startsWith(`${o}/`))}function dt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class gt{discoveryApi;constructor(e){this.discoveryApi=e}apply(e){return async(n,o)=>{const i=new Request(n,o),c="plugin://";if(!i.url.startsWith(c))return e(n,o);const{hostname:P,pathname:b,search:D,hash:W,username:q,password:at}=new URL(`http://${i.url.substring(c.length)}`);let et=await this.discoveryApi.getBaseUrl(P);if(q||at){const Tt=new URL(et),Kt=`${q}${at?`:${at}`:""}@`;et=`${Tt.protocol}//${Kt}${Tt.host}${Tt.pathname}`}const st=`${dt(et,b)}${D}${W}`;return e(st,typeof n=="string"||Ct(n)?o:n)}}}function Ct(r){return typeof r=="object"&&r?.constructor===URL}class pt{static resolvePluginProtocol(e){return new gt(e.discoveryApi)}static injectIdentityAuth(e){return St.create(e)}constructor(){}}function Pt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function It(r,...e){const n=new Set(r);for(const o of e)for(const i of o)n.add(i);return n}class Ut{requests=[];subject=new K(this.getCurrentPending());request(e){return new Promise((n,o)=>{this.requests.push({scopes:e,resolve:n,reject:o}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(o=>Pt(e,o.scopes)?(o.resolve(n),!1):!0),this.subject.next(this.getCurrentPending())}reject(e){this.requests.forEach(n=>n.reject(e)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const e=this.requests.length===0?void 0:this.requests.slice(1).reduce((n,o)=>It(n,o.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}}class Mt{subject=new K([]);currentRequests=[];handlerCount=0;createAuthRequester(e){const n=new Ut,o=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:i=>{const c=this.currentRequests.slice(),P=this.makeAuthRequest(i,e);P?c[o]=P:delete c[o],this.currentRequests=c,this.subject.next(c.filter(Boolean))}}),i=>n.request(i)}makeAuthRequest(e,n){const{scopes:o}=e;if(o)return{provider:n.provider,trigger:async()=>{const i=await n.onAuthRequest(o);e.resolve(i)},reject:()=>{const i=new Error("Login failed, rejected by user");i.name="RejectedError",e.reject(i)}}}authRequest$(){return this.subject}}function bt(r){return new Promise((e,n)=>{const o=r.width||500,i=r.height||700,c=window.screen.width/2-o/2,P=window.screen.height/2-i/2,b=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${o},height=${i},top=${P},left=${c}`);let D="";if(!b||typeof b.closed>"u"||b.closed){const et=new Error("Failed to open auth popup.");et.name="PopupRejectedError",n(et);return}const W=et=>{if(et.source!==b||et.origin!==r.origin)return;const{data:st}=et;if(st.type==="config_info"){D=st.targetOrigin;return}if(st.type!=="authorization_response")return;const Tt=st;if("error"in Tt){const Kt=new Error(Tt.error.message);Kt.name=Tt.error.name,n(Kt)}else e(Tt.response);at()},q=setInterval(()=>{if(b.closed){const et=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,st=new Error(et);st.name="PopupClosedError",n(st),at()}},100);function at(){window.removeEventListener("message",W),clearInterval(q)}window.addEventListener("message",W)})}let U=!1;function z(r){return[...r].join(" ")}class rt{discoveryApi;environment;provider;joinScopesFunc;authRequester;sessionTransform;enableExperimentalRedirectFlow;popupOptions;constructor(e){const{configApi:n,discoveryApi:o,environment:i,provider:c,joinScopes:P=z,oauthRequestApi:b,sessionTransform:D=q=>q,popupOptions:W}=e;!U&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),U=!0),this.enableExperimentalRedirectFlow=n?n.getOptionalBoolean("enableExperimentalRedirectFlow")??!1:!1,this.authRequester=b.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=P,this.sessionTransform=D,this.popupOptions=W}async createSession(e){return e.instantPopup?this.enableExperimentalRedirectFlow?this.executeRedirect(e.scopes):this.showPopup(e.scopes):this.authRequester(e.scopes)}async refreshSession(e){const n=await fetch(await this.buildUrl("/refresh",{optional:!0,...e&&{scope:this.joinScopesFunc(e)}}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(i=>{throw new Error(`Auth refresh request failed, ${i}`)});if(!n.ok){const i=new Error(`Auth refresh request failed, ${n.statusText}`);throw i.status=n.status,i}const o=await n.json();if(o.error){const i=new Error(o.error.message);throw o.error.name&&(i.name=o.error.name),i}return await this.sessionTransform(o)}async removeSession(){const e=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(n=>{throw new Error(`Logout request failed, ${n}`)});if(!e.ok){const n=new Error(`Logout request failed, ${e.statusText}`);throw n.status=e.status,n}}async showPopup(e){const n=this.joinScopesFunc(e),o=await this.buildUrl("/start",{scope:n,origin:window.location.origin,flow:"popup"}),i=this.popupOptions?.size?.fullscreen?window.screen.width:this.popupOptions?.size?.width||450,c=this.popupOptions?.size?.fullscreen?window.screen.height:this.popupOptions?.size?.height||730,P=await bt({url:o,name:`${this.provider.title} Login`,origin:new URL(o).origin,width:i,height:c});return await this.sessionTransform(P)}async executeRedirect(e){const n=this.joinScopesFunc(e);return window.location.href=await this.buildUrl("/start",{scope:n,origin:window.location.origin,redirectUrl:window.location.href,flow:"redirect"}),new Promise(()=>{})}async buildUrl(e,n){const o=await this.discoveryApi.getBaseUrl("auth"),i=this.buildQueryString({...n,env:this.environment});return`${o}/${this.provider.id}${e}${i}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([o,i])=>{if(typeof i=="string")return`${encodeURIComponent(o)}=${encodeURIComponent(i)}`;if(i)return encodeURIComponent(o)}).filter(Boolean).join("&");return n?`?${n}`:""}}function mt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class ut{options;constructor(e){this.options=e}sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const o=this.options.sessionScopes(e);return mt(o,n)}getExtendedScope(e,n){const o=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const i=this.options.sessionScopes(e);for(const c of i)o.add(c)}if(n)for(const i of n)o.add(i);return o}}var ot=t(55309),At;(function(r){r.SignedIn="SignedIn",r.SignedOut="SignedOut"})(At||(At={}));const $t=(0,ot.y)({id:"core.auth.google"}),kt=(0,ot.y)({id:"core.auth.github"}),jt=(0,ot.y)({id:"core.auth.okta"}),Vt=(0,ot.y)({id:"core.auth.gitlab"}),de=(0,ot.y)({id:"core.auth.microsoft"}),ie=(0,ot.y)({id:"core.auth.onelogin"}),ue=(0,ot.y)({id:"core.auth.bitbucket"}),Yt=(0,ot.y)({id:"core.auth.bitbucket-server"}),ne=(0,ot.y)({id:"core.auth.atlassian"}),Ft=(0,ot.y)({id:"core.auth.vmware-cloud"});class Zt{subject=new K(At.SignedOut);signedIn=!1;setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?At.SignedIn:At.SignedOut))}sessionState$(){return this.subject}}class Se{connector;helper;sessionScopesFunc;sessionShouldRefreshFunc;stateTracker=new Zt;refreshPromise;currentSession;constructor(e){const{connector:n,defaultScopes:o=new Set,sessionScopes:i,sessionShouldRefresh:c}=e;this.connector=n,this.sessionScopesFunc=i,this.sessionShouldRefreshFunc=c,this.helper=new ut({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 mt(c,i)&&(this.currentSession=o),o}catch(o){if(e.optional)return;throw o}}if(!this.currentSession&&!e.instantPopup)try{const n=await this.collapsedSessionRefresh(e.scopes);return this.currentSession=n,this.getSession(e)}catch{}if(!e.optional)return this.currentSession=await this.connector.createSession({...e,scopes:this.helper.getExtendedScope(this.currentSession,e.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(e){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession(this.helper.getExtendedScope(this.currentSession,e));try{const n=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),n}finally{delete this.refreshPromise}}}const Ke={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class Gt{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Ke,oauthRequestApi:P,defaultScopes:b=[],scopeTransform:D=et=>et,popupOptions:W}=e,q=new rt({configApi:n,discoveryApi:o,environment:i,provider:c,oauthRequestApi:P,sessionTransform({backstageIdentity:et,...st}){const Tt={...st,providerInfo:{idToken:st.providerInfo.idToken,accessToken:st.providerInfo.accessToken,scopes:Gt.normalizeScopes(D,st.providerInfo.scope),expiresAt:st.providerInfo.expiresInSeconds?new Date(Date.now()+st.providerInfo.expiresInSeconds*1e3):void 0}};return et&&(Tt.backstageIdentity={token:et.token,identity:et.identity,expiresAt:et.expiresInSeconds?new Date(Date.now()+et.expiresInSeconds*1e3):void 0}),Tt},popupOptions:W}),at=new Se({connector:q,defaultScopes:new Set(b),sessionScopes:et=>et.providerInfo.scopes,sessionShouldRefresh:et=>{let st=1/0;return et.providerInfo?.expiresAt&&(st=Math.min(st,(et.providerInfo.expiresAt.getTime()-Date.now())/1e3)),et.backstageIdentity?.expiresAt&&(st=Math.min(st,(et.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),st<60*5}});return new Gt({sessionManager:at,scopeTransform:D})}sessionManager;scopeTransform;constructor(e){this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const o=Gt.normalizeScopes(this.scopeTransform,e);return(await this.sessionManager.getSession({...n,scopes:o}))?.providerInfo.accessToken??""}async getIdToken(e={}){return(await this.sessionManager.getSession({...e,scopes:new Set(["openid"])}))?.providerInfo.idToken??""}async getBackstageIdentity(e={}){return(await this.sessionManager.getSession(e))?.backstageIdentity}async getProfile(e={}){return(await this.sessionManager.getSession(e))?.profile}static normalizeScopes(e,n){if(!n)return new Set;const o=Array.isArray(n)?n:n.split(/[\s|,]/).filter(Boolean);return new Set(e(o))}}const Ne={id:"google",title:"Google",icon:()=>null},ve="https://www.googleapis.com/auth/";class Ge{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:P=Ne,defaultScopes:b=["openid",`${ve}userinfo.email`,`${ve}userinfo.profile`]}=e;return Gt.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:P,environment:c,defaultScopes:b,scopeTransform(D){return D.map(W=>W==="openid"?W:W==="profile"||W==="email"?`${ve}userinfo.${W}`:W.startsWith(ve)?W:`${ve}${W}`)}})}}const Be={id:"microsoft",title:"Microsoft",icon:()=>null};class Ee{oauth2;configApi;environment;provider;oauthRequestApi;discoveryApi;scopeTransform;static MicrosoftGraphID="00000003-0000-0000-c000-000000000000";static create(e){return new Ee(e)}constructor(e){const{configApi:n,environment:o="development",provider:i=Be,oauthRequestApi:c,discoveryApi:P,defaultScopes:b=["openid","offline_access","profile","email","User.Read"],scopeTransform:D=W=>W.concat("offline_access")}=e;this.configApi=n,this.environment=o,this.provider=i,this.oauthRequestApi=c,this.discoveryApi=P,this.scopeTransform=D,this.oauth2={[Ee.MicrosoftGraphID]:Gt.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:b})}}microsoftGraph(){return this.oauth2[Ee.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(Ee.resourceForScope).filter(i=>i!=="openid"))];if(n.length>1)return Promise.reject(new Error(`Requested access token with scopes from multiple Azure resources: ${n.join(", ")}. Access tokens can only have a single audience.`));const o=n[0]??Ee.MicrosoftGraphID;return Promise.resolve(o)}static resourceForScope(e){const n=e.match(/^(?<resourceURI>.*)\/(?<scp>[^\/]*)$/)?.groups;if(n){const{resourceURI:o}=n;return o.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return Ee.MicrosoftGraphID}}async getAccessToken(e,n){const o=e===void 0?Ee.MicrosoftGraphID:await Ee.resourceForScopes(Array.isArray(e)?e.join(" "):e);return o in this.oauth2||(this.oauth2[o]=Gt.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[o].getAccessToken(e,n)}getIdToken(e){return this.microsoftGraph().getIdToken(e)}getProfile(e){return this.microsoftGraph().getProfile(e)}getBackstageIdentity(e){return this.microsoftGraph().getBackstageIdentity(e)}signIn(){return this.microsoftGraph().signIn()}signOut(){return this.microsoftGraph().signOut()}sessionState$(){return this.microsoftGraph().sessionState$()}}const tn={id:"github",title:"GitHub",icon:()=>null};class Ye{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=tn,oauthRequestApi:P,defaultScopes:b=["read:user"]}=e;return Gt.create({configApi:n,discoveryApi:o,oauthRequestApi:P,provider:c,environment:i,defaultScopes:b})}}const an={id:"okta",title:"Okta",icon:()=>null},Ue=new Set(["openid","profile","email","phone","address","groups","offline_access"]),$e="okta.";class ke{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=an,oauthRequestApi:P,defaultScopes:b=["openid","email","profile","offline_access"]}=e;return Gt.create({configApi:n,discoveryApi:o,oauthRequestApi:P,provider:c,environment:i,defaultScopes:b,scopeTransform(D){return D.map(W=>Ue.has(W)||W.startsWith($e)?W:`${$e}${W}`)}})}}const he={id:"gitlab",title:"GitLab",icon:()=>null};class Qe{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=he,oauthRequestApi:P,defaultScopes:b=["read_user"]}=e;return Gt.create({configApi:n,discoveryApi:o,oauthRequestApi:P,provider:c,environment:i,defaultScopes:b})}}const en={id:"onelogin",title:"onelogin",icon:()=>null},L=new Set(["openid","profile","email","phone","address","groups","offline_access"]),l="onelogin.";class A{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=en,oauthRequestApi:P}=e;return Gt.create({configApi:n,discoveryApi:o,oauthRequestApi:P,provider:c,environment:i,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(b){return b.map(D=>L.has(D)||D.startsWith(l)?D:`${l}${D}`)}})}}const j={id:"bitbucket",title:"Bitbucket",icon:()=>null};class nt{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=j,oauthRequestApi:P,defaultScopes:b=["account"]}=e;return Gt.create({configApi:n,discoveryApi:o,oauthRequestApi:P,provider:c,environment:i,defaultScopes:b})}}const it={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class ft{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=it,oauthRequestApi:P,defaultScopes:b=["PROJECT_ADMIN"]}=e;return Gt.create({configApi:n,discoveryApi:o,oauthRequestApi:P,provider:c,environment:i,defaultScopes:b})}}const Jt={id:"atlassian",title:"Atlassian",icon:()=>null};class Qt{static create(e){const{configApi:n,discoveryApi:o,environment:i="development",provider:c=Jt,oauthRequestApi:P}=e;return Gt.create({configApi:n,discoveryApi:o,oauthRequestApi:P,provider:c,environment:i})}}const Xt={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class ge{static create(e){const{configApi:n,discoveryApi:o,oauthRequestApi:i,environment:c="development",provider:P=Xt,defaultScopes:b=["openid"]}=e;return Gt.create({configApi:n,discoveryApi:o,oauthRequestApi:i,provider:P,environment:c,defaultScopes:b})}}var zt=t(12935),se=t(57405),ee=t(65461),Fe=t(36017),We=t(99303),nn=t(39837);const cn=(0,ot.y)({id:"core.storage"});var re=t(70795),oe=t(16009);const Re=(0,ot.y)({id:"core.oauthrequest"});var es=t(96824),Ze=t(70835),ns=t(10288),Rn=t.n(ns),wn=t(52964),Ht=t(46195),sn=t(54241);const fn=Ht.z.lazy(()=>Ht.z.object({rule:Ht.z.string(),resourceType:Ht.z.string(),params:Ht.z.record(Ht.z.any()).optional()}).or(Ht.z.object({anyOf:Ht.z.array(fn).nonempty()})).or(Ht.z.object({allOf:Ht.z.array(fn).nonempty()})).or(Ht.z.object({not:fn}))),Ns=Ht.z.object({result:Ht.z.literal(sn.b.ALLOW).or(Ht.z.literal(sn.b.DENY))}),ss=Ht.z.union([Ht.z.object({result:Ht.z.literal(sn.b.ALLOW).or(Ht.z.literal(sn.b.DENY))}),Ht.z.object({result:Ht.z.literal(sn.b.CONDITIONAL),pluginId:Ht.z.string(),resourceType:Ht.z.string(),conditions:fn})]),rs=(r,e)=>Ht.z.object({items:Ht.z.array(Ht.z.intersection(Ht.z.object({id:Ht.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:o})=>e.has(o)),{message:"Items in response do not match request"})});class os{enabled;discovery;constructor(e){this.discovery=e.discovery,this.enabled=e.config.getOptionalBoolean("permission.enabled")??!1}async authorize(e,n){return this.makeRequest(e,Ns,n)}async authorizeConditional(e,n){return this.makeRequest(e,ss,n)}async makeRequest(e,n,o){if(!this.enabled)return e.map(q=>({result:sn.b.ALLOW}));const i={items:e.map(q=>({id:wn.A(),...q}))},c=await this.discovery.getBaseUrl("permission"),P=await Rn()(`${c}/authorize`,{method:"POST",body:JSON.stringify(i),headers:{...this.getAuthorizationHeader(o?.token),"content-type":"application/json"}});if(!P.ok)throw await Ze.o.fromResponse(P);const b=await P.json(),W=rs(n,new Set(i.items.map(({id:q})=>q))).parse(b).items.reduce((q,at)=>(q[at.id]=at,q),{});return i.items.map(q=>W[q.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}}class mn{permissionClient;identityApi;constructor(e,n){this.permissionClient=e,this.identityApi=n}static create(e){const{config:n,discovery:o,identity:i}=e,c=new os({discovery:o,config:n});return new mn(c,i)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}}const In=[(0,zt.b)({api:se.I,deps:{configApi:ee.U},factory:({configApi:r})=>V.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,zt.b)({api:Fe.k,deps:{},factory:()=>new J}),(0,zt.b)({api:We.c,deps:{},factory:()=>new H}),(0,zt.b)({api:nn.m,deps:{alertApi:Fe.k},factory:({alertApi:r})=>{const e=new tt(r,new Y);return lt.forward(e,{hidden:!1}),e}}),(0,zt.b)({api:cn,deps:{errorApi:nn.m},factory:({errorApi:r})=>xt.create({errorApi:r})}),(0,zt.b)({api:re.a,deps:{configApi:ee.U,identityApi:oe.K,discoveryApi:se.I},factory:({configApi:r,identityApi:e,discoveryApi:n})=>yt({middleware:[pt.resolvePluginProtocol({discoveryApi:n}),pt.injectIdentityAuth({identityApi:e,config:r})]})}),(0,zt.b)({api:Re,deps:{},factory:()=>new Mt}),(0,zt.b)({api:$t,deps:{discoveryApi:se.I,oauthRequestApi:Re,configApi:ee.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ge.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,zt.b)({api:de,deps:{discoveryApi:se.I,oauthRequestApi:Re,configApi:ee.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ee.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,zt.b)({api:kt,deps:{discoveryApi:se.I,oauthRequestApi:Re,configApi:ee.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ye.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,zt.b)({api:jt,deps:{discoveryApi:se.I,oauthRequestApi:Re,configApi:ee.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ke.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,zt.b)({api:Vt,deps:{discoveryApi:se.I,oauthRequestApi:Re,configApi:ee.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Qe.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,zt.b)({api:ie,deps:{discoveryApi:se.I,oauthRequestApi:Re,configApi:ee.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>A.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,zt.b)({api:ue,deps:{discoveryApi:se.I,oauthRequestApi:Re,configApi:ee.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>nt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,zt.b)({api:Yt,deps:{discoveryApi:se.I,oauthRequestApi:Re,configApi:ee.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ft.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,zt.b)({api:ne,deps:{discoveryApi:se.I,oauthRequestApi:Re,configApi:ee.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Qt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,zt.b)({api:Ft,deps:{discoveryApi:se.I,oauthRequestApi:Re,configApi:ee.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ge.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,zt.b)({api:es.x,deps:{discovery:se.I,identity:oe.K,config:ee.U},factory:({config:r,discovery:e,identity:n})=>mn.create({config:r,discovery:e,identity:n})})];var Dn=t(14451),as=t(27799),Ln=t(94389),Mn=t(20947),is=t(20473),jn=t(45917),yn=t(39347),cs=t(63309),ls=t(82451),ds=t(85121),Bn=t(17400),us=t(42226),hs=t(69550),Un=t(52755),$n=t(89350),gs=t(8911),vn=t(33602),En=t(48108),ps=t(77225),Fn=t(55700),Nn=t(71865);const fs={brokenImage:as.A,catalog:gs.A,scaffolder:Mn.A,techdocs:is.A,search:jn.A,chat:yn.A,dashboard:cs.A,docs:ls.A,email:ds.A,github:us.A,group:vn.A,help:hs.A,"kind:api":Bn.A,"kind:component":$n.A,"kind:domain":Dn.A,"kind:group":vn.A,"kind:location":Un.A,"kind:system":Ln.A,"kind:user":En.A,"kind:resource":Fn.A,"kind:template":Nn.A,user:En.A,warning:ps.A};var ms=t(58733),ys=t(55288),vs=t(91360),Es=t(50868),kn=t(12285),As=t(88714),xs=t(14360);xs.A.configure(r=>`v5-${r}`);const Cs=(0,ys.A)({productionPrefix:"jss4-"});function Wn(r){const{children:e,theme:n,noCssBaseline:o=!1}=r,i=n.getTheme("v4"),c=n.getTheme("v5");let P;o||(P=(0,a.jsx)(ms.Ay,{}));let b=(0,a.jsxs)(a.Fragment,{children:[P,e]});return i&&(b=(0,a.jsx)(vs.Ay,{generateClassName:Cs,children:(0,a.jsx)(Es.A,{theme:i,children:b})})),c&&(b=(0,a.jsx)(kn.A,{injectFirst:!0,children:(0,a.jsx)(As.A,{theme:c,children:b})})),b}const Kn={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 An=t(98392),bs=t(56558);const Oe={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")`},De={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 Le(r){const{colors:e,shape:n,options:o}=r,c=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,P=`${n}, ${c}`,b=o?.fontColor??"#FFFFFF";return{colors:e,shape:n,backgroundImage:P,fontColor:b}}const Ss={home:Le({colors:De.teal,shape:Oe.wave}),documentation:Le({colors:De.pinkSea,shape:Oe.wave2}),tool:Le({colors:De.purpleSky,shape:Oe.round}),service:Le({colors:De.marineBlue,shape:Oe.wave}),website:Le({colors:De.veryBlue,shape:Oe.wave}),library:Le({colors:De.rubyRed,shape:Oe.wave}),other:Le({colors:De.darkGrey,shape:Oe.wave}),app:Le({colors:De.toastyOrange,shape:Oe.wave}),apis:Le({colors:De.teal,shape:Oe.wave2}),card:Le({colors:De.greens,shape:Oe.wave})},Os=16,p='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',w="home",M={htmlFontSize:Os,fontFamily:p,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 $(r){const{palette:e,htmlFontSize:n=Os,fontFamily:o=p,defaultPageTheme:i=w,pageTheme:c=Ss,typography:P}=r;if(!c[i])throw new Error(`${i} is not defined in pageTheme.`);return M.htmlFontSize=n,M.fontFamily=o,{palette:e,typography:P??M,page:c[i],getPageTheme:({themeId:b})=>c[b]??c[i]}}var N=t(80012);const _={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,N.a)(r.palette.textVerySubtle,.2):(0,N.e$)(r.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:r.palette.mode==="dark"?(0,N.a)(r.palette.textVerySubtle,.2):(0,N.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,N.e$)(r.palette.link,.3),background:(0,N.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"}}}},ct=r=>(...e)=>{const n=e.length===0?[1]:e,o=(i,c)=>typeof i=="string"?i:c*i;return n.map(i=>{const c=o(i,r);return typeof c=="number"?`${c}px`:c}).join(" ")};function Ot(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function Rt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},o=r.spacing(1);return typeof o=="number"&&(n.spacing=ct(o)),Object.fromEntries(Object.entries(e).map(([i,c])=>typeof c=="function"?[i,c({theme:n})]:[i,c]))}return e}}const Lt=/^&.Mui-([\w-]+)$/;function wt(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const o=r[n];if(!(!o||typeof o!="object"))for(const i of Object.keys(o)){const c=i,P=c.match(Lt);if(P){const[,b]=P,{[c]:D,...W}=o;D&&(e={...e,[n]:W,[b]:D})}}}return e}function Bt(r,e={}){const n={},o={};for(const i of Object.keys(e)){const c=e[i];c&&("styleOverrides"in c&&(i==="MuiCssBaseline"?n[i]=Ot(r,c.styleOverrides):n[i]=wt(Rt(r,c.styleOverrides))),"defaultProps"in c&&(o[i]=c.defaultProps))}return{overrides:n,props:o}}class Dt{#t=new Map;constructor(e,n){this.#t=new Map,e&&this.#t.set("v4",e),n&&this.#t.set("v5",n)}getTheme(e){return this.#t.get(e)}}function ce(r){const e=$(r),n={..._,...r.components},o=(0,bs.A)({...e,components:n}),i=Bt(o,n),c={...(0,An.A)(e),...i};return new Dt(c,o)}function le(r){const e=adaptV4Theme(r),n=createTheme(r);return new Dt(n,createV5Theme(e))}const Wt={light:ce({palette:Kn.light}),dark:ce({palette:Kn.dark})};var pe=t(75962),_t=t(87145);const ae=[{id:"light",title:"Light Theme",variant:"light",icon:(0,a.jsx)(_t.A,{}),Provider:({children:r})=>(0,a.jsx)(Wn,{theme:Wt.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,a.jsx)(pe.A,{}),Provider:({children:r})=>(0,a.jsx)(Wn,{theme:Wt.dark,children:r})}];var Nt=t(73466),qt=t(39067),te=t.n(qt);class Me{holders;constructor(...e){this.holders=e}get(e){for(const n of this.holders){const o=n.get(e);if(o)return o}}}var Ae=t(43836),ze=t(10602);const Je=(0,Ae.tK)("api-context"),Xe=r=>{const{apis:e,children:n}=r,o=(0,u.useContext)(Je)?.atVersion(1),i=o?new Me(e,o):e;return(0,a.jsx)(Je.Provider,{value:(0,ze.B)({1:i}),children:n})};Xe.propTypes={apis:te().shape({get:te().func.isRequired}).isRequired,children:te().node};const we=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function ln(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Ts(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Ts):Object.fromEntries(Object.entries(r).map(([e,n])=>[e,Ts(n)]))}function xn(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:xn(e);if(typeof r!="object"||Array.isArray(r))return r;const n=ln(e)?e:{},o={};for(const i of new Set([...Object.keys(r),...Object.keys(n)])){const c=xn(r[i],n[i]);c!==void 0&&(o[i]=c)}return o}function Ps(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 je={type(r,e,n,o){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${o}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class dn{data;context;fallback;prefix;filteredKeys;notifiedFilteredKeys;static fromConfigs(e){return e.length===0?new dn(void 0):e.reduce((n,{data:o,context:i,filteredKeys:c,deprecatedKeys:P})=>{const b=new dn(o,i,n);if(b.filteredKeys=c,P)for(const{key:D,description:W}of P)console.warn(`The configuration key '${D}' of ${i} is deprecated and may be removed soon. ${W||""}`);return b},void 0)}constructor(e,n="mock-config",o,i=""){this.data=e,this.context=n,this.fallback=o,this.prefix=i,this.notifiedFilteredKeys=new Set}has(e){const n=this.readValue(e);return n===null?!1:n!==void 0?!0:this.fallback?.has(e)??!1}keys(){const e=this.data?Object.keys(this.data):[],n=this.fallback?.keys()??[];return[...new Set([...e,...n])].filter(o=>this.data?.[o]!==null)}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(je.missing(this.fullKey(e??""),this.context));return n}getOptional(e){const n=Ts(this.readValue(e)),o=this.fallback?.getOptional(e);if(n!==null)return n===void 0?xn(o):o===void 0?xn(n):xn(n,o)}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(je.missing(this.fullKey(e),this.context));return n}getOptionalConfig(e){const n=this.readValue(e),o=this.fallback?.getOptionalConfig(e);if(ln(n))return this.copy(n,e,o);if(n!==null){if(n!==void 0)throw new TypeError(je.type(this.fullKey(e),this.context,Ps(n),"object"));return o}}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(je.missing(this.fullKey(e),this.context));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,o=>{if(!Array.isArray(o))return{expected:"object-array"};for(const[i,c]of o.entries())if(!ln(c))return{expected:"object-array",value:c,key:`${e}[${i}]`};return!0});if(n)return n.map((o,i)=>this.copy(o,`${e}[${i}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(je.missing(this.fullKey(e),this.context));return n}getOptionalNumber(e){const n=this.readConfigValue(e,i=>typeof i=="number"||typeof i=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const o=Number(n);if(!Number.isFinite(o))throw new Error(je.convert(this.fullKey(e),this.context,"number"));return o}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(je.missing(this.fullKey(e),this.context));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,i=>typeof i=="boolean"||typeof i=="number"||typeof i=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const o=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(o))return!0;if(/^(?:n|no|false|0|off)$/i.test(o))return!1;throw new Error(je.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(je.missing(this.fullKey(e),this.context));return n}getOptionalString(e){return this.readConfigValue(e,n=>typeof n=="string"&&n!==""||{expected:"string"})}getStringArray(e){const n=this.getOptionalStringArray(e);if(n===void 0)throw new Error(je.missing(this.fullKey(e),this.context));return n}getOptionalStringArray(e){return this.readConfigValue(e,n=>{if(!Array.isArray(n))return{expected:"string-array"};for(const[o,i]of n.entries())if(typeof i!="string"||i==="")return{expected:"string-array",value:i,key:`${e}[${o}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,o){const i=new dn(e,this.context,o,this.fullKey(n));return i.filteredKeys=this.filteredKeys,i}readConfigValue(e,n){const o=this.readValue(e);if(o===void 0)return this.fallback?.readConfigValue(e,n);if(o===null)return;const i=n(o);if(i!==!0){const{key:c=e,value:P=o,expected:b}=i;throw new TypeError(je.type(this.fullKey(c),this.context,Ps(P),b))}return o}readValue(e){const n=e?e.split("."):[];for(const i of n)if(!we.test(i))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let o=this.data;for(const[i,c]of n.entries())if(ln(o))o=o[c];else if(o!=null){const P=this.fullKey(n.slice(0,i).join("."));throw new TypeError(je.type(P,this.context,Ps(o),"object"))}return o}}const Cn="theme";class zn{themes;static createWithStorage(e){const n=new zn(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(Cn)??void 0;return n.setActiveThemeId(o),n.activeThemeId$().subscribe(i=>{i?window.localStorage.setItem(Cn,i):window.localStorage.removeItem(Cn)}),window.addEventListener("storage",i=>{if(i.key===Cn){const c=localStorage.getItem(Cn)??void 0;n.setActiveThemeId(c)}}),n}activeThemeId;subject;constructor(e){this.themes=e,this.subject=new K(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 un=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)===un.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[o,i]of Object.entries(e.states))this.flags.set(o,i);const n=Array.from(this.flags.entries()).filter(([,o])=>o===un.S.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(n)))}load(){try{const e=window.localStorage.getItem("featureFlags");if(!e)return new Map;const n=JSON.parse(e);if(typeof n!="object"||n===null||Array.isArray(n))return new Map;const o=Object.entries(n).filter(([i,c])=>(ks(i),c===un.S.Active));return new Map(o)}catch{return new Map}}}const Hn=(0,ot.y)({id:"core.apptheme"}),Ws=(0,ot.y)({id:"core.applanguage"});var Fr=t(56038),Rs;(function(r){r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static"})(Rs||(Rs={}));class Nr{factories=new Map;register(e,n){const o=Rs[e],i=this.factories.get(n.api.id);return i&&i.priority>=o?!1:(this.factories.set(n.api.id,{priority:o,factory:n}),!0)}get(e){const n=this.factories.get(e.id);if(n)return n.factory}getAllApis(){const e=new Set;for(const{factory:n}of this.factories.values())e.add(n.api);return e}}class ws{factories;static validateFactories(e,n){for(const o of n){const i=[o],c=new Set;for(;i.length;){const P=i.shift(),b=e.get(P);if(b)for(const D of Object.values(b.deps)){if(D.id===o.id)throw new Error(`Circular dependency of api factory for ${o}`);c.has(D)||(c.add(D),i.push(D))}}}}apis;constructor(e){this.factories=e,this.apis=new Map}get(e){return this.load(e)}load(e,n=[]){const o=this.apis.get(e.id);if(o)return o;const i=this.factories.get(e);if(!i)return;if(n.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const c=this.loadDeps(e,i.deps,[...n,i.api]),P=i.factory(c);return this.apis.set(e.id,P),P}loadDeps(e,n,o){const i={};for(const c in n)if(n.hasOwnProperty(c)){const P=n[c],b=this.load(P,o);if(!b)throw new Error(`No API factory available for dependency ${P} of dependent ${e}`);i[c]=b}return i}}function kr(r){const e={};for(const o in r.collectors)r.collectors.hasOwnProperty(o)&&(e[o]=r.collectors[o]());const n=[{node:u.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:o,parent:i,contexts:c}=n.shift();u.Children.forEach(o,P=>{if(!(0,u.isValidElement)(P))return;const b={};for(const D in e)if(e.hasOwnProperty(D)){const W=e[D];b[D]=W.visit(W.accumulator,P,i,c[D])}for(const D of r.discoverers){const W=D(P);W&&n.push({node:W,parent:P,contexts:b})}})}return Object.fromEntries(Object.entries(e).map(([o,i])=>[o,i.accumulator]))}function Vn(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 xe=t(19402);const zr=Vn(()=>new Set,(r,e)=>{const n=(0,xe.E)(e,"core.plugin");n&&r.add(n)});var bn=t(72427);const Ks=r=>{const{children:e}=r,n=(0,bn.gf)(un.B),o="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,a.jsx)(a.Fragment,{children:o?e:null})};(0,xe.h)(Ks,"core.featureFlagged",!0);const Gn={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function Yn(r){const e=r;return e?.type?e.type.displayName??e.type.name??String(e.type):String(e)}const zs=r=>{const e=new Set;return r&&e.add(r),e};function Hs(r,e=new Array){return u.Children.forEach(r,n=>{if(!(0,u.isValidElement)(n))return;const o=(0,xe.E)(n,"core.mountPoint");if(o){const i=(0,xe.E)(n,"core.plugin");e.push({routeRef:o,plugin:i})}Hs(n.props.children,e)}),e}const Hr=Vn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(o?.isElementAncestor)return o;if(n?.props.element===e)return{...o,isElementAncestor:!0};const i=e.props?.path,c=(0,xe.E)(e,"core.mountPoint");if(c&&i)throw new Error(`Path property may not be set directly on a routable extension "${Yn(e)}"`);const P=o?.obj?.children??r.objects;if(i!==void 0){if(typeof i!="string")throw new Error(`Element path must be a string at "${Yn(e)}"`);const b=i.startsWith("/")?i.slice(1):i,D=e.props.element;if((0,xe.E)(e,"core.gatherMountPoints")){if(D)throw new Error(`Mount point gatherers may not have an element prop "${Yn(e)}"`);const W={path:b,element:"gathered",routeRefs:new Set,caseSensitive:!!e.props?.caseSensitive,children:[Gn],plugins:new Set};return P.push(W),{obj:W,gatherPath:b,routeRef:o?.routeRef,gatherRouteRef:o?.routeRef}}if(D){const[W,...q]=Hs(D);if(q.length>0)throw new Error(`Route element with path "${i}" may not contain multiple routable extensions`);if(!W)return o;const{routeRef:at,plugin:et}=W,st={path:b,element:"mounted",routeRefs:new Set([at]),caseSensitive:!!e.props?.caseSensitive,children:[Gn],plugins:zs(et)};return P.push(st),r.paths.set(at,b),r.parents.set(at,o?.routeRef),{obj:st,routeRef:at??o?.routeRef,gatherPath:b,gatherRouteRef:o?.gatherRouteRef}}}if(c){if(o?.gatherPath===void 0)throw new Error(`Routable extension "${Yn(e)}" with mount point "${c}" must be assigned a path`);o?.obj?.routeRefs.add(c);const b=(0,xe.E)(e,"core.plugin");return b&&o?.obj?.plugins.add(b),r.paths.set(c,o.gatherPath),r.parents.set(c,o?.gatherRouteRef),{...o,routeRef:c}}return o}),Vr=Vn(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,o)=>{if(n?.props.element===e)return o;let i=o?.obj,c=o?.routeRef,P=o?.sticky;const b=e.props?.path,D=i?.children??r.objects,W=!!e.props?.caseSensitive;let q=o?.path;if((0,xe.E)(e,"core.gatherMountPoints")){if(!b)throw new Error("Mount point gatherer must have a path");q=b}const at=e.props?.element;let et=(0,xe.E)(e,"core.mountPoint");if(!et&&(0,u.isValidElement)(at)&&(et=(0,xe.E)(at,"core.mountPoint")),et){let Tt=b;if(q&&(Tt?q=void 0:Tt=q),!Tt)throw new Error("Mounted routable extension must have a path");r.paths.set(et,Tt),c&&P?(r.parents.set(et,c),b&&(c=et,P=!1)):(r.parents.set(et,c),c=et),b?(i={caseSensitive:W,path:b,element:"mounted",routeRefs:new Set([et]),children:[Gn],plugins:zs((0,xe.E)(e.props.element,"core.plugin"))},D.push(i)):i?.routeRefs.add(et)}if((0,xe.E)(e,"core.gatherMountPoints")&&(P=!0),(0,xe.E)(e,"core.gatherMountPoints")){if(!b)throw new Error("Mount point gatherer must have a path");et||(i={caseSensitive:W,path:b,element:"gathered",routeRefs:new Set,children:[Gn],plugins:o?.obj?.plugins||new Set},D.push(i))}return{obj:i,path:q,routeRef:c,sticky:P}}),Gr=Vn(()=>new Set,(r,e)=>{if(e.type===Ks){const n=e.props;r.add("with"in n?n.with:n.without)}});var Sn=t(74808),Yr=t(63544);const On=(0,Yr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Vs(r){return r[On]==="absolute"}function Gs(r){return r[On]==="sub"}function Qr(r){return r[On]==="external"}function Qn(...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,n){let o,i="";if(Vs(r))o=r;else if(Gs(r))o=r.parent,i=r.path;else if(Qr(r)){const b=n.get(r);if(!b)return[void 0,""];if(Vs(b))o=b;else if(Gs(b))o=b.parent,i=b.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${b}`)}else throw r[On]?new Error(`Unknown or invalid route ref type, ${r[On]}`):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 P=Qn(c,i);return[o,P]}function _r(r,e,n,o,i){const c=(0,Sn.ue)(i,e)??[],P=Array();let b=-1;for(let q=r;q&&(b=c.findIndex(at=>at.route.routeRefs.has(q)),b===-1);q=o.get(q))P.unshift(q);P.length===0&&(b-=1);const D=b===-1?"":c[b].pathname,W=P.slice(0,-1).map(q=>{const at=n.get(q);if(at===void 0)throw new Error(`No path for ${q}`);if(at.includes(":"))throw new Error(`Cannot route to ${r} with parent ${q} as it has parameters`);return at});return`${Qn(D,...W)}/`}class qr{routePaths;routeParents;routeObjects;routeBindings;appBasePath;constructor(e,n,o,i,c){this.routePaths=e,this.routeParents=n,this.routeObjects=o,this.routeBindings=i,this.appBasePath=c}resolve(e,n){const[o,i]=Xr(e,this.routePaths,this.routeBindings);if(!o)return;let c;typeof n=="string"?c=this.trimPath(n):n.pathname?c={...n,pathname:this.trimPath(n.pathname)}:c=n;const P=this.appBasePath+_r(o,c,this.routePaths,this.routeParents,this.routeObjects);return(...[D])=>{const W=D&&Jr()(D,q=>typeof q=="string"?q.replaceAll(/[&?#;\/]/g,at=>encodeURIComponent(at)):q);return Qn(P,(0,Sn.tW)(i,W))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}}const to=(0,Ae.tK)("routing-context"),eo=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:o,basePath:i="",children:c})=>{const P=new qr(r,e,n,o,i),b=(0,ze.B)({1:P});return(0,a.jsx)(to.Provider,{value:b,children:c})};function no(r,e){const n=new Set(e.values());n.delete(void 0);for(const o of e.keys()){if(n.has(o))continue;let i=o,c="";for(;i;){const b=r.get(i);if(b===void 0)throw new Error(`No path for ${i}`);c=Qn(b,c),i=e.get(i)}const P=c.match(/:(\w+)/g);if(P){for(let b=0;b<P.length;b++)for(let D=b+1;D<P.length;D++)if(P[D]===P[b])throw new Error(`Parameter ${P[D]} is duplicated in path ${c}`)}}}function so(r,e){for(const n of e)if(n.externalRoutes){for(const[o,i]of Object.entries(n.externalRoutes))if(!i.optional&&!r.has(i))throw new Error(`External route '${o}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const ro=(0,Ae.tK)("app-context"),oo=({appContext:r,children:e})=>{const n=(0,ze.B)({1:r});return(0,a.jsx)(ro.Provider,{value:n,children:e})},Ys="app",ao=`${Ys}-auth-cookie-expires-at`,io=5*6e4,Qs=5e3,co=2,lo=5*6e4;function uo({discoveryApi:r,fetchApi:e,errorApi:n}){let o=!1,i,c=!0,P=Qs;const b="BroadcastChannel"in window?new BroadcastChannel(ao):void 0,D=et=>{const st=(1+3*Math.random())*6e4;return Math.max(et-Date.now(),io)-st},W=async()=>{try{const st=`${await r.getBaseUrl(Ys)}/.backstage/auth/v1/cookie`,Tt=await e.fetch(st,{credentials:"include"});if(!Tt.ok)throw new Error(`Request failed with status ${Tt.status} ${Tt.statusText}, see request towards ${st} for more details`);const Kt=await Tt.json();if(!Kt.expiresAt)throw new Error("No expiration date in response");const be=Date.parse(Kt.expiresAt);if(Number.isNaN(be))throw new Error("Invalid expiration date in response");c=!0,b?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(be).toISOString()}}),at(D(be))}catch(et){c?(c=!1,P=Qs):(P=Math.min(lo,P*co),console.error("Session cookie refresh failed",et),n.post(new Error("Session refresh failed, see developer console for details"))),at(P)}},q=et=>{const{data:st}=et;if(!(st===null||typeof st!="object")&&"action"in st&&st.action==="COOKIE_REFRESH_SUCCESS"){const Tt=Date.parse(st.payload.expiresAt);if(Number.isNaN(Tt)){console.warn("Received invalid expiration from session refresh channel");return}at(D(Tt))}};function at(et){o||(i&&clearTimeout(i),i=setTimeout(W,et))}return b?.addEventListener("message",q),W(),()=>{o=!0,i&&clearTimeout(i),b?.removeEventListener("message",q),b?.close()}}function Zs(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function Is(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,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw Zs("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Is("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Zs("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Is("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(e=>e.getProfileInfo())}async getBackstageIdentity(){const e=await this.waitForTarget.then(n=>n.getBackstageIdentity());return e.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${e.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),e}async getCredentials(){return this.waitForTarget.then(e=>e.getCredentials())}async getIdToken(){return this.waitForTarget.then(e=>{if(!e.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Is("getIdToken"),e.getIdToken()})}async signOut(){await this.waitForTarget.then(e=>e.signOut()),await this.#t?.(),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if(this.#t)return;const n=uo(e);this.#t=async()=>{n();const o=await e.discoveryApi.getBaseUrl("app");try{await fetch(`${o}/.backstage/auth/v1/cookie`,{method:"DELETE",credentials:"include"})}catch{}}}}var go=t(1394);function po(r,e,n){if(r!==void 0){const i=n.find(c=>c.id===r);if(i)return i}if(e){const i=n.find(c=>c.variant==="dark");if(i)return i}const o=n.find(i=>i.variant==="light");return o||n[0]}const fo=()=>{const r=(0,u.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,u.useState)(r.matches);return(0,u.useEffect)(()=>{const o=i=>{n(i.matches)};return r.addListener(o),()=>{r.removeListener(o)}},[r]),e};function Js({children:r}){const e=(0,bn.gf)(Hn),n=(0,go.A)(e.activeThemeId$(),e.getActiveThemeId()),o=window.matchMedia?fo():!1,i=po(n,o,e.getInstalledThemes());if(!i)throw new Error("App has no themes");return(0,a.jsx)(i.Provider,{children:r})}const Xs=async()=>mo();function mo(r="__APP_INJECTED_RUNTIME_CONFIG__"){const e=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!e)throw new Error("No static configuration provided");if(!Array.isArray(e))throw new Error("Static configuration has invalid format");const n=e.slice();if(r!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const i=JSON.parse(r);Array.isArray(i)?n.push(...i):n.push({data:i,context:"env"})}catch(i){throw new Error(`Failed to load runtime configuration, ${i}`)}const o=window.__APP_CONFIG__;return o&&n.push({context:"window",data:o}),n}class yo{apis=[];add(e,n){return this.apis.push([e.id,n]),n}build(){return new hn(new Map(this.apis))}}class hn{apis;static builder(){return new yo}static from(e){return new hn(new Map(e.map(([n,o])=>[n.id,o])))}static with(e,n){return new hn(new Map([[e.id,n]]))}constructor(e){this.apis=e}with(e,n){return new hn(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}}function vo(r){const e=new Map,n=new Map;for(const o of r){for(const[i,c]of Object.entries(o.routes??{})){const P=`${o.getId()}.${i}`;if(e.has(P))throw new Error(`Unexpected duplicate route '${P}'`);e.set(P,c)}for(const[i,c]of Object.entries(o.externalRoutes??{})){const P=`${o.getId()}.${i}`;if(n.has(P))throw new Error(`Unexpected duplicate external route '${P}'`);n.set(P,c)}}return{routes:e,externalRoutes:n}}function Eo(r,e,n){const o=vo(n),i=new Map;r&&r({bind:(D,W)=>{for(const[q,at]of Object.entries(W)){const et=D[q];if(!et)throw new Error(`Key ${q} is not an existing external route`);if(!at&&!et.optional)throw new Error(`External route ${q} is required but was undefined`);at&&i.set(et,at)}}});const c=e.getOptionalConfig("app.routes.bindings")?.get(),P=new Set;if(c)for(const[b,D]of Object.entries(c)){if(!Ao(D))throw new Error(`Invalid config at app.routes.bindings['${b}'], value must be a non-empty string or false`);const W=o.externalRoutes.get(b);if(!W)throw new Error(`Invalid config at app.routes.bindings, '${b}' is not a valid external route`);if(D===!1)P.add(W),i.delete(W);else if(!i.has(W)){const q=o.routes.get(D);if(!q)throw new Error(`Invalid config at app.routes.bindings['${b}'], '${D}' is not a valid route`);i.set(W,q)}}for(const b of o.externalRoutes.values())if(!i.has(b)&&!P.has(b)){const D="getDefaultTarget"in b?b.getDefaultTarget():void 0;if(D){const W=o.routes.get(D);W&&i.set(b,W)}}return i}function Ao(r){return!!(r===!1||typeof r=="string"&&r)}function Tn(){const[r]=(0,f.AV)((0,a.jsx)(f.qh,{index:!0,element:(0,a.jsx)("div",{})}));return!r.index}const _s=(0,u.createContext)(void 0);var qs=t(82266),tr=t(93368),xo=t(25862);const Co=(r,e)=>{try{const o=(0,Sn.ue)(e,{pathname:r})?.filter(D=>D?.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 P;i.plugins.size===1&&(P=i.plugins.values().next().value);const b=Object.entries(o?.params||{}).reduce((D,[W,q])=>(q!==void 0&&W!=="*"&&(D[W]=q),D),{});return{extension:"App",pluginId:P?.getId()||"root",...c?{routeRef:c.id}:{},_routeNodeType:i.element,params:b}}catch{return}},bo=({pathname:r,search:e,hash:n,attributes:o})=>{const i=(0,tr.s)();return(0,u.useEffect)(()=>{i.captureEvent("navigate",`${r}${e}${n}`,{attributes:o})},[i,r,e,n,o]),null},Zn=({routeObjects:r})=>{const{pathname:e,search:n,hash:o}=(0,f.zy)(),{params:i,...c}=Co(e,r)||{params:{}};return(0,a.jsx)(xo.Ig,{attributes:c,children:(0,a.jsx)(bo,{pathname:e,search:n,hash:o,attributes:i})})};function So(r){return Tn()?Ds(r):""}function Ds(r){let{pathname:e}=new URL(r.getOptionalString("app.baseUrl")??"/","http://sample.dev");return e=e.replace(/\/*$/,""),e}function er({component:r,appIdentityProxy:e,children:n}){const[o,i]=(0,u.useState)(),c=(0,bn.gf)(ee.U),P=Ds(c);return o?(e.setTarget(o,{signOutTargetUrl:P||"/"}),(0,a.jsx)(a.Fragment,{children:n})):(0,a.jsx)(r,{onSignInSuccess:i})}function nr(r){const{Router:e,SignInPage:n}=(0,qs.n)().getComponents(),o=(0,bn.gf)(ee.U),i=Ds(o),c=`${i}/*`,P=(0,u.useContext)(_s);if(!P)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:b,appIdentityProxy:D}=P;return n?Tn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Zn,{routeObjects:b}),(0,a.jsx)(er,{component:n,appIdentityProxy:D,children:(0,a.jsx)(f.BV,{children:(0,a.jsx)(f.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(Zn,{routeObjects:b}),(0,a.jsx)(er,{component:n,appIdentityProxy:D,children:r.children})]}):(D.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||"/"}),Tn()?(0,a.jsxs)(e,{children:[(0,a.jsx)(Zn,{routeObjects:b}),(0,a.jsx)(f.BV,{children:(0,a.jsx)(f.qh,{path:c,element:(0,a.jsx)(a.Fragment,{children:r.children})})})]}):(0,a.jsxs)(e,{basename:i,children:[(0,a.jsx)(Zn,{routeObjects:b}),r.children]}))}(0,xe.h)(nr,"core.type","AppRouter");const Pn="language",He="en";class Jn{static create(e){const n=e?.availableLanguages??[He];if(n.length!==new Set(n).size)throw new Error(`Supported languages may not contain duplicates, got '${n.join("', '")}'`);if(!n.includes(He))throw new Error(`Supported languages must include '${He}'`);const o=e?.defaultLanguage??He;if(!n.includes(o))throw new Error(`Initial language must be one of the supported languages, got '${o}'`);return new Jn(n,o)}static createWithStorage(e){const n=Jn.create(e);if(!window.localStorage)return n;const o=window.localStorage.getItem(Pn),{languages:i}=n.getAvailableLanguages();return o&&i.includes(o)&&n.setLanguage(o),n.language$().subscribe(({language:c})=>{c!==window.localStorage.getItem(Pn)&&window.localStorage.setItem(Pn,c)}),window.addEventListener("storage",c=>{if(c.key===Pn){const P=localStorage.getItem(Pn)??void 0;P&&n.setLanguage(P)}}),n}#t;#n;#e;constructor(e,n){this.#t=e,this.#n=n,this.#e=new K({language:this.#n})}getAvailableLanguages(){return{languages:this.#t.slice()}}setLanguage(e){const n=e??He;if(n!==this.#n){if(n&&!this.#t.includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${this.#t.join("', '")}'`);this.#n=n,this.#e.next({language:n})}}getLanguage(){return{language:this.#n}}language$(){return this.#e}}var Oo=t(47304),To=t(99833),sr=t(93184);function rr(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}class Po{onLoad;#t;#n;#e;constructor(e){this.onLoad=e,this.#t=new Set,this.#n=new Map,this.#e=new Map}addTranslationResource(e){const n=(0,To.Y)(e);for(const o of n.resources){const i=this.#s(o.language,n.id);this.#e.has(i)||this.#e.set(i,o.loader)}}#s(e,n){return`${e}/${n}`}needsLoading(e,n){const o=this.#s(e,n);return this.#e.get(o)?!this.#t.has(o):!1}async load(e,n){const o=this.#s(e,n),i=this.#e.get(o);if(!i||this.#t.has(o))return;const c=this.#n.get(o);if(c){await c;return}const P=i().then(b=>{this.onLoad({language:e,namespace:n,messages:b.messages}),this.#t.add(o)},b=>{throw this.#t.add(o),b});this.#n.set(o,P),await P}}class Ls{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),o=(0,Oo.Q_)({fallbackLng:He,supportedLngs:n,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!==He&&o.changeLanguage(i);const c=new Po(D=>{o.addResourceBundle(D.language,D.namespace,rr(D.messages),!1,!0)}),P=e?.resources||[];for(let D=P.length-1;D>=0;D--){const W=P[D];W.$$type==="@backstage/TranslationResource"?c.addTranslationResource(W):W.$$type==="@backstage/TranslationMessages"&&o.addResourceBundle(He,W.id,rr(W.messages),!0,!1)}const b=new Ls(o,c,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:D})=>{b.#o(D)}),b}#t;#n;#e;#s=new Set;#r=new Set;constructor(e,n,o){this.#t=e,this.#n=n,this.#e=o}getTranslation(e){const n=(0,sr.v)(e);return this.#i(n),this.#a(n)}translation$(e){const n=(0,sr.v)(e);return this.#i(n),new(Q())(o=>{let i={};const c=()=>{i={};const b=i;this.#n.load(this.#e,n.id).then(()=>{if(b===i){const D=this.#a(n);D.ready&&o.next(D)}},D=>{b===i&&o.error(Array.isArray(D)?D[0]:D)})},P=()=>{const b=this.#a(n);b.ready?o.next(b):c()};return this.#n.needsLoading(this.#e,n.id)&&c(),this.#r.add(P),()=>{this.#r.delete(P)}})}#o(e){this.#e!==e&&(this.#e=e,this.#t.changeLanguage(e),this.#r.forEach(n=>n()))}#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 n=e.getDefaultMessages();this.#t.addResourceBundle(He,e.id,n,!0,!1);const o=e.getDefaultResource();o&&this.#n.addTranslationResource(o)}}function or(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=dn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),o=e.getOptionalString("backend.baseUrl");let i=r,c,P;if(n&&o){const b=new URL(n).origin,D=new URL(o).origin;if(b===D){const W=or(o);o!==W&&(c=W)}}if(n){const b=or(n);n!==b&&(P=b)}return(P||c)&&(i=i.concat({data:{app:P&&{baseUrl:P},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,n){const o=!!r,i=(0,Nt.A)(r||(()=>Promise.resolve([])));let c;if(o&&i.loading){const{Progress:D}=e;c=(0,a.jsx)(D,{})}else if(i.error){const{BootErrorPage:D}=e;c=(0,a.jsx)(D,{step:"load-config",error:i.error})}const{ThemeProvider:P=Js}=e;return c?{node:(0,a.jsx)(Xe,{apis:hn.with(Hn,n),children:(0,a.jsx)(P,{children:c})})}:{api:dn.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??Xs,this.defaultApis=e.defaultApis??[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new Nr,this.appLanguageApi=Jn.createWithStorage({defaultLanguage:e.__experimentalTranslations?.defaultLanguage,availableLanguages:e.__experimentalTranslations?.availableLanguages}),this.translationResources=e.__experimentalTranslations?.resources??[]}getPlugins(){return Array.from(this.plugins)}getSystemIcon(e){return this.icons[e]}getSystemIcons(){return this.icons}getComponents(){return this.components}createRoot(e){const n=this.getProvider();return()=>(0,a.jsx)(n,{children:e})}#t=!1;getProvider(){if(this.#t)throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");this.#t=!0;const e=new Do(this);let n,o;return({children:c})=>{const P=(0,u.useRef)(!0),b=(0,u.useMemo)(()=>zn.createWithStorage(this.themes),[]),{routing:D,featureFlags:W}=(0,u.useMemo)(()=>{const Kt=Tn();Kt&&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 be=kr({root:c,discoverers:[Wr,Kr],collectors:{routing:Kt?Vr:Hr,collectedPlugins:zr,featureFlags:Gr}});return be.collectedPlugins.forEach(Ie=>this.plugins.add(Ie)),this.verifyPlugins(this.plugins),this.getApiHolder(),be},[c]),q=Io(this.configLoader,this.components,b),at="api"in q;if(at){const{api:Kt}=q;this.configApi=Kt}if("node"in q)return q.node;if(o)throw o;if(!n)try{n=Eo(this.bindRoutes,q.api,this.plugins),no(D.paths,D.parents),so(n,this.plugins)}catch(Kt){throw o=Kt,Kt}if(at&&P.current){P.current=!1;const Kt=this.getApiHolder().get(un.B);if(Kt){for(const Pe of this.featureFlags)Kt.registerFlag({...Pe,pluginId:""});for(const Pe of this.plugins.values())if("getFeatureFlags"in Pe)for(const on of Pe.getFeatureFlags())Kt.registerFlag({name:on.name,pluginId:Pe.getId()});else for(const on of Pe.output())on.type==="feature-flag"&&Kt.registerFlag({name:on.name,pluginId:Pe.getId()});const be=Kt.getRegisteredFlags(),Ie=new Set(be.map(Pe=>Pe.name));for(const Pe of W)Ie.has(Pe)||Kt.registerFlag({name:Pe,pluginId:""})}}const{ThemeProvider:et=Js,Progress:st}=this.components,Tt=this.getApiHolder();if(wo()){const Kt=Tt.get(nn.m),be=Tt.get(re.a),Ie=Tt.get(se.I);if(!Kt||!be||!Ie)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Kt,fetchApi:be,discoveryApi:Ie})}return(0,a.jsx)(Xe,{apis:Tt,children:(0,a.jsx)(oo,{appContext:e,children:(0,a.jsx)(et,{children:(0,a.jsx)(eo,{routePaths:D.paths,routeParents:D.parents,routeObjects:D.objects,routeBindings:n,basePath:So(q.api),children:(0,a.jsx)(_s.Provider,{value:{routeObjects:D.objects,appIdentityProxy:this.appIdentityProxy},children:(0,a.jsx)(u.Suspense,{fallback:(0,a.jsx)(st,{}),children:c})})})})})})}}getRouter(){return nr}getApiHolder(){if(this.apiHolder){for(const e of this.plugins)for(const n of e.getApis())this.apiFactoryRegistry.get(n.api)||this.apiFactoryRegistry.register("default",n);return ws.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:Hn,deps:{},factory:()=>zn.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:ee.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:oe.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Ws,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Fr.J,deps:{languageApi:Ws},factory:({languageApi:e})=>Ls.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:un.B,deps:{},factory:()=>new $r});for(const e of this.defaultApis)this.apiFactoryRegistry.register("default",e);for(const e of this.plugins)for(const n of e.getApis())if(!this.apiFactoryRegistry.register("default",n))throw new Error(`Plugin ${e.getId()} tried to register duplicate or forbidden API factory for ${n.api}`);for(const e of this.apis)if(!this.apiFactoryRegistry.register("app",e))throw new Error(`Duplicate or forbidden API factory for ${e.api} in app`);return ws.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new ws(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const n=new Set;for(const o of e){const i=o.getId();if(n.has(i))throw new Error(`Duplicate plugin found '${i}'`);n.add(i)}}}function Mo(r){return new Lo(r)}function jo(r){return Mo({...r,apis:r?.apis??[],bindRoutes:r?.bindRoutes,components:{...B,...r?.components},configLoader:r?.configLoader,defaultApis:In,icons:{...fs,...r?.icons},plugins:r?.plugins??[],featureFlags:r?.featureFlags??[],themes:r?.themes??ae})}var Xn=t(82442);let ar=!1;const ir=r=>{const e=(0,qs.n)(),{NotFoundErrorPage:n}=e.getComponents(),o=(0,u.useMemo)(()=>Tn(),[]),c=[...(0,Xn.O)(r.children,P=>P.getElements().flatMap(b=>{let D=b.props.path;if(D==="")return[];D=D?.replace(/\/\*$/,"")??"/";let W=o?b:b.props.element;return!o&&!W&&(W=b,ar||(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] />} />."),ar=!0)),[{path:D,element:W,children:b.props.children?[{path:D==="/"?"/":"*",element:b.props.children}]:void 0}]}).sort((b,D)=>D.path.localeCompare(b.path)).map(b=>({...b,path:b.path==="/"?"/":`${b.path}/*`}))),{path:"*",element:(0,a.jsx)(n,{})}];return(0,f.Ye)(c)};(0,xe.h)(ir,"core.type","FlatRoutes");var _e=t(6820),Bo=t(78692),Uo=t(86519);function cr(r){return!r.cursor}function li(r){return!cr(r)}const fe="catalog";var me=t(94214);class $o{discoveryApi;fetchApi;constructor(e){this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:Rn()}}async analyzeLocation(e,n){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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,n){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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteEntityByUid(e,n){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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"DELETE"})}async deleteLocation(e,n){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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"DELETE"})}async getEntities(e,n){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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntitiesByQuery(e,n){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/entities/by-query{?fields,limit,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntitiesByRefs(e,n){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/entities/by-refs/{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,n){const o=await this.discoveryApi.getBaseUrl(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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityByName(e,n){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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityByUid(e,n){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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getEntityFacets(e,n){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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocation(e,n){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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocationByEntity(e,n){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",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async getLocations(e,n){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/locations").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"GET"})}async refreshEntity(e,n){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/refresh").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,n){const o=await this.discoveryApi.getBaseUrl(fe),c=me.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${o}${c}`,{headers:{"Content-Type":"application/json",...n?.token&&{Authorization:`Bearer ${n?.token}`}},method:"POST",body:JSON.stringify(e.body)})}}class Fo{apiClient;constructor(e){this.apiClient=new $o(e)}async getEntityAncestors(e,n){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,_e.KU)(e.entityRef)},n))}async getLocationById(e,n){return await this.requestOptional(await this.apiClient.getLocation({path:{id:e}},n))}async getLocationByEntity(e,n){return await this.requestOptional(await this.apiClient.getLocationByEntity({path:(0,_e.KU)(e)},n))}async getEntities(e,n){const{filter:o=[],fields:i=[],order:c,offset:P,limit:b,after:D}=e??{},W=[];if(c)for(const et of[c].flat())et&&W.push(`${et.order}:${et.field}`);const q=await this.requestRequired(await this.apiClient.getEntities({query:{fields:i,limit:b,filter:this.getFilterValue(o),offset:P,after:D,order:c?W:void 0}},n));if(W.length)return{items:q};const at=(et,st)=>{if(et.metadata?.name===void 0||et.kind===void 0||st.metadata?.name===void 0||st.kind===void 0)return 0;const Tt=(0,_e.U2)(et),Kt=(0,_e.U2)(st);return Tt<Kt?-1:Tt>Kt?1:0};return{items:q.sort(at)}}async getEntitiesByRefs(e,n){const o=await this.apiClient.getEntitiesByRefs({body:{entityRefs:e.entityRefs,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},n);if(!o.ok)throw await Ze.o.fromResponse(o);const{items:i}=await o.json();return{items:i.map(c=>c??void 0)}}async queryEntities(e={},n){const o={};if(cr(e)){const{fields:i=[],filter:c,limit:P,orderFields:b,fullTextFilter:D}=e;o.filter=this.getFilterValue(c),P!==void 0&&(o.limit=P),b!==void 0&&(o.orderField=(Array.isArray(b)?b:[b]).map(({field:q,order:at})=>`${q},${at}`)),i.length&&(o.fields=i);const W=D?.term?.trim();W&&(o.fullTextFilterTerm=W),D?.fields?.length&&(o.fullTextFilterFields=D.fields)}else{const{fields:i=[],limit:c,cursor:P}=e;o.cursor=P,c!==void 0&&(o.limit=c),i.length&&(o.fields=i)}return this.apiClient.getEntitiesByQuery({query:o},n).then(i=>i.json())}async getEntityByRef(e,n){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,_e.KU)(e)},n))}async getEntityByName(e,n){const{kind:o,namespace:i="default",name:c}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:o,namespace:i,name:c}},n))}async refreshEntity(e,n){const o=await this.apiClient.refreshEntity({body:{entityRef:e}},n);if(o.status!==200)throw new Error(await o.text())}async getEntityFacets(e,n){const{filter:o=[],facets:i}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:i,filter:this.getFilterValue(o)}},n))}async addLocation(e,n){const{type:o="url",target:i,dryRun:c}=e,P=await this.apiClient.createLocation({body:{type:o,target:i},query:{dryRun:c?"true":void 0}},n);if(P.status!==201)throw new Error(await P.text());const{location:b,entities:D,exists:W}=await P.json();if(!b)throw new Error(`Location wasn't added: ${i}`);return{location:b,entities:D,exists:W}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocations({},n))).map(i=>i.data).find(i=>e===(0,Bo.KL)(i))}async removeLocationById(e,n){await this.requestIgnored(await this.apiClient.deleteLocation({path:{id:e}},n))}async removeEntityByUid(e,n){await this.requestIgnored(await this.apiClient.deleteEntityByUid({path:{uid:e}},n))}async validateEntity(e,n,o){const i=await this.apiClient.validateEntity({body:{entity:e,location:n}},o);if(i.ok)return{valid:!0};if(i.status!==400)throw await 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 n=[];for(const o of[e].flat()){const i=[];for(const[c,P]of Object.entries(o))for(const b of[P].flat())b===Uo.c?i.push(c):typeof b=="string"&&i.push(`${c}=${b}`);i.length&&n.push(i.join(","))}return n}}var lr=t(7341),No=t(18),ko=t(82292),dr=t(29207),gn=t(95203),Wo=t(9803),Te=t(88758),Ko=t(54560),pn=t(45250);async function zo({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),o=e.snapshot("starredEntities").value;if(!(0,pn.isArray)(o))return;const i=new Set(n.snapshot("entityRefs").value??[]);o.filter(pn.isString).map(c=>c.split(":")).filter(c=>c.length===4&&c[0]==="entity").map(([c,P,b,D])=>(0,_e.U2)({kind:P,namespace:b,name:D})).forEach(c=>i.add(c)),await n.set("entityRefs",Array.from(i)),await e.remove("starredEntities")}class Ho{settingsStore;starredEntities;constructor(e){zo(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(this.settingsStore.snapshot("entityRefs").value??[]),this.settingsStore.observe$("entityRefs").subscribe({next:n=>{this.starredEntities=new Set(n.value??[]),this.notifyChanges()}})}async toggleStarred(e){this.starredEntities.has(e)?this.starredEntities.delete(e):this.starredEntities.add(e),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}subscribers=new Set;observable=new(Q())(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 Ms(r){const{years:e=0,months:n=0,weeks:o=0,days:i=0,hours:c=0,minutes:P=0,seconds:b=0,milliseconds:D=0}=r;return((((e*365+n*30+o*7+i)*24+c)*60+P)*60+b)*1e3+D}var Vo=t(25033),Go=t.n(Vo),Yo=t(25295),Qo=t.n(Yo),Zo=t(88083);const Jo={seconds:10},Xo={milliseconds:50},_o={api:Bn.A,component:$n.A,system:Ln.A,resource:Fn.A,domain:Dn.A,location:Un.A,user:En.A,group:vn.A,template:Nn.A};function ur(r){return{async:r.async,render:({entityRef:e,entity:n,context:o})=>({snapshot:(0,Zo.T)(n||e,o),loadEntity:r.async})}}class _n{static createLocal(){return new _n({renderer:ur({async:!1})})}static create(e){return new _n(e)}#t;#n;#e;#s;#r;constructor(e){const n=e.cacheTtl??Jo,o=e.batchDelay??Xo,i=e.renderer??ur({async:!0}),c={};if(Object.entries(_o).forEach(([P,b])=>{c[P.toLocaleLowerCase("en-US")]=b}),Object.entries(e.kindIcons??{}).forEach(([P,b])=>{c[P.toLocaleLowerCase("en-US")]=b}),i.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");this.#e=this.#a({cacheTtl:n,batchDelay:o,renderer:i,catalogApi:e.catalogApi})}this.#n=Ms(n),this.#t=new Map,this.#s=c,this.#r=i}forEntity(e,n){const{entityRef:o,kind:i,entity:c,needsLoad:P}=this.#o(e),b=et=>{const{snapshot:st}=this.#r.render({entityRef:o,loading:et.loading,entity:et.entity,context:n||{}});return{...st,entityRef:o,Icon:this.#i(st.Icon,i)}};let D;try{D=b({loading:P,entity:c})}catch{D={primaryTitle:o,entityRef:o}}if(!P)return{snapshot:D,promise:Promise.resolve(D)};const W=Promise.resolve().then(()=>this.#e?.load(o)).then(et=>b({loading:!1,entity:et??c})).catch(()=>{}),q=new(Q())(et=>{let st=!1;return W.then(Tt=>{Tt&&et.next(Tt)}).finally(()=>{st||et.complete()}),()=>{st=!0}}),at=W.then(et=>et??D);return{snapshot:D,update$:q,promise:at}}#o(e){if(typeof e!="string")return{entity:e,kind:e.kind,entityRef:(0,_e.U2)(e),needsLoad:!1};const n=this.#t.get(e),o=n?.entity,c=(!n||Date.now()-n.updatedAt>this.#n)&&this.#r.async!==!1&&this.#e!==void 0;return{entity:o,kind:(0,_e.KU)(e).kind,entityRef:e,needsLoad:c}}#a(e){const n=Ms(e.cacheTtl),o=Ms(e.batchDelay);return new(Go())(async i=>{const{items:c}=await e.catalogApi.getEntitiesByRefs({entityRefs:i}),P=Date.now();return i.forEach((b,D)=>{this.#t.set(b,{updatedAt:P,entity:c[D]})}),c},{name:"DefaultEntityPresentationApi",cacheMap:new(Qo())(n),maxBatchSize:100,batchScheduleFn:o?i=>setTimeout(i,o):void 0})}#i(e,n){return e||(e===!1?!1:this.#s[n.toLocaleLowerCase("en-US")])}}const Ce=(0,Wo.i)({id:"catalog",apis:[(0,zt.b)({api:lr.v,deps:{discoveryApi:se.I,fetchApi:re.a},factory:({discoveryApi:r,fetchApi:e})=>new Fo({discoveryApi:r,fetchApi:e})}),(0,zt.b)({api:No.a,deps:{storageApi:cn},factory:({storageApi:r})=>new Ho({storageApi:r})}),(0,zt.b)({api:ko.n,deps:{catalogApi:lr.v},factory:({catalogApi:r})=>_n.create({catalogApi:r})})],routes:{catalogIndex:gn.rQ,catalogEntity:dr.s},externalRoutes:{createComponent:gn.qP,viewTechDoc:gn.UJ,createFromTemplate:gn.Zg,unregisterRedirect:gn.pS}}),di=Ce.provide((0,Te.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(3720),t.e(4919),t.e(898)]).then(t.bind(t,80898)).then(r=>r.CatalogPage),mountPoint:gn.rQ})),qo=Ce.provide((0,Te.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:dr.s})),ui=Ce.provide((0,Te.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)}})),hi=Ce.provide((0,Te.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),gi=Ce.provide((0,Te.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),pi=Ce.provide((0,Te.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),fi=Ce.provide((0,Te.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),mi=Ce.provide((0,Te.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),yi=Ce.provide((0,Te.NC)({name:"EntityHasSubdomainsCard",component:{lazy:()=>t.e(6415).then(t.bind(t,46415)).then(r=>r.HasSubdomainsCard)}})),vi=Ce.provide((0,Te.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),Ei=Ce.provide((0,Te.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),Ai=Ce.provide((0,Te.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),xi=Ce.provide((0,Te.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),Ci=Ce.provide((0,Te.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),bi=Ce.provide((0,Ko.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var hr=t(3347),gr=t(26679);class ta{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:n,identityApi:o}){this.configApi=e,this.discoveryApi=n,this.identityApi=o}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,n){const i=`${await this.getApiOrigin()}/${n}`,c=await fetch(`${i.endsWith("/")?i:`${i}/`}index.html`);if(c.status===404)throw new Error("Page not found");return c.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,n,o){const i=await this.getApiOrigin();return new URL(e,`${i}/${o}`).toString()}}class ea{configApi;discoveryApi;identityApi;constructor({configApi:e,discoveryApi:n,identityApi:o}){this.configApi=e,this.discoveryApi=n,this.identityApi=o}async getCookie(){return{expiresAt:new Date(Date.now()+6e5).toISOString()}}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(e){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(e){return{site_name:"Live preview environment",site_description:""}}}const na=[(0,zt.b)({api:gr.s,deps:{configApi:ee.U,discoveryApi:se.I,identityApi:oe.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new ta({configApi:r,discoveryApi:e,identityApi:n})}),(0,zt.b)({api:gr.l,deps:{configApi:ee.U,discoveryApi:se.I,identityApi:oe.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new ea({configApi:r,discoveryApi:e,identityApi:n})}),(0,zt.b)({api:hr.Y,deps:{configApi:ee.U},factory:({configApi:r})=>hr.L.fromConfig(r)})],sa={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},ra={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function oa(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function aa(){const r=await Xs(),e=await oa();return[...r,{context:"detected",data:e?sa:ra}]}var Ve=t(58837),ia=t(3210);const ca=(0,Ve.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),la=()=>{const r=ca();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"})})},da=(0,Ve.A)({svg:{width:"auto",height:28},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 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 ye=t(72664);const pr={isOpen:!1,setOpen:()=>{}},fr=(0,u.createContext)(pr),mr=(0,Ae.tK)("sidebar-open-state-context");function yr(r){const{children:e,value:n}=r;return(0,a.jsx)(fr.Provider,{value:n,children:(0,a.jsx)(mr.Provider,{value:(0,ze.B)({1:n}),children:e})})}const js=()=>{const r=(0,u.useContext)(mr),e=(0,u.useContext)(fr);if(r===void 0)return e||pr;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var vr=t(72072),Er=t(73524),qe=t(10394),Ar=t(5893),ha=t(53373),rn=t.n(ha),ga=t(1125),xr=t(29365),pa=t(73845),Bs=t(72501),fa=t(32881),ma=t(27326),ya=t(13085);const Cr=(0,u.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var Us=t(34435);const va=(0,Ve.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"}})),Ea=r=>{const{to:e,label:n,icon:o,value:i}=r,{sidebarConfig:c}=(0,u.useContext)(ye.yY),P=va({sidebarConfig:c}),b=(0,f.zy)(),{selectedMenuItemIndex:D,setSelectedMenuItemIndex:W}=(0,u.useContext)(Cr),q=(et,st)=>{W(st===D?-1:st)},at=i===D&&D>=0||i!==D&&!(D>=0)&&e===b.pathname;return(0,a.jsx)(ya.A,{"aria-label":n,label:n,icon:o,component:vr.N_,to:e||b.pathname,onChange:q,value:i,selected:at,classes:P})},br=r=>{const{children:e,to:n,label:o,icon:i,value:c}=r,{isMobile:P}=(0,Us.Ut)();return P?(0,a.jsx)(Ea,{to:n,label:o,icon:i,value:c}):(0,a.jsx)(a.Fragment,{children:e})},Sr=(0,Ve.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`})})),Aa=r=>(0,pn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),xa=u.createElement(br).type,Ca=({children:r,label:e="Menu",open:n,onClose:o})=>{const{sidebarConfig:i}=(0,u.useContext)(ye.yY),c=Sr({sidebarConfig:i});return(0,a.jsxs)(pa.Ay,{anchor:"bottom",open:n,onClose:o,ModalProps:{BackdropProps:{classes:{root:c.marginMobileSidebar}}},classes:{root:c.marginMobileSidebar,paperAnchorBottom:c.overlay},children:[(0,a.jsxs)(qe.A,{className:c.overlayHeader,children:[(0,a.jsx)(Bs.A,{variant:"h3",children:e}),(0,a.jsx)(xr.A,{onClick:o,classes:{root:c.overlayHeaderClose},children:(0,a.jsx)(fa.A,{})})]}),(0,a.jsx)(qe.A,{component:"nav",children:r})]})},ba=r=>{const{sidebarConfig:e}=(0,u.useContext)(ye.yY),{children:n}=r,o=Sr({sidebarConfig:e}),i=(0,f.zy)(),[c,P]=(0,u.useState)(-1);(0,u.useEffect)(()=>{P(-1)},[i.pathname]);let b=(0,Xn.O)(n,W=>W.getElements().filter(q=>q.type===xa));if(n)b.length?b=Aa(b):b.push((0,a.jsx)(br,{icon:(0,a.jsx)(ma.A,{}),children:n},"default_menu"));else return null;const D=c>=0&&!b[c].props.to;return(0,a.jsx)(yr,{value:{isOpen:!0,setOpen:()=>{}},children:(0,a.jsxs)(Cr.Provider,{value:{selectedMenuItemIndex:c,setSelectedMenuItemIndex:P},children:[(0,a.jsx)(Ca,{label:b[c]&&b[c].props.label,open:D,onClose:()=>P(-1),children:b[c]&&b[c].props.children}),(0,a.jsx)(ga.A,{className:o.root,"data-testid":"mobile-sidebar-root",component:"nav",children:b})]})})};var Sa=t(87849),Oa=t(10315);const Or=(0,Ve.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 Tr;(function(r){r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open"})(Tr||(Tr={}));const Ta=r=>{const{sidebarConfig:e}=(0,u.useContext)(ye.yY),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:o=e.defaultCloseDelayMs,disableExpandOnHover:i,children:c}=r,P=Or({sidebarConfig:e}),b=(0,Ar.A)(Ie=>Ie.breakpoints.down("md"),{noSsr:!0}),[D,W]=(0,u.useState)(0),q=(0,u.useRef)(),{isPinned:at,toggleSidebarPinState:et}=(0,Us.Ut)(),st=()=>{at||i||(q.current&&(clearTimeout(q.current),q.current=void 0),D!==2&&!b&&(q.current=window.setTimeout(()=>{q.current=void 0,W(2)},n),W(1)))},Tt=()=>{at||i||(q.current&&(clearTimeout(q.current),q.current=void 0),D===1?W(0):D===2&&(q.current=window.setTimeout(()=>{q.current=void 0,W(0)},o)))},Kt=D===2&&!b||at,be=Ie=>{Ie?(W(2),et()):(W(0),et())};return(0,a.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,a.jsx)(Ra,{}),(0,a.jsx)(yr,{value:{isOpen:Kt,setOpen:be},children:(0,a.jsx)(qe.A,{className:P.root,"data-testid":"sidebar-root",onMouseEnter:i?()=>{}:st,onFocus:i?()=>{}:st,onMouseLeave:i?()=>{}:Tt,onBlur:i?()=>{}:Tt,children:(0,a.jsx)(qe.A,{className:rn()(P.drawer,P.drawerWidth,{[P.drawerOpen]:Kt}),children:c})})})]})},Pa=r=>{const e=(0,ye.Rv)(r.sidebarOptions??{}),n=(0,ye.i8)(r.submenuOptions??{}),{children:o,disableExpandOnHover:i,openDelayMs:c,closeDelayMs:P}=r,{isMobile:b}=(0,Us.Ut)();return b?(0,a.jsx)(ba,{children:o}):(0,a.jsx)(ye.yY.Provider,{value:{sidebarConfig:e,submenuConfig:n},children:(0,a.jsx)(Ta,{openDelayMs:c,closeDelayMs:P,disableExpandOnHover:i,children:o})})};function Ra(){const{sidebarConfig:r}=(0,u.useContext)(ye.yY),{focusContent:e,contentRef:n}=(0,Er.H)(),o=Or({sidebarConfig:r}),{t:i}=(0,Sa.i)(Oa.O);return n?.current?(0,a.jsx)(m.A,{onClick:e,variant:"contained",className:rn()(o.visuallyHidden),children:i("skipToContent")}):null}var wa=t(94509),qn=t(44209),Ia=t(79065),Da=t(55704),Pr=t(62248);const La=(0,Ve.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",[r.breakpoints.up("sm")]:{marginLeft:e.left,transition:r.transitions.create("margin-left",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest})},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=>({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"}),Ma=r=>{const{isOpen:e}=js(),{sidebarConfig:n,submenuConfig:o}=(0,u.useContext)(ye.yY),i=e?n.drawerWidthOpen:n.drawerWidthClosed,c=La({left:i,submenuConfig:o}),{isHoveredOn:P}=(0,u.useContext)(ye.U1),[b,D]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{D(P)},[P]),(0,a.jsxs)(qe.A,{className:rn()(c.drawer,{[c.drawerOpen]:b}),children:[(0,a.jsx)(Bs.A,{variant:"h5",component:"span",className:c.title,children:r.title}),r.children]})};var ja=t(45810),Rr=t.n(ja);function wr(r,e,n=!1){const o=new URLSearchParams(e.search).toString(),i=Rr().parse(o),c=new URLSearchParams(r.search).toString(),P=Rr().parse(c),b=n?pn.isEqual:pn.isMatch;return(0,pn.isEqual)(e.pathname,r.pathname)&&b(P,i)}const Ba=r=>(0,Ve.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 ts(r){return(0,u.useMemo)(()=>Ba(r),[r])()}const Ua=(r,e)=>(0,Xn.O)(r.props.children,n=>{let o=!1;return n.getElements().forEach(({props:{to:i,dropdownItems:c}})=>{if(!o){if(c?.length){c.forEach(({to:P})=>o=o||wr(e,(0,Sn.o1)(P)));return}i&&(o=wr(e,(0,Sn.o1)(i)))}}),o},[e.pathname]);function $s(r){return r.to===void 0}const $a=u.createElement(Ma).type,Fa=u.forwardRef(function({to:e,end:n,style:o,className:i,activeStyle:c,caseSensitive:P,activeClassName:b="active","aria-current":D="page",...W},q){let{pathname:at}=(0,f.zy)(),{pathname:et}=(0,f.x$)(e);P||(at=at.toLocaleLowerCase("en-US"),et=et.toLocaleLowerCase("en-US"));let st=at===et;!st&&!n&&(st=at.startsWith(`${et}/`));const Tt=st?D:void 0;return(0,a.jsx)(T.N_,{...W,to:e,ref:q,"aria-current":Tt,style:{...o,...st?c:void 0},className:rn()([typeof i!="function"?i:void 0,st?b:void 0])})}),Ir=(0,u.forwardRef)((r,e)=>{const{icon:n,text:o,hasNotifications:i=!1,hasSubmenu:c=!1,disableHighlight:P=!1,onClick:b,noTrack:D,children:W,className:q,...at}=r,{sidebarConfig:et}=(0,u.useContext)(ye.yY),st=ts(et),{isOpen:Tt}=js(),Kt=!Tt&&c?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},be=(0,a.jsxs)(qe.A,{style:Kt,children:[(0,a.jsx)(n,{fontSize:"small"}),!Tt&&c?(0,a.jsx)(Pr.A,{fontSize:"small"}):(0,a.jsx)(a.Fragment,{})]}),Ie=(0,a.jsx)(wa.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!i,className:rn()({[st.closedItemIcon]:!Tt}),children:be}),Pe=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(qe.A,{"data-testid":"login-button",className:st.iconContainer,children:Ie}),o&&(0,a.jsx)(Bs.A,{variant:"subtitle2",component:"span",className:st.label,children:o}),(0,a.jsx)("div",{className:st.secondaryAction,children:W})]}),on=Tt?Pe:Ie,jr={onClick:b,className:rn()(q,st.root,Tt?st.open:st.closed,$s(r)&&st.buttonItem,{[st.highlightable]:!P})},Br=(0,tr.s)(),{pathname:Fs}=(0,f.x$)(!$s(r)&&r.to?r.to:""),Ur=(0,u.useCallback)(oi=>{if(!D){const ai="click",ii=o??"Sidebar Item",ci=Fs?{attributes:{to:Fs}}:void 0;Br.captureEvent(ai,ii,ci)}b?.(oi)},[Br,o,Fs,D,b]);return $s(r)?(0,a.jsx)(m.A,{role:"button","aria-label":o,...jr,ref:e,onClick:Ur,children:on}):(0,a.jsx)(Fa,{...jr,activeClassName:st.selected,to:r.to?r.to:"",ref:e,"aria-label":o||r.to,...at,onClick:Ur,children:on})}),Na=({children:r,...e})=>{const{sidebarConfig:n}=(0,u.useContext)(ye.yY),o=ts(n),[i,c]=(0,u.useState)(!1),P=(0,f.zy)(),b=Ua(r,P),D=(0,Ar.A)(et=>et.breakpoints.down("sm")),W=()=>{c(!0)},q=()=>{c(!1)},at=()=>D?i?(0,a.jsx)(Da.A,{fontSize:"small",className:o.submenuArrow}):(0,a.jsx)(Ia.A,{fontSize:"small",className:o.submenuArrow}):!i&&(0,a.jsx)(Pr.A,{fontSize:"small",className:o.submenuArrow});return(0,a.jsx)(ye.U1.Provider,{value:{isHoveredOn:i,setIsHoveredOn:c},children:(0,a.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:q,onTouchStart:i?q:W,onMouseEnter:W,className:rn()(i&&o.highlighted),children:[(0,a.jsx)(Ir,{hasSubmenu:!0,className:b?o.selected:"",...e,children:at()}),i&&r]})})},Dr=(0,u.forwardRef)((r,e)=>{const[n]=(0,Xn.O)(r.children,o=>o.getElements().filter(i=>i.type===$a));return n?(0,a.jsx)(Na,{...r,children:n}):(0,a.jsx)(Ir,{...r,ref:e})});function Ti(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,o]=useState(""),i=ts(e),c=r.icon?r.icon:SearchIcon,P=()=>{r.onSearch(n),o("")},b=at=>{at.key==="Enter"&&(at.preventDefault(),P())},D=at=>{o(at.target.value)},W=at=>{at.preventDefault(),at.stopPropagation()},q=at=>{P(),at.preventDefault()};return _jsx(Box,{className:i.searchRoot,children:_jsx(Dr,{icon:c,to:r.to,onClick:q,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:W,onChange:D,onKeyDown:b,className:i.searchContainer,InputProps:{disableUnderline:!0,className:i.searchField},inputProps:{className:i.searchFieldHTMLInput}})})})}const Pi=(0,qn.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),Ri=(0,qn.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),ka=(0,qn.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Wa=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),wi=(0,qn.A)("div")(({theme:r})=>{const e=Wa(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),Ii=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=ts(r),{isOpen:n,setOpen:o}=useSidebarOpenState();if(useMediaQuery(P=>P.breakpoints.down("md"),{noSsr:!0}))return null;const c=()=>{o(!n)};return _jsx(Button,{role:"button",onClick:c,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:n?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Ka=(0,Ve.A)({root:{width:ye.hC.drawerWidthClosed,height:3*ye.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:ye.hC.drawerWidthClosed,marginLeft:24}}),za=()=>{const r=Ka(),{isOpen:e}=js();return(0,a.jsx)("div",{className:r.root,children:(0,a.jsx)(vr.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,a.jsx)(la,{}):(0,a.jsx)(ua,{})})})},Ha=({children:r})=>(0,a.jsxs)(Er.G,{children:[(0,a.jsxs)(Pa,{children:[(0,a.jsx)(za,{}),(0,a.jsx)(ka,{}),(0,a.jsx)(Dr,{icon:ia.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Va=t(71677),Ga=t(62437),Ya=t(55484),Qa=t(45061),Za=t(10245);const Ja=(0,Ve.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 Lr;(function(r){r.LIGHT="light",r.DARK="dark"})(Lr||(Lr={}));const Xa=()=>{const r=(0,bn.gf)(Hn),e=Ja(),[n,o]=(0,u.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),i={light:{icon:Ya.A,title:"Dark theme"},dark:{icon:Ga.A,title:"Light theme"}},{title:c,icon:P}=i[n],b=()=>{o(D=>{const W=D==="light"?"dark":"light";return r.setActiveThemeId(W),W})};return(0,a.jsx)(qe.A,{display:"flex",alignItems:"center",mr:2,children:(0,a.jsx)(Va.Ay,{title:c,arrow:!0,children:(0,a.jsx)(xr.A,{size:"small",onClick:b,children:(0,a.jsx)(P,{className:e.headerIcon})})})})},_a=()=>(0,a.jsxs)(g.Wj,{children:[(0,a.jsx)(Qa.T,{}),(0,a.jsx)(Za.p,{withSearch:!1})]}),qa=(0,a.jsx)(_a,{}),Mr=jo({apis:na,configLoader:aa,plugins:Object.values(s)}),ti=Mr.getProvider(),ei=Mr.getRouter(),ni=g.Ju.provide((0,d.Hr)({name:"ThemeToggleAddon",component:Xa,location:v.e.Header})),si=(0,a.jsxs)(ir,{children:[(0,a.jsx)(f.C5,{to:"/docs/default/component/local/"},"/"),(0,a.jsx)(f.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,a.jsx)(qo,{})}),(0,a.jsx)(f.qh,{path:"/docs",element:(0,a.jsx)(g.$j,{}),children:(0,a.jsx)(h.K,{})}),(0,a.jsxs)(f.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,a.jsx)(g.Wj,{}),children:[qa,(0,a.jsx)(d.po,{children:(0,a.jsx)(ni,{})})]})]}),ri=()=>(0,a.jsx)(ti,{children:(0,a.jsx)(ei,{children:(0,a.jsx)(Ha,{children:si})})});C.createRoot(document.getElementById("root")).render((0,a.jsx)(ri,{}))},43836:(G,S,t)=>{"use strict";t.d(S,{qO:()=>C,tK:()=>u});var s=t(14041),a=t(63544);function u(g){return(0,a.Q)(g,()=>(0,s.createContext)(void 0))}function C(g){return(0,s.useContext)(u(g))}function f(g){return{set(h){globalThis[`__@backstage/${g}__`]=createContext(createVersionedValueMap(h))},reset(){delete globalThis[`__@backstage/${g}__`]}}}},10602:(G,S,t)=>{"use strict";t.d(S,{B:()=>s});function s(a){Object.freeze(a);const u={atVersion(C){return a[C]}};return Object.defineProperty(u,"$map",{configurable:!0,enumerable:!0,get(){return a}}),u}},63544:(G,S,t)=>{"use strict";t.d(S,{Q:()=>C});function s(){return typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")()}const a=s(),u=f=>`__@backstage/${f}__`;function C(f,g){const h=u(f);let d=a[h];return d||(d=g(),a[h]=d,d)}},7341:(G,S,t)=>{"use strict";t.d(S,{v:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.catalog.service"})},82292:(G,S,t)=>{"use strict";t.d(S,{n:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.catalog.entity-presentation"})},88083:(G,S,t)=>{"use strict";t.d(S,{T:()=>f});var s=t(6820),a=t(72348),u=t(46123),C=t.n(u);function f(d,v){const{kind:m,namespace:E,name:x,title:O,description:T,displayName:I,type:y}=g(d),R=(0,s.U2)({kind:m||"unknown",namespace:E||a.oQ,name:x||"unknown"}),F=h({kind:m,namespace:E,name:x,context:v}),B=[I,O,F].find(V=>V&&typeof V=="string"),X=[B!==R?R:void 0,y,T].filter(V=>V&&typeof V=="string").join(" | ");return{entityRef:R,primaryTitle:B,secondaryTitle:X||void 0,Icon:void 0}}function g(d){if(typeof d=="string"){let v=d.indexOf(":");const m=d.indexOf("/");m!==-1&&m<v&&(v=-1);const E=v===-1?void 0:d.slice(0,v),x=m===-1?void 0:d.slice(v+1,m),O=d.slice(Math.max(v+1,m+1));return{kind:E,namespace:x,name:O}}if(typeof d=="object"&&d!==null){const v=[C()(d,"kind")].find(y=>y&&typeof y=="string"),m=[C()(d,"metadata.namespace"),C()(d,"namespace")].find(y=>y&&typeof y=="string"),E=[C()(d,"metadata.name"),C()(d,"name")].find(y=>y&&typeof y=="string"),x=[C()(d,"metadata.title")].find(y=>y&&typeof y=="string"),O=[C()(d,"metadata.description")].find(y=>y&&typeof y=="string"),T=[C()(d,"spec.profile.displayName")].find(y=>y&&typeof y=="string"),I=[C()(d,"spec.type")].find(y=>y&&typeof y=="string");return{kind:v,namespace:m,name:E,title:x,description:O,displayName:T,type:I}}return{}}function h(d){const v=d.kind?.toLocaleLowerCase("en-US")||"unknown",m=d.namespace||a.oQ,E=d.name||"unknown",x=d.context?.defaultKind?.toLocaleLowerCase("en-US"),O=d.context?.defaultNamespace?.toLocaleLowerCase("en-US");let T=E;return(O&&m.toLocaleLowerCase("en-US")!==O||m!==a.oQ)&&(T=`${m}/${T}`),x&&v.toLocaleLowerCase("en-US")!==x&&(T=`${v}:${T}`),T}},3169:(G,S,t)=>{"use strict";t.d(S,{f:()=>h});var s=t(6820),a=t(72427),u=t(14041),C=t(82292),f=t(88083);function g(d,v,m){const[E,x]=(0,u.useState)(d);return(0,u.useEffect)(()=>{x(d);const O=v?.subscribe({next:T=>{x(T)},complete:()=>{O?.unsubscribe()}});return()=>{O?.unsubscribe()}},m),E}function h(d,v){const E=(0,a.Q2)().get(C.n),x=[E,JSON.stringify(d),JSON.stringify(v||null)],O=(0,u.useMemo)(()=>{if(!E){const T=(0,f.T)(d,v);return{snapshot:T,promise:Promise.resolve(T)}}return E.forEntity(typeof d=="string"||"metadata"in d?d:(0,s.U2)(d),v)},x);return g(O.snapshot,O.update$,[O])}},18:(G,S,t)=>{"use strict";t.d(S,{a:()=>a});var s=t(55309);const a=(0,s.y)({id:"catalog-react.starred-entities"})},54203:(G,S,t)=>{"use strict";t.d(S,{GI:()=>I});var s=t(31085),a=t(14041),u=t(10394),C=t(64947),f=t(73845),g=t(42899),h=t(72501),d=t(5893),v=t(54917),m=t(65859),E=t(64630),x=t(87849);const O=y=>{const R=(0,d.A)(k=>k.breakpoints.down(y.options?.drawerBreakpoint??"md")),F=(0,v.A)(),[B,X]=(0,a.useState)(!1),{t:V}=(0,x.i)(E.j);return R?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.A,{style:{marginTop:F.spacing(1),marginLeft:F.spacing(1)},onClick:()=>X(!0),startIcon:(0,s.jsx)(m.A,{}),children:V("catalogFilter.buttonTitle")}),(0,s.jsx)(f.Ay,{open:B,onClose:()=>X(!1),anchor:y.options?.drawerAnchor??"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,s.jsxs)(u.A,{m:2,children:[(0,s.jsx)(h.A,{variant:"h6",component:"h2",style:{marginBottom:F.spacing(1)},children:V("catalogFilter.title")}),y.children]})})]}):(0,s.jsx)(g.A,{item:!0,lg:2,children:y.children})},T=y=>(0,s.jsx)(g.A,{item:!0,xs:12,lg:10,children:y.children}),I=y=>(0,s.jsx)(g.A,{container:!0,style:{position:"relative"},children:y.children});I.Filters=O,I.Content=T},50207:(G,S,t)=>{"use strict";t.d(S,{y:()=>H});var s=t(31085),a=t(10394),u=t(72501),C=t(58837),f=t(6924),g=t(20577),h=t(14041),d=t(72427),v=t(73466),m=t(7341),E=t(69076),x=t(86901),O=t(44148),T=t(41260);const I=(0,s.jsx)(T.A,{fontSize:"small"}),y=(0,s.jsx)(O.A,{fontSize:"small"});function R({selected:tt}){return(0,s.jsx)(E.A,{icon:I,checkedIcon:y,checked:tt})}const F=(0,h.memo)(tt=>{const{selected:Y,value:lt,availableOptions:ht,showCounts:xt}=tt,yt=xt?`${lt} (${ht?.[lt]})`:lt;return(0,s.jsx)(x.A,{control:(0,s.jsx)(R,{selected:Y}),label:yt,onClick:St=>St.preventDefault()})});var B=t(16249),X=t(53373),V=t.n(X);const k=(0,C.A)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function Q(tt){const Y=k();return(0,s.jsx)(B.A,{variant:"outlined",...tt,className:V()(Y.input,tt.className)})}var Z=t(21405),K=t(26796);const J=(0,C.A)({root:{},label:{}},{name:"CatalogReactEntityAutocompletePicker"});function H(tt){const{label:Y,name:lt,path:ht,showCounts:xt,Filter:yt,InputProps:St,initialSelectedOptions:vt=[],filtersForAvailableValues:Et=["kind"]}=tt,dt=J(),{updateFilters:gt,filters:Ct,queryParameters:{[lt]:pt}}=(0,Z.nK)(),Pt=(0,d.gf)(m.v),It=Et.map(ut=>Ct[ut]),{value:Ut}=(0,v.A)(async()=>{const ut=ht,{facets:ot}=await Pt.getEntityFacets({facets:[ut],filter:(0,K.Rr)(It.filter(Boolean))});return Object.fromEntries(ot[ut].map(({value:At,count:$t})=>[At,$t]))},[...It]),Mt=(0,h.useMemo)(()=>[pt].flat().filter(Boolean),[pt]),[bt,U]=(0,h.useState)(Mt.length?Mt:Ct[lt]?.values??vt);(0,h.useEffect)(()=>{Mt.length&&U(Mt)},[Mt]);const z=Object.keys(Ut??{}),rt=bt.length&&z.length;(0,h.useEffect)(()=>{gt({[lt]:rt?new yt(bt):void 0})},[lt,rt,bt,yt,gt]);const mt=Ct[lt];return mt&&typeof mt=="object"&&!("values"in mt)||!z.length?null:(0,s.jsx)(a.A,{className:dt.root,pb:1,pt:1,children:(0,s.jsxs)(u.A,{className:dt.label,variant:"button",component:"label",children:[Y,(0,s.jsx)(g.Ay,{PopperComponent:ut=>(0,s.jsx)("div",{...ut,children:ut.children}),multiple:!0,disableCloseOnSelect:!0,options:z,value:bt,onChange:(ut,ot)=>U(ot),renderOption:(ut,{selected:ot})=>(0,s.jsx)(F,{selected:ot,value:ut,availableOptions:Ut,showCounts:!!xt}),size:"small",popupIcon:(0,s.jsx)(f.A,{"data-testid":`${String(lt)}-picker-expand`}),renderInput:ut=>(0,s.jsx)(Q,{...ut,...St})})]})})}},72987:(G,S,t)=>{"use strict";t.d(S,{t:()=>Mt});var s=t(31085),a=t(6820),u=t(10394),C=t(69076),f=t(86901),g=t(16249),h=t(72501),d=t(71677),v=t(58837),m=t(44148),E=t(41260),x=t(6924),O=t(20577),T=t(14041),I=t(21405),y=t(92822),R=t(92367),F=t(48108),B=t(47966),X=t(90184),V=t(72427),k=t(87290),Q=t(7341),Z=t(46123),K=t.n(Z);function J({enabled:bt}){const U=(0,V.gf)(Q.v),[z]=(0,T.useState)(async()=>{if(!bt)return[];const rt="relations.ownedBy",ut=(await U.getEntityFacets({facets:[rt]})).facets[rt].map(ot=>ot.value);return U.getEntitiesByRefs({entityRefs:ut}).then(ot=>ot.items.filter(At=>At!==void 0).map(At=>At).sort((At,$t)=>(At.metadata.namespace||"").localeCompare($t.metadata.namespace||"","en-US")||(K()(At,"spec.profile.displayName")||At.metadata.title||At.metadata.name).localeCompare(K()($t,"spec.profile.displayName")||$t.metadata.title||$t.metadata.name,"en-US")||At.kind.localeCompare($t.kind,"en-US"))).then(ot=>ot).catch(()=>[])});return(0,k.A)(async(rt,mt)=>{const ut=await z;if(!ut)return{items:[]};const ot=mt?.limit??20,{text:At,start:$t}=H(rt),kt=ut.filter(Vt=>lt(At,Vt)),jt=$t+ot;return{items:kt.slice(0,jt),...Y({entities:kt,limit:jt,payload:{text:At,start:jt}})}},[z],{loading:!0,value:{items:[]}})}function H(bt){return tt(bt)&&bt.cursor?JSON.parse(atob(bt.cursor)):{text:bt.text||"",start:0}}function tt(bt){return!!bt.cursor}function Y({entities:bt,limit:U,payload:z}){return bt.length>U?{cursor:btoa(JSON.stringify(z))}:{}}function lt(bt,U){const z=bt.trim();return U.kind.includes(z)||U.metadata.namespace?.includes(z)||U.metadata.name.includes(z)||U.metadata.title?.includes(z)||K()(U,"spec.profile.displayName")?.includes(z)}function ht(){const bt=(0,V.gf)(Q.v);return(0,k.A)(async(U,z)=>{const rt=U,mt=U,ut=z?.limit??20;if(mt.cursor){const At=await bt.queryEntities({cursor:mt.cursor,limit:ut});return{cursor:At.pageInfo.nextCursor,items:[...mt.items,...At.items]}}const ot=await bt.queryEntities({fullTextFilter:{term:rt.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:ut});return{cursor:ot.pageInfo.nextCursor,items:ot.items}},[],{loading:!0})}var xt=t(76842);function yt({mode:bt,initialSelectedOwnersRefs:U}){const z=bt==="owners-only",rt=ht(),mt=J({enabled:z}),[ut,ot]=z?mt:rt;return[ut,ot,St({enabled:!z,initialSelectedOwnersRefs:U})]}function St({enabled:bt,initialSelectedOwnersRefs:U}){const z=(0,T.useRef)({}),rt=(0,V.gf)(Q.v),[,mt]=(0,k.A)(async()=>{(await rt.getEntitiesByRefs({entityRefs:U})).items.forEach(ot=>{ot&&(z.current[(0,a.U2)(ot)]=ot)})},[]);return(0,xt.u)(()=>{bt&&U.length>0&&mt()}),{getEntity:ut=>z.current[ut],setEntity:ut=>{z.current[(0,a.U2)(ut)]=ut}}}var vt=t(87051),Et=t(3169),dt=t(64630),gt=t(87849);const Ct=(0,v.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),pt=(0,vt.A)(bt=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(f.A),Pt=(0,s.jsx)(E.A,{fontSize:"small"}),It=(0,s.jsx)(m.A,{fontSize:"small"});function Ut(bt){const U=Ct(),z=bt.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:rt}=(0,Et.f)(bt.entity);return(0,s.jsx)(u.A,{className:U.fullWidth,children:(0,s.jsx)(pt,{className:U.fullWidth,control:(0,s.jsx)(C.A,{icon:Pt,checkedIcon:It,checked:bt.isSelected}),onClick:mt=>mt.preventDefault(),label:(0,s.jsx)(d.Ay,{title:rt,children:(0,s.jsxs)(u.A,{display:"flex",alignItems:"center",children:[z?(0,s.jsx)(B.A,{fontSize:"small"}):(0,s.jsx)(F.A,{fontSize:"small"}),"\xA0",(0,s.jsx)(u.A,{className:U.boxLabel,children:(0,s.jsx)(h.A,{noWrap:!0,children:rt})})]})})})})}const Mt=bt=>{const U=Ct(),{mode:z="owners-only"}=bt||{},{updateFilters:rt,filters:mt,queryParameters:{owners:ut}}=(0,I.nK)(),[ot,At]=(0,T.useState)(""),{t:$t}=(0,gt.i)(dt.j),kt=(0,T.useMemo)(()=>[ut].flat().filter(Boolean),[ut]),[jt,Vt]=(0,T.useState)(kt.length?kt:mt.owners?.values??[]),[{value:de,loading:ie},ue,Yt]=yt({mode:z,initialSelectedOwnersRefs:jt});(0,R.s)(()=>ue({text:ot}),[ot,ue],250);const ne=de?.items||[];return(0,T.useEffect)(()=>{if(kt.length){const Ft=new y.N9(kt);Vt(Ft.values)}},[kt]),(0,T.useEffect)(()=>{rt({owners:jt.length?new y.N9(jt):void 0})},[jt,rt]),["user","group"].includes(mt.kind?.value.toLocaleLowerCase("en-US")||"")?null:(0,s.jsx)(u.A,{className:U.root,pb:1,pt:1,children:(0,s.jsxs)(h.A,{className:U.label,variant:"button",component:"label",children:[$t("entityOwnerPicker.title"),(0,s.jsx)(O.Ay,{PopperComponent:Ft=>(0,s.jsx)("div",{...Ft,children:Ft.children}),multiple:!0,disableCloseOnSelect:!0,loading:ie,options:ne,value:jt,getOptionSelected:(Ft,Zt)=>typeof Zt=="string"?(0,a.U2)(Ft)===Zt:Ft===Zt,getOptionLabel:Ft=>{const Zt=typeof Ft=="string"?Yt.getEntity(Ft)||(0,a.KU)(Ft,{defaultKind:"group",defaultNamespace:"default"}):Ft;return(0,X.Z)(Zt,(0,X.S)(Zt))},onChange:(Ft,Zt)=>{At(""),Vt(Zt.map(Se=>{const Ke=typeof Se=="string"?Se:(0,a.U2)(Se);return typeof Se!="string"&&Yt.setEntity(Se),Ke}))},filterOptions:Ft=>Ft,renderOption:(Ft,{selected:Zt})=>(0,s.jsx)(Ut,{entity:Ft,isSelected:Zt}),size:"small",popupIcon:(0,s.jsx)(x.A,{"data-testid":"owner-picker-expand"}),renderInput:Ft=>(0,s.jsx)(g.A,{...Ft,className:U.input,onChange:Zt=>{At(Zt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:Ft=>{const Zt=Ft.currentTarget;Math.abs(Zt.scrollHeight-Zt.clientHeight-Zt.scrollTop)<1&&de?.cursor&&ue({items:de.items,cursor:de.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},8859:(G,S,t)=>{"use strict";t.d(S,{z:()=>T});var s=t(31085),a=t(6820),u=t(72348),C=t(72072),f=t(9222),g=t(14041),h=t(29207),d=t(10394),v=t(71677),m=t(58837),E=t(3169);const x=(0,m.A)(y=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:y.spacing(.5),color:y.palette.text.secondary,"& svg":{verticalAlign:"middle"}}}),{name:"CatalogReactEntityDisplayName"}),O=y=>{const{entityRef:R,hideIcon:F,disableTooltip:B,defaultKind:X,defaultNamespace:V}=y,k=x(),{primaryTitle:Q,secondaryTitle:Z,Icon:K}=(0,E.f)(R,{defaultKind:X,defaultNamespace:V});let J=(0,s.jsx)(s.Fragment,{children:Q});return J=(0,s.jsxs)(d.A,{component:"span",className:k.root,children:[K&&!F?(0,s.jsx)(d.A,{component:"span",className:k.icon,children:(0,s.jsx)(K,{fontSize:"inherit"})}):null,J]}),Z&&!B&&(J=(0,s.jsx)(v.Ay,{enterDelay:1500,title:Z,children:J})),J},T=(0,g.forwardRef)((y,R)=>{const{entityRef:F,defaultKind:B,defaultNamespace:X,title:V,children:k,hideIcon:Q,...Z}=y,K=I(y.entityRef),J=k??V??(0,s.jsx)(O,{entityRef:F,defaultKind:B,defaultNamespace:X,hideIcon:Q});return(0,s.jsx)(C.N_,{...Z,ref:R,to:K,children:J})});function I(y){const R=(0,f.S)(h.s);let F,B,X;if(typeof y=="string"){const k=(0,a.KU)(y);F=k.kind,B=k.namespace,X=k.name}else"metadata"in y?(F=y.kind,B=y.metadata.namespace,X=y.metadata.name):(F=y.kind,B=y.namespace,X=y.name);F=F.toLocaleLowerCase("en-US"),B=B?.toLocaleLowerCase("en-US")??u.oQ;const V={kind:encodeURIComponent(F),namespace:encodeURIComponent(B),name:encodeURIComponent(X)};return R(V)}},34428:(G,S,t)=>{"use strict";t.d(S,{i:()=>f});var s=t(31085),a=t(6820),u=t(14041),C=t(8859);function f(g){const{entityRefs:h,hideIcons:d,...v}=g;return(0,s.jsx)(s.Fragment,{children:h.map((m,E)=>{const x=typeof m=="string"?m:(0,a.U2)(m);return(0,s.jsxs)(u.Fragment,{children:[E>0&&", ",(0,s.jsx)(C.z,{...v,entityRef:m,hideIcon:d})]},`${E}.${x}`)})})}},90184:(G,S,t)=>{"use strict";t.d(S,{S:()=>C,Z:()=>f});var s=t(72348),a=t(46123),u=t.n(a);function C(g,h){const d=h?.defaultKind;let v,m,E;return"metadata"in g?(v=g.kind,m=g.metadata.namespace,E=g.metadata.name):(v=g.kind,m=g.namespace,E=g.name),(m===void 0||m==="")&&(m=s.oQ),h?.defaultNamespace!==void 0?h?.defaultNamespace===m&&(m=void 0):m===s.oQ&&(m=void 0),v=v.toLocaleLowerCase("en-US"),v=d&&d.toLocaleLowerCase("en-US")===v?void 0:v,`${v?`${v}:`:""}${m?`${m}/`:""}${E}`}function f(g,h){for(const d of["spec.profile.displayName","metadata.title"]){const v=u()(g,d);if(v&&typeof v=="string")return v}return h}},91035:(G,S,t)=>{"use strict";t.d(S,{m:()=>v});var s=t(31085),a=t(58837),u=t(14041),C=t(92822),f=t(50207),g=t(64630),h=t(87849);const d=(0,a.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),v=m=>{const E=d(),{t:x}=(0,h.i)(g.j);return(0,s.jsx)(f.y,{label:x("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:C.q_,showCounts:m.showCounts,InputProps:{className:E.input}})}},67626:(G,S,t)=>{"use strict";t.d(S,{y:()=>St});var s=t(31085),a=t(72427),u=t(65461),C=t(40703),f=t(58007),g=t(46423),h=t(65569),d=t(5951),v=t(26343),m=t(72501),E=t(58837),x=t(9684),O=t(80109),T=t(14041),I=t(92822),y=t(21405),R=t(16009),F=t(45250),B=t(73466),X=t(7341),V=t(26796),k=t(87290),Q=t(48899);function Z(){const vt=(0,a.gf)(R.K),Et=(0,a.gf)(X.v),{filters:dt}=(0,y.nK)(),{value:gt,loading:Ct}=(0,B.A)(async()=>(await vt.getBackstageIdentity()).ownershipEntityRefs,[]),{user:pt,owners:Pt,...It}=dt,Ut=(0,V.$3)((0,F.compact)(Object.values(It))),[{value:Mt,loading:bt},U]=(0,k.A)(async rt=>{const mt=K(rt.owners,rt.ownershipEntityRefs);if(mt===void 0)return 0;const{["metadata.name"]:ut,...ot}=rt.filter.filter,{totalItems:At}=await Et.queryEntities({...rt.filter,filter:{...ot,"relations.ownedBy":mt},limit:0});return At},[],{loading:!0});return(0,Q.A)(()=>{Object.keys(Ut.filter).length!==0&&gt!==void 0&&U({ownershipEntityRefs:gt,owners:Pt,filter:Ut})},[gt,Pt,Ut]),{count:Mt,loading:Ct||bt,filter:(0,T.useMemo)(()=>I.tN.owned(gt??[]),[gt]),ownershipEntityRefs:gt}}function K(vt,Et){if(Et===void 0)return;const dt=vt?.values??[];if(dt.length){const gt=(0,F.intersection)(dt,Et);return gt.length===0?void 0:gt}return Et}function J(){const vt=(0,a.gf)(X.v),{filters:Et}=(0,y.nK)(),dt=(0,T.useRef)(),gt=(0,T.useMemo)(()=>{const{user:Pt,...It}=Et,Ut=(0,F.compact)(Object.values(It)),Mt=(0,V.$3)(Ut),bt={...Mt,limit:0};return Object.keys(Mt.filter).length===0?(dt.current=void 0,dt.current):(0,F.isEqual)(bt,dt.current)?dt.current:(dt.current=bt,bt)},[Et]),{value:Ct,loading:pt}=(0,B.A)(async()=>{if(gt===void 0)return 0;const{totalItems:Pt}=await vt.queryEntities(gt);return Pt},[gt]);return{count:Ct,loading:pt}}var H=t(6820),tt=t(56889);function Y(){const vt=(0,a.gf)(X.v),{filters:Et}=(0,y.nK)(),{starredEntities:dt}=(0,tt.I)(),gt=(0,T.useRef)(),Ct=(0,T.useMemo)(()=>{const{user:Ut,...Mt}=Et,bt=(0,F.compact)(Object.values(Mt)),U=(0,V.$3)(bt),rt={...U,filter:{...U.filter,["metadata.name"]:Array.from(dt).map(mt=>(0,H.KU)(mt).name)},limit:1e3};return(0,F.isEqual)(rt,gt.current)?gt.current:(gt.current=rt,rt)},[Et,dt]),{value:pt,loading:Pt}=(0,B.A)(async()=>dt.size?(await vt.queryEntities(Ct)).items.map(Mt=>(0,H.U2)({kind:Mt.kind,namespace:Mt.metadata.namespace,name:Mt.metadata.name})).filter(Mt=>dt.has(Mt)).length:0,[Ct,dt]),It=(0,T.useMemo)(()=>I.tN.starred(Array.from(dt)),[dt]);return{count:pt,loading:Pt,filter:It}}var lt=t(87849),ht=t(64630);const xt=(0,E.A)(vt=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:vt.spacing(1,0,1,0)},title:{margin:vt.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:vt.palette.text.primary},menuItem:{minHeight:vt.spacing(6)},groupWrapper:{margin:vt.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function yt(vt,Et){return[{name:Et("userListPicker.personalFilter.title"),items:[{id:"owned",label:Et("userListPicker.personalFilter.ownedLabel"),icon:x.A},{id:"starred",label:Et("userListPicker.personalFilter.starredLabel"),icon:O.A}]},{name:vt,items:[{id:"all",label:Et("userListPicker.orgFilterAllLabel")}]}]}const St=vt=>{const{initialFilter:Et,availableFilters:dt}=vt,gt=xt(),Ct=(0,a.gf)(u.U),{t:pt}=(0,lt.i)(ht.j),Pt=Ct.getOptionalString("organization.name")??pt("userListPicker.defaultOrgName"),{filters:It,updateFilters:Ut,queryParameters:{kind:Mt,user:bt}}=(0,y.nK)(),U=["starred","all"],z=yt(Pt,pt).map(Yt=>({...Yt,items:Yt.items.filter(({id:ne})=>["group","user"].some(Ft=>Ft===Mt)?U.includes(ne):!dt||dt.includes(ne))})).filter(({items:Yt})=>!!Yt.length),{count:rt,loading:mt,filter:ut}=Z(),{count:ot}=J(),{count:At,filter:$t,loading:kt}=Y(),jt=(0,T.useMemo)(()=>[bt].flat()[0],[bt]),[Vt,de]=(0,T.useState)(jt??Et),ie=(0,T.useMemo)(()=>({all:ot,starred:At,owned:rt}),[At,rt,ot]);(0,T.useEffect)(()=>{jt&&de(jt)},[jt]);const ue=mt||kt;return(0,T.useEffect)(()=>{!ue&&Vt&&Vt!=="all"&&ie[Vt]===0&&de("all")},[ue,ie,Vt,de]),(0,T.useEffect)(()=>{if(!Vt||ue)return;Ut({user:Vt==="owned"?ut:Vt==="starred"?$t:I.tN.all()})},[Vt,$t,ut,Ut,ue]),(0,s.jsx)(C.A,{className:gt.root,children:z.map(Yt=>(0,s.jsxs)(T.Fragment,{children:[(0,s.jsx)(m.A,{variant:"subtitle2",component:"span",className:gt.title,children:Yt.name}),(0,s.jsx)(C.A,{className:gt.groupWrapper,children:(0,s.jsx)(f.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":Yt.name,children:Yt.items.map((ne,Ft)=>(0,s.jsxs)(v.A,{role:"none presentation",divider:Ft!==Yt.items.length-1,onClick:()=>de(ne.id),selected:ne.id===It.user?.value,className:gt.menuItem,disabled:ie[ne.id]===0,"data-testid":`user-picker-${ne.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[ne.icon&&(0,s.jsx)(g.A,{className:gt.listIcon,children:(0,s.jsx)(ne.icon,{fontSize:"small"})}),(0,s.jsx)(d.A,{children:(0,s.jsxs)(m.A,{variant:"body1",children:[ne.label," "]})}),(0,s.jsx)(h.A,{children:ie[ne.id]??"-"})]},ne.id))})})]},Yt.name))})}},92822:(G,S,t)=>{"use strict";t.d(S,{I5:()=>v,Kf:()=>O,N9:()=>d,V3:()=>h,gM:()=>C,gZ:()=>x,mT:()=>T,qA:()=>f,q_:()=>g,tN:()=>E,z:()=>m});var s=t(6820),a=t(51372),u=t(67871);class C{value;constructor(y){this.value=y}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class f{value;constructor(y){this.value=y}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class g{values;constructor(y){this.values=y}filterEntity(y){return this.values.every(R=>(y.metadata.tags??[]).includes(R))}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}}class h{value;constructor(y){this.value=y}filterEntity(y){const R=this.toUpperArray(this.value.split(/\s/)),F=this.toUpperArray([y.metadata.tags]),B=this.toUpperArray([y.metadata.name,y.metadata.title]);for(const X of R)if(F.every(V=>V!==X)&&B.every(V=>!V.includes(X)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(y){return y.flat().filter(R=>!!R).map(R=>R.toLocaleUpperCase("en-US"))}}class d{values;constructor(y){this.values=y.reduce((R,F)=>{try{return R.push((0,s.U2)((0,s.KU)(F,{defaultKind:"Group"}))),R}catch{return R}},[])}getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(y){return this.values.some(R=>(0,u.t)(y,a.vv).some(F=>(0,s.U2)(F)===R))}toQueryValue(){return this.values}}class v{values;constructor(y){this.values=y}getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(y){return this.values.some(R=>y.spec?.lifecycle===R)}toQueryValue(){return this.values}}class m{values;constructor(y){this.values=y}getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(y){return this.values.some(R=>y.metadata.namespace===R)}toQueryValue(){return this.values}}class E{value;refs;constructor(y,R){this.value=y,this.refs=R}static owned(y){return new E("owned",y)}static all(){return new E("all")}static starred(y){return new E("starred",y)}getCatalogFilters(){return this.value==="owned"?{"relations.ownedBy":this.refs??[]}:this.value==="starred"?{"metadata.name":this.refs?.map(y=>(0,s.KU)(y).name)??[]}:{}}filterEntity(y){if(this.value==="starred")return this.refs?.includes((0,s.U2)(y))??!0;if(this.value==="owned"){const R=(0,u.t)(y,a.vv);return this.refs?.some(F=>R.some(B=>(0,s.U2)(B)===F))??!1}return!0}toQueryValue(){return this.value}}class x{value;isOwnedEntity;isStarredEntity;constructor(y,R,F){this.value=y,this.isOwnedEntity=R,this.isStarredEntity=F}filterEntity(y){switch(this.value){case"owned":return this.isOwnedEntity(y);case"starred":return this.isStarredEntity(y);default:return!0}}toQueryValue(){return this.value}}class O{value;constructor(y){this.value=y}getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(y){const R=y.metadata.annotations?.["backstage.io/orphan"];return R!==void 0&&this.value.toString()===R}}class T{value;constructor(y){this.value=y}filterEntity(y){const R=y?.status?.items?.length>0;return R!==void 0&&this.value===R}}},21405:(G,S,t)=>{"use strict";t.d(S,{B9:()=>I,nK:()=>y});var s=t(31085),a=t(45250),u=t.n(a),C=t(45810),f=t.n(C),g=t(14041),h=t(18690),d=t(87290),v=t(22771),m=t(71581),E=t(7341),x=t(26796),O=t(72427);const T=(0,g.createContext)(void 0),I=R=>{const F=(0,m.A)(),B=(0,O.gf)(E.v),[X,V]=(0,g.useState)({}),k=(0,h.zy)(),Q=R.pagination===!0||typeof R.pagination=="object",Z=R.pagination&&typeof R.pagination=="object"&&typeof R.pagination.limit=="number"?R.pagination.limit:20,{queryParameters:K,cursor:J}=(0,g.useMemo)(()=>{const dt=f().parse(k.search,{ignoreQueryPrefix:!0});return{queryParameters:dt.filters??{},cursor:typeof dt.cursor=="string"?dt.cursor:void 0}},[k]),[H,tt]=(0,g.useState)(J),[Y,lt]=(0,g.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:Q?{}:void 0})),[{loading:ht,error:xt},yt]=(0,d.A)(async()=>{const dt=(0,a.compact)(Object.values(X)),gt=Object.keys(X).reduce((Ct,pt)=>{const Pt=X[pt];return Pt?.toQueryValue&&(Ct[pt]=Pt.toQueryValue()),Ct},{});if(Q)if(H){if(H!==Y.appliedCursor){const Ct=(0,x.be)(dt),pt=await B.queryEntities({cursor:H,limit:Z});lt({appliedFilters:X,appliedCursor:H,backendEntities:pt.items,entities:pt.items.filter(Ct),pageInfo:pt.pageInfo,totalItems:pt.totalItems})}}else{const Ct=(0,x.be)(dt),pt=(0,x.$3)(dt),Pt=(0,x.$3)((0,a.compact)(Object.values(Y.appliedFilters)));if(!(0,a.isEqual)(Pt,pt)){const It=await B.queryEntities({...pt,limit:Z,orderFields:[{field:"metadata.name",order:"asc"}]});lt({appliedFilters:X,backendEntities:It.items,entities:It.items.filter(Ct),pageInfo:It.pageInfo,totalItems:It.totalItems})}}else{const Ct=(0,x.be)(dt),pt=(0,x.Rr)(dt),Pt=(0,x.Rr)((0,a.compact)(Object.values(Y.appliedFilters)));if((0,a.isEqual)(Pt,pt)){const It=Y.backendEntities.filter(Ct);lt({appliedFilters:X,backendEntities:Y.backendEntities,entities:It,totalItems:It.length})}else{const It=await B.getEntities({filter:pt}),Ut=It.items.filter(Ct);lt({appliedFilters:X,backendEntities:It.items,entities:Ut,totalItems:Ut.length})}}if(F()){const Ct=f().parse(k.search,{ignoreQueryPrefix:!0}),pt=f().stringify({...Ct,filters:gt,cursor:H},{addQueryPrefix:!0,arrayFormat:"repeat"}),Pt=`${window.location.pathname}${pt}`;window.history?.replaceState(null,document.title,Pt)}},[B,K,X,Y,H,Q],{loading:!0});(0,v.A)(yt,10,[X,H]);const St=(0,g.useCallback)(dt=>{tt(void 0),V(gt=>{const Ct=typeof dt=="function"?dt(gt):dt;return{...gt,...Ct}})},[]),vt=(0,g.useMemo)(()=>{if(!Q)return;const dt=Y.pageInfo?.prevCursor,gt=Y.pageInfo?.nextCursor;return{prev:dt?()=>tt(dt):void 0,next:gt?()=>tt(gt):void 0}},[Q,Y.pageInfo]),Et=(0,g.useMemo)(()=>({filters:Y.appliedFilters,entities:Y.entities,backendEntities:Y.backendEntities,updateFilters:St,queryParameters:K,loading:ht,error:xt,pageInfo:vt,totalItems:Y.totalItems}),[Y,St,K,ht,xt,vt]);return(0,s.jsx)(T.Provider,{value:Et,children:R.children})};function y(){const R=(0,g.useContext)(T);if(!R)throw new Error("useEntityList must be used within EntityListProvider");return R}},56889:(G,S,t)=>{"use strict";t.d(S,{I:()=>h});var s=t(6820),a=t(72427),u=t(14041),C=t(1394),f=t(18);function g(d){return typeof d=="string"?d:(0,s.U2)(d)}function h(){const d=(0,a.gf)(f.a),v=(0,C.A)((0,u.useMemo)(()=>d.starredEntitie$(),[d]),new Set),m=(0,u.useCallback)(x=>v.has(g(x)),[v]),E=(0,u.useCallback)(x=>d.toggleStarred(g(x)).then(),[d]);return{starredEntities:v,toggleStarredEntity:E,isStarredEntity:m}}},29207:(G,S,t)=>{"use strict";t.d(S,{s:()=>u});var s=t(34569),a=t(63544);const u=(0,a.Q)("catalog:entity-route-ref",()=>(0,s.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function C(f){return{kind:f.kind.toLocaleLowerCase("en-US"),namespace:f.metadata.namespace?.toLocaleLowerCase("en-US")??DEFAULT_NAMESPACE,name:f.metadata.name}}},64630:(G,S,t)=>{"use strict";t.d(S,{j:()=>a});var s=t(93184);const a=(0,s.h)({id:"catalog-react",messages:{catalogFilter:{title:"Filters",buttonTitle:"Filters"},entityKindPicker:{title:"Kind",errorMessage:"Failed to load entity kinds"},entityLifecyclePicker:{title:"Lifecycle"},entityNamespacePicker:{title:"Namespace"},entityOwnerPicker:{title:"Owner"},entityProcessingStatusPicker:{title:"Processing Status"},entityTagPicker:{title:"Tags"},entityPeekAheadPopover:{title:"Drill into the entity to see all of the tags.",emailCardAction:{title:"Email {{email}}",subTitle:"mailto {{email}}"},entityCardActionsTitle:"Show details"},entitySearchBar:{placeholder:"Search"},entityTypePicker:{title:"Type",errorMessage:"Failed to load entity types",optionAllTitle:"all"},favoriteEntity:{addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites"},inspectEntityDialog:{title:"Entity Inspector",closeButtonTitle:"Close",ancestryPage:{title:"Ancestry"},colocatedPage:{title:"Colocated",description:"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).",alertNoLocation:"Entity had no location information.",alertNoEntity:"There were no other entities on this location."},jsonPage:{title:"Entity as JSON",description:"This is the raw entity data as received from the catalog, on JSON form."},overviewPage:{title:"Overview"},yamlPage:{title:"Entity as YAML",description:"This is the raw entity data as received from the catalog, on YAML form."}},unregisterEntityDialog:{title:"Are you sure you want to unregister this entity?",cancelButtonTitle:"Cancel",deleteButtonTitle:"Delete Entity",deleteEntitySuccessMessage:"Removed entity {{entityName}}",bootstrapState:{title:'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.',advancedDescription:"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.",advancedOptions:"Advanced Options"},onlyDeleteStateTitle:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.",unregisterState:{title:"This action will unregister the following entities:",subTitle:"Located at the following location:",description:"To undo, just re-register the entity in {{appTitle}}.",unregisterButtonTitle:"Unregister Location",advancedOptions:"Advanced Options",advancedDescription:"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."},errorStateTitle:"Internal error: Unknown state"},userListPicker:{defaultOrgName:"Company",personalFilter:{title:"Personal",ownedLabel:"Owned",starredLabel:"Starred"},orgFilterAllLabel:"All"}}})},26796:(G,S,t)=>{"use strict";t.d(S,{$3:()=>u,Rr:()=>C,be:()=>f});var s=t(92822);function a(g){return!!g.getFullTextFilters}function u(g){const h=g.reduce((v,m)=>({...v,...m.getCatalogFilters?m.getCatalogFilters():{}}),{}),d=g.find(a)?.getFullTextFilters();return{filter:h,fullTextFilter:d}}function C(g){const h={};return g.forEach(d=>{d instanceof s.q_||d instanceof s.N9||d instanceof s.I5||d instanceof s.z||d instanceof s.tN||d instanceof s.Kf||d instanceof s.V3||d instanceof s.gZ||Object.assign(h,d.getCatalogFilters?.()||{})}),h}function f(g){return h=>g.every(d=>!d.filterEntity||d.filterEntity(h))}},67871:(G,S,t)=>{"use strict";t.d(S,{t:()=>a});var s=t(6820);function a(u,C,f){let g=u?.relations?.filter(h=>h.type===C).map(h=>(0,s.KU)(h.targetRef))||[];return f?.kind&&(g=g.filter(h=>h.kind.toLocaleLowerCase("en-US")===f.kind.toLocaleLowerCase("en-US"))),g}},95203:(G,S,t)=>{"use strict";t.d(S,{qP:()=>g,Zg:()=>d,rQ:()=>m,pS:()=>v,UJ:()=>h});var s=t(59598);let a=s.b;class u{id;params;optional;defaultTarget;[a];constructor(x,O,T,I){this.id=x,this.params=O,this.optional=T,this.defaultTarget=I,this[a]="external"}toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}}function C(E){return new u(E.id,E.params??[],!!E.optional,E?.defaultTarget)}var f=t(34569);const g=C({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),h=C({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),d=C({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),v=C({id:"catalog:unregister-redirect",optional:!0}),m=(0,f.H)({id:"catalog"})},54241:(G,S,t)=>{"use strict";t.d(S,{b:()=>s});var s;(function(a){a.DENY="DENY",a.ALLOW="ALLOW",a.CONDITIONAL="CONDITIONAL"})(s||(s={}))},96824:(G,S,t)=>{"use strict";t.d(S,{x:()=>a});var s=t(55309);const a=(0,s.y)({id:"plugin.permission.api"})},70734:(G,S,t)=>{"use strict";t.d(S,{e:()=>f});var s=t(31085),a=t(14041),u=t(58837);const C=(0,u.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),f=g=>{const{text:h,preTag:d,postTag:v}=g,m=C(),E=(0,a.useMemo)(()=>h.split(new RegExp(`(${d}.+?${v})`)),[v,d,h]);return(0,s.jsx)(s.Fragment,{children:E.map((x,O)=>x.includes(d)?(0,s.jsx)("mark",{className:m.highlight,children:x.replace(new RegExp(`${d}|${v}`,"g"),"")},O):x)})}},54560:(G,S,t)=>{"use strict";t.d(S,{ec:()=>v});var s=t(31085),a=t(14041),u=t(93368),C=t(88758),f=t(8109);const g="search.results.list.items.extensions.v1",h=(x,O)=>{for(const T of x)if(!(!isValidElement(T)||!getComponentData(T,g)?.(O)))return cloneElement(T,{rank:O.rank,highlight:O.highlight,result:O.document,...T.props});return null},d=x=>{const{rank:O,result:T,noTrack:I,children:y,alignItems:R="flex-start",...F}=x,B=(0,u.s)(),X=(0,a.useCallback)(()=>{I||T&&B.captureEvent("discover",T.title,{attributes:{to:T.location},value:O})},[O,T,I,B]);return(0,s.jsx)(f.A,{divider:!0,alignItems:R,onClickCapture:X,...F,children:y})},v=x=>{const{name:O,component:T,predicate:I=()=>!0}=x;return(0,C.zZ)({name:O,component:{lazy:()=>T().then(y=>R=>(0,s.jsx)(d,{rank:R.rank,result:R.result,noTrack:R.noTrack,children:(0,a.createElement)(y,R)}))},data:{[g]:I}})},m=x=>{const O=useElementFilter(x,T=>T.selectByComponentData({key:g}).getElements(),[x]);return useCallback((T,I)=>{const y=h(O,T);return _jsx(Fragment,{children:y??_jsx(d,{rank:T.rank,result:T.document,children:_jsx(DefaultResultListItem,{rank:T.rank,highlight:T.highlight,result:T.document})})},I)},[O])},E=x=>{const{results:O,children:T,...I}=x,y=m(T);return _jsx(List,{...I,children:O.map(y)})}},86202:(G,S,t)=>{"use strict";t.d(S,{A:()=>s,G:()=>a});const s="backstage.io/techdocs-ref",a="backstage.io/techdocs-entity"},72020:(G,S,t)=>{"use strict";t.d(S,{AF:()=>d,Hr:()=>E,Wm:()=>h,YR:()=>I,po:()=>v});var s=t(31085),a=t(14041),u=t(18690),C=t(19402),f=t(88758),g=t(82442);const h="techdocs.addons.addon.v1",d="techdocs.addons.wrapper.v1",v=()=>null;(0,C.h)(v,d,!0);const m=y=>`${h}.${y.toLocaleLowerCase("en-US")}`;function E(y){const{name:R,component:F}=y;return(0,f.zZ)({name:R,component:{sync:B=>(0,s.jsx)(F,{...B})},data:{[h]:y,[m(R)]:!0}})}const x=(y,R)=>y.selectByComponentData({key:R}).getElements()[0],O=y=>y.selectByComponentData({key:d}).selectByComponentData({key:h}),T=y=>y.selectByComponentData({key:d}).findComponentData({key:h}),I=()=>{const y=(0,u.P1)(),R=(0,g.O)(y,O),F=(0,g.O)(y,T),B=(0,a.useCallback)(k=>{if(!R||!k)return null;const Q=m(k.name);return x(R,Q)??null},[R]),X=(0,a.useCallback)(k=>{const Q=F.find(Z=>Z.name===k);return Q?B(Q):null},[F,B]),V=(0,a.useCallback)(k=>{const Q=F.filter(Z=>Z.location===k);return Q.length?Q.map(B):null},[F,B]);return{renderComponentByName:X,renderComponentsByLocation:V}}},26679:(G,S,t)=>{"use strict";t.d(S,{l:()=>a,s:()=>u});var s=t(55309);const a=(0,s.y)({id:"plugin.techdocs.service"}),u=(0,s.y)({id:"plugin.techdocs.storageservice"})},86892:(G,S,t)=>{"use strict";t.d(S,{R:()=>y,V:()=>R});var s=t(31085),a=t(14041),u=t(73466),C=t(28966),f=t(6820),g=t(43836),h=t(10602),d=t(72427),v=t(65461),m=t(25862),E=t(26679);function x(F,B){return B.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(F.kind=F.kind.toLocaleLowerCase(),F.name=F.name.toLocaleLowerCase(),F.namespace=F.namespace.toLocaleLowerCase()),F}const O=(F,B)=>(0,f.U2)(F)===(0,f.U2)(B),T={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},I=(0,g.tK)("techdocs-reader-page-context"),y=(0,a.memo)(F=>{const{entityRef:B,children:X}=F,V=(0,d.gf)(E.l),k=(0,d.gf)(v.U),Q=(0,u.A)(async()=>V.getEntityMetadata(B),[B]),Z=(0,C.A)(async()=>V.getTechDocsMetadata(B),[B]),[K,J]=(0,a.useState)(T.title),[H,tt]=(0,a.useState)(T.subtitle),[Y,lt]=(0,a.useState)(T.shadowRoot);(0,a.useEffect)(()=>{Y&&!Z.value&&!Z.loading&&Z.retry()},[Z.value,Z.loading,Y,Z.retry,Z]);const ht={metadata:Z,entityRef:x(B,k),entityMetadata:Q,shadowRoot:Y,setShadowRoot:lt,title:K,setTitle:J,subtitle:H,setSubtitle:tt},xt=(0,h.B)({1:ht});return(0,s.jsx)(m.Ig,{attributes:{entityRef:(0,f.U2)(B)},children:(0,s.jsx)(I.Provider,{value:xt,children:X instanceof Function?X(ht):X})})},(F,B)=>O(F.entityRef,B.entityRef)),R=()=>{const F=(0,a.useContext)(I);if(F===void 0)return T;const B=F.atVersion(1);if(B===void 0)throw new Error("No context found for version 1.");return B}},99730:(G,S,t)=>{"use strict";t.d(S,{e:()=>s});const s=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(G,S,t)=>{"use strict";t.d(S,{V:()=>s});function s(a,u){return u.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?a:a.toLocaleLowerCase("en-US")}},85920:(G,S,t)=>{"use strict";t.d(S,{K:()=>K});var s=t(31085),a=t(14041),u=t(26280),C=t(59428),f=t(27586),g=t(21405),h=t(54203),d=t(67626),v=t(72987),m=t(91035),E=t(81859),x=t(86519),O=t(86202);class T{getCatalogFilters(){return{[`metadata.annotations.${O.A}`]:x.c}}}const I=()=>{const{updateFilters:J}=(0,g.nK)();return(0,a.useEffect)(()=>{J({techdocs:new T})},[J]),null};var y=t(36338),R=t(45250),F=t(88640),B=t(77310),X=t(56889),V=t(27125),k=t(84295),Q=t(42717);const Z=J=>{const{columns:H,actions:tt,options:Y}=J,{loading:lt,error:ht,entities:xt,filters:yt}=(0,g.nK)(),{isStarredEntity:St,toggleStarredEntity:vt}=(0,X.I)(),[,Et]=(0,y.A)(),dt=(0,R.capitalize)(yt.user?.value??"all"),gt=[k.f.createCopyDocsUrlAction(Et),k.f.createStarEntityAction(St,vt)];return ht?(0,s.jsx)(F.B,{severity:"error",title:"Could not load available documentation.",children:(0,s.jsx)(B.z,{language:"text",text:ht.toString()})}):(0,s.jsx)(V.o,{title:dt,entities:xt,loading:lt,actions:tt||gt,columns:H,options:Y})};Z.columns=Q.B,Z.actions=k.f;const K=J=>{const{initialFilter:H="owned",columns:tt,actions:Y,ownerPickerMode:lt}=J;return(0,s.jsx)(E.S,{children:(0,s.jsxs)(u.U,{children:[(0,s.jsx)(C.d,{title:"",children:(0,s.jsx)(f.Y,{children:"Discover documentation in your ecosystem."})}),(0,s.jsx)(g.B9,{children:(0,s.jsxs)(h.GI,{children:[(0,s.jsxs)(h.GI.Filters,{children:[(0,s.jsx)(I,{}),(0,s.jsx)(d.y,{initialFilter:H}),(0,s.jsx)(v.t,{mode:lt}),(0,s.jsx)(m.m,{})]}),(0,s.jsx)(h.GI.Content,{children:(0,s.jsx)(Z,{actions:Y,columns:tt})})]})})]})})}},27125:(G,S,t)=>{"use strict";t.d(S,{o:()=>F});var s=t(31085),a=t(14041),u=t(36338),C=t(9222),f=t(72427),g=t(65461),h=t(51372),d=t(67871),v=t(90184),m=t(82779),E=t(14209),x=t(44186),O=t(73896),T=t(84295),I=t(42717),y=t(95768);const R=[I.B.createTitleColumn({hidden:!0}),I.B.createNameColumn(),I.B.createOwnerColumn(),I.B.createKindColumn(),I.B.createTypeColumn()],F=B=>{const{entities:X,title:V,loading:k,columns:Q,actions:Z,options:K}=B,[,J]=(0,u.A)(),H=(0,C.S)(m.Oc),tt=(0,f.gf)(g.U);if(!X)return null;const Y=X.map(yt=>{const St=(0,d.t)(yt,h.vv);return{entity:yt,resolved:{docsUrl:H({namespace:(0,y.V)(yt.metadata.namespace??"default",tt),kind:(0,y.V)(yt.kind,tt),name:(0,y.V)(yt.metadata.name,tt)}),ownedByRelations:St,ownedByRelationsTitle:St.map(vt=>(0,v.S)(vt,{defaultKind:"group"})).join(", ")}}}),lt=[T.f.createCopyDocsUrlAction(J)],ht=20,xt=Y&&Y.length>ht;return(0,s.jsx)(s.Fragment,{children:k||Y&&Y.length>0?(0,s.jsx)(E.X,{isLoading:k,options:{paging:xt,pageSize:ht,search:!0,actionsColumnIndex:-1,...K},data:Y,columns:Q||R,actions:Z||lt,title:V?`${V} (${Y.length})`:`All (${Y.length})`}):(0,s.jsx)(x.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,s.jsx)(O.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};F.columns=I.B,F.actions=T.f},84295:(G,S,t)=>{"use strict";t.d(S,{f:()=>d});var s=t(31085),a=t(14041),u=t(55290),C=t(87051),f=t(80109),g=t(15303);const h=(0,C.A)({root:{color:"#f3ba37"}})(f.A),d={createCopyDocsUrlAction(v){return m=>({icon:()=>(0,s.jsx)(u.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>v(`${window.location.origin}${m.resolved.docsUrl}`)})},createStarEntityAction(v,m){return E=>{const x=E.entity,O=v(x);return{cellStyle:{paddingLeft:"1em"},icon:()=>O?(0,s.jsx)(h,{}):(0,s.jsx)(g.A,{}),tooltip:O?"Remove from favorites":"Add to favorites",onClick:()=>m(x)}}}}},42717:(G,S,t)=>{"use strict";t.d(S,{B:()=>m});var s=t(31085),a=t(14041),u=t(10394),C=t(58837);const f=(0,C.A)(E=>({value:{marginBottom:E.spacing(.75)},subvalue:{color:E.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function g(E){const{value:x,subvalue:O}=E,T=f();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{className:T.value,children:x}),(0,s.jsx)(u.A,{className:T.subvalue,children:O})]})}var h=t(72072),d=t(34428);function v(E){return E.metadata.title||E.metadata.name}const m={createTitleColumn(E){return{...m.createNameColumn(),field:"entity.metadata.title",hidden:E?.hidden}},createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,searchable:!0,defaultSort:"asc",customSort:(E,x)=>{const O=v(E.entity).toLocaleLowerCase(),T=v(x.entity).toLocaleLowerCase();return O.localeCompare(T)},render:E=>(0,s.jsx)(g,{value:(0,s.jsx)(h.N_,{to:E.resolved.docsUrl,children:v(E.entity)}),subvalue:E.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:E})=>(0,s.jsx)(d.i,{entityRefs:E.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},81859:(G,S,t)=>{"use strict";t.d(S,{S:()=>g});var s=t(31085),a=t(14041),u=t(27155),C=t(72427),f=t(65461);const g=h=>{const{children:d}=h,m=`Documentation available in ${(0,C.gf)(f.U).getOptionalString("organization.name")??"Backstage"}`;return(0,s.jsx)(u.d,{title:"Documentation",subtitle:m,themeId:"documentation",children:d})}},39278:(G,S,t)=>{"use strict";t.d(S,{$j:()=>B,Wj:()=>X,Ju:()=>I});var s=t(26679),a=t(70835),u=t(97142),C=t(92110);class f{configApi;discoveryApi;fetchApi;constructor(Q){this.configApi=Q.configApi,this.discoveryApi=Q.discoveryApi,this.fetchApi=Q.fetchApi}async getCookie(){const Z=`${await this.getApiOrigin()}/cookie`,K=await this.fetchApi.fetch(`${Z}`,{credentials:"include"});if(!K.ok)throw await a.o.fromResponse(K);return await K.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(Q){const{kind:Z,namespace:K,name:J}=Q,tt=`${await this.getApiOrigin()}/metadata/techdocs/${K}/${Z}/${J}`,Y=await this.fetchApi.fetch(`${tt}`);if(!Y.ok)throw await a.o.fromResponse(Y);return await Y.json()}async getEntityMetadata(Q){const{kind:Z,namespace:K,name:J}=Q,tt=`${await this.getApiOrigin()}/metadata/entity/${K}/${Z}/${J}`,Y=await this.fetchApi.fetch(`${tt}`);if(!Y.ok)throw await a.o.fromResponse(Y);return await Y.json()}}class g{configApi;discoveryApi;fetchApi;constructor(Q){this.configApi=Q.configApi,this.discoveryApi=Q.discoveryApi,this.fetchApi=Q.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(Q,Z){const{kind:K,namespace:J,name:H}=Q,Y=`${await this.getStorageUrl()}/${J}/${K}/${H}/${Z}`,lt=await this.fetchApi.fetch(`${Y.endsWith("/")?Y:`${Y}/`}index.html`);let ht="";switch(lt.status){case 404:throw ht="Page not found. ",Z||(ht+="This could be because there is no index.md file in the root of the docs directory of this repository."),new u.m_(ht);case 500:throw ht="Could not generate documentation or an error in the TechDocs backend. ",new Error(ht);default:break}return lt.text()}async syncEntityDocs(Q,Z=()=>{}){const{kind:K,namespace:J,name:H}=Q,Y=`${await this.getApiOrigin()}/sync/${J}/${K}/${H}`;return new Promise((lt,ht)=>{const xt=new AbortController;(0,C.y)(Y,{fetch:this.fetchApi.fetch,signal:xt.signal,onmessage(yt){if(yt.event==="log")yt.data&&Z(JSON.parse(yt.data));else if(yt.event==="finish"){let St=!1;yt.data&&({updated:St}=JSON.parse(yt.data)),lt(St?"updated":"cached")}else yt.event==="error"&&ht(new Error(yt.data))},onerror(yt){xt.abort(),ht(yt)}})})}async getBaseUrl(Q,Z,K){const{kind:J,namespace:H,name:tt}=Z,lt=`${await this.getApiOrigin()}/static/docs/${H}/${J}/${tt}/${K}`;return new URL(Q,lt.endsWith("/")?lt:`${lt}/`).toString()}}var h=t(82779),d=t(9803),v=t(12935),m=t(65461),E=t(57405),x=t(70795),O=t(88758),T=t(54560);const I=(0,d.i)({id:"techdocs",apis:[(0,v.b)({api:s.s,deps:{configApi:m.U,discoveryApi:E.I,fetchApi:x.a},factory:({configApi:k,discoveryApi:Q,fetchApi:Z})=>new g({configApi:k,discoveryApi:Q,fetchApi:Z})}),(0,v.b)({api:s.l,deps:{configApi:m.U,discoveryApi:E.I,fetchApi:x.a},factory:({configApi:k,discoveryApi:Q,fetchApi:Z})=>new f({configApi:k,discoveryApi:Q,fetchApi:Z})})],routes:{root:h.rQ,docRoot:h.Oc,entityContent:h.Ri}}),y=I.provide((0,O.QJ)({name:"TechdocsPage",component:()=>t.e(9605).then(t.bind(t,29605)).then(k=>k.Router),mountPoint:h.rQ})),R=I.provide((0,O.QJ)({name:"EntityTechdocsContent",component:()=>t.e(9605).then(t.bind(t,29605)).then(k=>k.EmbeddedDocsRouter),mountPoint:h.Ri})),F=I.provide((0,O.QJ)({name:"TechDocsCustomHome",component:()=>t.e(4487).then(t.bind(t,94487)).then(k=>k.TechDocsCustomHome),mountPoint:h.rQ})),B=I.provide((0,O.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(k=>k.TechDocsIndexPage),mountPoint:h.rQ})),X=I.provide((0,O.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(k=>k.TechDocsReaderPage),mountPoint:h.Oc})),V=I.provide((0,T.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(k=>k.TechDocsSearchResultListItem),predicate:k=>k.type==="techdocs"}))},10245:(G,S,t)=>{"use strict";t.d(S,{p:()=>Ss});var s=t(31085),a=t(14041),u=t(42899),C=t(58837),f=t(86892),g=t(9394),h=t(91360),d=t(22856),v=t(68146);const m="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",E=p=>{(0,a.useEffect)(()=>{if(!p)return()=>{};const w=p.querySelectorAll('head > link[rel="stylesheet"]');let M=w?.length??0;const $=new CustomEvent(m);if(!M)return p.dispatchEvent($),()=>{};const N=()=>{--M===0&&p.dispatchEvent($)};return w?.forEach(_=>{_.addEventListener("load",N)}),()=>{w?.forEach(_=>{_.removeEventListener("load",N)})}},[p])},x=p=>{const[w,M]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!p)return()=>{};M(!0);const $=p.style;$.setProperty("opacity","0");const N=()=>{M(!1),$.setProperty("opacity","1")};return p.addEventListener(m,N),()=>{p.removeEventListener(m,N)}},[p]),w},O=p=>{const{element:w,onAppend:M,children:$}=p,[N,_]=(0,a.useState)((0,g.vt)({...(0,d.A)(),insertionPoint:void 0}));E(w);const ct=x(w),Ot=(0,a.useCallback)(Rt=>{if(!w||!Rt)return;_((0,g.vt)({...(0,d.A)(),insertionPoint:w.querySelector("head")||void 0}));let Lt=Rt.shadowRoot;Lt||(Lt=Rt.attachShadow({mode:"open"})),Lt.replaceChildren(w),typeof M=="function"&&M(Lt)},[w,M]);return(0,s.jsxs)(s.Fragment,{children:[ct&&(0,s.jsx)(v.k,{}),(0,s.jsxs)(h.Ay,{jss:N,sheetsManager:new Map,children:[(0,s.jsx)("div",{ref:Ot,"data-testid":"techdocs-native-shadowroot"}),$]})]})};var T=t(12784);const I=()=>{const{shadowRoot:p}=(0,f.V)();return p},y=p=>{const w=I(),[M,$]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let N;return w&&(N=new MutationObserver(()=>{$(!M)}),N.observe(w,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>N?.disconnect()},[w,M,$]),w?p.map(N=>w.querySelectorAll(N)).filter(N=>N.length).map(N=>Array.from(N)).flat():[]},R=p=>p.toString()&&p.rangeCount&&p.getRangeAt(0).getBoundingClientRect().top,F=(p=0)=>{const w=I(),[M,$]=useState(null),N=useMemo(()=>debounce(()=>{const _=w,ct=_.getSelection?_.getSelection():document.getSelection();ct&&R(ct)?$(ct):$(null)},p),[w,$,p]);return useEffect(()=>(window.document.addEventListener("selectionchange",N),()=>{N.cancel(),window.document.removeEventListener("selectionchange",N)}),[N]),M};var B=t(12173),X=t(26280),V=t(45250),k=t(73466),Q=t(5877),Z=t(43836),K=t(10602),J=t(72427),H=t(93368),tt=t(25862),Y=t(65461),lt=t(55309);const ht=(0,lt.y)({id:"plugin.search.queryservice"});class xt{mockedResults;constructor(w){this.mockedResults=w}query(){return Promise.resolve(this.mockedResults||{results:[]})}}const yt=(0,Z.tK)("search-context"),St=()=>{const p=(0,a.useContext)(yt);if(!p)throw new Error("useSearch must be used within a SearchContextProvider");const w=p.atVersion(1);if(!w)throw new Error("No SearchContext v1 found");return w},vt=()=>(0,a.useContext)(yt)!==void 0,Et={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},dt=(p=Et)=>{const w=(0,J.gf)(ht),M=(0,H.s)(),[$,N]=(0,a.useState)(p.term),[_,ct]=(0,a.useState)(p.types),[Ot,Rt]=(0,a.useState)(p.filters),[Lt,wt]=(0,a.useState)(p.pageLimit),[Bt,Dt]=(0,a.useState)(p.pageCursor),ce=(0,Q.A)($),le=(0,Q.A)(Ot),Wt=(0,k.A)(async()=>{const te=await w.query({term:$,types:_,filters:Ot,pageLimit:Lt,pageCursor:Bt});return $&&M.captureEvent("search",$,{value:Wt.value?.numberOfResults??void 0}),te},[$,_,Ot,Lt,Bt]),pe=!Wt.loading&&!Wt.error&&Wt.value?.nextPageCursor,_t=!Wt.loading&&!Wt.error&&Wt.value?.previousPageCursor,ae=(0,a.useCallback)(()=>{Dt(Wt.value?.nextPageCursor)},[Wt.value?.nextPageCursor]),Nt=(0,a.useCallback)(()=>{Dt(Wt.value?.previousPageCursor)},[Wt.value?.previousPageCursor]);return(0,a.useEffect)(()=>{ce!==void 0&&$!==ce&&Dt(void 0)},[$,ce,Dt]),(0,a.useEffect)(()=>{le!==void 0&&!(0,V.isEqual)(Ot,le)&&Dt(void 0)},[Ot,le,Dt]),{result:Wt,term:$,setTerm:N,types:_,setTypes:ct,filters:Ot,setFilters:Rt,pageLimit:Lt,setPageLimit:wt,pageCursor:Bt,setPageCursor:Dt,fetchNextPage:pe?ae:void 0,fetchPreviousPage:_t?Nt:void 0}},gt=p=>{const{initialState:w,children:M}=p,$=dt(w);return(0,s.jsx)(tt.Ig,{attributes:{searchTypes:$.types.sort().join(",")},children:(0,s.jsx)(yt.Provider,{value:(0,K.B)({1:$}),children:M})})},Ct=p=>{const{initialState:w,inheritParentContextIfAvailable:M,children:$}=p,N=vt(),_=(0,J.gf)(Y.U),ct=w??{},Ot=_.has("search.query.pageLimit")?{pageLimit:_.getNumber("search.query.pageLimit")}:{},Rt={...Et,...ct,...Ot};return N&&M?(0,s.jsx)(s.Fragment,{children:$}):(0,s.jsx)(gt,{initialState:Rt,children:$})};var pt=t(78467),Pt=t(20577),It=t(29365),Ut=t(34839),Mt=t(16249),bt=t(64947),U=t(45917),z=t(22771);function rt(p){return(0,a.forwardRef)((w,M)=>(0,s.jsx)(Ct,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(p,{...w,ref:M})}))}const mt=rt((0,a.forwardRef)((p,w)=>{const{onChange:M,onKeyDown:$=()=>{},onClear:N=()=>{},onSubmit:_=()=>{},debounceTime:ct=200,clearButton:Ot=!0,fullWidth:Rt=!0,value:Lt,label:wt,placeholder:Bt,inputProps:Dt={},InputProps:ce={},endAdornment:le,...Wt}=p,pe=(0,J.gf)(Y.U),[_t,ae]=(0,a.useState)(""),Nt=(0,a.useRef)("");(0,a.useEffect)(()=>{ae(we=>we===Nt.current?String(Lt):we)},[Lt,Nt]),(0,z.A)(()=>{Nt.current=_t,M(_t)},ct,[_t]);const qt=(0,a.useCallback)(we=>{ae(we.target.value)},[ae]),te=(0,a.useCallback)(we=>{$&&$(we),_&&we.key==="Enter"&&_()},[$,_]),Me=(0,a.useCallback)(()=>{Nt.current="",M(""),ae(""),N&&N()},[M,N]),Ae=wt?void 0:"Search",ze=Bt??`Search in ${pe.getOptionalString("app.title")||"Backstage"}`,Je=(0,s.jsx)(Ut.A,{position:"start",children:(0,s.jsx)(It.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,s.jsx)(U.A,{})})}),Xe=(0,s.jsx)(Ut.A,{position:"end",children:(0,s.jsx)(bt.A,{"aria-label":"Clear",size:"small",onClick:Me,onKeyDown:we=>{we.key==="Enter"&&we.stopPropagation()},children:"Clear"})});return(0,s.jsx)(Mt.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:w,value:_t,label:wt,placeholder:ze,InputProps:{startAdornment:Je,endAdornment:Ot?Xe:le,...ce},inputProps:{"aria-label":Ae,...Dt},fullWidth:Rt,onChange:qt,onKeyDown:te,...Wt})})),ut=rt((0,a.forwardRef)((p,w)=>{const{value:M="",onChange:$,...N}=p,{term:_,setTerm:ct}=St();(0,a.useEffect)(()=>{M&&ct(String(M))},[M,ct]);const Ot=(0,a.useCallback)(Rt=>{$?$(Rt):ct(Rt)},[$,ct]);return(0,s.jsx)(tt.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,s.jsx)(mt,{...N,ref:w,value:_,onChange:Ot})})})),ot=(0,C.A)(p=>({loading:{right:p.spacing(1),position:"absolute"}})),At=p=>w=>(0,s.jsx)(Ct,{inheritParentContextIfAvailable:!0,children:(0,s.jsx)(p,{...w})}),$t=()=>{const p=ot();return(0,s.jsx)(pt.A,{className:p.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},kt=At(function(w){const{loading:M,value:$,onChange:N=()=>{},options:_=[],getOptionLabel:ct=Nt=>String(Nt),inputPlaceholder:Ot,inputDebounceTime:Rt,freeSolo:Lt=!0,fullWidth:wt=!0,clearOnBlur:Bt=!1,"data-testid":Dt="search-autocomplete",...ce}=w,{setTerm:le}=St(),Wt=(0,a.useCallback)(Nt=>Nt?typeof Nt=="string"?Nt:ct(Nt):"",[ct]),pe=(0,a.useMemo)(()=>Wt($),[$,Wt]),_t=(0,a.useCallback)((Nt,qt,te,Me)=>{le(Wt(qt)),N(Nt,qt,te,Me)},[Wt,le,N]),ae=(0,a.useCallback)(({InputProps:{ref:Nt,className:qt,endAdornment:te},InputLabelProps:Me,...Ae})=>(0,s.jsx)(ut,{...Ae,ref:Nt,clearButton:!1,value:pe,placeholder:Ot,debounceTime:Rt,endAdornment:M?(0,s.jsx)($t,{}):te,InputProps:{className:qt}}),[M,pe,Ot,Rt]);return(0,s.jsx)(Pt.Ay,{...ce,"data-testid":Dt,value:$,onChange:_t,options:_,getOptionLabel:ct,renderInput:ae,freeSolo:Lt,fullWidth:wt,clearOnBlur:Bt})});var jt=t(18690),Vt=t(27698);const de=p=>p?.document,ie=p=>{const{entityId:w,entityTitle:M,debounceTime:$=150}=p,[N,_]=(0,a.useState)(!1),ct=(0,jt.Zp)(),{setFilters:Ot,term:Rt,result:{loading:Lt,value:wt}}=St(),[Bt,Dt]=(0,a.useState)([]);(0,a.useEffect)(()=>{let _t=!0;if(_t&&wt){const ae=wt.results.slice(0,10);Dt(ae)}return()=>{_t=!1}},[Lt,wt]);const{kind:ce,name:le,namespace:Wt}=w;(0,a.useEffect)(()=>{Ot(_t=>({..._t,kind:ce,namespace:Wt,name:le}))},[ce,Wt,le,Ot]);const pe=(_t,ae)=>{if(de(ae)){const{location:Nt}=ae.document;ct(Nt)}};return(0,s.jsx)(kt,{"data-testid":"techdocs-search-bar",size:"small",open:N&&!!Rt,getOptionLabel:()=>"",filterOptions:_t=>_t,onClose:()=>{_(!1)},onOpen:()=>{_(!0)},onChange:pe,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Bt,renderOption:({document:_t,highlight:ae})=>(0,s.jsx)(Vt.TechDocsSearchResultListItem,{result:_t,lineClamp:3,asListItem:!1,asLink:!1,title:_t.title,highlight:ae}),loading:Lt,inputDebounceTime:$,inputPlaceholder:`Search ${M||w.name} docs`,freeSolo:!1})},ue=p=>{const w={term:"",types:["techdocs"],pageCursor:"",filters:p.entityId};return(0,s.jsx)(Ct,{initialState:w,children:(0,s.jsx)(ie,{...p})})};var Yt=t(74219),ne=t(82266);const Ft=(0,a.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(p=>({default:p.RealLogViewer})));function Zt(p){const{Progress:w}=(0,ne.n)().getComponents();return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)(w,{}),children:(0,s.jsx)(Ft,{...p})})}var Se=t(73845),Ke=t(72501),Gt=t(12398),Ne=t(32881);const ve=(0,C.A)(p=>(0,Gt.A)({paper:{width:"100%",[p.breakpoints.up("sm")]:{width:"75%"},[p.breakpoints.up("md")]:{width:"50%"},padding:p.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:p.palette.background.default}})),Ge=({buildLog:p,onClose:w})=>{const M=ve(),$=p.length===0?"Waiting for logs...":p.join(`
8
- `);return(0,s.jsxs)(u.A,{container:!0,direction:"column",className:M.root,spacing:0,wrap:"nowrap",children:[(0,s.jsxs)(u.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,s.jsx)(Ke.A,{variant:"h5",children:"Build Details"}),(0,s.jsx)(It.A,{title:"Close the drawer",onClick:w,color:"inherit",children:(0,s.jsx)(Ne.A,{})},"dismiss")]}),(0,s.jsx)(u.A,{item:!0,xs:!0,children:(0,s.jsx)(Zt,{text:$,classes:{root:M.logs}})})]})},Be=({buildLog:p})=>{const w=ve(),[M,$]=(0,a.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(bt.A,{color:"inherit",onClick:()=>$(!0),children:"Show Build Logs"}),(0,s.jsx)(Se.Ay,{classes:{paper:w.paper},anchor:"right",open:M,onClose:()=>$(!1),children:(0,s.jsx)(Ge,{buildLog:p,onClose:()=>$(!1)})})]})},Ee=({errorMessage:p})=>{const w=(0,J.gf)(Y.U).getOptionalString("techdocs.builder"),M=(0,H.s)(),{entityRef:$}=(0,f.V)(),N=(0,jt.zy)();(0,a.useEffect)(()=>{const{pathname:ct,search:Ot,hash:Rt}=N;M.captureEvent("not-found",`${ct}${Ot}${Rt}`,{attributes:$})},[M,$,N]);let _="";return[void 0,"local"].includes(w)||(_="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),(0,s.jsx)(B.M,{status:"404",statusMessage:p||"Documentation not found",additionalInfo:_})};var tn=t(28966),Ye=t(26679);function an({contentLoading:p,content:w,activeSyncState:M}){return p||M==="BUILD_READY_RELOAD"||!w&&M==="CHECKING"?"CHECKING":!w&&M==="BUILDING"?"INITIAL_BUILD":w?M==="BUILDING"?"CONTENT_STALE_REFRESHING":M==="BUILD_READY"?"CONTENT_STALE_READY":M==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function Ue(p,w){const M={...p};switch(w.type){case"sync":w.state==="CHECKING"&&(M.buildLog=[]),M.activeSyncState=w.state,M.syncError=w.syncError;break;case"contentLoading":M.contentLoading=!0,M.contentError=void 0;break;case"content":typeof w.path=="string"&&(M.path=w.path),M.contentLoading=!1,M.content=w.content,M.contentError=w.contentError;break;case"buildLog":M.buildLog=M.buildLog.concat(w.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(M.activeSyncState)&&["contentLoading","content"].includes(w.type)&&(M.activeSyncState="UP_TO_DATE",M.buildLog=[]),M}function $e(p,w,M,$){const[N,_]=(0,a.useReducer)(Ue,{activeSyncState:"CHECKING",path:$,contentLoading:!0,buildLog:[]}),ct=(0,J.gf)(Ye.s),{retry:Ot}=(0,tn.A)(async()=>{_({type:"contentLoading"});try{const wt=await ct.getEntityDocs({kind:p,namespace:w,name:M},$);return _({type:"content",content:wt,path:$}),wt}catch(wt){_({type:"content",contentError:wt,path:$})}},[ct,p,w,M,$]),Rt=(0,a.useRef)({content:void 0,reload:()=>{}});return Rt.current={content:N.content,reload:Ot},(0,k.A)(async()=>{_({type:"sync",state:"CHECKING"});const wt=setTimeout(()=>{_({type:"sync",state:"BUILDING"})},1e3);try{switch(await ct.syncEntityDocs({kind:p,namespace:w,name:M},Dt=>{_({type:"buildLog",log:Dt})})){case"updated":Rt.current.content?_({type:"sync",state:"BUILD_READY"}):(Rt.current.reload(),_({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":_({type:"sync",state:"UP_TO_DATE"});break;default:_({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Bt){_({type:"sync",state:"ERROR",syncError:Bt})}finally{clearTimeout(wt)}},[p,M,w,ct,_,Rt]),{state:(0,a.useMemo)(()=>an({activeSyncState:N.activeSyncState,contentLoading:N.contentLoading,content:N.content}),[N.activeSyncState,N.content,N.contentLoading]),contentReload:Ot,path:N.path,content:N.content,contentErrorMessage:N.contentError?.toString(),syncErrorMessage:N.syncError?.toString(),buildLog:N.buildLog}}const ke=(0,a.createContext)({}),he=()=>(0,a.useContext)(ke),Qe=p=>{const{children:w}=p,{"*":M=""}=(0,jt.g)(),{entityRef:$}=(0,f.V)(),{kind:N,namespace:_,name:ct}=$,Ot=$e(N,_,ct,M);return(0,s.jsx)(ke.Provider,{value:Ot,children:w instanceof Function?w(Ot):w})},en=p=>w=>(0,s.jsx)(Qe,{children:(0,s.jsx)(p,{...w})}),L=(0,C.A)(p=>({root:{marginBottom:p.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),l=()=>{let p=null;const w=L(),{state:M,contentReload:$,contentErrorMessage:N,syncErrorMessage:_,buildLog:ct}=he();return M==="INITIAL_BUILD"&&(p=(0,s.jsx)(Yt.A,{classes:{root:w.root},variant:"outlined",severity:"info",icon:(0,s.jsx)(pt.A,{size:"24px"}),action:(0,s.jsx)(Be,{buildLog:ct}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),M==="CONTENT_STALE_REFRESHING"&&(p=(0,s.jsx)(Yt.A,{variant:"outlined",severity:"info",icon:(0,s.jsx)(pt.A,{size:"24px"}),action:(0,s.jsx)(Be,{buildLog:ct}),classes:{root:w.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),M==="CONTENT_STALE_READY"&&(p=(0,s.jsx)(Yt.A,{variant:"outlined",severity:"success",action:(0,s.jsx)(bt.A,{color:"inherit",onClick:()=>$(),children:"Refresh"}),classes:{root:w.root},children:"A newer version of this documentation is now available, please refresh to view."})),M==="CONTENT_STALE_ERROR"&&(p=(0,s.jsxs)(Yt.A,{variant:"outlined",severity:"error",action:(0,s.jsx)(Be,{buildLog:ct}),classes:{root:w.root,message:w.message},children:["Building a newer version of this documentation failed."," ",_]})),M==="CONTENT_NOT_FOUND"&&(p=(0,s.jsxs)(s.Fragment,{children:[_&&(0,s.jsxs)(Yt.A,{variant:"outlined",severity:"error",action:(0,s.jsx)(Be,{buildLog:ct}),classes:{root:w.root,message:w.message},children:["Building a newer version of this documentation failed."," ",_]}),(0,s.jsx)(Ee,{errorMessage:N})]})),p};var A=t(5893),j=t(54917),nt=t(3347),it=t(71651),ft=t.n(it);const Jt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Qt=/^https:\/\/fonts\.googleapis\.com/,Xt=/^https:\/\/fonts\.gstatic\.com/,ge=p=>p.nodeName==="LINK",zt=p=>{const w=p?.getAttribute("href")||"",M=w.match(Jt),$=w.match(Qt),N=w.match(Xt);return M||$||N},se=p=>(ge(p)&&!zt(p)&&p.remove(),p),ee=p=>p.nodeName==="IFRAME",Fe=(p,w)=>{const M=p.getAttribute("src")||"";try{const{host:$}=new URL(M);return w.includes($)}catch{return!1}},We=p=>w=>(ee(w)&&!Fe(w,p)&&w.remove(),w),nn=()=>{const p=(0,J.gf)(Y.U);return(0,a.useMemo)(()=>p.getOptionalConfig("techdocs.sanitizer"),[p])},cn=()=>{const p=nn();return(0,a.useCallback)(async w=>{const M=p?.getOptionalStringArray("allowedIframeHosts");ft().addHook("beforeSanitizeElements",se);const $=["link","meta"];return M&&($.push("iframe"),ft().addHook("beforeSanitizeElements",We(M))),ft().addHook("uponSanitizeElement",(N,_)=>{_.tagName==="meta"&&(N.getAttribute("http-equiv")==="refresh"&&N.getAttribute("content")?.includes("url=")||N.parentNode?.removeChild(N))}),ft().addHook("uponSanitizeAttribute",(N,_)=>{N.tagName!=="meta"&&(_.attrName==="http-equiv"||_.attrName==="content")&&N.removeAttribute(_.attrName)}),ft().sanitize(w.outerHTML,{ADD_TAGS:$,FORBID_TAGS:["style"],ADD_ATTR:["http-equiv","content"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[p])};var re=t(34435),oe=t(268);const Re=({theme:p})=>`
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: ${p.palette.text.primary};
18
- --md-default-fg-color--light: ${p.palette.text.secondary};
19
- --md-default-fg-color--lighter: ${(0,oe.a)(p.palette.text.secondary,.7)};
20
- --md-default-fg-color--lightest: ${(0,oe.a)(p.palette.text.secondary,.3)};
21
-
22
- /* BACKGROUND */
23
- --md-default-bg-color:${p.palette.background.default};
24
- --md-default-bg-color--light: ${p.palette.background.paper};
25
- --md-default-bg-color--lighter: ${(0,oe.a)(p.palette.background.paper,.7)};
26
- --md-default-bg-color--lightest: ${(0,oe.a)(p.palette.background.paper,.3)};
27
-
28
- /* PRIMARY */
29
- --md-primary-fg-color: ${p.palette.primary.main};
30
- --md-primary-fg-color--light: ${p.palette.primary.light};
31
- --md-primary-fg-color--dark: ${p.palette.primary.dark};
32
- --md-primary-bg-color: ${p.palette.primary.contrastText};
33
- --md-primary-bg-color--light: ${(0,oe.a)(p.palette.primary.contrastText,.7)};
34
-
35
- /* ACCENT */
36
- --md-accent-fg-color: var(--md-primary-fg-color);
37
- --md-accent-fg-color--transparent: ${(0,oe.X4)(p.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: ${p.shadows[1]};
43
- --md-shadow-z2: ${p.shadows[2]};
44
- --md-shadow-z3: ${p.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
-
78
- :host > * {
79
- /* CODE */
80
- --md-code-fg-color: ${p.palette.text.primary};
81
- --md-code-bg-color: ${p.palette.background.paper};
82
- --md-code-hl-color: ${(0,oe.X4)(p.palette.warning.main,.5)};
83
- --md-code-hl-color--light: var(--md-code-hl-color);
84
- --md-code-hl-keyword-color: ${p.palette.type==="dark"?p.palette.primary.light:p.palette.primary.dark};
85
- --md-code-hl-function-color: ${p.palette.type==="dark"?p.palette.secondary.light:p.palette.secondary.dark};
86
- --md-code-hl-string-color: ${p.palette.type==="dark"?p.palette.success.light:p.palette.success.dark};
87
- --md-code-hl-number-color: ${p.palette.type==="dark"?p.palette.error.light:p.palette.error.dark};
88
- --md-code-hl-constant-color: var(--md-code-hl-function-color);
89
- --md-code-hl-special-color: var(--md-code-hl-function-color);
90
- --md-code-hl-name-color: var(--md-code-fg-color);
91
- --md-code-hl-comment-color: var(--md-default-fg-color--light);
92
- --md-code-hl-generic-color: var(--md-default-fg-color--light);
93
- --md-code-hl-variable-color: var(--md-default-fg-color--light);
94
- --md-code-hl-operator-color: var(--md-default-fg-color--light);
95
- --md-code-hl-punctuation-color: var(--md-default-fg-color--light);
96
-
97
- /* TYPESET */
98
- --md-typeset-font-size: 1rem;
99
- --md-typeset-color: var(--md-default-fg-color);
100
- --md-typeset-a-color: ${p.palette.link};
101
- --md-typeset-table-color: ${p.palette.text.primary};
102
- --md-typeset-table-color--light: ${(0,oe.X4)(p.palette.text.primary,.5)};
103
- --md-typeset-del-color: ${p.palette.type==="dark"?(0,oe.X4)(p.palette.error.dark,.5):(0,oe.X4)(p.palette.error.light,.5)};
104
- --md-typeset-ins-color: ${p.palette.type==="dark"?(0,oe.X4)(p.palette.success.dark,.5):(0,oe.X4)(p.palette.success.light,.5)};
105
- --md-typeset-mark-color: ${p.palette.type==="dark"?(0,oe.X4)(p.palette.warning.dark,.5):(0,oe.X4)(p.palette.warning.light,.5)};
106
- --md-typeset-kbd-color: var(--md-code-bg-color);
107
- --md-typeset-kbd-accent-color var(--md-code-bg-color);
108
- --md-typeset-kbd-border-color: var(--md-default-fg-color--light);
109
- }
110
-
111
- @media screen and (max-width: 76.1875em) {
112
- :host > * {
113
- /* TYPESET */
114
- --md-typeset-font-size: .9rem;
115
- }
116
- }
117
-
118
- @media screen and (max-width: 600px) {
119
- :host > * {
120
- /* TYPESET */
121
- --md-typeset-font-size: .7rem;
122
- }
123
- }
124
-
125
- --md-footer-bg-color: var(--md-default-bg-color);
126
- --md-footer-bg-color--dark: var(--md-default-bg-color);
127
- `,es=({theme:p})=>`
128
- /*================== Reset ==================*/
129
-
130
- body {
131
- --md-text-color: var(--md-default-fg-color);
132
- --md-text-link-color: var(--md-accent-fg-color);
133
- --md-text-font-family: ${p.typography.fontFamily};
134
- font-family: var(--md-text-font-family);
135
- background-color: unset;
136
- }
137
- `,Ze="224px",ns=({theme:p,sidebar:w})=>`
138
- /*================== Layout ==================*/
139
-
140
- /* mkdocs material v9 compat */
141
- .md-nav__title {
142
- color: var(--md-default-fg-color);
143
- }
144
-
145
- .md-grid {
146
- max-width: 100%;
147
- margin: 0;
148
- }
149
-
150
- .md-nav {
151
- font-size: calc(var(--md-typeset-font-size) * 0.9);
152
- }
153
- .md-nav__link {
154
- display: flex;
155
- align-items: center;
156
- justify-content: space-between;
157
- }
158
- .md-nav__icon {
159
- height: 20px !important;
160
- width: 20px !important;
161
- margin-left:${p.spacing(1)}px;
162
- }
163
- .md-nav__icon svg {
164
- margin: 0;
165
- width: 20px !important;
166
- height: 20px !important;
167
- }
168
- .md-nav__icon:after {
169
- width: 20px !important;
170
- height: 20px !important;
171
- }
172
-
173
- .md-nav__item--active > .md-nav__link, a.md-nav__link--active {
174
- text-decoration: underline;
175
- color: var(--md-typeset-a-color);
176
- }
177
-
178
- .md-main__inner {
179
- margin-top: 0;
180
- }
181
-
182
- .md-sidebar {
183
- bottom: 75px;
184
- position: fixed;
185
- width: 16rem;
186
- overflow-y: auto;
187
- overflow-x: hidden;
188
- scrollbar-color: rgb(193, 193, 193) #eee;
189
- scrollbar-width: thin;
190
- }
191
- .md-sidebar .md-sidebar__scrollwrap {
192
- width: calc(12.1rem);
193
- overflow-y: hidden;
194
- }
195
- .md-sidebar--secondary {
196
- right: ${p.spacing(3)}px;
197
- }
198
- .md-sidebar::-webkit-scrollbar {
199
- width: 5px;
200
- }
201
- .md-sidebar::-webkit-scrollbar-button {
202
- width: 5px;
203
- height: 5px;
204
- }
205
- .md-sidebar::-webkit-scrollbar-track {
206
- background: #eee;
207
- border: 1 px solid rgb(250, 250, 250);
208
- box-shadow: 0px 0px 3px #dfdfdf inset;
209
- border-radius: 3px;
210
- }
211
- .md-sidebar::-webkit-scrollbar-thumb {
212
- width: 5px;
213
- background: rgb(193, 193, 193);
214
- border: transparent;
215
- border-radius: 3px;
216
- }
217
- .md-sidebar::-webkit-scrollbar-thumb:hover {
218
- background: rgb(125, 125, 125);
219
- }
220
-
221
- .md-content {
222
- max-width: calc(100% - 16rem * 2);
223
- margin-left: 16rem;
224
- margin-bottom: 50px;
225
- }
226
-
227
- .md-footer {
228
- position: fixed;
229
- bottom: 0px;
230
- pointer-events: none;
231
- }
232
-
233
- .md-footer-nav__link, .md-footer__link {
234
- pointer-events: all;
235
- }
236
-
237
- .md-footer__title {
238
- background-color: unset;
239
- }
240
- .md-footer-nav__link, .md-footer__link {
241
- width: 16rem;
242
- }
243
-
244
- .md-dialog {
245
- background-color: unset;
246
- }
247
-
248
- @media screen and (min-width: 76.25em) {
249
- .md-sidebar {
250
- height: auto;
251
- }
252
- }
253
-
254
- @media screen and (max-width: 76.1875em) {
255
- .md-nav {
256
- transition: none !important;
257
- background-color: var(--md-default-bg-color)
258
- }
259
- .md-nav--primary .md-nav__title {
260
- cursor: auto;
261
- color: var(--md-default-fg-color);
262
- font-weight: 700;
263
- white-space: normal;
264
- line-height: 1rem;
265
- height: auto;
266
- display: flex;
267
- flex-flow: column;
268
- row-gap: 1.6rem;
269
- padding: 1.2rem .8rem .8rem;
270
- background-color: var(--md-default-bg-color);
271
- }
272
- .md-nav--primary .md-nav__title~.md-nav__list {
273
- box-shadow: none;
274
- }
275
- .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
276
- border-top: none;
277
- }
278
- .md-nav--primary .md-nav__title .md-nav__button {
279
- display: none;
280
- }
281
- .md-nav--primary .md-nav__title .md-nav__icon {
282
- color: var(--md-default-fg-color);
283
- position: static;
284
- height: auto;
285
- margin: 0 0 0 -0.2rem;
286
- }
287
- .md-nav--primary > .md-nav__title [for="none"] {
288
- padding-top: 0;
289
- }
290
- .md-nav--primary .md-nav__item {
291
- border-top: none;
292
- }
293
- .md-nav--primary :is(.md-nav__title,.md-nav__item) {
294
- font-size : var(--md-typeset-font-size);
295
- }
296
- .md-nav .md-source {
297
- display: none;
298
- }
299
-
300
- .md-sidebar {
301
- height: 100%;
302
- }
303
- .md-sidebar--primary {
304
- width: 12.1rem !important;
305
- z-index: 200;
306
- left: ${w.isPinned?`calc(-12.1rem + ${Ze})`:"calc(-12.1rem + 72px)"} !important;
307
- }
308
- .md-sidebar--secondary:not([hidden]) {
309
- display: none;
310
- }
311
-
312
- .md-content {
313
- max-width: 100%;
314
- margin-left: 0;
315
- }
316
-
317
- .md-header__button {
318
- margin: 0.4rem 0;
319
- margin-left: 0.4rem;
320
- padding: 0;
321
- }
322
-
323
- .md-overlay {
324
- left: 0;
325
- }
326
-
327
- .md-footer {
328
- position: static;
329
- padding-left: 0;
330
- }
331
- .md-footer-nav__link {
332
- /* footer links begin to overlap at small sizes without setting width */
333
- width: 50%;
334
- }
335
- }
336
-
337
- @media screen and (max-width: 600px) {
338
- .md-sidebar--primary {
339
- left: -12.1rem !important;
340
- width: 12.1rem;
341
- }
342
- }
343
-
344
-
345
- @media print {
346
- .md-sidebar,
347
- #toggle-sidebar {
348
- display: none;
349
- }
350
-
351
- .md-content {
352
- margin: 0;
353
- width: 100%;
354
- max-width: 100%;
355
- }
356
- }
357
- `,Rn=["h1","h2","h3","h4","h5","h6"],wn=/(em)|(rem)/gi,Ht=/var\(|\)/gi,ss=[Re,es,ns,({theme:p})=>`
358
- /*================== Typeset ==================*/
359
-
360
- .md-typeset {
361
- font-size: var(--md-typeset-font-size);
362
- }
363
-
364
- ${Rn.reduce((w,M)=>{const $=p.typography.htmlFontSize??16,N=p.typography[M],{lineHeight:_,fontFamily:ct,fontWeight:Ot,fontSize:Rt}=N,Lt=wt=>{if(typeof wt=="number")return Lt(`${wt/$*.6}rem`);if(typeof wt=="string"){if(wt.match(Ht)){const Bt=window.getComputedStyle(document.body).getPropertyValue(wt.replaceAll(Ht,""));if(Bt!=="")return Lt(Bt)}else if(wt.match(wn))return`calc(${wt.replace(wn,"")} * var(--md-typeset-font-size))`}return wt};return w.concat(`
365
- .md-typeset ${M} {
366
- color: var(--md-default-fg-color);
367
- line-height: ${_};
368
- font-family: ${ct};
369
- font-weight: ${Ot};
370
- font-size: ${Lt(Rt)};
371
- }
372
- `)},"")}
373
-
374
- .md-typeset .md-content__button {
375
- color: var(--md-default-fg-color);
376
- }
377
-
378
- .md-typeset hr {
379
- border-bottom: 0.05rem dotted ${p.palette.divider};
380
- }
381
-
382
- .md-typeset details {
383
- font-size: var(--md-typeset-font-size) !important;
384
- }
385
- .md-typeset details summary {
386
- padding-left: 2.5rem !important;
387
- }
388
- .md-typeset details summary:before,
389
- .md-typeset details summary:after {
390
- top: 50% !important;
391
- width: 20px !important;
392
- height: 20px !important;
393
- transform: rotate(0deg) translateY(-50%) !important;
394
- }
395
- .md-typeset details[open] > summary:after {
396
- transform: rotate(90deg) translateX(-50%) !important;
397
- }
398
-
399
- .md-typeset blockquote {
400
- color: var(--md-default-fg-color--light);
401
- border-left: 0.2rem solid var(--md-default-fg-color--light);
402
- }
403
-
404
- .md-typeset table:not([class]) {
405
- font-size: var(--md-typeset-font-size);
406
- border: 1px solid var(--md-default-fg-color);
407
- border-bottom: none;
408
- border-collapse: collapse;
409
- }
410
- .md-typeset table:not([class]) th {
411
- font-weight: bold;
412
- }
413
- .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
414
- border-bottom: 1px solid var(--md-default-fg-color);
415
- }
416
-
417
- .md-typeset pre > code::-webkit-scrollbar-thumb {
418
- background-color: hsla(0, 0%, 0%, 0.32);
419
- }
420
- .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
421
- background-color: hsla(0, 0%, 0%, 0.87);
422
- }
423
-
424
- .md-typeset code {
425
- word-break: keep-all;
426
- }
427
- `,()=>`
428
- /*================== Animations ==================*/
429
- /*
430
- Disable CSS animations on link colors as they lead to issues in dark mode.
431
- The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
432
- */
433
- .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
434
- transition: none;
435
- }
436
- `,({theme:p})=>`
437
- /*================== Extensions ==================*/
438
-
439
- /* HIGHLIGHT */
440
- .highlight .md-clipboard:after {
441
- content: unset;
442
- }
443
-
444
- .highlight .nx {
445
- color: ${p.palette.type==="dark"?"#ff53a3":"#ec407a"};
446
- }
447
-
448
- /* CODE HILITE */
449
- .codehilite .gd {
450
- background-color: ${p.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
451
- }
452
-
453
- .codehilite .gi {
454
- background-color: ${p.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
455
- }
456
-
457
- /* TABBED */
458
- .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
459
- .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
460
- .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
461
- .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
462
- .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
463
- .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
464
- .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
465
- .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
466
- .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
467
- .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
468
- .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
469
- .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
470
- .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
471
- .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
472
- .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
473
- .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
474
- .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
475
- .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
476
- .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
477
- .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
478
- color: var(--md-accent-fg-color);
479
- border-color: var(--md-accent-fg-color);
480
- }
481
-
482
- /* TASK-LIST */
483
- .task-list-control .task-list-indicator::before {
484
- background-color: ${p.palette.action.disabledBackground};
485
- }
486
- .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
487
- background-color: ${p.palette.success.main};
488
- }
489
-
490
- /* ADMONITION */
491
- .admonition {
492
- font-size: var(--md-typeset-font-size) !important;
493
- }
494
- .admonition .admonition-title {
495
- padding-left: 2.5rem !important;
496
- }
497
-
498
- .admonition .admonition-title:before {
499
- top: 50% !important;
500
- width: 20px !important;
501
- height: 20px !important;
502
- transform: translateY(-50%) !important;
503
- }
504
- `],rs=()=>(0,re.Ut)(),os=()=>{const p=rs(),w=(0,j.A)();return(0,a.useMemo)(()=>{const M={theme:w,sidebar:p};return ss.reduce(($,N)=>$+N(M),"")},[w,p])},mn=()=>{const p=os();return(0,a.useCallback)(w=>(w.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${p}</style>`),w),[p])},In=async(p,w)=>{let M;if(typeof p=="string")M=new DOMParser().parseFromString(p,"text/html").documentElement;else if(p instanceof Element)M=p;else throw new Error("dom is not a recognized type");for(const $ of w)M=await $(M);return M},Dn=(p,w,M)=>{const $=p==="src"&&w.endsWith(".svg"),N=!w.match(/^([a-z]*:)?\/\//i),_=w.startsWith(M);return $&&(N||_)},as=({techdocsStorageApi:p,entityId:w,path:M})=>async $=>{const N=await p.getApiOrigin(),_=async(ct,Ot)=>{for(const Rt of ct)if(Rt.hasAttribute(Ot)){const Lt=Rt.getAttribute(Ot);if(!Lt)return;const wt=await p.getBaseUrl(Lt,w,M);if(Dn(Ot,Lt,N))try{const Dt=await(await fetch(wt,{credentials:"include"})).text();Rt.setAttribute(Ot,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Dt)))}`)}catch{Rt.setAttribute("alt",`Error: ${Lt}`)}else Rt.setAttribute(Ot,wt)}};return await Promise.all([_($.querySelectorAll("img"),"src"),_($.querySelectorAll("script"),"src"),_($.querySelectorAll("source"),"src"),_($.querySelectorAll("link"),"href"),_($.querySelectorAll("a[download]"),"href")]),$},Ln=()=>p=>(((M,$)=>{Array.from(M).filter(N=>N.hasAttribute($)).forEach(N=>{const _=N.getAttribute($);if(_){_.match(/^https?:\/\//i)&&N.setAttribute("target","_blank");try{const ct=Mn(window.location.href);N.setAttribute($,new URL(_,ct).toString())}catch{N.replaceWith(N.textContent||_)}}})})(Array.from(p.getElementsByTagName("a")),"href"),p);function Mn(p){const w=new URL(p);return!w.pathname.endsWith("/")&&!w.pathname.endsWith(".html")&&(w.pathname+="/"),w.toString()}var is=t(27326);let jn;jn=Promise.resolve().then(t.t.bind(t,25873,19));function yn(p,w){jn.then(M=>{"createRoot"in M?M.createRoot(w).render(p):M.render(p,w)})}const cs=()=>p=>{const w=p.querySelector('.md-header label[for="__drawer"]'),M=p.querySelector("article");if(!w||!M)return p;const $=w.cloneNode();return yn(a.createElement(is.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"),M?.prepend($),p},ls=()=>p=>(p.querySelector(".md-header")?.remove(),p),ds=()=>p=>(p.querySelector(".md-footer .md-copyright")?.remove(),p.querySelector(".md-footer-copyright")?.remove(),p);var Bn=t(36021),us=t(90292),hs=t(52536),Un=t.n(hs);const $n=p=>w=>{const M=w.querySelector('[title="Edit this page"]');if(!M||!M.href)return w;const $=new URL(M.href),N=p.byUrl($);if(N?.type!=="github"&&N?.type!=="gitlab")return w;const _=w.querySelector("article>h1")?.childNodes[0].textContent||"",ct=encodeURIComponent(`Documentation Feedback: ${_}`),Ot=encodeURIComponent(`Page source:
505
- ${M.href}
506
-
507
- Feedback:`),Rt=N?.type==="github"?(0,Bn.F)($.href,"blob"):$.href,Lt=Un()(Rt),wt=`/${Lt.organization}/${Lt.name}`,Bt=M.cloneNode();switch(N?.type){case"gitlab":Bt.href=`${$.origin}${wt}/issues/new?issue[title]=${ct}&issue[description]=${Ot}`;break;case"github":Bt.href=`${$.origin}${wt}/issues/new?title=${ct}&body=${Ot}`;break;default:return w}return yn(a.createElement(us.A),Bt),Bt.style.paddingLeft="5px",Bt.title="Leave feedback for this page",Bt.id="git-feedback-link",M?.insertAdjacentElement("beforebegin",Bt),w},gs=()=>p=>(setTimeout(()=>{const w=p?.querySelectorAll("li.md-nav__item--active");w.length!==0&&(w.forEach($=>{const N=$?.querySelector("input");N?.checked||N?.click()}),w[w.length-1].scrollIntoView())},200),p);var vn=t(50868),En=t(10437),ps=t(71677),Fn=t(87051),Nn=t(36338);const fs=(0,Fn.A)(p=>({tooltip:{fontSize:"inherit",color:p.palette.text.primary,margin:0,padding:p.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(ps.Ay),ms=()=>(0,s.jsx)(En.A,{children:(0,s.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),ys=({text:p})=>{const[w,M]=(0,a.useState)(!1),[,$]=(0,Nn.A)(),N=(0,a.useCallback)(()=>{$(p),M(!0)},[p,$]),_=(0,a.useCallback)(()=>{M(!1)},[M]);return(0,s.jsx)(fs,{title:"Copied to clipboard",placement:"left",open:w,onClose:_,leaveDelay:1e3,children:(0,s.jsx)(It.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:N,children:(0,s.jsx)(ms,{})})})},vs=p=>w=>{const M=w.querySelectorAll("pre > code");for(const $ of M){const N=$.textContent||"",_=document.createElement("div");$?.parentElement?.prepend(_),yn((0,s.jsx)(vn.A,{theme:p,children:(0,s.jsx)(ys,{text:N})}),_)}return w},Es=({baseUrl:p,onClick:w})=>M=>(Array.from(M.getElementsByTagName("a")).forEach($=>{$.addEventListener("click",N=>{const ct=$.getAttribute("href");ct&&ct.startsWith(p)&&!$.hasAttribute("download")&&(N.preventDefault(),w(N,ct))})}),M),kn=({onLoading:p,onLoaded:w})=>M=>(p(),M.addEventListener(m,function $(){w(),M.removeEventListener(m,$)}),M);function As(p,w){const M=new URL(w),$=`${M.origin}${M.pathname.replace(/\/$/,"")}`,N=p.replace($,"").replace(/^\/+/,""),_=new URL(`http://localhost/${N}`);return`${_.pathname}${_.search}${_.hash}`}function xs(){const p=(0,a.useRef)((0,jt.Zp)()),M=(0,J.gf)(Y.U).getOptionalString("app.baseUrl");return(0,a.useCallback)(N=>{let _=N;if(M)try{_=As(N,M)}catch{}p.current(_)},[M])}const Cs=(p,w)=>M=>{for(const $ of Array.from(M.querySelectorAll("meta")))if($.getAttribute("http-equiv")==="refresh"){const N=$.getAttribute("content")?.split("url=");if(!N||N.length<2)continue;const _=N[1],ct=Mn(window.location.href),Ot=new URL(_,ct);if(Ot.hostname!==window.location.hostname){const Lt=window.location.pathname,wt=Lt.indexOf(w),Bt=Lt.slice(0,wt+w.length);p(Bt)}else p(Ot.href);return M}return M},Wn="screen and (max-width: 76.1875em)",Kn=p=>{const w=xs(),M=(0,j.A)(),$=(0,A.A)(Wn),N=cn(),_=mn(),ct=(0,H.s)(),Ot=(0,J.gf)(Ye.s),Rt=(0,J.gf)(nt.Y),{state:Lt,path:wt,content:Bt}=he(),[Dt,ce]=(0,a.useState)(null),le=x(Dt),Wt=(0,a.useCallback)(()=>{if(!Dt)return;Dt.querySelectorAll(".md-sidebar").forEach(qt=>{if($)qt.style.top="0px";else{const Me=document?.querySelector(".techdocs-reader-page")?.getBoundingClientRect().top??0;let Ae=Dt.getBoundingClientRect().top??0;const Je=Dt.querySelector(".md-container > .md-tabs")?.getBoundingClientRect().height??0;Ae<Me&&(Ae=Me);const Xe=Math.max(Ae,0)+Je;qt.style.top=`${Xe}px`;const ln=Dt.querySelector(".md-container > .md-footer")?.getBoundingClientRect().top??window.innerHeight;qt.style.height=`${ln-Xe}px`}qt.style.setProperty("opacity","1")})},[Dt,$]);(0,a.useEffect)(()=>(window.addEventListener("resize",Wt),window.addEventListener("scroll",Wt,!0),()=>{window.removeEventListener("resize",Wt),window.removeEventListener("scroll",Wt,!0)}),[Dt,Wt]);const pe=(0,a.useCallback)(()=>{if(!Dt)return;const Nt=Dt.querySelector(".md-footer");Nt&&(Nt.style.width=`${Dt.getBoundingClientRect().width}px`)},[Dt]);(0,a.useEffect)(()=>(window.addEventListener("resize",pe),()=>{window.removeEventListener("resize",pe)}),[Dt,pe]),(0,a.useEffect)(()=>{le||(pe(),Wt())},[Lt,le,pe,Wt]);const _t=(0,a.useCallback)((Nt,qt)=>In(Nt,[N,as({techdocsStorageApi:Ot,entityId:p,path:qt}),Ln(),cs(),ls(),ds(),$n(Rt),_]),[p,Rt,Ot,N,_]),ae=(0,a.useCallback)(async Nt=>In(Nt,[Cs(w,p.name),gs(),vs(M),Es({baseUrl:window.location.origin,onClick:(qt,te)=>{const Me=qt.ctrlKey||qt.metaKey,Ae=new URL(te),ze=qt.target?.innerText||te,Je=te.replace(window.location.origin,"");ct.captureEvent("click",ze,{attributes:{to:Je}}),Ae.hash?Me?window.open(te,"_blank"):(w(te),Nt?.querySelector(`[id="${Ae.hash.slice(1)}"]`)?.scrollIntoView()):Me?window.open(te,"_blank"):w(te)}}),kn({onLoading:()=>{},onLoaded:()=>{Nt.querySelector(".md-nav__title")?.removeAttribute("for")}}),kn({onLoading:()=>{Array.from(Nt.querySelectorAll(".md-sidebar")).forEach(te=>{te.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[M,w,ct,p.name]);return(0,a.useEffect)(()=>{if(!Bt)return()=>{};let Nt=!0;return _t(Bt,wt).then(async qt=>{if(!qt?.innerHTML||!Nt)return;window.scroll({top:0});const te=await ae(qt);ce(te)}),()=>{Nt=!1}},[Bt,wt,_t,ae]),Dt};var An=t(41883),bs=t(72020),Oe=t(99730);const De=()=>{const p=(0,bs.YR)(),{shadowRoot:w}=(0,f.V)(),M=w?.querySelector('[data-md-component="content"]'),$=w?.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let N=$?.querySelector('[data-techdocs-addons-location="primary sidebar"]');N||(N=document.createElement("div"),N.setAttribute("data-techdocs-addons-location","primary sidebar"),$?.prepend(N));const _=w?.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let ct=_?.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return ct||(ct=document.createElement("div"),ct.setAttribute("data-techdocs-addons-location","secondary sidebar"),_?.prepend(ct)),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(An.A,{container:N,children:p.renderComponentsByLocation(Oe.e.PrimarySidebar)}),(0,s.jsx)(An.A,{container:M,children:p.renderComponentsByLocation(Oe.e.Content)}),(0,s.jsx)(An.A,{container:ct,children:p.renderComponentsByLocation(Oe.e.SecondarySidebar)})]})},Le=(0,C.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Ss=en(p=>{const{withSearch:w=!0,onReady:M}=p,$=Le(),{entityMetadata:{value:N,loading:_},entityRef:ct,setShadowRoot:Ot}=(0,f.V)(),Rt=Kn(ct),Lt=window.location.pathname,wt=window.location.hash,Bt=x(Rt),[Dt]=y([`[id="${wt.slice(1)}"]`]);(0,a.useEffect)(()=>{Bt||(wt?Dt&&Dt.scrollIntoView():document?.querySelector("header")?.scrollIntoView())},[Lt,wt,Dt,Bt]);const ce=(0,a.useCallback)(le=>{Ot(le),M instanceof Function&&M()},[Ot,M]);return _===!1&&!N?(0,s.jsx)(B.M,{status:"404",statusMessage:"PAGE NOT FOUND"}):Rt?(0,s.jsx)(X.U,{children:(0,s.jsxs)(u.A,{container:!0,children:[(0,s.jsx)(u.A,{xs:12,item:!0,children:(0,s.jsx)(l,{})}),w&&(0,s.jsx)(u.A,{className:$.search,xs:"auto",item:!0,children:(0,s.jsx)(ue,{entityId:ct,entityTitle:N?.metadata?.title})}),(0,s.jsx)(u.A,{xs:12,item:!0,children:(0,s.jsx)(O,{element:Rt,onAppend:ce,children:(0,s.jsx)(De,{})})})]})}):(0,s.jsx)(X.U,{children:(0,s.jsx)(u.A,{container:!0,children:(0,s.jsx)(u.A,{xs:12,item:!0,children:(0,s.jsx)(l,{})})})})}),Os=null},45061:(G,S,t)=>{"use strict";t.d(S,{T:()=>tt});var s=t(31085),a=t(14041),u=t(93285),C=t(42899),f=t(4387),g=t(13660),h=t(72020),d=t(86892),v=t(99730),m=t(67871),E=t(8859),x=t(34428),O=t(51372),T=t(58837),I=t(268),y=t(72501),R=t(72072);const F=(0,T.A)(Y=>({root:{textAlign:"left"},label:{color:Y.page.fontColor,fontWeight:Y.typography.fontWeightBold,letterSpacing:0,fontSize:Y.typography.fontSize,marginBottom:Y.spacing(1)/2,lineHeight:1},value:{color:(0,I.X4)(Y.page.fontColor,.8),fontSize:Y.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),B=({value:Y,className:lt,typographyRootComponent:ht})=>(0,s.jsx)(y.A,{component:ht??(typeof Y=="string"?"p":"span"),className:lt,children:Y});function X(Y){const{label:lt,value:ht,url:xt,contentTypograpyRootComponent:yt}=Y,St=F(),vt=(0,s.jsx)(B,{className:St.value,value:ht||"<Unknown>",typographyRootComponent:yt});return(0,s.jsx)(C.A,{item:!0,children:(0,s.jsxs)(y.A,{component:"span",className:St.root,children:[(0,s.jsx)(y.A,{className:St.label,children:lt}),xt?(0,s.jsx)(R.N_,{to:xt,children:vt}):vt]})})}var V=t(69814),k=t(72427),Q=t(65461),Z=t(9222),K=t(45250),J=t(82779);const H=(0,s.jsx)(f.A,{animation:"wave",variant:"text",height:40}),tt=Y=>{const{children:lt}=Y,ht=(0,h.YR)(),xt=(0,k.gf)(Q.U),{title:yt,setTitle:St,subtitle:vt,setSubtitle:Et,entityRef:dt,metadata:{value:gt,loading:Ct},entityMetadata:{value:pt,loading:Pt}}=(0,d.V)();(0,a.useEffect)(()=>{gt&&(St(gt.site_name),Et(()=>{let{site_description:At}=gt;return(!At||At==="None")&&(At=""),At}))},[gt,St,Et]);const It=xt.getOptional("app.title")||"Backstage",Ut=[yt,vt,It].filter(Boolean).join(" | "),{locationMetadata:Mt,spec:bt}=pt||{},U=bt?.lifecycle,z=pt?(0,m.t)(pt,O.vv):[],rt=(0,Z.S)(J.rQ)(),mt=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(X,{label:(0,K.capitalize)(pt?.kind||"entity"),value:(0,s.jsx)(E.z,{color:"inherit",entityRef:dt,title:pt?.metadata.title,defaultKind:"Component"})}),z.length>0&&(0,s.jsx)(X,{label:"Owner",value:(0,s.jsx)(x.i,{color:"inherit",entityRefs:z,defaultKind:"group"})}),U?(0,s.jsx)(X,{label:"Lifecycle",value:String(U)}):null,Mt&&Mt.type!=="dir"&&Mt.type!=="file"?(0,s.jsx)(X,{label:"",value:(0,s.jsxs)(C.A,{container:!0,direction:"column",alignItems:"center",children:[(0,s.jsx)(C.A,{style:{padding:0},item:!0,children:(0,s.jsx)(g.A,{style:{marginTop:"-25px"}})}),(0,s.jsx)(C.A,{style:{padding:0},item:!0,children:"Source"})]}),url:Mt.target}):null]});return!Pt&&pt===void 0||!Ct&&gt===void 0?null:(0,s.jsxs)(V.Y,{type:"Documentation",typeLink:rt,title:yt||H,subtitle:vt===""?void 0:vt||H,children:[(0,s.jsx)(u.A,{titleTemplate:"%s",children:(0,s.jsx)("title",{children:Ut})}),mt,lt,ht.renderComponentsByLocation(v.e.Header)]})}},82779:(G,S,t)=>{"use strict";t.d(S,{Oc:()=>u,Ri:()=>C,rQ:()=>a});var s=t(34569);const a=(0,s.H)({id:"techdocs:index-page"}),u=(0,s.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),C=(0,s.H)({id:"techdocs:catalog-reader-view"})},27698:(G,S,t)=>{"use strict";t.r(S),t.d(S,{TechDocsSearchResultListItem:()=>m});var s=t(31085),a=t(14041),u=t(46423),C=t(5951),f=t(58837),g=t(72501),h=t(72072),d=t(70734);const v=(0,f.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),m=E=>{const{result:x,highlight:O,lineClamp:T=5,asListItem:I=!0,asLink:y=!0,title:R,icon:F}=E,B=v(),X=({children:Q})=>y?(0,s.jsx)(h.N_,{noTrack:!0,to:x.location,children:Q}):(0,s.jsx)(s.Fragment,{children:Q}),V=()=>{const Q=O?.fields.title?(0,s.jsx)(d.e,{text:O.fields.title,preTag:O.preTag,postTag:O.postTag}):x.title,Z=O?.fields.entityTitle?(0,s.jsx)(d.e,{text:O.fields.entityTitle,preTag:O.preTag,postTag:O.postTag}):x.entityTitle,K=O?.fields.name?(0,s.jsx)(d.e,{text:O.fields.name,preTag:O.preTag,postTag:O.postTag}):x.name;return x?(0,s.jsx)(C.A,{className:B.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,s.jsx)(X,{children:R||(0,s.jsxs)(s.Fragment,{children:[Q," | ",Z??K," docs"]})}),secondary:(0,s.jsx)(g.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:T,overflow:"hidden"},color:"textSecondary",variant:"body2",children:O?.fields.text?(0,s.jsx)(d.e,{text:O.fields.text,preTag:O.preTag,postTag:O.postTag}):x.text})}):null},k=({children:Q})=>I?(0,s.jsxs)(s.Fragment,{children:[F&&(0,s.jsx)(u.A,{children:typeof F=="function"?F(x):F}),(0,s.jsx)("div",{className:B.flexContainer,children:Q})]}):(0,s.jsx)(s.Fragment,{children:Q});return(0,s.jsx)(k,{children:(0,s.jsx)(V,{})})}},86973:()=>{}},G=>{var S=s=>G(G.s=s);G.O(0,[1751,1888,5067,1678,235,6587,2754,9669,1975,5042,7400,4121],()=>S(85318));var t=G.O()}]);})();
508
-
509
- //# sourceMappingURL=main.6518d659.js.map