@techdocs/cli 1.8.9-next.1 → 1.8.9

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 (42) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/embedded-app/.config-schema.json +76 -458
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/115.dcb79bb0.chunk.js +3 -0
  5. package/dist/embedded-app/static/115.dcb79bb0.chunk.js.map +1 -0
  6. package/dist/embedded-app/static/{124.235bfaa5.chunk.js → 124.843ab31e.chunk.js} +1 -1
  7. package/dist/embedded-app/static/{124.235bfaa5.chunk.js.map → 124.843ab31e.chunk.js.map} +1 -1
  8. package/dist/embedded-app/static/{2401.8afa4dc3.chunk.js → 2401.4df01527.chunk.js} +1 -1
  9. package/dist/embedded-app/static/{2401.8afa4dc3.chunk.js.map → 2401.4df01527.chunk.js.map} +1 -1
  10. package/dist/embedded-app/static/{2420.df6a26bf.chunk.js → 2420.18b68427.chunk.js} +1 -1
  11. package/dist/embedded-app/static/{2420.df6a26bf.chunk.js.map → 2420.18b68427.chunk.js.map} +1 -1
  12. package/dist/embedded-app/static/{287.445503fc.chunk.js → 287.ee4ee196.chunk.js} +1 -1
  13. package/dist/embedded-app/static/{287.445503fc.chunk.js.map → 287.ee4ee196.chunk.js.map} +1 -1
  14. package/dist/embedded-app/static/{3632.996cbefd.chunk.js → 3632.95b279c9.chunk.js} +1 -1
  15. package/dist/embedded-app/static/{3632.996cbefd.chunk.js.map → 3632.95b279c9.chunk.js.map} +1 -1
  16. package/dist/embedded-app/static/5974.633b23c0.chunk.js +3 -0
  17. package/dist/embedded-app/static/5974.633b23c0.chunk.js.map +1 -0
  18. package/dist/embedded-app/static/{6271.3ced48b7.chunk.js → 6271.25803276.chunk.js} +1 -1
  19. package/dist/embedded-app/static/{6271.3ced48b7.chunk.js.map → 6271.25803276.chunk.js.map} +1 -1
  20. package/dist/embedded-app/static/{8384.dbbfd1c3.chunk.js → 8384.a139d26a.chunk.js} +1 -1
  21. package/dist/embedded-app/static/{8384.dbbfd1c3.chunk.js.map → 8384.a139d26a.chunk.js.map} +1 -1
  22. package/dist/embedded-app/static/{9652.a9bdffaf.chunk.js → 9652.9a93372c.chunk.js} +1 -1
  23. package/dist/embedded-app/static/{9652.a9bdffaf.chunk.js.map → 9652.9a93372c.chunk.js.map} +1 -1
  24. package/dist/embedded-app/static/{main.7025f0d6.js → main.e02a8f27.js} +5 -5
  25. package/dist/embedded-app/static/main.e02a8f27.js.map +1 -0
  26. package/dist/embedded-app/static/{module-material-ui.033f9fa6.js → module-material-ui.1eefc717.js} +2 -2
  27. package/dist/embedded-app/static/{module-material-ui.033f9fa6.js.map → module-material-ui.1eefc717.js.map} +1 -1
  28. package/dist/embedded-app/static/module-mui.3056800b.js +3 -0
  29. package/dist/embedded-app/static/module-mui.3056800b.js.map +1 -0
  30. package/dist/embedded-app/static/{runtime.7025f0d6.js → runtime.e02a8f27.js} +2 -2
  31. package/dist/embedded-app/static/{runtime.7025f0d6.js.map → runtime.e02a8f27.js.map} +1 -1
  32. package/dist/embedded-app/static/vendor.e02a8f27.js +160 -0
  33. package/dist/embedded-app/static/vendor.e02a8f27.js.map +1 -0
  34. package/dist/index.cjs.js +1 -1
  35. package/package.json +4 -4
  36. package/dist/embedded-app/static/233.35298ac1.chunk.js +0 -3
  37. package/dist/embedded-app/static/233.35298ac1.chunk.js.map +0 -1
  38. package/dist/embedded-app/static/5974.9b9b6627.chunk.js +0 -3
  39. package/dist/embedded-app/static/5974.9b9b6627.chunk.js.map +0 -1
  40. package/dist/embedded-app/static/main.7025f0d6.js.map +0 -1
  41. package/dist/embedded-app/static/vendor.7025f0d6.js +0 -160
  42. package/dist/embedded-app/static/vendor.7025f0d6.js.map +0 -1
@@ -1,10 +1,10 @@
1
- (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:function(Y,T,t){"use strict";t.d(T,{c:function(){return o}});const o=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:function(Y,T,t){"use strict";t.d(T,{P:function(){return d},_P:function(){return i},oQ:function(){return o}});const o="default",i="backstage.io/view-url",d="backstage.io/edit-url",O="kubernetes.io/api-server",m="kubernetes.io/api-server-certificate-authority",v="kubernetes.io/auth-provider"},6820:function(Y,T,t){"use strict";t.d(T,{KU:function(){return O},U2:function(){return m},sM:function(){return d}});var o=t(72348);function i(v){let h=v.indexOf(":");const c=v.indexOf("/");c!==-1&&c<h&&(h=-1);const A=h===-1?void 0:v.slice(0,h),x=c===-1?void 0:v.slice(h+1,c),P=v.slice(Math.max(h+1,c+1));if(A===""||x===""||P==="")throw new TypeError(`Entity reference "${v}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:A,namespace:x,name:P}}function d(v){return{kind:v.kind,namespace:v.metadata.namespace||o.oQ,name:v.metadata.name}}function O(v,h){if(!v)throw new Error("Entity reference must not be empty");const c=h==null?void 0:h.defaultKind,A=(h==null?void 0:h.defaultNamespace)||o.oQ;let x,P,u;if(typeof v=="string"){const y=i(v);var b;x=(b=y.kind)!==null&&b!==void 0?b:c;var g;P=(g=y.namespace)!==null&&g!==void 0?g:A,u=y.name}else{var D;x=(D=v.kind)!==null&&D!==void 0?D:c;var w;P=(w=v.namespace)!==null&&w!==void 0?w:A,u=v.name}if(x)if(P){if(!u){const y=JSON.stringify(v);throw new Error(`Entity reference ${y} had missing or empty name`)}}else{const y=JSON.stringify(v);throw new Error(`Entity reference ${y} had missing or empty namespace`)}else{const y=JSON.stringify(v);throw new Error(`Entity reference ${y} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:x,namespace:P,name:u}}function m(v){let h,c,A;if("metadata"in v){h=v.kind;var x;c=(x=v.metadata.namespace)!==null&&x!==void 0?x:o.oQ,A=v.metadata.name}else{h=v.kind;var P;c=(P=v.namespace)!==null&&P!==void 0?P:o.oQ,A=v.name}return`${h.toLocaleLowerCase("en-US")}:${c.toLocaleLowerCase("en-US")}/${A.toLocaleLowerCase("en-US")}`}},51372:function(Y,T,t){"use strict";t.d(T,{fT:function(){return c},jn:function(){return b},nC:function(){return h},sA:function(){return g},vv:function(){return o}});const o="ownedBy",i="ownerOf",d="consumesApi",O="apiConsumedBy",m="providesApi",v="apiProvidedBy",h="dependsOn",c="dependencyOf",A="parentOf",x="childOf",P="memberOf",u="hasMember",b="partOf",g="hasPart"},17736:function(Y,T,t){"use strict";t.d(T,{Eo:function(){return o},I4:function(){return d}});const o="backstage.io/managed-by-location",i="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},78692:function(Y,T,t){"use strict";t.d(T,{Cr:function(){return v},KL:function(){return m},aY:function(){return O}});var o=t(6820),i=t(17736);const d=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function O(h){if(typeof h!="string")throw new TypeError(`Unable to parse location ref '${h}', unexpected argument ${typeof h}`);const c=h.indexOf(":");if(c<0)throw new TypeError(`Unable to parse location ref '${h}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const A=h.substring(0,c).trim(),x=h.substring(c+1).trim();if(!A||!x)throw new TypeError(`Unable to parse location ref '${h}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(A==="http"||A==="https")throw new TypeError(`Invalid location ref '${h}', please prefix it with 'url:', e.g. 'url:${h}'`);if(d.test(x))throw new TypeError(`Invalid location ref '${h}', target is a javascript: URL`);return{type:A,target:x}}function m(h){const{type:c,target:A}=h;if(c){if(!A)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(A))throw new TypeError(`Invalid location ref '${c}:${A}', target is a javascript: URL`);return`${c}:${A}`}function v(h){var c,A,x,P,u;const b=(u=(A=h.metadata)===null||A===void 0||(c=A.annotations)===null||c===void 0?void 0:c[i.I4])!==null&&u!==void 0?u:(P=h.metadata)===null||P===void 0||(x=P.annotations)===null||x===void 0?void 0:x[i.Eo];if(!b)throw new Error(`Entity '${(0,o.U2)(h)}' is missing location`);return O(b)}},77310:function(Y,T,t){"use strict";t.d(T,{z:function(){return A}});var o=t(31085),i=t(10394),d=t(54917),O=t(14041),m=t(69578),v=t(40697),h=t(25577),c=t(37916);function A(x){const{text:P,language:u,showLineNumbers:b=!1,highlightedNumbers:g,customStyle:D,showCopyCodeButton:w=!1}=x,y=(0,d.A)(),B=y.palette.type==="dark"?v.A:h.A,R=y.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,o.jsxs)(i.A,{position:"relative",children:[(0,o.jsx)(m.A,{customStyle:D,language:u,style:B,showLineNumbers:b,wrapLines:!0,lineNumberStyle:{color:y.palette.textVerySubtle},lineProps:C=>g!=null&&g.includes(C)?{style:{backgroundColor:R}}:{},children:P}),w&&(0,o.jsx)(i.A,{position:"absolute",top:0,right:0,children:(0,o.jsx)(c.l,{text:P})})]})}},37916:function(Y,T,t){"use strict";t.d(T,{l:function(){return P}});var o=t(31085),i=t(72427),d=t(39837),O=t(29365),m=t(71677),v=t(99594),h=t(14041),c=t(36338),A=t(10315),x=t(87849);function P(u){const{t:b}=(0,x.i)(A.O),{text:g,tooltipDelay:D=1e3,tooltipText:w=b("copyTextButton.tooltipText"),"aria-label":y="Copy text"}=u,B=(0,i.gf)(d.m),[R,C]=(0,h.useState)(!1),[{error:z},V]=(0,c.A)();(0,h.useEffect)(()=>{z&&B.post(z)},[z,B]);const tt=K=>{K.stopPropagation(),C(!0),V(g)};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(m.Ay,{id:"copy-test-tooltip",title:w,placement:"top",leaveDelay:D,onClose:()=>C(!1),open:R,children:(0,o.jsx)(O.A,{onClick:tt,"aria-label":y,children:(0,o.jsx)(v.A,{})})})})}},44186:function(Y,T,t){"use strict";t.d(T,{p:function(){return b}});var o=t(31085),i=t(42899),d=t(58837),O=t(72501),m=t(14041),v=t.p+"static/missingAnnotation.67f79e98..svg",h=t.p+"static/noInformation.4b426325..svg",c=t.p+"static/createComponent.975d1e1e..svg",A=t.p+"static/noBuild.1715fa71..svg";const x=(0,d.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),P=({missing:g})=>{const D=x();switch(g){case"field":return(0,o.jsx)("img",{src:v,className:D.generalImg,alt:"annotation is missing"});case"info":return(0,o.jsx)("img",{src:h,alt:"no Information",className:D.generalImg});case"content":return(0,o.jsx)("img",{src:c,alt:"create Component",className:D.generalImg});case"data":return(0,o.jsx)("img",{src:A,alt:"no Build",className:D.generalImg});default:return null}},u=(0,d.A)(g=>({root:{backgroundColor:g.palette.background.default,padding:g.spacing(2,0,0,0)},action:{marginTop:g.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function b(g){const{title:D,description:w,missing:y,action:B}=g,R=u();return(0,o.jsxs)(i.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:R.root,spacing:2,children:[(0,o.jsx)(i.A,{item:!0,xs:12,md:6,children:(0,o.jsxs)(i.A,{container:!0,direction:"column",children:[(0,o.jsx)(i.A,{item:!0,xs:!0,children:(0,o.jsx)(O.A,{variant:"h5",children:D})}),(0,o.jsx)(i.A,{item:!0,xs:!0,children:(0,o.jsx)(O.A,{variant:"body1",children:w})}),(0,o.jsx)(i.A,{item:!0,xs:!0,className:R.action,children:B})]})}),(0,o.jsx)(i.A,{item:!0,xs:12,md:6,className:R.imageContainer,children:typeof y=="string"?(0,o.jsx)(P,{missing:y}):y.customImage})]})}},22020:function(Y,T,t){"use strict";t.d(T,{b:function(){return P}});var o=t(31085),i=t(58837),d=t(58007),O=t(8109),m=t(5951),v=t(14041),h=t(37916),c=t(88640);const A=(0,i.A)(u=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:u.spacing(2)},divider:{margin:u.spacing(2)}}),{name:"BackstageErrorPanel"}),x=({error:u,message:b,stack:g,children:D})=>{const w=A();return(0,o.jsxs)(d.A,{dense:!0,children:[(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(m.A,{classes:{secondary:w.text},primary:"Error",secondary:u}),(0,o.jsx)(h.l,{text:u})]}),(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(m.A,{classes:{secondary:w.text},primary:"Message",secondary:b}),(0,o.jsx)(h.l,{text:b})]}),g&&(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(m.A,{classes:{secondary:w.text},primary:"Stack Trace",secondary:g}),(0,o.jsx)(h.l,{text:g})]}),D]})};function P(u){const{title:b,error:g,defaultExpanded:D,titleFormat:w,children:y}=u;return(0,o.jsx)(c.B,{severity:"error",title:b!=null?b:g.message,defaultExpanded:D,titleFormat:w,children:(0,o.jsx)(x,{error:g.name,message:g.message,stack:g.stack,children:y})})}},72072:function(Y,T,t){"use strict";t.d(T,{N_:function(){return K}});var o=t(31085),i=t(72427),d=t(65461),O=t(93368),m=t(49203),v=t(58837),h=t(72501),c=t(53373),A=t.n(c),x=t(45250),P=t.n(x),u=t(14041),b=t(18690),g=t(73970);function D(){const[W]=(0,b.AV)((0,o.jsx)(b.qh,{index:!0,element:(0,o.jsx)("div",{})}));return!W.index}const w=(0,v.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"}),y=W=>/^([a-z+.-]+):/.test(W),B=/^[\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,R=window.open;if(R&&!R.__backstage){const W=function(...H){const J=String(H[0]);if(B.test(J))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return R.apply(this,H)};W.__backstage=!0,window.open=W}const C=()=>{try{return(0,i.gf)(d.U).getOptionalString("app.baseUrl")}catch{return}},z=()=>{const W="http://sample.dev";var _;const H=(_=C())!==null&&_!==void 0?_:"/",{pathname:J}=new URL(H,W);return(0,x.trimEnd)(J,"/")},V=W=>{let _=String(W);const H=z(),J=y(_),q=_.startsWith(H);return!J&&!q&&(_=H.concat(_)),_},tt=W=>{if(W instanceof Array)return W.map(tt).join(" ").trim();if(typeof W=="object"&&W){var _;return tt(W==null||(_=W.props)===null||_===void 0?void 0:_.children)}return["string","number"].includes(typeof W)?String(W):""},K=u.forwardRef(({onClick:W,noTrack:_,...H},J)=>{const q=w(),mt=(0,O.s)(),it=D()?V(H.to):H.to,Ot=tt(H.children)||it,ct=y(it),gt=ct&&!!/^https?:/.exec(it);if(B.test(it))throw new Error("Link component rejected javascript: URL as a security precaution");const lt=rt=>{W==null||W(rt),_||mt.captureEvent("click",Ot,{attributes:{to:it}})};return ct?(0,o.jsxs)(m.A,{...gt?{target:"_blank",rel:"noopener"}:{},...H,...H["aria-label"]?{"aria-label":`${H["aria-label"]}, Opens in a new window`}:{},ref:J,href:it,onClick:lt,className:A()(q.externalLink,H.className),children:[H.children,(0,o.jsx)(h.A,{component:"span",className:q.visuallyHidden,children:", Opens in a new window"})]}):(0,o.jsx)(m.A,{...H,ref:J,component:g.N_,to:it,onClick:lt})})},73896:function(Y,T,t){"use strict";t.d(T,{z:function(){return v}});var o=t(31085),i=t(64947),d=t(14041),O=t(72072);const m=d.forwardRef((c,A)=>(0,o.jsx)(O.N_,{ref:A,...c,color:"initial"})),v=d.forwardRef((c,A)=>(0,o.jsx)(i.A,{ref:A,component:m,...c})),h=null},4650:function(Y,T,t){"use strict";t.d(T,{h:function(){return P}});var o=t(31085),i=t(58837),d=t(45872),O=t(61125),m=t(14041),v=t(77310);const h=(0,i.A)(u=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${u.palette.border}`},"& th, & td":{border:`1px solid ${u.palette.border}`,padding:u.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:u.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:u.palette.background.paper},"& tr":{backgroundColor:u.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:u.palette.background.default},"& a":{color:u.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),c=(u,b)=>b?typeof b=="string"?u+b:m.Children.toArray(b.props.children).reduce(c,u):u,A=({level:u,children:b})=>{const w=m.Children.toArray(b).reduce(c,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${u}`,{id:w},b)},x={code:({inline:u,className:b,children:g,...D})=>{const w=String(g).replace(/\n+$/,""),y=/language-(\w+)/.exec(b||"");return!u&&y?(0,o.jsx)(v.z,{language:y[1],text:w}):(0,o.jsx)("code",{className:b,...D,children:g})},h1:A,h2:A,h3:A,h4:A,h5:A,h6:A};function P(u){const{content:b,dialect:g="gfm",linkTarget:D,transformLinkUri:w,transformImageUri:y,className:B}=u,R=h();return(0,o.jsx)(d.$,{remarkPlugins:g==="gfm"?[O.A]:[],className:`${R.markdown} ${B}`,children:b,components:x,linkTarget:D,transformLinkUri:w,transformImageUri:y})}},68146:function(Y,T,t){"use strict";t.d(T,{k:function(){return v}});var o=t(31085),i=t(10394),d=t(88951),O=t(54917),m=t(14041);function v(h){const c=(0,O.A)(),[A,x]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const P=setTimeout(()=>x(!0),c.transitions.duration.short);return()=>clearTimeout(P)},[c.transitions.duration.short]),A?(0,o.jsx)(d.A,{...h,"data-testid":"progress"}):(0,o.jsx)(i.A,{display:"none"})}},66917:function(Y,T,t){"use strict";t.d(T,{w:function(){return K}});var o=t(31085),i=t(10394),d=t(69076),O=t(67720),m=t(95061),v=t(41857),h=t(48543),c=t(26343),A=t(81215),x=t(87051),P=t(12398),u=t(58837),b=t(72501),g=t(14041),D=t(10437);const w=(0,u.A)(W=>(0,P.A)({icon:{position:"absolute",right:W.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"});var B=()=>{const W=w();return(0,o.jsx)(D.A,{className:W.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})};const R=(0,u.A)(W=>(0,P.A)({icon:{position:"absolute",right:W.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"});var z=()=>{const W=R();return(0,o.jsx)(D.A,{className:W.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})};const V=(0,x.A)(W=>(0,P.A)({root:{"label + &":{marginTop:W.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:W.palette.primary.main}},input:{borderRadius:W.shape.borderRadius,position:"relative",backgroundColor:W.palette.background.paper,border:"1px solid #ced4da",fontSize:W.typography.body1.fontSize,padding:W.spacing(1.25,3.25,1.25,1.5),transition:W.transitions.create(["border-color","box-shadow"]),"&:focus":{background:W.palette.background.paper,borderRadius:W.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(v.A),tt=(0,u.A)(W=>(0,P.A)({formControl:{margin:W.spacing(1,0),maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:W.typography.body2.fontSize,fontFamily:W.typography.fontFamily,color:W.palette.text.primary,"&.Mui-focused":{color:W.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:W.typography.body2.fontSize,fontFamily:W.typography.fontFamily,color:W.palette.text.primary,"&.Mui-focused":{color:W.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function K(W){const{multiple:_,items:H,label:J,placeholder:q,selected:mt,onChange:it,triggerReset:Ot,native:ct=!1,disabled:gt=!1,margin:lt}=W,rt=tt(),[vt,yt]=(0,g.useState)(mt||(_?[]:"")),[Pt,pt]=(0,g.useState)(!1);(0,g.useEffect)(()=>{yt(_?[]:"")},[Ot,_]),(0,g.useEffect)(()=>{yt(mt||(_?[]:""))},[mt,_]);const st=At=>{yt(At.target.value),it(At.target.value)},ft=At=>{if(gt){At.preventDefault();return}pt(N=>_&&!(At.target instanceof HTMLElement)?!0:!N)},ht=()=>{pt(!1)},wt=At=>()=>{const N=vt.filter(G=>G!==At);yt(N),it(N)};return(0,o.jsx)(i.A,{className:rt.root,children:(0,o.jsxs)(m.A,{className:rt.formControl,children:[(0,o.jsx)(h.A,{className:rt.formLabel,children:J}),(0,o.jsxs)(A.A,{"aria-label":J,value:vt,native:ct,disabled:gt,"data-testid":"select",displayEmpty:!0,multiple:_,margin:lt,onChange:st,open:Pt,onOpen:ft,onClose:ht,input:(0,o.jsx)(V,{}),label:J,renderValue:At=>{var N;return _&&vt.length!==0?(0,o.jsx)(i.A,{className:rt.chips,children:At.map(G=>{const Et=H.find(bt=>bt.value===G);return Et?(0,o.jsx)(O.A,{label:Et==null?void 0:Et.label,clickable:!0,onDelete:wt(G),className:rt.chip},Et==null?void 0:Et.value):!1})}):(0,o.jsx)(b.A,{children:vt.length===0?q||"":(N=H.find(G=>G.value===At))===null||N===void 0?void 0:N.label})},IconComponent:()=>Pt?(0,o.jsx)(z,{}):(0,o.jsx)(B,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[q&&!_&&(0,o.jsx)(c.A,{value:[],children:q}),ct?H&&H.map(At=>(0,o.jsx)("option",{value:At.value,children:At.label},At.value)):H&&H.map(At=>(0,o.jsxs)(c.A,{value:At.value,children:[_&&(0,o.jsx)(d.A,{color:"primary",checked:vt.includes(At.value)||!1,className:rt.checkbox}),At.label]},At.value))]})]})})}},27586:function(Y,T,t){"use strict";t.d(T,{Y:function(){return W}});var o=t(31085),i=t(82266),d=t(10394),O=t(64947),m=t(93453),v=t(29365),h=t(46423),c=t(5951),A=t(26343),x=t(28233),P=t(55197),u=t(58837),b=t(72501),g=t(5893),D=t(14041),w=t(10795),y=t(31129),B=t(72072),R=t(10315),C=t(87849);const z=(0,u.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),V=({icon:_})=>{const H=(0,i.n)();var J;const q=_&&(J=H.getSystemIcon(_))!==null&&J!==void 0?J:y.NT;return(0,o.jsx)(q,{})},tt=({link:_})=>{var H;return(0,o.jsx)(B.N_,{to:_.url,children:(H=_.title)!==null&&H!==void 0?H:_.url})},K=({item:_})=>{var H;return(0,o.jsxs)(A.A,{children:[(0,o.jsx)(h.A,{children:(0,o.jsx)(V,{icon:_.icon})}),(0,o.jsx)(c.A,{primary:_.title,secondary:(H=_.links)===null||H===void 0?void 0:H.reduce((J,q,mt)=>[...J,mt>0&&(0,o.jsx)("br",{},mt),(0,o.jsx)(tt,{link:q},q.url)],[])})]})};function W(_){const{t:H}=(0,C.i)(R.O),{title:J,items:q,children:mt}=_,{items:it}=(0,w.l)(),[Ot,ct]=(0,D.useState)(!1),[gt,lt]=(0,D.useState)(null),rt=z(),vt=(0,g.A)(pt=>pt.breakpoints.down("sm")),yt=pt=>{lt(pt.currentTarget),ct(!0)},Pt=()=>{ct(!1)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.A,{display:"flex",ml:1,children:vt?(0,o.jsx)(v.A,{color:"primary",size:"small",onClick:yt,"data-testid":"support-button","aria-label":"Support",children:(0,o.jsx)(y.NT,{})}):(0,o.jsx)(O.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:yt,startIcon:(0,o.jsx)(y.NT,{}),children:H("supportButton.title")})}),(0,o.jsxs)(P.Ay,{"data-testid":"support-button-popover",open:Ot,anchorEl:gt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:Pt,children:[(0,o.jsxs)(x.A,{className:rt.popoverList,autoFocusItem:!!gt,children:[J&&(0,o.jsx)(A.A,{alignItems:"flex-start",className:rt.menuItem,children:(0,o.jsx)(b.A,{variant:"subtitle1",children:J})}),D.Children.map(mt,(pt,st)=>(0,o.jsx)(A.A,{alignItems:"flex-start",className:rt.menuItem,children:pt},`child-${st}`)),(q!=null?q:it).map((pt,st)=>(0,o.jsx)(K,{item:pt},`item-${st}`))]}),(0,o.jsx)(m.A,{children:(0,o.jsx)(O.A,{color:"primary",onClick:Pt,"aria-label":"Close",children:H("supportButton.close")})})]})]})}},14209:function(Y,T,t){"use strict";t.d(T,{X:function(){return ht}});var o=t(31085),i=t(25301),d=t(10394),O=t(29365),m=t(87051),v=t(58837),h=t(54917),c=t(72501),A=t(83313),x=t(89019),P=t(62461),u=t(68887),b=t(63798),g=t(64704),D=t(6774),w=t(75625),y=t(65859),B=t(5416),R=t(33494),C=t(80113),z=t(26229),V=t(46802),tt=t(45250),K=t(14041),W=t(64947),_=t(66917),H=t(10315),J=t(87849);const q=(0,v.A)(N=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:N.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:N.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${N.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:N.spacing(2)}}}),{name:"BackstageTableFilters"}),mt=N=>{var G;const Et=q(),{onChangeFilters:bt}=N,{t:Ft}=(0,J.i)(H.O),[Tt,Dt]=(0,K.useState)({...N.selectedFilters}),[kt,St]=(0,K.useState)(!1),Wt=()=>{Dt({}),St(Jt=>!Jt)};return(0,K.useEffect)(()=>{bt(Tt)},[Tt,bt]),(0,o.jsxs)(d.A,{className:Et.root,children:[(0,o.jsxs)(d.A,{className:Et.header,children:[(0,o.jsx)(d.A,{className:Et.value,children:Ft("table.filter.title")}),(0,o.jsx)(W.A,{color:"primary",onClick:Wt,children:Ft("table.filter.clearAll")})]}),(0,o.jsx)(d.A,{className:Et.filters,children:((G=N.filters)===null||G===void 0?void 0:G.length)&&N.filters.map(Jt=>(0,o.jsx)(_.w,{triggerReset:kt,...Jt.element,selected:Tt[Jt.element.label],onChange:ue=>Dt({...Tt,[Jt.element.label]:ue})},Jt.element.label))})]})};var it=t(78467);function Ot(N){return(0,o.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:N.colSpan,children:(0,o.jsx)(d.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,o.jsx)(it.A,{size:"5rem"})})})})})}const ct={Add:(0,K.forwardRef)((N,G)=>(0,o.jsx)(A.A,{...N,ref:G})),Check:(0,K.forwardRef)((N,G)=>(0,o.jsx)(P.A,{...N,ref:G})),Clear:(0,K.forwardRef)((N,G)=>(0,o.jsx)(g.A,{...N,ref:G})),Delete:(0,K.forwardRef)((N,G)=>(0,o.jsx)(D.A,{...N,ref:G})),DetailPanel:(0,K.forwardRef)((N,G)=>(0,o.jsx)(b.A,{...N,ref:G})),Edit:(0,K.forwardRef)((N,G)=>(0,o.jsx)(w.A,{...N,ref:G})),Export:(0,K.forwardRef)((N,G)=>(0,o.jsx)(z.A,{...N,ref:G})),Filter:(0,K.forwardRef)((N,G)=>(0,o.jsx)(y.A,{...N,ref:G})),FirstPage:(0,K.forwardRef)((N,G)=>(0,o.jsx)(B.A,{...N,ref:G})),LastPage:(0,K.forwardRef)((N,G)=>(0,o.jsx)(R.A,{...N,ref:G})),NextPage:(0,K.forwardRef)((N,G)=>(0,o.jsx)(b.A,{...N,ref:G})),PreviousPage:(0,K.forwardRef)((N,G)=>(0,o.jsx)(u.A,{...N,ref:G})),ResetSearch:(0,K.forwardRef)((N,G)=>(0,o.jsx)(g.A,{...N,ref:G})),Search:(0,K.forwardRef)((N,G)=>(0,o.jsx)(y.A,{...N,ref:G})),SortArrow:(0,K.forwardRef)((N,G)=>(0,o.jsx)(x.A,{...N,ref:G})),ThirdStateCheck:(0,K.forwardRef)((N,G)=>(0,o.jsx)(C.A,{...N,ref:G})),ViewColumn:(0,K.forwardRef)((N,G)=>(0,o.jsx)(V.A,{...N,ref:G}))};function gt(N,G){const Et=G.split(".");let bt=N[Et[0]];for(let Ft=1;Ft<Et.length;++Ft){if(bt===void 0)return bt;const Tt=Et[Ft];bt=bt[Tt]}return bt}const lt=(0,m.A)(N=>({header:{padding:N.spacing(1,2,1,2.5),borderTop:`1px solid ${N.palette.grey.A100}`,borderBottom:`1px solid ${N.palette.grey.A100}`,fontWeight:N.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(i.rV),rt=(0,m.A)(N=>({root:{padding:N.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:N.typography.fontWeightBold}},searchField:{paddingRight:N.spacing(2)}}),{name:"BackstageTableToolbar"})(i.Nb),vt=(0,v.A)(N=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:N.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),yt=(0,v.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Pt(N,G){return N.map(Et=>{var bt;const Ft=(bt=Et.headerStyle)!==null&&bt!==void 0?bt:{};let Tt=Et.cellStyle||{};if(Et.highlight)if(Ft.color=G.palette.textContrast,typeof Tt=="object")Tt.fontWeight=G.typography.fontWeightBold;else{const Dt=Tt;Tt=(kt,St,Wt)=>({...Dt(kt,St,Wt),fontWeight:G.typography.fontWeightBold})}return{...Et,headerStyle:Ft,cellStyle:Tt}})}function pt(N,G){return(0,tt.transform)(N,(Et,bt,Ft)=>{(0,tt.isEqual)(bt,G[Ft])||(Et[Ft]=bt)})}const st={search:"",filtersOpen:!1,filters:{}};function ft(N){const{toolbarRef:G,setSearch:Et,hasFilters:bt,selectedFiltersLength:Ft,toggleFilters:Tt}=N,Dt=vt(),kt=(0,K.useCallback)(St=>{N.onSearchChanged(St),Et(St)},[N,Et]);return bt?(0,o.jsxs)(d.A,{className:Dt.root,children:[(0,o.jsxs)(d.A,{className:Dt.root,children:[(0,o.jsx)(O.A,{onClick:Tt,"aria-label":"filter list",children:(0,o.jsx)(y.A,{})}),(0,o.jsxs)(c.A,{className:Dt.title,children:["Filters (",Ft,")"]})]}),(0,o.jsx)(rt,{...N,ref:G,onSearchChanged:kt})]}):(0,o.jsx)(rt,{...N,ref:G,onSearchChanged:kt})}function ht(N){const{data:G,columns:Et,emptyContent:bt,options:Ft,title:Tt,subtitle:Dt,localization:kt,filters:St,initialState:Wt,onStateChange:Jt,components:ue,isLoading:ae,...le}=N,Ht=yt(),Xt=(0,h.A)(),ge={...st,...Wt},[Ke,Fe]=(0,K.useState)(ge.filtersOpen),_e=(0,K.useCallback)(()=>Fe(he=>!he),[Fe]),[we,sn]=(0,K.useState)(ge.filters),[Xe,ne]=(0,K.useState)(ge.search);(0,K.useEffect)(()=>{if(Jt){const he=pt({search:Xe,filtersOpen:Ke,filters:we},st);Jt(he)}},[Xe,Ke,we,Jt]);const ze=(0,K.useCallback)(he=>{var Ie;return(Ie=Et.find(Ve=>Ve.title===he))===null||Ie===void 0?void 0:Ie.field},[Et]),He=(0,K.useMemo)(()=>{if(typeof G=="function"||!we)return G;const he=Object.values(we);return G&&he.flat().length?G.filter(Ve=>!!Object.entries(we).filter(([,Qe])=>!!Qe.length).every(([Qe,De])=>{const $e=gt(Ve,ze(Qe));return Array.isArray($e)&&Array.isArray(De)?$e.some(L=>De.includes(L)):Array.isArray($e)?$e.includes(De):Array.isArray(De)?De.includes($e):$e===De})):G},[G,we,ze]),qe=Object.values(we).flat().length,Ye=!!(St!=null&&St.length),xe=(0,K.useCallback)(he=>(0,o.jsx)(ft,{setSearch:ne,hasFilters:Ye,selectedFiltersLength:qe,toggleFilters:_e,...he}),[_e,Ye,qe,ne]),an=typeof G!="function"&&G.length===0,ln=Et.length,cn=(0,K.useMemo)(()=>wt({hasNoRows:an,emptyContent:bt,columnCount:ln,loading:ae}),[an,bt,ln,ae]);return(0,o.jsxs)(d.A,{className:Ht.root,children:[Ke&&G&&typeof G!="function"&&(St==null?void 0:St.length)&&(0,o.jsx)(mt,{filters:At(St,G,Et),selectedFilters:we,onChangeFilters:sn}),(0,o.jsx)(i.Ay,{components:{Header:lt,Body:cn,Toolbar:xe,...ue},options:Ft,columns:Pt(Et,Xt),icons:ct,title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.A,{variant:"h5",component:"h2",children:Tt}),Dt&&(0,o.jsx)(c.A,{color:"textSecondary",variant:"body1",children:Dt})]}),data:He,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"},...kt},...le})]})}ht.icons=Object.freeze(ct);function wt({columnCount:N,emptyContent:G,hasNoRows:Et,loading:bt}){return Ft=>bt?(0,o.jsx)(Ot,{colSpan:N}):G&&Et?(0,o.jsx)("tbody",{children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:N,children:G})})}):(0,o.jsx)(i.C6,{...Ft})}function At(N,G,Et){const bt=Tt=>{const Dt=new Set,kt=St=>{St!=null&&Dt.add(St)};return G&&G.forEach(St=>{var Wt;const Jt=gt(St,(Wt=Et.find(ue=>ue.title===Tt))===null||Wt===void 0?void 0:Wt.field);Array.isArray(Jt)?Jt.forEach(kt):kt(Jt)}),Dt},Ft=Tt=>({placeholder:"All results",label:Tt.column,multiple:Tt.type==="multiple-select",items:[...bt(Tt.column)].sort().map(Dt=>({label:Dt,value:Dt}))});return N.map(Tt=>({type:Tt.type,element:Ft(Tt)}))}},88640:function(Y,T,t){"use strict";t.d(T,{B:function(){return C}});var o=t(31085),i=t(268),d=t(58837),O=t(8973),m=t(29655),v=t(91567),h=t(42899),c=t(72501),A=t(9181),x=t(6924),P=t(14041),u=t(4650);const b=(z,V)=>(V.palette.type==="light"?i.e$:i.a)(V.palette[z].light,.6),g=(z,V)=>(V.palette.type==="light"?i.a:i.e$)(V.palette[z].light,.9),D=(0,d.A)(z=>({root:{marginRight:z.spacing(1),fill:({severity:V})=>b(V,z)}})),w=({severity:z})=>{const V=D({severity:z});return(0,o.jsx)(A.A,{classes:V})},y=({severity:z})=>{const V=D({severity:z});return(0,o.jsx)(x.A,{classes:V})},B=(0,d.A)(z=>({panel:{backgroundColor:({severity:V})=>g(V,z),color:({severity:V})=>b(V,z),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:V})=>b(V,z),fontWeight:z.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:V})=>b(V,z),backgroundColor:({severity:V})=>g(V,z)},details:{width:"100%",display:"block",color:z.palette.textContrast,backgroundColor:z.palette.background.default,border:`1px solid ${z.palette.border}`,padding:z.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),R=z=>z.charAt(0).toLocaleUpperCase("en-US")+z.slice(1);function C(z){const{severity:V="warning",title:tt,titleFormat:K,message:W,children:_,defaultExpanded:H}=z,J=B({severity:V}),q=R(V)+(tt?`: ${tt}`:"");return(0,o.jsxs)(O.A,{defaultExpanded:H!=null?H:!1,className:J.panel,role:"alert",children:[(0,o.jsxs)(m.A,{expandIcon:(0,o.jsx)(y,{severity:V}),className:J.summary,children:[(0,o.jsx)(w,{severity:V}),(0,o.jsx)(c.A,{className:J.summaryText,variant:"subtitle1",children:K==="markdown"?(0,o.jsx)(u.h,{content:q,className:J.markdownContent}):q})]}),(W||_)&&(0,o.jsx)(v.A,{children:(0,o.jsxs)(h.A,{container:!0,children:[W&&(0,o.jsx)(h.A,{item:!0,xs:12,children:(0,o.jsx)(c.A,{className:J.message,variant:"body1",children:W})}),_&&(0,o.jsx)(h.A,{item:!0,xs:12,className:J.details,children:_})]})})]})}},10795:function(Y,T,t){"use strict";t.d(T,{l:function(){return v}});var o=t(72427),i=t(65461),d=t(10315),O=t(87849);const m=()=>{const{t:h}=(0,O.i)(d.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 v(){const c=(0,o.Q2)().get(i.U),A=c==null?void 0:c.getOptionalConfig("app.support"),x=m();return A?{url:A.getString("url"),items:A.getConfigArray("items").flatMap(P=>{var u;return{title:P.getString("title"),icon:P.getOptionalString("icon"),links:((u=P.getOptionalConfigArray("links"))!==null&&u!==void 0?u:[]).flatMap(b=>({url:b.getString("url"),title:b.getString("title")}))}})}:x}},31129:function(Y,T,t){"use strict";t.d(T,{NT:function(){return g},z9:function(){return m}});var o=t(31085),i=t(82266),d=t(27799),O=t(14041);function m(y){const{id:B,Fallback:R=d.A,...C}=y,z=(0,i.n)();var V;const tt=(V=z.getSystemIcon(B))!==null&&V!==void 0?V:R;return(0,o.jsx)(tt,{...C})}function v(y){return _jsx(m,{id:"brokenImage",...y})}function h(y){return _jsx(m,{id:"catalog",...y})}function c(y){return _jsx(m,{id:"chat",...y})}function A(y){return _jsx(m,{id:"dashboard",...y})}function x(y){return _jsx(m,{id:"docs",...y})}function P(y){return _jsx(m,{id:"email",...y})}function u(y){return _jsx(m,{id:"github",...y})}function b(y){return _jsx(m,{id:"group",...y})}function g(y){return(0,o.jsx)(m,{id:"help",...y})}function D(y){return _jsx(m,{id:"user",...y})}function w(y){return _jsx(m,{id:"warning",...y})}},26280:function(Y,T,t){"use strict";t.d(T,{U:function(){return h}});var o=t(31085),i=t(58837),d=t(53373),O=t.n(d),m=t(14041);const v=(0,i.A)(c=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:c.spacing(3),paddingBottom:c.spacing(3),paddingLeft:c.spacing(2),paddingRight:c.spacing(2),[c.breakpoints.up("sm")]:{paddingLeft:c.spacing(3),paddingRight:c.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function h(c){const{className:A,stretch:x,noPadding:P,children:u,...b}=c,g=v();return(0,o.jsx)("article",{...b,className:O()(g.root,A,{[g.stretch]:x,[g.noPadding]:P}),children:u})}},59428:function(Y,T,t){"use strict";t.d(T,{d:function(){return A}});var o=t(31085),i=t(10394),d=t(58837),O=t(72501),m=t(14041),v=t(93285);const h=x=>(0,d.A)(P=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:P.spacing(2),textAlign:x.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:P.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),c=({title:x="Unknown page",className:P})=>(0,o.jsx)(O.A,{variant:"h4",component:"h2",className:P,"data-testid":"header-title",children:x});function A(x){const{description:P,title:u,titleComponent:b=void 0,children:g,textAlign:D="left"}=x,w=h({textAlign:D})(),y=b||(0,o.jsx)(c,{title:u,className:w.title});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.m,{title:u}),(0,o.jsxs)(i.A,{className:w.container,children:[(0,o.jsxs)(i.A,{className:w.leftItemsBox,children:[y,P&&(0,o.jsx)(O.A,{className:w.description,variant:"body2",children:P})]}),(0,o.jsx)(i.A,{className:w.rightItemsBox,children:g})]})]})}},12173:function(Y,T,t){"use strict";t.d(T,{M:function(){return B}});var o=t(31085),i=t(42899),d=t(58837),O=t(72501),m=t(14041),v=t(18690),h=t(72072),c=t(10795),A=t.p+"static/mic-drop.fe3ef4d0..svg";const x=(0,d.A)(R=>({micDrop:{maxWidth:"60%",bottom:R.spacing(2),right:R.spacing(2),[R.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:R.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),P=()=>{const R=x();return(0,o.jsx)("img",{src:A,className:R.micDrop,alt:"Girl dropping mic from her hands"})};var u=t(77310),b=t(87849),g=t(10315);const D=(0,d.A)(R=>({title:{paddingBottom:R.spacing(5),[R.breakpoints.down("xs")]:{paddingBottom:R.spacing(4),fontSize:R.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function w(R){const{stack:C}=R,z=D(),{t:V}=(0,b.i)(g.O),[tt,K]=(0,m.useState)(!1);return tt?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(O.A,{variant:"h6",className:z.title,children:(0,o.jsx)(h.N_,{to:"#",onClick:()=>K(!1),children:V("errorPage.showLessDetails")})}),(0,o.jsx)(u.z,{text:C,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,o.jsx)(O.A,{variant:"h6",className:z.title,children:(0,o.jsx)(h.N_,{to:"#",onClick:()=>K(!0),children:V("errorPage.showMoreDetails")})})}const y=(0,d.A)(R=>({container:{padding:R.spacing(8),[R.breakpoints.down("xs")]:{padding:R.spacing(2)}},title:{paddingBottom:R.spacing(5),[R.breakpoints.down("xs")]:{paddingBottom:R.spacing(4),fontSize:R.typography.h3.fontSize}},subtitle:{color:R.palette.textSubtle}}),{name:"BackstageErrorPage"});function B(R){const{status:C="",statusMessage:z,additionalInfo:V,supportUrl:tt,stack:K}=R,W=y(),_=(0,v.Zp)(),H=(0,c.l)(),{t:J}=(0,b.i)(g.O);return(0,o.jsxs)(i.A,{container:!0,className:W.container,children:[(0,o.jsxs)(i.A,{item:!0,xs:12,sm:8,md:4,children:[(0,o.jsx)(O.A,{"data-testid":"error",variant:"body1",className:W.subtitle,children:J("errorPage.subtitle",{status:C,statusMessage:z})}),(0,o.jsx)(O.A,{variant:"body1",className:W.subtitle,children:V}),(0,o.jsx)(O.A,{variant:"h2",className:W.title,children:J("errorPage.title")}),(0,o.jsxs)(O.A,{variant:"h6",className:W.title,children:[(0,o.jsx)(h.N_,{to:"#","data-testid":"go-back-link",onClick:()=>_(-1),children:J("errorPage.goBack")}),"... or please"," ",(0,o.jsx)(h.N_,{to:tt||H.url,children:"contact support"})," if you think this is a bug."]}),K&&(0,o.jsx)(w,{stack:K})]}),(0,o.jsx)(P,{})]})}},69814:function(Y,T,t){"use strict";t.d(T,{Y:function(){return _}});var o=t(31085),i=t(72427),d=t(65461),O=t(10394),m=t(42899),v=t(58837),h=t(71677),c=t(72501),A=t(14041),x=t(93285),P=t(72072),u=t(45634),b=t(58007),g=t(8109),D=t(55197),w=t(87051);const y=(0,w.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(c.A),B=(0,w.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(O.A),R=(0,w.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(O.A);function C(H){const{children:J,...q}=H,[mt,it]=A.useState(null),Ot=A.Children.toArray(J),[ct,gt,...lt]=Ot,rt=lt.length?lt.pop():Ot[Ot.length-1],vt=Ot.length>3,yt=st=>{it(st.currentTarget)},Pt=()=>{it(null)},pt=!!mt;return(0,o.jsxs)(A.Fragment,{children:[(0,o.jsxs)(u.A,{"aria-label":"breadcrumb",...q,children:[Ot.length>1&&(0,o.jsx)(B,{clone:!0,children:ct}),Ot.length>2&&(0,o.jsx)(B,{clone:!0,children:gt}),vt&&(0,o.jsx)(y,{onClick:yt,children:"..."}),(0,o.jsx)(R,{children:rt})]}),(0,o.jsx)(D.Ay,{open:pt,anchorEl:mt,onClose:Pt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,o.jsx)(b.A,{children:lt.map((st,ft)=>(0,o.jsx)(g.A,{button:!0,children:(0,o.jsx)(B,{clone:!0,children:st})},ft))})})]})}var z=t(73524);const V=(0,v.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"}),tt=({type:H,typeLink:J,classes:q,pageTitle:mt})=>H?J?(0,o.jsxs)(C,{className:q.breadcrumb,children:[(0,o.jsx)(P.N_,{to:J,children:H}),(0,o.jsx)(c.A,{children:mt})]}):(0,o.jsx)(c.A,{className:q.type,children:H}):null,K=({pageTitle:H,classes:J,tooltip:q})=>{const{contentRef:mt}=(0,z.H)(),it=(0,o.jsx)(c.A,{ref:mt,tabIndex:-1,className:J.title,variant:"h1",children:H});return q?(0,o.jsx)(h.Ay,{title:q,placement:"top-start",children:it}):it},W=({classes:H,subtitle:J})=>J?typeof J!="string"?(0,o.jsx)(o.Fragment,{children:J}):(0,o.jsx)(c.A,{className:H.subtitle,variant:"subtitle2",component:"span",children:J}):null;function _(H){const{children:J,pageTitleOverride:q,style:mt,subtitle:it,title:Ot,tooltip:ct,type:gt,typeLink:lt}=H,rt=V(),yt=(0,i.gf)(d.U).getOptionalString("app.title")||"Backstage",Pt=q||Ot,pt=Ot||q,st=`${Pt} | %s | ${yt}`,ft=`${Pt} | ${yt}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.m,{titleTemplate:st,defaultTitle:ft}),(0,o.jsxs)("header",{style:mt,className:rt.header,children:[(0,o.jsxs)(O.A,{className:rt.leftItemsBox,children:[(0,o.jsx)(tt,{classes:rt,type:gt,typeLink:lt,pageTitle:pt}),(0,o.jsx)(K,{classes:rt,pageTitle:pt,tooltip:ct}),(0,o.jsx)(W,{classes:rt,subtitle:it})]}),(0,o.jsx)(m.A,{container:!0,className:rt.rightItemsBox,spacing:4,children:J})]})]})}},24504:function(Y,T,t){"use strict";t.d(T,{Y:function(){return v}});var o=t(31085),i=t(14041),d=t(58837),O=t(50868);const m=(0,d.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 v(h){const{themeId:c,children:A}=h,x=m();return(0,o.jsx)(O.A,{theme:P=>({...P,page:P.getPageTheme({themeId:c})}),children:(0,o.jsx)("main",{className:x.root,children:A})})}},27155:function(Y,T,t){"use strict";t.d(T,{d:function(){return m}});var o=t(31085),i=t(14041),d=t(69814),O=t(24504);function m(v){const{themeId:h,children:c,...A}=v;return(0,o.jsxs)(O.Y,{themeId:h,children:[(0,o.jsx)(d.Y,{...A}),c]})}},73524:function(Y,T,t){"use strict";t.d(T,{G:function(){return u},H:function(){return b}});var o=t(31085),i=t(10394),d=t(58837),O=t(5893),m=t(14041),v=t(72664),h;(function(g){g.SIDEBAR_PIN_STATE="sidebarPinState"})(h||(h={}));const c={getSidebarPinState(){let g;try{g=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!g},setSidebarPinState(g){return window.localStorage.setItem("sidebarPinState",JSON.stringify(g))}};var A=t(34435);const x=(0,d.A)(g=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[g.breakpoints.up("sm")]:{paddingLeft:D=>D.isPinned?D.sidebarConfig.drawerWidthOpen:D.sidebarConfig.drawerWidthClosed},[g.breakpoints.down("xs")]:{paddingBottom:D=>D.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),P=(0,m.createContext)({content:{contentRef:void 0}});function u(g){const[D,w]=(0,m.useState)(()=>c.getSidebarPinState()),{sidebarConfig:y}=(0,m.useContext)(v.yY),B=(0,m.useRef)(null),R=(0,m.useMemo)(()=>({content:{contentRef:B}}),[B]);(0,m.useEffect)(()=>{c.setSidebarPinState(D)},[D]);const C=(0,O.A)(tt=>tt.breakpoints.down("xs"),{noSsr:!0}),z=()=>w(!D),V=x({isPinned:D,sidebarConfig:y});return(0,o.jsx)(A.qj,{value:{isPinned:D,toggleSidebarPinState:z,isMobile:C},children:(0,o.jsx)(P.Provider,{value:R,children:(0,o.jsx)(i.A,{className:V.root,children:g.children})})})}function b(){const{content:g}=(0,m.useContext)(P);return{focusContent:(0,m.useCallback)(()=>{var w,y;g==null||(y=g.contentRef)===null||y===void 0||(w=y.current)===null||w===void 0||w.focus()},[g]),contentRef:g==null?void 0:g.contentRef}}},34435:function(Y,T,t){"use strict";t.d(T,{Ut:function(){return A},qj:function(){return c}});var o=t(31085),i=t(43836),d=t(10602),O=t(14041);const m={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},v=(0,O.createContext)(m),h=(0,i.tK)("sidebar-pin-state-context");function c(x){const{children:P,value:u}=x;return(0,o.jsx)(v.Provider,{value:u,children:(0,o.jsx)(h.Provider,{value:(0,d.B)({1:u}),children:P})})}const A=()=>{const x=(0,O.useContext)(h),P=(0,O.useContext)(v);if(x===void 0)return P||m;const u=x.atVersion(1);if(u===void 0)throw new Error("No context found for version 1.");return u}},72664:function(Y,T,t){"use strict";t.d(T,{Rv:function(){return v},U1:function(){return P},hC:function(){return m},i8:function(){return c},yY:function(){return x}});var o=t(14041);const i=72,d=24,O=18,m={drawerWidthClosed:i,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:i,iconSize:i-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:O,userBadgeDiameter:i-O*2,mobileSidebarHeight:56},v=u=>({...m,...u,iconContainerWidth:m.drawerWidthClosed,iconSize:m.drawerWidthClosed-m.iconPadding*2,userBadgeDiameter:m.drawerWidthClosed-m.userBadgePadding*2}),h={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:m.defaultOpenDelayMs+200},c=u=>({...h,...u}),A="@backstage/core/sidebar-intro-dismissed",x=(0,o.createContext)({sidebarConfig:m,submenuConfig:h}),P=(0,o.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:function(Y,T,t){"use strict";t.d(T,{O:function(){return i}});var o=t(93184);const i=(0,o.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
1
+ (()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:function(Y,T,t){"use strict";t.d(T,{c:function(){return o}});const o=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:function(Y,T,t){"use strict";t.d(T,{P:function(){return d},_P:function(){return i},oQ:function(){return o}});const o="default",i="backstage.io/view-url",d="backstage.io/edit-url",O="kubernetes.io/api-server",m="kubernetes.io/api-server-certificate-authority",g="kubernetes.io/auth-provider"},6820:function(Y,T,t){"use strict";t.d(T,{KU:function(){return O},U2:function(){return m},sM:function(){return d}});var o=t(72348);function i(g){let h=g.indexOf(":");const c=g.indexOf("/");c!==-1&&c<h&&(h=-1);const C=h===-1?void 0:g.slice(0,h),A=c===-1?void 0:g.slice(h+1,c),P=g.slice(Math.max(h+1,c+1));if(C===""||A===""||P==="")throw new TypeError(`Entity reference "${g}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:C,namespace:A,name:P}}function d(g){return{kind:g.kind,namespace:g.metadata.namespace||o.oQ,name:g.metadata.name}}function O(g,h){if(!g)throw new Error("Entity reference must not be empty");const c=h==null?void 0:h.defaultKind,C=(h==null?void 0:h.defaultNamespace)||o.oQ;let A,P,u;if(typeof g=="string"){const y=i(g);var b;A=(b=y.kind)!==null&&b!==void 0?b:c;var v;P=(v=y.namespace)!==null&&v!==void 0?v:C,u=y.name}else{var D;A=(D=g.kind)!==null&&D!==void 0?D:c;var w;P=(w=g.namespace)!==null&&w!==void 0?w:C,u=g.name}if(A)if(P){if(!u){const y=JSON.stringify(g);throw new Error(`Entity reference ${y} had missing or empty name`)}}else{const y=JSON.stringify(g);throw new Error(`Entity reference ${y} had missing or empty namespace`)}else{const y=JSON.stringify(g);throw new Error(`Entity reference ${y} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:A,namespace:P,name:u}}function m(g){let h,c,C;if("metadata"in g){h=g.kind;var A;c=(A=g.metadata.namespace)!==null&&A!==void 0?A:o.oQ,C=g.metadata.name}else{h=g.kind;var P;c=(P=g.namespace)!==null&&P!==void 0?P:o.oQ,C=g.name}return`${h.toLocaleLowerCase("en-US")}:${c.toLocaleLowerCase("en-US")}/${C.toLocaleLowerCase("en-US")}`}},51372:function(Y,T,t){"use strict";t.d(T,{fT:function(){return c},jn:function(){return b},nC:function(){return h},sA:function(){return v},vv:function(){return o}});const o="ownedBy",i="ownerOf",d="consumesApi",O="apiConsumedBy",m="providesApi",g="apiProvidedBy",h="dependsOn",c="dependencyOf",C="parentOf",A="childOf",P="memberOf",u="hasMember",b="partOf",v="hasPart"},17736:function(Y,T,t){"use strict";t.d(T,{Eo:function(){return o},I4:function(){return d}});const o="backstage.io/managed-by-location",i="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},78692:function(Y,T,t){"use strict";t.d(T,{Cr:function(){return g},KL:function(){return m},aY:function(){return O}});var o=t(6820),i=t(17736);const d=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;function O(h){if(typeof h!="string")throw new TypeError(`Unable to parse location ref '${h}', unexpected argument ${typeof h}`);const c=h.indexOf(":");if(c<0)throw new TypeError(`Unable to parse location ref '${h}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const C=h.substring(0,c).trim(),A=h.substring(c+1).trim();if(!C||!A)throw new TypeError(`Unable to parse location ref '${h}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(C==="http"||C==="https")throw new TypeError(`Invalid location ref '${h}', please prefix it with 'url:', e.g. 'url:${h}'`);if(d.test(A))throw new TypeError(`Invalid location ref '${h}', target is a javascript: URL`);return{type:C,target:A}}function m(h){const{type:c,target:C}=h;if(c){if(!C)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");if(d.test(C))throw new TypeError(`Invalid location ref '${c}:${C}', target is a javascript: URL`);return`${c}:${C}`}function g(h){var c,C,A,P,u;const b=(u=(C=h.metadata)===null||C===void 0||(c=C.annotations)===null||c===void 0?void 0:c[i.I4])!==null&&u!==void 0?u:(P=h.metadata)===null||P===void 0||(A=P.annotations)===null||A===void 0?void 0:A[i.Eo];if(!b)throw new Error(`Entity '${(0,o.U2)(h)}' is missing location`);return O(b)}},77310:function(Y,T,t){"use strict";t.d(T,{z:function(){return C}});var o=t(31085),i=t(10394),d=t(54917),O=t(14041),m=t(69578),g=t(40697),h=t(25577),c=t(37916);function C(A){const{text:P,language:u,showLineNumbers:b=!1,highlightedNumbers:v,customStyle:D,showCopyCodeButton:w=!1}=A,y=(0,d.A)(),B=y.palette.type==="dark"?g.A:h.A,R=y.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,o.jsxs)(i.A,{position:"relative",children:[(0,o.jsx)(m.A,{customStyle:D,language:u,style:B,showLineNumbers:b,wrapLines:!0,lineNumberStyle:{color:y.palette.textVerySubtle},lineProps:x=>v!=null&&v.includes(x)?{style:{backgroundColor:R}}:{},children:P}),w&&(0,o.jsx)(i.A,{position:"absolute",top:0,right:0,children:(0,o.jsx)(c.l,{text:P})})]})}},37916:function(Y,T,t){"use strict";t.d(T,{l:function(){return P}});var o=t(31085),i=t(72427),d=t(39837),O=t(29365),m=t(71677),g=t(99594),h=t(14041),c=t(36338),C=t(10315),A=t(87849);function P(u){const{t:b}=(0,A.i)(C.O),{text:v,tooltipDelay:D=1e3,tooltipText:w=b("copyTextButton.tooltipText"),"aria-label":y="Copy text"}=u,B=(0,i.gf)(d.m),[R,x]=(0,h.useState)(!1),[{error:z},V]=(0,c.A)();(0,h.useEffect)(()=>{z&&B.post(z)},[z,B]);const tt=K=>{K.stopPropagation(),x(!0),V(v)};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(m.Ay,{id:"copy-test-tooltip",title:w,placement:"top",leaveDelay:D,onClose:()=>x(!1),open:R,children:(0,o.jsx)(O.A,{onClick:tt,"aria-label":y,children:(0,o.jsx)(g.A,{})})})})}},44186:function(Y,T,t){"use strict";t.d(T,{p:function(){return b}});var o=t(31085),i=t(42899),d=t(58837),O=t(72501),m=t(14041),g=t.p+"static/missingAnnotation.67f79e98..svg",h=t.p+"static/noInformation.4b426325..svg",c=t.p+"static/createComponent.975d1e1e..svg",C=t.p+"static/noBuild.1715fa71..svg";const A=(0,d.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),P=({missing:v})=>{const D=A();switch(v){case"field":return(0,o.jsx)("img",{src:g,className:D.generalImg,alt:"annotation is missing"});case"info":return(0,o.jsx)("img",{src:h,alt:"no Information",className:D.generalImg});case"content":return(0,o.jsx)("img",{src:c,alt:"create Component",className:D.generalImg});case"data":return(0,o.jsx)("img",{src:C,alt:"no Build",className:D.generalImg});default:return null}},u=(0,d.A)(v=>({root:{backgroundColor:v.palette.background.default,padding:v.spacing(2,0,0,0)},action:{marginTop:v.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function b(v){const{title:D,description:w,missing:y,action:B}=v,R=u();return(0,o.jsxs)(i.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:R.root,spacing:2,children:[(0,o.jsx)(i.A,{item:!0,xs:12,md:6,children:(0,o.jsxs)(i.A,{container:!0,direction:"column",children:[(0,o.jsx)(i.A,{item:!0,xs:!0,children:(0,o.jsx)(O.A,{variant:"h5",children:D})}),(0,o.jsx)(i.A,{item:!0,xs:!0,children:(0,o.jsx)(O.A,{variant:"body1",children:w})}),(0,o.jsx)(i.A,{item:!0,xs:!0,className:R.action,children:B})]})}),(0,o.jsx)(i.A,{item:!0,xs:12,md:6,className:R.imageContainer,children:typeof y=="string"?(0,o.jsx)(P,{missing:y}):y.customImage})]})}},22020:function(Y,T,t){"use strict";t.d(T,{b:function(){return P}});var o=t(31085),i=t(58837),d=t(58007),O=t(8109),m=t(5951),g=t(14041),h=t(37916),c=t(88640);const C=(0,i.A)(u=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:u.spacing(2)},divider:{margin:u.spacing(2)}}),{name:"BackstageErrorPanel"}),A=({error:u,message:b,stack:v,children:D})=>{const w=C();return(0,o.jsxs)(d.A,{dense:!0,children:[(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(m.A,{classes:{secondary:w.text},primary:"Error",secondary:u}),(0,o.jsx)(h.l,{text:u})]}),(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(m.A,{classes:{secondary:w.text},primary:"Message",secondary:b}),(0,o.jsx)(h.l,{text:b})]}),v&&(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(m.A,{classes:{secondary:w.text},primary:"Stack Trace",secondary:v}),(0,o.jsx)(h.l,{text:v})]}),D]})};function P(u){const{title:b,error:v,defaultExpanded:D,titleFormat:w,children:y}=u;return(0,o.jsx)(c.B,{severity:"error",title:b!=null?b:v.message,defaultExpanded:D,titleFormat:w,children:(0,o.jsx)(A,{error:v.name,message:v.message,stack:v.stack,children:y})})}},72072:function(Y,T,t){"use strict";t.d(T,{N_:function(){return K}});var o=t(31085),i=t(72427),d=t(65461),O=t(93368),m=t(49203),g=t(58837),h=t(72501),c=t(53373),C=t.n(c),A=t(45250),P=t.n(A),u=t(14041),b=t(18690),v=t(73970);function D(){const[W]=(0,b.AV)((0,o.jsx)(b.qh,{index:!0,element:(0,o.jsx)("div",{})}));return!W.index}const w=(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"}),y=W=>/^([a-z+.-]+):/.test(W),B=/^[\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,R=window.open;if(R&&!R.__backstage){const W=function(...H){const J=String(H[0]);if(B.test(J))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return R.apply(this,H)};W.__backstage=!0,window.open=W}const x=()=>{try{return(0,i.gf)(d.U).getOptionalString("app.baseUrl")}catch{return}},z=()=>{const W="http://sample.dev";var _;const H=(_=x())!==null&&_!==void 0?_:"/",{pathname:J}=new URL(H,W);return(0,A.trimEnd)(J,"/")},V=W=>{let _=String(W);const H=z(),J=y(_),q=_.startsWith(H);return!J&&!q&&(_=H.concat(_)),_},tt=W=>{if(W instanceof Array)return W.map(tt).join(" ").trim();if(typeof W=="object"&&W){var _;return tt(W==null||(_=W.props)===null||_===void 0?void 0:_.children)}return["string","number"].includes(typeof W)?String(W):""},K=u.forwardRef(({onClick:W,noTrack:_,...H},J)=>{const q=w(),mt=(0,O.s)(),it=D()?V(H.to):H.to,bt=tt(H.children)||it,ct=y(it),gt=ct&&!!/^https?:/.exec(it);if(B.test(it))throw new Error("Link component rejected javascript: URL as a security precaution");const lt=rt=>{W==null||W(rt),_||mt.captureEvent("click",bt,{attributes:{to:it}})};return ct?(0,o.jsxs)(m.A,{...gt?{target:"_blank",rel:"noopener"}:{},...H,...H["aria-label"]?{"aria-label":`${H["aria-label"]}, Opens in a new window`}:{},ref:J,href:it,onClick:lt,className:C()(q.externalLink,H.className),children:[H.children,(0,o.jsx)(h.A,{component:"span",className:q.visuallyHidden,children:", Opens in a new window"})]}):(0,o.jsx)(m.A,{...H,ref:J,component:v.N_,to:it,onClick:lt})})},73896:function(Y,T,t){"use strict";t.d(T,{z:function(){return g}});var o=t(31085),i=t(64947),d=t(14041),O=t(72072);const m=d.forwardRef((c,C)=>(0,o.jsx)(O.N_,{ref:C,...c,color:"initial"})),g=d.forwardRef((c,C)=>(0,o.jsx)(i.A,{ref:C,component:m,...c})),h=null},4650:function(Y,T,t){"use strict";t.d(T,{h:function(){return P}});var o=t(31085),i=t(58837),d=t(45872),O=t(61125),m=t(14041),g=t(77310);const h=(0,i.A)(u=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${u.palette.border}`},"& th, & td":{border:`1px solid ${u.palette.border}`,padding:u.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:u.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:u.palette.background.paper},"& tr":{backgroundColor:u.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:u.palette.background.default},"& a":{color:u.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),c=(u,b)=>b?typeof b=="string"?u+b:m.Children.toArray(b.props.children).reduce(c,u):u,C=({level:u,children:b})=>{const w=m.Children.toArray(b).reduce(c,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${u}`,{id:w},b)},A={code:({inline:u,className:b,children:v,...D})=>{const w=String(v).replace(/\n+$/,""),y=/language-(\w+)/.exec(b||"");return!u&&y?(0,o.jsx)(g.z,{language:y[1],text:w}):(0,o.jsx)("code",{className:b,...D,children:v})},h1:C,h2:C,h3:C,h4:C,h5:C,h6:C};function P(u){const{content:b,dialect:v="gfm",linkTarget:D,transformLinkUri:w,transformImageUri:y,className:B}=u,R=h();return(0,o.jsx)(d.$,{remarkPlugins:v==="gfm"?[O.A]:[],className:`${R.markdown} ${B!=null?B:""}`.trim(),children:b,components:A,linkTarget:D,transformLinkUri:w,transformImageUri:y})}},68146:function(Y,T,t){"use strict";t.d(T,{k:function(){return g}});var o=t(31085),i=t(10394),d=t(88951),O=t(54917),m=t(14041);function g(h){const c=(0,O.A)(),[C,A]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const P=setTimeout(()=>A(!0),c.transitions.duration.short);return()=>clearTimeout(P)},[c.transitions.duration.short]),C?(0,o.jsx)(d.A,{...h,"data-testid":"progress"}):(0,o.jsx)(i.A,{display:"none"})}},66917:function(Y,T,t){"use strict";t.d(T,{w:function(){return K}});var o=t(31085),i=t(10394),d=t(69076),O=t(67720),m=t(95061),g=t(41857),h=t(48543),c=t(26343),C=t(81215),A=t(87051),P=t(12398),u=t(58837),b=t(72501),v=t(14041),D=t(10437);const w=(0,u.A)(W=>(0,P.A)({icon:{position:"absolute",right:W.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"});var B=()=>{const W=w();return(0,o.jsx)(D.A,{className:W.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"currentColor"})})};const R=(0,u.A)(W=>(0,P.A)({icon:{position:"absolute",right:W.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"});var z=()=>{const W=R();return(0,o.jsx)(D.A,{className:W.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"currentColor"})})};const V=(0,A.A)(W=>(0,P.A)({root:{"label + &":{marginTop:W.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:W.palette.primary.main}},input:{borderRadius:W.shape.borderRadius,position:"relative",backgroundColor:W.palette.background.paper,border:"1px solid #ced4da",fontSize:W.typography.body1.fontSize,padding:W.spacing(1.25,3.25,1.25,1.5),transition:W.transitions.create(["border-color","box-shadow"]),"&:focus":{background:W.palette.background.paper,borderRadius:W.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(g.A),tt=(0,u.A)(W=>(0,P.A)({formControl:{margin:W.spacing(1,0),maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:W.typography.body2.fontSize,fontFamily:W.typography.fontFamily,color:W.palette.text.primary,"&.Mui-focused":{color:W.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:W.typography.body2.fontSize,fontFamily:W.typography.fontFamily,color:W.palette.text.primary,"&.Mui-focused":{color:W.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function K(W){const{multiple:_,items:H,label:J,placeholder:q,selected:mt,onChange:it,triggerReset:bt,native:ct=!1,disabled:gt=!1,margin:lt}=W,rt=tt(),[vt,yt]=(0,v.useState)(mt||(_?[]:"")),[Pt,pt]=(0,v.useState)(!1);(0,v.useEffect)(()=>{yt(_?[]:"")},[bt,_]),(0,v.useEffect)(()=>{yt(mt||(_?[]:""))},[mt,_]);const st=At=>{yt(At.target.value),it(At.target.value)},ht=At=>{if(gt){At.preventDefault();return}pt(N=>_&&!(At.target instanceof HTMLElement)?!0:!N)},ft=()=>{pt(!1)},wt=At=>()=>{const N=vt.filter(G=>G!==At);yt(N),it(N)};return(0,o.jsx)(i.A,{className:rt.root,children:(0,o.jsxs)(m.A,{className:rt.formControl,children:[(0,o.jsx)(h.A,{className:rt.formLabel,children:J}),(0,o.jsxs)(C.A,{"aria-label":J,value:vt,native:ct,disabled:gt,"data-testid":"select",displayEmpty:!0,multiple:_,margin:lt,onChange:st,open:Pt,onOpen:ht,onClose:ft,input:(0,o.jsx)(V,{}),label:J,renderValue:At=>{var N;return _&&vt.length!==0?(0,o.jsx)(i.A,{className:rt.chips,children:At.map(G=>{const Et=H.find(Ot=>Ot.value===G);return Et?(0,o.jsx)(O.A,{label:Et==null?void 0:Et.label,clickable:!0,onDelete:wt(G),className:rt.chip},Et==null?void 0:Et.value):!1})}):(0,o.jsx)(b.A,{children:vt.length===0?q||"":(N=H.find(G=>G.value===At))===null||N===void 0?void 0:N.label})},IconComponent:()=>Pt?(0,o.jsx)(z,{}):(0,o.jsx)(B,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[q&&!_&&(0,o.jsx)(c.A,{value:[],children:q}),ct?H&&H.map(At=>(0,o.jsx)("option",{value:At.value,children:At.label},At.value)):H&&H.map(At=>(0,o.jsxs)(c.A,{value:At.value,children:[_&&(0,o.jsx)(d.A,{color:"primary",checked:vt.includes(At.value)||!1,className:rt.checkbox}),At.label]},At.value))]})]})})}},27586:function(Y,T,t){"use strict";t.d(T,{Y:function(){return W}});var o=t(31085),i=t(82266),d=t(10394),O=t(64947),m=t(93453),g=t(29365),h=t(46423),c=t(5951),C=t(26343),A=t(28233),P=t(55197),u=t(58837),b=t(72501),v=t(5893),D=t(14041),w=t(10795),y=t(31129),B=t(72072),R=t(10315),x=t(87849);const z=(0,u.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),V=({icon:_})=>{const H=(0,i.n)();var J;const q=_&&(J=H.getSystemIcon(_))!==null&&J!==void 0?J:y.NT;return(0,o.jsx)(q,{})},tt=({link:_})=>{var H;return(0,o.jsx)(B.N_,{to:_.url,children:(H=_.title)!==null&&H!==void 0?H:_.url})},K=({item:_})=>{var H;return(0,o.jsxs)(C.A,{children:[(0,o.jsx)(h.A,{children:(0,o.jsx)(V,{icon:_.icon})}),(0,o.jsx)(c.A,{primary:_.title,secondary:(H=_.links)===null||H===void 0?void 0:H.reduce((J,q,mt)=>[...J,mt>0&&(0,o.jsx)("br",{},mt),(0,o.jsx)(tt,{link:q},q.url)],[])})]})};function W(_){const{t:H}=(0,x.i)(R.O),{title:J,items:q,children:mt}=_,{items:it}=(0,w.l)(),[bt,ct]=(0,D.useState)(!1),[gt,lt]=(0,D.useState)(null),rt=z(),vt=(0,v.A)(pt=>pt.breakpoints.down("sm")),yt=pt=>{lt(pt.currentTarget),ct(!0)},Pt=()=>{ct(!1)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.A,{display:"flex",ml:1,children:vt?(0,o.jsx)(g.A,{color:"primary",size:"small",onClick:yt,"data-testid":"support-button","aria-label":"Support",children:(0,o.jsx)(y.NT,{})}):(0,o.jsx)(O.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:yt,startIcon:(0,o.jsx)(y.NT,{}),children:H("supportButton.title")})}),(0,o.jsxs)(P.Ay,{"data-testid":"support-button-popover",open:bt,anchorEl:gt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:Pt,children:[(0,o.jsxs)(A.A,{className:rt.popoverList,autoFocusItem:!!gt,children:[J&&(0,o.jsx)(C.A,{alignItems:"flex-start",className:rt.menuItem,children:(0,o.jsx)(b.A,{variant:"subtitle1",children:J})}),D.Children.map(mt,(pt,st)=>(0,o.jsx)(C.A,{alignItems:"flex-start",className:rt.menuItem,children:pt},`child-${st}`)),(q!=null?q:it).map((pt,st)=>(0,o.jsx)(K,{item:pt},`item-${st}`))]}),(0,o.jsx)(m.A,{children:(0,o.jsx)(O.A,{color:"primary",onClick:Pt,"aria-label":"Close",children:H("supportButton.close")})})]})]})}},14209:function(Y,T,t){"use strict";t.d(T,{X:function(){return ft}});var o=t(31085),i=t(25301),d=t(10394),O=t(29365),m=t(87051),g=t(58837),h=t(54917),c=t(72501),C=t(83313),A=t(89019),P=t(62461),u=t(68887),b=t(63798),v=t(64704),D=t(6774),w=t(75625),y=t(65859),B=t(5416),R=t(33494),x=t(80113),z=t(26229),V=t(46802),tt=t(45250),K=t(14041),W=t(64947),_=t(66917),H=t(10315),J=t(87849);const q=(0,g.A)(N=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:N.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:N.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${N.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:N.spacing(2)}}}),{name:"BackstageTableFilters"}),mt=N=>{var G;const Et=q(),{onChangeFilters:Ot}=N,{t:Ft}=(0,J.i)(H.O),[Tt,Dt]=(0,K.useState)({...N.selectedFilters}),[kt,St]=(0,K.useState)(!1),Wt=()=>{Dt({}),St(Jt=>!Jt)};return(0,K.useEffect)(()=>{Ot(Tt)},[Tt,Ot]),(0,o.jsxs)(d.A,{className:Et.root,children:[(0,o.jsxs)(d.A,{className:Et.header,children:[(0,o.jsx)(d.A,{className:Et.value,children:Ft("table.filter.title")}),(0,o.jsx)(W.A,{color:"primary",onClick:Wt,children:Ft("table.filter.clearAll")})]}),(0,o.jsx)(d.A,{className:Et.filters,children:((G=N.filters)===null||G===void 0?void 0:G.length)&&N.filters.map(Jt=>(0,o.jsx)(_.w,{triggerReset:kt,...Jt.element,selected:Tt[Jt.element.label],onChange:ue=>Dt({...Tt,[Jt.element.label]:ue})},Jt.element.label))})]})};var it=t(78467);function bt(N){return(0,o.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:N.colSpan,children:(0,o.jsx)(d.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,o.jsx)(it.A,{size:"5rem"})})})})})}const ct={Add:(0,K.forwardRef)((N,G)=>(0,o.jsx)(C.A,{...N,ref:G})),Check:(0,K.forwardRef)((N,G)=>(0,o.jsx)(P.A,{...N,ref:G})),Clear:(0,K.forwardRef)((N,G)=>(0,o.jsx)(v.A,{...N,ref:G})),Delete:(0,K.forwardRef)((N,G)=>(0,o.jsx)(D.A,{...N,ref:G})),DetailPanel:(0,K.forwardRef)((N,G)=>(0,o.jsx)(b.A,{...N,ref:G})),Edit:(0,K.forwardRef)((N,G)=>(0,o.jsx)(w.A,{...N,ref:G})),Export:(0,K.forwardRef)((N,G)=>(0,o.jsx)(z.A,{...N,ref:G})),Filter:(0,K.forwardRef)((N,G)=>(0,o.jsx)(y.A,{...N,ref:G})),FirstPage:(0,K.forwardRef)((N,G)=>(0,o.jsx)(B.A,{...N,ref:G})),LastPage:(0,K.forwardRef)((N,G)=>(0,o.jsx)(R.A,{...N,ref:G})),NextPage:(0,K.forwardRef)((N,G)=>(0,o.jsx)(b.A,{...N,ref:G})),PreviousPage:(0,K.forwardRef)((N,G)=>(0,o.jsx)(u.A,{...N,ref:G})),ResetSearch:(0,K.forwardRef)((N,G)=>(0,o.jsx)(v.A,{...N,ref:G})),Search:(0,K.forwardRef)((N,G)=>(0,o.jsx)(y.A,{...N,ref:G})),SortArrow:(0,K.forwardRef)((N,G)=>(0,o.jsx)(A.A,{...N,ref:G})),ThirdStateCheck:(0,K.forwardRef)((N,G)=>(0,o.jsx)(x.A,{...N,ref:G})),ViewColumn:(0,K.forwardRef)((N,G)=>(0,o.jsx)(V.A,{...N,ref:G}))};function gt(N,G){const Et=G.split(".");let Ot=N[Et[0]];for(let Ft=1;Ft<Et.length;++Ft){if(Ot===void 0)return Ot;const Tt=Et[Ft];Ot=Ot[Tt]}return Ot}const lt=(0,m.A)(N=>({header:{padding:N.spacing(1,2,1,2.5),borderTop:`1px solid ${N.palette.grey.A100}`,borderBottom:`1px solid ${N.palette.grey.A100}`,fontWeight:N.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(i.rV),rt=(0,m.A)(N=>({root:{padding:N.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:N.typography.fontWeightBold}},searchField:{paddingRight:N.spacing(2)}}),{name:"BackstageTableToolbar"})(i.Nb),vt=(0,g.A)(N=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:N.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),yt=(0,g.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Pt(N,G){return N.map(Et=>{var Ot;const Ft=(Ot=Et.headerStyle)!==null&&Ot!==void 0?Ot:{};let Tt=Et.cellStyle||{};if(Et.highlight)if(Ft.color=G.palette.textContrast,typeof Tt=="object")Tt.fontWeight=G.typography.fontWeightBold;else{const Dt=Tt;Tt=(kt,St,Wt)=>({...Dt(kt,St,Wt),fontWeight:G.typography.fontWeightBold})}return{...Et,headerStyle:Ft,cellStyle:Tt}})}function pt(N,G){return(0,tt.transform)(N,(Et,Ot,Ft)=>{(0,tt.isEqual)(Ot,G[Ft])||(Et[Ft]=Ot)})}const st={search:"",filtersOpen:!1,filters:{}};function ht(N){const{toolbarRef:G,setSearch:Et,hasFilters:Ot,selectedFiltersLength:Ft,toggleFilters:Tt}=N,Dt=vt(),kt=(0,K.useCallback)(St=>{N.onSearchChanged(St),Et(St)},[N,Et]);return Ot?(0,o.jsxs)(d.A,{className:Dt.root,children:[(0,o.jsxs)(d.A,{className:Dt.root,children:[(0,o.jsx)(O.A,{onClick:Tt,"aria-label":"filter list",children:(0,o.jsx)(y.A,{})}),(0,o.jsxs)(c.A,{className:Dt.title,children:["Filters (",Ft,")"]})]}),(0,o.jsx)(rt,{...N,ref:G,onSearchChanged:kt})]}):(0,o.jsx)(rt,{...N,ref:G,onSearchChanged:kt})}function ft(N){const{data:G,columns:Et,emptyContent:Ot,options:Ft,title:Tt,subtitle:Dt,localization:kt,filters:St,initialState:Wt,onStateChange:Jt,components:ue,isLoading:ae,...le}=N,Ht=yt(),Xt=(0,h.A)(),ge={...st,...Wt},[Ke,Fe]=(0,K.useState)(ge.filtersOpen),_e=(0,K.useCallback)(()=>Fe(he=>!he),[Fe]),[we,sn]=(0,K.useState)(ge.filters),[Xe,ne]=(0,K.useState)(ge.search);(0,K.useEffect)(()=>{if(Jt){const he=pt({search:Xe,filtersOpen:Ke,filters:we},st);Jt(he)}},[Xe,Ke,we,Jt]);const ze=(0,K.useCallback)(he=>{var Ie;return(Ie=Et.find(Ve=>Ve.title===he))===null||Ie===void 0?void 0:Ie.field},[Et]),He=(0,K.useMemo)(()=>{if(typeof G=="function"||!we)return G;const he=Object.values(we);return G&&he.flat().length?G.filter(Ve=>!!Object.entries(we).filter(([,Qe])=>!!Qe.length).every(([Qe,De])=>{const $e=gt(Ve,ze(Qe));return Array.isArray($e)&&Array.isArray(De)?$e.some(L=>De.includes(L)):Array.isArray($e)?$e.includes(De):Array.isArray(De)?De.includes($e):$e===De})):G},[G,we,ze]),qe=Object.values(we).flat().length,Ye=!!(St!=null&&St.length),xe=(0,K.useCallback)(he=>(0,o.jsx)(ht,{setSearch:ne,hasFilters:Ye,selectedFiltersLength:qe,toggleFilters:_e,...he}),[_e,Ye,qe,ne]),an=typeof G!="function"&&G.length===0,ln=Et.length,cn=(0,K.useMemo)(()=>wt({hasNoRows:an,emptyContent:Ot,columnCount:ln,loading:ae}),[an,Ot,ln,ae]);return(0,o.jsxs)(d.A,{className:Ht.root,children:[Ke&&G&&typeof G!="function"&&(St==null?void 0:St.length)&&(0,o.jsx)(mt,{filters:At(St,G,Et),selectedFilters:we,onChangeFilters:sn}),(0,o.jsx)(i.Ay,{components:{Header:lt,Body:cn,Toolbar:xe,...ue},options:Ft,columns:Pt(Et,Xt),icons:ct,title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.A,{variant:"h5",component:"h2",children:Tt}),Dt&&(0,o.jsx)(c.A,{color:"textSecondary",variant:"body1",children:Dt})]}),data:He,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"},...kt},...le})]})}ft.icons=Object.freeze(ct);function wt({columnCount:N,emptyContent:G,hasNoRows:Et,loading:Ot}){return Ft=>Ot?(0,o.jsx)(bt,{colSpan:N}):G&&Et?(0,o.jsx)("tbody",{children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:N,children:G})})}):(0,o.jsx)(i.C6,{...Ft})}function At(N,G,Et){const Ot=Tt=>{const Dt=new Set,kt=St=>{St!=null&&Dt.add(St)};return G&&G.forEach(St=>{var Wt;const Jt=gt(St,(Wt=Et.find(ue=>ue.title===Tt))===null||Wt===void 0?void 0:Wt.field);Array.isArray(Jt)?Jt.forEach(kt):kt(Jt)}),Dt},Ft=Tt=>({placeholder:"All results",label:Tt.column,multiple:Tt.type==="multiple-select",items:[...Ot(Tt.column)].sort().map(Dt=>({label:Dt,value:Dt}))});return N.map(Tt=>({type:Tt.type,element:Ft(Tt)}))}},88640:function(Y,T,t){"use strict";t.d(T,{B:function(){return x}});var o=t(31085),i=t(268),d=t(58837),O=t(8973),m=t(29655),g=t(91567),h=t(42899),c=t(72501),C=t(9181),A=t(6924),P=t(14041),u=t(4650);const b=(z,V)=>(V.palette.type==="light"?i.e$:i.a)(V.palette[z].light,.6),v=(z,V)=>(V.palette.type==="light"?i.a:i.e$)(V.palette[z].light,.9),D=(0,d.A)(z=>({root:{marginRight:z.spacing(1),fill:({severity:V})=>b(V,z)}})),w=({severity:z})=>{const V=D({severity:z});return(0,o.jsx)(C.A,{classes:V})},y=({severity:z})=>{const V=D({severity:z});return(0,o.jsx)(A.A,{classes:V})},B=(0,d.A)(z=>({panel:{backgroundColor:({severity:V})=>v(V,z),color:({severity:V})=>b(V,z),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:V})=>b(V,z),fontWeight:z.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:V})=>b(V,z),backgroundColor:({severity:V})=>v(V,z)},details:{width:"100%",display:"block",color:z.palette.textContrast,backgroundColor:z.palette.background.default,border:`1px solid ${z.palette.border}`,padding:z.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),R=z=>z.charAt(0).toLocaleUpperCase("en-US")+z.slice(1);function x(z){const{severity:V="warning",title:tt,titleFormat:K,message:W,children:_,defaultExpanded:H}=z,J=B({severity:V}),q=R(V)+(tt?`: ${tt}`:"");return(0,o.jsxs)(O.A,{defaultExpanded:H!=null?H:!1,className:J.panel,role:"alert",children:[(0,o.jsxs)(m.A,{expandIcon:(0,o.jsx)(y,{severity:V}),className:J.summary,children:[(0,o.jsx)(w,{severity:V}),(0,o.jsx)(c.A,{className:J.summaryText,variant:"subtitle1",children:K==="markdown"?(0,o.jsx)(u.h,{content:q,className:J.markdownContent}):q})]}),(W||_)&&(0,o.jsx)(g.A,{children:(0,o.jsxs)(h.A,{container:!0,children:[W&&(0,o.jsx)(h.A,{item:!0,xs:12,children:(0,o.jsx)(c.A,{className:J.message,variant:"body1",children:W})}),_&&(0,o.jsx)(h.A,{item:!0,xs:12,className:J.details,children:_})]})})]})}},10795:function(Y,T,t){"use strict";t.d(T,{l:function(){return g}});var o=t(72427),i=t(65461),d=t(10315),O=t(87849);const m=()=>{const{t:h}=(0,O.i)(d.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 c=(0,o.Q2)().get(i.U),C=c==null?void 0:c.getOptionalConfig("app.support"),A=m();return C?{url:C.getString("url"),items:C.getConfigArray("items").flatMap(P=>{var u;return{title:P.getString("title"),icon:P.getOptionalString("icon"),links:((u=P.getOptionalConfigArray("links"))!==null&&u!==void 0?u:[]).flatMap(b=>({url:b.getString("url"),title:b.getString("title")}))}})}:A}},31129:function(Y,T,t){"use strict";t.d(T,{NT:function(){return v},z9:function(){return m}});var o=t(31085),i=t(82266),d=t(27799),O=t(14041);function m(y){const{id:B,Fallback:R=d.A,...x}=y,z=(0,i.n)();var V;const tt=(V=z.getSystemIcon(B))!==null&&V!==void 0?V:R;return(0,o.jsx)(tt,{...x})}function g(y){return _jsx(m,{id:"brokenImage",...y})}function h(y){return _jsx(m,{id:"catalog",...y})}function c(y){return _jsx(m,{id:"chat",...y})}function C(y){return _jsx(m,{id:"dashboard",...y})}function A(y){return _jsx(m,{id:"docs",...y})}function P(y){return _jsx(m,{id:"email",...y})}function u(y){return _jsx(m,{id:"github",...y})}function b(y){return _jsx(m,{id:"group",...y})}function v(y){return(0,o.jsx)(m,{id:"help",...y})}function D(y){return _jsx(m,{id:"user",...y})}function w(y){return _jsx(m,{id:"warning",...y})}},26280:function(Y,T,t){"use strict";t.d(T,{U:function(){return h}});var o=t(31085),i=t(58837),d=t(53373),O=t.n(d),m=t(14041);const g=(0,i.A)(c=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:c.spacing(3),paddingBottom:c.spacing(3),paddingLeft:c.spacing(2),paddingRight:c.spacing(2),[c.breakpoints.up("sm")]:{paddingLeft:c.spacing(3),paddingRight:c.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function h(c){const{className:C,stretch:A,noPadding:P,children:u,...b}=c,v=g();return(0,o.jsx)("article",{...b,className:O()(v.root,C,{[v.stretch]:A,[v.noPadding]:P}),children:u})}},59428:function(Y,T,t){"use strict";t.d(T,{d:function(){return C}});var o=t(31085),i=t(10394),d=t(58837),O=t(72501),m=t(14041),g=t(93285);const h=A=>(0,d.A)(P=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:P.spacing(2),textAlign:A.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:P.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),c=({title:A="Unknown page",className:P})=>(0,o.jsx)(O.A,{variant:"h4",component:"h2",className:P,"data-testid":"header-title",children:A});function C(A){const{description:P,title:u,titleComponent:b=void 0,children:v,textAlign:D="left"}=A,w=h({textAlign:D})(),y=b||(0,o.jsx)(c,{title:u,className:w.title});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.m,{title:u}),(0,o.jsxs)(i.A,{className:w.container,children:[(0,o.jsxs)(i.A,{className:w.leftItemsBox,children:[y,P&&(0,o.jsx)(O.A,{className:w.description,variant:"body2",children:P})]}),(0,o.jsx)(i.A,{className:w.rightItemsBox,children:v})]})]})}},12173:function(Y,T,t){"use strict";t.d(T,{M:function(){return B}});var o=t(31085),i=t(42899),d=t(58837),O=t(72501),m=t(14041),g=t(18690),h=t(72072),c=t(10795),C=t.p+"static/mic-drop.fe3ef4d0..svg";const A=(0,d.A)(R=>({micDrop:{maxWidth:"60%",bottom:R.spacing(2),right:R.spacing(2),[R.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:R.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),P=()=>{const R=A();return(0,o.jsx)("img",{src:C,className:R.micDrop,alt:"Girl dropping mic from her hands"})};var u=t(77310),b=t(87849),v=t(10315);const D=(0,d.A)(R=>({title:{paddingBottom:R.spacing(5),[R.breakpoints.down("xs")]:{paddingBottom:R.spacing(4),fontSize:R.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function w(R){const{stack:x}=R,z=D(),{t:V}=(0,b.i)(v.O),[tt,K]=(0,m.useState)(!1);return tt?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(O.A,{variant:"h6",className:z.title,children:(0,o.jsx)(h.N_,{to:"#",onClick:()=>K(!1),children:V("errorPage.showLessDetails")})}),(0,o.jsx)(u.z,{text:x,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,o.jsx)(O.A,{variant:"h6",className:z.title,children:(0,o.jsx)(h.N_,{to:"#",onClick:()=>K(!0),children:V("errorPage.showMoreDetails")})})}const y=(0,d.A)(R=>({container:{padding:R.spacing(8),[R.breakpoints.down("xs")]:{padding:R.spacing(2)}},title:{paddingBottom:R.spacing(5),[R.breakpoints.down("xs")]:{paddingBottom:R.spacing(4),fontSize:R.typography.h3.fontSize}},subtitle:{color:R.palette.textSubtle}}),{name:"BackstageErrorPage"});function B(R){const{status:x="",statusMessage:z,additionalInfo:V,supportUrl:tt,stack:K}=R,W=y(),_=(0,g.Zp)(),H=(0,c.l)(),{t:J}=(0,b.i)(v.O);return(0,o.jsxs)(i.A,{container:!0,className:W.container,children:[(0,o.jsxs)(i.A,{item:!0,xs:12,sm:8,md:4,children:[(0,o.jsx)(O.A,{"data-testid":"error",variant:"body1",className:W.subtitle,children:J("errorPage.subtitle",{status:x,statusMessage:z})}),(0,o.jsx)(O.A,{variant:"body1",className:W.subtitle,children:V}),(0,o.jsx)(O.A,{variant:"h2",className:W.title,children:J("errorPage.title")}),(0,o.jsxs)(O.A,{variant:"h6",className:W.title,children:[(0,o.jsx)(h.N_,{to:"#","data-testid":"go-back-link",onClick:()=>_(-1),children:J("errorPage.goBack")}),"... or please"," ",(0,o.jsx)(h.N_,{to:tt||H.url,children:"contact support"})," if you think this is a bug."]}),K&&(0,o.jsx)(w,{stack:K})]}),(0,o.jsx)(P,{})]})}},69814:function(Y,T,t){"use strict";t.d(T,{Y:function(){return _}});var o=t(31085),i=t(72427),d=t(65461),O=t(10394),m=t(42899),g=t(58837),h=t(71677),c=t(72501),C=t(14041),A=t(93285),P=t(72072),u=t(45634),b=t(58007),v=t(8109),D=t(55197),w=t(87051);const y=(0,w.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(c.A),B=(0,w.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(O.A),R=(0,w.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(O.A);function x(H){const{children:J,...q}=H,[mt,it]=C.useState(null),bt=C.Children.toArray(J),[ct,gt,...lt]=bt,rt=lt.length?lt.pop():bt[bt.length-1],vt=bt.length>3,yt=st=>{it(st.currentTarget)},Pt=()=>{it(null)},pt=!!mt;return(0,o.jsxs)(C.Fragment,{children:[(0,o.jsxs)(u.A,{"aria-label":"breadcrumb",...q,children:[bt.length>1&&(0,o.jsx)(B,{clone:!0,children:ct}),bt.length>2&&(0,o.jsx)(B,{clone:!0,children:gt}),vt&&(0,o.jsx)(y,{onClick:yt,children:"..."}),(0,o.jsx)(R,{children:rt})]}),(0,o.jsx)(D.Ay,{open:pt,anchorEl:mt,onClose:Pt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,o.jsx)(b.A,{children:lt.map((st,ht)=>(0,o.jsx)(v.A,{button:!0,children:(0,o.jsx)(B,{clone:!0,children:st})},ht))})})]})}var z=t(73524);const V=(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"}),tt=({type:H,typeLink:J,classes:q,pageTitle:mt})=>H?J?(0,o.jsxs)(x,{className:q.breadcrumb,children:[(0,o.jsx)(P.N_,{to:J,children:H}),(0,o.jsx)(c.A,{children:mt})]}):(0,o.jsx)(c.A,{className:q.type,children:H}):null,K=({pageTitle:H,classes:J,tooltip:q})=>{const{contentRef:mt}=(0,z.H)(),it=(0,o.jsx)(c.A,{ref:mt,tabIndex:-1,className:J.title,variant:"h1",children:H});return q?(0,o.jsx)(h.Ay,{title:q,placement:"top-start",children:it}):it},W=({classes:H,subtitle:J})=>J?typeof J!="string"?(0,o.jsx)(o.Fragment,{children:J}):(0,o.jsx)(c.A,{className:H.subtitle,variant:"subtitle2",component:"span",children:J}):null;function _(H){const{children:J,pageTitleOverride:q,style:mt,subtitle:it,title:bt,tooltip:ct,type:gt,typeLink:lt}=H,rt=V(),yt=(0,i.gf)(d.U).getOptionalString("app.title")||"Backstage",Pt=q||bt,pt=bt||q,st=`${Pt} | %s | ${yt}`,ht=`${Pt} | ${yt}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(A.m,{titleTemplate:st,defaultTitle:ht}),(0,o.jsxs)("header",{style:mt,className:rt.header,children:[(0,o.jsxs)(O.A,{className:rt.leftItemsBox,children:[(0,o.jsx)(tt,{classes:rt,type:gt,typeLink:lt,pageTitle:pt}),(0,o.jsx)(K,{classes:rt,pageTitle:pt,tooltip:ct}),(0,o.jsx)(W,{classes:rt,subtitle:it})]}),(0,o.jsx)(m.A,{container:!0,className:rt.rightItemsBox,spacing:4,children:J})]})]})}},24504:function(Y,T,t){"use strict";t.d(T,{Y:function(){return g}});var o=t(31085),i=t(14041),d=t(58837),O=t(50868);const m=(0,d.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:c,children:C}=h,A=m();return(0,o.jsx)(O.A,{theme:P=>({...P,page:P.getPageTheme({themeId:c})}),children:(0,o.jsx)("main",{className:A.root,children:C})})}},27155:function(Y,T,t){"use strict";t.d(T,{d:function(){return m}});var o=t(31085),i=t(14041),d=t(69814),O=t(24504);function m(g){const{themeId:h,children:c,...C}=g;return(0,o.jsxs)(O.Y,{themeId:h,children:[(0,o.jsx)(d.Y,{...C}),c]})}},73524:function(Y,T,t){"use strict";t.d(T,{G:function(){return u},H:function(){return b}});var o=t(31085),i=t(10394),d=t(58837),O=t(5893),m=t(14041),g=t(72664),h;(function(v){v.SIDEBAR_PIN_STATE="sidebarPinState"})(h||(h={}));const c={getSidebarPinState(){let v;try{v=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!v},setSidebarPinState(v){return window.localStorage.setItem("sidebarPinState",JSON.stringify(v))}};var C=t(34435);const A=(0,d.A)(v=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[v.breakpoints.up("sm")]:{paddingLeft:D=>D.isPinned?D.sidebarConfig.drawerWidthOpen:D.sidebarConfig.drawerWidthClosed},[v.breakpoints.down("xs")]:{paddingBottom:D=>D.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),P=(0,m.createContext)({content:{contentRef:void 0}});function u(v){const[D,w]=(0,m.useState)(()=>c.getSidebarPinState()),{sidebarConfig:y}=(0,m.useContext)(g.yY),B=(0,m.useRef)(null),R=(0,m.useMemo)(()=>({content:{contentRef:B}}),[B]);(0,m.useEffect)(()=>{c.setSidebarPinState(D)},[D]);const x=(0,O.A)(tt=>tt.breakpoints.down("xs"),{noSsr:!0}),z=()=>w(!D),V=A({isPinned:D,sidebarConfig:y});return(0,o.jsx)(C.qj,{value:{isPinned:D,toggleSidebarPinState:z,isMobile:x},children:(0,o.jsx)(P.Provider,{value:R,children:(0,o.jsx)(i.A,{className:V.root,children:v.children})})})}function b(){const{content:v}=(0,m.useContext)(P);return{focusContent:(0,m.useCallback)(()=>{var w,y;v==null||(y=v.contentRef)===null||y===void 0||(w=y.current)===null||w===void 0||w.focus()},[v]),contentRef:v==null?void 0:v.contentRef}}},34435:function(Y,T,t){"use strict";t.d(T,{Ut:function(){return C},qj:function(){return c}});var o=t(31085),i=t(43836),d=t(10602),O=t(14041);const m={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},g=(0,O.createContext)(m),h=(0,i.tK)("sidebar-pin-state-context");function c(A){const{children:P,value:u}=A;return(0,o.jsx)(g.Provider,{value:u,children:(0,o.jsx)(h.Provider,{value:(0,d.B)({1:u}),children:P})})}const C=()=>{const A=(0,O.useContext)(h),P=(0,O.useContext)(g);if(A===void 0)return P||m;const u=A.atVersion(1);if(u===void 0)throw new Error("No context found for version 1.");return u}},72664:function(Y,T,t){"use strict";t.d(T,{Rv:function(){return g},U1:function(){return P},hC:function(){return m},i8:function(){return c},yY:function(){return A}});var o=t(14041);const i=72,d=24,O=18,m={drawerWidthClosed:i,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:i,iconSize:i-d*2,iconPadding:d,selectedIndicatorWidth:3,userBadgePadding:O,userBadgeDiameter:i-O*2,mobileSidebarHeight:56},g=u=>({...m,...u,iconContainerWidth:m.drawerWidthClosed,iconSize:m.drawerWidthClosed-m.iconPadding*2,userBadgeDiameter:m.drawerWidthClosed-m.userBadgePadding*2}),h={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:m.defaultOpenDelayMs+200},c=u=>({...h,...u}),C="@backstage/core/sidebar-intro-dismissed",A=(0,o.createContext)({sidebarConfig:m,submenuConfig:h}),P=(0,o.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:function(Y,T,t){"use strict";t.d(T,{O:function(){return i}});var o=t(93184);const i=(0,o.h)({id:"core-components",messages:{signIn:{title:"Sign In",loginFailed:"Login failed",customProvider:{title:"Custom User",subtitle:`Enter your own User ID and credentials.
2
2
  This selection will not be stored.`,userId:"User ID",tokenInvalid:"Token is not a valid OpenID Connect JWT Token",continue:"Continue",idToken:"ID Token (optional)"},guestProvider:{title:"Guest",subtitle:`Enter as a Guest User.
3
- You will not have a verified identity, meaning some features might be unavailable.`,enter:"Enter"}},skipToContent:"Skip to content",copyTextButton:{tooltipText:"Text copied to clipboard"},simpleStepper:{reset:"Reset",finish:"Finish",next:"Next",skip:"Skip",back:"Back"},errorPage:{subtitle:"ERROR {{status}}: {{statusMessage}}",title:"Looks like someone dropped the mic!",goBack:"Go back",showMoreDetails:"Show more details",showLessDetails:"Show less details"},emptyState:{missingAnnotation:{title:"Missing Annotation",actionTitle:"Add the annotation to your component YAML as shown in the highlighted example below:",readMore:"Read more"}},supportConfig:{default:{title:"Support Not Configured",linkTitle:"Add `app.support` config key"}},errorBoundary:{title:"Please contact {{slackChannel}} for help."},oauthRequestDialog:{title:"Login Required",authRedirectTitle:"This will trigger a http redirect to OAuth Login.",login:"Log in",rejectAll:"Reject All"},supportButton:{title:"Support",close:"Close"},table:{filter:{title:"Filters",clearAll:"Clear all"}},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:function(Y,T,t){"use strict";t.d(T,{Ig:function(){return h},pn:function(){return v}});var o=t(31085),i=t(43836),d=t(10602),O=t(14041);const m=(0,i.tK)("analytics-context"),v=()=>{const A=(0,O.useContext)(m);if(A===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const x=A.atVersion(1);if(x===void 0)throw new Error("No context found for version 1.");return x},h=A=>{const{attributes:x,children:P}=A,b={...v(),...x},g=(0,d.B)({1:b});return(0,o.jsx)(m.Provider,{value:g,children:P})};function c(A,x){const P=u=>_jsx(h,{attributes:x,children:_jsx(A,{...u})});return P.displayName=`WithAnalyticsContext(${A.displayName||A.name||"Component"})`,P}},67237:function(Y,T,t){"use strict";t.d(T,{J:function(){return m},t:function(){return O}});var o=t(18990),i=t(63544);const d=(0,i.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),O="_ROUTABLE-EXTENSION-RENDERED";class m{setContext(h){this.context=h}captureEvent(h,c,{value:A,attributes:x}={}){const{_routeNodeType:P,...u}=this.context;if(h===O){d.mostRecentGatheredNavigation&&(d.mostRecentRoutableExtensionRender={context:{...u,extension:"App"}});return}if(d.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender})}catch(b){console.warn("Error during analytics event capture. %o",b)}d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&P==="gathered"&&u.pluginId==="root"){d.mostRecentGatheredNavigation={action:h,subject:c,value:A,attributes:x,context:u};return}try{this.analyticsApi.captureEvent({action:h,subject:c,value:A,attributes:x,context:u})}catch(b){console.warn("Error during analytics event capture. %o",b)}}constructor(h,c={routeRef:"unknown",pluginId:"root",extension:"App"}){(0,o._)(this,"analyticsApi",void 0),(0,o._)(this,"context",void 0),this.analyticsApi=h,this.context=c,d.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{d.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender}),d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),d.beforeUnloadRegistered=!0)}}},93368:function(Y,T,t){"use strict";t.d(T,{s:function(){return h}});var o=t(25862),i=t(72427),d=t(99303),O=t(14041),m=t(67237);function v(){try{return(0,i.gf)(d.c)}catch{return{captureEvent:()=>{}}}}function h(){const c=(0,O.useRef)(null),A=(0,o.pn)(),x=v();function P(){return c.current===null&&(c.current=new m.J(x)),c.current}const u=P();return u.setContext(A),u}},36017:function(Y,T,t){"use strict";t.d(T,{k:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.alert"})},99303:function(Y,T,t){"use strict";t.d(T,{c:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.analytics"})},65461:function(Y,T,t){"use strict";t.d(T,{U:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.config"})},57405:function(Y,T,t){"use strict";t.d(T,{I:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.discovery"})},39837:function(Y,T,t){"use strict";t.d(T,{m:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.error"})},63636:function(Y,T,t){"use strict";t.d(T,{B:function(){return d},S:function(){return i}});var o=t(55309),i;(function(O){O[O.None=0]="None",O[O.Active=1]="Active"})(i||(i={}));const d=(0,o.y)({id:"core.featureflags"})},70795:function(Y,T,t){"use strict";t.d(T,{a:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.fetch"})},16009:function(Y,T,t){"use strict";t.d(T,{K:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.identity"})},56038:function(Y,T,t){"use strict";t.d(T,{J:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.translation"})},55309:function(Y,T,t){"use strict";t.d(T,{y:function(){return d}});var o=t(18990);class i{get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}constructor(m){if((0,o._)(this,"config",void 0),this.config=m,!m.id.split(".").flatMap(h=>h.split("-")).every(h=>h.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${m.id}'`)}}function d(O){return new i(O)}},12935:function(Y,T,t){"use strict";t.d(T,{b:function(){return o}});function o(i,d){return"id"in i?{api:i,deps:{},factory:()=>d}:i}},72427:function(Y,T,t){"use strict";t.d(T,{Q2:function(){return m},gf:function(){return v}});var o=t(31085),i=t(14041),d=t(43836),O=t(97142);function m(){const c=(0,d.qO)("api-context");if(!c)throw new O.EH("API context is not available");const A=c.atVersion(1);if(!A)throw new O.EH("ApiContext v1 not available");return A}function v(c){const x=m().get(c);if(!x)throw new O.EH(`No implementation available for ${c}`);return x}function h(c){return function(x){const P=b=>{const g=m(),D={};for(const w in c)if(c.hasOwnProperty(w)){const y=c[w],B=g.get(y);if(!B)throw new NotImplementedError(`No implementation available for ${y}`);D[w]=B}return _jsx(x,{...b,...D})},u=x.displayName||x.name||"Component";return P.displayName=`withApis(${u})`,P}}},82266:function(Y,T,t){"use strict";t.d(T,{n:function(){return i}});var o=t(43836);const i=()=>{const d=(0,o.qO)("app-context");if(!d)throw new Error("App context is not available");const O=d.atVersion(1);if(!O)throw new Error("AppContext v1 not available");return O}},19402:function(Y,T,t){"use strict";t.d(T,{E:function(){return m},h:function(){return O}});var o=t(63544);const i=(0,o.Q)("component-data-store",()=>new WeakMap),d="__backstage_data";function O(v,h,c){const A=v;var x;let P=(x=A[d])!==null&&x!==void 0?x:i.get(v);if(P||(P={map:new Map},Object.defineProperty(A,d,{enumerable:!1,configurable:!0,writable:!1,value:P}),i.set(v,P)),P.map.has(h)){const u=v.displayName||v.name;throw new Error(`Attempted to attach duplicate data "${h}" to component "${u}"`)}P.map.set(h,c)}function m(v,h){if(!v)return;const c=v.type;if(!c)return;var A;const x=(A=c[d])!==null&&A!==void 0?A:i.get(c);if(x)return x.map.get(h)}},88758:function(Y,T,t){"use strict";t.d(T,{NC:function(){return u},zZ:function(){return b},QJ:function(){return P}});var o=t(31085),i=t(14041),d=t(93368),O=t(25862),m=t(82266),v=t(9222),h=t(19402),c=t(18990);class A extends i.Component{static getDerivedStateFromError(D){return{error:D}}render(){const{error:D}=this.state,{app:w,plugin:y}=this.props,{ErrorBoundaryFallback:B}=w.getComponents();return D?(0,o.jsx)(B,{error:D,resetError:this.handleErrorReset,plugin:y}):this.props.children}constructor(...D){super(...D),(0,c._)(this,"state",{error:void 0}),(0,c._)(this,"handleErrorReset",()=>{this.setState({error:void 0})})}}var x=t(67237);function P(g){const{component:D,mountPoint:w,name:y}=g;return b({component:{lazy:()=>D().then(B=>{const R=z=>{const V=(0,d.s)();try{(0,v.S)(w)}catch(tt){if(typeof tt=="object"&&tt!==null){const{message:K}=tt;if(typeof K=="string"&&K.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${w} 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 tt}return(0,i.useEffect)(()=>{V.captureEvent(x.t,"")},[V]),(0,o.jsx)(B,{...z})},C=y||B.displayName||B.name||"LazyComponent";return R.displayName=`RoutableExtension(${C})`,R},B=>C=>{const z=(0,m.n)(),{BootErrorPage:V}=z.getComponents();return(0,o.jsx)(V,{step:"load-chunk",error:B})})},data:{"core.mountPoint":w},name:y})}function u(g){const{component:D,name:w}=g;return b({component:D,name:w})}function b(g){const{data:D={},name:w}=g;w||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 g.component){const R=g.component.lazy;y=(0,i.lazy)(()=>R().then(C=>({default:C})))}else y=g.component.sync;const B=w||y.displayName||y.name||"Component";return{expose(R){const C=z=>{const V=(0,m.n)(),{Progress:tt}=V.getComponents(),K=D==null?void 0:D["core.mountPoint"];return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(tt,{}),children:(0,o.jsx)(A,{app:V,plugin:R,children:(0,o.jsx)(O.Ig,{attributes:{pluginId:R.getId(),...w&&{extension:w},...K&&{routeRef:K.id}},children:(0,o.jsx)(y,{...z})})})})};(0,h.h)(C,"core.plugin",R),(0,h.h)(C,"core.extensionName",w);for(const[z,V]of Object.entries(D))(0,h.h)(C,z,V);return C.displayName=`Extension(${B})`,C}}}},82442:function(Y,T,t){"use strict";t.d(T,{O:function(){return c}});var o=t(18990),i=t(14041),d=t(19402),O=t(72427),m=t(63636);function v(A,x,P,u){return i.Children.toArray(A).flatMap(b=>{if(!(0,i.isValidElement)(b))return[];if(b.type===i.Fragment)return v(b.props.children,x,P,u);if((0,d.E)(b,"core.featureFlagged")){const g=b.props;return("with"in g?x.isActive(g.with):!x.isActive(g.without))?v(b.props.children,x,P,u):[]}if(P===void 0||P(b))return[b];if(u)throw new Error(u);return v(b.props.children,x,P,u)})}class h{selectByComponentData(x){const P=v(this.node,this.featureFlagsApi,u=>(0,d.E)(u,x.key)!==void 0,x.withStrictError);return new h(P,this.featureFlagsApi)}findComponentData(x){return v(this.node,this.featureFlagsApi,u=>(0,d.E)(u,x.key)!==void 0).map(u=>(0,d.E)(u,x.key)).filter(u=>u!==void 0)}getElements(){return v(this.node,this.featureFlagsApi)}constructor(x,P){(0,o._)(this,"node",void 0),(0,o._)(this,"featureFlagsApi",void 0),this.node=x,this.featureFlagsApi=P}}function c(A,x,P=[]){const u=(0,O.gf)(m.B),b=new h(A,u);return(0,i.useMemo)(()=>x(b),[A,...P])}},9803:function(Y,T,t){"use strict";t.d(T,{i:function(){return d}});var o=t(18990);class i{getId(){return this.config.id}getApis(){var m;return(m=this.config.apis)!==null&&m!==void 0?m:[]}getFeatureFlags(){var m,v;return(v=(m=this.config.featureFlags)===null||m===void 0?void 0:m.slice())!==null&&v!==void 0?v:[]}get routes(){var m;return(m=this.config.routes)!==null&&m!==void 0?m:{}}get externalRoutes(){var m;return(m=this.config.externalRoutes)!==null&&m!==void 0?m:{}}provide(m){return m.expose(this)}toString(){return`plugin{${this.config.id}}`}constructor(m){(0,o._)(this,"config",void 0),this.config=m}}function d(O){return new i(O)}},34569:function(Y,T,t){"use strict";t.d(T,{H:function(){return v}});var o=t(18990),i=t(59598);let d=i.b,O=d;class m{get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}constructor(c,A){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,O,void 0),this.id=c,this.params=A,this[d]="absolute"}}function v(h){var c;return new m(h.id,(c=h.params)!==null&&c!==void 0?c:[])}},59598:function(Y,T,t){"use strict";t.d(T,{b:function(){return i}});var o=t(63544);const i=(0,o.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:function(Y,T,t){"use strict";t.d(T,{S:function(){return O}});var o=t(14041),i=t(18690),d=t(43836);function O(m){const{pathname:v}=(0,i.zy)(),h=(0,d.qO)("routing-context");if(!h)throw new Error("Routing context is not available");const c=h.atVersion(1),A=(0,o.useMemo)(()=>c&&c.resolve(m,{pathname:v}),[c,m,v]);if(!h)throw new Error("useRouteRef used outside of routing context");if(!c)throw new Error("RoutingContext v1 not available");const x="optional"in m&&m.optional;if(!A&&!x)throw new Error(`No path for ${m}`);return A}},93184:function(Y,T,t){"use strict";t.d(T,{h:function(){return P},v:function(){return u}});var o=t(96324),i=t(87081),d=t(33284),O=t(18990),m=t(99833);function v(b){const g=new Array;function D(w,y){for(const[B,R]of Object.entries(w))typeof R=="string"?g.push([y+B,R]):D(R,`${y}${B}.`)}return D(b,""),Object.fromEntries(g)}var h=new WeakMap,c=new WeakMap,A=new WeakMap;class x{get id(){return(0,o._)(this,h)}get T(){throw new Error("Not implemented")}getDefaultMessages(){return(0,o._)(this,c)}setDefaultResource(g){(0,d._)(this,A,g)}getDefaultResource(){return(0,o._)(this,A)}toString(){return`TranslationRef{id=${this.id}}`}constructor(g){(0,i._)(this,h,{writable:!0,value:void 0}),(0,i._)(this,c,{writable:!0,value:void 0}),(0,i._)(this,A,{writable:!0,value:void 0}),(0,O._)(this,"$$type","@backstage/TranslationRef"),(0,O._)(this,"version","v1"),(0,d._)(this,h,g.id),(0,d._)(this,c,v(g.messages))}}function P(b){const g=new x(b);return b.translations&&g.setDefaultResource((0,m.o)({ref:g,translations:b.translations})),g}function u(b){const g=b;if(g.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${g.$$type}'`);if(g.version!=="v1")throw new Error(`Invalid translation ref, bad version '${g.version}'`);return g}},99833:function(Y,T,t){"use strict";t.d(T,{Y:function(){return o},o:function(){return i}});function o(d){const O=d;if(O.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${O.$$type}'`);if(O.version!=="v1")throw new Error(`Invalid translation resource, bad version '${O.version}'`);return O}function i(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([O,m])=>({language:O,loader:()=>m().then(v=>{const h=v.default;return{messages:(h==null?void 0:h.$$type)==="@backstage/TranslationMessages"?h.messages:h}})}))}}},87849:function(Y,T,t){"use strict";t.d(T,{i:function(){return v}});var o=t(14041),i=t(72427),d=t(39837),O=t(56038);const m=new WeakSet,v=h=>{const c=(0,i.gf)(d.m),A=(0,i.gf)(O.J),[x,P]=(0,o.useState)(()=>A.getTranslation(h)),u=(0,o.useMemo)(()=>A.translation$(h),[A,h]),b=(0,o.useCallback)(D=>{if(!m.has(h)){const w=`Failed to load translation resource '${h.id}'; caused by ${D}`;console.error(w),c.post(new Error(w)),m.add(h)}},[c,h]);(0,o.useEffect)(()=>{const D=u.subscribe({next(w){w.ready&&P(w)},error(w){b(w)}});return()=>{D.unsubscribe()}},[u,b]);const g=(0,o.useRef)(!0);if((0,o.useEffect)(()=>{g.current?g.current=!1:P(A.getTranslation(h))},[A,h]),!x.ready)throw new Promise(D=>{const w=u.subscribe({next(y){y.ready&&(w.unsubscribe(),D())},error(y){w.unsubscribe(),b(y),D()}})});return{t:x.t}}},70835:function(Y,T,t){"use strict";t.d(T,{o:function(){return O}});var o=t(18990),i=t(59750);async function d(m){try{const h=await m.text();if(h){var v;if(!((v=m.headers.get("content-type"))===null||v===void 0)&&v.startsWith("application/json"))try{const c=JSON.parse(h);if(c.error&&c.response)return c}catch{}return{error:{name:"Error",message:`Request failed with status ${m.status} ${m.statusText}, ${h}`},response:{statusCode:m.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${m.status} ${m.statusText}`},response:{statusCode:m.status}}}class O extends Error{static async fromResponse(v){const h=await d(v),c=h.response.statusCode||v.status,A=v.statusText,x=`Request failed with ${c} ${A}`,P=(0,i.cy)(h.error);return new O({message:x,response:v,data:h,cause:P,statusCode:c,statusText:A})}constructor(v){super(v.message),(0,o._)(this,"response",void 0),(0,o._)(this,"body",void 0),(0,o._)(this,"cause",void 0),(0,o._)(this,"statusCode",void 0),(0,o._)(this,"statusText",void 0),this.name="ResponseError",this.response=v.response,this.body=v.data,this.cause=v.cause,this.statusCode=v.statusCode,this.statusText=v.statusText}}},93007:function(Y,T,t){"use strict";t.d(T,{b:function(){return o}});function o(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const O=d;return!(typeof O.name!="string"||O.name===""||typeof O.message!="string")}function i(d){if(typeof d!="object"||d===null||Array.isArray(d))throw new Error(`Encountered invalid error, not an object, got '${d}'`);const O=d;if(typeof O.name!="string"||O.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof O.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},97142:function(Y,T,t){"use strict";t.d(T,{m_:function(){return c},EH:function(){return P}});var o=t(18990),i=t(93007),d=t(59750);class O extends Error{constructor(D,w){var y,B;let R=D;if(w!==void 0){const C=(0,d.M5)(w);R?R+=`; caused by ${C}`:R=`caused by ${C}`}super(R),(0,o._)(this,"cause",void 0),(y=(B=Error).captureStackTrace)===null||y===void 0||y.call(B,this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,i.b)(w)?w:void 0}}class m extends O{constructor(...D){super(...D),(0,o._)(this,"name","InputError")}}class v extends O{constructor(...D){super(...D),(0,o._)(this,"name","AuthenticationError")}}class h extends O{constructor(...D){super(...D),(0,o._)(this,"name","NotAllowedError")}}class c extends O{constructor(...D){super(...D),(0,o._)(this,"name","NotFoundError")}}class A extends O{constructor(...D){super(...D),(0,o._)(this,"name","ConflictError")}}class x extends O{constructor(...D){super(...D),(0,o._)(this,"name","NotModifiedError")}}class P extends O{constructor(...D){super(...D),(0,o._)(this,"name","NotImplementedError")}}class u extends null{}class b extends O{constructor(D,w){super(D,w),this.name=(0,i.b)(w)?w.name:"Error"}}},59750:function(Y,T,t){"use strict";t.d(T,{M5:function(){return v},cy:function(){return m}});var o=t(69655),i=t.n(o),d=t(93007);function O(h,c){const x={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(h)};return c!=null&&c.includeStack||delete x.stack,x}function m(h){const c=(0,o.deserializeError)(h);return h.stack||(c.stack=void 0),c}function v(h){if((0,d.b)(h)){const c=String(h);return c!=="[object Object]"?c:`${h.name}: ${h.message}`}return`unknown error '${h}'`}},41158:function(Y,T,t){"use strict";t.d(T,{L:function(){return De},Y:function(){return $e}});var o=t(18990),i=t(59869);const d="amazonaws.com";function O(L){var f;const j=L.getOptionalString("endpoint");var U;const dt=(U=L.getOptionalBoolean("s3ForcePathStyle"))!==null&&U!==void 0?U:!1;let et,Mt;if(j){try{const $t=new URL(j);et=$t.host,Mt=$t.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${j}' is not a valid URL`)}if(Mt!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${j}'`)}else et=d;const qt=L.getOptionalString("accessKeyId"),re=(f=L.getOptionalString("secretAccessKey"))===null||f===void 0?void 0:f.trim(),ve=L.getOptionalString("roleArn"),me=L.getOptionalString("externalId");return{host:et,endpoint:j,s3ForcePathStyle:dt,accessKeyId:qt,secretAccessKey:re,roleArn:ve,externalId:me}}function m(L){const f=L.map(O);return f.some(j=>j.host===d)||f.push({host:d}),f}class v{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){return(0,i.ku)(f)}resolveEditUrl(f){return f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(v,"factory",({config:L})=>{var f;const j=m((f=L.getOptionalConfigArray("integrations.awsS3"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new v(U)),U=>U.config.host)});const h="console.aws.amazon.com";function c(L){var f;const j=L.getOptionalString("accessKeyId"),U=(f=L.getOptionalString("secretAccessKey"))===null||f===void 0?void 0:f.trim(),dt=L.getOptionalString("roleArn"),et=L.getOptionalString("externalId");return{host:h,accessKeyId:j,secretAccessKey:U,roleArn:dt,externalId:et}}function A(L){const f=L.map(c);return f.some(j=>j.host===h)||f.push({host:h}),f}class x{get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}resolveUrl(f){return(0,i.ku)(f)}resolveEditUrl(f){const U=new URL(f).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!U)throw new Error("");const[,dt]=U;return P(f,dt,"edit")}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(x,"factory",({config:L})=>{var f;const j=A((f=L.getOptionalConfigArray("integrations.awsCodeCommit"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new x(U)),U=>U.config.host)});function P(L,f,j){const U=j==="edit"?"files/edit":j;return L.replace(new RegExp(`/codesuite/codecommit/repositories/${f}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${f}/${U}/`)}var u=t(96324),b=t(87081),g=t(33284);const D="GB";var w=new WeakMap,y=new WeakMap,B=new WeakMap,R=new WeakMap,C=new WeakMap,z=new WeakMap,V=new WeakMap;class tt{static fromRepoUrl(f){const j=new URL(f);let U,dt,et;const Mt=j.pathname.split("/").map($t=>decodeURIComponent($t));if(Mt[2]==="_git"?(U=Mt[1],dt=et=Mt[3]):Mt[3]==="_git"?(U=Mt[1],dt=Mt[2],et=Mt[4]):Mt[4]==="_git"&&(U=`${Mt[1]}/${Mt[2]}`,dt=Mt[3],et=Mt[5]),!U||!dt||!et)throw new Error("Azure URL must point to a git repository");var qt;const re=(qt=j.searchParams.get("path"))!==null&&qt!==void 0?qt:void 0;let ve;const me=j.searchParams.get("version");if(me){if(me.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");ve=me.slice(2)}return new tt(j.origin,U,dt,et,re,ve)}toRepoUrl(){let f;return(0,u._)(this,B)===(0,u._)(this,R)?f=(0,u._)(this,V).call(this,(0,u._)(this,y),"_git",(0,u._)(this,R)):f=(0,u._)(this,V).call(this,(0,u._)(this,y),(0,u._)(this,B),"_git",(0,u._)(this,R)),(0,u._)(this,C)&&f.searchParams.set("path",(0,u._)(this,C)),(0,u._)(this,z)&&f.searchParams.set("version",D+(0,u._)(this,z)),f.toString()}toFileUrl(){if(!(0,u._)(this,C))throw new Error("Azure URL must point to a specific path to be able to download a file");const f=(0,u._)(this,V).call(this,(0,u._)(this,y),(0,u._)(this,B),"_apis","git","repositories",(0,u._)(this,R),"items");return f.searchParams.set("api-version","6.0"),f.searchParams.set("path",(0,u._)(this,C)),(0,u._)(this,z)&&f.searchParams.set("version",(0,u._)(this,z)),f.toString()}toArchiveUrl(){const f=(0,u._)(this,V).call(this,(0,u._)(this,y),(0,u._)(this,B),"_apis","git","repositories",(0,u._)(this,R),"items");return f.searchParams.set("recursionLevel","full"),f.searchParams.set("download","true"),f.searchParams.set("api-version","6.0"),(0,u._)(this,C)&&f.searchParams.set("scopePath",(0,u._)(this,C)),(0,u._)(this,z)&&f.searchParams.set("version",(0,u._)(this,z)),f.toString()}toCommitsUrl(){const f=(0,u._)(this,V).call(this,(0,u._)(this,y),(0,u._)(this,B),"_apis","git","repositories",(0,u._)(this,R),"commits");return f.searchParams.set("api-version","6.0"),(0,u._)(this,z)&&f.searchParams.set("searchCriteria.itemVersion.version",(0,u._)(this,z)),f.toString()}getOwner(){return(0,u._)(this,y)}getProject(){return(0,u._)(this,B)}getRepo(){return(0,u._)(this,R)}getPath(){return(0,u._)(this,C)}getRef(){return(0,u._)(this,z)}constructor(f,j,U,dt,et,Mt){(0,b._)(this,w,{writable:!0,value:void 0}),(0,b._)(this,y,{writable:!0,value:void 0}),(0,b._)(this,B,{writable:!0,value:void 0}),(0,b._)(this,R,{writable:!0,value:void 0}),(0,b._)(this,C,{writable:!0,value:void 0}),(0,b._)(this,z,{writable:!0,value:void 0}),(0,b._)(this,V,{writable:!0,value:(...qt)=>{const re=new URL((0,u._)(this,w));return re.pathname=qt.map(ve=>encodeURIComponent(ve)).join("/"),re}}),(0,g._)(this,w,f),(0,g._)(this,y,j),(0,g._)(this,B,U),(0,g._)(this,R,dt),(0,g._)(this,C,et),(0,g._)(this,z,Mt)}}const K="dev.azure.com",W=["clientId","clientSecret","tenantId","personalAccessToken"],_=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function H(L){for(const f of _.entries()){const[j,U]=f,dt=W.filter(et=>!U.includes(et));if(U.every(et=>L[et]!==void 0)&&dt.every(et=>L[et]===void 0))return{kind:j,organizations:L.organizations,...U.reduce((et,Mt)=>(et[Mt]=L[Mt],et),{})}}throw new Error("is not a valid credential")}function J(L){var f,j,U;const dt=(U=L.getOptionalString("host"))!==null&&U!==void 0?U:K;let et=(f=L.getOptionalConfigArray("credentials"))===null||f===void 0?void 0:f.map(zt=>{var Bt,Ce;return{organizations:zt.getOptionalStringArray("organizations"),personalAccessToken:(Bt=zt.getOptionalString("personalAccessToken"))===null||Bt===void 0?void 0:Bt.trim(),tenantId:zt.getOptionalString("tenantId"),clientId:zt.getOptionalString("clientId"),clientSecret:(Ce=zt.getOptionalString("clientSecret"))===null||Ce===void 0?void 0:Ce.trim()}});const Mt=(j=L.getOptionalString("token"))===null||j===void 0?void 0:j.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(Mt!==void 0){const zt=[{personalAccessToken:Mt}];var qt;et=(qt=et==null?void 0:et.concat(zt))!==null&&qt!==void 0?qt:zt}if(L.getOptional("credential")!==void 0){var re,ve;const zt=[{organizations:L.getOptionalStringArray("credential.organizations"),token:(re=L.getOptionalString("credential.token"))===null||re===void 0?void 0:re.trim(),tenantId:L.getOptionalString("credential.tenantId"),clientId:L.getOptionalString("credential.clientId"),clientSecret:(ve=L.getOptionalString("credential.clientSecret"))===null||ve===void 0?void 0:ve.trim()}];var me;et=(me=et==null?void 0:et.concat(zt))!==null&&me!==void 0?me:zt}if(!(0,i.HO)(dt))throw new Error(`Invalid Azure integration config, '${dt}' is not a valid host`);let $t;if(et!==void 0){const zt=et==null?void 0:et.reduce((Bt,Ce,Me)=>{let oe;try{H(Ce)}catch(Ge){oe=Ge.message}return oe!==void 0&&Bt.push(`credential at position ${Me+1} ${oe}`),Bt},Array.of()).concat(Object.entries(et.filter(Bt=>Bt.organizations!==void 0&&Bt.organizations.length>0).reduce((Bt,Ce,Me)=>{var oe;return(oe=Ce.organizations)===null||oe===void 0||oe.forEach(Ge=>{Bt[Ge]||(Bt[Ge]=[]),Bt[Ge].push(Me+1)}),Bt},{})).filter(([Bt,Ce])=>Ce.length>1).reduce((Bt,[Ce,Me])=>(Bt.push(`organization ${Ce} is specified multiple times in credentials at positions ${Me.slice(0,Me.length-1).join(", ")} and ${Me[Me.length-1]}`),Bt),Array.of()));if((zt==null?void 0:zt.length)>0)throw new Error(`Invalid Azure integration config for ${dt}: ${zt.join("; ")}`);if($t=et.map(Bt=>H(Bt)),$t.some(Bt=>Bt.kind!=="PersonalAccessToken")&&dt!==K)throw new Error(`Invalid Azure integration config for ${dt}, only personal access tokens can be used with hosts other than ${K}`);if($t.filter(Bt=>Bt.organizations===void 0||Bt.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${dt}, you cannot specify multiple credentials without organizations`)}return{host:dt,credentials:$t}}function q(L){const f=L.map(J);return f.some(j=>j.host===K)||f.push({host:K}),f}class mt{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const{url:j,base:U}=f;if((0,i.AY)(j))return j;try{const et=tt.fromRepoUrl(U),Mt=new URL(U);var dt;const qt=new URL(`https://a.com${(dt=et.getPath())!==null&&dt!==void 0?dt:""}`),re=new URL(j,qt).pathname;return Mt.searchParams.set("path",re),f.lineNumber&&(Mt.searchParams.set("line",String(f.lineNumber)),Mt.searchParams.set("lineEnd",String(f.lineNumber+1)),Mt.searchParams.set("lineStartColumn","1"),Mt.searchParams.set("lineEndColumn","1")),Mt.toString()}catch{return new URL(j,U).toString()}}resolveEditUrl(f){return f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(mt,"factory",({config:L})=>{var f;const j=q((f=L.getOptionalConfigArray("integrations.azure"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new mt(U)),U=>U.config.host)});var it=t(52536),Ot=t.n(it);const ct="bitbucket.org",gt="https://api.bitbucket.org/2.0";function lt(L){var f;const j=ct,U=gt,dt=L.getString("username"),et=(f=L.getString("appPassword"))===null||f===void 0?void 0:f.trim();return{host:j,apiBaseUrl:U,username:dt,appPassword:et}}function rt(L){const f=L.map(lt);return f.length===0&&f.push({host:ct,apiBaseUrl:gt}),f}class vt{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const j=(0,i.ku)(f);if(f.lineNumber){const U=new URL(j);return U.hash=`lines-${f.lineNumber}`,U.toString()}return j}resolveEditUrl(f){const j=Ot()(f),U=new URL(f);return U.searchParams.set("mode","edit"),U.searchParams.set("at",j.ref),U.toString()}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(vt,"factory",({config:L})=>{var f;const j=rt((f=L.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new vt(U)),U=>U.config.host)});var yt=t(45250);const Pt="bitbucket.org",pt="https://api.bitbucket.org/2.0";function st(L){var f,j,U;const dt=(U=L.getOptionalString("host"))!==null&&U!==void 0?U:Pt;let et=L.getOptionalString("apiBaseUrl");const Mt=(f=L.getOptionalString("token"))===null||f===void 0?void 0:f.trim(),qt=L.getOptionalString("username"),re=(j=L.getOptionalString("appPassword"))===null||j===void 0?void 0:j.trim();if(!(0,i.HO)(dt))throw new Error(`Invalid Bitbucket integration config, '${dt}' is not a valid host`);return et?et=(0,yt.trimEnd)(et,"/"):dt===Pt?et=pt:et=`https://${dt}/rest/api/1.0`,{host:dt,apiBaseUrl:et,token:Mt,username:qt,appPassword:re}}function ft(L){const f=L.map(st);return f.some(j=>j.host===Pt)||f.push({host:Pt,apiBaseUrl:pt}),f}class ht{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const j=(0,i.ku)(f);if(!f.lineNumber)return j;const U=new URL(j);return this.integrationConfig.host==="bitbucket.org"?U.hash=`lines-${f.lineNumber}`:U.hash=`${f.lineNumber}`,U.toString()}resolveEditUrl(f){const j=Ot()(f),U=new URL(f);return U.searchParams.set("mode","edit"),U.searchParams.set("spa","0"),U.searchParams.set("at",j.ref),U.toString()}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(ht,"factory",({config:L})=>{var f,j,U;const dt=ft((U=L.getOptionalConfigArray("integrations.bitbucket"))!==null&&U!==void 0?U:[...(f=L.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&f!==void 0?f:[],...(j=L.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&j!==void 0?j:[]]);return(0,i.oS)(dt.map(et=>new ht(et)),et=>et.config.host)});function wt(L){var f;const j=L.getString("host");let U=L.getOptionalString("apiBaseUrl");const dt=(f=L.getOptionalString("token"))===null||f===void 0?void 0:f.trim(),et=L.getOptionalString("username"),Mt=L.getOptionalString("password");if(!(0,i.HO)(j))throw new Error(`Invalid Bitbucket Server integration config, '${j}' is not a valid host`);return U?U=(0,yt.trimEnd)(U,"/"):U=`https://${j}/rest/api/1.0`,{host:j,apiBaseUrl:U,token:dt,username:et,password:Mt}}function At(L){return L.map(wt)}class N{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const j=(0,i.ku)(f);if(f.lineNumber){const U=new URL(j);return U.hash=f.lineNumber.toString(),U.toString()}return j}resolveEditUrl(f){return f.includes("?")?f.substring(0,f.indexOf("?")):f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(N,"factory",({config:L})=>{var f;const j=At((f=L.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new N(U)),U=>U.config.host)});function G(L){var f;const j=L.getString("host");let U=L.getOptionalString("baseUrl"),dt=L.getOptionalString("cloneUrl"),et=L.getOptionalString("gitilesBaseUrl");const Mt=L.getOptionalString("username"),qt=(f=L.getOptionalString("password"))===null||f===void 0?void 0:f.trim();if((0,i.HO)(j)){if(U&&!(0,i.AY)(U))throw new Error(`Invalid Gerrit integration config, '${U}' is not a valid baseUrl`);if(dt&&!(0,i.AY)(dt))throw new Error(`Invalid Gerrit integration config, '${dt}' is not a valid cloneUrl`);if(et&&!(0,i.AY)(et))throw new Error(`Invalid Gerrit integration config, '${et}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${j}' is not a valid host`);return U?U=(0,yt.trimEnd)(U,"/"):U=`https://${j}`,et?et=(0,yt.trimEnd)(et,"/"):et=`https://${j}`,dt?dt=(0,yt.trimEnd)(dt,"/"):dt=U,{host:j,baseUrl:U,cloneUrl:dt,gitilesBaseUrl:et,username:Mt,password:qt}}function Et(L){return L.map(G)}var bt=t(1048).hp;const Ft=")]}'";function Tt(L,f){const j=new URL(L.gitilesBaseUrl),U=new URL(f),et=U.pathname.substring(U.pathname.startsWith("/a/")?2:0).replace(j.pathname,"").split("/").filter($t=>!!$t),Mt=et.indexOf("+");if(Mt<=0)throw new Error(`Unable to parse project from url: ${f}`);const qt=(0,yt.trimStart)(et.slice(0,Mt).join("/"),"/"),re=et.indexOf("heads");if(re<=0)throw new Error(`Unable to parse branch from url: ${f}`);const ve=et[re+1],me=et.slice(re+2).join("/");return{branch:ve,filePath:me===""?"/":me,project:qt}}function Dt(L,f,j,U){return`${L.gitilesBaseUrl}/${f}/+/refs/heads/${j}/${(0,yt.trimStart)(U,"/")}`}function kt(L,f,j,U){const dt=U==="/"||U===""?".tar.gz":`/${U}.tar.gz`;return`${Wt(L)}/${f}/+archive/refs/heads/${j}${dt}`}function St(L){return L.password?"/a/":"/"}function Wt(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(St(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 Jt(L,f){const{branch:j,project:U}=Tt(L,f);return`${L.baseUrl}${St(L)}projects/${encodeURIComponent(U)}/branches/${j}`}function ue(L,f){const{project:j}=Tt(L,f);return`${L.cloneUrl}${St(L)}${j}`}function ae(L,f){const{branch:j,filePath:U,project:dt}=Tt(L,f);return`${L.baseUrl}${St(L)}projects/${encodeURIComponent(dt)}/branches/${j}/files/${encodeURIComponent(U)}/content`}function le(L){return`${L.baseUrl}${St(L)}projects/`}function Ht(L){const f={};if(!L.password)return f;const j=bt.from(`${L.username}:${L.password}`,"utf8");return f.Authorization=`Basic ${j.toString("base64")}`,{headers:f}}async function Xt(L){const f=await L.text();if(f.startsWith(Ft))try{return JSON.parse(f.slice(Ft.length))}catch(j){throw new Error(`Invalid response from Gerrit: ${f.slice(0,10)} - ${j}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${f.slice(0,10)}`)}class ge{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const{url:j,base:U,lineNumber:dt}=f;let et;if(j.startsWith("/")){const{branch:Mt,project:qt}=Tt(this.config,U);return Dt(this.config,qt,Mt,j)}return j?et=new URL(j,U):et=new URL(U),dt&&(et.hash=dt.toString()),et.toString()}resolveEditUrl(f){return f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(ge,"factory",({config:L})=>{var f;const j=Et((f=L.getOptionalConfigArray("integrations.gerrit"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new ge(U)),U=>U.config.host)});var Ke=t(36021);const Fe="gitlab.com",_e="https://gitlab.com/api/v4";function we(L){var f;const j=L.getString("host");let U=L.getOptionalString("apiBaseUrl");const dt=(f=L.getOptionalString("token"))===null||f===void 0?void 0:f.trim();let et=L.getOptionalString("baseUrl");if(U?U=(0,yt.trimEnd)(U,"/"):j===Fe&&(U=_e),et?et=(0,yt.trimEnd)(et,"/"):et=`https://${j}`,(0,i.HO)(j)){if(!U||!(0,i.AY)(U))throw new Error(`Invalid GitLab integration config, '${U}' is not a valid apiBaseUrl`);if(!(0,i.AY)(et))throw new Error(`Invalid GitLab integration config, '${et}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${j}' is not a valid host`);return{host:j,token:dt,apiBaseUrl:U,baseUrl:et}}function sn(L){const f=L.map(we);return f.some(j=>j.host===Fe)||f.push({host:Fe,apiBaseUrl:_e,baseUrl:`https://${Fe}`}),f}function Xe(L){let f="";return L.host!==Fe&&(f=new URL(L.baseUrl).pathname),trimEnd(f,"/")}class ne{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){return(0,i.ku)(f)}resolveEditUrl(f){return ze(f,"edit")}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(ne,"factory",({config:L})=>{var f;const j=sn((f=L.getOptionalConfigArray("integrations.gitlab"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new ne(U)),U=>U.config.host)});function ze(L,f){return L.replace(/\/\-\/(blob|tree|edit)\//,`/-/${f}/`)}function He(L){var f;const j=L.getString("host");let U=L.getOptionalString("baseUrl");const dt=L.getOptionalString("username"),et=(f=L.getOptionalString("password"))===null||f===void 0?void 0:f.trim();if((0,i.HO)(j)){if(U&&!(0,i.AY)(U))throw new Error(`Invalid Gitea integration config, '${U}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${j}' is not a valid host`);return U?U=(0,yt.trimEnd)(U,"/"):U=`https://${j}`,{host:j,baseUrl:U,username:dt,password:et}}var qe=t(1048).hp;function Ye(L,f){const j=he(L,f);return`${j.url}/${j.owner}/${j.name}/_edit/${j.ref}/${j.path}`}function xe(L,f){const j=he(L,f);return`${j.url}/api/v1/repos/${j.owner}/${j.name}/contents/${j.path}?ref=${j.ref}`}function an(L,f){const j=he(L,f);return`${j.url}/api/v1/repos/${j.owner}/${j.name}/archive/${j.ref}.tar.gz`}function ln(L,f){const j=he(L,f);return`${j.url}/api/v1/repos/${j.owner}/${j.name}/git/commits/${j.ref}`}function cn(L){const f={},{username:j,password:U}=L;return U?(j?f.Authorization=`basic ${qe.from(`${j}:${U}`).toString("base64")}`:f.Authorization=`token ${U}`,{headers:f}):f}function he(L,f){var j;const U=(j=L.baseUrl)!==null&&j!==void 0?j:`https://${L.host}`;try{const[dt,et,Mt,qt,re,ve,...me]=f.replace(U,"").split("/"),$t=me.join("/").replace(/^\//,"");return{url:U,owner:et,name:Mt,ref:ve,path:$t}}catch(dt){throw new Error(`Incorrect URL: ${f}, ${dt}`)}}class Ie{get type(){return"gitea"}get title(){return this.config.host}resolveUrl(f){return(0,i.ku)(f)}resolveEditUrl(f){return Ye(this.config,f)}constructor(f){(0,o._)(this,"config",void 0),this.config=f}}(0,o._)(Ie,"factory",({config:L})=>{var f;const U=((f=L.getOptionalConfigArray("integrations.gitea"))!==null&&f!==void 0?f:[]).map(dt=>He(dt));return(0,i.oS)(U.map(dt=>new Ie(dt)),dt=>dt.config.host)});class Ve{static fromConfig(f){return new Ve({awsS3:v.factory({config:f}),awsCodeCommit:x.factory({config:f}),azure:mt.factory({config:f}),bitbucket:ht.factory({config:f}),bitbucketCloud:vt.factory({config:f}),bitbucketServer:N.factory({config:f}),gerrit:ge.factory({config:f}),github:Ke.U.factory({config:f}),gitlab:ne.factory({config:f}),gitea:Ie.factory({config:f})})}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}list(){return Object.values(this.byType).flatMap(f=>f.list())}byUrl(f){let j=Object.values(this.byType).map(U=>U.byUrl(f)).filter(Boolean);if(j.length>1){const U=j.filter(dt=>!(dt instanceof ht));U.length!==0&&(j=U)}return j[0]}byHost(f){return Object.values(this.byType).map(j=>j.byHost(f)).find(Boolean)}resolveUrl(f){const j=this.byUrl(f.base);return j?j.resolveUrl(f):(0,i.ku)(f)}resolveEditUrl(f){const j=this.byUrl(f);return j?j.resolveEditUrl(f):f}constructor(f){(0,o._)(this,"byType",void 0),this.byType=f}}var Qe=t(55309);class De{static fromConfig(f){return Ve.fromConfig(f)}}const $e=(0,Qe.y)({id:"integration.scmintegrations"})},36021:function(Y,T,t){"use strict";t.d(T,{U:function(){return A},F:function(){return x}});var o=t(18990),i=t(59869),d=t(45250);const O="github.com",m="https://api.github.com",v="https://raw.githubusercontent.com";function h(P){var u,b,g;const D=(g=P.getOptionalString("host"))!==null&&g!==void 0?g:O;let w=P.getOptionalString("apiBaseUrl"),y=P.getOptionalString("rawBaseUrl");const B=(u=P.getOptionalString("token"))===null||u===void 0?void 0:u.trim(),R=(b=P.getOptionalConfigArray("apps"))===null||b===void 0?void 0:b.map(C=>({appId:C.getNumber("appId"),clientId:C.getString("clientId"),clientSecret:C.getString("clientSecret"),webhookSecret:C.getString("webhookSecret"),privateKey:C.getString("privateKey"),allowedInstallationOwners:C.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,i.HO)(D))throw new Error(`Invalid GitHub integration config, '${D}' is not a valid host`);return w?w=(0,d.trimEnd)(w,"/"):D===O&&(w=m),y?y=(0,d.trimEnd)(y,"/"):D===O&&(y=v),{host:D,apiBaseUrl:w,rawBaseUrl:y,token:B,apps:R}}function c(P){const u=P.map(h);return u.some(b=>b.host===O)||u.push({host:O,apiBaseUrl:m,rawBaseUrl:v}),u}class A{get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return x((0,i.ku)(u),"tree")}resolveEditUrl(u){return x(u,"edit")}parseRateLimitInfo(u){return{isRateLimited:u.status===429||u.status===403&&u.headers.get("x-ratelimit-remaining")==="0"}}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(A,"factory",({config:P})=>{var u;const b=c((u=P.getOptionalConfigArray("integrations.github"))!==null&&u!==void 0?u:[]);return(0,i.oS)(b.map(g=>new A(g)),g=>g.config.host)});function x(P,u){return P.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(b,g,D,w)=>`//${g}/${D}/${w}/${u}/`)}},59869:function(Y,T,t){"use strict";t.d(T,{AY:function(){return v},HO:function(){return m},ku:function(){return c},oS:function(){return h}});var o=t(52536),i=t.n(o),d=t(45250),O=t.n(d);function m(x){const P=new URL("http://example.com");return P.host=x,P.host===x}function v(x){try{return new URL(x),!0}catch{return!1}}function h(x,P){return{list(){return x},byUrl(u){try{const b=typeof u=="string"?new URL(u):u;return x.find(g=>P(g)===b.host)}catch{return}},byHost(u){return x.find(b=>P(b)===u)}}}function c(x){const{url:P,base:u,lineNumber:b}=x;try{return new URL(P),P}catch{}let g;if(P.startsWith("/")){const{href:D,filepath:w}=i()(u);g=new URL(D);const y=(0,d.trimEnd)(g.pathname.substring(0,g.pathname.length-w.length),"/");g.pathname=`${y}${P}`}else g=new URL(P,u);return g.search=new URL(u).search,b&&(g.hash=`L${b}`),g.toString()}function A(x){beforeAll(()=>x.listen({onUnhandledRequest:"error"})),afterAll(()=>x.close()),afterEach(()=>x.resetHandlers())}},85318:function(Y,T,t){"use strict";var o={};t.r(o),t.d(o,{TechDocsPlugin:function(){return v.Ju}});var i=t(31085),d=t(14041),O=t(25873),m=t(18690),v=t(39278),h=t(85920),c=t(72020),A=t(99730),x=t(64947),P=t(12173),u=t(22020),b=t(68146),g=t(73970);function D({children:r}){return(0,m.Ri)()?(0,i.jsx)(i.Fragment,{children:r}):(0,i.jsx)(m.fS,{children:r})}const w=()=>(0,i.jsx)(P.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),y=({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,i.jsx)(D,{children:(0,i.jsx)(P.M,{statusMessage:n,stack:e.stack})})},B=({error:r,resetError:e,plugin:n})=>(0,i.jsx)(u.b,{title:`Error in ${n==null?void 0:n.getId()}`,defaultExpanded:!0,error:r,children:(0,i.jsx)(x.A,{variant:"outlined",onClick:e,children:"Retry"})}),R={Progress:b.k,Router:g.Kd,NotFoundErrorPage:w,BootErrorPage:y,ErrorBoundaryFallback:B};var C=t(18990);const z="Invalid discovery URL pattern,";class V{static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),s=n.join("pluginId");let a;try{a=new URL(s)}catch{throw new Error(`${z} URL '${s}' is invalid`)}if(a.hash)throw new Error(`${z} URL must not have a hash`);if(a.search)throw new Error(`${z} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${z} URL must not end with a slash`);return new V(n)}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}constructor(e){(0,C._)(this,"parts",void 0),this.parts=e}}var tt=t(96403),K=t.n(tt);let W=Symbol.observable;class _{[W](){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,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(){(0,C._)(this,"isClosed",!1),(0,C._)(this,"terminatingError",void 0),(0,C._)(this,"observable",new(K())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}))),(0,C._)(this,"subscribers",new Set)}}let H=Symbol.observable;class J{[H](){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,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(e){(0,C._)(this,"isClosed",void 0),(0,C._)(this,"currentValue",void 0),(0,C._)(this,"terminatingError",void 0),(0,C._)(this,"observable",void 0),(0,C._)(this,"subscribers",new Set),this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(K())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}}class q{post(e){this.subject.next(e)}alert$(){return this.subject}constructor(){(0,C._)(this,"subject",new _)}}class mt{captureEvent(e){}}class it{post(e,n){return n!=null&&n.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}constructor(e,n){(0,C._)(this,"alertApi",void 0),(0,C._)(this,"errorApi",void 0),this.alertApi=e,this.errorApi=n}}class Ot{post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}constructor(){(0,C._)(this,"subject",new _)}}class ct{static forward(e,n){window.addEventListener("unhandledrejection",s=>{e.post(s.reason,n)})}}const gt=new Map;class lt{static create(e){var n;return new lt((n=e.namespace)!==null&&n!==void 0?n:"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,a]of gt.entries()){var n;!((n=e.key)===null||n===void 0)&&n.startsWith(s)&&a.handleStorageChange(e.key)}})}get(e){return this.snapshot(e).value}snapshot(e){let n,s="absent";try{const a=localStorage.getItem(this.getKeyName(e));a&&(n=JSON.parse(a,(l,S)=>(typeof S=="object"&&S!==null&&Object.freeze(S),S)),s="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:s}}forBucket(e){const n=`${this.namespace}/${e}`;return gt.has(n)||gt.set(n,new lt(n,this.errorApi)),gt.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 lt.hasSubscribed||(lt.addStorageEventListener(),lt.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!(e!=null&&e.startsWith(this.namespace)))return;const n=e==null?void 0: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 s of this.subscribers)s.next(n)}constructor(e,n){(0,C._)(this,"namespace",void 0),(0,C._)(this,"errorApi",void 0),(0,C._)(this,"subscribers",void 0),(0,C._)(this,"observable",void 0),this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(K())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}}(0,C._)(lt,"hasSubscribed",!1);function rt(r){let e=r.baseImplementation||t.g.fetch;var n;const s=[(n=r.middleware)!==null&&n!==void 0?n:[]].flat().reverse();for(const a of s)e=a.apply(e);return{fetch:e}}class vt{static create(e){var n,s;const a=yt(e),l=((n=e.header)===null||n===void 0?void 0:n.name)||"authorization",S=((s=e.header)===null||s===void 0?void 0:s.value)||(E=>`Bearer ${E}`);return new vt(e.identityApi,a,l,S)}apply(e){return async(n,s)=>{const a=new Request(n,s),{token:l}=await this.identityApi.getCredentials();return a.headers.get(this.headerName)||typeof l!="string"||!l||!this.allowUrl(a.url)?e(n,s):(a.headers.set(this.headerName,this.headerValue(l)),e(a))}}constructor(e,n,s,a){(0,C._)(this,"identityApi",void 0),(0,C._)(this,"allowUrl",void 0),(0,C._)(this,"headerName",void 0),(0,C._)(this,"headerValue",void 0),this.identityApi=e,this.allowUrl=n,this.headerName=s,this.headerValue=a}}function yt(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?Pt(r.urlPrefixAllowlist):r.config?Pt([r.config.getString("backend.baseUrl")]):()=>!1}function Pt(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(s=>n===s||n.startsWith(`${s}/`))}function pt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class st{apply(e){return async(n,s)=>{const a=new Request(n,s),l="plugin://";if(!a.url.startsWith(l))return e(n,s);const{hostname:S,pathname:E,search:M,hash:k,username:Z,password:nt}=new URL(`http://${a.url.substring(l.length)}`);let ot=await this.discoveryApi.getBaseUrl(S);if(Z||nt){const xt=new URL(ot),Lt=`${Z}${nt?`:${nt}`:""}@`;ot=`${xt.protocol}//${Lt}${xt.host}${xt.pathname}`}const ut=`${pt(ot,E)}${M}${k}`;return e(ut,typeof n=="string"||ft(n)?s:n)}}constructor(e){(0,C._)(this,"discoveryApi",void 0),this.discoveryApi=e}}function ft(r){return typeof r=="object"&&(r==null?void 0:r.constructor)===URL}class ht{static resolvePluginProtocol(e){return new st(e.discoveryApi)}static injectIdentityAuth(e){return vt.create(e)}constructor(){}}function wt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function At(r,...e){const n=new Set(r);for(const s of e)for(const a of s)n.add(a);return n}class N{request(e){return new Promise((n,s)=>{this.requests.push({scopes:e,resolve:n,reject:s}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(s=>wt(e,s.scopes)?(s.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,s)=>At(n,s.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}constructor(){(0,C._)(this,"requests",[]),(0,C._)(this,"subject",new J(this.getCurrentPending()))}}class G{createAuthRequester(e){const n=new N,s=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:a=>{const l=this.currentRequests.slice(),S=this.makeAuthRequest(a,e);S?l[s]=S:delete l[s],this.currentRequests=l,this.subject.next(l.filter(Boolean))}}),a=>n.request(a)}makeAuthRequest(e,n){const{scopes:s}=e;if(s)return{provider:n.provider,trigger:async()=>{const a=await n.onAuthRequest(s);e.resolve(a)},reject:()=>{const a=new Error("Login failed, rejected by user");a.name="RejectedError",e.reject(a)}}}authRequest$(){return this.subject}constructor(){(0,C._)(this,"subject",new J([])),(0,C._)(this,"currentRequests",[]),(0,C._)(this,"handlerCount",0)}}function Et(r){return new Promise((e,n)=>{const s=r.width||500,a=r.height||700,l=window.screen.width/2-s/2,S=window.screen.height/2-a/2,E=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${s},height=${a},top=${S},left=${l}`);let M="";if(!E||typeof E.closed=="undefined"||E.closed){const ot=new Error("Failed to open auth popup.");ot.name="PopupRejectedError",n(ot);return}const k=ot=>{if(ot.source!==E||ot.origin!==r.origin)return;const{data:ut}=ot;if(ut.type==="config_info"){M=ut.targetOrigin;return}if(ut.type!=="authorization_response")return;const xt=ut;if("error"in xt){const Lt=new Error(xt.error.message);Lt.name=xt.error.name,n(Lt)}else e(xt.response);nt()},Z=setInterval(()=>{if(E.closed){const ot=`Login failed, ${M&&M!==window.location.origin?`Incorrect app origin, expected ${M}`:"popup was closed"}`,ut=new Error(ot);ut.name="PopupClosedError",n(ut),nt()}},100);function nt(){window.removeEventListener("message",k),clearInterval(Z)}window.addEventListener("message",k)})}let bt=!1;function Ft(r){return[...r].join(" ")}class Tt{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(a=>{throw new Error(`Auth refresh request failed, ${a}`)});if(!n.ok){const a=new Error(`Auth refresh request failed, ${n.statusText}`);throw a.status=n.status,a}const s=await n.json();if(s.error){const a=new Error(s.error.message);throw s.error.name&&(a.name=s.error.name),a}return await this.sessionTransform(s)}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){var n,s,a,l,S,E,M,k;const Z=this.joinScopesFunc(e),nt=await this.buildUrl("/start",{scope:Z,origin:window.location.origin,flow:"popup"}),ot=!((s=this.popupOptions)===null||s===void 0||(n=s.size)===null||n===void 0)&&n.fullscreen?window.screen.width:((l=this.popupOptions)===null||l===void 0||(a=l.size)===null||a===void 0?void 0:a.width)||450,ut=!((E=this.popupOptions)===null||E===void 0||(S=E.size)===null||S===void 0)&&S.fullscreen?window.screen.height:((k=this.popupOptions)===null||k===void 0||(M=k.size)===null||M===void 0?void 0:M.height)||730,xt=await Et({url:nt,name:`${this.provider.title} Login`,origin:new URL(nt).origin,width:ot,height:ut});return await this.sessionTransform(xt)}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 s=await this.discoveryApi.getBaseUrl("auth"),a=this.buildQueryString({...n,env:this.environment});return`${s}/${this.provider.id}${e}${a}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([s,a])=>{if(typeof a=="string")return`${encodeURIComponent(s)}=${encodeURIComponent(a)}`;if(a)return encodeURIComponent(s)}).filter(Boolean).join("&");return n?`?${n}`:""}constructor(e){(0,C._)(this,"discoveryApi",void 0),(0,C._)(this,"environment",void 0),(0,C._)(this,"provider",void 0),(0,C._)(this,"joinScopesFunc",void 0),(0,C._)(this,"authRequester",void 0),(0,C._)(this,"sessionTransform",void 0),(0,C._)(this,"enableExperimentalRedirectFlow",void 0),(0,C._)(this,"popupOptions",void 0);const{configApi:n,discoveryApi:s,environment:a,provider:l,joinScopes:S=Ft,oauthRequestApi:E,sessionTransform:M=nt=>nt,popupOptions:k}=e;!bt&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),bt=!0);var Z;this.enableExperimentalRedirectFlow=n&&(Z=n.getOptionalBoolean("enableExperimentalRedirectFlow"))!==null&&Z!==void 0?Z:!1,this.authRequester=E.createAuthRequester({provider:l,onAuthRequest:async nt=>this.enableExperimentalRedirectFlow?this.executeRedirect(nt):this.showPopup(nt)}),this.discoveryApi=s,this.environment=a,this.provider=l,this.joinScopesFunc=S,this.sessionTransform=M,this.popupOptions=k}}function Dt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class kt{sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const s=this.options.sessionScopes(e);return Dt(s,n)}getExtendedScope(e,n){const s=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const a=this.options.sessionScopes(e);for(const l of a)s.add(l)}if(n)for(const a of n)s.add(a);return s}constructor(e){(0,C._)(this,"options",void 0),this.options=e}}var St=t(55309),Wt;(function(r){r.SignedIn="SignedIn",r.SignedOut="SignedOut"})(Wt||(Wt={}));const Jt=(0,St.y)({id:"core.auth.google"}),ue=(0,St.y)({id:"core.auth.github"}),ae=(0,St.y)({id:"core.auth.okta"}),le=(0,St.y)({id:"core.auth.gitlab"}),Ht=(0,St.y)({id:"core.auth.microsoft"}),Xt=(0,St.y)({id:"core.auth.onelogin"}),ge=(0,St.y)({id:"core.auth.bitbucket"}),Ke=(0,St.y)({id:"core.auth.bitbucket-server"}),Fe=(0,St.y)({id:"core.auth.atlassian"}),_e=(0,St.y)({id:"core.auth.vmware-cloud"});class we{setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Wt.SignedIn:Wt.SignedOut))}sessionState$(){return this.subject}constructor(){(0,C._)(this,"subject",new J(Wt.SignedOut)),(0,C._)(this,"signedIn",!1)}}class sn{async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const s=await this.collapsedSessionRefresh(e.scopes),a=this.sessionScopesFunc(this.currentSession),l=this.sessionScopesFunc(s);return Dt(l,a)&&(this.currentSession=s),s}catch(s){if(e.optional)return;throw s}}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}}constructor(e){(0,C._)(this,"connector",void 0),(0,C._)(this,"helper",void 0),(0,C._)(this,"sessionScopesFunc",void 0),(0,C._)(this,"sessionShouldRefreshFunc",void 0),(0,C._)(this,"stateTracker",new we),(0,C._)(this,"refreshPromise",void 0),(0,C._)(this,"currentSession",void 0);const{connector:n,defaultScopes:s=new Set,sessionScopes:a,sessionShouldRefresh:l}=e;this.connector=n,this.sessionScopesFunc=a,this.sessionShouldRefreshFunc=l,this.helper=new kt({sessionScopes:a,defaultScopes:s})}}const Xe={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class ne{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Xe,oauthRequestApi:S,defaultScopes:E=[],scopeTransform:M=ot=>ot,popupOptions:k}=e,Z=new Tt({configApi:n,discoveryApi:s,environment:a,provider:l,oauthRequestApi:S,sessionTransform({backstageIdentity:ot,...ut}){const xt={...ut,providerInfo:{idToken:ut.providerInfo.idToken,accessToken:ut.providerInfo.accessToken,scopes:ne.normalizeScopes(M,ut.providerInfo.scope),expiresAt:ut.providerInfo.expiresInSeconds?new Date(Date.now()+ut.providerInfo.expiresInSeconds*1e3):void 0}};if(ot){var Lt;const Nt=(Lt=ot.expiresInSeconds)!==null&&Lt!==void 0?Lt:ut.providerInfo.expiresInSeconds;xt.backstageIdentity={token:ot.token,identity:ot.identity,expiresAt:Nt?new Date(Date.now()+Nt*1e3):void 0}}return xt},popupOptions:k}),nt=new sn({connector:Z,defaultScopes:new Set(E),sessionScopes:ot=>ot.providerInfo.scopes,sessionShouldRefresh:ot=>{var ut,xt;let Lt=1/0;return!((ut=ot.providerInfo)===null||ut===void 0)&&ut.expiresAt&&(Lt=Math.min(Lt,(ot.providerInfo.expiresAt.getTime()-Date.now())/1e3)),!((xt=ot.backstageIdentity)===null||xt===void 0)&&xt.expiresAt&&(Lt=Math.min(Lt,(ot.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),Lt<60*5}});return new ne({sessionManager:nt,scopeTransform:M})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const s=ne.normalizeScopes(this.scopeTransform,e),a=await this.sessionManager.getSession({...n,scopes:s});var l;return(l=a==null?void 0:a.providerInfo.accessToken)!==null&&l!==void 0?l:""}async getIdToken(e={}){const n=await this.sessionManager.getSession({...e,scopes:new Set(["openid"])});var s;return(s=n==null?void 0:n.providerInfo.idToken)!==null&&s!==void 0?s:""}async getBackstageIdentity(e={}){const n=await this.sessionManager.getSession(e);return n==null?void 0:n.backstageIdentity}async getProfile(e={}){const n=await this.sessionManager.getSession(e);return n==null?void 0:n.profile}static normalizeScopes(e,n){if(!n)return new Set;const s=Array.isArray(n)?n:n.split(/[\s|,]/).filter(Boolean);return new Set(e(s))}constructor(e){(0,C._)(this,"sessionManager",void 0),(0,C._)(this,"scopeTransform",void 0),this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}}const ze={id:"google",title:"Google",icon:()=>null},He="https://www.googleapis.com/auth/";class qe{static create(e){const{configApi:n,discoveryApi:s,oauthRequestApi:a,environment:l="development",provider:S=ze,defaultScopes:E=["openid",`${He}userinfo.email`,`${He}userinfo.profile`]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:S,environment:l,defaultScopes:E,scopeTransform(M){return M.map(k=>k==="openid"?k:k==="profile"||k==="email"?`${He}userinfo.${k}`:k.startsWith(He)?k:`${He}${k}`)}})}}const Ye={id:"microsoft",title:"Microsoft",icon:()=>null};class xe{static create(e){return new xe(e)}microsoftGraph(){return this.oauth2[xe.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(xe.resourceForScope).filter(l=>l!=="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.`));var s;const a=(s=n[0])!==null&&s!==void 0?s:xe.MicrosoftGraphID;return Promise.resolve(a)}static resourceForScope(e){var n;const s=(n=e.match(RegExp("^(?<resourceURI>.*)\\/(?<scp>[^\\/]*)$")))===null||n===void 0?void 0:n.groups;if(s){const{resourceURI:a}=s;return a.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return xe.MicrosoftGraphID}}async getAccessToken(e,n){const s=e===void 0?xe.MicrosoftGraphID:await xe.resourceForScopes(Array.isArray(e)?e.join(" "):e);return s in this.oauth2||(this.oauth2[s]=ne.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[s].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$()}constructor(e){(0,C._)(this,"oauth2",void 0),(0,C._)(this,"configApi",void 0),(0,C._)(this,"environment",void 0),(0,C._)(this,"provider",void 0),(0,C._)(this,"oauthRequestApi",void 0),(0,C._)(this,"discoveryApi",void 0),(0,C._)(this,"scopeTransform",void 0);const{configApi:n,environment:s="development",provider:a=Ye,oauthRequestApi:l,discoveryApi:S,defaultScopes:E=["openid","offline_access","profile","email","User.Read"],scopeTransform:M=k=>k.concat("offline_access")}=e;this.configApi=n,this.environment=s,this.provider=a,this.oauthRequestApi=l,this.discoveryApi=S,this.scopeTransform=M,this.oauth2={[xe.MicrosoftGraphID]:ne.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:E})}}}(0,C._)(xe,"MicrosoftGraphID","00000003-0000-0000-c000-000000000000");const an={id:"github",title:"GitHub",icon:()=>null};class ln{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=an,oauthRequestApi:S,defaultScopes:E=["read:user"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:E})}}const cn={id:"okta",title:"Okta",icon:()=>null},he=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Ie="okta.";class Ve{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=cn,oauthRequestApi:S,defaultScopes:E=["openid","email","profile","offline_access"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:E,scopeTransform(M){return M.map(k=>he.has(k)||k.startsWith(Ie)?k:`${Ie}${k}`)}})}}const Qe={id:"gitlab",title:"GitLab",icon:()=>null};class De{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Qe,oauthRequestApi:S,defaultScopes:E=["read_user"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:E})}}const $e={id:"onelogin",title:"onelogin",icon:()=>null},L=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="onelogin.";class j{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=$e,oauthRequestApi:S}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(E){return E.map(M=>L.has(M)||M.startsWith(f)?M:`${f}${M}`)}})}}const U={id:"bitbucket",title:"Bitbucket",icon:()=>null};class dt{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=U,oauthRequestApi:S,defaultScopes:E=["account"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:E})}}const et={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class Mt{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=et,oauthRequestApi:S,defaultScopes:E=["PROJECT_ADMIN"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:E})}}const qt={id:"atlassian",title:"Atlassian",icon:()=>null};class re{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=qt,oauthRequestApi:S}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a})}}const ve={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class me{static create(e){const{configApi:n,discoveryApi:s,oauthRequestApi:a,environment:l="development",provider:S=ve,defaultScopes:E=["openid"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:S,environment:l,defaultScopes:E})}}var $t=t(12935),zt=t(57405),Bt=t(65461),Ce=t(36017),Me=t(99303),oe=t(39837);const Ge=(0,St.y)({id:"core.storage"});var On=t(70795),dn=t(16009);const Le=(0,St.y)({id:"core.oauthrequest"});var wo=t(96824),tn=t(70835),To=t(10288),Gn=t.n(To),Ro=t(52964),Qt=t(46195),en=t(54241);const pn=Qt.z.lazy(()=>Qt.z.object({rule:Qt.z.string(),resourceType:Qt.z.string(),params:Qt.z.record(Qt.z.any()).optional()}).or(Qt.z.object({anyOf:Qt.z.array(pn).nonempty()})).or(Qt.z.object({allOf:Qt.z.array(pn).nonempty()})).or(Qt.z.object({not:pn}))),_n=Qt.z.object({result:Qt.z.literal(en.b.ALLOW).or(Qt.z.literal(en.b.DENY))}),Io=Qt.z.union([Qt.z.object({result:Qt.z.literal(en.b.ALLOW).or(Qt.z.literal(en.b.DENY))}),Qt.z.object({result:Qt.z.literal(en.b.CONDITIONAL),pluginId:Qt.z.string(),resourceType:Qt.z.string(),conditions:pn})]),Do=(r,e)=>Qt.z.object({items:Qt.z.array(Qt.z.intersection(Qt.z.object({id:Qt.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:s})=>e.has(s)),{message:"Items in response do not match request"})});class Mo{async authorize(e,n){return this.makeRequest(e,_n,n)}async authorizeConditional(e,n){return this.makeRequest(e,Io,n)}async makeRequest(e,n,s){if(!this.enabled)return e.map(Z=>({result:en.b.ALLOW}));const a={items:e.map(Z=>({id:Ro.A(),...Z}))},l=await this.discovery.getBaseUrl("permission"),S=await Gn()(`${l}/authorize`,{method:"POST",body:JSON.stringify(a),headers:{...this.getAuthorizationHeader(s==null?void 0:s.token),"content-type":"application/json"}});if(!S.ok)throw await tn.o.fromResponse(S);const E=await S.json(),k=Do(n,new Set(a.items.map(({id:Z})=>Z))).parse(E).items.reduce((Z,nt)=>(Z[nt.id]=nt,Z),{});return a.items.map(Z=>k[Z.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}constructor(e){(0,C._)(this,"enabled",void 0),(0,C._)(this,"discovery",void 0),this.discovery=e.discovery;var n;this.enabled=(n=e.config.getOptionalBoolean("permission.enabled"))!==null&&n!==void 0?n:!1}}class Pn{static create(e){const{config:n,discovery:s,identity:a}=e,l=new Mo({discovery:s,config:n});return new Pn(l,a)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}constructor(e,n){(0,C._)(this,"permissionClient",void 0),(0,C._)(this,"identityApi",void 0),this.permissionClient=e,this.identityApi=n}}const Lo=[(0,$t.b)({api:zt.I,deps:{configApi:Bt.U},factory:({configApi:r})=>V.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,$t.b)({api:Ce.k,deps:{},factory:()=>new q}),(0,$t.b)({api:Me.c,deps:{},factory:()=>new mt}),(0,$t.b)({api:oe.m,deps:{alertApi:Ce.k},factory:({alertApi:r})=>{const e=new it(r,new Ot);return ct.forward(e,{hidden:!1}),e}}),(0,$t.b)({api:Ge,deps:{errorApi:oe.m},factory:({errorApi:r})=>lt.create({errorApi:r})}),(0,$t.b)({api:On.a,deps:{configApi:Bt.U,identityApi:dn.K,discoveryApi:zt.I},factory:({configApi:r,identityApi:e,discoveryApi:n})=>rt({middleware:[ht.resolvePluginProtocol({discoveryApi:n}),ht.injectIdentityAuth({identityApi:e,config:r})]})}),(0,$t.b)({api:Le,deps:{},factory:()=>new G}),(0,$t.b)({api:Jt,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>qe.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:Ht,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>xe.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:ue,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ln.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:ae,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ve.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:le,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>De.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:Xt,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>j.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:ge,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>dt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:Ke,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Mt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,$t.b)({api:Fe,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>re.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:_e,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>me.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:wo.x,deps:{discovery:zt.I,identity:dn.K,config:Bt.U},factory:({config:r,discovery:e,identity:n})=>Pn.create({config:r,discovery:e,identity:n})})];var wn=t(14451),Tn=t(27799),Yn=t(94389),Bo=t(20947),jo=t(20473),Uo=t(45917),Fo=t(39347),$o=t(63309),No=t(82451),Wo=t(85121),Qn=t(17400),ko=t(42226),Ko=t(69550),Zn=t(52755),Jn=t(89350),zo=t(8911),Rn=t(33602),In=t(48108),Ho=t(77225),Xn=t(55700),qn=t(71865);const to={brokenImage:Tn.A,catalog:zo.A,scaffolder:Bo.A,techdocs:jo.A,search:Uo.A,chat:Fo.A,dashboard:$o.A,docs:No.A,email:Wo.A,github:ko.A,group:Rn.A,help:Ko.A,"kind:api":Qn.A,"kind:component":Jn.A,"kind:domain":wn.A,"kind:group":Rn.A,"kind:location":Zn.A,"kind:system":Yn.A,"kind:user":In.A,"kind:resource":Xn.A,"kind:template":qn.A,user:In.A,warning:Ho.A};var Vo=t(58733),Go=t(55288),_o=t(91360),Yo=t(50868),Dn=t(12285),Qo=t(65730);const Mn=(0,Go.A)({productionPrefix:"jss4-"});function eo(r){const{children:e,theme:n,noCssBaseline:s=!1}=r,a=n.getTheme("v4"),l=n.getTheme("v5");let S;s||(S=(0,i.jsx)(Vo.Ay,{}));let E=(0,i.jsxs)(i.Fragment,{children:[S,e]});return a&&(E=(0,i.jsx)(_o.Ay,{generateClassName:Mn,children:(0,i.jsx)(Yo.A,{theme:a,children:E})})),l&&(E=(0,i.jsx)(Dn.A,{injectFirst:!0,children:(0,i.jsx)(Qo.A,{theme:l,children:E})})),E}const no={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 Rt=t(96324),de=t(87081),p=t(33284),I=t(98392),F=t(75679);const $={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")`},Q={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 X(r){const{colors:e,shape:n,options:s}=r,l=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,S=`${n}, ${l}`;var E;const M=(E=s==null?void 0:s.fontColor)!==null&&E!==void 0?E:"#FFFFFF";return{colors:e,shape:n,backgroundImage:S,fontColor:M}}const at={home:X({colors:Q.teal,shape:$.wave}),documentation:X({colors:Q.pinkSea,shape:$.wave2}),tool:X({colors:Q.purpleSky,shape:$.round}),service:X({colors:Q.marineBlue,shape:$.wave}),website:X({colors:Q.veryBlue,shape:$.wave}),library:X({colors:Q.rubyRed,shape:$.wave}),other:X({colors:Q.darkGrey,shape:$.wave}),app:X({colors:Q.toastyOrange,shape:$.wave}),apis:X({colors:Q.teal,shape:$.wave2}),card:X({colors:Q.greens,shape:$.wave})},Ct=16,Ut='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',Kt="home",Yt={htmlFontSize:Ct,fontFamily:Ut,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 Vt(r){const{palette:e,htmlFontSize:n=Ct,fontFamily:s=Ut,defaultPageTheme:a=Kt,pageTheme:l=at,typography:S}=r;if(!l[a])throw new Error(`${a} is not defined in pageTheme.`);return Yt.htmlFontSize=n,Yt.fontFamily=s,{palette:e,typography:S!=null?S:Yt,page:l[a],getPageTheme:({themeId:E})=>{var M;return(M=l[E])!==null&&M!==void 0?M:l[a]}}}var It=t(67936);const ce={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},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,It.e$)(r.palette.link,.3),background:(0,It.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"}}}},ye=r=>(...e)=>{const n=e.length===0?[1]:e,s=(a,l)=>typeof a=="string"?a:l*a;return n.map(a=>{const l=s(a,r);return typeof l=="number"?`${l}px`:l}).join(" ")};function Zt(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function Gt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},s=r.spacing(1);return typeof s=="number"&&(n.spacing=ye(s)),Object.fromEntries(Object.entries(e).map(([a,l])=>typeof l=="function"?[a,l({theme:n})]:[a,l]))}return e}}const ie=/^&.Mui-([\w-]+)$/;function Ee(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const s=r[n];if(!(!s||typeof s!="object"))for(const a of Object.keys(s)){const l=a,S=l.match(ie);if(S){const[,E]=S,{[l]:M,...k}=s;M&&(e={...e,[n]:k,[E]:M})}}}return e}function jt(r,e={}){const n={},s={};for(const a of Object.keys(e)){const l=e[a];l&&("styleOverrides"in l&&(a==="MuiCssBaseline"?n[a]=Zt(r,l.styleOverrides):n[a]=Ee(Gt(r,l.styleOverrides))),"defaultProps"in l&&(s[a]=l.defaultProps))}return{overrides:n,props:s}}var _t=new WeakMap;class te{getTheme(e){return(0,Rt._)(this,_t).get(e)}constructor(e,n){(0,de._)(this,_t,{writable:!0,value:new Map}),(0,p._)(this,_t,new Map),e&&(0,Rt._)(this,_t).set("v4",e),n&&(0,Rt._)(this,_t).set("v5",n)}}function Ae(r){const e=Vt(r),n={...ce,...r.components},s=(0,F.A)({...e,components:n}),a=jt(s,n),l={...(0,I.A)(e),...a};return new te(l,s)}function Be(r){const e=adaptV4Theme(r),n=createTheme(r);return new te(n,createV5Theme(e))}const Ne={light:Ae({palette:no.light}),dark:Ae({palette:no.dark})};var fe=t(75962),je=t(87145);const se=[{id:"light",title:"Light Theme",variant:"light",icon:(0,i.jsx)(je.A,{}),Provider:({children:r})=>(0,i.jsx)(eo,{theme:Ne.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,i.jsx)(fe.A,{}),Provider:({children:r})=>(0,i.jsx)(eo,{theme:Ne.dark,children:r})}];var Ln=t(73466),Bn=t(39067),jn=t.n(Bn);class oo{get(e){for(const n of this.holders){const s=n.get(e);if(s)return s}}constructor(...e){(0,C._)(this,"holders",void 0),this.holders=e}}var nn=t(43836),gn=t(10602);const mr=(0,nn.tK)("api-context"),Zo=r=>{var e;const{apis:n,children:s}=r,a=(e=(0,d.useContext)(mr))===null||e===void 0?void 0:e.atVersion(1),l=a?new oo(n,a):n;return(0,i.jsx)(mr.Provider,{value:(0,gn.B)({1:l}),children:s})};Zo.propTypes={apis:jn().shape({get:jn().func.isRequired}).isRequired,children:jn().node};const Es=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function ro(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Jo(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Jo):Object.fromEntries(Object.entries(r).map(([e,n])=>[e,Jo(n)]))}function Un(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:Un(e);if(typeof r!="object"||Array.isArray(r))return r;const n=ro(e)?e:{},s={};for(const a of new Set([...Object.keys(r),...Object.keys(n)])){const l=Un(r[a],n[a]);l!==void 0&&(s[a]=l)}return s}function Xo(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 We={type(r,e,n,s){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${s}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class vn{static fromConfigs(e){return e.length===0?new vn(void 0):e.reduce((n,{data:s,context:a,filteredKeys:l,deprecatedKeys:S})=>{const E=new vn(s,a,n);if(E.filteredKeys=l,S)for(const{key:M,description:k}of S)console.warn(`The configuration key '${M}' of ${a} is deprecated and may be removed soon. ${k||""}`);return E},void 0)}has(e){var n;const s=this.readValue(e);if(s===null)return!1;if(s!==void 0)return!0;var a;return(a=(n=this.fallback)===null||n===void 0?void 0:n.has(e))!==null&&a!==void 0?a:!1}keys(){var e;const n=this.data?Object.keys(this.data):[];var s;const a=(s=(e=this.fallback)===null||e===void 0?void 0:e.keys())!==null&&s!==void 0?s:[];return[...new Set([...n,...a])].filter(l=>{var S;return((S=this.data)===null||S===void 0?void 0:S[l])!==null})}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(We.missing(this.fullKey(e!=null?e:""),this.context));return n}getOptional(e){var n;const s=Jo(this.readValue(e)),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptional(e);if(s!==null){if(s===void 0){if(0)var l;return Un(a)}else if(a===void 0)return Un(s);return Un(s,a)}}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(We.missing(this.fullKey(e),this.context));return n}getOptionalConfig(e){var n;const s=this.readValue(e),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptionalConfig(e);if(ro(s))return this.copy(s,e,a);if(s!==null){if(s!==void 0)throw new TypeError(We.type(this.fullKey(e),this.context,Xo(s),"object"));return a}}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(We.missing(this.fullKey(e),this.context));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,a=>{if(!Array.isArray(a))return{expected:"object-array"};for(const[l,S]of a.entries())if(!ro(S))return{expected:"object-array",value:S,key:`${e}[${l}]`};return!0});if(!n){if(0)var s;return}return n.map((a,l)=>this.copy(a,`${e}[${l}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(We.missing(this.fullKey(e),this.context));return n}getOptionalNumber(e){const n=this.readConfigValue(e,a=>typeof a=="number"||typeof a=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const s=Number(n);if(!Number.isFinite(s))throw new Error(We.convert(this.fullKey(e),this.context,"number"));return s}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(We.missing(this.fullKey(e),this.context));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,a=>typeof a=="boolean"||typeof a=="number"||typeof a=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const s=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(s))return!0;if(/^(?:n|no|false|0|off)$/i.test(s))return!1;throw new Error(We.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(We.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(We.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[s,a]of n.entries())if(typeof a!="string"||a==="")return{expected:"string-array",value:a,key:`${e}[${s}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,s){const a=new vn(e,this.context,s,this.fullKey(n));return a.filteredKeys=this.filteredKeys,a}readConfigValue(e,n){const s=this.readValue(e);if(s===void 0){var a;if(0)var l;return(a=this.fallback)===null||a===void 0?void 0:a.readConfigValue(e,n)}if(s===null)return;const S=n(s);if(S!==!0){const{key:E=e,value:M=s,expected:k}=S;throw new TypeError(We.type(this.fullKey(E),this.context,Xo(M),k))}return s}readValue(e){const n=e?e.split("."):[];for(const a of n)if(!Es.test(a))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let s=this.data;for(const[a,l]of n.entries())if(ro(s))s=s[l];else if(s!=null){const S=this.fullKey(n.slice(0,a).join("."));throw new TypeError(We.type(S,this.context,Xo(s),"object"))}return s}constructor(e,n="mock-config",s,a=""){(0,C._)(this,"data",void 0),(0,C._)(this,"context",void 0),(0,C._)(this,"fallback",void 0),(0,C._)(this,"prefix",void 0),(0,C._)(this,"filteredKeys",void 0),(0,C._)(this,"notifiedFilteredKeys",void 0),this.data=e,this.context=n,this.fallback=s,this.prefix=a,this.notifiedFilteredKeys=new Set}}const Fn="theme";class so{static createWithStorage(e){const n=new so(e);if(!window.localStorage)return n;var s;const a=(s=window.localStorage.getItem(Fn))!==null&&s!==void 0?s:void 0;return n.setActiveThemeId(a),n.activeThemeId$().subscribe(l=>{l?window.localStorage.setItem(Fn,l):window.localStorage.removeItem(Fn)}),window.addEventListener("storage",l=>{if(l.key===Fn){var S;const E=(S=localStorage.getItem(Fn))!==null&&S!==void 0?S:void 0;n.setActiveThemeId(E)}}),n}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}constructor(e){(0,C._)(this,"themes",void 0),(0,C._)(this,"activeThemeId",void 0),(0,C._)(this,"subject",void 0),this.themes=e,this.subject=new J(void 0)}}var mn=t(63636);function yr(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 As{registerFlag(e){yr(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===mn.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[s,a]of Object.entries(e.states))this.flags.set(s,a);const n=Array.from(this.flags.entries()).filter(([,s])=>s===mn.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 s=Object.entries(n).filter(([a,l])=>(yr(a),l===mn.S.Active));return new Map(s)}catch{return new Map}}constructor(){(0,C._)(this,"registeredFeatureFlags",[]),(0,C._)(this,"flags",void 0)}}const io=(0,St.y)({id:"core.apptheme"}),Er=(0,St.y)({id:"core.applanguage"});var xs=t(56038);class qo{static validateFactories(e,n){for(const s of n){const a=[s],l=new Set;for(;a.length;){const S=a.shift(),E=e.get(S);if(E)for(const M of Object.values(E.deps)){if(M.id===s.id)throw new Error(`Circular dependency of api factory for ${s}`);l.has(M)||(l.add(M),a.push(M))}}}}get(e){return this.load(e)}load(e,n=[]){const s=this.apis.get(e.id);if(s)return s;const a=this.factories.get(e);if(!a)return;if(n.includes(a.api))throw new Error(`Circular dependency of api factory for ${a.api}`);const l=this.loadDeps(e,a.deps,[...n,a.api]),S=a.factory(l);return this.apis.set(e.id,S),S}loadDeps(e,n,s){const a={};for(const l in n)if(n.hasOwnProperty(l)){const S=n[l],E=this.load(S,s);if(!E)throw new Error(`No API factory available for dependency ${S} of dependent ${e}`);a[l]=E}return a}constructor(e){(0,C._)(this,"factories",void 0),(0,C._)(this,"apis",void 0),this.factories=e,this.apis=new Map}}var tr;(function(r){r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static"})(tr||(tr={}));class Cs{register(e,n){const s=tr[e],a=this.factories.get(n.api.id);return a&&a.priority>=s?!1:(this.factories.set(n.api.id,{priority:s,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}constructor(){(0,C._)(this,"factories",new Map)}}function Ss(r){const e={};for(const s in r.collectors)r.collectors.hasOwnProperty(s)&&(e[s]=r.collectors[s]());const n=[{node:d.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:s,parent:a,contexts:l}=n.shift();d.Children.forEach(s,S=>{if(!(0,d.isValidElement)(S))return;const E={};for(const M in e)if(e.hasOwnProperty(M)){const k=e[M];E[M]=k.visit(k.accumulator,S,a,l[M])}for(const M of r.discoverers){const k=M(S);k&&n.push({node:k,parent:S,contexts:E})}})}return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,a.accumulator]))}function ao(r,e){return()=>({accumulator:r(),visit:e})}function bs(r){var e;return(e=r.props)===null||e===void 0?void 0:e.children}function Os(r){var e,n;if(!((e=r.props)===null||e===void 0)&&e.path&&(!((n=r.props)===null||n===void 0)&&n.element)){var s;return(s=r.props)===null||s===void 0?void 0:s.element}}var Pe=t(19402);const Ps=ao(()=>new Set,(r,e)=>{const n=(0,Pe.E)(e,"core.plugin");n&&r.add(n)});var $n=t(72427);const Ar=r=>{const{children:e}=r,n=(0,$n.gf)(mn.B),s="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,i.jsx)(i.Fragment,{children:s?e:null})};(0,Pe.h)(Ar,"core.featureFlagged",!0);const lo={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function co(r){const e=r;if(e!=null&&e.type){var n,s;return(s=(n=e.type.displayName)!==null&&n!==void 0?n:e.type.name)!==null&&s!==void 0?s:String(e.type)}return String(e)}const xr=r=>{const e=new Set;return r&&e.add(r),e};function Cr(r,e=new Array){return d.Children.forEach(r,n=>{if(!(0,d.isValidElement)(n))return;const s=(0,Pe.E)(n,"core.mountPoint");if(s){const a=(0,Pe.E)(n,"core.plugin");e.push({routeRef:s,plugin:a})}Cr(n.props.children,e)}),e}const ws=ao(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,l;if(s!=null&&s.isElementAncestor)return s;if((n==null?void 0:n.props.element)===e)return{...s,isElementAncestor:!0};const S=(a=e.props)===null||a===void 0?void 0:a.path,E=(0,Pe.E)(e,"core.mountPoint");if(E&&S)throw new Error(`Path property may not be set directly on a routable extension "${co(e)}"`);var M;const k=(M=s==null||(l=s.obj)===null||l===void 0?void 0:l.children)!==null&&M!==void 0?M:r.objects;if(S!==void 0){if(typeof S!="string")throw new Error(`Element path must be a string at "${co(e)}"`);const xt=S.startsWith("/")?S.slice(1):S,Lt=e.props.element;if((0,Pe.E)(e,"core.gatherMountPoints")){var Z;if(Lt)throw new Error(`Mount point gatherers may not have an element prop "${co(e)}"`);const Nt={path:xt,element:"gathered",routeRefs:new Set,caseSensitive:!!(!((Z=e.props)===null||Z===void 0)&&Z.caseSensitive),children:[lo],plugins:new Set};return k.push(Nt),{obj:Nt,gatherPath:xt,routeRef:s==null?void 0:s.routeRef,gatherRouteRef:s==null?void 0:s.routeRef}}if(Lt){var nt;const[Nt,...pe]=Cr(Lt);if(pe.length>0)throw new Error(`Route element with path "${S}" may not contain multiple routable extensions`);if(!Nt)return s;const{routeRef:ee,plugin:Re}=Nt,Vn={path:xt,element:"mounted",routeRefs:new Set([ee]),caseSensitive:!!(!((nt=e.props)===null||nt===void 0)&&nt.caseSensitive),children:[lo],plugins:xr(Re)};return k.push(Vn),r.paths.set(ee,xt),r.parents.set(ee,s==null?void 0:s.routeRef),{obj:Vn,routeRef:ee!=null?ee:s==null?void 0:s.routeRef,gatherPath:xt,gatherRouteRef:s==null?void 0:s.gatherRouteRef}}}if(E){var ot;if((s==null?void 0:s.gatherPath)===void 0)throw new Error(`Routable extension "${co(e)}" with mount point "${E}" must be assigned a path`);s==null||(ot=s.obj)===null||ot===void 0||ot.routeRefs.add(E);const xt=(0,Pe.E)(e,"core.plugin");if(xt){var ut;s==null||(ut=s.obj)===null||ut===void 0||ut.plugins.add(xt)}return r.paths.set(E,s.gatherPath),r.parents.set(E,s==null?void 0:s.gatherRouteRef),{...s,routeRef:E}}return s}),Ts=ao(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,l,S;if((n==null?void 0:n.props.element)===e)return s;let E=s==null?void 0:s.obj,M=s==null?void 0:s.routeRef,k=s==null?void 0:s.sticky;const Z=(a=e.props)===null||a===void 0?void 0:a.path;var nt;const ot=(nt=E==null?void 0:E.children)!==null&&nt!==void 0?nt:r.objects,ut=!!(!((l=e.props)===null||l===void 0)&&l.caseSensitive);let xt=s==null?void 0:s.path;if((0,Pe.E)(e,"core.gatherMountPoints")){if(!Z)throw new Error("Mount point gatherer must have a path");xt=Z}const Lt=(S=e.props)===null||S===void 0?void 0:S.element;let Nt=(0,Pe.E)(e,"core.mountPoint");if(!Nt&&(0,d.isValidElement)(Lt)&&(Nt=(0,Pe.E)(Lt,"core.mountPoint")),Nt){let Re=Z;if(xt&&(Re?xt=void 0:Re=xt),!Re)throw new Error("Mounted routable extension must have a path");r.paths.set(Nt,Re),M&&k?(r.parents.set(Nt,M),Z&&(M=Nt,k=!1)):(r.parents.set(Nt,M),M=Nt),Z?(E={caseSensitive:ut,path:Z,element:"mounted",routeRefs:new Set([Nt]),children:[lo],plugins:xr((0,Pe.E)(e.props.element,"core.plugin"))},ot.push(E)):E==null||E.routeRefs.add(Nt)}if((0,Pe.E)(e,"core.gatherMountPoints")&&(k=!0),(0,Pe.E)(e,"core.gatherMountPoints")){if(!Z)throw new Error("Mount point gatherer must have a path");if(!Nt){var ee;E={caseSensitive:ut,path:Z,element:"gathered",routeRefs:new Set,children:[lo],plugins:(s==null||(ee=s.obj)===null||ee===void 0?void 0:ee.plugins)||new Set},ot.push(E)}}return{obj:E,path:xt,routeRef:M,sticky:k}}),Rs=ao(()=>new Set,(r,e)=>{if(e.type===Ar){const n=e.props;r.add("with"in n?n.with:n.without)}});var Nn=t(74808),Is=t(63544);const Wn=(0,Is.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Sr(r){return r[Wn]==="absolute"}function br(r){return r[Wn]==="sub"}function Ds(r){return r[Wn]==="external"}function uo(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Ms=t(46155),Ls=t.n(Ms);function Bs(r,e,n){let s,a="";if(Sr(r))s=r;else if(br(r))s=r.parent,a=r.path;else if(Ds(r)){const E=n.get(r);if(!E)return[void 0,""];if(Sr(E))s=E;else if(br(E))s=E.parent,a=E.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${E}`)}else throw r[Wn]?new Error(`Unknown or invalid route ref type, ${r[Wn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!s)return[void 0,""];const l=e.get(s);if(l===void 0)return[void 0,""];const S=uo(l,a);return[s,S]}function js(r,e,n,s,a){var l;const S=(l=(0,Nn.ue)(a,e))!==null&&l!==void 0?l:[],E=Array();let M=-1;for(let nt=r;nt&&(M=S.findIndex(ot=>ot.route.routeRefs.has(nt)),M===-1);nt=s.get(nt))E.unshift(nt);E.length===0&&(M-=1);const k=M===-1?"":S[M].pathname,Z=E.slice(0,-1).map(nt=>{const ot=n.get(nt);if(ot===void 0)throw new Error(`No path for ${nt}`);if(ot.includes(":"))throw new Error(`Cannot route to ${r} with parent ${nt} as it has parameters`);return ot});return`${uo(k,...Z)}/`}class Us{resolve(e,n){const[s,a]=Bs(e,this.routePaths,this.routeBindings);if(!s)return;let l;typeof n=="string"?l=this.trimPath(n):n.pathname?l={...n,pathname:this.trimPath(n.pathname)}:l=n;const S=this.appBasePath+js(s,l,this.routePaths,this.routeParents,this.routeObjects);return(...[M])=>{const k=M&&Ls()(M,Z=>typeof Z=="string"?Z.replaceAll(/[&?#;\/]/g,nt=>encodeURIComponent(nt)):Z);return uo(S,(0,Nn.tW)(a,k))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}constructor(e,n,s,a,l){(0,C._)(this,"routePaths",void 0),(0,C._)(this,"routeParents",void 0),(0,C._)(this,"routeObjects",void 0),(0,C._)(this,"routeBindings",void 0),(0,C._)(this,"appBasePath",void 0),this.routePaths=e,this.routeParents=n,this.routeObjects=s,this.routeBindings=a,this.appBasePath=l}}const Fs=(0,nn.tK)("routing-context"),$s=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:s,basePath:a="",children:l})=>{const S=new Us(r,e,n,s,a),E=(0,gn.B)({1:S});return(0,i.jsx)(Fs.Provider,{value:E,children:l})};function Ns(r,e){const n=new Set(e.values());n.delete(void 0);for(const s of e.keys()){if(n.has(s))continue;let a=s,l="";for(;a;){const E=r.get(a);if(E===void 0)throw new Error(`No path for ${a}`);l=uo(E,l),a=e.get(a)}const S=l.match(/:(\w+)/g);if(S){for(let E=0;E<S.length;E++)for(let M=E+1;M<S.length;M++)if(S[M]===S[E])throw new Error(`Parameter ${S[M]} is duplicated in path ${l}`)}}}function Ws(r,e){for(const n of e)if(n.externalRoutes){for(const[s,a]of Object.entries(n.externalRoutes))if(!a.optional&&!r.has(a))throw new Error(`External route '${s}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const ks=(0,nn.tK)("app-context"),Ks=({appContext:r,children:e})=>{const n=(0,gn.B)({1:r});return(0,i.jsx)(ks.Provider,{value:n,children:e})},Or="app",zs=`${Or}-auth-cookie-expires-at`,Hs=5*6e4,Pr=5e3,Vs=2,Gs=5*6e4;function _s({discoveryApi:r,fetchApi:e,errorApi:n}){let s=!1,a,l=!0,S=Pr;const E="BroadcastChannel"in window?new BroadcastChannel(zs):void 0,M=ot=>{const ut=(1+3*Math.random())*6e4;return Math.max(ot-Date.now(),Hs)-ut},k=async()=>{try{const ut=`${await r.getBaseUrl(Or)}/.backstage/auth/v1/cookie`,xt=await e.fetch(ut,{credentials:"include"});if(!xt.ok)throw new Error(`Request failed with status ${xt.status} ${xt.statusText}, see request towards ${ut} for more details`);const Lt=await xt.json();if(!Lt.expiresAt)throw new Error("No expiration date in response");const Nt=Date.parse(Lt.expiresAt);if(Number.isNaN(Nt))throw new Error("Invalid expiration date in response");l=!0,E==null||E.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Nt).toISOString()}}),nt(M(Nt))}catch(ot){l?(l=!1,S=Pr):(S=Math.min(Gs,S*Vs),console.error("Session cookie refresh failed",ot),n.post(new Error("Session refresh failed, see developer console for details"))),nt(S)}},Z=ot=>{const{data:ut}=ot;if(!(ut===null||typeof ut!="object")&&"action"in ut&&ut.action==="COOKIE_REFRESH_SUCCESS"){const xt=Date.parse(ut.payload.expiresAt);if(Number.isNaN(xt)){console.warn("Received invalid expiration from session refresh channel");return}nt(M(xt))}};function nt(ot){s||(a&&clearTimeout(a),a=setTimeout(k,ot))}return E==null||E.addEventListener("message",Z),k(),()=>{s=!0,a&&clearTimeout(a),E==null||E.removeEventListener("message",Z),E==null||E.close()}}function wr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function er(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}var ho=new WeakMap;class Ys{setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw wr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return er("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw wr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return er("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 er("getIdToken"),e.getIdToken()})}async signOut(){var e,n,s;await this.waitForTarget.then(a=>a.signOut()),await((e=(0,Rt._)(s=n=this,ho))===null||e===void 0?void 0:e.call(n)),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if((0,Rt._)(this,ho))return;const n=_s(e);(0,p._)(this,ho,async()=>{n();const s=await e.discoveryApi.getBaseUrl("app");try{await e.fetchApi.fetch(`${s}/.backstage/auth/v1/cookie`,{method:"DELETE"})}catch{}})}constructor(){(0,C._)(this,"target",void 0),(0,C._)(this,"waitForTarget",void 0),(0,C._)(this,"resolveTarget",()=>{}),(0,C._)(this,"signOutTargetUrl","/"),(0,de._)(this,ho,{writable:!0,value:void 0}),this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}}var Qs=t(1394);function Zs(r,e,n){if(r!==void 0){const a=n.find(l=>l.id===r);if(a)return a}if(e){const a=n.find(l=>l.variant==="dark");if(a)return a}const s=n.find(a=>a.variant==="light");return s||n[0]}const Js=()=>{const r=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,d.useState)(r.matches);return(0,d.useEffect)(()=>{const s=a=>{n(a.matches)};return r.addListener(s),()=>{r.removeListener(s)}},[r]),e};function Tr({children:r}){const e=(0,$n.gf)(io),n=(0,Qs.A)(e.activeThemeId$(),e.getActiveThemeId()),s=window.matchMedia?Js():!1,a=Zs(n,s,e.getInstalledThemes());if(!a)throw new Error("App has no themes");return(0,i.jsx)(a.Provider,{children:r})}const Rr=async()=>Xs();function Xs(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 a=JSON.parse(r);Array.isArray(a)?n.push(...a):n.push({data:a,context:"env"})}catch(a){throw new Error(`Failed to load runtime configuration, ${a}`)}const s=window.__APP_CONFIG__;return s&&n.push({context:"window",data:s}),n}class qs{add(e,n){return this.apis.push([e.id,n]),n}build(){return new yn(new Map(this.apis))}constructor(){(0,C._)(this,"apis",[])}}class yn{static builder(){return new qs}static from(e){return new yn(new Map(e.map(([n,s])=>[n.id,s])))}static with(e,n){return new yn(new Map([[e.id,n]]))}with(e,n){return new yn(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}constructor(e){(0,C._)(this,"apis",void 0),this.apis=e}}function ti(r){const e=new Map;return r&&r({bind:(s,a)=>{for(const[l,S]of Object.entries(a)){const E=s[l];if(!E)throw new Error(`Key ${l} is not an existing external route`);if(!S&&!E.optional)throw new Error(`External route ${l} is required but was undefined`);S&&e.set(E,S)}}}),e}function kn(){const[r]=(0,m.AV)((0,i.jsx)(m.qh,{index:!0,element:(0,i.jsx)("div",{})}));return!r.index}const Ir=(0,d.createContext)(void 0);var Dr=t(82266),Mr=t(93368),ei=t(25862);const ni=(r,e)=>{try{const n=(0,Nn.ue)(e,{pathname:r}),s=n==null?void 0:n.filter(M=>{var k;return(M==null||(k=M.route.routeRefs)===null||k===void 0?void 0:k.size)>0}).pop(),a=s==null?void 0:s.route;if(!a||a.path===""&&r!=="/")return;let l;a.routeRefs.size===1&&(l=a.routeRefs.values().next().value);let S;a.plugins.size===1&&(S=a.plugins.values().next().value);const E=Object.entries((s==null?void 0:s.params)||{}).reduce((M,[k,Z])=>(Z!==void 0&&k!=="*"&&(M[k]=Z),M),{});return{extension:"App",pluginId:(S==null?void 0:S.getId())||"root",...l?{routeRef:l.id}:{},_routeNodeType:a.element,params:E}}catch{return}},oi=({pathname:r,search:e,hash:n,attributes:s})=>{const a=(0,Mr.s)();return(0,d.useEffect)(()=>{a.captureEvent("navigate",`${r}${e}${n}`,{attributes:s})},[a,r,e,n,s]),null},fo=({routeObjects:r})=>{const{pathname:e,search:n,hash:s}=(0,m.zy)(),{params:a,...l}=ni(e,r)||{params:{}};return(0,i.jsx)(ei.Ig,{attributes:l,children:(0,i.jsx)(oi,{pathname:e,search:n,hash:s,attributes:a})})};function ri(r){return kn()?nr(r):""}function nr(r){var e;let{pathname:n}=new URL((e=r.getOptionalString("app.baseUrl"))!==null&&e!==void 0?e:"/","http://sample.dev");return n=n.replace(/\/*$/,""),n}function Lr({component:r,appIdentityProxy:e,children:n}){const[s,a]=(0,d.useState)(),l=(0,$n.gf)(Bt.U),S=nr(l);return s?(e.setTarget(s,{signOutTargetUrl:S||"/"}),(0,i.jsx)(i.Fragment,{children:n})):(0,i.jsx)(r,{onSignInSuccess:a})}function Br(r){const{Router:e,SignInPage:n}=(0,Dr.n)().getComponents(),s=(0,$n.gf)(Bt.U),a=nr(s),l=`${a}/*`,S=(0,d.useContext)(Ir);if(!S)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:E,appIdentityProxy:M}=S;return n?kn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(fo,{routeObjects:E}),(0,i.jsx)(Lr,{component:n,appIdentityProxy:M,children:(0,i.jsx)(m.BV,{children:(0,i.jsx)(m.qh,{path:l,element:(0,i.jsx)(i.Fragment,{children:r.children})})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(fo,{routeObjects:E}),(0,i.jsx)(Lr,{component:n,appIdentityProxy:M,children:r.children})]}):(M.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:a||"/"}),kn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(fo,{routeObjects:E}),(0,i.jsx)(m.BV,{children:(0,i.jsx)(m.qh,{path:l,element:(0,i.jsx)(i.Fragment,{children:r.children})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(fo,{routeObjects:E}),r.children]}))}(0,Pe.h)(Br,"core.type","AppRouter");const Kn="language",Ze="en";var zn=new WeakMap,En=new WeakMap,po=new WeakMap;class go{static create(e){var n;const s=(n=e==null?void 0:e.availableLanguages)!==null&&n!==void 0?n:[Ze];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ze))throw new Error(`Supported languages must include '${Ze}'`);var a;const l=(a=e==null?void 0:e.defaultLanguage)!==null&&a!==void 0?a:Ze;if(!s.includes(l))throw new Error(`Initial language must be one of the supported languages, got '${l}'`);return new go(s,l)}static createWithStorage(e){const n=go.create(e);if(!window.localStorage)return n;const s=window.localStorage.getItem(Kn),{languages:a}=n.getAvailableLanguages();return s&&a.includes(s)&&n.setLanguage(s),n.language$().subscribe(({language:l})=>{l!==window.localStorage.getItem(Kn)&&window.localStorage.setItem(Kn,l)}),window.addEventListener("storage",l=>{if(l.key===Kn){var S;const E=(S=localStorage.getItem(Kn))!==null&&S!==void 0?S:void 0;E&&n.setLanguage(E)}}),n}getAvailableLanguages(){return{languages:(0,Rt._)(this,zn).slice()}}setLanguage(e){const n=e!=null?e:Ze;if(n!==(0,Rt._)(this,En)){if(n&&!(0,Rt._)(this,zn).includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${(0,Rt._)(this,zn).join("', '")}'`);(0,p._)(this,En,n),(0,Rt._)(this,po).next({language:n})}}getLanguage(){return{language:(0,Rt._)(this,En)}}language$(){return(0,Rt._)(this,po)}constructor(e,n){(0,de._)(this,zn,{writable:!0,value:void 0}),(0,de._)(this,En,{writable:!0,value:void 0}),(0,de._)(this,po,{writable:!0,value:void 0}),(0,p._)(this,zn,e),(0,p._)(this,En,n),(0,p._)(this,po,new J({language:(0,Rt._)(this,En)}))}}var ke=t(75944),un=t(91196),si=t(47304),ii=t(99833),jr=t(93184);function Ur(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}var An=new WeakMap,vo=new WeakMap,xn=new WeakMap,mo=new WeakSet;class ai{addTranslationResource(e){const n=(0,ii.Y)(e);for(const s of n.resources){const a=(0,ke._)(this,mo,or).call(this,s.language,n.id);(0,Rt._)(this,xn).has(a)||(0,Rt._)(this,xn).set(a,s.loader)}}needsLoading(e,n){const s=(0,ke._)(this,mo,or).call(this,e,n);return(0,Rt._)(this,xn).get(s)?!(0,Rt._)(this,An).has(s):!1}async load(e,n){const s=(0,ke._)(this,mo,or).call(this,e,n),a=(0,Rt._)(this,xn).get(s);if(!a||(0,Rt._)(this,An).has(s))return;const l=(0,Rt._)(this,vo).get(s);if(l){await l;return}const S=a().then(E=>{this.onLoad({language:e,namespace:n,messages:E.messages}),(0,Rt._)(this,An).add(s)},E=>{throw(0,Rt._)(this,An).add(s),E});(0,Rt._)(this,vo).set(s,S),await S}constructor(e){(0,un._)(this,mo),(0,C._)(this,"onLoad",void 0),(0,de._)(this,An,{writable:!0,value:void 0}),(0,de._)(this,vo,{writable:!0,value:void 0}),(0,de._)(this,xn,{writable:!0,value:void 0}),this.onLoad=e,(0,p._)(this,An,new Set),(0,p._)(this,vo,new Map),(0,p._)(this,xn,new Map)}}function or(r,e){return`${r}/${e}`}var Hn=new WeakMap,Cn=new WeakMap,hn=new WeakMap,rr=new WeakMap,yo=new WeakMap,Fr=new WeakSet,Eo=new WeakSet,sr=new WeakSet;class ir{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),s=(0,si.Q_)({fallbackLng:Ze,supportedLngs:n,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(s.init(),!s.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:a}=e.languageApi.getLanguage();a!==Ze&&s.changeLanguage(a);const l=new ai(M=>{s.addResourceBundle(M.language,M.namespace,Ur(M.messages),!1,!0)}),S=(e==null?void 0:e.resources)||[];for(let M=S.length-1;M>=0;M--){const k=S[M];k.$$type==="@backstage/TranslationResource"?l.addTranslationResource(k):k.$$type==="@backstage/TranslationMessages"&&s.addResourceBundle(Ze,k.id,Ur(k.messages),!0,!1)}const E=new ir(s,l,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:M})=>{(0,ke._)(E,Fr,li).call(E,M)}),E}getTranslation(e){const n=(0,jr.v)(e);return(0,ke._)(this,sr,$r).call(this,n),(0,ke._)(this,Eo,ar).call(this,n)}translation$(e){const n=(0,jr.v)(e);return(0,ke._)(this,sr,$r).call(this,n),new(K())(s=>{let a={};const l=()=>{a={};const E=a;(0,Rt._)(this,Cn).load((0,Rt._)(this,hn),n.id).then(()=>{if(E===a){const M=(0,ke._)(this,Eo,ar).call(this,n);M.ready&&s.next(M)}},M=>{E===a&&s.error(Array.isArray(M)?M[0]:M)})},S=()=>{const E=(0,ke._)(this,Eo,ar).call(this,n);E.ready?s.next(E):l()};return(0,Rt._)(this,Cn).needsLoading((0,Rt._)(this,hn),n.id)&&l(),(0,Rt._)(this,yo).add(S),()=>{(0,Rt._)(this,yo).delete(S)}})}constructor(e,n,s){(0,un._)(this,Fr),(0,un._)(this,Eo),(0,un._)(this,sr),(0,de._)(this,Hn,{writable:!0,value:void 0}),(0,de._)(this,Cn,{writable:!0,value:void 0}),(0,de._)(this,hn,{writable:!0,value:void 0}),(0,de._)(this,rr,{writable:!0,value:new Set}),(0,de._)(this,yo,{writable:!0,value:new Set}),(0,p._)(this,Hn,e),(0,p._)(this,Cn,n),(0,p._)(this,hn,s)}}function li(r){(0,Rt._)(this,hn)!==r&&((0,p._)(this,hn,r),(0,Rt._)(this,Hn).changeLanguage(r),(0,Rt._)(this,yo).forEach(e=>e()))}function ar(r){return(0,Rt._)(this,Cn).needsLoading((0,Rt._)(this,hn),r.id)?{ready:!1}:{ready:!0,t:(0,Rt._)(this,Hn).getFixedT(null,r.id)}}function $r(r){if((0,Rt._)(this,rr).has(r.id))return;(0,Rt._)(this,rr).add(r.id);const e=r.getDefaultMessages();(0,Rt._)(this,Hn).addResourceBundle(Ze,r.id,e,!0,!1);const n=r.getDefaultResource();n&&(0,Rt._)(this,Cn).addTranslationResource(n)}function Nr(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 ci(r){const e=vn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),s=e.getOptionalString("backend.baseUrl");let a=r,l,S;if(n&&s){const E=new URL(n).origin,M=new URL(s).origin;if(E===M){const k=Nr(s);s!==k&&(l=k)}}if(n){const E=Nr(n);n!==E&&(S=E)}return(S||l)&&(a=a.concat({data:{app:S&&{baseUrl:S},backend:l&&{baseUrl:l}},context:"relative-resolver"})),a}function di(){const r=document.querySelector('meta[name="backstage-app-mode"]');var e;return((e=r==null?void 0:r.getAttribute("content"))!==null&&e!==void 0?e:"public")==="protected"}function ui(r,e,n){var s;const a=!!r,l=(0,Ln.A)(r||(()=>Promise.resolve([])));let S;if(a&&l.loading){const{Progress:k}=e;S=(0,i.jsx)(k,{})}else if(l.error){const{BootErrorPage:k}=e;S=(0,i.jsx)(k,{step:"load-config",error:l.error})}const{ThemeProvider:E=Tr}=e;return S?{node:(0,i.jsx)(Zo,{apis:yn.with(io,n),children:(0,i.jsx)(E,{children:S})})}:{api:vn.fromConfigs(!((s=l.value)===null||s===void 0)&&s.length?ci(l.value):[])}}class hi{getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}constructor(e){(0,C._)(this,"app",void 0),this.app=e}}var lr=new WeakMap;class fi{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,i.jsx)(n,{children:e})}getProvider(){if((0,Rt._)(this,lr))throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");(0,p._)(this,lr,!0);const e=new hi(this);let n=!1;return({children:a})=>{const l=(0,d.useRef)(!0),S=(0,d.useMemo)(()=>so.createWithStorage(this.themes),[]),{routing:E,featureFlags:M,routeBindings:k}=(0,d.useMemo)(()=>{const Lt=kn();Lt&&console.warn(`
3
+ You will not have a verified identity, meaning some features might be unavailable.`,enter:"Enter"}},skipToContent:"Skip to content",copyTextButton:{tooltipText:"Text copied to clipboard"},simpleStepper:{reset:"Reset",finish:"Finish",next:"Next",skip:"Skip",back:"Back"},errorPage:{subtitle:"ERROR {{status}}: {{statusMessage}}",title:"Looks like someone dropped the mic!",goBack:"Go back",showMoreDetails:"Show more details",showLessDetails:"Show less details"},emptyState:{missingAnnotation:{title:"Missing Annotation",actionTitle:"Add the annotation to your component YAML as shown in the highlighted example below:",readMore:"Read more"}},supportConfig:{default:{title:"Support Not Configured",linkTitle:"Add `app.support` config key"}},errorBoundary:{title:"Please contact {{slackChannel}} for help."},oauthRequestDialog:{title:"Login Required",authRedirectTitle:"This will trigger a http redirect to OAuth Login.",login:"Log in",rejectAll:"Reject All"},supportButton:{title:"Support",close:"Close"},table:{filter:{title:"Filters",clearAll:"Clear all"}},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:function(Y,T,t){"use strict";t.d(T,{Ig:function(){return h},pn:function(){return g}});var o=t(31085),i=t(43836),d=t(10602),O=t(14041);const m=(0,i.tK)("analytics-context"),g=()=>{const C=(0,O.useContext)(m);if(C===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const A=C.atVersion(1);if(A===void 0)throw new Error("No context found for version 1.");return A},h=C=>{const{attributes:A,children:P}=C,b={...g(),...A},v=(0,d.B)({1:b});return(0,o.jsx)(m.Provider,{value:v,children:P})};function c(C,A){const P=u=>_jsx(h,{attributes:A,children:_jsx(C,{...u})});return P.displayName=`WithAnalyticsContext(${C.displayName||C.name||"Component"})`,P}},67237:function(Y,T,t){"use strict";t.d(T,{J:function(){return m},t:function(){return O}});var o=t(18990),i=t(63544);const d=(0,i.Q)("core-plugin-api:analytics-tracker-events",()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1})),O="_ROUTABLE-EXTENSION-RENDERED";class m{setContext(h){this.context=h}captureEvent(h,c,{value:C,attributes:A}={}){const{_routeNodeType:P,...u}=this.context;if(h===O){d.mostRecentGatheredNavigation&&(d.mostRecentRoutableExtensionRender={context:{...u,extension:"App"}});return}if(d.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender})}catch(b){console.warn("Error during analytics event capture. %o",b)}d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0}if(h==="navigate"&&P==="gathered"&&u.pluginId==="root"){d.mostRecentGatheredNavigation={action:h,subject:c,value:C,attributes:A,context:u};return}try{this.analyticsApi.captureEvent({action:h,subject:c,value:C,attributes:A,context:u})}catch(b){console.warn("Error during analytics event capture. %o",b)}}constructor(h,c={routeRef:"unknown",pluginId:"root",extension:"App"}){(0,o._)(this,"analyticsApi",void 0),(0,o._)(this,"context",void 0),this.analyticsApi=h,this.context=c,d.beforeUnloadRegistered||(addEventListener("beforeunload",()=>{d.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender}),d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0)},{once:!0,passive:!0}),d.beforeUnloadRegistered=!0)}}},93368:function(Y,T,t){"use strict";t.d(T,{s:function(){return h}});var o=t(25862),i=t(72427),d=t(99303),O=t(14041),m=t(67237);function g(){try{return(0,i.gf)(d.c)}catch{return{captureEvent:()=>{}}}}function h(){const c=(0,O.useRef)(null),C=(0,o.pn)(),A=g();function P(){return c.current===null&&(c.current=new m.J(A)),c.current}const u=P();return u.setContext(C),u}},36017:function(Y,T,t){"use strict";t.d(T,{k:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.alert"})},99303:function(Y,T,t){"use strict";t.d(T,{c:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.analytics"})},65461:function(Y,T,t){"use strict";t.d(T,{U:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.config"})},57405:function(Y,T,t){"use strict";t.d(T,{I:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.discovery"})},39837:function(Y,T,t){"use strict";t.d(T,{m:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.error"})},63636:function(Y,T,t){"use strict";t.d(T,{B:function(){return d},S:function(){return i}});var o=t(55309),i;(function(O){O[O.None=0]="None",O[O.Active=1]="Active"})(i||(i={}));const d=(0,o.y)({id:"core.featureflags"})},70795:function(Y,T,t){"use strict";t.d(T,{a:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.fetch"})},16009:function(Y,T,t){"use strict";t.d(T,{K:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.identity"})},56038:function(Y,T,t){"use strict";t.d(T,{J:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"core.translation"})},55309:function(Y,T,t){"use strict";t.d(T,{y:function(){return d}});var o=t(18990);class i{get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}constructor(m){if((0,o._)(this,"config",void 0),this.config=m,!m.id.split(".").flatMap(h=>h.split("-")).every(h=>h.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${m.id}'`)}}function d(O){return new i(O)}},12935:function(Y,T,t){"use strict";t.d(T,{b:function(){return o}});function o(i,d){return"id"in i?{api:i,deps:{},factory:()=>d}:i}},72427:function(Y,T,t){"use strict";t.d(T,{Q2:function(){return m},gf:function(){return g}});var o=t(31085),i=t(14041),d=t(43836),O=t(97142);function m(){const c=(0,d.qO)("api-context");if(!c)throw new O.EH("API context is not available");const C=c.atVersion(1);if(!C)throw new O.EH("ApiContext v1 not available");return C}function g(c){const A=m().get(c);if(!A)throw new O.EH(`No implementation available for ${c}`);return A}function h(c){return function(A){const P=b=>{const v=m(),D={};for(const w in c)if(c.hasOwnProperty(w)){const y=c[w],B=v.get(y);if(!B)throw new NotImplementedError(`No implementation available for ${y}`);D[w]=B}return _jsx(A,{...b,...D})},u=A.displayName||A.name||"Component";return P.displayName=`withApis(${u})`,P}}},82266:function(Y,T,t){"use strict";t.d(T,{n:function(){return i}});var o=t(43836);const i=()=>{const d=(0,o.qO)("app-context");if(!d)throw new Error("App context is not available");const O=d.atVersion(1);if(!O)throw new Error("AppContext v1 not available");return O}},19402:function(Y,T,t){"use strict";t.d(T,{E:function(){return m},h:function(){return O}});var o=t(63544);const i=(0,o.Q)("component-data-store",()=>new WeakMap),d="__backstage_data";function O(g,h,c){const C=g;var A;let P=(A=C[d])!==null&&A!==void 0?A:i.get(g);if(P||(P={map:new Map},Object.defineProperty(C,d,{enumerable:!1,configurable:!0,writable:!1,value:P}),i.set(g,P)),P.map.has(h)){const u=g.displayName||g.name;throw new Error(`Attempted to attach duplicate data "${h}" to component "${u}"`)}P.map.set(h,c)}function m(g,h){if(!g)return;const c=g.type;if(!c)return;var C;const A=(C=c[d])!==null&&C!==void 0?C:i.get(c);if(A)return A.map.get(h)}},88758:function(Y,T,t){"use strict";t.d(T,{NC:function(){return u},zZ:function(){return b},QJ:function(){return P}});var o=t(31085),i=t(14041),d=t(93368),O=t(25862),m=t(82266),g=t(9222),h=t(19402),c=t(18990);class C extends i.Component{static getDerivedStateFromError(D){return{error:D}}render(){const{error:D}=this.state,{app:w,plugin:y}=this.props,{ErrorBoundaryFallback:B}=w.getComponents();return D?(0,o.jsx)(B,{error:D,resetError:this.handleErrorReset,plugin:y}):this.props.children}constructor(...D){super(...D),(0,c._)(this,"state",{error:void 0}),(0,c._)(this,"handleErrorReset",()=>{this.setState({error:void 0})})}}var A=t(67237);function P(v){const{component:D,mountPoint:w,name:y}=v;return b({component:{lazy:()=>D().then(B=>{const R=z=>{const V=(0,d.s)();try{(0,g.S)(w)}catch(tt){if(typeof tt=="object"&&tt!==null){const{message:K}=tt;if(typeof K=="string"&&K.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${w} 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 tt}return(0,i.useEffect)(()=>{V.captureEvent(A.t,"")},[V]),(0,o.jsx)(B,{...z})},x=y||B.displayName||B.name||"LazyComponent";return R.displayName=`RoutableExtension(${x})`,R},B=>x=>{const z=(0,m.n)(),{BootErrorPage:V}=z.getComponents();return(0,o.jsx)(V,{step:"load-chunk",error:B})})},data:{"core.mountPoint":w},name:y})}function u(v){const{component:D,name:w}=v;return b({component:D,name:w})}function b(v){const{data:D={},name:w}=v;w||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 v.component){const R=v.component.lazy;y=(0,i.lazy)(()=>R().then(x=>({default:x})))}else y=v.component.sync;const B=w||y.displayName||y.name||"Component";return{expose(R){const x=z=>{const V=(0,m.n)(),{Progress:tt}=V.getComponents(),K=D==null?void 0:D["core.mountPoint"];return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(tt,{}),children:(0,o.jsx)(C,{app:V,plugin:R,children:(0,o.jsx)(O.Ig,{attributes:{pluginId:R.getId(),...w&&{extension:w},...K&&{routeRef:K.id}},children:(0,o.jsx)(y,{...z})})})})};(0,h.h)(x,"core.plugin",R),(0,h.h)(x,"core.extensionName",w);for(const[z,V]of Object.entries(D))(0,h.h)(x,z,V);return x.displayName=`Extension(${B})`,x}}}},82442:function(Y,T,t){"use strict";t.d(T,{O:function(){return c}});var o=t(18990),i=t(14041),d=t(19402),O=t(72427),m=t(63636);function g(C,A,P,u){return i.Children.toArray(C).flatMap(b=>{if(!(0,i.isValidElement)(b))return[];if(b.type===i.Fragment)return g(b.props.children,A,P,u);if((0,d.E)(b,"core.featureFlagged")){const v=b.props;return("with"in v?A.isActive(v.with):!A.isActive(v.without))?g(b.props.children,A,P,u):[]}if(P===void 0||P(b))return[b];if(u)throw new Error(u);return g(b.props.children,A,P,u)})}class h{selectByComponentData(A){const P=g(this.node,this.featureFlagsApi,u=>(0,d.E)(u,A.key)!==void 0,A.withStrictError);return new h(P,this.featureFlagsApi)}findComponentData(A){return g(this.node,this.featureFlagsApi,u=>(0,d.E)(u,A.key)!==void 0).map(u=>(0,d.E)(u,A.key)).filter(u=>u!==void 0)}getElements(){return g(this.node,this.featureFlagsApi)}constructor(A,P){(0,o._)(this,"node",void 0),(0,o._)(this,"featureFlagsApi",void 0),this.node=A,this.featureFlagsApi=P}}function c(C,A,P=[]){const u=(0,O.gf)(m.B),b=new h(C,u);return(0,i.useMemo)(()=>A(b),[C,...P])}},9803:function(Y,T,t){"use strict";t.d(T,{i:function(){return d}});var o=t(18990);class i{getId(){return this.config.id}getApis(){var m;return(m=this.config.apis)!==null&&m!==void 0?m:[]}getFeatureFlags(){var m,g;return(g=(m=this.config.featureFlags)===null||m===void 0?void 0:m.slice())!==null&&g!==void 0?g:[]}get routes(){var m;return(m=this.config.routes)!==null&&m!==void 0?m:{}}get externalRoutes(){var m;return(m=this.config.externalRoutes)!==null&&m!==void 0?m:{}}provide(m){return m.expose(this)}toString(){return`plugin{${this.config.id}}`}constructor(m){(0,o._)(this,"config",void 0),this.config=m}}function d(O){return new i(O)}},34569:function(Y,T,t){"use strict";t.d(T,{H:function(){return g}});var o=t(18990),i=t(59598);let d=i.b,O=d;class m{get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}constructor(c,C){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,O,void 0),this.id=c,this.params=C,this[d]="absolute"}}function g(h){var c;return new m(h.id,(c=h.params)!==null&&c!==void 0?c:[])}},59598:function(Y,T,t){"use strict";t.d(T,{b:function(){return i}});var o=t(63544);const i=(0,o.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:function(Y,T,t){"use strict";t.d(T,{S:function(){return O}});var o=t(14041),i=t(18690),d=t(43836);function O(m){const{pathname:g}=(0,i.zy)(),h=(0,d.qO)("routing-context");if(!h)throw new Error("Routing context is not available");const c=h.atVersion(1),C=(0,o.useMemo)(()=>c&&c.resolve(m,{pathname:g}),[c,m,g]);if(!h)throw new Error("useRouteRef used outside of routing context");if(!c)throw new Error("RoutingContext v1 not available");const A="optional"in m&&m.optional;if(!C&&!A)throw new Error(`No path for ${m}`);return C}},93184:function(Y,T,t){"use strict";t.d(T,{h:function(){return P},v:function(){return u}});var o=t(96324),i=t(87081),d=t(33284),O=t(18990),m=t(99833);function g(b){const v=new Array;function D(w,y){for(const[B,R]of Object.entries(w))typeof R=="string"?v.push([y+B,R]):D(R,`${y}${B}.`)}return D(b,""),Object.fromEntries(v)}var h=new WeakMap,c=new WeakMap,C=new WeakMap;class A{get id(){return(0,o._)(this,h)}get T(){throw new Error("Not implemented")}getDefaultMessages(){return(0,o._)(this,c)}setDefaultResource(v){(0,d._)(this,C,v)}getDefaultResource(){return(0,o._)(this,C)}toString(){return`TranslationRef{id=${this.id}}`}constructor(v){(0,i._)(this,h,{writable:!0,value:void 0}),(0,i._)(this,c,{writable:!0,value:void 0}),(0,i._)(this,C,{writable:!0,value:void 0}),(0,O._)(this,"$$type","@backstage/TranslationRef"),(0,O._)(this,"version","v1"),(0,d._)(this,h,v.id),(0,d._)(this,c,g(v.messages))}}function P(b){const v=new A(b);return b.translations&&v.setDefaultResource((0,m.o)({ref:v,translations:b.translations})),v}function u(b){const v=b;if(v.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${v.$$type}'`);if(v.version!=="v1")throw new Error(`Invalid translation ref, bad version '${v.version}'`);return v}},99833:function(Y,T,t){"use strict";t.d(T,{Y:function(){return o},o:function(){return i}});function o(d){const O=d;if(O.$$type!=="@backstage/TranslationResource")throw new Error(`Invalid translation resource, bad type '${O.$$type}'`);if(O.version!=="v1")throw new Error(`Invalid translation resource, bad version '${O.version}'`);return O}function i(d){return{$$type:"@backstage/TranslationResource",version:"v1",id:d.ref.id,resources:Object.entries(d.translations).map(([O,m])=>({language:O,loader:()=>m().then(g=>{const h=g.default;return{messages:(h==null?void 0:h.$$type)==="@backstage/TranslationMessages"?h.messages:h}})}))}}},87849:function(Y,T,t){"use strict";t.d(T,{i:function(){return g}});var o=t(14041),i=t(72427),d=t(39837),O=t(56038);const m=new WeakSet,g=h=>{const c=(0,i.gf)(d.m),C=(0,i.gf)(O.J),[A,P]=(0,o.useState)(()=>C.getTranslation(h)),u=(0,o.useMemo)(()=>C.translation$(h),[C,h]),b=(0,o.useCallback)(D=>{if(!m.has(h)){const w=`Failed to load translation resource '${h.id}'; caused by ${D}`;console.error(w),c.post(new Error(w)),m.add(h)}},[c,h]);(0,o.useEffect)(()=>{const D=u.subscribe({next(w){w.ready&&P(w)},error(w){b(w)}});return()=>{D.unsubscribe()}},[u,b]);const v=(0,o.useRef)(!0);if((0,o.useEffect)(()=>{v.current?v.current=!1:P(C.getTranslation(h))},[C,h]),!A.ready)throw new Promise(D=>{const w=u.subscribe({next(y){y.ready&&(w.unsubscribe(),D())},error(y){w.unsubscribe(),b(y),D()}})});return{t:A.t}}},70835:function(Y,T,t){"use strict";t.d(T,{o:function(){return O}});var o=t(18990),i=t(59750);async function d(m){try{const h=await m.text();if(h){var g;if(!((g=m.headers.get("content-type"))===null||g===void 0)&&g.startsWith("application/json"))try{const c=JSON.parse(h);if(c.error&&c.response)return c}catch{}return{error:{name:"Error",message:`Request failed with status ${m.status} ${m.statusText}, ${h}`},response:{statusCode:m.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${m.status} ${m.statusText}`},response:{statusCode:m.status}}}class O extends Error{static async fromResponse(g){const h=await d(g),c=h.response.statusCode||g.status,C=g.statusText,A=`Request failed with ${c} ${C}`,P=(0,i.cy)(h.error);return new O({message:A,response:g,data:h,cause:P,statusCode:c,statusText:C})}constructor(g){super(g.message),(0,o._)(this,"response",void 0),(0,o._)(this,"body",void 0),(0,o._)(this,"cause",void 0),(0,o._)(this,"statusCode",void 0),(0,o._)(this,"statusText",void 0),this.name="ResponseError",this.response=g.response,this.body=g.data,this.cause=g.cause,this.statusCode=g.statusCode,this.statusText=g.statusText}}},93007:function(Y,T,t){"use strict";t.d(T,{b:function(){return o}});function o(d){if(typeof d!="object"||d===null||Array.isArray(d))return!1;const O=d;return!(typeof O.name!="string"||O.name===""||typeof O.message!="string")}function i(d){if(typeof d!="object"||d===null||Array.isArray(d))throw new Error(`Encountered invalid error, not an object, got '${d}'`);const O=d;if(typeof O.name!="string"||O.name==="")throw new Error(`Encountered error object without a name, got '${d}'`);if(typeof O.message!="string")throw new Error(`Encountered error object without a message, got '${d}'`)}},97142:function(Y,T,t){"use strict";t.d(T,{m_:function(){return c},EH:function(){return P}});var o=t(18990),i=t(93007),d=t(59750);class O extends Error{constructor(D,w){var y,B;let R=D;if(w!==void 0){const x=(0,d.M5)(w);R?R+=`; caused by ${x}`:R=`caused by ${x}`}super(R),(0,o._)(this,"cause",void 0),(y=(B=Error).captureStackTrace)===null||y===void 0||y.call(B,this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,i.b)(w)?w:void 0}}class m extends O{constructor(...D){super(...D),(0,o._)(this,"name","InputError")}}class g extends O{constructor(...D){super(...D),(0,o._)(this,"name","AuthenticationError")}}class h extends O{constructor(...D){super(...D),(0,o._)(this,"name","NotAllowedError")}}class c extends O{constructor(...D){super(...D),(0,o._)(this,"name","NotFoundError")}}class C extends O{constructor(...D){super(...D),(0,o._)(this,"name","ConflictError")}}class A extends O{constructor(...D){super(...D),(0,o._)(this,"name","NotModifiedError")}}class P extends O{constructor(...D){super(...D),(0,o._)(this,"name","NotImplementedError")}}class u extends null{}class b extends O{constructor(D,w){super(D,w),this.name=(0,i.b)(w)?w.name:"Error"}}},59750:function(Y,T,t){"use strict";t.d(T,{M5:function(){return g},cy:function(){return m}});var o=t(69655),i=t.n(o),d=t(93007);function O(h,c){const A={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(h)};return c!=null&&c.includeStack||delete A.stack,A}function m(h){const c=(0,o.deserializeError)(h);return h.stack||(c.stack=void 0),c}function g(h){if((0,d.b)(h)){const c=String(h);return c!=="[object Object]"?c:`${h.name}: ${h.message}`}return`unknown error '${h}'`}},41158:function(Y,T,t){"use strict";t.d(T,{L:function(){return De},Y:function(){return $e}});var o=t(18990),i=t(59869);const d="amazonaws.com";function O(L){var f;const j=L.getOptionalString("endpoint");var U;const dt=(U=L.getOptionalBoolean("s3ForcePathStyle"))!==null&&U!==void 0?U:!1;let et,Mt;if(j){try{const $t=new URL(j);et=$t.host,Mt=$t.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${j}' is not a valid URL`)}if(Mt!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${j}'`)}else et=d;const qt=L.getOptionalString("accessKeyId"),re=(f=L.getOptionalString("secretAccessKey"))===null||f===void 0?void 0:f.trim(),ve=L.getOptionalString("roleArn"),me=L.getOptionalString("externalId");return{host:et,endpoint:j,s3ForcePathStyle:dt,accessKeyId:qt,secretAccessKey:re,roleArn:ve,externalId:me}}function m(L){const f=L.map(O);return f.some(j=>j.host===d)||f.push({host:d}),f}class g{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){return(0,i.ku)(f)}resolveEditUrl(f){return f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(g,"factory",({config:L})=>{var f;const j=m((f=L.getOptionalConfigArray("integrations.awsS3"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new g(U)),U=>U.config.host)});const h="console.aws.amazon.com";function c(L){var f;const j=L.getOptionalString("accessKeyId"),U=(f=L.getOptionalString("secretAccessKey"))===null||f===void 0?void 0:f.trim(),dt=L.getOptionalString("roleArn"),et=L.getOptionalString("externalId");return{host:h,accessKeyId:j,secretAccessKey:U,roleArn:dt,externalId:et}}function C(L){const f=L.map(c);return f.some(j=>j.host===h)||f.push({host:h}),f}class A{get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}resolveUrl(f){return(0,i.ku)(f)}resolveEditUrl(f){const U=new URL(f).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!U)throw new Error("");const[,dt]=U;return P(f,dt,"edit")}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(A,"factory",({config:L})=>{var f;const j=C((f=L.getOptionalConfigArray("integrations.awsCodeCommit"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new A(U)),U=>U.config.host)});function P(L,f,j){const U=j==="edit"?"files/edit":j;return L.replace(new RegExp(`/codesuite/codecommit/repositories/${f}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${f}/${U}/`)}var u=t(96324),b=t(87081),v=t(33284);const D="GB";var w=new WeakMap,y=new WeakMap,B=new WeakMap,R=new WeakMap,x=new WeakMap,z=new WeakMap,V=new WeakMap;class tt{static fromRepoUrl(f){const j=new URL(f);let U,dt,et;const Mt=j.pathname.split("/").map($t=>decodeURIComponent($t));if(Mt[2]==="_git"?(U=Mt[1],dt=et=Mt[3]):Mt[3]==="_git"?(U=Mt[1],dt=Mt[2],et=Mt[4]):Mt[4]==="_git"&&(U=`${Mt[1]}/${Mt[2]}`,dt=Mt[3],et=Mt[5]),!U||!dt||!et)throw new Error("Azure URL must point to a git repository");var qt;const re=(qt=j.searchParams.get("path"))!==null&&qt!==void 0?qt:void 0;let ve;const me=j.searchParams.get("version");if(me){if(me.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");ve=me.slice(2)}return new tt(j.origin,U,dt,et,re,ve)}toRepoUrl(){let f;return(0,u._)(this,B)===(0,u._)(this,R)?f=(0,u._)(this,V).call(this,(0,u._)(this,y),"_git",(0,u._)(this,R)):f=(0,u._)(this,V).call(this,(0,u._)(this,y),(0,u._)(this,B),"_git",(0,u._)(this,R)),(0,u._)(this,x)&&f.searchParams.set("path",(0,u._)(this,x)),(0,u._)(this,z)&&f.searchParams.set("version",D+(0,u._)(this,z)),f.toString()}toFileUrl(){if(!(0,u._)(this,x))throw new Error("Azure URL must point to a specific path to be able to download a file");const f=(0,u._)(this,V).call(this,(0,u._)(this,y),(0,u._)(this,B),"_apis","git","repositories",(0,u._)(this,R),"items");return f.searchParams.set("api-version","6.0"),f.searchParams.set("path",(0,u._)(this,x)),(0,u._)(this,z)&&f.searchParams.set("version",(0,u._)(this,z)),f.toString()}toArchiveUrl(){const f=(0,u._)(this,V).call(this,(0,u._)(this,y),(0,u._)(this,B),"_apis","git","repositories",(0,u._)(this,R),"items");return f.searchParams.set("recursionLevel","full"),f.searchParams.set("download","true"),f.searchParams.set("api-version","6.0"),(0,u._)(this,x)&&f.searchParams.set("scopePath",(0,u._)(this,x)),(0,u._)(this,z)&&f.searchParams.set("version",(0,u._)(this,z)),f.toString()}toCommitsUrl(){const f=(0,u._)(this,V).call(this,(0,u._)(this,y),(0,u._)(this,B),"_apis","git","repositories",(0,u._)(this,R),"commits");return f.searchParams.set("api-version","6.0"),(0,u._)(this,z)&&f.searchParams.set("searchCriteria.itemVersion.version",(0,u._)(this,z)),f.toString()}getOwner(){return(0,u._)(this,y)}getProject(){return(0,u._)(this,B)}getRepo(){return(0,u._)(this,R)}getPath(){return(0,u._)(this,x)}getRef(){return(0,u._)(this,z)}constructor(f,j,U,dt,et,Mt){(0,b._)(this,w,{writable:!0,value:void 0}),(0,b._)(this,y,{writable:!0,value:void 0}),(0,b._)(this,B,{writable:!0,value:void 0}),(0,b._)(this,R,{writable:!0,value:void 0}),(0,b._)(this,x,{writable:!0,value:void 0}),(0,b._)(this,z,{writable:!0,value:void 0}),(0,b._)(this,V,{writable:!0,value:(...qt)=>{const re=new URL((0,u._)(this,w));return re.pathname=qt.map(ve=>encodeURIComponent(ve)).join("/"),re}}),(0,v._)(this,w,f),(0,v._)(this,y,j),(0,v._)(this,B,U),(0,v._)(this,R,dt),(0,v._)(this,x,et),(0,v._)(this,z,Mt)}}const K="dev.azure.com",W=["clientId","clientSecret","tenantId","personalAccessToken"],_=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function H(L){for(const f of _.entries()){const[j,U]=f,dt=W.filter(et=>!U.includes(et));if(U.every(et=>L[et]!==void 0)&&dt.every(et=>L[et]===void 0))return{kind:j,organizations:L.organizations,...U.reduce((et,Mt)=>(et[Mt]=L[Mt],et),{})}}throw new Error("is not a valid credential")}function J(L){var f,j,U;const dt=(U=L.getOptionalString("host"))!==null&&U!==void 0?U:K;let et=(f=L.getOptionalConfigArray("credentials"))===null||f===void 0?void 0:f.map(zt=>{var Bt,Ce;return{organizations:zt.getOptionalStringArray("organizations"),personalAccessToken:(Bt=zt.getOptionalString("personalAccessToken"))===null||Bt===void 0?void 0:Bt.trim(),tenantId:zt.getOptionalString("tenantId"),clientId:zt.getOptionalString("clientId"),clientSecret:(Ce=zt.getOptionalString("clientSecret"))===null||Ce===void 0?void 0:Ce.trim()}});const Mt=(j=L.getOptionalString("token"))===null||j===void 0?void 0:j.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(Mt!==void 0){const zt=[{personalAccessToken:Mt}];var qt;et=(qt=et==null?void 0:et.concat(zt))!==null&&qt!==void 0?qt:zt}if(L.getOptional("credential")!==void 0){var re,ve;const zt=[{organizations:L.getOptionalStringArray("credential.organizations"),token:(re=L.getOptionalString("credential.token"))===null||re===void 0?void 0:re.trim(),tenantId:L.getOptionalString("credential.tenantId"),clientId:L.getOptionalString("credential.clientId"),clientSecret:(ve=L.getOptionalString("credential.clientSecret"))===null||ve===void 0?void 0:ve.trim()}];var me;et=(me=et==null?void 0:et.concat(zt))!==null&&me!==void 0?me:zt}if(!(0,i.HO)(dt))throw new Error(`Invalid Azure integration config, '${dt}' is not a valid host`);let $t;if(et!==void 0){const zt=et==null?void 0:et.reduce((Bt,Ce,Me)=>{let oe;try{H(Ce)}catch(Ge){oe=Ge.message}return oe!==void 0&&Bt.push(`credential at position ${Me+1} ${oe}`),Bt},Array.of()).concat(Object.entries(et.filter(Bt=>Bt.organizations!==void 0&&Bt.organizations.length>0).reduce((Bt,Ce,Me)=>{var oe;return(oe=Ce.organizations)===null||oe===void 0||oe.forEach(Ge=>{Bt[Ge]||(Bt[Ge]=[]),Bt[Ge].push(Me+1)}),Bt},{})).filter(([Bt,Ce])=>Ce.length>1).reduce((Bt,[Ce,Me])=>(Bt.push(`organization ${Ce} is specified multiple times in credentials at positions ${Me.slice(0,Me.length-1).join(", ")} and ${Me[Me.length-1]}`),Bt),Array.of()));if((zt==null?void 0:zt.length)>0)throw new Error(`Invalid Azure integration config for ${dt}: ${zt.join("; ")}`);if($t=et.map(Bt=>H(Bt)),$t.some(Bt=>Bt.kind!=="PersonalAccessToken")&&dt!==K)throw new Error(`Invalid Azure integration config for ${dt}, only personal access tokens can be used with hosts other than ${K}`);if($t.filter(Bt=>Bt.organizations===void 0||Bt.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${dt}, you cannot specify multiple credentials without organizations`)}return{host:dt,credentials:$t}}function q(L){const f=L.map(J);return f.some(j=>j.host===K)||f.push({host:K}),f}class mt{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const{url:j,base:U}=f;if((0,i.AY)(j))return j;try{const et=tt.fromRepoUrl(U),Mt=new URL(U);var dt;const qt=new URL(`https://a.com${(dt=et.getPath())!==null&&dt!==void 0?dt:""}`),re=new URL(j,qt).pathname;return Mt.searchParams.set("path",re),f.lineNumber&&(Mt.searchParams.set("line",String(f.lineNumber)),Mt.searchParams.set("lineEnd",String(f.lineNumber+1)),Mt.searchParams.set("lineStartColumn","1"),Mt.searchParams.set("lineEndColumn","1")),Mt.toString()}catch{return new URL(j,U).toString()}}resolveEditUrl(f){return f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(mt,"factory",({config:L})=>{var f;const j=q((f=L.getOptionalConfigArray("integrations.azure"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new mt(U)),U=>U.config.host)});var it=t(52536),bt=t.n(it);const ct="bitbucket.org",gt="https://api.bitbucket.org/2.0";function lt(L){var f;const j=ct,U=gt,dt=L.getString("username"),et=(f=L.getString("appPassword"))===null||f===void 0?void 0:f.trim();return{host:j,apiBaseUrl:U,username:dt,appPassword:et}}function rt(L){const f=L.map(lt);return f.length===0&&f.push({host:ct,apiBaseUrl:gt}),f}class vt{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const j=(0,i.ku)(f);if(f.lineNumber){const U=new URL(j);return U.hash=`lines-${f.lineNumber}`,U.toString()}return j}resolveEditUrl(f){const j=bt()(f),U=new URL(f);return U.searchParams.set("mode","edit"),U.searchParams.set("at",j.ref),U.toString()}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(vt,"factory",({config:L})=>{var f;const j=rt((f=L.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new vt(U)),U=>U.config.host)});var yt=t(45250);const Pt="bitbucket.org",pt="https://api.bitbucket.org/2.0";function st(L){var f,j,U;const dt=(U=L.getOptionalString("host"))!==null&&U!==void 0?U:Pt;let et=L.getOptionalString("apiBaseUrl");const Mt=(f=L.getOptionalString("token"))===null||f===void 0?void 0:f.trim(),qt=L.getOptionalString("username"),re=(j=L.getOptionalString("appPassword"))===null||j===void 0?void 0:j.trim();if(!(0,i.HO)(dt))throw new Error(`Invalid Bitbucket integration config, '${dt}' is not a valid host`);return et?et=(0,yt.trimEnd)(et,"/"):dt===Pt?et=pt:et=`https://${dt}/rest/api/1.0`,{host:dt,apiBaseUrl:et,token:Mt,username:qt,appPassword:re}}function ht(L){const f=L.map(st);return f.some(j=>j.host===Pt)||f.push({host:Pt,apiBaseUrl:pt}),f}class ft{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const j=(0,i.ku)(f);if(!f.lineNumber)return j;const U=new URL(j);return this.integrationConfig.host==="bitbucket.org"?U.hash=`lines-${f.lineNumber}`:U.hash=`${f.lineNumber}`,U.toString()}resolveEditUrl(f){const j=bt()(f),U=new URL(f);return U.searchParams.set("mode","edit"),U.searchParams.set("spa","0"),U.searchParams.set("at",j.ref),U.toString()}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(ft,"factory",({config:L})=>{var f,j,U;const dt=ht((U=L.getOptionalConfigArray("integrations.bitbucket"))!==null&&U!==void 0?U:[...(f=L.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&f!==void 0?f:[],...(j=L.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&j!==void 0?j:[]]);return(0,i.oS)(dt.map(et=>new ft(et)),et=>et.config.host)});function wt(L){var f;const j=L.getString("host");let U=L.getOptionalString("apiBaseUrl");const dt=(f=L.getOptionalString("token"))===null||f===void 0?void 0:f.trim(),et=L.getOptionalString("username"),Mt=L.getOptionalString("password");if(!(0,i.HO)(j))throw new Error(`Invalid Bitbucket Server integration config, '${j}' is not a valid host`);return U?U=(0,yt.trimEnd)(U,"/"):U=`https://${j}/rest/api/1.0`,{host:j,apiBaseUrl:U,token:dt,username:et,password:Mt}}function At(L){return L.map(wt)}class N{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const j=(0,i.ku)(f);if(f.lineNumber){const U=new URL(j);return U.hash=f.lineNumber.toString(),U.toString()}return j}resolveEditUrl(f){return f.includes("?")?f.substring(0,f.indexOf("?")):f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(N,"factory",({config:L})=>{var f;const j=At((f=L.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new N(U)),U=>U.config.host)});function G(L){var f;const j=L.getString("host");let U=L.getOptionalString("baseUrl"),dt=L.getOptionalString("cloneUrl"),et=L.getOptionalString("gitilesBaseUrl");const Mt=L.getOptionalString("username"),qt=(f=L.getOptionalString("password"))===null||f===void 0?void 0:f.trim();if((0,i.HO)(j)){if(U&&!(0,i.AY)(U))throw new Error(`Invalid Gerrit integration config, '${U}' is not a valid baseUrl`);if(dt&&!(0,i.AY)(dt))throw new Error(`Invalid Gerrit integration config, '${dt}' is not a valid cloneUrl`);if(et&&!(0,i.AY)(et))throw new Error(`Invalid Gerrit integration config, '${et}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${j}' is not a valid host`);return U?U=(0,yt.trimEnd)(U,"/"):U=`https://${j}`,et?et=(0,yt.trimEnd)(et,"/"):et=`https://${j}`,dt?dt=(0,yt.trimEnd)(dt,"/"):dt=U,{host:j,baseUrl:U,cloneUrl:dt,gitilesBaseUrl:et,username:Mt,password:qt}}function Et(L){return L.map(G)}var Ot=t(1048).hp;const Ft=")]}'";function Tt(L,f){const j=new URL(L.gitilesBaseUrl),U=new URL(f),et=U.pathname.substring(U.pathname.startsWith("/a/")?2:0).replace(j.pathname,"").split("/").filter($t=>!!$t),Mt=et.indexOf("+");if(Mt<=0)throw new Error(`Unable to parse project from url: ${f}`);const qt=(0,yt.trimStart)(et.slice(0,Mt).join("/"),"/"),re=et.indexOf("heads");if(re<=0)throw new Error(`Unable to parse branch from url: ${f}`);const ve=et[re+1],me=et.slice(re+2).join("/");return{branch:ve,filePath:me===""?"/":me,project:qt}}function Dt(L,f,j,U){return`${L.gitilesBaseUrl}/${f}/+/refs/heads/${j}/${(0,yt.trimStart)(U,"/")}`}function kt(L,f,j,U){const dt=U==="/"||U===""?".tar.gz":`/${U}.tar.gz`;return`${Wt(L)}/${f}/+archive/refs/heads/${j}${dt}`}function St(L){return L.password?"/a/":"/"}function Wt(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(St(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 Jt(L,f){const{branch:j,project:U}=Tt(L,f);return`${L.baseUrl}${St(L)}projects/${encodeURIComponent(U)}/branches/${j}`}function ue(L,f){const{project:j}=Tt(L,f);return`${L.cloneUrl}${St(L)}${j}`}function ae(L,f){const{branch:j,filePath:U,project:dt}=Tt(L,f);return`${L.baseUrl}${St(L)}projects/${encodeURIComponent(dt)}/branches/${j}/files/${encodeURIComponent(U)}/content`}function le(L){return`${L.baseUrl}${St(L)}projects/`}function Ht(L){const f={};if(!L.password)return f;const j=Ot.from(`${L.username}:${L.password}`,"utf8");return f.Authorization=`Basic ${j.toString("base64")}`,{headers:f}}async function Xt(L){const f=await L.text();if(f.startsWith(Ft))try{return JSON.parse(f.slice(Ft.length))}catch(j){throw new Error(`Invalid response from Gerrit: ${f.slice(0,10)} - ${j}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${f.slice(0,10)}`)}class ge{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){const{url:j,base:U,lineNumber:dt}=f;let et;if(j.startsWith("/")){const{branch:Mt,project:qt}=Tt(this.config,U);return Dt(this.config,qt,Mt,j)}return j?et=new URL(j,U):et=new URL(U),dt&&(et.hash=dt.toString()),et.toString()}resolveEditUrl(f){return f}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(ge,"factory",({config:L})=>{var f;const j=Et((f=L.getOptionalConfigArray("integrations.gerrit"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new ge(U)),U=>U.config.host)});var Ke=t(36021);const Fe="gitlab.com",_e="https://gitlab.com/api/v4";function we(L){var f;const j=L.getString("host");let U=L.getOptionalString("apiBaseUrl");const dt=(f=L.getOptionalString("token"))===null||f===void 0?void 0:f.trim();let et=L.getOptionalString("baseUrl");if(U?U=(0,yt.trimEnd)(U,"/"):j===Fe&&(U=_e),et?et=(0,yt.trimEnd)(et,"/"):et=`https://${j}`,(0,i.HO)(j)){if(!U||!(0,i.AY)(U))throw new Error(`Invalid GitLab integration config, '${U}' is not a valid apiBaseUrl`);if(!(0,i.AY)(et))throw new Error(`Invalid GitLab integration config, '${et}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${j}' is not a valid host`);return{host:j,token:dt,apiBaseUrl:U,baseUrl:et}}function sn(L){const f=L.map(we);return f.some(j=>j.host===Fe)||f.push({host:Fe,apiBaseUrl:_e,baseUrl:`https://${Fe}`}),f}function Xe(L){let f="";return L.host!==Fe&&(f=new URL(L.baseUrl).pathname),trimEnd(f,"/")}class ne{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(f){return(0,i.ku)(f)}resolveEditUrl(f){return ze(f,"edit")}constructor(f){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=f}}(0,o._)(ne,"factory",({config:L})=>{var f;const j=sn((f=L.getOptionalConfigArray("integrations.gitlab"))!==null&&f!==void 0?f:[]);return(0,i.oS)(j.map(U=>new ne(U)),U=>U.config.host)});function ze(L,f){return L.replace(/\/\-\/(blob|tree|edit)\//,`/-/${f}/`)}function He(L){var f;const j=L.getString("host");let U=L.getOptionalString("baseUrl");const dt=L.getOptionalString("username"),et=(f=L.getOptionalString("password"))===null||f===void 0?void 0:f.trim();if((0,i.HO)(j)){if(U&&!(0,i.AY)(U))throw new Error(`Invalid Gitea integration config, '${U}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${j}' is not a valid host`);return U?U=(0,yt.trimEnd)(U,"/"):U=`https://${j}`,{host:j,baseUrl:U,username:dt,password:et}}var qe=t(1048).hp;function Ye(L,f){const j=he(L,f);return`${j.url}/${j.owner}/${j.name}/_edit/${j.ref}/${j.path}`}function xe(L,f){const j=he(L,f);return`${j.url}/api/v1/repos/${j.owner}/${j.name}/contents/${j.path}?ref=${j.ref}`}function an(L,f){const j=he(L,f);return`${j.url}/api/v1/repos/${j.owner}/${j.name}/archive/${j.ref}.tar.gz`}function ln(L,f){const j=he(L,f);return`${j.url}/api/v1/repos/${j.owner}/${j.name}/git/commits/${j.ref}`}function cn(L){const f={},{username:j,password:U}=L;return U?(j?f.Authorization=`basic ${qe.from(`${j}:${U}`).toString("base64")}`:f.Authorization=`token ${U}`,{headers:f}):f}function he(L,f){var j;const U=(j=L.baseUrl)!==null&&j!==void 0?j:`https://${L.host}`;try{const[dt,et,Mt,qt,re,ve,...me]=f.replace(U,"").split("/"),$t=me.join("/").replace(/^\//,"");return{url:U,owner:et,name:Mt,ref:ve,path:$t}}catch(dt){throw new Error(`Incorrect URL: ${f}, ${dt}`)}}class Ie{get type(){return"gitea"}get title(){return this.config.host}resolveUrl(f){return(0,i.ku)(f)}resolveEditUrl(f){return Ye(this.config,f)}constructor(f){(0,o._)(this,"config",void 0),this.config=f}}(0,o._)(Ie,"factory",({config:L})=>{var f;const U=((f=L.getOptionalConfigArray("integrations.gitea"))!==null&&f!==void 0?f:[]).map(dt=>He(dt));return(0,i.oS)(U.map(dt=>new Ie(dt)),dt=>dt.config.host)});class Ve{static fromConfig(f){return new Ve({awsS3:g.factory({config:f}),awsCodeCommit:A.factory({config:f}),azure:mt.factory({config:f}),bitbucket:ft.factory({config:f}),bitbucketCloud:vt.factory({config:f}),bitbucketServer:N.factory({config:f}),gerrit:ge.factory({config:f}),github:Ke.U.factory({config:f}),gitlab:ne.factory({config:f}),gitea:Ie.factory({config:f})})}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}list(){return Object.values(this.byType).flatMap(f=>f.list())}byUrl(f){let j=Object.values(this.byType).map(U=>U.byUrl(f)).filter(Boolean);if(j.length>1){const U=j.filter(dt=>!(dt instanceof ft));U.length!==0&&(j=U)}return j[0]}byHost(f){return Object.values(this.byType).map(j=>j.byHost(f)).find(Boolean)}resolveUrl(f){const j=this.byUrl(f.base);return j?j.resolveUrl(f):(0,i.ku)(f)}resolveEditUrl(f){const j=this.byUrl(f);return j?j.resolveEditUrl(f):f}constructor(f){(0,o._)(this,"byType",void 0),this.byType=f}}var Qe=t(55309);class De{static fromConfig(f){return Ve.fromConfig(f)}}const $e=(0,Qe.y)({id:"integration.scmintegrations"})},36021:function(Y,T,t){"use strict";t.d(T,{U:function(){return C},F:function(){return A}});var o=t(18990),i=t(59869),d=t(45250);const O="github.com",m="https://api.github.com",g="https://raw.githubusercontent.com";function h(P){var u,b,v;const D=(v=P.getOptionalString("host"))!==null&&v!==void 0?v:O;let w=P.getOptionalString("apiBaseUrl"),y=P.getOptionalString("rawBaseUrl");const B=(u=P.getOptionalString("token"))===null||u===void 0?void 0:u.trim(),R=(b=P.getOptionalConfigArray("apps"))===null||b===void 0?void 0:b.map(x=>({appId:x.getNumber("appId"),clientId:x.getString("clientId"),clientSecret:x.getString("clientSecret"),webhookSecret:x.getString("webhookSecret"),privateKey:x.getString("privateKey"),allowedInstallationOwners:x.getOptionalStringArray("allowedInstallationOwners")}));if(!(0,i.HO)(D))throw new Error(`Invalid GitHub integration config, '${D}' is not a valid host`);return w?w=(0,d.trimEnd)(w,"/"):D===O&&(w=m),y?y=(0,d.trimEnd)(y,"/"):D===O&&(y=g),{host:D,apiBaseUrl:w,rawBaseUrl:y,token:B,apps:R}}function c(P){const u=P.map(h);return u.some(b=>b.host===O)||u.push({host:O,apiBaseUrl:m,rawBaseUrl:g}),u}class C{get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return A((0,i.ku)(u),"tree")}resolveEditUrl(u){return A(u,"edit")}parseRateLimitInfo(u){return{isRateLimited:u.status===429||u.status===403&&u.headers.get("x-ratelimit-remaining")==="0"}}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(C,"factory",({config:P})=>{var u;const b=c((u=P.getOptionalConfigArray("integrations.github"))!==null&&u!==void 0?u:[]);return(0,i.oS)(b.map(v=>new C(v)),v=>v.config.host)});function A(P,u){return P.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(b,v,D,w)=>`//${v}/${D}/${w}/${u}/`)}},59869:function(Y,T,t){"use strict";t.d(T,{AY:function(){return g},HO:function(){return m},ku:function(){return c},oS:function(){return h}});var o=t(52536),i=t.n(o),d=t(45250),O=t.n(d);function m(A){const P=new URL("http://example.com");return P.host=A,P.host===A}function g(A){try{return new URL(A),!0}catch{return!1}}function h(A,P){return{list(){return A},byUrl(u){try{const b=typeof u=="string"?new URL(u):u;return A.find(v=>P(v)===b.host)}catch{return}},byHost(u){return A.find(b=>P(b)===u)}}}function c(A){const{url:P,base:u,lineNumber:b}=A;try{return new URL(P),P}catch{}let v;if(P.startsWith("/")){const{href:D,filepath:w}=i()(u);v=new URL(D);const y=(0,d.trimEnd)(v.pathname.substring(0,v.pathname.length-w.length),"/");v.pathname=`${y}${P}`}else v=new URL(P,u);return v.search=new URL(u).search,b&&(v.hash=`L${b}`),v.toString()}function C(A){beforeAll(()=>A.listen({onUnhandledRequest:"error"})),afterAll(()=>A.close()),afterEach(()=>A.resetHandlers())}},85318:function(Y,T,t){"use strict";var o={};t.r(o),t.d(o,{TechDocsPlugin:function(){return g.Ju}});var i=t(31085),d=t(14041),O=t(25873),m=t(18690),g=t(39278),h=t(85920),c=t(72020),C=t(99730),A=t(64947),P=t(12173),u=t(22020),b=t(68146),v=t(73970);function D({children:r}){return(0,m.Ri)()?(0,i.jsx)(i.Fragment,{children:r}):(0,i.jsx)(m.fS,{children:r})}const w=()=>(0,i.jsx)(P.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),y=({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,i.jsx)(D,{children:(0,i.jsx)(P.M,{statusMessage:n,stack:e.stack})})},B=({error:r,resetError:e,plugin:n})=>(0,i.jsx)(u.b,{title:`Error in ${n==null?void 0:n.getId()}`,defaultExpanded:!0,error:r,children:(0,i.jsx)(A.A,{variant:"outlined",onClick:e,children:"Retry"})}),R={Progress:b.k,Router:v.Kd,NotFoundErrorPage:w,BootErrorPage:y,ErrorBoundaryFallback:B};var x=t(18990);const z="Invalid discovery URL pattern,";class V{static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),s=n.join("pluginId");let a;try{a=new URL(s)}catch{throw new Error(`${z} URL '${s}' is invalid`)}if(a.hash)throw new Error(`${z} URL must not have a hash`);if(a.search)throw new Error(`${z} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${z} URL must not end with a slash`);return new V(n)}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}constructor(e){(0,x._)(this,"parts",void 0),this.parts=e}}var tt=t(96403),K=t.n(tt);let W=Symbol.observable;class _{[W](){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,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(){(0,x._)(this,"isClosed",!1),(0,x._)(this,"terminatingError",void 0),(0,x._)(this,"observable",new(K())(e=>this.isClosed?(this.terminatingError?e.error(this.terminatingError):e.complete(),()=>{}):(this.subscribers.add(e),()=>{this.subscribers.delete(e)}))),(0,x._)(this,"subscribers",new Set)}}let H=Symbol.observable;class J{[H](){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,s){const a=typeof e=="function"?{next:e,error:n,complete:s}:e;return this.observable.subscribe(a)}constructor(e){(0,x._)(this,"isClosed",void 0),(0,x._)(this,"currentValue",void 0),(0,x._)(this,"terminatingError",void 0),(0,x._)(this,"observable",void 0),(0,x._)(this,"subscribers",new Set),this.isClosed=!1,this.currentValue=e,this.terminatingError=void 0,this.observable=new(K())(n=>this.isClosed?(this.terminatingError?n.error(this.terminatingError):n.complete(),()=>{}):(n.next(this.currentValue),this.subscribers.add(n),()=>{this.subscribers.delete(n)}))}}class q{post(e){this.subject.next(e)}alert$(){return this.subject}constructor(){(0,x._)(this,"subject",new _)}}class mt{captureEvent(e){}}class it{post(e,n){return n!=null&&n.hidden||this.alertApi.post({message:e.message,severity:"error"}),this.errorApi.post(e,n)}error$(){return this.errorApi.error$()}constructor(e,n){(0,x._)(this,"alertApi",void 0),(0,x._)(this,"errorApi",void 0),this.alertApi=e,this.errorApi=n}}class bt{post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}constructor(){(0,x._)(this,"subject",new _)}}class ct{static forward(e,n){window.addEventListener("unhandledrejection",s=>{e.post(s.reason,n)})}}const gt=new Map;class lt{static create(e){var n;return new lt((n=e.namespace)!==null&&n!==void 0?n:"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[s,a]of gt.entries()){var n;!((n=e.key)===null||n===void 0)&&n.startsWith(s)&&a.handleStorageChange(e.key)}})}get(e){return this.snapshot(e).value}snapshot(e){let n,s="absent";try{const a=localStorage.getItem(this.getKeyName(e));a&&(n=JSON.parse(a,(l,S)=>(typeof S=="object"&&S!==null&&Object.freeze(S),S)),s="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:s}}forBucket(e){const n=`${this.namespace}/${e}`;return gt.has(n)||gt.set(n,new lt(n,this.errorApi)),gt.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 lt.hasSubscribed||(lt.addStorageEventListener(),lt.hasSubscribed=!0),this.observable.filter(({key:n})=>n===e)}handleStorageChange(e){if(!(e!=null&&e.startsWith(this.namespace)))return;const n=e==null?void 0: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 s of this.subscribers)s.next(n)}constructor(e,n){(0,x._)(this,"namespace",void 0),(0,x._)(this,"errorApi",void 0),(0,x._)(this,"subscribers",void 0),(0,x._)(this,"observable",void 0),this.namespace=e,this.errorApi=n,this.subscribers=new Set,this.observable=new(K())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)}))}}(0,x._)(lt,"hasSubscribed",!1);function rt(r){let e=r.baseImplementation||t.g.fetch;var n;const s=[(n=r.middleware)!==null&&n!==void 0?n:[]].flat().reverse();for(const a of s)e=a.apply(e);return{fetch:e}}class vt{static create(e){var n,s;const a=yt(e),l=((n=e.header)===null||n===void 0?void 0:n.name)||"authorization",S=((s=e.header)===null||s===void 0?void 0:s.value)||(E=>`Bearer ${E}`);return new vt(e.identityApi,a,l,S)}apply(e){return async(n,s)=>{const a=new Request(n,s),{token:l}=await this.identityApi.getCredentials();return a.headers.get(this.headerName)||typeof l!="string"||!l||!this.allowUrl(a.url)?e(n,s):(a.headers.set(this.headerName,this.headerValue(l)),e(a))}}constructor(e,n,s,a){(0,x._)(this,"identityApi",void 0),(0,x._)(this,"allowUrl",void 0),(0,x._)(this,"headerName",void 0),(0,x._)(this,"headerValue",void 0),this.identityApi=e,this.allowUrl=n,this.headerName=s,this.headerValue=a}}function yt(r){return r.allowUrl?r.allowUrl:r.urlPrefixAllowlist?Pt(r.urlPrefixAllowlist):r.config?Pt([r.config.getString("backend.baseUrl")]):()=>!1}function Pt(r){const e=r.map(n=>n.replace(/\/$/,""));return n=>e.some(s=>n===s||n.startsWith(`${s}/`))}function pt(r,e){return!e||e==="/"?r:`${r.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class st{apply(e){return async(n,s)=>{const a=new Request(n,s),l="plugin://";if(!a.url.startsWith(l))return e(n,s);const{hostname:S,pathname:E,search:M,hash:k,username:Z,password:nt}=new URL(`http://${a.url.substring(l.length)}`);let ot=await this.discoveryApi.getBaseUrl(S);if(Z||nt){const xt=new URL(ot),Lt=`${Z}${nt?`:${nt}`:""}@`;ot=`${xt.protocol}//${Lt}${xt.host}${xt.pathname}`}const ut=`${pt(ot,E)}${M}${k}`;return e(ut,typeof n=="string"||ht(n)?s:n)}}constructor(e){(0,x._)(this,"discoveryApi",void 0),this.discoveryApi=e}}function ht(r){return typeof r=="object"&&(r==null?void 0:r.constructor)===URL}class ft{static resolvePluginProtocol(e){return new st(e.discoveryApi)}static injectIdentityAuth(e){return vt.create(e)}constructor(){}}function wt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}function At(r,...e){const n=new Set(r);for(const s of e)for(const a of s)n.add(a);return n}class N{request(e){return new Promise((n,s)=>{this.requests.push({scopes:e,resolve:n,reject:s}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(s=>wt(e,s.scopes)?(s.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,s)=>At(n,s.scopes),this.requests[0].scopes);return{scopes:e,resolve:n=>{e&&this.resolve(e,n)},reject:n=>{e&&this.reject(n)}}}constructor(){(0,x._)(this,"requests",[]),(0,x._)(this,"subject",new J(this.getCurrentPending()))}}class G{createAuthRequester(e){const n=new N,s=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:a=>{const l=this.currentRequests.slice(),S=this.makeAuthRequest(a,e);S?l[s]=S:delete l[s],this.currentRequests=l,this.subject.next(l.filter(Boolean))}}),a=>n.request(a)}makeAuthRequest(e,n){const{scopes:s}=e;if(s)return{provider:n.provider,trigger:async()=>{const a=await n.onAuthRequest(s);e.resolve(a)},reject:()=>{const a=new Error("Login failed, rejected by user");a.name="RejectedError",e.reject(a)}}}authRequest$(){return this.subject}constructor(){(0,x._)(this,"subject",new J([])),(0,x._)(this,"currentRequests",[]),(0,x._)(this,"handlerCount",0)}}function Et(r){return new Promise((e,n)=>{const s=r.width||500,a=r.height||700,l=window.screen.width/2-s/2,S=window.screen.height/2-a/2,E=window.open(r.url,r.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${s},height=${a},top=${S},left=${l}`);let M="";if(!E||typeof E.closed=="undefined"||E.closed){const ot=new Error("Failed to open auth popup.");ot.name="PopupRejectedError",n(ot);return}const k=ot=>{if(ot.source!==E||ot.origin!==r.origin)return;const{data:ut}=ot;if(ut.type==="config_info"){M=ut.targetOrigin;return}if(ut.type!=="authorization_response")return;const xt=ut;if("error"in xt){const Lt=new Error(xt.error.message);Lt.name=xt.error.name,n(Lt)}else e(xt.response);nt()},Z=setInterval(()=>{if(E.closed){const ot=`Login failed, ${M&&M!==window.location.origin?`Incorrect app origin, expected ${M}`:"popup was closed"}`,ut=new Error(ot);ut.name="PopupClosedError",n(ut),nt()}},100);function nt(){window.removeEventListener("message",k),clearInterval(Z)}window.addEventListener("message",k)})}let Ot=!1;function Ft(r){return[...r].join(" ")}class Tt{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(a=>{throw new Error(`Auth refresh request failed, ${a}`)});if(!n.ok){const a=new Error(`Auth refresh request failed, ${n.statusText}`);throw a.status=n.status,a}const s=await n.json();if(s.error){const a=new Error(s.error.message);throw s.error.name&&(a.name=s.error.name),a}return await this.sessionTransform(s)}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){var n,s,a,l,S,E,M,k;const Z=this.joinScopesFunc(e),nt=await this.buildUrl("/start",{scope:Z,origin:window.location.origin,flow:"popup"}),ot=!((s=this.popupOptions)===null||s===void 0||(n=s.size)===null||n===void 0)&&n.fullscreen?window.screen.width:((l=this.popupOptions)===null||l===void 0||(a=l.size)===null||a===void 0?void 0:a.width)||450,ut=!((E=this.popupOptions)===null||E===void 0||(S=E.size)===null||S===void 0)&&S.fullscreen?window.screen.height:((k=this.popupOptions)===null||k===void 0||(M=k.size)===null||M===void 0?void 0:M.height)||730,xt=await Et({url:nt,name:`${this.provider.title} Login`,origin:new URL(nt).origin,width:ot,height:ut});return await this.sessionTransform(xt)}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 s=await this.discoveryApi.getBaseUrl("auth"),a=this.buildQueryString({...n,env:this.environment});return`${s}/${this.provider.id}${e}${a}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([s,a])=>{if(typeof a=="string")return`${encodeURIComponent(s)}=${encodeURIComponent(a)}`;if(a)return encodeURIComponent(s)}).filter(Boolean).join("&");return n?`?${n}`:""}constructor(e){(0,x._)(this,"discoveryApi",void 0),(0,x._)(this,"environment",void 0),(0,x._)(this,"provider",void 0),(0,x._)(this,"joinScopesFunc",void 0),(0,x._)(this,"authRequester",void 0),(0,x._)(this,"sessionTransform",void 0),(0,x._)(this,"enableExperimentalRedirectFlow",void 0),(0,x._)(this,"popupOptions",void 0);const{configApi:n,discoveryApi:s,environment:a,provider:l,joinScopes:S=Ft,oauthRequestApi:E,sessionTransform:M=nt=>nt,popupOptions:k}=e;!Ot&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),Ot=!0);var Z;this.enableExperimentalRedirectFlow=n&&(Z=n.getOptionalBoolean("enableExperimentalRedirectFlow"))!==null&&Z!==void 0?Z:!1,this.authRequester=E.createAuthRequester({provider:l,onAuthRequest:async nt=>this.enableExperimentalRedirectFlow?this.executeRedirect(nt):this.showPopup(nt)}),this.discoveryApi=s,this.environment=a,this.provider=l,this.joinScopesFunc=S,this.sessionTransform=M,this.popupOptions=k}}function Dt(r,e){for(const n of e)if(!r.has(n))return!1;return!0}class kt{sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const s=this.options.sessionScopes(e);return Dt(s,n)}getExtendedScope(e,n){const s=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const a=this.options.sessionScopes(e);for(const l of a)s.add(l)}if(n)for(const a of n)s.add(a);return s}constructor(e){(0,x._)(this,"options",void 0),this.options=e}}var St=t(55309),Wt;(function(r){r.SignedIn="SignedIn",r.SignedOut="SignedOut"})(Wt||(Wt={}));const Jt=(0,St.y)({id:"core.auth.google"}),ue=(0,St.y)({id:"core.auth.github"}),ae=(0,St.y)({id:"core.auth.okta"}),le=(0,St.y)({id:"core.auth.gitlab"}),Ht=(0,St.y)({id:"core.auth.microsoft"}),Xt=(0,St.y)({id:"core.auth.onelogin"}),ge=(0,St.y)({id:"core.auth.bitbucket"}),Ke=(0,St.y)({id:"core.auth.bitbucket-server"}),Fe=(0,St.y)({id:"core.auth.atlassian"}),_e=(0,St.y)({id:"core.auth.vmware-cloud"});class we{setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Wt.SignedIn:Wt.SignedOut))}sessionState$(){return this.subject}constructor(){(0,x._)(this,"subject",new J(Wt.SignedOut)),(0,x._)(this,"signedIn",!1)}}class sn{async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const s=await this.collapsedSessionRefresh(e.scopes),a=this.sessionScopesFunc(this.currentSession),l=this.sessionScopesFunc(s);return Dt(l,a)&&(this.currentSession=s),s}catch(s){if(e.optional)return;throw s}}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}}constructor(e){(0,x._)(this,"connector",void 0),(0,x._)(this,"helper",void 0),(0,x._)(this,"sessionScopesFunc",void 0),(0,x._)(this,"sessionShouldRefreshFunc",void 0),(0,x._)(this,"stateTracker",new we),(0,x._)(this,"refreshPromise",void 0),(0,x._)(this,"currentSession",void 0);const{connector:n,defaultScopes:s=new Set,sessionScopes:a,sessionShouldRefresh:l}=e;this.connector=n,this.sessionScopesFunc=a,this.sessionShouldRefreshFunc=l,this.helper=new kt({sessionScopes:a,defaultScopes:s})}}const Xe={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class ne{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Xe,oauthRequestApi:S,defaultScopes:E=[],scopeTransform:M=ot=>ot,popupOptions:k}=e,Z=new Tt({configApi:n,discoveryApi:s,environment:a,provider:l,oauthRequestApi:S,sessionTransform({backstageIdentity:ot,...ut}){const xt={...ut,providerInfo:{idToken:ut.providerInfo.idToken,accessToken:ut.providerInfo.accessToken,scopes:ne.normalizeScopes(M,ut.providerInfo.scope),expiresAt:ut.providerInfo.expiresInSeconds?new Date(Date.now()+ut.providerInfo.expiresInSeconds*1e3):void 0}};if(ot){var Lt;const Nt=(Lt=ot.expiresInSeconds)!==null&&Lt!==void 0?Lt:ut.providerInfo.expiresInSeconds;xt.backstageIdentity={token:ot.token,identity:ot.identity,expiresAt:Nt?new Date(Date.now()+Nt*1e3):void 0}}return xt},popupOptions:k}),nt=new sn({connector:Z,defaultScopes:new Set(E),sessionScopes:ot=>ot.providerInfo.scopes,sessionShouldRefresh:ot=>{var ut,xt;let Lt=1/0;return!((ut=ot.providerInfo)===null||ut===void 0)&&ut.expiresAt&&(Lt=Math.min(Lt,(ot.providerInfo.expiresAt.getTime()-Date.now())/1e3)),!((xt=ot.backstageIdentity)===null||xt===void 0)&&xt.expiresAt&&(Lt=Math.min(Lt,(ot.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),Lt<60*5}});return new ne({sessionManager:nt,scopeTransform:M})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const s=ne.normalizeScopes(this.scopeTransform,e),a=await this.sessionManager.getSession({...n,scopes:s});var l;return(l=a==null?void 0:a.providerInfo.accessToken)!==null&&l!==void 0?l:""}async getIdToken(e={}){const n=await this.sessionManager.getSession({...e,scopes:new Set(["openid"])});var s;return(s=n==null?void 0:n.providerInfo.idToken)!==null&&s!==void 0?s:""}async getBackstageIdentity(e={}){const n=await this.sessionManager.getSession(e);return n==null?void 0:n.backstageIdentity}async getProfile(e={}){const n=await this.sessionManager.getSession(e);return n==null?void 0:n.profile}static normalizeScopes(e,n){if(!n)return new Set;const s=Array.isArray(n)?n:n.split(/[\s|,]/).filter(Boolean);return new Set(e(s))}constructor(e){(0,x._)(this,"sessionManager",void 0),(0,x._)(this,"scopeTransform",void 0),this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}}const ze={id:"google",title:"Google",icon:()=>null},He="https://www.googleapis.com/auth/";class qe{static create(e){const{configApi:n,discoveryApi:s,oauthRequestApi:a,environment:l="development",provider:S=ze,defaultScopes:E=["openid",`${He}userinfo.email`,`${He}userinfo.profile`]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:S,environment:l,defaultScopes:E,scopeTransform(M){return M.map(k=>k==="openid"?k:k==="profile"||k==="email"?`${He}userinfo.${k}`:k.startsWith(He)?k:`${He}${k}`)}})}}const Ye={id:"microsoft",title:"Microsoft",icon:()=>null};class xe{static create(e){return new xe(e)}microsoftGraph(){return this.oauth2[xe.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(xe.resourceForScope).filter(l=>l!=="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.`));var s;const a=(s=n[0])!==null&&s!==void 0?s:xe.MicrosoftGraphID;return Promise.resolve(a)}static resourceForScope(e){var n;const s=(n=e.match(RegExp("^(?<resourceURI>.*)\\/(?<scp>[^\\/]*)$")))===null||n===void 0?void 0:n.groups;if(s){const{resourceURI:a}=s;return a.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return xe.MicrosoftGraphID}}async getAccessToken(e,n){const s=e===void 0?xe.MicrosoftGraphID:await xe.resourceForScopes(Array.isArray(e)?e.join(" "):e);return s in this.oauth2||(this.oauth2[s]=ne.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[s].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$()}constructor(e){(0,x._)(this,"oauth2",void 0),(0,x._)(this,"configApi",void 0),(0,x._)(this,"environment",void 0),(0,x._)(this,"provider",void 0),(0,x._)(this,"oauthRequestApi",void 0),(0,x._)(this,"discoveryApi",void 0),(0,x._)(this,"scopeTransform",void 0);const{configApi:n,environment:s="development",provider:a=Ye,oauthRequestApi:l,discoveryApi:S,defaultScopes:E=["openid","offline_access","profile","email","User.Read"],scopeTransform:M=k=>k.concat("offline_access")}=e;this.configApi=n,this.environment=s,this.provider=a,this.oauthRequestApi=l,this.discoveryApi=S,this.scopeTransform=M,this.oauth2={[xe.MicrosoftGraphID]:ne.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:E})}}}(0,x._)(xe,"MicrosoftGraphID","00000003-0000-0000-c000-000000000000");const an={id:"github",title:"GitHub",icon:()=>null};class ln{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=an,oauthRequestApi:S,defaultScopes:E=["read:user"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:E})}}const cn={id:"okta",title:"Okta",icon:()=>null},he=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Ie="okta.";class Ve{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=cn,oauthRequestApi:S,defaultScopes:E=["openid","email","profile","offline_access"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:E,scopeTransform(M){return M.map(k=>he.has(k)||k.startsWith(Ie)?k:`${Ie}${k}`)}})}}const Qe={id:"gitlab",title:"GitLab",icon:()=>null};class De{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=Qe,oauthRequestApi:S,defaultScopes:E=["read_user"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:E})}}const $e={id:"onelogin",title:"onelogin",icon:()=>null},L=new Set(["openid","profile","email","phone","address","groups","offline_access"]),f="onelogin.";class j{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=$e,oauthRequestApi:S}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(E){return E.map(M=>L.has(M)||M.startsWith(f)?M:`${f}${M}`)}})}}const U={id:"bitbucket",title:"Bitbucket",icon:()=>null};class dt{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=U,oauthRequestApi:S,defaultScopes:E=["account"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:E})}}const et={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class Mt{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=et,oauthRequestApi:S,defaultScopes:E=["PROJECT_ADMIN"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a,defaultScopes:E})}}const qt={id:"atlassian",title:"Atlassian",icon:()=>null};class re{static create(e){const{configApi:n,discoveryApi:s,environment:a="development",provider:l=qt,oauthRequestApi:S}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:S,provider:l,environment:a})}}const ve={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class me{static create(e){const{configApi:n,discoveryApi:s,oauthRequestApi:a,environment:l="development",provider:S=ve,defaultScopes:E=["openid"]}=e;return ne.create({configApi:n,discoveryApi:s,oauthRequestApi:a,provider:S,environment:l,defaultScopes:E})}}var $t=t(12935),zt=t(57405),Bt=t(65461),Ce=t(36017),Me=t(99303),oe=t(39837);const Ge=(0,St.y)({id:"core.storage"});var On=t(70795),dn=t(16009);const Le=(0,St.y)({id:"core.oauthrequest"});var wo=t(96824),tn=t(70835),To=t(10288),Gn=t.n(To),Ro=t(52964),Qt=t(46195),en=t(54241);const pn=Qt.z.lazy(()=>Qt.z.object({rule:Qt.z.string(),resourceType:Qt.z.string(),params:Qt.z.record(Qt.z.any()).optional()}).or(Qt.z.object({anyOf:Qt.z.array(pn).nonempty()})).or(Qt.z.object({allOf:Qt.z.array(pn).nonempty()})).or(Qt.z.object({not:pn}))),_n=Qt.z.object({result:Qt.z.literal(en.b.ALLOW).or(Qt.z.literal(en.b.DENY))}),Io=Qt.z.union([Qt.z.object({result:Qt.z.literal(en.b.ALLOW).or(Qt.z.literal(en.b.DENY))}),Qt.z.object({result:Qt.z.literal(en.b.CONDITIONAL),pluginId:Qt.z.string(),resourceType:Qt.z.string(),conditions:pn})]),Do=(r,e)=>Qt.z.object({items:Qt.z.array(Qt.z.intersection(Qt.z.object({id:Qt.z.string()}),r)).refine(n=>n.length===e.size&&n.every(({id:s})=>e.has(s)),{message:"Items in response do not match request"})});class Mo{async authorize(e,n){return this.makeRequest(e,_n,n)}async authorizeConditional(e,n){return this.makeRequest(e,Io,n)}async makeRequest(e,n,s){if(!this.enabled)return e.map(Z=>({result:en.b.ALLOW}));const a={items:e.map(Z=>({id:Ro.A(),...Z}))},l=await this.discovery.getBaseUrl("permission"),S=await Gn()(`${l}/authorize`,{method:"POST",body:JSON.stringify(a),headers:{...this.getAuthorizationHeader(s==null?void 0:s.token),"content-type":"application/json"}});if(!S.ok)throw await tn.o.fromResponse(S);const E=await S.json(),k=Do(n,new Set(a.items.map(({id:Z})=>Z))).parse(E).items.reduce((Z,nt)=>(Z[nt.id]=nt,Z),{});return a.items.map(Z=>k[Z.id])}getAuthorizationHeader(e){return e?{Authorization:`Bearer ${e}`}:{}}constructor(e){(0,x._)(this,"enabled",void 0),(0,x._)(this,"discovery",void 0),this.discovery=e.discovery;var n;this.enabled=(n=e.config.getOptionalBoolean("permission.enabled"))!==null&&n!==void 0?n:!1}}class Pn{static create(e){const{config:n,discovery:s,identity:a}=e,l=new Mo({discovery:s,config:n});return new Pn(l,a)}async authorize(e){return(await this.permissionClient.authorize([e],await this.identityApi.getCredentials()))[0]}constructor(e,n){(0,x._)(this,"permissionClient",void 0),(0,x._)(this,"identityApi",void 0),this.permissionClient=e,this.identityApi=n}}const Lo=[(0,$t.b)({api:zt.I,deps:{configApi:Bt.U},factory:({configApi:r})=>V.compile(`${r.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,$t.b)({api:Ce.k,deps:{},factory:()=>new q}),(0,$t.b)({api:Me.c,deps:{},factory:()=>new mt}),(0,$t.b)({api:oe.m,deps:{alertApi:Ce.k},factory:({alertApi:r})=>{const e=new it(r,new bt);return ct.forward(e,{hidden:!1}),e}}),(0,$t.b)({api:Ge,deps:{errorApi:oe.m},factory:({errorApi:r})=>lt.create({errorApi:r})}),(0,$t.b)({api:On.a,deps:{configApi:Bt.U,identityApi:dn.K,discoveryApi:zt.I},factory:({configApi:r,identityApi:e,discoveryApi:n})=>rt({middleware:[ft.resolvePluginProtocol({discoveryApi:n}),ft.injectIdentityAuth({identityApi:e,config:r})]})}),(0,$t.b)({api:Le,deps:{},factory:()=>new G}),(0,$t.b)({api:Jt,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>qe.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:Ht,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>xe.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:ue,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>ln.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:ae,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Ve.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:le,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>De.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:Xt,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>j.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:ge,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>dt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:Ke,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>Mt.create({configApi:n,discoveryApi:r,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,$t.b)({api:Fe,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>re.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:_e,deps:{discoveryApi:zt.I,oauthRequestApi:Le,configApi:Bt.U},factory:({discoveryApi:r,oauthRequestApi:e,configApi:n})=>me.create({configApi:n,discoveryApi:r,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,$t.b)({api:wo.x,deps:{discovery:zt.I,identity:dn.K,config:Bt.U},factory:({config:r,discovery:e,identity:n})=>Pn.create({config:r,discovery:e,identity:n})})];var wn=t(14451),Tn=t(27799),Yn=t(94389),Bo=t(20947),jo=t(20473),Uo=t(45917),Fo=t(39347),$o=t(63309),No=t(82451),Wo=t(85121),Qn=t(17400),ko=t(42226),Ko=t(69550),Zn=t(52755),Jn=t(89350),zo=t(8911),Rn=t(33602),In=t(48108),Ho=t(77225),Xn=t(55700),qn=t(71865);const to={brokenImage:Tn.A,catalog:zo.A,scaffolder:Bo.A,techdocs:jo.A,search:Uo.A,chat:Fo.A,dashboard:$o.A,docs:No.A,email:Wo.A,github:ko.A,group:Rn.A,help:Ko.A,"kind:api":Qn.A,"kind:component":Jn.A,"kind:domain":wn.A,"kind:group":Rn.A,"kind:location":Zn.A,"kind:system":Yn.A,"kind:user":In.A,"kind:resource":Xn.A,"kind:template":qn.A,user:In.A,warning:Ho.A};var Vo=t(58733),Go=t(55288),_o=t(91360),Yo=t(50868),Dn=t(12285),Qo=t(88714);const Mn=(0,Go.A)({productionPrefix:"jss4-"});function eo(r){const{children:e,theme:n,noCssBaseline:s=!1}=r,a=n.getTheme("v4"),l=n.getTheme("v5");let S;s||(S=(0,i.jsx)(Vo.Ay,{}));let E=(0,i.jsxs)(i.Fragment,{children:[S,e]});return a&&(E=(0,i.jsx)(_o.Ay,{generateClassName:Mn,children:(0,i.jsx)(Yo.A,{theme:a,children:E})})),l&&(E=(0,i.jsx)(Dn.A,{injectFirst:!0,children:(0,i.jsx)(Qo.A,{theme:l,children:E})})),E}const no={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 Rt=t(96324),de=t(87081),p=t(33284),I=t(98392),F=t(56558);const $={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")`},Q={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 X(r){const{colors:e,shape:n,options:s}=r,l=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,S=`${n}, ${l}`;var E;const M=(E=s==null?void 0:s.fontColor)!==null&&E!==void 0?E:"#FFFFFF";return{colors:e,shape:n,backgroundImage:S,fontColor:M}}const at={home:X({colors:Q.teal,shape:$.wave}),documentation:X({colors:Q.pinkSea,shape:$.wave2}),tool:X({colors:Q.purpleSky,shape:$.round}),service:X({colors:Q.marineBlue,shape:$.wave}),website:X({colors:Q.veryBlue,shape:$.wave}),library:X({colors:Q.rubyRed,shape:$.wave}),other:X({colors:Q.darkGrey,shape:$.wave}),app:X({colors:Q.toastyOrange,shape:$.wave}),apis:X({colors:Q.teal,shape:$.wave2}),card:X({colors:Q.greens,shape:$.wave})},Ct=16,Ut='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',Kt="home",Yt={htmlFontSize:Ct,fontFamily:Ut,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 Vt(r){const{palette:e,htmlFontSize:n=Ct,fontFamily:s=Ut,defaultPageTheme:a=Kt,pageTheme:l=at,typography:S}=r;if(!l[a])throw new Error(`${a} is not defined in pageTheme.`);return Yt.htmlFontSize=n,Yt.fontFamily=s,{palette:e,typography:S!=null?S:Yt,page:l[a],getPageTheme:({themeId:E})=>{var M;return(M=l[E])!==null&&M!==void 0?M:l[a]}}}var It=t(80012);const ce={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},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,It.e$)(r.palette.link,.3),background:(0,It.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"}}}},ye=r=>(...e)=>{const n=e.length===0?[1]:e,s=(a,l)=>typeof a=="string"?a:l*a;return n.map(a=>{const l=s(a,r);return typeof l=="number"?`${l}px`:l}).join(" ")};function Zt(r,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(r):e;if(n)return{"@global":n}}function Gt(r,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...r},s=r.spacing(1);return typeof s=="number"&&(n.spacing=ye(s)),Object.fromEntries(Object.entries(e).map(([a,l])=>typeof l=="function"?[a,l({theme:n})]:[a,l]))}return e}}const ie=/^&.Mui-([\w-]+)$/;function Ee(r){let e=r;if(!r||typeof r!="object")return e;for(const n of Object.keys(r)){const s=r[n];if(!(!s||typeof s!="object"))for(const a of Object.keys(s)){const l=a,S=l.match(ie);if(S){const[,E]=S,{[l]:M,...k}=s;M&&(e={...e,[n]:k,[E]:M})}}}return e}function jt(r,e={}){const n={},s={};for(const a of Object.keys(e)){const l=e[a];l&&("styleOverrides"in l&&(a==="MuiCssBaseline"?n[a]=Zt(r,l.styleOverrides):n[a]=Ee(Gt(r,l.styleOverrides))),"defaultProps"in l&&(s[a]=l.defaultProps))}return{overrides:n,props:s}}var _t=new WeakMap;class te{getTheme(e){return(0,Rt._)(this,_t).get(e)}constructor(e,n){(0,de._)(this,_t,{writable:!0,value:new Map}),(0,p._)(this,_t,new Map),e&&(0,Rt._)(this,_t).set("v4",e),n&&(0,Rt._)(this,_t).set("v5",n)}}function Ae(r){const e=Vt(r),n={...ce,...r.components},s=(0,F.A)({...e,components:n}),a=jt(s,n),l={...(0,I.A)(e),...a};return new te(l,s)}function Be(r){const e=adaptV4Theme(r),n=createTheme(r);return new te(n,createV5Theme(e))}const Ne={light:Ae({palette:no.light}),dark:Ae({palette:no.dark})};var fe=t(75962),je=t(87145);const se=[{id:"light",title:"Light Theme",variant:"light",icon:(0,i.jsx)(je.A,{}),Provider:({children:r})=>(0,i.jsx)(eo,{theme:Ne.light,children:r})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,i.jsx)(fe.A,{}),Provider:({children:r})=>(0,i.jsx)(eo,{theme:Ne.dark,children:r})}];var Ln=t(73466),Bn=t(39067),jn=t.n(Bn);class oo{get(e){for(const n of this.holders){const s=n.get(e);if(s)return s}}constructor(...e){(0,x._)(this,"holders",void 0),this.holders=e}}var nn=t(43836),gn=t(10602);const mr=(0,nn.tK)("api-context"),Zo=r=>{var e;const{apis:n,children:s}=r,a=(e=(0,d.useContext)(mr))===null||e===void 0?void 0:e.atVersion(1),l=a?new oo(n,a):n;return(0,i.jsx)(mr.Provider,{value:(0,gn.B)({1:l}),children:s})};Zo.propTypes={apis:jn().shape({get:jn().func.isRequired}).isRequired,children:jn().node};const Es=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function ro(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Jo(r){return typeof r!="object"||r===null?r:Array.isArray(r)?r.map(Jo):Object.fromEntries(Object.entries(r).map(([e,n])=>[e,Jo(n)]))}function Un(r,e){if(r===null)return;if(r===void 0)return e===void 0?void 0:Un(e);if(typeof r!="object"||Array.isArray(r))return r;const n=ro(e)?e:{},s={};for(const a of new Set([...Object.keys(r),...Object.keys(n)])){const l=Un(r[a],n[a]);l!==void 0&&(s[a]=l)}return s}function Xo(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 We={type(r,e,n,s){return`Invalid type in config for key '${r}' in '${e}', got ${n}, wanted ${s}`},missing(r,e){return`Missing required config value at '${r}' in '${e}'`},convert(r,e,n){return`Unable to convert config value for key '${r}' in '${e}' to a ${n}`}};class vn{static fromConfigs(e){return e.length===0?new vn(void 0):e.reduce((n,{data:s,context:a,filteredKeys:l,deprecatedKeys:S})=>{const E=new vn(s,a,n);if(E.filteredKeys=l,S)for(const{key:M,description:k}of S)console.warn(`The configuration key '${M}' of ${a} is deprecated and may be removed soon. ${k||""}`);return E},void 0)}has(e){var n;const s=this.readValue(e);if(s===null)return!1;if(s!==void 0)return!0;var a;return(a=(n=this.fallback)===null||n===void 0?void 0:n.has(e))!==null&&a!==void 0?a:!1}keys(){var e;const n=this.data?Object.keys(this.data):[];var s;const a=(s=(e=this.fallback)===null||e===void 0?void 0:e.keys())!==null&&s!==void 0?s:[];return[...new Set([...n,...a])].filter(l=>{var S;return((S=this.data)===null||S===void 0?void 0:S[l])!==null})}get(e){const n=this.getOptional(e);if(n===void 0)throw new Error(We.missing(this.fullKey(e!=null?e:""),this.context));return n}getOptional(e){var n;const s=Jo(this.readValue(e)),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptional(e);if(s!==null){if(s===void 0){if(0)var l;return Un(a)}else if(a===void 0)return Un(s);return Un(s,a)}}getConfig(e){const n=this.getOptionalConfig(e);if(n===void 0)throw new Error(We.missing(this.fullKey(e),this.context));return n}getOptionalConfig(e){var n;const s=this.readValue(e),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptionalConfig(e);if(ro(s))return this.copy(s,e,a);if(s!==null){if(s!==void 0)throw new TypeError(We.type(this.fullKey(e),this.context,Xo(s),"object"));return a}}getConfigArray(e){const n=this.getOptionalConfigArray(e);if(n===void 0)throw new Error(We.missing(this.fullKey(e),this.context));return n}getOptionalConfigArray(e){const n=this.readConfigValue(e,a=>{if(!Array.isArray(a))return{expected:"object-array"};for(const[l,S]of a.entries())if(!ro(S))return{expected:"object-array",value:S,key:`${e}[${l}]`};return!0});if(!n){if(0)var s;return}return n.map((a,l)=>this.copy(a,`${e}[${l}]`))}getNumber(e){const n=this.getOptionalNumber(e);if(n===void 0)throw new Error(We.missing(this.fullKey(e),this.context));return n}getOptionalNumber(e){const n=this.readConfigValue(e,a=>typeof a=="number"||typeof a=="string"||{expected:"number"});if(typeof n=="number"||n===void 0)return n;const s=Number(n);if(!Number.isFinite(s))throw new Error(We.convert(this.fullKey(e),this.context,"number"));return s}getBoolean(e){const n=this.getOptionalBoolean(e);if(n===void 0)throw new Error(We.missing(this.fullKey(e),this.context));return n}getOptionalBoolean(e){const n=this.readConfigValue(e,a=>typeof a=="boolean"||typeof a=="number"||typeof a=="string"||{expected:"boolean"});if(typeof n=="boolean"||n===void 0)return n;const s=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(s))return!0;if(/^(?:n|no|false|0|off)$/i.test(s))return!1;throw new Error(We.convert(this.fullKey(e),this.context,"boolean"))}getString(e){const n=this.getOptionalString(e);if(n===void 0)throw new Error(We.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(We.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[s,a]of n.entries())if(typeof a!="string"||a==="")return{expected:"string-array",value:a,key:`${e}[${s}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,s){const a=new vn(e,this.context,s,this.fullKey(n));return a.filteredKeys=this.filteredKeys,a}readConfigValue(e,n){const s=this.readValue(e);if(s===void 0){var a;if(0)var l;return(a=this.fallback)===null||a===void 0?void 0:a.readConfigValue(e,n)}if(s===null)return;const S=n(s);if(S!==!0){const{key:E=e,value:M=s,expected:k}=S;throw new TypeError(We.type(this.fullKey(E),this.context,Xo(M),k))}return s}readValue(e){const n=e?e.split("."):[];for(const a of n)if(!Es.test(a))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let s=this.data;for(const[a,l]of n.entries())if(ro(s))s=s[l];else if(s!=null){const S=this.fullKey(n.slice(0,a).join("."));throw new TypeError(We.type(S,this.context,Xo(s),"object"))}return s}constructor(e,n="mock-config",s,a=""){(0,x._)(this,"data",void 0),(0,x._)(this,"context",void 0),(0,x._)(this,"fallback",void 0),(0,x._)(this,"prefix",void 0),(0,x._)(this,"filteredKeys",void 0),(0,x._)(this,"notifiedFilteredKeys",void 0),this.data=e,this.context=n,this.fallback=s,this.prefix=a,this.notifiedFilteredKeys=new Set}}const Fn="theme";class so{static createWithStorage(e){const n=new so(e);if(!window.localStorage)return n;var s;const a=(s=window.localStorage.getItem(Fn))!==null&&s!==void 0?s:void 0;return n.setActiveThemeId(a),n.activeThemeId$().subscribe(l=>{l?window.localStorage.setItem(Fn,l):window.localStorage.removeItem(Fn)}),window.addEventListener("storage",l=>{if(l.key===Fn){var S;const E=(S=localStorage.getItem(Fn))!==null&&S!==void 0?S:void 0;n.setActiveThemeId(E)}}),n}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(e){this.activeThemeId=e,this.subject.next(e)}constructor(e){(0,x._)(this,"themes",void 0),(0,x._)(this,"activeThemeId",void 0),(0,x._)(this,"subject",void 0),this.themes=e,this.subject=new J(void 0)}}var mn=t(63636);function yr(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 As{registerFlag(e){yr(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===mn.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[s,a]of Object.entries(e.states))this.flags.set(s,a);const n=Array.from(this.flags.entries()).filter(([,s])=>s===mn.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 s=Object.entries(n).filter(([a,l])=>(yr(a),l===mn.S.Active));return new Map(s)}catch{return new Map}}constructor(){(0,x._)(this,"registeredFeatureFlags",[]),(0,x._)(this,"flags",void 0)}}const io=(0,St.y)({id:"core.apptheme"}),Er=(0,St.y)({id:"core.applanguage"});var xs=t(56038);class qo{static validateFactories(e,n){for(const s of n){const a=[s],l=new Set;for(;a.length;){const S=a.shift(),E=e.get(S);if(E)for(const M of Object.values(E.deps)){if(M.id===s.id)throw new Error(`Circular dependency of api factory for ${s}`);l.has(M)||(l.add(M),a.push(M))}}}}get(e){return this.load(e)}load(e,n=[]){const s=this.apis.get(e.id);if(s)return s;const a=this.factories.get(e);if(!a)return;if(n.includes(a.api))throw new Error(`Circular dependency of api factory for ${a.api}`);const l=this.loadDeps(e,a.deps,[...n,a.api]),S=a.factory(l);return this.apis.set(e.id,S),S}loadDeps(e,n,s){const a={};for(const l in n)if(n.hasOwnProperty(l)){const S=n[l],E=this.load(S,s);if(!E)throw new Error(`No API factory available for dependency ${S} of dependent ${e}`);a[l]=E}return a}constructor(e){(0,x._)(this,"factories",void 0),(0,x._)(this,"apis",void 0),this.factories=e,this.apis=new Map}}var tr;(function(r){r[r.default=10]="default",r[r.app=50]="app",r[r.static=100]="static"})(tr||(tr={}));class Cs{register(e,n){const s=tr[e],a=this.factories.get(n.api.id);return a&&a.priority>=s?!1:(this.factories.set(n.api.id,{priority:s,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}constructor(){(0,x._)(this,"factories",new Map)}}function Ss(r){const e={};for(const s in r.collectors)r.collectors.hasOwnProperty(s)&&(e[s]=r.collectors[s]());const n=[{node:d.Children.toArray(r.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:s,parent:a,contexts:l}=n.shift();d.Children.forEach(s,S=>{if(!(0,d.isValidElement)(S))return;const E={};for(const M in e)if(e.hasOwnProperty(M)){const k=e[M];E[M]=k.visit(k.accumulator,S,a,l[M])}for(const M of r.discoverers){const k=M(S);k&&n.push({node:k,parent:S,contexts:E})}})}return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,a.accumulator]))}function ao(r,e){return()=>({accumulator:r(),visit:e})}function bs(r){var e;return(e=r.props)===null||e===void 0?void 0:e.children}function Os(r){var e,n;if(!((e=r.props)===null||e===void 0)&&e.path&&(!((n=r.props)===null||n===void 0)&&n.element)){var s;return(s=r.props)===null||s===void 0?void 0:s.element}}var Pe=t(19402);const Ps=ao(()=>new Set,(r,e)=>{const n=(0,Pe.E)(e,"core.plugin");n&&r.add(n)});var $n=t(72427);const Ar=r=>{const{children:e}=r,n=(0,$n.gf)(mn.B),s="with"in r?n.isActive(r.with):!n.isActive(r.without);return(0,i.jsx)(i.Fragment,{children:s?e:null})};(0,Pe.h)(Ar,"core.featureFlagged",!0);const lo={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function co(r){const e=r;if(e!=null&&e.type){var n,s;return(s=(n=e.type.displayName)!==null&&n!==void 0?n:e.type.name)!==null&&s!==void 0?s:String(e.type)}return String(e)}const xr=r=>{const e=new Set;return r&&e.add(r),e};function Cr(r,e=new Array){return d.Children.forEach(r,n=>{if(!(0,d.isValidElement)(n))return;const s=(0,Pe.E)(n,"core.mountPoint");if(s){const a=(0,Pe.E)(n,"core.plugin");e.push({routeRef:s,plugin:a})}Cr(n.props.children,e)}),e}const ws=ao(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,l;if(s!=null&&s.isElementAncestor)return s;if((n==null?void 0:n.props.element)===e)return{...s,isElementAncestor:!0};const S=(a=e.props)===null||a===void 0?void 0:a.path,E=(0,Pe.E)(e,"core.mountPoint");if(E&&S)throw new Error(`Path property may not be set directly on a routable extension "${co(e)}"`);var M;const k=(M=s==null||(l=s.obj)===null||l===void 0?void 0:l.children)!==null&&M!==void 0?M:r.objects;if(S!==void 0){if(typeof S!="string")throw new Error(`Element path must be a string at "${co(e)}"`);const xt=S.startsWith("/")?S.slice(1):S,Lt=e.props.element;if((0,Pe.E)(e,"core.gatherMountPoints")){var Z;if(Lt)throw new Error(`Mount point gatherers may not have an element prop "${co(e)}"`);const Nt={path:xt,element:"gathered",routeRefs:new Set,caseSensitive:!!(!((Z=e.props)===null||Z===void 0)&&Z.caseSensitive),children:[lo],plugins:new Set};return k.push(Nt),{obj:Nt,gatherPath:xt,routeRef:s==null?void 0:s.routeRef,gatherRouteRef:s==null?void 0:s.routeRef}}if(Lt){var nt;const[Nt,...pe]=Cr(Lt);if(pe.length>0)throw new Error(`Route element with path "${S}" may not contain multiple routable extensions`);if(!Nt)return s;const{routeRef:ee,plugin:Re}=Nt,Vn={path:xt,element:"mounted",routeRefs:new Set([ee]),caseSensitive:!!(!((nt=e.props)===null||nt===void 0)&&nt.caseSensitive),children:[lo],plugins:xr(Re)};return k.push(Vn),r.paths.set(ee,xt),r.parents.set(ee,s==null?void 0:s.routeRef),{obj:Vn,routeRef:ee!=null?ee:s==null?void 0:s.routeRef,gatherPath:xt,gatherRouteRef:s==null?void 0:s.gatherRouteRef}}}if(E){var ot;if((s==null?void 0:s.gatherPath)===void 0)throw new Error(`Routable extension "${co(e)}" with mount point "${E}" must be assigned a path`);s==null||(ot=s.obj)===null||ot===void 0||ot.routeRefs.add(E);const xt=(0,Pe.E)(e,"core.plugin");if(xt){var ut;s==null||(ut=s.obj)===null||ut===void 0||ut.plugins.add(xt)}return r.paths.set(E,s.gatherPath),r.parents.set(E,s==null?void 0:s.gatherRouteRef),{...s,routeRef:E}}return s}),Ts=ao(()=>({paths:new Map,parents:new Map,objects:new Array}),(r,e,n,s)=>{var a,l,S;if((n==null?void 0:n.props.element)===e)return s;let E=s==null?void 0:s.obj,M=s==null?void 0:s.routeRef,k=s==null?void 0:s.sticky;const Z=(a=e.props)===null||a===void 0?void 0:a.path;var nt;const ot=(nt=E==null?void 0:E.children)!==null&&nt!==void 0?nt:r.objects,ut=!!(!((l=e.props)===null||l===void 0)&&l.caseSensitive);let xt=s==null?void 0:s.path;if((0,Pe.E)(e,"core.gatherMountPoints")){if(!Z)throw new Error("Mount point gatherer must have a path");xt=Z}const Lt=(S=e.props)===null||S===void 0?void 0:S.element;let Nt=(0,Pe.E)(e,"core.mountPoint");if(!Nt&&(0,d.isValidElement)(Lt)&&(Nt=(0,Pe.E)(Lt,"core.mountPoint")),Nt){let Re=Z;if(xt&&(Re?xt=void 0:Re=xt),!Re)throw new Error("Mounted routable extension must have a path");r.paths.set(Nt,Re),M&&k?(r.parents.set(Nt,M),Z&&(M=Nt,k=!1)):(r.parents.set(Nt,M),M=Nt),Z?(E={caseSensitive:ut,path:Z,element:"mounted",routeRefs:new Set([Nt]),children:[lo],plugins:xr((0,Pe.E)(e.props.element,"core.plugin"))},ot.push(E)):E==null||E.routeRefs.add(Nt)}if((0,Pe.E)(e,"core.gatherMountPoints")&&(k=!0),(0,Pe.E)(e,"core.gatherMountPoints")){if(!Z)throw new Error("Mount point gatherer must have a path");if(!Nt){var ee;E={caseSensitive:ut,path:Z,element:"gathered",routeRefs:new Set,children:[lo],plugins:(s==null||(ee=s.obj)===null||ee===void 0?void 0:ee.plugins)||new Set},ot.push(E)}}return{obj:E,path:xt,routeRef:M,sticky:k}}),Rs=ao(()=>new Set,(r,e)=>{if(e.type===Ar){const n=e.props;r.add("with"in n?n.with:n.without)}});var Nn=t(74808),Is=t(63544);const Wn=(0,Is.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Sr(r){return r[Wn]==="absolute"}function br(r){return r[Wn]==="sub"}function Ds(r){return r[Wn]==="external"}function uo(...r){const e=r.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Ms=t(46155),Ls=t.n(Ms);function Bs(r,e,n){let s,a="";if(Sr(r))s=r;else if(br(r))s=r.parent,a=r.path;else if(Ds(r)){const E=n.get(r);if(!E)return[void 0,""];if(Sr(E))s=E;else if(br(E))s=E.parent,a=E.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${E}`)}else throw r[Wn]?new Error(`Unknown or invalid route ref type, ${r[Wn]}`):new Error(`Unknown object passed to useRouteRef, got ${r}`);if(!s)return[void 0,""];const l=e.get(s);if(l===void 0)return[void 0,""];const S=uo(l,a);return[s,S]}function js(r,e,n,s,a){var l;const S=(l=(0,Nn.ue)(a,e))!==null&&l!==void 0?l:[],E=Array();let M=-1;for(let nt=r;nt&&(M=S.findIndex(ot=>ot.route.routeRefs.has(nt)),M===-1);nt=s.get(nt))E.unshift(nt);E.length===0&&(M-=1);const k=M===-1?"":S[M].pathname,Z=E.slice(0,-1).map(nt=>{const ot=n.get(nt);if(ot===void 0)throw new Error(`No path for ${nt}`);if(ot.includes(":"))throw new Error(`Cannot route to ${r} with parent ${nt} as it has parameters`);return ot});return`${uo(k,...Z)}/`}class Us{resolve(e,n){const[s,a]=Bs(e,this.routePaths,this.routeBindings);if(!s)return;let l;typeof n=="string"?l=this.trimPath(n):n.pathname?l={...n,pathname:this.trimPath(n.pathname)}:l=n;const S=this.appBasePath+js(s,l,this.routePaths,this.routeParents,this.routeObjects);return(...[M])=>{const k=M&&Ls()(M,Z=>typeof Z=="string"?Z.replaceAll(/[&?#;\/]/g,nt=>encodeURIComponent(nt)):Z);return uo(S,(0,Nn.tW)(a,k))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}constructor(e,n,s,a,l){(0,x._)(this,"routePaths",void 0),(0,x._)(this,"routeParents",void 0),(0,x._)(this,"routeObjects",void 0),(0,x._)(this,"routeBindings",void 0),(0,x._)(this,"appBasePath",void 0),this.routePaths=e,this.routeParents=n,this.routeObjects=s,this.routeBindings=a,this.appBasePath=l}}const Fs=(0,nn.tK)("routing-context"),$s=({routePaths:r,routeParents:e,routeObjects:n,routeBindings:s,basePath:a="",children:l})=>{const S=new Us(r,e,n,s,a),E=(0,gn.B)({1:S});return(0,i.jsx)(Fs.Provider,{value:E,children:l})};function Ns(r,e){const n=new Set(e.values());n.delete(void 0);for(const s of e.keys()){if(n.has(s))continue;let a=s,l="";for(;a;){const E=r.get(a);if(E===void 0)throw new Error(`No path for ${a}`);l=uo(E,l),a=e.get(a)}const S=l.match(/:(\w+)/g);if(S){for(let E=0;E<S.length;E++)for(let M=E+1;M<S.length;M++)if(S[M]===S[E])throw new Error(`Parameter ${S[M]} is duplicated in path ${l}`)}}}function Ws(r,e){for(const n of e)if(n.externalRoutes){for(const[s,a]of Object.entries(n.externalRoutes))if(!a.optional&&!r.has(a))throw new Error(`External route '${s}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const ks=(0,nn.tK)("app-context"),Ks=({appContext:r,children:e})=>{const n=(0,gn.B)({1:r});return(0,i.jsx)(ks.Provider,{value:n,children:e})},Or="app",zs=`${Or}-auth-cookie-expires-at`,Hs=5*6e4,Pr=5e3,Vs=2,Gs=5*6e4;function _s({discoveryApi:r,fetchApi:e,errorApi:n}){let s=!1,a,l=!0,S=Pr;const E="BroadcastChannel"in window?new BroadcastChannel(zs):void 0,M=ot=>{const ut=(1+3*Math.random())*6e4;return Math.max(ot-Date.now(),Hs)-ut},k=async()=>{try{const ut=`${await r.getBaseUrl(Or)}/.backstage/auth/v1/cookie`,xt=await e.fetch(ut,{credentials:"include"});if(!xt.ok)throw new Error(`Request failed with status ${xt.status} ${xt.statusText}, see request towards ${ut} for more details`);const Lt=await xt.json();if(!Lt.expiresAt)throw new Error("No expiration date in response");const Nt=Date.parse(Lt.expiresAt);if(Number.isNaN(Nt))throw new Error("Invalid expiration date in response");l=!0,E==null||E.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Nt).toISOString()}}),nt(M(Nt))}catch(ot){l?(l=!1,S=Pr):(S=Math.min(Gs,S*Vs),console.error("Session cookie refresh failed",ot),n.post(new Error("Session refresh failed, see developer console for details"))),nt(S)}},Z=ot=>{const{data:ut}=ot;if(!(ut===null||typeof ut!="object")&&"action"in ut&&ut.action==="COOKIE_REFRESH_SUCCESS"){const xt=Date.parse(ut.payload.expiresAt);if(Number.isNaN(xt)){console.warn("Received invalid expiration from session refresh channel");return}nt(M(xt))}};function nt(ot){s||(a&&clearTimeout(a),a=setTimeout(k,ot))}return E==null||E.addEventListener("message",Z),k(),()=>{s=!0,a&&clearTimeout(a),E==null||E.removeEventListener("message",Z),E==null||E.close()}}function wr(r){return new Error(`Tried to access IdentityApi ${r} before app was loaded`)}function er(r){console.warn(`WARNING: Call to ${r} is deprecated and will break in the future`)}var ho=new WeakMap;class Ys{setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw wr("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return er("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw wr("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return er("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 er("getIdToken"),e.getIdToken()})}async signOut(){var e,n,s;await this.waitForTarget.then(a=>a.signOut()),await((e=(0,Rt._)(s=n=this,ho))===null||e===void 0?void 0:e.call(n)),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if((0,Rt._)(this,ho))return;const n=_s(e);(0,p._)(this,ho,async()=>{n();const s=await e.discoveryApi.getBaseUrl("app");try{await e.fetchApi.fetch(`${s}/.backstage/auth/v1/cookie`,{method:"DELETE"})}catch{}})}constructor(){(0,x._)(this,"target",void 0),(0,x._)(this,"waitForTarget",void 0),(0,x._)(this,"resolveTarget",()=>{}),(0,x._)(this,"signOutTargetUrl","/"),(0,de._)(this,ho,{writable:!0,value:void 0}),this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}}var Qs=t(1394);function Zs(r,e,n){if(r!==void 0){const a=n.find(l=>l.id===r);if(a)return a}if(e){const a=n.find(l=>l.variant==="dark");if(a)return a}const s=n.find(a=>a.variant==="light");return s||n[0]}const Js=()=>{const r=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,d.useState)(r.matches);return(0,d.useEffect)(()=>{const s=a=>{n(a.matches)};return r.addListener(s),()=>{r.removeListener(s)}},[r]),e};function Tr({children:r}){const e=(0,$n.gf)(io),n=(0,Qs.A)(e.activeThemeId$(),e.getActiveThemeId()),s=window.matchMedia?Js():!1,a=Zs(n,s,e.getInstalledThemes());if(!a)throw new Error("App has no themes");return(0,i.jsx)(a.Provider,{children:r})}const Rr=async()=>Xs();function Xs(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 a=JSON.parse(r);Array.isArray(a)?n.push(...a):n.push({data:a,context:"env"})}catch(a){throw new Error(`Failed to load runtime configuration, ${a}`)}const s=window.__APP_CONFIG__;return s&&n.push({context:"window",data:s}),n}class qs{add(e,n){return this.apis.push([e.id,n]),n}build(){return new yn(new Map(this.apis))}constructor(){(0,x._)(this,"apis",[])}}class yn{static builder(){return new qs}static from(e){return new yn(new Map(e.map(([n,s])=>[n.id,s])))}static with(e,n){return new yn(new Map([[e.id,n]]))}with(e,n){return new yn(new Map([...this.apis,[e.id,n]]))}get(e){return this.apis.get(e.id)}constructor(e){(0,x._)(this,"apis",void 0),this.apis=e}}function ti(r){const e=new Map;return r&&r({bind:(s,a)=>{for(const[l,S]of Object.entries(a)){const E=s[l];if(!E)throw new Error(`Key ${l} is not an existing external route`);if(!S&&!E.optional)throw new Error(`External route ${l} is required but was undefined`);S&&e.set(E,S)}}}),e}function kn(){const[r]=(0,m.AV)((0,i.jsx)(m.qh,{index:!0,element:(0,i.jsx)("div",{})}));return!r.index}const Ir=(0,d.createContext)(void 0);var Dr=t(82266),Mr=t(93368),ei=t(25862);const ni=(r,e)=>{try{const n=(0,Nn.ue)(e,{pathname:r}),s=n==null?void 0:n.filter(M=>{var k;return(M==null||(k=M.route.routeRefs)===null||k===void 0?void 0:k.size)>0}).pop(),a=s==null?void 0:s.route;if(!a||a.path===""&&r!=="/")return;let l;a.routeRefs.size===1&&(l=a.routeRefs.values().next().value);let S;a.plugins.size===1&&(S=a.plugins.values().next().value);const E=Object.entries((s==null?void 0:s.params)||{}).reduce((M,[k,Z])=>(Z!==void 0&&k!=="*"&&(M[k]=Z),M),{});return{extension:"App",pluginId:(S==null?void 0:S.getId())||"root",...l?{routeRef:l.id}:{},_routeNodeType:a.element,params:E}}catch{return}},oi=({pathname:r,search:e,hash:n,attributes:s})=>{const a=(0,Mr.s)();return(0,d.useEffect)(()=>{a.captureEvent("navigate",`${r}${e}${n}`,{attributes:s})},[a,r,e,n,s]),null},fo=({routeObjects:r})=>{const{pathname:e,search:n,hash:s}=(0,m.zy)(),{params:a,...l}=ni(e,r)||{params:{}};return(0,i.jsx)(ei.Ig,{attributes:l,children:(0,i.jsx)(oi,{pathname:e,search:n,hash:s,attributes:a})})};function ri(r){return kn()?nr(r):""}function nr(r){var e;let{pathname:n}=new URL((e=r.getOptionalString("app.baseUrl"))!==null&&e!==void 0?e:"/","http://sample.dev");return n=n.replace(/\/*$/,""),n}function Lr({component:r,appIdentityProxy:e,children:n}){const[s,a]=(0,d.useState)(),l=(0,$n.gf)(Bt.U),S=nr(l);return s?(e.setTarget(s,{signOutTargetUrl:S||"/"}),(0,i.jsx)(i.Fragment,{children:n})):(0,i.jsx)(r,{onSignInSuccess:a})}function Br(r){const{Router:e,SignInPage:n}=(0,Dr.n)().getComponents(),s=(0,$n.gf)(Bt.U),a=nr(s),l=`${a}/*`,S=(0,d.useContext)(Ir);if(!S)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:E,appIdentityProxy:M}=S;return n?kn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(fo,{routeObjects:E}),(0,i.jsx)(Lr,{component:n,appIdentityProxy:M,children:(0,i.jsx)(m.BV,{children:(0,i.jsx)(m.qh,{path:l,element:(0,i.jsx)(i.Fragment,{children:r.children})})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(fo,{routeObjects:E}),(0,i.jsx)(Lr,{component:n,appIdentityProxy:M,children:r.children})]}):(M.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:a||"/"}),kn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(fo,{routeObjects:E}),(0,i.jsx)(m.BV,{children:(0,i.jsx)(m.qh,{path:l,element:(0,i.jsx)(i.Fragment,{children:r.children})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(fo,{routeObjects:E}),r.children]}))}(0,Pe.h)(Br,"core.type","AppRouter");const Kn="language",Ze="en";var zn=new WeakMap,En=new WeakMap,po=new WeakMap;class go{static create(e){var n;const s=(n=e==null?void 0:e.availableLanguages)!==null&&n!==void 0?n:[Ze];if(s.length!==new Set(s).size)throw new Error(`Supported languages may not contain duplicates, got '${s.join("', '")}'`);if(!s.includes(Ze))throw new Error(`Supported languages must include '${Ze}'`);var a;const l=(a=e==null?void 0:e.defaultLanguage)!==null&&a!==void 0?a:Ze;if(!s.includes(l))throw new Error(`Initial language must be one of the supported languages, got '${l}'`);return new go(s,l)}static createWithStorage(e){const n=go.create(e);if(!window.localStorage)return n;const s=window.localStorage.getItem(Kn),{languages:a}=n.getAvailableLanguages();return s&&a.includes(s)&&n.setLanguage(s),n.language$().subscribe(({language:l})=>{l!==window.localStorage.getItem(Kn)&&window.localStorage.setItem(Kn,l)}),window.addEventListener("storage",l=>{if(l.key===Kn){var S;const E=(S=localStorage.getItem(Kn))!==null&&S!==void 0?S:void 0;E&&n.setLanguage(E)}}),n}getAvailableLanguages(){return{languages:(0,Rt._)(this,zn).slice()}}setLanguage(e){const n=e!=null?e:Ze;if(n!==(0,Rt._)(this,En)){if(n&&!(0,Rt._)(this,zn).includes(n))throw new Error(`Failed to change language to '${n}', available languages are '${(0,Rt._)(this,zn).join("', '")}'`);(0,p._)(this,En,n),(0,Rt._)(this,po).next({language:n})}}getLanguage(){return{language:(0,Rt._)(this,En)}}language$(){return(0,Rt._)(this,po)}constructor(e,n){(0,de._)(this,zn,{writable:!0,value:void 0}),(0,de._)(this,En,{writable:!0,value:void 0}),(0,de._)(this,po,{writable:!0,value:void 0}),(0,p._)(this,zn,e),(0,p._)(this,En,n),(0,p._)(this,po,new J({language:(0,Rt._)(this,En)}))}}var ke=t(75944),un=t(91196),si=t(47304),ii=t(99833),jr=t(93184);function Ur(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==null))}var An=new WeakMap,vo=new WeakMap,xn=new WeakMap,mo=new WeakSet;class ai{addTranslationResource(e){const n=(0,ii.Y)(e);for(const s of n.resources){const a=(0,ke._)(this,mo,or).call(this,s.language,n.id);(0,Rt._)(this,xn).has(a)||(0,Rt._)(this,xn).set(a,s.loader)}}needsLoading(e,n){const s=(0,ke._)(this,mo,or).call(this,e,n);return(0,Rt._)(this,xn).get(s)?!(0,Rt._)(this,An).has(s):!1}async load(e,n){const s=(0,ke._)(this,mo,or).call(this,e,n),a=(0,Rt._)(this,xn).get(s);if(!a||(0,Rt._)(this,An).has(s))return;const l=(0,Rt._)(this,vo).get(s);if(l){await l;return}const S=a().then(E=>{this.onLoad({language:e,namespace:n,messages:E.messages}),(0,Rt._)(this,An).add(s)},E=>{throw(0,Rt._)(this,An).add(s),E});(0,Rt._)(this,vo).set(s,S),await S}constructor(e){(0,un._)(this,mo),(0,x._)(this,"onLoad",void 0),(0,de._)(this,An,{writable:!0,value:void 0}),(0,de._)(this,vo,{writable:!0,value:void 0}),(0,de._)(this,xn,{writable:!0,value:void 0}),this.onLoad=e,(0,p._)(this,An,new Set),(0,p._)(this,vo,new Map),(0,p._)(this,xn,new Map)}}function or(r,e){return`${r}/${e}`}var Hn=new WeakMap,Cn=new WeakMap,hn=new WeakMap,rr=new WeakMap,yo=new WeakMap,Fr=new WeakSet,Eo=new WeakSet,sr=new WeakSet;class ir{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),s=(0,si.Q_)({fallbackLng:Ze,supportedLngs:n,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(s.init(),!s.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:a}=e.languageApi.getLanguage();a!==Ze&&s.changeLanguage(a);const l=new ai(M=>{s.addResourceBundle(M.language,M.namespace,Ur(M.messages),!1,!0)}),S=(e==null?void 0:e.resources)||[];for(let M=S.length-1;M>=0;M--){const k=S[M];k.$$type==="@backstage/TranslationResource"?l.addTranslationResource(k):k.$$type==="@backstage/TranslationMessages"&&s.addResourceBundle(Ze,k.id,Ur(k.messages),!0,!1)}const E=new ir(s,l,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:M})=>{(0,ke._)(E,Fr,li).call(E,M)}),E}getTranslation(e){const n=(0,jr.v)(e);return(0,ke._)(this,sr,$r).call(this,n),(0,ke._)(this,Eo,ar).call(this,n)}translation$(e){const n=(0,jr.v)(e);return(0,ke._)(this,sr,$r).call(this,n),new(K())(s=>{let a={};const l=()=>{a={};const E=a;(0,Rt._)(this,Cn).load((0,Rt._)(this,hn),n.id).then(()=>{if(E===a){const M=(0,ke._)(this,Eo,ar).call(this,n);M.ready&&s.next(M)}},M=>{E===a&&s.error(Array.isArray(M)?M[0]:M)})},S=()=>{const E=(0,ke._)(this,Eo,ar).call(this,n);E.ready?s.next(E):l()};return(0,Rt._)(this,Cn).needsLoading((0,Rt._)(this,hn),n.id)&&l(),(0,Rt._)(this,yo).add(S),()=>{(0,Rt._)(this,yo).delete(S)}})}constructor(e,n,s){(0,un._)(this,Fr),(0,un._)(this,Eo),(0,un._)(this,sr),(0,de._)(this,Hn,{writable:!0,value:void 0}),(0,de._)(this,Cn,{writable:!0,value:void 0}),(0,de._)(this,hn,{writable:!0,value:void 0}),(0,de._)(this,rr,{writable:!0,value:new Set}),(0,de._)(this,yo,{writable:!0,value:new Set}),(0,p._)(this,Hn,e),(0,p._)(this,Cn,n),(0,p._)(this,hn,s)}}function li(r){(0,Rt._)(this,hn)!==r&&((0,p._)(this,hn,r),(0,Rt._)(this,Hn).changeLanguage(r),(0,Rt._)(this,yo).forEach(e=>e()))}function ar(r){return(0,Rt._)(this,Cn).needsLoading((0,Rt._)(this,hn),r.id)?{ready:!1}:{ready:!0,t:(0,Rt._)(this,Hn).getFixedT(null,r.id)}}function $r(r){if((0,Rt._)(this,rr).has(r.id))return;(0,Rt._)(this,rr).add(r.id);const e=r.getDefaultMessages();(0,Rt._)(this,Hn).addResourceBundle(Ze,r.id,e,!0,!1);const n=r.getDefaultResource();n&&(0,Rt._)(this,Cn).addTranslationResource(n)}function Nr(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 ci(r){const e=vn.fromConfigs(r),n=e.getOptionalString("app.baseUrl"),s=e.getOptionalString("backend.baseUrl");let a=r,l,S;if(n&&s){const E=new URL(n).origin,M=new URL(s).origin;if(E===M){const k=Nr(s);s!==k&&(l=k)}}if(n){const E=Nr(n);n!==E&&(S=E)}return(S||l)&&(a=a.concat({data:{app:S&&{baseUrl:S},backend:l&&{baseUrl:l}},context:"relative-resolver"})),a}function di(){const r=document.querySelector('meta[name="backstage-app-mode"]');var e;return((e=r==null?void 0:r.getAttribute("content"))!==null&&e!==void 0?e:"public")==="protected"}function ui(r,e,n){var s;const a=!!r,l=(0,Ln.A)(r||(()=>Promise.resolve([])));let S;if(a&&l.loading){const{Progress:k}=e;S=(0,i.jsx)(k,{})}else if(l.error){const{BootErrorPage:k}=e;S=(0,i.jsx)(k,{step:"load-config",error:l.error})}const{ThemeProvider:E=Tr}=e;return S?{node:(0,i.jsx)(Zo,{apis:yn.with(io,n),children:(0,i.jsx)(E,{children:S})})}:{api:vn.fromConfigs(!((s=l.value)===null||s===void 0)&&s.length?ci(l.value):[])}}class hi{getPlugins(){return this.app.getPlugins()}getSystemIcon(e){return this.app.getSystemIcon(e)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}constructor(e){(0,x._)(this,"app",void 0),this.app=e}}var lr=new WeakMap;class fi{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,i.jsx)(n,{children:e})}getProvider(){if((0,Rt._)(this,lr))throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");(0,p._)(this,lr,!0);const e=new hi(this);let n=!1;return({children:a})=>{const l=(0,d.useRef)(!0),S=(0,d.useMemo)(()=>so.createWithStorage(this.themes),[]),{routing:E,featureFlags:M,routeBindings:k}=(0,d.useMemo)(()=>{const Lt=kn();Lt&&console.warn(`
4
4
  DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
5
5
  Please migrate to use React Router v6 stable.
6
6
  See https://backstage.io/docs/tutorials/react-router-stable-migration
7
- `);const Nt=Ss({root:a,discoverers:[bs,Os],collectors:{routing:Lt?Ts:ws,collectedPlugins:Ps,featureFlags:Rs}});return Nt.collectedPlugins.forEach(pe=>this.plugins.add(pe)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...Nt,routeBindings:ti(this.bindRoutes)}},[a]);n||(n=!0,Ns(E.paths,E.parents),Ws(k,this.plugins));const Z=ui(this.configLoader,this.components,S),nt="api"in Z;if(nt){const{api:Lt}=Z;this.configApi=Lt}if("node"in Z)return Z.node;if(nt&&l.current){l.current=!1;const Lt=this.getApiHolder().get(mn.B);if(Lt){for(const ee of this.featureFlags)Lt.registerFlag({...ee,pluginId:""});for(const ee of this.plugins.values())if("getFeatureFlags"in ee)for(const Re of ee.getFeatureFlags())Lt.registerFlag({name:Re.name,pluginId:ee.getId()});else for(const Re of ee.output())Re.type==="feature-flag"&&Lt.registerFlag({name:Re.name,pluginId:ee.getId()});const Nt=Lt.getRegisteredFlags(),pe=new Set(Nt.map(ee=>ee.name));for(const ee of M)pe.has(ee)||Lt.registerFlag({name:ee,pluginId:""})}}const{ThemeProvider:ot=Tr,Progress:ut}=this.components,xt=this.getApiHolder();if(di()){const Lt=xt.get(oe.m),Nt=xt.get(On.a),pe=xt.get(zt.I);if(!Lt||!Nt||!pe)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Lt,fetchApi:Nt,discoveryApi:pe})}return(0,i.jsx)(Zo,{apis:xt,children:(0,i.jsx)(Ks,{appContext:e,children:(0,i.jsx)(ot,{children:(0,i.jsx)($s,{routePaths:E.paths,routeParents:E.parents,routeObjects:E.objects,routeBindings:k,basePath:ri(Z.api),children:(0,i.jsx)(Ir.Provider,{value:{routeObjects:E.objects,appIdentityProxy:this.appIdentityProxy},children:(0,i.jsx)(d.Suspense,{fallback:(0,i.jsx)(ut,{}),children:a})})})})})})}}getRouter(){return Br}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 qo.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:io,deps:{},factory:()=>so.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:Bt.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:dn.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Er,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:xs.J,deps:{languageApi:Er},factory:({languageApi:e})=>ir.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:mn.B,deps:{},factory:()=>new As});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 qo.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new qo(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const n=new Set;for(const s of e){const a=s.getId();if(n.has(a))throw new Error(`Duplicate plugin found '${a}'`);n.add(a)}}constructor(e){var n,s,a;(0,C._)(this,"apiHolder",void 0),(0,C._)(this,"configApi",void 0),(0,C._)(this,"apis",void 0),(0,C._)(this,"icons",void 0),(0,C._)(this,"plugins",void 0),(0,C._)(this,"featureFlags",void 0),(0,C._)(this,"components",void 0),(0,C._)(this,"themes",void 0),(0,C._)(this,"configLoader",void 0),(0,C._)(this,"defaultApis",void 0),(0,C._)(this,"bindRoutes",void 0),(0,C._)(this,"appLanguageApi",void 0),(0,C._)(this,"translationResources",void 0),(0,C._)(this,"appIdentityProxy",new Ys),(0,C._)(this,"apiFactoryRegistry",void 0),(0,de._)(this,lr,{writable:!0,value:!1});var l;this.apis=(l=e.apis)!==null&&l!==void 0?l:[],this.icons=e.icons;var S;this.plugins=new Set((S=e.plugins)!==null&&S!==void 0?S:[]);var E;this.featureFlags=(E=e.featureFlags)!==null&&E!==void 0?E:[],this.components=e.components,this.themes=e.themes;var M;this.configLoader=(M=e.configLoader)!==null&&M!==void 0?M:Rr;var k;this.defaultApis=(k=e.defaultApis)!==null&&k!==void 0?k:[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new Cs,this.appLanguageApi=go.createWithStorage({defaultLanguage:(n=e.__experimentalTranslations)===null||n===void 0?void 0:n.defaultLanguage,availableLanguages:(s=e.__experimentalTranslations)===null||s===void 0?void 0:s.availableLanguages});var Z;this.translationResources=(Z=(a=e.__experimentalTranslations)===null||a===void 0?void 0:a.resources)!==null&&Z!==void 0?Z:[]}}function pi(r){return new fi(r)}function gi(r){var e,n,s,a;return pi({...r,apis:(e=r==null?void 0:r.apis)!==null&&e!==void 0?e:[],bindRoutes:r==null?void 0:r.bindRoutes,components:{...R,...r==null?void 0:r.components},configLoader:r==null?void 0:r.configLoader,defaultApis:Lo,icons:{...to,...r==null?void 0:r.icons},plugins:(n=r==null?void 0:r.plugins)!==null&&n!==void 0?n:[],featureFlags:(s=r==null?void 0:r.featureFlags)!==null&&s!==void 0?s:[],themes:(a=r==null?void 0:r.themes)!==null&&a!==void 0?a:se})}var Ao=t(82442);let Wr=!1;const kr=r=>{const e=(0,Dr.n)(),{NotFoundErrorPage:n}=e.getComponents(),s=(0,d.useMemo)(()=>kn(),[]),l=[...(0,Ao.O)(r.children,S=>S.getElements().flatMap(E=>{let M=E.props.path;if(M==="")return[];var k;M=(k=M==null?void 0:M.replace(/\/\*$/,""))!==null&&k!==void 0?k:"/";let Z=s?E:E.props.element;return!s&&!Z&&(Z=E,Wr||(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] />} />."),Wr=!0)),[{path:M,element:Z,children:E.props.children?[{path:M==="/"?"/":"*",element:E.props.children}]:void 0}]}).sort((E,M)=>M.path.localeCompare(E.path)).map(E=>({...E,path:E.path==="/"?"/":`${E.path}/*`}))),{path:"*",element:(0,i.jsx)(n,{})}];return(0,m.Ye)(l)};(0,Pe.h)(kr,"core.type","FlatRoutes");var on=t(6820),vi=t(78692),mi=t(86519);function Kr(r){return!r.cursor}function _a(r){return!Kr(r)}const Se="catalog";var be=t(94214);class yi{async analyzeLocation(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteEntityByUid(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"DELETE"})}async deleteLocation(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"DELETE"})}async getEntities(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntitiesByQuery(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-query{?fields,limit,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntitiesByRefs(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-refs/{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntityByName(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntityByUid(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntityFacets(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getLocation(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getLocationByEntity(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getLocations(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/locations").expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async refreshEntity(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/refresh").expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}constructor(e){(0,C._)(this,"discoveryApi",void 0),(0,C._)(this,"fetchApi",void 0),this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:Gn()}}}class Ei{async getEntityAncestors(e,n){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,on.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,on.KU)(e)},n))}async getEntities(e,n){const{filter:s=[],fields:a=[],order:l,offset:S,limit:E,after:M}=e!=null?e:{},k=[];if(l)for(const ot of[l].flat())ot&&k.push(`${ot.order}:${ot.field}`);const Z=await this.requestRequired(await this.apiClient.getEntities({query:{fields:a,limit:E,filter:this.getFilterValue(s),offset:S,after:M,order:l?k:void 0}},n));if(k.length)return{items:Z};const nt=(ot,ut)=>{var xt,Lt;if(((xt=ot.metadata)===null||xt===void 0?void 0:xt.name)===void 0||ot.kind===void 0||((Lt=ut.metadata)===null||Lt===void 0?void 0:Lt.name)===void 0||ut.kind===void 0)return 0;const Nt=(0,on.U2)(ot),pe=(0,on.U2)(ut);return Nt<pe?-1:Nt>pe?1:0};return{items:Z.sort(nt)}}async getEntitiesByRefs(e,n){const s=await this.apiClient.getEntitiesByRefs({body:{entityRefs:e.entityRefs,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},n);if(!s.ok)throw await tn.o.fromResponse(s);const{items:a}=await s.json();return{items:a.map(l=>l!=null?l:void 0)}}async queryEntities(e={},n){const s={};if(Kr(e)){var a,l;const{fields:S=[],filter:E,limit:M,orderFields:k,fullTextFilter:Z}=e;s.filter=this.getFilterValue(E),M!==void 0&&(s.limit=M),k!==void 0&&(s.orderField=(Array.isArray(k)?k:[k]).map(({field:ot,order:ut})=>`${ot},${ut}`)),S.length&&(s.fields=S);const nt=Z==null||(a=Z.term)===null||a===void 0?void 0:a.trim();nt&&(s.fullTextFilterTerm=nt),!(Z==null||(l=Z.fields)===null||l===void 0)&&l.length&&(s.fullTextFilterFields=Z.fields)}else{const{fields:S=[],limit:E,cursor:M}=e;s.cursor=M,E!==void 0&&(s.limit=E),S.length&&(s.fields=S)}return this.apiClient.getEntitiesByQuery({query:s},n).then(S=>S.json())}async getEntityByRef(e,n){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,on.KU)(e)},n))}async getEntityByName(e,n){const{kind:s,namespace:a="default",name:l}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:s,namespace:a,name:l}},n))}async refreshEntity(e,n){const s=await this.apiClient.refreshEntity({body:{entityRef:e}},n);if(s.status!==200)throw new Error(await s.text())}async getEntityFacets(e,n){const{filter:s=[],facets:a}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:a,filter:this.getFilterValue(s)}},n))}async addLocation(e,n){const{type:s="url",target:a,dryRun:l}=e,S=await this.apiClient.createLocation({body:{type:s,target:a},query:{dryRun:l?"true":void 0}},n);if(S.status!==201)throw new Error(await S.text());const{location:E,entities:M,exists:k}=await S.json();if(!E)throw new Error(`Location wasn't added: ${a}`);return{location:E,entities:M,exists:k}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocations({},n))).map(a=>a.data).find(a=>e===(0,vi.KL)(a))}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,s){const a=await this.apiClient.validateEntity({body:{entity:e,location:n}},s);if(a.ok)return{valid:!0};if(a.status!==400)throw await tn.o.fromResponse(a);const{errors:l=[]}=await a.json();return{valid:!1,errors:l}}async requestIgnored(e){if(!e.ok)throw await tn.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await tn.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await tn.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const n=[];for(const s of[e].flat()){const a=[];for(const[l,S]of Object.entries(s))for(const E of[S].flat())E===mi.c?a.push(l):typeof E=="string"&&a.push(`${l}=${E}`);a.length&&n.push(a.join(","))}return n}constructor(e){(0,C._)(this,"apiClient",void 0),this.apiClient=new yi(e)}}var zr=t(7341),Ai=t(18),xi=t(82292),Hr=t(29207),Sn=t(95203),Ci=t(9803),Ue=t(88758),Si=t(54560),bn=t(45250);async function bi({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),s=e.snapshot("starredEntities").value;if(!(0,bn.isArray)(s))return;var a;const l=new Set((a=n.snapshot("entityRefs").value)!==null&&a!==void 0?a:[]);s.filter(bn.isString).map(S=>S.split(":")).filter(S=>S.length===4&&S[0]==="entity").map(([S,E,M,k])=>(0,on.U2)({kind:E,namespace:M,name:k})).forEach(S=>l.add(S)),await n.set("entityRefs",Array.from(l)),await e.remove("starredEntities")}class Oi{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}notifyChanges(){for(const e of this.subscribers)e.next(new Set(this.starredEntities))}constructor(e){(0,C._)(this,"settingsStore",void 0),(0,C._)(this,"starredEntities",void 0),(0,C._)(this,"subscribers",new Set),(0,C._)(this,"observable",new(K())(s=>(s.next(new Set(this.starredEntities)),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))),bi(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities");var n;this.starredEntities=new Set((n=this.settingsStore.snapshot("entityRefs").value)!==null&&n!==void 0?n:[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{var a;this.starredEntities=new Set((a=s.value)!==null&&a!==void 0?a:[]),this.notifyChanges()}})}}function cr(r){const{years:e=0,months:n=0,weeks:s=0,days:a=0,hours:l=0,minutes:S=0,seconds:E=0,milliseconds:M=0}=r;return((((e*365+n*30+s*7+a)*24+l)*60+S)*60+E)*1e3+M}var Pi=t(25033),wi=t.n(Pi),Ti=t(25295),Ri=t.n(Ti),Ii=t(88083);const Di={seconds:10},Mi={milliseconds:50},Li={api:Qn.A,component:Jn.A,system:Yn.A,resource:Xn.A,domain:wn.A,location:Zn.A,user:In.A,group:Rn.A,template:qn.A};function Vr(r){return{async:r.async,render:({entityRef:e,entity:n,context:s})=>({snapshot:(0,Ii.T)(n||e,s),loadEntity:r.async})}}var xo=new WeakMap,dr=new WeakMap,Co=new WeakMap,ur=new WeakMap,So=new WeakMap,Gr=new WeakSet,_r=new WeakSet,Yr=new WeakSet;class bo{static createLocal(){return new bo({renderer:Vr({async:!1})})}static create(e){return new bo(e)}forEntity(e,n){const{entityRef:s,kind:a,entity:l,needsLoad:S}=(0,ke._)(this,Gr,Bi).call(this,e),E=Z=>{const{snapshot:nt}=(0,Rt._)(this,So).render({entityRef:s,loading:Z.loading,entity:Z.entity,context:n||{}});return{...nt,entityRef:s,Icon:(0,ke._)(this,Yr,Ui).call(this,nt.Icon,a)}};let M;try{M=E({loading:S,entity:l})}catch{M={primaryTitle:s,entityRef:s}}const k=S?new(K())(Z=>{let nt=!1;return Promise.resolve().then(()=>{var ot;return(ot=(0,Rt._)(this,Co))===null||ot===void 0?void 0:ot.load(s)}).then(ot=>{if(!nt&&ot&&ot.metadata.etag!==(l==null?void 0:l.metadata.etag)){const ut=E({loading:!1,entity:ot});Z.next(ut)}}).catch(()=>{}).finally(()=>{nt||Z.complete()}),()=>{nt=!0}}):void 0;return{snapshot:M,update$:k}}constructor(e){(0,un._)(this,Gr),(0,un._)(this,_r),(0,un._)(this,Yr),(0,de._)(this,xo,{writable:!0,value:void 0}),(0,de._)(this,dr,{writable:!0,value:void 0}),(0,de._)(this,Co,{writable:!0,value:void 0}),(0,de._)(this,ur,{writable:!0,value:void 0}),(0,de._)(this,So,{writable:!0,value:void 0});var n;const s=(n=e.cacheTtl)!==null&&n!==void 0?n:Di;var a;const l=(a=e.batchDelay)!==null&&a!==void 0?a:Mi;var S;const E=(S=e.renderer)!==null&&S!==void 0?S:Vr({async:!0}),M={};Object.entries(Li).forEach(([Z,nt])=>{M[Z.toLocaleLowerCase("en-US")]=nt});var k;if(Object.entries((k=e.kindIcons)!==null&&k!==void 0?k:{}).forEach(([Z,nt])=>{M[Z.toLocaleLowerCase("en-US")]=nt}),E.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");(0,p._)(this,Co,(0,ke._)(this,_r,ji).call(this,{cacheTtl:s,batchDelay:l,renderer:E,catalogApi:e.catalogApi}))}(0,p._)(this,dr,cr(s)),(0,p._)(this,xo,new Map),(0,p._)(this,ur,M),(0,p._)(this,So,E)}}function Bi(r){if(typeof r!="string")return{entity:r,kind:r.kind,entityRef:(0,on.U2)(r),needsLoad:!1};const e=(0,Rt._)(this,xo).get(r),n=e==null?void 0:e.entity,a=(!e||Date.now()-e.updatedAt>(0,Rt._)(this,dr))&&(0,Rt._)(this,So).async!==!1&&(0,Rt._)(this,Co)!==void 0;return{entity:n,kind:(0,on.KU)(r).kind,entityRef:r,needsLoad:a}}function ji(r){const e=cr(r.cacheTtl),n=cr(r.batchDelay);return new(wi())(async s=>{const{items:a}=await r.catalogApi.getEntitiesByRefs({entityRefs:s}),l=Date.now();return s.forEach((S,E)=>{(0,Rt._)(this,xo).set(S,{updatedAt:l,entity:a[E]})}),a},{name:"DefaultEntityPresentationApi",cacheMap:new(Ri())(e),maxBatchSize:100,batchScheduleFn:n?s=>setTimeout(s,n):void 0})}function Ui(r,e){return r||(r===!1?!1:(0,Rt._)(this,ur)[e.toLocaleLowerCase("en-US")])}const Te=(0,Ci.i)({id:"catalog",apis:[(0,$t.b)({api:zr.v,deps:{discoveryApi:zt.I,fetchApi:On.a},factory:({discoveryApi:r,fetchApi:e})=>new Ei({discoveryApi:r,fetchApi:e})}),(0,$t.b)({api:Ai.a,deps:{storageApi:Ge},factory:({storageApi:r})=>new Oi({storageApi:r})}),(0,$t.b)({api:xi.n,deps:{catalogApi:zr.v},factory:({catalogApi:r})=>bo.create({catalogApi:r})})],routes:{catalogIndex:Sn.rQ,catalogEntity:Hr.s},externalRoutes:{createComponent:Sn.qP,viewTechDoc:Sn.UJ,createFromTemplate:Sn.Zg,unregisterRedirect:Sn.pS}}),Ya=Te.provide((0,Ue.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(3720),t.e(233),t.e(5974)]).then(t.bind(t,5974)).then(r=>r.CatalogPage),mountPoint:Sn.rQ})),Fi=Te.provide((0,Ue.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:Hr.s})),Qa=Te.provide((0,Ue.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(3720),t.e(1902),t.e(73)]).then(t.bind(t,40073)).then(r=>r.AboutCard)}})),Za=Te.provide((0,Ue.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),Ja=Te.provide((0,Ue.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),Xa=Te.provide((0,Ue.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),qa=Te.provide((0,Ue.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),tl=Te.provide((0,Ue.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),el=Te.provide((0,Ue.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),nl=Te.provide((0,Ue.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),ol=Te.provide((0,Ue.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),rl=Te.provide((0,Ue.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),sl=Te.provide((0,Ue.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),il=Te.provide((0,Si.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var Qr=t(41158),Zr=t(26679);class $i{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(e,n){const a=`${await this.getApiOrigin()}/${n}`,l=await fetch(`${a.endsWith("/")?a:`${a}/`}index.html`);if(l.status===404)throw new Error("Page not found");return l.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,n,s){const a=await this.getApiOrigin();return new URL(e,`${a}/${s}`).toString()}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,C._)(this,"configApi",void 0),(0,C._)(this,"discoveryApi",void 0),(0,C._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}class Ni{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:""}}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,C._)(this,"configApi",void 0),(0,C._)(this,"discoveryApi",void 0),(0,C._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}const Wi=[(0,$t.b)({api:Zr.s,deps:{configApi:Bt.U,discoveryApi:zt.I,identityApi:dn.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new $i({configApi:r,discoveryApi:e,identityApi:n})}),(0,$t.b)({api:Zr.l,deps:{configApi:Bt.U,discoveryApi:zt.I,identityApi:dn.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Ni({configApi:r,discoveryApi:e,identityApi:n})}),(0,$t.b)({api:Qr.Y,deps:{configApi:Bt.U},factory:({configApi:r})=>Qr.L.fromConfig(r)})],ki={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ki={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function zi(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function Hi(){const r=await Rr(),e=await zi();return[...r,{context:"detected",data:e?ki:Ki}]}var Je=t(58837),Vi=t(3210);const Gi=(0,Je.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var _i=()=>{const r=Gi();return(0,i.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,i.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"})})};const Yi=(0,Je.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Qi=()=>{const r=Yi();return(0,i.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,i.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"})})},Oe=t(72664);const Jr={isOpen:!1,setOpen:()=>{}},Xr=(0,d.createContext)(Jr),qr=(0,nn.tK)("sidebar-open-state-context");function ts(r){const{children:e,value:n}=r;return(0,i.jsx)(Xr.Provider,{value:n,children:(0,i.jsx)(qr.Provider,{value:(0,gn.B)({1:n}),children:e})})}const hr=()=>{const r=(0,d.useContext)(qr),e=(0,d.useContext)(Xr);if(r===void 0)return e||Jr;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var es=t(72072),ns=t(73524),rn=t(10394),os=t(5893),Zi=t(53373),fn=t.n(Zi),Ji=t(1125),rs=t(29365),Xi=t(73845),fr=t(72501),qi=t(32881),ta=t(27326),ea=t(13085);const ss=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var pr=t(34435);const na=(0,Je.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),oa=r=>{const{to:e,label:n,icon:s,value:a}=r,{sidebarConfig:l}=(0,d.useContext)(Oe.yY),S=na({sidebarConfig:l}),E=(0,m.zy)(),{selectedMenuItemIndex:M,setSelectedMenuItemIndex:k}=(0,d.useContext)(ss),Z=(ot,ut)=>{k(ut===M?-1:ut)},nt=a===M&&M>=0||a!==M&&!(M>=0)&&e===E.pathname;return(0,i.jsx)(ea.A,{"aria-label":n,label:n,icon:s,component:es.N_,to:e||E.pathname,onChange:Z,value:a,selected:nt,classes:S})},is=r=>{const{children:e,to:n,label:s,icon:a,value:l}=r,{isMobile:S}=(0,pr.Ut)();return S?(0,i.jsx)(oa,{to:n,label:s,icon:a,value:l}):(0,i.jsx)(i.Fragment,{children:e})},as=(0,Je.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),ra=r=>(0,bn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),sa=d.createElement(is).type,ia=({children:r,label:e="Menu",open:n,onClose:s})=>{const{sidebarConfig:a}=(0,d.useContext)(Oe.yY),l=as({sidebarConfig:a});return(0,i.jsxs)(Xi.Ay,{anchor:"bottom",open:n,onClose:s,ModalProps:{BackdropProps:{classes:{root:l.marginMobileSidebar}}},classes:{root:l.marginMobileSidebar,paperAnchorBottom:l.overlay},children:[(0,i.jsxs)(rn.A,{className:l.overlayHeader,children:[(0,i.jsx)(fr.A,{variant:"h3",children:e}),(0,i.jsx)(rs.A,{onClick:s,classes:{root:l.overlayHeaderClose},children:(0,i.jsx)(qi.A,{})})]}),(0,i.jsx)(rn.A,{component:"nav",children:r})]})},aa=r=>{const{sidebarConfig:e}=(0,d.useContext)(Oe.yY),{children:n}=r,s=as({sidebarConfig:e}),a=(0,m.zy)(),[l,S]=(0,d.useState)(-1);(0,d.useEffect)(()=>{S(-1)},[a.pathname]);let E=(0,Ao.O)(n,k=>k.getElements().filter(Z=>Z.type===sa));if(n)E.length?E=ra(E):E.push((0,i.jsx)(is,{icon:(0,i.jsx)(ta.A,{}),children:n},"default_menu"));else return null;const M=l>=0&&!E[l].props.to;return(0,i.jsx)(ts,{value:{isOpen:!0,setOpen:()=>{}},children:(0,i.jsxs)(ss.Provider,{value:{selectedMenuItemIndex:l,setSelectedMenuItemIndex:S},children:[(0,i.jsx)(ia,{label:E[l]&&E[l].props.label,open:M,onClose:()=>S(-1),children:E[l]&&E[l].props.children}),(0,i.jsx)(Ji.A,{className:s.root,"data-testid":"mobile-sidebar-root",component:"nav",children:E})]})})};var la=t(87849),ca=t(10315);const ls=(0,Je.A)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"},"@media print":{display:"none"}},drawerWidth:e=>({width:e.sidebarConfig.drawerWidthClosed}),drawerOpen:e=>({width:e.sidebarConfig.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var cs;(function(r){r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open"})(cs||(cs={}));const da=r=>{const{sidebarConfig:e}=(0,d.useContext)(Oe.yY),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:s=e.defaultCloseDelayMs,disableExpandOnHover:a,children:l}=r,S=ls({sidebarConfig:e}),E=(0,os.A)(pe=>pe.breakpoints.down("md"),{noSsr:!0}),[M,k]=(0,d.useState)(0),Z=(0,d.useRef)(),{isPinned:nt,toggleSidebarPinState:ot}=(0,pr.Ut)(),ut=()=>{nt||a||(Z.current&&(clearTimeout(Z.current),Z.current=void 0),M!==2&&!E&&(Z.current=window.setTimeout(()=>{Z.current=void 0,k(2)},n),k(1)))},xt=()=>{nt||a||(Z.current&&(clearTimeout(Z.current),Z.current=void 0),M===1?k(0):M===2&&(Z.current=window.setTimeout(()=>{Z.current=void 0,k(0)},s)))},Lt=M===2&&!E||nt,Nt=pe=>{pe?(k(2),ot()):(k(0),ot())};return(0,i.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,i.jsx)(ha,{}),(0,i.jsx)(ts,{value:{isOpen:Lt,setOpen:Nt},children:(0,i.jsx)(rn.A,{className:S.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:ut,onFocus:a?()=>{}:ut,onMouseLeave:a?()=>{}:xt,onBlur:a?()=>{}:xt,children:(0,i.jsx)(rn.A,{className:fn()(S.drawer,S.drawerWidth,{[S.drawerOpen]:Lt}),children:l})})})]})},ua=r=>{var e;const n=(0,Oe.Rv)((e=r.sidebarOptions)!==null&&e!==void 0?e:{});var s;const a=(0,Oe.i8)((s=r.submenuOptions)!==null&&s!==void 0?s:{}),{children:l,disableExpandOnHover:S,openDelayMs:E,closeDelayMs:M}=r,{isMobile:k}=(0,pr.Ut)();return k?(0,i.jsx)(aa,{children:l}):(0,i.jsx)(Oe.yY.Provider,{value:{sidebarConfig:n,submenuConfig:a},children:(0,i.jsx)(da,{openDelayMs:E,closeDelayMs:M,disableExpandOnHover:S,children:l})})};function ha(){const{sidebarConfig:r}=(0,d.useContext)(Oe.yY),{focusContent:e,contentRef:n}=(0,ns.H)(),s=ls({sidebarConfig:r}),{t:a}=(0,la.i)(ca.O);return n!=null&&n.current?(0,i.jsx)(x.A,{onClick:e,variant:"contained",className:fn()(s.visuallyHidden),children:a("skipToContent")}):null}var fa=t(94509),Oo=t(44209),pa=t(79065),ga=t(55704),ds=t(62248);const va=(0,Je.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>{var n,s;return{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:(s=(n=r.palette.navigation.submenu)===null||n===void 0?void 0:n.background)!==null&&s!==void 0?s:"#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.common.white,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),ma=r=>{const{isOpen:e}=hr(),{sidebarConfig:n,submenuConfig:s}=(0,d.useContext)(Oe.yY),a=e?n.drawerWidthOpen:n.drawerWidthClosed,l=va({left:a,submenuConfig:s}),{isHoveredOn:S}=(0,d.useContext)(Oe.U1),[E,M]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{M(S)},[S]),(0,i.jsxs)(rn.A,{className:fn()(l.drawer,{[l.drawerOpen]:E}),children:[(0,i.jsx)(fr.A,{variant:"h5",component:"span",className:l.title,children:r.title}),r.children]})};var ya=t(45810),us=t.n(ya);function hs(r,e,n=!1){const s=new URLSearchParams(e.search).toString(),a=us().parse(s),l=new URLSearchParams(r.search).toString(),S=us().parse(l),E=n?bn.isEqual:bn.isMatch;return(0,bn.isEqual)(e.pathname,r.pathname)&&E(S,a)}const Ea=r=>(0,Je.A)(e=>{var n,s,a,l;return{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:(a=(n=e.palette.navigation.navItem)===null||n===void 0?void 0:n.hoverBackground)!==null&&a!==void 0?a:"#404040"}},highlighted:{background:(l=(s=e.palette.navigation.navItem)===null||s===void 0?void 0:s.hoverBackground)!==null&&l!==void 0?l:"#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 Po(r){return(0,d.useMemo)(()=>Ea(r),[r])()}const Aa=(r,e)=>(0,Ao.O)(r.props.children,n=>{let s=!1;return n.getElements().forEach(({props:{to:a,dropdownItems:l}})=>{if(!s){if(l!=null&&l.length){l.forEach(({to:S})=>s=s||hs(e,(0,Nn.o1)(S)));return}a&&(s=hs(e,(0,Nn.o1)(a)))}}),s},[e.pathname]);function gr(r){return r.to===void 0}const xa=d.createElement(ma).type,Ca=d.forwardRef(function({to:e,end:n,style:s,className:a,activeStyle:l,caseSensitive:S,activeClassName:E="active","aria-current":M="page",...k},Z){let{pathname:nt}=(0,m.zy)(),{pathname:ot}=(0,m.x$)(e);S||(nt=nt.toLocaleLowerCase("en-US"),ot=ot.toLocaleLowerCase("en-US"));let ut=nt===ot;!ut&&!n&&(ut=nt.startsWith(`${ot}/`));const xt=ut?M:void 0;return(0,i.jsx)(g.N_,{...k,to:e,ref:Z,"aria-current":xt,style:{...s,...ut?l:void 0},className:fn()([typeof a!="function"?a:void 0,ut?E:void 0])})}),fs=(0,d.forwardRef)((r,e)=>{const{icon:n,text:s,hasNotifications:a=!1,hasSubmenu:l=!1,disableHighlight:S=!1,onClick:E,noTrack:M,children:k,className:Z,...nt}=r,{sidebarConfig:ot}=(0,d.useContext)(Oe.yY),ut=Po(ot),{isOpen:xt}=hr(),Lt=!xt&&l?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Nt=(0,i.jsxs)(rn.A,{style:Lt,children:[(0,i.jsx)(n,{fontSize:"small"}),!xt&&l?(0,i.jsx)(ds.A,{fontSize:"small"}):(0,i.jsx)(i.Fragment,{})]}),pe=(0,i.jsx)(fa.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!a,className:fn()({[ut.closedItemIcon]:!xt}),children:Nt}),ee=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(rn.A,{"data-testid":"login-button",className:ut.iconContainer,children:pe}),s&&(0,i.jsx)(fr.A,{variant:"subtitle2",component:"span",className:ut.label,children:s}),(0,i.jsx)("div",{className:ut.secondaryAction,children:k})]}),Re=xt?ee:pe,Vn={onClick:E,className:fn()(Z,ut.root,xt?ut.open:ut.closed,gr(r)&&ut.buttonItem,{[ut.highlightable]:!S})},ms=(0,Mr.s)(),{pathname:vr}=(0,m.x$)(!gr(r)&&r.to?r.to:""),ys=(0,d.useCallback)(za=>{if(!M){const Ha="click",Va=s!=null?s:"Sidebar Item",Ga=vr?{attributes:{to:vr}}:void 0;ms.captureEvent(Ha,Va,Ga)}E==null||E(za)},[ms,s,vr,M,E]);return gr(r)?(0,i.jsx)(x.A,{role:"button","aria-label":s,...Vn,ref:e,onClick:ys,children:Re}):(0,i.jsx)(Ca,{...Vn,activeClassName:ut.selected,to:r.to?r.to:"",ref:e,"aria-label":s||r.to,...nt,onClick:ys,children:Re})}),Sa=({children:r,...e})=>{const{sidebarConfig:n}=(0,d.useContext)(Oe.yY),s=Po(n),[a,l]=(0,d.useState)(!1),S=(0,m.zy)(),E=Aa(r,S),M=(0,os.A)(ot=>ot.breakpoints.down("sm")),k=()=>{l(!0)},Z=()=>{l(!1)},nt=()=>M?a?(0,i.jsx)(ga.A,{fontSize:"small",className:s.submenuArrow}):(0,i.jsx)(pa.A,{fontSize:"small",className:s.submenuArrow}):!a&&(0,i.jsx)(ds.A,{fontSize:"small",className:s.submenuArrow});return(0,i.jsx)(Oe.U1.Provider,{value:{isHoveredOn:a,setIsHoveredOn:l},children:(0,i.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:Z,onTouchStart:a?Z:k,onMouseEnter:k,className:fn()(a&&s.highlighted),children:[(0,i.jsx)(fs,{hasSubmenu:!0,className:E?s.selected:"",...e,children:nt()}),a&&r]})})},ps=(0,d.forwardRef)((r,e)=>{const[n]=(0,Ao.O)(r.children,s=>s.getElements().filter(a=>a.type===xa));return n?(0,i.jsx)(Sa,{...r,children:n}):(0,i.jsx)(fs,{...r,ref:e})});function cl(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,s]=useState(""),a=Po(e),l=r.icon?r.icon:SearchIcon,S=()=>{r.onSearch(n),s("")},E=nt=>{nt.key==="Enter"&&(nt.preventDefault(),S())},M=nt=>{s(nt.target.value)},k=nt=>{nt.preventDefault(),nt.stopPropagation()},Z=nt=>{S(),nt.preventDefault()};return _jsx(Box,{className:a.searchRoot,children:_jsx(ps,{icon:l,to:r.to,onClick:Z,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:k,onChange:M,onKeyDown:E,className:a.searchContainer,InputProps:{disableUnderline:!0,className:a.searchField},inputProps:{className:a.searchFieldHTMLInput}})})})}const dl=(0,Oo.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),ul=(0,Oo.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),ba=(0,Oo.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Oa=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),hl=(0,Oo.A)("div")(({theme:r})=>{const e=Oa(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),fl=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=Po(r),{isOpen:n,setOpen:s}=useSidebarOpenState();if(useMediaQuery(S=>S.breakpoints.down("md"),{noSsr:!0}))return null;const l=()=>{s(!n)};return _jsx(Button,{role:"button",onClick:l,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:n?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Pa=(0,Je.A)({root:{width:Oe.hC.drawerWidthClosed,height:3*Oe.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Oe.hC.drawerWidthClosed,marginLeft:24}}),wa=()=>{const r=Pa(),{isOpen:e}=hr();return(0,i.jsx)("div",{className:r.root,children:(0,i.jsx)(es.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,i.jsx)(_i,{}):(0,i.jsx)(Qi,{})})})},Ta=({children:r})=>(0,i.jsxs)(ns.G,{children:[(0,i.jsxs)(ua,{children:[(0,i.jsx)(wa,{}),(0,i.jsx)(ba,{}),(0,i.jsx)(ps,{icon:Vi.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Ra=t(71677),Ia=t(62437),Da=t(55484),Ma=t(45061),La=t(16203);const Ba=(0,Je.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var gs;(function(r){r.LIGHT="light",r.DARK="dark"})(gs||(gs={}));const ja=()=>{const r=(0,$n.gf)(io),e=Ba(),[n,s]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),a={light:{icon:Da.A,title:"Dark theme"},dark:{icon:Ia.A,title:"Light theme"}},{title:l,icon:S}=a[n],E=()=>{s(M=>{const k=M==="light"?"dark":"light";return r.setActiveThemeId(k),k})};return(0,i.jsx)(rn.A,{display:"flex",alignItems:"center",mr:2,children:(0,i.jsx)(Ra.Ay,{title:l,arrow:!0,children:(0,i.jsx)(rs.A,{size:"small",onClick:E,children:(0,i.jsx)(S,{className:e.headerIcon})})})})},Ua=()=>(0,i.jsxs)(v.Wj,{children:[(0,i.jsx)(Ma.T,{}),(0,i.jsx)(La.p,{withSearch:!1})]}),Fa=(0,i.jsx)(Ua,{}),vs=gi({apis:Wi,configLoader:Hi,plugins:Object.values(o)}),$a=vs.getProvider(),Na=vs.getRouter(),Wa=v.Ju.provide((0,c.Hr)({name:"ThemeToggleAddon",component:ja,location:A.e.Header})),ka=(0,i.jsxs)(kr,{children:[(0,i.jsx)(m.C5,{to:"/docs/default/component/local/"},"/"),(0,i.jsx)(m.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,i.jsx)(Fi,{})}),(0,i.jsx)(m.qh,{path:"/docs",element:(0,i.jsx)(v.$j,{}),children:(0,i.jsx)(h.K,{})}),(0,i.jsxs)(m.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,i.jsx)(v.Wj,{}),children:[Fa,(0,i.jsx)(c.po,{children:(0,i.jsx)(Wa,{})})]})]});var Ka=()=>(0,i.jsx)($a,{children:(0,i.jsx)(Na,{children:(0,i.jsx)(Ta,{children:ka})})});O.createRoot(document.getElementById("root")).render((0,i.jsx)(Ka,{}))},43836:function(Y,T,t){"use strict";t.d(T,{qO:function(){return O},tK:function(){return d}});var o=t(14041),i=t(63544);function d(v){return(0,i.Q)(v,()=>(0,o.createContext)(void 0))}function O(v){return(0,o.useContext)(d(v))}function m(v){return{set(h){globalThis[`__@backstage/${v}__`]=createContext(createVersionedValueMap(h))},reset(){delete globalThis[`__@backstage/${v}__`]}}}},10602:function(Y,T,t){"use strict";t.d(T,{B:function(){return o}});function o(i){Object.freeze(i);const d={atVersion(O){return i[O]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return i}}),d}},63544:function(Y,T,t){"use strict";t.d(T,{Q:function(){return O}});function o(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const i=o(),d=m=>`__@backstage/${m}__`;function O(m,v){const h=d(m);let c=i[h];return c||(c=v(),i[h]=c,c)}},7341:function(Y,T,t){"use strict";t.d(T,{v:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"plugin.catalog.service"})},82292:function(Y,T,t){"use strict";t.d(T,{n:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"plugin.catalog.entity-presentation"})},88083:function(Y,T,t){"use strict";t.d(T,{T:function(){return m}});var o=t(6820),i=t(72348),d=t(46123),O=t.n(d);function m(c,A){const{kind:x,namespace:P,name:u,title:b,description:g,displayName:D,type:w}=v(c),y=(0,o.U2)({kind:x||"unknown",namespace:P||i.oQ,name:u||"unknown"}),B=h({kind:x,namespace:P,name:u,context:A}),R=[D,b,B].find(z=>z&&typeof z=="string"),C=[R!==y?y:void 0,w,g].filter(z=>z&&typeof z=="string").join(" | ");return{entityRef:y,primaryTitle:R,secondaryTitle:C||void 0,Icon:void 0}}function v(c){if(typeof c=="string"){let A=c.indexOf(":");const x=c.indexOf("/");x!==-1&&x<A&&(A=-1);const P=A===-1?void 0:c.slice(0,A),u=x===-1?void 0:c.slice(A+1,x),b=c.slice(Math.max(A+1,x+1));return{kind:P,namespace:u,name:b}}if(typeof c=="object"&&c!==null){const A=[O()(c,"kind")].find(w=>w&&typeof w=="string"),x=[O()(c,"metadata.namespace"),O()(c,"namespace")].find(w=>w&&typeof w=="string"),P=[O()(c,"metadata.name"),O()(c,"name")].find(w=>w&&typeof w=="string"),u=[O()(c,"metadata.title")].find(w=>w&&typeof w=="string"),b=[O()(c,"metadata.description")].find(w=>w&&typeof w=="string"),g=[O()(c,"spec.profile.displayName")].find(w=>w&&typeof w=="string"),D=[O()(c,"spec.type")].find(w=>w&&typeof w=="string");return{kind:A,namespace:x,name:P,title:u,description:b,displayName:g,type:D}}return{}}function h(c){var A,x,P,u,b;const g=((A=c.kind)===null||A===void 0?void 0:A.toLocaleLowerCase("en-US"))||"unknown",D=c.namespace||i.oQ,w=c.name||"unknown",y=(P=c.context)===null||P===void 0||(x=P.defaultKind)===null||x===void 0?void 0:x.toLocaleLowerCase("en-US"),B=(b=c.context)===null||b===void 0||(u=b.defaultNamespace)===null||u===void 0?void 0:u.toLocaleLowerCase("en-US");let R=w;return(B&&D.toLocaleLowerCase("en-US")!==B||D!==i.oQ)&&(R=`${D}/${R}`),y&&g.toLocaleLowerCase("en-US")!==y&&(R=`${g}:${R}`),R}},3169:function(Y,T,t){"use strict";t.d(T,{f:function(){return h}});var o=t(6820),i=t(72427),d=t(14041),O=t(82292),m=t(88083);function v(c,A,x){const[P,u]=(0,d.useState)(c);return(0,d.useEffect)(()=>{u(c);const b=A==null?void 0:A.subscribe({next:g=>{u(g)},complete:()=>{b==null||b.unsubscribe()}});return()=>{b==null||b.unsubscribe()}},x),P}function h(c,A){const P=(0,i.Q2)().get(O.n),u=[P,JSON.stringify(c),JSON.stringify(A||null)],b=(0,d.useMemo)(()=>P?P.forEntity(typeof c=="string"||"metadata"in c?c:(0,o.U2)(c),A):{snapshot:(0,m.T)(c,A)},u);return v(b.snapshot,b.update$,[b])}},18:function(Y,T,t){"use strict";t.d(T,{a:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"catalog-react.starred-entities"})},54203:function(Y,T,t){"use strict";t.d(T,{GI:function(){return b}});var o=t(31085),i=t(14041),d=t(5893),O=t(54917),m=t(64947),v=t(73845),h=t(10394),c=t(72501),A=t(42899),x=t(65859);const P=g=>{var D;const w=(0,d.A)(z=>{var V,tt;return z.breakpoints.down((tt=(V=g.options)===null||V===void 0?void 0:V.drawerBreakpoint)!==null&&tt!==void 0?tt:"md")}),y=(0,O.A)(),[B,R]=(0,i.useState)(!1);var C;return w?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(m.A,{style:{marginTop:y.spacing(1),marginLeft:y.spacing(1)},onClick:()=>R(!0),startIcon:(0,o.jsx)(x.A,{}),children:"Filters"}),(0,o.jsx)(v.Ay,{open:B,onClose:()=>R(!1),anchor:(C=(D=g.options)===null||D===void 0?void 0:D.drawerAnchor)!==null&&C!==void 0?C:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,o.jsxs)(h.A,{m:2,children:[(0,o.jsx)(c.A,{variant:"h6",component:"h2",style:{marginBottom:y.spacing(1)},children:"Filters"}),g.children]})})]}):(0,o.jsx)(A.A,{item:!0,lg:2,children:g.children})},u=g=>(0,o.jsx)(A.A,{item:!0,xs:12,lg:10,children:g.children}),b=g=>(0,o.jsx)(A.A,{container:!0,style:{position:"relative"},children:g.children});b.Filters=P,b.Content=u},50207:function(Y,T,t){"use strict";t.d(T,{y:function(){return H}});var o=t(31085),i=t(58837),d=t(10394),O=t(72501),m=t(6924),v=t(20577),h=t(14041),c=t(72427),A=t(73466),x=t(7341),P=t(69076),u=t(86901),b=t(44148),g=t(41260);const D=(0,o.jsx)(g.A,{fontSize:"small"}),w=(0,o.jsx)(b.A,{fontSize:"small"});function y({selected:J}){return(0,o.jsx)(P.A,{icon:D,checkedIcon:w,checked:J})}const B=(0,h.memo)(J=>{const{selected:q,value:mt,availableOptions:it,showCounts:Ot}=J,ct=Ot?`${mt} (${it==null?void 0:it[mt]})`:mt;return(0,o.jsx)(u.A,{control:(0,o.jsx)(y,{selected:q}),label:ct,onClick:gt=>gt.preventDefault()})});var R=t(16249),C=t(53373),z=t.n(C);const V=(0,i.A)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function tt(J){const q=V();return(0,o.jsx)(R.A,{variant:"outlined",...J,className:z()(q.input,J.className)})}var K=t(21405),W=t(26796);const _=(0,i.A)({root:{},label:{}},{name:"CatalogReactEntityAutocompletePicker"});function H(J){var q;const{label:mt,name:it,path:Ot,showCounts:ct,Filter:gt,InputProps:lt,initialSelectedOptions:rt=[],filtersForAvailableValues:vt=["kind"]}=J,yt=_(),{updateFilters:Pt,filters:pt,queryParameters:{[it]:st}}=(0,K.nK)(),ft=(0,c.gf)(x.v),ht=vt.map(Dt=>pt[Dt]),{value:wt}=(0,A.A)(async()=>{const Dt=Ot,{facets:kt}=await ft.getEntityFacets({facets:[Dt],filter:(0,W.Rr)(ht.filter(Boolean))});return Object.fromEntries(kt[Dt].map(({value:St,count:Wt})=>[St,Wt]))},[...ht]),At=(0,h.useMemo)(()=>[st].flat().filter(Boolean),[st]);var N;const[G,Et]=(0,h.useState)(At.length?At:(N=(q=pt[it])===null||q===void 0?void 0:q.values)!==null&&N!==void 0?N:rt);(0,h.useEffect)(()=>{At.length&&Et(At)},[At]);const bt=Object.keys(wt!=null?wt:{}),Ft=G.length&&bt.length;(0,h.useEffect)(()=>{Pt({[it]:Ft?new gt(G):void 0})},[it,Ft,G,gt,Pt]);const Tt=pt[it];return Tt&&typeof Tt=="object"&&!("values"in Tt)||!bt.length||bt.length<=1?null:(0,o.jsx)(d.A,{className:yt.root,pb:1,pt:1,children:(0,o.jsxs)(O.A,{className:yt.label,variant:"button",component:"label",children:[mt,(0,o.jsx)(v.Ay,{multiple:!0,disableCloseOnSelect:!0,options:bt,value:G,onChange:(Dt,kt)=>Et(kt),renderOption:(Dt,{selected:kt})=>(0,o.jsx)(B,{selected:kt,value:Dt,availableOptions:wt,showCounts:!!ct}),size:"small",popupIcon:(0,o.jsx)(m.A,{"data-testid":`${String(it)}-picker-expand`}),renderInput:Dt=>(0,o.jsx)(tt,{...Dt,...lt})})]})})}},72987:function(Y,T,t){"use strict";t.d(T,{t:function(){return pt}});var o=t(31085),i=t(6820),d=t(58837),O=t(86901),m=t(10394),v=t(69076),h=t(71677),c=t(72501),A=t(16249),x=t(44148),P=t(41260),u=t(6924),b=t(20577),g=t(14041),D=t(21405),w=t(92822),y=t(92367),B=t(48108),R=t(47966),C=t(90184),z=t(72427),V=t(87290),tt=t(7341);function K({enabled:st}){const ft=(0,z.gf)(tt.v),[ht]=(0,g.useState)(async()=>{if(!st)return[];const wt="relations.ownedBy";return ft.getEntityFacets({facets:[wt]}).then(At=>At.facets[wt].map(N=>N.value).map(N=>{const{kind:G,name:Et,namespace:bt}=(0,i.KU)(N);return{apiVersion:"backstage.io/v1beta1",kind:G,metadata:{name:Et,namespace:bt}}}).sort((N,G)=>(N.metadata.namespace||"").localeCompare(G.metadata.namespace||"","en-US")||N.metadata.name.localeCompare(G.metadata.name,"en-US")||N.kind.localeCompare(G.kind,"en-US"))).catch(()=>[])});return(0,V.A)(async(wt,At)=>{const N=await ht;if(!N)return{items:[]};var G;const Et=(G=At==null?void 0:At.limit)!==null&&G!==void 0?G:20,{text:bt,start:Ft}=W(wt),Tt=N.filter(kt=>J(bt,kt)),Dt=Ft+Et;return{items:Tt.slice(0,Dt),...H({entities:Tt,limit:Dt,payload:{text:bt,start:Dt}})}},[ht],{loading:!0,value:{items:[]}})}function W(st){return _(st)&&st.cursor?JSON.parse(atob(st.cursor)):{text:st.text||"",start:0}}function _(st){return!!st.cursor}function H({entities:st,limit:ft,payload:ht}){return st.length>ft?{cursor:btoa(JSON.stringify(ht))}:{}}function J(st,ft){var ht;const wt=st.trim();return ft.kind.includes(wt)||((ht=ft.metadata.namespace)===null||ht===void 0?void 0:ht.includes(wt))||ft.metadata.name.includes(wt)}function q(){const st=(0,z.gf)(tt.v);return(0,V.A)(async(ft,ht)=>{const wt=ft,At=ft;var N;const G=(N=ht==null?void 0:ht.limit)!==null&&N!==void 0?N:20;if(At.cursor){const bt=await st.queryEntities({cursor:At.cursor,limit:G});return{cursor:bt.pageInfo.nextCursor,items:[...At.items,...bt.items]}}const Et=await st.queryEntities({fullTextFilter:{term:wt.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:G});return{cursor:Et.pageInfo.nextCursor,items:Et.items}},[],{loading:!0})}var mt=t(76842);function it({mode:st,initialSelectedOwnersRefs:ft}){const ht=st==="owners-only",wt=q(),At=K({enabled:ht}),[N,G]=ht?At:wt;return[N,G,Ot({enabled:!ht,initialSelectedOwnersRefs:ft})]}function Ot({enabled:st,initialSelectedOwnersRefs:ft}){const ht=(0,g.useRef)({}),wt=(0,z.gf)(tt.v),[,At]=(0,V.A)(async()=>{(await wt.getEntitiesByRefs({entityRefs:ft})).items.forEach(G=>{G&&(ht.current[(0,i.U2)(G)]=G)})},[]);return(0,mt.u)(()=>{st&&ft.length>0&&At()}),{getEntity:N=>ht.current[N],setEntity:N=>{ht.current[(0,i.U2)(N)]=N}}}var ct=t(87051),gt=t(3169);const lt=(0,d.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),rt=(0,ct.A)(st=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(O.A),vt=(0,o.jsx)(P.A,{fontSize:"small"}),yt=(0,o.jsx)(x.A,{fontSize:"small"});function Pt(st){const ft=lt(),ht=st.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:wt}=(0,gt.f)(st.entity);return(0,o.jsx)(m.A,{className:ft.fullWidth,children:(0,o.jsx)(rt,{className:ft.fullWidth,control:(0,o.jsx)(v.A,{icon:vt,checkedIcon:yt,checked:st.isSelected}),onClick:At=>At.preventDefault(),label:(0,o.jsx)(h.Ay,{title:wt,children:(0,o.jsxs)(m.A,{display:"flex",alignItems:"center",children:[ht?(0,o.jsx)(R.A,{fontSize:"small"}):(0,o.jsx)(B.A,{fontSize:"small"}),"\xA0",(0,o.jsx)(m.A,{className:ft.boxLabel,children:(0,o.jsx)(c.A,{noWrap:!0,children:wt})})]})})})})}const pt=st=>{var ft,ht;const wt=lt(),{mode:At="owners-only"}=st||{},{updateFilters:N,filters:G,queryParameters:{owners:Et}}=(0,D.nK)(),[bt,Ft]=(0,g.useState)(""),Tt=(0,g.useMemo)(()=>[Et].flat().filter(Boolean),[Et]);var Dt;const[kt,St]=(0,g.useState)(Tt.length?Tt:(Dt=(ft=G.owners)===null||ft===void 0?void 0:ft.values)!==null&&Dt!==void 0?Dt:[]),[{value:Wt,loading:Jt},ue,ae]=it({mode:At,initialSelectedOwnersRefs:kt});(0,y.s)(()=>ue({text:bt}),[bt,ue],250);const le=(Wt==null?void 0:Wt.items)||[];return(0,g.useEffect)(()=>{if(Tt.length){const Ht=new w.N9(Tt);St(Ht.values)}},[Tt]),(0,g.useEffect)(()=>{N({owners:kt.length?new w.N9(kt):void 0})},[kt,N]),["user","group"].includes(((ht=G.kind)===null||ht===void 0?void 0:ht.value.toLocaleLowerCase("en-US"))||"")?null:(0,o.jsx)(m.A,{className:wt.root,pb:1,pt:1,children:(0,o.jsxs)(c.A,{className:wt.label,variant:"button",component:"label",children:["Owner",(0,o.jsx)(b.Ay,{multiple:!0,disableCloseOnSelect:!0,loading:Jt,options:le,value:kt,getOptionSelected:(Ht,Xt)=>typeof Xt=="string"?(0,i.U2)(Ht)===Xt:Ht===Xt,getOptionLabel:Ht=>{const Xt=typeof Ht=="string"?ae.getEntity(Ht)||(0,i.KU)(Ht,{defaultKind:"group",defaultNamespace:"default"}):Ht;return(0,C.Z)(Xt,(0,C.S)(Xt))},onChange:(Ht,Xt)=>{Ft(""),St(Xt.map(ge=>{const Ke=typeof ge=="string"?ge:(0,i.U2)(ge);return typeof ge!="string"&&ae.setEntity(ge),Ke}))},filterOptions:Ht=>Ht,renderOption:(Ht,{selected:Xt})=>(0,o.jsx)(Pt,{entity:Ht,isSelected:Xt}),size:"small",popupIcon:(0,o.jsx)(u.A,{"data-testid":"owner-picker-expand"}),renderInput:Ht=>(0,o.jsx)(A.A,{...Ht,className:wt.input,onChange:Xt=>{Ft(Xt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:Ht=>{const Xt=Ht.currentTarget;Math.abs(Xt.scrollHeight-Xt.clientHeight-Xt.scrollTop)<1&&(Wt!=null&&Wt.cursor)&&ue({items:Wt.items,cursor:Wt.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},8859:function(Y,T,t){"use strict";t.d(T,{z:function(){return g}});var o=t(31085),i=t(6820),d=t(72348),O=t(72072),m=t(9222),v=t(14041),h=t(29207),c=t(58837),A=t(10394),x=t(71677),P=t(3169);const u=(0,c.A)(w=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:w.spacing(.5),color:w.palette.text.secondary,lineHeight:0}}),{name:"CatalogReactEntityDisplayName"}),b=w=>{const{entityRef:y,hideIcon:B,disableTooltip:R,defaultKind:C,defaultNamespace:z}=w,V=u(),{primaryTitle:tt,secondaryTitle:K,Icon:W}=(0,P.f)(y,{defaultKind:C,defaultNamespace:z});let _=(0,o.jsx)(o.Fragment,{children:tt});return _=(0,o.jsxs)(A.A,{component:"span",className:V.root,children:[W&&!B?(0,o.jsx)(A.A,{component:"span",className:V.icon,children:(0,o.jsx)(W,{fontSize:"inherit"})}):null,_]}),K&&!R&&(_=(0,o.jsx)(x.Ay,{enterDelay:1500,title:K,children:_})),_},g=(0,v.forwardRef)((w,y)=>{const{entityRef:B,defaultKind:R,defaultNamespace:C,title:z,children:V,hideIcon:tt,...K}=w,W=D(w.entityRef);var _;const H=(_=V!=null?V:z)!==null&&_!==void 0?_:(0,o.jsx)(b,{entityRef:B,defaultKind:R,defaultNamespace:C,hideIcon:tt});return(0,o.jsx)(O.N_,{...K,ref:y,to:W,children:H})});function D(w){const y=(0,m.S)(h.s);let B,R,C;if(typeof w=="string"){const tt=(0,i.KU)(w);B=tt.kind,R=tt.namespace,C=tt.name}else"metadata"in w?(B=w.kind,R=w.metadata.namespace,C=w.metadata.name):(B=w.kind,R=w.namespace,C=w.name);B=B.toLocaleLowerCase("en-US");var z;R=(z=R==null?void 0:R.toLocaleLowerCase("en-US"))!==null&&z!==void 0?z:d.oQ;const V={kind:encodeURIComponent(B),namespace:encodeURIComponent(R),name:encodeURIComponent(C)};return y(V)}},34428:function(Y,T,t){"use strict";t.d(T,{i:function(){return m}});var o=t(31085),i=t(6820),d=t(14041),O=t(8859);function m(v){const{entityRefs:h,hideIcons:c,...A}=v;return(0,o.jsx)(o.Fragment,{children:h.map((x,P)=>{const u=typeof x=="string"?x:(0,i.U2)(x);return(0,o.jsxs)(d.Fragment,{children:[P>0&&", ",(0,o.jsx)(O.z,{...A,entityRef:x,hideIcon:c})]},`${P}.${u}`)})})}},90184:function(Y,T,t){"use strict";t.d(T,{S:function(){return O},Z:function(){return m}});var o=t(72348),i=t(46123),d=t.n(i);function O(v,h){const c=h==null?void 0:h.defaultKind;let A,x,P;return"metadata"in v?(A=v.kind,x=v.metadata.namespace,P=v.metadata.name):(A=v.kind,x=v.namespace,P=v.name),(x===void 0||x==="")&&(x=o.oQ),(h==null?void 0:h.defaultNamespace)!==void 0?(h==null?void 0:h.defaultNamespace)===x&&(x=void 0):x===o.oQ&&(x=void 0),A=A.toLocaleLowerCase("en-US"),A=c&&c.toLocaleLowerCase("en-US")===A?void 0:A,`${A?`${A}:`:""}${x?`${x}/`:""}${P}`}function m(v,h){for(const c of["spec.profile.displayName","metadata.title"]){const A=d()(v,c);if(A&&typeof A=="string")return A}return h}},91035:function(Y,T,t){"use strict";t.d(T,{m:function(){return h}});var o=t(31085),i=t(58837),d=t(14041),O=t(92822),m=t(50207);const v=(0,i.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),h=c=>{const A=v();return(0,o.jsx)(m.y,{label:"Tags",name:"tags",path:"metadata.tags",Filter:O.q_,showCounts:c.showCounts,InputProps:{className:A.input}})}},67626:function(Y,T,t){"use strict";t.d(T,{y:function(){return Ot}});var o=t(31085),i=t(72427),d=t(65461),O=t(58837),m=t(40703),v=t(72501),h=t(58007),c=t(26343),A=t(46423),x=t(5951),P=t(65569),u=t(9684),b=t(80109),g=t(14041),D=t(92822),w=t(21405),y=t(16009),B=t(45250),R=t(73466),C=t(7341),z=t(26796),V=t(87290),tt=t(48899);function K(){const ct=(0,i.gf)(y.K),gt=(0,i.gf)(C.v),{filters:lt}=(0,w.nK)(),{value:rt,loading:vt}=(0,R.A)(async()=>(await ct.getBackstageIdentity()).ownershipEntityRefs,[]),{user:yt,owners:Pt,...pt}=lt,st=(0,z.$3)((0,B.compact)(Object.values(pt))),[{value:ft,loading:ht},wt]=(0,V.A)(async N=>{const G=W(N.owners,N.ownershipEntityRefs);if(G===void 0)return 0;const{["metadata.name"]:Et,...bt}=N.filter.filter,{totalItems:Ft}=await gt.queryEntities({...N.filter,filter:{...bt,"relations.ownedBy":G},limit:0});return Ft},[],{loading:!0});return(0,tt.A)(()=>{Object.keys(st.filter).length!==0&&rt!==void 0&&wt({ownershipEntityRefs:rt,owners:Pt,filter:st})},[rt,Pt,st]),{count:ft,loading:vt||ht,filter:(0,g.useMemo)(()=>D.tN.owned(rt!=null?rt:[]),[rt]),ownershipEntityRefs:rt}}function W(ct,gt){if(gt===void 0)return;var lt;const rt=(lt=ct==null?void 0:ct.values)!==null&&lt!==void 0?lt:[];if(rt.length){const vt=(0,B.intersection)(rt,gt);return vt.length===0?void 0:vt}return gt}function _(){const ct=(0,i.gf)(C.v),{filters:gt}=(0,w.nK)(),lt=(0,g.useRef)(),rt=(0,g.useMemo)(()=>{const{user:Pt,...pt}=gt,st=(0,B.compact)(Object.values(pt)),ft=(0,z.$3)(st),ht={...ft,limit:0};return Object.keys(ft.filter).length===0?(lt.current=void 0,lt.current):(0,B.isEqual)(ht,lt.current)?lt.current:(lt.current=ht,ht)},[gt]),{value:vt,loading:yt}=(0,R.A)(async()=>{if(rt===void 0)return 0;const{totalItems:Pt}=await ct.queryEntities(rt);return Pt},[rt]);return{count:vt,loading:yt}}var H=t(6820),J=t(56889);function q(){const ct=(0,i.gf)(C.v),{filters:gt}=(0,w.nK)(),{starredEntities:lt}=(0,J.I)(),rt=(0,g.useRef)(),vt=(0,g.useMemo)(()=>{const{user:st,...ft}=gt,ht=(0,B.compact)(Object.values(ft)),wt=(0,z.$3)(ht),N={...wt,filter:{...wt.filter,["metadata.name"]:Array.from(lt).map(G=>(0,H.KU)(G).name)},limit:1e3};return(0,B.isEqual)(N,rt.current)?rt.current:(rt.current=N,N)},[gt,lt]),{value:yt,loading:Pt}=(0,R.A)(async()=>lt.size?(await ct.queryEntities(vt)).items.map(ft=>(0,H.U2)({kind:ft.kind,namespace:ft.metadata.namespace,name:ft.metadata.name})).filter(ft=>lt.has(ft)).length:0,[vt,lt]),pt=(0,g.useMemo)(()=>D.tN.starred(Array.from(lt)),[lt]);return{count:yt,loading:Pt,filter:pt}}const mt=(0,O.A)(ct=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:ct.spacing(1,0,1,0)},title:{margin:ct.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:ct.palette.text.primary},menuItem:{minHeight:ct.spacing(6)},groupWrapper:{margin:ct.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function it(ct){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:u.A},{id:"starred",label:"Starred",icon:b.A}]},{name:ct!=null?ct:"Company",items:[{id:"all",label:"All"}]}]}const Ot=ct=>{const{initialFilter:gt,availableFilters:lt}=ct,rt=mt(),vt=(0,i.gf)(d.U);var yt;const Pt=(yt=vt.getOptionalString("organization.name"))!==null&&yt!==void 0?yt:"Company",{filters:pt,updateFilters:st,queryParameters:{kind:ft,user:ht}}=(0,w.nK)(),wt=["starred","all"],At=it(Pt).map(ae=>({...ae,items:ae.items.filter(({id:le})=>["group","user"].some(Ht=>Ht===ft)?wt.includes(le):!lt||lt.includes(le))})).filter(({items:ae})=>!!ae.length),{count:N,loading:G,filter:Et}=K(),{count:bt}=_(),{count:Ft,filter:Tt,loading:Dt}=q(),kt=(0,g.useMemo)(()=>[ht].flat()[0],[ht]),[St,Wt]=(0,g.useState)(kt!=null?kt:gt),Jt=(0,g.useMemo)(()=>({all:bt,starred:Ft,owned:N}),[Ft,N,bt]);(0,g.useEffect)(()=>{kt&&Wt(kt)},[kt]);const ue=G||Dt;return(0,g.useEffect)(()=>{!ue&&St&&St!=="all"&&Jt[St]===0&&Wt("all")},[ue,Jt,St,Wt]),(0,g.useEffect)(()=>{if(!St||ue)return;st({user:St==="owned"?Et:St==="starred"?Tt:D.tN.all()})},[St,Tt,Et,st,ue]),(0,o.jsx)(m.A,{className:rt.root,children:At.map(ae=>(0,o.jsxs)(g.Fragment,{children:[(0,o.jsx)(v.A,{variant:"subtitle2",component:"span",className:rt.title,children:ae.name}),(0,o.jsx)(m.A,{className:rt.groupWrapper,children:(0,o.jsx)(h.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":ae.name,children:ae.items.map(le=>{var Ht,Xt;return(0,o.jsxs)(c.A,{role:"none presentation",divider:!0,onClick:()=>Wt(le.id),selected:le.id===((Ht=pt.user)===null||Ht===void 0?void 0:Ht.value),className:rt.menuItem,disabled:Jt[le.id]===0,"data-testid":`user-picker-${le.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[le.icon&&(0,o.jsx)(A.A,{className:rt.listIcon,children:(0,o.jsx)(le.icon,{fontSize:"small"})}),(0,o.jsx)(x.A,{children:(0,o.jsxs)(v.A,{variant:"body1",children:[le.label," "]})}),(0,o.jsx)(P.A,{children:(Xt=Jt[le.id])!==null&&Xt!==void 0?Xt:"-"})]},le.id)})})})]},ae.name))})}},92822:function(Y,T,t){"use strict";t.d(T,{I5:function(){return x},Kf:function(){return g},N9:function(){return A},V3:function(){return c},gM:function(){return m},gZ:function(){return b},mT:function(){return D},qA:function(){return v},q_:function(){return h},tN:function(){return u},z:function(){return P}});var o=t(18990),i=t(51372),d=t(6820),O=t(67871);class m{getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}constructor(y){(0,o._)(this,"value",void 0),this.value=y}}class v{getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}constructor(y){(0,o._)(this,"value",void 0),this.value=y}}class h{filterEntity(y){return this.values.every(B=>{var R;return((R=y.metadata.tags)!==null&&R!==void 0?R:[]).includes(B)})}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}constructor(y){(0,o._)(this,"values",void 0),this.values=y}}class c{filterEntity(y){const B=this.toUpperArray(this.value.split(/\s/)),R=this.toUpperArray([y.metadata.tags]),C=this.toUpperArray([y.metadata.name,y.metadata.title]);for(const z of B)if(R.every(V=>V!==z)&&C.every(V=>!V.includes(z)))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(B=>!!B).map(B=>B.toLocaleUpperCase("en-US"))}constructor(y){(0,o._)(this,"value",void 0),this.value=y}}class A{getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(y){return this.values.some(B=>(0,O.t)(y,i.vv).some(R=>(0,d.U2)(R)===B))}toQueryValue(){return this.values}constructor(y){(0,o._)(this,"values",void 0),this.values=y.reduce((B,R)=>{try{return B.push((0,d.U2)((0,d.KU)(R,{defaultKind:"Group"}))),B}catch{return B}},[])}}class x{getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(y){return this.values.some(B=>{var R;return((R=y.spec)===null||R===void 0?void 0:R.lifecycle)===B})}toQueryValue(){return this.values}constructor(y){(0,o._)(this,"values",void 0),this.values=y}}class P{getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(y){return this.values.some(B=>y.metadata.namespace===B)}toQueryValue(){return this.values}constructor(y){(0,o._)(this,"values",void 0),this.values=y}}class u{static owned(y){return new u("owned",y)}static all(){return new u("all")}static starred(y){return new u("starred",y)}getCatalogFilters(){if(this.value==="owned"){var y;return{"relations.ownedBy":(y=this.refs)!==null&&y!==void 0?y:[]}}if(this.value==="starred"){var B,R;return{"metadata.name":(R=(B=this.refs)===null||B===void 0?void 0:B.map(C=>(0,d.KU)(C).name))!==null&&R!==void 0?R:[]}}return{}}filterEntity(y){if(this.value==="starred"){var B,R;return(R=(B=this.refs)===null||B===void 0?void 0:B.includes((0,d.U2)(y)))!==null&&R!==void 0?R:!0}if(this.value==="owned"){var C;const V=(0,O.t)(y,i.vv);var z;return(z=(C=this.refs)===null||C===void 0?void 0:C.some(tt=>V.some(K=>(0,d.U2)(K)===tt)))!==null&&z!==void 0?z:!1}return!0}toQueryValue(){return this.value}constructor(y,B){(0,o._)(this,"value",void 0),(0,o._)(this,"refs",void 0),this.value=y,this.refs=B}}class b{filterEntity(y){switch(this.value){case"owned":return this.isOwnedEntity(y);case"starred":return this.isStarredEntity(y);default:return!0}}toQueryValue(){return this.value}constructor(y,B,R){(0,o._)(this,"value",void 0),(0,o._)(this,"isOwnedEntity",void 0),(0,o._)(this,"isStarredEntity",void 0),this.value=y,this.isOwnedEntity=B,this.isStarredEntity=R}}class g{getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(y){var B;const R=(B=y.metadata.annotations)===null||B===void 0?void 0:B["backstage.io/orphan"];return R!==void 0&&this.value.toString()===R}constructor(y){(0,o._)(this,"value",void 0),this.value=y}}class D{filterEntity(y){var B,R;const C=(y==null||(R=y.status)===null||R===void 0||(B=R.items)===null||B===void 0?void 0:B.length)>0;return C!==void 0&&this.value===C}constructor(y){(0,o._)(this,"value",void 0),this.value=y}}},21405:function(Y,T,t){"use strict";t.d(T,{B9:function(){return D},nK:function(){return w}});var o=t(31085),i=t(45250),d=t.n(i),O=t(45810),m=t.n(O),v=t(14041),h=t(18690),c=t(87290),A=t(22771),x=t(71581),P=t(7341),u=t(26796),b=t(72427);const g=(0,v.createContext)(void 0),D=y=>{const B=(0,x.A)(),R=(0,b.gf)(P.v),[C,z]=(0,v.useState)({}),V=(0,h.zy)(),tt=y.pagination===!0||typeof y.pagination=="object",K=y.pagination&&typeof y.pagination=="object"&&typeof y.pagination.limit=="number"?y.pagination.limit:20,{queryParameters:W,cursor:_}=(0,v.useMemo)(()=>{const vt=m().parse(V.search,{ignoreQueryPrefix:!0});var yt;return{queryParameters:(yt=vt.filters)!==null&&yt!==void 0?yt:{},cursor:typeof vt.cursor=="string"?vt.cursor:void 0}},[V]),[H,J]=(0,v.useState)(_),[q,mt]=(0,v.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:tt?{}:void 0})),[{loading:it,error:Ot},ct]=(0,c.A)(async()=>{const vt=(0,i.compact)(Object.values(C)),yt=Object.keys(C).reduce((pt,st)=>{const ft=C[st];return ft!=null&&ft.toQueryValue&&(pt[st]=ft.toQueryValue()),pt},{});if(tt)if(H){if(H!==q.appliedCursor){const pt=(0,u.be)(vt),st=await R.queryEntities({cursor:H,limit:K});mt({appliedFilters:C,appliedCursor:H,backendEntities:st.items,entities:st.items.filter(pt),pageInfo:st.pageInfo,totalItems:st.totalItems})}}else{const pt=(0,u.be)(vt),st=(0,u.$3)(vt),ft=(0,u.$3)((0,i.compact)(Object.values(q.appliedFilters)));if(!(0,i.isEqual)(ft,st)){const ht=await R.queryEntities({...st,limit:K,orderFields:[{field:"metadata.name",order:"asc"}]});mt({appliedFilters:C,backendEntities:ht.items,entities:ht.items.filter(pt),pageInfo:ht.pageInfo,totalItems:ht.totalItems})}}else{const pt=(0,u.be)(vt),st=(0,u.Rr)(vt),ft=(0,u.Rr)((0,i.compact)(Object.values(q.appliedFilters)));if((0,i.isEqual)(ft,st)){const ht=q.backendEntities.filter(pt);mt({appliedFilters:C,backendEntities:q.backendEntities,entities:ht,totalItems:ht.length})}else{const ht=await R.getEntities({filter:st}),wt=ht.items.filter(pt);mt({appliedFilters:C,backendEntities:ht.items,entities:wt,totalItems:wt.length})}}if(B()){var Pt;const pt=m().parse(V.search,{ignoreQueryPrefix:!0}),st=m().stringify({...pt,filters:yt,cursor:H},{addQueryPrefix:!0,arrayFormat:"repeat"}),ft=`${window.location.pathname}${st}`;(Pt=window.history)===null||Pt===void 0||Pt.replaceState(null,document.title,ft)}},[R,W,C,q,H,tt],{loading:!0});(0,A.A)(ct,10,[C,H]);const gt=(0,v.useCallback)(vt=>{J(void 0),z(yt=>{const Pt=typeof vt=="function"?vt(yt):vt;return{...yt,...Pt}})},[]),lt=(0,v.useMemo)(()=>{var vt,yt;if(!tt)return;const Pt=(vt=q.pageInfo)===null||vt===void 0?void 0:vt.prevCursor,pt=(yt=q.pageInfo)===null||yt===void 0?void 0:yt.nextCursor;return{prev:Pt?()=>J(Pt):void 0,next:pt?()=>J(pt):void 0}},[tt,q.pageInfo]),rt=(0,v.useMemo)(()=>({filters:q.appliedFilters,entities:q.entities,backendEntities:q.backendEntities,updateFilters:gt,queryParameters:W,loading:it,error:Ot,pageInfo:lt,totalItems:q.totalItems}),[q,gt,W,it,Ot,lt]);return(0,o.jsx)(g.Provider,{value:rt,children:y.children})};function w(){const y=(0,v.useContext)(g);if(!y)throw new Error("useEntityList must be used within EntityListProvider");return y}},56889:function(Y,T,t){"use strict";t.d(T,{I:function(){return h}});var o=t(6820),i=t(72427),d=t(14041),O=t(1394),m=t(18);function v(c){return typeof c=="string"?c:(0,o.U2)(c)}function h(){const c=(0,i.gf)(m.a),A=(0,O.A)((0,d.useMemo)(()=>c.starredEntitie$(),[c]),new Set),x=(0,d.useCallback)(u=>A.has(v(u)),[A]),P=(0,d.useCallback)(u=>c.toggleStarred(v(u)).then(),[c]);return{starredEntities:A,toggleStarredEntity:P,isStarredEntity:x}}},29207:function(Y,T,t){"use strict";t.d(T,{s:function(){return d}});var o=t(34569),i=t(63544);const d=(0,i.Q)("catalog:entity-route-ref",()=>(0,o.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function O(m){var v,h;return{kind:m.kind.toLocaleLowerCase("en-US"),namespace:(h=(v=m.metadata.namespace)===null||v===void 0?void 0:v.toLocaleLowerCase("en-US"))!==null&&h!==void 0?h:DEFAULT_NAMESPACE,name:m.metadata.name}}},26796:function(Y,T,t){"use strict";t.d(T,{$3:function(){return d},Rr:function(){return O},be:function(){return m}});var o=t(92822);function i(v){return!!v.getFullTextFilters}function d(v){var h;const c=v.reduce((x,P)=>({...x,...P.getCatalogFilters?P.getCatalogFilters():{}}),{}),A=(h=v.find(i))===null||h===void 0?void 0:h.getFullTextFilters();return{filter:c,fullTextFilter:A}}function O(v){const h={};return v.forEach(c=>{var A;c instanceof o.q_||c instanceof o.N9||c instanceof o.I5||c instanceof o.z||c instanceof o.tN||c instanceof o.Kf||c instanceof o.V3||c instanceof o.gZ||Object.assign(h,((A=c.getCatalogFilters)===null||A===void 0?void 0:A.call(c))||{})}),h}function m(v){return h=>v.every(c=>!c.filterEntity||c.filterEntity(h))}},67871:function(Y,T,t){"use strict";t.d(T,{t:function(){return i}});var o=t(6820);function i(d,O,m){var v;let h=(d==null||(v=d.relations)===null||v===void 0?void 0:v.filter(c=>c.type===O).map(c=>(0,o.KU)(c.targetRef)))||[];return m!=null&&m.kind&&(h=h.filter(c=>c.kind.toLocaleLowerCase("en-US")===m.kind.toLocaleLowerCase("en-US"))),h}},95203:function(Y,T,t){"use strict";t.d(T,{qP:function(){return c},Zg:function(){return x},rQ:function(){return u},pS:function(){return P},UJ:function(){return A}});var o=t(18990),i=t(59598);let d=i.b,O=d;class m{toString(){return`routeRef{type=external,id=${this.id}}`}constructor(g,D,w){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,"optional",void 0),(0,o._)(this,O,void 0),this.id=g,this.params=D,this.optional=w,this[d]="external"}}function v(b){var g;return new m(b.id,(g=b.params)!==null&&g!==void 0?g:[],!!b.optional)}var h=t(34569);const c=v({id:"create-component",optional:!0}),A=v({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),x=v({id:"create-from-template",optional:!0,params:["namespace","templateName"]}),P=v({id:"catalog:unregister-redirect",optional:!0}),u=(0,h.H)({id:"catalog"})},54241:function(Y,T,t){"use strict";t.d(T,{b:function(){return o}});var o;(function(i){i.DENY="DENY",i.ALLOW="ALLOW",i.CONDITIONAL="CONDITIONAL"})(o||(o={}))},96824:function(Y,T,t){"use strict";t.d(T,{x:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"plugin.permission.api"})},70734:function(Y,T,t){"use strict";t.d(T,{e:function(){return m}});var o=t(31085),i=t(14041),d=t(58837);const O=(0,d.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),m=v=>{const{text:h,preTag:c,postTag:A}=v,x=O(),P=(0,i.useMemo)(()=>h.split(new RegExp(`(${c}.+?${A})`)),[A,c,h]);return(0,o.jsx)(o.Fragment,{children:P.map((u,b)=>u.includes(c)?(0,o.jsx)("mark",{className:x.highlight,children:u.replace(new RegExp(`${c}|${A}`,"g"),"")},b):u)})}},54560:function(Y,T,t){"use strict";t.d(T,{ec:function(){return A}});var o=t(31085),i=t(14041),d=t(93368),O=t(88758),m=t(8109);const v="search.results.list.items.extensions.v1",h=(u,b)=>{for(const g of u){if(!isValidElement(g))continue;const D=getComponentData(g,v);if(D!=null&&D(b))return cloneElement(g,{rank:b.rank,highlight:b.highlight,result:b.document,...g.props})}return null},c=u=>{const{rank:b,result:g,noTrack:D,children:w,alignItems:y="flex-start",...B}=u,R=(0,d.s)(),C=(0,i.useCallback)(()=>{D||g&&R.captureEvent("discover",g.title,{attributes:{to:g.location},value:b})},[b,g,D,R]);return(0,o.jsx)(m.A,{divider:!0,alignItems:y,onClickCapture:C,...B,children:w})},A=u=>{const{name:b,component:g,predicate:D=()=>!0}=u;return(0,O.zZ)({name:b,component:{lazy:()=>g().then(w=>y=>(0,o.jsx)(c,{rank:y.rank,result:y.result,noTrack:y.noTrack,children:(0,i.createElement)(w,y)}))},data:{[v]:D}})},x=u=>{const b=useElementFilter(u,g=>g.selectByComponentData({key:v}).getElements(),[u]);return useCallback((g,D)=>{const w=h(b,g);return _jsx(Fragment,{children:w!=null?w:_jsx(c,{rank:g.rank,result:g.document,children:_jsx(DefaultResultListItem,{rank:g.rank,highlight:g.highlight,result:g.document})})},D)},[b])},P=u=>{const{results:b,children:g,...D}=u,w=x(g);return _jsx(List,{...D,children:b.map(w)})}},72020:function(Y,T,t){"use strict";t.d(T,{AF:function(){return c},Hr:function(){return P},Wm:function(){return h},YR:function(){return D},po:function(){return A}});var o=t(31085),i=t(14041),d=t(18690),O=t(19402),m=t(88758),v=t(82442);const h="techdocs.addons.addon.v1",c="techdocs.addons.wrapper.v1",A=()=>null;(0,O.h)(A,c,!0);const x=w=>`${h}.${w.toLocaleLowerCase("en-US")}`;function P(w){const{name:y,component:B}=w;return(0,m.zZ)({name:y,component:{sync:R=>(0,o.jsx)(B,{...R})},data:{[h]:w,[x(y)]:!0}})}const u=(w,y)=>w.selectByComponentData({key:y}).getElements()[0],b=w=>w.selectByComponentData({key:c}).selectByComponentData({key:h}),g=w=>w.selectByComponentData({key:c}).findComponentData({key:h}),D=()=>{const w=(0,d.P1)(),y=(0,v.O)(w,b),B=(0,v.O)(w,g),R=(0,i.useCallback)(V=>{if(!y||!V)return null;const tt=x(V.name);var K;return(K=u(y,tt))!==null&&K!==void 0?K:null},[y]),C=(0,i.useCallback)(V=>{const tt=B.find(K=>K.name===V);return tt?R(tt):null},[B,R]),z=(0,i.useCallback)(V=>{const tt=B.filter(K=>K.location===V);return tt.length?tt.map(R):null},[B,R]);return{renderComponentByName:C,renderComponentsByLocation:z}}},26679:function(Y,T,t){"use strict";t.d(T,{l:function(){return i},s:function(){return d}});var o=t(55309);const i=(0,o.y)({id:"plugin.techdocs.service"}),d=(0,o.y)({id:"plugin.techdocs.storageservice"})},86892:function(Y,T,t){"use strict";t.d(T,{R:function(){return w},V:function(){return y}});var o=t(31085),i=t(14041),d=t(73466),O=t(28966),m=t(6820),v=t(43836),h=t(10602),c=t(72427),A=t(65461),x=t(25862),P=t(26679);function u(B,R){return R.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(B.kind=B.kind.toLocaleLowerCase(),B.name=B.name.toLocaleLowerCase(),B.namespace=B.namespace.toLocaleLowerCase()),B}const b=(B,R)=>(0,m.U2)(B)===(0,m.U2)(R),g={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},D=(0,v.tK)("techdocs-reader-page-context"),w=(0,i.memo)(B=>{const{entityRef:R,children:C}=B,z=(0,c.gf)(P.l),V=(0,c.gf)(A.U),tt=(0,d.A)(async()=>z.getEntityMetadata(R),[R]),K=(0,O.A)(async()=>z.getTechDocsMetadata(R),[R]),[W,_]=(0,i.useState)(g.title),[H,J]=(0,i.useState)(g.subtitle),[q,mt]=(0,i.useState)(g.shadowRoot);(0,i.useEffect)(()=>{q&&!K.value&&!K.loading&&K.retry()},[K.value,K.loading,q,K.retry,K]);const it={metadata:K,entityRef:u(R,V),entityMetadata:tt,shadowRoot:q,setShadowRoot:mt,title:W,setTitle:_,subtitle:H,setSubtitle:J},Ot=(0,h.B)({1:it});return(0,o.jsx)(x.Ig,{attributes:{entityRef:(0,m.U2)(R)},children:(0,o.jsx)(D.Provider,{value:Ot,children:C instanceof Function?C(it):C})})},(B,R)=>b(B.entityRef,R.entityRef)),y=()=>{const B=(0,i.useContext)(D);if(B===void 0)return g;const R=B.atVersion(1);if(R===void 0)throw new Error("No context found for version 1.");return R}},99730:function(Y,T,t){"use strict";t.d(T,{e:function(){return o}});const o=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:function(Y,T,t){"use strict";t.d(T,{V:function(){return o}});function o(i,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?i:i.toLocaleLowerCase("en-US")}},85920:function(Y,T,t){"use strict";t.d(T,{K:function(){return K}});var o=t(31085),i=t(14041),d=t(26280),O=t(59428),m=t(27586),v=t(21405),h=t(54203),c=t(67626),A=t(72987),x=t(91035),P=t(81859),u=t(86519);class b{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":u.c}}}const g=()=>{const{updateFilters:W}=(0,v.nK)();return(0,i.useEffect)(()=>{W({techdocs:new b})},[W]),null};var D=t(36338),w=t(45250),y=t(88640),B=t(77310),R=t(56889),C=t(27125),z=t(84295),V=t(42717);const tt=W=>{var _;const{columns:H,actions:J,options:q}=W,{loading:mt,error:it,entities:Ot,filters:ct}=(0,v.nK)(),{isStarredEntity:gt,toggleStarredEntity:lt}=(0,R.I)(),[,rt]=(0,D.A)();var vt;const yt=(0,w.capitalize)((vt=(_=ct.user)===null||_===void 0?void 0:_.value)!==null&&vt!==void 0?vt:"all"),Pt=[z.f.createCopyDocsUrlAction(rt),z.f.createStarEntityAction(gt,lt)];return it?(0,o.jsx)(y.B,{severity:"error",title:"Could not load available documentation.",children:(0,o.jsx)(B.z,{language:"text",text:it.toString()})}):(0,o.jsx)(C.o,{title:yt,entities:Ot,loading:mt,actions:J||Pt,columns:H,options:q})};tt.columns=V.B,tt.actions=z.f;const K=W=>{const{initialFilter:_="owned",columns:H,actions:J}=W;return(0,o.jsx)(P.S,{children:(0,o.jsxs)(d.U,{children:[(0,o.jsx)(O.d,{title:"",children:(0,o.jsx)(m.Y,{children:"Discover documentation in your ecosystem."})}),(0,o.jsx)(v.B9,{children:(0,o.jsxs)(h.GI,{children:[(0,o.jsxs)(h.GI.Filters,{children:[(0,o.jsx)(g,{}),(0,o.jsx)(c.y,{initialFilter:_}),(0,o.jsx)(A.t,{}),(0,o.jsx)(x.m,{})]}),(0,o.jsx)(h.GI.Content,{children:(0,o.jsx)(tt,{actions:J,columns:H})})]})})]})})}},27125:function(Y,T,t){"use strict";t.d(T,{o:function(){return y}});var o=t(31085),i=t(14041),d=t(36338),O=t(9222),m=t(72427),v=t(65461),h=t(51372),c=t(67871),A=t(90184),x=t(82779),P=t(14209),u=t(44186),b=t(73896),g=t(84295),D=t(42717),w=t(95768);const y=B=>{const{entities:R,title:C,loading:z,columns:V,actions:tt,options:K}=B,[,W]=(0,d.A)(),_=(0,O.S)(x.Oc),H=(0,m.gf)(v.U);if(!R)return null;const J=R.map(ct=>{const gt=(0,c.t)(ct,h.vv);var lt;return{entity:ct,resolved:{docsUrl:_({namespace:(0,w.V)((lt=ct.metadata.namespace)!==null&&lt!==void 0?lt:"default",H),kind:(0,w.V)(ct.kind,H),name:(0,w.V)(ct.metadata.name,H)}),ownedByRelations:gt,ownedByRelationsTitle:gt.map(rt=>(0,A.S)(rt,{defaultKind:"group"})).join(", ")}}}),q=[D.B.createNameColumn(),D.B.createOwnerColumn(),D.B.createKindColumn(),D.B.createTypeColumn()],mt=[g.f.createCopyDocsUrlAction(W)],it=20,Ot=J&&J.length>it;return(0,o.jsx)(o.Fragment,{children:z||J&&J.length>0?(0,o.jsx)(P.X,{isLoading:z,options:{paging:Ot,pageSize:it,search:!0,actionsColumnIndex:-1,...K},data:J,columns:V||q,actions:tt||mt,title:C?`${C} (${J.length})`:`All (${J.length})`}):(0,o.jsx)(u.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,o.jsx)(b.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};y.columns=D.B,y.actions=g.f},84295:function(Y,T,t){"use strict";t.d(T,{f:function(){return c}});var o=t(31085),i=t(14041),d=t(55290),O=t(87051),m=t(80109),v=t(15303);const h=(0,O.A)({root:{color:"#f3ba37"}})(m.A),c={createCopyDocsUrlAction(A){return x=>({icon:()=>(0,o.jsx)(d.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>A(`${window.location.origin}${x.resolved.docsUrl}`)})},createStarEntityAction(A,x){return P=>{const u=P.entity,b=A(u);return{cellStyle:{paddingLeft:"1em"},icon:()=>b?(0,o.jsx)(h,{}):(0,o.jsx)(v.A,{}),tooltip:b?"Remove from favorites":"Add to favorites",onClick:()=>x(u)}}}}},42717:function(Y,T,t){"use strict";t.d(T,{B:function(){return x}});var o=t(31085),i=t(14041),d=t(10394),O=t(58837);const m=(0,O.A)(P=>({value:{marginBottom:P.spacing(.75)},subvalue:{color:P.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function v(P){const{value:u,subvalue:b}=P,g=m();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.A,{className:g.value,children:u}),(0,o.jsx)(d.A,{className:g.subvalue,children:b})]})}var h=t(72072),c=t(34428);function A(P){return P.metadata.title||P.metadata.name}const x={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:P=>(0,o.jsx)(v,{value:(0,o.jsx)(h.N_,{to:P.resolved.docsUrl,children:A(P.entity)}),subvalue:P.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:P})=>(0,o.jsx)(c.i,{entityRefs:P.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},81859:function(Y,T,t){"use strict";t.d(T,{S:function(){return v}});var o=t(31085),i=t(14041),d=t(27155),O=t(72427),m=t(65461);const v=h=>{const{children:c}=h,A=(0,O.gf)(m.U);var x;const P=`Documentation available in ${(x=A.getOptionalString("organization.name"))!==null&&x!==void 0?x:"Backstage"}`;return(0,o.jsx)(d.d,{title:"Documentation",subtitle:P,themeId:"documentation",children:c})}},39278:function(Y,T,t){"use strict";t.d(T,{$j:function(){return z},Wj:function(){return V},Ju:function(){return y}});var o=t(26679),i=t(18990),d=t(70835),O=t(97142),m=t(50165);class v{async getCookie(){const _=`${await this.getApiOrigin()}/cookie`,H=await this.fetchApi.fetch(`${_}`,{credentials:"include"});if(!H.ok)throw await d.o.fromResponse(H);return await H.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(W){const{kind:_,namespace:H,name:J}=W,mt=`${await this.getApiOrigin()}/metadata/techdocs/${H}/${_}/${J}`,it=await this.fetchApi.fetch(`${mt}`);if(!it.ok)throw await d.o.fromResponse(it);return await it.json()}async getEntityMetadata(W){const{kind:_,namespace:H,name:J}=W,mt=`${await this.getApiOrigin()}/metadata/entity/${H}/${_}/${J}`,it=await this.fetchApi.fetch(`${mt}`);if(!it.ok)throw await d.o.fromResponse(it);return await it.json()}constructor(W){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=W.configApi,this.discoveryApi=W.discoveryApi,this.fetchApi=W.fetchApi}}class h{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var W;return(W=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&W!==void 0?W:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(W,_){const{kind:H,namespace:J,name:q}=W,it=`${await this.getStorageUrl()}/${J}/${H}/${q}/${_}`,Ot=await this.fetchApi.fetch(`${it.endsWith("/")?it:`${it}/`}index.html`);let ct="";switch(Ot.status){case 404:throw ct="Page not found. ",_||(ct+="This could be because there is no index.md file in the root of the docs directory of this repository."),new O.m_(ct);case 500:throw ct="Could not generate documentation or an error in the TechDocs backend. ",new Error(ct);default:break}return Ot.text()}async syncEntityDocs(W,_=()=>{}){const{kind:H,namespace:J,name:q}=W,it=`${await this.getApiOrigin()}/sync/${J}/${H}/${q}`,{token:Ot}=await this.identityApi.getCredentials();return new Promise((ct,gt)=>{const lt=new m.EventSourcePolyfill(it,{withCredentials:!0,headers:Ot?{Authorization:`Bearer ${Ot}`}:{}});lt.addEventListener("log",rt=>{rt.data&&_(JSON.parse(rt.data))}),lt.addEventListener("finish",rt=>{let vt=!1;rt.data&&({updated:vt}=JSON.parse(rt.data)),ct(vt?"updated":"cached")}),lt.onerror=rt=>{switch(lt.close(),rt.status){case 404:gt(new O.m_(rt.message));return;default:gt(new Error(rt.data));return}}})}async getBaseUrl(W,_,H){const{kind:J,namespace:q,name:mt}=_,Ot=`${await this.getApiOrigin()}/static/docs/${q}/${J}/${mt}/${H}`;return new URL(W,Ot.endsWith("/")?Ot:`${Ot}/`).toString()}constructor(W){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"identityApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=W.configApi,this.discoveryApi=W.discoveryApi,this.identityApi=W.identityApi,this.fetchApi=W.fetchApi}}var c=t(82779),A=t(9803),x=t(12935),P=t(65461),u=t(57405),b=t(16009),g=t(70795),D=t(88758),w=t(54560);const y=(0,A.i)({id:"techdocs",apis:[(0,x.b)({api:o.s,deps:{configApi:P.U,discoveryApi:u.I,identityApi:b.K,fetchApi:g.a},factory:({configApi:K,discoveryApi:W,identityApi:_,fetchApi:H})=>new h({configApi:K,discoveryApi:W,identityApi:_,fetchApi:H})}),(0,x.b)({api:o.l,deps:{configApi:P.U,discoveryApi:u.I,fetchApi:g.a},factory:({configApi:K,discoveryApi:W,fetchApi:_})=>new v({configApi:K,discoveryApi:W,fetchApi:_})})],routes:{root:c.rQ,docRoot:c.Oc,entityContent:c.Ri}}),B=y.provide((0,D.QJ)({name:"TechdocsPage",component:()=>t.e(9605).then(t.bind(t,29605)).then(K=>K.Router),mountPoint:c.rQ})),R=y.provide((0,D.QJ)({name:"EntityTechdocsContent",component:()=>t.e(9605).then(t.bind(t,29605)).then(K=>K.EmbeddedDocsRouter),mountPoint:c.Ri})),C=y.provide((0,D.QJ)({name:"TechDocsCustomHome",component:()=>t.e(4487).then(t.bind(t,94487)).then(K=>K.TechDocsCustomHome),mountPoint:c.rQ})),z=y.provide((0,D.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(K=>K.TechDocsIndexPage),mountPoint:c.rQ})),V=y.provide((0,D.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(K=>K.TechDocsReaderPage),mountPoint:c.Oc})),tt=y.provide((0,w.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(K=>K.TechDocsSearchResultListItem),predicate:K=>K.type==="techdocs"}))},16203:function(Y,T,t){"use strict";t.d(T,{p:function(){return Rt}});var o=t(31085),i=t(14041),d=t(42899),O=t(58837),m=t(86892),v=t(9394),h=t(22856),c=t(91360),A=t(68146);const x="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",P=p=>{(0,i.useEffect)(()=>{if(!p)return()=>{};const I=p.querySelectorAll('head > link[rel="stylesheet"]');var F;let $=(F=I==null?void 0:I.length)!==null&&F!==void 0?F:0;const Q=new CustomEvent(x);if(!$)return p.dispatchEvent(Q),()=>{};const X=()=>{--$===0&&p.dispatchEvent(Q)};return I==null||I.forEach(at=>{at.addEventListener("load",X)}),()=>{I==null||I.forEach(at=>{at.removeEventListener("load",X)})}},[p])},u=p=>{const[I,F]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!p)return()=>{};F(!0);const $=p.style;$.setProperty("opacity","0");const Q=()=>{F(!1),$.setProperty("opacity","1")};return p.addEventListener(x,Q),()=>{p.removeEventListener(x,Q)}},[p]),I},b=p=>{const{element:I,onAppend:F,children:$}=p,[Q,X]=(0,i.useState)((0,v.vt)({...(0,h.A)(),insertionPoint:void 0}));P(I);const at=u(I),Ct=(0,i.useCallback)(Ut=>{if(!I||!Ut)return;X((0,v.vt)({...(0,h.A)(),insertionPoint:I.querySelector("head")||void 0}));let Kt=Ut.shadowRoot;Kt||(Kt=Ut.attachShadow({mode:"open"})),Kt.replaceChildren(I),typeof F=="function"&&F(Kt)},[I,F]);return(0,o.jsxs)(o.Fragment,{children:[at&&(0,o.jsx)(A.k,{}),(0,o.jsxs)(c.Ay,{jss:Q,sheetsManager:new Map,children:[(0,o.jsx)("div",{ref:Ct,"data-testid":"techdocs-native-shadowroot"}),$]})]})};var g=t(12784);const D=()=>{const{shadowRoot:p}=(0,m.V)();return p},w=p=>{const I=D();return I?p.map(F=>I==null?void 0:I.querySelectorAll(F)).filter(F=>F.length).map(F=>Array.from(F)).flat():[]},y=p=>p.toString()&&p.rangeCount&&p.getRangeAt(0).getBoundingClientRect().top,B=(p=0)=>{const I=D(),[F,$]=useState(null),Q=useMemo(()=>debounce(()=>{const X=I,at=X.getSelection?X.getSelection():document.getSelection();at&&y(at)?$(at):$(null)},p),[I,$,p]);return useEffect(()=>(window.document.addEventListener("selectionchange",Q),()=>{Q.cancel(),window.document.removeEventListener("selectionchange",Q)}),[Q]),F};var R=t(12173),C=t(26280),z=t(45250),V=t(73466),tt=t(5877),K=t(43836),W=t(10602),_=t(72427),H=t(93368),J=t(25862),q=t(65461),mt=t(55309);const it=(0,mt.y)({id:"plugin.search.queryservice"});class Ot{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(I){_define_property(this,"mockedResults",void 0),this.mockedResults=I}}const ct=(0,K.tK)("search-context"),gt=()=>{const p=(0,i.useContext)(ct);if(!p)throw new Error("useSearch must be used within a SearchContextProvider");const I=p.atVersion(1);if(!I)throw new Error("No SearchContext v1 found");return I},lt=()=>(0,i.useContext)(ct)!==void 0,rt={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},vt=(p=rt)=>{var I,F,$,Q;const X=(0,_.gf)(it),at=(0,H.s)(),[Ct,Ut]=(0,i.useState)(p.term),[Kt,Yt]=(0,i.useState)(p.types),[Vt,It]=(0,i.useState)(p.filters),[ce,ye]=(0,i.useState)(p.pageLimit),[Zt,Gt]=(0,i.useState)(p.pageCursor),ie=(0,tt.A)(Ct),Ee=(0,tt.A)(Vt),jt=(0,V.A)(async()=>{const fe=await X.query({term:Ct,types:Kt,filters:Vt,pageLimit:ce,pageCursor:Zt});if(Ct){var je,se;at.captureEvent("search",Ct,{value:(se=(je=jt.value)===null||je===void 0?void 0:je.numberOfResults)!==null&&se!==void 0?se:void 0})}return fe},[Ct,Kt,Vt,ce,Zt]),_t=!jt.loading&&!jt.error&&((I=jt.value)===null||I===void 0?void 0:I.nextPageCursor),te=!jt.loading&&!jt.error&&((F=jt.value)===null||F===void 0?void 0:F.previousPageCursor),Ae=(0,i.useCallback)(()=>{var fe;Gt((fe=jt.value)===null||fe===void 0?void 0:fe.nextPageCursor)},[($=jt.value)===null||$===void 0?void 0:$.nextPageCursor]),Be=(0,i.useCallback)(()=>{var fe;Gt((fe=jt.value)===null||fe===void 0?void 0:fe.previousPageCursor)},[(Q=jt.value)===null||Q===void 0?void 0:Q.previousPageCursor]);return(0,i.useEffect)(()=>{ie!==void 0&&Ct!==ie&&Gt(void 0)},[Ct,ie,Gt]),(0,i.useEffect)(()=>{Ee!==void 0&&!(0,z.isEqual)(Vt,Ee)&&Gt(void 0)},[Vt,Ee,Gt]),{result:jt,term:Ct,setTerm:Ut,types:Kt,setTypes:Yt,filters:Vt,setFilters:It,pageLimit:ce,setPageLimit:ye,pageCursor:Zt,setPageCursor:Gt,fetchNextPage:_t?Ae:void 0,fetchPreviousPage:te?Be:void 0}},yt=p=>{const{initialState:I,children:F}=p,$=vt(I);return(0,o.jsx)(J.Ig,{attributes:{searchTypes:$.types.sort().join(",")},children:(0,o.jsx)(ct.Provider,{value:(0,W.B)({1:$}),children:F})})},Pt=p=>{const{initialState:I,inheritParentContextIfAvailable:F,children:$}=p,Q=lt(),X=(0,_.gf)(q.U),at=I!=null?I:{},Ct=X.has("search.query.pageLimit")?{pageLimit:X.getNumber("search.query.pageLimit")}:{},Ut={...rt,...at,...Ct};return Q&&F?(0,o.jsx)(o.Fragment,{children:$}):(0,o.jsx)(yt,{initialState:Ut,children:$})};var pt=t(78467),st=t(20577),ft=t(34839),ht=t(29365),wt=t(16249),At=t(64947),N=t(45917),G=t(22771);function Et(p){return(0,i.forwardRef)((I,F)=>(0,o.jsx)(Pt,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(p,{...I,ref:F})}))}const bt=Et((0,i.forwardRef)((p,I)=>{const{onChange:F,onKeyDown:$=()=>{},onClear:Q=()=>{},onSubmit:X=()=>{},debounceTime:at=200,clearButton:Ct=!0,fullWidth:Ut=!0,value:Kt,label:Yt,placeholder:Vt,inputProps:It={},InputProps:ce={},endAdornment:ye,...Zt}=p,Gt=(0,_.gf)(q.U),[ie,Ee]=(0,i.useState)(""),jt=(0,i.useRef)("");(0,i.useEffect)(()=>{Ee(se=>se===jt.current?String(Kt):se)},[Kt,jt]),(0,G.A)(()=>{jt.current=ie,F(ie)},at,[ie]);const _t=(0,i.useCallback)(se=>{Ee(se.target.value)},[Ee]),te=(0,i.useCallback)(se=>{$&&$(se),X&&se.key==="Enter"&&X()},[$,X]),Ae=(0,i.useCallback)(()=>{jt.current="",F(""),Ee(""),Q&&Q()},[F,Q]),Be=Yt?void 0:"Search",Ne=Vt!=null?Vt:`Search in ${Gt.getOptionalString("app.title")||"Backstage"}`,fe=(0,o.jsx)(ft.A,{position:"start",children:(0,o.jsx)(ht.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,o.jsx)(N.A,{})})}),je=(0,o.jsx)(ft.A,{position:"end",children:(0,o.jsx)(At.A,{"aria-label":"Clear",size:"small",onClick:Ae,onKeyDown:se=>{se.key==="Enter"&&se.stopPropagation()},children:"Clear"})});return(0,o.jsx)(wt.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:I,value:ie,label:Yt,placeholder:Ne,InputProps:{startAdornment:fe,endAdornment:Ct?je:ye,...ce},inputProps:{"aria-label":Be,...It},fullWidth:Ut,onChange:_t,onKeyDown:te,...Zt})})),Ft=Et((0,i.forwardRef)((p,I)=>{const{value:F="",onChange:$,...Q}=p,{term:X,setTerm:at}=gt();(0,i.useEffect)(()=>{F&&at(String(F))},[F,at]);const Ct=(0,i.useCallback)(Ut=>{$?$(Ut):at(Ut)},[$,at]);return(0,o.jsx)(J.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,o.jsx)(bt,{...Q,ref:I,value:X,onChange:Ct})})})),Tt=(0,O.A)(p=>({loading:{right:p.spacing(1),position:"absolute"}})),Dt=p=>I=>(0,o.jsx)(Pt,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(p,{...I})}),kt=()=>{const p=Tt();return(0,o.jsx)(pt.A,{className:p.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},St=Dt(function(I){const{loading:F,value:$,onChange:Q=()=>{},options:X=[],getOptionLabel:at=jt=>String(jt),inputPlaceholder:Ct,inputDebounceTime:Ut,freeSolo:Kt=!0,fullWidth:Yt=!0,clearOnBlur:Vt=!1,"data-testid":It="search-autocomplete",...ce}=I,{setTerm:ye}=gt(),Zt=(0,i.useCallback)(jt=>jt?typeof jt=="string"?jt:at(jt):"",[at]),Gt=(0,i.useMemo)(()=>Zt($),[$,Zt]),ie=(0,i.useCallback)((jt,_t,te,Ae)=>{ye(Zt(_t)),Q(jt,_t,te,Ae)},[Zt,ye,Q]),Ee=(0,i.useCallback)(({InputProps:{ref:jt,className:_t,endAdornment:te},InputLabelProps:Ae,...Be})=>(0,o.jsx)(Ft,{...Be,ref:jt,clearButton:!1,value:Gt,placeholder:Ct,debounceTime:Ut,endAdornment:F?(0,o.jsx)(kt,{}):te,InputProps:{className:_t}}),[F,Gt,Ct,Ut]);return(0,o.jsx)(st.Ay,{...ce,"data-testid":It,value:$,onChange:ie,options:X,getOptionLabel:at,renderInput:Ee,freeSolo:Kt,fullWidth:Yt,clearOnBlur:Vt})});var Wt=t(18690),Jt=t(27698);const ue=p=>p==null?void 0:p.document,ae=p=>{const{entityId:I,entityTitle:F,debounceTime:$=150}=p,[Q,X]=(0,i.useState)(!1),at=(0,Wt.Zp)(),{setFilters:Ct,result:{loading:Ut,value:Kt}}=gt(),[Yt,Vt]=(0,i.useState)([]);(0,i.useEffect)(()=>{let Gt=!0;if(Gt&&Kt){const ie=Kt.results.slice(0,10);Vt(ie)}return()=>{Gt=!1}},[Ut,Kt]);const{kind:It,name:ce,namespace:ye}=I;(0,i.useEffect)(()=>{Ct(Gt=>({...Gt,kind:It,namespace:ye,name:ce}))},[It,ye,ce,Ct]);const Zt=(Gt,ie)=>{if(ue(ie)){const{location:Ee}=ie.document;at(Ee)}};return(0,o.jsx)(St,{"data-testid":"techdocs-search-bar",size:"small",open:Q,getOptionLabel:()=>"",filterOptions:Gt=>Gt,onClose:()=>{X(!1)},onFocus:()=>{X(!0)},onChange:Zt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Yt,renderOption:({document:Gt,highlight:ie})=>(0,o.jsx)(Jt.TechDocsSearchResultListItem,{result:Gt,lineClamp:3,asListItem:!1,asLink:!1,title:Gt.title,highlight:ie}),loading:Ut,inputDebounceTime:$,inputPlaceholder:`Search ${F||I.name} docs`,freeSolo:!1})},le=p=>{const I={term:"",types:["techdocs"],pageCursor:"",filters:p.entityId};return(0,o.jsx)(Pt,{initialState:I,children:(0,o.jsx)(ae,{...p})})};var Ht=t(74219),Xt=t(82266);const ge=(0,i.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(p=>({default:p.RealLogViewer})));function Ke(p){const{Progress:I}=(0,Xt.n)().getComponents();return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(I,{}),children:(0,o.jsx)(ge,{...p})})}var Fe=t(73845),_e=t(72501),we=t(12398),sn=t(32881);const Xe=(0,O.A)(p=>(0,we.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}})),ne=({buildLog:p,onClose:I})=>{const F=Xe(),$=p.length===0?"Waiting for logs...":p.join(`
7
+ `);const Nt=Ss({root:a,discoverers:[bs,Os],collectors:{routing:Lt?Ts:ws,collectedPlugins:Ps,featureFlags:Rs}});return Nt.collectedPlugins.forEach(pe=>this.plugins.add(pe)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...Nt,routeBindings:ti(this.bindRoutes)}},[a]);n||(n=!0,Ns(E.paths,E.parents),Ws(k,this.plugins));const Z=ui(this.configLoader,this.components,S),nt="api"in Z;if(nt){const{api:Lt}=Z;this.configApi=Lt}if("node"in Z)return Z.node;if(nt&&l.current){l.current=!1;const Lt=this.getApiHolder().get(mn.B);if(Lt){for(const ee of this.featureFlags)Lt.registerFlag({...ee,pluginId:""});for(const ee of this.plugins.values())if("getFeatureFlags"in ee)for(const Re of ee.getFeatureFlags())Lt.registerFlag({name:Re.name,pluginId:ee.getId()});else for(const Re of ee.output())Re.type==="feature-flag"&&Lt.registerFlag({name:Re.name,pluginId:ee.getId()});const Nt=Lt.getRegisteredFlags(),pe=new Set(Nt.map(ee=>ee.name));for(const ee of M)pe.has(ee)||Lt.registerFlag({name:ee,pluginId:""})}}const{ThemeProvider:ot=Tr,Progress:ut}=this.components,xt=this.getApiHolder();if(di()){const Lt=xt.get(oe.m),Nt=xt.get(On.a),pe=xt.get(zt.I);if(!Lt||!Nt||!pe)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Lt,fetchApi:Nt,discoveryApi:pe})}return(0,i.jsx)(Zo,{apis:xt,children:(0,i.jsx)(Ks,{appContext:e,children:(0,i.jsx)(ot,{children:(0,i.jsx)($s,{routePaths:E.paths,routeParents:E.parents,routeObjects:E.objects,routeBindings:k,basePath:ri(Z.api),children:(0,i.jsx)(Ir.Provider,{value:{routeObjects:E.objects,appIdentityProxy:this.appIdentityProxy},children:(0,i.jsx)(d.Suspense,{fallback:(0,i.jsx)(ut,{}),children:a})})})})})})}}getRouter(){return Br}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 qo.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:io,deps:{},factory:()=>so.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:Bt.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:dn.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:Er,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:xs.J,deps:{languageApi:Er},factory:({languageApi:e})=>ir.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:mn.B,deps:{},factory:()=>new As});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 qo.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new qo(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const n=new Set;for(const s of e){const a=s.getId();if(n.has(a))throw new Error(`Duplicate plugin found '${a}'`);n.add(a)}}constructor(e){var n,s,a;(0,x._)(this,"apiHolder",void 0),(0,x._)(this,"configApi",void 0),(0,x._)(this,"apis",void 0),(0,x._)(this,"icons",void 0),(0,x._)(this,"plugins",void 0),(0,x._)(this,"featureFlags",void 0),(0,x._)(this,"components",void 0),(0,x._)(this,"themes",void 0),(0,x._)(this,"configLoader",void 0),(0,x._)(this,"defaultApis",void 0),(0,x._)(this,"bindRoutes",void 0),(0,x._)(this,"appLanguageApi",void 0),(0,x._)(this,"translationResources",void 0),(0,x._)(this,"appIdentityProxy",new Ys),(0,x._)(this,"apiFactoryRegistry",void 0),(0,de._)(this,lr,{writable:!0,value:!1});var l;this.apis=(l=e.apis)!==null&&l!==void 0?l:[],this.icons=e.icons;var S;this.plugins=new Set((S=e.plugins)!==null&&S!==void 0?S:[]);var E;this.featureFlags=(E=e.featureFlags)!==null&&E!==void 0?E:[],this.components=e.components,this.themes=e.themes;var M;this.configLoader=(M=e.configLoader)!==null&&M!==void 0?M:Rr;var k;this.defaultApis=(k=e.defaultApis)!==null&&k!==void 0?k:[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new Cs,this.appLanguageApi=go.createWithStorage({defaultLanguage:(n=e.__experimentalTranslations)===null||n===void 0?void 0:n.defaultLanguage,availableLanguages:(s=e.__experimentalTranslations)===null||s===void 0?void 0:s.availableLanguages});var Z;this.translationResources=(Z=(a=e.__experimentalTranslations)===null||a===void 0?void 0:a.resources)!==null&&Z!==void 0?Z:[]}}function pi(r){return new fi(r)}function gi(r){var e,n,s,a;return pi({...r,apis:(e=r==null?void 0:r.apis)!==null&&e!==void 0?e:[],bindRoutes:r==null?void 0:r.bindRoutes,components:{...R,...r==null?void 0:r.components},configLoader:r==null?void 0:r.configLoader,defaultApis:Lo,icons:{...to,...r==null?void 0:r.icons},plugins:(n=r==null?void 0:r.plugins)!==null&&n!==void 0?n:[],featureFlags:(s=r==null?void 0:r.featureFlags)!==null&&s!==void 0?s:[],themes:(a=r==null?void 0:r.themes)!==null&&a!==void 0?a:se})}var Ao=t(82442);let Wr=!1;const kr=r=>{const e=(0,Dr.n)(),{NotFoundErrorPage:n}=e.getComponents(),s=(0,d.useMemo)(()=>kn(),[]),l=[...(0,Ao.O)(r.children,S=>S.getElements().flatMap(E=>{let M=E.props.path;if(M==="")return[];var k;M=(k=M==null?void 0:M.replace(/\/\*$/,""))!==null&&k!==void 0?k:"/";let Z=s?E:E.props.element;return!s&&!Z&&(Z=E,Wr||(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] />} />."),Wr=!0)),[{path:M,element:Z,children:E.props.children?[{path:M==="/"?"/":"*",element:E.props.children}]:void 0}]}).sort((E,M)=>M.path.localeCompare(E.path)).map(E=>({...E,path:E.path==="/"?"/":`${E.path}/*`}))),{path:"*",element:(0,i.jsx)(n,{})}];return(0,m.Ye)(l)};(0,Pe.h)(kr,"core.type","FlatRoutes");var on=t(6820),vi=t(78692),mi=t(86519);function Kr(r){return!r.cursor}function _a(r){return!Kr(r)}const Se="catalog";var be=t(94214);class yi{async analyzeLocation(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async createLocation(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async deleteEntityByUid(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"DELETE"})}async deleteLocation(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"DELETE"})}async getEntities(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntitiesByQuery(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-query{?fields,limit,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntitiesByRefs(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-refs/{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async getEntityAncestryByName(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-name/{kind}/{namespace}/{name}/ancestry").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntityByName(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-name/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntityByUid(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getEntityFacets(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getLocation(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getLocationByEntity(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/locations/by-entity/{kind}/{namespace}/{name}").expand({kind:e.path.kind,namespace:e.path.namespace,name:e.path.name});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async getLocations(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/locations").expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"GET"})}async refreshEntity(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/refresh").expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}async validateEntity(e,n){const s=await this.discoveryApi.getBaseUrl(Se),l=be.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${s}${l}`,{headers:{"Content-Type":"application/json",...(n==null?void 0:n.token)&&{Authorization:`Bearer ${n==null?void 0:n.token}`}},method:"POST",body:JSON.stringify(e.body)})}constructor(e){(0,x._)(this,"discoveryApi",void 0),(0,x._)(this,"fetchApi",void 0),this.discoveryApi=e.discoveryApi,this.fetchApi=e.fetchApi||{fetch:Gn()}}}class Ei{async getEntityAncestors(e,n){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,on.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,on.KU)(e)},n))}async getEntities(e,n){const{filter:s=[],fields:a=[],order:l,offset:S,limit:E,after:M}=e!=null?e:{},k=[];if(l)for(const ot of[l].flat())ot&&k.push(`${ot.order}:${ot.field}`);const Z=await this.requestRequired(await this.apiClient.getEntities({query:{fields:a,limit:E,filter:this.getFilterValue(s),offset:S,after:M,order:l?k:void 0}},n));if(k.length)return{items:Z};const nt=(ot,ut)=>{var xt,Lt;if(((xt=ot.metadata)===null||xt===void 0?void 0:xt.name)===void 0||ot.kind===void 0||((Lt=ut.metadata)===null||Lt===void 0?void 0:Lt.name)===void 0||ut.kind===void 0)return 0;const Nt=(0,on.U2)(ot),pe=(0,on.U2)(ut);return Nt<pe?-1:Nt>pe?1:0};return{items:Z.sort(nt)}}async getEntitiesByRefs(e,n){const s=await this.apiClient.getEntitiesByRefs({body:{entityRefs:e.entityRefs,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},n);if(!s.ok)throw await tn.o.fromResponse(s);const{items:a}=await s.json();return{items:a.map(l=>l!=null?l:void 0)}}async queryEntities(e={},n){const s={};if(Kr(e)){var a,l;const{fields:S=[],filter:E,limit:M,orderFields:k,fullTextFilter:Z}=e;s.filter=this.getFilterValue(E),M!==void 0&&(s.limit=M),k!==void 0&&(s.orderField=(Array.isArray(k)?k:[k]).map(({field:ot,order:ut})=>`${ot},${ut}`)),S.length&&(s.fields=S);const nt=Z==null||(a=Z.term)===null||a===void 0?void 0:a.trim();nt&&(s.fullTextFilterTerm=nt),!(Z==null||(l=Z.fields)===null||l===void 0)&&l.length&&(s.fullTextFilterFields=Z.fields)}else{const{fields:S=[],limit:E,cursor:M}=e;s.cursor=M,E!==void 0&&(s.limit=E),S.length&&(s.fields=S)}return this.apiClient.getEntitiesByQuery({query:s},n).then(S=>S.json())}async getEntityByRef(e,n){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,on.KU)(e)},n))}async getEntityByName(e,n){const{kind:s,namespace:a="default",name:l}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:s,namespace:a,name:l}},n))}async refreshEntity(e,n){const s=await this.apiClient.refreshEntity({body:{entityRef:e}},n);if(s.status!==200)throw new Error(await s.text())}async getEntityFacets(e,n){const{filter:s=[],facets:a}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:a,filter:this.getFilterValue(s)}},n))}async addLocation(e,n){const{type:s="url",target:a,dryRun:l}=e,S=await this.apiClient.createLocation({body:{type:s,target:a},query:{dryRun:l?"true":void 0}},n);if(S.status!==201)throw new Error(await S.text());const{location:E,entities:M,exists:k}=await S.json();if(!E)throw new Error(`Location wasn't added: ${a}`);return{location:E,entities:M,exists:k}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocations({},n))).map(a=>a.data).find(a=>e===(0,vi.KL)(a))}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,s){const a=await this.apiClient.validateEntity({body:{entity:e,location:n}},s);if(a.ok)return{valid:!0};if(a.status!==400)throw await tn.o.fromResponse(a);const{errors:l=[]}=await a.json();return{valid:!1,errors:l}}async requestIgnored(e){if(!e.ok)throw await tn.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await tn.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await tn.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const n=[];for(const s of[e].flat()){const a=[];for(const[l,S]of Object.entries(s))for(const E of[S].flat())E===mi.c?a.push(l):typeof E=="string"&&a.push(`${l}=${E}`);a.length&&n.push(a.join(","))}return n}constructor(e){(0,x._)(this,"apiClient",void 0),this.apiClient=new yi(e)}}var zr=t(7341),Ai=t(18),xi=t(82292),Hr=t(29207),Sn=t(95203),Ci=t(9803),Ue=t(88758),Si=t(54560),bn=t(45250);async function bi({storageApi:r}){const e=r.forBucket("settings"),n=r.forBucket("starredEntities"),s=e.snapshot("starredEntities").value;if(!(0,bn.isArray)(s))return;var a;const l=new Set((a=n.snapshot("entityRefs").value)!==null&&a!==void 0?a:[]);s.filter(bn.isString).map(S=>S.split(":")).filter(S=>S.length===4&&S[0]==="entity").map(([S,E,M,k])=>(0,on.U2)({kind:E,namespace:M,name:k})).forEach(S=>l.add(S)),await n.set("entityRefs",Array.from(l)),await e.remove("starredEntities")}class Oi{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}notifyChanges(){for(const e of this.subscribers)e.next(new Set(this.starredEntities))}constructor(e){(0,x._)(this,"settingsStore",void 0),(0,x._)(this,"starredEntities",void 0),(0,x._)(this,"subscribers",new Set),(0,x._)(this,"observable",new(K())(s=>(s.next(new Set(this.starredEntities)),this.subscribers.add(s),()=>{this.subscribers.delete(s)}))),bi(e).then(),this.settingsStore=e.storageApi.forBucket("starredEntities");var n;this.starredEntities=new Set((n=this.settingsStore.snapshot("entityRefs").value)!==null&&n!==void 0?n:[]),this.settingsStore.observe$("entityRefs").subscribe({next:s=>{var a;this.starredEntities=new Set((a=s.value)!==null&&a!==void 0?a:[]),this.notifyChanges()}})}}function cr(r){const{years:e=0,months:n=0,weeks:s=0,days:a=0,hours:l=0,minutes:S=0,seconds:E=0,milliseconds:M=0}=r;return((((e*365+n*30+s*7+a)*24+l)*60+S)*60+E)*1e3+M}var Pi=t(25033),wi=t.n(Pi),Ti=t(25295),Ri=t.n(Ti),Ii=t(88083);const Di={seconds:10},Mi={milliseconds:50},Li={api:Qn.A,component:Jn.A,system:Yn.A,resource:Xn.A,domain:wn.A,location:Zn.A,user:In.A,group:Rn.A,template:qn.A};function Vr(r){return{async:r.async,render:({entityRef:e,entity:n,context:s})=>({snapshot:(0,Ii.T)(n||e,s),loadEntity:r.async})}}var xo=new WeakMap,dr=new WeakMap,Co=new WeakMap,ur=new WeakMap,So=new WeakMap,Gr=new WeakSet,_r=new WeakSet,Yr=new WeakSet;class bo{static createLocal(){return new bo({renderer:Vr({async:!1})})}static create(e){return new bo(e)}forEntity(e,n){const{entityRef:s,kind:a,entity:l,needsLoad:S}=(0,ke._)(this,Gr,Bi).call(this,e),E=Z=>{const{snapshot:nt}=(0,Rt._)(this,So).render({entityRef:s,loading:Z.loading,entity:Z.entity,context:n||{}});return{...nt,entityRef:s,Icon:(0,ke._)(this,Yr,Ui).call(this,nt.Icon,a)}};let M;try{M=E({loading:S,entity:l})}catch{M={primaryTitle:s,entityRef:s}}const k=S?new(K())(Z=>{let nt=!1;return Promise.resolve().then(()=>{var ot;return(ot=(0,Rt._)(this,Co))===null||ot===void 0?void 0:ot.load(s)}).then(ot=>{if(!nt&&ot&&ot.metadata.etag!==(l==null?void 0:l.metadata.etag)){const ut=E({loading:!1,entity:ot});Z.next(ut)}}).catch(()=>{}).finally(()=>{nt||Z.complete()}),()=>{nt=!0}}):void 0;return{snapshot:M,update$:k}}constructor(e){(0,un._)(this,Gr),(0,un._)(this,_r),(0,un._)(this,Yr),(0,de._)(this,xo,{writable:!0,value:void 0}),(0,de._)(this,dr,{writable:!0,value:void 0}),(0,de._)(this,Co,{writable:!0,value:void 0}),(0,de._)(this,ur,{writable:!0,value:void 0}),(0,de._)(this,So,{writable:!0,value:void 0});var n;const s=(n=e.cacheTtl)!==null&&n!==void 0?n:Di;var a;const l=(a=e.batchDelay)!==null&&a!==void 0?a:Mi;var S;const E=(S=e.renderer)!==null&&S!==void 0?S:Vr({async:!0}),M={};Object.entries(Li).forEach(([Z,nt])=>{M[Z.toLocaleLowerCase("en-US")]=nt});var k;if(Object.entries((k=e.kindIcons)!==null&&k!==void 0?k:{}).forEach(([Z,nt])=>{M[Z.toLocaleLowerCase("en-US")]=nt}),E.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");(0,p._)(this,Co,(0,ke._)(this,_r,ji).call(this,{cacheTtl:s,batchDelay:l,renderer:E,catalogApi:e.catalogApi}))}(0,p._)(this,dr,cr(s)),(0,p._)(this,xo,new Map),(0,p._)(this,ur,M),(0,p._)(this,So,E)}}function Bi(r){if(typeof r!="string")return{entity:r,kind:r.kind,entityRef:(0,on.U2)(r),needsLoad:!1};const e=(0,Rt._)(this,xo).get(r),n=e==null?void 0:e.entity,a=(!e||Date.now()-e.updatedAt>(0,Rt._)(this,dr))&&(0,Rt._)(this,So).async!==!1&&(0,Rt._)(this,Co)!==void 0;return{entity:n,kind:(0,on.KU)(r).kind,entityRef:r,needsLoad:a}}function ji(r){const e=cr(r.cacheTtl),n=cr(r.batchDelay);return new(wi())(async s=>{const{items:a}=await r.catalogApi.getEntitiesByRefs({entityRefs:s}),l=Date.now();return s.forEach((S,E)=>{(0,Rt._)(this,xo).set(S,{updatedAt:l,entity:a[E]})}),a},{name:"DefaultEntityPresentationApi",cacheMap:new(Ri())(e),maxBatchSize:100,batchScheduleFn:n?s=>setTimeout(s,n):void 0})}function Ui(r,e){return r||(r===!1?!1:(0,Rt._)(this,ur)[e.toLocaleLowerCase("en-US")])}const Te=(0,Ci.i)({id:"catalog",apis:[(0,$t.b)({api:zr.v,deps:{discoveryApi:zt.I,fetchApi:On.a},factory:({discoveryApi:r,fetchApi:e})=>new Ei({discoveryApi:r,fetchApi:e})}),(0,$t.b)({api:Ai.a,deps:{storageApi:Ge},factory:({storageApi:r})=>new Oi({storageApi:r})}),(0,$t.b)({api:xi.n,deps:{catalogApi:zr.v},factory:({catalogApi:r})=>bo.create({catalogApi:r})})],routes:{catalogIndex:Sn.rQ,catalogEntity:Hr.s},externalRoutes:{createComponent:Sn.qP,viewTechDoc:Sn.UJ,createFromTemplate:Sn.Zg,unregisterRedirect:Sn.pS}}),Ya=Te.provide((0,Ue.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(3720),t.e(115),t.e(5974)]).then(t.bind(t,5974)).then(r=>r.CatalogPage),mountPoint:Sn.rQ})),Fi=Te.provide((0,Ue.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(r=>r.CatalogEntityPage),mountPoint:Hr.s})),Qa=Te.provide((0,Ue.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(3720),t.e(1902),t.e(73)]).then(t.bind(t,40073)).then(r=>r.AboutCard)}})),Za=Te.provide((0,Ue.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(r=>r.EntityLinksCard)}})),Ja=Te.provide((0,Ue.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(r=>r.EntityLabelsCard)}})),Xa=Te.provide((0,Ue.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(r=>r.HasSystemsCard)}})),qa=Te.provide((0,Ue.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(r=>r.HasComponentsCard)}})),tl=Te.provide((0,Ue.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(r=>r.HasSubcomponentsCard)}})),el=Te.provide((0,Ue.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(r=>r.HasResourcesCard)}})),nl=Te.provide((0,Ue.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(r=>r.DependsOnComponentsCard)}})),ol=Te.provide((0,Ue.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(r=>r.DependencyOfComponentsCard)}})),rl=Te.provide((0,Ue.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(r=>r.DependsOnResourcesCard)}})),sl=Te.provide((0,Ue.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(r=>r.RelatedEntitiesCard)}})),il=Te.provide((0,Si.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(r=>r.CatalogSearchResultListItem),predicate:r=>r.type==="software-catalog"}));var Qr=t(41158),Zr=t(26679);class $i{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(e,n){const a=`${await this.getApiOrigin()}/${n}`,l=await fetch(`${a.endsWith("/")?a:`${a}/`}index.html`);if(l.status===404)throw new Error("Page not found");return l.text()}async syncEntityDocs(e){return"cached"}async getBaseUrl(e,n,s){const a=await this.getApiOrigin();return new URL(e,`${a}/${s}`).toString()}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,x._)(this,"configApi",void 0),(0,x._)(this,"discoveryApi",void 0),(0,x._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}class Ni{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:""}}constructor({configApi:e,discoveryApi:n,identityApi:s}){(0,x._)(this,"configApi",void 0),(0,x._)(this,"discoveryApi",void 0),(0,x._)(this,"identityApi",void 0),this.configApi=e,this.discoveryApi=n,this.identityApi=s}}const Wi=[(0,$t.b)({api:Zr.s,deps:{configApi:Bt.U,discoveryApi:zt.I,identityApi:dn.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new $i({configApi:r,discoveryApi:e,identityApi:n})}),(0,$t.b)({api:Zr.l,deps:{configApi:Bt.U,discoveryApi:zt.I,identityApi:dn.K},factory:({configApi:r,discoveryApi:e,identityApi:n})=>new Ni({configApi:r,discoveryApi:e,identityApi:n})}),(0,$t.b)({api:Qr.Y,deps:{configApi:Bt.U},factory:({configApi:r})=>Qr.L.fromConfig(r)})],ki={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ki={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function zi(){const r=await fetch("/.detect");return r.ok?(await r.text()).trim()==="techdocs-cli-server":!1}async function Hi(){const r=await Rr(),e=await zi();return[...r,{context:"detected",data:e?ki:Ki}]}var Je=t(58837),Vi=t(3210);const Gi=(0,Je.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var _i=()=>{const r=Gi();return(0,i.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,i.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"})})};const Yi=(0,Je.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Qi=()=>{const r=Yi();return(0,i.jsx)("svg",{className:r.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,i.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"})})},Oe=t(72664);const Jr={isOpen:!1,setOpen:()=>{}},Xr=(0,d.createContext)(Jr),qr=(0,nn.tK)("sidebar-open-state-context");function ts(r){const{children:e,value:n}=r;return(0,i.jsx)(Xr.Provider,{value:n,children:(0,i.jsx)(qr.Provider,{value:(0,gn.B)({1:n}),children:e})})}const hr=()=>{const r=(0,d.useContext)(qr),e=(0,d.useContext)(Xr);if(r===void 0)return e||Jr;const n=r.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var es=t(72072),ns=t(73524),rn=t(10394),os=t(5893),Zi=t(53373),fn=t.n(Zi),Ji=t(1125),rs=t(29365),Xi=t(73845),fr=t(72501),qi=t(32881),ta=t(27326),ea=t(13085);const ss=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var pr=t(34435);const na=(0,Je.A)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:e=>({color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),oa=r=>{const{to:e,label:n,icon:s,value:a}=r,{sidebarConfig:l}=(0,d.useContext)(Oe.yY),S=na({sidebarConfig:l}),E=(0,m.zy)(),{selectedMenuItemIndex:M,setSelectedMenuItemIndex:k}=(0,d.useContext)(ss),Z=(ot,ut)=>{k(ut===M?-1:ut)},nt=a===M&&M>=0||a!==M&&!(M>=0)&&e===E.pathname;return(0,i.jsx)(ea.A,{"aria-label":n,label:n,icon:s,component:es.N_,to:e||E.pathname,onChange:Z,value:a,selected:nt,classes:S})},is=r=>{const{children:e,to:n,label:s,icon:a,value:l}=r,{isMobile:S}=(0,pr.Ut)();return S?(0,i.jsx)(oa,{to:n,label:s,icon:a,value:l}):(0,i.jsx)(i.Fragment,{children:e})},as=(0,Je.A)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:r.palette.navigation.background,width:"100%",bottom:`${e.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${e.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:r.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),ra=r=>(0,bn.orderBy)(r,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),sa=d.createElement(is).type,ia=({children:r,label:e="Menu",open:n,onClose:s})=>{const{sidebarConfig:a}=(0,d.useContext)(Oe.yY),l=as({sidebarConfig:a});return(0,i.jsxs)(Xi.Ay,{anchor:"bottom",open:n,onClose:s,ModalProps:{BackdropProps:{classes:{root:l.marginMobileSidebar}}},classes:{root:l.marginMobileSidebar,paperAnchorBottom:l.overlay},children:[(0,i.jsxs)(rn.A,{className:l.overlayHeader,children:[(0,i.jsx)(fr.A,{variant:"h3",children:e}),(0,i.jsx)(rs.A,{onClick:s,classes:{root:l.overlayHeaderClose},children:(0,i.jsx)(qi.A,{})})]}),(0,i.jsx)(rn.A,{component:"nav",children:r})]})},aa=r=>{const{sidebarConfig:e}=(0,d.useContext)(Oe.yY),{children:n}=r,s=as({sidebarConfig:e}),a=(0,m.zy)(),[l,S]=(0,d.useState)(-1);(0,d.useEffect)(()=>{S(-1)},[a.pathname]);let E=(0,Ao.O)(n,k=>k.getElements().filter(Z=>Z.type===sa));if(n)E.length?E=ra(E):E.push((0,i.jsx)(is,{icon:(0,i.jsx)(ta.A,{}),children:n},"default_menu"));else return null;const M=l>=0&&!E[l].props.to;return(0,i.jsx)(ts,{value:{isOpen:!0,setOpen:()=>{}},children:(0,i.jsxs)(ss.Provider,{value:{selectedMenuItemIndex:l,setSelectedMenuItemIndex:S},children:[(0,i.jsx)(ia,{label:E[l]&&E[l].props.label,open:M,onClose:()=>S(-1),children:E[l]&&E[l].props.children}),(0,i.jsx)(Ji.A,{className:s.root,"data-testid":"mobile-sidebar-root",component:"nav",children:E})]})})};var la=t(87849),ca=t(10315);const ls=(0,Je.A)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"},"@media print":{display:"none"}},drawerWidth:e=>({width:e.sidebarConfig.drawerWidthClosed}),drawerOpen:e=>({width:e.sidebarConfig.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var cs;(function(r){r[r.Closed=0]="Closed",r[r.Idle=1]="Idle",r[r.Open=2]="Open"})(cs||(cs={}));const da=r=>{const{sidebarConfig:e}=(0,d.useContext)(Oe.yY),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:s=e.defaultCloseDelayMs,disableExpandOnHover:a,children:l}=r,S=ls({sidebarConfig:e}),E=(0,os.A)(pe=>pe.breakpoints.down("md"),{noSsr:!0}),[M,k]=(0,d.useState)(0),Z=(0,d.useRef)(),{isPinned:nt,toggleSidebarPinState:ot}=(0,pr.Ut)(),ut=()=>{nt||a||(Z.current&&(clearTimeout(Z.current),Z.current=void 0),M!==2&&!E&&(Z.current=window.setTimeout(()=>{Z.current=void 0,k(2)},n),k(1)))},xt=()=>{nt||a||(Z.current&&(clearTimeout(Z.current),Z.current=void 0),M===1?k(0):M===2&&(Z.current=window.setTimeout(()=>{Z.current=void 0,k(0)},s)))},Lt=M===2&&!E||nt,Nt=pe=>{pe?(k(2),ot()):(k(0),ot())};return(0,i.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,i.jsx)(ha,{}),(0,i.jsx)(ts,{value:{isOpen:Lt,setOpen:Nt},children:(0,i.jsx)(rn.A,{className:S.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:ut,onFocus:a?()=>{}:ut,onMouseLeave:a?()=>{}:xt,onBlur:a?()=>{}:xt,children:(0,i.jsx)(rn.A,{className:fn()(S.drawer,S.drawerWidth,{[S.drawerOpen]:Lt}),children:l})})})]})},ua=r=>{var e;const n=(0,Oe.Rv)((e=r.sidebarOptions)!==null&&e!==void 0?e:{});var s;const a=(0,Oe.i8)((s=r.submenuOptions)!==null&&s!==void 0?s:{}),{children:l,disableExpandOnHover:S,openDelayMs:E,closeDelayMs:M}=r,{isMobile:k}=(0,pr.Ut)();return k?(0,i.jsx)(aa,{children:l}):(0,i.jsx)(Oe.yY.Provider,{value:{sidebarConfig:n,submenuConfig:a},children:(0,i.jsx)(da,{openDelayMs:E,closeDelayMs:M,disableExpandOnHover:S,children:l})})};function ha(){const{sidebarConfig:r}=(0,d.useContext)(Oe.yY),{focusContent:e,contentRef:n}=(0,ns.H)(),s=ls({sidebarConfig:r}),{t:a}=(0,la.i)(ca.O);return n!=null&&n.current?(0,i.jsx)(A.A,{onClick:e,variant:"contained",className:fn()(s.visuallyHidden),children:a("skipToContent")}):null}var fa=t(94509),Oo=t(44209),pa=t(79065),ga=t(55704),ds=t(62248);const va=(0,Je.A)(r=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:r.spacing(7)+1},drawer:e=>{var n,s;return{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:(s=(n=r.palette.navigation.submenu)===null||n===void 0?void 0:n.background)!==null&&s!==void 0?s:"#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.common.white,padding:r.spacing(2.5),[r.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),ma=r=>{const{isOpen:e}=hr(),{sidebarConfig:n,submenuConfig:s}=(0,d.useContext)(Oe.yY),a=e?n.drawerWidthOpen:n.drawerWidthClosed,l=va({left:a,submenuConfig:s}),{isHoveredOn:S}=(0,d.useContext)(Oe.U1),[E,M]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{M(S)},[S]),(0,i.jsxs)(rn.A,{className:fn()(l.drawer,{[l.drawerOpen]:E}),children:[(0,i.jsx)(fr.A,{variant:"h5",component:"span",className:l.title,children:r.title}),r.children]})};var ya=t(45810),us=t.n(ya);function hs(r,e,n=!1){const s=new URLSearchParams(e.search).toString(),a=us().parse(s),l=new URLSearchParams(r.search).toString(),S=us().parse(l),E=n?bn.isEqual:bn.isMatch;return(0,bn.isEqual)(e.pathname,r.pathname)&&E(S,a)}const Ea=r=>(0,Je.A)(e=>{var n,s,a,l;return{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:(a=(n=e.palette.navigation.navItem)===null||n===void 0?void 0:n.hoverBackground)!==null&&a!==void 0?a:"#404040"}},highlighted:{background:(l=(s=e.palette.navigation.navItem)===null||s===void 0?void 0:s.hoverBackground)!==null&&l!==void 0?l:"#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 Po(r){return(0,d.useMemo)(()=>Ea(r),[r])()}const Aa=(r,e)=>(0,Ao.O)(r.props.children,n=>{let s=!1;return n.getElements().forEach(({props:{to:a,dropdownItems:l}})=>{if(!s){if(l!=null&&l.length){l.forEach(({to:S})=>s=s||hs(e,(0,Nn.o1)(S)));return}a&&(s=hs(e,(0,Nn.o1)(a)))}}),s},[e.pathname]);function gr(r){return r.to===void 0}const xa=d.createElement(ma).type,Ca=d.forwardRef(function({to:e,end:n,style:s,className:a,activeStyle:l,caseSensitive:S,activeClassName:E="active","aria-current":M="page",...k},Z){let{pathname:nt}=(0,m.zy)(),{pathname:ot}=(0,m.x$)(e);S||(nt=nt.toLocaleLowerCase("en-US"),ot=ot.toLocaleLowerCase("en-US"));let ut=nt===ot;!ut&&!n&&(ut=nt.startsWith(`${ot}/`));const xt=ut?M:void 0;return(0,i.jsx)(v.N_,{...k,to:e,ref:Z,"aria-current":xt,style:{...s,...ut?l:void 0},className:fn()([typeof a!="function"?a:void 0,ut?E:void 0])})}),fs=(0,d.forwardRef)((r,e)=>{const{icon:n,text:s,hasNotifications:a=!1,hasSubmenu:l=!1,disableHighlight:S=!1,onClick:E,noTrack:M,children:k,className:Z,...nt}=r,{sidebarConfig:ot}=(0,d.useContext)(Oe.yY),ut=Po(ot),{isOpen:xt}=hr(),Lt=!xt&&l?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Nt=(0,i.jsxs)(rn.A,{style:Lt,children:[(0,i.jsx)(n,{fontSize:"small"}),!xt&&l?(0,i.jsx)(ds.A,{fontSize:"small"}):(0,i.jsx)(i.Fragment,{})]}),pe=(0,i.jsx)(fa.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!a,className:fn()({[ut.closedItemIcon]:!xt}),children:Nt}),ee=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(rn.A,{"data-testid":"login-button",className:ut.iconContainer,children:pe}),s&&(0,i.jsx)(fr.A,{variant:"subtitle2",component:"span",className:ut.label,children:s}),(0,i.jsx)("div",{className:ut.secondaryAction,children:k})]}),Re=xt?ee:pe,Vn={onClick:E,className:fn()(Z,ut.root,xt?ut.open:ut.closed,gr(r)&&ut.buttonItem,{[ut.highlightable]:!S})},ms=(0,Mr.s)(),{pathname:vr}=(0,m.x$)(!gr(r)&&r.to?r.to:""),ys=(0,d.useCallback)(za=>{if(!M){const Ha="click",Va=s!=null?s:"Sidebar Item",Ga=vr?{attributes:{to:vr}}:void 0;ms.captureEvent(Ha,Va,Ga)}E==null||E(za)},[ms,s,vr,M,E]);return gr(r)?(0,i.jsx)(A.A,{role:"button","aria-label":s,...Vn,ref:e,onClick:ys,children:Re}):(0,i.jsx)(Ca,{...Vn,activeClassName:ut.selected,to:r.to?r.to:"",ref:e,"aria-label":s||r.to,...nt,onClick:ys,children:Re})}),Sa=({children:r,...e})=>{const{sidebarConfig:n}=(0,d.useContext)(Oe.yY),s=Po(n),[a,l]=(0,d.useState)(!1),S=(0,m.zy)(),E=Aa(r,S),M=(0,os.A)(ot=>ot.breakpoints.down("sm")),k=()=>{l(!0)},Z=()=>{l(!1)},nt=()=>M?a?(0,i.jsx)(ga.A,{fontSize:"small",className:s.submenuArrow}):(0,i.jsx)(pa.A,{fontSize:"small",className:s.submenuArrow}):!a&&(0,i.jsx)(ds.A,{fontSize:"small",className:s.submenuArrow});return(0,i.jsx)(Oe.U1.Provider,{value:{isHoveredOn:a,setIsHoveredOn:l},children:(0,i.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:Z,onTouchStart:a?Z:k,onMouseEnter:k,className:fn()(a&&s.highlighted),children:[(0,i.jsx)(fs,{hasSubmenu:!0,className:E?s.selected:"",...e,children:nt()}),a&&r]})})},ps=(0,d.forwardRef)((r,e)=>{const[n]=(0,Ao.O)(r.children,s=>s.getElements().filter(a=>a.type===xa));return n?(0,i.jsx)(Sa,{...r,children:n}):(0,i.jsx)(fs,{...r,ref:e})});function cl(r){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,s]=useState(""),a=Po(e),l=r.icon?r.icon:SearchIcon,S=()=>{r.onSearch(n),s("")},E=nt=>{nt.key==="Enter"&&(nt.preventDefault(),S())},M=nt=>{s(nt.target.value)},k=nt=>{nt.preventDefault(),nt.stopPropagation()},Z=nt=>{S(),nt.preventDefault()};return _jsx(Box,{className:a.searchRoot,children:_jsx(ps,{icon:l,to:r.to,onClick:Z,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:k,onChange:M,onKeyDown:E,className:a.searchContainer,InputProps:{disableUnderline:!0,className:a.searchField},inputProps:{className:a.searchFieldHTMLInput}})})})}const dl=(0,Oo.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),ul=(0,Oo.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),ba=(0,Oo.A)("hr")(({theme:r})=>({height:1,width:"100%",background:"#383838",border:"none",margin:r.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Oa=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.secondary,borderRadius:"5px"}}),hl=(0,Oo.A)("div")(({theme:r})=>{const e=Oa(r);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),fl=()=>{const{sidebarConfig:r}=useContext(SidebarConfigContext),e=Po(r),{isOpen:n,setOpen:s}=useSidebarOpenState();if(useMediaQuery(S=>S.breakpoints.down("md"),{noSsr:!0}))return null;const l=()=>{s(!n)};return _jsx(Button,{role:"button",onClick:l,className:e.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx(Box,{className:e.arrows,children:n?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},Pa=(0,Je.A)({root:{width:Oe.hC.drawerWidthClosed,height:3*Oe.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Oe.hC.drawerWidthClosed,marginLeft:24}}),wa=()=>{const r=Pa(),{isOpen:e}=hr();return(0,i.jsx)("div",{className:r.root,children:(0,i.jsx)(es.N_,{to:"/docs/default/component/local/",underline:"none",className:r.link,children:e?(0,i.jsx)(_i,{}):(0,i.jsx)(Qi,{})})})},Ta=({children:r})=>(0,i.jsxs)(ns.G,{children:[(0,i.jsxs)(ua,{children:[(0,i.jsx)(wa,{}),(0,i.jsx)(ba,{}),(0,i.jsx)(ps,{icon:Vi.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),r]});var Ra=t(71677),Ia=t(62437),Da=t(55484),Ma=t(45061),La=t(16203);const Ba=(0,Je.A)(r=>({headerIcon:{color:r.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:r.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var gs;(function(r){r.LIGHT="light",r.DARK="dark"})(gs||(gs={}));const ja=()=>{const r=(0,$n.gf)(io),e=Ba(),[n,s]=(0,d.useState)(r.getActiveThemeId()==="dark"?"dark":"light"),a={light:{icon:Da.A,title:"Dark theme"},dark:{icon:Ia.A,title:"Light theme"}},{title:l,icon:S}=a[n],E=()=>{s(M=>{const k=M==="light"?"dark":"light";return r.setActiveThemeId(k),k})};return(0,i.jsx)(rn.A,{display:"flex",alignItems:"center",mr:2,children:(0,i.jsx)(Ra.Ay,{title:l,arrow:!0,children:(0,i.jsx)(rs.A,{size:"small",onClick:E,children:(0,i.jsx)(S,{className:e.headerIcon})})})})},Ua=()=>(0,i.jsxs)(g.Wj,{children:[(0,i.jsx)(Ma.T,{}),(0,i.jsx)(La.p,{withSearch:!1})]}),Fa=(0,i.jsx)(Ua,{}),vs=gi({apis:Wi,configLoader:Hi,plugins:Object.values(o)}),$a=vs.getProvider(),Na=vs.getRouter(),Wa=g.Ju.provide((0,c.Hr)({name:"ThemeToggleAddon",component:ja,location:C.e.Header})),ka=(0,i.jsxs)(kr,{children:[(0,i.jsx)(m.C5,{to:"/docs/default/component/local/"},"/"),(0,i.jsx)(m.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,i.jsx)(Fi,{})}),(0,i.jsx)(m.qh,{path:"/docs",element:(0,i.jsx)(g.$j,{}),children:(0,i.jsx)(h.K,{})}),(0,i.jsxs)(m.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,i.jsx)(g.Wj,{}),children:[Fa,(0,i.jsx)(c.po,{children:(0,i.jsx)(Wa,{})})]})]});var Ka=()=>(0,i.jsx)($a,{children:(0,i.jsx)(Na,{children:(0,i.jsx)(Ta,{children:ka})})});O.createRoot(document.getElementById("root")).render((0,i.jsx)(Ka,{}))},43836:function(Y,T,t){"use strict";t.d(T,{qO:function(){return O},tK:function(){return d}});var o=t(14041),i=t(63544);function d(g){return(0,i.Q)(g,()=>(0,o.createContext)(void 0))}function O(g){return(0,o.useContext)(d(g))}function m(g){return{set(h){globalThis[`__@backstage/${g}__`]=createContext(createVersionedValueMap(h))},reset(){delete globalThis[`__@backstage/${g}__`]}}}},10602:function(Y,T,t){"use strict";t.d(T,{B:function(){return o}});function o(i){Object.freeze(i);const d={atVersion(O){return i[O]}};return Object.defineProperty(d,"$map",{configurable:!0,enumerable:!0,get(){return i}}),d}},63544:function(Y,T,t){"use strict";t.d(T,{Q:function(){return O}});function o(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const i=o(),d=m=>`__@backstage/${m}__`;function O(m,g){const h=d(m);let c=i[h];return c||(c=g(),i[h]=c,c)}},7341:function(Y,T,t){"use strict";t.d(T,{v:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"plugin.catalog.service"})},82292:function(Y,T,t){"use strict";t.d(T,{n:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"plugin.catalog.entity-presentation"})},88083:function(Y,T,t){"use strict";t.d(T,{T:function(){return m}});var o=t(6820),i=t(72348),d=t(46123),O=t.n(d);function m(c,C){const{kind:A,namespace:P,name:u,title:b,description:v,displayName:D,type:w}=g(c),y=(0,o.U2)({kind:A||"unknown",namespace:P||i.oQ,name:u||"unknown"}),B=h({kind:A,namespace:P,name:u,context:C}),R=[D,b,B].find(z=>z&&typeof z=="string"),x=[R!==y?y:void 0,w,v].filter(z=>z&&typeof z=="string").join(" | ");return{entityRef:y,primaryTitle:R,secondaryTitle:x||void 0,Icon:void 0}}function g(c){if(typeof c=="string"){let C=c.indexOf(":");const A=c.indexOf("/");A!==-1&&A<C&&(C=-1);const P=C===-1?void 0:c.slice(0,C),u=A===-1?void 0:c.slice(C+1,A),b=c.slice(Math.max(C+1,A+1));return{kind:P,namespace:u,name:b}}if(typeof c=="object"&&c!==null){const C=[O()(c,"kind")].find(w=>w&&typeof w=="string"),A=[O()(c,"metadata.namespace"),O()(c,"namespace")].find(w=>w&&typeof w=="string"),P=[O()(c,"metadata.name"),O()(c,"name")].find(w=>w&&typeof w=="string"),u=[O()(c,"metadata.title")].find(w=>w&&typeof w=="string"),b=[O()(c,"metadata.description")].find(w=>w&&typeof w=="string"),v=[O()(c,"spec.profile.displayName")].find(w=>w&&typeof w=="string"),D=[O()(c,"spec.type")].find(w=>w&&typeof w=="string");return{kind:C,namespace:A,name:P,title:u,description:b,displayName:v,type:D}}return{}}function h(c){var C,A,P,u,b;const v=((C=c.kind)===null||C===void 0?void 0:C.toLocaleLowerCase("en-US"))||"unknown",D=c.namespace||i.oQ,w=c.name||"unknown",y=(P=c.context)===null||P===void 0||(A=P.defaultKind)===null||A===void 0?void 0:A.toLocaleLowerCase("en-US"),B=(b=c.context)===null||b===void 0||(u=b.defaultNamespace)===null||u===void 0?void 0:u.toLocaleLowerCase("en-US");let R=w;return(B&&D.toLocaleLowerCase("en-US")!==B||D!==i.oQ)&&(R=`${D}/${R}`),y&&v.toLocaleLowerCase("en-US")!==y&&(R=`${v}:${R}`),R}},3169:function(Y,T,t){"use strict";t.d(T,{f:function(){return h}});var o=t(6820),i=t(72427),d=t(14041),O=t(82292),m=t(88083);function g(c,C,A){const[P,u]=(0,d.useState)(c);return(0,d.useEffect)(()=>{u(c);const b=C==null?void 0:C.subscribe({next:v=>{u(v)},complete:()=>{b==null||b.unsubscribe()}});return()=>{b==null||b.unsubscribe()}},A),P}function h(c,C){const P=(0,i.Q2)().get(O.n),u=[P,JSON.stringify(c),JSON.stringify(C||null)],b=(0,d.useMemo)(()=>P?P.forEntity(typeof c=="string"||"metadata"in c?c:(0,o.U2)(c),C):{snapshot:(0,m.T)(c,C)},u);return g(b.snapshot,b.update$,[b])}},18:function(Y,T,t){"use strict";t.d(T,{a:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"catalog-react.starred-entities"})},54203:function(Y,T,t){"use strict";t.d(T,{GI:function(){return b}});var o=t(31085),i=t(14041),d=t(10394),O=t(64947),m=t(73845),g=t(42899),h=t(72501),c=t(5893),C=t(54917),A=t(65859);const P=v=>{var D;const w=(0,c.A)(z=>{var V,tt;return z.breakpoints.down((tt=(V=v.options)===null||V===void 0?void 0:V.drawerBreakpoint)!==null&&tt!==void 0?tt:"md")}),y=(0,C.A)(),[B,R]=(0,i.useState)(!1);var x;return w?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(O.A,{style:{marginTop:y.spacing(1),marginLeft:y.spacing(1)},onClick:()=>R(!0),startIcon:(0,o.jsx)(A.A,{}),children:"Filters"}),(0,o.jsx)(m.Ay,{open:B,onClose:()=>R(!1),anchor:(x=(D=v.options)===null||D===void 0?void 0:D.drawerAnchor)!==null&&x!==void 0?x:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,o.jsxs)(d.A,{m:2,children:[(0,o.jsx)(h.A,{variant:"h6",component:"h2",style:{marginBottom:y.spacing(1)},children:"Filters"}),v.children]})})]}):(0,o.jsx)(g.A,{item:!0,lg:2,children:v.children})},u=v=>(0,o.jsx)(g.A,{item:!0,xs:12,lg:10,children:v.children}),b=v=>(0,o.jsx)(g.A,{container:!0,style:{position:"relative"},children:v.children});b.Filters=P,b.Content=u},50207:function(Y,T,t){"use strict";t.d(T,{y:function(){return H}});var o=t(31085),i=t(10394),d=t(72501),O=t(58837),m=t(6924),g=t(20577),h=t(14041),c=t(72427),C=t(73466),A=t(7341),P=t(69076),u=t(86901),b=t(44148),v=t(41260);const D=(0,o.jsx)(v.A,{fontSize:"small"}),w=(0,o.jsx)(b.A,{fontSize:"small"});function y({selected:J}){return(0,o.jsx)(P.A,{icon:D,checkedIcon:w,checked:J})}const B=(0,h.memo)(J=>{const{selected:q,value:mt,availableOptions:it,showCounts:bt}=J,ct=bt?`${mt} (${it==null?void 0:it[mt]})`:mt;return(0,o.jsx)(u.A,{control:(0,o.jsx)(y,{selected:q}),label:ct,onClick:gt=>gt.preventDefault()})});var R=t(16249),x=t(53373),z=t.n(x);const V=(0,O.A)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function tt(J){const q=V();return(0,o.jsx)(R.A,{variant:"outlined",...J,className:z()(q.input,J.className)})}var K=t(21405),W=t(26796);const _=(0,O.A)({root:{},label:{}},{name:"CatalogReactEntityAutocompletePicker"});function H(J){var q;const{label:mt,name:it,path:bt,showCounts:ct,Filter:gt,InputProps:lt,initialSelectedOptions:rt=[],filtersForAvailableValues:vt=["kind"]}=J,yt=_(),{updateFilters:Pt,filters:pt,queryParameters:{[it]:st}}=(0,K.nK)(),ht=(0,c.gf)(A.v),ft=vt.map(Dt=>pt[Dt]),{value:wt}=(0,C.A)(async()=>{const Dt=bt,{facets:kt}=await ht.getEntityFacets({facets:[Dt],filter:(0,W.Rr)(ft.filter(Boolean))});return Object.fromEntries(kt[Dt].map(({value:St,count:Wt})=>[St,Wt]))},[...ft]),At=(0,h.useMemo)(()=>[st].flat().filter(Boolean),[st]);var N;const[G,Et]=(0,h.useState)(At.length?At:(N=(q=pt[it])===null||q===void 0?void 0:q.values)!==null&&N!==void 0?N:rt);(0,h.useEffect)(()=>{At.length&&Et(At)},[At]);const Ot=Object.keys(wt!=null?wt:{}),Ft=G.length&&Ot.length;(0,h.useEffect)(()=>{Pt({[it]:Ft?new gt(G):void 0})},[it,Ft,G,gt,Pt]);const Tt=pt[it];return Tt&&typeof Tt=="object"&&!("values"in Tt)||!Ot.length?null:(0,o.jsx)(i.A,{className:yt.root,pb:1,pt:1,children:(0,o.jsxs)(d.A,{className:yt.label,variant:"button",component:"label",children:[mt,(0,o.jsx)(g.Ay,{multiple:!0,disableCloseOnSelect:!0,options:Ot,value:G,onChange:(Dt,kt)=>Et(kt),renderOption:(Dt,{selected:kt})=>(0,o.jsx)(B,{selected:kt,value:Dt,availableOptions:wt,showCounts:!!ct}),size:"small",popupIcon:(0,o.jsx)(m.A,{"data-testid":`${String(it)}-picker-expand`}),renderInput:Dt=>(0,o.jsx)(tt,{...Dt,...lt})})]})})}},72987:function(Y,T,t){"use strict";t.d(T,{t:function(){return pt}});var o=t(31085),i=t(6820),d=t(10394),O=t(69076),m=t(86901),g=t(16249),h=t(72501),c=t(71677),C=t(58837),A=t(44148),P=t(41260),u=t(6924),b=t(20577),v=t(14041),D=t(21405),w=t(92822),y=t(92367),B=t(48108),R=t(47966),x=t(90184),z=t(72427),V=t(87290),tt=t(7341);function K({enabled:st}){const ht=(0,z.gf)(tt.v),[ft]=(0,v.useState)(async()=>{if(!st)return[];const wt="relations.ownedBy";return ht.getEntityFacets({facets:[wt]}).then(At=>At.facets[wt].map(N=>N.value).map(N=>{const{kind:G,name:Et,namespace:Ot}=(0,i.KU)(N);return{apiVersion:"backstage.io/v1beta1",kind:G,metadata:{name:Et,namespace:Ot}}}).sort((N,G)=>(N.metadata.namespace||"").localeCompare(G.metadata.namespace||"","en-US")||N.metadata.name.localeCompare(G.metadata.name,"en-US")||N.kind.localeCompare(G.kind,"en-US"))).catch(()=>[])});return(0,V.A)(async(wt,At)=>{const N=await ft;if(!N)return{items:[]};var G;const Et=(G=At==null?void 0:At.limit)!==null&&G!==void 0?G:20,{text:Ot,start:Ft}=W(wt),Tt=N.filter(kt=>J(Ot,kt)),Dt=Ft+Et;return{items:Tt.slice(0,Dt),...H({entities:Tt,limit:Dt,payload:{text:Ot,start:Dt}})}},[ft],{loading:!0,value:{items:[]}})}function W(st){return _(st)&&st.cursor?JSON.parse(atob(st.cursor)):{text:st.text||"",start:0}}function _(st){return!!st.cursor}function H({entities:st,limit:ht,payload:ft}){return st.length>ht?{cursor:btoa(JSON.stringify(ft))}:{}}function J(st,ht){var ft;const wt=st.trim();return ht.kind.includes(wt)||((ft=ht.metadata.namespace)===null||ft===void 0?void 0:ft.includes(wt))||ht.metadata.name.includes(wt)}function q(){const st=(0,z.gf)(tt.v);return(0,V.A)(async(ht,ft)=>{const wt=ht,At=ht;var N;const G=(N=ft==null?void 0:ft.limit)!==null&&N!==void 0?N:20;if(At.cursor){const Ot=await st.queryEntities({cursor:At.cursor,limit:G});return{cursor:Ot.pageInfo.nextCursor,items:[...At.items,...Ot.items]}}const Et=await st.queryEntities({fullTextFilter:{term:wt.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:G});return{cursor:Et.pageInfo.nextCursor,items:Et.items}},[],{loading:!0})}var mt=t(76842);function it({mode:st,initialSelectedOwnersRefs:ht}){const ft=st==="owners-only",wt=q(),At=K({enabled:ft}),[N,G]=ft?At:wt;return[N,G,bt({enabled:!ft,initialSelectedOwnersRefs:ht})]}function bt({enabled:st,initialSelectedOwnersRefs:ht}){const ft=(0,v.useRef)({}),wt=(0,z.gf)(tt.v),[,At]=(0,V.A)(async()=>{(await wt.getEntitiesByRefs({entityRefs:ht})).items.forEach(G=>{G&&(ft.current[(0,i.U2)(G)]=G)})},[]);return(0,mt.u)(()=>{st&&ht.length>0&&At()}),{getEntity:N=>ft.current[N],setEntity:N=>{ft.current[(0,i.U2)(N)]=N}}}var ct=t(87051),gt=t(3169);const lt=(0,C.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),rt=(0,ct.A)(st=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(m.A),vt=(0,o.jsx)(P.A,{fontSize:"small"}),yt=(0,o.jsx)(A.A,{fontSize:"small"});function Pt(st){const ht=lt(),ft=st.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:wt}=(0,gt.f)(st.entity);return(0,o.jsx)(d.A,{className:ht.fullWidth,children:(0,o.jsx)(rt,{className:ht.fullWidth,control:(0,o.jsx)(O.A,{icon:vt,checkedIcon:yt,checked:st.isSelected}),onClick:At=>At.preventDefault(),label:(0,o.jsx)(c.Ay,{title:wt,children:(0,o.jsxs)(d.A,{display:"flex",alignItems:"center",children:[ft?(0,o.jsx)(R.A,{fontSize:"small"}):(0,o.jsx)(B.A,{fontSize:"small"}),"\xA0",(0,o.jsx)(d.A,{className:ht.boxLabel,children:(0,o.jsx)(h.A,{noWrap:!0,children:wt})})]})})})})}const pt=st=>{var ht,ft;const wt=lt(),{mode:At="owners-only"}=st||{},{updateFilters:N,filters:G,queryParameters:{owners:Et}}=(0,D.nK)(),[Ot,Ft]=(0,v.useState)(""),Tt=(0,v.useMemo)(()=>[Et].flat().filter(Boolean),[Et]);var Dt;const[kt,St]=(0,v.useState)(Tt.length?Tt:(Dt=(ht=G.owners)===null||ht===void 0?void 0:ht.values)!==null&&Dt!==void 0?Dt:[]),[{value:Wt,loading:Jt},ue,ae]=it({mode:At,initialSelectedOwnersRefs:kt});(0,y.s)(()=>ue({text:Ot}),[Ot,ue],250);const le=(Wt==null?void 0:Wt.items)||[];return(0,v.useEffect)(()=>{if(Tt.length){const Ht=new w.N9(Tt);St(Ht.values)}},[Tt]),(0,v.useEffect)(()=>{N({owners:kt.length?new w.N9(kt):void 0})},[kt,N]),["user","group"].includes(((ft=G.kind)===null||ft===void 0?void 0:ft.value.toLocaleLowerCase("en-US"))||"")?null:(0,o.jsx)(d.A,{className:wt.root,pb:1,pt:1,children:(0,o.jsxs)(h.A,{className:wt.label,variant:"button",component:"label",children:["Owner",(0,o.jsx)(b.Ay,{multiple:!0,disableCloseOnSelect:!0,loading:Jt,options:le,value:kt,getOptionSelected:(Ht,Xt)=>typeof Xt=="string"?(0,i.U2)(Ht)===Xt:Ht===Xt,getOptionLabel:Ht=>{const Xt=typeof Ht=="string"?ae.getEntity(Ht)||(0,i.KU)(Ht,{defaultKind:"group",defaultNamespace:"default"}):Ht;return(0,x.Z)(Xt,(0,x.S)(Xt))},onChange:(Ht,Xt)=>{Ft(""),St(Xt.map(ge=>{const Ke=typeof ge=="string"?ge:(0,i.U2)(ge);return typeof ge!="string"&&ae.setEntity(ge),Ke}))},filterOptions:Ht=>Ht,renderOption:(Ht,{selected:Xt})=>(0,o.jsx)(Pt,{entity:Ht,isSelected:Xt}),size:"small",popupIcon:(0,o.jsx)(u.A,{"data-testid":"owner-picker-expand"}),renderInput:Ht=>(0,o.jsx)(g.A,{...Ht,className:wt.input,onChange:Xt=>{Ft(Xt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:Ht=>{const Xt=Ht.currentTarget;Math.abs(Xt.scrollHeight-Xt.clientHeight-Xt.scrollTop)<1&&(Wt!=null&&Wt.cursor)&&ue({items:Wt.items,cursor:Wt.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},8859:function(Y,T,t){"use strict";t.d(T,{z:function(){return v}});var o=t(31085),i=t(6820),d=t(72348),O=t(72072),m=t(9222),g=t(14041),h=t(29207),c=t(10394),C=t(71677),A=t(58837),P=t(3169);const u=(0,A.A)(w=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:w.spacing(.5),color:w.palette.text.secondary,lineHeight:0}}),{name:"CatalogReactEntityDisplayName"}),b=w=>{const{entityRef:y,hideIcon:B,disableTooltip:R,defaultKind:x,defaultNamespace:z}=w,V=u(),{primaryTitle:tt,secondaryTitle:K,Icon:W}=(0,P.f)(y,{defaultKind:x,defaultNamespace:z});let _=(0,o.jsx)(o.Fragment,{children:tt});return _=(0,o.jsxs)(c.A,{component:"span",className:V.root,children:[W&&!B?(0,o.jsx)(c.A,{component:"span",className:V.icon,children:(0,o.jsx)(W,{fontSize:"inherit"})}):null,_]}),K&&!R&&(_=(0,o.jsx)(C.Ay,{enterDelay:1500,title:K,children:_})),_},v=(0,g.forwardRef)((w,y)=>{const{entityRef:B,defaultKind:R,defaultNamespace:x,title:z,children:V,hideIcon:tt,...K}=w,W=D(w.entityRef);var _;const H=(_=V!=null?V:z)!==null&&_!==void 0?_:(0,o.jsx)(b,{entityRef:B,defaultKind:R,defaultNamespace:x,hideIcon:tt});return(0,o.jsx)(O.N_,{...K,ref:y,to:W,children:H})});function D(w){const y=(0,m.S)(h.s);let B,R,x;if(typeof w=="string"){const tt=(0,i.KU)(w);B=tt.kind,R=tt.namespace,x=tt.name}else"metadata"in w?(B=w.kind,R=w.metadata.namespace,x=w.metadata.name):(B=w.kind,R=w.namespace,x=w.name);B=B.toLocaleLowerCase("en-US");var z;R=(z=R==null?void 0:R.toLocaleLowerCase("en-US"))!==null&&z!==void 0?z:d.oQ;const V={kind:encodeURIComponent(B),namespace:encodeURIComponent(R),name:encodeURIComponent(x)};return y(V)}},34428:function(Y,T,t){"use strict";t.d(T,{i:function(){return m}});var o=t(31085),i=t(6820),d=t(14041),O=t(8859);function m(g){const{entityRefs:h,hideIcons:c,...C}=g;return(0,o.jsx)(o.Fragment,{children:h.map((A,P)=>{const u=typeof A=="string"?A:(0,i.U2)(A);return(0,o.jsxs)(d.Fragment,{children:[P>0&&", ",(0,o.jsx)(O.z,{...C,entityRef:A,hideIcon:c})]},`${P}.${u}`)})})}},90184:function(Y,T,t){"use strict";t.d(T,{S:function(){return O},Z:function(){return m}});var o=t(72348),i=t(46123),d=t.n(i);function O(g,h){const c=h==null?void 0:h.defaultKind;let C,A,P;return"metadata"in g?(C=g.kind,A=g.metadata.namespace,P=g.metadata.name):(C=g.kind,A=g.namespace,P=g.name),(A===void 0||A==="")&&(A=o.oQ),(h==null?void 0:h.defaultNamespace)!==void 0?(h==null?void 0:h.defaultNamespace)===A&&(A=void 0):A===o.oQ&&(A=void 0),C=C.toLocaleLowerCase("en-US"),C=c&&c.toLocaleLowerCase("en-US")===C?void 0:C,`${C?`${C}:`:""}${A?`${A}/`:""}${P}`}function m(g,h){for(const c of["spec.profile.displayName","metadata.title"]){const C=d()(g,c);if(C&&typeof C=="string")return C}return h}},91035:function(Y,T,t){"use strict";t.d(T,{m:function(){return h}});var o=t(31085),i=t(58837),d=t(14041),O=t(92822),m=t(50207);const g=(0,i.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),h=c=>{const C=g();return(0,o.jsx)(m.y,{label:"Tags",name:"tags",path:"metadata.tags",Filter:O.q_,showCounts:c.showCounts,InputProps:{className:C.input}})}},67626:function(Y,T,t){"use strict";t.d(T,{y:function(){return bt}});var o=t(31085),i=t(72427),d=t(65461),O=t(40703),m=t(58007),g=t(46423),h=t(65569),c=t(5951),C=t(26343),A=t(72501),P=t(58837),u=t(9684),b=t(80109),v=t(14041),D=t(92822),w=t(21405),y=t(16009),B=t(45250),R=t(73466),x=t(7341),z=t(26796),V=t(87290),tt=t(48899);function K(){const ct=(0,i.gf)(y.K),gt=(0,i.gf)(x.v),{filters:lt}=(0,w.nK)(),{value:rt,loading:vt}=(0,R.A)(async()=>(await ct.getBackstageIdentity()).ownershipEntityRefs,[]),{user:yt,owners:Pt,...pt}=lt,st=(0,z.$3)((0,B.compact)(Object.values(pt))),[{value:ht,loading:ft},wt]=(0,V.A)(async N=>{const G=W(N.owners,N.ownershipEntityRefs);if(G===void 0)return 0;const{["metadata.name"]:Et,...Ot}=N.filter.filter,{totalItems:Ft}=await gt.queryEntities({...N.filter,filter:{...Ot,"relations.ownedBy":G},limit:0});return Ft},[],{loading:!0});return(0,tt.A)(()=>{Object.keys(st.filter).length!==0&&rt!==void 0&&wt({ownershipEntityRefs:rt,owners:Pt,filter:st})},[rt,Pt,st]),{count:ht,loading:vt||ft,filter:(0,v.useMemo)(()=>D.tN.owned(rt!=null?rt:[]),[rt]),ownershipEntityRefs:rt}}function W(ct,gt){if(gt===void 0)return;var lt;const rt=(lt=ct==null?void 0:ct.values)!==null&&lt!==void 0?lt:[];if(rt.length){const vt=(0,B.intersection)(rt,gt);return vt.length===0?void 0:vt}return gt}function _(){const ct=(0,i.gf)(x.v),{filters:gt}=(0,w.nK)(),lt=(0,v.useRef)(),rt=(0,v.useMemo)(()=>{const{user:Pt,...pt}=gt,st=(0,B.compact)(Object.values(pt)),ht=(0,z.$3)(st),ft={...ht,limit:0};return Object.keys(ht.filter).length===0?(lt.current=void 0,lt.current):(0,B.isEqual)(ft,lt.current)?lt.current:(lt.current=ft,ft)},[gt]),{value:vt,loading:yt}=(0,R.A)(async()=>{if(rt===void 0)return 0;const{totalItems:Pt}=await ct.queryEntities(rt);return Pt},[rt]);return{count:vt,loading:yt}}var H=t(6820),J=t(56889);function q(){const ct=(0,i.gf)(x.v),{filters:gt}=(0,w.nK)(),{starredEntities:lt}=(0,J.I)(),rt=(0,v.useRef)(),vt=(0,v.useMemo)(()=>{const{user:st,...ht}=gt,ft=(0,B.compact)(Object.values(ht)),wt=(0,z.$3)(ft),N={...wt,filter:{...wt.filter,["metadata.name"]:Array.from(lt).map(G=>(0,H.KU)(G).name)},limit:1e3};return(0,B.isEqual)(N,rt.current)?rt.current:(rt.current=N,N)},[gt,lt]),{value:yt,loading:Pt}=(0,R.A)(async()=>lt.size?(await ct.queryEntities(vt)).items.map(ht=>(0,H.U2)({kind:ht.kind,namespace:ht.metadata.namespace,name:ht.metadata.name})).filter(ht=>lt.has(ht)).length:0,[vt,lt]),pt=(0,v.useMemo)(()=>D.tN.starred(Array.from(lt)),[lt]);return{count:yt,loading:Pt,filter:pt}}const mt=(0,P.A)(ct=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:ct.spacing(1,0,1,0)},title:{margin:ct.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:ct.palette.text.primary},menuItem:{minHeight:ct.spacing(6)},groupWrapper:{margin:ct.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function it(ct){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:u.A},{id:"starred",label:"Starred",icon:b.A}]},{name:ct!=null?ct:"Company",items:[{id:"all",label:"All"}]}]}const bt=ct=>{const{initialFilter:gt,availableFilters:lt}=ct,rt=mt(),vt=(0,i.gf)(d.U);var yt;const Pt=(yt=vt.getOptionalString("organization.name"))!==null&&yt!==void 0?yt:"Company",{filters:pt,updateFilters:st,queryParameters:{kind:ht,user:ft}}=(0,w.nK)(),wt=["starred","all"],At=it(Pt).map(ae=>({...ae,items:ae.items.filter(({id:le})=>["group","user"].some(Ht=>Ht===ht)?wt.includes(le):!lt||lt.includes(le))})).filter(({items:ae})=>!!ae.length),{count:N,loading:G,filter:Et}=K(),{count:Ot}=_(),{count:Ft,filter:Tt,loading:Dt}=q(),kt=(0,v.useMemo)(()=>[ft].flat()[0],[ft]),[St,Wt]=(0,v.useState)(kt!=null?kt:gt),Jt=(0,v.useMemo)(()=>({all:Ot,starred:Ft,owned:N}),[Ft,N,Ot]);(0,v.useEffect)(()=>{kt&&Wt(kt)},[kt]);const ue=G||Dt;return(0,v.useEffect)(()=>{!ue&&St&&St!=="all"&&Jt[St]===0&&Wt("all")},[ue,Jt,St,Wt]),(0,v.useEffect)(()=>{if(!St||ue)return;st({user:St==="owned"?Et:St==="starred"?Tt:D.tN.all()})},[St,Tt,Et,st,ue]),(0,o.jsx)(O.A,{className:rt.root,children:At.map(ae=>(0,o.jsxs)(v.Fragment,{children:[(0,o.jsx)(A.A,{variant:"subtitle2",component:"span",className:rt.title,children:ae.name}),(0,o.jsx)(O.A,{className:rt.groupWrapper,children:(0,o.jsx)(m.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":ae.name,children:ae.items.map(le=>{var Ht,Xt;return(0,o.jsxs)(C.A,{role:"none presentation",divider:!0,onClick:()=>Wt(le.id),selected:le.id===((Ht=pt.user)===null||Ht===void 0?void 0:Ht.value),className:rt.menuItem,disabled:Jt[le.id]===0,"data-testid":`user-picker-${le.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[le.icon&&(0,o.jsx)(g.A,{className:rt.listIcon,children:(0,o.jsx)(le.icon,{fontSize:"small"})}),(0,o.jsx)(c.A,{children:(0,o.jsxs)(A.A,{variant:"body1",children:[le.label," "]})}),(0,o.jsx)(h.A,{children:(Xt=Jt[le.id])!==null&&Xt!==void 0?Xt:"-"})]},le.id)})})})]},ae.name))})}},92822:function(Y,T,t){"use strict";t.d(T,{I5:function(){return A},Kf:function(){return v},N9:function(){return C},V3:function(){return c},gM:function(){return m},gZ:function(){return b},mT:function(){return D},qA:function(){return g},q_:function(){return h},tN:function(){return u},z:function(){return P}});var o=t(18990),i=t(51372),d=t(6820),O=t(67871);class m{getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}constructor(y){(0,o._)(this,"value",void 0),this.value=y}}class g{getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}constructor(y){(0,o._)(this,"value",void 0),this.value=y}}class h{filterEntity(y){return this.values.every(B=>{var R;return((R=y.metadata.tags)!==null&&R!==void 0?R:[]).includes(B)})}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}constructor(y){(0,o._)(this,"values",void 0),this.values=y}}class c{filterEntity(y){const B=this.toUpperArray(this.value.split(/\s/)),R=this.toUpperArray([y.metadata.tags]),x=this.toUpperArray([y.metadata.name,y.metadata.title]);for(const z of B)if(R.every(V=>V!==z)&&x.every(V=>!V.includes(z)))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(B=>!!B).map(B=>B.toLocaleUpperCase("en-US"))}constructor(y){(0,o._)(this,"value",void 0),this.value=y}}class C{getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(y){return this.values.some(B=>(0,O.t)(y,i.vv).some(R=>(0,d.U2)(R)===B))}toQueryValue(){return this.values}constructor(y){(0,o._)(this,"values",void 0),this.values=y.reduce((B,R)=>{try{return B.push((0,d.U2)((0,d.KU)(R,{defaultKind:"Group"}))),B}catch{return B}},[])}}class A{getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(y){return this.values.some(B=>{var R;return((R=y.spec)===null||R===void 0?void 0:R.lifecycle)===B})}toQueryValue(){return this.values}constructor(y){(0,o._)(this,"values",void 0),this.values=y}}class P{getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(y){return this.values.some(B=>y.metadata.namespace===B)}toQueryValue(){return this.values}constructor(y){(0,o._)(this,"values",void 0),this.values=y}}class u{static owned(y){return new u("owned",y)}static all(){return new u("all")}static starred(y){return new u("starred",y)}getCatalogFilters(){if(this.value==="owned"){var y;return{"relations.ownedBy":(y=this.refs)!==null&&y!==void 0?y:[]}}if(this.value==="starred"){var B,R;return{"metadata.name":(R=(B=this.refs)===null||B===void 0?void 0:B.map(x=>(0,d.KU)(x).name))!==null&&R!==void 0?R:[]}}return{}}filterEntity(y){if(this.value==="starred"){var B,R;return(R=(B=this.refs)===null||B===void 0?void 0:B.includes((0,d.U2)(y)))!==null&&R!==void 0?R:!0}if(this.value==="owned"){var x;const V=(0,O.t)(y,i.vv);var z;return(z=(x=this.refs)===null||x===void 0?void 0:x.some(tt=>V.some(K=>(0,d.U2)(K)===tt)))!==null&&z!==void 0?z:!1}return!0}toQueryValue(){return this.value}constructor(y,B){(0,o._)(this,"value",void 0),(0,o._)(this,"refs",void 0),this.value=y,this.refs=B}}class b{filterEntity(y){switch(this.value){case"owned":return this.isOwnedEntity(y);case"starred":return this.isStarredEntity(y);default:return!0}}toQueryValue(){return this.value}constructor(y,B,R){(0,o._)(this,"value",void 0),(0,o._)(this,"isOwnedEntity",void 0),(0,o._)(this,"isStarredEntity",void 0),this.value=y,this.isOwnedEntity=B,this.isStarredEntity=R}}class v{getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(y){var B;const R=(B=y.metadata.annotations)===null||B===void 0?void 0:B["backstage.io/orphan"];return R!==void 0&&this.value.toString()===R}constructor(y){(0,o._)(this,"value",void 0),this.value=y}}class D{filterEntity(y){var B,R;const x=(y==null||(R=y.status)===null||R===void 0||(B=R.items)===null||B===void 0?void 0:B.length)>0;return x!==void 0&&this.value===x}constructor(y){(0,o._)(this,"value",void 0),this.value=y}}},21405:function(Y,T,t){"use strict";t.d(T,{B9:function(){return D},nK:function(){return w}});var o=t(31085),i=t(45250),d=t.n(i),O=t(45810),m=t.n(O),g=t(14041),h=t(18690),c=t(87290),C=t(22771),A=t(71581),P=t(7341),u=t(26796),b=t(72427);const v=(0,g.createContext)(void 0),D=y=>{const B=(0,A.A)(),R=(0,b.gf)(P.v),[x,z]=(0,g.useState)({}),V=(0,h.zy)(),tt=y.pagination===!0||typeof y.pagination=="object",K=y.pagination&&typeof y.pagination=="object"&&typeof y.pagination.limit=="number"?y.pagination.limit:20,{queryParameters:W,cursor:_}=(0,g.useMemo)(()=>{const vt=m().parse(V.search,{ignoreQueryPrefix:!0});var yt;return{queryParameters:(yt=vt.filters)!==null&&yt!==void 0?yt:{},cursor:typeof vt.cursor=="string"?vt.cursor:void 0}},[V]),[H,J]=(0,g.useState)(_),[q,mt]=(0,g.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:tt?{}:void 0})),[{loading:it,error:bt},ct]=(0,c.A)(async()=>{const vt=(0,i.compact)(Object.values(x)),yt=Object.keys(x).reduce((pt,st)=>{const ht=x[st];return ht!=null&&ht.toQueryValue&&(pt[st]=ht.toQueryValue()),pt},{});if(tt)if(H){if(H!==q.appliedCursor){const pt=(0,u.be)(vt),st=await R.queryEntities({cursor:H,limit:K});mt({appliedFilters:x,appliedCursor:H,backendEntities:st.items,entities:st.items.filter(pt),pageInfo:st.pageInfo,totalItems:st.totalItems})}}else{const pt=(0,u.be)(vt),st=(0,u.$3)(vt),ht=(0,u.$3)((0,i.compact)(Object.values(q.appliedFilters)));if(!(0,i.isEqual)(ht,st)){const ft=await R.queryEntities({...st,limit:K,orderFields:[{field:"metadata.name",order:"asc"}]});mt({appliedFilters:x,backendEntities:ft.items,entities:ft.items.filter(pt),pageInfo:ft.pageInfo,totalItems:ft.totalItems})}}else{const pt=(0,u.be)(vt),st=(0,u.Rr)(vt),ht=(0,u.Rr)((0,i.compact)(Object.values(q.appliedFilters)));if((0,i.isEqual)(ht,st)){const ft=q.backendEntities.filter(pt);mt({appliedFilters:x,backendEntities:q.backendEntities,entities:ft,totalItems:ft.length})}else{const ft=await R.getEntities({filter:st}),wt=ft.items.filter(pt);mt({appliedFilters:x,backendEntities:ft.items,entities:wt,totalItems:wt.length})}}if(B()){var Pt;const pt=m().parse(V.search,{ignoreQueryPrefix:!0}),st=m().stringify({...pt,filters:yt,cursor:H},{addQueryPrefix:!0,arrayFormat:"repeat"}),ht=`${window.location.pathname}${st}`;(Pt=window.history)===null||Pt===void 0||Pt.replaceState(null,document.title,ht)}},[R,W,x,q,H,tt],{loading:!0});(0,C.A)(ct,10,[x,H]);const gt=(0,g.useCallback)(vt=>{J(void 0),z(yt=>{const Pt=typeof vt=="function"?vt(yt):vt;return{...yt,...Pt}})},[]),lt=(0,g.useMemo)(()=>{var vt,yt;if(!tt)return;const Pt=(vt=q.pageInfo)===null||vt===void 0?void 0:vt.prevCursor,pt=(yt=q.pageInfo)===null||yt===void 0?void 0:yt.nextCursor;return{prev:Pt?()=>J(Pt):void 0,next:pt?()=>J(pt):void 0}},[tt,q.pageInfo]),rt=(0,g.useMemo)(()=>({filters:q.appliedFilters,entities:q.entities,backendEntities:q.backendEntities,updateFilters:gt,queryParameters:W,loading:it,error:bt,pageInfo:lt,totalItems:q.totalItems}),[q,gt,W,it,bt,lt]);return(0,o.jsx)(v.Provider,{value:rt,children:y.children})};function w(){const y=(0,g.useContext)(v);if(!y)throw new Error("useEntityList must be used within EntityListProvider");return y}},56889:function(Y,T,t){"use strict";t.d(T,{I:function(){return h}});var o=t(6820),i=t(72427),d=t(14041),O=t(1394),m=t(18);function g(c){return typeof c=="string"?c:(0,o.U2)(c)}function h(){const c=(0,i.gf)(m.a),C=(0,O.A)((0,d.useMemo)(()=>c.starredEntitie$(),[c]),new Set),A=(0,d.useCallback)(u=>C.has(g(u)),[C]),P=(0,d.useCallback)(u=>c.toggleStarred(g(u)).then(),[c]);return{starredEntities:C,toggleStarredEntity:P,isStarredEntity:A}}},29207:function(Y,T,t){"use strict";t.d(T,{s:function(){return d}});var o=t(34569),i=t(63544);const d=(0,i.Q)("catalog:entity-route-ref",()=>(0,o.H)({id:"catalog:entity",params:["namespace","kind","name"]}));function O(m){var g,h;return{kind:m.kind.toLocaleLowerCase("en-US"),namespace:(h=(g=m.metadata.namespace)===null||g===void 0?void 0:g.toLocaleLowerCase("en-US"))!==null&&h!==void 0?h:DEFAULT_NAMESPACE,name:m.metadata.name}}},26796:function(Y,T,t){"use strict";t.d(T,{$3:function(){return d},Rr:function(){return O},be:function(){return m}});var o=t(92822);function i(g){return!!g.getFullTextFilters}function d(g){var h;const c=g.reduce((A,P)=>({...A,...P.getCatalogFilters?P.getCatalogFilters():{}}),{}),C=(h=g.find(i))===null||h===void 0?void 0:h.getFullTextFilters();return{filter:c,fullTextFilter:C}}function O(g){const h={};return g.forEach(c=>{var C;c instanceof o.q_||c instanceof o.N9||c instanceof o.I5||c instanceof o.z||c instanceof o.tN||c instanceof o.Kf||c instanceof o.V3||c instanceof o.gZ||Object.assign(h,((C=c.getCatalogFilters)===null||C===void 0?void 0:C.call(c))||{})}),h}function m(g){return h=>g.every(c=>!c.filterEntity||c.filterEntity(h))}},67871:function(Y,T,t){"use strict";t.d(T,{t:function(){return i}});var o=t(6820);function i(d,O,m){var g;let h=(d==null||(g=d.relations)===null||g===void 0?void 0:g.filter(c=>c.type===O).map(c=>(0,o.KU)(c.targetRef)))||[];return m!=null&&m.kind&&(h=h.filter(c=>c.kind.toLocaleLowerCase("en-US")===m.kind.toLocaleLowerCase("en-US"))),h}},95203:function(Y,T,t){"use strict";t.d(T,{qP:function(){return c},Zg:function(){return A},rQ:function(){return u},pS:function(){return P},UJ:function(){return C}});var o=t(18990),i=t(59598);let d=i.b,O=d;class m{toString(){return`routeRef{type=external,id=${this.id}}`}constructor(v,D,w){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,"optional",void 0),(0,o._)(this,O,void 0),this.id=v,this.params=D,this.optional=w,this[d]="external"}}function g(b){var v;return new m(b.id,(v=b.params)!==null&&v!==void 0?v:[],!!b.optional)}var h=t(34569);const c=g({id:"create-component",optional:!0}),C=g({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),A=g({id:"create-from-template",optional:!0,params:["namespace","templateName"]}),P=g({id:"catalog:unregister-redirect",optional:!0}),u=(0,h.H)({id:"catalog"})},54241:function(Y,T,t){"use strict";t.d(T,{b:function(){return o}});var o;(function(i){i.DENY="DENY",i.ALLOW="ALLOW",i.CONDITIONAL="CONDITIONAL"})(o||(o={}))},96824:function(Y,T,t){"use strict";t.d(T,{x:function(){return i}});var o=t(55309);const i=(0,o.y)({id:"plugin.permission.api"})},70734:function(Y,T,t){"use strict";t.d(T,{e:function(){return m}});var o=t(31085),i=t(14041),d=t(58837);const O=(0,d.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),m=g=>{const{text:h,preTag:c,postTag:C}=g,A=O(),P=(0,i.useMemo)(()=>h.split(new RegExp(`(${c}.+?${C})`)),[C,c,h]);return(0,o.jsx)(o.Fragment,{children:P.map((u,b)=>u.includes(c)?(0,o.jsx)("mark",{className:A.highlight,children:u.replace(new RegExp(`${c}|${C}`,"g"),"")},b):u)})}},54560:function(Y,T,t){"use strict";t.d(T,{ec:function(){return C}});var o=t(31085),i=t(14041),d=t(93368),O=t(88758),m=t(8109);const g="search.results.list.items.extensions.v1",h=(u,b)=>{for(const v of u){if(!isValidElement(v))continue;const D=getComponentData(v,g);if(D!=null&&D(b))return cloneElement(v,{rank:b.rank,highlight:b.highlight,result:b.document,...v.props})}return null},c=u=>{const{rank:b,result:v,noTrack:D,children:w,alignItems:y="flex-start",...B}=u,R=(0,d.s)(),x=(0,i.useCallback)(()=>{D||v&&R.captureEvent("discover",v.title,{attributes:{to:v.location},value:b})},[b,v,D,R]);return(0,o.jsx)(m.A,{divider:!0,alignItems:y,onClickCapture:x,...B,children:w})},C=u=>{const{name:b,component:v,predicate:D=()=>!0}=u;return(0,O.zZ)({name:b,component:{lazy:()=>v().then(w=>y=>(0,o.jsx)(c,{rank:y.rank,result:y.result,noTrack:y.noTrack,children:(0,i.createElement)(w,y)}))},data:{[g]:D}})},A=u=>{const b=useElementFilter(u,v=>v.selectByComponentData({key:g}).getElements(),[u]);return useCallback((v,D)=>{const w=h(b,v);return _jsx(Fragment,{children:w!=null?w:_jsx(c,{rank:v.rank,result:v.document,children:_jsx(DefaultResultListItem,{rank:v.rank,highlight:v.highlight,result:v.document})})},D)},[b])},P=u=>{const{results:b,children:v,...D}=u,w=A(v);return _jsx(List,{...D,children:b.map(w)})}},72020:function(Y,T,t){"use strict";t.d(T,{AF:function(){return c},Hr:function(){return P},Wm:function(){return h},YR:function(){return D},po:function(){return C}});var o=t(31085),i=t(14041),d=t(18690),O=t(19402),m=t(88758),g=t(82442);const h="techdocs.addons.addon.v1",c="techdocs.addons.wrapper.v1",C=()=>null;(0,O.h)(C,c,!0);const A=w=>`${h}.${w.toLocaleLowerCase("en-US")}`;function P(w){const{name:y,component:B}=w;return(0,m.zZ)({name:y,component:{sync:R=>(0,o.jsx)(B,{...R})},data:{[h]:w,[A(y)]:!0}})}const u=(w,y)=>w.selectByComponentData({key:y}).getElements()[0],b=w=>w.selectByComponentData({key:c}).selectByComponentData({key:h}),v=w=>w.selectByComponentData({key:c}).findComponentData({key:h}),D=()=>{const w=(0,d.P1)(),y=(0,g.O)(w,b),B=(0,g.O)(w,v),R=(0,i.useCallback)(V=>{if(!y||!V)return null;const tt=A(V.name);var K;return(K=u(y,tt))!==null&&K!==void 0?K:null},[y]),x=(0,i.useCallback)(V=>{const tt=B.find(K=>K.name===V);return tt?R(tt):null},[B,R]),z=(0,i.useCallback)(V=>{const tt=B.filter(K=>K.location===V);return tt.length?tt.map(R):null},[B,R]);return{renderComponentByName:x,renderComponentsByLocation:z}}},26679:function(Y,T,t){"use strict";t.d(T,{l:function(){return i},s:function(){return d}});var o=t(55309);const i=(0,o.y)({id:"plugin.techdocs.service"}),d=(0,o.y)({id:"plugin.techdocs.storageservice"})},86892:function(Y,T,t){"use strict";t.d(T,{R:function(){return w},V:function(){return y}});var o=t(31085),i=t(14041),d=t(73466),O=t(28966),m=t(6820),g=t(43836),h=t(10602),c=t(72427),C=t(65461),A=t(25862),P=t(26679);function u(B,R){return R.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(B.kind=B.kind.toLocaleLowerCase(),B.name=B.name.toLocaleLowerCase(),B.namespace=B.namespace.toLocaleLowerCase()),B}const b=(B,R)=>(0,m.U2)(B)===(0,m.U2)(R),v={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},D=(0,g.tK)("techdocs-reader-page-context"),w=(0,i.memo)(B=>{const{entityRef:R,children:x}=B,z=(0,c.gf)(P.l),V=(0,c.gf)(C.U),tt=(0,d.A)(async()=>z.getEntityMetadata(R),[R]),K=(0,O.A)(async()=>z.getTechDocsMetadata(R),[R]),[W,_]=(0,i.useState)(v.title),[H,J]=(0,i.useState)(v.subtitle),[q,mt]=(0,i.useState)(v.shadowRoot);(0,i.useEffect)(()=>{q&&!K.value&&!K.loading&&K.retry()},[K.value,K.loading,q,K.retry,K]);const it={metadata:K,entityRef:u(R,V),entityMetadata:tt,shadowRoot:q,setShadowRoot:mt,title:W,setTitle:_,subtitle:H,setSubtitle:J},bt=(0,h.B)({1:it});return(0,o.jsx)(A.Ig,{attributes:{entityRef:(0,m.U2)(R)},children:(0,o.jsx)(D.Provider,{value:bt,children:x instanceof Function?x(it):x})})},(B,R)=>b(B.entityRef,R.entityRef)),y=()=>{const B=(0,i.useContext)(D);if(B===void 0)return v;const R=B.atVersion(1);if(R===void 0)throw new Error("No context found for version 1.");return R}},99730:function(Y,T,t){"use strict";t.d(T,{e:function(){return o}});const o=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:function(Y,T,t){"use strict";t.d(T,{V:function(){return o}});function o(i,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?i:i.toLocaleLowerCase("en-US")}},85920:function(Y,T,t){"use strict";t.d(T,{K:function(){return K}});var o=t(31085),i=t(14041),d=t(26280),O=t(59428),m=t(27586),g=t(21405),h=t(54203),c=t(67626),C=t(72987),A=t(91035),P=t(81859),u=t(86519);class b{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":u.c}}}const v=()=>{const{updateFilters:W}=(0,g.nK)();return(0,i.useEffect)(()=>{W({techdocs:new b})},[W]),null};var D=t(36338),w=t(45250),y=t(88640),B=t(77310),R=t(56889),x=t(27125),z=t(84295),V=t(42717);const tt=W=>{var _;const{columns:H,actions:J,options:q}=W,{loading:mt,error:it,entities:bt,filters:ct}=(0,g.nK)(),{isStarredEntity:gt,toggleStarredEntity:lt}=(0,R.I)(),[,rt]=(0,D.A)();var vt;const yt=(0,w.capitalize)((vt=(_=ct.user)===null||_===void 0?void 0:_.value)!==null&&vt!==void 0?vt:"all"),Pt=[z.f.createCopyDocsUrlAction(rt),z.f.createStarEntityAction(gt,lt)];return it?(0,o.jsx)(y.B,{severity:"error",title:"Could not load available documentation.",children:(0,o.jsx)(B.z,{language:"text",text:it.toString()})}):(0,o.jsx)(x.o,{title:yt,entities:bt,loading:mt,actions:J||Pt,columns:H,options:q})};tt.columns=V.B,tt.actions=z.f;const K=W=>{const{initialFilter:_="owned",columns:H,actions:J}=W;return(0,o.jsx)(P.S,{children:(0,o.jsxs)(d.U,{children:[(0,o.jsx)(O.d,{title:"",children:(0,o.jsx)(m.Y,{children:"Discover documentation in your ecosystem."})}),(0,o.jsx)(g.B9,{children:(0,o.jsxs)(h.GI,{children:[(0,o.jsxs)(h.GI.Filters,{children:[(0,o.jsx)(v,{}),(0,o.jsx)(c.y,{initialFilter:_}),(0,o.jsx)(C.t,{}),(0,o.jsx)(A.m,{})]}),(0,o.jsx)(h.GI.Content,{children:(0,o.jsx)(tt,{actions:J,columns:H})})]})})]})})}},27125:function(Y,T,t){"use strict";t.d(T,{o:function(){return y}});var o=t(31085),i=t(14041),d=t(36338),O=t(9222),m=t(72427),g=t(65461),h=t(51372),c=t(67871),C=t(90184),A=t(82779),P=t(14209),u=t(44186),b=t(73896),v=t(84295),D=t(42717),w=t(95768);const y=B=>{const{entities:R,title:x,loading:z,columns:V,actions:tt,options:K}=B,[,W]=(0,d.A)(),_=(0,O.S)(A.Oc),H=(0,m.gf)(g.U);if(!R)return null;const J=R.map(ct=>{const gt=(0,c.t)(ct,h.vv);var lt;return{entity:ct,resolved:{docsUrl:_({namespace:(0,w.V)((lt=ct.metadata.namespace)!==null&&lt!==void 0?lt:"default",H),kind:(0,w.V)(ct.kind,H),name:(0,w.V)(ct.metadata.name,H)}),ownedByRelations:gt,ownedByRelationsTitle:gt.map(rt=>(0,C.S)(rt,{defaultKind:"group"})).join(", ")}}}),q=[D.B.createNameColumn(),D.B.createOwnerColumn(),D.B.createKindColumn(),D.B.createTypeColumn()],mt=[v.f.createCopyDocsUrlAction(W)],it=20,bt=J&&J.length>it;return(0,o.jsx)(o.Fragment,{children:z||J&&J.length>0?(0,o.jsx)(P.X,{isLoading:z,options:{paging:bt,pageSize:it,search:!0,actionsColumnIndex:-1,...K},data:J,columns:V||q,actions:tt||mt,title:x?`${x} (${J.length})`:`All (${J.length})`}):(0,o.jsx)(u.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,o.jsx)(b.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};y.columns=D.B,y.actions=v.f},84295:function(Y,T,t){"use strict";t.d(T,{f:function(){return c}});var o=t(31085),i=t(14041),d=t(55290),O=t(87051),m=t(80109),g=t(15303);const h=(0,O.A)({root:{color:"#f3ba37"}})(m.A),c={createCopyDocsUrlAction(C){return A=>({icon:()=>(0,o.jsx)(d.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>C(`${window.location.origin}${A.resolved.docsUrl}`)})},createStarEntityAction(C,A){return P=>{const u=P.entity,b=C(u);return{cellStyle:{paddingLeft:"1em"},icon:()=>b?(0,o.jsx)(h,{}):(0,o.jsx)(g.A,{}),tooltip:b?"Remove from favorites":"Add to favorites",onClick:()=>A(u)}}}}},42717:function(Y,T,t){"use strict";t.d(T,{B:function(){return A}});var o=t(31085),i=t(14041),d=t(10394),O=t(58837);const m=(0,O.A)(P=>({value:{marginBottom:P.spacing(.75)},subvalue:{color:P.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function g(P){const{value:u,subvalue:b}=P,v=m();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.A,{className:v.value,children:u}),(0,o.jsx)(d.A,{className:v.subvalue,children:b})]})}var h=t(72072),c=t(34428);function C(P){return P.metadata.title||P.metadata.name}const A={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:P=>(0,o.jsx)(g,{value:(0,o.jsx)(h.N_,{to:P.resolved.docsUrl,children:C(P.entity)}),subvalue:P.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:P})=>(0,o.jsx)(c.i,{entityRefs:P.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},81859:function(Y,T,t){"use strict";t.d(T,{S:function(){return g}});var o=t(31085),i=t(14041),d=t(27155),O=t(72427),m=t(65461);const g=h=>{const{children:c}=h,C=(0,O.gf)(m.U);var A;const P=`Documentation available in ${(A=C.getOptionalString("organization.name"))!==null&&A!==void 0?A:"Backstage"}`;return(0,o.jsx)(d.d,{title:"Documentation",subtitle:P,themeId:"documentation",children:c})}},39278:function(Y,T,t){"use strict";t.d(T,{$j:function(){return z},Wj:function(){return V},Ju:function(){return y}});var o=t(26679),i=t(18990),d=t(70835),O=t(97142),m=t(50165);class g{async getCookie(){const _=`${await this.getApiOrigin()}/cookie`,H=await this.fetchApi.fetch(`${_}`,{credentials:"include"});if(!H.ok)throw await d.o.fromResponse(H);return await H.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(W){const{kind:_,namespace:H,name:J}=W,mt=`${await this.getApiOrigin()}/metadata/techdocs/${H}/${_}/${J}`,it=await this.fetchApi.fetch(`${mt}`);if(!it.ok)throw await d.o.fromResponse(it);return await it.json()}async getEntityMetadata(W){const{kind:_,namespace:H,name:J}=W,mt=`${await this.getApiOrigin()}/metadata/entity/${H}/${_}/${J}`,it=await this.fetchApi.fetch(`${mt}`);if(!it.ok)throw await d.o.fromResponse(it);return await it.json()}constructor(W){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=W.configApi,this.discoveryApi=W.discoveryApi,this.fetchApi=W.fetchApi}}class h{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var W;return(W=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&W!==void 0?W:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(W,_){const{kind:H,namespace:J,name:q}=W,it=`${await this.getStorageUrl()}/${J}/${H}/${q}/${_}`,bt=await this.fetchApi.fetch(`${it.endsWith("/")?it:`${it}/`}index.html`);let ct="";switch(bt.status){case 404:throw ct="Page not found. ",_||(ct+="This could be because there is no index.md file in the root of the docs directory of this repository."),new O.m_(ct);case 500:throw ct="Could not generate documentation or an error in the TechDocs backend. ",new Error(ct);default:break}return bt.text()}async syncEntityDocs(W,_=()=>{}){const{kind:H,namespace:J,name:q}=W,it=`${await this.getApiOrigin()}/sync/${J}/${H}/${q}`,{token:bt}=await this.identityApi.getCredentials();return new Promise((ct,gt)=>{const lt=new m.EventSourcePolyfill(it,{withCredentials:!0,headers:bt?{Authorization:`Bearer ${bt}`}:{}});lt.addEventListener("log",rt=>{rt.data&&_(JSON.parse(rt.data))}),lt.addEventListener("finish",rt=>{let vt=!1;rt.data&&({updated:vt}=JSON.parse(rt.data)),ct(vt?"updated":"cached")}),lt.onerror=rt=>{switch(lt.close(),rt.status){case 404:gt(new O.m_(rt.message));return;default:gt(new Error(rt.data));return}}})}async getBaseUrl(W,_,H){const{kind:J,namespace:q,name:mt}=_,bt=`${await this.getApiOrigin()}/static/docs/${q}/${J}/${mt}/${H}`;return new URL(W,bt.endsWith("/")?bt:`${bt}/`).toString()}constructor(W){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"identityApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=W.configApi,this.discoveryApi=W.discoveryApi,this.identityApi=W.identityApi,this.fetchApi=W.fetchApi}}var c=t(82779),C=t(9803),A=t(12935),P=t(65461),u=t(57405),b=t(16009),v=t(70795),D=t(88758),w=t(54560);const y=(0,C.i)({id:"techdocs",apis:[(0,A.b)({api:o.s,deps:{configApi:P.U,discoveryApi:u.I,identityApi:b.K,fetchApi:v.a},factory:({configApi:K,discoveryApi:W,identityApi:_,fetchApi:H})=>new h({configApi:K,discoveryApi:W,identityApi:_,fetchApi:H})}),(0,A.b)({api:o.l,deps:{configApi:P.U,discoveryApi:u.I,fetchApi:v.a},factory:({configApi:K,discoveryApi:W,fetchApi:_})=>new g({configApi:K,discoveryApi:W,fetchApi:_})})],routes:{root:c.rQ,docRoot:c.Oc,entityContent:c.Ri}}),B=y.provide((0,D.QJ)({name:"TechdocsPage",component:()=>t.e(9605).then(t.bind(t,29605)).then(K=>K.Router),mountPoint:c.rQ})),R=y.provide((0,D.QJ)({name:"EntityTechdocsContent",component:()=>t.e(9605).then(t.bind(t,29605)).then(K=>K.EmbeddedDocsRouter),mountPoint:c.Ri})),x=y.provide((0,D.QJ)({name:"TechDocsCustomHome",component:()=>t.e(4487).then(t.bind(t,94487)).then(K=>K.TechDocsCustomHome),mountPoint:c.rQ})),z=y.provide((0,D.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(K=>K.TechDocsIndexPage),mountPoint:c.rQ})),V=y.provide((0,D.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(K=>K.TechDocsReaderPage),mountPoint:c.Oc})),tt=y.provide((0,w.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(K=>K.TechDocsSearchResultListItem),predicate:K=>K.type==="techdocs"}))},16203:function(Y,T,t){"use strict";t.d(T,{p:function(){return Rt}});var o=t(31085),i=t(14041),d=t(42899),O=t(58837),m=t(86892),g=t(9394),h=t(91360),c=t(22856),C=t(68146);const A="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",P=p=>{(0,i.useEffect)(()=>{if(!p)return()=>{};const I=p.querySelectorAll('head > link[rel="stylesheet"]');var F;let $=(F=I==null?void 0:I.length)!==null&&F!==void 0?F:0;const Q=new CustomEvent(A);if(!$)return p.dispatchEvent(Q),()=>{};const X=()=>{--$===0&&p.dispatchEvent(Q)};return I==null||I.forEach(at=>{at.addEventListener("load",X)}),()=>{I==null||I.forEach(at=>{at.removeEventListener("load",X)})}},[p])},u=p=>{const[I,F]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!p)return()=>{};F(!0);const $=p.style;$.setProperty("opacity","0");const Q=()=>{F(!1),$.setProperty("opacity","1")};return p.addEventListener(A,Q),()=>{p.removeEventListener(A,Q)}},[p]),I},b=p=>{const{element:I,onAppend:F,children:$}=p,[Q,X]=(0,i.useState)((0,g.vt)({...(0,c.A)(),insertionPoint:void 0}));P(I);const at=u(I),Ct=(0,i.useCallback)(Ut=>{if(!I||!Ut)return;X((0,g.vt)({...(0,c.A)(),insertionPoint:I.querySelector("head")||void 0}));let Kt=Ut.shadowRoot;Kt||(Kt=Ut.attachShadow({mode:"open"})),Kt.replaceChildren(I),typeof F=="function"&&F(Kt)},[I,F]);return(0,o.jsxs)(o.Fragment,{children:[at&&(0,o.jsx)(C.k,{}),(0,o.jsxs)(h.Ay,{jss:Q,sheetsManager:new Map,children:[(0,o.jsx)("div",{ref:Ct,"data-testid":"techdocs-native-shadowroot"}),$]})]})};var v=t(12784);const D=()=>{const{shadowRoot:p}=(0,m.V)();return p},w=p=>{const I=D();return I?p.map(F=>I==null?void 0:I.querySelectorAll(F)).filter(F=>F.length).map(F=>Array.from(F)).flat():[]},y=p=>p.toString()&&p.rangeCount&&p.getRangeAt(0).getBoundingClientRect().top,B=(p=0)=>{const I=D(),[F,$]=useState(null),Q=useMemo(()=>debounce(()=>{const X=I,at=X.getSelection?X.getSelection():document.getSelection();at&&y(at)?$(at):$(null)},p),[I,$,p]);return useEffect(()=>(window.document.addEventListener("selectionchange",Q),()=>{Q.cancel(),window.document.removeEventListener("selectionchange",Q)}),[Q]),F};var R=t(12173),x=t(26280),z=t(45250),V=t(73466),tt=t(5877),K=t(43836),W=t(10602),_=t(72427),H=t(93368),J=t(25862),q=t(65461),mt=t(55309);const it=(0,mt.y)({id:"plugin.search.queryservice"});class bt{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(I){_define_property(this,"mockedResults",void 0),this.mockedResults=I}}const ct=(0,K.tK)("search-context"),gt=()=>{const p=(0,i.useContext)(ct);if(!p)throw new Error("useSearch must be used within a SearchContextProvider");const I=p.atVersion(1);if(!I)throw new Error("No SearchContext v1 found");return I},lt=()=>(0,i.useContext)(ct)!==void 0,rt={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},vt=(p=rt)=>{var I,F,$,Q;const X=(0,_.gf)(it),at=(0,H.s)(),[Ct,Ut]=(0,i.useState)(p.term),[Kt,Yt]=(0,i.useState)(p.types),[Vt,It]=(0,i.useState)(p.filters),[ce,ye]=(0,i.useState)(p.pageLimit),[Zt,Gt]=(0,i.useState)(p.pageCursor),ie=(0,tt.A)(Ct),Ee=(0,tt.A)(Vt),jt=(0,V.A)(async()=>{const fe=await X.query({term:Ct,types:Kt,filters:Vt,pageLimit:ce,pageCursor:Zt});if(Ct){var je,se;at.captureEvent("search",Ct,{value:(se=(je=jt.value)===null||je===void 0?void 0:je.numberOfResults)!==null&&se!==void 0?se:void 0})}return fe},[Ct,Kt,Vt,ce,Zt]),_t=!jt.loading&&!jt.error&&((I=jt.value)===null||I===void 0?void 0:I.nextPageCursor),te=!jt.loading&&!jt.error&&((F=jt.value)===null||F===void 0?void 0:F.previousPageCursor),Ae=(0,i.useCallback)(()=>{var fe;Gt((fe=jt.value)===null||fe===void 0?void 0:fe.nextPageCursor)},[($=jt.value)===null||$===void 0?void 0:$.nextPageCursor]),Be=(0,i.useCallback)(()=>{var fe;Gt((fe=jt.value)===null||fe===void 0?void 0:fe.previousPageCursor)},[(Q=jt.value)===null||Q===void 0?void 0:Q.previousPageCursor]);return(0,i.useEffect)(()=>{ie!==void 0&&Ct!==ie&&Gt(void 0)},[Ct,ie,Gt]),(0,i.useEffect)(()=>{Ee!==void 0&&!(0,z.isEqual)(Vt,Ee)&&Gt(void 0)},[Vt,Ee,Gt]),{result:jt,term:Ct,setTerm:Ut,types:Kt,setTypes:Yt,filters:Vt,setFilters:It,pageLimit:ce,setPageLimit:ye,pageCursor:Zt,setPageCursor:Gt,fetchNextPage:_t?Ae:void 0,fetchPreviousPage:te?Be:void 0}},yt=p=>{const{initialState:I,children:F}=p,$=vt(I);return(0,o.jsx)(J.Ig,{attributes:{searchTypes:$.types.sort().join(",")},children:(0,o.jsx)(ct.Provider,{value:(0,W.B)({1:$}),children:F})})},Pt=p=>{const{initialState:I,inheritParentContextIfAvailable:F,children:$}=p,Q=lt(),X=(0,_.gf)(q.U),at=I!=null?I:{},Ct=X.has("search.query.pageLimit")?{pageLimit:X.getNumber("search.query.pageLimit")}:{},Ut={...rt,...at,...Ct};return Q&&F?(0,o.jsx)(o.Fragment,{children:$}):(0,o.jsx)(yt,{initialState:Ut,children:$})};var pt=t(78467),st=t(20577),ht=t(29365),ft=t(34839),wt=t(16249),At=t(64947),N=t(45917),G=t(22771);function Et(p){return(0,i.forwardRef)((I,F)=>(0,o.jsx)(Pt,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(p,{...I,ref:F})}))}const Ot=Et((0,i.forwardRef)((p,I)=>{const{onChange:F,onKeyDown:$=()=>{},onClear:Q=()=>{},onSubmit:X=()=>{},debounceTime:at=200,clearButton:Ct=!0,fullWidth:Ut=!0,value:Kt,label:Yt,placeholder:Vt,inputProps:It={},InputProps:ce={},endAdornment:ye,...Zt}=p,Gt=(0,_.gf)(q.U),[ie,Ee]=(0,i.useState)(""),jt=(0,i.useRef)("");(0,i.useEffect)(()=>{Ee(se=>se===jt.current?String(Kt):se)},[Kt,jt]),(0,G.A)(()=>{jt.current=ie,F(ie)},at,[ie]);const _t=(0,i.useCallback)(se=>{Ee(se.target.value)},[Ee]),te=(0,i.useCallback)(se=>{$&&$(se),X&&se.key==="Enter"&&X()},[$,X]),Ae=(0,i.useCallback)(()=>{jt.current="",F(""),Ee(""),Q&&Q()},[F,Q]),Be=Yt?void 0:"Search",Ne=Vt!=null?Vt:`Search in ${Gt.getOptionalString("app.title")||"Backstage"}`,fe=(0,o.jsx)(ft.A,{position:"start",children:(0,o.jsx)(ht.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,o.jsx)(N.A,{})})}),je=(0,o.jsx)(ft.A,{position:"end",children:(0,o.jsx)(At.A,{"aria-label":"Clear",size:"small",onClick:Ae,onKeyDown:se=>{se.key==="Enter"&&se.stopPropagation()},children:"Clear"})});return(0,o.jsx)(wt.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:I,value:ie,label:Yt,placeholder:Ne,InputProps:{startAdornment:fe,endAdornment:Ct?je:ye,...ce},inputProps:{"aria-label":Be,...It},fullWidth:Ut,onChange:_t,onKeyDown:te,...Zt})})),Ft=Et((0,i.forwardRef)((p,I)=>{const{value:F="",onChange:$,...Q}=p,{term:X,setTerm:at}=gt();(0,i.useEffect)(()=>{F&&at(String(F))},[F,at]);const Ct=(0,i.useCallback)(Ut=>{$?$(Ut):at(Ut)},[$,at]);return(0,o.jsx)(J.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,o.jsx)(Ot,{...Q,ref:I,value:X,onChange:Ct})})})),Tt=(0,O.A)(p=>({loading:{right:p.spacing(1),position:"absolute"}})),Dt=p=>I=>(0,o.jsx)(Pt,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(p,{...I})}),kt=()=>{const p=Tt();return(0,o.jsx)(pt.A,{className:p.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},St=Dt(function(I){const{loading:F,value:$,onChange:Q=()=>{},options:X=[],getOptionLabel:at=jt=>String(jt),inputPlaceholder:Ct,inputDebounceTime:Ut,freeSolo:Kt=!0,fullWidth:Yt=!0,clearOnBlur:Vt=!1,"data-testid":It="search-autocomplete",...ce}=I,{setTerm:ye}=gt(),Zt=(0,i.useCallback)(jt=>jt?typeof jt=="string"?jt:at(jt):"",[at]),Gt=(0,i.useMemo)(()=>Zt($),[$,Zt]),ie=(0,i.useCallback)((jt,_t,te,Ae)=>{ye(Zt(_t)),Q(jt,_t,te,Ae)},[Zt,ye,Q]),Ee=(0,i.useCallback)(({InputProps:{ref:jt,className:_t,endAdornment:te},InputLabelProps:Ae,...Be})=>(0,o.jsx)(Ft,{...Be,ref:jt,clearButton:!1,value:Gt,placeholder:Ct,debounceTime:Ut,endAdornment:F?(0,o.jsx)(kt,{}):te,InputProps:{className:_t}}),[F,Gt,Ct,Ut]);return(0,o.jsx)(st.Ay,{...ce,"data-testid":It,value:$,onChange:ie,options:X,getOptionLabel:at,renderInput:Ee,freeSolo:Kt,fullWidth:Yt,clearOnBlur:Vt})});var Wt=t(18690),Jt=t(27698);const ue=p=>p==null?void 0:p.document,ae=p=>{const{entityId:I,entityTitle:F,debounceTime:$=150}=p,[Q,X]=(0,i.useState)(!1),at=(0,Wt.Zp)(),{setFilters:Ct,result:{loading:Ut,value:Kt}}=gt(),[Yt,Vt]=(0,i.useState)([]);(0,i.useEffect)(()=>{let Gt=!0;if(Gt&&Kt){const ie=Kt.results.slice(0,10);Vt(ie)}return()=>{Gt=!1}},[Ut,Kt]);const{kind:It,name:ce,namespace:ye}=I;(0,i.useEffect)(()=>{Ct(Gt=>({...Gt,kind:It,namespace:ye,name:ce}))},[It,ye,ce,Ct]);const Zt=(Gt,ie)=>{if(ue(ie)){const{location:Ee}=ie.document;at(Ee)}};return(0,o.jsx)(St,{"data-testid":"techdocs-search-bar",size:"small",open:Q,getOptionLabel:()=>"",filterOptions:Gt=>Gt,onClose:()=>{X(!1)},onFocus:()=>{X(!0)},onChange:Zt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Yt,renderOption:({document:Gt,highlight:ie})=>(0,o.jsx)(Jt.TechDocsSearchResultListItem,{result:Gt,lineClamp:3,asListItem:!1,asLink:!1,title:Gt.title,highlight:ie}),loading:Ut,inputDebounceTime:$,inputPlaceholder:`Search ${F||I.name} docs`,freeSolo:!1})},le=p=>{const I={term:"",types:["techdocs"],pageCursor:"",filters:p.entityId};return(0,o.jsx)(Pt,{initialState:I,children:(0,o.jsx)(ae,{...p})})};var Ht=t(74219),Xt=t(82266);const ge=(0,i.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(p=>({default:p.RealLogViewer})));function Ke(p){const{Progress:I}=(0,Xt.n)().getComponents();return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(I,{}),children:(0,o.jsx)(ge,{...p})})}var Fe=t(73845),_e=t(72501),we=t(12398),sn=t(32881);const Xe=(0,O.A)(p=>(0,we.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}})),ne=({buildLog:p,onClose:I})=>{const F=Xe(),$=p.length===0?"Waiting for logs...":p.join(`
8
8
  `);return(0,o.jsxs)(d.A,{container:!0,direction:"column",className:F.root,spacing:0,wrap:"nowrap",children:[(0,o.jsxs)(d.A,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,o.jsx)(_e.A,{variant:"h5",children:"Build Details"}),(0,o.jsx)(ht.A,{title:"Close the drawer",onClick:I,color:"inherit",children:(0,o.jsx)(sn.A,{})},"dismiss")]}),(0,o.jsx)(d.A,{item:!0,xs:!0,children:(0,o.jsx)(Ke,{text:$,classes:{root:F.logs}})})]})},ze=({buildLog:p})=>{const I=Xe(),[F,$]=(0,i.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(At.A,{color:"inherit",onClick:()=>$(!0),children:"Show Build Logs"}),(0,o.jsx)(Fe.Ay,{classes:{paper:I.paper},anchor:"right",open:F,onClose:()=>$(!1),children:(0,o.jsx)(ne,{buildLog:p,onClose:()=>$(!1)})})]})},He=({errorMessage:p})=>{const I=(0,_.gf)(q.U).getOptionalString("techdocs.builder"),F=(0,H.s)(),{entityRef:$}=(0,m.V)(),Q=(0,Wt.zy)();(0,i.useEffect)(()=>{const{pathname:at,search:Ct,hash:Ut}=Q;F.captureEvent("not-found",`${at}${Ct}${Ut}`,{attributes:$})},[F,$,Q]);let X="";return I!=="local"&&(X="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),(0,o.jsx)(R.M,{status:"404",statusMessage:p||"Documentation not found",additionalInfo:X})};var qe=t(28966),Ye=t(26679);function xe({contentLoading:p,content:I,activeSyncState:F}){return p||F==="BUILD_READY_RELOAD"||!I&&F==="CHECKING"?"CHECKING":!I&&F==="BUILDING"?"INITIAL_BUILD":I?F==="BUILDING"?"CONTENT_STALE_REFRESHING":F==="BUILD_READY"?"CONTENT_STALE_READY":F==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function an(p,I){const F={...p};switch(I.type){case"sync":I.state==="CHECKING"&&(F.buildLog=[]),F.activeSyncState=I.state,F.syncError=I.syncError;break;case"contentLoading":F.contentLoading=!0,F.contentError=void 0;break;case"content":typeof I.path=="string"&&(F.path=I.path),F.contentLoading=!1,F.content=I.content,F.contentError=I.contentError;break;case"buildLog":F.buildLog=F.buildLog.concat(I.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(F.activeSyncState)&&["contentLoading","content"].includes(I.type)&&(F.activeSyncState="UP_TO_DATE",F.buildLog=[]),F}function ln(p,I,F,$){var Q,X;const[at,Ct]=(0,i.useReducer)(an,{activeSyncState:"CHECKING",path:$,contentLoading:!0,buildLog:[]}),Ut=(0,_.gf)(Ye.s),{retry:Kt}=(0,qe.A)(async()=>{Ct({type:"contentLoading"});try{const It=await Ut.getEntityDocs({kind:p,namespace:I,name:F},$);return Ct({type:"content",content:It,path:$}),It}catch(It){Ct({type:"content",contentError:It,path:$})}},[Ut,p,I,F,$]),Yt=(0,i.useRef)({content:void 0,reload:()=>{}});return Yt.current={content:at.content,reload:Kt},(0,V.A)(async()=>{Ct({type:"sync",state:"CHECKING"});const It=setTimeout(()=>{Ct({type:"sync",state:"BUILDING"})},1e3);try{switch(await Ut.syncEntityDocs({kind:p,namespace:I,name:F},ye=>{Ct({type:"buildLog",log:ye})})){case"updated":Yt.current.content?Ct({type:"sync",state:"BUILD_READY"}):(Yt.current.reload(),Ct({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":Ct({type:"sync",state:"UP_TO_DATE"});break;default:Ct({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ce){Ct({type:"sync",state:"ERROR",syncError:ce})}finally{clearTimeout(It)}},[p,F,I,Ut,Ct,Yt]),{state:(0,i.useMemo)(()=>xe({activeSyncState:at.activeSyncState,contentLoading:at.contentLoading,content:at.content}),[at.activeSyncState,at.content,at.contentLoading]),contentReload:Kt,path:at.path,content:at.content,contentErrorMessage:(Q=at.contentError)===null||Q===void 0?void 0:Q.toString(),syncErrorMessage:(X=at.syncError)===null||X===void 0?void 0:X.toString(),buildLog:at.buildLog}}const cn=(0,i.createContext)({}),he=()=>(0,i.useContext)(cn),Ie=p=>{const{children:I}=p,{"*":F=""}=(0,Wt.g)(),{entityRef:$}=(0,m.V)(),{kind:Q,namespace:X,name:at}=$,Ct=ln(Q,X,at,F);return(0,o.jsx)(cn.Provider,{value:Ct,children:I instanceof Function?I(Ct):I})},Ve=p=>I=>(0,o.jsx)(Ie,{children:(0,o.jsx)(p,{...I})}),Qe=(0,O.A)(p=>({root:{marginBottom:p.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),De=()=>{let p=null;const I=Qe(),{state:F,contentReload:$,contentErrorMessage:Q,syncErrorMessage:X,buildLog:at}=he();return F==="INITIAL_BUILD"&&(p=(0,o.jsx)(Ht.A,{classes:{root:I.root},variant:"outlined",severity:"info",icon:(0,o.jsx)(pt.A,{size:"24px"}),action:(0,o.jsx)(ze,{buildLog:at}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),F==="CONTENT_STALE_REFRESHING"&&(p=(0,o.jsx)(Ht.A,{variant:"outlined",severity:"info",icon:(0,o.jsx)(pt.A,{size:"24px"}),action:(0,o.jsx)(ze,{buildLog:at}),classes:{root:I.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),F==="CONTENT_STALE_READY"&&(p=(0,o.jsx)(Ht.A,{variant:"outlined",severity:"success",action:(0,o.jsx)(At.A,{color:"inherit",onClick:()=>$(),children:"Refresh"}),classes:{root:I.root},children:"A newer version of this documentation is now available, please refresh to view."})),F==="CONTENT_STALE_ERROR"&&(p=(0,o.jsxs)(Ht.A,{variant:"outlined",severity:"error",action:(0,o.jsx)(ze,{buildLog:at}),classes:{root:I.root,message:I.message},children:["Building a newer version of this documentation failed."," ",X]})),F==="CONTENT_NOT_FOUND"&&(p=(0,o.jsxs)(o.Fragment,{children:[X&&(0,o.jsxs)(Ht.A,{variant:"outlined",severity:"error",action:(0,o.jsx)(ze,{buildLog:at}),classes:{root:I.root,message:I.message},children:["Building a newer version of this documentation failed."," ",X]}),(0,o.jsx)(He,{errorMessage:Q})]})),p};var $e=t(5893),L=t(54917),f=t(41158),j=t(71651),U=t.n(j);const dt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,et=/^https:\/\/fonts\.googleapis\.com/,Mt=/^https:\/\/fonts\.gstatic\.com/,qt=p=>p.nodeName==="LINK",re=p=>{const I=(p==null?void 0:p.getAttribute("href"))||"",F=I.match(dt),$=I.match(et),Q=I.match(Mt);return F||$||Q},ve=p=>(qt(p)&&!re(p)&&p.remove(),p),me=p=>p.nodeName==="IFRAME",$t=(p,I)=>{const F=p.getAttribute("src")||"";try{const{host:$}=new URL(F);return I.includes($)}catch{return!1}},zt=p=>I=>(me(I)&&!$t(I,p)&&I.remove(),I),Bt=()=>{const p=(0,_.gf)(q.U);return(0,i.useMemo)(()=>p.getOptionalConfig("techdocs.sanitizer"),[p])},Ce=()=>{const p=Bt();return(0,i.useCallback)(async I=>{const F=p==null?void 0:p.getOptionalStringArray("allowedIframeHosts");U().addHook("beforeSanitizeElements",ve);const $=["link"];return F&&($.push("iframe"),U().addHook("beforeSanitizeElements",zt(F))),U().sanitize(I.outerHTML,{ADD_TAGS:$,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[p])};var Me=t(34435),oe=t(268),Ge=({theme:p})=>`
9
9
  /*================== Variables ==================*/
10
10
  /*
@@ -492,6 +492,6 @@ ${wo.reduce((I,F)=>{var $;const Q=($=p.typography.htmlFontSize)!==null&&$!==void
492
492
  `;const Ro=[Ge,On,Le,tn,To,Gn],Qt=()=>(0,Me.Ut)(),en=()=>{const p=Qt(),I=(0,L.A)();return(0,i.useMemo)(()=>{const F={theme:I,sidebar:p};return Ro.reduce(($,Q)=>$+Q(F),"")},[I,p])},pn=()=>{const p=en();return(0,i.useCallback)(I=>(I.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${p}</style>`),I),[p])},_n=async(p,I)=>{let F;if(typeof p=="string")F=new DOMParser().parseFromString(p,"text/html").documentElement;else if(p instanceof Element)F=p;else throw new Error("dom is not a recognized type");for(const $ of I)F=await $(F);return F},Io=(p,I,F)=>{const $=p==="src"&&I.endsWith(".svg"),Q=!I.match(/^([a-z]*:)?\/\//i),X=I.startsWith(F);return $&&(Q||X)},Do=({techdocsStorageApi:p,entityId:I,path:F})=>async $=>{const Q=await p.getApiOrigin(),X=async(at,Ct)=>{for(const Ut of at)if(Ut.hasAttribute(Ct)){const Kt=Ut.getAttribute(Ct);if(!Kt)return;const Yt=await p.getBaseUrl(Kt,I,F);if(Io(Ct,Kt,Q))try{const It=await(await fetch(Yt,{credentials:"include"})).text();Ut.setAttribute(Ct,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(It)))}`)}catch{Ut.setAttribute("alt",`Error: ${Kt}`)}else Ut.setAttribute(Ct,Yt)}};return await Promise.all([X($.querySelectorAll("img"),"src"),X($.querySelectorAll("script"),"src"),X($.querySelectorAll("source"),"src"),X($.querySelectorAll("link"),"href"),X($.querySelectorAll("a[download]"),"href")]),$},Mo=()=>p=>(((F,$)=>{Array.from(F).filter(Q=>Q.hasAttribute($)).forEach(Q=>{const X=Q.getAttribute($);if(X){X.match(/^https?:\/\//i)&&Q.setAttribute("target","_blank");try{const at=Pn(window.location.href);Q.setAttribute($,new URL(X,at).toString())}catch{Q.replaceWith(Q.textContent||X)}}})})(Array.from(p.getElementsByTagName("a")),"href"),p);function Pn(p){const I=new URL(p);return!I.pathname.endsWith("/")&&!I.pathname.endsWith(".html")&&(I.pathname+="/"),I.toString()}var Lo=t(27326);let wn;wn=Promise.resolve().then(t.t.bind(t,25873,19));function Tn(p,I){wn.then(F=>{"createRoot"in F?F.createRoot(I).render(p):F.render(p,I)})}const Yn=()=>p=>{const I=p.querySelector('.md-header label[for="__drawer"]'),F=p.querySelector("article");if(!I||!F)return p;const $=I.cloneNode();return Tn(i.createElement(Lo.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"),F==null||F.prepend($),p},Bo=()=>p=>{var I;return(I=p.querySelector(".md-header"))===null||I===void 0||I.remove(),p},jo=()=>p=>{var I,F;return(I=p.querySelector(".md-footer .md-copyright"))===null||I===void 0||I.remove(),(F=p.querySelector(".md-footer-copyright"))===null||F===void 0||F.remove(),p};var Uo=t(36021),Fo=t(90292),$o=t(52536),No=t.n($o);const Wo=p=>I=>{var F;const $=I.querySelector('[title="Edit this page"]');if(!$||!$.href)return I;const Q=new URL($.href),X=p.byUrl(Q);if((X==null?void 0:X.type)!=="github"&&(X==null?void 0:X.type)!=="gitlab")return I;const at=((F=I.querySelector("article>h1"))===null||F===void 0?void 0:F.childNodes[0].textContent)||"",Ct=encodeURIComponent(`Documentation Feedback: ${at}`),Ut=encodeURIComponent(`Page source:
493
493
  ${$.href}
494
494
 
495
- Feedback:`),Kt=(X==null?void 0:X.type)==="github"?(0,Uo.F)(Q.href,"blob"):Q.href,Yt=No()(Kt),Vt=`/${Yt.organization}/${Yt.name}`,It=$.cloneNode();switch(X==null?void 0:X.type){case"gitlab":It.href=`${Q.origin}${Vt}/issues/new?issue[title]=${Ct}&issue[description]=${Ut}`;break;case"github":It.href=`${Q.origin}${Vt}/issues/new?title=${Ct}&body=${Ut}`;break;default:return I}return Tn(i.createElement(Fo.A),It),It.style.paddingLeft="5px",It.title="Leave feedback for this page",It.id="git-feedback-link",$==null||$.insertAdjacentElement("beforebegin",It),I},Qn=()=>p=>(setTimeout(()=>{const I=p==null?void 0:p.querySelectorAll("li.md-nav__item--active");I.length!==0&&(I.forEach($=>{const Q=$==null?void 0:$.querySelector("input");Q!=null&&Q.checked||Q==null||Q.click()}),I[I.length-1].scrollIntoView())},200),p);var ko=t(50868),Ko=t(10437),Zn=t(71677),Jn=t(87051),zo=t(36338);const Rn=(0,Jn.A)(p=>({tooltip:{fontSize:"inherit",color:p.palette.text.primary,margin:0,padding:p.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Zn.Ay),In=()=>(0,o.jsx)(Ko.A,{children:(0,o.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"})}),Ho=({text:p})=>{const[I,F]=(0,i.useState)(!1),[,$]=(0,zo.A)(),Q=(0,i.useCallback)(()=>{$(p),F(!0)},[p,$]),X=(0,i.useCallback)(()=>{F(!1)},[F]);return(0,o.jsx)(Rn,{title:"Copied to clipboard",placement:"left",open:I,onClose:X,leaveDelay:1e3,children:(0,o.jsx)(ht.A,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:Q,children:(0,o.jsx)(In,{})})})},Xn=p=>I=>{const F=I.querySelectorAll("pre > code");for(const Q of F){var $;const X=Q.textContent||"",at=document.createElement("div");Q==null||($=Q.parentElement)===null||$===void 0||$.prepend(at),Tn((0,o.jsx)(ko.A,{theme:p,children:(0,o.jsx)(Ho,{text:X})}),at)}return I},qn=({baseUrl:p,onClick:I})=>F=>(Array.from(F.getElementsByTagName("a")).forEach($=>{$.addEventListener("click",Q=>{const at=$.getAttribute("href");at&&at.startsWith(p)&&!$.hasAttribute("download")&&(Q.preventDefault(),I(Q,at))})}),F),to=({onLoading:p,onLoaded:I})=>F=>(p(),F.addEventListener(x,function $(){I(),F.removeEventListener(x,$)}),F);function Vo(p,I){const F=new URL(I),$=`${F.origin}${F.pathname.replace(/\/$/,"")}`,Q=p.replace($,"").replace(/^\/+/,""),X=new URL(`http://localhost/${Q}`);return`${X.pathname}${X.search}${X.hash}`}function Go(){const p=(0,Wt.Zp)(),F=(0,_.gf)(q.U).getOptionalString("app.baseUrl");return(0,i.useCallback)(Q=>{let X=Q;if(F)try{X=Vo(Q,F)}catch{}p(X)},[p,F])}const _o="screen and (max-width: 76.1875em)",Yo=p=>{const I=Go(),F=(0,L.A)(),$=(0,$e.A)(_o),Q=Ce(),X=pn(),at=(0,H.s)(),Ct=(0,_.gf)(Ye.s),Ut=(0,_.gf)(f.Y),{state:Kt,path:Yt,content:Vt}=he(),[It,ce]=(0,i.useState)(null),ye=u(It),Zt=(0,i.useCallback)(()=>{if(!It)return;It.querySelectorAll(".md-sidebar").forEach(_t=>{if($)_t.style.top="0px";else{var te;const je=(te=document)===null||te===void 0?void 0:te.querySelector(".techdocs-reader-page");var Ae;const se=(Ae=je==null?void 0:je.getBoundingClientRect().top)!==null&&Ae!==void 0?Ae:0;var Be;let Ln=(Be=It.getBoundingClientRect().top)!==null&&Be!==void 0?Be:0;const Bn=It.querySelector(".md-container > .md-tabs");var Ne;const jn=(Ne=Bn==null?void 0:Bn.getBoundingClientRect().height)!==null&&Ne!==void 0?Ne:0;Ln<se&&(Ln=se);const oo=Math.max(Ln,0)+jn;_t.style.top=`${oo}px`;const nn=It.querySelector(".md-container > .md-footer");var fe;const gn=(fe=nn==null?void 0:nn.getBoundingClientRect().top)!==null&&fe!==void 0?fe:window.innerHeight;_t.style.height=`${gn-oo}px`}_t.style.setProperty("opacity","1")})},[It,$]);(0,i.useEffect)(()=>(window.addEventListener("resize",Zt),window.addEventListener("scroll",Zt,!0),()=>{window.removeEventListener("resize",Zt),window.removeEventListener("scroll",Zt,!0)}),[It,Zt]);const Gt=(0,i.useCallback)(()=>{if(!It)return;const jt=It.querySelector(".md-footer");jt&&(jt.style.width=`${It.getBoundingClientRect().width}px`)},[It]);(0,i.useEffect)(()=>(window.addEventListener("resize",Gt),()=>{window.removeEventListener("resize",Gt)}),[It,Gt]),(0,i.useEffect)(()=>{ye||(Gt(),Zt())},[Kt,ye,Gt,Zt]);const ie=(0,i.useCallback)((jt,_t)=>_n(jt,[Q,Do({techdocsStorageApi:Ct,entityId:p,path:_t}),Mo(),Yn(),Bo(),jo(),Wo(Ut),X]),[p,Ut,Ct,Q,X]),Ee=(0,i.useCallback)(async jt=>_n(jt,[Qn(),Xn(F),qn({baseUrl:window.location.origin,onClick:(_t,te)=>{var Ae;const Be=_t.ctrlKey||_t.metaKey,Ne=new URL(te),fe=((Ae=_t.target)===null||Ae===void 0?void 0:Ae.innerText)||te,je=te.replace(window.location.origin,"");if(at.captureEvent("click",fe,{attributes:{to:je}}),Ne.hash)if(Be)window.open(te,"_blank");else{var se;I(te),jt==null||(se=jt.querySelector(`[id="${Ne.hash.slice(1)}"]`))===null||se===void 0||se.scrollIntoView()}else Be?window.open(te,"_blank"):I(te)}}),to({onLoading:()=>{},onLoaded:()=>{var _t;(_t=jt.querySelector(".md-nav__title"))===null||_t===void 0||_t.removeAttribute("for")}}),to({onLoading:()=>{Array.from(jt.querySelectorAll(".md-sidebar")).forEach(te=>{te.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[F,I,at]);return(0,i.useEffect)(()=>{if(!Vt)return()=>{};let jt=!0;return ie(Vt,Yt).then(async _t=>{if(!(_t!=null&&_t.innerHTML)||!jt)return;window.scroll({top:0});const te=await Ee(_t);ce(te)}),()=>{jt=!1}},[Vt,Yt,ie,Ee]),It};var Dn=t(41883),Qo=t(72020),Mn=t(99730);const eo=()=>{const p=(0,Qo.YR)(),{shadowRoot:I}=(0,m.V)(),F=I==null?void 0:I.querySelector('[data-md-component="content"]'),$=I==null?void 0:I.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Q=$==null?void 0:$.querySelector('[data-techdocs-addons-location="primary sidebar"]');Q||(Q=document.createElement("div"),Q.setAttribute("data-techdocs-addons-location","primary sidebar"),$==null||$.prepend(Q));const X=I==null?void 0:I.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let at=X==null?void 0:X.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return at||(at=document.createElement("div"),at.setAttribute("data-techdocs-addons-location","secondary sidebar"),X==null||X.prepend(at)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Dn.A,{container:Q,children:p.renderComponentsByLocation(Mn.e.PrimarySidebar)}),(0,o.jsx)(Dn.A,{container:F,children:p.renderComponentsByLocation(Mn.e.Content)}),(0,o.jsx)(Dn.A,{container:at,children:p.renderComponentsByLocation(Mn.e.SecondarySidebar)})]})},no=(0,O.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Rt=Ve(p=>{var I;const{withSearch:F=!0,onReady:$}=p,Q=no(),{entityMetadata:{value:X,loading:at},entityRef:Ct,setShadowRoot:Ut}=(0,m.V)(),Kt=Yo(Ct),Yt=window.location.pathname,Vt=window.location.hash,It=u(Kt),[ce]=w([`[id="${Vt.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!It)if(Vt)ce&&ce.scrollIntoView();else{var Zt,Gt;(Gt=document)===null||Gt===void 0||(Zt=Gt.querySelector("header"))===null||Zt===void 0||Zt.scrollIntoView()}},[Yt,Vt,ce,It]);const ye=(0,i.useCallback)(Zt=>{Ut(Zt),$ instanceof Function&&$()},[Ut,$]);return at===!1&&!X?(0,o.jsx)(R.M,{status:"404",statusMessage:"PAGE NOT FOUND"}):Kt?(0,o.jsx)(C.U,{children:(0,o.jsxs)(d.A,{container:!0,children:[(0,o.jsx)(d.A,{xs:12,item:!0,children:(0,o.jsx)(De,{})}),F&&(0,o.jsx)(d.A,{className:Q.search,xs:"auto",item:!0,children:(0,o.jsx)(le,{entityId:Ct,entityTitle:X==null||(I=X.metadata)===null||I===void 0?void 0:I.title})}),(0,o.jsx)(d.A,{xs:12,item:!0,children:(0,o.jsx)(b,{element:Kt,onAppend:ye,children:(0,o.jsx)(eo,{})})})]})}):(0,o.jsx)(C.U,{children:(0,o.jsx)(d.A,{container:!0,children:(0,o.jsx)(d.A,{xs:12,item:!0,children:(0,o.jsx)(De,{})})})})}),de=null},45061:function(Y,T,t){"use strict";t.d(T,{T:function(){return J}});var o=t(31085),i=t(14041),d=t(93285),O=t(42899),m=t(4387),v=t(13660),h=t(72020),c=t(86892),A=t(99730),x=t(67871),P=t(8859),u=t(34428),b=t(51372),g=t(58837),D=t(268),w=t(72501),y=t(72072);const B=(0,g.A)(q=>({root:{textAlign:"left"},label:{color:q.page.fontColor,fontWeight:q.typography.fontWeightBold,letterSpacing:0,fontSize:q.typography.fontSize,marginBottom:q.spacing(1)/2,lineHeight:1},value:{color:(0,D.X4)(q.page.fontColor,.8),fontSize:q.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),R=({value:q,className:mt,typographyRootComponent:it})=>(0,o.jsx)(w.A,{component:it!=null?it:typeof q=="string"?"p":"span",className:mt,children:q});function C(q){const{label:mt,value:it,url:Ot,contentTypograpyRootComponent:ct}=q,gt=B(),lt=(0,o.jsx)(R,{className:gt.value,value:it||"<Unknown>",typographyRootComponent:ct});return(0,o.jsx)(O.A,{item:!0,children:(0,o.jsxs)(w.A,{component:"span",className:gt.root,children:[(0,o.jsx)(w.A,{className:gt.label,children:mt}),Ot?(0,o.jsx)(y.N_,{to:Ot,children:lt}):lt]})})}var z=t(69814),V=t(72427),tt=t(65461),K=t(9222),W=t(45250),_=t(82779);const H=(0,o.jsx)(m.A,{animation:"wave",variant:"text",height:40}),J=q=>{const{children:mt}=q,it=(0,h.YR)(),Ot=(0,V.gf)(tt.U),{title:ct,setTitle:gt,subtitle:lt,setSubtitle:rt,entityRef:vt,metadata:{value:yt,loading:Pt},entityMetadata:{value:pt,loading:st}}=(0,c.V)();(0,i.useEffect)(()=>{yt&&(gt(yt.site_name),rt(()=>{let{site_description:Dt}=yt;return(!Dt||Dt==="None")&&(Dt=""),Dt}))},[yt,gt,rt]);const ft=Ot.getOptional("app.title")||"Backstage",ht=[ct,lt,ft].filter(Boolean).join(" | "),{locationMetadata:wt,spec:At}=pt||{},N=At==null?void 0:At.lifecycle,G=pt?(0,x.t)(pt,b.vv):[],Et=(0,K.S)(_.rQ)(),bt=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(C,{label:(0,W.capitalize)((pt==null?void 0:pt.kind)||"entity"),value:(0,o.jsx)(P.z,{color:"inherit",entityRef:vt,title:pt==null?void 0:pt.metadata.title,defaultKind:"Component"})}),G.length>0&&(0,o.jsx)(C,{label:"Owner",value:(0,o.jsx)(u.i,{color:"inherit",entityRefs:G,defaultKind:"group"})}),N?(0,o.jsx)(C,{label:"Lifecycle",value:String(N)}):null,wt&&wt.type!=="dir"&&wt.type!=="file"?(0,o.jsx)(C,{label:"",value:(0,o.jsxs)(O.A,{container:!0,direction:"column",alignItems:"center",children:[(0,o.jsx)(O.A,{style:{padding:0},item:!0,children:(0,o.jsx)(v.A,{style:{marginTop:"-25px"}})}),(0,o.jsx)(O.A,{style:{padding:0},item:!0,children:"Source"})]}),url:wt.target}):null]});return!st&&pt===void 0||!Pt&&yt===void 0?null:(0,o.jsxs)(z.Y,{type:"Documentation",typeLink:Et,title:ct||H,subtitle:lt===""?void 0:lt||H,children:[(0,o.jsx)(d.A,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:ht})}),bt,mt,it.renderComponentsByLocation(A.e.Header)]})}},82779:function(Y,T,t){"use strict";t.d(T,{Oc:function(){return d},Ri:function(){return O},rQ:function(){return i}});var o=t(34569);const i=(0,o.H)({id:"techdocs:index-page"}),d=(0,o.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),O=(0,o.H)({id:"techdocs:catalog-reader-view"})},27698:function(Y,T,t){"use strict";t.r(T),t.d(T,{TechDocsSearchResultListItem:function(){return x}});var o=t(31085),i=t(14041),d=t(46423),O=t(5951),m=t(58837),v=t(72501),h=t(72072),c=t(70734);const A=(0,m.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),x=P=>{const{result:u,highlight:b,lineClamp:g=5,asListItem:D=!0,asLink:w=!0,title:y,icon:B}=P,R=A(),C=({children:tt})=>w?(0,o.jsx)(h.N_,{noTrack:!0,to:u.location,children:tt}):(0,o.jsx)(o.Fragment,{children:tt}),z=()=>{const tt=b!=null&&b.fields.title?(0,o.jsx)(c.e,{text:b.fields.title,preTag:b.preTag,postTag:b.postTag}):u.title,K=b!=null&&b.fields.entityTitle?(0,o.jsx)(c.e,{text:b.fields.entityTitle,preTag:b.preTag,postTag:b.postTag}):u.entityTitle,W=b!=null&&b.fields.name?(0,o.jsx)(c.e,{text:b.fields.name,preTag:b.preTag,postTag:b.postTag}):u.name;return u?(0,o.jsx)(O.A,{className:R.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(C,{children:y||(0,o.jsxs)(o.Fragment,{children:[tt," | ",K!=null?K:W," docs"]})}),secondary:(0,o.jsx)(v.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:g,overflow:"hidden"},color:"textSecondary",variant:"body2",children:b!=null&&b.fields.text?(0,o.jsx)(c.e,{text:b.fields.text,preTag:b.preTag,postTag:b.postTag}):u.text})}):null},V=({children:tt})=>D?(0,o.jsxs)(o.Fragment,{children:[B&&(0,o.jsx)(d.A,{children:typeof B=="function"?B(u):B}),(0,o.jsx)("div",{className:R.flexContainer,children:tt})]}):(0,o.jsx)(o.Fragment,{children:tt});return(0,o.jsx)(V,{children:(0,o.jsx)(z,{})})}},86973:function(){}},function(Y){var T=function(o){return Y(Y.s=o)};Y.O(0,[1751,235,1888,6587,2754,9669,1975,5042,7400,4121],function(){return T(85318)});var t=Y.O()}]);})();
495
+ Feedback:`),Kt=(X==null?void 0:X.type)==="github"?(0,Uo.F)(Q.href,"blob"):Q.href,Yt=No()(Kt),Vt=`/${Yt.organization}/${Yt.name}`,It=$.cloneNode();switch(X==null?void 0:X.type){case"gitlab":It.href=`${Q.origin}${Vt}/issues/new?issue[title]=${Ct}&issue[description]=${Ut}`;break;case"github":It.href=`${Q.origin}${Vt}/issues/new?title=${Ct}&body=${Ut}`;break;default:return I}return Tn(i.createElement(Fo.A),It),It.style.paddingLeft="5px",It.title="Leave feedback for this page",It.id="git-feedback-link",$==null||$.insertAdjacentElement("beforebegin",It),I},Qn=()=>p=>(setTimeout(()=>{const I=p==null?void 0:p.querySelectorAll("li.md-nav__item--active");I.length!==0&&(I.forEach($=>{const Q=$==null?void 0:$.querySelector("input");Q!=null&&Q.checked||Q==null||Q.click()}),I[I.length-1].scrollIntoView())},200),p);var ko=t(50868),Ko=t(10437),Zn=t(71677),Jn=t(87051),zo=t(36338);const Rn=(0,Jn.A)(p=>({tooltip:{fontSize:"inherit",color:p.palette.text.primary,margin:0,padding:p.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Zn.Ay),In=()=>(0,o.jsx)(Ko.A,{children:(0,o.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"})}),Ho=({text:p})=>{const[I,F]=(0,i.useState)(!1),[,$]=(0,zo.A)(),Q=(0,i.useCallback)(()=>{$(p),F(!0)},[p,$]),X=(0,i.useCallback)(()=>{F(!1)},[F]);return(0,o.jsx)(Rn,{title:"Copied to clipboard",placement:"left",open:I,onClose:X,leaveDelay:1e3,children:(0,o.jsx)(ht.A,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:Q,children:(0,o.jsx)(In,{})})})},Xn=p=>I=>{const F=I.querySelectorAll("pre > code");for(const Q of F){var $;const X=Q.textContent||"",at=document.createElement("div");Q==null||($=Q.parentElement)===null||$===void 0||$.prepend(at),Tn((0,o.jsx)(ko.A,{theme:p,children:(0,o.jsx)(Ho,{text:X})}),at)}return I},qn=({baseUrl:p,onClick:I})=>F=>(Array.from(F.getElementsByTagName("a")).forEach($=>{$.addEventListener("click",Q=>{const at=$.getAttribute("href");at&&at.startsWith(p)&&!$.hasAttribute("download")&&(Q.preventDefault(),I(Q,at))})}),F),to=({onLoading:p,onLoaded:I})=>F=>(p(),F.addEventListener(A,function $(){I(),F.removeEventListener(A,$)}),F);function Vo(p,I){const F=new URL(I),$=`${F.origin}${F.pathname.replace(/\/$/,"")}`,Q=p.replace($,"").replace(/^\/+/,""),X=new URL(`http://localhost/${Q}`);return`${X.pathname}${X.search}${X.hash}`}function Go(){const p=(0,Wt.Zp)(),F=(0,_.gf)(q.U).getOptionalString("app.baseUrl");return(0,i.useCallback)(Q=>{let X=Q;if(F)try{X=Vo(Q,F)}catch{}p(X)},[p,F])}const _o="screen and (max-width: 76.1875em)",Yo=p=>{const I=Go(),F=(0,L.A)(),$=(0,$e.A)(_o),Q=Ce(),X=pn(),at=(0,H.s)(),Ct=(0,_.gf)(Ye.s),Ut=(0,_.gf)(f.Y),{state:Kt,path:Yt,content:Vt}=he(),[It,ce]=(0,i.useState)(null),ye=u(It),Zt=(0,i.useCallback)(()=>{if(!It)return;It.querySelectorAll(".md-sidebar").forEach(_t=>{if($)_t.style.top="0px";else{var te;const je=(te=document)===null||te===void 0?void 0:te.querySelector(".techdocs-reader-page");var Ae;const se=(Ae=je==null?void 0:je.getBoundingClientRect().top)!==null&&Ae!==void 0?Ae:0;var Be;let Ln=(Be=It.getBoundingClientRect().top)!==null&&Be!==void 0?Be:0;const Bn=It.querySelector(".md-container > .md-tabs");var Ne;const jn=(Ne=Bn==null?void 0:Bn.getBoundingClientRect().height)!==null&&Ne!==void 0?Ne:0;Ln<se&&(Ln=se);const oo=Math.max(Ln,0)+jn;_t.style.top=`${oo}px`;const nn=It.querySelector(".md-container > .md-footer");var fe;const gn=(fe=nn==null?void 0:nn.getBoundingClientRect().top)!==null&&fe!==void 0?fe:window.innerHeight;_t.style.height=`${gn-oo}px`}_t.style.setProperty("opacity","1")})},[It,$]);(0,i.useEffect)(()=>(window.addEventListener("resize",Zt),window.addEventListener("scroll",Zt,!0),()=>{window.removeEventListener("resize",Zt),window.removeEventListener("scroll",Zt,!0)}),[It,Zt]);const Gt=(0,i.useCallback)(()=>{if(!It)return;const jt=It.querySelector(".md-footer");jt&&(jt.style.width=`${It.getBoundingClientRect().width}px`)},[It]);(0,i.useEffect)(()=>(window.addEventListener("resize",Gt),()=>{window.removeEventListener("resize",Gt)}),[It,Gt]),(0,i.useEffect)(()=>{ye||(Gt(),Zt())},[Kt,ye,Gt,Zt]);const ie=(0,i.useCallback)((jt,_t)=>_n(jt,[Q,Do({techdocsStorageApi:Ct,entityId:p,path:_t}),Mo(),Yn(),Bo(),jo(),Wo(Ut),X]),[p,Ut,Ct,Q,X]),Ee=(0,i.useCallback)(async jt=>_n(jt,[Qn(),Xn(F),qn({baseUrl:window.location.origin,onClick:(_t,te)=>{var Ae;const Be=_t.ctrlKey||_t.metaKey,Ne=new URL(te),fe=((Ae=_t.target)===null||Ae===void 0?void 0:Ae.innerText)||te,je=te.replace(window.location.origin,"");if(at.captureEvent("click",fe,{attributes:{to:je}}),Ne.hash)if(Be)window.open(te,"_blank");else{var se;I(te),jt==null||(se=jt.querySelector(`[id="${Ne.hash.slice(1)}"]`))===null||se===void 0||se.scrollIntoView()}else Be?window.open(te,"_blank"):I(te)}}),to({onLoading:()=>{},onLoaded:()=>{var _t;(_t=jt.querySelector(".md-nav__title"))===null||_t===void 0||_t.removeAttribute("for")}}),to({onLoading:()=>{Array.from(jt.querySelectorAll(".md-sidebar")).forEach(te=>{te.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[F,I,at]);return(0,i.useEffect)(()=>{if(!Vt)return()=>{};let jt=!0;return ie(Vt,Yt).then(async _t=>{if(!(_t!=null&&_t.innerHTML)||!jt)return;window.scroll({top:0});const te=await Ee(_t);ce(te)}),()=>{jt=!1}},[Vt,Yt,ie,Ee]),It};var Dn=t(41883),Qo=t(72020),Mn=t(99730);const eo=()=>{const p=(0,Qo.YR)(),{shadowRoot:I}=(0,m.V)(),F=I==null?void 0:I.querySelector('[data-md-component="content"]'),$=I==null?void 0:I.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Q=$==null?void 0:$.querySelector('[data-techdocs-addons-location="primary sidebar"]');Q||(Q=document.createElement("div"),Q.setAttribute("data-techdocs-addons-location","primary sidebar"),$==null||$.prepend(Q));const X=I==null?void 0:I.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let at=X==null?void 0:X.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return at||(at=document.createElement("div"),at.setAttribute("data-techdocs-addons-location","secondary sidebar"),X==null||X.prepend(at)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Dn.A,{container:Q,children:p.renderComponentsByLocation(Mn.e.PrimarySidebar)}),(0,o.jsx)(Dn.A,{container:F,children:p.renderComponentsByLocation(Mn.e.Content)}),(0,o.jsx)(Dn.A,{container:at,children:p.renderComponentsByLocation(Mn.e.SecondarySidebar)})]})},no=(0,O.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Rt=Ve(p=>{var I;const{withSearch:F=!0,onReady:$}=p,Q=no(),{entityMetadata:{value:X,loading:at},entityRef:Ct,setShadowRoot:Ut}=(0,m.V)(),Kt=Yo(Ct),Yt=window.location.pathname,Vt=window.location.hash,It=u(Kt),[ce]=w([`[id="${Vt.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!It)if(Vt)ce&&ce.scrollIntoView();else{var Zt,Gt;(Gt=document)===null||Gt===void 0||(Zt=Gt.querySelector("header"))===null||Zt===void 0||Zt.scrollIntoView()}},[Yt,Vt,ce,It]);const ye=(0,i.useCallback)(Zt=>{Ut(Zt),$ instanceof Function&&$()},[Ut,$]);return at===!1&&!X?(0,o.jsx)(R.M,{status:"404",statusMessage:"PAGE NOT FOUND"}):Kt?(0,o.jsx)(x.U,{children:(0,o.jsxs)(d.A,{container:!0,children:[(0,o.jsx)(d.A,{xs:12,item:!0,children:(0,o.jsx)(De,{})}),F&&(0,o.jsx)(d.A,{className:Q.search,xs:"auto",item:!0,children:(0,o.jsx)(le,{entityId:Ct,entityTitle:X==null||(I=X.metadata)===null||I===void 0?void 0:I.title})}),(0,o.jsx)(d.A,{xs:12,item:!0,children:(0,o.jsx)(b,{element:Kt,onAppend:ye,children:(0,o.jsx)(eo,{})})})]})}):(0,o.jsx)(x.U,{children:(0,o.jsx)(d.A,{container:!0,children:(0,o.jsx)(d.A,{xs:12,item:!0,children:(0,o.jsx)(De,{})})})})}),de=null},45061:function(Y,T,t){"use strict";t.d(T,{T:function(){return J}});var o=t(31085),i=t(14041),d=t(93285),O=t(42899),m=t(4387),g=t(13660),h=t(72020),c=t(86892),C=t(99730),A=t(67871),P=t(8859),u=t(34428),b=t(51372),v=t(58837),D=t(268),w=t(72501),y=t(72072);const B=(0,v.A)(q=>({root:{textAlign:"left"},label:{color:q.page.fontColor,fontWeight:q.typography.fontWeightBold,letterSpacing:0,fontSize:q.typography.fontSize,marginBottom:q.spacing(1)/2,lineHeight:1},value:{color:(0,D.X4)(q.page.fontColor,.8),fontSize:q.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),R=({value:q,className:mt,typographyRootComponent:it})=>(0,o.jsx)(w.A,{component:it!=null?it:typeof q=="string"?"p":"span",className:mt,children:q});function x(q){const{label:mt,value:it,url:bt,contentTypograpyRootComponent:ct}=q,gt=B(),lt=(0,o.jsx)(R,{className:gt.value,value:it||"<Unknown>",typographyRootComponent:ct});return(0,o.jsx)(O.A,{item:!0,children:(0,o.jsxs)(w.A,{component:"span",className:gt.root,children:[(0,o.jsx)(w.A,{className:gt.label,children:mt}),bt?(0,o.jsx)(y.N_,{to:bt,children:lt}):lt]})})}var z=t(69814),V=t(72427),tt=t(65461),K=t(9222),W=t(45250),_=t(82779);const H=(0,o.jsx)(m.A,{animation:"wave",variant:"text",height:40}),J=q=>{const{children:mt}=q,it=(0,h.YR)(),bt=(0,V.gf)(tt.U),{title:ct,setTitle:gt,subtitle:lt,setSubtitle:rt,entityRef:vt,metadata:{value:yt,loading:Pt},entityMetadata:{value:pt,loading:st}}=(0,c.V)();(0,i.useEffect)(()=>{yt&&(gt(yt.site_name),rt(()=>{let{site_description:Dt}=yt;return(!Dt||Dt==="None")&&(Dt=""),Dt}))},[yt,gt,rt]);const ht=bt.getOptional("app.title")||"Backstage",ft=[ct,lt,ht].filter(Boolean).join(" | "),{locationMetadata:wt,spec:At}=pt||{},N=At==null?void 0:At.lifecycle,G=pt?(0,A.t)(pt,b.vv):[],Et=(0,K.S)(_.rQ)(),Ot=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{label:(0,W.capitalize)((pt==null?void 0:pt.kind)||"entity"),value:(0,o.jsx)(P.z,{color:"inherit",entityRef:vt,title:pt==null?void 0:pt.metadata.title,defaultKind:"Component"})}),G.length>0&&(0,o.jsx)(x,{label:"Owner",value:(0,o.jsx)(u.i,{color:"inherit",entityRefs:G,defaultKind:"group"})}),N?(0,o.jsx)(x,{label:"Lifecycle",value:String(N)}):null,wt&&wt.type!=="dir"&&wt.type!=="file"?(0,o.jsx)(x,{label:"",value:(0,o.jsxs)(O.A,{container:!0,direction:"column",alignItems:"center",children:[(0,o.jsx)(O.A,{style:{padding:0},item:!0,children:(0,o.jsx)(g.A,{style:{marginTop:"-25px"}})}),(0,o.jsx)(O.A,{style:{padding:0},item:!0,children:"Source"})]}),url:wt.target}):null]});return!st&&pt===void 0||!Pt&&yt===void 0?null:(0,o.jsxs)(z.Y,{type:"Documentation",typeLink:Et,title:ct||H,subtitle:lt===""?void 0:lt||H,children:[(0,o.jsx)(d.A,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:ft})}),Ot,mt,it.renderComponentsByLocation(C.e.Header)]})}},82779:function(Y,T,t){"use strict";t.d(T,{Oc:function(){return d},Ri:function(){return O},rQ:function(){return i}});var o=t(34569);const i=(0,o.H)({id:"techdocs:index-page"}),d=(0,o.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),O=(0,o.H)({id:"techdocs:catalog-reader-view"})},27698:function(Y,T,t){"use strict";t.r(T),t.d(T,{TechDocsSearchResultListItem:function(){return A}});var o=t(31085),i=t(14041),d=t(46423),O=t(5951),m=t(58837),g=t(72501),h=t(72072),c=t(70734);const C=(0,m.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),A=P=>{const{result:u,highlight:b,lineClamp:v=5,asListItem:D=!0,asLink:w=!0,title:y,icon:B}=P,R=C(),x=({children:tt})=>w?(0,o.jsx)(h.N_,{noTrack:!0,to:u.location,children:tt}):(0,o.jsx)(o.Fragment,{children:tt}),z=()=>{const tt=b!=null&&b.fields.title?(0,o.jsx)(c.e,{text:b.fields.title,preTag:b.preTag,postTag:b.postTag}):u.title,K=b!=null&&b.fields.entityTitle?(0,o.jsx)(c.e,{text:b.fields.entityTitle,preTag:b.preTag,postTag:b.postTag}):u.entityTitle,W=b!=null&&b.fields.name?(0,o.jsx)(c.e,{text:b.fields.name,preTag:b.preTag,postTag:b.postTag}):u.name;return u?(0,o.jsx)(O.A,{className:R.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(x,{children:y||(0,o.jsxs)(o.Fragment,{children:[tt," | ",K!=null?K:W," docs"]})}),secondary:(0,o.jsx)(g.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:v,overflow:"hidden"},color:"textSecondary",variant:"body2",children:b!=null&&b.fields.text?(0,o.jsx)(c.e,{text:b.fields.text,preTag:b.preTag,postTag:b.postTag}):u.text})}):null},V=({children:tt})=>D?(0,o.jsxs)(o.Fragment,{children:[B&&(0,o.jsx)(d.A,{children:typeof B=="function"?B(u):B}),(0,o.jsx)("div",{className:R.flexContainer,children:tt})]}):(0,o.jsx)(o.Fragment,{children:tt});return(0,o.jsx)(V,{children:(0,o.jsx)(z,{})})}},86973:function(){}},function(Y){var T=function(o){return Y(Y.s=o)};Y.O(0,[1751,235,1888,1678,6587,2754,9669,1975,5042,7400,4121],function(){return T(85318)});var t=Y.O()}]);})();
496
496
 
497
- //# sourceMappingURL=main.7025f0d6.js.map
497
+ //# sourceMappingURL=main.e02a8f27.js.map