@techdocs/cli 1.8.15-next.0 → 1.8.16-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/embedded-app/.config-schema.json +21 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/124.e854231e.chunk.js +6 -0
- package/dist/embedded-app/static/124.e854231e.chunk.js.map +1 -0
- package/dist/embedded-app/static/1297.2efe7acb.chunk.js +4 -0
- package/dist/embedded-app/static/1297.2efe7acb.chunk.js.map +1 -0
- package/dist/embedded-app/static/2401.77321e4a.chunk.js +6 -0
- package/dist/embedded-app/static/2401.77321e4a.chunk.js.map +1 -0
- package/dist/embedded-app/static/2420.69549f33.chunk.js +6 -0
- package/dist/embedded-app/static/2420.69549f33.chunk.js.map +1 -0
- package/dist/embedded-app/static/287.58b6ebdb.chunk.js +6 -0
- package/dist/embedded-app/static/287.58b6ebdb.chunk.js.map +1 -0
- package/dist/embedded-app/static/3182.e2dedf44.chunk.js +7 -0
- package/dist/embedded-app/static/3182.e2dedf44.chunk.js.map +1 -0
- package/dist/embedded-app/static/3632.3fdefc70.chunk.js +6 -0
- package/dist/embedded-app/static/3632.3fdefc70.chunk.js.map +1 -0
- package/dist/embedded-app/static/5724.c4e87fa2.chunk.js +4 -0
- package/dist/embedded-app/static/5724.c4e87fa2.chunk.js.map +1 -0
- package/dist/embedded-app/static/6271.fcd6a3b1.chunk.js +6 -0
- package/dist/embedded-app/static/6271.fcd6a3b1.chunk.js.map +1 -0
- package/dist/embedded-app/static/8307.9e8dea63.chunk.js +9 -0
- package/dist/embedded-app/static/8307.9e8dea63.chunk.js.map +1 -0
- package/dist/embedded-app/static/8384.b3ef405d.chunk.js +6 -0
- package/dist/embedded-app/static/8384.b3ef405d.chunk.js.map +1 -0
- package/dist/embedded-app/static/898.370a54b9.chunk.js +4 -0
- package/dist/embedded-app/static/898.370a54b9.chunk.js.map +1 -0
- package/dist/embedded-app/static/9652.6e5e7a08.chunk.js +6 -0
- package/dist/embedded-app/static/9652.6e5e7a08.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.3736273c.js +509 -0
- package/dist/embedded-app/static/main.3736273c.js.map +1 -0
- package/dist/embedded-app/static/module-mui.6a6952b4.js +3 -0
- package/dist/embedded-app/static/module-mui.6a6952b4.js.map +1 -0
- package/dist/embedded-app/static/{runtime.fc9ef40b.js → runtime.3736273c.js} +2 -2
- package/dist/embedded-app/static/{runtime.fc9ef40b.js.map → runtime.3736273c.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.fc9ef40b.js → vendor.3736273c.js} +52 -52
- package/dist/embedded-app/static/{vendor.fc9ef40b.js.map → vendor.3736273c.js.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/package.json +4 -4
- package/dist/embedded-app/static/124.03919ca7.chunk.js +0 -5
- package/dist/embedded-app/static/124.03919ca7.chunk.js.map +0 -1
- package/dist/embedded-app/static/1297.cdfd490e.chunk.js +0 -3
- package/dist/embedded-app/static/1297.cdfd490e.chunk.js.map +0 -1
- package/dist/embedded-app/static/2401.247c971d.chunk.js +0 -5
- package/dist/embedded-app/static/2401.247c971d.chunk.js.map +0 -1
- package/dist/embedded-app/static/2420.23fe1ec9.chunk.js +0 -5
- package/dist/embedded-app/static/2420.23fe1ec9.chunk.js.map +0 -1
- package/dist/embedded-app/static/287.2041cfdc.chunk.js +0 -5
- package/dist/embedded-app/static/287.2041cfdc.chunk.js.map +0 -1
- package/dist/embedded-app/static/3182.09c2f360.chunk.js +0 -6
- package/dist/embedded-app/static/3182.09c2f360.chunk.js.map +0 -1
- package/dist/embedded-app/static/3632.1842e03a.chunk.js +0 -5
- package/dist/embedded-app/static/3632.1842e03a.chunk.js.map +0 -1
- package/dist/embedded-app/static/5724.e0714125.chunk.js +0 -3
- package/dist/embedded-app/static/5724.e0714125.chunk.js.map +0 -1
- package/dist/embedded-app/static/5974.d8cc325c.chunk.js +0 -3
- package/dist/embedded-app/static/5974.d8cc325c.chunk.js.map +0 -1
- package/dist/embedded-app/static/6271.a8dfee3d.chunk.js +0 -5
- package/dist/embedded-app/static/6271.a8dfee3d.chunk.js.map +0 -1
- package/dist/embedded-app/static/8307.3553740d.chunk.js +0 -8
- package/dist/embedded-app/static/8307.3553740d.chunk.js.map +0 -1
- package/dist/embedded-app/static/8384.72221db2.chunk.js +0 -5
- package/dist/embedded-app/static/8384.72221db2.chunk.js.map +0 -1
- package/dist/embedded-app/static/9652.1adb76ec.chunk.js +0 -5
- package/dist/embedded-app/static/9652.1adb76ec.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.fc9ef40b.js +0 -508
- package/dist/embedded-app/static/main.fc9ef40b.js.map +0 -1
- package/dist/embedded-app/static/module-mui.bb6867cb.js +0 -3
- package/dist/embedded-app/static/module-mui.bb6867cb.js.map +0 -1
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8792],{86519:(J,T,t)=>{"use strict";t.d(T,{c:()=>o});const o=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111")},72348:(J,T,t)=>{"use strict";t.d(T,{P:()=>d,_P:()=>i,oQ:()=>o});const o="default",i="backstage.io/view-url",d="backstage.io/edit-url",O="kubernetes.io/api-server",v="kubernetes.io/api-server-certificate-authority",f="kubernetes.io/auth-provider"},6820:(J,T,t)=>{"use strict";t.d(T,{KU:()=>O,U2:()=>v,sM:()=>d});var o=t(72348);function i(f){let g=f.indexOf(":");const c=f.indexOf("/");c!==-1&&c<g&&(g=-1);const C=g===-1?void 0:f.slice(0,g),y=c===-1?void 0:f.slice(g+1,c),w=f.slice(Math.max(g+1,c+1));if(C===""||y===""||w==="")throw new TypeError(`Entity reference "${f}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:C,namespace:y,name:w}}function d(f){return{kind:f.kind,namespace:f.metadata.namespace||o.oQ,name:f.metadata.name}}function O(f,g){if(!f)throw new Error("Entity reference must not be empty");const c=g==null?void 0:g.defaultKind,C=(g==null?void 0:g.defaultNamespace)||o.oQ;let y,w,h;if(typeof f=="string"){const E=i(f);var S;y=(S=E.kind)!==null&&S!==void 0?S:c;var m;w=(m=E.namespace)!==null&&m!==void 0?m:C,h=E.name}else{var j;y=(j=f.kind)!==null&&j!==void 0?j:c;var P;w=(P=f.namespace)!==null&&P!==void 0?P:C,h=f.name}if(y)if(w){if(!h){const E=JSON.stringify(f);throw new Error(`Entity reference ${E} had missing or empty name`)}}else{const E=JSON.stringify(f);throw new Error(`Entity reference ${E} had missing or empty namespace`)}else{const E=JSON.stringify(f);throw new Error(`Entity reference ${E} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:y,namespace:w,name:h}}function v(f){let g,c,C;if("metadata"in f){g=f.kind;var y;c=(y=f.metadata.namespace)!==null&&y!==void 0?y:o.oQ,C=f.metadata.name}else{g=f.kind;var w;c=(w=f.namespace)!==null&&w!==void 0?w:o.oQ,C=f.name}return`${g.toLocaleLowerCase("en-US")}:${c.toLocaleLowerCase("en-US")}/${C.toLocaleLowerCase("en-US")}`}},51372:(J,T,t)=>{"use strict";t.d(T,{fT:()=>c,jn:()=>S,nC:()=>g,sA:()=>m,vv:()=>o});const o="ownedBy",i="ownerOf",d="consumesApi",O="apiConsumedBy",v="providesApi",f="apiProvidedBy",g="dependsOn",c="dependencyOf",C="parentOf",y="childOf",w="memberOf",h="hasMember",S="partOf",m="hasPart"},17736:(J,T,t)=>{"use strict";t.d(T,{Eo:()=>o,I4:()=>d});const o="backstage.io/managed-by-location",i="backstage.io/managed-by-origin-location",d="backstage.io/source-location"},78692:(J,T,t)=>{"use strict";t.d(T,{Cr:()=>f,KL:()=>v,aY:()=>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(g){if(typeof g!="string")throw new TypeError(`Unable to parse location ref '${g}', unexpected argument ${typeof g}`);const c=g.indexOf(":");if(c<0)throw new TypeError(`Unable to parse location ref '${g}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const C=g.substring(0,c).trim(),y=g.substring(c+1).trim();if(!C||!y)throw new TypeError(`Unable to parse location ref '${g}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(C==="http"||C==="https")throw new TypeError(`Invalid location ref '${g}', please prefix it with 'url:', e.g. 'url:${g}'`);if(d.test(y))throw new TypeError(`Invalid location ref '${g}', target is a javascript: URL`);return{type:C,target:y}}function v(g){const{type:c,target:C}=g;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 f(g){var c,C,y,w,h;const S=(h=(C=g.metadata)===null||C===void 0||(c=C.annotations)===null||c===void 0?void 0:c[i.I4])!==null&&h!==void 0?h:(w=g.metadata)===null||w===void 0||(y=w.annotations)===null||y===void 0?void 0:y[i.Eo];if(!S)throw new Error(`Entity '${(0,o.U2)(g)}' is missing location`);return O(S)}},77310:(J,T,t)=>{"use strict";t.d(T,{z:()=>C});var o=t(31085),i=t(10394),d=t(54917),O=t(14041),v=t(69578),f=t(40697),g=t(25577),c=t(37916);function C(y){const{text:w,language:h,showLineNumbers:S=!1,highlightedNumbers:m,customStyle:j,showCopyCodeButton:P=!1}=y,E=(0,d.A)(),U=E.palette.type==="dark"?f.A:g.A,L=E.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,o.jsxs)(i.A,{position:"relative",children:[(0,o.jsx)(v.A,{customStyle:j,language:h,style:U,showLineNumbers:S,wrapLines:!0,lineNumberStyle:{color:E.palette.textVerySubtle},lineProps:x=>m!=null&&m.includes(x)?{style:{backgroundColor:L}}:{},children:w}),P&&(0,o.jsx)(i.A,{position:"absolute",top:0,right:0,children:(0,o.jsx)(c.l,{text:w})})]})}},37916:(J,T,t)=>{"use strict";t.d(T,{l:()=>w});var o=t(31085),i=t(72427),d=t(39837),O=t(29365),v=t(71677),f=t(99594),g=t(14041),c=t(36338),C=t(10315),y=t(87849);function w(h){const{t:S}=(0,y.i)(C.O),{text:m,tooltipDelay:j=1e3,tooltipText:P=S("copyTextButton.tooltipText"),"aria-label":E="Copy text"}=h,U=(0,i.gf)(d.m),[L,x]=(0,g.useState)(!1),[{error:z},_]=(0,c.A)();(0,g.useEffect)(()=>{z&&U.post(z)},[z,U]);const Y=N=>{N.stopPropagation(),x(!0),_(m)};return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(v.Ay,{id:"copy-test-tooltip",title:P,placement:"top",leaveDelay:j,onClose:()=>x(!1),open:L,children:(0,o.jsx)(O.A,{onClick:Y,"aria-label":E,children:(0,o.jsx)(f.A,{})})})})}},44186:(J,T,t)=>{"use strict";t.d(T,{p:()=>S});var o=t(31085),i=t(42899),d=t(58837),O=t(72501),v=t(14041);const f=t.p+"static/missingAnnotation.67f79e98..svg",g=t.p+"static/noInformation.4b426325..svg",c=t.p+"static/createComponent.975d1e1e..svg",C=t.p+"static/noBuild.1715fa71..svg",y=(0,d.A)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),w=({missing:m})=>{const j=y();switch(m){case"field":return(0,o.jsx)("img",{src:f,className:j.generalImg,alt:"annotation is missing"});case"info":return(0,o.jsx)("img",{src:g,alt:"no Information",className:j.generalImg});case"content":return(0,o.jsx)("img",{src:c,alt:"create Component",className:j.generalImg});case"data":return(0,o.jsx)("img",{src:C,alt:"no Build",className:j.generalImg});default:return null}},h=(0,d.A)(m=>({root:{backgroundColor:m.palette.background.default,padding:m.spacing(2,0,0,0)},action:{marginTop:m.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function S(m){const{title:j,description:P,missing:E,action:U}=m,L=h();return(0,o.jsxs)(i.A,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:L.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:j})}),(0,o.jsx)(i.A,{item:!0,xs:!0,children:(0,o.jsx)(O.A,{variant:"body1",children:P})}),(0,o.jsx)(i.A,{item:!0,xs:!0,className:L.action,children:U})]})}),(0,o.jsx)(i.A,{item:!0,xs:12,md:6,className:L.imageContainer,children:typeof E=="string"?(0,o.jsx)(w,{missing:E}):E.customImage})]})}},22020:(J,T,t)=>{"use strict";t.d(T,{b:()=>w});var o=t(31085),i=t(58837),d=t(58007),O=t(8109),v=t(5951),f=t(14041),g=t(37916),c=t(88640);const C=(0,i.A)(h=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:h.spacing(2)},divider:{margin:h.spacing(2)}}),{name:"BackstageErrorPanel"}),y=({error:h,message:S,stack:m,children:j})=>{const P=C();return(0,o.jsxs)(d.A,{dense:!0,children:[(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(v.A,{classes:{secondary:P.text},primary:"Error",secondary:h}),(0,o.jsx)(g.l,{text:h})]}),(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(v.A,{classes:{secondary:P.text},primary:"Message",secondary:S}),(0,o.jsx)(g.l,{text:S})]}),m&&(0,o.jsxs)(O.A,{alignItems:"flex-start",children:[(0,o.jsx)(v.A,{classes:{secondary:P.text},primary:"Stack Trace",secondary:m}),(0,o.jsx)(g.l,{text:m})]}),j]})};function w(h){const{title:S,error:m,defaultExpanded:j,titleFormat:P,children:E}=h;return(0,o.jsx)(c.B,{severity:"error",title:S!=null?S:m.message,defaultExpanded:j,titleFormat:P,children:(0,o.jsx)(y,{error:m.name,message:m.message,stack:m.stack,children:E})})}},72072:(J,T,t)=>{"use strict";t.d(T,{N_:()=>N});var o=t(31085),i=t(72427),d=t(65461),O=t(93368),v=t(49203),f=t(58837),g=t(72501),c=t(53373),C=t.n(c),y=t(45250),w=t.n(y),h=t(14041),S=t(18690),m=t(73970);function j(){const[K]=(0,S.AV)((0,o.jsx)(S.qh,{index:!0,element:(0,o.jsx)("div",{})}));return!K.index}const P=(0,f.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"}),E=K=>/^([a-z+.-]+):/.test(K),U=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,L=window.open;if(L&&!L.__backstage){const K=function(...H){const et=String(H[0]);if(U.test(et))throw new Error("Rejected window.open() with a javascript: URL as a security precaution");return L.apply(this,H)};K.__backstage=!0,window.open=K}const x=()=>{try{return(0,i.gf)(d.U).getOptionalString("app.baseUrl")}catch{return}},z=()=>{const K="http://sample.dev";var Z;const H=(Z=x())!==null&&Z!==void 0?Z:"/",{pathname:et}=new URL(H,K);return(0,y.trimEnd)(et,"/")},_=K=>{let Z=String(K);const H=z(),et=E(Z),q=Z.startsWith(H);return!et&&!q&&(Z=H.concat(Z)),Z},Y=K=>{if(K instanceof Array)return K.map(Y).join(" ").trim();if(typeof K=="object"&&K){var Z;return Y(K==null||(Z=K.props)===null||Z===void 0?void 0:Z.children)}return["string","number"].includes(typeof K)?String(K):""},N=h.forwardRef(({onClick:K,noTrack:Z,...H},et)=>{const q=P(),ht=(0,O.s)(),ut=j()?_(H.to):H.to,Ot=Y(H.children)||ut,Tt=E(ut),At=Tt&&!!/^https?:/.exec(ut);if(U.test(ut))throw new Error("Link component rejected javascript: URL as a security precaution");const gt=Et=>{K==null||K(Et),Z||ht.captureEvent("click",Ot,{attributes:{to:ut}})};return Tt?(0,o.jsxs)(v.A,{...At?{target:"_blank",rel:"noopener"}:{},...H,...H["aria-label"]?{"aria-label":`${H["aria-label"]}, Opens in a new window`}:{},ref:et,href:ut,onClick:gt,className:C()(q.externalLink,H.className),children:[H.children,(0,o.jsx)(g.A,{component:"span",className:q.visuallyHidden,children:", Opens in a new window"})]}):(0,o.jsx)(v.A,{...H,ref:et,component:m.N_,to:ut,onClick:gt})})},73896:(J,T,t)=>{"use strict";t.d(T,{z:()=>f});var o=t(31085),i=t(64947),d=t(14041),O=t(72072);const v=d.forwardRef((c,C)=>(0,o.jsx)(O.N_,{ref:C,...c,color:"initial"})),f=d.forwardRef((c,C)=>(0,o.jsx)(i.A,{ref:C,component:v,...c})),g=null},4650:(J,T,t)=>{"use strict";t.d(T,{h:()=>w});var o=t(31085),i=t(58837),d=t(45872),O=t(61125),v=t(14041),f=t(77310);const g=(0,i.A)(h=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${h.palette.border}`},"& th, & td":{border:`1px solid ${h.palette.border}`,padding:h.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:h.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:h.palette.background.paper},"& tr":{backgroundColor:h.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:h.palette.background.default},"& a":{color:h.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),c=(h,S)=>S?typeof S=="string"?h+S:v.Children.toArray(S.props.children).reduce(c,h):h,C=({level:h,children:S})=>{const P=v.Children.toArray(S).reduce(c,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return v.createElement(`h${h}`,{id:P},S)},y={code:({inline:h,className:S,children:m,...j})=>{const P=String(m).replace(/\n+$/,""),E=/language-(\w+)/.exec(S||"");return!h&&E?(0,o.jsx)(f.z,{language:E[1],text:P}):(0,o.jsx)("code",{className:S,...j,children:m})},h1:C,h2:C,h3:C,h4:C,h5:C,h6:C};function w(h){const{content:S,dialect:m="gfm",linkTarget:j,transformLinkUri:P,transformImageUri:E,className:U}=h,L=g();return(0,o.jsx)(d.$,{remarkPlugins:m==="gfm"?[O.A]:[],className:`${L.markdown} ${U!=null?U:""}`.trim(),children:S,components:y,linkTarget:j,transformLinkUri:P,transformImageUri:E})}},68146:(J,T,t)=>{"use strict";t.d(T,{k:()=>f});var o=t(31085),i=t(10394),d=t(88951),O=t(54917),v=t(14041);function f(g){const c=(0,O.A)(),[C,y]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{const w=setTimeout(()=>y(!0),c.transitions.duration.short);return()=>clearTimeout(w)},[c.transitions.duration.short]),C?(0,o.jsx)(d.A,{...g,"data-testid":"progress"}):(0,o.jsx)(i.A,{display:"none"})}},66917:(J,T,t)=>{"use strict";t.d(T,{w:()=>N});var o=t(31085),i=t(10394),d=t(69076),O=t(67720),v=t(95061),f=t(41857),g=t(48543),c=t(26343),C=t(81215),y=t(87051),w=t(12398),h=t(58837),S=t(72501),m=t(14041),j=t(10437);const P=(0,h.A)(K=>(0,w.A)({icon:{position:"absolute",right:K.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageClosedDropdown"}),U=()=>{const K=P();return(0,o.jsx)(j.A,{className:K.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"})})},L=(0,h.A)(K=>(0,w.A)({icon:{position:"absolute",right:K.spacing(.5),pointerEvents:"none",color:"#616161"}}),{name:"BackstageOpenedDropdown"}),z=()=>{const K=L();return(0,o.jsx)(j.A,{className:K.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"})})},_=(0,y.A)(K=>(0,w.A)({root:{"label + &":{marginTop:K.spacing(3)},"&.Mui-focused > div[role=button]":{borderColor:K.palette.primary.main}},input:{borderRadius:K.shape.borderRadius,position:"relative",backgroundColor:K.palette.background.paper,border:"1px solid #ced4da",fontSize:K.typography.body1.fontSize,padding:K.spacing(1.25,3.25,1.25,1.5),transition:K.transitions.create(["border-color","box-shadow"]),"&:focus":{background:K.palette.background.paper,borderRadius:K.shape.borderRadius}}}),{name:"BackstageSelectInputBase"})(f.A),Y=(0,h.A)(K=>(0,w.A)({formControl:{margin:K.spacing(1,0)},label:{transform:"initial",fontWeight:"bold",fontSize:K.typography.body2.fontSize,fontFamily:K.typography.fontFamily,color:K.palette.text.primary,"&.Mui-focused":{color:K.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:K.typography.body2.fontSize,fontFamily:K.typography.fontFamily,color:K.palette.text.primary,"&.Mui-focused":{color:K.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function N(K){const{multiple:Z,items:H,label:et,placeholder:q,selected:ht,onChange:ut,triggerReset:Ot,native:Tt=!1,disabled:At=!1,margin:gt}=K,Et=Y(),[dt,at]=(0,m.useState)(ht||(Z?[]:"")),[bt,ft]=(0,m.useState)(!1);(0,m.useEffect)(()=>{at(Z?[]:"")},[Ot,Z]),(0,m.useEffect)(()=>{at(ht||(Z?[]:""))},[ht,Z]);const St=ct=>{at(ct.target.value),ut(ct.target.value)},jt=ct=>{if(At){ct.preventDefault();return}ft(k=>Z&&!(ct.target instanceof HTMLElement)?!0:!k)},Bt=()=>{ft(!1)},Ut=ct=>()=>{const k=dt.filter(G=>G!==ct);at(k),ut(k)};return(0,o.jsx)(i.A,{className:Et.root,children:(0,o.jsxs)(v.A,{className:Et.formControl,children:[(0,o.jsx)(g.A,{className:Et.formLabel,children:et}),(0,o.jsxs)(C.A,{"aria-label":et,value:dt,native:Tt,disabled:At,"data-testid":"select",displayEmpty:!0,multiple:Z,margin:gt,onChange:St,open:bt,onOpen:jt,onClose:Bt,input:(0,o.jsx)(_,{}),label:et,renderValue:ct=>{var k;return Z&&dt.length!==0?(0,o.jsx)(i.A,{className:Et.chips,children:ct.map(G=>{const lt=H.find(pt=>pt.value===G);return lt?(0,o.jsx)(O.A,{label:lt==null?void 0:lt.label,clickable:!0,onDelete:Ut(G),className:Et.chip},lt==null?void 0:lt.value):!1})}):(0,o.jsx)(S.A,{children:dt.length===0?q||"":(k=H.find(G=>G.value===ct))===null||k===void 0?void 0:k.label})},IconComponent:()=>bt?(0,o.jsx)(z,{}):(0,o.jsx)(U,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[!!q&&!Z&&(0,o.jsx)(c.A,{value:[],children:q}),Tt?H&&H.map(ct=>(0,o.jsx)("option",{value:ct.value,children:ct.label},ct.value)):H&&H.map(ct=>(0,o.jsxs)(c.A,{value:ct.value,children:[Z&&(0,o.jsx)(d.A,{color:"primary",checked:dt.includes(ct.value)||!1,className:Et.checkbox}),ct.label]},ct.value))]})]})})}},27586:(J,T,t)=>{"use strict";t.d(T,{Y:()=>K});var o=t(31085),i=t(82266),d=t(10394),O=t(64947),v=t(93453),f=t(29365),g=t(46423),c=t(5951),C=t(26343),y=t(28233),w=t(55197),h=t(58837),S=t(72501),m=t(5893),j=t(14041),P=t(10795),E=t(31129),U=t(72072),L=t(10315),x=t(87849);const z=(0,h.A)({popoverList:{minWidth:260,maxWidth:400},menuItem:{whiteSpace:"normal"}},{name:"BackstageSupportButton"}),_=({icon:Z})=>{const H=(0,i.n)();var et;const q=Z&&(et=H.getSystemIcon(Z))!==null&&et!==void 0?et:E.NT;return(0,o.jsx)(q,{})},Y=({link:Z})=>{var H;return(0,o.jsx)(U.N_,{to:Z.url,children:(H=Z.title)!==null&&H!==void 0?H:Z.url})},N=({item:Z})=>{var H;return(0,o.jsxs)(C.A,{children:[(0,o.jsx)(g.A,{children:(0,o.jsx)(_,{icon:Z.icon})}),(0,o.jsx)(c.A,{primary:Z.title,secondary:(H=Z.links)===null||H===void 0?void 0:H.reduce((et,q,ht)=>[...et,ht>0&&(0,o.jsx)("br",{},ht),(0,o.jsx)(Y,{link:q},q.url)],[])})]})};function K(Z){const{t:H}=(0,x.i)(L.O),{title:et,items:q,children:ht}=Z,{items:ut}=(0,P.l)(),[Ot,Tt]=(0,j.useState)(!1),[At,gt]=(0,j.useState)(null),Et=z(),dt=(0,m.A)(ft=>ft.breakpoints.down("sm")),at=ft=>{gt(ft.currentTarget),Tt(!0)},bt=()=>{Tt(!1)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.A,{display:"flex",ml:1,children:dt?(0,o.jsx)(f.A,{color:"primary",size:"small",onClick:at,"data-testid":"support-button","aria-label":"Support",children:(0,o.jsx)(E.NT,{})}):(0,o.jsx)(O.A,{"data-testid":"support-button","aria-label":"Support",color:"primary",onClick:at,startIcon:(0,o.jsx)(E.NT,{}),children:H("supportButton.title")})}),(0,o.jsxs)(w.Ay,{"data-testid":"support-button-popover",open:Ot,anchorEl:At,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:bt,children:[(0,o.jsxs)(y.A,{className:Et.popoverList,autoFocusItem:!!At,children:[et&&(0,o.jsx)(C.A,{button:!1,alignItems:"flex-start",className:Et.menuItem,children:(0,o.jsx)(S.A,{variant:"subtitle1",children:et})}),j.Children.map(ht,(ft,St)=>(0,o.jsx)(C.A,{alignItems:"flex-start",className:Et.menuItem,children:ft},`child-${St}`)),(q!=null?q:ut).map((ft,St)=>(0,o.jsx)(N,{item:ft},`item-${St}`))]}),(0,o.jsx)(v.A,{children:(0,o.jsx)(O.A,{color:"primary",onClick:bt,"aria-label":"Close",children:H("supportButton.close")})})]})]})}},14209:(J,T,t)=>{"use strict";t.d(T,{X:()=>Bt});var o=t(31085),i=t(25301),d=t(10394),O=t(29365),v=t(87051),f=t(58837),g=t(54917),c=t(72501),C=t(83313),y=t(89019),w=t(62461),h=t(68887),S=t(63798),m=t(64704),j=t(6774),P=t(75625),E=t(65859),U=t(5416),L=t(33494),x=t(80113),z=t(26229),_=t(46802),Y=t(45250),N=t(14041),K=t(64947),Z=t(66917),H=t(10315),et=t(87849);const q=(0,f.A)(k=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:k.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:k.spacing(7.5),justifyContent:"space-between",borderBottom:`1px solid ${k.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:k.spacing(2)}}}),{name:"BackstageTableFilters"}),ht=k=>{var G;const lt=q(),{onChangeFilters:pt}=k,{t:xt}=(0,et.i)(H.O),[mt,vt]=(0,N.useState)({...k.selectedFilters}),[$t,Pt]=(0,N.useState)(!1),Ht=()=>{vt({}),Pt(Nt=>!Nt)};return(0,N.useEffect)(()=>{pt(mt)},[mt,pt]),(0,o.jsxs)(d.A,{className:lt.root,children:[(0,o.jsxs)(d.A,{className:lt.header,children:[(0,o.jsx)(d.A,{className:lt.value,children:xt("table.filter.title")}),(0,o.jsx)(K.A,{color:"primary",onClick:Ht,children:xt("table.filter.clearAll")})]}),(0,o.jsx)(d.A,{className:lt.filters,children:((G=k.filters)===null||G===void 0?void 0:G.length)&&k.filters.map(Nt=>(0,o.jsx)(Z.w,{triggerReset:$t,...Nt.element,selected:mt[Nt.element.label],onChange:se=>vt({...mt,[Nt.element.label]:se})},Nt.element.label))})]})};var ut=t(78467);function Ot(k){return(0,o.jsx)("tbody",{"data-testid":"loading-indicator",children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:k.colSpan,children:(0,o.jsx)(d.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"15rem"},children:(0,o.jsx)(ut.A,{size:"5rem"})})})})})}const Tt={Add:(0,N.forwardRef)((k,G)=>(0,o.jsx)(C.A,{...k,ref:G})),Check:(0,N.forwardRef)((k,G)=>(0,o.jsx)(w.A,{...k,ref:G})),Clear:(0,N.forwardRef)((k,G)=>(0,o.jsx)(m.A,{...k,ref:G})),Delete:(0,N.forwardRef)((k,G)=>(0,o.jsx)(j.A,{...k,ref:G})),DetailPanel:(0,N.forwardRef)((k,G)=>(0,o.jsx)(S.A,{...k,ref:G})),Edit:(0,N.forwardRef)((k,G)=>(0,o.jsx)(P.A,{...k,ref:G})),Export:(0,N.forwardRef)((k,G)=>(0,o.jsx)(z.A,{...k,ref:G})),Filter:(0,N.forwardRef)((k,G)=>(0,o.jsx)(E.A,{...k,ref:G})),FirstPage:(0,N.forwardRef)((k,G)=>(0,o.jsx)(U.A,{...k,ref:G})),LastPage:(0,N.forwardRef)((k,G)=>(0,o.jsx)(L.A,{...k,ref:G})),NextPage:(0,N.forwardRef)((k,G)=>(0,o.jsx)(S.A,{...k,ref:G})),PreviousPage:(0,N.forwardRef)((k,G)=>(0,o.jsx)(h.A,{...k,ref:G})),ResetSearch:(0,N.forwardRef)((k,G)=>(0,o.jsx)(m.A,{...k,ref:G})),Search:(0,N.forwardRef)((k,G)=>(0,o.jsx)(E.A,{...k,ref:G})),SortArrow:(0,N.forwardRef)((k,G)=>(0,o.jsx)(y.A,{...k,ref:G})),ThirdStateCheck:(0,N.forwardRef)((k,G)=>(0,o.jsx)(x.A,{...k,ref:G})),ViewColumn:(0,N.forwardRef)((k,G)=>(0,o.jsx)(_.A,{...k,ref:G}))};function At(k,G){const lt=G.split(".");let pt=k[lt[0]];for(let xt=1;xt<lt.length;++xt){if(pt===void 0)return pt;const mt=lt[xt];pt=pt[mt]}return pt}const gt=(0,v.A)(k=>({header:{padding:k.spacing(1,2,1,2.5),borderTop:`1px solid ${k.palette.grey.A100}`,borderBottom:`1px solid ${k.palette.grey.A100}`,fontWeight:k.typography.fontWeightBold,position:"static",wordBreak:"normal",textTransform:"uppercase"}}),{name:"BackstageTableHeader"})(i.rV),Et=(0,v.A)(k=>({root:{padding:k.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:k.typography.fontWeightBold}},searchField:{paddingRight:k.spacing(2)}}),{name:"BackstageTableToolbar"})(i.Nb),dt=(0,f.A)(k=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:k.typography.fontWeightBold,fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),at=(0,f.A)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function bt(k,G){return k.map(lt=>{var pt;const xt=(pt=lt.headerStyle)!==null&&pt!==void 0?pt:{};let mt=lt.cellStyle||{};if(lt.highlight)if(xt.color=G.palette.textContrast,typeof mt=="object")mt.fontWeight=G.typography.fontWeightBold;else{const vt=mt;mt=($t,Pt,Ht)=>({...vt($t,Pt,Ht),fontWeight:G.typography.fontWeightBold})}return{...lt,headerStyle:xt,cellStyle:mt}})}function ft(k,G){return(0,Y.transform)(k,(lt,pt,xt)=>{(0,Y.isEqual)(pt,G[xt])||(lt[xt]=pt)})}const St={search:"",filtersOpen:!1,filters:{}};function jt(k){const{toolbarRef:G,setSearch:lt,hasFilters:pt,selectedFiltersLength:xt,toggleFilters:mt}=k,vt=dt(),$t=(0,N.useCallback)(Pt=>{k.onSearchChanged(Pt),lt(Pt)},[k,lt]);return pt?(0,o.jsxs)(d.A,{className:vt.root,children:[(0,o.jsxs)(d.A,{className:vt.root,children:[(0,o.jsx)(O.A,{onClick:mt,"aria-label":"filter list",children:(0,o.jsx)(E.A,{})}),(0,o.jsxs)(c.A,{className:vt.title,children:["Filters (",xt,")"]})]}),(0,o.jsx)(Et,{...k,ref:G,onSearchChanged:$t})]}):(0,o.jsx)(Et,{...k,ref:G,onSearchChanged:$t})}function Bt(k){const{data:G,columns:lt,emptyContent:pt,options:xt,title:mt,subtitle:vt,localization:$t,filters:Pt,initialState:Ht,onStateChange:Nt,components:se,isLoading:ye,...Re}=k,ie=at(),fe=(0,g.A)(),qt={...St,...Ht},[Ee,Ae]=(0,N.useState)(qt.filtersOpen),_t=(0,N.useCallback)(()=>Ae(me=>!me),[Ae]),[Vt,Ie]=(0,N.useState)(qt.filters),[Ve,ae]=(0,N.useState)(qt.search);(0,N.useEffect)(()=>{if(Nt){const me=ft({search:Ve,filtersOpen:Ee,filters:Vt},St);Nt(me)}},[Ve,Ee,Vt,Nt]);const Ke=(0,N.useCallback)(me=>{var Me;return(Me=lt.find(Je=>Je.title===me))===null||Me===void 0?void 0:Me.field},[lt]),ze=(0,N.useMemo)(()=>{if(typeof G=="function"||!Vt)return G;const me=Object.values(Vt);return G&&me.flat().length?G.filter(Je=>!!Object.entries(Vt).filter(([,Xe])=>!!Xe.length).every(([Xe,Fe])=>{const He=At(Je,Ke(Xe));return Array.isArray(He)&&Array.isArray(Fe)?He.some(un=>Fe.includes(un)):Array.isArray(He)?He.includes(Fe):Array.isArray(Fe)?Fe.includes(He):He===Fe})):G},[G,Vt,Ke]),on=Object.values(Vt).flat().length,Ze=!!(Pt!=null&&Pt.length),be=(0,N.useCallback)(me=>(0,o.jsx)(jt,{setSearch:ae,hasFilters:Ze,selectedFiltersLength:on,toggleFilters:_t,...me}),[_t,Ze,on,ae]),ln=typeof G!="function"&&G.length===0,cn=lt.length,dn=(0,N.useMemo)(()=>Ut({hasNoRows:ln,emptyContent:pt,columnCount:cn,loading:ye}),[ln,pt,cn,ye]);return(0,o.jsxs)(d.A,{className:ie.root,children:[Ee&&G&&typeof G!="function"&&(Pt==null?void 0:Pt.length)&&(0,o.jsx)(ht,{filters:ct(Pt,G,lt),selectedFilters:Vt,onChangeFilters:Ie}),(0,o.jsx)(i.Ay,{components:{Header:gt,Body:dn,Toolbar:be,...se},options:xt,columns:bt(lt,fe),icons:Tt,title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.A,{variant:"h5",component:"h2",children:mt}),vt&&(0,o.jsx)(c.A,{color:"textSecondary",variant:"body1",children:vt})]}),data:ze,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter",searchTooltip:"Filter"},...$t},...Re})]})}Bt.icons=Object.freeze(Tt);function Ut({columnCount:k,emptyContent:G,hasNoRows:lt,loading:pt}){return xt=>pt?(0,o.jsx)(Ot,{colSpan:k}):G&<?(0,o.jsx)("tbody",{children:(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:k,children:G})})}):(0,o.jsx)(i.C6,{...xt})}function ct(k,G,lt){const pt=mt=>{const vt=new Set,$t=Pt=>{Pt!=null&&vt.add(Pt)};return G&&G.forEach(Pt=>{var Ht;const Nt=At(Pt,(Ht=lt.find(se=>se.title===mt))===null||Ht===void 0?void 0:Ht.field);Array.isArray(Nt)?Nt.forEach($t):$t(Nt)}),vt},xt=mt=>({placeholder:"All results",label:mt.column,multiple:mt.type==="multiple-select",items:[...pt(mt.column)].sort().map(vt=>({label:vt,value:vt}))});return k.map(mt=>({type:mt.type,element:xt(mt)}))}},88640:(J,T,t)=>{"use strict";t.d(T,{B:()=>x});var o=t(31085),i=t(268),d=t(58837),O=t(8973),v=t(29655),f=t(91567),g=t(42899),c=t(72501),C=t(9181),y=t(6924),w=t(14041),h=t(4650);const S=(z,_)=>(_.palette.type==="light"?i.e$:i.a)(_.palette[z].light,.6),m=(z,_)=>(_.palette.type==="light"?i.a:i.e$)(_.palette[z].light,.9),j=(0,d.A)(z=>({root:{marginRight:z.spacing(1),fill:({severity:_})=>S(_,z)}})),P=({severity:z})=>{const _=j({severity:z});return(0,o.jsx)(C.A,{classes:_})},E=({severity:z})=>{const _=j({severity:z});return(0,o.jsx)(y.A,{classes:_})},U=(0,d.A)(z=>({panel:{backgroundColor:({severity:_})=>m(_,z),color:({severity:_})=>S(_,z),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:_})=>S(_,z),fontWeight:z.typography.fontWeightBold},markdownContent:{"& p":{display:"inline"}},message:{width:"100%",display:"block",color:({severity:_})=>S(_,z),backgroundColor:({severity:_})=>m(_,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"}),L=z=>z.charAt(0).toLocaleUpperCase("en-US")+z.slice(1);function x(z){const{severity:_="warning",title:Y,titleFormat:N,message:K,children:Z,defaultExpanded:H}=z,et=U({severity:_}),q=L(_)+(Y?`: ${Y}`:"");return(0,o.jsxs)(O.A,{defaultExpanded:H!=null?H:!1,className:et.panel,role:"alert",children:[(0,o.jsxs)(v.A,{expandIcon:(0,o.jsx)(E,{severity:_}),className:et.summary,children:[(0,o.jsx)(P,{severity:_}),(0,o.jsx)(c.A,{className:et.summaryText,variant:"subtitle1",children:N==="markdown"?(0,o.jsx)(h.h,{content:q,className:et.markdownContent}):q})]}),(K||Z)&&(0,o.jsx)(f.A,{children:(0,o.jsxs)(g.A,{container:!0,children:[K&&(0,o.jsx)(g.A,{item:!0,xs:12,children:(0,o.jsx)(c.A,{className:et.message,variant:"body1",children:K})}),Z&&(0,o.jsx)(g.A,{item:!0,xs:12,className:et.details,children:Z})]})})]})}},10795:(J,T,t)=>{"use strict";t.d(T,{l:()=>f});var o=t(72427),i=t(65461),d=t(10315),O=t(87849);const v=()=>{const{t:g}=(0,O.i)(d.O);return{url:"https://github.com/backstage/backstage/issues",items:[{title:g("supportConfig.default.title"),icon:"warning",links:[{title:g("supportConfig.default.linkTitle"),url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]}};function f(){const c=(0,o.Q2)().get(i.U),C=c==null?void 0:c.getOptionalConfig("app.support"),y=v();return C?{url:C.getString("url"),items:C.getConfigArray("items").flatMap(w=>{var h;return{title:w.getString("title"),icon:w.getOptionalString("icon"),links:((h=w.getOptionalConfigArray("links"))!==null&&h!==void 0?h:[]).flatMap(S=>({url:S.getString("url"),title:S.getString("title")}))}})}:y}},31129:(J,T,t)=>{"use strict";t.d(T,{NT:()=>m,z9:()=>v});var o=t(31085),i=t(82266),d=t(27799),O=t(14041);function v(E){const{id:U,Fallback:L=d.A,...x}=E,z=(0,i.n)();var _;const Y=(_=z.getSystemIcon(U))!==null&&_!==void 0?_:L;return(0,o.jsx)(Y,{...x})}function f(E){return _jsx(v,{id:"brokenImage",...E})}function g(E){return _jsx(v,{id:"catalog",...E})}function c(E){return _jsx(v,{id:"chat",...E})}function C(E){return _jsx(v,{id:"dashboard",...E})}function y(E){return _jsx(v,{id:"docs",...E})}function w(E){return _jsx(v,{id:"email",...E})}function h(E){return _jsx(v,{id:"github",...E})}function S(E){return _jsx(v,{id:"group",...E})}function m(E){return(0,o.jsx)(v,{id:"help",...E})}function j(E){return _jsx(v,{id:"user",...E})}function P(E){return _jsx(v,{id:"warning",...E})}},26280:(J,T,t)=>{"use strict";t.d(T,{U:()=>g});var o=t(31085),i=t(58837),d=t(53373),O=t.n(d),v=t(14041);const f=(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 g(c){const{className:C,stretch:y,noPadding:w,children:h,...S}=c,m=f();return(0,o.jsx)("article",{...S,className:O()(m.root,C,{[m.stretch]:y,[m.noPadding]:w}),children:h})}},59428:(J,T,t)=>{"use strict";t.d(T,{d:()=>C});var o=t(31085),i=t(10394),d=t(58837),O=t(72501),v=t(14041),f=t(93285);const g=y=>(0,d.A)(w=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:w.spacing(2),textAlign:y.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:w.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),c=({title:y="Unknown page",className:w})=>(0,o.jsx)(O.A,{variant:"h4",component:"h2",className:w,"data-testid":"header-title",children:y});function C(y){const{description:w,title:h,titleComponent:S=void 0,children:m,textAlign:j="left"}=y,P=g({textAlign:j})(),E=S||(0,o.jsx)(c,{title:h,className:P.title});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f.m,{title:h}),(0,o.jsxs)(i.A,{className:P.container,children:[(0,o.jsxs)(i.A,{className:P.leftItemsBox,children:[E,w&&(0,o.jsx)(O.A,{className:P.description,variant:"body2",children:w})]}),(0,o.jsx)(i.A,{className:P.rightItemsBox,children:m})]})]})}},12173:(J,T,t)=>{"use strict";t.d(T,{M:()=>U});var o=t(31085),i=t(42899),d=t(58837),O=t(72501),v=t(14041),f=t(18690),g=t(72072),c=t(10795);const C=t.p+"static/mic-drop.fe3ef4d0..svg",y=(0,d.A)(L=>({micDrop:{maxWidth:"60%",bottom:L.spacing(2),right:L.spacing(2),[L.breakpoints.down("xs")]:{maxWidth:"96%",bottom:"unset",right:"unset",margin:L.spacing(10,"auto",4)}}}),{name:"BackstageErrorPageMicDrop"}),w=()=>{const L=y();return(0,o.jsx)("img",{src:C,className:L.micDrop,alt:"Girl dropping mic from her hands"})};var h=t(77310),S=t(87849),m=t(10315);const j=(0,d.A)(L=>({title:{paddingBottom:L.spacing(5),[L.breakpoints.down("xs")]:{paddingBottom:L.spacing(4),fontSize:L.typography.h3.fontSize}}}),{name:"BackstageErrorPageStackDetails"});function P(L){const{stack:x}=L,z=j(),{t:_}=(0,S.i)(m.O),[Y,N]=(0,v.useState)(!1);return Y?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(O.A,{variant:"h6",className:z.title,children:(0,o.jsx)(g.N_,{to:"#",onClick:()=>N(!1),children:_("errorPage.showLessDetails")})}),(0,o.jsx)(h.z,{text:x,language:"text",showCopyCodeButton:!0,showLineNumbers:!0})]}):(0,o.jsx)(O.A,{variant:"h6",className:z.title,children:(0,o.jsx)(g.N_,{to:"#",onClick:()=>N(!0),children:_("errorPage.showMoreDetails")})})}const E=(0,d.A)(L=>({container:{padding:L.spacing(8),[L.breakpoints.down("xs")]:{padding:L.spacing(2)}},title:{paddingBottom:L.spacing(5),[L.breakpoints.down("xs")]:{paddingBottom:L.spacing(4),fontSize:L.typography.h3.fontSize}},subtitle:{color:L.palette.textSubtle}}),{name:"BackstageErrorPage"});function U(L){const{status:x="",statusMessage:z,additionalInfo:_,supportUrl:Y,stack:N}=L,K=E(),Z=(0,f.Zp)(),H=(0,c.l)(),{t:et}=(0,S.i)(m.O);return(0,o.jsxs)(i.A,{container:!0,className:K.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:K.subtitle,children:et("errorPage.subtitle",{status:x,statusMessage:z})}),(0,o.jsx)(O.A,{variant:"body1",className:K.subtitle,children:_}),(0,o.jsx)(O.A,{variant:"h2",className:K.title,children:et("errorPage.title")}),(0,o.jsxs)(O.A,{variant:"h6",className:K.title,children:[(0,o.jsx)(g.N_,{to:"#","data-testid":"go-back-link",onClick:()=>Z(-1),children:et("errorPage.goBack")}),"... or please"," ",(0,o.jsx)(g.N_,{to:Y||H.url,children:"contact support"})," if you think this is a bug."]}),N&&(0,o.jsx)(P,{stack:N})]}),(0,o.jsx)(w,{})]})}},69814:(J,T,t)=>{"use strict";t.d(T,{Y:()=>Z});var o=t(31085),i=t(72427),d=t(65461),O=t(10394),v=t(42899),f=t(58837),g=t(71677),c=t(72501),C=t(14041),y=t(93285),w=t(72072),h=t(45634),S=t(58007),m=t(8109),j=t(55197),P=t(87051);const E=(0,P.A)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(c.A),U=(0,P.A)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(O.A),L=(0,P.A)({root:{fontStyle:"italic"}},{name:"BreadcrumbsCurrentPage"})(O.A);function x(H){const{children:et,...q}=H,[ht,ut]=C.useState(null),Ot=C.Children.toArray(et),[Tt,At,...gt]=Ot,Et=gt.length?gt.pop():Ot[Ot.length-1],dt=Ot.length>3,at=St=>{ut(St.currentTarget)},bt=()=>{ut(null)},ft=!!ht;return(0,o.jsxs)(C.Fragment,{children:[(0,o.jsxs)(h.A,{"aria-label":"breadcrumb",...q,children:[Ot.length>1&&(0,o.jsx)(U,{clone:!0,children:Tt}),Ot.length>2&&(0,o.jsx)(U,{clone:!0,children:At}),dt&&(0,o.jsx)(E,{onClick:at,children:"..."}),(0,o.jsx)(L,{children:Et})]}),(0,o.jsx)(j.Ay,{open:ft,anchorEl:ht,onClose:bt,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,o.jsx)(S.A,{children:gt.map((St,jt)=>(0,o.jsx)(m.A,{button:!0,children:(0,o.jsx)(U,{clone:!0,children:St})},jt))})})]})}var z=t(73524);const _=(0,f.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"}),Y=({type:H,typeLink:et,classes:q,pageTitle:ht})=>H?et?(0,o.jsxs)(x,{className:q.breadcrumb,children:[(0,o.jsx)(w.N_,{to:et,children:H}),(0,o.jsx)(c.A,{children:ht})]}):(0,o.jsx)(c.A,{className:q.type,children:H}):null,N=({pageTitle:H,classes:et,tooltip:q})=>{const{contentRef:ht}=(0,z.H)(),ut=(0,o.jsx)(c.A,{ref:ht,tabIndex:-1,className:et.title,variant:"h1",children:H});return q?(0,o.jsx)(g.Ay,{title:q,placement:"top-start",children:ut}):ut},K=({classes:H,subtitle:et})=>et?typeof et!="string"?(0,o.jsx)(o.Fragment,{children:et}):(0,o.jsx)(c.A,{className:H.subtitle,variant:"subtitle2",component:"span",children:et}):null;function Z(H){const{children:et,pageTitleOverride:q,style:ht,subtitle:ut,title:Ot,tooltip:Tt,type:At,typeLink:gt}=H,Et=_(),at=(0,i.gf)(d.U).getOptionalString("app.title")||"Backstage",bt=q||Ot,ft=Ot||q,St=`${bt} | %s | ${at}`,jt=`${bt} | ${at}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y.m,{titleTemplate:St,defaultTitle:jt}),(0,o.jsxs)("header",{style:ht,className:Et.header,children:[(0,o.jsxs)(O.A,{className:Et.leftItemsBox,children:[(0,o.jsx)(Y,{classes:Et,type:At,typeLink:gt,pageTitle:ft}),(0,o.jsx)(N,{classes:Et,pageTitle:ft,tooltip:Tt}),(0,o.jsx)(K,{classes:Et,subtitle:ut})]}),(0,o.jsx)(v.A,{container:!0,className:Et.rightItemsBox,spacing:4,children:et})]})]})}},24504:(J,T,t)=>{"use strict";t.d(T,{Y:()=>f});var o=t(31085),i=t(14041),d=t(58837),O=t(50868);const v=(0,d.A)(g=>({root:{display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",overflowY:"auto",height:"100vh",[g.breakpoints.down("xs")]:{height:"100%"},"@media print":{display:"block",height:"auto",overflowY:"inherit"}}}),{name:"BackstagePage"});function f(g){const{themeId:c,children:C}=g,y=v();return(0,o.jsx)(O.A,{theme:w=>({...w,page:w.getPageTheme({themeId:c})}),children:(0,o.jsx)("main",{className:y.root,children:C})})}},27155:(J,T,t)=>{"use strict";t.d(T,{d:()=>v});var o=t(31085),i=t(14041),d=t(69814),O=t(24504);function v(f){const{themeId:g,children:c,...C}=f;return(0,o.jsxs)(O.Y,{themeId:g,children:[(0,o.jsx)(d.Y,{...C}),c]})}},73524:(J,T,t)=>{"use strict";t.d(T,{G:()=>h,H:()=>S});var o=t(31085),i=t(10394),d=t(58837),O=t(5893),v=t(14041),f=t(72664),g;(function(m){m.SIDEBAR_PIN_STATE="sidebarPinState"})(g||(g={}));const c={getSidebarPinState(){let m;try{m=JSON.parse(window.localStorage.getItem("sidebarPinState")||"true")}catch{return!0}return!!m},setSidebarPinState(m){return window.localStorage.setItem("sidebarPinState",JSON.stringify(m))}};var C=t(34435);const y=(0,d.A)(m=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[m.breakpoints.up("sm")]:{paddingLeft:j=>j.isPinned?j.sidebarConfig.drawerWidthOpen:j.sidebarConfig.drawerWidthClosed},[m.breakpoints.down("xs")]:{paddingBottom:j=>j.sidebarConfig.mobileSidebarHeight},"@media print":{padding:"0px !important"}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),w=(0,v.createContext)({content:{contentRef:void 0}});function h(m){const[j,P]=(0,v.useState)(()=>c.getSidebarPinState()),{sidebarConfig:E}=(0,v.useContext)(f.yY),U=(0,v.useRef)(null),L=(0,v.useMemo)(()=>({content:{contentRef:U}}),[U]);(0,v.useEffect)(()=>{c.setSidebarPinState(j)},[j]);const x=(0,O.A)(Y=>Y.breakpoints.down("xs"),{noSsr:!0}),z=()=>P(!j),_=y({isPinned:j,sidebarConfig:E});return(0,o.jsx)(C.qj,{value:{isPinned:j,toggleSidebarPinState:z,isMobile:x},children:(0,o.jsx)(w.Provider,{value:L,children:(0,o.jsx)(i.A,{className:_.root,children:m.children})})})}function S(){const{content:m}=(0,v.useContext)(w);return{focusContent:(0,v.useCallback)(()=>{var P,E;m==null||(E=m.contentRef)===null||E===void 0||(P=E.current)===null||P===void 0||P.focus()},[m]),contentRef:m==null?void 0:m.contentRef}}},34435:(J,T,t)=>{"use strict";t.d(T,{Ut:()=>C,qj:()=>c});var o=t(31085),i=t(43836),d=t(10602),O=t(14041);const v={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},f=(0,O.createContext)(v),g=(0,i.tK)("sidebar-pin-state-context");function c(y){const{children:w,value:h}=y;return(0,o.jsx)(f.Provider,{value:h,children:(0,o.jsx)(g.Provider,{value:(0,d.B)({1:h}),children:w})})}const C=()=>{const y=(0,O.useContext)(g),w=(0,O.useContext)(f);if(y===void 0)return w||v;const h=y.atVersion(1);if(h===void 0)throw new Error("No context found for version 1.");return h}},72664:(J,T,t)=>{"use strict";t.d(T,{Rv:()=>f,U1:()=>w,hC:()=>v,i8:()=>c,yY:()=>y});var o=t(14041);const i=72,d=24,O=18,v={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},f=h=>({...v,...h,iconContainerWidth:v.drawerWidthClosed,iconSize:v.drawerWidthClosed-v.iconPadding*2,userBadgeDiameter:v.drawerWidthClosed-v.userBadgePadding*2}),g={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:v.defaultOpenDelayMs+200},c=h=>({...g,...h}),C="@backstage/core/sidebar-intro-dismissed",y=(0,o.createContext)({sidebarConfig:v,submenuConfig:g}),w=(0,o.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}})},10315:(J,T,t)=>{"use strict";t.d(T,{O:()=>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
|
+
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:(J,T,t)=>{"use strict";t.d(T,{Ig:()=>g,pn:()=>f});var o=t(31085),i=t(43836),d=t(10602),O=t(14041);const v=(0,i.tK)("analytics-context"),f=()=>{const C=(0,O.useContext)(v);if(C===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const y=C.atVersion(1);if(y===void 0)throw new Error("No context found for version 1.");return y},g=C=>{const{attributes:y,children:w}=C,S={...f(),...y},m=(0,d.B)({1:S});return(0,o.jsx)(v.Provider,{value:m,children:w})};function c(C,y){const w=h=>_jsx(g,{attributes:y,children:_jsx(C,{...h})});return w.displayName=`WithAnalyticsContext(${C.displayName||C.name||"Component"})`,w}},67237:(J,T,t)=>{"use strict";t.d(T,{J:()=>v,t:()=>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 v{setContext(g){this.context=g}captureEvent(g,c,{value:C,attributes:y}={}){const{_routeNodeType:w,...h}=this.context;if(g===O){d.mostRecentGatheredNavigation&&(d.mostRecentRoutableExtensionRender={context:{...h,extension:"App"}});return}if(d.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...d.mostRecentGatheredNavigation,...d.mostRecentRoutableExtensionRender})}catch(S){console.warn("Error during analytics event capture. %o",S)}d.mostRecentGatheredNavigation=void 0,d.mostRecentRoutableExtensionRender=void 0}if(g==="navigate"&&w==="gathered"&&h.pluginId==="root"){d.mostRecentGatheredNavigation={action:g,subject:c,value:C,attributes:y,context:h};return}try{this.analyticsApi.captureEvent({action:g,subject:c,value:C,attributes:y,context:h})}catch(S){console.warn("Error during analytics event capture. %o",S)}}constructor(g,c={routeRef:"unknown",pluginId:"root",extension:"App"}){(0,o._)(this,"analyticsApi",void 0),(0,o._)(this,"context",void 0),this.analyticsApi=g,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:(J,T,t)=>{"use strict";t.d(T,{s:()=>g});var o=t(25862),i=t(72427),d=t(99303),O=t(14041),v=t(67237);function f(){try{return(0,i.gf)(d.c)}catch{return{captureEvent:()=>{}}}}function g(){const c=(0,O.useRef)(null),C=(0,o.pn)(),y=f();function w(){return c.current===null&&(c.current=new v.J(y)),c.current}const h=w();return h.setContext(C),h}},36017:(J,T,t)=>{"use strict";t.d(T,{k:()=>i});var o=t(55309);const i=(0,o.y)({id:"core.alert"})},99303:(J,T,t)=>{"use strict";t.d(T,{c:()=>i});var o=t(55309);const i=(0,o.y)({id:"core.analytics"})},65461:(J,T,t)=>{"use strict";t.d(T,{U:()=>i});var o=t(55309);const i=(0,o.y)({id:"core.config"})},57405:(J,T,t)=>{"use strict";t.d(T,{I:()=>i});var o=t(55309);const i=(0,o.y)({id:"core.discovery"})},39837:(J,T,t)=>{"use strict";t.d(T,{m:()=>i});var o=t(55309);const i=(0,o.y)({id:"core.error"})},63636:(J,T,t)=>{"use strict";t.d(T,{B:()=>d,S:()=>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:(J,T,t)=>{"use strict";t.d(T,{a:()=>i});var o=t(55309);const i=(0,o.y)({id:"core.fetch"})},16009:(J,T,t)=>{"use strict";t.d(T,{K:()=>i});var o=t(55309);const i=(0,o.y)({id:"core.identity"})},56038:(J,T,t)=>{"use strict";t.d(T,{J:()=>i});var o=t(55309);const i=(0,o.y)({id:"core.translation"})},55309:(J,T,t)=>{"use strict";t.d(T,{y:()=>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(v){if((0,o._)(this,"config",void 0),this.config=v,!v.id.split(".").flatMap(g=>g.split("-")).every(g=>g.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${v.id}'`)}}function d(O){return new i(O)}},12935:(J,T,t)=>{"use strict";t.d(T,{b:()=>o});function o(i,d){return"id"in i?{api:i,deps:{},factory:()=>d}:i}},72427:(J,T,t)=>{"use strict";t.d(T,{Q2:()=>v,gf:()=>f});var o=t(31085),i=t(14041),d=t(43836),O=t(97142);function v(){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 f(c){const y=v().get(c);if(!y)throw new O.EH(`No implementation available for ${c}`);return y}function g(c){return function(y){const w=S=>{const m=v(),j={};for(const P in c)if(c.hasOwnProperty(P)){const E=c[P],U=m.get(E);if(!U)throw new NotImplementedError(`No implementation available for ${E}`);j[P]=U}return _jsx(y,{...S,...j})},h=y.displayName||y.name||"Component";return w.displayName=`withApis(${h})`,w}}},82266:(J,T,t)=>{"use strict";t.d(T,{n:()=>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:(J,T,t)=>{"use strict";t.d(T,{E:()=>v,h:()=>O});var o=t(63544);const i=(0,o.Q)("component-data-store",()=>new WeakMap),d="__backstage_data";function O(f,g,c){const C=f;var y;let w=(y=C[d])!==null&&y!==void 0?y:i.get(f);if(w||(w={map:new Map},Object.defineProperty(C,d,{enumerable:!1,configurable:!0,writable:!1,value:w}),i.set(f,w)),w.map.has(g)){const h=f.displayName||f.name;throw new Error(`Attempted to attach duplicate data "${g}" to component "${h}"`)}w.map.set(g,c)}function v(f,g){if(!f)return;const c=f.type;if(!c)return;var C;const y=(C=c[d])!==null&&C!==void 0?C:i.get(c);if(y)return y.map.get(g)}},88758:(J,T,t)=>{"use strict";t.d(T,{NC:()=>h,zZ:()=>S,QJ:()=>w});var o=t(31085),i=t(14041),d=t(93368),O=t(25862),v=t(82266),f=t(9222),g=t(19402),c=t(18990);class C extends i.Component{static getDerivedStateFromError(j){return{error:j}}render(){const{error:j}=this.state,{app:P,plugin:E}=this.props,{ErrorBoundaryFallback:U}=P.getComponents();return j?(0,o.jsx)(U,{error:j,resetError:this.handleErrorReset,plugin:E}):this.props.children}constructor(...j){super(...j),(0,c._)(this,"state",{error:void 0}),(0,c._)(this,"handleErrorReset",()=>{this.setState({error:void 0})})}}var y=t(67237);function w(m){const{component:j,mountPoint:P,name:E}=m;return S({component:{lazy:()=>j().then(U=>{const L=z=>{const _=(0,d.s)();try{(0,f.S)(P)}catch(Y){if(typeof Y=="object"&&Y!==null){const{message:N}=Y;if(typeof N=="string"&&N.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${P} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw Y}return(0,i.useEffect)(()=>{_.captureEvent(y.t,"")},[_]),(0,o.jsx)(U,{...z})},x=E||U.displayName||U.name||"LazyComponent";return L.displayName=`RoutableExtension(${x})`,L},U=>x=>{const z=(0,v.n)(),{BootErrorPage:_}=z.getComponents();return(0,o.jsx)(_,{step:"load-chunk",error:U})})},data:{"core.mountPoint":P},name:E})}function h(m){const{component:j,name:P}=m;return S({component:j,name:P})}function S(m){const{data:j={},name:P}=m;P||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let E;if("lazy"in m.component){const L=m.component.lazy;E=(0,i.lazy)(()=>L().then(x=>({default:x})))}else E=m.component.sync;const U=P||E.displayName||E.name||"Component";return{expose(L){const x=z=>{const _=(0,v.n)(),{Progress:Y}=_.getComponents(),N=j==null?void 0:j["core.mountPoint"];return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(Y,{}),children:(0,o.jsx)(C,{app:_,plugin:L,children:(0,o.jsx)(O.Ig,{attributes:{pluginId:L.getId(),...P&&{extension:P},...N&&{routeRef:N.id}},children:(0,o.jsx)(E,{...z})})})})};(0,g.h)(x,"core.plugin",L),(0,g.h)(x,"core.extensionName",P);for(const[z,_]of Object.entries(j))(0,g.h)(x,z,_);return x.displayName=`Extension(${U})`,x}}}},82442:(J,T,t)=>{"use strict";t.d(T,{O:()=>c});var o=t(18990),i=t(14041),d=t(19402),O=t(72427),v=t(63636);function f(C,y,w,h){return i.Children.toArray(C).flatMap(S=>{if(!(0,i.isValidElement)(S))return[];if(S.type===i.Fragment)return f(S.props.children,y,w,h);if((0,d.E)(S,"core.featureFlagged")){const m=S.props;return("with"in m?y.isActive(m.with):!y.isActive(m.without))?f(S.props.children,y,w,h):[]}if(w===void 0||w(S))return[S];if(h)throw new Error(h);return f(S.props.children,y,w,h)})}class g{selectByComponentData(y){const w=f(this.node,this.featureFlagsApi,h=>(0,d.E)(h,y.key)!==void 0,y.withStrictError);return new g(w,this.featureFlagsApi)}findComponentData(y){return f(this.node,this.featureFlagsApi,h=>(0,d.E)(h,y.key)!==void 0).map(h=>(0,d.E)(h,y.key)).filter(h=>h!==void 0)}getElements(){return f(this.node,this.featureFlagsApi)}constructor(y,w){(0,o._)(this,"node",void 0),(0,o._)(this,"featureFlagsApi",void 0),this.node=y,this.featureFlagsApi=w}}function c(C,y,w=[]){const h=(0,O.gf)(v.B),S=new g(C,h);return(0,i.useMemo)(()=>y(S),[C,...w])}},9803:(J,T,t)=>{"use strict";t.d(T,{i:()=>d});var o=t(18990);class i{getId(){return this.config.id}getApis(){var v;return(v=this.config.apis)!==null&&v!==void 0?v:[]}getFeatureFlags(){var v,f;return(f=(v=this.config.featureFlags)===null||v===void 0?void 0:v.slice())!==null&&f!==void 0?f:[]}get routes(){var v;return(v=this.config.routes)!==null&&v!==void 0?v:{}}get externalRoutes(){var v;return(v=this.config.externalRoutes)!==null&&v!==void 0?v:{}}provide(v){return v.expose(this)}toString(){return`plugin{${this.config.id}}`}constructor(v){(0,o._)(this,"config",void 0),this.config=v}}function d(O){return new i(O)}},34569:(J,T,t)=>{"use strict";t.d(T,{H:()=>f});var o=t(18990),i=t(59598);let d=i.b,O=d;class v{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 f(g){var c;return new v(g.id,(c=g.params)!==null&&c!==void 0?c:[])}},59598:(J,T,t)=>{"use strict";t.d(T,{b:()=>i});var o=t(63544);const i=(0,o.Q)("route-ref-type",()=>Symbol("route-ref-type"))},9222:(J,T,t)=>{"use strict";t.d(T,{S:()=>O});var o=t(14041),i=t(18690),d=t(43836);function O(v){const{pathname:f}=(0,i.zy)(),g=(0,d.qO)("routing-context");if(!g)throw new Error("Routing context is not available");const c=g.atVersion(1),C=(0,o.useMemo)(()=>c&&c.resolve(v,{pathname:f}),[c,v,f]);if(!g)throw new Error("useRouteRef used outside of routing context");if(!c)throw new Error("RoutingContext v1 not available");const y="optional"in v&&v.optional;if(!C&&!y)throw new Error(`No path for ${v}`);return C}},93184:(J,T,t)=>{"use strict";t.d(T,{h:()=>w,v:()=>h});var o=t(96324),i=t(87081),d=t(33284),O=t(18990),v=t(99833);function f(S){const m=new Array;function j(P,E){for(const[U,L]of Object.entries(P))typeof L=="string"?m.push([E+U,L]):j(L,`${E}${U}.`)}return j(S,""),Object.fromEntries(m)}var g=new WeakMap,c=new WeakMap,C=new WeakMap;class y{get id(){return(0,o._)(this,g)}get T(){throw new Error("Not implemented")}getDefaultMessages(){return(0,o._)(this,c)}setDefaultResource(m){(0,d._)(this,C,m)}getDefaultResource(){return(0,o._)(this,C)}toString(){return`TranslationRef{id=${this.id}}`}constructor(m){(0,i._)(this,g,{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,g,m.id),(0,d._)(this,c,f(m.messages))}}function w(S){const m=new y(S);return S.translations&&m.setDefaultResource((0,v.o)({ref:m,translations:S.translations})),m}function h(S){const m=S;if(m.$$type!=="@backstage/TranslationRef")throw new Error(`Invalid translation ref, bad type '${m.$$type}'`);if(m.version!=="v1")throw new Error(`Invalid translation ref, bad version '${m.version}'`);return m}},99833:(J,T,t)=>{"use strict";t.d(T,{Y:()=>o,o:()=>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,v])=>({language:O,loader:()=>v().then(f=>{const g=f.default;return{messages:(g==null?void 0:g.$$type)==="@backstage/TranslationMessages"?g.messages:g}})}))}}},87849:(J,T,t)=>{"use strict";t.d(T,{i:()=>f});var o=t(14041),i=t(72427),d=t(39837),O=t(56038);const v=new WeakSet,f=g=>{const c=(0,i.gf)(d.m),C=(0,i.gf)(O.J),[y,w]=(0,o.useState)(()=>C.getTranslation(g)),h=(0,o.useMemo)(()=>C.translation$(g),[C,g]),S=(0,o.useCallback)(j=>{if(!v.has(g)){const P=`Failed to load translation resource '${g.id}'; caused by ${j}`;console.error(P),c.post(new Error(P)),v.add(g)}},[c,g]);(0,o.useEffect)(()=>{const j=h.subscribe({next(P){P.ready&&w(P)},error(P){S(P)}});return()=>{j.unsubscribe()}},[h,S]);const m=(0,o.useRef)(!0);if((0,o.useEffect)(()=>{m.current?m.current=!1:w(C.getTranslation(g))},[C,g]),!y.ready)throw new Promise(j=>{const P=h.subscribe({next(E){E.ready&&(P.unsubscribe(),j())},error(E){P.unsubscribe(),S(E),j()}})});return{t:y.t}}},70835:(J,T,t)=>{"use strict";t.d(T,{o:()=>O});var o=t(18990),i=t(59750);async function d(v){try{const g=await v.text();if(g){var f;if(!((f=v.headers.get("content-type"))===null||f===void 0)&&f.startsWith("application/json"))try{const c=JSON.parse(g);if(c.error&&c.response)return c}catch{}return{error:{name:"Error",message:`Request failed with status ${v.status} ${v.statusText}, ${g}`},response:{statusCode:v.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${v.status} ${v.statusText}`},response:{statusCode:v.status}}}class O extends Error{static async fromResponse(f){const g=await d(f),c=g.response.statusCode||f.status,C=f.statusText,y=`Request failed with ${c} ${C}`,w=(0,i.cy)(g.error);return new O({message:y,response:f,data:g,cause:w,statusCode:c,statusText:C})}constructor(f){super(f.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=f.response,this.body=f.data,this.cause=f.cause,this.statusCode=f.statusCode,this.statusText=f.statusText}}},93007:(J,T,t)=>{"use strict";t.d(T,{b:()=>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:(J,T,t)=>{"use strict";t.d(T,{m_:()=>c,EH:()=>w});var o=t(18990),i=t(93007),d=t(59750);class O extends Error{constructor(j,P){var E,U;let L=j;if(P!==void 0){const x=(0,d.M5)(P);L?L+=`; caused by ${x}`:L=`caused by ${x}`}super(L),(0,o._)(this,"cause",void 0),(E=(U=Error).captureStackTrace)===null||E===void 0||E.call(U,this,this.constructor),(!this.name||this.name==="Error")&&this.constructor.name!=="Error"&&(this.name=this.constructor.name),this.cause=(0,i.b)(P)?P:void 0}}class v extends O{constructor(...j){super(...j),(0,o._)(this,"name","InputError")}}class f extends O{constructor(...j){super(...j),(0,o._)(this,"name","AuthenticationError")}}class g extends O{constructor(...j){super(...j),(0,o._)(this,"name","NotAllowedError")}}class c extends O{constructor(...j){super(...j),(0,o._)(this,"name","NotFoundError")}}class C extends O{constructor(...j){super(...j),(0,o._)(this,"name","ConflictError")}}class y extends O{constructor(...j){super(...j),(0,o._)(this,"name","NotModifiedError")}}class w extends O{constructor(...j){super(...j),(0,o._)(this,"name","NotImplementedError")}}class h extends null{}class S extends O{constructor(j,P){super(j,P),this.name=(0,i.b)(P)?P.name:"Error"}}},59750:(J,T,t)=>{"use strict";t.d(T,{M5:()=>f,cy:()=>v});var o=t(69655),i=t.n(o),d=t(93007);function O(g,c){const y={name:"Unknown",message:"<no reason given>",...serializeErrorInternal(g)};return c!=null&&c.includeStack||delete y.stack,y}function v(g){const c=(0,o.deserializeError)(g);return g.stack||(c.stack=void 0),c}function f(g){if((0,d.b)(g)){const c=String(g);return c!=="[object Object]"?c:`${g.name}: ${g.message}`}return`unknown error '${g}'`}},3347:(J,T,t)=>{"use strict";t.d(T,{L:()=>In,Y:()=>Dn});var o=t(18990),i=t(59869);const d="amazonaws.com";function O(M){var u;const I=M.getOptionalString("endpoint");var B;const nt=(B=M.getOptionalBoolean("s3ForcePathStyle"))!==null&&B!==void 0?B:!1;let X,wt;if(I){try{const le=new URL(I);X=le.host,wt=le.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${I}' is not a valid URL`)}if(wt!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${I}'`)}else X=d;const te=M.getOptionalString("accessKeyId"),Ft=(u=M.getOptionalString("secretAccessKey"))===null||u===void 0?void 0:u.trim(),ge=M.getOptionalString("roleArn"),ue=M.getOptionalString("externalId");return{host:X,endpoint:I,s3ForcePathStyle:nt,accessKeyId:te,secretAccessKey:Ft,roleArn:ge,externalId:ue}}function v(M){const u=M.map(O);return u.some(I=>I.host===d)||u.push({host:d}),u}class f{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return(0,i.ku)(u)}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(f,"factory",({config:M})=>{var u;const I=v((u=M.getOptionalConfigArray("integrations.awsS3"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(B=>new f(B)),B=>B.config.host)});const g="console.aws.amazon.com";function c(M){var u;const I=M.getOptionalString("accessKeyId"),B=(u=M.getOptionalString("secretAccessKey"))===null||u===void 0?void 0:u.trim(),nt=M.getOptionalString("roleArn"),X=M.getOptionalString("externalId"),wt=M.getString("region");return{host:M.getOptionalString("host")||`${wt}.${g}`,accessKeyId:I,secretAccessKey:B,roleArn:nt,externalId:X,region:wt}}function C(M){return M.map(c)}class y{get type(){return"awsCodeCommit"}get config(){return this.integrationConfig}get title(){return this.integrationConfig.host}resolveUrl(u){return(0,i.ku)(u)}resolveEditUrl(u){const B=new URL(u).pathname.match(/^\/codesuite\/codecommit\/repositories\/([^\/]+)\//);if(!B)throw new Error("");const[,nt]=B;return w(u,nt,"edit")}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(y,"factory",({config:M})=>{var u;const I=C((u=M.getOptionalConfigArray("integrations.awsCodeCommit"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(B=>new y(B)),B=>B.config.host)});function w(M,u,I){const B=I==="edit"?"files/edit":I;return M.replace(new RegExp(`/codesuite/codecommit/repositories/${u}/(browse|files/edit)/`),`/codesuite/codecommit/repositories/${u}/${B}/`)}var h=t(96324),S=t(87081),m=t(33284);const j="GB";var P=new WeakMap,E=new WeakMap,U=new WeakMap,L=new WeakMap,x=new WeakMap,z=new WeakMap,_=new WeakMap;class Y{static fromRepoUrl(u){const I=new URL(u);let B,nt,X;const wt=I.pathname.split("/").map(le=>decodeURIComponent(le));if(wt[2]==="_git"?(B=wt[1],nt=X=wt[3]):wt[3]==="_git"?(B=wt[1],nt=wt[2],X=wt[4]):wt[4]==="_git"&&(B=`${wt[1]}/${wt[2]}`,nt=wt[3],X=wt[5]),!B||!nt||!X)throw new Error("Azure URL must point to a git repository");var te;const Ft=(te=I.searchParams.get("path"))!==null&&te!==void 0?te:void 0;let ge;const ue=I.searchParams.get("version");if(ue){if(ue.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");ge=ue.slice(2)}return new Y(I.origin,B,nt,X,Ft,ge)}toRepoUrl(){let u;return(0,h._)(this,U)===(0,h._)(this,L)?u=(0,h._)(this,_).call(this,(0,h._)(this,E),"_git",(0,h._)(this,L)):u=(0,h._)(this,_).call(this,(0,h._)(this,E),(0,h._)(this,U),"_git",(0,h._)(this,L)),(0,h._)(this,x)&&u.searchParams.set("path",(0,h._)(this,x)),(0,h._)(this,z)&&u.searchParams.set("version",j+(0,h._)(this,z)),u.toString()}toFileUrl(){if(!(0,h._)(this,x))throw new Error("Azure URL must point to a specific path to be able to download a file");const u=(0,h._)(this,_).call(this,(0,h._)(this,E),(0,h._)(this,U),"_apis","git","repositories",(0,h._)(this,L),"items");return u.searchParams.set("api-version","6.0"),u.searchParams.set("path",(0,h._)(this,x)),(0,h._)(this,z)&&u.searchParams.set("version",(0,h._)(this,z)),u.toString()}toArchiveUrl(){const u=(0,h._)(this,_).call(this,(0,h._)(this,E),(0,h._)(this,U),"_apis","git","repositories",(0,h._)(this,L),"items");return u.searchParams.set("recursionLevel","full"),u.searchParams.set("download","true"),u.searchParams.set("api-version","6.0"),(0,h._)(this,x)&&u.searchParams.set("scopePath",(0,h._)(this,x)),(0,h._)(this,z)&&u.searchParams.set("version",(0,h._)(this,z)),u.toString()}toCommitsUrl(){const u=(0,h._)(this,_).call(this,(0,h._)(this,E),(0,h._)(this,U),"_apis","git","repositories",(0,h._)(this,L),"commits");return u.searchParams.set("api-version","6.0"),(0,h._)(this,z)&&u.searchParams.set("searchCriteria.itemVersion.version",(0,h._)(this,z)),u.toString()}getOwner(){return(0,h._)(this,E)}getProject(){return(0,h._)(this,U)}getRepo(){return(0,h._)(this,L)}getPath(){return(0,h._)(this,x)}getRef(){return(0,h._)(this,z)}constructor(u,I,B,nt,X,wt){(0,S._)(this,P,{writable:!0,value:void 0}),(0,S._)(this,E,{writable:!0,value:void 0}),(0,S._)(this,U,{writable:!0,value:void 0}),(0,S._)(this,L,{writable:!0,value:void 0}),(0,S._)(this,x,{writable:!0,value:void 0}),(0,S._)(this,z,{writable:!0,value:void 0}),(0,S._)(this,_,{writable:!0,value:(...te)=>{const Ft=new URL((0,h._)(this,P));return Ft.pathname=te.map(ge=>encodeURIComponent(ge)).join("/"),Ft}}),(0,m._)(this,P,u),(0,m._)(this,E,I),(0,m._)(this,U,B),(0,m._)(this,L,nt),(0,m._)(this,x,X),(0,m._)(this,z,wt)}}const N="dev.azure.com",K=["clientId","clientSecret","tenantId","personalAccessToken"],Z=new Map([["ClientSecret",["clientId","clientSecret","tenantId"]],["ManagedIdentity",["clientId"]],["PersonalAccessToken",["personalAccessToken"]]]);function H(M){for(const u of Z.entries()){const[I,B]=u,nt=K.filter(X=>!B.includes(X));if(B.every(X=>M[X]!==void 0)&&nt.every(X=>M[X]===void 0))return{kind:I,organizations:M.organizations,...B.reduce((X,wt)=>(X[wt]=M[wt],X),{})}}throw new Error("is not a valid credential")}function et(M){var u,I,B;const nt=(B=M.getOptionalString("host"))!==null&&B!==void 0?B:N;let X=(u=M.getOptionalConfigArray("credentials"))===null||u===void 0?void 0:u.map(zt=>{var Yt,he;return{organizations:zt.getOptionalStringArray("organizations"),personalAccessToken:(Yt=zt.getOptionalString("personalAccessToken"))===null||Yt===void 0?void 0:Yt.trim(),tenantId:zt.getOptionalString("tenantId"),clientId:zt.getOptionalString("clientId"),clientSecret:(he=zt.getOptionalString("clientSecret"))===null||he===void 0?void 0:he.trim()}});const wt=(I=M.getOptionalString("token"))===null||I===void 0?void 0:I.trim();if(M.getOptional("credential")!==void 0&&M.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'credential' and 'credentials' cannot be used together. Use 'credentials' instead.");if(M.getOptional("token")!==void 0&&M.getOptional("credentials")!==void 0)throw new Error("Invalid Azure integration config, 'token' and 'credentials' cannot be used together. Use 'credentials' instead.");if(wt!==void 0){const zt=[{personalAccessToken:wt}];var te;X=(te=X==null?void 0:X.concat(zt))!==null&&te!==void 0?te:zt}if(M.getOptional("credential")!==void 0){var Ft,ge;const zt=[{organizations:M.getOptionalStringArray("credential.organizations"),token:(Ft=M.getOptionalString("credential.token"))===null||Ft===void 0?void 0:Ft.trim(),tenantId:M.getOptionalString("credential.tenantId"),clientId:M.getOptionalString("credential.clientId"),clientSecret:(ge=M.getOptionalString("credential.clientSecret"))===null||ge===void 0?void 0:ge.trim()}];var ue;X=(ue=X==null?void 0:X.concat(zt))!==null&&ue!==void 0?ue:zt}if(!(0,i.HO)(nt))throw new Error(`Invalid Azure integration config, '${nt}' is not a valid host`);let le;if(X!==void 0){const zt=X==null?void 0:X.reduce((Yt,he,Be)=>{let je;try{H(he)}catch(Ge){je=Ge.message}return je!==void 0&&Yt.push(`credential at position ${Be+1} ${je}`),Yt},Array.of()).concat(Object.entries(X.filter(Yt=>Yt.organizations!==void 0&&Yt.organizations.length>0).reduce((Yt,he,Be)=>{var je;return(je=he.organizations)===null||je===void 0||je.forEach(Ge=>{Yt[Ge]||(Yt[Ge]=[]),Yt[Ge].push(Be+1)}),Yt},{})).filter(([Yt,he])=>he.length>1).reduce((Yt,[he,Be])=>(Yt.push(`organization ${he} is specified multiple times in credentials at positions ${Be.slice(0,Be.length-1).join(", ")} and ${Be[Be.length-1]}`),Yt),Array.of()));if((zt==null?void 0:zt.length)>0)throw new Error(`Invalid Azure integration config for ${nt}: ${zt.join("; ")}`);if(le=X.map(Yt=>H(Yt)),le.some(Yt=>Yt.kind!=="PersonalAccessToken")&&nt!==N)throw new Error(`Invalid Azure integration config for ${nt}, only personal access tokens can be used with hosts other than ${N}`);if(le.filter(Yt=>Yt.organizations===void 0||Yt.organizations.length===0).length>1)throw new Error(`Invalid Azure integration config for ${nt}, you cannot specify multiple credentials without organizations`)}return{host:nt,credentials:le}}function q(M){const u=M.map(et);return u.some(I=>I.host===N)||u.push({host:N}),u}class ht{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const{url:I,base:B}=u;if((0,i.AY)(I))return I;try{const X=Y.fromRepoUrl(B),wt=new URL(B);var nt;const te=new URL(`https://a.com${(nt=X.getPath())!==null&&nt!==void 0?nt:""}`),Ft=new URL(I,te).pathname;return wt.searchParams.set("path",Ft),u.lineNumber&&(wt.searchParams.set("line",String(u.lineNumber)),wt.searchParams.set("lineEnd",String(u.lineNumber+1)),wt.searchParams.set("lineStartColumn","1"),wt.searchParams.set("lineEndColumn","1")),wt.toString()}catch{return new URL(I,B).toString()}}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(ht,"factory",({config:M})=>{var u;const I=q((u=M.getOptionalConfigArray("integrations.azure"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(B=>new ht(B)),B=>B.config.host)});var ut=t(52536),Ot=t.n(ut);const Tt="bitbucket.org",At="https://api.bitbucket.org/2.0";function gt(M){var u;const I=Tt,B=At,nt=M.getString("username"),X=(u=M.getString("appPassword"))===null||u===void 0?void 0:u.trim();return{host:I,apiBaseUrl:B,username:nt,appPassword:X}}function Et(M){const u=M.map(gt);return u.length===0&&u.push({host:Tt,apiBaseUrl:At}),u}class dt{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const I=(0,i.ku)(u);if(u.lineNumber){const B=new URL(I);return B.hash=`lines-${u.lineNumber}`,B.toString()}return I}resolveEditUrl(u){const I=Ot()(u),B=new URL(u);return B.searchParams.set("mode","edit"),B.searchParams.set("at",I.ref),B.toString()}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(dt,"factory",({config:M})=>{var u;const I=Et((u=M.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(B=>new dt(B)),B=>B.config.host)});var at=t(45250);const bt="bitbucket.org",ft="https://api.bitbucket.org/2.0";function St(M){var u,I,B;const nt=(B=M.getOptionalString("host"))!==null&&B!==void 0?B:bt;let X=M.getOptionalString("apiBaseUrl");const wt=(u=M.getOptionalString("token"))===null||u===void 0?void 0:u.trim(),te=M.getOptionalString("username"),Ft=(I=M.getOptionalString("appPassword"))===null||I===void 0?void 0:I.trim();if(!(0,i.HO)(nt))throw new Error(`Invalid Bitbucket integration config, '${nt}' is not a valid host`);return X?X=(0,at.trimEnd)(X,"/"):nt===bt?X=ft:X=`https://${nt}/rest/api/1.0`,{host:nt,apiBaseUrl:X,token:wt,username:te,appPassword:Ft}}function jt(M){const u=M.map(St);return u.some(I=>I.host===bt)||u.push({host:bt,apiBaseUrl:ft}),u}class Bt{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const I=(0,i.ku)(u);if(!u.lineNumber)return I;const B=new URL(I);return this.integrationConfig.host==="bitbucket.org"?B.hash=`lines-${u.lineNumber}`:B.hash=`${u.lineNumber}`,B.toString()}resolveEditUrl(u){const I=Ot()(u),B=new URL(u);return B.searchParams.set("mode","edit"),B.searchParams.set("spa","0"),B.searchParams.set("at",I.ref),B.toString()}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(Bt,"factory",({config:M})=>{var u,I,B;const nt=jt((B=M.getOptionalConfigArray("integrations.bitbucket"))!==null&&B!==void 0?B:[...(u=M.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&u!==void 0?u:[],...(I=M.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&I!==void 0?I:[]]);return(0,i.oS)(nt.map(X=>new Bt(X)),X=>X.config.host)});function Ut(M){var u;const I=M.getString("host");let B=M.getOptionalString("apiBaseUrl");const nt=(u=M.getOptionalString("token"))===null||u===void 0?void 0:u.trim(),X=M.getOptionalString("username"),wt=M.getOptionalString("password");if(!(0,i.HO)(I))throw new Error(`Invalid Bitbucket Server integration config, '${I}' is not a valid host`);return B?B=(0,at.trimEnd)(B,"/"):B=`https://${I}/rest/api/1.0`,{host:I,apiBaseUrl:B,token:nt,username:X,password:wt}}function ct(M){return M.map(Ut)}class k{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const I=(0,i.ku)(u);if(u.lineNumber){const B=new URL(I);return B.hash=u.lineNumber.toString(),B.toString()}return I}resolveEditUrl(u){return u.includes("?")?u.substring(0,u.indexOf("?")):u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(k,"factory",({config:M})=>{var u;const I=ct((u=M.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(B=>new k(B)),B=>B.config.host)});function G(M){var u;const I=M.getString("host");let B=M.getOptionalString("baseUrl"),nt=M.getOptionalString("cloneUrl"),X=M.getString("gitilesBaseUrl");const wt=M.getOptionalString("username"),te=(u=M.getOptionalString("password"))===null||u===void 0?void 0:u.trim();if((0,i.HO)(I)){if(B&&!(0,i.AY)(B))throw new Error(`Invalid Gerrit integration config, '${B}' is not a valid baseUrl`);if(nt&&!(0,i.AY)(nt))throw new Error(`Invalid Gerrit integration config, '${nt}' is not a valid cloneUrl`);if(!(0,i.AY)(X))throw new Error(`Invalid Gerrit integration config, '${X}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${I}' is not a valid host`);return B?B=(0,at.trimEnd)(B,"/"):B=`https://${I}`,X?X=(0,at.trimEnd)(X,"/"):X=`https://${I}`,nt?nt=(0,at.trimEnd)(nt,"/"):nt=B,{host:I,baseUrl:B,cloneUrl:nt,gitilesBaseUrl:X,username:wt,password:te}}function lt(M){return M.map(G)}var pt=t(1048).hp;const xt=")]}'";function mt(M,u){const I=new URL(M.gitilesBaseUrl),B=new URL(u),X=B.pathname.substring(B.pathname.startsWith("/a/")?2:0).replace(I.pathname,"").split("/").filter(le=>!!le),wt=X.indexOf("+");if(wt<=0)throw new Error(`Unable to parse project from url: ${u}`);const te=(0,at.trimStart)(X.slice(0,wt).join("/"),"/"),Ft=X.indexOf("heads");if(Ft<=0)throw new Error(`Unable to parse branch from url: ${u}`);const ge=X[Ft+1],ue=X.slice(Ft+2).join("/");return{branch:ge,filePath:ue===""?"/":ue,project:te}}function vt(M,u,I,B){return`${M.gitilesBaseUrl}/${u}/+/refs/heads/${I}/${(0,at.trimStart)(B,"/")}`}function $t(M,u,I,B){const nt=B==="/"||B===""?".tar.gz":`/${B}.tar.gz`;return`${Ht(M)}/${u}/+archive/refs/heads/${I}${nt}`}function Pt(M){return M.password?"/a/":"/"}function Ht(M){if(!M.baseUrl||!M.gitilesBaseUrl)throw new Error("Unexpected Gerrit config values. baseUrl or gitilesBaseUrl not set.");if(M.gitilesBaseUrl.startsWith(M.baseUrl))return M.gitilesBaseUrl.replace(M.baseUrl.concat("/"),M.baseUrl.concat(Pt(M)));if(M.password)throw new Error("Since the baseUrl (Gerrit) is not part of the gitilesBaseUrl, an authentication URL could not be constructed.");return M.gitilesBaseUrl}function Nt(M,u){const{branch:I,project:B}=mt(M,u);return`${M.baseUrl}${Pt(M)}projects/${encodeURIComponent(B)}/branches/${I}`}function se(M,u){const{project:I}=mt(M,u);return`${M.cloneUrl}${Pt(M)}${I}`}function ye(M,u){const{branch:I,filePath:B,project:nt}=mt(M,u);return`${M.baseUrl}${Pt(M)}projects/${encodeURIComponent(nt)}/branches/${I}/files/${encodeURIComponent(B)}/content`}function Re(M){return`${M.baseUrl}${Pt(M)}projects/`}function ie(M){const u={};if(!M.password)return u;const I=pt.from(`${M.username}:${M.password}`,"utf8");return u.Authorization=`Basic ${I.toString("base64")}`,{headers:u}}async function fe(M){const u=await M.text();if(u.startsWith(xt))try{return JSON.parse(u.slice(xt.length))}catch(I){throw new Error(`Invalid response from Gerrit: ${u.slice(0,10)} - ${I}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${u.slice(0,10)}`)}class qt{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){const{url:I,base:B,lineNumber:nt}=u;let X;if(I.startsWith("/")){const{branch:wt,project:te}=mt(this.config,B);return vt(this.config,te,wt,I)}return I?X=new URL(I,B):X=new URL(B),nt&&(X.hash=nt.toString()),X.toString()}resolveEditUrl(u){return u}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(qt,"factory",({config:M})=>{var u;const I=lt((u=M.getOptionalConfigArray("integrations.gerrit"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(B=>new qt(B)),B=>B.config.host)});var Ee=t(36021);const Ae="gitlab.com",_t="https://gitlab.com/api/v4";function Vt(M){var u;const I=M.getString("host");let B=M.getOptionalString("apiBaseUrl");const nt=(u=M.getOptionalString("token"))===null||u===void 0?void 0:u.trim();let X=M.getOptionalString("baseUrl");if(B?B=(0,at.trimEnd)(B,"/"):I===Ae&&(B=_t),X?X=(0,at.trimEnd)(X,"/"):X=`https://${I}`,(0,i.HO)(I)){if(!B||!(0,i.AY)(B))throw new Error(`Invalid GitLab integration config, '${B}' is not a valid apiBaseUrl`);if(!(0,i.AY)(X))throw new Error(`Invalid GitLab integration config, '${X}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${I}' is not a valid host`);return{host:I,token:nt,apiBaseUrl:B,baseUrl:X}}function Ie(M){const u=M.map(Vt);return u.some(I=>I.host===Ae)||u.push({host:Ae,apiBaseUrl:_t,baseUrl:`https://${Ae}`}),u}function Ve(M){let u="";return M.host!==Ae&&(u=new URL(M.baseUrl).pathname),trimEnd(u,"/")}class ae{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(u){return(0,i.ku)(u)}resolveEditUrl(u){return Ke(u,"edit")}constructor(u){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=u}}(0,o._)(ae,"factory",({config:M})=>{var u;const I=Ie((u=M.getOptionalConfigArray("integrations.gitlab"))!==null&&u!==void 0?u:[]);return(0,i.oS)(I.map(B=>new ae(B)),B=>B.config.host)});function Ke(M,u){return M.replace(/\/\-\/(blob|tree|edit)\//,`/-/${u}/`)}function ze(M){var u;const I=M.getString("host");let B=M.getOptionalString("baseUrl");const nt=M.getOptionalString("username"),X=(u=M.getOptionalString("password"))===null||u===void 0?void 0:u.trim();if((0,i.HO)(I)){if(B&&!(0,i.AY)(B))throw new Error(`Invalid Gitea integration config, '${B}' is not a valid baseUrl`)}else throw new Error(`Invalid Gitea integration config, '${I}' is not a valid host`);return B?B=(0,at.trimEnd)(B,"/"):B=`https://${I}`,{host:I,baseUrl:B,username:nt,password:X}}var on=t(1048).hp;function Ze(M,u){const I=me(M,u);return`${I.url}/${I.owner}/${I.name}/_edit/${I.ref}/${I.path}`}function be(M,u){const I=me(M,u);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/contents/${I.path}?ref=${I.ref}`}function ln(M,u){const I=me(M,u);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/archive/${I.ref}.tar.gz`}function cn(M,u){const I=me(M,u);return`${I.url}/api/v1/repos/${I.owner}/${I.name}/git/commits/${I.ref}`}function dn(M){const u={},{username:I,password:B}=M;return B?(I?u.Authorization=`basic ${on.from(`${I}:${B}`).toString("base64")}`:u.Authorization=`token ${B}`,{headers:u}):u}function me(M,u){var I;const B=(I=M.baseUrl)!==null&&I!==void 0?I:`https://${M.host}`;try{const[nt,X,wt,te,Ft,ge,...ue]=u.replace(B,"").split("/"),le=ue.join("/").replace(/^\//,"");return{url:B,owner:X,name:wt,ref:ge,path:le}}catch(nt){throw new Error(`Incorrect URL: ${u}, ${nt}`)}}class Me{get type(){return"gitea"}get title(){return this.config.host}resolveUrl(u){return(0,i.ku)(u)}resolveEditUrl(u){return Ze(this.config,u)}constructor(u){(0,o._)(this,"config",void 0),this.config=u}}(0,o._)(Me,"factory",({config:M})=>{var u;const B=((u=M.getOptionalConfigArray("integrations.gitea"))!==null&&u!==void 0?u:[]).map(nt=>ze(nt));return(0,i.oS)(B.map(nt=>new Me(nt)),nt=>nt.config.host)});function Je(M){const u=M.getString("host"),I=M.getOptionalString("token"),B=M.getOptionalString("apiKey");if(!(0,i.HO)(u))throw new Error(`Invalid Harness Code integration config, '${u}' is not a valid host`);return{host:u,apiKey:B,token:I}}function Xe(M,u){const I=sn(M,u);return`${I.baseUrl}/ng/account/${I.accountId}/module/code/orgs/${I.orgName}/projects/${I.projectName}/repos/${I.repoName}/files/${I.branch}/~/${I.path}`}function Fe(M,u){const I=sn(M,u);return`${I.baseUrl}/gateway/code/api/v1/repos/${I.accountId}/${I.orgName}/${I.projectName}/${I.repoName}/+/raw/${I.path}?routingId=${I.accountId}&git_ref=refs/heads/${I.refString}`}function He(M,u){const I=sn(M,u);return`${I.baseUrl}/gateway/code/api/v1/repos/${I.accountId}/${I.orgName}/${I.projectName}/${I.repoName}/+/archive/${I.branch}.zip?routingId=${I.accountId}`}function un(M,u){const I=sn(M,u);return`${I.baseUrl}/gateway/code/api/v1/repos/${I.accountId}/${I.orgName}/${I.projectName}/${I.repoName}/+/content?routingId=${I.accountId}&include_commit=true&git_ref=refs/heads/${I.branch}`}function Tn(M){const u={},{token:I,apiKey:B}=M;return B?u["x-api-key"]=B:I&&(u.Authorization=`Bearer ${I}`),{headers:u}}function sn(M,u){const I=`https://${M.host}`;try{const B=new URL(u),nt=B.pathname.split("/").filter(Ne=>Ne!==""),X=B.pathname.split("/"),[wt,te,Ft,ge,ue,le,zt,Yt,he,Be,je,Ge,Qt,tn,...gn]=nt,_e=X.slice(X.findIndex(Ne=>Ne==="files"||Ne==="edit")+1),Ye=_e.findIndex(Ne=>Ne==="~"),Ln=_e.slice(0,Ye).join("/"),Mn=Ye!==-1?_e.slice(Ye+1).join("/").replace(/^\//,""):"";return{baseUrl:I,accountId:Ft,orgName:zt,projectName:he,refString:Ln,path:Mn,repoName:je,refDashStr:_e.slice(0,Ye).join("-"),branch:Ye!==-1?_e.slice(0,Ye).join("/"):_e.join("/")}}catch(B){throw new Error(`Incorrect URL: ${u}, ${B}`)}}class qe{get type(){return"harness"}get title(){return this.config.host}resolveUrl(u){return(0,i.ku)(u)}resolveEditUrl(u){return Xe(this.config,u)}constructor(u){(0,o._)(this,"config",void 0),this.config=u}}(0,o._)(qe,"factory",({config:M})=>{var u;const B=((u=M.getOptionalConfigArray("integrations.harness"))!==null&&u!==void 0?u:[]).map(nt=>Je(nt));return(0,i.oS)(B.map(nt=>new qe(nt)),nt=>nt.config.host)});class hn{static fromConfig(u){return new hn({awsS3:f.factory({config:u}),awsCodeCommit:y.factory({config:u}),azure:ht.factory({config:u}),bitbucket:Bt.factory({config:u}),bitbucketCloud:dt.factory({config:u}),bitbucketServer:k.factory({config:u}),gerrit:qt.factory({config:u}),github:Ee.U.factory({config:u}),gitlab:ae.factory({config:u}),gitea:Me.factory({config:u}),harness:qe.factory({config:u})})}get awsS3(){return this.byType.awsS3}get awsCodeCommit(){return this.byType.awsCodeCommit}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}get gitea(){return this.byType.gitea}get harness(){return this.byType.harness}list(){return Object.values(this.byType).flatMap(u=>u.list())}byUrl(u){let I=Object.values(this.byType).map(B=>B.byUrl(u)).filter(Boolean);if(I.length>1){const B=I.filter(nt=>!(nt instanceof Bt));B.length!==0&&(I=B)}return I[0]}byHost(u){return Object.values(this.byType).map(I=>I.byHost(u)).find(Boolean)}resolveUrl(u){const I=this.byUrl(u.base);return I?I.resolveUrl(u):(0,i.ku)(u)}resolveEditUrl(u){const I=this.byUrl(u);return I?I.resolveEditUrl(u):u}constructor(u){(0,o._)(this,"byType",void 0),this.byType=u}}var Rn=t(55309);class In{static fromConfig(u){return hn.fromConfig(u)}}const Dn=(0,Rn.y)({id:"integration.scmintegrations"})},36021:(J,T,t)=>{"use strict";t.d(T,{U:()=>C,F:()=>y});var o=t(18990),i=t(59869),d=t(45250);const O="github.com",v="https://api.github.com",f="https://raw.githubusercontent.com";function g(w){var h,S,m;const j=(m=w.getOptionalString("host"))!==null&&m!==void 0?m:O;let P=w.getOptionalString("apiBaseUrl"),E=w.getOptionalString("rawBaseUrl");const U=(h=w.getOptionalString("token"))===null||h===void 0?void 0:h.trim(),L=(S=w.getOptionalConfigArray("apps"))===null||S===void 0?void 0:S.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)(j))throw new Error(`Invalid GitHub integration config, '${j}' is not a valid host`);return P?P=(0,d.trimEnd)(P,"/"):j===O&&(P=v),E?E=(0,d.trimEnd)(E,"/"):j===O&&(E=f),{host:j,apiBaseUrl:P,rawBaseUrl:E,token:U,apps:L}}function c(w){const h=w.map(g);return h.some(S=>S.host===O)||h.push({host:O,apiBaseUrl:v,rawBaseUrl:f}),h}class C{get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return y((0,i.ku)(h),"tree")}resolveEditUrl(h){return y(h,"edit")}parseRateLimitInfo(h){return{isRateLimited:h.status===429||h.status===403&&h.headers.get("x-ratelimit-remaining")==="0"}}constructor(h){(0,o._)(this,"integrationConfig",void 0),this.integrationConfig=h}}(0,o._)(C,"factory",({config:w})=>{var h;const S=c((h=w.getOptionalConfigArray("integrations.github"))!==null&&h!==void 0?h:[]);return(0,i.oS)(S.map(m=>new C(m)),m=>m.config.host)});function y(w,h){return w.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(S,m,j,P)=>`//${m}/${j}/${P}/${h}/`)}},59869:(J,T,t)=>{"use strict";t.d(T,{AY:()=>f,HO:()=>v,ku:()=>c,oS:()=>g});var o=t(52536),i=t.n(o),d=t(45250),O=t.n(d);function v(y){const w=new URL("http://example.com");return w.host=y,w.host===y}function f(y){try{return new URL(y),!0}catch{return!1}}function g(y,w){return{list(){return y},byUrl(h){try{const S=typeof h=="string"?new URL(h):h;return y.find(m=>w(m)===S.host)}catch{return}},byHost(h){return y.find(S=>w(S)===h)}}}function c(y){const{url:w,base:h,lineNumber:S}=y;try{return new URL(w),w}catch{}let m;if(w.startsWith("/")){const{href:j,filepath:P}=i()(h);m=new URL(j);const E=(0,d.trimEnd)(m.pathname.substring(0,m.pathname.length-P.length),"/");m.pathname=`${E}${w}`}else m=new URL(w,h);return m.search=new URL(h).search,S&&(m.hash=`L${S}`),m.toString()}function C(y){beforeAll(()=>y.listen({onUnhandledRequest:"error"})),afterAll(()=>y.close()),afterEach(()=>y.resetHandlers())}},85318:(J,T,t)=>{"use strict";var o={};t.r(o),t.d(o,{TechDocsPlugin:()=>f.Ju});var i=t(31085),d=t(14041),O=t(25873),v=t(18690),f=t(39278),g=t(85920),c=t(72020),C=t(99730),y=t(64947),w=t(12173),h=t(22020),S=t(68146),m=t(73970);function j({children:s}){return(0,v.Ri)()?(0,i.jsx)(i.Fragment,{children:s}):(0,i.jsx)(v.fS,{children:s})}const P=()=>(0,i.jsx)(w.M,{status:"404",statusMessage:"PAGE NOT FOUND"}),E=({step:s,error:e})=>{let n="";return s==="load-config"?n=`The configuration failed to load, someone should have a look at this error: ${e.message}`:s==="load-chunk"&&(n=`Lazy loaded chunk failed to load, try to reload the page: ${e.message}`),(0,i.jsx)(j,{children:(0,i.jsx)(w.M,{statusMessage:n,stack:e.stack})})},U=({error:s,resetError:e,plugin:n})=>(0,i.jsx)(h.b,{title:`Error in ${n==null?void 0:n.getId()}`,defaultExpanded:!0,error:s,children:(0,i.jsx)(y.A,{variant:"outlined",onClick:e,children:"Retry"})}),L={Progress:S.k,Router:m.Kd,NotFoundErrorPage:P,BootErrorPage:E,ErrorBoundaryFallback:U};var x=t(18990);const z="Invalid discovery URL pattern,";class _{static compile(e){const n=e.split(/\{\{\s*pluginId\s*\}\}/),r=n.join("pluginId");let a;try{a=new URL(r)}catch{throw new Error(`${z} URL '${r}' 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(r.endsWith("/"))throw new Error(`${z} URL must not end with a slash`);return new _(n)}async getBaseUrl(e){return this.parts.join(encodeURIComponent(e))}constructor(e){(0,x._)(this,"parts",void 0),this.parts=e}}var Y=t(96403),N=t.n(Y);let K=Symbol.observable;class Z{[K](){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,r){const a=typeof e=="function"?{next:e,error:n,complete:r}:e;return this.observable.subscribe(a)}constructor(){(0,x._)(this,"isClosed",!1),(0,x._)(this,"terminatingError",void 0),(0,x._)(this,"observable",new(N())(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 et{[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,r){const a=typeof e=="function"?{next:e,error:n,complete:r}: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(N())(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 Z)}}class ht{captureEvent(e){}}class ut{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 Ot{post(e,n){this.subject.next({error:e,context:n})}error$(){return this.subject}constructor(){(0,x._)(this,"subject",new Z)}}class Tt{static forward(e,n){window.addEventListener("unhandledrejection",r=>{e.post(r.reason,n)})}}const At=new Map;class gt{static create(e){var n;return new gt((n=e.namespace)!==null&&n!==void 0?n:"",e.errorApi)}static addStorageEventListener(){window.addEventListener("storage",e=>{for(const[r,a]of At.entries()){var n;!((n=e.key)===null||n===void 0)&&n.startsWith(r)&&a.handleStorageChange(e.key)}})}get(e){return this.snapshot(e).value}snapshot(e){let n,r="absent";try{const a=localStorage.getItem(this.getKeyName(e));a&&(n=JSON.parse(a,(l,b)=>(typeof b=="object"&&b!==null&&Object.freeze(b),b)),r="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${e}`))}return{key:e,value:n,presence:r}}forBucket(e){const n=`${this.namespace}/${e}`;return At.has(n)||At.set(n,new gt(n,this.errorApi)),At.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 gt.hasSubscribed||(gt.addStorageEventListener(),gt.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 r of this.subscribers)r.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(N())(r=>(this.subscribers.add(r),()=>{this.subscribers.delete(r)}))}}(0,x._)(gt,"hasSubscribed",!1);function Et(s){let e=s.baseImplementation||t.g.fetch;var n;const r=[(n=s.middleware)!==null&&n!==void 0?n:[]].flat().reverse();for(const a of r)e=a.apply(e);return{fetch:e}}class dt{static create(e){var n,r;const a=at(e),l=((n=e.header)===null||n===void 0?void 0:n.name)||"authorization",b=((r=e.header)===null||r===void 0?void 0:r.value)||(A=>`Bearer ${A}`);return new dt(e.identityApi,a,l,b)}apply(e){return async(n,r)=>{const a=new Request(n,r),{token:l}=await this.identityApi.getCredentials();return a.headers.get(this.headerName)||typeof l!="string"||!l||!this.allowUrl(a.url)?e(n,r):(a.headers.set(this.headerName,this.headerValue(l)),e(a))}}constructor(e,n,r,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=r,this.headerValue=a}}function at(s){return s.allowUrl?s.allowUrl:s.urlPrefixAllowlist?bt(s.urlPrefixAllowlist):s.config?bt([s.config.getString("backend.baseUrl")]):()=>!1}function bt(s){const e=s.map(n=>n.replace(/\/$/,""));return n=>e.some(r=>n===r||n.startsWith(`${r}/`))}function ft(s,e){return!e||e==="/"?s:`${s.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}class St{apply(e){return async(n,r)=>{const a=new Request(n,r),l="plugin://";if(!a.url.startsWith(l))return e(n,r);const{hostname:b,pathname:A,search:D,hash:F,username:Q,password:st}=new URL(`http://${a.url.substring(l.length)}`);let ot=await this.discoveryApi.getBaseUrl(b);if(Q||st){const yt=new URL(ot),Lt=`${Q}${st?`:${st}`:""}@`;ot=`${yt.protocol}//${Lt}${yt.host}${yt.pathname}`}const it=`${ft(ot,A)}${D}${F}`;return e(it,typeof n=="string"||jt(n)?r:n)}}constructor(e){(0,x._)(this,"discoveryApi",void 0),this.discoveryApi=e}}function jt(s){return typeof s=="object"&&(s==null?void 0:s.constructor)===URL}class Bt{static resolvePluginProtocol(e){return new St(e.discoveryApi)}static injectIdentityAuth(e){return dt.create(e)}constructor(){}}function Ut(s,e){for(const n of e)if(!s.has(n))return!1;return!0}function ct(s,...e){const n=new Set(s);for(const r of e)for(const a of r)n.add(a);return n}class k{request(e){return new Promise((n,r)=>{this.requests.push({scopes:e,resolve:n,reject:r}),this.subject.next(this.getCurrentPending())})}resolve(e,n){this.requests=this.requests.filter(r=>Ut(e,r.scopes)?(r.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,r)=>ct(n,r.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 et(this.getCurrentPending()))}}class G{createAuthRequester(e){const n=new k,r=this.handlerCount;return this.handlerCount++,n.pending().subscribe({next:a=>{const l=this.currentRequests.slice(),b=this.makeAuthRequest(a,e);b?l[r]=b:delete l[r],this.currentRequests=l,this.subject.next(l.filter(Boolean))}}),a=>n.request(a)}makeAuthRequest(e,n){const{scopes:r}=e;if(r)return{provider:n.provider,trigger:async()=>{const a=await n.onAuthRequest(r);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 et([])),(0,x._)(this,"currentRequests",[]),(0,x._)(this,"handlerCount",0)}}function lt(s){return new Promise((e,n)=>{const r=s.width||500,a=s.height||700,l=window.screen.width/2-r/2,b=window.screen.height/2-a/2,A=window.open(s.url,s.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${r},height=${a},top=${b},left=${l}`);let D="";if(!A||typeof A.closed=="undefined"||A.closed){const ot=new Error("Failed to open auth popup.");ot.name="PopupRejectedError",n(ot);return}const F=ot=>{if(ot.source!==A||ot.origin!==s.origin)return;const{data:it}=ot;if(it.type==="config_info"){D=it.targetOrigin;return}if(it.type!=="authorization_response")return;const yt=it;if("error"in yt){const Lt=new Error(yt.error.message);Lt.name=yt.error.name,n(Lt)}else e(yt.response);st()},Q=setInterval(()=>{if(A.closed){const ot=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,it=new Error(ot);it.name="PopupClosedError",n(it),st()}},100);function st(){window.removeEventListener("message",F),clearInterval(Q)}window.addEventListener("message",F)})}let pt=!1;function xt(s){return[...s].join(" ")}class mt{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 r=await n.json();if(r.error){const a=new Error(r.error.message);throw r.error.name&&(a.name=r.error.name),a}return await this.sessionTransform(r)}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,r,a,l,b,A,D,F;const Q=this.joinScopesFunc(e),st=await this.buildUrl("/start",{scope:Q,origin:window.location.origin,flow:"popup"}),ot=!((r=this.popupOptions)===null||r===void 0||(n=r.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,it=!((A=this.popupOptions)===null||A===void 0||(b=A.size)===null||b===void 0)&&b.fullscreen?window.screen.height:((F=this.popupOptions)===null||F===void 0||(D=F.size)===null||D===void 0?void 0:D.height)||730,yt=await lt({url:st,name:`${this.provider.title} Login`,origin:new URL(st).origin,width:ot,height:it});return await this.sessionTransform(yt)}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 r=await this.discoveryApi.getBaseUrl("auth"),a=this.buildQueryString({...n,env:this.environment});return`${r}/${this.provider.id}${e}${a}`}buildQueryString(e){if(!e)return"";const n=Object.entries(e).map(([r,a])=>{if(typeof a=="string")return`${encodeURIComponent(r)}=${encodeURIComponent(a)}`;if(a)return encodeURIComponent(r)}).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:r,environment:a,provider:l,joinScopes:b=xt,oauthRequestApi:A,sessionTransform:D=st=>st,popupOptions:F}=e;!pt&&!n&&(console.warn("DEPRECATION WARNING: Authentication providers require a configApi instance to configure the authentication flow. Please provide one to the authentication provider constructor."),pt=!0);var Q;this.enableExperimentalRedirectFlow=n&&(Q=n.getOptionalBoolean("enableExperimentalRedirectFlow"))!==null&&Q!==void 0?Q:!1,this.authRequester=A.createAuthRequester({provider:l,onAuthRequest:async st=>this.enableExperimentalRedirectFlow?this.executeRedirect(st):this.showPopup(st)}),this.discoveryApi=r,this.environment=a,this.provider=l,this.joinScopesFunc=b,this.sessionTransform=D,this.popupOptions=F}}function vt(s,e){for(const n of e)if(!s.has(n))return!1;return!0}class $t{sessionExistsAndHasScope(e,n){if(!e)return!1;if(!n||this.options.sessionScopes===void 0)return!0;const r=this.options.sessionScopes(e);return vt(r,n)}getExtendedScope(e,n){const r=new Set(this.options.defaultScopes);if(e&&this.options.sessionScopes!==void 0){const a=this.options.sessionScopes(e);for(const l of a)r.add(l)}if(n)for(const a of n)r.add(a);return r}constructor(e){(0,x._)(this,"options",void 0),this.options=e}}var Pt=t(55309),Ht;(function(s){s.SignedIn="SignedIn",s.SignedOut="SignedOut"})(Ht||(Ht={}));const Nt=(0,Pt.y)({id:"core.auth.google"}),se=(0,Pt.y)({id:"core.auth.github"}),ye=(0,Pt.y)({id:"core.auth.okta"}),Re=(0,Pt.y)({id:"core.auth.gitlab"}),ie=(0,Pt.y)({id:"core.auth.microsoft"}),fe=(0,Pt.y)({id:"core.auth.onelogin"}),qt=(0,Pt.y)({id:"core.auth.bitbucket"}),Ee=(0,Pt.y)({id:"core.auth.bitbucket-server"}),Ae=(0,Pt.y)({id:"core.auth.atlassian"}),_t=(0,Pt.y)({id:"core.auth.vmware-cloud"});class Vt{setIsSignedIn(e){this.signedIn!==e&&(this.signedIn=e,this.subject.next(this.signedIn?Ht.SignedIn:Ht.SignedOut))}sessionState$(){return this.subject}constructor(){(0,x._)(this,"subject",new et(Ht.SignedOut)),(0,x._)(this,"signedIn",!1)}}class Ie{async getSession(e){if(this.helper.sessionExistsAndHasScope(this.currentSession,e.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const r=await this.collapsedSessionRefresh(e.scopes),a=this.sessionScopesFunc(this.currentSession),l=this.sessionScopesFunc(r);return vt(l,a)&&(this.currentSession=r),r}catch(r){if(e.optional)return;throw r}}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 Vt),(0,x._)(this,"refreshPromise",void 0),(0,x._)(this,"currentSession",void 0);const{connector:n,defaultScopes:r=new Set,sessionScopes:a,sessionShouldRefresh:l}=e;this.connector=n,this.sessionScopesFunc=a,this.sessionShouldRefreshFunc=l,this.helper=new $t({sessionScopes:a,defaultScopes:r})}}const Ve={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class ae{static create(e){const{configApi:n,discoveryApi:r,environment:a="development",provider:l=Ve,oauthRequestApi:b,defaultScopes:A=[],scopeTransform:D=ot=>ot,popupOptions:F}=e,Q=new mt({configApi:n,discoveryApi:r,environment:a,provider:l,oauthRequestApi:b,sessionTransform({backstageIdentity:ot,...it}){const yt={...it,providerInfo:{idToken:it.providerInfo.idToken,accessToken:it.providerInfo.accessToken,scopes:ae.normalizeScopes(D,it.providerInfo.scope),expiresAt:it.providerInfo.expiresInSeconds?new Date(Date.now()+it.providerInfo.expiresInSeconds*1e3):void 0}};return ot&&(yt.backstageIdentity={token:ot.token,identity:ot.identity,expiresAt:ot.expiresInSeconds?new Date(Date.now()+ot.expiresInSeconds*1e3):void 0}),yt},popupOptions:F}),st=new Ie({connector:Q,defaultScopes:new Set(A),sessionScopes:ot=>ot.providerInfo.scopes,sessionShouldRefresh:ot=>{var it,yt;let Lt=1/0;return!((it=ot.providerInfo)===null||it===void 0)&&it.expiresAt&&(Lt=Math.min(Lt,(ot.providerInfo.expiresAt.getTime()-Date.now())/1e3)),!((yt=ot.backstageIdentity)===null||yt===void 0)&&yt.expiresAt&&(Lt=Math.min(Lt,(ot.backstageIdentity.expiresAt.getTime()-Date.now())/1e3)),Lt<60*5}});return new ae({sessionManager:st,scopeTransform:D})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(e,n){const r=ae.normalizeScopes(this.scopeTransform,e),a=await this.sessionManager.getSession({...n,scopes:r});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 r;return(r=n==null?void 0:n.providerInfo.idToken)!==null&&r!==void 0?r:""}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 r=Array.isArray(n)?n:n.split(/[\s|,]/).filter(Boolean);return new Set(e(r))}constructor(e){(0,x._)(this,"sessionManager",void 0),(0,x._)(this,"scopeTransform",void 0),this.sessionManager=e.sessionManager,this.scopeTransform=e.scopeTransform}}const Ke={id:"google",title:"Google",icon:()=>null},ze="https://www.googleapis.com/auth/";class on{static create(e){const{configApi:n,discoveryApi:r,oauthRequestApi:a,environment:l="development",provider:b=Ke,defaultScopes:A=["openid",`${ze}userinfo.email`,`${ze}userinfo.profile`]}=e;return ae.create({configApi:n,discoveryApi:r,oauthRequestApi:a,provider:b,environment:l,defaultScopes:A,scopeTransform(D){return D.map(F=>F==="openid"?F:F==="profile"||F==="email"?`${ze}userinfo.${F}`:F.startsWith(ze)?F:`${ze}${F}`)}})}}const Ze={id:"microsoft",title:"Microsoft",icon:()=>null};class be{static create(e){return new be(e)}microsoftGraph(){return this.oauth2[be.MicrosoftGraphID]}static resourceForScopes(e){const n=[...new Set(e.split(" ").map(be.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 r;const a=(r=n[0])!==null&&r!==void 0?r:be.MicrosoftGraphID;return Promise.resolve(a)}static resourceForScope(e){var n;const r=(n=e.match(RegExp("^(?<resourceURI>.*)\\/(?<scp>[^\\/]*)$")))===null||n===void 0?void 0:n.groups;if(r){const{resourceURI:a}=r;return a.replace(/^api:\/\//,"")}switch(e){case"email":case"openid":case"offline_access":case"profile":return"openid";default:return be.MicrosoftGraphID}}async getAccessToken(e,n){const r=e===void 0?be.MicrosoftGraphID:await be.resourceForScopes(Array.isArray(e)?e.join(" "):e);return r in this.oauth2||(this.oauth2[r]=ae.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform})),this.oauth2[r].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:r="development",provider:a=Ze,oauthRequestApi:l,discoveryApi:b,defaultScopes:A=["openid","offline_access","profile","email","User.Read"],scopeTransform:D=F=>F.concat("offline_access")}=e;this.configApi=n,this.environment=r,this.provider=a,this.oauthRequestApi=l,this.discoveryApi=b,this.scopeTransform=D,this.oauth2={[be.MicrosoftGraphID]:ae.create({configApi:this.configApi,discoveryApi:this.discoveryApi,oauthRequestApi:this.oauthRequestApi,provider:this.provider,environment:this.environment,scopeTransform:this.scopeTransform,defaultScopes:A})}}}(0,x._)(be,"MicrosoftGraphID","00000003-0000-0000-c000-000000000000");const ln={id:"github",title:"GitHub",icon:()=>null};class cn{static create(e){const{configApi:n,discoveryApi:r,environment:a="development",provider:l=ln,oauthRequestApi:b,defaultScopes:A=["read:user"]}=e;return ae.create({configApi:n,discoveryApi:r,oauthRequestApi:b,provider:l,environment:a,defaultScopes:A})}}const dn={id:"okta",title:"Okta",icon:()=>null},me=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Me="okta.";class Je{static create(e){const{configApi:n,discoveryApi:r,environment:a="development",provider:l=dn,oauthRequestApi:b,defaultScopes:A=["openid","email","profile","offline_access"]}=e;return ae.create({configApi:n,discoveryApi:r,oauthRequestApi:b,provider:l,environment:a,defaultScopes:A,scopeTransform(D){return D.map(F=>me.has(F)||F.startsWith(Me)?F:`${Me}${F}`)}})}}const Xe={id:"gitlab",title:"GitLab",icon:()=>null};class Fe{static create(e){const{configApi:n,discoveryApi:r,environment:a="development",provider:l=Xe,oauthRequestApi:b,defaultScopes:A=["read_user"]}=e;return ae.create({configApi:n,discoveryApi:r,oauthRequestApi:b,provider:l,environment:a,defaultScopes:A})}}const He={id:"onelogin",title:"onelogin",icon:()=>null},un=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Tn="onelogin.";class sn{static create(e){const{configApi:n,discoveryApi:r,environment:a="development",provider:l=He,oauthRequestApi:b}=e;return ae.create({configApi:n,discoveryApi:r,oauthRequestApi:b,provider:l,environment:a,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(A){return A.map(D=>un.has(D)||D.startsWith(Tn)?D:`${Tn}${D}`)}})}}const qe={id:"bitbucket",title:"Bitbucket",icon:()=>null};class hn{static create(e){const{configApi:n,discoveryApi:r,environment:a="development",provider:l=qe,oauthRequestApi:b,defaultScopes:A=["account"]}=e;return ae.create({configApi:n,discoveryApi:r,oauthRequestApi:b,provider:l,environment:a,defaultScopes:A})}}const Rn={id:"bitbucketServer",title:"Bitbucket Server",icon:()=>null};class In{static create(e){const{configApi:n,discoveryApi:r,environment:a="development",provider:l=Rn,oauthRequestApi:b,defaultScopes:A=["PROJECT_ADMIN"]}=e;return ae.create({configApi:n,discoveryApi:r,oauthRequestApi:b,provider:l,environment:a,defaultScopes:A})}}const Dn={id:"atlassian",title:"Atlassian",icon:()=>null};class M{static create(e){const{configApi:n,discoveryApi:r,environment:a="development",provider:l=Dn,oauthRequestApi:b}=e;return ae.create({configApi:n,discoveryApi:r,oauthRequestApi:b,provider:l,environment:a})}}const u={id:"vmwareCloudServices",title:"VMware Cloud",icon:()=>null};class I{static create(e){const{configApi:n,discoveryApi:r,oauthRequestApi:a,environment:l="development",provider:b=u,defaultScopes:A=["openid"]}=e;return ae.create({configApi:n,discoveryApi:r,oauthRequestApi:a,provider:b,environment:l,defaultScopes:A})}}var B=t(12935),nt=t(57405),X=t(65461),wt=t(36017),te=t(99303),Ft=t(39837);const ge=(0,Pt.y)({id:"core.storage"});var ue=t(70795),le=t(16009);const zt=(0,Pt.y)({id:"core.oauthrequest"});var Yt=t(96824),he=t(70835),Be=t(10288),je=t.n(Be),Ge=t(52964),Qt=t(46195),tn=t(54241);const gn=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(gn).nonempty()})).or(Qt.z.object({allOf:Qt.z.array(gn).nonempty()})).or(Qt.z.object({not:gn}))),_e=Qt.z.object({result:Qt.z.literal(tn.b.ALLOW).or(Qt.z.literal(tn.b.DENY))}),Ye=Qt.z.union([Qt.z.object({result:Qt.z.literal(tn.b.ALLOW).or(Qt.z.literal(tn.b.DENY))}),Qt.z.object({result:Qt.z.literal(tn.b.CONDITIONAL),pluginId:Qt.z.string(),resourceType:Qt.z.string(),conditions:gn})]),Ln=(s,e)=>Qt.z.object({items:Qt.z.array(Qt.z.intersection(Qt.z.object({id:Qt.z.string()}),s)).refine(n=>n.length===e.size&&n.every(({id:r})=>e.has(r)),{message:"Items in response do not match request"})});class Mn{async authorize(e,n){return this.makeRequest(e,_e,n)}async authorizeConditional(e,n){return this.makeRequest(e,Ye,n)}async makeRequest(e,n,r){if(!this.enabled)return e.map(Q=>({result:tn.b.ALLOW}));const a={items:e.map(Q=>({id:Ge.A(),...Q}))},l=await this.discovery.getBaseUrl("permission"),b=await je()(`${l}/authorize`,{method:"POST",body:JSON.stringify(a),headers:{...this.getAuthorizationHeader(r==null?void 0:r.token),"content-type":"application/json"}});if(!b.ok)throw await he.o.fromResponse(b);const A=await b.json(),F=Ln(n,new Set(a.items.map(({id:Q})=>Q))).parse(A).items.reduce((Q,st)=>(Q[st.id]=st,Q),{});return a.items.map(Q=>F[Q.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 Ne{static create(e){const{config:n,discovery:r,identity:a}=e,l=new Mn({discovery:r,config:n});return new Ne(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,B.b)({api:nt.I,deps:{configApi:X.U},factory:({configApi:s})=>_.compile(`${s.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,B.b)({api:wt.k,deps:{},factory:()=>new q}),(0,B.b)({api:te.c,deps:{},factory:()=>new ht}),(0,B.b)({api:Ft.m,deps:{alertApi:wt.k},factory:({alertApi:s})=>{const e=new ut(s,new Ot);return Tt.forward(e,{hidden:!1}),e}}),(0,B.b)({api:ge,deps:{errorApi:Ft.m},factory:({errorApi:s})=>gt.create({errorApi:s})}),(0,B.b)({api:ue.a,deps:{configApi:X.U,identityApi:le.K,discoveryApi:nt.I},factory:({configApi:s,identityApi:e,discoveryApi:n})=>Et({middleware:[Bt.resolvePluginProtocol({discoveryApi:n}),Bt.injectIdentityAuth({identityApi:e,config:s})]})}),(0,B.b)({api:zt,deps:{},factory:()=>new G}),(0,B.b)({api:Nt,deps:{discoveryApi:nt.I,oauthRequestApi:zt,configApi:X.U},factory:({discoveryApi:s,oauthRequestApi:e,configApi:n})=>on.create({configApi:n,discoveryApi:s,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,B.b)({api:ie,deps:{discoveryApi:nt.I,oauthRequestApi:zt,configApi:X.U},factory:({discoveryApi:s,oauthRequestApi:e,configApi:n})=>be.create({configApi:n,discoveryApi:s,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,B.b)({api:se,deps:{discoveryApi:nt.I,oauthRequestApi:zt,configApi:X.U},factory:({discoveryApi:s,oauthRequestApi:e,configApi:n})=>cn.create({configApi:n,discoveryApi:s,oauthRequestApi:e,defaultScopes:["read:user"],environment:n.getOptionalString("auth.environment")})}),(0,B.b)({api:ye,deps:{discoveryApi:nt.I,oauthRequestApi:zt,configApi:X.U},factory:({discoveryApi:s,oauthRequestApi:e,configApi:n})=>Je.create({configApi:n,discoveryApi:s,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,B.b)({api:Re,deps:{discoveryApi:nt.I,oauthRequestApi:zt,configApi:X.U},factory:({discoveryApi:s,oauthRequestApi:e,configApi:n})=>Fe.create({configApi:n,discoveryApi:s,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,B.b)({api:fe,deps:{discoveryApi:nt.I,oauthRequestApi:zt,configApi:X.U},factory:({discoveryApi:s,oauthRequestApi:e,configApi:n})=>sn.create({configApi:n,discoveryApi:s,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,B.b)({api:qt,deps:{discoveryApi:nt.I,oauthRequestApi:zt,configApi:X.U},factory:({discoveryApi:s,oauthRequestApi:e,configApi:n})=>hn.create({configApi:n,discoveryApi:s,oauthRequestApi:e,defaultScopes:["account"],environment:n.getOptionalString("auth.environment")})}),(0,B.b)({api:Ee,deps:{discoveryApi:nt.I,oauthRequestApi:zt,configApi:X.U},factory:({discoveryApi:s,oauthRequestApi:e,configApi:n})=>In.create({configApi:n,discoveryApi:s,oauthRequestApi:e,defaultScopes:["REPO_READ"]})}),(0,B.b)({api:Ae,deps:{discoveryApi:nt.I,oauthRequestApi:zt,configApi:X.U},factory:({discoveryApi:s,oauthRequestApi:e,configApi:n})=>M.create({configApi:n,discoveryApi:s,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,B.b)({api:_t,deps:{discoveryApi:nt.I,oauthRequestApi:zt,configApi:X.U},factory:({discoveryApi:s,oauthRequestApi:e,configApi:n})=>I.create({configApi:n,discoveryApi:s,oauthRequestApi:e,environment:n.getOptionalString("auth.environment")})}),(0,B.b)({api:Yt.x,deps:{discovery:nt.I,identity:le.K,config:X.U},factory:({config:s,discovery:e,identity:n})=>Ne.create({config:s,discovery:e,identity:n})})];var Bn=t(14451),jn=t(27799),qn=t(94389),Mo=t(20947),Bo=t(20473),jo=t(45917),Uo=t(39347),$o=t(63309),Fo=t(82451),No=t(85121),to=t(17400),Wo=t(42226),ko=t(69550),eo=t(52755),no=t(89350),Ko=t(8911),Un=t(33602),$n=t(48108),zo=t(77225),oo=t(55700),so=t(71865);const ro={brokenImage:jn.A,catalog:Ko.A,scaffolder:Mo.A,techdocs:Bo.A,search:jo.A,chat:Uo.A,dashboard:$o.A,docs:Fo.A,email:No.A,github:Wo.A,group:Un.A,help:ko.A,"kind:api":to.A,"kind:component":no.A,"kind:domain":Bn.A,"kind:group":Un.A,"kind:location":eo.A,"kind:system":qn.A,"kind:user":$n.A,"kind:resource":oo.A,"kind:template":so.A,user:$n.A,warning:zo.A};var Ho=t(58733),_o=t(55288),Vo=t(91360),Go=t(50868),Fn=t(12285),Yo=t(88714),Nn=t(14360);Nn.A.configure(s=>`v5-${s}`);const Qo=(0,_o.A)({productionPrefix:"jss4-"});function io(s){const{children:e,theme:n,noCssBaseline:r=!1}=s,a=n.getTheme("v4"),l=n.getTheme("v5");let b;r||(b=(0,i.jsx)(Ho.Ay,{}));let A=(0,i.jsxs)(i.Fragment,{children:[b,e]});return a&&(A=(0,i.jsx)(Vo.Ay,{generateClassName:Qo,children:(0,i.jsx)(Go.A,{theme:a,children:A})})),l&&(A=(0,i.jsx)(Fn.A,{injectFirst:!0,children:(0,i.jsx)(Yo.A,{theme:l,children:A})})),A}const ao={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),p=t(87081),R=t(33284),$=t(98392),W=t(56558);const V={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")`},tt={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 rt(s){const{colors:e,shape:n,options:r}=s,l=`linear-gradient(90deg, ${(e.length===1?[e[0],e[0]]:e).join(", ")})`,b=`${n}, ${l}`;var A;const D=(A=r==null?void 0:r.fontColor)!==null&&A!==void 0?A:"#FFFFFF";return{colors:e,shape:n,backgroundImage:b,fontColor:D}}const Ct={home:rt({colors:tt.teal,shape:V.wave}),documentation:rt({colors:tt.pinkSea,shape:V.wave2}),tool:rt({colors:tt.purpleSky,shape:V.round}),service:rt({colors:tt.marineBlue,shape:V.wave}),website:rt({colors:tt.veryBlue,shape:V.wave}),library:rt({colors:tt.rubyRed,shape:V.wave}),other:rt({colors:tt.darkGrey,shape:V.wave}),app:rt({colors:tt.toastyOrange,shape:V.wave}),apis:rt({colors:tt.teal,shape:V.wave2}),card:rt({colors:tt.greens,shape:V.wave})},Mt=16,Wt='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',Zt="home",kt={htmlFontSize:Mt,fontFamily:Wt,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 It(s){const{palette:e,htmlFontSize:n=Mt,fontFamily:r=Wt,defaultPageTheme:a=Zt,pageTheme:l=Ct,typography:b}=s;if(!l[a])throw new Error(`${a} is not defined in pageTheme.`);return kt.htmlFontSize=n,kt.fontFamily=r,{palette:e,typography:b!=null?b:kt,page:l[a],getPageTheme:({themeId:A})=>{var D;return(D=l[A])!==null&&D!==void 0?D:l[a]}}}var ee=t(80012);const xe={MuiCssBaseline:{styleOverrides:s=>({html:{height:"100%",fontFamily:s.typography.fontFamily},body:{height:"100%",fontFamily:s.typography.fontFamily,overscrollBehaviorY:"none",fontSize:"0.875rem",lineHeight:1.43,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:s.palette.background.paper,width:"1em"},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:s.palette.textVerySubtle,border:`3px solid ${s.palette.background.paper}`},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:s.palette.mode==="dark"?(0,ee.a)(s.palette.textVerySubtle,.2):(0,ee.e$)(s.palette.textVerySubtle,.2)},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:s.palette.mode==="dark"?(0,ee.a)(s.palette.textVerySubtle,.2):(0,ee.e$)(s.palette.textVerySubtle,.2)}},a:{color:"inherit",textDecoration:"none"}})},MuiGrid:{defaultProps:{spacing:2}},MuiSwitch:{defaultProps:{color:"primary"}},MuiTableRow:{styleOverrides:{root:({theme:s})=>({"&:nth-of-type(odd)":{backgroundColor:s.palette.background.default}}),hover:{"&:hover":{cursor:"pointer"}},head:({theme:s})=>({"&:nth-of-type(odd)":{backgroundColor:s.palette.background.paper}})}},MuiTableCell:{styleOverrides:{root:({theme:s})=>({wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:s.spacing(3,2,3,2.5),borderBottom:0}),sizeSmall:({theme:s})=>({padding:s.spacing(1.5,2,1.5,2.5)}),head:({theme:s})=>({wordBreak:"break-word",overflow:"hidden",color:s.palette.textSubtle,fontWeight:"normal",lineHeight:"1"})}},MuiTabs:{styleOverrides:{root:{minHeight:24}}},MuiTab:{styleOverrides:{root:({theme:s})=>({color:s.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,ee.e$)(s.palette.link,.3),background:(0,ee.a)(s.palette.link,.95)},[s.breakpoints.up("md")]:{minWidth:120,fontSize:s.typography.pxToRem(14),fontWeight:500}}),textColorPrimary:({theme:s})=>({color:s.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:s})=>({marginRight:s.spacing(1),marginBottom:s.spacing(1)}),label:({theme:s})=>({lineHeight:s.spacing(2.5),fontWeight:s.typography.fontWeightMedium,fontSize:s.spacing(1.75)}),labelSmall:({theme:s})=>({fontSize:s.spacing(1.5)}),deleteIcon:({theme:s})=>({width:s.spacing(3),height:s.spacing(3),margin:s.spacing(0,.75,0,-.75)}),deleteIconSmall:({theme:s})=>({width:s.spacing(2),height:s.spacing(2),margin:s.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"}}}},Jt=s=>(...e)=>{const n=e.length===0?[1]:e,r=(a,l)=>typeof a=="string"?a:l*a;return n.map(a=>{const l=r(a,s);return typeof l=="number"?`${l}px`:l}).join(" ")};function ne(s,e){if(!e||typeof e=="string")return;const n=typeof e=="function"?e(s):e;if(n)return{"@global":n}}function oe(s,e){if(!(!e||typeof e=="string")){if(typeof e=="object"){const n={...s},r=s.spacing(1);return typeof r=="number"&&(n.spacing=Jt(r)),Object.fromEntries(Object.entries(e).map(([a,l])=>typeof l=="function"?[a,l({theme:n})]:[a,l]))}return e}}const de=/^&.Mui-([\w-]+)$/;function Dt(s){let e=s;if(!s||typeof s!="object")return e;for(const n of Object.keys(s)){const r=s[n];if(!(!r||typeof r!="object"))for(const a of Object.keys(r)){const l=a,b=l.match(de);if(b){const[,A]=b,{[l]:D,...F}=r;D&&(e={...e,[n]:F,[A]:D})}}}return e}function Gt(s,e={}){const n={},r={};for(const a of Object.keys(e)){const l=e[a];l&&("styleOverrides"in l&&(a==="MuiCssBaseline"?n[a]=ne(s,l.styleOverrides):n[a]=Dt(oe(s,l.styleOverrides))),"defaultProps"in l&&(r[a]=l.defaultProps))}return{overrides:n,props:r}}var Xt=new WeakMap;class Ce{getTheme(e){return(0,Rt._)(this,Xt).get(e)}constructor(e,n){(0,p._)(this,Xt,{writable:!0,value:new Map}),(0,R._)(this,Xt,new Map),e&&(0,Rt._)(this,Xt).set("v4",e),n&&(0,Rt._)(this,Xt).set("v5",n)}}function we(s){const e=It(s),n={...xe,...s.components},r=(0,W.A)({...e,components:n}),a=Gt(r,n),l={...(0,$.A)(e),...a};return new Ce(l,r)}function Qe(s){const e=adaptV4Theme(s),n=createTheme(s);return new Ce(n,createV5Theme(e))}const pe={light:we({palette:ao.light}),dark:we({palette:ao.dark})};var Ue=t(75962),ce=t(87145);const Wn=[{id:"light",title:"Light Theme",variant:"light",icon:(0,i.jsx)(ce.A,{}),Provider:({children:s})=>(0,i.jsx)(io,{theme:pe.light,children:s})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,i.jsx)(Ue.A,{}),Provider:({children:s})=>(0,i.jsx)(io,{theme:pe.dark,children:s})}];var kn=t(73466),Zo=t(39067),vn=t.n(Zo);class Kn{get(e){for(const n of this.holders){const r=n.get(e);if(r)return r}}constructor(...e){(0,x._)(this,"holders",void 0),this.holders=e}}var yn=t(43836),lo=t(10602);const ys=(0,yn.tK)("api-context"),Jo=s=>{var e;const{apis:n,children:r}=s,a=(e=(0,d.useContext)(ys))===null||e===void 0?void 0:e.atVersion(1),l=a?new Kn(n,a):n;return(0,i.jsx)(ys.Provider,{value:(0,lo.B)({1:l}),children:r})};Jo.propTypes={apis:vn().shape({get:vn().func.isRequired}).isRequired,children:vn().node};const Ar=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function co(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)}function Xo(s){return typeof s!="object"||s===null?s:Array.isArray(s)?s.map(Xo):Object.fromEntries(Object.entries(s).map(([e,n])=>[e,Xo(n)]))}function zn(s,e){if(s===null)return;if(s===void 0)return e===void 0?void 0:zn(e);if(typeof s!="object"||Array.isArray(s))return s;const n=co(e)?e:{},r={};for(const a of new Set([...Object.keys(s),...Object.keys(n)])){const l=zn(s[a],n[a]);l!==void 0&&(r[a]=l)}return r}function qo(s){if(s===null)return"null";if(Array.isArray(s))return"array";const e=typeof s;return e==="number"&&isNaN(s)?"nan":e==="string"&&s===""?"empty-string":e}const We={type(s,e,n,r){return`Invalid type in config for key '${s}' in '${e}', got ${n}, wanted ${r}`},missing(s,e){return`Missing required config value at '${s}' in '${e}'`},convert(s,e,n){return`Unable to convert config value for key '${s}' in '${e}' to a ${n}`}};class En{static fromConfigs(e){return e.length===0?new En(void 0):e.reduce((n,{data:r,context:a,filteredKeys:l,deprecatedKeys:b})=>{const A=new En(r,a,n);if(A.filteredKeys=l,b)for(const{key:D,description:F}of b)console.warn(`The configuration key '${D}' of ${a} is deprecated and may be removed soon. ${F||""}`);return A},void 0)}has(e){var n;const r=this.readValue(e);if(r===null)return!1;if(r!==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 r;const a=(r=(e=this.fallback)===null||e===void 0?void 0:e.keys())!==null&&r!==void 0?r:[];return[...new Set([...n,...a])].filter(l=>{var b;return((b=this.data)===null||b===void 0?void 0:b[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 r=Xo(this.readValue(e)),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptional(e);if(r!==null){if(r===void 0){if(0)var l;return zn(a)}else if(a===void 0)return zn(r);return zn(r,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 r=this.readValue(e),a=(n=this.fallback)===null||n===void 0?void 0:n.getOptionalConfig(e);if(co(r))return this.copy(r,e,a);if(r!==null){if(r!==void 0)throw new TypeError(We.type(this.fullKey(e),this.context,qo(r),"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,b]of a.entries())if(!co(b))return{expected:"object-array",value:b,key:`${e}[${l}]`};return!0});if(!n){if(0)var r;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 r=Number(n);if(!Number.isFinite(r))throw new Error(We.convert(this.fullKey(e),this.context,"number"));return r}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 r=String(n).trim();if(/^(?:y|yes|true|1|on)$/i.test(r))return!0;if(/^(?:n|no|false|0|off)$/i.test(r))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[r,a]of n.entries())if(typeof a!="string"||a==="")return{expected:"string-array",value:a,key:`${e}[${r}]`};return!0})}fullKey(e){return`${this.prefix}${this.prefix?".":""}${e}`}copy(e,n,r){const a=new En(e,this.context,r,this.fullKey(n));return a.filteredKeys=this.filteredKeys,a}readConfigValue(e,n){const r=this.readValue(e);if(r===void 0){var a;if(0)var l;return(a=this.fallback)===null||a===void 0?void 0:a.readConfigValue(e,n)}if(r===null)return;const b=n(r);if(b!==!0){const{key:A=e,value:D=r,expected:F}=b;throw new TypeError(We.type(this.fullKey(A),this.context,qo(D),F))}return r}readValue(e){const n=e?e.split("."):[];for(const a of n)if(!Ar.test(a))throw new TypeError(`Invalid config key '${e}'`);if(this.data===void 0)return;let r=this.data;for(const[a,l]of n.entries())if(co(r))r=r[l];else if(r!=null){const b=this.fullKey(n.slice(0,a).join("."));throw new TypeError(We.type(b,this.context,qo(r),"object"))}return r}constructor(e,n="mock-config",r,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=r,this.prefix=a,this.notifiedFilteredKeys=new Set}}const Hn="theme";class uo{static createWithStorage(e){const n=new uo(e);if(!window.localStorage)return n;var r;const a=(r=window.localStorage.getItem(Hn))!==null&&r!==void 0?r:void 0;return n.setActiveThemeId(a),n.activeThemeId$().subscribe(l=>{l?window.localStorage.setItem(Hn,l):window.localStorage.removeItem(Hn)}),window.addEventListener("storage",l=>{if(l.key===Hn){var b;const A=(b=localStorage.getItem(Hn))!==null&&b!==void 0?b:void 0;n.setActiveThemeId(A)}}),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 et(void 0)}}var An=t(63636);function Es(s){if(s.length<3)throw new Error(`The '${s}' feature flag must have a minimum length of three characters.`);if(s.length>150)throw new Error(`The '${s}' feature flag must not exceed 150 characters.`);if(!s.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${s}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class xr{registerFlag(e){Es(e.name),this.registeredFeatureFlags.push(e)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(e){return this.flags||(this.flags=this.load()),this.flags.get(e)===An.S.Active}save(e){this.flags||(this.flags=this.load()),e.merge||this.flags.clear();for(const[r,a]of Object.entries(e.states))this.flags.set(r,a);const n=Array.from(this.flags.entries()).filter(([,r])=>r===An.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 r=Object.entries(n).filter(([a,l])=>(Es(a),l===An.S.Active));return new Map(r)}catch{return new Map}}constructor(){(0,x._)(this,"registeredFeatureFlags",[]),(0,x._)(this,"flags",void 0)}}const ho=(0,Pt.y)({id:"core.apptheme"}),As=(0,Pt.y)({id:"core.applanguage"});var Cr=t(56038);class ts{static validateFactories(e,n){for(const r of n){const a=[r],l=new Set;for(;a.length;){const b=a.shift(),A=e.get(b);if(A)for(const D of Object.values(A.deps)){if(D.id===r.id)throw new Error(`Circular dependency of api factory for ${r}`);l.has(D)||(l.add(D),a.push(D))}}}}get(e){return this.load(e)}load(e,n=[]){const r=this.apis.get(e.id);if(r)return r;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]),b=a.factory(l);return this.apis.set(e.id,b),b}loadDeps(e,n,r){const a={};for(const l in n)if(n.hasOwnProperty(l)){const b=n[l],A=this.load(b,r);if(!A)throw new Error(`No API factory available for dependency ${b} of dependent ${e}`);a[l]=A}return a}constructor(e){(0,x._)(this,"factories",void 0),(0,x._)(this,"apis",void 0),this.factories=e,this.apis=new Map}}var es;(function(s){s[s.default=10]="default",s[s.app=50]="app",s[s.static=100]="static"})(es||(es={}));class br{register(e,n){const r=es[e],a=this.factories.get(n.api.id);return a&&a.priority>=r?!1:(this.factories.set(n.api.id,{priority:r,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 Sr(s){const e={};for(const r in s.collectors)s.collectors.hasOwnProperty(r)&&(e[r]=s.collectors[r]());const n=[{node:d.Children.toArray(s.root),parent:void 0,contexts:{}}];for(;n.length!==0;){const{node:r,parent:a,contexts:l}=n.shift();d.Children.forEach(r,b=>{if(!(0,d.isValidElement)(b))return;const A={};for(const D in e)if(e.hasOwnProperty(D)){const F=e[D];A[D]=F.visit(F.accumulator,b,a,l[D])}for(const D of s.discoverers){const F=D(b);F&&n.push({node:F,parent:b,contexts:A})}})}return Object.fromEntries(Object.entries(e).map(([r,a])=>[r,a.accumulator]))}function go(s,e){return()=>({accumulator:s(),visit:e})}function Or(s){var e;return(e=s.props)===null||e===void 0?void 0:e.children}function Pr(s){var e,n;if(!((e=s.props)===null||e===void 0)&&e.path&&(!((n=s.props)===null||n===void 0)&&n.element)){var r;return(r=s.props)===null||r===void 0?void 0:r.element}}var Te=t(19402);const wr=go(()=>new Set,(s,e)=>{const n=(0,Te.E)(e,"core.plugin");n&&s.add(n)});var _n=t(72427);const xs=s=>{const{children:e}=s,n=(0,_n.gf)(An.B),r="with"in s?n.isActive(s.with):!n.isActive(s.without);return(0,i.jsx)(i.Fragment,{children:r?e:null})};(0,Te.h)(xs,"core.featureFlagged",!0);const po={caseSensitive:!1,path:"*",element:"match-all",routeRefs:new Set,plugins:new Set};function fo(s){const e=s;if(e!=null&&e.type){var n,r;return(r=(n=e.type.displayName)!==null&&n!==void 0?n:e.type.name)!==null&&r!==void 0?r:String(e.type)}return String(e)}const Cs=s=>{const e=new Set;return s&&e.add(s),e};function bs(s,e=new Array){return d.Children.forEach(s,n=>{if(!(0,d.isValidElement)(n))return;const r=(0,Te.E)(n,"core.mountPoint");if(r){const a=(0,Te.E)(n,"core.plugin");e.push({routeRef:r,plugin:a})}bs(n.props.children,e)}),e}const Tr=go(()=>({paths:new Map,parents:new Map,objects:new Array}),(s,e,n,r)=>{var a,l;if(r!=null&&r.isElementAncestor)return r;if((n==null?void 0:n.props.element)===e)return{...r,isElementAncestor:!0};const b=(a=e.props)===null||a===void 0?void 0:a.path,A=(0,Te.E)(e,"core.mountPoint");if(A&&b)throw new Error(`Path property may not be set directly on a routable extension "${fo(e)}"`);var D;const F=(D=r==null||(l=r.obj)===null||l===void 0?void 0:l.children)!==null&&D!==void 0?D:s.objects;if(b!==void 0){if(typeof b!="string")throw new Error(`Element path must be a string at "${fo(e)}"`);const yt=b.startsWith("/")?b.slice(1):b,Lt=e.props.element;if((0,Te.E)(e,"core.gatherMountPoints")){var Q;if(Lt)throw new Error(`Mount point gatherers may not have an element prop "${fo(e)}"`);const Kt={path:yt,element:"gathered",routeRefs:new Set,caseSensitive:!!(!((Q=e.props)===null||Q===void 0)&&Q.caseSensitive),children:[po],plugins:new Set};return F.push(Kt),{obj:Kt,gatherPath:yt,routeRef:r==null?void 0:r.routeRef,gatherRouteRef:r==null?void 0:r.routeRef}}if(Lt){var st;const[Kt,...ve]=bs(Lt);if(ve.length>0)throw new Error(`Route element with path "${b}" may not contain multiple routable extensions`);if(!Kt)return r;const{routeRef:re,plugin:Le}=Kt,Xn={path:yt,element:"mounted",routeRefs:new Set([re]),caseSensitive:!!(!((st=e.props)===null||st===void 0)&&st.caseSensitive),children:[po],plugins:Cs(Le)};return F.push(Xn),s.paths.set(re,yt),s.parents.set(re,r==null?void 0:r.routeRef),{obj:Xn,routeRef:re!=null?re:r==null?void 0:r.routeRef,gatherPath:yt,gatherRouteRef:r==null?void 0:r.gatherRouteRef}}}if(A){var ot;if((r==null?void 0:r.gatherPath)===void 0)throw new Error(`Routable extension "${fo(e)}" with mount point "${A}" must be assigned a path`);r==null||(ot=r.obj)===null||ot===void 0||ot.routeRefs.add(A);const yt=(0,Te.E)(e,"core.plugin");if(yt){var it;r==null||(it=r.obj)===null||it===void 0||it.plugins.add(yt)}return s.paths.set(A,r.gatherPath),s.parents.set(A,r==null?void 0:r.gatherRouteRef),{...r,routeRef:A}}return r}),Rr=go(()=>({paths:new Map,parents:new Map,objects:new Array}),(s,e,n,r)=>{var a,l,b;if((n==null?void 0:n.props.element)===e)return r;let A=r==null?void 0:r.obj,D=r==null?void 0:r.routeRef,F=r==null?void 0:r.sticky;const Q=(a=e.props)===null||a===void 0?void 0:a.path;var st;const ot=(st=A==null?void 0:A.children)!==null&&st!==void 0?st:s.objects,it=!!(!((l=e.props)===null||l===void 0)&&l.caseSensitive);let yt=r==null?void 0:r.path;if((0,Te.E)(e,"core.gatherMountPoints")){if(!Q)throw new Error("Mount point gatherer must have a path");yt=Q}const Lt=(b=e.props)===null||b===void 0?void 0:b.element;let Kt=(0,Te.E)(e,"core.mountPoint");if(!Kt&&(0,d.isValidElement)(Lt)&&(Kt=(0,Te.E)(Lt,"core.mountPoint")),Kt){let Le=Q;if(yt&&(Le?yt=void 0:Le=yt),!Le)throw new Error("Mounted routable extension must have a path");s.paths.set(Kt,Le),D&&F?(s.parents.set(Kt,D),Q&&(D=Kt,F=!1)):(s.parents.set(Kt,D),D=Kt),Q?(A={caseSensitive:it,path:Q,element:"mounted",routeRefs:new Set([Kt]),children:[po],plugins:Cs((0,Te.E)(e.props.element,"core.plugin"))},ot.push(A)):A==null||A.routeRefs.add(Kt)}if((0,Te.E)(e,"core.gatherMountPoints")&&(F=!0),(0,Te.E)(e,"core.gatherMountPoints")){if(!Q)throw new Error("Mount point gatherer must have a path");if(!Kt){var re;A={caseSensitive:it,path:Q,element:"gathered",routeRefs:new Set,children:[po],plugins:(r==null||(re=r.obj)===null||re===void 0?void 0:re.plugins)||new Set},ot.push(A)}}return{obj:A,path:yt,routeRef:D,sticky:F}}),Ir=go(()=>new Set,(s,e)=>{if(e.type===xs){const n=e.props;s.add("with"in n?n.with:n.without)}});var Vn=t(74808),Dr=t(63544);const Gn=(0,Dr.Q)("route-ref-type",()=>Symbol("route-ref-type"));function Ss(s){return s[Gn]==="absolute"}function Os(s){return s[Gn]==="sub"}function Lr(s){return s[Gn]==="external"}function mo(...s){const e=s.join("/").replace(/\/\/+/g,"/");return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}var Mr=t(46155),Br=t.n(Mr);function jr(s,e,n){let r,a="";if(Ss(s))r=s;else if(Os(s))r=s.parent,a=s.path;else if(Lr(s)){const A=n.get(s);if(!A)return[void 0,""];if(Ss(A))r=A;else if(Os(A))r=A.parent,a=A.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${A}`)}else throw s[Gn]?new Error(`Unknown or invalid route ref type, ${s[Gn]}`):new Error(`Unknown object passed to useRouteRef, got ${s}`);if(!r)return[void 0,""];const l=e.get(r);if(l===void 0)return[void 0,""];const b=mo(l,a);return[r,b]}function Ur(s,e,n,r,a){var l;const b=(l=(0,Vn.ue)(a,e))!==null&&l!==void 0?l:[],A=Array();let D=-1;for(let st=s;st&&(D=b.findIndex(ot=>ot.route.routeRefs.has(st)),D===-1);st=r.get(st))A.unshift(st);A.length===0&&(D-=1);const F=D===-1?"":b[D].pathname,Q=A.slice(0,-1).map(st=>{const ot=n.get(st);if(ot===void 0)throw new Error(`No path for ${st}`);if(ot.includes(":"))throw new Error(`Cannot route to ${s} with parent ${st} as it has parameters`);return ot});return`${mo(F,...Q)}/`}class $r{resolve(e,n){const[r,a]=jr(e,this.routePaths,this.routeBindings);if(!r)return;let l;typeof n=="string"?l=this.trimPath(n):n.pathname?l={...n,pathname:this.trimPath(n.pathname)}:l=n;const b=this.appBasePath+Ur(r,l,this.routePaths,this.routeParents,this.routeObjects);return(...[D])=>{const F=D&&Br()(D,Q=>typeof Q=="string"?Q.replaceAll(/[&?#;\/]/g,st=>encodeURIComponent(st)):Q);return mo(b,(0,Vn.tW)(a,F))}}trimPath(e){return e&&(e.startsWith(this.appBasePath)?e.slice(this.appBasePath.length):e)}constructor(e,n,r,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=r,this.routeBindings=a,this.appBasePath=l}}const Fr=(0,yn.tK)("routing-context"),Nr=({routePaths:s,routeParents:e,routeObjects:n,routeBindings:r,basePath:a="",children:l})=>{const b=new $r(s,e,n,r,a),A=(0,lo.B)({1:b});return(0,i.jsx)(Fr.Provider,{value:A,children:l})};function Wr(s,e){const n=new Set(e.values());n.delete(void 0);for(const r of e.keys()){if(n.has(r))continue;let a=r,l="";for(;a;){const A=s.get(a);if(A===void 0)throw new Error(`No path for ${a}`);l=mo(A,l),a=e.get(a)}const b=l.match(/:(\w+)/g);if(b){for(let A=0;A<b.length;A++)for(let D=A+1;D<b.length;D++)if(b[D]===b[A])throw new Error(`Parameter ${b[D]} is duplicated in path ${l}`)}}}function kr(s,e){for(const n of e)if(n.externalRoutes){for(const[r,a]of Object.entries(n.externalRoutes))if(!a.optional&&!s.has(a))throw new Error(`External route '${r}' of the '${n.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Kr=(0,yn.tK)("app-context"),zr=({appContext:s,children:e})=>{const n=(0,lo.B)({1:s});return(0,i.jsx)(Kr.Provider,{value:n,children:e})},Ps="app",Hr=`${Ps}-auth-cookie-expires-at`,_r=5*6e4,ws=5e3,Vr=2,Gr=5*6e4;function Yr({discoveryApi:s,fetchApi:e,errorApi:n}){let r=!1,a,l=!0,b=ws;const A="BroadcastChannel"in window?new BroadcastChannel(Hr):void 0,D=ot=>{const it=(1+3*Math.random())*6e4;return Math.max(ot-Date.now(),_r)-it},F=async()=>{try{const it=`${await s.getBaseUrl(Ps)}/.backstage/auth/v1/cookie`,yt=await e.fetch(it,{credentials:"include"});if(!yt.ok)throw new Error(`Request failed with status ${yt.status} ${yt.statusText}, see request towards ${it} for more details`);const Lt=await yt.json();if(!Lt.expiresAt)throw new Error("No expiration date in response");const Kt=Date.parse(Lt.expiresAt);if(Number.isNaN(Kt))throw new Error("Invalid expiration date in response");l=!0,A==null||A.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:{expiresAt:new Date(Kt).toISOString()}}),st(D(Kt))}catch(ot){l?(l=!1,b=ws):(b=Math.min(Gr,b*Vr),console.error("Session cookie refresh failed",ot),n.post(new Error("Session refresh failed, see developer console for details"))),st(b)}},Q=ot=>{const{data:it}=ot;if(!(it===null||typeof it!="object")&&"action"in it&&it.action==="COOKIE_REFRESH_SUCCESS"){const yt=Date.parse(it.payload.expiresAt);if(Number.isNaN(yt)){console.warn("Received invalid expiration from session refresh channel");return}st(D(yt))}};function st(ot){r||(a&&clearTimeout(a),a=setTimeout(F,ot))}return A==null||A.addEventListener("message",Q),F(),()=>{r=!0,a&&clearTimeout(a),A==null||A.removeEventListener("message",Q),A==null||A.close()}}function Ts(s){return new Error(`Tried to access IdentityApi ${s} before app was loaded`)}function ns(s){console.warn(`WARNING: Call to ${s} is deprecated and will break in the future`)}var vo=new WeakMap;class Qr{setTarget(e,n){this.target=e,this.signOutTargetUrl=n.signOutTargetUrl,this.resolveTarget(e)}getUserId(){if(!this.target)throw Ts("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return ns("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Ts("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return ns("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 ns("getIdToken"),e.getIdToken()})}async signOut(){var e,n,r;await this.waitForTarget.then(a=>a.signOut()),await((e=(0,Rt._)(r=n=this,vo))===null||e===void 0?void 0:e.call(n)),window.location.href=this.signOutTargetUrl}enableCookieAuth(e){if((0,Rt._)(this,vo))return;const n=Yr(e);(0,R._)(this,vo,async()=>{n();const r=await e.discoveryApi.getBaseUrl("app");try{await e.fetchApi.fetch(`${r}/.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,p._)(this,vo,{writable:!0,value:void 0}),this.waitForTarget=new Promise(e=>{this.resolveTarget=e})}}var Zr=t(1394);function Jr(s,e,n){if(s!==void 0){const a=n.find(l=>l.id===s);if(a)return a}if(e){const a=n.find(l=>l.variant==="dark");if(a)return a}const r=n.find(a=>a.variant==="light");return r||n[0]}const Xr=()=>{const s=(0,d.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[e,n]=(0,d.useState)(s.matches);return(0,d.useEffect)(()=>{const r=a=>{n(a.matches)};return s.addListener(r),()=>{s.removeListener(r)}},[s]),e};function Rs({children:s}){const e=(0,_n.gf)(ho),n=(0,Zr.A)(e.activeThemeId$(),e.getActiveThemeId()),r=window.matchMedia?Xr():!1,a=Jr(n,r,e.getInstalledThemes());if(!a)throw new Error("App has no themes");return(0,i.jsx)(a.Provider,{children:s})}const Is=async()=>qr();function qr(s="__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(s!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const a=JSON.parse(s);Array.isArray(a)?n.push(...a):n.push({data:a,context:"env"})}catch(a){throw new Error(`Failed to load runtime configuration, ${a}`)}const r=window.__APP_CONFIG__;return r&&n.push({context:"window",data:r}),n}class ti{add(e,n){return this.apis.push([e.id,n]),n}build(){return new xn(new Map(this.apis))}constructor(){(0,x._)(this,"apis",[])}}class xn{static builder(){return new ti}static from(e){return new xn(new Map(e.map(([n,r])=>[n.id,r])))}static with(e,n){return new xn(new Map([[e.id,n]]))}with(e,n){return new xn(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 ei(s){const e=new Map,n=new Map;for(const l of s){var r;for(const[b,A]of Object.entries((r=l.routes)!==null&&r!==void 0?r:{})){const D=`${l.getId()}.${b}`;if(e.has(D))throw new Error(`Unexpected duplicate route '${D}'`);e.set(D,A)}var a;for(const[b,A]of Object.entries((a=l.externalRoutes)!==null&&a!==void 0?a:{})){const D=`${l.getId()}.${b}`;if(n.has(D))throw new Error(`Unexpected duplicate external route '${D}'`);n.set(D,A)}}return{routes:e,externalRoutes:n}}function ni(s,e,n){var r;const a=ei(n),l=new Map;s&&s({bind:(F,Q)=>{for(const[st,ot]of Object.entries(Q)){const it=F[st];if(!it)throw new Error(`Key ${st} is not an existing external route`);if(!ot&&!it.optional)throw new Error(`External route ${st} is required but was undefined`);ot&&l.set(it,ot)}}});const b=(r=e.getOptionalConfig("app.routes.bindings"))===null||r===void 0?void 0:r.get(),A=new Set;if(b)for(const[D,F]of Object.entries(b)){if(!oi(F))throw new Error(`Invalid config at app.routes.bindings['${D}'], value must be a non-empty string or false`);const Q=a.externalRoutes.get(D);if(!Q)throw new Error(`Invalid config at app.routes.bindings, '${D}' is not a valid external route`);if(F===!1)A.add(Q),l.delete(Q);else if(!l.has(Q)){const st=a.routes.get(F);if(!st)throw new Error(`Invalid config at app.routes.bindings['${D}'], '${F}' is not a valid route`);l.set(Q,st)}}for(const D of a.externalRoutes.values())if(!l.has(D)&&!A.has(D)){const F="getDefaultTarget"in D?D.getDefaultTarget():void 0;if(F){const Q=a.routes.get(F);Q&&l.set(D,Q)}}return l}function oi(s){return!!(s===!1||typeof s=="string"&&s)}function Yn(){const[s]=(0,v.AV)((0,i.jsx)(v.qh,{index:!0,element:(0,i.jsx)("div",{})}));return!s.index}const Ds=(0,d.createContext)(void 0);var Ls=t(82266),Ms=t(93368),si=t(25862);const ri=(s,e)=>{try{const n=(0,Vn.ue)(e,{pathname:s}),r=n==null?void 0:n.filter(D=>{var F;return(D==null||(F=D.route.routeRefs)===null||F===void 0?void 0:F.size)>0}).pop(),a=r==null?void 0:r.route;if(!a||a.path===""&&s!=="/")return;let l;a.routeRefs.size===1&&(l=a.routeRefs.values().next().value);let b;a.plugins.size===1&&(b=a.plugins.values().next().value);const A=Object.entries((r==null?void 0:r.params)||{}).reduce((D,[F,Q])=>(Q!==void 0&&F!=="*"&&(D[F]=Q),D),{});return{extension:"App",pluginId:(b==null?void 0:b.getId())||"root",...l?{routeRef:l.id}:{},_routeNodeType:a.element,params:A}}catch{return}},ii=({pathname:s,search:e,hash:n,attributes:r})=>{const a=(0,Ms.s)();return(0,d.useEffect)(()=>{a.captureEvent("navigate",`${s}${e}${n}`,{attributes:r})},[a,s,e,n,r]),null},yo=({routeObjects:s})=>{const{pathname:e,search:n,hash:r}=(0,v.zy)(),{params:a,...l}=ri(e,s)||{params:{}};return(0,i.jsx)(si.Ig,{attributes:l,children:(0,i.jsx)(ii,{pathname:e,search:n,hash:r,attributes:a})})};function ai(s){return Yn()?os(s):""}function os(s){var e;let{pathname:n}=new URL((e=s.getOptionalString("app.baseUrl"))!==null&&e!==void 0?e:"/","http://sample.dev");return n=n.replace(/\/*$/,""),n}function Bs({component:s,appIdentityProxy:e,children:n}){const[r,a]=(0,d.useState)(),l=(0,_n.gf)(X.U),b=os(l);return r?(e.setTarget(r,{signOutTargetUrl:b||"/"}),(0,i.jsx)(i.Fragment,{children:n})):(0,i.jsx)(s,{onSignInSuccess:a})}function js(s){const{Router:e,SignInPage:n}=(0,Ls.n)().getComponents(),r=(0,_n.gf)(X.U),a=os(r),l=`${a}/*`,b=(0,d.useContext)(Ds);if(!b)throw new Error("AppRouter must be rendered within the AppProvider");const{routeObjects:A,appIdentityProxy:D}=b;return n?Yn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(yo,{routeObjects:A}),(0,i.jsx)(Bs,{component:n,appIdentityProxy:D,children:(0,i.jsx)(v.BV,{children:(0,i.jsx)(v.qh,{path:l,element:(0,i.jsx)(i.Fragment,{children:s.children})})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(yo,{routeObjects:A}),(0,i.jsx)(Bs,{component:n,appIdentityProxy:D,children:s.children})]}):(D.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}},{signOutTargetUrl:a||"/"}),Yn()?(0,i.jsxs)(e,{children:[(0,i.jsx)(yo,{routeObjects:A}),(0,i.jsx)(v.BV,{children:(0,i.jsx)(v.qh,{path:l,element:(0,i.jsx)(i.Fragment,{children:s.children})})})]}):(0,i.jsxs)(e,{basename:a,children:[(0,i.jsx)(yo,{routeObjects:A}),s.children]}))}(0,Te.h)(js,"core.type","AppRouter");const Qn="language",en="en";var Zn=new WeakMap,Cn=new WeakMap,Eo=new WeakMap;class Ao{static create(e){var n;const r=(n=e==null?void 0:e.availableLanguages)!==null&&n!==void 0?n:[en];if(r.length!==new Set(r).size)throw new Error(`Supported languages may not contain duplicates, got '${r.join("', '")}'`);if(!r.includes(en))throw new Error(`Supported languages must include '${en}'`);var a;const l=(a=e==null?void 0:e.defaultLanguage)!==null&&a!==void 0?a:en;if(!r.includes(l))throw new Error(`Initial language must be one of the supported languages, got '${l}'`);return new Ao(r,l)}static createWithStorage(e){const n=Ao.create(e);if(!window.localStorage)return n;const r=window.localStorage.getItem(Qn),{languages:a}=n.getAvailableLanguages();return r&&a.includes(r)&&n.setLanguage(r),n.language$().subscribe(({language:l})=>{l!==window.localStorage.getItem(Qn)&&window.localStorage.setItem(Qn,l)}),window.addEventListener("storage",l=>{if(l.key===Qn){var b;const A=(b=localStorage.getItem(Qn))!==null&&b!==void 0?b:void 0;A&&n.setLanguage(A)}}),n}getAvailableLanguages(){return{languages:(0,Rt._)(this,Zn).slice()}}setLanguage(e){const n=e!=null?e:en;if(n!==(0,Rt._)(this,Cn)){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,R._)(this,Cn,n),(0,Rt._)(this,Eo).next({language:n})}}getLanguage(){return{language:(0,Rt._)(this,Cn)}}language$(){return(0,Rt._)(this,Eo)}constructor(e,n){(0,p._)(this,Zn,{writable:!0,value:void 0}),(0,p._)(this,Cn,{writable:!0,value:void 0}),(0,p._)(this,Eo,{writable:!0,value:void 0}),(0,R._)(this,Zn,e),(0,R._)(this,Cn,n),(0,R._)(this,Eo,new et({language:(0,Rt._)(this,Cn)}))}}var ke=t(75944),pn=t(91196),li=t(47304),ci=t(99833),Us=t(93184);function $s(s){return Object.fromEntries(Object.entries(s).filter(e=>e[1]!==null))}var bn=new WeakMap,xo=new WeakMap,Sn=new WeakMap,Co=new WeakSet;class di{addTranslationResource(e){const n=(0,ci.Y)(e);for(const r of n.resources){const a=(0,ke._)(this,Co,ss).call(this,r.language,n.id);(0,Rt._)(this,Sn).has(a)||(0,Rt._)(this,Sn).set(a,r.loader)}}needsLoading(e,n){const r=(0,ke._)(this,Co,ss).call(this,e,n);return(0,Rt._)(this,Sn).get(r)?!(0,Rt._)(this,bn).has(r):!1}async load(e,n){const r=(0,ke._)(this,Co,ss).call(this,e,n),a=(0,Rt._)(this,Sn).get(r);if(!a||(0,Rt._)(this,bn).has(r))return;const l=(0,Rt._)(this,xo).get(r);if(l){await l;return}const b=a().then(A=>{this.onLoad({language:e,namespace:n,messages:A.messages}),(0,Rt._)(this,bn).add(r)},A=>{throw(0,Rt._)(this,bn).add(r),A});(0,Rt._)(this,xo).set(r,b),await b}constructor(e){(0,pn._)(this,Co),(0,x._)(this,"onLoad",void 0),(0,p._)(this,bn,{writable:!0,value:void 0}),(0,p._)(this,xo,{writable:!0,value:void 0}),(0,p._)(this,Sn,{writable:!0,value:void 0}),this.onLoad=e,(0,R._)(this,bn,new Set),(0,R._)(this,xo,new Map),(0,R._)(this,Sn,new Map)}}function ss(s,e){return`${s}/${e}`}var Jn=new WeakMap,On=new WeakMap,fn=new WeakMap,rs=new WeakMap,bo=new WeakMap,Fs=new WeakSet,So=new WeakSet,is=new WeakSet;class as{static create(e){const{languages:n}=e.languageApi.getAvailableLanguages(),r=(0,li.Q_)({fallbackLng:en,supportedLngs:n,interpolation:{escapeValue:!1},ns:[],defaultNS:!1,fallbackNS:!1,initImmediate:!1});if(r.init(),!r.isInitialized)throw new Error("i18next was unexpectedly not initialized");const{language:a}=e.languageApi.getLanguage();a!==en&&r.changeLanguage(a);const l=new di(D=>{r.addResourceBundle(D.language,D.namespace,$s(D.messages),!1,!0)}),b=(e==null?void 0:e.resources)||[];for(let D=b.length-1;D>=0;D--){const F=b[D];F.$$type==="@backstage/TranslationResource"?l.addTranslationResource(F):F.$$type==="@backstage/TranslationMessages"&&r.addResourceBundle(en,F.id,$s(F.messages),!0,!1)}const A=new as(r,l,e.languageApi.getLanguage().language);return e.languageApi.language$().subscribe(({language:D})=>{(0,ke._)(A,Fs,ui).call(A,D)}),A}getTranslation(e){const n=(0,Us.v)(e);return(0,ke._)(this,is,Ns).call(this,n),(0,ke._)(this,So,ls).call(this,n)}translation$(e){const n=(0,Us.v)(e);return(0,ke._)(this,is,Ns).call(this,n),new(N())(r=>{let a={};const l=()=>{a={};const A=a;(0,Rt._)(this,On).load((0,Rt._)(this,fn),n.id).then(()=>{if(A===a){const D=(0,ke._)(this,So,ls).call(this,n);D.ready&&r.next(D)}},D=>{A===a&&r.error(Array.isArray(D)?D[0]:D)})},b=()=>{const A=(0,ke._)(this,So,ls).call(this,n);A.ready?r.next(A):l()};return(0,Rt._)(this,On).needsLoading((0,Rt._)(this,fn),n.id)&&l(),(0,Rt._)(this,bo).add(b),()=>{(0,Rt._)(this,bo).delete(b)}})}constructor(e,n,r){(0,pn._)(this,Fs),(0,pn._)(this,So),(0,pn._)(this,is),(0,p._)(this,Jn,{writable:!0,value:void 0}),(0,p._)(this,On,{writable:!0,value:void 0}),(0,p._)(this,fn,{writable:!0,value:void 0}),(0,p._)(this,rs,{writable:!0,value:new Set}),(0,p._)(this,bo,{writable:!0,value:new Set}),(0,R._)(this,Jn,e),(0,R._)(this,On,n),(0,R._)(this,fn,r)}}function ui(s){(0,Rt._)(this,fn)!==s&&((0,R._)(this,fn,s),(0,Rt._)(this,Jn).changeLanguage(s),(0,Rt._)(this,bo).forEach(e=>e()))}function ls(s){return(0,Rt._)(this,On).needsLoading((0,Rt._)(this,fn),s.id)?{ready:!1}:{ready:!0,t:(0,Rt._)(this,Jn).getFixedT(null,s.id)}}function Ns(s){if((0,Rt._)(this,rs).has(s.id))return;(0,Rt._)(this,rs).add(s.id);const e=s.getDefaultMessages();(0,Rt._)(this,Jn).addResourceBundle(en,s.id,e,!0,!1);const n=s.getDefaultResource();n&&(0,Rt._)(this,On).addTranslationResource(n)}function Ws(s){const e=new URL(s);return e.protocol=document.location.protocol,e.hostname=document.location.hostname,e.port=document.location.port,e.toString().replace(/\/$/,"")}function hi(s){const e=En.fromConfigs(s),n=e.getOptionalString("app.baseUrl"),r=e.getOptionalString("backend.baseUrl");let a=s,l,b;if(n&&r){const A=new URL(n).origin,D=new URL(r).origin;if(A===D){const F=Ws(r);r!==F&&(l=F)}}if(n){const A=Ws(n);n!==A&&(b=A)}return(b||l)&&(a=a.concat({data:{app:b&&{baseUrl:b},backend:l&&{baseUrl:l}},context:"relative-resolver"})),a}function gi(){const s=document.querySelector('meta[name="backstage-app-mode"]');var e;return((e=s==null?void 0:s.getAttribute("content"))!==null&&e!==void 0?e:"public")==="protected"}function pi(s,e,n){var r;const a=!!s,l=(0,kn.A)(s||(()=>Promise.resolve([])));let b;if(a&&l.loading){const{Progress:F}=e;b=(0,i.jsx)(F,{})}else if(l.error){const{BootErrorPage:F}=e;b=(0,i.jsx)(F,{step:"load-config",error:l.error})}const{ThemeProvider:A=Rs}=e;return b?{node:(0,i.jsx)(Jo,{apis:xn.with(ho,n),children:(0,i.jsx)(A,{children:b})})}:{api:En.fromConfigs(!((r=l.value)===null||r===void 0)&&r.length?hi(l.value):[])}}class fi{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 cs=new WeakMap;class mi{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,cs))throw new Error("app.getProvider() or app.createRoot() has already been called, and can only be called once");(0,R._)(this,cs,!0);const e=new fi(this);let n,r;return({children:l})=>{const b=(0,d.useRef)(!0),A=(0,d.useMemo)(()=>uo.createWithStorage(this.themes),[]),{routing:D,featureFlags:F}=(0,d.useMemo)(()=>{const Lt=Yn();Lt&&console.warn(`
|
|
4
|
+
DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
|
|
5
|
+
Please migrate to use React Router v6 stable.
|
|
6
|
+
See https://backstage.io/docs/tutorials/react-router-stable-migration
|
|
7
|
+
`);const Kt=Sr({root:l,discoverers:[Or,Pr],collectors:{routing:Lt?Rr:Tr,collectedPlugins:wr,featureFlags:Ir}});return Kt.collectedPlugins.forEach(ve=>this.plugins.add(ve)),this.verifyPlugins(this.plugins),this.getApiHolder(),Kt},[l]),Q=pi(this.configLoader,this.components,A),st="api"in Q;if(st){const{api:Lt}=Q;this.configApi=Lt}if("node"in Q)return Q.node;if(r)throw r;if(!n)try{n=ni(this.bindRoutes,Q.api,this.plugins),Wr(D.paths,D.parents),kr(n,this.plugins)}catch(Lt){throw r=Lt,Lt}if(st&&b.current){b.current=!1;const Lt=this.getApiHolder().get(An.B);if(Lt){for(const re of this.featureFlags)Lt.registerFlag({...re,pluginId:""});for(const re of this.plugins.values())if("getFeatureFlags"in re)for(const Le of re.getFeatureFlags())Lt.registerFlag({name:Le.name,pluginId:re.getId()});else for(const Le of re.output())Le.type==="feature-flag"&&Lt.registerFlag({name:Le.name,pluginId:re.getId()});const Kt=Lt.getRegisteredFlags(),ve=new Set(Kt.map(re=>re.name));for(const re of F)ve.has(re)||Lt.registerFlag({name:re,pluginId:""})}}const{ThemeProvider:ot=Rs,Progress:it}=this.components,yt=this.getApiHolder();if(gi()){const Lt=yt.get(Ft.m),Kt=yt.get(ue.a),ve=yt.get(nt.I);if(!Lt||!Kt||!ve)throw new Error("App is running in protected mode but missing required APIs");this.appIdentityProxy.enableCookieAuth({errorApi:Lt,fetchApi:Kt,discoveryApi:ve})}return(0,i.jsx)(Jo,{apis:yt,children:(0,i.jsx)(zr,{appContext:e,children:(0,i.jsx)(ot,{children:(0,i.jsx)(Nr,{routePaths:D.paths,routeParents:D.parents,routeObjects:D.objects,routeBindings:n,basePath:ai(Q.api),children:(0,i.jsx)(Ds.Provider,{value:{routeObjects:D.objects,appIdentityProxy:this.appIdentityProxy},children:(0,i.jsx)(d.Suspense,{fallback:(0,i.jsx)(it,{}),children:l})})})})})})}}getRouter(){return js}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 ts.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:ho,deps:{},factory:()=>uo.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:X.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:le.K,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("static",{api:As,deps:{},factory:()=>this.appLanguageApi}),this.apiFactoryRegistry.register("default",{api:Cr.J,deps:{languageApi:As},factory:({languageApi:e})=>as.create({languageApi:e,resources:this.translationResources})}),this.apiFactoryRegistry.register("default",{api:An.B,deps:{},factory:()=>new xr});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 ts.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new ts(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(e){const n=new Set;for(const r of e){const a=r.getId();if(n.has(a))throw new Error(`Duplicate plugin found '${a}'`);n.add(a)}}constructor(e){var n,r,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 Qr),(0,x._)(this,"apiFactoryRegistry",void 0),(0,p._)(this,cs,{writable:!0,value:!1});var l;this.apis=(l=e.apis)!==null&&l!==void 0?l:[],this.icons=e.icons;var b;this.plugins=new Set((b=e.plugins)!==null&&b!==void 0?b:[]);var A;this.featureFlags=(A=e.featureFlags)!==null&&A!==void 0?A:[],this.components=e.components,this.themes=e.themes;var D;this.configLoader=(D=e.configLoader)!==null&&D!==void 0?D:Is;var F;this.defaultApis=(F=e.defaultApis)!==null&&F!==void 0?F:[],this.bindRoutes=e.bindRoutes,this.apiFactoryRegistry=new br,this.appLanguageApi=Ao.createWithStorage({defaultLanguage:(n=e.__experimentalTranslations)===null||n===void 0?void 0:n.defaultLanguage,availableLanguages:(r=e.__experimentalTranslations)===null||r===void 0?void 0:r.availableLanguages});var Q;this.translationResources=(Q=(a=e.__experimentalTranslations)===null||a===void 0?void 0:a.resources)!==null&&Q!==void 0?Q:[]}}function vi(s){return new mi(s)}function yi(s){var e,n,r,a;return vi({...s,apis:(e=s==null?void 0:s.apis)!==null&&e!==void 0?e:[],bindRoutes:s==null?void 0:s.bindRoutes,components:{...L,...s==null?void 0:s.components},configLoader:s==null?void 0:s.configLoader,defaultApis:Lo,icons:{...ro,...s==null?void 0:s.icons},plugins:(n=s==null?void 0:s.plugins)!==null&&n!==void 0?n:[],featureFlags:(r=s==null?void 0:s.featureFlags)!==null&&r!==void 0?r:[],themes:(a=s==null?void 0:s.themes)!==null&&a!==void 0?a:Wn})}var Oo=t(82442);let ks=!1;const Ks=s=>{const e=(0,Ls.n)(),{NotFoundErrorPage:n}=e.getComponents(),r=(0,d.useMemo)(()=>Yn(),[]),l=[...(0,Oo.O)(s.children,b=>b.getElements().flatMap(A=>{let D=A.props.path;if(D==="")return[];var F;D=(F=D==null?void 0:D.replace(/\/\*$/,""))!==null&&F!==void 0?F:"/";let Q=r?A:A.props.element;return!r&&!Q&&(Q=A,ks||(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] />} />."),ks=!0)),[{path:D,element:Q,children:A.props.children?[{path:D==="/"?"/":"*",element:A.props.children}]:void 0}]}).sort((A,D)=>D.path.localeCompare(A.path)).map(A=>({...A,path:A.path==="/"?"/":`${A.path}/*`}))),{path:"*",element:(0,i.jsx)(n,{})}];return(0,v.Ye)(l)};(0,Te.h)(Ks,"core.type","FlatRoutes");var rn=t(6820),Ei=t(78692),Ai=t(86519);function zs(s){return!s.cursor}function Za(s){return!zs(s)}const Se="catalog";var Oe=t(94214);class xi{async analyzeLocation(e,n){const r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/analyze-location").expand({});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/locations{?dryRun}").expand({...e.query});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/entities{?fields,limit,filter*,offset,after,order*}").expand({...e.query});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/entities/by-query{?fields,limit,orderField*,cursor,filter*,fullTextFilterTerm,fullTextFilterFields}").expand({...e.query});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/entities/by-refs/{?filter*}").expand({...e.query});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.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(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.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(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/entities/by-uid/{uid}").expand({uid:e.path.uid});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/entity-facets{?facet*,filter*}").expand({...e.query});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/locations/{id}").expand({id:e.path.id});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.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(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/locations").expand({});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/refresh").expand({});return await this.fetchApi.fetch(`${r}${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 r=await this.discoveryApi.getBaseUrl(Se),l=Oe.parse("/validate-entity").expand({});return await this.fetchApi.fetch(`${r}${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:je()}}}class Ci{async getEntityAncestors(e,n){return await this.requestRequired(await this.apiClient.getEntityAncestryByName({path:(0,rn.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,rn.KU)(e)},n))}async getEntities(e,n){const{filter:r=[],fields:a=[],order:l,offset:b,limit:A,after:D}=e!=null?e:{},F=[];if(l)for(const ot of[l].flat())ot&&F.push(`${ot.order}:${ot.field}`);const Q=await this.requestRequired(await this.apiClient.getEntities({query:{fields:a,limit:A,filter:this.getFilterValue(r),offset:b,after:D,order:l?F:void 0}},n));if(F.length)return{items:Q};const st=(ot,it)=>{var yt,Lt;if(((yt=ot.metadata)===null||yt===void 0?void 0:yt.name)===void 0||ot.kind===void 0||((Lt=it.metadata)===null||Lt===void 0?void 0:Lt.name)===void 0||it.kind===void 0)return 0;const Kt=(0,rn.U2)(ot),ve=(0,rn.U2)(it);return Kt<ve?-1:Kt>ve?1:0};return{items:Q.sort(st)}}async getEntitiesByRefs(e,n){const r=await this.apiClient.getEntitiesByRefs({body:{entityRefs:e.entityRefs,fields:e.fields},query:{filter:this.getFilterValue(e.filter)}},n);if(!r.ok)throw await he.o.fromResponse(r);const{items:a}=await r.json();return{items:a.map(l=>l!=null?l:void 0)}}async queryEntities(e={},n){const r={};if(zs(e)){var a,l;const{fields:b=[],filter:A,limit:D,orderFields:F,fullTextFilter:Q}=e;r.filter=this.getFilterValue(A),D!==void 0&&(r.limit=D),F!==void 0&&(r.orderField=(Array.isArray(F)?F:[F]).map(({field:ot,order:it})=>`${ot},${it}`)),b.length&&(r.fields=b);const st=Q==null||(a=Q.term)===null||a===void 0?void 0:a.trim();st&&(r.fullTextFilterTerm=st),!(Q==null||(l=Q.fields)===null||l===void 0)&&l.length&&(r.fullTextFilterFields=Q.fields)}else{const{fields:b=[],limit:A,cursor:D}=e;r.cursor=D,A!==void 0&&(r.limit=A),b.length&&(r.fields=b)}return this.apiClient.getEntitiesByQuery({query:r},n).then(b=>b.json())}async getEntityByRef(e,n){return this.requestOptional(await this.apiClient.getEntityByName({path:(0,rn.KU)(e)},n))}async getEntityByName(e,n){const{kind:r,namespace:a="default",name:l}=e;return this.requestOptional(await this.apiClient.getEntityByName({path:{kind:r,namespace:a,name:l}},n))}async refreshEntity(e,n){const r=await this.apiClient.refreshEntity({body:{entityRef:e}},n);if(r.status!==200)throw new Error(await r.text())}async getEntityFacets(e,n){const{filter:r=[],facets:a}=e;return await this.requestOptional(await this.apiClient.getEntityFacets({query:{facet:a,filter:this.getFilterValue(r)}},n))}async addLocation(e,n){const{type:r="url",target:a,dryRun:l}=e,b=await this.apiClient.createLocation({body:{type:r,target:a},query:{dryRun:l?"true":void 0}},n);if(b.status!==201)throw new Error(await b.text());const{location:A,entities:D,exists:F}=await b.json();if(!A)throw new Error(`Location wasn't added: ${a}`);return{location:A,entities:D,exists:F}}async getLocationByRef(e,n){return(await this.requestRequired(await this.apiClient.getLocations({},n))).map(a=>a.data).find(a=>e===(0,Ei.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,r){const a=await this.apiClient.validateEntity({body:{entity:e,location:n}},r);if(a.ok)return{valid:!0};if(a.status!==400)throw await he.o.fromResponse(a);const{errors:l=[]}=await a.json();return{valid:!1,errors:l}}async requestIgnored(e){if(!e.ok)throw await he.o.fromResponse(e)}async requestRequired(e){if(!e.ok)throw await he.o.fromResponse(e);return e.json()}async requestOptional(e){if(!e.ok){if(e.status===404)return;throw await he.o.fromResponse(e)}return await e.json()}getFilterValue(e=[]){const n=[];for(const r of[e].flat()){const a=[];for(const[l,b]of Object.entries(r))for(const A of[b].flat())A===Ai.c?a.push(l):typeof A=="string"&&a.push(`${l}=${A}`);a.length&&n.push(a.join(","))}return n}constructor(e){(0,x._)(this,"apiClient",void 0),this.apiClient=new xi(e)}}var Hs=t(7341),bi=t(18),Si=t(82292),_s=t(29207),Pn=t(95203),Oi=t(9803),$e=t(88758),Pi=t(54560),wn=t(45250);async function wi({storageApi:s}){const e=s.forBucket("settings"),n=s.forBucket("starredEntities"),r=e.snapshot("starredEntities").value;if(!(0,wn.isArray)(r))return;var a;const l=new Set((a=n.snapshot("entityRefs").value)!==null&&a!==void 0?a:[]);r.filter(wn.isString).map(b=>b.split(":")).filter(b=>b.length===4&&b[0]==="entity").map(([b,A,D,F])=>(0,rn.U2)({kind:A,namespace:D,name:F})).forEach(b=>l.add(b)),await n.set("entityRefs",Array.from(l)),await e.remove("starredEntities")}class Ti{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(N())(r=>(r.next(new Set(this.starredEntities)),this.subscribers.add(r),()=>{this.subscribers.delete(r)}))),wi(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:r=>{var a;this.starredEntities=new Set((a=r.value)!==null&&a!==void 0?a:[]),this.notifyChanges()}})}}function ds(s){const{years:e=0,months:n=0,weeks:r=0,days:a=0,hours:l=0,minutes:b=0,seconds:A=0,milliseconds:D=0}=s;return((((e*365+n*30+r*7+a)*24+l)*60+b)*60+A)*1e3+D}var Ri=t(25033),Ii=t.n(Ri),Di=t(25295),Li=t.n(Di),Mi=t(88083);const Bi={seconds:10},ji={milliseconds:50},Ui={api:to.A,component:no.A,system:qn.A,resource:oo.A,domain:Bn.A,location:eo.A,user:$n.A,group:Un.A,template:so.A};function Vs(s){return{async:s.async,render:({entityRef:e,entity:n,context:r})=>({snapshot:(0,Mi.T)(n||e,r),loadEntity:s.async})}}var Po=new WeakMap,us=new WeakMap,wo=new WeakMap,hs=new WeakMap,To=new WeakMap,Gs=new WeakSet,Ys=new WeakSet,Qs=new WeakSet;class Ro{static createLocal(){return new Ro({renderer:Vs({async:!1})})}static create(e){return new Ro(e)}forEntity(e,n){const{entityRef:r,kind:a,entity:l,needsLoad:b}=(0,ke._)(this,Gs,$i).call(this,e),A=ot=>{const{snapshot:it}=(0,Rt._)(this,To).render({entityRef:r,loading:ot.loading,entity:ot.entity,context:n||{}});return{...it,entityRef:r,Icon:(0,ke._)(this,Qs,Ni).call(this,it.Icon,a)}};let D;try{D=A({loading:b,entity:l})}catch{D={primaryTitle:r,entityRef:r}}if(!b)return{snapshot:D,promise:Promise.resolve(D)};const F=Promise.resolve().then(()=>{var ot;return(ot=(0,Rt._)(this,wo))===null||ot===void 0?void 0:ot.load(r)}).then(ot=>A({loading:!1,entity:ot!=null?ot:l})).catch(()=>{}),Q=new(N())(ot=>{let it=!1;return F.then(yt=>{yt&&ot.next(yt)}).finally(()=>{it||ot.complete()}),()=>{it=!0}}),st=F.then(ot=>ot!=null?ot:D);return{snapshot:D,update$:Q,promise:st}}constructor(e){(0,pn._)(this,Gs),(0,pn._)(this,Ys),(0,pn._)(this,Qs),(0,p._)(this,Po,{writable:!0,value:void 0}),(0,p._)(this,us,{writable:!0,value:void 0}),(0,p._)(this,wo,{writable:!0,value:void 0}),(0,p._)(this,hs,{writable:!0,value:void 0}),(0,p._)(this,To,{writable:!0,value:void 0});var n;const r=(n=e.cacheTtl)!==null&&n!==void 0?n:Bi;var a;const l=(a=e.batchDelay)!==null&&a!==void 0?a:ji;var b;const A=(b=e.renderer)!==null&&b!==void 0?b:Vs({async:!0}),D={};Object.entries(Ui).forEach(([Q,st])=>{D[Q.toLocaleLowerCase("en-US")]=st});var F;if(Object.entries((F=e.kindIcons)!==null&&F!==void 0?F:{}).forEach(([Q,st])=>{D[Q.toLocaleLowerCase("en-US")]=st}),A.async){if(!e.catalogApi)throw new TypeError("Asynchronous rendering requires a catalog API");(0,R._)(this,wo,(0,ke._)(this,Ys,Fi).call(this,{cacheTtl:r,batchDelay:l,renderer:A,catalogApi:e.catalogApi}))}(0,R._)(this,us,ds(r)),(0,R._)(this,Po,new Map),(0,R._)(this,hs,D),(0,R._)(this,To,A)}}function $i(s){if(typeof s!="string")return{entity:s,kind:s.kind,entityRef:(0,rn.U2)(s),needsLoad:!1};const e=(0,Rt._)(this,Po).get(s),n=e==null?void 0:e.entity,a=(!e||Date.now()-e.updatedAt>(0,Rt._)(this,us))&&(0,Rt._)(this,To).async!==!1&&(0,Rt._)(this,wo)!==void 0;return{entity:n,kind:(0,rn.KU)(s).kind,entityRef:s,needsLoad:a}}function Fi(s){const e=ds(s.cacheTtl),n=ds(s.batchDelay);return new(Ii())(async r=>{const{items:a}=await s.catalogApi.getEntitiesByRefs({entityRefs:r}),l=Date.now();return r.forEach((b,A)=>{(0,Rt._)(this,Po).set(b,{updatedAt:l,entity:a[A]})}),a},{name:"DefaultEntityPresentationApi",cacheMap:new(Li())(e),maxBatchSize:100,batchScheduleFn:n?r=>setTimeout(r,n):void 0})}function Ni(s,e){return s||(s===!1?!1:(0,Rt._)(this,hs)[e.toLocaleLowerCase("en-US")])}const De=(0,Oi.i)({id:"catalog",apis:[(0,B.b)({api:Hs.v,deps:{discoveryApi:nt.I,fetchApi:ue.a},factory:({discoveryApi:s,fetchApi:e})=>new Ci({discoveryApi:s,fetchApi:e})}),(0,B.b)({api:bi.a,deps:{storageApi:ge},factory:({storageApi:s})=>new Ti({storageApi:s})}),(0,B.b)({api:Si.n,deps:{catalogApi:Hs.v},factory:({catalogApi:s})=>Ro.create({catalogApi:s})})],routes:{catalogIndex:Pn.rQ,catalogEntity:_s.s},externalRoutes:{createComponent:Pn.qP,viewTechDoc:Pn.UJ,createFromTemplate:Pn.Zg,unregisterRedirect:Pn.pS}}),Ja=De.provide((0,$e.QJ)({name:"CatalogIndexPage",component:()=>Promise.all([t.e(3720),t.e(4919),t.e(898)]).then(t.bind(t,80898)).then(s=>s.CatalogPage),mountPoint:Pn.rQ})),Wi=De.provide((0,$e.QJ)({name:"CatalogEntityPage",component:()=>t.e(4516).then(t.bind(t,54516)).then(s=>s.CatalogEntityPage),mountPoint:_s.s})),Xa=De.provide((0,$e.NC)({name:"EntityAboutCard",component:{lazy:()=>Promise.all([t.e(3720),t.e(1902),t.e(5724)]).then(t.bind(t,65724)).then(s=>s.AboutCard)}})),qa=De.provide((0,$e.NC)({name:"EntityLinksCard",component:{lazy:()=>t.e(8307).then(t.bind(t,18307)).then(s=>s.EntityLinksCard)}})),tl=De.provide((0,$e.NC)({name:"EntityLabelsCard",component:{lazy:()=>t.e(3182).then(t.bind(t,63182)).then(s=>s.EntityLabelsCard)}})),el=De.provide((0,$e.NC)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(9652).then(t.bind(t,9652)).then(s=>s.HasSystemsCard)}})),nl=De.provide((0,$e.NC)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(2420).then(t.bind(t,52420)).then(s=>s.HasComponentsCard)}})),ol=De.provide((0,$e.NC)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8384).then(t.bind(t,78384)).then(s=>s.HasSubcomponentsCard)}})),sl=De.provide((0,$e.NC)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(6271).then(t.bind(t,56271)).then(s=>s.HasResourcesCard)}})),rl=De.provide((0,$e.NC)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(3632).then(t.bind(t,3632)).then(s=>s.DependsOnComponentsCard)}})),il=De.provide((0,$e.NC)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(124).then(t.bind(t,124)).then(s=>s.DependencyOfComponentsCard)}})),al=De.provide((0,$e.NC)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(287).then(t.bind(t,20287)).then(s=>s.DependsOnResourcesCard)}})),ll=De.provide((0,$e.NC)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(2401).then(t.bind(t,52401)).then(s=>s.RelatedEntitiesCard)}})),cl=De.provide((0,Pi.ec)({name:"CatalogSearchResultListItem",component:()=>t.e(1297).then(t.bind(t,61297)).then(s=>s.CatalogSearchResultListItem),predicate:s=>s.type==="software-catalog"}));var Zs=t(3347),Js=t(26679);class ki{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(e,n){const 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,r){const a=await this.getApiOrigin();return new URL(e,`${a}/${r}`).toString()}constructor({configApi:e,discoveryApi:n,identityApi:r}){(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=r}}class Ki{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:r}){(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=r}}const zi=[(0,B.b)({api:Js.s,deps:{configApi:X.U,discoveryApi:nt.I,identityApi:le.K},factory:({configApi:s,discoveryApi:e,identityApi:n})=>new ki({configApi:s,discoveryApi:e,identityApi:n})}),(0,B.b)({api:Js.l,deps:{configApi:X.U,discoveryApi:nt.I,identityApi:le.K},factory:({configApi:s,discoveryApi:e,identityApi:n})=>new Ki({configApi:s,discoveryApi:e,identityApi:n})}),(0,B.b)({api:Zs.Y,deps:{configApi:X.U},factory:({configApi:s})=>Zs.L.fromConfig(s)})],Hi={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},_i={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Vi(){const s=await fetch("/.detect");return s.ok?(await s.text()).trim()==="techdocs-cli-server":!1}async function Gi(){const s=await Is(),e=await Vi();return[...s,{context:"detected",data:e?Hi:_i}]}var nn=t(58837),Yi=t(3210);const Qi=(0,nn.A)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}}),Zi=()=>{const s=Qi();return(0,i.jsx)("svg",{className:s.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,i.jsx)("path",{className:s.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"})})},Ji=(0,nn.A)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}}),Xi=()=>{const s=Ji();return(0,i.jsx)("svg",{className:s.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,i.jsx)("path",{className:s.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"})})};var Pe=t(72664);const Xs={isOpen:!1,setOpen:()=>{}},qs=(0,d.createContext)(Xs),tr=(0,yn.tK)("sidebar-open-state-context");function er(s){const{children:e,value:n}=s;return(0,i.jsx)(qs.Provider,{value:n,children:(0,i.jsx)(tr.Provider,{value:(0,lo.B)({1:n}),children:e})})}const gs=()=>{const s=(0,d.useContext)(tr),e=(0,d.useContext)(qs);if(s===void 0)return e||Xs;const n=s.atVersion(1);if(n===void 0)throw new Error("No context found for version 1.");return n};var nr=t(72072),or=t(73524),an=t(10394),sr=t(5893),qi=t(53373),mn=t.n(qi),ta=t(1125),rr=t(29365),ea=t(73845),ps=t(72501),na=t(32881),oa=t(27326),sa=t(13085);const ir=(0,d.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}});var fs=t(34435);const ra=(0,nn.A)(s=>({root:{flexGrow:0,margin:s.spacing(0,2),color:s.palette.navigation.color},selected:e=>({color:`${s.palette.navigation.selectedColor}!important`,borderTop:`solid ${e.sidebarConfig.selectedIndicatorWidth}px ${s.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),ia=s=>{const{to:e,label:n,icon:r,value:a}=s,{sidebarConfig:l}=(0,d.useContext)(Pe.yY),b=ra({sidebarConfig:l}),A=(0,v.zy)(),{selectedMenuItemIndex:D,setSelectedMenuItemIndex:F}=(0,d.useContext)(ir),Q=(ot,it)=>{F(it===D?-1:it)},st=a===D&&D>=0||a!==D&&!(D>=0)&&e===A.pathname;return(0,i.jsx)(sa.A,{"aria-label":n,label:n,icon:r,component:nr.N_,to:e||A.pathname,onChange:Q,value:a,selected:st,classes:b})},ar=s=>{const{children:e,to:n,label:r,icon:a,value:l}=s,{isMobile:b}=(0,fs.Ut)();return b?(0,i.jsx)(ia,{to:n,label:r,icon:a,value:l}):(0,i.jsx)(i.Fragment,{children:e})},lr=(0,nn.A)(s=>({root:{position:"fixed",backgroundColor:s.palette.navigation.background,color:s.palette.navigation.color,bottom:0,left:0,right:0,zIndex:s.zIndex.snackbar,borderTop:"1px solid #383838","@media print":{display:"none"}},overlay:e=>({background:s.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:s.palette.navigation.color,alignItems:"center",justifyContent:"space-between",padding:s.spacing(2,3)},overlayHeaderClose:{color:s.palette.navigation.color},marginMobileSidebar:e=>({marginBottom:`${e.sidebarConfig.mobileSidebarHeight}px`})})),aa=s=>(0,wn.orderBy)(s,({props:{priority:e}})=>Number.isInteger(e)?e:-1,"desc"),la=d.createElement(ar).type,ca=({children:s,label:e="Menu",open:n,onClose:r})=>{const{sidebarConfig:a}=(0,d.useContext)(Pe.yY),l=lr({sidebarConfig:a});return(0,i.jsxs)(ea.Ay,{anchor:"bottom",open:n,onClose:r,ModalProps:{BackdropProps:{classes:{root:l.marginMobileSidebar}}},classes:{root:l.marginMobileSidebar,paperAnchorBottom:l.overlay},children:[(0,i.jsxs)(an.A,{className:l.overlayHeader,children:[(0,i.jsx)(ps.A,{variant:"h3",children:e}),(0,i.jsx)(rr.A,{onClick:r,classes:{root:l.overlayHeaderClose},children:(0,i.jsx)(na.A,{})})]}),(0,i.jsx)(an.A,{component:"nav",children:s})]})},da=s=>{const{sidebarConfig:e}=(0,d.useContext)(Pe.yY),{children:n}=s,r=lr({sidebarConfig:e}),a=(0,v.zy)(),[l,b]=(0,d.useState)(-1);(0,d.useEffect)(()=>{b(-1)},[a.pathname]);let A=(0,Oo.O)(n,F=>F.getElements().filter(Q=>Q.type===la));if(n)A.length?A=aa(A):A.push((0,i.jsx)(ar,{icon:(0,i.jsx)(oa.A,{}),children:n},"default_menu"));else return null;const D=l>=0&&!A[l].props.to;return(0,i.jsx)(er,{value:{isOpen:!0,setOpen:()=>{}},children:(0,i.jsxs)(ir.Provider,{value:{selectedMenuItemIndex:l,setSelectedMenuItemIndex:b},children:[(0,i.jsx)(ca,{label:A[l]&&A[l].props.label,open:D,onClose:()=>b(-1),children:A[l]&&A[l].props.children}),(0,i.jsx)(ta.A,{className:r.root,"data-testid":"mobile-sidebar-root",component:"nav",children:A})]})})};var ua=t(87849),ha=t(10315);const cr=(0,nn.A)(s=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:s.zIndex.appBar,background:s.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",transition:s.transitions.create("width",{easing:s.transitions.easing.sharp,duration:s.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:s.transitions.create("width",{easing:s.transitions.easing.sharp,duration:s.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var dr;(function(s){s[s.Closed=0]="Closed",s[s.Idle=1]="Idle",s[s.Open=2]="Open"})(dr||(dr={}));const ga=s=>{const{sidebarConfig:e}=(0,d.useContext)(Pe.yY),{openDelayMs:n=e.defaultOpenDelayMs,closeDelayMs:r=e.defaultCloseDelayMs,disableExpandOnHover:a,children:l}=s,b=cr({sidebarConfig:e}),A=(0,sr.A)(ve=>ve.breakpoints.down("md"),{noSsr:!0}),[D,F]=(0,d.useState)(0),Q=(0,d.useRef)(),{isPinned:st,toggleSidebarPinState:ot}=(0,fs.Ut)(),it=()=>{st||a||(Q.current&&(clearTimeout(Q.current),Q.current=void 0),D!==2&&!A&&(Q.current=window.setTimeout(()=>{Q.current=void 0,F(2)},n),F(1)))},yt=()=>{st||a||(Q.current&&(clearTimeout(Q.current),Q.current=void 0),D===1?F(0):D===2&&(Q.current=window.setTimeout(()=>{Q.current=void 0,F(0)},r)))},Lt=D===2&&!A||st,Kt=ve=>{ve?(F(2),ot()):(F(0),ot())};return(0,i.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,i.jsx)(fa,{}),(0,i.jsx)(er,{value:{isOpen:Lt,setOpen:Kt},children:(0,i.jsx)(an.A,{className:b.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:it,onFocus:a?()=>{}:it,onMouseLeave:a?()=>{}:yt,onBlur:a?()=>{}:yt,children:(0,i.jsx)(an.A,{className:mn()(b.drawer,b.drawerWidth,{[b.drawerOpen]:Lt}),children:l})})})]})},pa=s=>{var e;const n=(0,Pe.Rv)((e=s.sidebarOptions)!==null&&e!==void 0?e:{});var r;const a=(0,Pe.i8)((r=s.submenuOptions)!==null&&r!==void 0?r:{}),{children:l,disableExpandOnHover:b,openDelayMs:A,closeDelayMs:D}=s,{isMobile:F}=(0,fs.Ut)();return F?(0,i.jsx)(da,{children:l}):(0,i.jsx)(Pe.yY.Provider,{value:{sidebarConfig:n,submenuConfig:a},children:(0,i.jsx)(ga,{openDelayMs:A,closeDelayMs:D,disableExpandOnHover:b,children:l})})};function fa(){const{sidebarConfig:s}=(0,d.useContext)(Pe.yY),{focusContent:e,contentRef:n}=(0,or.H)(),r=cr({sidebarConfig:s}),{t:a}=(0,ua.i)(ha.O);return n!=null&&n.current?(0,i.jsx)(y.A,{onClick:e,variant:"contained",className:mn()(r.visuallyHidden),children:a("skipToContent")}):null}var ma=t(94509),Io=t(44209),va=t(79065),ya=t(55704),ur=t(62248);const Ea=(0,nn.A)(s=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:s.spacing(7)+1},drawer:e=>{var n,r;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[s.breakpoints.up("sm")]:{marginLeft:e.left,transition:s.transitions.create("margin-left",{easing:s.transitions.easing.sharp,duration:s.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(r=(n=s.palette.navigation.submenu)===null||n===void 0?void 0:n.background)!==null&&r!==void 0?r:"#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,[s.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:s.spacing(3),left:0,top:0}}),title:{fontSize:s.typography.h5.fontSize,fontWeight:s.typography.fontWeightMedium,color:s.palette.navigation.color,padding:s.spacing(2.5),[s.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Aa=s=>{const{isOpen:e}=gs(),{sidebarConfig:n,submenuConfig:r}=(0,d.useContext)(Pe.yY),a=e?n.drawerWidthOpen:n.drawerWidthClosed,l=Ea({left:a,submenuConfig:r}),{isHoveredOn:b}=(0,d.useContext)(Pe.U1),[A,D]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{D(b)},[b]),(0,i.jsxs)(an.A,{className:mn()(l.drawer,{[l.drawerOpen]:A}),children:[(0,i.jsx)(ps.A,{variant:"h5",component:"span",className:l.title,children:s.title}),s.children]})};var xa=t(45810),hr=t.n(xa);function gr(s,e,n=!1){const r=new URLSearchParams(e.search).toString(),a=hr().parse(r),l=new URLSearchParams(s.search).toString(),b=hr().parse(l),A=n?wn.isEqual:wn.isMatch;return(0,wn.isEqual)(e.pathname,s.pathname)&&A(b,a)}const Ca=s=>(0,nn.A)(e=>{var n,r,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:s.drawerWidthClosed,justifyContent:"center"},open:{[e.breakpoints.up("sm")]:{width:s.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=(r=e.palette.navigation.navItem)===null||r===void 0?void 0:r.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:s.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:s.drawerWidthOpen-s.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 ${s.selectedIndicatorWidth}px ${e.palette.navigation.indicator}`,color:e.palette.navigation.selectedColor},"&$closed":{width:s.drawerWidthClosed},"& $closedItemIcon":{paddingRight:s.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-s.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function Do(s){return(0,d.useMemo)(()=>Ca(s),[s])()}const ba=(s,e)=>(0,Oo.O)(s.props.children,n=>{let r=!1;return n.getElements().forEach(({props:{to:a,dropdownItems:l}})=>{if(!r){if(l!=null&&l.length){l.forEach(({to:b})=>r=r||gr(e,(0,Vn.o1)(b)));return}a&&(r=gr(e,(0,Vn.o1)(a)))}}),r},[e.pathname]);function ms(s){return s.to===void 0}const Sa=d.createElement(Aa).type,Oa=d.forwardRef(function({to:e,end:n,style:r,className:a,activeStyle:l,caseSensitive:b,activeClassName:A="active","aria-current":D="page",...F},Q){let{pathname:st}=(0,v.zy)(),{pathname:ot}=(0,v.x$)(e);b||(st=st.toLocaleLowerCase("en-US"),ot=ot.toLocaleLowerCase("en-US"));let it=st===ot;!it&&!n&&(it=st.startsWith(`${ot}/`));const yt=it?D:void 0;return(0,i.jsx)(m.N_,{...F,to:e,ref:Q,"aria-current":yt,style:{...r,...it?l:void 0},className:mn()([typeof a!="function"?a:void 0,it?A:void 0])})}),pr=(0,d.forwardRef)((s,e)=>{const{icon:n,text:r,hasNotifications:a=!1,hasSubmenu:l=!1,disableHighlight:b=!1,onClick:A,noTrack:D,children:F,className:Q,...st}=s,{sidebarConfig:ot}=(0,d.useContext)(Pe.yY),it=Do(ot),{isOpen:yt}=gs(),Lt=!yt&&l?{display:"flex",marginLeft:"20px"}:{lineHeight:"0"},Kt=(0,i.jsxs)(an.A,{style:Lt,children:[(0,i.jsx)(n,{fontSize:"small"}),!yt&&l?(0,i.jsx)(ur.A,{fontSize:"small"}):(0,i.jsx)(i.Fragment,{})]}),ve=(0,i.jsx)(ma.A,{color:"secondary",variant:"dot",overlap:"circular",invisible:!a,className:mn()({[it.closedItemIcon]:!yt}),children:Kt}),re=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(an.A,{"data-testid":"login-button",className:it.iconContainer,children:ve}),r&&(0,i.jsx)(ps.A,{variant:"subtitle2",component:"span",className:it.label,children:r}),(0,i.jsx)("div",{className:it.secondaryAction,children:F})]}),Le=yt?re:ve,Xn={onClick:A,className:mn()(Q,it.root,yt?it.open:it.closed,ms(s)&&it.buttonItem,{[it.highlightable]:!b})},yr=(0,Ms.s)(),{pathname:vs}=(0,v.x$)(!ms(s)&&s.to?s.to:""),Er=(0,d.useCallback)(Va=>{if(!D){const Ga="click",Ya=r!=null?r:"Sidebar Item",Qa=vs?{attributes:{to:vs}}:void 0;yr.captureEvent(Ga,Ya,Qa)}A==null||A(Va)},[yr,r,vs,D,A]);return ms(s)?(0,i.jsx)(y.A,{role:"button","aria-label":r,...Xn,ref:e,onClick:Er,children:Le}):(0,i.jsx)(Oa,{...Xn,activeClassName:it.selected,to:s.to?s.to:"",ref:e,"aria-label":r||s.to,...st,onClick:Er,children:Le})}),Pa=({children:s,...e})=>{const{sidebarConfig:n}=(0,d.useContext)(Pe.yY),r=Do(n),[a,l]=(0,d.useState)(!1),b=(0,v.zy)(),A=ba(s,b),D=(0,sr.A)(ot=>ot.breakpoints.down("sm")),F=()=>{l(!0)},Q=()=>{l(!1)},st=()=>D?a?(0,i.jsx)(ya.A,{fontSize:"small",className:r.submenuArrow}):(0,i.jsx)(va.A,{fontSize:"small",className:r.submenuArrow}):!a&&(0,i.jsx)(ur.A,{fontSize:"small",className:r.submenuArrow});return(0,i.jsx)(Pe.U1.Provider,{value:{isHoveredOn:a,setIsHoveredOn:l},children:(0,i.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:Q,onTouchStart:a?Q:F,onMouseEnter:F,className:mn()(a&&r.highlighted),children:[(0,i.jsx)(pr,{hasSubmenu:!0,className:A?r.selected:"",...e,children:st()}),a&&s]})})},fr=(0,d.forwardRef)((s,e)=>{const[n]=(0,Oo.O)(s.children,r=>r.getElements().filter(a=>a.type===Sa));return n?(0,i.jsx)(Pa,{...s,children:n}):(0,i.jsx)(pr,{...s,ref:e})});function hl(s){const{sidebarConfig:e}=useContext(SidebarConfigContext),[n,r]=useState(""),a=Do(e),l=s.icon?s.icon:SearchIcon,b=()=>{s.onSearch(n),r("")},A=st=>{st.key==="Enter"&&(st.preventDefault(),b())},D=st=>{r(st.target.value)},F=st=>{st.preventDefault(),st.stopPropagation()},Q=st=>{b(),st.preventDefault()};return _jsx(Box,{className:a.searchRoot,children:_jsx(fr,{icon:l,to:s.to,onClick:Q,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:n,onClick:F,onChange:D,onKeyDown:A,className:a.searchContainer,InputProps:{disableUnderline:!0,className:a.searchField},inputProps:{className:a.searchFieldHTMLInput}})})})}const gl=(0,Io.A)("div")({flex:1},{name:"BackstageSidebarSpace"}),pl=(0,Io.A)("div")({height:8},{name:"BackstageSidebarSpacer"}),wa=(0,Io.A)("hr")(({theme:s})=>({height:1,width:"100%",background:"#383838",border:"none",margin:s.spacing(1.2,0)}),{name:"BackstageSidebarDivider"}),Ta=s=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:s.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:s.palette.text.secondary,borderRadius:"5px"}}),fl=(0,Io.A)("div")(({theme:s})=>{const e=Ta(s);return{flex:"0 1 auto",overflowX:"hidden",width:"100%",minHeight:"48px",overflowY:"hidden","@media (hover: none)":e,"&:hover":e}}),ml=()=>{const{sidebarConfig:s}=useContext(SidebarConfigContext),e=Do(s),{isOpen:n,setOpen:r}=useSidebarOpenState();if(useMediaQuery(b=>b.breakpoints.down("md"),{noSsr:!0}))return null;const l=()=>{r(!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,{})})})},Ra=(0,nn.A)({root:{width:Pe.hC.drawerWidthClosed,height:3*Pe.hC.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Pe.hC.drawerWidthClosed,marginLeft:24}}),Ia=()=>{const s=Ra(),{isOpen:e}=gs();return(0,i.jsx)("div",{className:s.root,children:(0,i.jsx)(nr.N_,{to:"/docs/default/component/local/",underline:"none",className:s.link,children:e?(0,i.jsx)(Zi,{}):(0,i.jsx)(Xi,{})})})},Da=({children:s})=>(0,i.jsxs)(or.G,{children:[(0,i.jsxs)(pa,{children:[(0,i.jsx)(Ia,{}),(0,i.jsx)(wa,{}),(0,i.jsx)(fr,{icon:Yi.A,to:"/docs/default/component/local",text:"Docs Preview"})]}),s]});var La=t(71677),Ma=t(62437),Ba=t(55484),ja=t(45061),Ua=t(16203);const $a=(0,nn.A)(s=>({headerIcon:{color:s.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:s.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var mr;(function(s){s.LIGHT="light",s.DARK="dark"})(mr||(mr={}));const Fa=()=>{const s=(0,_n.gf)(ho),e=$a(),[n,r]=(0,d.useState)(s.getActiveThemeId()==="dark"?"dark":"light"),a={light:{icon:Ba.A,title:"Dark theme"},dark:{icon:Ma.A,title:"Light theme"}},{title:l,icon:b}=a[n],A=()=>{r(D=>{const F=D==="light"?"dark":"light";return s.setActiveThemeId(F),F})};return(0,i.jsx)(an.A,{display:"flex",alignItems:"center",mr:2,children:(0,i.jsx)(La.Ay,{title:l,arrow:!0,children:(0,i.jsx)(rr.A,{size:"small",onClick:A,children:(0,i.jsx)(b,{className:e.headerIcon})})})})},Na=()=>(0,i.jsxs)(f.Wj,{children:[(0,i.jsx)(ja.T,{}),(0,i.jsx)(Ua.p,{withSearch:!1})]}),Wa=(0,i.jsx)(Na,{}),vr=yi({apis:zi,configLoader:Gi,plugins:Object.values(o)}),ka=vr.getProvider(),Ka=vr.getRouter(),za=f.Ju.provide((0,c.Hr)({name:"ThemeToggleAddon",component:Fa,location:C.e.Header})),Ha=(0,i.jsxs)(Ks,{children:[(0,i.jsx)(v.C5,{to:"/docs/default/component/local/"},"/"),(0,i.jsx)(v.qh,{path:"/catalog/:namespace/:kind/:name",element:(0,i.jsx)(Wi,{})}),(0,i.jsx)(v.qh,{path:"/docs",element:(0,i.jsx)(f.$j,{}),children:(0,i.jsx)(g.K,{})}),(0,i.jsxs)(v.qh,{path:"/docs/:namespace/:kind/:name/*",element:(0,i.jsx)(f.Wj,{}),children:[Wa,(0,i.jsx)(c.po,{children:(0,i.jsx)(za,{})})]})]}),_a=()=>(0,i.jsx)(ka,{children:(0,i.jsx)(Ka,{children:(0,i.jsx)(Da,{children:Ha})})});O.createRoot(document.getElementById("root")).render((0,i.jsx)(_a,{}))},43836:(J,T,t)=>{"use strict";t.d(T,{qO:()=>O,tK:()=>d});var o=t(14041),i=t(63544);function d(f){return(0,i.Q)(f,()=>(0,o.createContext)(void 0))}function O(f){return(0,o.useContext)(d(f))}function v(f){return{set(g){globalThis[`__@backstage/${f}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${f}__`]}}}},10602:(J,T,t)=>{"use strict";t.d(T,{B:()=>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:(J,T,t)=>{"use strict";t.d(T,{Q:()=>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=v=>`__@backstage/${v}__`;function O(v,f){const g=d(v);let c=i[g];return c||(c=f(),i[g]=c,c)}},7341:(J,T,t)=>{"use strict";t.d(T,{v:()=>i});var o=t(55309);const i=(0,o.y)({id:"plugin.catalog.service"})},82292:(J,T,t)=>{"use strict";t.d(T,{n:()=>i});var o=t(55309);const i=(0,o.y)({id:"plugin.catalog.entity-presentation"})},88083:(J,T,t)=>{"use strict";t.d(T,{T:()=>v});var o=t(6820),i=t(72348),d=t(46123),O=t.n(d);function v(c,C){const{kind:y,namespace:w,name:h,title:S,description:m,displayName:j,type:P}=f(c),E=(0,o.U2)({kind:y||"unknown",namespace:w||i.oQ,name:h||"unknown"}),U=g({kind:y,namespace:w,name:h,context:C}),L=[j,S,U].find(z=>z&&typeof z=="string"),x=[L!==E?E:void 0,P,m].filter(z=>z&&typeof z=="string").join(" | ");return{entityRef:E,primaryTitle:L,secondaryTitle:x||void 0,Icon:void 0}}function f(c){if(typeof c=="string"){let C=c.indexOf(":");const y=c.indexOf("/");y!==-1&&y<C&&(C=-1);const w=C===-1?void 0:c.slice(0,C),h=y===-1?void 0:c.slice(C+1,y),S=c.slice(Math.max(C+1,y+1));return{kind:w,namespace:h,name:S}}if(typeof c=="object"&&c!==null){const C=[O()(c,"kind")].find(P=>P&&typeof P=="string"),y=[O()(c,"metadata.namespace"),O()(c,"namespace")].find(P=>P&&typeof P=="string"),w=[O()(c,"metadata.name"),O()(c,"name")].find(P=>P&&typeof P=="string"),h=[O()(c,"metadata.title")].find(P=>P&&typeof P=="string"),S=[O()(c,"metadata.description")].find(P=>P&&typeof P=="string"),m=[O()(c,"spec.profile.displayName")].find(P=>P&&typeof P=="string"),j=[O()(c,"spec.type")].find(P=>P&&typeof P=="string");return{kind:C,namespace:y,name:w,title:h,description:S,displayName:m,type:j}}return{}}function g(c){var C,y,w,h,S;const m=((C=c.kind)===null||C===void 0?void 0:C.toLocaleLowerCase("en-US"))||"unknown",j=c.namespace||i.oQ,P=c.name||"unknown",E=(w=c.context)===null||w===void 0||(y=w.defaultKind)===null||y===void 0?void 0:y.toLocaleLowerCase("en-US"),U=(S=c.context)===null||S===void 0||(h=S.defaultNamespace)===null||h===void 0?void 0:h.toLocaleLowerCase("en-US");let L=P;return(U&&j.toLocaleLowerCase("en-US")!==U||j!==i.oQ)&&(L=`${j}/${L}`),E&&m.toLocaleLowerCase("en-US")!==E&&(L=`${m}:${L}`),L}},3169:(J,T,t)=>{"use strict";t.d(T,{f:()=>g});var o=t(6820),i=t(72427),d=t(14041),O=t(82292),v=t(88083);function f(c,C,y){const[w,h]=(0,d.useState)(c);return(0,d.useEffect)(()=>{h(c);const S=C==null?void 0:C.subscribe({next:m=>{h(m)},complete:()=>{S==null||S.unsubscribe()}});return()=>{S==null||S.unsubscribe()}},y),w}function g(c,C){const w=(0,i.Q2)().get(O.n),h=[w,JSON.stringify(c),JSON.stringify(C||null)],S=(0,d.useMemo)(()=>{if(!w){const m=(0,v.T)(c,C);return{snapshot:m,promise:Promise.resolve(m)}}return w.forEntity(typeof c=="string"||"metadata"in c?c:(0,o.U2)(c),C)},h);return f(S.snapshot,S.update$,[S])}},18:(J,T,t)=>{"use strict";t.d(T,{a:()=>i});var o=t(55309);const i=(0,o.y)({id:"catalog-react.starred-entities"})},54203:(J,T,t)=>{"use strict";t.d(T,{GI:()=>j});var o=t(31085),i=t(14041),d=t(10394),O=t(64947),v=t(73845),f=t(42899),g=t(72501),c=t(5893),C=t(54917),y=t(65859),w=t(64630),h=t(87849);const S=P=>{var E;const U=(0,c.A)(N=>{var K,Z;return N.breakpoints.down((Z=(K=P.options)===null||K===void 0?void 0:K.drawerBreakpoint)!==null&&Z!==void 0?Z:"md")}),L=(0,C.A)(),[x,z]=(0,i.useState)(!1),{t:_}=(0,h.i)(w.j);var Y;return U?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(O.A,{style:{marginTop:L.spacing(1),marginLeft:L.spacing(1)},onClick:()=>z(!0),startIcon:(0,o.jsx)(y.A,{}),children:_("catalogFilter.buttonTitle")}),(0,o.jsx)(v.Ay,{open:x,onClose:()=>z(!1),anchor:(Y=(E=P.options)===null||E===void 0?void 0:E.drawerAnchor)!==null&&Y!==void 0?Y:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,o.jsxs)(d.A,{m:2,children:[(0,o.jsx)(g.A,{variant:"h6",component:"h2",style:{marginBottom:L.spacing(1)},children:_("catalogFilter.title")}),P.children]})})]}):(0,o.jsx)(f.A,{item:!0,lg:2,children:P.children})},m=P=>(0,o.jsx)(f.A,{item:!0,xs:12,lg:10,children:P.children}),j=P=>(0,o.jsx)(f.A,{container:!0,style:{position:"relative"},children:P.children});j.Filters=S,j.Content=m},50207:(J,T,t)=>{"use strict";t.d(T,{y:()=>H});var o=t(31085),i=t(10394),d=t(72501),O=t(58837),v=t(6924),f=t(20577),g=t(14041),c=t(72427),C=t(73466),y=t(7341),w=t(69076),h=t(86901),S=t(44148),m=t(41260);const j=(0,o.jsx)(m.A,{fontSize:"small"}),P=(0,o.jsx)(S.A,{fontSize:"small"});function E({selected:et}){return(0,o.jsx)(w.A,{icon:j,checkedIcon:P,checked:et})}const U=(0,g.memo)(et=>{const{selected:q,value:ht,availableOptions:ut,showCounts:Ot}=et,Tt=Ot?`${ht} (${ut==null?void 0:ut[ht]})`:ht;return(0,o.jsx)(h.A,{control:(0,o.jsx)(E,{selected:q}),label:Tt,onClick:At=>At.preventDefault()})});var L=t(16249),x=t(53373),z=t.n(x);const _=(0,O.A)({input:{}},{name:"CatalogReactEntityAutocompletePickerInput"});function Y(et){const q=_();return(0,o.jsx)(L.A,{variant:"outlined",...et,className:z()(q.input,et.className)})}var N=t(21405),K=t(26796);const Z=(0,O.A)({root:{},label:{}},{name:"CatalogReactEntityAutocompletePicker"});function H(et){var q;const{label:ht,name:ut,path:Ot,showCounts:Tt,Filter:At,InputProps:gt,initialSelectedOptions:Et=[],filtersForAvailableValues:dt=["kind"]}=et,at=Z(),{updateFilters:bt,filters:ft,queryParameters:{[ut]:St}}=(0,N.nK)(),jt=(0,c.gf)(y.v),Bt=dt.map(vt=>ft[vt]),{value:Ut}=(0,C.A)(async()=>{const vt=Ot,{facets:$t}=await jt.getEntityFacets({facets:[vt],filter:(0,K.Rr)(Bt.filter(Boolean))});return Object.fromEntries($t[vt].map(({value:Pt,count:Ht})=>[Pt,Ht]))},[...Bt]),ct=(0,g.useMemo)(()=>[St].flat().filter(Boolean),[St]);var k;const[G,lt]=(0,g.useState)(ct.length?ct:(k=(q=ft[ut])===null||q===void 0?void 0:q.values)!==null&&k!==void 0?k:Et);(0,g.useEffect)(()=>{ct.length&<(ct)},[ct]);const pt=Object.keys(Ut!=null?Ut:{}),xt=G.length&&pt.length;(0,g.useEffect)(()=>{bt({[ut]:xt?new At(G):void 0})},[ut,xt,G,At,bt]);const mt=ft[ut];return mt&&typeof mt=="object"&&!("values"in mt)||!pt.length?null:(0,o.jsx)(i.A,{className:at.root,pb:1,pt:1,children:(0,o.jsxs)(d.A,{className:at.label,variant:"button",component:"label",children:[ht,(0,o.jsx)(f.Ay,{PopperComponent:vt=>(0,o.jsx)("div",{...vt,children:vt.children}),multiple:!0,disableCloseOnSelect:!0,options:pt,value:G,onChange:(vt,$t)=>lt($t),renderOption:(vt,{selected:$t})=>(0,o.jsx)(U,{selected:$t,value:vt,availableOptions:Ut,showCounts:!!Tt}),size:"small",popupIcon:(0,o.jsx)(v.A,{"data-testid":`${String(ut)}-picker-expand`}),renderInput:vt=>(0,o.jsx)(Y,{...vt,...gt})})]})})}},72987:(J,T,t)=>{"use strict";t.d(T,{t:()=>Ut});var o=t(31085),i=t(6820),d=t(10394),O=t(69076),v=t(86901),f=t(16249),g=t(72501),c=t(71677),C=t(58837),y=t(44148),w=t(41260),h=t(6924),S=t(20577),m=t(14041),j=t(21405),P=t(92822),E=t(92367),U=t(48108),L=t(47966),x=t(90184),z=t(72427),_=t(87290),Y=t(7341),N=t(46123),K=t.n(N);function Z({enabled:ct}){const k=(0,z.gf)(Y.v),[G]=(0,m.useState)(async()=>{if(!ct)return[];const lt="relations.ownedBy",xt=(await k.getEntityFacets({facets:[lt]})).facets[lt].map(mt=>mt.value);return k.getEntitiesByRefs({entityRefs:xt}).then(mt=>mt.items.filter(vt=>vt!==void 0).map(vt=>vt).sort((vt,$t)=>(vt.metadata.namespace||"").localeCompare($t.metadata.namespace||"","en-US")||(K()(vt,"spec.profile.displayName")||vt.metadata.title||vt.metadata.name).localeCompare(K()($t,"spec.profile.displayName")||$t.metadata.title||$t.metadata.name,"en-US")||vt.kind.localeCompare($t.kind,"en-US"))).then(mt=>mt).catch(()=>[])});return(0,_.A)(async(lt,pt)=>{const xt=await G;if(!xt)return{items:[]};var mt;const vt=(mt=pt==null?void 0:pt.limit)!==null&&mt!==void 0?mt:20,{text:$t,start:Pt}=H(lt),Ht=xt.filter(se=>ht($t,se)),Nt=Pt+vt;return{items:Ht.slice(0,Nt),...q({entities:Ht,limit:Nt,payload:{text:$t,start:Nt}})}},[G],{loading:!0,value:{items:[]}})}function H(ct){return et(ct)&&ct.cursor?JSON.parse(atob(ct.cursor)):{text:ct.text||"",start:0}}function et(ct){return!!ct.cursor}function q({entities:ct,limit:k,payload:G}){return ct.length>k?{cursor:btoa(JSON.stringify(G))}:{}}function ht(ct,k){var G,lt,pt;const xt=ct.trim();return k.kind.includes(xt)||((G=k.metadata.namespace)===null||G===void 0?void 0:G.includes(xt))||k.metadata.name.includes(xt)||((lt=k.metadata.title)===null||lt===void 0?void 0:lt.includes(xt))||((pt=K()(k,"spec.profile.displayName"))===null||pt===void 0?void 0:pt.includes(xt))}function ut(){const ct=(0,z.gf)(Y.v);return(0,_.A)(async(k,G)=>{const lt=k,pt=k;var xt;const mt=(xt=G==null?void 0:G.limit)!==null&&xt!==void 0?xt:20;if(pt.cursor){const $t=await ct.queryEntities({cursor:pt.cursor,limit:mt});return{cursor:$t.pageInfo.nextCursor,items:[...pt.items,...$t.items]}}const vt=await ct.queryEntities({fullTextFilter:{term:lt.text||"",fields:["metadata.name","kind","spec.profile.displayname","metadata.title"]},filter:{kind:["User","Group"]},orderFields:[{field:"metadata.name",order:"asc"}],limit:mt});return{cursor:vt.pageInfo.nextCursor,items:vt.items}},[],{loading:!0})}var Ot=t(76842);function Tt({mode:ct,initialSelectedOwnersRefs:k}){const G=ct==="owners-only",lt=ut(),pt=Z({enabled:G}),[xt,mt]=G?pt:lt;return[xt,mt,At({enabled:!G,initialSelectedOwnersRefs:k})]}function At({enabled:ct,initialSelectedOwnersRefs:k}){const G=(0,m.useRef)({}),lt=(0,z.gf)(Y.v),[,pt]=(0,_.A)(async()=>{(await lt.getEntitiesByRefs({entityRefs:k})).items.forEach(mt=>{mt&&(G.current[(0,i.U2)(mt)]=mt)})},[]);return(0,Ot.u)(()=>{ct&&k.length>0&&pt()}),{getEntity:xt=>G.current[xt],setEntity:xt=>{G.current[(0,i.U2)(xt)]=xt}}}var gt=t(87051),Et=t(3169),dt=t(64630),at=t(87849);const bt=(0,C.A)({root:{},label:{},input:{},fullWidth:{width:"100%"},boxLabel:{width:"100%",textOverflow:"ellipsis",overflow:"hidden"}},{name:"CatalogReactEntityOwnerPicker"}),ft=(0,gt.A)(ct=>({label:{width:"100%"},root:{width:"90%"}}),{name:"FixedWidthFormControlLabel"})(v.A),St=(0,o.jsx)(w.A,{fontSize:"small"}),jt=(0,o.jsx)(y.A,{fontSize:"small"});function Bt(ct){const k=bt(),G=ct.entity.kind.toLocaleLowerCase("en-US")==="group",{primaryTitle:lt}=(0,Et.f)(ct.entity);return(0,o.jsx)(d.A,{className:k.fullWidth,children:(0,o.jsx)(ft,{className:k.fullWidth,control:(0,o.jsx)(O.A,{icon:St,checkedIcon:jt,checked:ct.isSelected}),onClick:pt=>pt.preventDefault(),label:(0,o.jsx)(c.Ay,{title:lt,children:(0,o.jsxs)(d.A,{display:"flex",alignItems:"center",children:[G?(0,o.jsx)(L.A,{fontSize:"small"}):(0,o.jsx)(U.A,{fontSize:"small"}),"\xA0",(0,o.jsx)(d.A,{className:k.boxLabel,children:(0,o.jsx)(g.A,{noWrap:!0,children:lt})})]})})})})}const Ut=ct=>{var k,G;const lt=bt(),{mode:pt="owners-only"}=ct||{},{updateFilters:xt,filters:mt,queryParameters:{owners:vt}}=(0,j.nK)(),[$t,Pt]=(0,m.useState)(""),{t:Ht}=(0,at.i)(dt.j),Nt=(0,m.useMemo)(()=>[vt].flat().filter(Boolean),[vt]);var se;const[ye,Re]=(0,m.useState)(Nt.length?Nt:(se=(k=mt.owners)===null||k===void 0?void 0:k.values)!==null&&se!==void 0?se:[]),[{value:ie,loading:fe},qt,Ee]=Tt({mode:pt,initialSelectedOwnersRefs:ye});(0,E.s)(()=>qt({text:$t}),[$t,qt],250);const Ae=(ie==null?void 0:ie.items)||[];return(0,m.useEffect)(()=>{if(Nt.length){const _t=new P.N9(Nt);Re(_t.values)}},[Nt]),(0,m.useEffect)(()=>{xt({owners:ye.length?new P.N9(ye):void 0})},[ye,xt]),["user","group"].includes(((G=mt.kind)===null||G===void 0?void 0:G.value.toLocaleLowerCase("en-US"))||"")?null:(0,o.jsx)(d.A,{className:lt.root,pb:1,pt:1,children:(0,o.jsxs)(g.A,{className:lt.label,variant:"button",component:"label",children:[Ht("entityOwnerPicker.title"),(0,o.jsx)(S.Ay,{PopperComponent:_t=>(0,o.jsx)("div",{..._t,children:_t.children}),multiple:!0,disableCloseOnSelect:!0,loading:fe,options:Ae,value:ye,getOptionSelected:(_t,Vt)=>typeof Vt=="string"?(0,i.U2)(_t)===Vt:_t===Vt,getOptionLabel:_t=>{const Vt=typeof _t=="string"?Ee.getEntity(_t)||(0,i.KU)(_t,{defaultKind:"group",defaultNamespace:"default"}):_t;return(0,x.Z)(Vt,(0,x.S)(Vt))},onChange:(_t,Vt)=>{Pt(""),Re(Vt.map(Ie=>{const Ve=typeof Ie=="string"?Ie:(0,i.U2)(Ie);return typeof Ie!="string"&&Ee.setEntity(Ie),Ve}))},filterOptions:_t=>_t,renderOption:(_t,{selected:Vt})=>(0,o.jsx)(Bt,{entity:_t,isSelected:Vt}),size:"small",popupIcon:(0,o.jsx)(h.A,{"data-testid":"owner-picker-expand"}),renderInput:_t=>(0,o.jsx)(f.A,{..._t,className:lt.input,onChange:Vt=>{Pt(Vt.currentTarget.value)},variant:"outlined"}),ListboxProps:{onScroll:_t=>{const Vt=_t.currentTarget;Math.abs(Vt.scrollHeight-Vt.clientHeight-Vt.scrollTop)<1&&(ie!=null&&ie.cursor)&&qt({items:ie.items,cursor:ie.cursor})},"data-testid":"owner-picker-listbox"}})]})})}},8859:(J,T,t)=>{"use strict";t.d(T,{z:()=>m});var o=t(31085),i=t(6820),d=t(72348),O=t(72072),v=t(9222),f=t(14041),g=t(29207),c=t(10394),C=t(71677),y=t(58837),w=t(3169);const h=(0,y.A)(P=>({root:{display:"inline-flex",alignItems:"center"},icon:{marginRight:P.spacing(.5),color:P.palette.text.secondary,lineHeight:0}}),{name:"CatalogReactEntityDisplayName"}),S=P=>{const{entityRef:E,hideIcon:U,disableTooltip:L,defaultKind:x,defaultNamespace:z}=P,_=h(),{primaryTitle:Y,secondaryTitle:N,Icon:K}=(0,w.f)(E,{defaultKind:x,defaultNamespace:z});let Z=(0,o.jsx)(o.Fragment,{children:Y});return Z=(0,o.jsxs)(c.A,{component:"span",className:_.root,children:[K&&!U?(0,o.jsx)(c.A,{component:"span",className:_.icon,children:(0,o.jsx)(K,{fontSize:"inherit"})}):null,Z]}),N&&!L&&(Z=(0,o.jsx)(C.Ay,{enterDelay:1500,title:N,children:Z})),Z},m=(0,f.forwardRef)((P,E)=>{const{entityRef:U,defaultKind:L,defaultNamespace:x,title:z,children:_,hideIcon:Y,...N}=P,K=j(P.entityRef);var Z;const H=(Z=_!=null?_:z)!==null&&Z!==void 0?Z:(0,o.jsx)(S,{entityRef:U,defaultKind:L,defaultNamespace:x,hideIcon:Y});return(0,o.jsx)(O.N_,{...N,ref:E,to:K,children:H})});function j(P){const E=(0,v.S)(g.s);let U,L,x;if(typeof P=="string"){const Y=(0,i.KU)(P);U=Y.kind,L=Y.namespace,x=Y.name}else"metadata"in P?(U=P.kind,L=P.metadata.namespace,x=P.metadata.name):(U=P.kind,L=P.namespace,x=P.name);U=U.toLocaleLowerCase("en-US");var z;L=(z=L==null?void 0:L.toLocaleLowerCase("en-US"))!==null&&z!==void 0?z:d.oQ;const _={kind:encodeURIComponent(U),namespace:encodeURIComponent(L),name:encodeURIComponent(x)};return E(_)}},34428:(J,T,t)=>{"use strict";t.d(T,{i:()=>v});var o=t(31085),i=t(6820),d=t(14041),O=t(8859);function v(f){const{entityRefs:g,hideIcons:c,...C}=f;return(0,o.jsx)(o.Fragment,{children:g.map((y,w)=>{const h=typeof y=="string"?y:(0,i.U2)(y);return(0,o.jsxs)(d.Fragment,{children:[w>0&&", ",(0,o.jsx)(O.z,{...C,entityRef:y,hideIcon:c})]},`${w}.${h}`)})})}},90184:(J,T,t)=>{"use strict";t.d(T,{S:()=>O,Z:()=>v});var o=t(72348),i=t(46123),d=t.n(i);function O(f,g){const c=g==null?void 0:g.defaultKind;let C,y,w;return"metadata"in f?(C=f.kind,y=f.metadata.namespace,w=f.metadata.name):(C=f.kind,y=f.namespace,w=f.name),(y===void 0||y==="")&&(y=o.oQ),(g==null?void 0:g.defaultNamespace)!==void 0?(g==null?void 0:g.defaultNamespace)===y&&(y=void 0):y===o.oQ&&(y=void 0),C=C.toLocaleLowerCase("en-US"),C=c&&c.toLocaleLowerCase("en-US")===C?void 0:C,`${C?`${C}:`:""}${y?`${y}/`:""}${w}`}function v(f,g){for(const c of["spec.profile.displayName","metadata.title"]){const C=d()(f,c);if(C&&typeof C=="string")return C}return g}},91035:(J,T,t)=>{"use strict";t.d(T,{m:()=>C});var o=t(31085),i=t(58837),d=t(14041),O=t(92822),v=t(50207),f=t(64630),g=t(87849);const c=(0,i.A)({input:{}},{name:"CatalogReactEntityTagPicker"}),C=y=>{const w=c(),{t:h}=(0,g.i)(f.j);return(0,o.jsx)(v.y,{label:h("entityTagPicker.title"),name:"tags",path:"metadata.tags",Filter:O.q_,showCounts:y.showCounts,InputProps:{className:w.input}})}},67626:(J,T,t)=>{"use strict";t.d(T,{y:()=>At});var o=t(31085),i=t(72427),d=t(65461),O=t(40703),v=t(58007),f=t(46423),g=t(65569),c=t(5951),C=t(26343),y=t(72501),w=t(58837),h=t(9684),S=t(80109),m=t(14041),j=t(92822),P=t(21405),E=t(16009),U=t(45250),L=t(73466),x=t(7341),z=t(26796),_=t(87290),Y=t(48899);function N(){const gt=(0,i.gf)(E.K),Et=(0,i.gf)(x.v),{filters:dt}=(0,P.nK)(),{value:at,loading:bt}=(0,L.A)(async()=>(await gt.getBackstageIdentity()).ownershipEntityRefs,[]),{user:ft,owners:St,...jt}=dt,Bt=(0,z.$3)((0,U.compact)(Object.values(jt))),[{value:Ut,loading:ct},k]=(0,_.A)(async lt=>{const pt=K(lt.owners,lt.ownershipEntityRefs);if(pt===void 0)return 0;const{["metadata.name"]:xt,...mt}=lt.filter.filter,{totalItems:vt}=await Et.queryEntities({...lt.filter,filter:{...mt,"relations.ownedBy":pt},limit:0});return vt},[],{loading:!0});return(0,Y.A)(()=>{Object.keys(Bt.filter).length!==0&&at!==void 0&&k({ownershipEntityRefs:at,owners:St,filter:Bt})},[at,St,Bt]),{count:Ut,loading:bt||ct,filter:(0,m.useMemo)(()=>j.tN.owned(at!=null?at:[]),[at]),ownershipEntityRefs:at}}function K(gt,Et){if(Et===void 0)return;var dt;const at=(dt=gt==null?void 0:gt.values)!==null&&dt!==void 0?dt:[];if(at.length){const bt=(0,U.intersection)(at,Et);return bt.length===0?void 0:bt}return Et}function Z(){const gt=(0,i.gf)(x.v),{filters:Et}=(0,P.nK)(),dt=(0,m.useRef)(),at=(0,m.useMemo)(()=>{const{user:St,...jt}=Et,Bt=(0,U.compact)(Object.values(jt)),Ut=(0,z.$3)(Bt),ct={...Ut,limit:0};return Object.keys(Ut.filter).length===0?(dt.current=void 0,dt.current):(0,U.isEqual)(ct,dt.current)?dt.current:(dt.current=ct,ct)},[Et]),{value:bt,loading:ft}=(0,L.A)(async()=>{if(at===void 0)return 0;const{totalItems:St}=await gt.queryEntities(at);return St},[at]);return{count:bt,loading:ft}}var H=t(6820),et=t(56889);function q(){const gt=(0,i.gf)(x.v),{filters:Et}=(0,P.nK)(),{starredEntities:dt}=(0,et.I)(),at=(0,m.useRef)(),bt=(0,m.useMemo)(()=>{const{user:Bt,...Ut}=Et,ct=(0,U.compact)(Object.values(Ut)),k=(0,z.$3)(ct),lt={...k,filter:{...k.filter,["metadata.name"]:Array.from(dt).map(pt=>(0,H.KU)(pt).name)},limit:1e3};return(0,U.isEqual)(lt,at.current)?at.current:(at.current=lt,lt)},[Et,dt]),{value:ft,loading:St}=(0,L.A)(async()=>dt.size?(await gt.queryEntities(bt)).items.map(Ut=>(0,H.U2)({kind:Ut.kind,namespace:Ut.metadata.namespace,name:Ut.metadata.name})).filter(Ut=>dt.has(Ut)).length:0,[bt,dt]),jt=(0,m.useMemo)(()=>j.tN.starred(Array.from(dt)),[dt]);return{count:ft,loading:St,filter:jt}}var ht=t(87849),ut=t(64630);const Ot=(0,w.A)(gt=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:gt.spacing(1,0,1,0)},title:{margin:gt.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:gt.palette.text.primary},menuItem:{minHeight:gt.spacing(6)},groupWrapper:{margin:gt.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Tt(gt,Et){return[{name:Et("userListPicker.personalFilter.title"),items:[{id:"owned",label:Et("userListPicker.personalFilter.ownedLabel"),icon:h.A},{id:"starred",label:Et("userListPicker.personalFilter.starredLabel"),icon:S.A}]},{name:gt,items:[{id:"all",label:Et("userListPicker.orgFilterAllLabel")}]}]}const At=gt=>{const{initialFilter:Et,availableFilters:dt}=gt,at=Ot(),bt=(0,i.gf)(d.U),{t:ft}=(0,ht.i)(ut.j);var St;const jt=(St=bt.getOptionalString("organization.name"))!==null&&St!==void 0?St:ft("userListPicker.defaultOrgName"),{filters:Bt,updateFilters:Ut,queryParameters:{kind:ct,user:k}}=(0,P.nK)(),G=["starred","all"],lt=Tt(jt,ft).map(fe=>({...fe,items:fe.items.filter(({id:qt})=>["group","user"].some(Ee=>Ee===ct)?G.includes(qt):!dt||dt.includes(qt))})).filter(({items:fe})=>!!fe.length),{count:pt,loading:xt,filter:mt}=N(),{count:vt}=Z(),{count:$t,filter:Pt,loading:Ht}=q(),Nt=(0,m.useMemo)(()=>[k].flat()[0],[k]),[se,ye]=(0,m.useState)(Nt!=null?Nt:Et),Re=(0,m.useMemo)(()=>({all:vt,starred:$t,owned:pt}),[$t,pt,vt]);(0,m.useEffect)(()=>{Nt&&ye(Nt)},[Nt]);const ie=xt||Ht;return(0,m.useEffect)(()=>{!ie&&se&&se!=="all"&&Re[se]===0&&ye("all")},[ie,Re,se,ye]),(0,m.useEffect)(()=>{if(!se||ie)return;Ut({user:se==="owned"?mt:se==="starred"?Pt:j.tN.all()})},[se,Pt,mt,Ut,ie]),(0,o.jsx)(O.A,{className:at.root,children:lt.map(fe=>(0,o.jsxs)(m.Fragment,{children:[(0,o.jsx)(y.A,{variant:"subtitle2",component:"span",className:at.title,children:fe.name}),(0,o.jsx)(O.A,{className:at.groupWrapper,children:(0,o.jsx)(v.A,{disablePadding:!0,dense:!0,role:"menu","aria-label":fe.name,children:fe.items.map(qt=>{var Ee,Ae;return(0,o.jsxs)(C.A,{role:"none presentation",divider:!0,onClick:()=>ye(qt.id),selected:qt.id===((Ee=Bt.user)===null||Ee===void 0?void 0:Ee.value),className:at.menuItem,disabled:Re[qt.id]===0,"data-testid":`user-picker-${qt.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[qt.icon&&(0,o.jsx)(f.A,{className:at.listIcon,children:(0,o.jsx)(qt.icon,{fontSize:"small"})}),(0,o.jsx)(c.A,{children:(0,o.jsxs)(y.A,{variant:"body1",children:[qt.label," "]})}),(0,o.jsx)(g.A,{children:(Ae=Re[qt.id])!==null&&Ae!==void 0?Ae:"-"})]},qt.id)})})})]},fe.name))})}},92822:(J,T,t)=>{"use strict";t.d(T,{I5:()=>y,Kf:()=>m,N9:()=>C,V3:()=>c,gM:()=>v,gZ:()=>S,mT:()=>j,qA:()=>f,q_:()=>g,tN:()=>h,z:()=>w});var o=t(18990),i=t(51372),d=t(6820),O=t(67871);class v{getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}constructor(E){(0,o._)(this,"value",void 0),this.value=E}}class f{getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}constructor(E){(0,o._)(this,"value",void 0),this.value=E}}class g{filterEntity(E){return this.values.every(U=>{var L;return((L=E.metadata.tags)!==null&&L!==void 0?L:[]).includes(U)})}getCatalogFilters(){return{"metadata.tags":this.values}}toQueryValue(){return this.values}constructor(E){(0,o._)(this,"values",void 0),this.values=E}}class c{filterEntity(E){const U=this.toUpperArray(this.value.split(/\s/)),L=this.toUpperArray([E.metadata.tags]),x=this.toUpperArray([E.metadata.name,E.metadata.title]);for(const z of U)if(L.every(_=>_!==z)&&x.every(_=>!_.includes(z)))return!1;return!0}getFullTextFilters(){return{term:this.value,fields:["metadata.name","metadata.title","spec.profile.displayName"]}}toQueryValue(){return this.value}toUpperArray(E){return E.flat().filter(U=>!!U).map(U=>U.toLocaleUpperCase("en-US"))}constructor(E){(0,o._)(this,"value",void 0),this.value=E}}class C{getCatalogFilters(){return{"relations.ownedBy":this.values}}filterEntity(E){return this.values.some(U=>(0,O.t)(E,i.vv).some(L=>(0,d.U2)(L)===U))}toQueryValue(){return this.values}constructor(E){(0,o._)(this,"values",void 0),this.values=E.reduce((U,L)=>{try{return U.push((0,d.U2)((0,d.KU)(L,{defaultKind:"Group"}))),U}catch{return U}},[])}}class y{getCatalogFilters(){return{"spec.lifecycle":this.values}}filterEntity(E){return this.values.some(U=>{var L;return((L=E.spec)===null||L===void 0?void 0:L.lifecycle)===U})}toQueryValue(){return this.values}constructor(E){(0,o._)(this,"values",void 0),this.values=E}}class w{getCatalogFilters(){return{"metadata.namespace":this.values}}filterEntity(E){return this.values.some(U=>E.metadata.namespace===U)}toQueryValue(){return this.values}constructor(E){(0,o._)(this,"values",void 0),this.values=E}}class h{static owned(E){return new h("owned",E)}static all(){return new h("all")}static starred(E){return new h("starred",E)}getCatalogFilters(){if(this.value==="owned"){var E;return{"relations.ownedBy":(E=this.refs)!==null&&E!==void 0?E:[]}}if(this.value==="starred"){var U,L;return{"metadata.name":(L=(U=this.refs)===null||U===void 0?void 0:U.map(x=>(0,d.KU)(x).name))!==null&&L!==void 0?L:[]}}return{}}filterEntity(E){if(this.value==="starred"){var U,L;return(L=(U=this.refs)===null||U===void 0?void 0:U.includes((0,d.U2)(E)))!==null&&L!==void 0?L:!0}if(this.value==="owned"){var x;const _=(0,O.t)(E,i.vv);var z;return(z=(x=this.refs)===null||x===void 0?void 0:x.some(Y=>_.some(N=>(0,d.U2)(N)===Y)))!==null&&z!==void 0?z:!1}return!0}toQueryValue(){return this.value}constructor(E,U){(0,o._)(this,"value",void 0),(0,o._)(this,"refs",void 0),this.value=E,this.refs=U}}class S{filterEntity(E){switch(this.value){case"owned":return this.isOwnedEntity(E);case"starred":return this.isStarredEntity(E);default:return!0}}toQueryValue(){return this.value}constructor(E,U,L){(0,o._)(this,"value",void 0),(0,o._)(this,"isOwnedEntity",void 0),(0,o._)(this,"isStarredEntity",void 0),this.value=E,this.isOwnedEntity=U,this.isStarredEntity=L}}class m{getCatalogFilters(){return this.value?{"metadata.annotations.backstage.io/orphan":String(this.value)}:{}}filterEntity(E){var U;const L=(U=E.metadata.annotations)===null||U===void 0?void 0:U["backstage.io/orphan"];return L!==void 0&&this.value.toString()===L}constructor(E){(0,o._)(this,"value",void 0),this.value=E}}class j{filterEntity(E){var U,L;const x=(E==null||(L=E.status)===null||L===void 0||(U=L.items)===null||U===void 0?void 0:U.length)>0;return x!==void 0&&this.value===x}constructor(E){(0,o._)(this,"value",void 0),this.value=E}}},21405:(J,T,t)=>{"use strict";t.d(T,{B9:()=>j,nK:()=>P});var o=t(31085),i=t(45250),d=t.n(i),O=t(45810),v=t.n(O),f=t(14041),g=t(18690),c=t(87290),C=t(22771),y=t(71581),w=t(7341),h=t(26796),S=t(72427);const m=(0,f.createContext)(void 0),j=E=>{const U=(0,y.A)(),L=(0,S.gf)(w.v),[x,z]=(0,f.useState)({}),_=(0,g.zy)(),Y=E.pagination===!0||typeof E.pagination=="object",N=E.pagination&&typeof E.pagination=="object"&&typeof E.pagination.limit=="number"?E.pagination.limit:20,{queryParameters:K,cursor:Z}=(0,f.useMemo)(()=>{const dt=v().parse(_.search,{ignoreQueryPrefix:!0});var at;return{queryParameters:(at=dt.filters)!==null&&at!==void 0?at:{},cursor:typeof dt.cursor=="string"?dt.cursor:void 0}},[_]),[H,et]=(0,f.useState)(Z),[q,ht]=(0,f.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[],pageInfo:Y?{}:void 0})),[{loading:ut,error:Ot},Tt]=(0,c.A)(async()=>{const dt=(0,i.compact)(Object.values(x)),at=Object.keys(x).reduce((ft,St)=>{const jt=x[St];return jt!=null&&jt.toQueryValue&&(ft[St]=jt.toQueryValue()),ft},{});if(Y)if(H){if(H!==q.appliedCursor){const ft=(0,h.be)(dt),St=await L.queryEntities({cursor:H,limit:N});ht({appliedFilters:x,appliedCursor:H,backendEntities:St.items,entities:St.items.filter(ft),pageInfo:St.pageInfo,totalItems:St.totalItems})}}else{const ft=(0,h.be)(dt),St=(0,h.$3)(dt),jt=(0,h.$3)((0,i.compact)(Object.values(q.appliedFilters)));if(!(0,i.isEqual)(jt,St)){const Bt=await L.queryEntities({...St,limit:N,orderFields:[{field:"metadata.name",order:"asc"}]});ht({appliedFilters:x,backendEntities:Bt.items,entities:Bt.items.filter(ft),pageInfo:Bt.pageInfo,totalItems:Bt.totalItems})}}else{const ft=(0,h.be)(dt),St=(0,h.Rr)(dt),jt=(0,h.Rr)((0,i.compact)(Object.values(q.appliedFilters)));if((0,i.isEqual)(jt,St)){const Bt=q.backendEntities.filter(ft);ht({appliedFilters:x,backendEntities:q.backendEntities,entities:Bt,totalItems:Bt.length})}else{const Bt=await L.getEntities({filter:St}),Ut=Bt.items.filter(ft);ht({appliedFilters:x,backendEntities:Bt.items,entities:Ut,totalItems:Ut.length})}}if(U()){var bt;const ft=v().parse(_.search,{ignoreQueryPrefix:!0}),St=v().stringify({...ft,filters:at,cursor:H},{addQueryPrefix:!0,arrayFormat:"repeat"}),jt=`${window.location.pathname}${St}`;(bt=window.history)===null||bt===void 0||bt.replaceState(null,document.title,jt)}},[L,K,x,q,H,Y],{loading:!0});(0,C.A)(Tt,10,[x,H]);const At=(0,f.useCallback)(dt=>{et(void 0),z(at=>{const bt=typeof dt=="function"?dt(at):dt;return{...at,...bt}})},[]),gt=(0,f.useMemo)(()=>{var dt,at;if(!Y)return;const bt=(dt=q.pageInfo)===null||dt===void 0?void 0:dt.prevCursor,ft=(at=q.pageInfo)===null||at===void 0?void 0:at.nextCursor;return{prev:bt?()=>et(bt):void 0,next:ft?()=>et(ft):void 0}},[Y,q.pageInfo]),Et=(0,f.useMemo)(()=>({filters:q.appliedFilters,entities:q.entities,backendEntities:q.backendEntities,updateFilters:At,queryParameters:K,loading:ut,error:Ot,pageInfo:gt,totalItems:q.totalItems}),[q,At,K,ut,Ot,gt]);return(0,o.jsx)(m.Provider,{value:Et,children:E.children})};function P(){const E=(0,f.useContext)(m);if(!E)throw new Error("useEntityList must be used within EntityListProvider");return E}},56889:(J,T,t)=>{"use strict";t.d(T,{I:()=>g});var o=t(6820),i=t(72427),d=t(14041),O=t(1394),v=t(18);function f(c){return typeof c=="string"?c:(0,o.U2)(c)}function g(){const c=(0,i.gf)(v.a),C=(0,O.A)((0,d.useMemo)(()=>c.starredEntitie$(),[c]),new Set),y=(0,d.useCallback)(h=>C.has(f(h)),[C]),w=(0,d.useCallback)(h=>c.toggleStarred(f(h)).then(),[c]);return{starredEntities:C,toggleStarredEntity:w,isStarredEntity:y}}},29207:(J,T,t)=>{"use strict";t.d(T,{s:()=>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(v){var f,g;return{kind:v.kind.toLocaleLowerCase("en-US"),namespace:(g=(f=v.metadata.namespace)===null||f===void 0?void 0:f.toLocaleLowerCase("en-US"))!==null&&g!==void 0?g:DEFAULT_NAMESPACE,name:v.metadata.name}}},64630:(J,T,t)=>{"use strict";t.d(T,{j:()=>i});var o=t(93184);const i=(0,o.h)({id:"catalog-react",messages:{catalogFilter:{title:"Filters",buttonTitle:"Filters"},entityKindPicker:{title:"Kind",errorMessage:"Failed to load entity kinds"},entityLifecyclePicker:{title:"Lifecycle"},entityNamespacePicker:{title:"Namespace"},entityOwnerPicker:{title:"Owner"},entityProcessingStatusPicker:{title:"Processing Status"},entityTagPicker:{title:"Tags"},entityPeekAheadPopover:{title:"Drill into the entity to see all of the tags.",emailCardAction:{title:"Email {{email}}",subTitle:"mailto {{email}}"},entityCardActionsTitle:"Show details"},entitySearchBar:{placeholder:"Search"},entityTypePicker:{title:"Type",errorMessage:"Failed to load entity types",optionAllTitle:"all"},favoriteEntity:{addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites"},inspectEntityDialog:{title:"Entity Inspector",closeButtonTitle:"Close",ancestryPage:{title:"Ancestry"},colocatedPage:{title:"Colocated",description:"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).",alertNoLocation:"Entity had no location information.",alertNoEntity:"There were no other entities on this location."},jsonPage:{title:"Entity as JSON",description:"This is the raw entity data as received from the catalog, on JSON form."},overviewPage:{title:"Overview"},yamlPage:{title:"Entity as YAML",description:"This is the raw entity data as received from the catalog, on YAML form."}},unregisterEntityDialog:{title:"Are you sure you want to unregister this entity?",cancelButtonTitle:"Cancel",deleteButtonTitle:"Delete Entity",deleteEntitySuccessMessage:"Removed entity {{entityName}}",bootstrapState:{title:'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "{{location}}"). If you believe this is in error, please contact the {{appTitle}} integrator.',advancedDescription:"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.",advancedOptions:"Advanced Options"},onlyDeleteStateTitle:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.",unregisterState:{title:"This action will unregister the following entities:",subTitle:"Located at the following location:",description:"To undo, just re-register the entity in {{appTitle}}.",unregisterButtonTitle:"Unregister Location",advancedOptions:"Advanced Options",advancedDescription:"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."},errorStateTitle:"Internal error: Unknown state"},userListPicker:{defaultOrgName:"Company",personalFilter:{title:"Personal",ownedLabel:"Owned",starredLabel:"Starred"},orgFilterAllLabel:"All"}}})},26796:(J,T,t)=>{"use strict";t.d(T,{$3:()=>d,Rr:()=>O,be:()=>v});var o=t(92822);function i(f){return!!f.getFullTextFilters}function d(f){var g;const c=f.reduce((y,w)=>({...y,...w.getCatalogFilters?w.getCatalogFilters():{}}),{}),C=(g=f.find(i))===null||g===void 0?void 0:g.getFullTextFilters();return{filter:c,fullTextFilter:C}}function O(f){const g={};return f.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(g,((C=c.getCatalogFilters)===null||C===void 0?void 0:C.call(c))||{})}),g}function v(f){return g=>f.every(c=>!c.filterEntity||c.filterEntity(g))}},67871:(J,T,t)=>{"use strict";t.d(T,{t:()=>i});var o=t(6820);function i(d,O,v){var f;let g=(d==null||(f=d.relations)===null||f===void 0?void 0:f.filter(c=>c.type===O).map(c=>(0,o.KU)(c.targetRef)))||[];return v!=null&&v.kind&&(g=g.filter(c=>c.kind.toLocaleLowerCase("en-US")===v.kind.toLocaleLowerCase("en-US"))),g}},95203:(J,T,t)=>{"use strict";t.d(T,{qP:()=>c,Zg:()=>y,rQ:()=>h,pS:()=>w,UJ:()=>C});var o=t(18990),i=t(59598);let d=i.b,O=d;class v{toString(){return`routeRef{type=external,id=${this.id}}`}getDefaultTarget(){return this.defaultTarget}constructor(m,j,P,E){(0,o._)(this,"id",void 0),(0,o._)(this,"params",void 0),(0,o._)(this,"optional",void 0),(0,o._)(this,"defaultTarget",void 0),(0,o._)(this,O,void 0),this.id=m,this.params=j,this.optional=P,this.defaultTarget=E,this[d]="external"}}function f(S){var m;return new v(S.id,(m=S.params)!==null&&m!==void 0?m:[],!!S.optional,S==null?void 0:S.defaultTarget)}var g=t(34569);const c=f({id:"create-component",optional:!0,defaultTarget:"scaffolder.createComponent"}),C=f({id:"view-techdoc",optional:!0,params:["namespace","kind","name"],defaultTarget:"techdocs.docRoot"}),y=f({id:"create-from-template",optional:!0,params:["namespace","templateName"],defaultTarget:"scaffolder.selectedTemplate"}),w=f({id:"catalog:unregister-redirect",optional:!0}),h=(0,g.H)({id:"catalog"})},54241:(J,T,t)=>{"use strict";t.d(T,{b:()=>o});var o;(function(i){i.DENY="DENY",i.ALLOW="ALLOW",i.CONDITIONAL="CONDITIONAL"})(o||(o={}))},96824:(J,T,t)=>{"use strict";t.d(T,{x:()=>i});var o=t(55309);const i=(0,o.y)({id:"plugin.permission.api"})},70734:(J,T,t)=>{"use strict";t.d(T,{e:()=>v});var o=t(31085),i=t(14041),d=t(58837);const O=(0,d.A)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),v=f=>{const{text:g,preTag:c,postTag:C}=f,y=O(),w=(0,i.useMemo)(()=>g.split(new RegExp(`(${c}.+?${C})`)),[C,c,g]);return(0,o.jsx)(o.Fragment,{children:w.map((h,S)=>h.includes(c)?(0,o.jsx)("mark",{className:y.highlight,children:h.replace(new RegExp(`${c}|${C}`,"g"),"")},S):h)})}},54560:(J,T,t)=>{"use strict";t.d(T,{ec:()=>C});var o=t(31085),i=t(14041),d=t(93368),O=t(88758),v=t(8109);const f="search.results.list.items.extensions.v1",g=(h,S)=>{for(const m of h){if(!isValidElement(m))continue;const j=getComponentData(m,f);if(j!=null&&j(S))return cloneElement(m,{rank:S.rank,highlight:S.highlight,result:S.document,...m.props})}return null},c=h=>{const{rank:S,result:m,noTrack:j,children:P,alignItems:E="flex-start",...U}=h,L=(0,d.s)(),x=(0,i.useCallback)(()=>{j||m&&L.captureEvent("discover",m.title,{attributes:{to:m.location},value:S})},[S,m,j,L]);return(0,o.jsx)(v.A,{divider:!0,alignItems:E,onClickCapture:x,...U,children:P})},C=h=>{const{name:S,component:m,predicate:j=()=>!0}=h;return(0,O.zZ)({name:S,component:{lazy:()=>m().then(P=>E=>(0,o.jsx)(c,{rank:E.rank,result:E.result,noTrack:E.noTrack,children:(0,i.createElement)(P,E)}))},data:{[f]:j}})},y=h=>{const S=useElementFilter(h,m=>m.selectByComponentData({key:f}).getElements(),[h]);return useCallback((m,j)=>{const P=g(S,m);return _jsx(Fragment,{children:P!=null?P:_jsx(c,{rank:m.rank,result:m.document,children:_jsx(DefaultResultListItem,{rank:m.rank,highlight:m.highlight,result:m.document})})},j)},[S])},w=h=>{const{results:S,children:m,...j}=h,P=y(m);return _jsx(List,{...j,children:S.map(P)})}},72020:(J,T,t)=>{"use strict";t.d(T,{AF:()=>c,Hr:()=>w,Wm:()=>g,YR:()=>j,po:()=>C});var o=t(31085),i=t(14041),d=t(18690),O=t(19402),v=t(88758),f=t(82442);const g="techdocs.addons.addon.v1",c="techdocs.addons.wrapper.v1",C=()=>null;(0,O.h)(C,c,!0);const y=P=>`${g}.${P.toLocaleLowerCase("en-US")}`;function w(P){const{name:E,component:U}=P;return(0,v.zZ)({name:E,component:{sync:L=>(0,o.jsx)(U,{...L})},data:{[g]:P,[y(E)]:!0}})}const h=(P,E)=>P.selectByComponentData({key:E}).getElements()[0],S=P=>P.selectByComponentData({key:c}).selectByComponentData({key:g}),m=P=>P.selectByComponentData({key:c}).findComponentData({key:g}),j=()=>{const P=(0,d.P1)(),E=(0,f.O)(P,S),U=(0,f.O)(P,m),L=(0,i.useCallback)(_=>{if(!E||!_)return null;const Y=y(_.name);var N;return(N=h(E,Y))!==null&&N!==void 0?N:null},[E]),x=(0,i.useCallback)(_=>{const Y=U.find(N=>N.name===_);return Y?L(Y):null},[U,L]),z=(0,i.useCallback)(_=>{const Y=U.filter(N=>N.location===_);return Y.length?Y.map(L):null},[U,L]);return{renderComponentByName:x,renderComponentsByLocation:z}}},26679:(J,T,t)=>{"use strict";t.d(T,{l:()=>i,s:()=>d});var o=t(55309);const i=(0,o.y)({id:"plugin.techdocs.service"}),d=(0,o.y)({id:"plugin.techdocs.storageservice"})},86892:(J,T,t)=>{"use strict";t.d(T,{R:()=>P,V:()=>E});var o=t(31085),i=t(14041),d=t(73466),O=t(28966),v=t(6820),f=t(43836),g=t(10602),c=t(72427),C=t(65461),y=t(25862),w=t(26679);function h(U,L){return L.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(U.kind=U.kind.toLocaleLowerCase(),U.name=U.name.toLocaleLowerCase(),U.namespace=U.namespace.toLocaleLowerCase()),U}const S=(U,L)=>(0,v.U2)(U)===(0,v.U2)(L),m={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},j=(0,f.tK)("techdocs-reader-page-context"),P=(0,i.memo)(U=>{const{entityRef:L,children:x}=U,z=(0,c.gf)(w.l),_=(0,c.gf)(C.U),Y=(0,d.A)(async()=>z.getEntityMetadata(L),[L]),N=(0,O.A)(async()=>z.getTechDocsMetadata(L),[L]),[K,Z]=(0,i.useState)(m.title),[H,et]=(0,i.useState)(m.subtitle),[q,ht]=(0,i.useState)(m.shadowRoot);(0,i.useEffect)(()=>{q&&!N.value&&!N.loading&&N.retry()},[N.value,N.loading,q,N.retry,N]);const ut={metadata:N,entityRef:h(L,_),entityMetadata:Y,shadowRoot:q,setShadowRoot:ht,title:K,setTitle:Z,subtitle:H,setSubtitle:et},Ot=(0,g.B)({1:ut});return(0,o.jsx)(y.Ig,{attributes:{entityRef:(0,v.U2)(L)},children:(0,o.jsx)(j.Provider,{value:Ot,children:x instanceof Function?x(ut):x})})},(U,L)=>S(U.entityRef,L.entityRef)),E=()=>{const U=(0,i.useContext)(j);if(U===void 0)return m;const L=U.atVersion(1);if(L===void 0)throw new Error("No context found for version 1.");return L}},99730:(J,T,t)=>{"use strict";t.d(T,{e:()=>o});const o=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},95768:(J,T,t)=>{"use strict";t.d(T,{V:()=>o});function o(i,d){return d.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?i:i.toLocaleLowerCase("en-US")}},85920:(J,T,t)=>{"use strict";t.d(T,{K:()=>N});var o=t(31085),i=t(14041),d=t(26280),O=t(59428),v=t(27586),f=t(21405),g=t(54203),c=t(67626),C=t(72987),y=t(91035),w=t(81859),h=t(86519);class S{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":h.c}}}const m=()=>{const{updateFilters:K}=(0,f.nK)();return(0,i.useEffect)(()=>{K({techdocs:new S})},[K]),null};var j=t(36338),P=t(45250),E=t(88640),U=t(77310),L=t(56889),x=t(27125),z=t(84295),_=t(42717);const Y=K=>{var Z;const{columns:H,actions:et,options:q}=K,{loading:ht,error:ut,entities:Ot,filters:Tt}=(0,f.nK)(),{isStarredEntity:At,toggleStarredEntity:gt}=(0,L.I)(),[,Et]=(0,j.A)();var dt;const at=(0,P.capitalize)((dt=(Z=Tt.user)===null||Z===void 0?void 0:Z.value)!==null&&dt!==void 0?dt:"all"),bt=[z.f.createCopyDocsUrlAction(Et),z.f.createStarEntityAction(At,gt)];return ut?(0,o.jsx)(E.B,{severity:"error",title:"Could not load available documentation.",children:(0,o.jsx)(U.z,{language:"text",text:ut.toString()})}):(0,o.jsx)(x.o,{title:at,entities:Ot,loading:ht,actions:et||bt,columns:H,options:q})};Y.columns=_.B,Y.actions=z.f;const N=K=>{const{initialFilter:Z="owned",columns:H,actions:et,ownerPickerMode:q}=K;return(0,o.jsx)(w.S,{children:(0,o.jsxs)(d.U,{children:[(0,o.jsx)(O.d,{title:"",children:(0,o.jsx)(v.Y,{children:"Discover documentation in your ecosystem."})}),(0,o.jsx)(f.B9,{children:(0,o.jsxs)(g.GI,{children:[(0,o.jsxs)(g.GI.Filters,{children:[(0,o.jsx)(m,{}),(0,o.jsx)(c.y,{initialFilter:Z}),(0,o.jsx)(C.t,{mode:q}),(0,o.jsx)(y.m,{})]}),(0,o.jsx)(g.GI.Content,{children:(0,o.jsx)(Y,{actions:et,columns:H})})]})})]})})}},27125:(J,T,t)=>{"use strict";t.d(T,{o:()=>E});var o=t(31085),i=t(14041),d=t(36338),O=t(9222),v=t(72427),f=t(65461),g=t(51372),c=t(67871),C=t(90184),y=t(82779),w=t(14209),h=t(44186),S=t(73896),m=t(84295),j=t(42717),P=t(95768);const E=U=>{const{entities:L,title:x,loading:z,columns:_,actions:Y,options:N}=U,[,K]=(0,d.A)(),Z=(0,O.S)(y.Oc),H=(0,v.gf)(f.U);if(!L)return null;const et=L.map(Tt=>{const At=(0,c.t)(Tt,g.vv);var gt;return{entity:Tt,resolved:{docsUrl:Z({namespace:(0,P.V)((gt=Tt.metadata.namespace)!==null&>!==void 0?gt:"default",H),kind:(0,P.V)(Tt.kind,H),name:(0,P.V)(Tt.metadata.name,H)}),ownedByRelations:At,ownedByRelationsTitle:At.map(Et=>(0,C.S)(Et,{defaultKind:"group"})).join(", ")}}}),q=[j.B.createNameColumn(),j.B.createOwnerColumn(),j.B.createKindColumn(),j.B.createTypeColumn()],ht=[m.f.createCopyDocsUrlAction(K)],ut=20,Ot=et&&et.length>ut;return(0,o.jsx)(o.Fragment,{children:z||et&&et.length>0?(0,o.jsx)(w.X,{isLoading:z,options:{paging:Ot,pageSize:ut,search:!0,actionsColumnIndex:-1,...N},data:et,columns:_||q,actions:Y||ht,title:x?`${x} (${et.length})`:`All (${et.length})`}):(0,o.jsx)(h.p,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,o.jsx)(S.z,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};E.columns=j.B,E.actions=m.f},84295:(J,T,t)=>{"use strict";t.d(T,{f:()=>c});var o=t(31085),i=t(14041),d=t(55290),O=t(87051),v=t(80109),f=t(15303);const g=(0,O.A)({root:{color:"#f3ba37"}})(v.A),c={createCopyDocsUrlAction(C){return y=>({icon:()=>(0,o.jsx)(d.A,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>C(`${window.location.origin}${y.resolved.docsUrl}`)})},createStarEntityAction(C,y){return w=>{const h=w.entity,S=C(h);return{cellStyle:{paddingLeft:"1em"},icon:()=>S?(0,o.jsx)(g,{}):(0,o.jsx)(f.A,{}),tooltip:S?"Remove from favorites":"Add to favorites",onClick:()=>y(h)}}}}},42717:(J,T,t)=>{"use strict";t.d(T,{B:()=>y});var o=t(31085),i=t(14041),d=t(10394),O=t(58837);const v=(0,O.A)(w=>({value:{marginBottom:w.spacing(.75)},subvalue:{color:w.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function f(w){const{value:h,subvalue:S}=w,m=v();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.A,{className:m.value,children:h}),(0,o.jsx)(d.A,{className:m.subvalue,children:S})]})}var g=t(72072),c=t(34428);function C(w){return w.metadata.title||w.metadata.name}const y={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:w=>(0,o.jsx)(f,{value:(0,o.jsx)(g.N_,{to:w.resolved.docsUrl,children:C(w.entity)}),subvalue:w.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:w})=>(0,o.jsx)(c.i,{entityRefs:w.ownedByRelations,defaultKind:"group"})}},createKindColumn(){return{title:"Kind",field:"entity.kind"}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},81859:(J,T,t)=>{"use strict";t.d(T,{S:()=>f});var o=t(31085),i=t(14041),d=t(27155),O=t(72427),v=t(65461);const f=g=>{const{children:c}=g,C=(0,O.gf)(v.U);var y;const w=`Documentation available in ${(y=C.getOptionalString("organization.name"))!==null&&y!==void 0?y:"Backstage"}`;return(0,o.jsx)(d.d,{title:"Documentation",subtitle:w,themeId:"documentation",children:c})}},39278:(J,T,t)=>{"use strict";t.d(T,{$j:()=>x,Wj:()=>z,Ju:()=>P});var o=t(26679),i=t(18990),d=t(70835),O=t(97142),v=t(92110);class f{async getCookie(){const K=`${await this.getApiOrigin()}/cookie`,Z=await this.fetchApi.fetch(`${K}`,{credentials:"include"});if(!Z.ok)throw await d.o.fromResponse(Z);return await Z.json()}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(N){const{kind:K,namespace:Z,name:H}=N,q=`${await this.getApiOrigin()}/metadata/techdocs/${Z}/${K}/${H}`,ht=await this.fetchApi.fetch(`${q}`);if(!ht.ok)throw await d.o.fromResponse(ht);return await ht.json()}async getEntityMetadata(N){const{kind:K,namespace:Z,name:H}=N,q=`${await this.getApiOrigin()}/metadata/entity/${Z}/${K}/${H}`,ht=await this.fetchApi.fetch(`${q}`);if(!ht.ok)throw await d.o.fromResponse(ht);return await ht.json()}constructor(N){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=N.configApi,this.discoveryApi=N.discoveryApi,this.fetchApi=N.fetchApi}}class g{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var N;return(N=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&N!==void 0?N:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getOptionalString("techdocs.builder")||"local"}async getEntityDocs(N,K){const{kind:Z,namespace:H,name:et}=N,ht=`${await this.getStorageUrl()}/${H}/${Z}/${et}/${K}`,ut=await this.fetchApi.fetch(`${ht.endsWith("/")?ht:`${ht}/`}index.html`);let Ot="";switch(ut.status){case 404:throw Ot="Page not found. ",K||(Ot+="This could be because there is no index.md file in the root of the docs directory of this repository."),new O.m_(Ot);case 500:throw Ot="Could not generate documentation or an error in the TechDocs backend. ",new Error(Ot);default:break}return ut.text()}async syncEntityDocs(N,K=()=>{}){const{kind:Z,namespace:H,name:et}=N,ht=`${await this.getApiOrigin()}/sync/${H}/${Z}/${et}`;return new Promise((ut,Ot)=>{const Tt=new AbortController;(0,v.y)(ht,{fetch:this.fetchApi.fetch,signal:Tt.signal,onmessage(At){if(At.event==="log")At.data&&K(JSON.parse(At.data));else if(At.event==="finish"){let gt=!1;At.data&&({updated:gt}=JSON.parse(At.data)),ut(gt?"updated":"cached")}else At.event==="error"&&Ot(new Error(At.data))},onerror(At){Tt.abort(),Ot(At)}})})}async getBaseUrl(N,K,Z){const{kind:H,namespace:et,name:q}=K,ut=`${await this.getApiOrigin()}/static/docs/${et}/${H}/${q}/${Z}`;return new URL(N,ut.endsWith("/")?ut:`${ut}/`).toString()}constructor(N){(0,i._)(this,"configApi",void 0),(0,i._)(this,"discoveryApi",void 0),(0,i._)(this,"fetchApi",void 0),this.configApi=N.configApi,this.discoveryApi=N.discoveryApi,this.fetchApi=N.fetchApi}}var c=t(82779),C=t(9803),y=t(12935),w=t(65461),h=t(57405),S=t(70795),m=t(88758),j=t(54560);const P=(0,C.i)({id:"techdocs",apis:[(0,y.b)({api:o.s,deps:{configApi:w.U,discoveryApi:h.I,fetchApi:S.a},factory:({configApi:Y,discoveryApi:N,fetchApi:K})=>new g({configApi:Y,discoveryApi:N,fetchApi:K})}),(0,y.b)({api:o.l,deps:{configApi:w.U,discoveryApi:h.I,fetchApi:S.a},factory:({configApi:Y,discoveryApi:N,fetchApi:K})=>new f({configApi:Y,discoveryApi:N,fetchApi:K})})],routes:{root:c.rQ,docRoot:c.Oc,entityContent:c.Ri}}),E=P.provide((0,m.QJ)({name:"TechdocsPage",component:()=>t.e(9605).then(t.bind(t,29605)).then(Y=>Y.Router),mountPoint:c.rQ})),U=P.provide((0,m.QJ)({name:"EntityTechdocsContent",component:()=>t.e(9605).then(t.bind(t,29605)).then(Y=>Y.EmbeddedDocsRouter),mountPoint:c.Ri})),L=P.provide((0,m.QJ)({name:"TechDocsCustomHome",component:()=>t.e(4487).then(t.bind(t,94487)).then(Y=>Y.TechDocsCustomHome),mountPoint:c.rQ})),x=P.provide((0,m.QJ)({name:"TechDocsIndexPage",component:()=>t.e(5788).then(t.bind(t,85788)).then(Y=>Y.TechDocsIndexPage),mountPoint:c.rQ})),z=P.provide((0,m.QJ)({name:"TechDocsReaderPage",component:()=>t.e(4036).then(t.bind(t,84036)).then(Y=>Y.TechDocsReaderPage),mountPoint:c.Oc})),_=P.provide((0,j.ec)({name:"TechDocsSearchResultListItem",component:()=>Promise.resolve().then(t.bind(t,27698)).then(Y=>Y.TechDocsSearchResultListItem),predicate:Y=>Y.type==="techdocs"}))},16203:(J,T,t)=>{"use strict";t.d(T,{p:()=>ao});var o=t(31085),i=t(14041),d=t(42899),O=t(58837),v=t(86892),f=t(9394),g=t(91360),c=t(22856),C=t(68146);const y="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",w=p=>{(0,i.useEffect)(()=>{if(!p)return()=>{};const R=p.querySelectorAll('head > link[rel="stylesheet"]');var $;let W=($=R==null?void 0:R.length)!==null&&$!==void 0?$:0;const V=new CustomEvent(y);if(!W)return p.dispatchEvent(V),()=>{};const tt=()=>{--W===0&&p.dispatchEvent(V)};return R==null||R.forEach(rt=>{rt.addEventListener("load",tt)}),()=>{R==null||R.forEach(rt=>{rt.removeEventListener("load",tt)})}},[p])},h=p=>{const[R,$]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!p)return()=>{};$(!0);const W=p.style;W.setProperty("opacity","0");const V=()=>{$(!1),W.setProperty("opacity","1")};return p.addEventListener(y,V),()=>{p.removeEventListener(y,V)}},[p]),R},S=p=>{const{element:R,onAppend:$,children:W}=p,[V,tt]=(0,i.useState)((0,f.vt)({...(0,c.A)(),insertionPoint:void 0}));w(R);const rt=h(R),Ct=(0,i.useCallback)(Mt=>{if(!R||!Mt)return;tt((0,f.vt)({...(0,c.A)(),insertionPoint:R.querySelector("head")||void 0}));let Wt=Mt.shadowRoot;Wt||(Wt=Mt.attachShadow({mode:"open"})),Wt.replaceChildren(R),typeof $=="function"&&$(Wt)},[R,$]);return(0,o.jsxs)(o.Fragment,{children:[rt&&(0,o.jsx)(C.k,{}),(0,o.jsxs)(g.Ay,{jss:V,sheetsManager:new Map,children:[(0,o.jsx)("div",{ref:Ct,"data-testid":"techdocs-native-shadowroot"}),W]})]})};var m=t(12784);const j=()=>{const{shadowRoot:p}=(0,v.V)();return p},P=p=>{const R=j(),[$,W]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let V;return R&&(V=new MutationObserver(()=>{W(!$)}),V.observe(R,{attributes:!0,characterData:!0,childList:!0,subtree:!0})),()=>V==null?void 0:V.disconnect()},[R,$,W]),R?p.map(V=>R.querySelectorAll(V)).filter(V=>V.length).map(V=>Array.from(V)).flat():[]},E=p=>p.toString()&&p.rangeCount&&p.getRangeAt(0).getBoundingClientRect().top,U=(p=0)=>{const R=j(),[$,W]=useState(null),V=useMemo(()=>debounce(()=>{const tt=R,rt=tt.getSelection?tt.getSelection():document.getSelection();rt&&E(rt)?W(rt):W(null)},p),[R,W,p]);return useEffect(()=>(window.document.addEventListener("selectionchange",V),()=>{V.cancel(),window.document.removeEventListener("selectionchange",V)}),[V]),$};var L=t(12173),x=t(26280),z=t(45250),_=t(73466),Y=t(5877),N=t(43836),K=t(10602),Z=t(72427),H=t(93368),et=t(25862),q=t(65461),ht=t(55309);const ut=(0,ht.y)({id:"plugin.search.queryservice"});class Ot{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(R){_define_property(this,"mockedResults",void 0),this.mockedResults=R}}const Tt=(0,N.tK)("search-context"),At=()=>{const p=(0,i.useContext)(Tt);if(!p)throw new Error("useSearch must be used within a SearchContextProvider");const R=p.atVersion(1);if(!R)throw new Error("No SearchContext v1 found");return R},gt=()=>(0,i.useContext)(Tt)!==void 0,Et={term:"",types:[],filters:{},pageLimit:void 0,pageCursor:void 0},dt=(p=Et)=>{var R,$,W,V;const tt=(0,Z.gf)(ut),rt=(0,H.s)(),[Ct,Mt]=(0,i.useState)(p.term),[Wt,Zt]=(0,i.useState)(p.types),[kt,It]=(0,i.useState)(p.filters),[ee,xe]=(0,i.useState)(p.pageLimit),[Jt,ne]=(0,i.useState)(p.pageCursor),oe=(0,Y.A)(Ct),de=(0,Y.A)(kt),Dt=(0,_.A)(async()=>{const pe=await tt.query({term:Ct,types:Wt,filters:kt,pageLimit:ee,pageCursor:Jt});if(Ct){var Ue,ce;rt.captureEvent("search",Ct,{value:(ce=(Ue=Dt.value)===null||Ue===void 0?void 0:Ue.numberOfResults)!==null&&ce!==void 0?ce:void 0})}return pe},[Ct,Wt,kt,ee,Jt]),Gt=!Dt.loading&&!Dt.error&&((R=Dt.value)===null||R===void 0?void 0:R.nextPageCursor),Xt=!Dt.loading&&!Dt.error&&(($=Dt.value)===null||$===void 0?void 0:$.previousPageCursor),Ce=(0,i.useCallback)(()=>{var pe;ne((pe=Dt.value)===null||pe===void 0?void 0:pe.nextPageCursor)},[(W=Dt.value)===null||W===void 0?void 0:W.nextPageCursor]),we=(0,i.useCallback)(()=>{var pe;ne((pe=Dt.value)===null||pe===void 0?void 0:pe.previousPageCursor)},[(V=Dt.value)===null||V===void 0?void 0:V.previousPageCursor]);return(0,i.useEffect)(()=>{oe!==void 0&&Ct!==oe&&ne(void 0)},[Ct,oe,ne]),(0,i.useEffect)(()=>{de!==void 0&&!(0,z.isEqual)(kt,de)&&ne(void 0)},[kt,de,ne]),{result:Dt,term:Ct,setTerm:Mt,types:Wt,setTypes:Zt,filters:kt,setFilters:It,pageLimit:ee,setPageLimit:xe,pageCursor:Jt,setPageCursor:ne,fetchNextPage:Gt?Ce:void 0,fetchPreviousPage:Xt?we:void 0}},at=p=>{const{initialState:R,children:$}=p,W=dt(R);return(0,o.jsx)(et.Ig,{attributes:{searchTypes:W.types.sort().join(",")},children:(0,o.jsx)(Tt.Provider,{value:(0,K.B)({1:W}),children:$})})},bt=p=>{const{initialState:R,inheritParentContextIfAvailable:$,children:W}=p,V=gt(),tt=(0,Z.gf)(q.U),rt=R!=null?R:{},Ct=tt.has("search.query.pageLimit")?{pageLimit:tt.getNumber("search.query.pageLimit")}:{},Mt={...Et,...rt,...Ct};return V&&$?(0,o.jsx)(o.Fragment,{children:W}):(0,o.jsx)(at,{initialState:Mt,children:W})};var ft=t(78467),St=t(20577),jt=t(29365),Bt=t(34839),Ut=t(16249),ct=t(64947),k=t(45917),G=t(22771);function lt(p){return(0,i.forwardRef)((R,$)=>(0,o.jsx)(bt,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(p,{...R,ref:$})}))}const pt=lt((0,i.forwardRef)((p,R)=>{const{onChange:$,onKeyDown:W=()=>{},onClear:V=()=>{},onSubmit:tt=()=>{},debounceTime:rt=200,clearButton:Ct=!0,fullWidth:Mt=!0,value:Wt,label:Zt,placeholder:kt,inputProps:It={},InputProps:ee={},endAdornment:xe,...Jt}=p,ne=(0,Z.gf)(q.U),[oe,de]=(0,i.useState)(""),Dt=(0,i.useRef)("");(0,i.useEffect)(()=>{de(ce=>ce===Dt.current?String(Wt):ce)},[Wt,Dt]),(0,G.A)(()=>{Dt.current=oe,$(oe)},rt,[oe]);const Gt=(0,i.useCallback)(ce=>{de(ce.target.value)},[de]),Xt=(0,i.useCallback)(ce=>{W&&W(ce),tt&&ce.key==="Enter"&&tt()},[W,tt]),Ce=(0,i.useCallback)(()=>{Dt.current="",$(""),de(""),V&&V()},[$,V]),we=Zt?void 0:"Search",Qe=kt!=null?kt:`Search in ${ne.getOptionalString("app.title")||"Backstage"}`,pe=(0,o.jsx)(Bt.A,{position:"start",children:(0,o.jsx)(jt.A,{"aria-label":"Query",size:"small",disabled:!0,children:(0,o.jsx)(k.A,{})})}),Ue=(0,o.jsx)(Bt.A,{position:"end",children:(0,o.jsx)(ct.A,{"aria-label":"Clear",size:"small",onClick:Ce,onKeyDown:ce=>{ce.key==="Enter"&&ce.stopPropagation()},children:"Clear"})});return(0,o.jsx)(Ut.A,{id:"search-bar-text-field","data-testid":"search-bar-next",variant:"outlined",margin:"normal",inputRef:R,value:oe,label:Zt,placeholder:Qe,InputProps:{startAdornment:pe,endAdornment:Ct?Ue:xe,...ee},inputProps:{"aria-label":we,...It},fullWidth:Mt,onChange:Gt,onKeyDown:Xt,...Jt})})),xt=lt((0,i.forwardRef)((p,R)=>{const{value:$="",onChange:W,...V}=p,{term:tt,setTerm:rt}=At();(0,i.useEffect)(()=>{$&&rt(String($))},[$,rt]);const Ct=(0,i.useCallback)(Mt=>{W?W(Mt):rt(Mt)},[W,rt]);return(0,o.jsx)(et.Ig,{attributes:{pluginId:"search",extension:"SearchBar"},children:(0,o.jsx)(pt,{...V,ref:R,value:tt,onChange:Ct})})})),mt=(0,O.A)(p=>({loading:{right:p.spacing(1),position:"absolute"}})),vt=p=>R=>(0,o.jsx)(bt,{inheritParentContextIfAvailable:!0,children:(0,o.jsx)(p,{...R})}),$t=()=>{const p=mt();return(0,o.jsx)(ft.A,{className:p.loading,"data-testid":"search-autocomplete-progressbar",color:"inherit",size:20})},Pt=vt(function(R){const{loading:$,value:W,onChange:V=()=>{},options:tt=[],getOptionLabel:rt=Dt=>String(Dt),inputPlaceholder:Ct,inputDebounceTime:Mt,freeSolo:Wt=!0,fullWidth:Zt=!0,clearOnBlur:kt=!1,"data-testid":It="search-autocomplete",...ee}=R,{setTerm:xe}=At(),Jt=(0,i.useCallback)(Dt=>Dt?typeof Dt=="string"?Dt:rt(Dt):"",[rt]),ne=(0,i.useMemo)(()=>Jt(W),[W,Jt]),oe=(0,i.useCallback)((Dt,Gt,Xt,Ce)=>{xe(Jt(Gt)),V(Dt,Gt,Xt,Ce)},[Jt,xe,V]),de=(0,i.useCallback)(({InputProps:{ref:Dt,className:Gt,endAdornment:Xt},InputLabelProps:Ce,...we})=>(0,o.jsx)(xt,{...we,ref:Dt,clearButton:!1,value:ne,placeholder:Ct,debounceTime:Mt,endAdornment:$?(0,o.jsx)($t,{}):Xt,InputProps:{className:Gt}}),[$,ne,Ct,Mt]);return(0,o.jsx)(St.Ay,{...ee,"data-testid":It,value:W,onChange:oe,options:tt,getOptionLabel:rt,renderInput:de,freeSolo:Wt,fullWidth:Zt,clearOnBlur:kt})});var Ht=t(18690),Nt=t(27698);const se=p=>p==null?void 0:p.document,ye=p=>{const{entityId:R,entityTitle:$,debounceTime:W=150}=p,[V,tt]=(0,i.useState)(!1),rt=(0,Ht.Zp)(),{setFilters:Ct,term:Mt,result:{loading:Wt,value:Zt}}=At(),[kt,It]=(0,i.useState)([]);(0,i.useEffect)(()=>{let oe=!0;if(oe&&Zt){const de=Zt.results.slice(0,10);It(de)}return()=>{oe=!1}},[Wt,Zt]);const{kind:ee,name:xe,namespace:Jt}=R;(0,i.useEffect)(()=>{Ct(oe=>({...oe,kind:ee,namespace:Jt,name:xe}))},[ee,Jt,xe,Ct]);const ne=(oe,de)=>{if(se(de)){const{location:Dt}=de.document;rt(Dt)}};return(0,o.jsx)(Pt,{"data-testid":"techdocs-search-bar",size:"small",open:V&&!!Mt,getOptionLabel:()=>"",filterOptions:oe=>oe,onClose:()=>{tt(!1)},onOpen:()=>{tt(!0)},onChange:ne,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:kt,renderOption:({document:oe,highlight:de})=>(0,o.jsx)(Nt.TechDocsSearchResultListItem,{result:oe,lineClamp:3,asListItem:!1,asLink:!1,title:oe.title,highlight:de}),loading:Wt,inputDebounceTime:W,inputPlaceholder:`Search ${$||R.name} docs`,freeSolo:!1})},Re=p=>{const R={term:"",types:["techdocs"],pageCursor:"",filters:p.entityId};return(0,o.jsx)(bt,{initialState:R,children:(0,o.jsx)(ye,{...p})})};var ie=t(74219),fe=t(82266);const qt=(0,i.lazy)(()=>Promise.all([t.e(3308),t.e(9234)]).then(t.bind(t,99234)).then(p=>({default:p.RealLogViewer})));function Ee(p){const{Progress:R}=(0,fe.n)().getComponents();return(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(R,{}),children:(0,o.jsx)(qt,{...p})})}var Ae=t(73845),_t=t(72501),Vt=t(12398),Ie=t(32881);const Ve=(0,O.A)(p=>(0,Vt.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}})),ae=({buildLog:p,onClose:R})=>{const $=Ve(),W=p.length===0?"Waiting for logs...":p.join(`
|
|
8
|
+
`);return(0,o.jsxs)(d.A,{container:!0,direction:"column",className:$.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)(_t.A,{variant:"h5",children:"Build Details"}),(0,o.jsx)(jt.A,{title:"Close the drawer",onClick:R,color:"inherit",children:(0,o.jsx)(Ie.A,{})},"dismiss")]}),(0,o.jsx)(d.A,{item:!0,xs:!0,children:(0,o.jsx)(Ee,{text:W,classes:{root:$.logs}})})]})},Ke=({buildLog:p})=>{const R=Ve(),[$,W]=(0,i.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ct.A,{color:"inherit",onClick:()=>W(!0),children:"Show Build Logs"}),(0,o.jsx)(Ae.Ay,{classes:{paper:R.paper},anchor:"right",open:$,onClose:()=>W(!1),children:(0,o.jsx)(ae,{buildLog:p,onClose:()=>W(!1)})})]})},ze=({errorMessage:p})=>{const R=(0,Z.gf)(q.U).getOptionalString("techdocs.builder"),$=(0,H.s)(),{entityRef:W}=(0,v.V)(),V=(0,Ht.zy)();(0,i.useEffect)(()=>{const{pathname:rt,search:Ct,hash:Mt}=V;$.captureEvent("not-found",`${rt}${Ct}${Mt}`,{attributes:W})},[$,W,V]);let tt="";return[void 0,"local"].includes(R)||(tt="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)(L.M,{status:"404",statusMessage:p||"Documentation not found",additionalInfo:tt})};var on=t(28966),Ze=t(26679);function be({contentLoading:p,content:R,activeSyncState:$}){return p||$==="BUILD_READY_RELOAD"||!R&&$==="CHECKING"?"CHECKING":!R&&$==="BUILDING"?"INITIAL_BUILD":R?$==="BUILDING"?"CONTENT_STALE_REFRESHING":$==="BUILD_READY"?"CONTENT_STALE_READY":$==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function ln(p,R){const $={...p};switch(R.type){case"sync":R.state==="CHECKING"&&($.buildLog=[]),$.activeSyncState=R.state,$.syncError=R.syncError;break;case"contentLoading":$.contentLoading=!0,$.contentError=void 0;break;case"content":typeof R.path=="string"&&($.path=R.path),$.contentLoading=!1,$.content=R.content,$.contentError=R.contentError;break;case"buildLog":$.buildLog=$.buildLog.concat(R.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes($.activeSyncState)&&["contentLoading","content"].includes(R.type)&&($.activeSyncState="UP_TO_DATE",$.buildLog=[]),$}function cn(p,R,$,W){var V,tt;const[rt,Ct]=(0,i.useReducer)(ln,{activeSyncState:"CHECKING",path:W,contentLoading:!0,buildLog:[]}),Mt=(0,Z.gf)(Ze.s),{retry:Wt}=(0,on.A)(async()=>{Ct({type:"contentLoading"});try{const It=await Mt.getEntityDocs({kind:p,namespace:R,name:$},W);return Ct({type:"content",content:It,path:W}),It}catch(It){Ct({type:"content",contentError:It,path:W})}},[Mt,p,R,$,W]),Zt=(0,i.useRef)({content:void 0,reload:()=>{}});return Zt.current={content:rt.content,reload:Wt},(0,_.A)(async()=>{Ct({type:"sync",state:"CHECKING"});const It=setTimeout(()=>{Ct({type:"sync",state:"BUILDING"})},1e3);try{switch(await Mt.syncEntityDocs({kind:p,namespace:R,name:$},xe=>{Ct({type:"buildLog",log:xe})})){case"updated":Zt.current.content?Ct({type:"sync",state:"BUILD_READY"}):(Zt.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(ee){Ct({type:"sync",state:"ERROR",syncError:ee})}finally{clearTimeout(It)}},[p,$,R,Mt,Ct,Zt]),{state:(0,i.useMemo)(()=>be({activeSyncState:rt.activeSyncState,contentLoading:rt.contentLoading,content:rt.content}),[rt.activeSyncState,rt.content,rt.contentLoading]),contentReload:Wt,path:rt.path,content:rt.content,contentErrorMessage:(V=rt.contentError)===null||V===void 0?void 0:V.toString(),syncErrorMessage:(tt=rt.syncError)===null||tt===void 0?void 0:tt.toString(),buildLog:rt.buildLog}}const dn=(0,i.createContext)({}),me=()=>(0,i.useContext)(dn),Me=p=>{const{children:R}=p,{"*":$=""}=(0,Ht.g)(),{entityRef:W}=(0,v.V)(),{kind:V,namespace:tt,name:rt}=W,Ct=cn(V,tt,rt,$);return(0,o.jsx)(dn.Provider,{value:Ct,children:R instanceof Function?R(Ct):R})},Je=p=>R=>(0,o.jsx)(Me,{children:(0,o.jsx)(p,{...R})}),Xe=(0,O.A)(p=>({root:{marginBottom:p.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),Fe=()=>{let p=null;const R=Xe(),{state:$,contentReload:W,contentErrorMessage:V,syncErrorMessage:tt,buildLog:rt}=me();return $==="INITIAL_BUILD"&&(p=(0,o.jsx)(ie.A,{classes:{root:R.root},variant:"outlined",severity:"info",icon:(0,o.jsx)(ft.A,{size:"24px"}),action:(0,o.jsx)(Ke,{buildLog:rt}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),$==="CONTENT_STALE_REFRESHING"&&(p=(0,o.jsx)(ie.A,{variant:"outlined",severity:"info",icon:(0,o.jsx)(ft.A,{size:"24px"}),action:(0,o.jsx)(Ke,{buildLog:rt}),classes:{root:R.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),$==="CONTENT_STALE_READY"&&(p=(0,o.jsx)(ie.A,{variant:"outlined",severity:"success",action:(0,o.jsx)(ct.A,{color:"inherit",onClick:()=>W(),children:"Refresh"}),classes:{root:R.root},children:"A newer version of this documentation is now available, please refresh to view."})),$==="CONTENT_STALE_ERROR"&&(p=(0,o.jsxs)(ie.A,{variant:"outlined",severity:"error",action:(0,o.jsx)(Ke,{buildLog:rt}),classes:{root:R.root,message:R.message},children:["Building a newer version of this documentation failed."," ",tt]})),$==="CONTENT_NOT_FOUND"&&(p=(0,o.jsxs)(o.Fragment,{children:[tt&&(0,o.jsxs)(ie.A,{variant:"outlined",severity:"error",action:(0,o.jsx)(Ke,{buildLog:rt}),classes:{root:R.root,message:R.message},children:["Building a newer version of this documentation failed."," ",tt]}),(0,o.jsx)(ze,{errorMessage:V})]})),p};var He=t(5893),un=t(54917),Tn=t(3347),sn=t(71651),qe=t.n(sn);const hn=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Rn=/^https:\/\/fonts\.googleapis\.com/,In=/^https:\/\/fonts\.gstatic\.com/,Dn=p=>p.nodeName==="LINK",M=p=>{const R=(p==null?void 0:p.getAttribute("href"))||"",$=R.match(hn),W=R.match(Rn),V=R.match(In);return $||W||V},u=p=>(Dn(p)&&!M(p)&&p.remove(),p),I=p=>p.nodeName==="IFRAME",B=(p,R)=>{const $=p.getAttribute("src")||"";try{const{host:W}=new URL($);return R.includes(W)}catch{return!1}},nt=p=>R=>(I(R)&&!B(R,p)&&R.remove(),R),X=()=>{const p=(0,Z.gf)(q.U);return(0,i.useMemo)(()=>p.getOptionalConfig("techdocs.sanitizer"),[p])},wt=()=>{const p=X();return(0,i.useCallback)(async R=>{const $=p==null?void 0:p.getOptionalStringArray("allowedIframeHosts");qe().addHook("beforeSanitizeElements",u);const W=["link"];return $&&(W.push("iframe"),qe().addHook("beforeSanitizeElements",nt($))),qe().sanitize(R.outerHTML,{ADD_TAGS:W,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[p])};var te=t(34435),Ft=t(268);const ge=({theme:p})=>`
|
|
9
|
+
/*================== Variables ==================*/
|
|
10
|
+
/*
|
|
11
|
+
As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
|
|
12
|
+
As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
:host {
|
|
16
|
+
/* FONT */
|
|
17
|
+
--md-default-fg-color: ${p.palette.text.primary};
|
|
18
|
+
--md-default-fg-color--light: ${p.palette.text.secondary};
|
|
19
|
+
--md-default-fg-color--lighter: ${(0,Ft.a)(p.palette.text.secondary,.7)};
|
|
20
|
+
--md-default-fg-color--lightest: ${(0,Ft.a)(p.palette.text.secondary,.3)};
|
|
21
|
+
|
|
22
|
+
/* BACKGROUND */
|
|
23
|
+
--md-default-bg-color:${p.palette.background.default};
|
|
24
|
+
--md-default-bg-color--light: ${p.palette.background.paper};
|
|
25
|
+
--md-default-bg-color--lighter: ${(0,Ft.a)(p.palette.background.paper,.7)};
|
|
26
|
+
--md-default-bg-color--lightest: ${(0,Ft.a)(p.palette.background.paper,.3)};
|
|
27
|
+
|
|
28
|
+
/* PRIMARY */
|
|
29
|
+
--md-primary-fg-color: ${p.palette.primary.main};
|
|
30
|
+
--md-primary-fg-color--light: ${p.palette.primary.light};
|
|
31
|
+
--md-primary-fg-color--dark: ${p.palette.primary.dark};
|
|
32
|
+
--md-primary-bg-color: ${p.palette.primary.contrastText};
|
|
33
|
+
--md-primary-bg-color--light: ${(0,Ft.a)(p.palette.primary.contrastText,.7)};
|
|
34
|
+
|
|
35
|
+
/* ACCENT */
|
|
36
|
+
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
37
|
+
--md-accent-fg-color--transparent: ${(0,Ft.X4)(p.palette.primary.main,.1)};
|
|
38
|
+
--md-accent-bg-color: var(--md-primary-bg-color);
|
|
39
|
+
--md-accent-bg-color--light: var(--md-primary-bg-color--light);
|
|
40
|
+
|
|
41
|
+
/* SHADOW */
|
|
42
|
+
--md-shadow-z1: ${p.shadows[1]};
|
|
43
|
+
--md-shadow-z2: ${p.shadows[2]};
|
|
44
|
+
--md-shadow-z3: ${p.shadows[3]};
|
|
45
|
+
|
|
46
|
+
/* EXTENSIONS */
|
|
47
|
+
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
48
|
+
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
49
|
+
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
50
|
+
--md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
|
|
51
|
+
--md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
|
|
52
|
+
--md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
|
|
53
|
+
--md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
|
|
54
|
+
--md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
55
|
+
--md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
|
|
56
|
+
--md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
|
|
57
|
+
--md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
|
|
58
|
+
--md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
|
|
59
|
+
--md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
|
|
60
|
+
--md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
|
|
61
|
+
--md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
|
|
62
|
+
--md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
|
|
63
|
+
--md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
64
|
+
--md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
|
|
65
|
+
--md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
66
|
+
--md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
|
|
67
|
+
--md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
68
|
+
--md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
|
|
69
|
+
--md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
|
|
70
|
+
--md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
|
|
71
|
+
--md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
|
|
72
|
+
--md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
|
|
73
|
+
--md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
|
|
74
|
+
--md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
|
|
75
|
+
--md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host > * {
|
|
79
|
+
/* CODE */
|
|
80
|
+
--md-code-fg-color: ${p.palette.text.primary};
|
|
81
|
+
--md-code-bg-color: ${p.palette.background.paper};
|
|
82
|
+
--md-code-hl-color: ${(0,Ft.X4)(p.palette.warning.main,.5)};
|
|
83
|
+
--md-code-hl-color--light: var(--md-code-hl-color);
|
|
84
|
+
--md-code-hl-keyword-color: ${p.palette.type==="dark"?p.palette.primary.light:p.palette.primary.dark};
|
|
85
|
+
--md-code-hl-function-color: ${p.palette.type==="dark"?p.palette.secondary.light:p.palette.secondary.dark};
|
|
86
|
+
--md-code-hl-string-color: ${p.palette.type==="dark"?p.palette.success.light:p.palette.success.dark};
|
|
87
|
+
--md-code-hl-number-color: ${p.palette.type==="dark"?p.palette.error.light:p.palette.error.dark};
|
|
88
|
+
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
89
|
+
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
90
|
+
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
91
|
+
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
92
|
+
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
93
|
+
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
94
|
+
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
95
|
+
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
96
|
+
|
|
97
|
+
/* TYPESET */
|
|
98
|
+
--md-typeset-font-size: 1rem;
|
|
99
|
+
--md-typeset-color: var(--md-default-fg-color);
|
|
100
|
+
--md-typeset-a-color: ${p.palette.link};
|
|
101
|
+
--md-typeset-table-color: ${p.palette.text.primary};
|
|
102
|
+
--md-typeset-table-color--light: ${(0,Ft.X4)(p.palette.text.primary,.5)};
|
|
103
|
+
--md-typeset-del-color: ${p.palette.type==="dark"?(0,Ft.X4)(p.palette.error.dark,.5):(0,Ft.X4)(p.palette.error.light,.5)};
|
|
104
|
+
--md-typeset-ins-color: ${p.palette.type==="dark"?(0,Ft.X4)(p.palette.success.dark,.5):(0,Ft.X4)(p.palette.success.light,.5)};
|
|
105
|
+
--md-typeset-mark-color: ${p.palette.type==="dark"?(0,Ft.X4)(p.palette.warning.dark,.5):(0,Ft.X4)(p.palette.warning.light,.5)};
|
|
106
|
+
--md-typeset-kbd-color: var(--md-code-bg-color);
|
|
107
|
+
--md-typeset-kbd-accent-color var(--md-code-bg-color);
|
|
108
|
+
--md-typeset-kbd-border-color: var(--md-default-fg-color--light);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media screen and (max-width: 76.1875em) {
|
|
112
|
+
:host > * {
|
|
113
|
+
/* TYPESET */
|
|
114
|
+
--md-typeset-font-size: .9rem;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media screen and (max-width: 600px) {
|
|
119
|
+
:host > * {
|
|
120
|
+
/* TYPESET */
|
|
121
|
+
--md-typeset-font-size: .7rem;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
--md-footer-bg-color: var(--md-default-bg-color);
|
|
126
|
+
--md-footer-bg-color--dark: var(--md-default-bg-color);
|
|
127
|
+
`,ue=({theme:p})=>`
|
|
128
|
+
/*================== Reset ==================*/
|
|
129
|
+
|
|
130
|
+
body {
|
|
131
|
+
--md-text-color: var(--md-default-fg-color);
|
|
132
|
+
--md-text-link-color: var(--md-accent-fg-color);
|
|
133
|
+
--md-text-font-family: ${p.typography.fontFamily};
|
|
134
|
+
font-family: var(--md-text-font-family);
|
|
135
|
+
background-color: unset;
|
|
136
|
+
}
|
|
137
|
+
`,le="224px",zt=({theme:p,sidebar:R})=>`
|
|
138
|
+
/*================== Layout ==================*/
|
|
139
|
+
|
|
140
|
+
/* mkdocs material v9 compat */
|
|
141
|
+
.md-nav__title {
|
|
142
|
+
color: var(--md-default-fg-color);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.md-grid {
|
|
146
|
+
max-width: 100%;
|
|
147
|
+
margin: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.md-nav {
|
|
151
|
+
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
152
|
+
}
|
|
153
|
+
.md-nav__link {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: space-between;
|
|
157
|
+
}
|
|
158
|
+
.md-nav__icon {
|
|
159
|
+
height: 20px !important;
|
|
160
|
+
width: 20px !important;
|
|
161
|
+
margin-left:${p.spacing(1)}px;
|
|
162
|
+
}
|
|
163
|
+
.md-nav__icon svg {
|
|
164
|
+
margin: 0;
|
|
165
|
+
width: 20px !important;
|
|
166
|
+
height: 20px !important;
|
|
167
|
+
}
|
|
168
|
+
.md-nav__icon:after {
|
|
169
|
+
width: 20px !important;
|
|
170
|
+
height: 20px !important;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.md-nav__item--active > .md-nav__link, a.md-nav__link--active {
|
|
174
|
+
text-decoration: underline;
|
|
175
|
+
color: var(--md-typeset-a-color);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.md-main__inner {
|
|
179
|
+
margin-top: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.md-sidebar {
|
|
183
|
+
bottom: 75px;
|
|
184
|
+
position: fixed;
|
|
185
|
+
width: 16rem;
|
|
186
|
+
overflow-y: auto;
|
|
187
|
+
overflow-x: hidden;
|
|
188
|
+
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
189
|
+
scrollbar-width: thin;
|
|
190
|
+
}
|
|
191
|
+
.md-sidebar .md-sidebar__scrollwrap {
|
|
192
|
+
width: calc(12.1rem);
|
|
193
|
+
overflow-y: hidden;
|
|
194
|
+
}
|
|
195
|
+
.md-sidebar--secondary {
|
|
196
|
+
right: ${p.spacing(3)}px;
|
|
197
|
+
}
|
|
198
|
+
.md-sidebar::-webkit-scrollbar {
|
|
199
|
+
width: 5px;
|
|
200
|
+
}
|
|
201
|
+
.md-sidebar::-webkit-scrollbar-button {
|
|
202
|
+
width: 5px;
|
|
203
|
+
height: 5px;
|
|
204
|
+
}
|
|
205
|
+
.md-sidebar::-webkit-scrollbar-track {
|
|
206
|
+
background: #eee;
|
|
207
|
+
border: 1 px solid rgb(250, 250, 250);
|
|
208
|
+
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
209
|
+
border-radius: 3px;
|
|
210
|
+
}
|
|
211
|
+
.md-sidebar::-webkit-scrollbar-thumb {
|
|
212
|
+
width: 5px;
|
|
213
|
+
background: rgb(193, 193, 193);
|
|
214
|
+
border: transparent;
|
|
215
|
+
border-radius: 3px;
|
|
216
|
+
}
|
|
217
|
+
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
218
|
+
background: rgb(125, 125, 125);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.md-content {
|
|
222
|
+
max-width: calc(100% - 16rem * 2);
|
|
223
|
+
margin-left: 16rem;
|
|
224
|
+
margin-bottom: 50px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.md-footer {
|
|
228
|
+
position: fixed;
|
|
229
|
+
bottom: 0px;
|
|
230
|
+
pointer-events: none;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.md-footer-nav__link, .md-footer__link {
|
|
234
|
+
pointer-events: all;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.md-footer__title {
|
|
238
|
+
background-color: unset;
|
|
239
|
+
}
|
|
240
|
+
.md-footer-nav__link, .md-footer__link {
|
|
241
|
+
width: 16rem;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.md-dialog {
|
|
245
|
+
background-color: unset;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@media screen and (min-width: 76.25em) {
|
|
249
|
+
.md-sidebar {
|
|
250
|
+
height: auto;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
@media screen and (max-width: 76.1875em) {
|
|
255
|
+
.md-nav {
|
|
256
|
+
transition: none !important;
|
|
257
|
+
background-color: var(--md-default-bg-color)
|
|
258
|
+
}
|
|
259
|
+
.md-nav--primary .md-nav__title {
|
|
260
|
+
cursor: auto;
|
|
261
|
+
color: var(--md-default-fg-color);
|
|
262
|
+
font-weight: 700;
|
|
263
|
+
white-space: normal;
|
|
264
|
+
line-height: 1rem;
|
|
265
|
+
height: auto;
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-flow: column;
|
|
268
|
+
row-gap: 1.6rem;
|
|
269
|
+
padding: 1.2rem .8rem .8rem;
|
|
270
|
+
background-color: var(--md-default-bg-color);
|
|
271
|
+
}
|
|
272
|
+
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
273
|
+
box-shadow: none;
|
|
274
|
+
}
|
|
275
|
+
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
276
|
+
border-top: none;
|
|
277
|
+
}
|
|
278
|
+
.md-nav--primary .md-nav__title .md-nav__button {
|
|
279
|
+
display: none;
|
|
280
|
+
}
|
|
281
|
+
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
282
|
+
color: var(--md-default-fg-color);
|
|
283
|
+
position: static;
|
|
284
|
+
height: auto;
|
|
285
|
+
margin: 0 0 0 -0.2rem;
|
|
286
|
+
}
|
|
287
|
+
.md-nav--primary > .md-nav__title [for="none"] {
|
|
288
|
+
padding-top: 0;
|
|
289
|
+
}
|
|
290
|
+
.md-nav--primary .md-nav__item {
|
|
291
|
+
border-top: none;
|
|
292
|
+
}
|
|
293
|
+
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
294
|
+
font-size : var(--md-typeset-font-size);
|
|
295
|
+
}
|
|
296
|
+
.md-nav .md-source {
|
|
297
|
+
display: none;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.md-sidebar {
|
|
301
|
+
height: 100%;
|
|
302
|
+
}
|
|
303
|
+
.md-sidebar--primary {
|
|
304
|
+
width: 12.1rem !important;
|
|
305
|
+
z-index: 200;
|
|
306
|
+
left: ${R.isPinned?`calc(-12.1rem + ${le})`:"calc(-12.1rem + 72px)"} !important;
|
|
307
|
+
}
|
|
308
|
+
.md-sidebar--secondary:not([hidden]) {
|
|
309
|
+
display: none;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.md-content {
|
|
313
|
+
max-width: 100%;
|
|
314
|
+
margin-left: 0;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.md-header__button {
|
|
318
|
+
margin: 0.4rem 0;
|
|
319
|
+
margin-left: 0.4rem;
|
|
320
|
+
padding: 0;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.md-overlay {
|
|
324
|
+
left: 0;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.md-footer {
|
|
328
|
+
position: static;
|
|
329
|
+
padding-left: 0;
|
|
330
|
+
}
|
|
331
|
+
.md-footer-nav__link {
|
|
332
|
+
/* footer links begin to overlap at small sizes without setting width */
|
|
333
|
+
width: 50%;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
@media screen and (max-width: 600px) {
|
|
338
|
+
.md-sidebar--primary {
|
|
339
|
+
left: -12.1rem !important;
|
|
340
|
+
width: 12.1rem;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
@media print {
|
|
346
|
+
.md-sidebar,
|
|
347
|
+
#toggle-sidebar {
|
|
348
|
+
display: none;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.md-content {
|
|
352
|
+
margin: 0;
|
|
353
|
+
width: 100%;
|
|
354
|
+
max-width: 100%;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
`,Yt=["h1","h2","h3","h4","h5","h6"],Ge=[ge,ue,zt,({theme:p})=>`
|
|
358
|
+
/*================== Typeset ==================*/
|
|
359
|
+
|
|
360
|
+
.md-typeset {
|
|
361
|
+
font-size: var(--md-typeset-font-size);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
${Yt.reduce((R,$)=>{var W;const V=(W=p.typography.htmlFontSize)!==null&&W!==void 0?W:16,tt=p.typography[$],{lineHeight:rt,fontFamily:Ct,fontWeight:Mt,fontSize:Wt}=tt,Zt=kt=>{let It=1;return typeof kt=="number"&&(It=kt/V*.6),typeof kt=="string"&&(It=kt.replace("rem","")),`calc(${It} * var(--md-typeset-font-size))`};return R.concat(`
|
|
365
|
+
.md-typeset ${$} {
|
|
366
|
+
color: var(--md-default-fg-color);
|
|
367
|
+
line-height: ${rt};
|
|
368
|
+
font-family: ${Ct};
|
|
369
|
+
font-weight: ${Mt};
|
|
370
|
+
font-size: ${Zt(Wt)};
|
|
371
|
+
}
|
|
372
|
+
`)},"")}
|
|
373
|
+
|
|
374
|
+
.md-typeset .md-content__button {
|
|
375
|
+
color: var(--md-default-fg-color);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.md-typeset hr {
|
|
379
|
+
border-bottom: 0.05rem dotted ${p.palette.divider};
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.md-typeset details {
|
|
383
|
+
font-size: var(--md-typeset-font-size) !important;
|
|
384
|
+
}
|
|
385
|
+
.md-typeset details summary {
|
|
386
|
+
padding-left: 2.5rem !important;
|
|
387
|
+
}
|
|
388
|
+
.md-typeset details summary:before,
|
|
389
|
+
.md-typeset details summary:after {
|
|
390
|
+
top: 50% !important;
|
|
391
|
+
width: 20px !important;
|
|
392
|
+
height: 20px !important;
|
|
393
|
+
transform: rotate(0deg) translateY(-50%) !important;
|
|
394
|
+
}
|
|
395
|
+
.md-typeset details[open] > summary:after {
|
|
396
|
+
transform: rotate(90deg) translateX(-50%) !important;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.md-typeset blockquote {
|
|
400
|
+
color: var(--md-default-fg-color--light);
|
|
401
|
+
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.md-typeset table:not([class]) {
|
|
405
|
+
font-size: var(--md-typeset-font-size);
|
|
406
|
+
border: 1px solid var(--md-default-fg-color);
|
|
407
|
+
border-bottom: none;
|
|
408
|
+
border-collapse: collapse;
|
|
409
|
+
}
|
|
410
|
+
.md-typeset table:not([class]) th {
|
|
411
|
+
font-weight: bold;
|
|
412
|
+
}
|
|
413
|
+
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
414
|
+
border-bottom: 1px solid var(--md-default-fg-color);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
418
|
+
background-color: hsla(0, 0%, 0%, 0.32);
|
|
419
|
+
}
|
|
420
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
421
|
+
background-color: hsla(0, 0%, 0%, 0.87);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.md-typeset code {
|
|
425
|
+
word-break: keep-all;
|
|
426
|
+
}
|
|
427
|
+
`,()=>`
|
|
428
|
+
/*================== Animations ==================*/
|
|
429
|
+
/*
|
|
430
|
+
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
431
|
+
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
432
|
+
*/
|
|
433
|
+
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
434
|
+
transition: none;
|
|
435
|
+
}
|
|
436
|
+
`,({theme:p})=>`
|
|
437
|
+
/*================== Extensions ==================*/
|
|
438
|
+
|
|
439
|
+
/* HIGHLIGHT */
|
|
440
|
+
.highlight .md-clipboard:after {
|
|
441
|
+
content: unset;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.highlight .nx {
|
|
445
|
+
color: ${p.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/* CODE HILITE */
|
|
449
|
+
.codehilite .gd {
|
|
450
|
+
background-color: ${p.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.codehilite .gi {
|
|
454
|
+
background-color: ${p.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/* TABBED */
|
|
458
|
+
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
459
|
+
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
460
|
+
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
461
|
+
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
462
|
+
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
463
|
+
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
464
|
+
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
465
|
+
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
466
|
+
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
467
|
+
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
468
|
+
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
469
|
+
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
470
|
+
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
471
|
+
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
472
|
+
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
473
|
+
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
474
|
+
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
475
|
+
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
476
|
+
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
477
|
+
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
478
|
+
color: var(--md-accent-fg-color);
|
|
479
|
+
border-color: var(--md-accent-fg-color);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/* TASK-LIST */
|
|
483
|
+
.task-list-control .task-list-indicator::before {
|
|
484
|
+
background-color: ${p.palette.action.disabledBackground};
|
|
485
|
+
}
|
|
486
|
+
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
487
|
+
background-color: ${p.palette.success.main};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/* ADMONITION */
|
|
491
|
+
.admonition {
|
|
492
|
+
font-size: var(--md-typeset-font-size) !important;
|
|
493
|
+
}
|
|
494
|
+
.admonition .admonition-title {
|
|
495
|
+
padding-left: 2.5rem !important;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.admonition .admonition-title:before {
|
|
499
|
+
top: 50% !important;
|
|
500
|
+
width: 20px !important;
|
|
501
|
+
height: 20px !important;
|
|
502
|
+
transform: translateY(-50%) !important;
|
|
503
|
+
}
|
|
504
|
+
`],Qt=()=>(0,te.Ut)(),tn=()=>{const p=Qt(),R=(0,un.A)();return(0,i.useMemo)(()=>{const $={theme:R,sidebar:p};return Ge.reduce((W,V)=>W+V($),"")},[R,p])},gn=()=>{const p=tn();return(0,i.useCallback)(R=>(R.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${p}</style>`),R),[p])},_e=async(p,R)=>{let $;if(typeof p=="string")$=new DOMParser().parseFromString(p,"text/html").documentElement;else if(p instanceof Element)$=p;else throw new Error("dom is not a recognized type");for(const W of R)$=await W($);return $},Ye=(p,R,$)=>{const W=p==="src"&&R.endsWith(".svg"),V=!R.match(/^([a-z]*:)?\/\//i),tt=R.startsWith($);return W&&(V||tt)},Ln=({techdocsStorageApi:p,entityId:R,path:$})=>async W=>{const V=await p.getApiOrigin(),tt=async(rt,Ct)=>{for(const Mt of rt)if(Mt.hasAttribute(Ct)){const Wt=Mt.getAttribute(Ct);if(!Wt)return;const Zt=await p.getBaseUrl(Wt,R,$);if(Ye(Ct,Wt,V))try{const It=await(await fetch(Zt,{credentials:"include"})).text();Mt.setAttribute(Ct,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(It)))}`)}catch{Mt.setAttribute("alt",`Error: ${Wt}`)}else Mt.setAttribute(Ct,Zt)}};return await Promise.all([tt(W.querySelectorAll("img"),"src"),tt(W.querySelectorAll("script"),"src"),tt(W.querySelectorAll("source"),"src"),tt(W.querySelectorAll("link"),"href"),tt(W.querySelectorAll("a[download]"),"href")]),W},Mn=()=>p=>((($,W)=>{Array.from($).filter(V=>V.hasAttribute(W)).forEach(V=>{const tt=V.getAttribute(W);if(tt){tt.match(/^https?:\/\//i)&&V.setAttribute("target","_blank");try{const rt=Ne(window.location.href);V.setAttribute(W,new URL(tt,rt).toString())}catch{V.replaceWith(V.textContent||tt)}}})})(Array.from(p.getElementsByTagName("a")),"href"),p);function Ne(p){const R=new URL(p);return!R.pathname.endsWith("/")&&!R.pathname.endsWith(".html")&&(R.pathname+="/"),R.toString()}var Lo=t(27326);let Bn;Bn=Promise.resolve().then(t.t.bind(t,25873,19));function jn(p,R){Bn.then($=>{"createRoot"in $?$.createRoot(R).render(p):$.render(p,R)})}const qn=()=>p=>{const R=p.querySelector('.md-header label[for="__drawer"]'),$=p.querySelector("article");if(!R||!$)return p;const W=R.cloneNode();return jn(i.createElement(Lo.A),W),W.id="toggle-sidebar",W.title="Toggle Sidebar",W.classList.add("md-content__button"),W.style.setProperty("padding","0 0 0 5px"),W.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),$==null||$.prepend(W),p},Mo=()=>p=>{var R;return(R=p.querySelector(".md-header"))===null||R===void 0||R.remove(),p},Bo=()=>p=>{var R,$;return(R=p.querySelector(".md-footer .md-copyright"))===null||R===void 0||R.remove(),($=p.querySelector(".md-footer-copyright"))===null||$===void 0||$.remove(),p};var jo=t(36021),Uo=t(90292),$o=t(52536),Fo=t.n($o);const No=p=>R=>{var $;const W=R.querySelector('[title="Edit this page"]');if(!W||!W.href)return R;const V=new URL(W.href),tt=p.byUrl(V);if((tt==null?void 0:tt.type)!=="github"&&(tt==null?void 0:tt.type)!=="gitlab")return R;const rt=(($=R.querySelector("article>h1"))===null||$===void 0?void 0:$.childNodes[0].textContent)||"",Ct=encodeURIComponent(`Documentation Feedback: ${rt}`),Mt=encodeURIComponent(`Page source:
|
|
505
|
+
${W.href}
|
|
506
|
+
|
|
507
|
+
Feedback:`),Wt=(tt==null?void 0:tt.type)==="github"?(0,jo.F)(V.href,"blob"):V.href,Zt=Fo()(Wt),kt=`/${Zt.organization}/${Zt.name}`,It=W.cloneNode();switch(tt==null?void 0:tt.type){case"gitlab":It.href=`${V.origin}${kt}/issues/new?issue[title]=${Ct}&issue[description]=${Mt}`;break;case"github":It.href=`${V.origin}${kt}/issues/new?title=${Ct}&body=${Mt}`;break;default:return R}return jn(i.createElement(Uo.A),It),It.style.paddingLeft="5px",It.title="Leave feedback for this page",It.id="git-feedback-link",W==null||W.insertAdjacentElement("beforebegin",It),R},to=()=>p=>(setTimeout(()=>{const R=p==null?void 0:p.querySelectorAll("li.md-nav__item--active");R.length!==0&&(R.forEach(W=>{const V=W==null?void 0:W.querySelector("input");V!=null&&V.checked||V==null||V.click()}),R[R.length-1].scrollIntoView())},200),p);var Wo=t(50868),ko=t(10437),eo=t(71677),no=t(87051),Ko=t(36338);const Un=(0,no.A)(p=>({tooltip:{fontSize:"inherit",color:p.palette.text.primary,margin:0,padding:p.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(eo.Ay),$n=()=>(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"})}),zo=({text:p})=>{const[R,$]=(0,i.useState)(!1),[,W]=(0,Ko.A)(),V=(0,i.useCallback)(()=>{W(p),$(!0)},[p,W]),tt=(0,i.useCallback)(()=>{$(!1)},[$]);return(0,o.jsx)(Un,{title:"Copied to clipboard",placement:"left",open:R,onClose:tt,leaveDelay:1e3,children:(0,o.jsx)(jt.A,{style:{color:"inherit",position:"absolute"},className:"md-clipboard md-icon",onClick:V,children:(0,o.jsx)($n,{})})})},oo=p=>R=>{const $=R.querySelectorAll("pre > code");for(const V of $){var W;const tt=V.textContent||"",rt=document.createElement("div");V==null||(W=V.parentElement)===null||W===void 0||W.prepend(rt),jn((0,o.jsx)(Wo.A,{theme:p,children:(0,o.jsx)(zo,{text:tt})}),rt)}return R},so=({baseUrl:p,onClick:R})=>$=>(Array.from($.getElementsByTagName("a")).forEach(W=>{W.addEventListener("click",V=>{const rt=W.getAttribute("href");rt&&rt.startsWith(p)&&!W.hasAttribute("download")&&(V.preventDefault(),R(V,rt))})}),$),ro=({onLoading:p,onLoaded:R})=>$=>(p(),$.addEventListener(y,function W(){R(),$.removeEventListener(y,W)}),$);function Ho(p,R){const $=new URL(R),W=`${$.origin}${$.pathname.replace(/\/$/,"")}`,V=p.replace(W,"").replace(/^\/+/,""),tt=new URL(`http://localhost/${V}`);return`${tt.pathname}${tt.search}${tt.hash}`}function _o(){const p=(0,Ht.Zp)(),$=(0,Z.gf)(q.U).getOptionalString("app.baseUrl");return(0,i.useCallback)(V=>{let tt=V;if($)try{tt=Ho(V,$)}catch{}p(tt)},[p,$])}const Vo="screen and (max-width: 76.1875em)",Go=p=>{const R=_o(),$=(0,un.A)(),W=(0,He.A)(Vo),V=wt(),tt=gn(),rt=(0,H.s)(),Ct=(0,Z.gf)(Ze.s),Mt=(0,Z.gf)(Tn.Y),{state:Wt,path:Zt,content:kt}=me(),[It,ee]=(0,i.useState)(null),xe=h(It),Jt=(0,i.useCallback)(()=>{if(!It)return;It.querySelectorAll(".md-sidebar").forEach(Gt=>{if(W)Gt.style.top="0px";else{var Xt;const Ue=(Xt=document)===null||Xt===void 0?void 0:Xt.querySelector(".techdocs-reader-page");var Ce;const ce=(Ce=Ue==null?void 0:Ue.getBoundingClientRect().top)!==null&&Ce!==void 0?Ce:0;var we;let Wn=(we=It.getBoundingClientRect().top)!==null&&we!==void 0?we:0;const kn=It.querySelector(".md-container > .md-tabs");var Qe;const Zo=(Qe=kn==null?void 0:kn.getBoundingClientRect().height)!==null&&Qe!==void 0?Qe:0;Wn<ce&&(Wn=ce);const vn=Math.max(Wn,0)+Zo;Gt.style.top=`${vn}px`;const Kn=It.querySelector(".md-container > .md-footer");var pe;const yn=(pe=Kn==null?void 0:Kn.getBoundingClientRect().top)!==null&&pe!==void 0?pe:window.innerHeight;Gt.style.height=`${yn-vn}px`}Gt.style.setProperty("opacity","1")})},[It,W]);(0,i.useEffect)(()=>(window.addEventListener("resize",Jt),window.addEventListener("scroll",Jt,!0),()=>{window.removeEventListener("resize",Jt),window.removeEventListener("scroll",Jt,!0)}),[It,Jt]);const ne=(0,i.useCallback)(()=>{if(!It)return;const Dt=It.querySelector(".md-footer");Dt&&(Dt.style.width=`${It.getBoundingClientRect().width}px`)},[It]);(0,i.useEffect)(()=>(window.addEventListener("resize",ne),()=>{window.removeEventListener("resize",ne)}),[It,ne]),(0,i.useEffect)(()=>{xe||(ne(),Jt())},[Wt,xe,ne,Jt]);const oe=(0,i.useCallback)((Dt,Gt)=>_e(Dt,[V,Ln({techdocsStorageApi:Ct,entityId:p,path:Gt}),Mn(),qn(),Mo(),Bo(),No(Mt),tt]),[p,Mt,Ct,V,tt]),de=(0,i.useCallback)(async Dt=>_e(Dt,[to(),oo($),so({baseUrl:window.location.origin,onClick:(Gt,Xt)=>{var Ce;const we=Gt.ctrlKey||Gt.metaKey,Qe=new URL(Xt),pe=((Ce=Gt.target)===null||Ce===void 0?void 0:Ce.innerText)||Xt,Ue=Xt.replace(window.location.origin,"");if(rt.captureEvent("click",pe,{attributes:{to:Ue}}),Qe.hash)if(we)window.open(Xt,"_blank");else{var ce;R(Xt),Dt==null||(ce=Dt.querySelector(`[id="${Qe.hash.slice(1)}"]`))===null||ce===void 0||ce.scrollIntoView()}else we?window.open(Xt,"_blank"):R(Xt)}}),ro({onLoading:()=>{},onLoaded:()=>{var Gt;(Gt=Dt.querySelector(".md-nav__title"))===null||Gt===void 0||Gt.removeAttribute("for")}}),ro({onLoading:()=>{Array.from(Dt.querySelectorAll(".md-sidebar")).forEach(Xt=>{Xt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[$,R,rt]);return(0,i.useEffect)(()=>{if(!kt)return()=>{};let Dt=!0;return oe(kt,Zt).then(async Gt=>{if(!(Gt!=null&&Gt.innerHTML)||!Dt)return;window.scroll({top:0});const Xt=await de(Gt);ee(Xt)}),()=>{Dt=!1}},[kt,Zt,oe,de]),It};var Fn=t(41883),Yo=t(72020),Nn=t(99730);const Qo=()=>{const p=(0,Yo.YR)(),{shadowRoot:R}=(0,v.V)(),$=R==null?void 0:R.querySelector('[data-md-component="content"]'),W=R==null?void 0:R.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let V=W==null?void 0:W.querySelector('[data-techdocs-addons-location="primary sidebar"]');V||(V=document.createElement("div"),V.setAttribute("data-techdocs-addons-location","primary sidebar"),W==null||W.prepend(V));const tt=R==null?void 0:R.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let rt=tt==null?void 0:tt.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return rt||(rt=document.createElement("div"),rt.setAttribute("data-techdocs-addons-location","secondary sidebar"),tt==null||tt.prepend(rt)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fn.A,{container:V,children:p.renderComponentsByLocation(Nn.e.PrimarySidebar)}),(0,o.jsx)(Fn.A,{container:$,children:p.renderComponentsByLocation(Nn.e.Content)}),(0,o.jsx)(Fn.A,{container:rt,children:p.renderComponentsByLocation(Nn.e.SecondarySidebar)})]})},io=(0,O.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),ao=Je(p=>{var R;const{withSearch:$=!0,onReady:W}=p,V=io(),{entityMetadata:{value:tt,loading:rt},entityRef:Ct,setShadowRoot:Mt}=(0,v.V)(),Wt=Go(Ct),Zt=window.location.pathname,kt=window.location.hash,It=h(Wt),[ee]=P([`[id="${kt.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!It)if(kt)ee&&ee.scrollIntoView();else{var Jt,ne;(ne=document)===null||ne===void 0||(Jt=ne.querySelector("header"))===null||Jt===void 0||Jt.scrollIntoView()}},[Zt,kt,ee,It]);const xe=(0,i.useCallback)(Jt=>{Mt(Jt),W instanceof Function&&W()},[Mt,W]);return rt===!1&&!tt?(0,o.jsx)(L.M,{status:"404",statusMessage:"PAGE NOT FOUND"}):Wt?(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)(Fe,{})}),$&&(0,o.jsx)(d.A,{className:V.search,xs:"auto",item:!0,children:(0,o.jsx)(Re,{entityId:Ct,entityTitle:tt==null||(R=tt.metadata)===null||R===void 0?void 0:R.title})}),(0,o.jsx)(d.A,{xs:12,item:!0,children:(0,o.jsx)(S,{element:Wt,onAppend:xe,children:(0,o.jsx)(Qo,{})})})]})}):(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)(Fe,{})})})})}),Rt=null},45061:(J,T,t)=>{"use strict";t.d(T,{T:()=>et});var o=t(31085),i=t(14041),d=t(93285),O=t(42899),v=t(4387),f=t(13660),g=t(72020),c=t(86892),C=t(99730),y=t(67871),w=t(8859),h=t(34428),S=t(51372),m=t(58837),j=t(268),P=t(72501),E=t(72072);const U=(0,m.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,j.X4)(q.page.fontColor,.8),fontSize:q.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),L=({value:q,className:ht,typographyRootComponent:ut})=>(0,o.jsx)(P.A,{component:ut!=null?ut:typeof q=="string"?"p":"span",className:ht,children:q});function x(q){const{label:ht,value:ut,url:Ot,contentTypograpyRootComponent:Tt}=q,At=U(),gt=(0,o.jsx)(L,{className:At.value,value:ut||"<Unknown>",typographyRootComponent:Tt});return(0,o.jsx)(O.A,{item:!0,children:(0,o.jsxs)(P.A,{component:"span",className:At.root,children:[(0,o.jsx)(P.A,{className:At.label,children:ht}),Ot?(0,o.jsx)(E.N_,{to:Ot,children:gt}):gt]})})}var z=t(69814),_=t(72427),Y=t(65461),N=t(9222),K=t(45250),Z=t(82779);const H=(0,o.jsx)(v.A,{animation:"wave",variant:"text",height:40}),et=q=>{const{children:ht}=q,ut=(0,g.YR)(),Ot=(0,_.gf)(Y.U),{title:Tt,setTitle:At,subtitle:gt,setSubtitle:Et,entityRef:dt,metadata:{value:at,loading:bt},entityMetadata:{value:ft,loading:St}}=(0,c.V)();(0,i.useEffect)(()=>{at&&(At(at.site_name),Et(()=>{let{site_description:vt}=at;return(!vt||vt==="None")&&(vt=""),vt}))},[at,At,Et]);const jt=Ot.getOptional("app.title")||"Backstage",Bt=[Tt,gt,jt].filter(Boolean).join(" | "),{locationMetadata:Ut,spec:ct}=ft||{},k=ct==null?void 0:ct.lifecycle,G=ft?(0,y.t)(ft,S.vv):[],lt=(0,N.S)(Z.rQ)(),pt=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{label:(0,K.capitalize)((ft==null?void 0:ft.kind)||"entity"),value:(0,o.jsx)(w.z,{color:"inherit",entityRef:dt,title:ft==null?void 0:ft.metadata.title,defaultKind:"Component"})}),G.length>0&&(0,o.jsx)(x,{label:"Owner",value:(0,o.jsx)(h.i,{color:"inherit",entityRefs:G,defaultKind:"group"})}),k?(0,o.jsx)(x,{label:"Lifecycle",value:String(k)}):null,Ut&&Ut.type!=="dir"&&Ut.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)(f.A,{style:{marginTop:"-25px"}})}),(0,o.jsx)(O.A,{style:{padding:0},item:!0,children:"Source"})]}),url:Ut.target}):null]});return!St&&ft===void 0||!bt&&at===void 0?null:(0,o.jsxs)(z.Y,{type:"Documentation",typeLink:lt,title:Tt||H,subtitle:gt===""?void 0:gt||H,children:[(0,o.jsx)(d.A,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:Bt})}),pt,ht,ut.renderComponentsByLocation(C.e.Header)]})}},82779:(J,T,t)=>{"use strict";t.d(T,{Oc:()=>d,Ri:()=>O,rQ:()=>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:(J,T,t)=>{"use strict";t.r(T),t.d(T,{TechDocsSearchResultListItem:()=>y});var o=t(31085),i=t(14041),d=t(46423),O=t(5951),v=t(58837),f=t(72501),g=t(72072),c=t(70734);const C=(0,v.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),y=w=>{const{result:h,highlight:S,lineClamp:m=5,asListItem:j=!0,asLink:P=!0,title:E,icon:U}=w,L=C(),x=({children:Y})=>P?(0,o.jsx)(g.N_,{noTrack:!0,to:h.location,children:Y}):(0,o.jsx)(o.Fragment,{children:Y}),z=()=>{const Y=S!=null&&S.fields.title?(0,o.jsx)(c.e,{text:S.fields.title,preTag:S.preTag,postTag:S.postTag}):h.title,N=S!=null&&S.fields.entityTitle?(0,o.jsx)(c.e,{text:S.fields.entityTitle,preTag:S.preTag,postTag:S.postTag}):h.entityTitle,K=S!=null&&S.fields.name?(0,o.jsx)(c.e,{text:S.fields.name,preTag:S.preTag,postTag:S.postTag}):h.name;return h?(0,o.jsx)(O.A,{className:L.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(x,{children:E||(0,o.jsxs)(o.Fragment,{children:[Y," | ",N!=null?N:K," docs"]})}),secondary:(0,o.jsx)(f.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:m,overflow:"hidden"},color:"textSecondary",variant:"body2",children:S!=null&&S.fields.text?(0,o.jsx)(c.e,{text:S.fields.text,preTag:S.preTag,postTag:S.postTag}):h.text})}):null},_=({children:Y})=>j?(0,o.jsxs)(o.Fragment,{children:[U&&(0,o.jsx)(d.A,{children:typeof U=="function"?U(h):U}),(0,o.jsx)("div",{className:L.flexContainer,children:Y})]}):(0,o.jsx)(o.Fragment,{children:Y});return(0,o.jsx)(_,{children:(0,o.jsx)(z,{})})}},86973:()=>{}},J=>{var T=o=>J(J.s=o);J.O(0,[1751,1888,5067,1678,235,6587,2754,9669,1975,5042,7400,4121],()=>T(85318));var t=J.O()}]);})();
|
|
508
|
+
|
|
509
|
+
//# sourceMappingURL=main.3736273c.js.map
|