@techdocs/cli 1.2.1-next.0 → 1.2.1-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 +8 -0
- package/dist/cjs/PublisherConfig-0ea58467.cjs.js.map +1 -1
- package/dist/cjs/generate-b897bd89.cjs.js.map +1 -1
- package/dist/cjs/migrate-62035c68.cjs.js.map +1 -1
- package/dist/cjs/mkdocs-1501e940.cjs.js.map +1 -1
- package/dist/cjs/mkdocsServer-99ec8af2.cjs.js.map +1 -1
- package/dist/cjs/publish-af5607e2.cjs.js.map +1 -1
- package/dist/cjs/serve-176119a3.cjs.js.map +1 -1
- package/dist/cjs/utility-647ad232.cjs.js.map +1 -1
- package/dist/embedded-app/.config-schema.json +26 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/1032.6bf895d9.chunk.js +3 -0
- package/dist/embedded-app/static/{1032.d8698f43.chunk.js.map → 1032.6bf895d9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/1105.c6322959.chunk.js +3 -0
- package/dist/embedded-app/static/{1105.a04c4672.chunk.js.map → 1105.c6322959.chunk.js.map} +1 -1
- package/dist/embedded-app/static/184.ca141892.chunk.js +3 -0
- package/dist/embedded-app/static/{184.475a9a99.chunk.js.map → 184.ca141892.chunk.js.map} +1 -1
- package/dist/embedded-app/static/2440.1a4b182a.chunk.js +3 -0
- package/dist/embedded-app/static/{2440.c232dd8f.chunk.js.map → 2440.1a4b182a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/5458.ace70612.chunk.js +3 -0
- package/dist/embedded-app/static/{5458.f6f5b0cd.chunk.js.map → 5458.ace70612.chunk.js.map} +1 -1
- package/dist/embedded-app/static/5837.00a42df7.chunk.js +3 -0
- package/dist/embedded-app/static/5837.00a42df7.chunk.js.map +1 -0
- package/dist/embedded-app/static/{4949.85095ea5.chunk.js → 5869.f1b2db13.chunk.js} +2 -2
- package/dist/embedded-app/static/5869.f1b2db13.chunk.js.map +1 -0
- package/dist/embedded-app/static/6051.89d185a1.chunk.js +4 -0
- package/dist/embedded-app/static/{6051.f911be84.chunk.js.map → 6051.89d185a1.chunk.js.map} +1 -1
- package/dist/embedded-app/static/732.069998a1.chunk.js +3 -0
- package/dist/embedded-app/static/{732.4b93361d.chunk.js.map → 732.069998a1.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7560.2275e900.chunk.js +3 -0
- package/dist/embedded-app/static/{7560.107226bf.chunk.js.map → 7560.2275e900.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7750.359fffe7.chunk.js → 7750.7df70188.chunk.js} +3 -3
- package/dist/embedded-app/static/{7750.359fffe7.chunk.js.map → 7750.7df70188.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8951.848344b4.chunk.js → 8951.60ad2c85.chunk.js} +1 -1
- package/dist/embedded-app/static/{8951.848344b4.chunk.js.map → 8951.60ad2c85.chunk.js.map} +1 -1
- package/dist/embedded-app/static/9545.2c04e8ca.chunk.js +3 -0
- package/dist/embedded-app/static/{9545.6d9d6f79.chunk.js.map → 9545.2c04e8ca.chunk.js.map} +1 -1
- package/dist/embedded-app/static/9770.b0a8132c.chunk.js +3 -0
- package/dist/embedded-app/static/{9770.648fb0ea.chunk.js.map → 9770.b0a8132c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.32844cc3.js +492 -0
- package/dist/embedded-app/static/main.32844cc3.js.map +1 -0
- package/dist/embedded-app/static/module-ajv.cf315a37.js +10 -0
- package/dist/embedded-app/static/module-ajv.cf315a37.js.map +1 -0
- package/dist/embedded-app/static/{module-lodash.32f2edbb.js → module-lodash.e87f9236.js} +2 -2
- package/dist/embedded-app/static/{module-lodash.32f2edbb.js.map → module-lodash.e87f9236.js.map} +1 -1
- package/dist/embedded-app/static/{module-material-table.17dcd6c7.js → module-material-table.44314bd8.js} +2 -2
- package/dist/embedded-app/static/{module-material-table.17dcd6c7.js.map → module-material-table.44314bd8.js.map} +1 -1
- package/dist/embedded-app/static/module-material-ui.1cc685be.js +74 -0
- package/dist/embedded-app/static/module-material-ui.1cc685be.js.map +1 -0
- package/dist/embedded-app/static/module-octokit.74ddede2.js +5 -0
- package/dist/embedded-app/static/module-octokit.74ddede2.js.map +1 -0
- package/dist/embedded-app/static/{module-yaml.0874c6f8.js → module-yaml.cef9da5e.js} +2 -2
- package/dist/embedded-app/static/{module-yaml.0874c6f8.js.map → module-yaml.cef9da5e.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.582cf8a9.js → runtime.32844cc3.js} +2 -2
- package/dist/embedded-app/static/{runtime.582cf8a9.js.map → runtime.32844cc3.js.map} +1 -1
- package/dist/embedded-app/static/vendor.32844cc3.js +236 -0
- package/dist/embedded-app/static/vendor.32844cc3.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/package.json +6 -7
- package/dist/embedded-app/static/1032.d8698f43.chunk.js +0 -3
- package/dist/embedded-app/static/1105.a04c4672.chunk.js +0 -3
- package/dist/embedded-app/static/184.475a9a99.chunk.js +0 -3
- package/dist/embedded-app/static/2440.c232dd8f.chunk.js +0 -3
- package/dist/embedded-app/static/4949.85095ea5.chunk.js.map +0 -1
- package/dist/embedded-app/static/5458.f6f5b0cd.chunk.js +0 -3
- package/dist/embedded-app/static/5837.13ae1bd8.chunk.js +0 -3
- package/dist/embedded-app/static/5837.13ae1bd8.chunk.js.map +0 -1
- package/dist/embedded-app/static/6051.f911be84.chunk.js +0 -4
- package/dist/embedded-app/static/732.4b93361d.chunk.js +0 -3
- package/dist/embedded-app/static/7560.107226bf.chunk.js +0 -3
- package/dist/embedded-app/static/9545.6d9d6f79.chunk.js +0 -3
- package/dist/embedded-app/static/9770.648fb0ea.chunk.js +0 -3
- package/dist/embedded-app/static/main.582cf8a9.js +0 -492
- package/dist/embedded-app/static/main.582cf8a9.js.map +0 -1
- package/dist/embedded-app/static/module-ajv.9873d8f6.js +0 -10
- package/dist/embedded-app/static/module-ajv.9873d8f6.js.map +0 -1
- package/dist/embedded-app/static/module-jss.df150ef8.js +0 -38
- package/dist/embedded-app/static/module-jss.df150ef8.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.9f0910ba.js +0 -51
- package/dist/embedded-app/static/module-material-ui.9f0910ba.js.map +0 -1
- package/dist/embedded-app/static/module-octokit.7ca45648.js +0 -5
- package/dist/embedded-app/static/module-octokit.7ca45648.js.map +0 -1
- package/dist/embedded-app/static/vendor.582cf8a9.js +0 -115
- package/dist/embedded-app/static/vendor.582cf8a9.js.map +0 -1
|
@@ -1,492 +0,0 @@
|
|
|
1
|
-
(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{29644:function(tt,Ae,t){"use strict";t.d(Ae,{n3:function(){return G},MS:function(){return b}});var h=t(25271),n=t(23054),m=t(96279),O=t.n(m);const G=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class b{async getEntityAncestors(L,ee){const{kind:X,namespace:K,name:F}=(0,h.of)(L.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(X)}/${encodeURIComponent(K)}/${encodeURIComponent(F)}/ancestry`,ee)}async getLocationById(L,ee){return await this.requestOptional("GET",`/locations/${encodeURIComponent(L)}`,ee)}async getEntities(L,ee){const{filter:X=[],fields:K=[],offset:F,limit:Y,after:V}=L!=null?L:{},ie=[];for(const Z of[X].flat()){const P=[];for(const[$,te]of Object.entries(Z))for(const ye of[te].flat())ye===G?P.push(encodeURIComponent($)):typeof ye=="string"&&P.push(`${encodeURIComponent($)}=${encodeURIComponent(ye)}`);P.length&&ie.push(`filter=${P.join(",")}`)}K.length&&ie.push(`fields=${K.map(encodeURIComponent).join(",")}`),F!==void 0&&ie.push(`offset=${F}`),Y!==void 0&&ie.push(`limit=${Y}`),V!==void 0&&ie.push(`after=${encodeURIComponent(V)}`);const le=ie.length?`?${ie.join("&")}`:"",I=await this.requestRequired("GET",`/entities${le}`,ee),A=(Z,P)=>{var $,te;if((($=Z.metadata)===null||$===void 0?void 0:$.name)===void 0||Z.kind===void 0||((te=P.metadata)===null||te===void 0?void 0:te.name)===void 0||P.kind===void 0)return 0;const ye=(0,h.eE)(Z),Ge=(0,h.eE)(P);return ye<Ge?-1:ye>Ge?1:0};return{items:I.sort(A)}}async getEntityByRef(L,ee){const{kind:X,namespace:K,name:F}=(0,h.of)(L);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(X)}/${encodeURIComponent(K)}/${encodeURIComponent(F)}`,ee)}async getEntityByName(L,ee){const{kind:X,namespace:K="default",name:F}=L;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(X)}/${encodeURIComponent(K)}/${encodeURIComponent(F)}`,ee)}async refreshEntity(L,ee){const X=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(ee==null?void 0:ee.token)&&{Authorization:`Bearer ${ee==null?void 0:ee.token}`}},method:"POST",body:JSON.stringify({entityRef:L})});if(X.status!==200)throw new Error(await X.text())}async getEntityFacets(L,ee){const{filter:X=[],facets:K}=L,F=[];for(const V of[X].flat()){const ie=[];for(const[le,I]of Object.entries(V))for(const A of[I].flat())A===G?ie.push(encodeURIComponent(le)):typeof A=="string"&&ie.push(`${encodeURIComponent(le)}=${encodeURIComponent(A)}`);ie.length&&F.push(`filter=${ie.join(",")}`)}for(const V of K)F.push(`facet=${encodeURIComponent(V)}`);const Y=F.length?`?${F.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${Y}`,ee)}async addLocation(L,ee){const{type:X="url",target:K,dryRun:F}=L,Y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${F?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(ee==null?void 0:ee.token)&&{Authorization:`Bearer ${ee==null?void 0:ee.token}`}},method:"POST",body:JSON.stringify({type:X,target:K})});if(Y.status!==201)throw new Error(await Y.text());const{location:V,entities:ie,exists:le}=await Y.json();if(!V)throw new Error(`Location wasn't added: ${K}`);return{location:V,entities:ie,exists:le}}async getLocationByRef(L,ee){return(await this.requestRequired("GET","/locations",ee)).map(K=>K.data).find(K=>L===(0,h.NZ)(K))}async removeLocationById(L,ee){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(L)}`,ee)}async removeEntityByUid(L,ee){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(L)}`,ee)}async requestIgnored(L,ee,X){const K=`${await this.discoveryApi.getBaseUrl("catalog")}${ee}`,F=X!=null&&X.token?{Authorization:`Bearer ${X.token}`}:{},Y=await this.fetchApi.fetch(K,{method:L,headers:F});if(!Y.ok)throw await n.VL.fromResponse(Y)}async requestRequired(L,ee,X){const K=`${await this.discoveryApi.getBaseUrl("catalog")}${ee}`,F=X!=null&&X.token?{Authorization:`Bearer ${X.token}`}:{},Y=await this.fetchApi.fetch(K,{method:L,headers:F});if(!Y.ok)throw await n.VL.fromResponse(Y);return await Y.json()}async requestOptional(L,ee,X){const K=`${await this.discoveryApi.getBaseUrl("catalog")}${ee}`,F=X!=null&&X.token?{Authorization:`Bearer ${X.token}`}:{},Y=await this.fetchApi.fetch(K,{method:L,headers:F});if(!Y.ok){if(Y.status===404)return;throw await n.VL.fromResponse(Y)}return await Y.json()}constructor(L){this.discoveryApi=L.discoveryApi,this.fetchApi=L.fetchApi||{fetch:O()}}}},25271:function(tt,Ae,t){"use strict";t.d(Ae,{Tf:function(){return m},P1:function(){return re},q1:function(){return M},M6:function(){return we},l2:function(){return n},zG:function(){return h},w$:function(){return zt},nP:function(){return Lt},aS:function(){return At},S4:function(){return He},cz:function(){return Bt},iB:function(){return st},CV:function(){return gt},of:function(){return nt},Ou:function(){return Re},eE:function(){return ct},NZ:function(){return Je}});const h="default",n="backstage.io/view-url",m="backstage.io/edit-url",O="kubernetes.io/api-server",G="kubernetes.io/api-server-certificate-authority",b="kubernetes.io/auth-provider";var l=t(76635),L=t.n(l);class ee{async enforce(j){return j.metadata.namespace?j:lodash.merge({metadata:{namespace:this.namespace}},j)}constructor(j=DEFAULT_NAMESPACE){this.namespace=j}}class X{static isValidPrefixAndOrSuffix(j,se,$e,Qe){if(typeof j!="string")return!1;const et=j.split(se);return et.length===1?Qe(et[0]):et.length===2?$e(et[0])&&Qe(et[1]):!1}static isJsonSafe(j){try{return L().isEqual(j,JSON.parse(JSON.stringify(j)))}catch{return!1}}static isValidDnsSubdomain(j){return typeof j=="string"&&j.length>=1&&j.length<=253&&j.split(".").every(X.isValidDnsLabel)}static isValidDnsLabel(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(j)}static isValidTag(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(j)}static isValidUrl(j){if(typeof j!="string")return!1;try{return new URL(j),!0}catch{return!1}}static isValidString(j){var se;return typeof j=="string"&&((se=j==null?void 0:j.trim())===null||se===void 0?void 0:se.length)>=1}static isNonEmptyString(j){var se;return typeof j=="string"&&((se=j==null?void 0:j.trim())===null||se===void 0?void 0:se.length)>=1}}var K=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),F=t(48231),Y=t.n(F),V=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),ie=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),le=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const I=new Map,A=[K,V,ie,le];function Z(z){if(!(z!=null&&z.length))throw new TypeError("Unknown error");const j=z[0];throw new TypeError(`${j.instancePath||"<root>"} ${j.message}${j.params?` - ${Object.entries(j.params).map(([se,$e])=>`${se}: ${$e}`).join(", ")}`:""}`)}function P(z,j={}){var se;const $e=(se=j==null?void 0:j.disableCache)!==null&&se!==void 0?se:!1,Qe=$e?"":JSON.stringify(z);if(!$e){const Ht=I.get(Qe);if(Ht)return Ht}const et=$(z),Ct=new(Y())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});et.length&&Ct.addSchema(et,void 0,void 0,!0);const on=Ct.compile(z);return $e||I.set(Qe,on),on}function $(z){if(typeof z!="object")return[];const j=new Set;z.$id&&j.add(z.$id);const se=new Array,$e=[z];for(;$e.length;){const Qe=$e.pop();for(const et of te(Qe))if(!j.has(et)){j.add(et);const Ct=A.find(on=>on.$id===et);Ct&&(se.push(Ct),$e.push(Ct))}}return se}function*te(z){const j=[z];for(;j.length;){const se=j.pop();if(typeof se=="object"&&se)for(const[$e,Qe]of Object.entries(se))$e==="$ref"&&typeof Qe=="string"?yield Qe.split("#")[0]:j.push(Qe)}}function ye(z){const j=compileAjvSchema(z||entityEnvelopeSchema);return se=>{if(j(se)===!0)return se;throw throwAjvError(j.errors)}}function Ge(z){const j=P(z);return se=>{var $e;if(j(se)===!0)return se;const et=($e=j.errors)===null||$e===void 0?void 0:$e.filter(Ct=>["/kind","/apiVersion"].includes(Ct.instancePath));if((et==null?void 0:et.length)&&et.every(Ct=>Ct.keyword==="enum"))return!1;throw Z(j.errors)}}function Ve(z){const j=compileAjvSchema(z||entitySchema);return se=>{if(j(se)===!0)return se;throw throwAjvError(j.errors)}}class Te{static isValidApiVersion(j){return X.isValidPrefixAndOrSuffix(j,"/",X.isValidDnsSubdomain,se=>se.length>=1&&se.length<=63&&/^[a-z0-9A-Z]+$/.test(se))}static isValidKind(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(j)}static isValidObjectName(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(j)}static isValidNamespace(j){return X.isValidDnsLabel(j)}static isValidLabelKey(j){return X.isValidPrefixAndOrSuffix(j,"/",X.isValidDnsSubdomain,Te.isValidObjectName)}static isValidLabelValue(j){return j===""||Te.isValidObjectName(j)}static isValidAnnotationKey(j){return X.isValidPrefixAndOrSuffix(j,"/",X.isValidDnsSubdomain,Te.isValidObjectName)}static isValidAnnotationValue(j){return typeof j=="string"}}const Ye={isValidApiVersion:Te.isValidApiVersion,isValidKind:Te.isValidKind,isValidEntityName:Te.isValidObjectName,isValidNamespace:Te.isValidNamespace,isValidLabelKey:Te.isValidLabelKey,isValidLabelValue:Te.isValidLabelValue,isValidAnnotationKey:Te.isValidAnnotationKey,isValidAnnotationValue:Te.isValidAnnotationValue,isValidTag:z=>typeof z=="string"&&z.length>=1&&z.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(z)};function Ke(z={}){return{...Ye,...z}}class Oe{async enforce(j){function se(E,J,be){if(J==null)throw new Error(`${E} must have a value`);let ge;try{ge=be(J)}catch(Le){throw new Error(`${E} could not be validated, ${Le}`)}if(!ge){let Le;switch(be.name){case"isValidLabelValue":case"isValidObjectName":Le="a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total";break;case"isValidLabelKey":case"isValidApiVersion":case"isValidAnnotationKey":Le="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Le="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Le="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Le="a string";break;case"isValidKind":Le="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Le="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":Le="a non empty string";break;default:Le=void 0;break}const Be=Le?` expected ${Le} but found "${J}".`:"";throw new Error(`"${E}" is not valid;${Be} To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md`)}}function $e(E,J,be){return J===void 0||se(E,J,be)}se("apiVersion",j.apiVersion,this.validators.isValidApiVersion),se("kind",j.kind,this.validators.isValidKind),se("metadata.name",j.metadata.name,this.validators.isValidEntityName),$e("metadata.namespace",j.metadata.namespace,this.validators.isValidNamespace);var Qe;for(const[E,J]of Object.entries((Qe=j.metadata.labels)!==null&&Qe!==void 0?Qe:[]))se(`labels.${E}`,E,this.validators.isValidLabelKey),se(`labels.${E}`,J,this.validators.isValidLabelValue);var et;for(const[E,J]of Object.entries((et=j.metadata.annotations)!==null&&et!==void 0?et:[]))se(`annotations.${E}`,E,this.validators.isValidAnnotationKey),se(`annotations.${E}`,J,this.validators.isValidAnnotationValue);var Ct;const on=(Ct=j.metadata.tags)!==null&&Ct!==void 0?Ct:[];for(let E=0;E<on.length;++E)se(`tags.${E}`,on[E],this.validators.isValidTag);var Ht;const dn=(Ht=j.metadata.links)!==null&&Ht!==void 0?Ht:[];for(let E=0;E<dn.length;++E){var Ut,Mt,wn;se(`links.${E}.url`,(Ut=dn[E])===null||Ut===void 0?void 0:Ut.url,CommonValidatorFunctions.isValidUrl),$e(`links.${E}.title`,(Mt=dn[E])===null||Mt===void 0?void 0:Mt.title,CommonValidatorFunctions.isNonEmptyString),$e(`links.${E}.icon`,(wn=dn[E])===null||wn===void 0?void 0:wn.icon,KubernetesValidatorFunctions.isValidObjectName)}return j}constructor(j=makeValidator()){this.validators=j}}class Fe{async enforce(j){if(!this.validate){const Qe=new Ajv({allowUnionTypes:!0});this.validate=Qe.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(j)===!0)return j;const[$e]=this.validate.errors||[];throw $e?new Error(`Malformed envelope, ${$e.instancePath||"<root>"} ${$e.message}`):new Error("Malformed envelope, Unknown error")}}function qe(z){let j=z.indexOf(":");const se=z.indexOf("/");se!==-1&&se<j&&(j=-1);const $e=j===-1?void 0:z.slice(0,j),Qe=se===-1?void 0:z.slice(j+1,se),et=z.slice(Math.max(j+1,se+1));if($e===""||Qe===""||et==="")throw new TypeError(`Entity reference "${z}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:$e,namespace:Qe,name:et}}function st(z){return{kind:z.kind,namespace:z.metadata.namespace||h,name:z.metadata.name}}function nt(z,j){if(!z)throw new Error("Entity reference must not be empty");const se=j==null?void 0:j.defaultKind,$e=(j==null?void 0:j.defaultNamespace)||h;let Qe,et,Ct;if(typeof z=="string"){const Mt=qe(z);var on;Qe=(on=Mt.kind)!==null&&on!==void 0?on:se;var Ht;et=(Ht=Mt.namespace)!==null&&Ht!==void 0?Ht:$e,Ct=Mt.name}else{var dn;Qe=(dn=z.kind)!==null&&dn!==void 0?dn:se;var Ut;et=(Ut=z.namespace)!==null&&Ut!==void 0?Ut:$e,Ct=z.name}if(Qe)if(et){if(!Ct){const Mt=JSON.stringify(z);throw new Error(`Entity reference ${Mt} had missing or empty name`)}}else{const Mt=JSON.stringify(z);throw new Error(`Entity reference ${Mt} had missing or empty namespace`)}else{const Mt=JSON.stringify(z);throw new Error(`Entity reference ${Mt} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:Qe,namespace:et,name:Ct}}function ct(z){let j,se,$e;if("metadata"in z){j=z.kind;var Qe;se=(Qe=z.metadata.namespace)!==null&&Qe!==void 0?Qe:h,$e=z.metadata.name}else{j=z.kind;var et;se=(et=z.namespace)!==null&&et!==void 0?et:h,$e=z.name}return`${j.toLocaleLowerCase("en-US")}:${se.toLocaleLowerCase("en-US")}/${$e.toLocaleLowerCase("en-US")}`}class Se{async enforce(j){let se=j;for(const $e of this.policies){const Qe=await $e.enforce(se);if(!Qe)throw new Error(`Policy ${$e.constructor.name} did not return a result`);se=Qe}return se}constructor(j){this.policies=j}}class ht{async enforce(j){for(const se of this.policies){const $e=await se.enforce(j);if($e)return $e}throw new Error("The entity did not match any known policy")}constructor(j){this.policies=j}}const mt={allOf(z){return new Se(z)},oneOf(z){return new ht(z)}};var Ie=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ApiV1alpha1","description":"An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"API","metadata":{"name":"artist-api","description":"Retrieve artist details","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"openapi","lifecycle":"production","owner":"artist-relations-team","system":"artist-engagement-portal","definition":"openapi: \\"3.0.0\\"\\ninfo:..."}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["API"]},"spec":{"type":"object","required":["type","lifecycle","owner","definition"],"properties":{"type":{"type":"string","description":"The type of the API definition.","examples":["openapi","asyncapi","graphql","grpc"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the API.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the API.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the API belongs to.","minLength":1},"definition":{"type":"string","description":"The definition of the API, based on the format defined by the type.","minLength":1}}}}}]}');function q(z){const j=Ge(z);return{async check(se){return j(se)===se}}}const xe=q(Ie);var Ce=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ComponentV1alpha1","description":"A Component describes a software component. It is typically intimately linked to the source code that constitutes the component, and should be what a developer may regard a \\"unit of software\\", usually with a distinct deployable or linkable artifact.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Component"]},"spec":{"type":"object","required":["type","lifecycle","owner"],"properties":{"type":{"type":"string","description":"The type of component.","examples":["service","website","library"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the component.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the component belongs to.","minLength":1},"subcomponentOf":{"type":"string","description":"An entity reference to another component of which the component is a part.","minLength":1},"providesApis":{"type":"array","description":"An array of entity references to the APIs that are provided by the component.","items":{"type":"string","minLength":1}},"consumesApis":{"type":"array","description":"An array of entity references to the APIs that are consumed by the component.","items":{"type":"string","minLength":1}},"dependsOn":{"type":"array","description":"An array of references to other entities that the component depends on to function.","items":{"type":"string","minLength":1}}}}}}]}');const Xe=q(Ce);var ut=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"DomainV1alpha1","description":"A Domain groups a collection of systems that share terminology, domain models, business purpose, or documentation, i.e. form a bounded context.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Domain","metadata":{"name":"artists","description":"Everything about artists"},"spec":{"owner":"artist-relations-team"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Domain"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1}}}}}]}');const vt=q(ut);var at=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"GroupV1alpha1","description":"A group describes an organizational entity, such as for example a team, a business unit, or a loose collection of people in an interest group. Members of these groups are modeled in the catalog as kind User.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Group","metadata":{"name":"infrastructure","description":"The infra business unit"},"spec":{"type":"business-unit","profile":{"displayName":"Infrastructure","email":"infrastructure@example.com","picture":"https://example.com/groups/bu-infrastructure.jpeg"},"parent":"ops","children":["backstage","other"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Group"]},"spec":{"type":"object","required":["type","children"],"properties":{"type":{"type":"string","description":"The type of group. There is currently no enforced set of values for this field, so it is left up to the adopting organization to choose a nomenclature that matches their org hierarchy.","examples":["team","business-unit","product-area","root"],"minLength":1},"profile":{"type":"object","description":"Optional profile information about the group, mainly for display purposes. All fields of this structure are also optional. The email would be a group email of some form, that the group may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the group, and that a browser could fetch and render on a group page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Infrastructure"],"minLength":1},"email":{"type":"string","description":"An email where this entity can be reached.","examples":["infrastructure@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this entity.","examples":["https://example.com/groups/bu-infrastructure.jpeg"],"minLength":1}}},"parent":{"type":"string","description":"The immediate parent group in the hierarchy, if any. Not all groups must have a parent; the catalog supports multi-root hierarchies. Groups may however not have more than one parent. This field is an entity reference.","examples":["ops"],"minLength":1},"children":{"type":"array","description":"The immediate child groups of this group in the hierarchy (whose parent field points to this group). The list must be present, but may be empty if there are no child groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["backstage","other"],"minLength":1}},"members":{"type":"array","description":"The users that are members of this group. The entries of this array are entity references.","items":{"type":"string","examples":["jdoe"],"minLength":1}}}}}}]}`);const ae=q(at);var ce=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"LocationV1alpha1","description":"A location is a marker that references other places to look for catalog data.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Location","metadata":{"name":"org-data"},"spec":{"type":"url","targets":["http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Location"]},"spec":{"type":"object","required":[],"properties":{"type":{"type":"string","description":"The single location type, that's common to the targets specified in the spec. If it is left out, it is inherited from the location type that originally read the entity data.","examples":["url"],"minLength":1},"target":{"type":"string","description":"A single target as a string. Can be either an absolute path/URL (depending on the type), or a relative path such as ./details/catalog-info.yaml which is resolved relative to the location of this Location entity itself.","examples":["./details/catalog-info.yaml"],"minLength":1},"targets":{"type":"array","description":"A list of targets as strings. They can all be either absolute paths/URLs (depending on the type), or relative paths such as ./details/catalog-info.yaml which are resolved relative to the location of this Location entity itself.","items":{"type":"string","examples":["./details/catalog-info.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml"],"minLength":1}},"presence":{"type":"string","description":"Whether the presence of the location target is required and it should be considered an error if it can not be found","default":"required","examples":["required"],"enum":["required","optional"]}}}}}]}`);const De=q(ce),He="ownedBy",Ne="ownerOf",ot="consumesApi",dt="apiConsumedBy",Rt="providesApi",kt="apiProvidedBy",Lt="dependsOn",zt="dependencyOf",_t="parentOf",Et="childOf",cn="memberOf",xt="hasMember",Bt="partOf",At="hasPart";var yt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ResourceV1alpha1","description":"A resource describes the infrastructure a system needs to operate, like BigTable databases, Pub/Sub topics, S3 buckets or CDNs. Modelling them together with components and systems allows to visualize resource footprint, and create tooling around them.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Resource","metadata":{"name":"artists-db","description":"Stores artist details"},"spec":{"type":"database","owner":"artist-relations-team","system":"artist-engagement-portal"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Resource"]},"spec":{"type":"object","required":["type","owner"],"properties":{"type":{"type":"string","description":"The type of resource.","examples":["database","s3-bucket","cluster"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the resource.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"dependsOn":{"type":"array","description":"An array of references to other entities that the resource depends on to function.","items":{"type":"string","minLength":1}},"system":{"type":"string","description":"An entity reference to the system that the resource belongs to.","minLength":1}}}}}]}');const Kt=q(yt);var Vt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"SystemV1alpha1","description":"A system is a collection of resources and components. The system may expose or consume one or several APIs. It is viewed as abstraction level that provides potential consumers insights into exposed features without needing a too detailed view into the details of all components. This also gives the owning team the possibility to decide about published artifacts and APIs.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"System","metadata":{"name":"artist-engagement-portal","description":"Handy tools to keep artists in the loop"},"spec":{"owner":"artist-relations-team","domain":"artists"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["System"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"domain":{"type":"string","description":"An entity reference to the domain that the system belongs to.","examples":["artists"],"minLength":1}}}}}]}');const en=q(Vt);var Zt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"UserV1alpha1","description":"A user describes a person, such as an employee, a contractor, or similar. Users belong to Group entities in the catalog. These catalog user entries are connected to the way that authentication within the Backstage ecosystem works. See the auth section of the docs for a discussion of these concepts.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"User","metadata":{"name":"jdoe"},"spec":{"profile":{"displayName":"Jenny Doe","email":"jenny-doe@example.com","picture":"https://example.com/staff/jenny-with-party-hat.jpeg"},"memberOf":["team-b","employees"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["User"]},"spec":{"type":"object","required":["memberOf"],"properties":{"profile":{"type":"object","description":"Optional profile information about the user, mainly for display purposes. All fields of this structure are also optional. The email would be a primary email of some form, that the user may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the user, and that a browser could fetch and render on a profile page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Jenny Doe"],"minLength":1},"email":{"type":"string","description":"An email where this user can be reached.","examples":["jenny-doe@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this user.","examples":["https://example.com/staff/jenny-with-party-hat.jpeg"],"minLength":1}}},"memberOf":{"type":"array","description":"The list of groups that the user is a direct member of (i.e., no transitive memberships are listed here). The list must be present, but may be empty if the user is not member of any groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["team-b","employees"],"minLength":1}}}}}}]}`);const Ft=q(Zt),re="backstage.io/managed-by-location",M="backstage.io/managed-by-origin-location",we="backstage.io/source-location";function Re(z){if(typeof z!="string")throw new TypeError(`Unable to parse location ref '${z}', unexpected argument ${typeof z}`);const j=z.indexOf(":");if(j<0)throw new TypeError(`Unable to parse location ref '${z}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const se=z.substring(0,j).trim(),$e=z.substring(j+1).trim();if(!se||!$e)throw new TypeError(`Unable to parse location ref '${z}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(se==="http"||se==="https")throw new TypeError(`Invalid location ref '${z}', please prefix it with 'url:', e.g. 'url:${z}'`);return{type:se,target:$e}}function Je(z){const{type:j,target:se}=z;if(j){if(!se)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${j}:${se}`}function gt(z){var j,se,$e,Qe,et;const Ct=(et=(j=z.metadata)===null||j===void 0||(se=j.annotations)===null||se===void 0?void 0:se[we])!==null&&et!==void 0?et:($e=z.metadata)===null||$e===void 0||(Qe=$e.annotations)===null||Qe===void 0?void 0:Qe[re];if(!Ct)throw new Error(`Entity '${ct(z)}' is missing location`);return Re(Ct)}},15018:function(tt,Ae,t){"use strict";t.d(Ae,{zx:function(){return Ve},Oi:function(){return Se},VY:function(){return Si},yW:function(){return Ua},XF:function(){return Ie},mn:function(){return we},NX:function(){return h},ub:function(){return dn},mf:function(){return Wa},yu:function(){return x},h4:function(){return Li},M6:function(){return qr},i9:function(){return tl},aR:function(){return wi},rJ:function(){return mr},Oh:function(){return ll},hu:function(){return ol},rU:function(){return ye},nU:function(){return ns},sk:function(){return wn},Or:function(){return Br},T3:function(){return ki},g9:function(){return ul},Ex:function(){return cs},Gk:function(){return w},tn:function(){return Ci},Ph:function(){return Xt},YE:function(){return f},v7:function(){return Xi},R6:function(){return xi},tR:function(){return pi},uw:function(){return da},qt:function(){return di},iA:function(){return Pa},GB:function(){return $n},po:function(){return nr},mZ:function(){return Es},Pf:function(){return Wr}});var h={};t.r(h),t.d(h,{Nm:function(){return q},ht:function(){return Xe},LJ:function(){return Ce}});var n=t(52322),m=t(2784),O=t(25248),G=t(19928);function b(e){const[r,i]=useState([]),c=useApi(alertApiRef),{anchorOrigin:p={vertical:"top",horizontal:"center"}}=e;if(useEffect(()=>{const k=c.alert$().subscribe(U=>i(D=>D.concat(U)));return()=>{k.unsubscribe()}},[c]),r.length===0)return null;const[g]=r,S=()=>{i(k=>k.filter(U=>U!==g))};return _jsx(Snackbar,{open:!0,anchorOrigin:p,children:_jsx(Alert,{action:_jsx(IconButton,{color:"inherit",size:"small",onClick:S,"data-testid":"error-button-close",children:_jsx(CloseIcon,{})}),severity:g.severity,children:_jsxs("span",{children:[g.message.toString(),r.length>1&&_jsx("em",{children:` (${r.length-1} older ${pluralize("message",r.length-1)})`})]})})})}var l=t(79692),L=t(12420);const ee=(0,l.Z)(e=>(0,L.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:e.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function X(e){const{displayName:r,picture:i,customStyles:c}=e,p=ee();let g={...c};return i||(g={backgroundColor:stringToColor(r||""),...c}),_jsx(MaterialAvatar,{alt:r,src:i,className:p.avatar,style:g,children:r&&extractInitials(r)})}var K=t(77277),F=t(72779),Y=t.n(F),V=t(86689),ie=t(62833),le=t(76635);const I=(0,l.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),A=e=>/^([a-z+.-]+):/.test(e),Z=()=>{try{return(0,O.h_)(O.Ds).getOptionalString("app.baseUrl")}catch{return}},P=()=>{const e="http://dummy.dev";var r;const i=(r=Z())!==null&&r!==void 0?r:"/",{pathname:c}=new URL(i,e);return(0,le.trimEnd)(c,"/")},$=e=>{let r=String(e);const i=P(),c=A(r),p=r.startsWith(i);return!c&&!p&&(r=i.concat(r)),r},te=e=>{if(e instanceof Array)return e.map(te).join(" ").trim();if(typeof e=="object"&&e){var r,i;return te((r=e)===null||r===void 0||(i=r.props)===null||i===void 0?void 0:i.children)}return["string","number"].includes(typeof e)?String(e):""},ye=m.forwardRef(({onClick:e,noTrack:r,...i},c)=>{const p=I(),g=(0,O.z$)(),S=$(i.to),k=te(i.children)||S,U=A(S),D=U&&!!/^https?:/.exec(S),he=ne=>{e==null||e(ne),r||g.captureEvent("click",k,{attributes:{to:S}})};return U?(0,n.jsxs)(V.Z,{...D?{target:"_blank",rel:"noopener"}:{},...i,ref:c,href:S,onClick:he,className:Y()(p.externalLink,i.className),children:[i.children,(0,n.jsx)("span",{className:p.visuallyHidden,children:", Opens in a new window"})]}):(0,n.jsx)(V.Z,{...i,ref:c,component:ie.rU,to:S,onClick:he})}),Ge=m.forwardRef((e,r)=>(0,n.jsx)(ye,{ref:r,...e,color:"initial"})),Ve=m.forwardRef((e,r)=>(0,n.jsx)(K.Z,{ref:r,component:Ge,...e}));var Te=t(60364),Ye=t(61837),Ke=t(80030),Oe=t(19353),Fe=t(95074);function qe(e){const{text:r,tooltipDelay:i=1e3,tooltipText:c="Text copied to clipboard","aria-label":p="Copy text"}=e,g=(0,O.h_)(O.VE),[S,k]=(0,m.useState)(!1),[{error:U},D]=(0,Fe.Z)();(0,m.useEffect)(()=>{U&&g.post(U)},[U,g]);const he=ne=>{ne.stopPropagation(),k(!0),D(r)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Ke.ZP,{id:"copy-test-tooltip",title:c,placement:"top",leaveDelay:i,onClose:()=>k(!1),open:S,children:(0,n.jsx)(Ye.Z,{onClick:he,"aria-label":p,children:(0,n.jsx)(Oe.Z,{})})})})}var st=t(83229),nt=t(26639),ct=t(39595);function Se(e){const{text:r,language:i,showLineNumbers:c=!1,highlightedNumbers:p,customStyle:g,showCopyCodeButton:S=!1}=e,k=(0,Te.Z)(),U=k.palette.type==="dark"?nt.Z:ct.Z,D=k.palette.type==="dark"?"#256bf3":"#e6ffed";return(0,n.jsxs)("div",{style:{position:"relative"},children:[(0,n.jsx)(st.Z,{customStyle:g,language:i,style:U,showLineNumbers:c,wrapLines:!0,lineNumberStyle:{color:k.palette.textVerySubtle},lineProps:he=>p!=null&&p.includes(he)?{style:{backgroundColor:D}}:{},children:r}),S&&(0,n.jsx)("div",{style:{position:"absolute",top:0,right:0},children:(0,n.jsx)(qe,{text:r})})]})}var ht=t(41156),mt=t(88188);function Ie(e){const{title:r,to:i}=e,c=(0,ht.Z)(p=>p.breakpoints.down("xs"));return i?c?(0,n.jsx)(Ye.Z,{component:ie.rU,color:"primary",title:r,size:"small",to:i,children:(0,n.jsx)(mt.Z,{})}):(0,n.jsx)(K.Z,{component:ie.rU,variant:"contained",color:"primary",to:i,children:r}):null}var q;(function(e){e.TOP_BOTTOM="TB",e.BOTTOM_TOP="BT",e.LEFT_RIGHT="LR",e.RIGHT_LEFT="RL"})(q||(q={}));var xe;(function(e){e.UP_LEFT="UL",e.UP_RIGHT="UR",e.DOWN_LEFT="DL",e.DOWN_RIGHT="DR"})(xe||(xe={}));var Ce;(function(e){e.NETWORK_SIMPLEX="network-simplex",e.TIGHT_TREE="tight-tree",e.LONGEST_PATH="longest-path"})(Ce||(Ce={}));var Xe;(function(e){e.LEFT="l",e.RIGHT="r",e.CENTER="c"})(Xe||(Xe={}));var ut=t(84945),vt=t(11105),at=t(97963),ae=t(46506),ce=t.n(ae),De=t(54073),He=t.n(De),Ne=t(10368);const ot=(0,l.Z)(e=>({node:{fill:e.palette.primary.light,stroke:e.palette.primary.light},text:{fill:e.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function dt({node:{id:e}}){const r=ot(),[i,c]=m.useState(0),[p,g]=m.useState(0),S=m.useRef(null);m.useLayoutEffect(()=>{if(S.current){let{height:he,width:ne}=S.current.getBBox();he=Math.round(he),ne=Math.round(ne),(he!==p||ne!==i)&&(c(ne),g(he))}},[i,p]);const k=10,U=i+k*2,D=p+k*2;return(0,n.jsxs)("g",{children:[(0,n.jsx)("rect",{className:r.node,width:U,height:D,rx:10}),(0,n.jsx)("text",{ref:S,className:r.text,y:D/2,x:U/2,textAnchor:"middle",alignmentBaseline:"middle",children:e})]})}const Rt="arrow-marker",kt="node",Lt="edge",zt="label",_t=(0,Ne.Z)(e=>({node:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Et=e=>(0,n.jsx)(dt,{...e});function cn({render:e=Et,setNode:r,node:i}){const{width:c,height:p,x:g=0,y:S=0}=i,k=i,U=_t(),D=m.useRef(null);return m.useLayoutEffect(()=>{if(D.current){let{height:he,width:ne}=D.current.getBBox();he=Math.round(he),ne=Math.round(ne),(he!==p||ne!==c)&&r(i.id,{...i,height:he,width:ne})}},[i,c,p,r]),(0,n.jsx)("g",{ref:D,"data-testid":kt,className:U.node,transform:`translate(${g-c/2},${S-p/2})`,children:e({node:k})})}var xt=t(55876),Bt=t(66481),At=t(19574),yt=t.n(At);const Kt=(0,Ne.Z)(e=>({text:{fill:e.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function Vt({edge:{label:e}}){const r=Kt();return(0,n.jsx)("text",{className:r.text,textAnchor:"middle",children:e})}const en=(0,Ne.Z)(e=>({path:{strokeWidth:2,stroke:e.palette.textSubtle,fill:"none",transition:`${e.transitions.duration.shortest}ms`},label:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),Zt=e=>(0,n.jsx)(Vt,{...e}),Ft=xt.Z().x(e=>e.x).y(e=>e.y).curve(Bt.Z);function re({render:e=Zt,setEdge:r,id:i,edge:c}){const{x:p=0,y:g=0,width:S,height:k,points:U}=c,D=c,he=en(),ne=m.useRef(null);m.useLayoutEffect(()=>{if(ne.current){let{height:je,width:Ze}=ne.current.getBBox();je=Math.round(je),Ze=Math.round(Ze),(je!==k||Ze!==S)&&r(i,{...c,height:je,width:Ze})}},[c,k,S,r,i]);let fe="";if(U){const je=U.filter(Ze=>yt()(Ze.x)&&yt()(Ze.y));fe=Ft(je)||""}return(0,n.jsxs)(n.Fragment,{children:[fe&&(0,n.jsx)("path",{"data-testid":Lt,className:he.path,markerEnd:`url(#${Rt})`,d:fe}),D.label?(0,n.jsx)("g",{ref:ne,"data-testid":zt,className:he.label,transform:`translate(${p},${g})`,children:e({edge:D})}):null]})}const M="workspace";function we(e){var r,i;const{edges:c,nodes:p,renderNode:g,direction:S=q.TOP_BOTTOM,align:k,nodeMargin:U=50,edgeMargin:D=10,rankMargin:he=50,paddingX:ne=0,paddingY:fe=0,acyclicer:je,ranker:Ze=Ce.NETWORK_SIMPLEX,labelPosition:lt=Xe.RIGHT,labelOffset:Nt=10,edgeRanks:Jt=1,edgeWeight:rn=1,renderLabel:sn,defs:St,zoom:qt="enabled",...Qt}=e,cr=(0,at.Z)(),[Kn,dr]=m.useState(100),[ur,Jo]=m.useState(100),Gt=m.useRef(new(ce()).graphlib.Graph),[Kr,po]=m.useState(((r=Gt.current.graph())===null||r===void 0?void 0:r.width)||0),[Yr,fo]=m.useState(((i=Gt.current.graph())===null||i===void 0?void 0:i.height)||0),[go,Qo]=m.useState([]),[bn,rr]=m.useState([]),Yn=Math.max(Kr,Kn),Hn=Math.max(Yr,ur),mn=m.useMemo(()=>He()(fn=>{if(!fn)return;const Sn=vt.Z(fn),hn=vt.Z(fn.getElementById(M));function Jn(){Sn.call(ut.sP().scaleExtent([1,10]).on("zoom",hr=>{hr.transform.x=Math.min(0,Math.max(hr.transform.x,Yn-Yn*hr.transform.k)),hr.transform.y=Math.min(0,Math.max(hr.transform.y,Hn-Hn*hr.transform.k)),hn.attr("transform",hr.transform)}))}qt==="enabled"?Jn():qt==="enable-on-click"&&Sn.on("click",()=>Jn());const{width:Qn,height:mo}=fn.getBoundingClientRect();Kn!==Qn&&dr(Qn),ur!==mo&&Jo(mo)},100),[ur,Kn,Yn,Hn,qt]),An=m.useCallback(()=>{const fn=Gt.current.nodes(),Sn=Gt.current.edges();fn.forEach(hn=>{p.some(Qn=>Qn.id===hn)||Gt.current.removeNode(hn)}),Sn.forEach(hn=>{c.some(Qn=>Qn.from===hn.v&&Qn.to===hn.w)||Gt.current.removeEdge(hn.v,hn.w)}),p.forEach(hn=>{const Jn=Gt.current.nodes().find(Qn=>hn.id===Qn);if(Jn&&Gt.current.node(Jn)){const{width:Qn,height:mo,x:hr,y:Il}=Gt.current.node(Jn);Gt.current.setNode(Jn,{...hn,width:Qn,height:mo,x:hr,y:Il})}else Gt.current.setNode(hn.id,{...hn,width:0,height:0})}),c.forEach(hn=>{Gt.current.setEdge(hn.from,hn.to,{...hn,label:hn.label,width:0,height:0,labelpos:lt,labeloffset:Nt,weight:rn,minlen:Jt})})},[c,p,lt,Nt,rn,Jt]),sr=m.useMemo(()=>He()(()=>{ce().layout(Gt.current);const{height:fn,width:Sn}=Gt.current.graph(),hn=Math.max(0,fn||0),Jn=Math.max(0,Sn||0);po(Jn),fo(hn),Qo(Gt.current.nodes()),rr(Gt.current.edges())},250,{leading:!0}),[]);m.useEffect(()=>(Gt.current.setGraph({rankdir:S,align:k,nodesep:U,edgesep:D,ranksep:he,marginx:ne,marginy:fe,acyclicer:je,ranker:Ze}),An(),sr(),sr.cancel),[je,k,S,D,ne,fe,U,he,Ze,An,sr]);function Pr(fn,Sn){return Gt.current.setNode(fn,Sn),sr(),Gt.current}function Is(fn,Sn){return Gt.current.setEdge(fn,Sn),sr(),Gt.current}return(0,n.jsxs)("svg",{ref:mn,...Qt,width:"100%",height:Hn,viewBox:`0 0 ${Yn} ${Hn}`,children:[(0,n.jsxs)("defs",{children:[(0,n.jsx)("marker",{id:Rt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth",children:(0,n.jsx)("path",{fill:cr.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),St]}),(0,n.jsx)("g",{id:M,children:(0,n.jsxs)("svg",{width:Kr,height:Yr,y:Hn/2-Yr/2,x:Yn/2-Kr/2,viewBox:`0 0 ${Kr} ${Yr}`,children:[bn.map(fn=>{const Sn=Gt.current.edge(fn);return Sn?(0,n.jsx)(re,{id:fn,setEdge:Is,render:sn,edge:Sn},`${fn.v}-${fn.w}`):null}),go.map(fn=>{const Sn=Gt.current.node(fn);return Sn?(0,n.jsx)(cn,{setNode:Pr,render:g,node:Sn},fn):null})]})})]})}var Re;const Je=(0,l.Z)(e=>({root:{padding:e.spacing(0),marginBottom:e.spacing(0),marginTop:e.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:e.spacing(6),marginTop:-e.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:e.palette.banner.text,"& a":{color:e.palette.banner.link}},info:{backgroundColor:e.palette.banner.info},error:{backgroundColor:e.palette.banner.error},warning:{backgroundColor:(Re=e.palette.banner.warning)!==null&&Re!==void 0?Re:e.palette.banner.error}}),{name:"BackstageDismissableBanner"}),gt=e=>{const{variant:r,message:i,id:c,fixed:p=!1}=e,g=Je(),k=useApi(storageApiRef).forBucket("notifications");var U;const D=(U=k.snapshot("dismissedBanners").value)!==null&&U!==void 0?U:[],[he,ne]=useState(new Set(D)),fe=useObservable(k.observe$("dismissedBanners"));useEffect(()=>{if(fe!=null&&fe.value){var Ze;const lt=(Ze=fe==null?void 0:fe.value)!==null&&Ze!==void 0?Ze:[];ne(new Set(lt))}},[fe==null?void 0:fe.value]);const je=()=>{k.set("dismissedBanners",[...he,c])};return _jsx(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!he.has(c),classes:{root:classNames(g.root,!p&&g.topPosition)},children:_jsx(SnackbarContent,{classes:{root:classNames(g.content,g[r]),message:g.message},message:i,action:[_jsx(IconButton,{title:"Permanently dismiss this message",color:"inherit",onClick:je,children:_jsx(Close,{className:g.icon})},"dismiss")]})})};var z=t(60905),j=t(90436),se=t(86284),$e=t(96465),Qe=t(19133),et=t(3871);const Ct=(0,l.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),on=({missing:e})=>{const r=Ct();switch(e){case"field":return(0,n.jsx)("img",{src:se,className:r.generalImg,alt:"annotation is missing"});case"info":return(0,n.jsx)("img",{src:$e,alt:"no Information",className:r.generalImg});case"content":return(0,n.jsx)("img",{src:Qe,alt:"create Component",className:r.generalImg});case"data":return(0,n.jsx)("img",{src:et,alt:"no Build",className:r.generalImg});default:return null}},Ht=(0,l.Z)(e=>({root:{backgroundColor:e.palette.background.default,padding:e.spacing(2,0,0,0)},action:{marginTop:e.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function dn(e){const{title:r,description:i,missing:c,action:p}=e,g=Ht();return(0,n.jsxs)(z.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:g.root,spacing:2,children:[(0,n.jsx)(z.Z,{item:!0,xs:12,md:6,children:(0,n.jsxs)(z.Z,{container:!0,direction:"column",children:[(0,n.jsx)(z.Z,{item:!0,xs:!0,children:(0,n.jsx)(j.Z,{variant:"h5",children:r})}),(0,n.jsx)(z.Z,{item:!0,xs:!0,children:(0,n.jsx)(j.Z,{variant:"body1",children:i})}),(0,n.jsx)(z.Z,{item:!0,xs:!0,className:g.action,children:p})]})}),(0,n.jsx)(z.Z,{item:!0,xs:12,md:6,className:g.imageContainer,children:(0,n.jsx)(on,{missing:c})})]})}const Ut=`apiVersion: backstage.io/v1alpha1
|
|
2
|
-
kind: Component
|
|
3
|
-
metadata:
|
|
4
|
-
name: example
|
|
5
|
-
description: example.com
|
|
6
|
-
annotations:
|
|
7
|
-
ANNOTATION: value
|
|
8
|
-
spec:
|
|
9
|
-
type: website
|
|
10
|
-
lifecycle: production
|
|
11
|
-
owner: user:guest`,Mt=(0,l.Z)(e=>({code:{borderRadius:6,margin:`${e.spacing(2)}px 0px`,background:e.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function wn(e){const{annotation:r,readMoreUrl:i}=e,c=i||"https://backstage.io/docs/features/software-catalog/well-known-annotations",p=Mt(),g=(0,n.jsxs)(n.Fragment,{children:["The ",(0,n.jsx)("code",{children:r})," annotation is missing. You need to add the annotation to your component if you want to enable this tool."]});return(0,n.jsx)(dn,{missing:"field",title:"Missing Annotation",description:g,action:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.Z,{variant:"body1",children:"Add the annotation to your component YAML as shown in the highlighted example below:"}),(0,n.jsx)("div",{className:p.code,children:(0,n.jsx)(Se,{text:Ut.replace("ANNOTATION",r),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})}),(0,n.jsx)(K.Z,{color:"primary",component:ye,to:c,children:"Read more"})]})})}var E=t(11776),J=t(38402),be=t(49378),ge=t(41128),Le=t(27616),Be=t(8284),pt=t(70660),Ot=t(91750),tn=t(38016);const Dt=(e,r)=>(r.palette.type==="light"?ge._j:ge.$n)(r.palette[e].light,.6),an=(e,r)=>(r.palette.type==="light"?ge.$n:ge._j)(r.palette[e].light,.9),Tt=(0,l.Z)(e=>({root:{marginRight:e.spacing(1),fill:({severity:r})=>Dt(r,e)}})),ln=({severity:e})=>{const r=Tt({severity:e});return(0,n.jsx)(Ot.Z,{classes:r})},Wn=({severity:e})=>{const r=Tt({severity:e});return(0,n.jsx)(tn.Z,{classes:r})},Cn=(0,l.Z)(e=>({panel:{backgroundColor:({severity:r})=>an(r,e),color:({severity:r})=>Dt(r,e),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:r})=>Dt(r,e),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:r})=>Dt(r,e),backgroundColor:({severity:r})=>an(r,e)},details:{width:"100%",display:"block",color:e.palette.textContrast,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.border}`,padding:e.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),On=e=>e.charAt(0).toLocaleUpperCase("en-US")+e.slice(1);function $n(e){const{severity:r="warning",title:i,message:c,children:p,defaultExpanded:g}=e,S=Cn({severity:r}),k=On(r)+(i?`: ${i}`:"");return(0,n.jsxs)(Le.Z,{defaultExpanded:g!=null?g:!1,className:S.panel,role:"alert",children:[(0,n.jsxs)(Be.Z,{expandIcon:(0,n.jsx)(Wn,{severity:r}),className:S.summary,children:[(0,n.jsx)(ln,{severity:r}),(0,n.jsx)(j.Z,{className:S.summaryText,variant:"subtitle1",children:k})]}),(c||p)&&(0,n.jsx)(pt.Z,{children:(0,n.jsxs)(z.Z,{container:!0,children:[c&&(0,n.jsx)(z.Z,{item:!0,xs:12,children:(0,n.jsx)(j.Z,{className:S.message,variant:"body1",children:c})}),p&&(0,n.jsx)(z.Z,{item:!0,xs:12,className:S.details,children:p})]})})]})}const Xn=(0,l.Z)(e=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:e.spacing(2)},divider:{margin:e.spacing(2)}}),{name:"BackstageErrorPanel"}),Wt=({error:e,message:r,stack:i,children:c})=>{const p=Xn();return(0,n.jsxs)(E.Z,{dense:!0,children:[(0,n.jsxs)(J.Z,{alignItems:"flex-start",children:[(0,n.jsx)(be.Z,{classes:{secondary:p.text},primary:"Error",secondary:e}),(0,n.jsx)(qe,{text:e})]}),(0,n.jsxs)(J.Z,{alignItems:"flex-start",children:[(0,n.jsx)(be.Z,{classes:{secondary:p.text},primary:"Message",secondary:r}),(0,n.jsx)(qe,{text:r})]}),i&&(0,n.jsxs)(J.Z,{alignItems:"flex-start",children:[(0,n.jsx)(be.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:i}),(0,n.jsx)(qe,{text:i})]}),c]})};function x(e){const{title:r,error:i,defaultExpanded:c,children:p}=e;return(0,n.jsx)($n,{severity:"error",title:r!=null?r:i.message,defaultExpanded:c,children:(0,n.jsx)(Wt,{error:i.name,message:i.message,stack:i.stack,children:p})})}var d=t(85256);const y=(0,l.Z)(e=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:e.spacing(2)},divider:{margin:e.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function w(e){var r;const{title:i,error:c,defaultExpanded:p}=e,g=y();if(c.name!=="ResponseError")return(0,n.jsx)(x,{title:i!=null?i:c.message,defaultExpanded:p,error:c});const{body:S,cause:k}=c,{request:U,response:D}=S,he=`${D.statusCode}: ${k.name}`,ne=U&&`${U.method} ${U.url}`,fe=k.message.replace(/\\n/g,`
|
|
12
|
-
`),je=(r=k.stack)===null||r===void 0?void 0:r.replace(/\\n/g,`
|
|
13
|
-
`),Ze=JSON.stringify(S,void 0,2);return(0,n.jsxs)(x,{title:i!=null?i:c.message,defaultExpanded:p,error:{name:he,message:fe,stack:je},children:[ne&&(0,n.jsxs)(J.Z,{alignItems:"flex-start",children:[(0,n.jsx)(be.Z,{classes:{secondary:g.text},primary:"Request",secondary:U?`${ne}`:void 0}),(0,n.jsx)(qe,{text:ne})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Z,{component:"li",className:g.divider}),(0,n.jsx)(J.Z,{alignItems:"flex-start",children:(0,n.jsx)(be.Z,{classes:{secondary:g.text},primary:"Full Error as JSON"})}),(0,n.jsx)(Se,{language:"json",text:Ze,showCopyCodeButton:!0})]})]})}var H=t(28316);function de(e){const r=document.createElement("div");return r.setAttribute("id",e),r}function ve(e){document.body.insertBefore(e,document.body.lastElementChild.nextElementSibling)}function Ee(e){const r=useRef(null);useEffect(function(){const p=document.querySelector(`#${e}`),g=p||de(e);return p||ve(g),g.appendChild(r.current),function(){r.current.remove(),g.childNodes.length===-1&&g.remove()}},[e]);function i(){return r.current||(r.current=document.createElement("div")),r.current}return i()}var _e=null;const $t="core.calloutSeen";function wt(){const[e,r]=useState(()=>{const c=localStorage.getItem($t);return c?JSON.parse(c):{}}),i=useCallback((c,p)=>{const g=localStorage.getItem($t),k={...g?JSON.parse(g):{},[c]:p};r(k),localStorage.setItem($t,JSON.stringify(k))},[]);return{states:e,setState:i}}function Tn(e){const{states:r,setState:i}=wt(),c=useCallback(()=>{i(e,!0)},[i,e]);return{seen:r[e]===!0,markSeen:c}}function pr(e){const{seen:r,markSeen:i}=Tn(e);return{show:r===!1,hide:i}}const fr=(0,l.Z)({"@keyframes pulsateSlightly":{"0%":{transform:"scale(1.0)"},"100%":{transform:"scale(1.1)"}},"@keyframes pulsateAndFade":{"0%":{transform:"scale(1.0)",opacity:.9},"100%":{transform:"scale(1.5)",opacity:0}},featureWrapper:{position:"relative"},backdrop:{zIndex:2e3,position:"fixed",overflow:"hidden",left:0,right:0,top:0,bottom:0},dot:{position:"absolute",backgroundColor:"transparent",borderRadius:"100%",border:"1px solid rgba(103, 146, 180, 0.98)",boxShadow:"0px 0px 0px 20000px rgba(0, 0, 0, 0.5)",zIndex:2001,transformOrigin:"center center",animation:"$pulsateSlightly 1744ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) alternate infinite"},pulseCircle:{width:"100%",height:"100%",backgroundColor:"transparent",borderRadius:"100%",border:"2px solid white",zIndex:2001,transformOrigin:"center center",animation:"$pulsateAndFade 872ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite"},text:{position:"absolute",color:"white",zIndex:2003}},{name:"BackstageFeatureCalloutCircular"});function Jr(e){const{featureId:r,title:i,description:c,children:p}=e,{show:g,hide:S}=useShowCallout(r),k=usePortal("core.callout"),U=useRef(null),[D,he]=useState(),ne=fr(),fe=useCallback(()=>{if(U.current){const je=U.current.getBoundingClientRect(),Ze=Math.max(je.width,je.height),lt=800,Nt=je.x-(Ze-je.width)/2-lt,Jt=je.y-(Ze-je.height)/2-lt,rn=Ze+2*lt,sn=450,St=je.x+je.width/2-sn,qt=je.y-(Ze-je.height)/2+Ze+20;he({dotLeft:Nt,dotTop:Jt,dotSize:rn,borderWidth:lt,textTop:qt,textLeft:St,textWidth:sn})}},[]);return useEffect(()=>(window.addEventListener("resize",fe),window.addEventListener("scroll",fe),()=>{window.removeEventListener("resize",fe),window.removeEventListener("scroll",fe)}),[fe]),useLayoutEffect(fe,[U.current,fe]),g?_jsxs(_Fragment,{children:[_jsx("div",{className:ne.featureWrapper,ref:U,children:p}),createPortal(_jsx("div",{className:ne.backdrop,children:_jsx(ClickAwayListener,{onClickAway:S,children:_jsxs(_Fragment,{children:[_jsx("div",{className:ne.dot,"data-testid":"dot",style:{left:D==null?void 0:D.dotLeft,top:D==null?void 0:D.dotTop,width:D==null?void 0:D.dotSize,height:D==null?void 0:D.dotSize,borderWidth:D==null?void 0:D.borderWidth},onClick:S,onKeyDown:S,role:"button",tabIndex:0,children:_jsx("div",{className:ne.pulseCircle})}),_jsxs("div",{className:ne.text,"data-testid":"text",style:{left:D==null?void 0:D.textLeft,top:D==null?void 0:D.textTop,width:D==null?void 0:D.textWidth},children:[_jsx(Typography,{variant:"h2",paragraph:!0,children:i}),_jsx(Typography,{children:c})]})]})})}),k)]}):_jsx(_Fragment,{children:p})}var kr=t(35292);const Qr=(0,l.Z)(e=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:e.palette.text.secondary,cursor:"default"},primary:{color:e.palette.primary.main},secondary:{color:e.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function xr({color:e="primary",disabled:r=!1,href:i="#",icon:c=(0,n.jsx)(kr.Z,{}),label:p,onClick:g,title:S}){const k=Qr();return r?(0,n.jsxs)(V.Z,{title:S,className:Y()(k.link,k.disabled),underline:"none",children:[c,(0,n.jsx)("span",{className:k.label,children:p})]}):(0,n.jsxs)(V.Z,{title:S,className:Y()(k.link,k[e]),to:i,component:ye,onClick:g,children:[c,(0,n.jsx)("span",{className:k.label,children:p})]})}const Xr=(0,l.Z)(e=>({links:{margin:e.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:e.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function qr(e){const{links:r}=e,i=Xr();return(0,n.jsx)("nav",{className:i.links,children:r.map((c,p)=>(0,n.jsx)(xr,{...c},p+1))})}const Or=e=>{const r=e==="dark"?"16%":"97%";return`
|
|
14
|
-
hsl(0, 0%, ${r}) 0%,
|
|
15
|
-
hsla(0, 0%, ${r}, 0.987) 8.1%,
|
|
16
|
-
hsla(0, 0%, ${r}, 0.951) 15.5%,
|
|
17
|
-
hsla(0, 0%, ${r}, 0.896) 22.5%,
|
|
18
|
-
hsla(0, 0%, ${r}, 0.825) 29%,
|
|
19
|
-
hsla(0, 0%, ${r}, 0.741) 35.3%,
|
|
20
|
-
hsla(0, 0%, ${r}, 0.648) 41.2%,
|
|
21
|
-
hsla(0, 0%, ${r}, 0.55) 47.1%,
|
|
22
|
-
hsla(0, 0%, ${r}, 0.45) 52.9%,
|
|
23
|
-
hsla(0, 0%, ${r}, 0.352) 58.8%,
|
|
24
|
-
hsla(0, 0%, ${r}, 0.259) 64.7%,
|
|
25
|
-
hsla(0, 0%, ${r}, 0.175) 71%,
|
|
26
|
-
hsla(0, 0%, ${r}, 0.104) 77.5%,
|
|
27
|
-
hsla(0, 0%, ${r}, 0.049) 84.5%,
|
|
28
|
-
hsla(0, 0%, ${r}, 0.013) 91.9%,
|
|
29
|
-
hsla(0, 0%, ${r}, 0) 100%
|
|
30
|
-
`},_r=100,Bn=10,In=(0,l.Z)(e=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:_r,height:`calc(100% + ${Bn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-Bn,background:`linear-gradient(90deg, ${Or(e.palette.type)})`},fadeRight:{right:-Bn,background:`linear-gradient(270deg, ${Or(e.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-e.spacing(2)},buttonRight:{right:-e.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function or(e){const[[r,i],c]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=e.current;if(!p){c([0,0]);return}const g=()=>{const S=p.scrollLeft,k=p.scrollWidth-p.offsetWidth-p.scrollLeft;c([S,k])};return g(),p.addEventListener("scroll",g),window.addEventListener("resize",g),()=>{p.removeEventListener("scroll",g),window.removeEventListener("resize",g)}},[e]),[r,i]}function gr(e,r,i){const[c,p]=React.useState(0);return React.useLayoutEffect(()=>{if(c===0)return;const g=performance.now(),S=requestAnimationFrame(k=>{if(!e.current)return;const U=k-g,D=Math.abs(c)*U/r,ne=Math.max(i,D)*Math.sign(c);e.current.scrollBy({left:ne});const fe=c-ne;Math.sign(c)!==Math.sign(fe)?p(0):p(fe)});return()=>cancelAnimationFrame(S)},[e,c,r,i]),p}function es(e){const{scrollStep:r=100,scrollSpeed:i=50,minScrollDistance:c=5,children:p,...g}=e,S=In(e),k=React.useRef(),[U,D]=or(k),he=gr(k,i,c),ne=fe=>{!k.current||he(fe?r:-r)};return _jsxs("div",{...g,className:S.root,children:[_jsx(Grid,{container:!0,direction:"row",wrap:"nowrap",className:S.container,ref:k,children:p}),_jsx("div",{className:classNames(S.fade,S.fadeLeft,{[S.fadeHidden]:U===0})}),_jsx("div",{className:classNames(S.fade,S.fadeRight,{[S.fadeHidden]:D===0})}),U>0&&_jsx(IconButton,{title:"Scroll Left",onClick:()=>ne(!1),className:classNames(S.button,S.buttonLeft,{}),children:_jsx(ChevronLeftIcon,{})}),D>0&&_jsx(IconButton,{title:"Scroll Right",onClick:()=>ne(!0),className:classNames(S.button,S.buttonRight,{}),children:_jsx(ChevronRightIcon,{})})]})}const ts=(0,l.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function br(e){const r=ts(e),{shorthand:i,alpha:c}=e;return i?_jsx("span",{className:r[c?"alpha":"beta"],style:{fontSize:"120%"},children:c?_jsx(_Fragment,{children:"\u03B1"}):_jsx(_Fragment,{children:"\u03B2"})}):_jsx("span",{className:r[c?"alpha":"beta"],children:c?"Alpha":"Beta"})}const Sr=(0,m.lazy)(()=>Promise.all([t.e(4949),t.e(6051)]).then(t.bind(t,76051)).then(e=>({default:e.RealLogViewer})));function ns(e){const{Progress:r}=(0,O.qD)().getComponents();return(0,n.jsx)(m.Suspense,{fallback:(0,n.jsx)(r,{}),children:(0,n.jsx)(Sr,{...e})})}const wr=(0,l.Z)(e=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${e.palette.border}`},"& th, & td":{border:`1px solid ${e.palette.border}`,padding:e.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:e.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:e.palette.background.paper},"& tr":{backgroundColor:e.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:e.palette.background.default},"& a":{color:e.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Rn=(e,r)=>r?typeof r=="string"?e+r:m.Children.toArray(r.props.children).reduce(Rn,e):e,Zn=({level:e,children:r})=>{const p=m.Children.toArray(r).reduce(Rn,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return m.createElement(`h${e}`,{id:p},r)},ir={code:({inline:e,className:r,children:i,...c})=>{const p=String(i).replace(/\n+$/,""),g=/language-(\w+)/.exec(r||"");return!e&&g?(0,n.jsx)(Se,{language:g[1],text:p}):(0,n.jsx)("code",{className:r,...c,children:i})},h1:Zn,h2:Zn,h3:Zn,h4:Zn,h5:Zn,h6:Zn};function rs(e){const{content:r,dialect:i="gfm",linkTarget:c,transformLinkUri:p,transformImageUri:g,className:S}=e,k=wr();return _jsx(ReactMarkdown,{remarkPlugins:i==="gfm"?[gfm]:[],className:`${k.markdown} ${S}`,children:r,components:ir,linkTarget:c,transformLinkUri:p,transformImageUri:g})}var Cr=t(23054);const Gn=(0,l.Z)(e=>({root:{paddingLeft:e.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),Rs=({request:e,busy:r,setBusy:i})=>{const c=Gn(),[p,g]=useState(),S=async()=>{i(!0);try{await e.trigger()}catch(U){g(isError(U)?U.message:"An unspecified error occurred")}finally{i(!1)}},k=e.provider.icon;return _jsxs(ListItem,{disabled:r,classes:{root:c.root},children:[_jsx(ListItemAvatar,{children:_jsx(k,{fontSize:"large"})}),_jsx(ListItemText,{primary:e.provider.title,secondary:p&&_jsx(Typography,{color:"error",children:p})}),_jsx(Button,{color:"primary",variant:"contained",onClick:S,children:"Log in"})]})};var ss=null;const ar=(0,l.Z)(e=>({dialog:{paddingTop:e.spacing(1)},title:{minWidth:0},titleHeading:{fontSize:e.typography.h6.fontSize},contentList:{padding:0},actionButtons:{padding:e.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Ls(e){const r=ar(),[i,c]=useState(!1),p=useApi(oauthRequestApiRef),g=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),S=()=>{g.forEach(k=>k.reject())};return _jsxs(Dialog,{open:Boolean(g.length),fullWidth:!0,maxWidth:"xs",classes:{paper:r.dialog},"aria-labelledby":"oauth-req-dialog-title",children:[_jsxs("main",{children:[_jsx(DialogTitle,{classes:{root:r.title},id:"oauth-req-dialog-title",children:_jsx(Typography,{className:r.titleHeading,variant:"h1",children:"Login Required"})}),_jsx(DialogContent,{dividers:!0,classes:{root:r.contentList},children:_jsx(List,{children:g.map(k=>_jsx(LoginRequestListItem,{request:k,busy:i,setBusy:c},k.provider.title))})})]}),_jsx(DialogActions,{classes:{root:r.actionButtons},children:_jsx(Button,{onClick:S,children:"Reject All"})})]})}var os=t(15277),$r=t.n(os),is=t(29862);const as=(0,l.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Br(e){const[r,i]=(0,m.useState)(!1),c=(0,is.t)(),p=as(),g=k=>{c()&&i(k)};var S;return(0,n.jsx)(Ke.ZP,{title:(S=e.title)!==null&&S!==void 0?S:e.text||"",placement:e.placement,disableHoverListener:!r,children:(0,n.jsx)($r(),{text:e.text,line:e.line,onToggled:g,containerClassName:p.container})})}var ls=t(67358);function cs(e){const[r,i]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{const c=setTimeout(()=>i(!0),250);return()=>clearTimeout(c)},[]),r?(0,n.jsx)(ls.Z,{...e,"data-testid":"progress"}):(0,n.jsx)("div",{style:{display:"none"}})}var Yt=t(94339),jr=t(14503),Zr=t(24579),qn=t(32552),un=t(15459),Fn=t(95544),ds=t(27597);const us=(0,l.Z)(e=>({root:{maxWidth:"fit-content",padding:e.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:e.palette.textSubtle},arrow:{color:e.palette.textSubtle}}),{name:"BackstageBottomLink"});function Dr(e){const{link:r,title:i,onClick:c}=e,p=us();return(0,n.jsxs)("div",{children:[(0,n.jsx)(d.Z,{}),(0,n.jsx)(ye,{to:r,onClick:c,underline:"none",children:(0,n.jsxs)(Fn.Z,{display:"flex",alignItems:"center",className:p.root,children:[(0,n.jsx)(Fn.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,n.jsx)(j.Z,{children:(0,n.jsx)("strong",{children:i})})}),(0,n.jsx)(ds.Z,{className:p.arrow})]})})]})}const hs=e=>{const{slackChannel:r}=e;if(r){if(typeof r=="string")return(0,n.jsxs)(n.Fragment,{children:["Please contact ",r," for help."]});if(!r.href)return(0,n.jsxs)(n.Fragment,{children:["Please contact ",r.name," for help."]})}else return null;return(0,n.jsx)(Ve,{to:r.href,variant:"contained",children:r.name})},ps=class extends m.Component{componentDidCatch(r,i){console.error(`ErrorBoundary, error: ${r}, info: ${i}`),this.setState({error:r,errorInfo:i})}render(){const{slackChannel:r,children:i}=this.props,{error:c}=this.state;return c?(0,n.jsx)(x,{title:"Something Went Wrong",error:c,children:(0,n.jsx)(hs,{slackChannel:r})}):i}constructor(r){super(r),this.state={error:void 0,errorInfo:void 0}}},fs=(0,l.Z)(e=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:e.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:e.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),gs=(0,un.Z)(e=>({root:{display:"inline-block",padding:e.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(jr.Z),Nr={card:{flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function mr(e){const{title:r,subheader:i,divider:c=!0,deepLink:p,slackChannel:g,errorBoundaryProps:S,variant:k,children:U,headerStyle:D,headerProps:he,icon:ne,action:fe,actionsClassName:je,actions:Ze,cardClassName:lt,actionsTopRight:Nt,className:Jt,noPadding:rn,titleTypographyProps:sn}=e,St=fs();let qt={},Qt={};k&&k.split(/[\s]+/g).forEach(ur=>{qt={...qt,...Nr.card[ur]},Qt={...Qt,...Nr.cardContent[ur]}});const cr=()=>(0,n.jsxs)("div",{className:St.headerSubheader,children:[i&&(0,n.jsx)("div",{className:St.subheader,children:i}),ne]}),Kn=S||(g?{slackChannel:g}:{});return(0,n.jsx)(Yt.Z,{style:qt,className:Jt,children:(0,n.jsxs)(ps,{...Kn,children:[r&&(0,n.jsx)(qn.Z,{classes:{root:St.header,title:St.headerTitle,subheader:St.headerSubheader,avatar:St.headerAvatar,action:St.headerAction,content:St.headerContent},title:r,subheader:cr(),action:fe,style:{...D},titleTypographyProps:sn,...he}),Nt&&(0,n.jsx)(gs,{children:Nt}),c&&(0,n.jsx)(d.Z,{}),(0,n.jsx)(Zr.Z,{className:Y()(lt,{[St.noPadding]:rn}),style:Qt,children:U}),Ze&&(0,n.jsx)(jr.Z,{className:je,children:Ze}),p&&(0,n.jsx)(Dr,{...p})]})})}var Ps=t(39307);const ms=(0,l.Z)(e=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:e.palette.textContrast},description:{fontSize:"100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",position:"absolute",wordBreak:"break-all",display:"inline-block"},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),Fr={fractional:!0,inverse:!1,unit:"%",max:100},vs=({palette:e,value:r,inverse:i,max:c})=>{if(isNaN(r))return"#ddd";const p=c||Fr.max,g=i?p-r:r;return g<p/3?e.status.error:g<p*(2/3)?e.status.warning:e.status.ok};function ks(e){const[r,i]=useState(null),{getColor:c=vs}=e,p=ms(e),{palette:g}=useTheme(),{value:S,fractional:k,inverse:U,unit:D,max:he,description:ne}={...Fr,...e},fe=k?Math.round(S*he):S,je=he!==100?Math.round(S):fe,[Ze,lt]=useState(!1);return useEffect(()=>{const Nt=r,Jt=()=>lt(!0),rn=()=>lt(!1);return Nt&&ne?(Nt.addEventListener("mouseenter",Jt),Nt.addEventListener("mouseleave",rn),()=>{Nt.removeEventListener("mouseenter",Jt),Nt.removeEventListener("mouseleave",rn)}):()=>{lt(!1)}},[ne,r]),_jsxs("div",{ref:i,className:p.root,children:[_jsx(Circle,{strokeLinecap:"butt",percent:fe,strokeWidth:12,trailWidth:12,strokeColor:c({palette:g,value:je,inverse:U,max:he}),className:p.circle}),ne&&Ze?_jsx("div",{className:p.description,children:ne}):_jsx("div",{className:p.overlay,children:isNaN(S)?"N/A":`${je}${D}`})]})}const ys=(0,l.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function Os(e){const r=ys(e),{title:i,subheader:c,progress:p,inverse:g,deepLink:S,description:k,icon:U,variant:D,getColor:he}=e,ne={inverse:g,description:k,getColor:he,value:p};return _jsx("div",{className:r.root,children:_jsx(InfoCard,{title:i,subheader:c,deepLink:S,variant:D,icon:U,children:_jsx(Gauge,{...ne})})})}function vo(e){const{value:r,getColor:i=getProgressColor}=e,{palette:c}=useTheme();if(isNaN(r))return null;let p=Math.round(r*100*100)/100;p>100&&(p=100);const g=i({palette:c,value:p,inverse:!1,max:100});return _jsx(Tooltip,{title:`${p}%`,children:_jsx("span",{children:_jsx(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:g})})})}var v=t(21324),C=t(7089),R=t(1292),B=t(42494),_=t(74603),Q=t(56939),oe=t(12231),pe=t(73698),me=t(72379);const ke=(0,l.Z)(()=>(0,L.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Pe=()=>{const e=ke();return(0,n.jsx)(me.Z,{className:e.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"})})};const rt=(0,l.Z)(()=>(0,L.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var ft=()=>{const e=rt();return(0,n.jsx)(me.Z,{className:e.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"})})};const We=(0,un.Z)(e=>(0,L.Z)({root:{"label + &":{marginTop:e.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:e.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:e.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:e.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(_.Z),Pt=(0,l.Z)(e=>(0,L.Z)({formControl:{margin:`${e.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:e.typography.fontFamily,color:e.palette.text.primary,"&.Mui-focused":{color:e.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:e.typography.fontFamily,color:e.palette.text.primary,"&.Mui-focused":{color:e.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function Xt(e){const{multiple:r,items:i,label:c,placeholder:p,selected:g,onChange:S,triggerReset:k,native:U=!1,disabled:D=!1,margin:he}=e,ne=Pt(),[fe,je]=(0,m.useState)(g||(r?[]:"")),[Ze,lt]=(0,m.useState)(!1);(0,m.useEffect)(()=>{je(r?[]:"")},[k,r]),(0,m.useEffect)(()=>{g!==void 0&&je(g)},[g]);const Nt=St=>{je(St.target.value),S(St.target.value)},Jt=St=>{if(D){St.preventDefault();return}lt(qt=>r&&!(St.target instanceof HTMLElement)?!0:!qt)},rn=()=>{lt(!1)},sn=St=>()=>{const qt=fe.filter(Qt=>Qt!==St);je(qt),S(qt)};return(0,n.jsx)("div",{className:ne.root,children:(0,n.jsx)(R.Z,{onClickAway:rn,children:(0,n.jsxs)(B.Z,{className:ne.formControl,children:[(0,n.jsx)(Q.Z,{className:ne.formLabel,children:c}),(0,n.jsxs)(pe.Z,{"aria-label":c,value:fe,native:U,disabled:D,"data-testid":"select",displayEmpty:!0,multiple:r,margin:he,onChange:Nt,onClick:Jt,open:Ze,input:(0,n.jsx)(We,{}),label:c,tabIndex:0,renderValue:St=>{var qt;return r&&fe.length!==0?(0,n.jsx)("div",{className:ne.chips,children:St.map(Qt=>{var cr,Kn;return(0,n.jsx)(C.Z,{label:(cr=i.find(dr=>dr.value===Qt))===null||cr===void 0?void 0:cr.label,clickable:!0,onDelete:sn(Qt),className:ne.chip},(Kn=i.find(dr=>dr.value===Qt))===null||Kn===void 0?void 0:Kn.value)})}):(0,n.jsx)(j.Z,{children:fe.length===0?p||"":(qt=i.find(Qt=>Qt.value===St))===null||qt===void 0?void 0:qt.label})},IconComponent:()=>Ze?(0,n.jsx)(ft,{}):(0,n.jsx)(Pe,{}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null},children:[p&&!r&&(0,n.jsx)(oe.Z,{value:[],children:p}),U?i&&i.map(St=>(0,n.jsx)("option",{value:St.value,children:St.label},St.value)):i&&i.map(St=>(0,n.jsxs)(oe.Z,{value:St.value,children:[r&&(0,n.jsx)(v.Z,{color:"primary",checked:fe.includes(St.value)||!1,className:ne.checkbox}),St.label]},St.value))]})]})})})}const Dn=()=>{},Ln=m.createContext({stepperLength:0,stepIndex:0,setStepIndex:Dn,stepHistory:[],setStepHistory:Dn,onStepChange:Dn});function _n(e){const{children:r,elevated:i,onStepChange:c,activeStep:p=0}=e,[g,S]=useState(p),[k,U]=useState([0]);useEffect(()=>{S(p)},[p]);const D=[];let he;return Children.forEach(r,ne=>{isValidElement(ne)&&(ne.props.end?he=ne:D.push(ne))}),_jsxs(_Fragment,{children:[_jsx(Ln.Provider,{value:{stepIndex:g,setStepIndex:S,stepHistory:k,setStepHistory:U,onStepChange:c,stepperLength:Children.count(r)},children:_jsx(MuiStepper,{activeStep:g,orientation:"vertical",elevation:i?2:0,children:D})}),g>=Children.count(r)-1&&he]})}const gn=(0,l.Z)(e=>({root:{marginTop:e.spacing(3),"& button":{marginRight:e.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),vn=({text:e,handleClick:r})=>_jsx(Button,{onClick:r,children:e||"Reset"}),jn=({text:e,handleClick:r,disabled:i,last:c,stepIndex:p})=>_jsx(Button,{variant:"contained",color:"primary",disabled:i,"data-testid":`nextButton-${p}`,onClick:r,children:e||(c?"Finish":"Next")}),er=({text:e,handleClick:r,disabled:i,stepIndex:c})=>_jsx(Button,{onClick:r,"data-testid":`backButton-${c}`,disabled:i,children:e||"Back"}),vr=({actions:e={},children:r})=>{const i=gn(),{stepperLength:c,stepIndex:p,setStepIndex:g,stepHistory:S,setStepHistory:k,onStepChange:U}=useContext(VerticalStepperContext),D=(je,Ze)=>{Ze&&Ze(),U&&U(p,je),g(je)},he=()=>{const je=e.nextStep?e.nextStep(p,c-1):p+1;D(je,e.onNext),k([...S,je])},ne=()=>{S.pop(),D(S[S.length-1],e.onBack),k([...S])},fe=()=>{D(0,e.onRestart),k([0])};return _jsxs("div",{className:i.root,children:[[void 0,!0].includes(e.showBack)&&p!==0&&_jsx(er,{text:e.backText,handleClick:ne,disabled:p===0,stepIndex:p}),[void 0,!0].includes(e.showNext)&&_jsx(jn,{text:e.nextText,handleClick:he,disabled:!!c&&p>=c||!!e.canNext&&!e.canNext(),stepIndex:p}),e.showRestart&&p!==0&&_jsx(vn,{text:e.restartText,handleClick:fe,stepIndex:p}),r]})},Er=(0,l.Z)(e=>({end:{padding:e.spacing(3)}}),{name:"SimpleStepperStep"});function yn(e){const{title:r,children:i,end:c,actions:p,...g}=e,S=Er();return c?_jsxs("div",{className:S.end,children:[_jsx(Typography,{variant:"h6",children:r}),i,_jsx(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})]}):_jsxs(MuiStep,{...g,children:[_jsx(StepLabel,{children:_jsx(Typography,{variant:"h6",children:r})}),_jsxs(StepContent,{children:[i,_jsx(SimpleStepperFooter,{actions:p})]})]})}const pn=(0,l.Z)(e=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:e.palette.status.ok}},warning:{"&::before":{backgroundColor:e.palette.status.warning}},error:{"&::before":{backgroundColor:e.palette.status.error}},pending:{"&::before":{backgroundColor:e.palette.status.pending}},running:{"&::before":{backgroundColor:e.palette.status.running}},aborted:{"&::before":{backgroundColor:e.palette.status.aborted}}}),{name:"BackstageStatus"});function Ar(e){const r=pn(e);return _jsx("span",{className:classNames(r.status,r.ok),"aria-label":"Status ok","aria-hidden":"true",...e})}function Tr(e){const r=pn(e);return _jsx("span",{className:classNames(r.status,r.warning),"aria-label":"Status warning","aria-hidden":"true",...e})}function Fi(e){const r=pn(e);return _jsx("span",{className:classNames(r.status,r.error),"aria-label":"Status error","aria-hidden":"true",...e})}function Xo(e){const r=pn(e);return _jsx("span",{className:classNames(r.status,r.pending),"aria-label":"Status pending","aria-hidden":"true",...e})}function Ui(e){const r=pn(e);return _jsx("span",{className:classNames(r.status,r.running),"aria-label":"Status running","aria-hidden":"true",...e})}function Mi(e){const r=pn(e);return _jsx("span",{className:classNames(r.status,r.aborted),"aria-label":"Status aborted","aria-hidden":"true",...e})}var xn=t(74600),Ur=t(15584);const yo=e=>(0,L.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:e.spacing(4),border:"0",verticalAlign:"top"}}),xs={root:{border:"0",verticalAlign:"top"}},bs=e=>(0,L.Z)({root:{listStyle:"none",margin:e.spacing(0,0,-1,0),padding:"0"}}),Ss=e=>(0,L.Z)({root:{padding:e.spacing(0,0,1,0)},random:{}}),xo=(0,un.Z)(yo,{name:"BackstageMetadataTableTitleCell"})(Ur.Z),$s=(0,un.Z)(xs,{name:"BackstageMetadataTableCell"})(Ur.Z),qo=({dense:e,children:r})=>_jsx(Table,{size:e?"small":"medium",children:_jsx(TableBody,{children:r})}),_o=({title:e,children:r,...i})=>_jsxs(TableRow,{children:[e&&_jsx(xo,{children:e}),_jsx($s,{colSpan:e?1:2,...i,children:r})]}),Bs=(0,un.Z)(bs,{name:"BackstageMetadataTableList"})(({classes:e,children:r})=>(0,n.jsx)("ul",{className:e.root,children:r})),ei=(0,un.Z)(Ss,{name:"BackstageMetadataTableListItem"})(({classes:e,children:r})=>(0,n.jsx)("li",{className:e.root,children:r})),tr=(0,L.Z)({root:{margin:"0 0",listStyleType:"none"}}),ws=e=>(0,L.Z)({root:{...tr.root,paddingLeft:e.spacing(1)}}),Zs=(0,un.Z)(tr,{name:"BackstageStructuredMetadataTableList"})(({classes:e,children:r})=>(0,n.jsx)(Bs,{classes:e,children:r})),Ds=(0,un.Z)(ws,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:e,children:r})=>(0,n.jsx)(Bs,{classes:e,children:r}));function Ns(e,r){const i=e.map((c,p)=>_jsx(MetadataListItem,{children:Cs(c)},p));return r?_jsx(Ds,{children:i}):_jsx(Zs,{children:i})}function bo(e,r,i){const c=Object.keys(e).map(p=>{const g=Cs(e[p],!0),S=i&&i.titleFormat?i.titleFormat(p):startCase(p);return _jsxs(MetadataListItem,{children:[`${S}: `,g]},p)});return r?_jsx(Ds,{children:c}):_jsx(Zs,{children:c})}function Cs(e,r,i){return React.isValidElement(e)?_jsx(Fragment,{children:e}):typeof e=="object"&&!Array.isArray(e)?bo(e,r,i):Array.isArray(e)?Ns(e,i):typeof e=="boolean"?_jsx(Fragment,{children:e?"\u2705":"\u274C"}):_jsx(Fragment,{children:e})}const So=({value:e,options:r})=>_jsx(Fragment,{children:Cs(e,r)}),wo=({title:e,value:r,options:i})=>_jsx(MetadataTableItem,{title:i&&i.titleFormat?i.titleFormat(e):startCase(e),children:_jsx(So,{value:r,options:i})});function ti(e,r){return Object.keys(e).map(i=>_jsx(wo,{title:i,value:e[i],options:r},i))}function ni(e){const{metadata:r,dense:i=!0,options:c}=e,p=ti(r,c||{});return _jsx(MetadataTable,{dense:i,children:p})}var Co=t(49429),jo=t(86136),Fs=t(79784),Us=t(19126),Mr=t.n(Us);function Eo(e){return qs.stringify(e,{strictNullHandling:!0})}function Ms(e){return qs.parse(e,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function zs(e,r){return Ms(e)[r]}function Ao(e,r,i){const c={...Ms(e),[r]:i};return Eo(c)}function zi(e,r=250){const[i,c]=useSearchParams(),p=i.toString(),[g,S]=useState(zs(p,e));return useEffect(()=>{const k=zs(p,e);S(U=>isEqual(k,U)?U:k)},[p,S,e]),useDebouncedEffect(()=>{const k=Ao(p,e,g);p!==k&&c(k,{replace:!0})},[c,g,p,e],r),[g,S]}const ri={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]};function Ir(){const r=(0,O.I_)().get(O.Ds),i=r==null?void 0:r.getOptionalConfig("app.support");if(!i)return ri;var c;return{url:i.getString("url"),items:i.getConfigArray("items").flatMap(p=>({title:p.getString("title"),icon:p.getOptionalString("icon"),links:((c=p.getOptionalConfigArray("links"))!==null&&c!==void 0?c:[]).flatMap(g=>({url:g.getString("url"),title:g.getString("title")}))}))}}var si=t(80079);function Un(e,r){const c=(0,O.qD)().getSystemIcon(e);return c?(0,n.jsx)(c,{...r}):(0,n.jsx)(si.Z,{...r})}function oi(e){return Un("brokenImage",e)}function ii(e){return Un("catalog",e)}function To(e){return Un("chat",e)}function Vi(e){return Un("dashboard",e)}function Hi(e){return Un("docs",e)}function Io(e){return Un("email",e)}function Ro(e){return Un("github",e)}function ai(e){return Un("group",e)}function zr(e){return Un("help",e)}function Wi(e){return Un("user",e)}function Gi(e){return Un("warning",e)}const li=(0,l.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Pn=({icon:e})=>{const r=(0,O.qD)();var i;const c=e&&(i=r.getSystemIcon(e))!==null&&i!==void 0?i:zr;return(0,n.jsx)(c,{})};var Vs;const Lo=({link:e})=>(0,n.jsx)(ye,{to:e.url,children:(Vs=e.title)!==null&&Vs!==void 0?Vs:e.url}),ci=({item:e})=>{var r;return(0,n.jsxs)(J.Z,{children:[(0,n.jsx)(jo.Z,{children:(0,n.jsx)(Pn,{icon:e.icon})}),(0,n.jsx)(be.Z,{primary:e.title,secondary:(r=e.links)===null||r===void 0?void 0:r.reduce((i,c,p)=>[...i,p>0&&(0,n.jsx)("br",{},p),(0,n.jsx)(Lo,{link:c},c.url)],[])})]})};function di(e){const{title:r,children:i}=e,{items:c}=Ir(),[p,g]=(0,m.useState)(!1),[S,k]=(0,m.useState)(null),U=li(),D=(0,ht.Z)(fe=>fe.breakpoints.down("sm")),he=fe=>{k(fe.currentTarget),g(!0)},ne=()=>{g(!1)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Fn.Z,{display:"flex",ml:1,children:D?(0,n.jsx)(Ye.Z,{color:"primary",size:"small",onClick:he,"data-testid":"support-button",children:(0,n.jsx)(zr,{})}):(0,n.jsx)(K.Z,{"data-testid":"support-button","aria-label":"support",color:"primary",onClick:he,startIcon:(0,n.jsx)(zr,{}),children:"Support"})}),(0,n.jsxs)(Fs.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:S,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ne,children:[(0,n.jsxs)(E.Z,{className:U.popoverList,children:[r&&(0,n.jsx)(J.Z,{alignItems:"flex-start",children:(0,n.jsx)(j.Z,{variant:"subtitle1",children:r})}),m.Children.map(i,(fe,je)=>(0,n.jsx)(J.Z,{alignItems:"flex-start",children:fe},`child-${je}`)),c&&c.map((fe,je)=>(0,n.jsx)(ci,{item:fe},`item-${je}`))]}),(0,n.jsx)(Co.Z,{children:(0,n.jsx)(K.Z,{color:"primary",onClick:ne,children:"Close"})})]})]})}var Hs=t(18671),Nn=t(10289);const js=72,Po=24,ko=18,nr={drawerWidthClosed:js,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:js,iconSize:js-Po*2,iconPadding:Po,selectedIndicatorWidth:3,userBadgePadding:ko,userBadgeDiameter:js-ko*2,mobileSidebarHeight:56},ui=e=>({...nr,...e,iconContainerWidth:nr.drawerWidthClosed,iconSize:nr.drawerWidthClosed-nr.iconPadding*2,userBadgeDiameter:nr.drawerWidthClosed-nr.userBadgePadding*2}),Oo={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:nr.defaultOpenDelayMs+200},Ws=e=>({...Oo,...e}),hi="@backstage/core/sidebar-intro-dismissed",Mn=(0,m.createContext)({sidebarConfig:nr,submenuConfig:Oo}),Gs=(0,m.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Vr;(function(e){e.SIDEBAR_PIN_STATE="sidebarPinState"})(Vr||(Vr={}));const Ks={getSidebarPinState(){let e;try{e=JSON.parse(window.localStorage.getItem(Vr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!e},setSidebarPinState(e){return window.localStorage.setItem(Vr.SIDEBAR_PIN_STATE,JSON.stringify(e))}};var Hr=t(51837);const Ys={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},Js=(0,m.createContext)(Ys),Qs=(0,Hr.CT)("sidebar-pin-state-context");function $o(e){const{children:r,value:i}=e;return(0,n.jsx)(Js.Provider,{value:i,children:(0,n.jsx)(Qs.Provider,{value:(0,Hr.EI)({1:i}),children:r})})}const Wr=()=>{const e=(0,m.useContext)(Qs),r=(0,m.useContext)(Js);if(e===void 0)return r||Ys;const i=e.atVersion(1);if(i===void 0)throw new Error("No context found for version 1.");return i},Bo=(0,l.Z)(e=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[e.breakpoints.up("sm")]:{paddingLeft:r=>r.isPinned?r.sidebarConfig.drawerWidthOpen:r.sidebarConfig.drawerWidthClosed},[e.breakpoints.down("xs")]:{paddingBottom:r=>r.sidebarConfig.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),Xs=(0,m.createContext)({content:{contentRef:void 0}});function pi(e){const[r,i]=(0,m.useState)(()=>Ks.getSidebarPinState()),{sidebarConfig:c}=(0,m.useContext)(Mn),p=(0,m.useRef)(null),g=(0,m.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,m.useEffect)(()=>{Ks.setSidebarPinState(r)},[r]);const S=(0,ht.Z)(D=>D.breakpoints.down("xs"),{noSsr:!0}),k=()=>i(!r),U=Bo({isPinned:r,sidebarConfig:c});return(0,n.jsx)($o,{value:{isPinned:r,toggleSidebarPinState:k,isMobile:S},children:(0,n.jsx)(Xs.Provider,{value:g,children:(0,n.jsx)("div",{className:U.root,children:e.children})})})}function _s(){const{content:e}=(0,m.useContext)(Xs);return{focusContent:(0,m.useCallback)(()=>{var i,c;e==null||(i=e.contentRef)===null||i===void 0||(c=i.current)===null||c===void 0||c.focus()},[e]),contentRef:e==null?void 0:e.contentRef}}const eo={isOpen:!1,setOpen:()=>{}},to=(0,m.createContext)(eo),no=(0,Hr.CT)("sidebar-open-state-context");function ro(e){const{children:r,value:i}=e;return(0,n.jsx)(to.Provider,{value:i,children:(0,n.jsx)(no.Provider,{value:(0,Hr.EI)({1:i}),children:r})})}const Es=()=>{const e=(0,m.useContext)(no),r=(0,m.useContext)(to);if(e===void 0)return r||eo;const i=e.atVersion(1);if(i===void 0)throw new Error("No context found for version 1.");return i};var Zo=t(50023),Do=t(4190),zn=t(87685),No=t(44882),Fo=t(57998);const Uo=(0,l.Z)(e=>({root:{flexGrow:0,margin:e.spacing(0,2),color:e.palette.navigation.color},selected:r=>({color:`${e.palette.navigation.selectedColor}!important`,borderTop:`solid ${r.sidebarConfig.selectedIndicatorWidth}px ${e.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),so=e=>{const{to:r,label:i,icon:c,value:p}=e,{sidebarConfig:g}=(0,m.useContext)(Mn),S=Uo({sidebarConfig:g}),k=(0,Nn.TH)(),{selectedMenuItemIndex:U,setSelectedMenuItemIndex:D}=(0,m.useContext)(ao),he=(fe,je)=>{D(je===U?-1:je)},ne=p===U&&U>=0||p!==U&&!(U>=0)&&r===k.pathname;return(0,n.jsx)(Fo.Z,{label:i,icon:c,component:ye,to:r||k.pathname,onChange:he,value:p,selected:ne,classes:S})},oo=e=>{const{children:r,to:i,label:c,icon:p,value:g}=e,{isMobile:S}=Wr();return S?(0,n.jsx)(so,{to:i,label:c,icon:p,value:g}):(0,n.jsx)(n.Fragment,{children:r})},io=(0,l.Z)(e=>({root:{position:"fixed",backgroundColor:e.palette.navigation.background,color:e.palette.navigation.color,bottom:0,left:0,right:0,zIndex:e.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:r=>({background:e.palette.navigation.background,width:"100%",bottom:`${r.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${r.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:e.palette.text.primary,alignItems:"center",justifyContent:"space-between",padding:e.spacing(2,3)},overlayHeaderClose:{color:e.palette.text.primary},marginMobileSidebar:r=>({marginBottom:`${r.sidebarConfig.mobileSidebarHeight}px`})})),Mo=e=>(0,le.orderBy)(e,({props:{priority:r}})=>Number.isInteger(r)?r:-1,"desc"),zo=m.createElement(oo).type,fi=({children:e,label:r="Menu",open:i,onClose:c})=>{const{sidebarConfig:p}=(0,m.useContext)(Mn),g=io({sidebarConfig:p});return(0,n.jsxs)(Do.ZP,{anchor:"bottom",open:i,onClose:c,ModalProps:{BackdropProps:{classes:{root:g.marginMobileSidebar}}},classes:{root:g.marginMobileSidebar,paperAnchorBottom:g.overlay},children:[(0,n.jsxs)(Fn.Z,{className:g.overlayHeader,children:[(0,n.jsx)(j.Z,{variant:"h3",children:r}),(0,n.jsx)(Ye.Z,{onClick:c,classes:{root:g.overlayHeaderClose},children:(0,n.jsx)(zn.Z,{})})]}),(0,n.jsx)(Fn.Z,{component:"nav",children:e})]})},ao=(0,m.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),a=e=>{const{sidebarConfig:r}=(0,m.useContext)(Mn),{children:i}=e,c=io({sidebarConfig:r}),p=(0,Nn.TH)(),[g,S]=(0,m.useState)(-1);(0,m.useEffect)(()=>{S(-1)},[p.pathname]);let k=(0,O.vJ)(i,D=>D.getElements().filter(he=>he.type===zo));if(i)k.length?k=Mo(k):k.push((0,n.jsx)(oo,{icon:(0,n.jsx)(No.Z,{}),children:i},"default_menu"));else return null;const U=g>=0&&!k[g].props.to;return(0,n.jsx)(ro,{value:{isOpen:!0,setOpen:()=>{}},children:(0,n.jsxs)(ao.Provider,{value:{selectedMenuItemIndex:g,setSelectedMenuItemIndex:S},children:[(0,n.jsx)(fi,{label:k[g]&&k[g].props.label,open:U,onClose:()=>S(-1),children:k[g]&&k[g].props.children}),(0,n.jsx)(Zo.Z,{className:c.root,"data-testid":"mobile-sidebar-root",component:"nav",children:k})]})})},s=(0,l.Z)(e=>({drawer:r=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:e.zIndex.appBar,background:e.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:r.sidebarConfig.drawerWidthClosed,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:r=>({width:r.sidebarConfig.drawerWidthOpen,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var o;(function(e){e[e.Closed=0]="Closed",e[e.Idle=1]="Idle",e[e.Open=2]="Open"})(o||(o={}));const u=e=>{const{sidebarConfig:r}=(0,m.useContext)(Mn),{openDelayMs:i=r.defaultOpenDelayMs,closeDelayMs:c=r.defaultCloseDelayMs,disableExpandOnHover:p,children:g}=e,S=s({sidebarConfig:r}),k=(0,ht.Z)(Jt=>Jt.breakpoints.down("md"),{noSsr:!0}),[U,D]=(0,m.useState)(o.Closed),he=(0,m.useRef)(),{isPinned:ne,toggleSidebarPinState:fe}=Wr(),je=()=>{ne||p||(he.current&&(clearTimeout(he.current),he.current=void 0),U!==o.Open&&!k&&(he.current=window.setTimeout(()=>{he.current=void 0,D(o.Open)},i),D(o.Idle)))},Ze=()=>{ne||p||(he.current&&(clearTimeout(he.current),he.current=void 0),U===o.Idle?D(o.Closed):U===o.Open&&(he.current=window.setTimeout(()=>{he.current=void 0,D(o.Closed)},c)))},lt=U===o.Open&&!k||ne,Nt=Jt=>{Jt?(D(o.Open),fe()):(D(o.Closed),fe())};return(0,n.jsxs)("nav",{style:{},"aria-label":"sidebar nav",children:[(0,n.jsx)(T,{}),(0,n.jsx)(ro,{value:{isOpen:lt,setOpen:Nt},children:(0,n.jsx)("div",{className:S.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:je,onFocus:p?()=>{}:je,onMouseLeave:p?()=>{}:Ze,onBlur:p?()=>{}:Ze,children:(0,n.jsx)("div",{className:Y()(S.drawer,{[S.drawerOpen]:lt}),children:g})})})]})},f=e=>{var r;const i=ui((r=e.sidebarOptions)!==null&&r!==void 0?r:{});var c;const p=Ws((c=e.submenuOptions)!==null&&c!==void 0?c:{}),{children:g,disableExpandOnHover:S,openDelayMs:k,closeDelayMs:U}=e,{isMobile:D}=Wr();return D?(0,n.jsx)(a,{children:g}):(0,n.jsx)(Mn.Provider,{value:{sidebarConfig:i,submenuConfig:p},children:(0,n.jsx)(u,{openDelayMs:k,closeDelayMs:U,disableExpandOnHover:S,children:g})})};function T(){const{sidebarConfig:e}=(0,m.useContext)(Mn),{focusContent:r,contentRef:i}=_s(),c=s({sidebarConfig:e});return i!=null&&i.current?(0,n.jsx)(K.Z,{onClick:r,variant:"contained",className:Y()(c.visuallyHidden),children:"Skip to content"}):null}function N(e,r){const i=new URLSearchParams(r.search).toString(),c=Mr().parse(i),p=new URLSearchParams(e.search).toString(),g=Mr().parse(p);return(0,le.isEqual)(r.pathname,e.pathname)&&(0,le.isMatch)(g,c)}const W=(0,l.Z)(e=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:e.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:e.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis",lineHeight:1},subtitle:{fontSize:10,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0","&:hover":{background:"#6f6f6f",color:e.palette.navigation.selectedColor}},textContent:{color:e.palette.navigation.color,paddingLeft:e.spacing(4),paddingRight:e.spacing(1),fontSize:"14px",whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"}}),{name:"BackstageSidebarSubmenuItem"}),ue=e=>{const{title:r,subtitle:i,to:c,icon:p,dropdownItems:g}=e,S=W(),{setIsHoveredOn:k}=useContext(SidebarItemWithSubmenuContext),U=()=>{k(!1)},D=useResolvedPath(c!=null?c:""),he=useLocation();let ne=isLocationMatch(he,D);const[fe,je]=useState(!1),Ze=()=>{je(!fe)};return g!==void 0?(g.some(lt=>{const Nt=resolvePath(lt.to);return ne=isLocationMatch(he,Nt),ne}),_jsxs("div",{className:S.itemContainer,children:[_jsx(Tooltip,{title:r,enterDelay:500,enterNextDelay:500,children:_jsxs("button",{onClick:Ze,onTouchStart:lt=>lt.stopPropagation(),className:classnames(S.item,ne?S.selected:void 0),children:[p&&_jsx(p,{fontSize:"small"}),_jsxs(Typography,{variant:"subtitle1",className:S.label,children:[r,_jsx("br",{}),i&&_jsx(Typography,{variant:"caption",className:S.subtitle,children:i})]}),fe?_jsx(ArrowDropUpIcon,{className:S.dropdownArrow}):_jsx(ArrowDropDownIcon,{className:S.dropdownArrow})]})}),g&&fe&&_jsx("div",{className:S.dropdown,children:g.map((lt,Nt)=>_jsx(Tooltip,{title:lt.title,enterDelay:500,enterNextDelay:500,children:_jsx(Link,{to:lt.to,underline:"none",className:S.dropdownItem,onClick:U,onTouchStart:Jt=>Jt.stopPropagation(),children:_jsx(Typography,{className:S.textContent,children:lt.title})})},Nt))})]})):_jsx("div",{className:S.itemContainer,children:_jsx(Tooltip,{title:r,enterDelay:500,enterNextDelay:500,children:_jsxs(Link,{to:c,underline:"none",className:classnames(S.item,ne?S.selected:void 0),onClick:U,onTouchStart:lt=>lt.stopPropagation(),children:[p&&_jsx(p,{fontSize:"small"}),_jsxs(Typography,{variant:"subtitle1",className:S.label,children:[r,_jsx("br",{}),i&&_jsx(Typography,{variant:"caption",className:S.subtitle,children:i})]})]})})})};var Me;const ze=(0,l.Z)(e=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:e.spacing(7)+1},drawer:r=>{var i;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[e.breakpoints.up("sm")]:{marginLeft:r.left,transition:e.transitions.create("margin-left",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(Me=(i=e.palette.navigation.submenu)===null||i===void 0?void 0:i.background)!==null&&Me!==void 0?Me:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:r.submenuConfig.drawerWidthClosed,transitionDelay:`${r.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:r=>({width:r.submenuConfig.drawerWidthOpen,[e.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:e.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[e.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),bt=e=>{const{isOpen:r}=Es(),{sidebarConfig:i,submenuConfig:c}=(0,m.useContext)(Mn),p=r?i.drawerWidthOpen:i.drawerWidthClosed,g=ze({left:p,submenuConfig:c}),{isHoveredOn:S}=(0,m.useContext)(Gs),[k,U]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{U(S)},[S]),(0,n.jsxs)("div",{className:Y()(g.drawer,{[g.drawerOpen]:k}),children:[(0,n.jsx)(j.Z,{variant:"h5",className:g.title,children:e.title}),e.children]})};var it=t(76600),It=t(26739),nn=t(98989),Vn=t(59797),En=t(83543);const lo=(0,l.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),lr=()=>{const e=lo();return _jsxs("div",{className:e.iconContainer,children:[_jsx("div",{className:e.arrow1,children:_jsx(ArrowBackIosIcon,{style:{fontSize:"12px"}})}),_jsx("div",{children:_jsx(ArrowBackIosIcon,{style:{fontSize:"12px"}})})]})};var Rr=null;const Gr=(0,l.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),gi=()=>{const e=Gr();return _jsxs("div",{className:e.iconContainer,children:[_jsx("div",{className:e.arrow1,children:_jsx(ArrowForwardIosIcon,{style:{fontSize:"12px"}})}),_jsx("div",{children:_jsx(ArrowForwardIosIcon,{style:{fontSize:"12px"}})})]})};var mi=null,Lr,As;const yr=e=>(0,l.Z)(r=>{var i,c;return{root:{color:r.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"},closed:{width:e.drawerWidthClosed,justifyContent:"center"},open:{[r.breakpoints.up("sm")]:{width:e.drawerWidthOpen}},highlightable:{"&:hover":{background:(Lr=(i=r.palette.navigation.navItem)===null||i===void 0?void 0:i.hoverBackground)!==null&&Lr!==void 0?Lr:"#404040"}},highlighted:{background:(As=(c=r.palette.navigation.navItem)===null||c===void 0?void 0:c.hoverBackground)!==null&&As!==void 0?As:"#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:e.iconContainerWidth,marginRight:-r.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:r.typography.fontSize},searchFieldHTMLInput:{padding:r.spacing(2,0,2)},searchContainer:{width:e.drawerWidthOpen-e.iconContainerWidth},secondaryAction:{width:r.spacing(6),textAlign:"center",marginRight:r.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:r.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${e.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,color:r.palette.navigation.selectedColor},"&$closed":{width:e.drawerWidthClosed},"& $closedItemIcon":{paddingRight:e.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-e.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function co(e){return(0,m.useMemo)(()=>yr(e),[e])()}const Ki=(e,r)=>(0,O.vJ)(e.props.children,i=>{let c=!1;return i.getElements().forEach(({props:{to:p,dropdownItems:g}})=>{if(!c){if(g!=null&&g.length){g.forEach(({to:S})=>c=c||N(r,(0,Nn.i3)(S)));return}p&&(c=N(r,(0,Nn.i3)(p)))}}),c},[r.pathname]);function vi(e){return e.to===void 0}const Yi=m.createElement(bt).type,Ji=m.forwardRef(function({to:r,end:i,style:c,className:p,activeStyle:g,caseSensitive:S,activeClassName:k="active","aria-current":U="page",...D},he){let{pathname:ne}=(0,Nn.TH)(),{pathname:fe}=(0,Nn.WU)(r);S||(ne=ne.toLocaleLowerCase("en-US"),fe=fe.toLocaleLowerCase("en-US"));let je=ne===fe;!je&&!i&&(je=ne.startsWith(`${fe}/`));const Ze=je?U:void 0;return(0,n.jsx)(ie.rU,{...D,to:r,ref:he,"aria-current":Ze,style:{...c,...je?g:void 0},className:Y()([p,je?k:void 0])})}),yi=(0,m.forwardRef)((e,r)=>{const{icon:i,text:c,hasNotifications:p=!1,hasSubmenu:g=!1,disableHighlight:S=!1,onClick:k,children:U,className:D,...he}=e,{sidebarConfig:ne}=(0,m.useContext)(Mn),fe=co(ne),{isOpen:je}=Es(),Ze=!je&&g?{display:"flex",marginLeft:"24px"}:{},lt=(0,n.jsxs)("div",{style:Ze,children:[(0,n.jsx)(i,{fontSize:"small"}),!je&&g?(0,n.jsx)(nn.Z,{}):(0,n.jsx)(n.Fragment,{})]}),Nt=(0,n.jsx)(It.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:Y()({[fe.closedItemIcon]:!je}),children:lt}),Jt=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"data-testid":"login-button",className:fe.iconContainer,children:Nt}),c&&(0,n.jsx)(j.Z,{variant:"subtitle2",className:fe.label,children:c}),(0,n.jsx)("div",{className:fe.secondaryAction,children:U})]}),rn=je?Jt:Nt,sn={onClick:k,className:Y()(D,fe.root,je?fe.open:fe.closed,vi(e)&&fe.buttonItem,{[fe.highlightable]:!S})};return vi(e)?(0,n.jsx)("button",{"aria-label":c,...sn,ref:r,children:rn}):(0,n.jsx)(Ji,{...sn,activeClassName:fe.selected,to:e.to?e.to:"",ref:r,"aria-label":c||e.to,...he,children:rn})}),Qi=({children:e,...r})=>{const{sidebarConfig:i}=(0,m.useContext)(Mn),c=co(i),[p,g]=(0,m.useState)(!1),S=(0,Nn.TH)(),k=Ki(e,S),U=(0,ht.Z)(fe=>fe.breakpoints.down("sm")),D=()=>{g(!0)},he=()=>{g(!1)},ne=()=>U?p?(0,n.jsx)(Vn.Z,{fontSize:"small",className:c.submenuArrow}):(0,n.jsx)(En.Z,{fontSize:"small",className:c.submenuArrow}):!p&&(0,n.jsx)(nn.Z,{fontSize:"small",className:c.submenuArrow});return(0,n.jsx)(Gs.Provider,{value:{isHoveredOn:p,setIsHoveredOn:g},children:(0,n.jsxs)("div",{"data-testid":"item-with-submenu",onMouseLeave:he,onTouchStart:p?he:D,onMouseEnter:D,className:Y()(p&&c.highlighted),children:[(0,n.jsx)(yi,{hasSubmenu:!0,className:k?c.selected:"",...r,children:ne()}),p&&e]})})},xi=(0,m.forwardRef)((e,r)=>{const[i]=(0,O.vJ)(e.children,c=>c.getElements().filter(p=>p.type===Yi));return i?(0,n.jsx)(Qi,{...e,children:i}):(0,n.jsx)(yi,{...e,ref:r})});function Rl(e){const{sidebarConfig:r}=useContext(SidebarConfigContext),[i,c]=useState(""),p=co(r),g=e.icon?e.icon:SearchIcon,S=()=>{e.onSearch(i),c("")},k=ne=>{ne.key==="Enter"&&(ne.preventDefault(),S())},U=ne=>{c(ne.target.value)},D=ne=>{ne.preventDefault(),ne.stopPropagation()},he=ne=>{S(),ne.preventDefault()};return _jsx("div",{className:p.searchRoot,children:_jsx(xi,{icon:g,to:e.to,onClick:he,disableHighlight:!0,children:_jsx(TextField,{placeholder:"Search",value:i,onClick:D,onChange:U,onKeyDown:k,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})})})}const Ll=(0,it.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),Pl=(0,it.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),Xi=(0,it.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),qi=e=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:e.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:e.palette.text.hint,borderRadius:"5px"}}),kl=(0,it.Z)("div")(({theme:e})=>{const r=qi(e);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":r,"&:hover":r}}),Ol=()=>{const{sidebarConfig:e}=useContext(SidebarConfigContext),r=co(e),{isOpen:i,setOpen:c}=useSidebarOpenState();if(useMediaQuery(S=>S.breakpoints.down("md"),{noSsr:!0}))return null;const g=()=>{c(!i)};return _jsx("button",{onClick:g,className:r.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button",children:_jsx("div",{className:r.arrows,children:i?_jsx(DoubleArrowLeft,{}):_jsx(DoubleArrowRight,{})})})},_i=(0,l.Z)(e=>({introCard:r=>({color:"#b5b5b5",fontSize:12,width:r.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:r.sidebarConfig.iconPadding,paddingRight:r.sidebarConfig.iconPadding}),introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:e.palette.linkHover,transition:e.transitions.create("color",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function ea(e){const{sidebarConfig:r}=useContext(SidebarConfigContext),i=_i({sidebarConfig:r}),{text:c,onClose:p}=e,g=()=>p();return _jsxs("div",{className:i.introCard,children:[_jsx(Typography,{variant:"subtitle2",children:c}),_jsx("div",{className:i.introDismiss,children:_jsxs(Link,{component:"button",onClick:g,underline:"none",className:i.introDismissLink,children:[_jsx(CloseIcon,{className:i.introDismissIcon}),_jsx(Typography,{component:"span",className:i.introDismissText,children:"Dismiss"})]})})]})}const bi=e=>{const{text:r,onDismiss:i}=e,[c,p]=useState(!1),g=()=>{p(!0)};return _jsx(Collapse,{in:!c,onExited:i,children:_jsx(ea,{text:r,onClose:g})})},ta=null,na="And your recently viewed plugins will pop up here!";function $l(e){const{isOpen:r}=useSidebarOpenState(),i={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[c,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:g,recentlyViewedItemsDismissed:S}=c!=null?c:{},k=()=>{p(D=>({...i,...D,starredItemsDismissed:!0}))},U=()=>{p(D=>({...i,...D,recentlyViewedItemsDismissed:!0}))};return r?_jsxs(_Fragment,{children:[!g&&_jsxs(_Fragment,{children:[_jsx(bi,{text:ta,onDismiss:k}),_jsx(SidebarDivider,{})]}),!S&&_jsx(bi,{text:na,onDismiss:U})]}):null}const ra=(0,l.Z)(e=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:e.spacing(3),paddingBottom:e.spacing(3),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function Si(e){const{className:r,stretch:i,noPadding:c,children:p,...g}=e,{contentRef:S}=_s(),k=ra();return(0,n.jsx)("article",{ref:S,tabIndex:-1,...g,className:Y()(k.root,r,{[k.stretch]:i,[k.noPadding]:c}),children:p})}var sa=t(6487),oa=t(99152);const ia=(0,l.Z)(e=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:e.palette.background.paper,paddingLeft:e.spacing(3),minWidth:0},defaultTab:{padding:e.spacing(3,3),...e.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:e.palette.text.secondary},selected:{color:e.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:e.palette.background.default,color:e.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function wi(e){const{tabs:r,onChange:i,selectedIndex:c}=e,[p,g]=(0,m.useState)(c!=null?c:0),S=ia(),k=(0,m.useCallback)((U,D)=>{c===void 0&&g(D),i&&c!==D&&i(D)},[c,i]);return(0,m.useEffect)(()=>{c!==void 0&&g(c)},[c]),(0,n.jsx)("div",{className:S.tabsWrapper,children:(0,n.jsx)(oa.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:k,value:p,children:r.map((U,D)=>(0,m.createElement)(sa.Z,{...U.tabProps,"data-testid":`header-tab-${D}`,label:U.label,key:U.id,value:D,className:S.defaultTab,classes:{selected:S.selected,root:S.tabRoot}}))})})}function aa(e){const r=(0,Nn.UO)(),c=e.map(({path:he,children:ne})=>({caseSensitive:!1,path:`${he}/*`,element:ne})).sort((he,ne)=>ne.path.replace(/\/\*$/,"").localeCompare(he.path.replace(/\/\*$/,"")));var p;const g=(p=(0,Nn.V$)(c))!==null&&p!==void 0?p:e[0].children;var S;const[k]=(S=(0,Nn.fp)(c,`/${r["*"]}`))!==null&&S!==void 0?S:[],U=k?e.findIndex(he=>`${he.path}/*`===k.route.path):0;var D;return{index:U===-1?0:U,element:g,route:(D=e[U])!==null&&D!==void 0?D:e[0]}}function Ci(e){const{routes:r}=e,i=(0,Nn.s0)(),{index:c,route:p,element:g}=aa(r),S=(0,m.useMemo)(()=>r.map(U=>({id:U.path,label:U.title,tabProps:U.tabProps})),[r]),k=U=>i(r[U].path.replace(/\/\*$/,"").replace(/^\//,""));return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(wi,{tabs:S,selectedIndex:c,onChange:k}),(0,n.jsxs)(Si,{children:[(0,n.jsx)(Hs.q,{title:p.title}),g]})]})}const Vo=()=>null;(0,O.R5)(Vo,"core.gatherMountPoints",!0);function ji(e){const r=(0,n.jsx)(Vo,{path:"",title:"",children:(0,n.jsx)("div",{})}).type;return m.Children.toArray(e).flatMap(i=>{if(!(0,m.isValidElement)(i))return[];if(i.type===m.Fragment)return ji(i.props.children);if(i.type!==r)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:c,title:p,children:g,tabProps:S}=i.props;return[{path:c,title:p,children:g,tabProps:S}]})}function la(e){const r=ji(e.children);return(0,n.jsx)(Ci,{routes:r})}la.Route=Vo;const ca=(0,l.Z)(e=>({value:{marginBottom:"6px"},subvalue:{color:e.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function da(e){const{value:r,subvalue:i}=e,c=ca();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:c.value,children:r}),(0,n.jsx)("div",{className:c.subvalue,children:i})]})}var ua=t(21070),ha=t(90324),pa=t(98281),fa=t(48049),Ei=t(51209),Ai=t(33375),ga=t(44233),ma=t(27604),Ho=t(36444),va=t(37971),ya=t(59709),xa=t(17373),ba=t(3702),Sa=t(93111),uo=t(67222);const wa=(0,l.Z)(e=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:e.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:e.spacing(2)}}}),{name:"BackstageTableFilters"}),Ca=e=>{var r;const i=wa(),{onChangeFilters:c}=e,[p,g]=(0,m.useState)({...e.selectedFilters}),[S,k]=(0,m.useState)(!1),U=()=>{g({}),k(D=>!D)};return(0,m.useEffect)(()=>{c(p)},[p,c]),(0,n.jsxs)("div",{className:i.root,children:[(0,n.jsxs)("div",{className:i.header,children:[(0,n.jsx)("div",{className:i.value,children:"Filters"}),(0,n.jsx)(K.Z,{color:"primary",onClick:U,children:"Clear all"})]}),(0,n.jsx)("div",{className:i.filters,children:((r=e.filters)===null||r===void 0?void 0:r.length)&&e.filters.map(D=>(0,n.jsx)(Xt,{triggerReset:S,...D.element,selected:p[D.element.label],onChange:he=>g({...p,[D.element.label]:he})},D.element.label))})]})},ja={Add:(0,m.forwardRef)((e,r)=>(0,n.jsx)(ua.Z,{...e,ref:r})),Check:(0,m.forwardRef)((e,r)=>(0,n.jsx)(pa.Z,{...e,ref:r})),Clear:(0,m.forwardRef)((e,r)=>(0,n.jsx)(Ai.Z,{...e,ref:r})),Delete:(0,m.forwardRef)((e,r)=>(0,n.jsx)(ga.Z,{...e,ref:r})),DetailPanel:(0,m.forwardRef)((e,r)=>(0,n.jsx)(Ei.Z,{...e,ref:r})),Edit:(0,m.forwardRef)((e,r)=>(0,n.jsx)(ma.Z,{...e,ref:r})),Export:(0,m.forwardRef)((e,r)=>(0,n.jsx)(ba.Z,{...e,ref:r})),Filter:(0,m.forwardRef)((e,r)=>(0,n.jsx)(Ho.Z,{...e,ref:r})),FirstPage:(0,m.forwardRef)((e,r)=>(0,n.jsx)(va.Z,{...e,ref:r})),LastPage:(0,m.forwardRef)((e,r)=>(0,n.jsx)(ya.Z,{...e,ref:r})),NextPage:(0,m.forwardRef)((e,r)=>(0,n.jsx)(Ei.Z,{...e,ref:r})),PreviousPage:(0,m.forwardRef)((e,r)=>(0,n.jsx)(fa.Z,{...e,ref:r})),ResetSearch:(0,m.forwardRef)((e,r)=>(0,n.jsx)(Ai.Z,{...e,ref:r})),Search:(0,m.forwardRef)((e,r)=>(0,n.jsx)(Ho.Z,{...e,ref:r})),SortArrow:(0,m.forwardRef)((e,r)=>(0,n.jsx)(ha.Z,{...e,ref:r})),ThirdStateCheck:(0,m.forwardRef)((e,r)=>(0,n.jsx)(xa.Z,{...e,ref:r})),ViewColumn:(0,m.forwardRef)((e,r)=>(0,n.jsx)(Sa.Z,{...e,ref:r}))};function Ti(e,r){const i=r.split(".");let c=e[i[0]];for(let p=1;p<i.length;++p){if(c===void 0)return c;const g=i[p];c=c[g]}return c}const Ea=(0,un.Z)(e=>({header:{padding:e.spacing(1,2,1,2.5),borderTop:`1px solid ${e.palette.grey.A100}`,borderBottom:`1px solid ${e.palette.grey.A100}`,color:e.palette.textSubtle,fontWeight:e.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(uo.W$),Ii=(0,un.Z)(e=>({root:{padding:e.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:e.spacing(2)}}),{name:"BackstageTableToolbar"})(uo.UW),Aa=(0,l.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Ta=(0,l.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ia(e,r){return e.map(i=>{const c={};let p=i.cellStyle||{};if(i.highlight)if(c.color=r.palette.textContrast,typeof p=="object")p.fontWeight=r.typography.fontWeightBold;else{const g=p;p=(S,k,U)=>({...g(S,k,U),fontWeight:r.typography.fontWeightBold})}return{...i,headerStyle:c,cellStyle:p}})}function Ra(e,r){return(0,le.transform)(e,(i,c,p)=>{(0,le.isEqual)(c,r[p])||(i[p]=c)})}const Ri={search:"",filtersOpen:!1,filters:{}};function La(e){const{toolbarRef:r,setSearch:i,hasFilters:c,selectedFiltersLength:p,toggleFilters:g}=e,S=Aa(),k=(0,m.useCallback)(U=>{e.onSearchChanged(U),i(U)},[e,i]);return c?(0,n.jsxs)("div",{className:S.root,children:[(0,n.jsxs)("div",{className:S.root,children:[(0,n.jsx)(Ye.Z,{onClick:g,"aria-label":"filter list",children:(0,n.jsx)(Ho.Z,{})}),(0,n.jsxs)(j.Z,{className:S.title,children:["Filters (",p,")"]})]}),(0,n.jsx)(Ii,{...e,ref:r,onSearchChanged:k})]}):(0,n.jsx)(Ii,{...e,ref:r,onSearchChanged:k})}function Pa(e){const{data:r,columns:i,options:c,title:p,subtitle:g,filters:S,initialState:k,emptyContent:U,onStateChange:D,components:he,...ne}=e,fe=Ta(),je=(0,Te.Z)(),Ze={...Ri,...k},[lt,Nt]=(0,m.useState)(Ze.filtersOpen),Jt=(0,m.useCallback)(()=>Nt(bn=>!bn),[Nt]),[rn,sn]=(0,m.useState)(0),[St,qt]=(0,m.useState)(r),[Qt,cr]=(0,m.useState)(Ze.filters),Kn=Ia(i,je),[dr,ur]=(0,m.useState)(Ze.search);(0,m.useEffect)(()=>{if(D){const bn=Ra({search:dr,filtersOpen:lt,filters:Qt},Ri);D(bn)}},[dr,lt,Qt,D]);const Jo={headerStyle:{textTransform:"uppercase"}},Gt=(0,m.useCallback)(bn=>{var rr;return(rr=i.find(Yn=>Yn.title===bn))===null||rr===void 0?void 0:rr.field},[i]);(0,m.useEffect)(()=>{if(typeof r=="function")return;if(!Qt){qt(r);return}const bn=Object.values(Qt);if(r&&bn.flat().length){const rr=r.filter(Yn=>!!Object.entries(Qt).filter(([,Hn])=>!!Hn.length).every(([Hn,mn])=>{const An=Ti(Yn,Gt(Hn));return Array.isArray(An)&&Array.isArray(mn)?An.some(sr=>mn.includes(sr)):Array.isArray(An)?An.includes(mn):Array.isArray(mn)?mn.includes(An):An===mn}));qt(rr)}else qt(r);sn(bn.flat().length)},[r,Qt,Gt]);const Kr=(bn,rr)=>{const Yn=mn=>{const An=new Set,sr=Pr=>{Pr!=null&&An.add(Pr)};return rr&&rr.forEach(Pr=>{const Is=Ti(Pr,Gt(mn));Array.isArray(Is)?Is.forEach(sr):sr(Is)}),An},Hn=mn=>({placeholder:"All results",label:mn.column,multiple:mn.type==="multiple-select",items:[...Yn(mn.column)].sort().map(An=>({label:An,value:An}))});return bn.map(mn=>({type:mn.type,element:Hn(mn)}))},po=!!(S!=null&&S.length),Yr=(0,m.useCallback)(bn=>(0,n.jsx)(La,{setSearch:ur,hasFilters:po,selectedFiltersLength:rn,toggleFilters:Jt,...bn}),[Jt,po,rn,ur]),fo=typeof r!="function"&&r.length===0,go=i.length,Qo=(0,m.useCallback)(bn=>U&&fo?(0,n.jsx)("tbody",{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:go,children:U})})}):(0,n.jsx)(uo.os,{...bn}),[fo,U,go]);return(0,n.jsxs)("div",{className:fe.root,children:[lt&&r&&typeof r!="function"&&(S==null?void 0:S.length)&&(0,n.jsx)(Ca,{filters:Kr(S,r),selectedFilters:Qt,onChangeFilters:cr}),(0,n.jsx)(uo.ZP,{components:{Header:Ea,Toolbar:Yr,Body:Qo,...he},options:{...Jo,...c},columns:Kn,icons:ja,title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.Z,{variant:"h5",component:"h2",children:p}),g&&(0,n.jsx)(j.Z,{color:"textSecondary",variant:"body1",children:g})]}),data:typeof r=="function"?r:St,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...ne})]})}const Bl=e=>{const{children:r,value:i,index:c,...p}=e;return _jsx("div",{role:"tabpanel",hidden:i!==c,"aria-labelledby":`scrollable-auto-tab-${c}`,...p,children:i===c&&_jsx(Box,{p:3,children:r})})},ka=(0,l.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:e=>e.isNext?"auto":"0",marginRight:e=>e.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),Zl=e=>{const r=ka(e),{ariaLabel:i,onClick:c}=e;return _jsx(IconButton,{onClick:c,className:r.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":i,children:e.children})},Oa=(e,r)=>r?e?"20px":"0":"40px",$a=(0,l.Z)(e=>({root:{textTransform:"none",height:"64px",fontWeight:e.typography.fontWeightBold,fontSize:e.typography.pxToRem(13),color:e.palette.textSubtle,marginLeft:r=>Oa(r.isFirstNav,r.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:e.palette.textSubtle}}}),{name:"BackstageTab"}),Dl=e=>{const r=$a(e),{isFirstNav:i,isFirstIndex:c,...p}=e;return _jsx(Tab,{classes:r,disableRipple:!0,...p})},Ba=(0,l.Z)(e=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:e.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Nl=e=>{const r=Ba(e);return _jsx(Tabs,{classes:r,...e,TabIndicatorProps:{children:_jsx("span",{})}})},Za=(0,l.Z)(e=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:e.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:e.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Fl(e){const{tabs:r}=e,i=Za(),[c,p]=useState([0,0]),[g,S]=useState(0),[k,U]=useState(0),[D,he]=useState([[]]),ne=useRef(),{width:fe}=useWindowSize(),je=(rn,sn)=>{p([g,sn])},Ze=()=>{S(g-1)},lt=()=>{S(g+1)},Nt=()=>g+1<D.length;useEffect(()=>{const sn=g===0?1:2,St=ne.current.offsetWidth-20-sn*30,qt=c[0]*k+c[1],Qt=Math.floor(St/170);U(Qt),he(chunkArray(r,Qt)),p([Math.floor(qt/Qt),qt%Qt])},[fe,r]);const Jt=g===c[0]?c[1]:!1;return _jsxs("div",{className:i.root,children:[_jsx(AppBar,{ref:ne,className:i.appbar,position:"static",children:_jsx("div",{children:_jsxs(StyledTabs,{value:Jt,onChange:je,selectionFollowsFocus:!0,children:[g!==0&&_jsx(StyledIcon,{onClick:Ze,ariaLabel:"navigate-before",children:_jsx(NavigateBeforeIcon,{})}),D[g].map((rn,sn)=>_jsx(StyledTab,{value:sn,isFirstIndex:sn===0,isFirstNav:g===0,icon:rn.icon||void 0,label:rn.label||void 0},sn)),Nt()&&_jsx(StyledIcon,{isNext:!0,onClick:lt,ariaLabel:"navigate-next",children:_jsx(NavigateNextIcon,{})})]})})}),Jt!==!1?D[g].map((rn,sn)=>_jsx(TabPanel,{value:sn,index:Jt,children:rn.content},sn)):_jsx(TabPanel,{value:c[1],index:c[1],children:D[c[0]][c[1]].content},"panel_outside_chunked_array")]})}var Ul=t(44311);function Da(e,r){const i=e[e.length-1];if(!!i)return i>=.9?r.palette.status.ok:i>=.5?r.palette.status.warning:r.palette.status.error}function Ml(e){const r=useTheme();if(!e.data)return null;var i;return _jsxs(Sparklines,{width:120,height:30,min:0,max:1,...e,children:[e.title&&_jsx("title",{children:e.title}),_jsx(SparklinesLine,{color:(i=e.color)!==null&&i!==void 0?i:Da(e.data,r)})]})}const Na=e=>(0,l.Z)(r=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:r.spacing(2),textAlign:e.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:r.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),Fa=({title:e="Unknown page",className:r})=>(0,n.jsx)(j.Z,{variant:"h4",component:"h2",className:r,"data-testid":"header-title",children:e});function Ua(e){const{description:r,title:i,titleComponent:c=void 0,children:p,textAlign:g="left"}=e,S=Na({textAlign:g})(),k=c||(0,n.jsx)(Fa,{title:i,className:S.title});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Hs.q,{title:i}),(0,n.jsxs)("div",{className:S.container,children:[(0,n.jsxs)("div",{className:S.leftItemsBox,children:[k,r&&(0,n.jsx)(j.Z,{className:S.description,variant:"body2",children:r})]}),(0,n.jsx)("div",{className:S.rightItemsBox,children:p})]})]})}var Ma=t(29788);const za=(0,l.Z)(e=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:e.spacing(2),right:e.spacing(2),[e.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${e.spacing(10)}px auto ${e.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),Va=()=>{const e=za();return(0,n.jsx)("img",{src:Ma,className:e.micDrop,alt:"Girl dropping mic from her hands"})},Ha=(0,l.Z)(e=>({container:{padding:e.spacing(8),[e.breakpoints.down("xs")]:{padding:e.spacing(2)}},title:{paddingBottom:e.spacing(5),[e.breakpoints.down("xs")]:{paddingBottom:e.spacing(4),fontSize:32}},subtitle:{color:e.palette.textSubtle}}),{name:"BackstageErrorPage"});function Wa(e){const{status:r,statusMessage:i,additionalInfo:c,supportUrl:p}=e,g=Ha(),S=(0,Nn.s0)(),k=Ir();return(0,n.jsxs)(z.Z,{container:!0,spacing:0,className:g.container,children:[(0,n.jsx)(Va,{}),(0,n.jsxs)(z.Z,{item:!0,xs:12,sm:8,md:4,children:[(0,n.jsxs)(j.Z,{"data-testid":"error",variant:"body1",className:g.subtitle,children:["ERROR ",r,": ",i]}),(0,n.jsx)(j.Z,{variant:"body1",className:g.subtitle,children:c}),(0,n.jsx)(j.Z,{variant:"h2",className:g.title,children:"Looks like someone dropped the mic!"}),(0,n.jsxs)(j.Z,{variant:"h6",children:[(0,n.jsx)(ye,{to:"#","data-testid":"go-back-link",onClick:()=>S(-1),children:"Go back"}),"... or please"," ",(0,n.jsx)(ye,{to:p||k.url,children:"contact support"})," if you think this is a bug."]})]})]})}var Ga=t(16173);const Ka=(0,un.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(j.Z),Wo=(0,un.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(Fn.Z);function Ya(e){const{children:r,...i}=e,[c,p]=m.useState(null),g=m.Children.toArray(r),[S,k,...U]=g,D=U.length?U.pop():g[g.length-1],he=g.length>3,ne=Ze=>{p(Ze.currentTarget)},fe=()=>{p(null)},je=Boolean(c);return(0,n.jsxs)(m.Fragment,{children:[(0,n.jsxs)(Ga.Z,{"aria-label":"breadcrumb",...i,children:[g.length>1&&(0,n.jsx)(Wo,{clone:!0,children:S}),g.length>2&&(0,n.jsx)(Wo,{clone:!0,children:k}),he&&(0,n.jsx)(Ka,{onClick:ne,children:"..."}),(0,n.jsx)(Fn.Z,{style:{fontStyle:"italic"},children:D})]}),(0,n.jsx)(Fs.ZP,{open:je,anchorEl:c,onClose:fe,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,n.jsx)(E.Z,{children:U.map((Ze,lt)=>(0,n.jsx)(J.Z,{button:!0,children:(0,n.jsx)(Wo,{clone:!0,children:Ze})},lt))})})]})}const Ja=(0,l.Z)(e=>({header:{gridArea:"pageHeader",padding:e.spacing(3),width:"100%",boxShadow:e.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:e.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[e.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:e.page.fontColor,wordBreak:"break-word",fontSize:e.typography.h3.fontSize,marginBottom:0},subtitle:{color:e.page.fontColor,opacity:.8,display:"inline-block",marginTop:e.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:e.spacing(1),color:e.page.fontColor},breadcrumb:{color:e.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-e.spacing(.3),marginBottom:e.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-e.spacing(.3),marginBottom:e.spacing(.3)}}),{name:"BackstageHeader"}),Qa=({type:e,typeLink:r,classes:i,pageTitle:c})=>e?r?(0,n.jsxs)(Ya,{className:i.breadcrumb,children:[(0,n.jsx)(ye,{to:r,children:e}),(0,n.jsx)(j.Z,{children:c})]}):(0,n.jsx)(j.Z,{className:i.type,children:e}):null,Xa=({pageTitle:e,classes:r,tooltip:i})=>{const c=(0,n.jsx)(j.Z,{className:r.title,variant:"h1",children:e});return i?(0,n.jsx)(Ke.ZP,{title:i,placement:"top-start",children:c}):c},qa=({classes:e,subtitle:r})=>r?typeof r!="string"?(0,n.jsx)(n.Fragment,{children:r}):(0,n.jsx)(j.Z,{className:e.subtitle,variant:"subtitle2",component:"span",children:r}):null;function Li(e){const{children:r,pageTitleOverride:i,style:c,subtitle:p,title:g,tooltip:S,type:k,typeLink:U}=e,D=Ja(),ne=(0,O.h_)(O.Ds).getOptionalString("app.title")||"Backstage",fe=i||g,je=g||i,Ze=`${fe} | %s | ${ne}`,lt=`${fe} | ${ne}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Hs.q,{titleTemplate:Ze,defaultTitle:lt}),(0,n.jsxs)("header",{style:c,className:D.header,children:[(0,n.jsxs)(Fn.Z,{className:D.leftItemsBox,children:[(0,n.jsx)(Qa,{classes:D,type:k,typeLink:U,pageTitle:je}),(0,n.jsx)(Xa,{classes:D,pageTitle:je,tooltip:S}),(0,n.jsx)(qa,{classes:D,subtitle:p})]}),(0,n.jsx)(z.Z,{container:!0,className:D.rightItemsBox,spacing:4,children:r})]})]})}const _a=(0,l.Z)(e=>({root:{textAlign:"left"},label:{color:e.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:e.typography.fontSize,marginBottom:e.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:e.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),el=({value:e,className:r})=>(0,n.jsx)(j.Z,{className:r,children:e});function tl(e){const{label:r,value:i,url:c}=e,p=_a(),g=(0,n.jsx)(el,{className:p.value,value:i||"<Unknown>"});return(0,n.jsx)(z.Z,{item:!0,children:(0,n.jsxs)("span",{className:p.root,children:[(0,n.jsx)(j.Z,{className:p.label,children:r}),c?(0,n.jsx)(ye,{to:c,children:g}):g]})})}const nl={hour:"2-digit",minute:"2-digit"};function Pi(e){const r=new Date,i=window.navigator.language,c=[];if(!e.has("homepage.clocks"))return c;const p=e.getConfigArray("homepage.clocks");for(const g of p)if(g.has("label")&&g.has("timezone")){let S=g.getString("label");const k={timeZone:g.getString("timezone"),...nl};try{new Date().toLocaleString(i,k)}catch{console.warn(`The timezone ${k.timeZone} is invalid. Defaulting to GMT`),k.timeZone="GMT",S="GMT"}const U=r.toLocaleTimeString(i,k);c.push({time:U,label:S})}return c}function zl(e){const r=useApi(configApiRef),i=[],[c,p]=React.useState(i);return React.useEffect(()=>{p(Pi(r));const g=setInterval(()=>{p(Pi(r))},1e3);return()=>{clearInterval(g)}},[r]),c.length!==0?_jsx(_Fragment,{children:c.map(g=>_jsx(HeaderLabel,{label:g.label,value:g.time},g.label))}):null}const rl=e=>(0,L.Z)({root:{color:e.palette.common.white,padding:e.spacing(2,2,3),backgroundImage:e.getPageTheme({themeId:"card"}).backgroundImage,backgroundPosition:0,backgroundSize:"inherit"}}),sl=(0,l.Z)(rl,{name:"BackstageItemCardHeader"});function ol(e){const{title:r,subtitle:i,children:c}=e,p=sl(e);return(0,n.jsxs)("div",{className:p.root,children:[i&&(0,n.jsx)(j.Z,{variant:"subtitle2",component:"h3",children:i}),r&&(0,n.jsx)(j.Z,{variant:"h6",component:"h4",children:r}),c]})}function Vl(e){const{description:r,tags:i,title:c,type:p,subtitle:g,label:S,onClick:k,href:U}=e;return _jsxs(Card,{children:[_jsx(CardMedia,{children:_jsx(ItemCardHeader,{title:c,subtitle:g||p})}),_jsxs(CardContent,{children:[i!=null&&i.length?_jsx(Box,{children:i.map((D,he)=>_jsx(Chip,{size:"small",label:D},he))}):null,r]}),_jsxs(CardActions,{children:[!U&&_jsx(Button,{to:"#",onClick:k,color:"primary",children:S}),U&&_jsx(Button,{to:U,color:"primary",children:S})]})]})}const il=e=>(0,L.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:e.spacing(2)}}),al=(0,l.Z)(il,{name:"BackstageItemCardGrid"});function ll(e){const{children:r,...i}=e,c=al(i);return(0,n.jsx)("div",{className:c.root,...i,children:r})}var cl=t(41547);const dl=(0,l.Z)(()=>({root:({isMobile:e})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:e?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function ki(e){const{themeId:r,children:i}=e,{isMobile:c}=Wr(),p=dl({isMobile:c});return(0,n.jsx)(cl.Z,{theme:g=>({...g,page:g.getPageTheme({themeId:r})}),children:(0,n.jsx)("main",{className:p.root,children:i})})}function ul(e){const{themeId:r,children:i,...c}=e;return(0,n.jsxs)(ki,{themeId:r,children:[(0,n.jsx)(Li,{...c}),i]})}var kn=t(30195);const Hl=kn.z.object({providerInfo:kn.z.object({}).catchall(kn.z.unknown()).optional(),profile:kn.z.object({email:kn.z.string().optional(),displayName:kn.z.string().optional(),picture:kn.z.string().optional()}),backstageIdentity:kn.z.object({token:kn.z.string(),identity:kn.z.object({type:kn.z.literal("user"),userEntityRef:kn.z.string(),ownershipEntityRefs:kn.z.array(kn.z.string())})})}),Oi={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function hl(e){const r=new Date(Date.now()+Oi.defaultTokenExpiryMillis);if(!e)return r;const[i,c,p]=e.split("."),g=JSON.parse(atob(c));return typeof g.exp!="number"?r:new Date(g.exp*1e3-Oi.tokenExpiryMarginMillis)}class Wl{async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:r}=this.getSessionSync(),i=r.identity.userEntityRef,c=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(i);if(!c)throw new TypeError(`Invalid user entity reference "${i}"`);return c[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const r=this.state.type==="active"?this.state.session:void 0,i=this.fetchSession().then(c=>(this.state={type:"active",session:c,expiresAt:hl(c.backstageIdentity.token)},c),c=>{throw this.state={type:"failed",error:c},c});return this.state={type:"fetching",promise:i,previous:r},i}async fetchSession(){const r=await this.options.discoveryApi.getBaseUrl("auth"),i=await fetch(`${r}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!i.ok)throw await ResponseError.fromResponse(i);return proxiedSessionSchema.parse(await i.json())}constructor(r){this.options=r,this.abortController=new AbortController,this.state={type:"empty"}}}const Gl=e=>{const r=useApi(discoveryApiRef),[{status:i,error:c},{execute:p}]=useAsync(async()=>{const g=new ProxiedSignInIdentity({provider:e.provider,discoveryApi:r});await g.start(),e.onSignInSuccess(g)});return useMountEffect(p),i==="loading"?_jsx(Progress,{}):c?_jsx(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:c}):null},pl=(0,l.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),Go=({children:e})=>{const r=pl();return(0,n.jsx)(z.Z,{component:"li",item:!0,classes:r,children:e})};class Ko{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const r="user:default/guest";return{type:"user",userEntityRef:r,ownershipEntityRefs:[r]}}async getCredentials(){return{}}async signOut(){}}function fl(e){const[r,i,c]=e.split(".");return JSON.parse(atob(i))}class Yo{getUserId(){return this.result.userId}static fromResult(r){return new Yo(r)}async getIdToken(){var r,i;return(i=(r=this.result).getIdToken)===null||i===void 0?void 0:i.call(r)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const r=await this.getIdToken();if(!r){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:i,ent:c}=fl(r);return{type:"user",userEntityRef:i,ownershipEntityRefs:c!=null?c:[]}}async getCredentials(){var r,i;return{token:await((i=(r=this.result).getIdToken)===null||i===void 0?void 0:i.call(r))}}async signOut(){var r,i;return(i=(r=this.result).signOut)===null||i===void 0?void 0:i.call(r)}constructor(r){this.result=r}}class Ts{static createGuest(){return new Ko}static fromLegacy(r){return Yo.fromResult(r)}static create(r){return new Ts(r.identity,r.authApi,r.profile)}getUserId(){const r=this.identity.userEntityRef,i=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(r);if(!i)throw new TypeError(`Invalid user entity reference "${r}"`);return i[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(r){throw this.profilePromise=void 0,r}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}constructor(r,i,c){this.identity=r,this.authApi=i,this.profile=c}}const gl={Component:({config:e,onSignInSuccess:r})=>{const{apiRef:i,title:c,message:p}=e,g=(0,O.h_)(i),S=(0,O.h_)(O.VE),k=async()=>{try{const U=await g.getBackstageIdentity({instantPopup:!0});if(!U)throw new Error(`The ${c} provider is not configured to support sign-in`);const D=await g.getProfile();r(Ts.create({identity:U.identity,profile:D,authApi:g}))}catch(U){S.post(new Cr.SP("Login failed",U))}};return(0,n.jsx)(Go,{children:(0,n.jsx)(mr,{variant:"fullHeight",title:c,actions:(0,n.jsx)(K.Z,{color:"primary",variant:"outlined",onClick:k,children:"Sign In"}),children:(0,n.jsx)(j.Z,{variant:"body1",children:p})})})},loader:async(e,r)=>{const i=e.get(r),c=await i.getBackstageIdentity({optional:!0});if(!c)return;const p=await i.getProfile();return Ts.create({identity:c.identity,profile:p,authApi:i})}},ml={Component:({onSignInSuccess:e})=>(0,n.jsx)(Go,{children:(0,n.jsx)(mr,{title:"Guest",variant:"fullHeight",actions:(0,n.jsx)(K.Z,{color:"primary",variant:"outlined",onClick:()=>e(new Ko),children:"Enter"}),children:(0,n.jsxs)(j.Z,{variant:"body1",children:["Enter as a Guest User.",(0,n.jsx)("br",{}),"You will not have a verified identity,",(0,n.jsx)("br",{}),"meaning some features might be unavailable."]})})}),loader:async()=>new Ko};var vl=t(63955),$i=t(86619),Bi=t(74828),yl=t(45455),xl=t.n(yl);const bl=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Sl=(0,l.Z)(e=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:e.spacing(2)}}),{name:"BackstageCustomProvider"}),Zi=e=>{const{ref:r,...i}=e;return{inputRef:r,...i}},wl={Component:({onSignInSuccess:e})=>{const r=Sl(),{register:i,handleSubmit:c,formState:p}=(0,vl.cI)({mode:"onChange"}),{errors:g}=p,S=({userId:k})=>{e(Ts.fromLegacy({userId:k,profile:{email:`${k}@example.com`}}))};return(0,n.jsx)(Go,{children:(0,n.jsxs)(mr,{title:"Custom User",variant:"fullHeight",children:[(0,n.jsxs)(j.Z,{variant:"body1",children:["Enter your own User ID and credentials.",(0,n.jsx)("br",{}),"This selection will not be stored."]}),(0,n.jsxs)("form",{className:r.form,onSubmit:c(S),children:[(0,n.jsxs)(B.Z,{children:[(0,n.jsx)($i.Z,{...Zi(i("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(g.userId)}),g.userId&&(0,n.jsx)(Bi.Z,{error:!0,children:g.userId.message})]}),(0,n.jsxs)(B.Z,{children:[(0,n.jsx)($i.Z,{...Zi(i("idToken",{required:!1,validate:k=>!k||bl.test(k)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(g.idToken)}),g.idToken&&(0,n.jsx)(Bi.Z,{error:!0,children:g.idToken.message})]}),(0,n.jsx)(K.Z,{type:"submit",color:"primary",variant:"outlined",className:r.button,disabled:!(p!=null&&p.isDirty)||!xl()(g),children:"Continue"})]})]})})},loader:async()=>{}},ho="@backstage/core:SignInPage:provider",Di={guest:ml,custom:wl,common:gl};function Ni(e,r){if(e in r)throw new Error(`"${e}" ID is duplicated. IDs of identity providers have to be unique.`)}function _l(e){return e.reduce((i,c)=>{if(typeof c=="string")return Ni(c,i),i[c]={components:Di[c],id:c},i;const{id:p}=c;return Ni(p,i),i[p]={components:Di.common,id:p,config:c},i},{})}const ec=(e,r)=>{const i=useApi(errorApiRef),c=useApiHolder(),[p,g]=useState(!0),S=useCallback(U=>{r(IdentityApiSignOutProxy.from({identityApi:U,signOut:async()=>{var D;localStorage.removeItem(ho),await((D=U.signOut)===null||D===void 0?void 0:D.call(U))}}))},[r]);useLayoutEffect(()=>{var U;if(!p)return;const D=localStorage.getItem(ho);if(D===null){g(!1);return}const he=e[D];if(!he){g(!1);return}let ne=!1;return he.components.loader(c,(U=he.config)===null||U===void 0?void 0:U.apiRef).then(fe=>{ne||(fe?S(fe):g(!1))}).catch(fe=>{ne||(localStorage.removeItem(ho),i.post(fe),g(!1))}),()=>{ne=!0}},[p,i,r,c,e,S]);const k=useMemo(()=>Object.keys(e).map(U=>{const D=e[U],{Component:he}=D.components,ne=fe=>{localStorage.setItem(ho,D.id),S(fe)};return _jsx(he,{config:D.config,onSignInSuccess:ne},D.id)}),[e,S]);return[p,k]},Cl=({onSignInSuccess:e,providers:r=[],title:i,align:c="left"})=>{const p=useApi(configApiRef),g=useStyles(),S=getSignInProviders(r),[k,U]=useSignInProviders(S,e);return k?_jsx(Progress,{}):_jsxs(Page,{themeId:"home",children:[_jsx(Header,{title:p.getString("app.title")}),_jsxs(Content,{children:[i&&_jsx(ContentHeader,{title:i,textAlign:c}),_jsx(Grid,{container:!0,justifyContent:c==="center"?c:"flex-start",spacing:2,component:"ul",classes:g,children:U})]})]})},jl=({provider:e,auto:r,onSignInSuccess:i})=>{const c=useStyles(),p=useApi(e.apiRef),g=useApi(configApiRef),[S,k]=useState(),[U,D]=useState(!1),he=async({checkExisting:ne,showPopup:fe})=>{try{let je;if(ne&&(je=await p.getBackstageIdentity({optional:!0})),!je&&(fe||r)&&(D(!0),je=await p.getBackstageIdentity({instantPopup:!0}),!je))throw new Error(`The ${e.title} provider is not configured to support sign-in`);if(!je){D(!0);return}const Ze=await p.getProfile();i(UserIdentity.create({identity:je.identity,authApi:p,profile:Ze}))}catch(je){k(je),D(!0)}};return useMountEffect(()=>he({checkExisting:!0})),U?_jsxs(Page,{themeId:"home",children:[_jsx(Header,{title:g.getString("app.title")}),_jsx(Content,{children:_jsx(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:c,children:_jsx(GridItem,{children:_jsxs(InfoCard,{variant:"fullHeight",title:e.title,actions:_jsx(Button,{color:"primary",variant:"outlined",onClick:()=>{he({showPopup:!0})},children:"Sign In"}),children:[_jsx(Typography,{variant:"body1",children:e.message}),S&&S.name!=="PopupRejectedError"&&_jsx(Typography,{variant:"body1",color:"error",children:S.message})]})})})})]}):_jsx(Progress,{})};function tc(e){return"provider"in e?_jsx(jl,{...e}):_jsx(Cl,{...e})}const El=(0,l.Z)(e=>({root:{padding:e.spacing(0,2,0,2.5),minHeight:e.spacing(3)},indicator:{backgroundColor:e.palette.info.main,height:e.spacing(.3)}}),{name:"BackstageTabbedCard"}),Al=(0,un.Z)(e=>({root:{padding:e.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:e.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(qn.Z);function nc(e){const{slackChannel:r,errorBoundaryProps:i,children:c,title:p,deepLink:g,value:S,onChange:k}=e,U=El(),[D,he]=useState(0),ne=k||((Ze,lt)=>he(lt));let fe;S?React.Children.map(c,Ze=>{React.isValidElement(Ze)&&(Ze==null?void 0:Ze.props.value)===S&&(fe=Ze==null?void 0:Ze.props.children)}):React.Children.map(c,(Ze,lt)=>{React.isValidElement(Ze)&<===D&&(fe=Ze==null?void 0:Ze.props.children)});const je=i||(r?{slackChannel:r}:{});return _jsx(Card,{children:_jsxs(ErrorBoundary,{...je,children:[p&&_jsx(Al,{title:p}),_jsx(Tabs,{selectionFollowsFocus:!0,classes:U,value:S||D,onChange:ne,children:c}),_jsx(Divider,{}),_jsx(CardContent,{children:fe}),g&&_jsx(BottomLink,{...g})]})})}const Tl=(0,l.Z)(e=>({root:{minWidth:e.spacing(6),minHeight:e.spacing(3),margin:e.spacing(0,2,0,0),padding:e.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:e.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function rc(e){const{children:r,...i}=e,c=Tl();return _jsx(Tab,{disableRipple:!0,classes:c,...i})}},25248:function(tt,Ae,t){"use strict";t.d(Ae,{fC:function(){return b},CL:function(){return Oe},sM:function(){return V},$v:function(){return ye},v_:function(){return Ge},hg:function(){return Ve},uB:function(){return te},R5:function(){return vt},bq:function(){return $},Ds:function(){return Te},ni:function(){return Y},T0:function(){return F},CO:function(){return At},x8:function(){return zt},rx:function(){return Ft},YO:function(){return yt},P4:function(){return Bt},NT:function(){return He},NW:function(){return Ye},VE:function(){return Ke},W0:function(){return Fe},gP:function(){return qe},IY:function(){return at},F4:function(){return le},ux:function(){return A},Kp:function(){return ie},$4:function(){return st},p_:function(){return Z},ZM:function(){return nt},D:function(){return I},gW:function(){return P},E6:function(){return ct},z$:function(){return mt},h_:function(){return ee},I_:function(){return L},qD:function(){return Ce},vJ:function(){return en},yx:function(){return xe},tg:function(){return Et},Oi:function(){return cn}});var h=t(52322),n=t(51837),m=t(2784);const O=(0,n.CT)("analytics-context"),G=()=>{const re=(0,m.useContext)(O);if(re===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const M=re.atVersion(1);if(M===void 0)throw new Error("No context found for version 1.");return M},b=re=>{const{attributes:M,children:we}=re,Je={...G(),...M},gt=(0,n.EI)({1:Je});return(0,h.jsx)(O.Provider,{value:gt,children:we})};function l(re,M){const we=Re=>_jsx(b,{attributes:M,children:_jsx(re,{...Re})});return we.displayName=`WithAnalyticsContext(${re.displayName||re.name||"Component"})`,we}function L(){const re=(0,n.Vt)("api-context");if(!re)throw new Error("API context is not available");const M=re.atVersion(1);if(!M)throw new Error("ApiContext v1 not available");return M}function ee(re){const we=L().get(re);if(!we)throw new Error(`No implementation available for ${re}`);return we}function X(re){return function(we){const Re=gt=>{const z=L(),j={};for(const se in re)if(re.hasOwnProperty(se)){const $e=re[se],Qe=z.get($e);if(!Qe)throw new Error(`No implementation available for ${$e}`);j[se]=Qe}return _jsx(we,{...gt,...j})},Je=we.displayName||we.name||"Component";return Re.displayName=`withApis(${Je})`,Re}}class K{get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}constructor(M){if(this.config=M,!M.id.split(".").flatMap(Re=>Re.split("-")).every(Re=>Re.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${M.id}'`)}}function F(re){return new K(re)}function Y(re,M){return"id"in re?{api:re,deps:{},factory:()=>M}:re}var V;(function(re){re.SignedIn="SignedIn",re.SignedOut="SignedOut"})(V||(V={}));const ie=F({id:"core.auth.google"}),le=F({id:"core.auth.github"}),I=F({id:"core.auth.okta"}),A=F({id:"core.auth.gitlab"}),Z=F({id:"core.auth.microsoft"}),P=F({id:"core.auth.onelogin"}),$=F({id:"core.auth.bitbucket"}),te=F({id:"core.auth.atlassian"}),ye=F({id:"core.alert"}),Ge=F({id:"core.analytics"}),Ve=F({id:"core.apptheme"}),Te=F({id:"core.config"}),Ye=F({id:"core.discovery"}),Ke=F({id:"core.error"});var Oe;(function(re){re[re.None=0]="None",re[re.Active=1]="Active"})(Oe||(Oe={}));const Fe=F({id:"core.featureflags"}),qe=F({id:"core.fetch"}),st=F({id:"core.identity"}),nt=F({id:"core.oauthrequest"}),ct=F({id:"core.storage"});class Se{setContext(M){this.context=M}captureEvent(M,we,{value:Re,attributes:Je}={}){try{this.analyticsApi.captureEvent({action:M,subject:we,value:Re,attributes:Je,context:this.context})}catch(gt){console.warn("Error during analytics event capture. %o",gt)}}constructor(M,we={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=M,this.context=we}}function ht(){try{return ee(Ge)}catch{return{captureEvent:()=>{}}}}function mt(){const re=(0,m.useRef)(null),M=G(),we=ht();function Re(){return re.current===null&&(re.current=new Se(we)),re.current}const Je=Re();return Je.setContext(M),Je}const Ie="plugin-context",q=re=>{const{children:M,plugin:we}=re,{Provider:Re}=(0,n.CT)(Ie);return(0,h.jsx)(Re,{value:(0,n.EI)({1:{plugin:we}}),children:M})};function xe(){const re=(0,n.Vt)(Ie);if(!re)throw new Error("Plugin Options context is not available");const M=re.atVersion(1);if(!M)throw new Error("Plugin Options v1 is not available");return M.plugin.getPluginOptions()}const Ce=()=>{const re=(0,n.Vt)("app-context");if(!re)throw new Error("App context is not available");const M=re.atVersion(1);if(!M)throw new Error("AppContext v1 not available");return M},Xe=(0,n.uW)("component-data-store",()=>new WeakMap),ut="__backstage_data";function vt(re,M,we){const Re=re;var Je;let gt=(Je=Re[ut])!==null&&Je!==void 0?Je:Xe.get(re);if(gt||(gt={map:new Map},Object.defineProperty(Re,ut,{enumerable:!1,configurable:!0,writable:!1,value:gt}),Xe.set(re,gt)),gt.map.has(M)){const z=re.displayName||re.name;throw new Error(`Attempted to attach duplicate data "${M}" to component "${z}"`)}gt.map.set(M,we)}function at(re,M){if(!re)return;const we=re.type;if(!we)return;var Re;const Je=(Re=we[ut])!==null&&Re!==void 0?Re:Xe.get(we);if(!!Je)return Je.map.get(M)}const ae=(0,n.uW)("route-ref-type",()=>Symbol("route-ref-type"));let ce=ae;class De{get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}constructor(M,we){this.id=M,this.params=we,this[ce]="absolute"}}function He(re){var M;return new De(re.id,(M=re.params)!==null&&M!==void 0?M:[])}const Ne=/^\w+$/;let ot=null;class dt{toString(){return`routeRef{type=sub,id=${this.id}}`}constructor(M,we,Re,Je){this.id=M,this.path=we,this.parent=Re,this.params=Je,this[ot]="sub"}}function Rt(re){const{id:M,path:we,parent:Re}=re,Je=we.split("/").filter(j=>j.startsWith(":")).map(j=>j.substring(1)),gt=[...Re.params,...Je];if(Re.params.some(j=>Je.includes(j)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!we.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${we}'`);if(we.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${we}'`);for(const j of Je)if(!Ne.test(j))throw new Error(`SubRouteRef path has invalid param, got '${j}'`);return new dt(M,we,Re,gt)}let kt=ae;class Lt{toString(){return`routeRef{type=external,id=${this.id}}`}constructor(M,we,Re){this.id=M,this.params=we,this.optional=Re,this[kt]="external"}}function zt(re){var M;return new Lt(re.id,(M=re.params)!==null&&M!==void 0?M:[],Boolean(re.optional))}var _t=t(10289);function Et(re){const M=(0,_t.TH)(),we=(0,n.Vt)("routing-context");if(!we)throw new Error("Routing context is not available");const Re=we.atVersion(1),Je=(0,m.useMemo)(()=>Re&&Re.resolve(re,M),[Re,re,M]);if(!we)throw new Error("useRouteRef used outside of routing context");if(!Re)throw new Error("RoutingContext v1 not available");const gt="optional"in re&&re.optional;if(!Je&&!gt)throw new Error(`No path for ${re}`);return Je}function cn(re){return(0,_t.UO)()}class xt extends m.Component{static getDerivedStateFromError(M){return{error:M}}render(){const{error:M}=this.state,{app:we,plugin:Re}=this.props,{ErrorBoundaryFallback:Je}=we.getComponents();return M?(0,h.jsx)(Je,{error:M,resetError:this.handleErrorReset,plugin:Re}):this.props.children}constructor(...M){super(...M),this.state={error:void 0},this.handleErrorReset=()=>{this.setState({error:void 0})}}}function Bt(re){const{component:M,mountPoint:we,name:Re}=re;return yt({component:{lazy:()=>M().then(Je=>{const gt=j=>{try{Et(we)}catch(se){if(typeof se=="object"&&se!==null){const{message:$e}=se;if(typeof $e=="string"&&$e.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${we} 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 se}return(0,h.jsx)(Je,{...j})},z=Re||Je.displayName||Je.name||"LazyComponent";return gt.displayName=`RoutableExtension(${z})`,gt},Je=>z=>{const j=Ce(),{BootErrorPage:se}=j.getComponents();return(0,h.jsx)(se,{step:"load-chunk",error:Je})})},data:{"core.mountPoint":we},name:Re})}function At(re){const{component:M,name:we}=re;return yt({component:M,name:we})}function yt(re){const{data:M={},name:we}=re;we||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let Re;if("lazy"in re.component){const gt=re.component.lazy;Re=(0,m.lazy)(()=>gt().then(z=>({default:z})))}else Re=re.component.sync;const Je=we||Re.displayName||Re.name||"Component";return{expose(gt){const z=j=>{const se=Ce(),{Progress:$e}=se.getComponents(),Qe=M==null?void 0:M["core.mountPoint"];return(0,h.jsx)(m.Suspense,{fallback:(0,h.jsx)($e,{}),children:(0,h.jsx)(xt,{app:se,plugin:gt,children:(0,h.jsx)(b,{attributes:{pluginId:gt.getId(),...we&&{extension:we},...Qe&&{routeRef:Qe.id}},children:(0,h.jsx)(q,{plugin:gt,children:(0,h.jsx)(Re,{...j})})})})})};vt(z,"core.plugin",gt);for(const[j,se]of Object.entries(M))vt(z,j,se);return z.displayName=`Extension(${Je})`,z}}}function Kt(re,M,we,Re){return m.Children.toArray(re).flatMap(Je=>{if(!(0,m.isValidElement)(Je))return[];if(Je.type===m.Fragment)return Kt(Je.props.children,M,we,Re);if(at(Je,"core.featureFlagged")){const gt=Je.props;return("with"in gt?M.isActive(gt.with):!M.isActive(gt.without))?Kt(Je.props.children,M,we,Re):[]}if(we===void 0||we(Je))return[Je];if(Re)throw new Error(Re);return Kt(Je.props.children,M,we,Re)})}class Vt{selectByComponentData(M){const we=Kt(this.node,this.featureFlagsApi,Re=>at(Re,M.key)!==void 0,M.withStrictError);return new Vt(we,this.featureFlagsApi)}findComponentData(M){return Kt(this.node,this.featureFlagsApi,Re=>at(Re,M.key)!==void 0).map(Re=>at(Re,M.key)).filter(Re=>Re!==void 0)}getElements(){return Kt(this.node,this.featureFlagsApi)}constructor(M,we){this.node=M,this.featureFlagsApi=we}}function en(re,M,we=[]){const Re=ee(Fe),Je=new Vt(re,Re);return(0,m.useMemo)(()=>M(Je),[re,...we])}class Zt{getId(){return this.config.id}getApis(){var M;return(M=this.config.apis)!==null&&M!==void 0?M:[]}getFeatureFlags(){var M,we;return(we=(M=this.config.featureFlags)===null||M===void 0?void 0:M.slice())!==null&&we!==void 0?we:[]}get routes(){var M;return(M=this.config.routes)!==null&&M!==void 0?M:{}}get externalRoutes(){var M;return(M=this.config.externalRoutes)!==null&&M!==void 0?M:{}}provide(M){return M.expose(this)}__experimentalReconfigure(M){this.config.__experimentalConfigure&&(this.options=this.config.__experimentalConfigure(M))}getPluginOptions(){this.config.__experimentalConfigure&&!this.options&&(this.options=this.config.__experimentalConfigure());var M;return(M=this.options)!==null&&M!==void 0?M:{}}toString(){return`plugin{${this.config.id}}`}constructor(M){this.config=M,this.options=void 0}}function Ft(re){return new Zt(re)}},23054:function(tt,Ae,t){"use strict";t.d(Ae,{SP:function(){return V},dR:function(){return K},VL:function(){return le},BD:function(){return n}});function h(I){if(typeof I!="object"||I===null||Array.isArray(I))return!1;const A=I;return!(typeof A.name!="string"||A.name===""||typeof A.message!="string")}function n(I){if(typeof I!="object"||I===null||Array.isArray(I))throw new Error(`Encountered invalid error, not an object, got '${I}'`);const A=I;if(typeof A.name!="string"||A.name==="")throw new Error(`Encountered error object without a name, got '${I}'`);if(typeof A.message!="string")throw new Error(`Encountered error object without a message, got '${I}'`)}var m=t(24852);function O(I,A){const Z=serializeErrorInternal(I),P={name:"Unknown",message:"<no reason given>",...Z};return A!=null&&A.includeStack||delete P.stack,P}function G(I){const A=(0,m.deserializeError)(I);return I.stack||(A.stack=void 0),A}function b(I){if(h(I)){const A=String(I);return A!=="[object Object]"?A:`${I.name}: ${I.message}`}return`unknown error '${I}'`}class l extends Error{constructor(A,Z){var P;let $=A;if(Z!==void 0){const te=b(Z);$?$+=`; caused by ${te}`:$=`caused by ${te}`}super($),(P=Error.captureStackTrace)===null||P===void 0||P.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=h(Z)?Z:void 0}}class L extends null{}class ee extends null{}class X extends null{}class K extends l{}class F extends null{}class Y extends null{}class V extends l{constructor(A,Z){super(A,Z),this.name=h(Z)?Z.name:"Error"}}async function ie(I){try{const Z=await I.text();if(Z){var A;if(!((A=I.headers.get("content-type"))===null||A===void 0)&&A.startsWith("application/json"))try{const P=JSON.parse(Z);if(P.error&&P.response)return P}catch{}return{error:{name:"Error",message:`Request failed with status ${I.status} ${I.statusText}, ${Z}`},response:{statusCode:I.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${I.status} ${I.statusText}`},response:{statusCode:I.status}}}class le extends Error{static async fromResponse(A){const Z=await ie(A),P=Z.response.statusCode||A.status,$=Z.error.name||A.statusText,te=`Request failed with ${P} ${$}`,ye=G(Z.error);return new le({message:te,response:A,data:Z,cause:ye})}constructor(A){super(A.message),this.name="ResponseError",this.response=A.response,this.body=A.data,this.cause=A.cause}}},32838:function(tt,Ae,t){"use strict";t.d(Ae,{nW:function(){return le},ae:function(){return K},q3:function(){return F}});var h=t(25248);const n=(0,h.T0)({id:"core.scmauth"});var m=new WeakMap;class O{async getCredentials(A){const Z=new URL(A.url),P=_class_private_field_get(this,m).find($=>$.isUrlSupported(Z));if(!P)throw new Error(`No auth provider available for '${A.url}', see https://backstage.io/link?scm-auth`);return P.getCredentials(A)}constructor(A){_class_private_field_init(this,m,{writable:!0,value:void 0}),_class_private_field_set(this,m,A)}}var G=new WeakMap,b=new WeakMap,l=new WeakMap,L=new WeakMap;class ee{static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:A,gitlab:Z,azure:P,bitbucket:$})=>ee.merge(ee.forGithub(A),ee.forGitlab(Z),ee.forAzure(P),ee.forBitbucket($))})}static forAuthApi(A,Z){return new ee("generic",A,Z.host,Z.scopeMapping)}static forGithub(A,Z){var P;const $=(P=Z==null?void 0:Z.host)!==null&&P!==void 0?P:"github.com";return new ee("github",A,$,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(A,Z){var P;const $=(P=Z==null?void 0:Z.host)!==null&&P!==void 0?P:"gitlab.com";return new ee("gitlab",A,$,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(A,Z){var P;const $=(P=Z==null?void 0:Z.host)!==null&&P!==void 0?P:"dev.azure.com";return new ee("azure",A,$,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(A,Z){var P;const $=(P=Z==null?void 0:Z.host)!==null&&P!==void 0?P:"bitbucket.org";return new ee("bitbucket",A,$,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...A){return new O(A)}isUrlSupported(A){return A.host===_class_private_field_get(this,b)}getAdditionalScopesForProvider(A){var Z;if(!(A!=null&&A.customScopes)||_class_private_field_get(this,L)==="generic")return[];var P;return(P=(Z=A.customScopes)===null||Z===void 0?void 0:Z[_class_private_field_get(this,L)])!==null&&P!==void 0?P:[]}async getCredentials(A){const{url:Z,additionalScope:P,...$}=A,te=_class_private_field_get(this,l).default.slice();P!=null&&P.repoWrite&&te.push(..._class_private_field_get(this,l).repoWrite);const ye=this.getAdditionalScopesForProvider(P);ye.length&&te.push(...ye);const Ge=[...new Set(te)],Ve=await _class_private_field_get(this,G).getAccessToken(Ge,$);return{token:Ve,headers:{Authorization:`Bearer ${Ve}`}}}constructor(A,Z,P,$){_class_private_field_init(this,G,{writable:!0,value:void 0}),_class_private_field_init(this,b,{writable:!0,value:void 0}),_class_private_field_init(this,l,{writable:!0,value:void 0}),_class_private_field_init(this,L,{writable:!0,value:void 0}),_class_private_field_set(this,G,Z),_class_private_field_set(this,b,P),_class_private_field_set(this,l,$),_class_private_field_set(this,L,A)}}var X=t(39619);class K{static fromConfig(A){return X.Lx.fromConfig(A)}}const F=(0,h.T0)({id:"integration.scmintegrations"});var Y=t(52322),V=t(73250),ie=t(2784);const le=I=>{const{type:A}=I,Z=(0,h.qD)(),P=V.Z;var $;const te=A&&($=Z.getSystemIcon(A))!==null&&$!==void 0?$:P;return(0,Y.jsx)(te,{})}},39619:function(tt,Ae,t){"use strict";t.d(Ae,{Lx:function(){return Wt},Pb:function(){return pt}});var h=t(82717),n=t.n(h),m=t(76635);function O(x){const d=new URL("http://example.com");return d.host=x,d.host===x}function G(x){try{return new URL(x),!0}catch{return!1}}function b(x,d){return{list(){return x},byUrl(y){try{const w=typeof y=="string"?new URL(y):y;return x.find(H=>d(H)===w.host)}catch{return}},byHost(y){return x.find(w=>d(w)===y)}}}function l(x){const{url:d,base:y,lineNumber:w}=x;try{return new URL(d),d}catch{}let H;if(d.startsWith("/")){const{filepath:de}=n()(y);H=new URL(y);const ve=(0,m.trimEnd)(H.pathname.substring(0,H.pathname.length-de.length),"/");H.pathname=`${ve}${d}`}else H=new URL(d,y);return H.search=new URL(y).search,w&&(H.hash=`L${w}`),H.toString()}const L="amazonaws.com";function ee(x){const d=x.getOptionalString("endpoint");var y;const w=(y=x.getOptionalBoolean("s3ForcePathStyle"))!==null&&y!==void 0?y:!1;let H,de;if(d){try{const wt=new URL(d);H=wt.host,de=wt.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${d}' is not a valid URL`)}if(de!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${d}'`)}else H=L;const ve=x.getOptionalString("accessKeyId"),Ee=x.getOptionalString("secretAccessKey"),_e=x.getOptionalString("roleArn"),$t=x.getOptionalString("externalId");return{host:H,endpoint:d,s3ForcePathStyle:w,accessKeyId:ve,secretAccessKey:Ee,roleArn:_e,externalId:$t}}function X(x){const d=x.map(ee);return d.some(y=>y.host===L)||d.push({host:L}),d}class K{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){return l(d)}resolveEditUrl(d){return d}constructor(d){this.integrationConfig=d}}K.factory=({config:x})=>{var d;const y=X((d=x.getOptionalConfigArray("integrations.awsS3"))!==null&&d!==void 0?d:[]);return b(y.map(w=>new K(w)),w=>w.config.host)};var F=t(90383),Y=t(22504),V=t(69866);const ie="GB";var le=new WeakMap,I=new WeakMap,A=new WeakMap,Z=new WeakMap,P=new WeakMap,$=new WeakMap,te=new WeakMap;class ye{static fromRepoUrl(d){const y=new URL(d);let w,H,de;const ve=y.pathname.split("/").map(Tn=>decodeURIComponent(Tn));if(ve[2]==="_git"?(w=ve[1],H=de=ve[3]):ve[3]==="_git"?(w=ve[1],H=ve[2],de=ve[4]):ve[4]==="_git"&&(w=`${ve[1]}/${ve[2]}`,H=ve[3],de=ve[5]),!w||!H||!de)throw new Error("Azure URL must point to a git repository");var Ee;const _e=(Ee=y.searchParams.get("path"))!==null&&Ee!==void 0?Ee:void 0;let $t;const wt=y.searchParams.get("version");if(wt){if(wt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");$t=wt.slice(2)}return new ye(y.origin,w,H,de,_e,$t)}toRepoUrl(){let d;return(0,F.Z)(this,A)===(0,F.Z)(this,Z)?d=(0,F.Z)(this,te).call(this,(0,F.Z)(this,I),"_git",(0,F.Z)(this,Z)):d=(0,F.Z)(this,te).call(this,(0,F.Z)(this,I),(0,F.Z)(this,A),"_git",(0,F.Z)(this,Z)),(0,F.Z)(this,P)&&d.searchParams.set("path",(0,F.Z)(this,P)),(0,F.Z)(this,$)&&d.searchParams.set("version",ie+(0,F.Z)(this,$)),d.toString()}toFileUrl(){if(!(0,F.Z)(this,P))throw new Error("Azure URL must point to a specific path to be able to download a file");const d=(0,F.Z)(this,te).call(this,(0,F.Z)(this,I),(0,F.Z)(this,A),"_apis","git","repositories",(0,F.Z)(this,Z),"items");return d.searchParams.set("api-version","6.0"),d.searchParams.set("path",(0,F.Z)(this,P)),(0,F.Z)(this,$)&&d.searchParams.set("version",(0,F.Z)(this,$)),d.toString()}toArchiveUrl(){const d=(0,F.Z)(this,te).call(this,(0,F.Z)(this,I),(0,F.Z)(this,A),"_apis","git","repositories",(0,F.Z)(this,Z),"items");return d.searchParams.set("recursionLevel","full"),d.searchParams.set("download","true"),d.searchParams.set("api-version","6.0"),(0,F.Z)(this,P)&&d.searchParams.set("scopePath",(0,F.Z)(this,P)),(0,F.Z)(this,$)&&d.searchParams.set("version",(0,F.Z)(this,$)),d.toString()}toCommitsUrl(){const d=(0,F.Z)(this,te).call(this,(0,F.Z)(this,I),(0,F.Z)(this,A),"_apis","git","repositories",(0,F.Z)(this,Z),"commits");return d.searchParams.set("api-version","6.0"),(0,F.Z)(this,$)&&d.searchParams.set("searchCriteria.itemVersion.version",(0,F.Z)(this,$)),d.toString()}getOwner(){return(0,F.Z)(this,I)}getProject(){return(0,F.Z)(this,A)}getRepo(){return(0,F.Z)(this,Z)}getPath(){return(0,F.Z)(this,P)}getRef(){return(0,F.Z)(this,$)}constructor(d,y,w,H,de,ve){(0,Y.Z)(this,le,{writable:!0,value:void 0}),(0,Y.Z)(this,I,{writable:!0,value:void 0}),(0,Y.Z)(this,A,{writable:!0,value:void 0}),(0,Y.Z)(this,Z,{writable:!0,value:void 0}),(0,Y.Z)(this,P,{writable:!0,value:void 0}),(0,Y.Z)(this,$,{writable:!0,value:void 0}),(0,Y.Z)(this,te,{writable:!0,value:(...Ee)=>{const _e=new URL((0,F.Z)(this,le));return _e.pathname=Ee.map($t=>encodeURIComponent($t)).join("/"),_e}}),(0,V.Z)(this,le,d),(0,V.Z)(this,I,y),(0,V.Z)(this,A,w),(0,V.Z)(this,Z,H),(0,V.Z)(this,P,de),(0,V.Z)(this,$,ve)}}const Ge="dev.azure.com";function Ve(x){var d;const y=(d=x.getOptionalString("host"))!==null&&d!==void 0?d:Ge,w=x.getOptionalString("token");if(!O(y))throw new Error(`Invalid Azure integration config, '${y}' is not a valid host`);return{host:y,token:w}}function Te(x){const d=x.map(Ve);return d.some(y=>y.host===Ge)||d.push({host:Ge}),d}class Ye{get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const{url:y,base:w}=d;if(G(y))return y;try{const de=ye.fromRepoUrl(w),ve=new URL(w);var H;const Ee=new URL(`https://a.com${(H=de.getPath())!==null&&H!==void 0?H:""}`),_e=new URL(y,Ee).pathname;return ve.searchParams.set("path",_e),d.lineNumber&&(ve.searchParams.set("line",String(d.lineNumber)),ve.searchParams.set("lineEnd",String(d.lineNumber+1)),ve.searchParams.set("lineStartColumn","1"),ve.searchParams.set("lineEndColumn","1")),ve.toString()}catch{return new URL(y,w).toString()}}resolveEditUrl(d){return d}constructor(d){this.integrationConfig=d}}Ye.factory=({config:x})=>{var d;const y=Te((d=x.getOptionalConfigArray("integrations.azure"))!==null&&d!==void 0?d:[]);return b(y.map(w=>new Ye(w)),w=>w.config.host)};var Ke=t(48834).Buffer;function Oe(x){return AzureUrl.fromRepoUrl(x).toFileUrl()}function Fe(x){return AzureUrl.fromRepoUrl(x).toArchiveUrl()}function qe(x){return AzureUrl.fromRepoUrl(x).toCommitsUrl()}function st(x,d){const y=d?{...d}:{};if(x.token){const w=Ke.from(`:${x.token}`,"utf8");y.Authorization=`Basic ${w.toString("base64")}`}return{headers:y}}const nt="bitbucket.org",ct="https://api.bitbucket.org/2.0";function Se(x){var d;const y=(d=x.getOptionalString("host"))!==null&&d!==void 0?d:nt;let w=x.getOptionalString("apiBaseUrl");const H=x.getOptionalString("token"),de=x.getOptionalString("username"),ve=x.getOptionalString("appPassword");if(!O(y))throw new Error(`Invalid Bitbucket integration config, '${y}' is not a valid host`);return w?w=(0,m.trimEnd)(w,"/"):y===nt?w=ct:w=`https://${y}/rest/api/1.0`,{host:y,apiBaseUrl:w,token:H,username:de,appPassword:ve}}function ht(x){const d=x.map(Se);return d.some(y=>y.host===nt)||d.push({host:nt,apiBaseUrl:ct}),d}class mt{get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const y=l(d);if(!d.lineNumber)return y;const w=new URL(y);return this.integrationConfig.host==="bitbucket.org"?w.hash=`lines-${d.lineNumber}`:w.hash=`${d.lineNumber}`,w.toString()}resolveEditUrl(d){const y=n()(d),w=new URL(d);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",y.ref),w.toString()}constructor(d){this.integrationConfig=d}}mt.factory=({config:x})=>{var d,y,w;const H=ht((w=x.getOptionalConfigArray("integrations.bitbucket"))!==null&&w!==void 0?w:[...(d=x.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&d!==void 0?d:[],...(y=x.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&y!==void 0?y:[]]);return b(H.map(de=>new mt(de)),de=>de.config.host)};var Ie=t(96279),q=t(48834).Buffer;async function xe(x,d){const{name:y,owner:w,resource:H}=parseGitUrl(x),de=H==="bitbucket.org";let ve=de?`${d.apiBaseUrl}/repositories/${w}/${y}`:`${d.apiBaseUrl}/projects/${w}/repos/${y}/default-branch`,Ee=await fetch(ve,ut(d));if(Ee.status===404&&!de&&(ve=`${d.apiBaseUrl}/projects/${w}/repos/${y}/branches/default`,Ee=await fetch(ve,ut(d))),!Ee.ok){const $t=`Failed to retrieve default branch from ${ve}, ${Ee.status} ${Ee.statusText}`;throw new Error($t)}let _e;if(de)_e=(await Ee.json()).mainbranch.name;else{const{displayId:$t}=await Ee.json();_e=$t}if(!_e)throw new Error(`Failed to read default branch from ${ve}. Response ${Ee.status} ${Ee.json()}`);return _e}async function Ce(x,d){const{name:y,owner:w,ref:H,protocol:de,resource:ve,filepath:Ee}=parseGitUrl(x),_e=ve==="bitbucket.org";let $t=H;$t||($t=await xe(x,d));const wt=Ee?`&path=${encodeURIComponent(decodeURIComponent(Ee))}`:"";return _e?`${de}://${ve}/${w}/${y}/get/${$t}.tar.gz`:`${d.apiBaseUrl}/projects/${w}/repos/${y}/archive?format=tgz&at=${$t}&prefix=${w}-${y}${wt}`}function Xe(x,d){try{const{owner:y,name:w,ref:H,filepathtype:de,filepath:ve}=parseGitUrl(x);if(!y||!w||de!=="browse"&&de!=="raw"&&de!=="src")throw new Error("Invalid Bitbucket URL or file path");const Ee=ve.replace(/^\//,"");if(d.host==="bitbucket.org"){if(!H)throw new Error("Invalid Bitbucket URL or file path");return`${d.apiBaseUrl}/repositories/${y}/${w}/src/${H}/${Ee}`}return`${d.apiBaseUrl}/projects/${y}/repos/${w}/raw/${Ee}?at=${H}`}catch(y){throw new Error(`Incorrect URL: ${x}, ${y}`)}}function ut(x){const d={};if(x.token)d.Authorization=`Bearer ${x.token}`;else if(x.username&&x.appPassword){const y=q.from(`${x.username}:${x.appPassword}`,"utf8");d.Authorization=`Basic ${y.toString("base64")}`}return{headers:d}}const vt="bitbucket.org",at="https://api.bitbucket.org/2.0";function ae(x){const d=vt,y=at,w=x.getString("username"),H=x.getString("appPassword");return{host:d,apiBaseUrl:y,username:w,appPassword:H}}function ce(x){const d=x.map(ae);return d.length===0&&d.push({host:vt,apiBaseUrl:at}),d}class De{get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const y=l(d);if(d.lineNumber){const w=new URL(y);return w.hash=`lines-${d.lineNumber}`,w.toString()}return y}resolveEditUrl(d){const y=n()(d),w=new URL(d);return w.searchParams.set("mode","edit"),w.searchParams.set("at",y.ref),w.toString()}constructor(d){this.integrationConfig=d}}De.factory=({config:x})=>{var d;const y=ce((d=x.getOptionalConfigArray("integrations.bitbucketCloud"))!==null&&d!==void 0?d:[]);return b(y.map(w=>new De(w)),w=>w.config.host)};var He=t(48834).Buffer;async function Ne(x,d){const{name:y,owner:w}=parseGitUrl(x),H=`${d.apiBaseUrl}/repositories/${w}/${y}`,de=await fetch(H,Rt(d));if(!de.ok){const _e=`Failed to retrieve default branch from ${H}, ${de.status} ${de.statusText}`;throw new Error(_e)}const Ee=(await de.json()).mainbranch.name;if(!Ee)throw new Error(`Failed to read default branch from ${H}. Response ${de.status} ${de.json()}`);return Ee}async function ot(x,d){const{name:y,owner:w,ref:H,protocol:de,resource:ve}=parseGitUrl(x);let Ee=H;return Ee||(Ee=await Ne(x,d)),`${de}://${ve}/${w}/${y}/get/${Ee}.tar.gz`}function dt(x,d){try{const{owner:y,name:w,ref:H,filepathtype:de,filepath:ve}=parseGitUrl(x);if(!y||!w||de!=="src"&&de!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const Ee=ve.replace(/^\//,"");if(!H)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${d.apiBaseUrl}/repositories/${y}/${w}/src/${H}/${Ee}`}catch(y){throw new Error(`Incorrect URL: ${x}, ${y}`)}}function Rt(x){const d={};if(x.username&&x.appPassword){const y=He.from(`${x.username}:${x.appPassword}`,"utf8");d.Authorization=`Basic ${y.toString("base64")}`}return{headers:d}}function kt(x){const d=x.getString("host");let y=x.getOptionalString("apiBaseUrl");const w=x.getOptionalString("token"),H=x.getOptionalString("username"),de=x.getOptionalString("password");if(!O(d))throw new Error(`Invalid Bitbucket Server integration config, '${d}' is not a valid host`);return y?y=(0,m.trimEnd)(y,"/"):y=`https://${d}/rest/api/1.0`,{host:d,apiBaseUrl:y,token:w,username:H,password:de}}function Lt(x){return x.map(kt)}class zt{get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const y=l(d);if(d.lineNumber){const w=new URL(y);return w.hash=d.lineNumber.toString(),w.toString()}return y}resolveEditUrl(d){return d.includes("?")?d.substring(0,d.indexOf("?")):d}constructor(d){this.integrationConfig=d}}zt.factory=({config:x})=>{var d;const y=Lt((d=x.getOptionalConfigArray("integrations.bitbucketServer"))!==null&&d!==void 0?d:[]);return b(y.map(w=>new zt(w)),w=>w.config.host)};var _t=t(48834).Buffer;async function Et(x,d){const{name:y,owner:w}=parseGitUrl(x);let H=`${d.apiBaseUrl}/projects/${w}/repos/${y}/default-branch`,de=await fetch(H,Bt(d));if(de.status===404&&(H=`${d.apiBaseUrl}/projects/${w}/repos/${y}/branches/default`,de=await fetch(H,Bt(d))),!de.ok){const _e=`Failed to retrieve default branch from ${H}, ${de.status} ${de.statusText}`;throw new Error(_e)}const{displayId:ve}=await de.json(),Ee=ve;if(!Ee)throw new Error(`Failed to read default branch from ${H}. Response ${de.status} ${de.json()}`);return Ee}async function cn(x,d){const{name:y,owner:w,ref:H,filepath:de}=parseGitUrl(x);let ve=H;ve||(ve=await Et(x,d));const Ee=de?`&path=${encodeURIComponent(decodeURIComponent(de))}`:"";return`${d.apiBaseUrl}/projects/${w}/repos/${y}/archive?format=tgz&at=${ve}&prefix=${w}-${y}${Ee}`}function xt(x,d){try{const{owner:y,name:w,ref:H,filepathtype:de,filepath:ve}=parseGitUrl(x);if(!y||!w||de!=="browse"&&de!=="raw"&&de!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Ee=ve.replace(/^\//,"");return`${d.apiBaseUrl}/projects/${y}/repos/${w}/raw/${Ee}?at=${H}`}catch(y){throw new Error(`Incorrect URL: ${x}, ${y}`)}}function Bt(x){const d={};if(x.token&&(d.Authorization=`Bearer ${x.token}`),x.username&&x.password){const y=_t.from(`${x.username}:${x.password}`,"utf8");d.Authorization=`Basic ${y.toString("base64")}`}return{headers:d}}function At(x){const d=x.getString("host");let y=x.getOptionalString("baseUrl"),w=x.getOptionalString("cloneUrl"),H=x.getOptionalString("gitilesBaseUrl");const de=x.getOptionalString("username"),ve=x.getOptionalString("password");if(O(d)){if(y&&!G(y))throw new Error(`Invalid Gerrit integration config, '${y}' is not a valid baseUrl`);if(w&&!G(w))throw new Error(`Invalid Gerrit integration config, '${w}' is not a valid cloneUrl`);if(H&&!G(H))throw new Error(`Invalid Gerrit integration config, '${H}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${d}' is not a valid host`);return y?y=(0,m.trimEnd)(y,"/"):y=`https://${d}`,H?H=(0,m.trimEnd)(H,"/"):H=`https://${d}`,w?w=(0,m.trimEnd)(w,"/"):w=y,{host:d,baseUrl:y,cloneUrl:w,gitilesBaseUrl:H,username:de,password:ve}}function yt(x){return x.map(At)}var Kt=t(48834).Buffer;const Vt=")]}'";function en(x,d){const w=d.replace(x.gitilesBaseUrl,"").split("/").filter($t=>!!$t),H=w.indexOf("+");if(H<=0)throw new Error(`Unable to parse project from url: ${d}`);const de=(0,m.trimStart)(w.slice(0,H).join("/"),"/"),ve=w.indexOf("heads");if(ve<=0)throw new Error(`Unable to parse branch from url: ${d}`);const Ee=w[ve+1],_e=w.slice(ve+2).join("/");return{branch:Ee,filePath:_e===""?"/":_e,project:de}}function Zt(x,d,y,w){return`${x.gitilesBaseUrl}/${d}/+/refs/heads/${y}/${(0,m.trimStart)(w,"/")}`}function Ft(x){return x.password?"/a/":"/"}function re(x,d){const{branch:y,project:w}=en(x,d);return`${x.baseUrl}${Ft(x)}projects/${encodeURIComponent(w)}/branches/${y}`}function M(x,d){const{project:y}=en(x,d);return`${x.cloneUrl}${Ft(x)}${y}`}function we(x,d){const{branch:y,filePath:w,project:H}=en(x,d);return`${x.baseUrl}${Ft(x)}projects/${encodeURIComponent(H)}/branches/${y}/files/${encodeURIComponent(w)}/content`}function Re(x){return`${x.baseUrl}${Ft(x)}projects/`}function Je(x){const d={};if(!x.password)return d;const y=Kt.from(`${x.username}:${x.password}`,"utf8");return d.Authorization=`Basic ${y.toString("base64")}`,{headers:d}}async function gt(x){const d=await x.text();if(d.startsWith(Vt))try{return JSON.parse(d.slice(Vt.length))}catch(y){throw new Error(`Invalid response from Gerrit: ${d.slice(0,10)} - ${y}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${d.slice(0,10)}`)}class z{get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const{url:y,base:w,lineNumber:H}=d;let de;if(y.startsWith("/")){const{branch:ve,project:Ee}=en(this.config,w);return Zt(this.config,Ee,ve,y)}return y?de=new URL(y,w):de=new URL(w),H&&(de.hash=H.toString()),de.toString()}resolveEditUrl(d){return d}constructor(d){this.integrationConfig=d}}z.factory=({config:x})=>{var d;const y=yt((d=x.getOptionalConfigArray("integrations.gerrit"))!==null&&d!==void 0?d:[]);return b(y.map(w=>new z(w)),w=>w.config.host)};const j="github.com",se="https://api.github.com",$e="https://raw.githubusercontent.com";function Qe(x){var d,y;const w=(y=x.getOptionalString("host"))!==null&&y!==void 0?y:j;let H=x.getOptionalString("apiBaseUrl"),de=x.getOptionalString("rawBaseUrl");const ve=x.getOptionalString("token"),Ee=(d=x.getOptionalConfigArray("apps"))===null||d===void 0?void 0:d.map(_e=>({appId:_e.getNumber("appId"),clientId:_e.getString("clientId"),clientSecret:_e.getString("clientSecret"),webhookSecret:_e.getString("webhookSecret"),privateKey:_e.getString("privateKey"),allowedInstallationOwners:_e.getOptionalStringArray("allowedInstallationOwners")}));if(!O(w))throw new Error(`Invalid GitHub integration config, '${w}' is not a valid host`);return H?H=(0,m.trimEnd)(H,"/"):w===j&&(H=se),de?de=(0,m.trimEnd)(de,"/"):w===j&&(de=$e),{host:w,apiBaseUrl:H,rawBaseUrl:de,token:ve,apps:Ee}}function et(x){const d=x.map(Qe);return d.some(y=>y.host===j)||d.push({host:j,apiBaseUrl:se,rawBaseUrl:$e}),d}function Ct(x,d,y){try{const{owner:w,name:H,ref:de,filepathtype:ve,filepath:Ee}=parseGitUrl(x);if(!w||!H||!de||ve!=="blob"&&ve!=="raw"&&ve!=="tree")throw new Error("Invalid GitHub URL or file path");const _e=Ee.replace(/^\//,"");return Ht(d,y)==="api"?`${d.apiBaseUrl}/repos/${w}/${H}/contents/${_e}?ref=${de}`:`${d.rawBaseUrl}/${w}/${H}/${de}/${_e}`}catch(w){throw new Error(`Incorrect URL: ${x}, ${w}`)}}function on(x,d){const y={};return Ht(x,d)==="api"&&(y.Accept="application/vnd.github.v3.raw"),d.token&&(y.Authorization=`token ${d.token}`),{headers:y}}function Ht(x,d){return x.apiBaseUrl&&(d.token||!x.rawBaseUrl)?"api":"raw"}var dn=t(31358),Ut=t(89393),Mt=t(26228);class wn{async getOrCreateToken(d,y){const w=this.tokenCache.get(d);if(w&&this.isNotExpired(w.expiresAt))return{accessToken:w.token};const H=await y();return this.tokenCache.set(d,H),{accessToken:H.token}}constructor(){this.tokenCache=new Map,this.isNotExpired=d=>d.diff(Mt.ou.local(),"minutes").minutes>50}}const E={Accept:"application/vnd.github.machine-man-preview+json"};class J{async getInstallationCredentials(d,y){const{installationId:w,suspended:H}=await this.getInstallationData(d);if(this.allowedInstallationOwners){var de;if(!(!((de=this.allowedInstallationOwners)===null||de===void 0)&&de.includes(d)))return{accessToken:void 0}}if(H)throw new Error(`The GitHub application for ${d} is suspended`);const ve=y?`${d}/${y}`:d;return this.cache.getOrCreateToken(ve,async()=>{const Ee=await this.appClient.apps.createInstallationAccessToken({installation_id:w,headers:E});if(y&&Ee.data.repository_selection==="selected"){const $t=new Ut.v({baseUrl:this.baseUrl,auth:Ee.data.token}),wt=await $t.paginate($t.apps.listReposAccessibleToInstallation);var _e;if(!((_e=wt.repositories)!==null&&_e!==void 0?_e:wt).some(fr=>fr.name===y))throw new Error(`The Backstage GitHub application used in the ${d} organization does not have access to a repository with the name ${y}`)}return{token:Ee.data.token,expiresAt:Mt.ou.fromISO(Ee.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(d){const w=(await this.getInstallations()).find(de=>{var ve,Ee;return((ve=de.account)===null||ve===void 0||(Ee=ve.login)===null||Ee===void 0?void 0:Ee.toLocaleLowerCase("en-US"))===d.toLocaleLowerCase("en-US")});if(w)return{installationId:w.id,suspended:Boolean(w.suspended_by)};const H=new Error(`No app installation found for ${d} in ${this.baseAuthConfig.appId}`);throw H.name="NotFoundError",H}constructor(d,y){this.cache=new wn,this.allowedInstallationOwners=d.allowedInstallationOwners,this.baseUrl=y,this.baseAuthConfig={appId:d.appId,privateKey:d.privateKey.replace(/\\n/gm,`
|
|
31
|
-
`)},this.appClient=new Ut.v({baseUrl:y,headers:E,authStrategy:dn.i,auth:this.baseAuthConfig})}}class be{async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(y=>y.getInstallations()))).flat():[]}async getAppToken(d,y){if(this.apps.length===0)return;const w=await Promise.all(this.apps.map(Ee=>Ee.getInstallationCredentials(d,y).then(_e=>({credentials:_e,error:void 0}),_e=>({credentials:void 0,error:_e})))),H=w.find(Ee=>Ee.credentials);if(H)return H.credentials.accessToken;const ve=w.map(Ee=>Ee.error).find(Ee=>Ee.name!=="NotFoundError");if(ve)throw ve}constructor(d){var y,w;this.apps=(w=(y=d.apps)===null||y===void 0?void 0:y.map(H=>new J(H,d.apiBaseUrl)))!==null&&w!==void 0?w:[]}}class ge{async getCredentials(d){const y=n()(d.url),w=y.owner||y.name,H=y.owner?y.name:void 0;let de="app",ve=await this.githubAppCredentialsMux.getAppToken(w,H);return ve||(de="token",ve=this.token),{headers:ve?{Authorization:`Bearer ${ve}`}:void 0,token:ve,type:de}}constructor(d,y){this.githubAppCredentialsMux=d,this.token=y}}ge.create=x=>new ge(new be(x),x.token);class Le{static fromIntegrations(d){const y=new Map;return d.github.list().forEach(w=>{const H=SingleInstanceGithubCredentialsProvider.create(w.config);y.set(w.config.host,H)}),new Le(y)}async getCredentials(d){const y=new URL(d.url),w=this.providers.get(y.host);if(!w)throw new Error(`There is no GitHub integration that matches ${d.url}. Please add a configuration for an integration.`);return w.getCredentials(d)}constructor(d){this.providers=d}}class Be{get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){return pt(l(d),"tree")}resolveEditUrl(d){return pt(d,"edit")}constructor(d){this.integrationConfig=d}}Be.factory=({config:x})=>{var d;const y=et((d=x.getOptionalConfigArray("integrations.github"))!==null&&d!==void 0?d:[]);return b(y.map(w=>new Be(w)),w=>w.config.host)};function pt(x,d){return x.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(y,w,H,de)=>`//${w}/${H}/${de}/${d}/`)}const Ot="gitlab.com",tn="https://gitlab.com/api/v4";function Dt(x){const d=x.getString("host");let y=x.getOptionalString("apiBaseUrl");const w=x.getOptionalString("token");let H=x.getOptionalString("baseUrl");if(y?y=(0,m.trimEnd)(y,"/"):d===Ot&&(y=tn),H?H=(0,m.trimEnd)(H,"/"):H=`https://${d}`,O(d)){if(!y||!G(y))throw new Error(`Invalid GitLab integration config, '${y}' is not a valid apiBaseUrl`);if(!G(H))throw new Error(`Invalid GitLab integration config, '${H}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${d}' is not a valid host`);return{host:d,token:w,apiBaseUrl:y,baseUrl:H}}function an(x){const d=x.map(Dt);return d.some(y=>y.host===Ot)||d.push({host:Ot,apiBaseUrl:tn,baseUrl:`https://${Ot}`}),d}function Tt(x){let d="";return x.host!==Ot&&(d=new URL(x.baseUrl).pathname),trimEnd(d,"/")}async function ln(x,d){const y=await On(x,d);return Cn(x,y,d).toString()}function Wn(x){const{token:d=""}=x;return{headers:{"PRIVATE-TOKEN":d}}}function Cn(x,d,y){try{const w=new URL(x),H=w.pathname.split("/blob/").slice(1).join("/blob/"),[de,...ve]=H.split("/"),Ee=getGitLabIntegrationRelativePath(y);return w.pathname=[...Ee?[Ee]:[],"api/v4/projects",d,"repository/files",encodeURIComponent(decodeURIComponent(ve.join("/"))),"raw"].join("/"),w.search=`?ref=${de}`,w}catch(w){throw new Error(`Incorrect url: ${x}, ${w}`)}}async function On(x,d){const y=new URL(x);if(!y.pathname.includes("/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{let w=y.pathname.split("/-/blob/")[0].split("/blob/")[0];const H=getGitLabIntegrationRelativePath(d);H&&(w=w.replace(H,""));const de=new URL(`${y.origin}${H}/api/v4/projects/${encodeURIComponent(w.replace(/^\//,""))}`),ve=await fetch(de.toString(),Wn(d)),Ee=await ve.json();if(!ve.ok)throw new Error(`GitLab Error '${Ee.error}', ${Ee.error_description}`);return Number(Ee.id)}catch(w){throw new Error(`Could not get GitLab project ID for: ${x}, ${w}`)}}class $n{get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){return l(d)}resolveEditUrl(d){return Xn(d,"edit")}constructor(d){this.integrationConfig=d}}$n.factory=({config:x})=>{var d;const y=an((d=x.getOptionalConfigArray("integrations.gitlab"))!==null&&d!==void 0?d:[]);return b(y.map(w=>new $n(w)),w=>w.config.host)};function Xn(x,d){return x.replace(/\/\-\/(blob|tree|edit)\//,`/-/${d}/`)}class Wt{static fromConfig(d){return new Wt({awsS3:K.factory({config:d}),azure:Ye.factory({config:d}),bitbucket:mt.factory({config:d}),bitbucketCloud:De.factory({config:d}),bitbucketServer:zt.factory({config:d}),gerrit:z.factory({config:d}),github:Be.factory({config:d}),gitlab:$n.factory({config:d})})}get awsS3(){return this.byType.awsS3}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}list(){return Object.values(this.byType).flatMap(d=>d.list())}byUrl(d){let y=Object.values(this.byType).map(w=>w.byUrl(d)).filter(Boolean);if(y.length>1){const w=y.filter(H=>!(H instanceof mt));w.length!==0&&(y=w)}return y[0]}byHost(d){return Object.values(this.byType).map(y=>y.byHost(d)).find(Boolean)}resolveUrl(d){const y=this.byUrl(d.base);return y?y.resolveUrl(d):l(d)}resolveEditUrl(d){const y=this.byUrl(d);return y?y.resolveEditUrl(d):d}constructor(d){this.byType=d}}},71973:function(tt,Ae,t){"use strict";var h={};t.r(h),t.d(h,{TechDocsPlugin:function(){return $.s4}});var n=t(52322),m=t(2784),O=t(28316),G=t(10289),b=t(25248);const l=(0,b.T0)({id:"plugin.techdocs.storageservice"}),L=(0,b.T0)({id:"plugin.techdocs.service"});var ee=t(92077),X=t(95481),K=t(7476),F=t(93225),Y=t(67896),V=t(65124),ie=t(17339),le=t(85478),I=t(68435),A=t(3482),Z=t(42081),P=t(48431),$=t(89258),te=t(52943),ye=t(61886),Ge=t(13980),Ve=t.n(Ge);class Te{get(s){for(const o of this.holders){const u=o.get(s);if(u)return u}}constructor(...s){this.holders=s}}var Ye=t(51837);const Ke=(0,Ye.CT)("api-context"),Oe=a=>{var s;const{apis:o,children:u}=a,f=(s=(0,m.useContext)(Ke))===null||s===void 0?void 0:s.atVersion(1),T=f?new Te(o,f):o;return(0,n.jsx)(Ke.Provider,{value:(0,Ye.EI)({1:T}),children:u})};Oe.propTypes={apis:Ve().shape({get:Ve().func.isRequired}).isRequired,children:Ve().node};class Fe{static validateFactories(s,o){for(const u of o){const f=[u],T=new Set;for(;f.length;){const N=f.shift(),W=s.get(N);if(!!W)for(const ue of Object.values(W.deps)){if(ue.id===u.id)throw new Error(`Circular dependency of api factory for ${u}`);T.has(ue)||(T.add(ue),f.push(ue))}}}}get(s){return this.load(s)}load(s,o=[]){const u=this.apis.get(s.id);if(u)return u;const f=this.factories.get(s);if(!f)return;if(o.includes(f.api))throw new Error(`Circular dependency of api factory for ${f.api}`);const T=this.loadDeps(s,f.deps,[...o,f.api]),N=f.factory(T);return this.apis.set(s.id,N),N}loadDeps(s,o,u){const f={};for(const T in o)if(o.hasOwnProperty(T)){const N=o[T],W=this.load(N,u);if(!W)throw new Error(`No API factory available for dependency ${N} of dependent ${s}`);f[T]=W}return f}constructor(s){this.factories=s,this.apis=new Map}}var qe;(function(a){a[a.default=10]="default",a[a.app=50]="app",a[a.static=100]="static"})(qe||(qe={}));class st{register(s,o){const u=qe[s],f=this.factories.get(o.api.id);return f&&f.priority>=u?!1:(this.factories.set(o.api.id,{priority:u,factory:o}),!0)}get(s){const o=this.factories.get(s.id);if(!!o)return o.factory}getAllApis(){const s=new Set;for(const{factory:o}of this.factories.values())s.add(o.api);return s}constructor(){this.factories=new Map}}function nt(a){return new Promise((s,o)=>{const u=a.width||500,f=a.height||700,T=window.screen.width/2-u/2,N=window.screen.height/2-f/2,W=window.open(a.url,a.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${u},height=${f},top=${N},left=${T}`);let ue="";if(!W||typeof W.closed=="undefined"||W.closed){const it=new Error("Failed to open auth popup.");it.name="PopupRejectedError",o(it);return}const Me=it=>{if(it.source!==W||it.origin!==a.origin)return;const{data:It}=it;if(It.type==="config_info"){ue=It.targetOrigin;return}if(It.type!=="authorization_response")return;const nn=It;if("error"in nn){const Vn=new Error(nn.error.message);Vn.name=nn.error.name,o(Vn)}else s(nn.response);bt()},ze=setInterval(()=>{if(W.closed){const it=`Login failed, ${ue&&ue!==window.location.origin?`Incorrect app origin, expected ${ue}`:"popup was closed"}`,It=new Error(it);It.name="PopupClosedError",o(It),bt()}},100);function bt(){window.removeEventListener("message",Me),clearInterval(ze)}window.addEventListener("message",Me)})}function ct(a){return[...a].join(" ")}class Se{async createSession(s){return s.instantPopup?this.showPopup(s.scopes):this.authRequester(s.scopes)}async refreshSession(){const s=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(u=>{throw new Error(`Auth refresh request failed, ${u}`)});if(!s.ok){const u=new Error(`Auth refresh request failed, ${s.statusText}`);throw u.status=s.status,u}const o=await s.json();if(o.error){const u=new Error(o.error.message);throw o.error.name&&(u.name=o.error.name),u}return await this.sessionTransform(o)}async removeSession(){const s=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(o=>{throw new Error(`Logout request failed, ${o}`)});if(!s.ok){const o=new Error(`Logout request failed, ${s.statusText}`);throw o.status=s.status,o}}async showPopup(s){const o=this.joinScopesFunc(s),u=await this.buildUrl("/start",{scope:o,origin:location.origin}),f=await nt({url:u,name:`${this.provider.title} Login`,origin:new URL(u).origin,width:450,height:730});return await this.sessionTransform(f)}async buildUrl(s,o){const u=await this.discoveryApi.getBaseUrl("auth"),f=this.buildQueryString({...o,env:this.environment});return`${u}/${this.provider.id}${s}${f}`}buildQueryString(s){if(!s)return"";const o=Object.entries(s).map(([u,f])=>{if(typeof f=="string")return`${encodeURIComponent(u)}=${encodeURIComponent(f)}`;if(f)return encodeURIComponent(u)}).filter(Boolean).join("&");return o?`?${o}`:""}constructor(s){const{discoveryApi:o,environment:u,provider:f,joinScopes:T=ct,oauthRequestApi:N,sessionTransform:W=ue=>ue}=s;this.authRequester=N.createAuthRequester({provider:f,onAuthRequest:ue=>this.showPopup(ue)}),this.discoveryApi=o,this.environment=u,this.provider=f,this.joinScopesFunc=T,this.sessionTransform=W}}function ht(a,s){for(const o of s)if(!a.has(o))return!1;return!0}class mt{sessionExistsAndHasScope(s,o){if(!s)return!1;if(!o||this.options.sessionScopes===void 0)return!0;const u=this.options.sessionScopes(s);return ht(u,o)}getExtendedScope(s,o){const u=new Set(this.options.defaultScopes);if(s&&this.options.sessionScopes!==void 0){const f=this.options.sessionScopes(s);for(const T of f)u.add(T)}if(o)for(const f of o)u.add(f);return u}constructor(s){this.options=s}}var Ie=t(82394),q=t.n(Ie);let xe=Symbol.observable;class Ce{[xe](){return this}get closed(){return this.isClosed}next(s){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(s))}error(s){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=s,this.subscribers.forEach(o=>o.error(s))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(s=>s.complete())}subscribe(s,o,u){const f=typeof s=="function"?{next:s,error:o,complete:u}:s;return this.observable.subscribe(f)}constructor(){this.isClosed=!1,this.observable=new(q())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(this.subscribers.add(s),()=>{this.subscribers.delete(s)})),this.subscribers=new Set}}let Xe=Symbol.observable;class ut{[Xe](){return this}get closed(){return this.isClosed}next(s){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=s,this.subscribers.forEach(o=>o.next(s))}error(s){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=s,this.subscribers.forEach(o=>o.error(s))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(s=>s.complete())}subscribe(s,o,u){const f=typeof s=="function"?{next:s,error:o,complete:u}:s;return this.observable.subscribe(f)}constructor(s){this.subscribers=new Set,this.isClosed=!1,this.currentValue=s,this.terminatingError=void 0,this.observable=new(q())(o=>this.isClosed?(this.terminatingError?o.error(this.terminatingError):o.complete(),()=>{}):(o.next(this.currentValue),this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}}class vt{setIsSignedIn(s){this.signedIn!==s&&(this.signedIn=s,this.subject.next(this.signedIn?b.sM.SignedIn:b.sM.SignedOut))}sessionState$(){return this.subject}constructor(){this.subject=new ut(b.sM.SignedOut),this.signedIn=!1}}class at{async getSession(s){if(this.helper.sessionExistsAndHasScope(this.currentSession,s.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const u=await this.collapsedSessionRefresh(),f=this.sessionScopesFunc(this.currentSession),T=this.sessionScopesFunc(u);return ht(T,f)&&(this.currentSession=u),u}catch(u){if(s.optional)return;throw u}}if(!this.currentSession&&!s.instantPopup)try{const o=await this.collapsedSessionRefresh();return this.currentSession=o,this.getSession(s)}catch{}if(!s.optional)return this.currentSession=await this.connector.createSession({...s,scopes:this.helper.getExtendedScope(this.currentSession,s.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(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const s=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),s}finally{delete this.refreshPromise}}constructor(s){this.stateTracker=new vt;const{connector:o,defaultScopes:u=new Set,sessionScopes:f,sessionShouldRefresh:T}=s;this.connector=o,this.sessionScopesFunc=f,this.sessionShouldRefreshFunc=T,this.helper=new mt({sessionScopes:f,defaultScopes:u})}}class ae{setSession(s){this.currentSession=s,this.stateTracker.setIsSignedIn(Boolean(s))}async getSession(s){if(this.helper.sessionExistsAndHasScope(this.currentSession,s.scopes))return this.currentSession;if(!s.optional)return this.currentSession=await this.connector.createSession({...s,scopes:this.helper.getExtendedScope(this.currentSession,s.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}constructor(s){this.stateTracker=new SessionStateTracker;const{connector:o,defaultScopes:u=new Set,sessionScopes:f}=s;this.connector=o,this.helper=new SessionScopeHelper({sessionScopes:f,defaultScopes:u})}}const ce={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class De{static create(s){const{discoveryApi:o,environment:u="development",provider:f=ce,oauthRequestApi:T,defaultScopes:N=[],scopeTransform:W=ze=>ze}=s,ue=new Se({discoveryApi:o,environment:u,provider:f,oauthRequestApi:T,sessionTransform(ze){return{...ze,providerInfo:{idToken:ze.providerInfo.idToken,accessToken:ze.providerInfo.accessToken,scopes:De.normalizeScopes(W,ze.providerInfo.scope),expiresAt:new Date(Date.now()+ze.providerInfo.expiresInSeconds*1e3)}}}}),Me=new at({connector:ue,defaultScopes:new Set(N),sessionScopes:ze=>ze.providerInfo.scopes,sessionShouldRefresh:ze=>(ze.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new De({sessionManager:Me,scopeTransform:W})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(s,o){const u=De.normalizeScopes(this.scopeTransform,s),f=await this.sessionManager.getSession({...o,scopes:u});var T;return(T=f==null?void 0:f.providerInfo.accessToken)!==null&&T!==void 0?T:""}async getIdToken(s={}){const o=await this.sessionManager.getSession(s);var u;return(u=o==null?void 0:o.providerInfo.idToken)!==null&&u!==void 0?u:""}async getBackstageIdentity(s={}){const o=await this.sessionManager.getSession(s);return o==null?void 0:o.backstageIdentity}async getProfile(s={}){const o=await this.sessionManager.getSession(s);return o==null?void 0:o.profile}static normalizeScopes(s,o){if(!o)return new Set;const u=Array.isArray(o)?o:o.split(/[\s|,]/).filter(Boolean);return new Set(s(u))}constructor(s){this.sessionManager=s.sessionManager,this.scopeTransform=s.scopeTransform}}const He={id:"github",title:"GitHub",icon:()=>null};class Ne{static create(s){const{discoveryApi:o,environment:u="development",provider:f=He,oauthRequestApi:T,defaultScopes:N=["read:user"]}=s;return De.create({discoveryApi:o,oauthRequestApi:T,provider:f,environment:u,defaultScopes:N})}}const ot={id:"gitlab",title:"GitLab",icon:()=>null};class dt{static create(s){const{discoveryApi:o,environment:u="development",provider:f=ot,oauthRequestApi:T,defaultScopes:N=["read_user"]}=s;return De.create({discoveryApi:o,oauthRequestApi:T,provider:f,environment:u,defaultScopes:N})}}const Rt={id:"google",title:"Google",icon:()=>null},kt="https://www.googleapis.com/auth/";class Lt{static create(s){const{discoveryApi:o,oauthRequestApi:u,environment:f="development",provider:T=Rt,defaultScopes:N=["openid",`${kt}userinfo.email`,`${kt}userinfo.profile`]}=s;return De.create({discoveryApi:o,oauthRequestApi:u,provider:T,environment:f,defaultScopes:N,scopeTransform(W){return W.map(ue=>ue==="openid"?ue:ue==="profile"||ue==="email"?`${kt}userinfo.${ue}`:ue.startsWith(kt)?ue:`${kt}${ue}`)}})}}const zt={id:"okta",title:"Okta",icon:()=>null},_t=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Et="okta.";class cn{static create(s){const{discoveryApi:o,environment:u="development",provider:f=zt,oauthRequestApi:T,defaultScopes:N=["openid","email","profile","offline_access"]}=s;return De.create({discoveryApi:o,oauthRequestApi:T,provider:f,environment:u,defaultScopes:N,scopeTransform(W){return W.map(ue=>_t.has(ue)||ue.startsWith(Et)?ue:`${Et}${ue}`)}})}}var xt=t(30195);const Bt=xt.z.object({profile:xt.z.object({email:xt.z.string().optional(),displayName:xt.z.string().optional(),picture:xt.z.string().optional()}),backstageIdentity:xt.z.object({token:xt.z.string(),identity:xt.z.object({type:xt.z.literal("user"),userEntityRef:xt.z.string(),ownershipEntityRefs:xt.z.array(xt.z.string())})})}),At={id:"saml",title:"SAML",icon:()=>null};class yt{static create(s){const{discoveryApi:o,environment:u="development",provider:f=At}=s,T=new DirectAuthConnector({discoveryApi:o,environment:u,provider:f}),N=new StaticAuthSessionManager({connector:T}),W=new AuthSessionStore({manager:N,storageKey:`${f.id}Session`,schema:samlSessionSchema});return new yt(W)}sessionState$(){return this.sessionManager.sessionState$()}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(s={}){const o=await this.sessionManager.getSession(s);return o==null?void 0:o.backstageIdentity}async getProfile(s={}){const o=await this.sessionManager.getSession(s);return o==null?void 0:o.profile}constructor(s){this.sessionManager=s}}const Kt={id:"microsoft",title:"Microsoft",icon:()=>null};class Vt{static create(s){const{environment:o="development",provider:u=Kt,oauthRequestApi:f,discoveryApi:T,defaultScopes:N=["openid","offline_access","profile","email","User.Read"]}=s;return De.create({discoveryApi:T,oauthRequestApi:f,provider:u,environment:o,defaultScopes:N})}}const en={id:"onelogin",title:"onelogin",icon:()=>null},Zt=new Set(["openid","profile","email","phone","address","groups","offline_access"]),Ft="onelogin.";class re{static create(s){const{discoveryApi:o,environment:u="development",provider:f=en,oauthRequestApi:T}=s;return De.create({discoveryApi:o,oauthRequestApi:T,provider:f,environment:u,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(N){return N.map(W=>Zt.has(W)||W.startsWith(Ft)?W:`${Ft}${W}`)}})}}const M={id:"bitbucket",title:"Bitbucket",icon:()=>null};class we{static create(s){const{discoveryApi:o,environment:u="development",provider:f=M,oauthRequestApi:T,defaultScopes:N=["team"]}=s;return De.create({discoveryApi:o,oauthRequestApi:T,provider:f,environment:u,defaultScopes:N})}}const Re={id:"atlassian",title:"Atlassian",icon:()=>null};class Je{static create(s){const{discoveryApi:o,environment:u="development",provider:f=Re,oauthRequestApi:T}=s;return De.create({discoveryApi:o,oauthRequestApi:T,provider:f,environment:u})}}class gt{post(s){this.subject.next(s)}alert$(){return this.subject}constructor(){this.subject=new Ce}}class z{captureEvent(s){}}const j="theme";class se{static createWithStorage(s){const o=new se(s);if(!window.localStorage)return o;var u;const f=(u=window.localStorage.getItem(j))!==null&&u!==void 0?u:void 0;return o.setActiveThemeId(f),o.activeThemeId$().subscribe(T=>{T?window.localStorage.setItem(j,T):window.localStorage.removeItem(j)}),window.addEventListener("storage",T=>{if(T.key===j){var N;const W=(N=localStorage.getItem(j))!==null&&N!==void 0?N:void 0;o.setActiveThemeId(W)}}),o}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(s){this.activeThemeId=s,this.subject.next(s)}constructor(s){this.themes=s,this.subject=new ut(void 0)}}var $e=t(9850),Qe=t.n($e),et=t(12782),Ct=t.n(et);const on=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function Ht(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function dn(a){if(a===null)return"null";if(Array.isArray(a))return"array";const s=typeof a;return s==="number"&&isNaN(a)?"nan":s==="string"&&a===""?"empty-string":s}const Ut={type(a,s,o,u){return`Invalid type in config for key '${a}' in '${s}', got ${o}, wanted ${u}`},missing(a){return`Missing required config value at '${a}'`},convert(a,s,o){return`Unable to convert config value for key '${a}' in '${s}' to a ${o}`}};class Mt{static fromConfigs(s){return s.length===0?new Mt(void 0):s.reduce((o,{data:u,context:f,filteredKeys:T,deprecatedKeys:N})=>{const W=new Mt(u,f,o);if(W.filteredKeys=T,N)for(const{key:ue,description:Me}of N)console.warn(`The configuration key '${ue}' of ${f} is deprecated and may be removed soon. ${Me||""}`);return W},void 0)}has(s){var o;if(this.readValue(s)!==void 0)return!0;var f;return(f=(o=this.fallback)===null||o===void 0?void 0:o.has(s))!==null&&f!==void 0?f:!1}keys(){var s;const o=this.data?Object.keys(this.data):[];var u;const f=(u=(s=this.fallback)===null||s===void 0?void 0:s.keys())!==null&&u!==void 0?u:[];return[...new Set([...o,...f])]}get(s){const o=this.getOptional(s);if(o===void 0)throw new Error(Ut.missing(this.fullKey(s!=null?s:"")));return o}getOptional(s){var o;const u=Qe()(this.readValue(s)),f=(o=this.fallback)===null||o===void 0?void 0:o.getOptional(s);if(u===void 0){if(!1)var T;return f}else if(f===void 0)return u;return Ct()({},{value:f},{value:u},(N,W)=>!Ht(W)||!Ht(N)?W:void 0).value}getConfig(s){const o=this.getOptionalConfig(s);if(o===void 0)throw new Error(Ut.missing(this.fullKey(s)));return o}getOptionalConfig(s){var o;const u=this.readValue(s),f=(o=this.fallback)===null||o===void 0?void 0:o.getOptionalConfig(s);if(Ht(u))return this.copy(u,s,f);if(u!==void 0)throw new TypeError(Ut.type(this.fullKey(s),this.context,dn(u),"object"));return f}getConfigArray(s){const o=this.getOptionalConfigArray(s);if(o===void 0)throw new Error(Ut.missing(this.fullKey(s)));return o}getOptionalConfigArray(s){const o=this.readConfigValue(s,f=>{if(!Array.isArray(f))return{expected:"object-array"};for(const[T,N]of f.entries())if(!Ht(N))return{expected:"object-array",value:N,key:`${s}[${T}]`};return!0});if(!o){if(!1)var u;return}return o.map((f,T)=>this.copy(f,`${s}[${T}]`))}getNumber(s){const o=this.getOptionalNumber(s);if(o===void 0)throw new Error(Ut.missing(this.fullKey(s)));return o}getOptionalNumber(s){const o=this.readConfigValue(s,f=>typeof f=="number"||typeof f=="string"||{expected:"number"});if(typeof o=="number"||o===void 0)return o;const u=Number(o);if(!Number.isFinite(u))throw new Error(Ut.convert(this.fullKey(s),this.context,"number"));return u}getBoolean(s){const o=this.getOptionalBoolean(s);if(o===void 0)throw new Error(Ut.missing(this.fullKey(s)));return o}getOptionalBoolean(s){return this.readConfigValue(s,o=>typeof o=="boolean"||{expected:"boolean"})}getString(s){const o=this.getOptionalString(s);if(o===void 0)throw new Error(Ut.missing(this.fullKey(s)));return o}getOptionalString(s){return this.readConfigValue(s,o=>typeof o=="string"&&o!==""||{expected:"string"})}getStringArray(s){const o=this.getOptionalStringArray(s);if(o===void 0)throw new Error(Ut.missing(this.fullKey(s)));return o}getOptionalStringArray(s){return this.readConfigValue(s,o=>{if(!Array.isArray(o))return{expected:"string-array"};for(const[u,f]of o.entries())if(typeof f!="string"||f==="")return{expected:"string-array",value:f,key:`${s}[${u}]`};return!0})}fullKey(s){return`${this.prefix}${this.prefix?".":""}${s}`}copy(s,o,u){const f=new Mt(s,this.context,u,this.fullKey(o));return f.filteredKeys=this.filteredKeys,f}readConfigValue(s,o){const u=this.readValue(s);if(u===void 0){var f;if(!1)var T;return(f=this.fallback)===null||f===void 0?void 0:f.readConfigValue(s,o)}const N=o(u);if(N!==!0){const{key:W=s,value:ue=u,expected:Me}=N;throw new TypeError(Ut.type(this.fullKey(W),this.context,dn(ue),Me))}return u}readValue(s){const o=s?s.split("."):[];for(const f of o)if(!on.test(f))throw new TypeError(`Invalid config key '${s}'`);if(this.data===void 0)return;let u=this.data;for(const[f,T]of o.entries())if(Ht(u))u=u[T];else if(u!==void 0){const N=this.fullKey(o.slice(0,f).join("."));throw new TypeError(Ut.type(N,this.context,dn(u),"object"))}return u}constructor(s,o="mock-config",u,f=""){this.data=s,this.context=o,this.fallback=u,this.prefix=f,this.notifiedFilteredKeys=new Set}}const wn="Invalid discovery URL pattern,";class E{static compile(s){const o=s.split(/\{\{\s*pluginId\s*\}\}/),u=o.join("pluginId");let f;try{f=new URL(u)}catch{throw new Error(`${wn} URL '${u}' is invalid`)}if(f.hash)throw new Error(`${wn} URL must not have a hash`);if(f.search)throw new Error(`${wn} URL must not have a query`);if(u.endsWith("/"))throw new Error(`${wn} URL must not end with a slash`);return new E(o)}async getBaseUrl(s){return this.parts.join(s)}constructor(s){this.parts=s}}class J{post(s,o){return o!=null&&o.hidden||this.alertApi.post({message:s.message,severity:"error"}),this.errorApi.post(s,o)}error$(){return this.errorApi.error$()}constructor(s,o){this.alertApi=s,this.errorApi=o}}class be{post(s,o){this.subject.next({error:s,context:o})}error$(){return this.subject}constructor(){this.subject=new Ce}}class ge{static forward(s,o){window.addEventListener("unhandledrejection",u=>{s.post(u.reason,o)})}}function Le(a){if(a.length<3)throw new Error(`The '${a}' feature flag must have a minimum length of three characters.`);if(a.length>150)throw new Error(`The '${a}' feature flag must not exceed 150 characters.`);if(!a.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${a}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class Be{registerFlag(s){Le(s.name),this.registeredFeatureFlags.push(s)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(s){return this.flags||(this.flags=this.load()),this.flags.get(s)===b.CL.Active}save(s){this.flags||(this.flags=this.load()),s.merge||this.flags.clear();for(const[u,f]of Object.entries(s.states))this.flags.set(u,f);const o=Array.from(this.flags.entries()).filter(([,u])=>u===b.CL.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(o)))}load(){try{const s=window.localStorage.getItem("featureFlags");if(!s)return new Map;const o=JSON.parse(s);if(typeof o!="object"||o===null||Array.isArray(o))return new Map;const u=Object.entries(o).filter(([f,T])=>(Le(f),T===b.CL.Active));return new Map(u)}catch{return new Map}}constructor(){this.registeredFeatureFlags=[]}}function pt(a){let s=a.baseImplementation||t.g.fetch;var o;const u=[(o=a.middleware)!==null&&o!==void 0?o:[]].flat().reverse();for(const f of u)s=f.apply(s);return{fetch:s}}class Ot{static create(s){var o,u;const f=tn(s),T=((o=s.header)===null||o===void 0?void 0:o.name)||"authorization",N=((u=s.header)===null||u===void 0?void 0:u.value)||(W=>`Bearer ${W}`);return new Ot(s.identityApi,f,T,N)}apply(s){return async(o,u)=>{const f=new Request(o,u),{token:T}=await this.identityApi.getCredentials();return f.headers.get(this.headerName)||typeof T!="string"||!T||!this.allowUrl(f.url)?s(o,u):(f.headers.set(this.headerName,this.headerValue(T)),s(f))}}constructor(s,o,u,f){this.identityApi=s,this.allowUrl=o,this.headerName=u,this.headerValue=f}}function tn(a){return a.allowUrl?a.allowUrl:a.urlPrefixAllowlist?Dt(a.urlPrefixAllowlist):a.config?Dt([a.config.getString("backend.baseUrl")]):()=>!1}function Dt(a){const s=a.map(o=>o.replace(/\/$/,""));return o=>s.some(u=>o===u||o.startsWith(`${u}/`))}function an(a,s){return!s||s==="/"?a:`${a.replace(/\/$/,"")}/${s.replace(/^\//,"")}`}class Tt{apply(s){return async(o,u)=>{const f=new Request(o,u),T="plugin://";if(!f.url.startsWith(T))return s(o,u);const{hostname:N,pathname:W,search:ue,hash:Me,username:ze,password:bt}=new URL(`http://${f.url.substring(T.length)}`);let it=await this.discoveryApi.getBaseUrl(N);if(ze||bt){const nn=new URL(it),Vn=`${ze}${bt?`:${bt}`:""}@`;it=`${nn.protocol}//${Vn}${nn.host}${nn.pathname}`}const It=`${an(it,W)}${ue}${Me}`;return s(It,typeof o=="string"||ln(o)?u:o)}}constructor(s){this.discoveryApi=s}}function ln(a){return typeof a=="object"&&(a==null?void 0:a.constructor)===URL}class Wn{static resolvePluginProtocol(s){return new Tt(s.discoveryApi)}static injectIdentityAuth(s){return Ot.create(s)}constructor(){}}function Cn(a,s){for(const o of s)if(!a.has(o))return!1;return!0}function On(a,...s){const o=new Set(a);for(const u of s)for(const f of u)o.add(f);return o}class $n{request(s){return new Promise((o,u)=>{this.requests.push({scopes:s,resolve:o,reject:u}),this.subject.next(this.getCurrentPending())})}resolve(s,o){this.requests=this.requests.filter(u=>Cn(s,u.scopes)?(u.resolve(o),!1):!0),this.subject.next(this.getCurrentPending())}reject(s){this.requests.forEach(o=>o.reject(s)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const s=this.requests.length===0?void 0:this.requests.slice(1).reduce((o,u)=>On(o,u.scopes),this.requests[0].scopes);return{scopes:s,resolve:o=>{s&&this.resolve(s,o)},reject:o=>{s&&this.reject(o)}}}constructor(){this.requests=[],this.subject=new ut(this.getCurrentPending())}}class Xn{createAuthRequester(s){const o=new $n,u=this.handlerCount;return this.handlerCount++,o.pending().subscribe({next:f=>{const T=this.currentRequests.slice(),N=this.makeAuthRequest(f,s);N?T[u]=N:delete T[u],this.currentRequests=T,this.subject.next(T.filter(Boolean))}}),f=>o.request(f)}makeAuthRequest(s,o){const{scopes:u}=s;if(!!u)return{provider:o.provider,trigger:async()=>{const f=await o.onAuthRequest(u);s.resolve(f)},reject:()=>{const f=new Error("Login failed, rejected by user");f.name="RejectedError",s.reject(f)}}}authRequest$(){return this.subject}constructor(){this.subject=new ut([]),this.currentRequests=[],this.handlerCount=0}}const Wt=new Map;class x{static create(s){var o;return new x((o=s.namespace)!==null&&o!==void 0?o:"",s.errorApi)}get(s){return this.snapshot(s).value}snapshot(s){let o,u="absent";try{const f=localStorage.getItem(this.getKeyName(s));f&&(o=JSON.parse(f,(T,N)=>(typeof N=="object"&&N!==null&&Object.freeze(N),N)),u="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${s}`))}return{key:s,value:o,presence:u}}forBucket(s){const o=`${this.namespace}/${s}`;return Wt.has(o)||Wt.set(o,new x(o,this.errorApi)),Wt.get(o)}async set(s,o){localStorage.setItem(this.getKeyName(s),JSON.stringify(o)),this.notifyChanges(s)}async remove(s){localStorage.removeItem(this.getKeyName(s)),this.notifyChanges(s)}observe$(s){return this.observable.filter(({key:o})=>o===s)}getKeyName(s){return`${this.namespace}/${encodeURIComponent(s)}`}notifyChanges(s){const o=this.snapshot(s);for(const u of this.subscribers)u.next(o)}constructor(s,o){this.namespace=s,this.errorApi=o,this.subscribers=new Set,this.observable=new(q())(u=>(this.subscribers.add(u),()=>{this.subscribers.delete(u)}))}}var d=t(64279);function y(a){const s={};for(const u in a.collectors)a.collectors.hasOwnProperty(u)&&(s[u]=a.collectors[u]());const o=[{node:m.Children.toArray(a.root),parent:void 0,contexts:{}}];for(;o.length!==0;){const{node:u,parent:f,contexts:T}=o.shift();m.Children.forEach(u,N=>{if(!(0,m.isValidElement)(N))return;const W={};for(const ue in s)if(s.hasOwnProperty(ue)){const Me=s[ue];W[ue]=Me.visit(Me.accumulator,N,f,T[ue])}for(const ue of a.discoverers){const Me=ue(N);Me&&o.push({node:Me,parent:N,contexts:W})}})}return Object.fromEntries(Object.entries(s).map(([u,f])=>[u,f.accumulator]))}function w(a,s){return()=>({accumulator:a(),visit:s})}function H(a){var s;return(s=a.props)===null||s===void 0?void 0:s.children}function de(a){var s,o;if(((s=a.props)===null||s===void 0?void 0:s.path)&&((o=a.props)===null||o===void 0?void 0:o.element)){var u;return(u=a.props)===null||u===void 0?void 0:u.element}}const ve=w(()=>new Set,(a,s)=>{const o=(0,b.IY)(s,"core.plugin");o&&a.add(o)}),Ee=a=>{const{children:s}=a,o=(0,b.h_)(b.W0),u="with"in a?o.isActive(a.with):!o.isActive(a.without);return(0,n.jsx)(n.Fragment,{children:u?s:null})};(0,b.R5)(Ee,"core.featureFlagged",!0);const _e={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},$t=w(()=>({paths:new Map,parents:new Map,objects:new Array}),(a,s,o,u)=>{var f,T,N;if((o==null?void 0:o.props.element)===s)return u;let W=u==null?void 0:u.obj,ue=u==null?void 0:u.routeRef,Me=u==null?void 0:u.sticky;const ze=(f=s.props)===null||f===void 0?void 0:f.path;var bt;const it=(bt=W==null?void 0:W.children)!==null&&bt!==void 0?bt:a.objects,It=Boolean((T=s.props)===null||T===void 0?void 0:T.caseSensitive);let nn=u==null?void 0:u.path;if((0,b.IY)(s,"core.gatherMountPoints")){if(!ze)throw new Error("Mount point gatherer must have a path");nn=ze}const Vn=(N=s.props)===null||N===void 0?void 0:N.element;let En=(0,b.IY)(s,"core.mountPoint");if(!En&&(0,m.isValidElement)(Vn)&&(En=(0,b.IY)(Vn,"core.mountPoint")),En){let Rr=ze;if(nn&&(Rr?nn=void 0:Rr=nn),!Rr)throw new Error("Mounted routable extension must have a path");a.paths.set(En,Rr),ue&&Me?(a.parents.set(En,ue),ze&&(ue=En,Me=!1)):(a.parents.set(En,ue),ue=En),ze?(W={caseSensitive:It,path:ze,element:"mounted",routeRefs:new Set([En]),children:[_e],plugin:(0,b.IY)(s.props.element,"core.plugin")},it.push(W)):W==null||W.routeRefs.add(En)}if((0,b.IY)(s,"core.gatherMountPoints")&&(Me=!0),(0,b.IY)(s,"core.gatherMountPoints")){if(!ze)throw new Error("Mount point gatherer must have a path");if(!En){var lr;W={caseSensitive:It,path:ze,element:"gathered",routeRefs:new Set,children:[_e],plugin:u==null||(lr=u.obj)===null||lr===void 0?void 0:lr.plugin},it.push(W)}}return{obj:W,path:nn,routeRef:ue,sticky:Me}}),wt=w(()=>new Set,(a,s)=>{if(s.type===Ee){const o=s.props;a.add("with"in o?o.with:o.without)}}),Tn=(0,Ye.uW)("route-ref-type",()=>Symbol("route-ref-type"));function pr(a){return a[Tn]==="absolute"}function fr(a){return a[Tn]==="sub"}function Jr(a){return a[Tn]==="external"}function kr(...a){const s=a.join("/").replace(/\/\/+/g,"/");return s!=="/"&&s.endsWith("/")?s.slice(0,-1):s}function Qr(a,s,o){let u,f="";if(pr(a))u=a;else if(fr(a))u=a.parent,f=a.path;else if(Jr(a)){const W=o.get(a);if(!W)return[void 0,""];if(pr(W))u=W;else if(fr(W))u=W.parent,f=W.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${W}`)}else throw a[Tn]?new Error(`Unknown or invalid route ref type, ${a[Tn]}`):new Error(`Unknown object passed to useRouteRef, got ${a}`);if(!u)return[void 0,""];const T=s.get(u);if(!T)return[void 0,""];const N=kr(T,f);return[u,N]}function xr(a,s,o,u,f){var T;const N=(T=(0,G.fp)(f,s))!==null&&T!==void 0?T:[],W=Array();let ue=-1;for(let bt=a;bt&&(ue=N.findIndex(it=>it.route.routeRefs.has(bt)),ue===-1);bt=u.get(bt))W.unshift(bt);W.length===0&&(ue-=1);const Me=ue===-1?"":N[ue].pathname,ze=kr(...W.slice(0,-1).map(bt=>{const it=o.get(bt);if(!it)throw new Error(`No path for ${bt}`);if(it.includes(":"))throw new Error(`Cannot route to ${a} with parent ${bt} as it has parameters`);return it}));return Me+ze}class Xr{resolve(s,o){const[u,f]=Qr(s,this.routePaths,this.routeBindings);if(!u)return;let T;typeof o=="string"?T=this.trimPath(o):o.pathname?T={...o,pathname:this.trimPath(o.pathname)}:T=o;const N=this.appBasePath+xr(u,T,this.routePaths,this.routeParents,this.routeObjects);return(...[ue])=>N+(0,G.Gn)(f,ue)}trimPath(s){return s&&(s.startsWith(this.appBasePath)?s.slice(this.appBasePath.length):s)}constructor(s,o,u,f,T){this.routePaths=s,this.routeParents=o,this.routeObjects=u,this.routeBindings=f,this.appBasePath=T}}const qr=(0,Ye.CT)("routing-context"),Or=({routePaths:a,routeParents:s,routeObjects:o,routeBindings:u,basePath:f="",children:T})=>{const N=new Xr(a,s,o,u,f),W=(0,Ye.EI)({1:N});return(0,n.jsx)(qr.Provider,{value:W,children:T})},_r=(a,s)=>{try{var o,u;const f=(0,G.fp)(s,{pathname:a}),T=(o=f==null?void 0:f.filter(W=>{var ue;return((ue=W==null?void 0:W.route.routeRefs)===null||ue===void 0?void 0:ue.size)>0}).pop())===null||o===void 0?void 0:o.route;if(!T)return{};let N;return T.routeRefs.size===1&&(N=T.routeRefs.values().next().value),{extension:"App",pluginId:((u=T.plugin)===null||u===void 0?void 0:u.getId())||"root",...N?{routeRef:N.id}:{}}}catch{return{}}},Bn=({pathname:a,search:s,hash:o})=>{const u=(0,b.z$)();return(0,m.useEffect)(()=>{u.captureEvent("navigate",`${a}${s}${o}`)},[u,a,s,o]),null},In=({routeObjects:a})=>{const{pathname:s,search:o,hash:u}=(0,G.TH)();return(0,n.jsx)(b.fC,{attributes:_r(s,a),children:(0,n.jsx)(Bn,{pathname:s,search:o,hash:u})})};function or(a,s){const o=new Set(s.values());o.delete(void 0);for(const u of s.keys()){if(o.has(u))continue;let f=u,T="";for(;f;){const W=a.get(f);if(!W)throw new Error(`No path for ${f}`);T=`${W}${T}`,f=s.get(f)}const N=T.match(/:(\w+)/g);if(N){for(let W=0;W<N.length;W++)for(let ue=W+1;ue<N.length;ue++)if(N[ue]===N[W])throw new Error(`Parameter ${N[ue]} is duplicated in path ${T}`)}}}function gr(a,s){for(const o of s)if(!!o.externalRoutes){for(const[u,f]of Object.entries(o.externalRoutes))if(!f.optional&&!a.has(f))throw new Error(`External route '${u}' of the '${o.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const es=(0,Ye.CT)("app-context"),ts=({appContext:a,children:s})=>{const o=(0,Ye.EI)({1:a});return(0,n.jsx)(es.Provider,{value:o,children:s})};function br(a){return new Error(`Tried to access IdentityApi ${a} before app was loaded`)}function Sr(a){console.warn(`WARNING: Call to ${a} is deprecated and will break in the future`)}class ns{setTarget(s,o){this.target=s,this.signOutTargetUrl=o.signOutTargetUrl,this.resolveTarget(s)}getUserId(){if(!this.target)throw br("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Sr("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw br("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Sr("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(s=>s.getProfileInfo())}async getBackstageIdentity(){const s=await this.waitForTarget.then(o=>o.getBackstageIdentity());return s.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${s.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),s}async getCredentials(){return this.waitForTarget.then(s=>s.getCredentials())}async getIdToken(){return this.waitForTarget.then(s=>{if(!s.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Sr("getIdToken"),s.getIdToken()})}async signOut(){await this.waitForTarget.then(s=>s.signOut()),location.href=this.signOutTargetUrl}constructor(){this.resolveTarget=()=>{},this.signOutTargetUrl="/",this.waitForTarget=new Promise(s=>{this.resolveTarget=s})}}var wr=t(72164);function Rn(a,s,o){if(a!==void 0){const f=o.find(T=>T.id===a);if(f)return f}if(s){const f=o.find(T=>T.variant==="dark");if(f)return f}const u=o.find(f=>f.variant==="light");return u||o[0]}const Zn=()=>{const a=(0,m.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[s,o]=(0,m.useState)(a.matches);return(0,m.useEffect)(()=>{const u=f=>{o(f.matches)};return a.addListener(u),()=>{a.removeListener(u)}},[a]),s};function ir({children:a}){const s=(0,b.h_)(b.hg),o=(0,wr.Z)(s.activeThemeId$(),s.getActiveThemeId()),u=Boolean(window.matchMedia)?Zn():!1,f=Rn(o,u,s.getInstalledThemes());if(!f)throw new Error("App has no themes");return(0,n.jsx)(f.Provider,{children:a})}const rs=async(a="__APP_INJECTED_RUNTIME_CONFIG__")=>{const s=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!s)throw new Error("No static configuration provided");if(!Array.isArray(s))throw new Error("Static configuration has invalid format");const o=s.slice();if(a!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const f=JSON.parse(a);Array.isArray(f)?o.push(...f):o.push({data:f,context:"env"})}catch(f){throw new Error(`Failed to load runtime configuration, ${f}`)}const u=window.__APP_CONFIG__;return u&&o.push({context:"window",data:u}),o};class Cr{add(s,o){return this.apis.push([s.id,o]),o}build(){return new Gn(new Map(this.apis))}constructor(){this.apis=[]}}class Gn{static builder(){return new Cr}static from(s){return new Gn(new Map(s.map(([o,u])=>[o.id,u])))}static with(s,o){return new Gn(new Map([[s.id,o]]))}with(s,o){return new Gn(new Map([...this.apis,[s.id,o]]))}get(s){return this.apis.get(s.id)}constructor(s){this.apis=s}}function Rs(a){const s=new Map;return a&&a({bind:(u,f)=>{for(const[T,N]of Object.entries(f)){const W=u[T];if(!W)throw new Error(`Key ${T} is not an existing external route`);if(!N&&!W.optional)throw new Error(`External route ${T} is required but was undefined`);N&&s.set(W,N)}}}),s}const ss=(0,m.createContext)({routeObjects:[]});function ar(a){var s;let{pathname:o}=new URL((s=a.getOptionalString("app.baseUrl"))!==null&&s!==void 0?s:"/","http://dummy.dev");return o=o.replace(/\/*$/,""),o}function Ls(a,s,o){const u=Boolean(a),f=(0,d.default)(a||(()=>Promise.resolve([])));let T;if(u&&f.loading){const{Progress:Me}=s;T=(0,n.jsx)(Me,{})}else if(f.error){const{BootErrorPage:Me}=s;T=(0,n.jsx)(Me,{step:"load-config",error:f.error})}const{ThemeProvider:N=ir}=s;if(T)return{node:(0,n.jsx)(Oe,{apis:Gn.with(b.hg,o),children:(0,n.jsx)(N,{children:T})})};var W;return{api:Mt.fromConfigs((W=f.value)!==null&&W!==void 0?W:[])}}class os{getPlugins(){return this.app.getPlugins()}getSystemIcon(s){return this.app.getSystemIcon(s)}getSystemIcons(){return this.app.getSystemIcons()}getComponents(){return this.app.getComponents()}constructor(s){this.app=s}}class $r{getPlugins(){return Array.from(this.plugins)}getSystemIcon(s){return this.icons[s]}getSystemIcons(){return this.icons}getComponents(){return this.components}getProvider(){const s=new os(this);let o=!1;return({children:f})=>{const T=(0,m.useMemo)(()=>se.createWithStorage(this.themes),[]),{routing:N,featureFlags:W,routeBindings:ue}=(0,m.useMemo)(()=>{const it=y({root:f,discoverers:[H,de],collectors:{routing:$t,collectedPlugins:ve,featureFlags:wt}});return it.collectedPlugins.forEach(It=>this.plugins.add(It)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...it,routeBindings:Rs(this.bindRoutes)}},[f]);o||(o=!0,or(N.paths,N.parents),gr(ue,this.plugins));const Me=Ls(this.configLoader,this.components,T),ze="api"in Me;if(ze){const{api:it}=Me;this.configApi=it}if((0,m.useEffect)(()=>{if(ze){const it=this.getApiHolder().get(b.W0);for(const It of this.plugins.values())if("getFeatureFlags"in It)for(const nn of It.getFeatureFlags())it.registerFlag({name:nn.name,pluginId:It.getId()});else for(const nn of It.output())nn.type==="feature-flag"&&it.registerFlag({name:nn.name,pluginId:It.getId()});for(const It of W)it.registerFlag({name:It,pluginId:""})}},[ze,Me,W]),"node"in Me)return Me.node;const{ThemeProvider:bt=ir}=this.components;return(0,n.jsx)(Oe,{apis:this.getApiHolder(),children:(0,n.jsx)(ts,{appContext:s,children:(0,n.jsx)(bt,{children:(0,n.jsx)(Or,{routePaths:N.paths,routeParents:N.parents,routeObjects:N.objects,routeBindings:ue,basePath:ar(Me.api),children:(0,n.jsx)(ss.Provider,{value:{routeObjects:N.objects},children:f})})})})})}}getRouter(){const{Router:s,SignInPage:o}=this.components,u=({component:T,children:N})=>{const[W,ue]=(0,m.useState)(),Me=(0,b.h_)(b.Ds),ze=ar(Me);return W?(this.appIdentityProxy.setTarget(W,{signOutTargetUrl:ze||"/"}),N):(0,n.jsx)(T,{onSignInSuccess:ue})};return({children:T})=>{const N=(0,b.h_)(b.Ds),W=ar(N),ue=`${W}/*`,{routeObjects:Me}=(0,m.useContext)(ss);return o?(0,n.jsxs)(s,{children:[(0,n.jsx)(In,{routeObjects:Me}),(0,n.jsx)(u,{component:o,children:(0,n.jsx)(G.Z5,{children:(0,n.jsx)(G.AW,{path:ue,element:(0,n.jsx)(n.Fragment,{children:T})})})})]}):(this.appIdentityProxy.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:W||"/"}),(0,n.jsxs)(s,{children:[(0,n.jsx)(In,{routeObjects:Me}),(0,n.jsx)(G.Z5,{children:(0,n.jsx)(G.AW,{path:ue,element:(0,n.jsx)(n.Fragment,{children:T})})})]}))}}getApiHolder(){if(this.apiHolder){for(const s of this.plugins)for(const o of s.getApis())this.apiFactoryRegistry.get(o.api)||this.apiFactoryRegistry.register("default",o);return Fe.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:b.hg,deps:{},factory:()=>se.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:b.Ds,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:b.$4,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:b.W0,deps:{},factory:()=>new Be});for(const s of this.defaultApis)this.apiFactoryRegistry.register("default",s);for(const s of this.plugins)for(const o of s.getApis())if(!this.apiFactoryRegistry.register("default",o))throw new Error(`Plugin ${s.getId()} tried to register duplicate or forbidden API factory for ${o.api}`);for(const s of this.apis)if(!this.apiFactoryRegistry.register("app",s))throw new Error(`Duplicate or forbidden API factory for ${s.api} in app`);return Fe.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new Fe(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(s){const o=new Set;for(const u of s){const f=u.getId();if(o.has(f))throw new Error(`Duplicate plugin found '${f}'`);o.add(f)}}constructor(s){this.appIdentityProxy=new ns;var o;this.apis=(o=s.apis)!==null&&o!==void 0?o:[],this.icons=s.icons;var u;this.plugins=new Set((u=s.plugins)!==null&&u!==void 0?u:[]),this.components=s.components,this.themes=s.themes;var f;this.configLoader=(f=s.configLoader)!==null&&f!==void 0?f:rs;var T;this.defaultApis=(T=s.defaultApis)!==null&&T!==void 0?T:[],this.bindRoutes=s.bindRoutes,this.apiFactoryRegistry=new st}}function is(a){return new $r(a)}const as=a=>{const s=(0,b.qD)(),{NotFoundErrorPage:o}=s.getComponents(),u=(0,b.vJ)(a.children,f=>f.getElements().flatMap(T=>{let N=T.props.path;if(N==="")return[];var W;return N=(W=N==null?void 0:N.replace(/\/\*$/,""))!==null&&W!==void 0?W:"/",[{path:N,element:T,children:T.props.children?[{path:N==="/"?"/":"/*",element:T.props.children}]:void 0}]}).sort((T,N)=>N.path.localeCompare(T.path)).map(T=>(T.path=T.path==="/"?"/":`${T.path}/*`,T)));return u.push({element:(0,n.jsx)(o,{}),path:"/*"}),(0,G.V$)(u)};var Br=t(73001);const ls=[(0,b.ni)({api:b.NW,deps:{configApi:b.Ds},factory:({configApi:a})=>E.compile(`${a.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,b.ni)({api:b.$v,deps:{},factory:()=>new gt}),(0,b.ni)({api:b.v_,deps:{},factory:()=>new z}),(0,b.ni)({api:b.VE,deps:{alertApi:b.$v},factory:({alertApi:a})=>{const s=new J(a,new be);return ge.forward(s,{hidden:!1}),s}}),(0,b.ni)({api:b.E6,deps:{errorApi:b.VE},factory:({errorApi:a})=>x.create({errorApi:a})}),(0,b.ni)({api:b.gP,deps:{configApi:b.Ds,identityApi:b.$4,discoveryApi:b.NW},factory:({configApi:a,identityApi:s,discoveryApi:o})=>pt({middleware:[Wn.resolvePluginProtocol({discoveryApi:o}),Wn.injectIdentityAuth({identityApi:s,config:a})]})}),(0,b.ni)({api:b.ZM,deps:{},factory:()=>new Xn}),(0,b.ni)({api:b.Kp,deps:{discoveryApi:b.NW,oauthRequestApi:b.ZM,configApi:b.Ds},factory:({discoveryApi:a,oauthRequestApi:s,configApi:o})=>Lt.create({discoveryApi:a,oauthRequestApi:s,environment:o.getOptionalString("auth.environment")})}),(0,b.ni)({api:b.p_,deps:{discoveryApi:b.NW,oauthRequestApi:b.ZM,configApi:b.Ds},factory:({discoveryApi:a,oauthRequestApi:s,configApi:o})=>Vt.create({discoveryApi:a,oauthRequestApi:s,environment:o.getOptionalString("auth.environment")})}),(0,b.ni)({api:b.F4,deps:{discoveryApi:b.NW,oauthRequestApi:b.ZM,configApi:b.Ds},factory:({discoveryApi:a,oauthRequestApi:s,configApi:o})=>Ne.create({discoveryApi:a,oauthRequestApi:s,defaultScopes:["read:user"],environment:o.getOptionalString("auth.environment")})}),(0,b.ni)({api:b.D,deps:{discoveryApi:b.NW,oauthRequestApi:b.ZM,configApi:b.Ds},factory:({discoveryApi:a,oauthRequestApi:s,configApi:o})=>cn.create({discoveryApi:a,oauthRequestApi:s,environment:o.getOptionalString("auth.environment")})}),(0,b.ni)({api:b.ux,deps:{discoveryApi:b.NW,oauthRequestApi:b.ZM,configApi:b.Ds},factory:({discoveryApi:a,oauthRequestApi:s,configApi:o})=>dt.create({discoveryApi:a,oauthRequestApi:s,environment:o.getOptionalString("auth.environment")})}),(0,b.ni)({api:b.gW,deps:{discoveryApi:b.NW,oauthRequestApi:b.ZM,configApi:b.Ds},factory:({discoveryApi:a,oauthRequestApi:s,configApi:o})=>re.create({discoveryApi:a,oauthRequestApi:s,environment:o.getOptionalString("auth.environment")})}),(0,b.ni)({api:b.bq,deps:{discoveryApi:b.NW,oauthRequestApi:b.ZM,configApi:b.Ds},factory:({discoveryApi:a,oauthRequestApi:s,configApi:o})=>we.create({discoveryApi:a,oauthRequestApi:s,defaultScopes:["team"],environment:o.getOptionalString("auth.environment")})}),(0,b.ni)({api:b.uB,deps:{discoveryApi:b.NW,oauthRequestApi:b.ZM,configApi:b.Ds},factory:({discoveryApi:a,oauthRequestApi:s,configApi:o})=>Je.create({discoveryApi:a,oauthRequestApi:s,environment:o.getOptionalString("auth.environment")})}),(0,b.ni)({api:Br.RV,deps:{discovery:b.NW,identity:b.$4,config:b.Ds},factory:({config:a,discovery:s,identity:o})=>Br.iM.create({config:a,discovery:s,identity:o})})];var cs=t(77277),Yt=t(15018),jr=t(62833);function Zr({children:a}){return(0,G.GV)()?(0,n.jsx)(n.Fragment,{children:a}):(0,n.jsx)(G.VA,{children:a})}const qn=()=>(0,n.jsx)(Yt.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}),un=({step:a,error:s})=>{let o="";return a==="load-config"?o=`The configuration failed to load, someone should have a look at this error: ${s.message}`:a==="load-chunk"&&(o=`Lazy loaded chunk failed to load, try to reload the page: ${s.message}`),(0,n.jsx)(Zr,{children:(0,n.jsx)(Yt.mf,{status:"501",statusMessage:o})})},Fn=({error:a,resetError:s,plugin:o})=>(0,n.jsx)(Yt.yu,{title:`Error in ${o==null?void 0:o.getId()}`,defaultExpanded:!0,error:a,children:(0,n.jsx)(cs.Z,{variant:"outlined",onClick:s,children:"Retry"})}),ds={Progress:Yt.Ex,Router:jr.VK,NotFoundErrorPage:qn,BootErrorPage:un,ErrorBoundaryFallback:Fn};var us=t(43642),Dr=t(80079),hs=t(90941),ps=t(32915),fs=t(40562),gs=t(21853),Nr=t(60744),mr=t(66569),Ps=t(30254),ms=t(13384),Fr=t(15933),vs=t(58838),ks=t(86737),ys=t(4989),Os=t(44407),vo=t(18628),v=t(84219),C=t(98685),R=t(39781);const B={brokenImage:Dr.Z,catalog:vo.Z,scaffolder:ps.Z,techdocs:fs.Z,search:gs.Z,chat:Nr.Z,dashboard:mr.Z,docs:Ps.Z,email:ms.Z,github:vs.Z,group:v.Z,help:ks.Z,"kind:api":Fr.Z,"kind:component":Os.Z,"kind:domain":us.Z,"kind:group":v.Z,"kind:location":ys.Z,"kind:system":hs.Z,"kind:user":C.Z,user:C.Z,warning:R.Z};var _=t(73689),Q=t(48032);const oe={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},pe={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 me(a){const{colors:s,shape:o,options:u}=a,T=`linear-gradient(90deg, ${(s.length===1?[s[0],s[0]]:s).join(", ")})`,N=`${o}, ${T}`;var W;const ue=(W=u==null?void 0:u.fontColor)!==null&&W!==void 0?W:"#FFFFFF";return{colors:s,shape:o,backgroundImage:N,fontColor:ue}}const ke={home:me({colors:pe.teal,shape:oe.wave}),documentation:me({colors:pe.pinkSea,shape:oe.wave2}),tool:me({colors:pe.purpleSky,shape:oe.round}),service:me({colors:pe.marineBlue,shape:oe.wave}),website:me({colors:pe.veryBlue,shape:oe.wave}),library:me({colors:pe.rubyRed,shape:oe.wave}),other:me({colors:pe.darkGrey,shape:oe.wave}),app:me({colors:pe.toastyOrange,shape:oe.wave}),apis:me({colors:pe.teal,shape:oe.wave2}),card:me({colors:pe.greens,shape:oe.wave})},Ue=16,Pe='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function rt(a){const{palette:s,htmlFontSize:o=Ue,fontFamily:u=Pe,defaultPageTheme:f,pageTheme:T=ke}=a;if(!T[f])throw new Error(`${f} is not defined in pageTheme.`);var N;return{palette:s,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{htmlFontSize:o,fontFamily:u,h6:{fontWeight:700,fontSize:20,marginBottom:2},h5:{fontWeight:700,fontSize:24,marginBottom:4},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:T[f],getPageTheme:({themeId:W})=>(N=T[W])!==null&&N!==void 0?N:T[f]}}function jt(a){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:a.typography.fontFamily},body:{height:"100%",fontFamily:a.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:a.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:a.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:a.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:a.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:a.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,Q.darken)(a.palette.link,.3),background:(0,Q.lighten)(a.palette.link,.95)},[a.breakpoints.up("md")]:{minWidth:120,fontSize:a.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:a.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:a.spacing(1),marginBottom:a.spacing(1),color:a.palette.grey[900]},outlined:{color:a.palette.text.primary},label:{lineHeight:`${a.spacing(2.5)}px`,fontWeight:a.typography.fontWeightMedium,fontSize:`${a.spacing(1.75)}px`},labelSmall:{fontSize:`${a.spacing(1.5)}px`},deleteIcon:{color:a.palette.grey[500],width:`${a.spacing(3)}px`,height:`${a.spacing(3)}px`,margin:`0 ${a.spacing(.75)}px 0 -${a.spacing(.75)}px`},deleteIconSmall:{width:`${a.spacing(2)}px`,height:`${a.spacing(2)}px`,margin:`0 ${a.spacing(.5)}px 0 -${a.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function ft(a){const s=rt(a),o=(0,_.Z)(s),u=jt(o);return{...o,overrides:u}}var We=t(34505);const Pt=ft({palette:{type:"light",background:{default:"#F8F8F8"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#2E77D0",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#2E77D0"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",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:We.Z.A700,navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:ke}),Xt=ft({palette:{type:"dark",background:{default:"#333333"},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",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:We.Z.A700,navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:ke});var Dn=t(98192),Ln=t(15222),_n=t(41547),gn=t(87561);const vn=[{id:"light",title:"Light Theme",variant:"light",icon:(0,n.jsx)(Ln.Z,{}),Provider:({children:a})=>(0,n.jsx)(_n.Z,{theme:Pt,children:(0,n.jsx)(gn.ZP,{children:a})})},{id:"dark",title:"Dark Theme",variant:"dark",icon:(0,n.jsx)(Dn.Z,{}),Provider:({children:a})=>(0,n.jsx)(_n.Z,{theme:Xt,children:(0,n.jsx)(gn.ZP,{children:a})})}];function jn(a){var s,o,u;return is({...a,apis:(s=a==null?void 0:a.apis)!==null&&s!==void 0?s:[],bindRoutes:a==null?void 0:a.bindRoutes,components:{...ds,...a==null?void 0:a.components},configLoader:a==null?void 0:a.configLoader,defaultApis:ls,icons:{...B,...a==null?void 0:a.icons},plugins:(o=a==null?void 0:a.plugins)!==null&&o!==void 0?o:[],themes:(u=a==null?void 0:a.themes)!==null&&u!==void 0?u:vn})}var er=t(25271),vr=t(76635);async function Er({storageApi:a}){const s=a.forBucket("settings"),o=a.forBucket("starredEntities"),u=s.snapshot("starredEntities").value;if(!(0,vr.isArray)(u))return;var f;const T=new Set((f=o.snapshot("entityRefs").value)!==null&&f!==void 0?f:[]);u.filter(vr.isString).map(N=>N.split(":")).filter(N=>N.length===4&&N[0]==="entity").map(([N,W,ue,Me])=>(0,er.eE)({kind:W,namespace:ue,name:Me})).forEach(N=>T.add(N)),await o.set("entityRefs",Array.from(T)),await s.remove("starredEntities")}class yn{async toggleStarred(s){this.starredEntities.has(s)?this.starredEntities.delete(s):this.starredEntities.add(s),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const s of this.subscribers)s.next(new Set(this.starredEntities))}constructor(s){this.subscribers=new Set,this.observable=new(q())(u=>(u.next(new Set(this.starredEntities)),this.subscribers.add(u),()=>{this.subscribers.delete(u)})),Er(s).then(),this.settingsStore=s.storageApi.forBucket("starredEntities");var o;this.starredEntities=new Set((o=this.settingsStore.snapshot("entityRefs").value)!==null&&o!==void 0?o:[]),this.settingsStore.observe$("entityRefs").subscribe({next:u=>{var f;this.starredEntities=new Set((f=u.value)!==null&&f!==void 0?f:[]),this.notifyChanges()}})}}var pn=t(33414),Ar=t(79324),Tr=t(79692),Fi=t(21411);const Xo=(0,Tr.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function Ui(a){var s,o;const u=a.result,f=Xo(),T=useAnalytics(),N=()=>{T.captureEvent("discover",u.title,{attributes:{to:u.location},value:a.rank})};return _jsxs(Link,{noTrack:!0,to:u.location,onClick:N,children:[_jsxs(ListItem,{alignItems:"flex-start",children:[a.icon&&_jsx(ListItemIcon,{children:a.icon}),_jsxs("div",{className:f.flexContainer,children:[_jsx(ListItemText,{className:f.itemText,primaryTypographyProps:{variant:"h6"},primary:!((s=a.highlight)===null||s===void 0)&&s.fields.title?_jsx(HighlightedSearchResultText,{text:a.highlight.fields.title,preTag:a.highlight.preTag,postTag:a.highlight.postTag}):u.title,secondary:!((o=a.highlight)===null||o===void 0)&&o.fields.text?_jsx(HighlightedSearchResultText,{text:a.highlight.fields.text,preTag:a.highlight.preTag,postTag:a.highlight.postTag}):u.text}),_jsxs(Box,{children:[u.kind&&_jsx(Chip,{label:`Kind: ${u.kind}`,size:"small"}),u.lifecycle&&_jsx(Chip,{label:`Lifecycle: ${u.lifecycle}`,size:"small"})]})]})]}),_jsx(Divider,{component:"li"})]})}var Mi=t(86359),xn=t(46285),Ur=t(95544),yo=t(99688),xs=t(12231),bs=t(86136),Ss=t(49378),xo=t(85256),$s=t(61837),qo=t(79784),_o=t(50758),Bs=t(31654),ei=t(43054),tr=t(51666);const ws="catalog-entity",Zs=(0,tr.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:ws}),Ds=(0,tr.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),Ns=(0,tr.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:ws}),bo=(0,tr.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:ws}),Cs=(0,tr.J$)({name:"catalog.location.read",attributes:{action:"read"}}),So=(0,tr.J$)({name:"catalog.location.create",attributes:{action:"create"}}),wo=(0,tr.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),ti=[Zs,Ds,Ns,bo,Cs,So,wo];var ni=t(49166);function Co(a){const{unregisterEntityOptions:s,isUnregisterAllowed:o,onUnregisterEntity:u,onClose:f}=a,T=typeof(s==null?void 0:s.disableUnregister)=="boolean";var N;const W=(N=!o||(T?!!(s!=null&&s.disableUnregister):(s==null?void 0:s.disableUnregister)==="disable"))!==null&&N!==void 0?N:!1;let ue=(0,n.jsx)(n.Fragment,{});return(s==null?void 0:s.disableUnregister)!=="hidden"&&(ue=(0,n.jsxs)(xs.Z,{onClick:()=>{f(),u()},disabled:W,children:[(0,n.jsx)(bs.Z,{children:(0,n.jsx)(ni.Z,{fontSize:"small"})}),(0,n.jsx)(Ss.Z,{primary:"Unregister entity"})]})),(0,n.jsx)(n.Fragment,{children:ue})}const jo=(0,Tr.Z)(a=>({button:{color:a.page.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function Fs(a){const{UNSTABLE_extraContextMenuItems:s,UNSTABLE_contextMenuOptions:o,onUnregisterEntity:u,onInspectEntity:f}=a,[T,N]=(0,m.useState)(),W=jo(),Me=(0,xn.N$)(Ns).allowed,ze=It=>{N(It.currentTarget)},bt=()=>{N(void 0)},it=s&&[...s.map(It=>(0,n.jsxs)(xs.Z,{onClick:()=>{bt(),It.onClick()},children:[(0,n.jsx)(bs.Z,{children:(0,n.jsx)(It.Icon,{fontSize:"small"})}),(0,n.jsx)(Ss.Z,{primary:It.title})]},It.title)),(0,n.jsx)(xo.Z,{},"the divider is here!")];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)($s.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!T,role:"button",onClick:ze,"data-testid":"menu-button",className:W.button,id:"long-menu",children:(0,n.jsx)(ei.Z,{})}),(0,n.jsx)(qo.ZP,{open:Boolean(T),onClose:bt,anchorEl:T,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu",children:(0,n.jsxs)(_o.Z,{children:[it,(0,n.jsx)(Co,{unregisterEntityOptions:o,isUnregisterAllowed:Me,onUnregisterEntity:u,onClose:bt}),(0,n.jsxs)(xs.Z,{onClick:()=>{bt(),f()},children:[(0,n.jsx)(bs.Z,{children:(0,n.jsx)(Bs.Z,{fontSize:"small"})}),(0,n.jsx)(Ss.Z,{primary:"Inspect entity"})]})]})})]})}const Us="plugin.catalog.entityLayoutRoute",Mr=()=>null;(0,b.R5)(Mr,Us,!0),(0,b.R5)(Mr,"core.gatherMountPoints",!0);function Eo(a){const{entity:s,title:o}=a;return(0,n.jsxs)(Ur.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%",children:[(0,n.jsx)(Ur.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:o}),s&&(0,n.jsx)(xn.LH,{entity:s})]})}function Ms(a,s,o,u){var f;const T=(f=a!=null?a:u==null?void 0:u.kind)!==null&&f!==void 0?f:"";var N;const W=(N=s!=null?s:u==null?void 0:u.metadata.namespace)!==null&&N!==void 0?N:"";var ue,Me,ze;return{headerTitle:`${(ze=(Me=(ue=u==null?void 0:u.metadata.title)!==null&&ue!==void 0?ue:o)!==null&&Me!==void 0?Me:u==null?void 0:u.metadata.name)!==null&&ze!==void 0?ze:""}${W&&W!==er.zG?` in ${W}`:""}`,headerType:(()=>{let it=T.toLocaleLowerCase("en-US");return u&&u.spec&&"type"in u.spec&&(it+=" \u2014 ",it+=u.spec.type.toLocaleLowerCase("en-US")),it})()}}function zs(a){var s;const{entity:o}=a,u=(0,xn.hF)(o,er.S4);return(0,n.jsxs)(n.Fragment,{children:[u.length>0&&(0,n.jsx)(Yt.i9,{label:"Owner",value:(0,n.jsx)(xn.rI,{entityRefs:u,defaultKind:"Group",color:"inherit"})}),((s=o.spec)===null||s===void 0?void 0:s.lifecycle)&&(0,n.jsx)(Yt.i9,{label:"Lifecycle",value:o.spec.lifecycle})]})}const Ao=a=>{var s,o;const{UNSTABLE_extraContextMenuItems:u,UNSTABLE_contextMenuOptions:f,children:T,NotFoundComponent:N}=a,{kind:W,namespace:ue,name:Me}=(0,b.Oi)(xn.wi),{entity:ze,loading:bt,error:it}=(0,xn.ce)(),It=(0,G.TH)(),nn=(0,b.vJ)(T,As=>As.selectByComponentData({key:Us,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:yr})=>{if(ze){if(yr.if&&!yr.if(ze))return[]}else return[];return[{path:yr.path,title:yr.title,children:yr.children,tabProps:yr.tabProps}]}),[ze]),{headerTitle:Vn,headerType:En}=Ms(W,ue,Me,ze),[lo,lr]=(0,m.useState)(!1),[Rr,Gr]=(0,m.useState)(!1),gi=(0,G.s0)(),mi=async()=>{lr(!1),Gr(!1),gi("/")};(0,m.useEffect)(()=>{lr(!1),Gr(!1)},[It.pathname]);var Lr;return(0,n.jsxs)(Yt.T3,{themeId:(Lr=ze==null||(s=ze.spec)===null||s===void 0||(o=s.type)===null||o===void 0?void 0:o.toString())!==null&&Lr!==void 0?Lr:"home",children:[(0,n.jsx)(Yt.h4,{title:(0,n.jsx)(Eo,{title:Vn,entity:ze}),pageTitleOverride:Vn,type:En,children:ze&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(zs,{entity:ze}),(0,n.jsx)(Fs,{UNSTABLE_extraContextMenuItems:u,UNSTABLE_contextMenuOptions:f,onUnregisterEntity:()=>lr(!0),onInspectEntity:()=>Gr(!0)})]})}),bt&&(0,n.jsx)(Yt.Ex,{}),ze&&(0,n.jsx)(Yt.tn,{routes:nn}),it&&(0,n.jsx)(Yt.VY,{children:(0,n.jsx)(yo.Z,{severity:"error",children:it.toString()})}),!bt&&!it&&!ze&&(0,n.jsx)(Yt.VY,{children:N||(0,n.jsxs)(Yt.GB,{title:"Entity not found",children:["There is no ",W," with the requested"," ",(0,n.jsx)(Yt.rU,{to:"https://backstage.io/docs/features/software-catalog/references",children:"kind, namespace, and name"}),"."]})}),(0,n.jsx)(xn.pp,{open:lo,entity:ze,onConfirm:mi,onClose:()=>lr(!1)}),(0,n.jsx)(xn.U_,{open:Rr,entity:ze,onClose:()=>Gr(!1)})]})};Ao.Route=Mr;var zi=t(23054);function ri(a){const{open:s,onClose:o,onConfirm:u,entity:f}=a,[T,N]=useState(!1),W=useApi(catalogApiRef),ue=useApi(alertApiRef),Me=async()=>{N(!0);try{const ze=f.metadata.uid;await W.removeEntityByUid(ze),u()}catch(ze){assertError(ze),ue.post({message:ze.message})}finally{N(!1)}};return _jsxs(Dialog,{open:s,onClose:o,children:[_jsx(DialogTitle,{id:"responsive-dialog-title",children:"Are you sure you want to delete this entity?"}),_jsxs(DialogActions,{children:[_jsx(Button,{variant:"contained",color:"secondary",disabled:T,onClick:Me,children:"Delete"}),_jsx(Button,{onClick:o,color:"primary",children:"Cancel"})]})]})}var Ir=t(19625);function si(a){var s,o;return(a==null||(s=a.metadata)===null||s===void 0||(o=s.annotations)===null||o===void 0?void 0:o["backstage.io/orphan"])==="true"}function Un(){const a=useNavigate(),s=useRouteRef(rootRouteRef),[o,u]=useState(!1),{entity:f}=useEntity(),T=async()=>{u(!1),a(s())};return _jsxs(_Fragment,{children:[_jsx(Alert,{severity:"warning",onClick:()=>u(!0),children:"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."}),_jsx(DeleteEntityDialog,{open:o,entity:f,onConfirm:T,onClose:()=>u(!1)})]})}var oi=t(29644);const ii=a=>a.error&&a.level==="error"&&a.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function To(a,s){return{items:(await s.getEntityAncestors({entityRef:a})).items.map(f=>{var T,N;return{errors:((N=(T=f.entity.status)===null||T===void 0?void 0:T.items)!==null&&N!==void 0?N:[]).filter(ii).map(Me=>Me.error).filter(Me=>Boolean(Me)),entity:f.entity}}).filter(f=>f.errors.length>0)}}async function Vi(a,s){const o=s.apis.get(catalogApiRef);if(!o)throw new Error(`No implementation available for ${catalogApiRef}`);return(await To(stringifyEntityRef(a),o)).items.length>0}function Hi(){const{entity:a}=useEntity(),s=stringifyEntityRef(a),o=useApi(catalogApiRef),{loading:u,error:f,value:T}=useAsync(async()=>To(s,o),[s,o]);return f?_jsx(Box,{mb:1,children:_jsx(ResponseErrorPanel,{error:f})}):u||!T?null:_jsx(_Fragment,{children:T.items.map((N,W)=>_jsxs(Box,{mb:1,children:[stringifyEntityRef(a)!==stringifyEntityRef(N.entity)&&_jsxs(Box,{p:1,children:["The error below originates from"," ",_jsx(EntityRefLink,{entityRef:N.entity})]}),N.errors.map((ue,Me)=>_jsx(ResponseErrorPanel,{error:ue},Me))]},W))})}const Io="core.backstage.entitySwitch",Ro=a=>null;(0,b.R5)(Ro,Io,!0);const ai=a=>{var s;const{entity:o,loading:u}=(0,xn.ce)(),f=(0,b.I_)(),T=(0,b.vJ)(a.children,ue=>ue.selectByComponentData({key:Io,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Me=>{if(u)return[];const{if:ze,children:bt}=Me.props;if(!o)return[{if:ze===void 0,children:bt}];var it;return[{if:(it=ze==null?void 0:ze(o,{apis:f}))!==null&&it!==void 0?it:!0,children:bt}]}),[f,o,u]);if(T.some(ue=>typeof ue.if=="object"&&"then"in ue.if))return(0,n.jsx)(zr,{results:T});var W;return(W=(s=T.find(ue=>ue.if))===null||s===void 0?void 0:s.children)!==null&&W!==void 0?W:null};function zr({results:a}){const{loading:s,value:o}=(0,d.default)(async()=>{const u=a.map(async({if:T,children:N})=>{try{if(await T)return N}catch{}return null});var f;return(f=(await Promise.all(u)).find(Boolean))!==null&&f!==void 0?f:null},[a]);return s||!o?null:o}ai.Case=Ro;const Wi=null,Gi=xn._i.Filters,li=xn._i.Content,Pn=(0,b.rx)({id:"catalog",apis:[(0,b.ni)({api:xn.Ah,deps:{discoveryApi:b.NW,fetchApi:b.gP},factory:({discoveryApi:a,fetchApi:s})=>new oi.MS({discoveryApi:a,fetchApi:s})}),(0,b.ni)({api:xn.p3,deps:{storageApi:b.E6},factory:({storageApi:a})=>new yn({storageApi:a})})],routes:{catalogIndex:Ir._Z,catalogEntity:xn.wi},externalRoutes:{createComponent:Ir.yw,viewTechDoc:Ir.jU},__experimentalConfigure(a){return{...{createButtonTitle:"Create"},...a}}}),Vs=Pn.provide((0,b.P4)({name:"CatalogIndexPage",component:()=>t.e(5837).then(t.bind(t,95837)).then(a=>a.CatalogPage),mountPoint:Ir._Z})),Lo=Pn.provide((0,b.P4)({name:"CatalogEntityPage",component:()=>t.e(8951).then(t.bind(t,78951)).then(a=>a.CatalogEntityPage),mountPoint:xn.wi})),ci=Pn.provide((0,b.CO)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(t.bind(t,33414)).then(a=>a.AboutCard)}})),di=Pn.provide((0,b.CO)({name:"EntityLinksCard",component:{lazy:()=>t.e(7750).then(t.bind(t,17750)).then(a=>a.EntityLinksCard)}})),Hs=Pn.provide((0,b.CO)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(5458).then(t.bind(t,5458)).then(a=>a.HasSystemsCard)}})),Nn=Pn.provide((0,b.CO)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(1105).then(t.bind(t,1105)).then(a=>a.HasComponentsCard)}})),js=Pn.provide((0,b.CO)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(2440).then(t.bind(t,82440)).then(a=>a.HasSubcomponentsCard)}})),Po=Pn.provide((0,b.CO)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(9770).then(t.bind(t,79770)).then(a=>a.HasResourcesCard)}})),ko=Pn.provide((0,b.CO)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(9545).then(t.bind(t,19545)).then(a=>a.DependsOnComponentsCard)}})),nr=Pn.provide((0,b.CO)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(184).then(t.bind(t,40184)).then(a=>a.DependencyOfComponentsCard)}})),ui=Pn.provide((0,b.CO)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(1032).then(t.bind(t,81032)).then(a=>a.DependsOnResourcesCard)}})),Oo=Pn.provide((0,b.CO)({name:"RelatedEntitiesCard",component:{lazy:()=>t.e(732).then(t.bind(t,732)).then(a=>a.RelatedEntitiesCard)}}));var Ws=t(32838);class hi{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(s,o){const f=`${await this.getApiOrigin()}/${o}`,T=await fetch(`${f.endsWith("/")?f:`${f}/`}index.html`);if(T.status===404)throw new Error("Page not found");return T.text()}async syncEntityDocs(s){return"cached"}async getBaseUrl(s,o,u){const f=await this.getApiOrigin();return new URL(s,`${f}/${u}`).toString()}constructor({configApi:s,discoveryApi:o,identityApi:u}){this.configApi=s,this.discoveryApi=o,this.identityApi=u}}class Mn{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(s){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(s){return{site_name:"Live preview environment",site_description:""}}constructor({configApi:s,discoveryApi:o,identityApi:u}){this.configApi=s,this.discoveryApi=o,this.identityApi=u}}const Gs=[(0,b.ni)({api:ye.Dl,deps:{configApi:b.Ds,discoveryApi:b.NW,identityApi:b.$4},factory:({configApi:a,discoveryApi:s,identityApi:o})=>new hi({configApi:a,discoveryApi:s,identityApi:o})}),(0,b.ni)({api:ye.gT,deps:{configApi:b.Ds,discoveryApi:b.NW,identityApi:b.$4},factory:({configApi:a,discoveryApi:s,identityApi:o})=>new Mn({configApi:a,discoveryApi:s,identityApi:o})}),(0,b.ni)({api:Ws.q3,deps:{configApi:b.Ds},factory:({configApi:a})=>Ws.ae.fromConfig(a)})],Vr={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ks={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Hr(){const a=await fetch("/.detect");return a.ok?(await a.text()).trim()==="techdocs-cli-server":!1}async function Ys(){const a=await rs(),s=await Hr();return[...a,{context:"detected",data:s?Vr:Ks}]}var Js=t(86689),Qs=t(58845);const $o=(0,Tr.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Bo=()=>{const a=$o();return(0,n.jsx)("svg",{className:a.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05",children:(0,n.jsx)("path",{className:a.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"})})};const Xs=(0,Tr.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var _s=()=>{const a=Xs();return(0,n.jsx)("svg",{className:a.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5",children:(0,n.jsx)("path",{className:a.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"})})};const eo=(0,Tr.Z)({root:{width:Yt.po.drawerWidthClosed,height:3*Yt.po.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:Yt.po.drawerWidthClosed,marginLeft:24}}),to=()=>{const a=eo(),{isOpen:s}=(0,Yt.mZ)();return(0,n.jsx)("div",{className:a.root,children:(0,n.jsx)(Js.Z,{component:jr.OL,to:"/docs/default/component/local/",underline:"none",className:a.link,children:s?(0,n.jsx)(Bo,{}):(0,n.jsx)(_s,{})})})},no=({children:a})=>(0,n.jsxs)(Yt.tR,{children:[(0,n.jsxs)(Yt.YE,{children:[(0,n.jsx)(to,{}),(0,n.jsx)(Yt.v7,{}),(0,n.jsx)(Yt.R6,{icon:Qs.Z,to:"/docs/default/component/local",text:"Docs Preview"})]}),a]});var ro=t(80030),Es=t(32388),Zo=t(4142);const Do=(0,Tr.Z)(a=>({headerIcon:{color:a.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:a.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var zn;(function(a){a.LIGHT="light",a.DARK="dark"})(zn||(zn={}));const No=()=>{const a=(0,b.h_)(b.hg),s=Do(),[o,u]=(0,m.useState)(a.getActiveThemeId()===zn.DARK?zn.DARK:zn.LIGHT),f={[zn.LIGHT]:{icon:Zo.Z,title:"Dark theme"},[zn.DARK]:{icon:Es.Z,title:"Light theme"}},{title:T,icon:N}=f[o],W=()=>{u(ue=>{const Me=ue===zn.LIGHT?zn.DARK:zn.LIGHT;return a.setActiveThemeId(Me),Me})};return(0,n.jsx)(Ur.Z,{display:"flex",alignItems:"center",mr:2,children:(0,n.jsx)(ro.ZP,{title:T,arrow:!0,children:(0,n.jsx)($s.Z,{size:"small",onClick:W,children:(0,n.jsx)(N,{className:s.headerIcon})})})})},Fo=()=>(0,n.jsxs)($.I6,{children:[(0,n.jsx)(F.S,{}),(0,n.jsx)(Y.F,{withSearch:!1})]}),Uo=(0,n.jsx)(Fo,{}),so=jn({apis:Gs,configLoader:Ys,plugins:Object.values(h)}),oo=so.getProvider(),io=so.getRouter(),Mo=$.s4.provide((0,ye.KY)({name:"ThemeToggleAddon",component:No,location:ye.oZ.Header})),zo=(0,n.jsxs)(as,{children:[(0,n.jsx)(G.Fg,{to:"/docs/default/component/local/"},"/"),(0,n.jsx)(G.AW,{path:"/catalog/:namespace/:kind/:name",element:(0,n.jsx)(Lo,{})}),(0,n.jsx)(G.AW,{path:"/docs",element:(0,n.jsx)($.Jl,{}),children:(0,n.jsx)(A.u,{})}),(0,n.jsxs)(G.AW,{path:"/docs/:namespace/:kind/:name/*",element:(0,n.jsx)($.I6,{}),children:[Uo,(0,n.jsx)(ye.DR,{children:(0,n.jsx)(Mo,{})})]})]});var ao=()=>(0,n.jsx)(oo,{children:(0,n.jsx)(io,{children:(0,n.jsx)(no,{children:zo})})});O.render((0,n.jsx)(ao,{}),document.getElementById("root"))},51837:function(tt,Ae,t){"use strict";t.d(Ae,{CT:function(){return b},EI:function(){return ee},uW:function(){return O},Vt:function(){return l}});function h(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const n=h(),m=X=>`__@backstage/${X}__`;function O(X,K){const F=m(X);let Y=n[F];return Y||(Y=K(),n[F]=Y,Y)}var G=t(2784);function b(X){return O(X,()=>(0,G.createContext)(void 0))}function l(X){return(0,G.useContext)(b(X))}function L(X){return{set(K){globalThis[`__@backstage/${X}__`]=createContext(createVersionedValueMap(K))},reset(){delete globalThis[`__@backstage/${X}__`]}}}function ee(X){return Object.freeze(X),{atVersion(K){return X[K]}}}},46285:function(tt,Ae,t){"use strict";t.d(Ae,{h$:function(){return te},n3:function(){return h.n3},_i:function(){return Z},zo:function(){return kt},df:function(){return Mt},UO:function(){return xe},dq:function(){return be},nl:function(){return Os},dx:function(){return dt},rI:function(){return Rt},u3:function(){return Dt},xE:function(){return Wn},sL:function(){return $n},LH:function(){return w},U_:function(){return Fn},pp:function(){return fs},EW:function(){return Fr},Ah:function(){return m},wi:function(){return ce},hF:function(){return ht},CV:function(){return mt},$3:function(){return He},p3:function(){return O},ce:function(){return Ve},X2:function(){return Ge},wp:function(){return Ce},ZW:function(){return we},N$:function(){return Je},eK:function(){return Vt},CR:function(){return Ft}});var h=t(29644),n=t(25248);const m=(0,n.T0)({id:"plugin.catalog.service"}),O=(0,n.T0)({id:"catalog-react.starred-entities"});var G=t(82394);class b{async toggleStarred(C){this.starredEntities.delete(C)||this.starredEntities.add(C);for(const R of this.subscribers)R.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}constructor(){this.starredEntities=new Set,this.subscribers=new Set,this.observable=new ObservableImpl(C=>(C.next(new Set(this.starredEntities)),this.subscribers.add(C),()=>{this.subscribers.delete(C)}))}}var l=t(52322),L=t(2784),ee=t(41156),X=t(60364),K=t(77277),F=t(4190),Y=t(95544),V=t(90436),ie=t(60905),le=t(36444);const I=v=>{const C=(0,ee.Z)(Q=>Q.breakpoints.down("md")),R=(0,X.Z)(),[B,_]=(0,L.useState)(!1);return C?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(K.Z,{style:{marginTop:R.spacing(1),marginLeft:R.spacing(1)},onClick:()=>_(!0),startIcon:(0,l.jsx)(le.Z,{}),children:"Filters"}),(0,l.jsx)(F.ZP,{open:B,onClose:()=>_(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary",children:(0,l.jsxs)(Y.Z,{m:2,children:[(0,l.jsx)(V.Z,{variant:"h6",component:"h2",style:{marginBottom:R.spacing(1)},children:"Filters"}),v.children]})})]}):(0,l.jsx)(ie.Z,{item:!0,lg:2,children:v.children})},A=v=>(0,l.jsx)(ie.Z,{item:!0,xs:12,lg:10,children:v.children}),Z=v=>(0,l.jsx)(ie.Z,{container:!0,style:{position:"relative"},children:v.children});Z.Filters=I,Z.Content=A;var P=t(51837);const $=(0,P.CT)("entity-context"),te=({children:v,entity:C,loading:R,error:B,refresh:_})=>{const Q={entity:C,loading:R,error:B,refresh:_};return(0,l.jsx)($.Provider,{value:(0,P.EI)({1:Q}),children:v})},ye=v=>_jsx(te,{entity:v.entity,loading:!Boolean(v.entity),error:void 0,refresh:void 0,children:v.children});function Ge(){const v=(0,P.Vt)("entity-context");if(!v)throw new Error("Entity context is not available");const C=v.atVersion(1);if(!C)throw new Error("EntityContext v1 not available");if(!C.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:C.entity}}function Ve(){const v=(0,P.Vt)("entity-context");if(!v)throw new Error("Entity context is not available");const C=v.atVersion(1);if(!C)throw new Error("EntityContext v1 not available");const{entity:R,loading:B,error:_,refresh:Q}=C;return{entity:R,loading:B,error:_,refresh:Q}}var Te=t(76635),Ye=t(19126),Ke=t.n(Ye),Oe=t(10289),Fe=t(69294),qe=t(48760),st=t(90736);function nt(v){return v.reduce((C,R)=>({...C,...R.getCatalogFilters?R.getCatalogFilters():{}}),{})}function ct(v){return C=>v.every(R=>!R.filterEntity||R.filterEntity(C))}var Se=t(25271);function ht(v,C,R){var B;let _=(v==null||(B=v.relations)===null||B===void 0?void 0:B.filter(Q=>Q.type===C).map(Q=>(0,Se.of)(Q.targetRef)))||[];return R!=null&&R.kind&&(_=_.filter(Q=>Q.kind.toLocaleLowerCase("en-US")===R.kind.toLocaleLowerCase("en-US"))),_}function mt(v,C){var R;const B=(R=v.metadata.annotations)===null||R===void 0?void 0:R[Se.M6];if(!!B)try{const _=(0,Se.Ou)(B),Q=C.byUrl(_.target);return{locationTargetUrl:_.target,integrationType:Q==null?void 0:Q.type}}catch{return}}function Ie(v,C){const R=new Set([...getEntityRelations(v,RELATION_MEMBER_OF,{kind:"group"}),...v?[getCompoundEntityRef(v)]:[]].map(stringifyEntityRef)),B=getEntityRelations(C,RELATION_OWNED_BY).map(stringifyEntityRef);for(const _ of B)if(R.has(_))return!0;return!1}const q=(0,L.createContext)(void 0),xe=({children:v})=>{const C=(0,st.default)(),R=(0,n.h_)(m),[B,_]=(0,L.useState)({}),Q=(0,Oe.TH)();var oe;const pe=(0,L.useMemo)(()=>(oe=Ke().parse(Q.search,{ignoreQueryPrefix:!0}).filters)!==null&&oe!==void 0?oe:{},[Q]),[me,ke]=(0,L.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Ue,error:Pe},rt]=(0,Fe.default)(async()=>{const We=(0,Te.compact)(Object.values(B)),Pt=ct(We),Xt=nt(We),Dn=nt((0,Te.compact)(Object.values(me.appliedFilters))),Ln=Object.keys(B).reduce((gn,vn)=>{const jn=B[vn];return jn!=null&&jn.toQueryValue&&(gn[vn]=jn.toQueryValue()),gn},{});if((0,Te.isEqual)(Dn,Xt))ke({appliedFilters:B,backendEntities:me.backendEntities,entities:me.backendEntities.filter(Pt)});else{const gn=await R.getEntities({filter:Xt});ke({appliedFilters:B,backendEntities:gn.items,entities:gn.items.filter(Pt)})}if(C()){var _n;const gn=Ke().parse(Q.search,{ignoreQueryPrefix:!0}),vn=Ke().stringify({...gn,filters:Ln},{addQueryPrefix:!0,arrayFormat:"repeat"}),jn=`${window.location.pathname}${vn}`;(_n=window.history)===null||_n===void 0||_n.replaceState(null,document.title,jn)}},[R,pe,B,me],{loading:!0});(0,qe.Z)(rt,10,[B]);const jt=(0,L.useCallback)(We=>{_(Pt=>{const Xt=typeof We=="function"?We(Pt):We;return{...Pt,...Xt}})},[]),ft=(0,L.useMemo)(()=>({filters:me.appliedFilters,entities:me.entities,backendEntities:me.backendEntities,updateFilters:jt,queryParameters:pe,loading:Ue,error:Pe}),[me,jt,pe,Ue,Pe]);return(0,l.jsx)(q.Provider,{value:ft,children:v})};function Ce(){const v=(0,L.useContext)(q);if(!v)throw new Error("useEntityList must be used within EntityListProvider");return v}var Xe=t(64279),ut=t(18149),vt=t.n(ut),at=t(829),ae=t.n(at);const ce=(0,P.uW)("catalog:entity-route-ref",()=>(0,n.NT)({id:"catalog:entity",params:["namespace","kind","name"]}));function De(v){var C,R;return{kind:v.kind.toLocaleLowerCase("en-US"),namespace:(R=(C=v.metadata.namespace)===null||C===void 0?void 0:C.toLocaleLowerCase("en-US"))!==null&&R!==void 0?R:DEFAULT_NAMESPACE,name:v.metadata.name}}function He(v,C){const R=C==null?void 0:C.defaultKind;let B,_,Q;return"metadata"in v?(B=v.kind,_=v.metadata.namespace,Q=v.metadata.name):(B=v.kind,_=v.namespace,Q=v.name),_===Se.zG&&(_=void 0),B=B.toLocaleLowerCase("en-US"),B=R&&R.toLocaleLowerCase("en-US")===B?void 0:B,`${B?`${B}:`:""}${_?`${_}/`:""}${Q}`}var Ne=t(15018),ot=t(80030);const dt=(0,L.forwardRef)((v,C)=>{const{entityRef:R,defaultKind:B,title:_,children:Q,...oe}=v,pe=(0,n.tg)(ce);let me,ke,Ue;if(typeof R=="string"){const We=(0,Se.of)(R);me=We.kind,ke=We.namespace,Ue=We.name}else"metadata"in R?(me=R.kind,ke=R.metadata.namespace,Ue=R.metadata.name):(me=R.kind,ke=R.namespace,Ue=R.name);me=me.toLocaleLowerCase("en-US");var Pe;ke=(Pe=ke==null?void 0:ke.toLocaleLowerCase("en-US"))!==null&&Pe!==void 0?Pe:Se.zG;const rt={kind:me,namespace:ke,name:Ue},jt=He({kind:me,namespace:ke,name:Ue},{defaultKind:B}),ft=(0,l.jsxs)(Ne.rU,{...oe,ref:C,to:pe(rt),children:[Q,!Q&&(_!=null?_:jt)]});return _?(0,l.jsx)(ot.ZP,{title:jt,children:ft}):ft});function Rt(v){const{entityRefs:C,defaultKind:R,...B}=v;return(0,l.jsx)(l.Fragment,{children:C.map((_,Q)=>(0,l.jsxs)(L.Fragment,{children:[Q>0&&", ",(0,l.jsx)(dt,{...B,entityRef:_,defaultKind:R})]},Q))})}class kt{getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}constructor(C){this.value=C}}class Lt{getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}constructor(C){this.value=C}}class zt{filterEntity(C){var R;return this.values.every(B=>((R=C.metadata.tags)!==null&&R!==void 0?R:[]).includes(B))}toQueryValue(){return this.values}constructor(C){this.values=C}}class _t{filterEntity(C){var R;const B=this.value.toLocaleUpperCase("en-US");return C.metadata.name.toLocaleUpperCase("en-US").includes(B)||`${C.metadata.title}`.toLocaleUpperCase("en-US").includes(B)||((R=C.metadata.tags)===null||R===void 0?void 0:R.join("").toLocaleUpperCase("en-US").indexOf(B))!==-1}constructor(C){this.value=C}}class Et{filterEntity(C){return this.values.some(R=>ht(C,Se.S4).some(B=>He(B,{defaultKind:"group"})===R))}toQueryValue(){return this.values}constructor(C){this.values=C}}class cn{filterEntity(C){return this.values.some(R=>{var B;return((B=C.spec)===null||B===void 0?void 0:B.lifecycle)===R})}toQueryValue(){return this.values}constructor(C){this.values=C}}class xt{filterEntity(C){switch(this.value){case"owned":return this.isOwnedEntity(C);case"starred":return this.isStarredEntity(C);default:return!0}}toQueryValue(){return this.value}constructor(C,R,B){this.value=C,this.isOwnedEntity=R,this.isStarredEntity=B}}class Bt{filterEntity(C){var R;const B=(R=C.metadata.annotations)===null||R===void 0?void 0:R["backstage.io/orphan"];return B!==void 0&&this.value.toString()===B}constructor(C){this.value=C}}class At{filterEntity(C){var R,B,_;const Q=((R=C)===null||R===void 0||(B=R.status)===null||B===void 0||(_=B.items)===null||_===void 0?void 0:_.length)>0;return Q!==void 0&&this.value===Q}constructor(C){this.value=C}}function yt(){const v=(0,n.h_)(m),{filters:{kind:C,type:R},queryParameters:{type:B},updateFilters:_}=Ce(),Q=(0,L.useMemo)(()=>[B].flat().filter(Boolean),[B]);var oe;const[pe,me]=(0,L.useState)(Q.length?Q:(oe=R==null?void 0:R.getTypes())!==null&&oe!==void 0?oe:[]);(0,L.useEffect)(()=>{Q.length&&me(Q)},[Q]);const[ke,Ue]=(0,L.useState)([]),Pe=(0,L.useMemo)(()=>C==null?void 0:C.value,[C]),{error:rt,loading:jt,value:ft}=(0,Xe.default)(async()=>Pe?await v.getEntityFacets({filter:{kind:Pe},facets:["spec.type"]}).then(Xt=>Xt.facets["spec.type"]||[]):[],[Pe,v]),We=(0,L.useRef)(ft);return(0,L.useEffect)(()=>{const Pt=We.current;if(We.current=ft,jt||!Pe||Pt===ft||!ft)return;const Xt=[...new Set(ae()(ft,Ln=>-Ln.count).map(Ln=>Ln.value.toLocaleLowerCase("en-US")))];Ue(Xt);const Dn=pe.filter(Ln=>Xt.includes(Ln));vt()(pe,Dn)||me(Dn)},[jt,Pe,pe,me,ft]),(0,L.useEffect)(()=>{_({type:pe.length?new Lt(pe):void 0})},[pe,_]),{loading:jt,error:rt,availableTypes:ke,selectedTypes:pe,setSelectedTypes:me}}const Kt=20;function Vt(v,C){var R,B;const _=C==null||(R=C.type)===null||R===void 0?void 0:R.toLocaleLowerCase("en-US"),Q=C==null||(B=C.kind)===null||B===void 0?void 0:B.toLocaleLowerCase("en-US"),oe=(0,n.h_)(m),{loading:pe,value:me,error:ke}=(0,Xe.default)(async()=>{var Ue;const Pe=(Ue=v.relations)===null||Ue===void 0?void 0:Ue.map(We=>({type:We.type,target:(0,Se.of)(We.targetRef)})).filter(We=>(!_||We.type.toLocaleLowerCase("en-US")===_)&&(!Q||We.target.kind===Q));if(!Pe)return[];const rt=Object.values((0,Te.groupBy)(Pe,({target:We})=>`${We.kind}:${We.namespace}`.toLocaleLowerCase("en-US"))),jt=[];for(const We of rt)jt.push({kind:We[0].target.kind,namespace:We[0].target.namespace,nameBatches:(0,Te.chunk)(We.map(Pt=>Pt.target.name),Kt)});return(await Promise.all(jt.flatMap(We=>We.nameBatches.map(Pt=>oe.getEntities({filter:{kind:We.kind,"metadata.namespace":We.namespace,"metadata.name":Pt}}))))).flatMap(We=>We.items)},[v,_,Q]);return{entities:me,loading:pe,error:ke}}var en=t(72164);function Zt(v){return typeof v=="string"?v:(0,Se.eE)(v)}function Ft(){const v=(0,n.h_)(O),C=(0,en.Z)(v.starredEntitie$(),new Set),R=(0,L.useCallback)(_=>C.has(Zt(_)),[C]),B=(0,L.useCallback)(_=>v.toggleStarred(Zt(_)).then(),[v]);return{starredEntities:C,toggleStarredEntity:B,isStarredEntity:R}}function re(v){return typeof v=="string"?v:(0,Se.eE)(v)}function M(v){const C=(0,n.h_)(O),[R,B]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{const Q=C.starredEntitie$().subscribe({next(oe){B(oe.has(re(v)))}});return()=>{Q.unsubscribe()}},[v,C]),{toggleStarredEntity:(0,L.useCallback)(()=>C.toggleStarred(re(v)).then(),[v,C]),isStarredEntity:R}}function we(){const v=(0,n.h_)(n.$4),{loading:C,value:R}=(0,Xe.default)(async()=>{const{ownershipEntityRefs:_}=await v.getBackstageIdentity();return _},[]),B=(0,L.useMemo)(()=>{const _=new Set(R!=null?R:[]);return Q=>{const oe=ht(Q,Se.S4).map(Se.eE);for(const pe of oe)if(_.has(pe))return!0;return!1}},[R]);return(0,L.useMemo)(()=>({loading:C,isOwnedEntity:B}),[C,B])}var Re=t(73001);function Je(v){const{entity:C,loading:R,error:B}=Ve(),{allowed:_,loading:Q,error:oe}=(0,Re.gI)({permission:v,resourceRef:C?(0,Se.eE)(C):void 0});return R||Q?{loading:!0,allowed:!1}:B?{loading:!1,allowed:!1,error:B}:{loading:!1,allowed:_,error:oe}}const gt=v=>{const{initialFilter:C,hidden:R}=v,{updateFilters:B,queryParameters:{kind:_}}=useEntityList();var Q;const[oe]=useState((Q=[_].flat()[0])!==null&&Q!==void 0?Q:C);return useEffect(()=>{B({kind:oe?new EntityKindFilter(oe):void 0})},[oe,B]),R?null:_jsx(Alert,{severity:"warning",children:"Kind filter not yet available"})};var z=t(79692),j=t(5806),se=t(21324),$e=t(86619),Qe=t(19996),et=t(25505),Ct=t(38016),on=t(88013);const Ht=(0,z.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),dn=(0,l.jsx)(et.Z,{fontSize:"small"}),Ut=(0,l.jsx)(Qe.Z,{fontSize:"small"}),Mt=()=>{var v;const C=Ht(),{updateFilters:R,backendEntities:B,filters:_,queryParameters:{lifecycles:Q}}=Ce(),oe=(0,L.useMemo)(()=>[Q].flat().filter(Boolean),[Q]);var pe;const[me,ke]=(0,L.useState)(oe.length?oe:(pe=(v=_.lifecycles)===null||v===void 0?void 0:v.values)!==null&&pe!==void 0?pe:[]);(0,L.useEffect)(()=>{oe.length&&ke(oe)},[oe]),(0,L.useEffect)(()=>{R({lifecycles:me.length?new cn(me):void 0})},[me,R]);const Ue=(0,L.useMemo)(()=>[...new Set(B.map(Pe=>{var rt;return(rt=Pe.spec)===null||rt===void 0?void 0:rt.lifecycle}).filter(Boolean))].sort(),[B]);return Ue.length?(0,l.jsx)(Y.Z,{pb:1,pt:1,children:(0,l.jsxs)(V.Z,{variant:"button",component:"label",children:["Lifecycle",(0,l.jsx)(on.ZP,{multiple:!0,options:Ue,value:me,onChange:(Pe,rt)=>ke(rt),renderOption:(Pe,{selected:rt})=>(0,l.jsx)(j.Z,{control:(0,l.jsx)(se.Z,{icon:dn,checkedIcon:Ut,checked:rt}),label:Pe}),size:"small",popupIcon:(0,l.jsx)(Ct.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Pe=>(0,l.jsx)($e.Z,{...Pe,className:C.input,variant:"outlined"})})]})}):null},wn=(0,z.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),E=(0,l.jsx)(et.Z,{fontSize:"small"}),J=(0,l.jsx)(Qe.Z,{fontSize:"small"}),be=()=>{var v;const C=wn(),{updateFilters:R,backendEntities:B,filters:_,queryParameters:{owners:Q}}=Ce(),oe=(0,L.useMemo)(()=>[Q].flat().filter(Boolean),[Q]);var pe;const[me,ke]=(0,L.useState)(oe.length?oe:(pe=(v=_.owners)===null||v===void 0?void 0:v.values)!==null&&pe!==void 0?pe:[]);(0,L.useEffect)(()=>{oe.length&&ke(oe)},[oe]),(0,L.useEffect)(()=>{R({owners:me.length?new Et(me):void 0})},[me,R]);const Ue=(0,L.useMemo)(()=>[...new Set(B.flatMap(Pe=>ht(Pe,Se.S4).map(rt=>He(rt,{defaultKind:"group"}))).filter(Boolean))].sort(),[B]);return Ue.length?(0,l.jsx)(Y.Z,{pb:1,pt:1,children:(0,l.jsxs)(V.Z,{variant:"button",component:"label",children:["Owner",(0,l.jsx)(on.ZP,{multiple:!0,options:Ue,value:me,onChange:(Pe,rt)=>ke(rt),renderOption:(Pe,{selected:rt})=>(0,l.jsx)(j.Z,{control:(0,l.jsx)(se.Z,{icon:E,checkedIcon:J,checked:rt}),label:Pe}),size:"small",popupIcon:(0,l.jsx)(Ct.Z,{"data-testid":"owner-picker-expand"}),renderInput:Pe=>(0,l.jsx)($e.Z,{...Pe,className:C.input,variant:"outlined"})})]})}):null},ge=(0,z.Z)(v=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),Le=()=>{var v;const C=ge(),{filters:R,updateFilters:B}=useEntityList();var _;const[Q,oe]=useState((_=(v=R.text)===null||v===void 0?void 0:v.value)!==null&&_!==void 0?_:"");return useDebounce(()=>{B({text:Q.length?new EntityTextFilter(Q):void 0})},250,[Q,B]),_jsx(Toolbar,{className:C.searchToolbar,children:_jsx(FormControl,{children:_jsx(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:C.input,placeholder:"Search",autoComplete:"off",onChange:pe=>oe(pe.target.value),value:Q,startAdornment:_jsx(InputAdornment,{position:"start",children:_jsx(Search,{})}),endAdornment:_jsx(InputAdornment,{position:"end",children:_jsx(IconButton,{"aria-label":"clear search",onClick:()=>oe(""),edge:"end",disabled:Q.length===0,children:_jsx(Clear,{})})})})})})},Be=Object.freeze({createEntityRefColumn(v){const{defaultKind:C}=v;function R(B){var _;return((_=B.metadata)===null||_===void 0?void 0:_.title)||He(B,{defaultKind:C})}return{title:"Name",highlight:!0,customFilterAndSearch(B,_){return R(_).includes(B)},customSort(B,_){return R(B).localeCompare(R(_))},render:B=>{var _;return(0,l.jsx)(dt,{entityRef:B,defaultKind:C,title:(_=B.metadata)===null||_===void 0?void 0:_.title})}}},createEntityRelationColumn(v){const{title:C,relation:R,defaultKind:B,filter:_}=v;function Q(pe){return ht(pe,R,_)}function oe(pe){return Q(pe).map(me=>He(me,{defaultKind:B})).join(", ")}return{title:C,customFilterAndSearch(pe,me){return oe(me).includes(pe)},customSort(pe,me){return oe(pe).localeCompare(oe(me))},render:pe=>(0,l.jsx)(Rt,{entityRefs:Q(pe),defaultKind:B})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Se.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Se.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Se.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:v=>(0,l.jsx)(Ne.Or,{text:v.metadata.description,placement:"bottom-start",line:2})}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),pt=[Be.createEntityRefColumn({defaultKind:"system"}),Be.createDomainColumn(),Be.createOwnerColumn(),Be.createMetadataDescriptionColumn()],Ot=[Be.createEntityRefColumn({defaultKind:"component"}),Be.createSystemColumn(),Be.createOwnerColumn(),Be.createSpecTypeColumn(),Be.createSpecLifecycleColumn(),Be.createMetadataDescriptionColumn()],tn=(0,z.Z)(v=>({empty:{padding:v.spacing(2),display:"flex",justifyContent:"center"}})),Dt=v=>{const{entities:C,title:R,emptyContent:B,variant:_="gridItem",columns:Q}=v,oe=tn(),pe={minWidth:"0",width:"100%"};return _==="gridItem"&&(pe.height="calc(100% - 10px)"),(0,l.jsx)(Ne.iA,{columns:Q,title:R,style:pe,emptyContent:B&&(0,l.jsx)("div",{className:oe.empty,children:B}),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1},data:C})};Dt.columns=Be,Dt.systemEntityColumns=pt,Dt.componentEntityColumns=Ot;const an=(0,z.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),Tt=(0,l.jsx)(et.Z,{fontSize:"small"}),ln=(0,l.jsx)(Qe.Z,{fontSize:"small"}),Wn=()=>{var v;const C=an(),{updateFilters:R,filters:B,queryParameters:{tags:_}}=Ce(),Q=(0,n.h_)(m),{value:oe}=(0,Xe.default)(async()=>{var Pe;const rt="metadata.tags",{facets:jt}=await Q.getEntityFacets({facets:[rt],filter:(Pe=B.kind)===null||Pe===void 0?void 0:Pe.getCatalogFilters()});return jt[rt].map(({value:ft})=>ft)},[B.kind]),pe=(0,L.useMemo)(()=>[_].flat().filter(Boolean),[_]);var me;const[ke,Ue]=(0,L.useState)(pe.length?pe:(me=(v=B.tags)===null||v===void 0?void 0:v.values)!==null&&me!==void 0?me:[]);return(0,L.useEffect)(()=>{pe.length&&Ue(pe)},[pe]),(0,L.useEffect)(()=>{R({tags:ke.length?new zt(ke):void 0})},[ke,R]),oe!=null&&oe.length?(0,l.jsx)(Y.Z,{pb:1,pt:1,children:(0,l.jsxs)(V.Z,{variant:"button",component:"label",children:["Tags",(0,l.jsx)(on.ZP,{multiple:!0,options:oe,value:ke,onChange:(Pe,rt)=>Ue(rt),renderOption:(Pe,{selected:rt})=>(0,l.jsx)(j.Z,{control:(0,l.jsx)(se.Z,{icon:Tt,checkedIcon:ln,checked:rt}),label:Pe}),size:"small",popupIcon:(0,l.jsx)(Ct.Z,{"data-testid":"tag-picker-expand"}),renderInput:Pe=>(0,l.jsx)($e.Z,{...Pe,className:C.input,variant:"outlined"})})]})}):null};var Cn=t(82108),On=t.n(Cn);const $n=v=>{const{hidden:C,initialFilter:R}=v,B=(0,n.h_)(n.$v),{error:_,availableTypes:Q,selectedTypes:oe,setSelectedTypes:pe}=yt();if((0,L.useEffect)(()=>{_&&B.post({message:"Failed to load entity types",severity:"error"}),R&&pe([R])},[_,B,R,pe]),Q.length===0||_)return null;const me=[{value:"all",label:"All"},...Q.map(Ue=>({value:Ue,label:On()(Ue)}))];var ke;return C?null:(0,l.jsx)(Y.Z,{pb:1,pt:1,children:(0,l.jsx)(Ne.Ph,{label:"Type",items:me,selected:(ke=me.length>1?oe[0]:void 0)!==null&&ke!==void 0?ke:"all",onChange:Ue=>pe(Ue==="all"?[]:[String(Ue)])})})};var Xn=t(15459),Wt=t(61837),x=t(11640),d=t(28347);const y=(0,Xn.Z)({root:{color:"#f3ba37"}})(x.Z),w=v=>{const{toggleStarredEntity:C,isStarredEntity:R}=M(v.entity);return(0,l.jsx)(Wt.Z,{"aria-label":"favorite",color:"inherit",...v,onClick:()=>C(),children:(0,l.jsx)(ot.ZP,{title:R?"Remove from favorites":"Add to favorites",children:R?(0,l.jsx)(y,{}):(0,l.jsx)(d.Z,{})})})};var H=t(8629),de=t(79249),ve=t(38724),Ee=t(99152),_e=t(6487),$t=t(49429),wt=t(55999),Tn=t(72779),pr=t.n(Tn),fr=t(39412);const Jr=fr.Z;function kr(v,C){if(v)return v.toLocaleLowerCase("en-US");if(C)try{return(0,Se.of)(C).kind.toLocaleLowerCase("en-US")}catch{return}}function Qr(v,C){const R=(0,n.qD)(),B=kr(v,C);return B&&R.getSystemIcon(`kind:${B}`)||Jr}function xr(v){const{kind:C,entityRef:R,...B}=v,_=Qr(C,R);return(0,l.jsx)(_,{...B})}const Xr=(0,z.Z)(v=>({node:{fill:v.palette.grey[300],stroke:v.palette.grey[300],"&.primary":{fill:v.palette.primary.light,stroke:v.palette.primary.light},"&.secondary":{fill:v.palette.secondary.light,stroke:v.palette.secondary.light}},text:{fill:v.palette.getContrastText(v.palette.grey[300]),"&.primary":{fill:v.palette.primary.contrastText},"&.secondary":{fill:v.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function qr(v){const C=(0,n.h_)(m),R=(0,Se.eE)(v),{loading:B,error:_,value:Q}=(0,Xe.default)(async()=>{const oe=await C.getEntityAncestors({entityRef:R}),pe=new Array,me=new Array;for(const ke of oe.items){const Ue=(0,Se.eE)(ke.entity),Pe=Ue===oe.rootEntityRef;pe.push({id:Ue,root:Pe,...ke.entity});for(const rt of ke.parentEntityRefs)me.push({from:Ue,to:rt})}return{nodes:pe,edges:me}},[R]);return{loading:B,error:_,nodes:(Q==null?void 0:Q.nodes)||[],edges:(Q==null?void 0:Q.edges)||[]}}function Or({node:v}){const C=Xr(),R=(0,Oe.s0)(),B=(0,n.tg)(ce),[_,Q]=(0,L.useState)(0),[oe,pe]=(0,L.useState)(0),me=(0,L.useRef)(null);(0,L.useLayoutEffect)(()=>{if(me.current){let{height:Pt,width:Xt}=me.current.getBBox();Pt=Math.round(Pt),Xt=Math.round(Xt),(Pt!==oe||Xt!==_)&&(Q(Xt),pe(Pt))}},[_,oe]);const ke=10,Ue=oe,Pe=Ue+ke,rt=Pe+_+ke*2,jt=oe+ke*2,ft=v.metadata.title||(v.kind&&v.metadata.name&&v.metadata.namespace?He({kind:v.kind,name:v.metadata.name,namespace:v.metadata.namespace||""}):v.id),We=()=>{R(B({kind:v.kind,namespace:v.metadata.namespace||Se.zG,name:v.metadata.name}))};return(0,l.jsxs)("g",{onClick:We,className:C.clickable,children:[(0,l.jsx)("rect",{className:pr()(C.node,v.root?"secondary":"primary"),width:rt,height:jt,rx:10}),(0,l.jsx)(xr,{kind:v.kind,y:ke,x:ke,width:Ue,height:Ue,className:pr()(C.text,v.root?"secondary":"primary")}),(0,l.jsx)("text",{ref:me,className:pr()(C.text,v.root?"secondary":"primary"),y:jt/2,x:Pe+(_+ke*2)/2,textAnchor:"middle",alignmentBaseline:"middle",children:ft})]})}function _r(v){const{loading:C,error:R,nodes:B,edges:_}=qr(v.entity);return C?(0,l.jsx)(Ne.Ex,{}):R?(0,l.jsx)(Ne.Gk,{error:R}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wt.Z,{variant:"h2",children:"Ancestry"}),(0,l.jsxs)(wt.Z,{gutterBottom:!0,children:["This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",(0,l.jsx)(Ne.rU,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity",children:"processors emitted"})," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."]}),(0,l.jsx)(Y.Z,{mt:4,children:(0,l.jsx)(Ne.mn,{nodes:B,edges:_,renderNode:Or,direction:Ne.NX.Nm.BOTTOM_TOP,zoom:"enable-on-click"})})]})}var Bn=t(11776),In=t(38402),or=t(86136),gr=t(99688),es=t(49378),ts=t(54506),br=t(94339),Sr=t(24579),ns=t(27685);const wr=(0,z.Z)(v=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:v.spacing(2)},helpIcon:{marginLeft:v.spacing(1),color:v.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function Rn(v){const C=wr();return(0,l.jsx)(es.Z,{...v,primaryTypographyProps:{className:C.monospace},secondaryTypographyProps:{className:C.monospace}})}function Zn(v){const C=wr();return(0,l.jsx)(ts.Z,{className:C.monospace,children:v.children})}function ir(v){return(0,l.jsx)(Y.Z,{mt:2,children:(0,l.jsx)(br.Z,{variant:"outlined",children:(0,l.jsxs)(Sr.Z,{children:[(0,l.jsxs)(V.Z,{variant:"h6",gutterBottom:!0,children:[v.title,v.helpLink&&(0,l.jsx)(Gn,{to:v.helpLink})]}),v.children]})})})}function rs(v){if(v.match(/^url:https?:\/\//))return v.slice(4);if(v.match(/^https?:\/\//))return v}function Cr(v){const[C,R]=v.entry,B=rs(R);return(0,l.jsxs)(In.Z,{children:[v.indent&&(0,l.jsx)(or.Z,{}),(0,l.jsx)(Rn,{primary:C,secondary:B?(0,l.jsx)(Ne.rU,{to:B,children:R}):R})]})}function Gn(v){const C=wr();return(0,l.jsx)(Ne.rU,{to:v.to,className:C.helpIcon,children:(0,l.jsx)(ns.Z,{fontSize:"inherit"})})}const Rs=(0,z.Z)({root:{display:"flex",flexDirection:"column"}});function ss(v){var C,R;const B=(0,n.h_)(m),_=(0,Se.eE)(v),Q=(C=v.metadata.annotations)===null||C===void 0?void 0:C[Se.P1],oe=(R=v.metadata.annotations)===null||R===void 0?void 0:R[Se.q1],{loading:pe,error:me,value:ke}=(0,Xe.default)(async()=>!Q&&!oe?[]:(await B.getEntities({filter:[...Q?[{[`metadata.annotations.${Se.P1}`]:Q}]:[],...oe?[{[`metadata.annotations.${Se.q1}`]:oe}]:[]]})).items,[Q,oe]);return{loading:pe,error:me,location:Q,originLocation:oe,colocatedEntities:ke==null?void 0:ke.filter(Ue=>(0,Se.eE)(Ue)!==_)}}function ar(v){return(0,l.jsxs)(Bn.Z,{dense:!0,children:[v.header&&(0,l.jsx)(Cr,{entry:v.header},"header"),v.entities.map(C=>(0,l.jsxs)(In.Z,{children:[(0,l.jsx)(or.Z,{children:(0,l.jsx)(xr,{kind:C.kind})}),(0,l.jsx)(Rn,{primary:(0,l.jsx)(dt,{entityRef:C})})]},(0,Se.eE)(C)))]})}function Ls(v){const{entity:C}=v,{loading:R,error:B,location:_,originLocation:Q,colocatedEntities:oe}=ss(C);if(R)return(0,l.jsx)(Ne.Ex,{});if(B)return(0,l.jsx)(Ne.Gk,{error:B});if(!_&&!Q)return(0,l.jsx)(gr.Z,{severity:"warning",children:"Entity had no location information."});if(!(oe!=null&&oe.length))return(0,l.jsx)(gr.Z,{severity:"info",children:"There were no other entities on this location."});if(_===Q)return(0,l.jsx)(ar,{entities:oe});const pe=oe.filter(ke=>{var Ue;return((Ue=ke.metadata.annotations)===null||Ue===void 0?void 0:Ue[Se.P1])===_}),me=oe.filter(ke=>{var Ue;return((Ue=ke.metadata.annotations)===null||Ue===void 0?void 0:Ue[Se.q1])===Q});return(0,l.jsxs)(l.Fragment,{children:[pe.length>0&&(0,l.jsx)(ar,{entities:pe,header:["At the same location",_]}),me.length>0&&(0,l.jsx)(ar,{entities:me,header:["At the same origin",Q]})]})}function os(v){const C=Rs();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wt.Z,{variant:"h2",children:"Colocated"}),(0,l.jsx)(wt.Z,{children:"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)."}),(0,l.jsx)("div",{className:C.root,children:(0,l.jsx)(Ls,{entity:v.entity})})]})}function $r(v){return Object.fromEntries([...Object.entries(v)].sort((C,R)=>C[0]<R[0]?-1:1))}function is(v){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wt.Z,{variant:"h2",children:"Entity as JSON"}),(0,l.jsx)(wt.Z,{children:"This is the raw entity data as received from the catalog, on JSON form."}),(0,l.jsx)(wt.Z,{children:(0,l.jsx)("div",{style:{fontSize:"75%"},"data-testid":"code-snippet",children:(0,l.jsx)(Ne.Oi,{text:JSON.stringify($r(v.entity),void 0,2),language:"json",showCopyCodeButton:!0})})})]})}var as=t(3440),Br=t.n(as);const ls=(0,z.Z)({root:{display:"flex",flexDirection:"column"}});function cs(v){var C,R;const B=ls(),{apiVersion:_,kind:Q,metadata:oe,spec:pe,relations:me=[],status:ke={}}=v.entity,Ue=Br()(ae()(me,Pe=>Pe.targetRef),"type");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wt.Z,{variant:"h2",children:"Overview"}),(0,l.jsxs)("div",{className:B.root,children:[(0,l.jsx)(ir,{title:"Identity",children:(0,l.jsxs)(Bn.Z,{dense:!0,children:[(0,l.jsx)(In.Z,{children:(0,l.jsx)(Rn,{primary:"apiVersion",secondary:_})}),(0,l.jsx)(In.Z,{children:(0,l.jsx)(Rn,{primary:"kind",secondary:Q})}),(pe==null?void 0:pe.type)&&(0,l.jsx)(In.Z,{children:(0,l.jsx)(Rn,{primary:"spec.type",secondary:pe.type})}),oe.uid&&(0,l.jsx)(In.Z,{children:(0,l.jsx)(Rn,{primary:"uid",secondary:oe.uid})}),oe.etag&&(0,l.jsx)(In.Z,{children:(0,l.jsx)(Rn,{primary:"etag",secondary:oe.etag})})]})}),(0,l.jsxs)(ir,{title:"Metadata",children:[!!Object.keys(oe.annotations||{}).length&&(0,l.jsx)(Bn.Z,{dense:!0,subheader:(0,l.jsxs)(Zn,{children:["Annotations",(0,l.jsx)(Gn,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"})]}),children:Object.entries(oe.annotations).map(Pe=>(0,l.jsx)(Cr,{indent:!0,entry:Pe},Pe[0]))}),!!Object.keys(oe.labels||{}).length&&(0,l.jsx)(Bn.Z,{dense:!0,subheader:(0,l.jsx)(Zn,{children:"Labels"}),children:Object.entries(oe.labels).map(Pe=>(0,l.jsx)(Cr,{indent:!0,entry:Pe},Pe[0]))}),!!(!((C=oe.tags)===null||C===void 0)&&C.length)&&(0,l.jsx)(Bn.Z,{dense:!0,subheader:(0,l.jsx)(Zn,{children:"Tags"}),children:oe.tags.map((Pe,rt)=>(0,l.jsxs)(In.Z,{children:[(0,l.jsx)(or.Z,{}),(0,l.jsx)(Rn,{primary:Pe})]},`${Pe}-${rt}`))})]}),!!me.length&&(0,l.jsx)(ir,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations",children:Object.entries(Ue).map(([Pe,rt],jt)=>(0,l.jsx)("div",{children:(0,l.jsx)(Bn.Z,{dense:!0,subheader:(0,l.jsx)(Zn,{children:Pe}),children:rt.map(ft=>(0,l.jsxs)(In.Z,{children:[(0,l.jsx)(or.Z,{children:(0,l.jsx)(xr,{entityRef:ft.targetRef})}),(0,l.jsx)(Rn,{primary:(0,l.jsx)(dt,{entityRef:ft.targetRef})})]},ft.targetRef))})},jt))}),!!(!((R=ke.items)===null||R===void 0)&&R.length)&&(0,l.jsx)(ir,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses",children:ke.items.map((Pe,rt)=>(0,l.jsxs)("div",{children:[(0,l.jsxs)(V.Z,{children:[Pe.level,": ",Pe.type]}),(0,l.jsx)(Y.Z,{ml:2,children:Pe.message})]},rt))})]})]})}var Yt=t(72847);function jr(v){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wt.Z,{variant:"h2",children:"Entity as YAML"}),(0,l.jsx)(wt.Z,{children:"This is the raw entity data as received from the catalog, on YAML form."}),(0,l.jsx)(wt.Z,{children:(0,l.jsx)("div",{style:{fontSize:"75%"},"data-testid":"code-snippet",children:(0,l.jsx)(Ne.Oi,{text:Yt.ZP.stringify($r(v.entity)),language:"yaml",showCopyCodeButton:!0})})})]})}const Zr=(0,z.Z)(v=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:v.palette.background.paper},tabs:{borderRight:`1px solid ${v.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function qn(v){const{children:C,value:R,index:B,..._}=v,Q=Zr();return(0,l.jsx)("div",{role:"tabpanel",hidden:R!==B,id:`vertical-tabpanel-${B}`,"aria-labelledby":`vertical-tab-${B}`,className:Q.tabContents,..._,children:R===B&&(0,l.jsx)(Y.Z,{pl:3,pr:3,children:C})})}function un(v){return{id:`vertical-tab-${v}`,"aria-controls":`vertical-tabpanel-${v}`}}function Fn(v){const C=Zr(),[R,B]=L.useState(0);return(0,L.useEffect)(()=>{B(0)},[v.open]),v.entity?(0,l.jsxs)(H.Z,{fullWidth:!0,maxWidth:"xl",open:v.open,onClose:v.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:C.fullHeightDialog},children:[(0,l.jsx)(de.Z,{id:"entity-inspector-dialog-title",children:"Entity Inspector"}),(0,l.jsx)(ve.Z,{dividers:!0,children:(0,l.jsxs)("div",{className:C.root,children:[(0,l.jsxs)(Ee.Z,{orientation:"vertical",variant:"scrollable",value:R,onChange:(_,Q)=>B(Q),"aria-label":"Inspector options",className:C.tabs,children:[(0,l.jsx)(_e.Z,{label:"Overview",...un(0)}),(0,l.jsx)(_e.Z,{label:"Ancestry",...un(1)}),(0,l.jsx)(_e.Z,{label:"Colocated",...un(2)}),(0,l.jsx)(_e.Z,{label:"Raw JSON",...un(3)}),(0,l.jsx)(_e.Z,{label:"Raw YAML",...un(4)})]}),(0,l.jsx)(qn,{value:R,index:0,children:(0,l.jsx)(cs,{entity:v.entity})}),(0,l.jsx)(qn,{value:R,index:1,children:(0,l.jsx)(_r,{entity:v.entity})}),(0,l.jsx)(qn,{value:R,index:2,children:(0,l.jsx)(os,{entity:v.entity})}),(0,l.jsx)(qn,{value:R,index:3,children:(0,l.jsx)(is,{entity:v.entity})}),(0,l.jsx)(qn,{value:R,index:4,children:(0,l.jsx)(jr,{entity:v.entity})})]})}),(0,l.jsx)($t.Z,{children:(0,l.jsx)(K.Z,{onClick:v.onClose,color:"primary",children:"Close"})})]}):null}var ds=t(85256);function us(v){var C;const R=(0,n.h_)(m),B=(C=v.metadata.annotations)===null||C===void 0?void 0:C[Se.q1],_=v.metadata.uid,Q=B==="bootstrap:bootstrap",oe=(0,Xe.default)(async()=>{const ft=R.getLocationByRef(B);let We;if(!B)We=Promise.resolve([]);else{const Pt=`metadata.annotations.${Se.q1}`;We=R.getEntities({filter:{[Pt]:B},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Xt=>Xt.items)}return Promise.all([ft,We]).then(([Pt,Xt])=>({location:Pt,colocatedEntities:Xt}))},[R,v]),pe=(0,L.useCallback)(async function(){const{location:We}=oe.value;await R.removeLocationById(We.id)},[R,oe]),me=(0,L.useCallback)(async function(){await R.removeEntityByUid(_)},[R,_]);if(Q)return{type:"bootstrap",location:B,deleteEntity:me};const{loading:ke,error:Ue,value:Pe}=oe;if(ke)return{type:"loading"};if(Ue)return{type:"error",error:Ue};const{location:rt,colocatedEntities:jt}=Pe;return rt?{type:"unregister",location:B,colocatedEntities:jt.map(Se.iB),unregisterLocation:pe,deleteEntity:me}:{type:"only-delete",deleteEntity:me}}var Dr=t(23054);const hs=(0,z.Z)({advancedButton:{fontSize:"0.7em"}}),ps=({entity:v,onConfirm:C})=>{const R=(0,n.h_)(n.$v),B=(0,n.h_)(n.Ds),_=hs(),Q=us(v),[oe,pe]=(0,L.useState)(!1),[me,ke]=(0,L.useState)(!1);var Ue;const Pe=(Ue=B.getOptionalString("app.title"))!==null&&Ue!==void 0?Ue:"Backstage",rt=(0,L.useCallback)(async function(){if("unregisterLocation"in Q){ke(!0);try{await Q.unregisterLocation(),C()}catch(We){(0,Dr.BD)(We),R.post({message:We.message})}finally{ke(!1)}}},[R,C,Q]),jt=(0,L.useCallback)(async function(){if("deleteEntity"in Q){ke(!0);try{await Q.deleteEntity(),C()}catch(We){(0,Dr.BD)(We),R.post({message:We.message})}finally{ke(!1)}}},[R,C,Q]);return Q.type==="loading"?(0,l.jsx)(Ne.Ex,{}):Q.type==="error"?(0,l.jsx)(Ne.Gk,{error:Q.error}):Q.type==="bootstrap"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(gr.Z,{severity:"info",children:['You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',Q.location,'"). If you believe this is in error, please contact the ',Pe," ","integrator."]}),(0,l.jsxs)(Y.Z,{marginTop:2,children:[!oe&&(0,l.jsx)(K.Z,{variant:"text",size:"small",color:"primary",className:_.advancedButton,onClick:()=>pe(!0),children:"Advanced Options"}),oe&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wt.Z,{children:"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."}),(0,l.jsx)(K.Z,{variant:"contained",color:"secondary",disabled:me,onClick:jt,children:"Delete Entity"})]})]})]}):Q.type==="only-delete"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wt.Z,{children:"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."}),(0,l.jsx)(K.Z,{variant:"contained",color:"secondary",disabled:me,onClick:jt,children:"Delete Entity"})]}):Q.type==="unregister"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wt.Z,{children:"This action will unregister the following entities:"}),(0,l.jsx)(wt.Z,{component:"ul",children:Q.colocatedEntities.map(ft=>(0,l.jsx)("li",{children:(0,l.jsx)(dt,{entityRef:ft})},`${ft.kind}:${ft.namespace}/${ft.name}`))}),(0,l.jsx)(wt.Z,{children:"Located at the following location:"}),(0,l.jsx)(wt.Z,{component:"ul",children:(0,l.jsx)("li",{children:Q.location})}),(0,l.jsxs)(wt.Z,{children:["To undo, just re-register the entity in ",Pe,"."]}),(0,l.jsxs)(Y.Z,{marginTop:2,children:[(0,l.jsx)(K.Z,{variant:"contained",color:"secondary",disabled:me,onClick:rt,children:"Unregister Location"}),!oe&&(0,l.jsx)(Y.Z,{component:"span",marginLeft:2,children:(0,l.jsx)(K.Z,{variant:"text",size:"small",color:"primary",className:_.advancedButton,onClick:()=>pe(!0),children:"Advanced Options"})})]}),oe&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Y.Z,{paddingTop:4,paddingBottom:4,children:(0,l.jsx)(ds.Z,{})}),(0,l.jsx)(wt.Z,{children:"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."}),(0,l.jsx)(K.Z,{variant:"contained",color:"secondary",disabled:me,onClick:jt,children:"Delete Entity"})]})]}):(0,l.jsx)(gr.Z,{severity:"error",children:"Internal error: Unknown state"})},fs=v=>{const{open:C,onConfirm:R,onClose:B,entity:_}=v;return(0,l.jsxs)(H.Z,{open:C,onClose:B,children:[(0,l.jsx)(de.Z,{id:"responsive-dialog-title",children:"Are you sure you want to unregister this entity?"}),(0,l.jsx)(ve.Z,{children:(0,l.jsx)(ps,{entity:_,onConfirm:R})}),(0,l.jsx)($t.Z,{children:(0,l.jsx)(K.Z,{onClick:B,color:"primary",children:"Cancel"})})]})};var gs=t(12231),Nr=t(9520),mr=t(47603);const Ps=(0,z.Z)(v=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:v.spacing(1,0,1,0)},title:{margin:v.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:v.palette.text.primary},menuItem:{minHeight:v.spacing(6)},groupWrapper:{margin:v.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function ms(v){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:mr.Z},{id:"starred",label:"Starred",icon:x.Z}]},{name:v!=null?v:"Company",items:[{id:"all",label:"All"}]}]}const Fr=v=>{const{initialFilter:C,availableFilters:R}=v,B=Ps(),_=(0,n.h_)(n.Ds);var Q;const oe=(Q=_.getOptionalString("organization.name"))!==null&&Q!==void 0?Q:"Company",{filters:pe,updateFilters:me,backendEntities:ke,queryParameters:{kind:Ue,user:Pe},loading:rt}=Ce(),jt=["starred","all"],ft=ms(oe).map(yn=>({...yn,items:yn.items.filter(({id:pn})=>["group","user"].some(Ar=>Ar===Ue)?jt.includes(pn):!R||R.includes(pn))})).filter(({items:yn})=>!!yn.length),{isStarredEntity:We}=Ft(),{isOwnedEntity:Pt,loading:Xt}=we(),Dn=rt||Xt,Ln=(0,L.useMemo)(()=>new xt("owned",Pt,We),[Pt,We]),_n=(0,L.useMemo)(()=>new xt("starred",Pt,We),[Pt,We]),gn=(0,L.useMemo)(()=>[Pe].flat()[0],[Pe]),[vn,jn]=(0,L.useState)(gn!=null?gn:C),er=(0,L.useMemo)(()=>ke.filter(ct((0,Te.compact)(Object.values({...pe,user:void 0})))),[pe,ke]),vr=(0,L.useMemo)(()=>({all:er.length,starred:er.filter(yn=>_n.filterEntity(yn)).length,owned:er.filter(yn=>Ln.filterEntity(yn)).length}),[er,_n,Ln]);(0,L.useEffect)(()=>{gn&&jn(gn)},[gn]),(0,L.useEffect)(()=>{!Dn&&!!vn&&vn!=="all"&&vr[vn]===0&&jn("all")},[Dn,vr,vn,jn]),(0,L.useEffect)(()=>{me({user:vn?new xt(vn,Pt,We):void 0})},[vn,Pt,We,me]);var Er;return(0,l.jsx)(br.Z,{className:B.root,children:ft.map(yn=>(0,l.jsxs)(L.Fragment,{children:[(0,l.jsx)(V.Z,{variant:"subtitle2",component:"span",className:B.title,children:yn.name}),(0,l.jsx)(br.Z,{className:B.groupWrapper,children:(0,l.jsx)(Bn.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":yn.name,children:yn.items.map(pn=>{var Ar;return(0,l.jsxs)(gs.Z,{role:"none presentation",button:!0,divider:!0,onClick:()=>jn(pn.id),selected:pn.id===((Ar=pe.user)===null||Ar===void 0?void 0:Ar.value),className:B.menuItem,disabled:vr[pn.id]===0,"data-testid":`user-picker-${pn.id}`,tabIndex:0,ContainerProps:{role:"menuitem"},children:[pn.icon&&(0,l.jsx)(or.Z,{className:B.listIcon,children:(0,l.jsx)(pn.icon,{fontSize:"small"})}),(0,l.jsx)(es.Z,{children:(0,l.jsxs)(V.Z,{variant:"body1",children:[pn.label," "]})}),(0,l.jsx)(Nr.Z,{children:(Er=vr[pn.id])!==null&&Er!==void 0?Er:"-"})]},pn.id)})})})]},yn.name))})},vs=(0,z.Z)({input:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),ks=(0,l.jsx)(et.Z,{fontSize:"small"}),ys=(0,l.jsx)(Qe.Z,{fontSize:"small"}),Os=()=>{const v=vs(),{updateFilters:C}=Ce(),[R,B]=(0,L.useState)([]);function _(pe){C({orphan:pe?new Bt(pe):void 0})}function Q(pe){C({error:pe?new At(pe):void 0})}const oe=["Is Orphan","Has Error"];return(0,l.jsx)(Y.Z,{pb:1,pt:1,children:(0,l.jsxs)(V.Z,{variant:"button",component:"label",children:["Processing Status",(0,l.jsx)(on.ZP,{multiple:!0,options:oe,value:R,onChange:(pe,me)=>{B(me),_(me.includes("Is Orphan")),Q(me.includes("Has Error"))},renderOption:(pe,{selected:me})=>(0,l.jsx)(j.Z,{control:(0,l.jsx)(se.Z,{icon:ks,checkedIcon:ys,checked:me}),label:pe}),size:"small",popupIcon:(0,l.jsx)(Ct.Z,{"data-testid":"processing-status-picker-expand"}),renderInput:pe=>(0,l.jsx)($e.Z,{...pe,className:v.input,variant:"outlined"})})]})})},vo=({children:v,value:C})=>{var R;const[B,_]=useState((R=C==null?void 0:C.filters)!==null&&R!==void 0?R:{}),Q=useCallback(jt=>{_(ft=>{const We=typeof jt=="function"?jt(ft):jt;return{...ft,...We}})},[]),oe=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]);var pe,me,ke,Ue,Pe;const rt=useMemo(()=>({entities:(pe=C==null?void 0:C.entities)!==null&&pe!==void 0?pe:oe.entities,backendEntities:(me=C==null?void 0:C.backendEntities)!==null&&me!==void 0?me:oe.backendEntities,updateFilters:(ke=C==null?void 0:C.updateFilters)!==null&&ke!==void 0?ke:Q,filters:B,loading:(Ue=C==null?void 0:C.loading)!==null&&Ue!==void 0?Ue:!1,queryParameters:(Pe=C==null?void 0:C.queryParameters)!==null&&Pe!==void 0?Pe:oe.queryParameters,error:C==null?void 0:C.error}),[C,oe,B,Q]);return _jsx(EntityListContext.Provider,{value:rt,children:v})}},33414:function(tt,Ae,t){"use strict";t.r(Ae),t.d(Ae,{AboutCard:function(){return Ke},AboutContent:function(){return Te},AboutField:function(){return te}});var h=t(52322),n=t(25271),m=t(15018),O=t(25248),G=t(32838),b=t(46285),l=t(79692),L=t(94339),ee=t(32552),X=t(61837),K=t(85256),F=t(24579),Y=t(52866),V=t(30254),ie=t(27604),le=t(2784),I=t(19625),A=t(60905),Z=t(90436),P=t(7089);const $=(0,l.Z)(Oe=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:Oe.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function te(Oe){const{label:Fe,value:qe,gridSizes:st,children:nt}=Oe,ct=$(),Se=(0,O.vJ)(nt,mt=>mt.getElements()),ht=Se.length>0?Se:(0,h.jsx)(Z.Z,{variant:"body2",className:ct.value,children:qe||"unknown"});return(0,h.jsxs)(A.Z,{item:!0,...st,children:[(0,h.jsx)(Z.Z,{variant:"h2",className:ct.label,children:Fe}),ht]})}var ye=t(24851);const Ge=(0,l.Z)({description:{wordBreak:"break-word"}});function Ve(Oe,Fe,qe){if(Fe==="url"||Oe.includes("://"))return Oe;const st=qe.type==="file"?`file://${qe.target}`:qe.target;return Fe==="file"||qe.type==="file"?new URL(Oe,st).href:st}function Te(Oe){var Fe,qe,st,nt,ct,Se,ht,mt;const{entity:Ie}=Oe,q=Ge(),xe=Ie.kind.toLocaleLowerCase("en-US")==="system",Ce=Ie.kind.toLocaleLowerCase("en-US")==="resource",Xe=Ie.kind.toLocaleLowerCase("en-US")==="component",ut=Ie.kind.toLocaleLowerCase("en-US")==="api",vt=Ie.kind.toLocaleLowerCase("en-US")==="template",at=Ie.kind.toLocaleLowerCase("en-US")==="location",ae=Ie.kind.toLocaleLowerCase("en-US")==="group",ce=(0,b.hF)(Ie,n.cz,{kind:"system"}),De=(0,b.hF)(Ie,n.cz,{kind:"component"}),He=(0,b.hF)(Ie,n.cz,{kind:"domain"}),Ne=(0,b.hF)(Ie,n.S4);let ot;try{ot=(0,n.CV)(Ie)}catch{ot=void 0}return(0,h.jsxs)(A.Z,{container:!0,children:[(0,h.jsx)(te,{label:"Description",gridSizes:{xs:12},children:(0,h.jsx)(Z.Z,{variant:"body2",paragraph:!0,className:q.description,children:(Ie==null||(Fe=Ie.metadata)===null||Fe===void 0?void 0:Fe.description)||"No description"})}),(0,h.jsx)(te,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4},children:Ne.length>0&&(0,h.jsx)(b.rI,{entityRefs:Ne,defaultKind:"group"})}),(xe||He.length>0)&&(0,h.jsx)(te,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4},children:He.length>0&&(0,h.jsx)(b.rI,{entityRefs:He,defaultKind:"domain"})}),(ut||Xe||Ce||ce.length>0)&&(0,h.jsx)(te,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4},children:ce.length>0&&(0,h.jsx)(b.rI,{entityRefs:ce,defaultKind:"system"})}),Xe&&De.length>0&&(0,h.jsx)(te,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4},children:(0,h.jsx)(b.rI,{entityRefs:De,defaultKind:"component"})}),(ut||Xe||Ce||vt||ae||at||typeof(Ie==null||(qe=Ie.spec)===null||qe===void 0?void 0:qe.type)=="string")&&(0,h.jsx)(te,{label:"Type",value:Ie==null||(st=Ie.spec)===null||st===void 0?void 0:st.type,gridSizes:{xs:12,sm:6,lg:4}}),(ut||Xe||typeof(Ie==null||(nt=Ie.spec)===null||nt===void 0?void 0:nt.lifecycle)=="string")&&(0,h.jsx)(te,{label:"Lifecycle",value:Ie==null||(ct=Ie.spec)===null||ct===void 0?void 0:ct.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),(0,h.jsx)(te,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4},children:((Ie==null||(Se=Ie.metadata)===null||Se===void 0?void 0:Se.tags)||[]).map(dt=>(0,h.jsx)(P.Z,{size:"small",label:dt},dt))}),at&&((Ie==null||(ht=Ie.spec)===null||ht===void 0?void 0:ht.targets)||(Ie==null||(mt=Ie.spec)===null||mt===void 0?void 0:mt.target))&&(0,h.jsx)(te,{label:"Targets",gridSizes:{xs:12},children:(0,h.jsx)(ye.s,{cols:1,items:(Ie.spec.targets||[Ie.spec.target]).map(dt=>dt).map(dt=>{var Rt;return{text:dt,href:Ve(dt,(Ie==null||(Rt=Ie.spec)===null||Rt===void 0?void 0:Rt.type)||"unknown",ot)}})})})]})}const Ye=(0,l.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function Ke(Oe){var Fe,qe,st;const{variant:nt}=Oe,ct=Ye(),{entity:Se}=(0,b.X2)(),ht=(0,O.h_)(G.q3),mt=(0,O.h_)(b.Ah),Ie=(0,O.h_)(O.$v),q=(0,O.tg)(I.jU),xe=(0,b.CV)(Se,ht),Ce=(Fe=Se.metadata.annotations)===null||Fe===void 0?void 0:Fe[n.Tf],Xe={label:"View Source",disabled:!xe,icon:(0,h.jsx)(G.nW,{type:xe==null?void 0:xe.integrationType}),href:xe==null?void 0:xe.locationTargetUrl},ut={label:"View TechDocs",disabled:!(!((qe=Se.metadata.annotations)===null||qe===void 0)&&qe["backstage.io/techdocs-ref"])||!q,icon:(0,h.jsx)(V.Z,{}),href:q&&q({namespace:Se.metadata.namespace||n.zG,kind:Se.kind,name:Se.metadata.name})};let vt="";nt==="gridItem"?vt=ct.gridItemCard:nt==="fullHeight"&&(vt=ct.fullHeightCard);let at="";nt==="gridItem"?at=ct.gridItemCardContent:nt==="fullHeight"&&(at=ct.fullHeightCardContent);const ae=(st=Se.metadata.annotations)===null||st===void 0?void 0:st[n.P1],ce=(ae==null?void 0:ae.startsWith("url:"))||(ae==null?void 0:ae.startsWith("file:")),De=(0,le.useCallback)(async()=>{await mt.refreshEntity((0,n.eE)(Se)),Ie.post({message:"Refresh scheduled",severity:"info"})},[mt,Ie,Se]);return(0,h.jsxs)(L.Z,{className:vt,children:[(0,h.jsx)(ee.Z,{title:"About",action:(0,h.jsxs)(h.Fragment,{children:[ce&&(0,h.jsx)(X.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:De,children:(0,h.jsx)(Y.Z,{})}),(0,h.jsx)(X.Z,{component:m.rU,"aria-label":"Edit",disabled:!Ce,title:"Edit Metadata",to:Ce!=null?Ce:"#",children:(0,h.jsx)(ie.Z,{})})]}),subheader:(0,h.jsx)(m.M6,{links:[Xe,ut]})}),(0,h.jsx)(K.Z,{}),(0,h.jsx)(F.Z,{className:at,children:(0,h.jsx)(Te,{entity:Se})})]})}},79324:function(tt,Ae,t){"use strict";t.d(Ae,{K:function(){return Y}});var h=t(52322),n=t(2784),m=t(79692),O=t(12420),G=t(97580),b=t(73698),l=t(74603),L=t(12231),ee=t(46285),X=t(64279),K=t(25248);const F=(0,m.Z)(V=>(0,O.Z)({root:{...V.typography.h4}}));function Y(V){const{initialFilter:ie="component",allowedKinds:le}=V,I=F(),A=(0,K.h_)(ee.Ah),{value:Z}=(0,X.default)(async()=>await A.getEntityFacets({facets:["kind"]}).then(Ke=>{var Oe;return((Oe=Ke.facets.kind)===null||Oe===void 0?void 0:Oe.map(Fe=>Fe.value).sort())||[]})),{updateFilters:P,queryParameters:{kind:$}}=(0,ee.wp)(),te=(0,n.useMemo)(()=>{var Ke;return(Ke=[$].flat()[0])===null||Ke===void 0?void 0:Ke.toLocaleLowerCase("en-US")},[$]),[ye,Ge]=(0,n.useState)(te!=null?te:ie);(0,n.useEffect)(()=>{P({kind:ye?new ee.zo(ye):void 0})},[ye,P]),(0,n.useEffect)(()=>{te&&Ge(te)},[te]);var Ve;const Ye=[(0,G.Z)(ye)].concat((Ve=Z==null?void 0:Z.filter(Ke=>le?le.some(Oe=>Oe.toLocaleLowerCase("en-US")===Ke.toLocaleLowerCase("en-US")):!0))!==null&&Ve!==void 0?Ve:[]).sort().reduce((Ke,Oe)=>(Ke[Oe.toLocaleLowerCase("en-US")]=Oe,Ke),{});return(0,h.jsx)(b.Z,{input:(0,h.jsx)(l.Z,{value:ye}),value:ye,onChange:Ke=>Ge(Ke.target.value),classes:I,children:Object.keys(Ye).map(Ke=>(0,h.jsx)(L.Z,{value:Ke,children:`${Ye[Ke]}s`},Ke))})}},86359:function(tt,Ae,t){"use strict";t.d(Ae,{E:function(){return le}});var h=t(52322),n=t(25271),m=t(15018),O=t(46285),G=t(90436),b=t(15459),l=t(27604),L=t(2997),ee=t(11640),X=t(28347),K=t(76635),F=t(2784),Y=t(7089);const V=Object.freeze({createNameColumn(I){function A(Z){var P;return((P=Z.metadata)===null||P===void 0?void 0:P.title)||(0,O.$3)(Z,{defaultKind:I==null?void 0:I.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:Z},{entity:P}){return A(Z).localeCompare(A(P))},render:({entity:Z})=>{var P;return(0,h.jsx)(O.dx,{entityRef:Z,defaultKind:(I==null?void 0:I.defaultKind)||"Component",title:(P=Z.metadata)===null||P===void 0?void 0:P.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:I})=>(0,h.jsx)(O.rI,{entityRefs:I.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:I})=>(0,h.jsx)(O.rI,{entityRefs:I.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",render:({entity:I})=>{var A,Z;return(0,h.jsx)(h.Fragment,{children:((I==null||(A=I.spec)===null||A===void 0?void 0:A.targets)||(I==null||(Z=I.spec)===null||Z===void 0?void 0:Z.target))&&(0,h.jsx)(m.Or,{text:(I.spec.targets||[I.spec.target]).join(", "),placement:"bottom-start"})})}}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0,width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:I})=>(0,h.jsx)(m.Or,{text:I.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:I})=>(0,h.jsx)(h.Fragment,{children:I.metadata.tags&&I.metadata.tags.map(A=>(0,h.jsx)(Y.Z,{label:A,size:"small",variant:"outlined",style:{marginBottom:"0px"}},A))}),width:"auto"}},createTitleColumn(I){return{title:"Title",field:"entity.metadata.title",hidden:I==null?void 0:I.hidden,searchable:!0}}}),ie=(0,b.Z)({root:{color:"#f3ba37"}})(ee.Z),le=I=>{var A,Z;const{columns:P,actions:$,tableOptions:te,subtitle:ye}=I,{isStarredEntity:Ge,toggleStarredEntity:Ve}=(0,O.CR)(),{loading:Te,error:Ye,entities:Ke,filters:Oe}=(0,O.wp)(),Fe=(0,F.useMemo)(()=>{var Ie;return[V.createTitleColumn({hidden:!0}),V.createNameColumn({defaultKind:(Ie=Oe.kind)===null||Ie===void 0?void 0:Ie.value}),...q(),V.createMetadataDescriptionColumn(),V.createTagsColumn()];function q(){var xe;switch((xe=Oe.kind)===null||xe===void 0?void 0:xe.value){case"user":return[];case"domain":case"system":return[V.createOwnerColumn()];case"group":case"template":return[V.createSpecTypeColumn()];case"location":return[V.createSpecTypeColumn(),V.createSpecTargetsColumn()];default:return[V.createSystemColumn(),V.createOwnerColumn(),V.createSpecTypeColumn(),V.createSpecLifecycleColumn()]}}},[(A=Oe.kind)===null||A===void 0?void 0:A.value]),qe=Oe.type===void 0;var st;const nt=(0,K.capitalize)((st=(Z=Oe.user)===null||Z===void 0?void 0:Z.value)!==null&&st!==void 0?st:"all");if(Ye)return(0,h.jsx)("div",{children:(0,h.jsx)(m.GB,{severity:"error",title:"Could not fetch catalog entities.",children:(0,h.jsx)(m.Oi,{language:"text",text:Ye.toString()})})});const ct=[({entity:Ie})=>{var q;const xe=(q=Ie.metadata.annotations)===null||q===void 0?void 0:q[n.l2],Ce="View";return{icon:()=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(G.Z,{variant:"srOnly",children:Ce}),(0,h.jsx)(L.Z,{fontSize:"small"})]}),tooltip:Ce,disabled:!xe,onClick:()=>{!xe||window.open(xe,"_blank")}}},({entity:Ie})=>{var q;const xe=(q=Ie.metadata.annotations)===null||q===void 0?void 0:q[n.Tf],Ce="Edit";return{icon:()=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(G.Z,{variant:"srOnly",children:Ce}),(0,h.jsx)(l.Z,{fontSize:"small"})]}),tooltip:Ce,disabled:!xe,onClick:()=>{!xe||window.open(xe,"_blank")}}},({entity:Ie})=>{const q=Ge(Ie),xe=q?"Remove from favorites":"Add to favorites";return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(G.Z,{variant:"srOnly",children:xe}),q?(0,h.jsx)(ie,{}):(0,h.jsx)(X.Z,{})]}),tooltip:xe,onClick:()=>Ve(Ie)}}],Se=Ke.map(Ie=>{const q=(0,O.hF)(Ie,n.cz,{kind:"system"}),xe=(0,O.hF)(Ie,n.S4);return{entity:Ie,resolved:{name:(0,O.$3)(Ie,{defaultKind:"Component"}),ownedByRelationsTitle:xe.map(Ce=>(0,O.$3)(Ce,{defaultKind:"group"})).join(", "),ownedByRelations:xe,partOfSystemRelationTitle:q.map(Ce=>(0,O.$3)(Ce,{defaultKind:"system"})).join(", "),partOfSystemRelations:q}}}),ht=(P||Fe).find(Ie=>Ie.title==="Type");ht&&(ht.hidden=!qe);const mt=Se.length>20;return(0,h.jsx)(m.iA,{isLoading:Te,columns:P||Fe,options:{paging:mt,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!Te,padding:"dense",pageSizeOptions:[20,50,100],...te},title:`${nt} (${Ke.length})`,data:Se,actions:$||ct,subtitle:ye})};le.columns=V},24851:function(tt,Ae,t){"use strict";t.d(Ae,{s:function(){return ie}});var h=t(52322),n=t(90348),m=t(11861),O=t(2784),G=t(79692),b=t(95544),l=t(90436),L=t(52160),ee=t(15018);const X=(0,G.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function K(le){const{href:I,text:A,Icon:Z}=le,P=X();return(0,h.jsxs)(b.Z,{display:"flex",children:[(0,h.jsx)(b.Z,{mr:1,className:P.svgIcon,children:(0,h.jsx)(l.Z,{component:"div",children:Z?(0,h.jsx)(Z,{}):(0,h.jsx)(L.Z,{})})}),(0,h.jsx)(b.Z,{flexGrow:"1",children:(0,h.jsx)(ee.rU,{to:I,target:"_blank",rel:"noopener",children:A||I})})]})}var F=t(41156);const Y={xs:1,sm:1,md:1,lg:2,xl:3};function V(le){const I=[(0,F.Z)($=>$.breakpoints.up("xl"))?"xl":null,(0,F.Z)($=>$.breakpoints.up("lg"))?"lg":null,(0,F.Z)($=>$.breakpoints.up("md"))?"md":null,(0,F.Z)($=>$.breakpoints.up("sm"))?"sm":null,(0,F.Z)($=>$.breakpoints.up("xs"))?"xs":null];let A=1;if(typeof le=="number")A=le;else{var Z;const $=(Z=I.find(te=>te!==null))!==null&&Z!==void 0?Z:"xs";var P;A=(P=le==null?void 0:le[$])!==null&&P!==void 0?P:Y[$]}return A}function ie(le){const{items:I,cols:A=void 0}=le,Z=V(A);return(0,h.jsx)(n.Z,{rowHeight:"auto",cols:Z,children:I.map(({text:P,href:$,Icon:te},ye)=>(0,h.jsx)(m.Z,{children:(0,h.jsx)(K,{href:$,text:P!=null?P:$,Icon:te})},ye))})}},19625:function(tt,Ae,t){"use strict";t.d(Ae,{_Z:function(){return O},jU:function(){return m},yw:function(){return n}});var h=t(25248);const n=(0,h.x8)({id:"create-component",optional:!0}),m=(0,h.x8)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),O=(0,h.NT)({id:"catalog"})},51666:function(tt,Ae,t){"use strict";t.d(Ae,{rG:function(){return h},Y2:function(){return Z},J$:function(){return ee},g2:function(){return m}});var h;(function(P){P.DENY="DENY",P.ALLOW="ALLOW",P.CONDITIONAL="CONDITIONAL"})(h||(h={}));function n(P,$){return P.name===$.name}function m(P,$){return"resourceType"in P?!$||P.resourceType===$:!1}function O(P){return P.attributes.action==="create"}function G(P){return P.attributes.action==="read"}function b(P){return P.attributes.action==="update"}function l(P){return P.attributes.action==="delete"}function L(P){return{authorize:async($,te)=>await P.authorize($,te),authorizeConditional($,te){const ye=$;return P.authorize(ye,te)}}}function ee({name:P,attributes:$,resourceType:te}){return te?{type:"resource",name:P,attributes:$,resourceType:te}:{type:"basic",name:P,attributes:$}}var X=t(23054),K=t(96279),F=t.n(K),Y=t(9571),V=t(30195);const ie=V.z.lazy(()=>V.z.object({rule:V.z.string(),resourceType:V.z.string(),params:V.z.array(V.z.unknown())}).or(V.z.object({anyOf:V.z.array(ie).nonempty()})).or(V.z.object({allOf:V.z.array(ie).nonempty()})).or(V.z.object({not:ie}))),le=V.z.object({result:V.z.literal(h.ALLOW).or(V.z.literal(h.DENY))}),I=V.z.union([V.z.object({result:V.z.literal(h.ALLOW).or(V.z.literal(h.DENY))}),V.z.object({result:V.z.literal(h.CONDITIONAL),pluginId:V.z.string(),resourceType:V.z.string(),conditions:ie})]),A=(P,$)=>V.z.object({items:V.z.array(V.z.intersection(V.z.object({id:V.z.string()}),P)).refine(te=>te.length===$.size&&te.every(({id:ye})=>$.has(ye)),{message:"Items in response do not match request"})});class Z{async authorize($,te){return this.makeRequest($,le,te)}async authorizeConditional($,te){return this.makeRequest($,I,te)}async makeRequest($,te,ye){if(!this.enabled)return $.map(Fe=>({result:h.ALLOW}));const Ge={items:$.map(Fe=>({id:Y.Z(),...Fe}))},Ve=await this.discovery.getBaseUrl("permission"),Te=await F()(`${Ve}/authorize`,{method:"POST",body:JSON.stringify(Ge),headers:{...this.getAuthorizationHeader(ye==null?void 0:ye.token),"content-type":"application/json"}});if(!Te.ok)throw await X.VL.fromResponse(Te);const Ye=await Te.json(),Oe=A(te,new Set(Ge.items.map(({id:Fe})=>Fe))).parse(Ye).items.reduce((Fe,qe)=>(Fe[qe.id]=qe,Fe),{});return Ge.items.map(Fe=>Oe[Fe.id])}getAuthorizationHeader($){return $?{Authorization:`Bearer ${$}`}:{}}constructor($){this.discovery=$.discovery;var te;this.enabled=(te=$.config.getOptionalBoolean("permission.enabled"))!==null&&te!==void 0?te:!1}}},73001:function(tt,Ae,t){"use strict";t.d(Ae,{iM:function(){return b},RV:function(){return O},gI:function(){return L}});var h=t(52322),n=t(2784),m=t(25248);const O=(0,m.T0)({id:"plugin.permission.api"});var G=t(51666);class b{static create(K){const{config:F,discovery:Y,identity:V}=K,ie=new G.Y2({discovery:Y,config:F});return new b(ie,V)}async authorize(K){return(await this.permissionClient.authorize([K],await this.identityApi.getCredentials()))[0]}constructor(K,F){this.permissionClient=K,this.identityApi=F}}var l=t(49857);function L(X){const K=(0,m.h_)(O),{data:F,error:Y}=(0,l.ZP)(X,async V=>{if((0,G.g2)(V.permission)&&!V.resourceRef)return G.rG.DENY;const{result:ie}=await K.authorize(V);return ie});return Y?{error:Y,loading:!1,allowed:!1}:F===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:F===G.rG.ALLOW}}const ee=X=>{const{permission:K,resourceRef:F,errorComponent:Y,...V}=X,ie=usePermission(isResourcePermission(K)?{permission:K,resourceRef:F}:{permission:K}),le=useApp(),{NotFoundErrorPage:I}=le.getComponents();let A=Y===void 0?_jsx(I,{}):Y;return ie.loading?A=null:ie.allowed&&(A=X.element),_jsx(Route,{...V,element:A})}},21411:function(tt,Ae,t){"use strict";t.d(Ae,{FA:function(){return L},Nd:function(){return ye},Rx:function(){return P}});var h=t(25248);const n=(0,h.T0)({id:"plugin.search.queryservice"});class m{query(){return Promise.resolve(this.mockedResults||{results:[]})}constructor(ce){this.mockedResults=ce}}var O=t(52322),G=t(2784),b=t(79692);const l=(0,b.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),L=({text:ae,preTag:ce,postTag:De})=>{const He=l(),Ne=(0,G.useMemo)(()=>ae.split(new RegExp(`(${ce}.+?${De})`)),[De,ce,ae]);return(0,O.jsx)(O.Fragment,{children:Ne.map((ot,dt)=>ot.includes(ce)?(0,O.jsx)("mark",{className:He.highlight,children:ot.replace(new RegExp(`${ce}|${De}`,"g"),"")},dt):ot)})};var ee=t(42494),X=t(84899),K=t(5806),F=t(21324),Y=t(56939),V=t(73698),ie=t(12231),le=t(51837),I=t(64279),A=t(1849);const Z=(0,le.CT)("search-context"),P=()=>{const ae=(0,G.useContext)(Z);if(!ae)throw new Error("useSearch must be used within a SearchContextProvider");const ce=ae.atVersion(1);if(!ce)throw new Error("No SearchContext v1 found");return ce},$=()=>useContext(Z)!==void 0,te={term:"",pageCursor:void 0,filters:{},types:[]},ye=ae=>{var ce,De,He,Ne;const{initialState:ot=te,children:dt}=ae,Rt=(0,h.h_)(n),[kt,Lt]=(0,G.useState)(ot.pageCursor),[zt,_t]=(0,G.useState)(ot.filters),[Et,cn]=(0,G.useState)(ot.term),[xt,Bt]=(0,G.useState)(ot.types),At=(0,A.Z)(Et),yt=(0,I.default)(()=>Rt.query({term:Et,filters:zt,pageCursor:kt,types:xt}),[Et,zt,xt,kt]),Kt=!yt.loading&&!yt.error&&((ce=yt.value)===null||ce===void 0?void 0:ce.nextPageCursor),Vt=!yt.loading&&!yt.error&&((De=yt.value)===null||De===void 0?void 0:De.previousPageCursor),en=(0,G.useCallback)(()=>{var M;Lt((M=yt.value)===null||M===void 0?void 0:M.nextPageCursor)},[(He=yt.value)===null||He===void 0?void 0:He.nextPageCursor]),Zt=(0,G.useCallback)(()=>{var M;Lt((M=yt.value)===null||M===void 0?void 0:M.previousPageCursor)},[(Ne=yt.value)===null||Ne===void 0?void 0:Ne.previousPageCursor]);(0,G.useEffect)(()=>{At!==void 0&&Et!==At&&Lt(void 0)},[Et,At,Lt]);const Ft={result:yt,filters:zt,setFilters:_t,term:Et,setTerm:cn,types:xt,setTypes:Bt,pageCursor:kt,setPageCursor:Lt,fetchNextPage:Kt?en:void 0,fetchPreviousPage:Vt?Zt:void 0},re=(0,le.EI)({1:Ft});return(0,O.jsx)(h.fC,{attributes:{searchTypes:xt.sort().join(",")},children:(0,O.jsx)(Z.Provider,{value:re,children:dt})})};var Ge=t(86619),Ve=t(7089),Te=t(88013),Ye=t(69294),Ke=t(48760);const Oe=(ae,ce,De=[],He=250)=>{const Ne=(0,G.useRef)({}),ot=ae||(()=>Promise.resolve([])),[dt,Rt]=(0,Ye.default)(ot,[ce],{loading:!0});if((0,Ke.Z)(()=>{Ne.current[ce]===void 0&&(Ne.current[ce]=Rt(ce).then(Lt=>(Ne.current[ce]=Lt,Lt)))},He,[Rt,ce]),De.length)return{loading:!1,value:De};const kt=Ne.current[ce];return Array.isArray(kt)?{loading:!1,value:kt}:dt},Fe=(ae,ce)=>{const{setFilters:De}=P();(0,G.useEffect)(()=>{ce&&[ce].flat().length>0&&De(He=>({...He,[ae]:ce}))},[])},qe=ae=>{const{className:ce,defaultValue:De,name:He,values:Ne,valuesDebounceMs:ot,label:dt,filterSelectedOptions:Rt,limitTags:kt,multiple:Lt}=ae,[zt,_t]=(0,G.useState)("");Fe(He,De);const Et=typeof Ne=="function"?Ne:void 0,cn=typeof Ne=="function"?void 0:Ne,{value:xt,loading:Bt}=Oe(Et,zt,cn,ot),{filters:At,setFilters:yt}=P(),Kt=At[He]||(Lt?[]:null),Vt=(Ft,re)=>{yt(M=>{const{[He]:we,...Re}=M;return re?{...Re,[He]:re}:{...Re}})},en=Ft=>(0,O.jsx)(Ge.Z,{...Ft,name:"search",variant:"outlined",label:dt,fullWidth:!0}),Zt=(Ft,re)=>Ft.map((M,we)=>(0,O.jsx)(Ve.Z,{label:M,color:"primary",...re({index:we})}));return(0,O.jsx)(Te.ZP,{filterSelectedOptions:Rt,limitTags:kt,multiple:Lt,className:ce,id:`${Lt?"multi-":""}select-filter-${He}--select`,options:xt||[],loading:Bt,value:Kt,onChange:Vt,onInputChange:(Ft,re)=>_t(re),renderInput:en,renderTags:Zt})},st=(0,b.Z)({label:{textTransform:"capitalize"}}),nt=ae=>{const{className:ce,defaultValue:De,label:He,name:Ne,values:ot=[],valuesDebounceMs:dt}=ae,Rt=st(),{filters:kt,setFilters:Lt}=P();Fe(Ne,De);const zt=typeof ot=="function"?ot:void 0,_t=typeof ot=="function"?void 0:ot,{value:Et=[],loading:cn}=Oe(zt,"",_t,dt),xt=At=>{const{target:{value:yt,checked:Kt}}=At;Lt(Vt=>{const{[Ne]:en,...Zt}=Vt,Ft=(en||[]).filter(M=>M!==yt),re=Kt?[...Ft,yt]:Ft;return re.length?{...Zt,[Ne]:re}:Zt})};var Bt;return(0,O.jsxs)(ee.Z,{className:ce,disabled:cn,fullWidth:!0,"data-testid":"search-checkboxfilter-next",children:[He?(0,O.jsx)(X.Z,{className:Rt.label,children:He}):null,Et.map(At=>(0,O.jsx)(K.Z,{control:(0,O.jsx)(F.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":At},value:At,name:At,onChange:xt,checked:((Bt=kt[Ne])!==null&&Bt!==void 0?Bt:[]).includes(At)}),label:At},At))]})},ct=ae=>{const{className:ce,defaultValue:De,label:He,name:Ne,values:ot,valuesDebounceMs:dt}=ae,Rt=st();Fe(Ne,De);const kt=typeof ot=="function"?ot:void 0,Lt=typeof ot=="function"?void 0:ot,{value:zt=[],loading:_t}=Oe(kt,"",Lt,dt),{filters:Et,setFilters:cn}=P(),xt=Bt=>{const{target:{value:At}}=Bt;cn(yt=>{const{[Ne]:Kt,...Vt}=yt;return At?{...Vt,[Ne]:At}:Vt})};return(0,O.jsxs)(ee.Z,{disabled:_t,className:ce,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next",children:[He?(0,O.jsx)(Y.Z,{className:Rt.label,margin:"dense",children:He}):null,(0,O.jsxs)(V.Z,{variant:"outlined",value:Et[Ne]||"",onChange:xt,children:[(0,O.jsx)(ie.Z,{value:"",children:(0,O.jsx)("em",{children:"All"})}),zt.map(Bt=>(0,O.jsx)(ie.Z,{value:Bt,children:Bt},Bt))]})]})},Se=({component:ae,...ce})=>(0,O.jsx)(ae,{...ce});Se.Checkbox=ae=>(0,O.jsx)(Se,{...ae,component:nt}),Se.Select=ae=>(0,O.jsx)(Se,{...ae,component:ct}),Se.Autocomplete=ae=>(0,O.jsx)(Se,{...ae,component:qe});var ht=t(15018);const mt=({children:ae})=>{const{result:{loading:ce,error:De,value:He}}=useSearch();return ce?_jsx(Progress,{}):De?_jsx(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:De}):He!=null&&He.results.length?_jsx(_Fragment,{children:ae({results:He.results})}):_jsx(EmptyState,{missing:"data",title:"Sorry, no results were found"})},Ie=ae=>_jsx(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResult"},children:_jsx(mt,{...ae})}),q=(0,b.Z)(ae=>({root:{display:"flex",justifyContent:"space-between",gap:ae.spacing(2),margin:ae.spacing(2,0)}})),xe=()=>{const{fetchNextPage:ae,fetchPreviousPage:ce}=useSearch(),De=q();return!ae&&!ce?_jsx(_Fragment,{}):_jsxs("nav",{"arial-label":"pagination navigation",className:De.root,children:[_jsx(Button,{"aria-label":"previous page",disabled:!ce,onClick:ce,startIcon:_jsx(ArrowBackIosIcon,{}),children:"Previous"}),_jsx(Button,{"aria-label":"next page",disabled:!ae,onClick:ae,endIcon:_jsx(ArrowForwardIosIcon,{}),children:"Next"})]})},Ce=({children:ae})=>{const ce=useAnalytics(),{term:De}=useSearch();return useEffect(()=>{De&&ce.captureEvent("search",De)},[ce,De]),_jsx(_Fragment,{children:ae})},Xe=({onChange:ae,onKeyDown:ce,onSubmit:De,debounceTime:He=200,clearButton:Ne=!0,fullWidth:ot=!0,value:dt,inputProps:Rt={},endAdornment:kt,...Lt})=>{const zt=useApi(configApiRef),[_t,Et]=useState(dt),cn=useSearchContextCheck();useEffect(()=>{Et(Zt=>Zt!==dt?dt:Zt)},[dt]),useDebounce(()=>ae(_t),He,[_t]);const xt=useCallback(Zt=>{Et(Zt.target.value)},[Et]),Bt=useCallback(Zt=>{ce&&ce(Zt),De&&Zt.key==="Enter"&&De()},[ce,De]),At=useCallback(()=>{ae("")},[ae]),yt=`Search in ${zt.getOptionalString("app.title")||"Backstage"}`,Kt=_jsx(InputAdornment,{position:"start",children:_jsx(IconButton,{"aria-label":"Query",disabled:!0,children:_jsx(SearchIcon,{})})}),Vt=_jsx(InputAdornment,{position:"end",children:_jsx(IconButton,{"aria-label":"Clear",onClick:At,children:_jsx(ClearButton,{})})}),en=_jsx(TrackSearch,{children:_jsx(InputBase,{"data-testid":"search-bar-next",value:_t,placeholder:yt,startAdornment:Kt,endAdornment:Ne?Vt:kt,inputProps:{"aria-label":"Search",...Rt},fullWidth:ot,onChange:xt,onKeyDown:Bt,...Lt})});return cn?en:_jsx(SearchContextProvider,{children:en})},ut=({onChange:ae,...ce})=>{const{term:De,setTerm:He}=useSearch(),Ne=useCallback(ot=>{ae?ae(ot):He(ot)},[ae,He]);return _jsx(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchBar"},children:_jsx(Xe,{value:De,onChange:Ne,...ce})})},vt=({result:ae,highlight:ce,rank:De,icon:He,secondaryAction:Ne,lineClamp:ot=5})=>{const dt=useAnalytics(),Rt=()=>{dt.captureEvent("discover",ae.title,{attributes:{to:ae.location},value:De})};return _jsxs(Link,{noTrack:!0,to:ae.location,onClick:Rt,children:[_jsxs(ListItem,{alignItems:"center",children:[He&&_jsx(ListItemIcon,{children:He}),_jsx(ListItemText,{primaryTypographyProps:{variant:"h6"},primary:ce!=null&&ce.fields.title?_jsx(HighlightedSearchResultText,{text:ce.fields.title,preTag:ce.preTag,postTag:ce.postTag}):ae.title,secondary:_jsx("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ot,overflow:"hidden"},children:ce!=null&&ce.fields.text?_jsx(HighlightedSearchResultText,{text:ce.fields.text,preTag:ce.preTag,postTag:ce.postTag}):ae.text})}),Ne&&_jsx(Box,{alignItems:"flex-end",children:Ne})]}),_jsx(Divider,{})]})},at=ae=>_jsx(AnalyticsContext,{attributes:{pluginId:"search",extension:"DefaultResultListItem"},children:_jsx(vt,{...ae})})},61886:function(tt,Ae,t){"use strict";t.d(Ae,{Ox:function(){return Fe},Zz:function(){return b},oZ:function(){return Ve},DR:function(){return l},ZS:function(){return ye},VA:function(){return nt},KY:function(){return ee},gT:function(){return V},Dl:function(){return ie},ux:function(){return st},$L:function(){return Y},x1:function(){return Ge}});var h=t(52322),n=t(2784),m=t(10289),O=t(25248);const G="techdocs.addons.addon.v1",b="techdocs.addons.wrapper.v1",l=()=>null;(0,O.R5)(l,b,!0);const L=q=>`${G}.${q.toLocaleLowerCase("en-US")}`;function ee(q){const{name:xe,component:Ce}=q;return(0,O.YO)({name:xe,component:{sync:Xe=>(0,h.jsx)(Ce,{...Xe})},data:{[G]:q,[L(xe)]:!0}})}const X=(q,xe)=>q.selectByComponentData({key:xe}).getElements()[0],K=q=>q.selectByComponentData({key:b}).selectByComponentData({key:G}),F=q=>q.selectByComponentData({key:b}).findComponentData({key:G}),Y=()=>{const q=(0,m.pC)(),xe=(0,O.vJ)(q,K),Ce=(0,O.vJ)(q,F),Xe=(0,n.useCallback)(at=>{if(!xe||!at)return null;const ae=L(at.name);var ce;return(ce=X(xe,ae))!==null&&ce!==void 0?ce:null},[xe]),ut=(0,n.useCallback)(at=>{const ae=Ce.find(ce=>ce.name===at);return ae?Xe(ae):null},[Ce,Xe]),vt=(0,n.useCallback)(at=>{const ae=Ce.filter(ce=>ce.location===at);return ae.length?ae.map(Xe):null},[Ce,Xe]);return{renderComponentByName:ut,renderComponentsByLocation:vt}},V=(0,O.T0)({id:"plugin.techdocs.service"}),ie=(0,O.T0)({id:"plugin.techdocs.storageservice"});var le=t(64279),I=t(25271),A=t(51837);function Z(q,xe){return xe.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(q.kind=q.kind.toLocaleLowerCase(),q.name=q.name.toLocaleLowerCase(),q.namespace=q.namespace.toLocaleLowerCase()),q}const P=(q,xe)=>(0,I.eE)(q)===(0,I.eE)(xe),$={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},te=(0,A.CT)("techdocs-reader-page-context"),ye=(0,n.memo)(({entityRef:q,children:xe})=>{const Ce=(0,O.h_)(V),Xe=(0,O.h_)(O.Ds),ut=(0,le.default)(async()=>Ce.getTechDocsMetadata(q),[q]),vt=(0,le.default)(async()=>Ce.getEntityMetadata(q),[q]),[at,ae]=(0,n.useState)($.title),[ce,De]=(0,n.useState)($.subtitle),[He,Ne]=(0,n.useState)($.shadowRoot),ot={metadata:ut,entityRef:Z(q,Xe),entityMetadata:vt,shadowRoot:He,setShadowRoot:Ne,title:at,setTitle:ae,subtitle:ce,setSubtitle:De},dt=(0,A.EI)({1:ot});return(0,h.jsx)(te.Provider,{value:dt,children:xe instanceof Function?xe(ot):xe})},(q,xe)=>P(q.entityRef,xe.entityRef)),Ge=()=>{const q=(0,n.useContext)(te);if(q===void 0)return $;const xe=q.atVersion(1);if(xe===void 0)throw new Error("No context found for version 1.");return xe},Ve=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"});var Te=t(6553),Ye=t(50236),Ke=t(19219),Oe=t(15018);const Fe="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",qe=q=>{(0,n.useEffect)(()=>{if(!q)return()=>{};const xe=q.querySelectorAll('head > link[rel="stylesheet"]');var Ce;let Xe=(Ce=xe==null?void 0:xe.length)!==null&&Ce!==void 0?Ce:0;const ut=new CustomEvent(Fe);if(!Xe)return q.dispatchEvent(ut),()=>{};const vt=()=>{--Xe===0&&q.dispatchEvent(ut)};return xe==null||xe.forEach(at=>{at.addEventListener("load",vt)}),()=>{xe==null||xe.forEach(at=>{at.removeEventListener("load",vt)})}},[q])},st=q=>{const[xe,Ce]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(!q)return()=>{};Ce(!0);const Xe=q.style;Xe.setProperty("opacity","0");const ut=()=>{Ce(!1),Xe.setProperty("opacity","1")};return q.addEventListener(Fe,ut),()=>{q.removeEventListener(Fe,ut)}},[q]),xe},nt=({element:q,onAppend:xe,children:Ce})=>{const[Xe,ut]=(0,n.useState)((0,Te.Ue)({...(0,Ye.Z)(),insertionPoint:void 0}));qe(q);const vt=st(q),at=(0,n.useCallback)(ae=>{if(!q||!ae)return;ut((0,Te.Ue)({...(0,Ye.Z)(),insertionPoint:q.querySelector("head")||void 0}));let ce=ae.shadowRoot;ce||(ce=ae.attachShadow({mode:"open"})),ce.replaceChildren(q),typeof xe=="function"&&xe(ce)},[q,xe]);return(0,h.jsxs)(h.Fragment,{children:[vt&&(0,h.jsx)(Oe.Ex,{}),(0,h.jsxs)(Ke.ZP,{jss:Xe,sheetsManager:new Map,children:[(0,h.jsx)("div",{ref:at,"data-testid":"techdocs-native-shadowroot"}),Ce]})]})};var ct=t(54073);const Se=()=>{const{shadowRoot:q}=useTechDocsReaderPage();return q},ht=q=>{const xe=Se();return xe?q.map(Ce=>xe==null?void 0:xe.querySelectorAll(Ce)).filter(Ce=>Ce.length).map(Ce=>Array.from(Ce)).flat():[]},mt=q=>q.toString()&&q.rangeCount&&q.getRangeAt(0).getBoundingClientRect().top,Ie=(q=0)=>{const xe=Se(),[Ce,Xe]=useState(null),ut=useMemo(()=>debounce(()=>{const vt=xe,at=vt.getSelection?vt.getSelection():document.getSelection();at&&mt(at)?Xe(at):Xe(null)},q),[xe,Xe,q]);return useEffect(()=>(window.document.addEventListener("selectionchange",ut),()=>window.document.removeEventListener("selectionchange",ut)),[ut]),Ce}},52943:function(tt,Ae,t){"use strict";t.r(Ae),t.d(Ae,{EmbeddedDocsRouter:function(){return le},Router:function(){return ie},isTechDocsAvailable:function(){return V}});var h=t(52322),n=t(2784),m=t(10289),O=t(46285),G=t(15018),b=t(25271),l=t(89258),L=t(65124),ee=t(67896);const X=({entity:I})=>{const A=(0,b.iB)(I);return(0,h.jsxs)(l.I6,{entityRef:A,children:[(0,h.jsx)(L.b,{}),(0,h.jsx)(ee.F,{withSearch:!1})]})};var K=t(18662),F=t(7476);const Y="backstage.io/techdocs-ref",V=I=>{var A,Z;return Boolean(I==null||(A=I.metadata)===null||A===void 0||(Z=A.annotations)===null||Z===void 0?void 0:Z[Y])},ie=()=>(0,h.jsxs)(m.Z5,{children:[(0,h.jsx)(m.AW,{path:"/",element:(0,h.jsx)(K.TechDocsIndexPage,{})}),(0,h.jsx)(m.AW,{path:"/:namespace/:kind/:name/*",element:(0,h.jsx)(F.TechDocsReaderPage,{})})]}),le=I=>{var A;const{children:Z}=I,{entity:P}=(0,O.X2)(),$=(0,m.V$)([{path:"/*",element:(0,h.jsx)(X,{entity:P}),children:[{path:"/*",element:Z}]}]);return((A=P.metadata.annotations)===null||A===void 0?void 0:A[Y])?$:(0,h.jsx)(G.sk,{annotation:Y})}},92077:function(tt,Ae,t){"use strict";t.d(Ae,{k:function(){return G},p:function(){return O}});var h=t(23054),n=t(76372),m=t.n(n);class O{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(l){const{kind:L,namespace:ee,name:X}=l,F=`${await this.getApiOrigin()}/metadata/techdocs/${ee}/${L}/${X}`,Y=await this.fetchApi.fetch(`${F}`);if(!Y.ok)throw await h.VL.fromResponse(Y);return await Y.json()}async getEntityMetadata(l){const{kind:L,namespace:ee,name:X}=l,F=`${await this.getApiOrigin()}/metadata/entity/${ee}/${L}/${X}`,Y=await this.fetchApi.fetch(`${F}`);if(!Y.ok)throw await h.VL.fromResponse(Y);return await Y.json()}constructor(l){this.configApi=l.configApi,this.discoveryApi=l.discoveryApi,this.fetchApi=l.fetchApi}}class G{async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var l;return(l=this.configApi.getOptionalString("techdocs.storageUrl"))!==null&&l!==void 0?l:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(l,L){const{kind:ee,namespace:X,name:K}=l,Y=`${await this.getStorageUrl()}/${X}/${ee}/${K}/${L}`,V=await this.fetchApi.fetch(`${Y.endsWith("/")?Y:`${Y}/`}index.html`);let ie="";switch(V.status){case 404:throw ie="Page not found. ",L||(ie+="This could be because there is no index.md file in the root of the docs directory of this repository."),new h.dR(ie);case 500:throw ie="Could not generate documentation or an error in the TechDocs backend. ",new Error(ie);default:break}return V.text()}async syncEntityDocs(l,L=()=>{}){const{kind:ee,namespace:X,name:K}=l,Y=`${await this.getApiOrigin()}/sync/${X}/${ee}/${K}`,{token:V}=await this.identityApi.getCredentials();return new Promise((ie,le)=>{const I=new n.EventSourcePolyfill(Y,{withCredentials:!0,headers:V?{Authorization:`Bearer ${V}`}:{}});I.addEventListener("log",A=>{A.data&&L(JSON.parse(A.data))}),I.addEventListener("finish",A=>{let Z=!1;A.data&&({updated:Z}=JSON.parse(A.data)),ie(Z?"updated":"cached")}),I.onerror=A=>{switch(I.close(),A.status){case 404:le(new h.dR(A.message));return;default:le(new Error(A.data));return}}})}async getBaseUrl(l,L,ee){const{kind:X,namespace:K,name:F}=L,V=`${await this.getApiOrigin()}/static/docs/${K}/${X}/${F}/${ee}`;return new URL(l,V.endsWith("/")?V:`${V}/`).toString()}constructor(l){this.configApi=l.configApi,this.discoveryApi=l.discoveryApi,this.identityApi=l.identityApi,this.fetchApi=l.fetchApi}}},51953:function(tt,Ae,t){"use strict";t.d(Ae,{D:function(){return h}});function h(n,m){return m.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?n:n.toLocaleLowerCase("en-US")}},3482:function(tt,Ae,t){"use strict";t.d(Ae,{u:function(){return L}});var h=t(52322),n=t(2784),m=t(15018),O=t(46285),G=t(42081),b=t(48431),l=t(68435);const L=ee=>{const{initialFilter:X="owned",columns:K,actions:F}=ee;return(0,h.jsx)(G.j,{children:(0,h.jsxs)(m.VY,{children:[(0,h.jsx)(m.yW,{title:"",children:(0,h.jsx)(m.qt,{children:"Discover documentation in your ecosystem."})}),(0,h.jsx)(O.UO,{children:(0,h.jsxs)(O._i,{children:[(0,h.jsxs)(O._i.Filters,{children:[(0,h.jsx)(b.f,{}),(0,h.jsx)(O.EW,{initialFilter:X}),(0,h.jsx)(O.dq,{}),(0,h.jsx)(O.xE,{})]}),(0,h.jsx)(O._i.Content,{children:(0,h.jsx)(l.n,{actions:F,columns:K})})]})})]})})}},85478:function(tt,Ae,t){"use strict";t.d(Ae,{f:function(){return K}});var h=t(52322),n=t(95573),m=t(51953),O=t(25248),G=t(15018),b=t(94339),l=t(16111),L=t(24579),ee=t(14503),X=t(2784);const K=V=>{const{entities:ie}=V,le=(0,O.tg)(n.Fw),I=(0,O.h_)(O.Ds);if(!ie)return null;var A,Z;return(0,h.jsx)(G.Oh,{"data-testid":"docs-explore",children:ie!=null&&ie.length?ie.map((P,$)=>(0,h.jsxs)(b.Z,{children:[(0,h.jsx)(l.Z,{children:(0,h.jsx)(G.hu,{title:(A=P.metadata.title)!==null&&A!==void 0?A:P.metadata.name})}),(0,h.jsx)(L.Z,{children:P.metadata.description}),(0,h.jsx)(ee.Z,{children:(0,h.jsx)(G.zx,{to:le({namespace:(0,m.D)((Z=P.metadata.namespace)!==null&&Z!==void 0?Z:"default",I),kind:(0,m.D)(P.kind,I),name:(0,m.D)(P.metadata.name,I)}),color:"primary","data-testid":"read_docs",children:"Read Docs"})})]},$)):null})};var F=t(46285);const Y=()=>{const{loading:V,error:ie,entities:le}=useEntityList();if(ie)return _jsx(WarningPanel,{severity:"error",title:"Could not load available documentation.",children:_jsx(CodeSnippet,{language:"text",text:ie.toString()})});if(V||!le)return _jsx(Progress,{});var I,A;return le.sort((Z,P)=>((I=Z.metadata.title)!==null&&I!==void 0?I:Z.metadata.name).localeCompare((A=P.metadata.title)!==null&&A!==void 0?A:P.metadata.name)),_jsx(DocsCardGrid,{entities:le})}},68435:function(tt,Ae,t){"use strict";t.d(Ae,{H:function(){return Z},n:function(){return P}});var h=t(52322),n=t(2784),m=t(95074),O=t(76635),G=t(15018),b=t(46285),l=t(25248),L=t(25271),ee=t(95573),X=t(39981),K=t(2337),F=t(11640),Y=t(28347);const V=(0,K.Z)({root:{color:"#f3ba37"}})(F.Z),ie={createCopyDocsUrlAction($){return te=>({icon:()=>(0,h.jsx)(X.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>$(`${window.location.origin}${te.resolved.docsUrl}`)})},createStarEntityAction($,te){return({entity:ye})=>{const Ge=$(ye);return{cellStyle:{paddingLeft:"1em"},icon:()=>Ge?(0,h.jsx)(V,{}):(0,h.jsx)(Y.Z,{}),tooltip:Ge?"Remove from favorites":"Add to favorites",onClick:()=>te(ye)}}}};function le($){return $.metadata.title||$.metadata.name}const I={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:$=>(0,h.jsx)(G.uw,{value:(0,h.jsx)(G.rU,{to:$.resolved.docsUrl,children:le($.entity)}),subvalue:$.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:$})=>(0,h.jsx)(b.rI,{entityRefs:$.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}};var A=t(51953);const Z=$=>{const{entities:te,title:ye,loading:Ge,columns:Ve,actions:Te}=$,[,Ye]=(0,m.Z)(),Ke=(0,l.tg)(ee.Fw),Oe=(0,l.h_)(l.Ds);if(!te)return null;const Fe=te.map(nt=>{const ct=(0,b.hF)(nt,L.S4);var Se;return{entity:nt,resolved:{docsUrl:Ke({namespace:(0,A.D)((Se=nt.metadata.namespace)!==null&&Se!==void 0?Se:"default",Oe),kind:(0,A.D)(nt.kind,Oe),name:(0,A.D)(nt.metadata.name,Oe)}),ownedByRelations:ct,ownedByRelationsTitle:ct.map(ht=>(0,b.$3)(ht,{defaultKind:"group"})).join(", ")}}}),qe=[I.createNameColumn(),I.createOwnerColumn(),I.createTypeColumn()],st=[ie.createCopyDocsUrlAction(Ye)];return(0,h.jsx)(h.Fragment,{children:Ge||Fe&&Fe.length>0?(0,h.jsx)(G.iA,{isLoading:Ge,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:Fe,columns:Ve||qe,actions:Te||st,title:ye?`${ye} (${Fe.length})`:`All (${Fe.length})`}):(0,h.jsx)(G.ub,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:(0,h.jsx)(G.zx,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained",children:"DOCS"})})})};Z.columns=I,Z.actions=ie;const P=$=>{var te;const{columns:ye,actions:Ge}=$,{loading:Ve,error:Te,entities:Ye,filters:Ke}=(0,b.wp)(),{isStarredEntity:Oe,toggleStarredEntity:Fe}=(0,b.CR)(),[,qe]=(0,m.Z)();var st;const nt=(0,O.capitalize)((st=(te=Ke.user)===null||te===void 0?void 0:te.value)!==null&&st!==void 0?st:"all"),ct=[ie.createCopyDocsUrlAction(qe),ie.createStarEntityAction(Oe,Fe)];return Te?(0,h.jsx)(G.GB,{severity:"error",title:"Could not load available documentation.",children:(0,h.jsx)(G.Oi,{language:"text",text:Te.toString()})}):(0,h.jsx)(Z,{title:nt,entities:Ye,loading:Ve,actions:Ge||ct,columns:ye})};P.columns=I,P.actions=ie},18662:function(tt,Ae,t){"use strict";t.r(Ae),t.d(Ae,{TechDocsIndexPage:function(){return G}});var h=t(52322),n=t(2784),m=t(10289),O=t(3482);const G=b=>(0,m.pC)()||(0,h.jsx)(O.u,{...b})},42081:function(tt,Ae,t){"use strict";t.d(Ae,{j:function(){return G}});var h=t(52322),n=t(2784),m=t(15018),O=t(25248);const G=b=>{const{children:l}=b,L=(0,O.h_)(O.Ds);var ee;const X=`Documentation available in ${(ee=L.getOptionalString("organization.name"))!==null&&ee!==void 0?ee:"Backstage"}`;return(0,h.jsx)(m.g9,{title:"Documentation",subtitle:X,themeId:"documentation",children:l})}},48431:function(tt,Ae,t){"use strict";t.d(Ae,{f:function(){return O}});var h=t(2784),n=t(46285);class m{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":n.n3}}}const O=()=>{const{updateFilters:G}=(0,n.wp)();return(0,h.useEffect)(()=>{G({techdocs:new m})},[G]),null}},89258:function(tt,Ae,t){"use strict";t.d(Ae,{I6:function(){return X},Jl:function(){return ee},s4:function(){return G}});var h=t(61886),n=t(92077),m=t(95573),O=t(25248);const G=(0,O.rx)({id:"techdocs",apis:[(0,O.ni)({api:h.Dl,deps:{configApi:O.Ds,discoveryApi:O.NW,identityApi:O.$4,fetchApi:O.gP},factory:({configApi:K,discoveryApi:F,identityApi:Y,fetchApi:V})=>new n.k({configApi:K,discoveryApi:F,identityApi:Y,fetchApi:V})}),(0,O.ni)({api:h.gT,deps:{configApi:O.Ds,discoveryApi:O.NW,fetchApi:O.gP},factory:({configApi:K,discoveryApi:F,fetchApi:Y})=>new n.p({configApi:K,discoveryApi:F,fetchApi:Y})})],routes:{root:m._Z,docRoot:m.Fw,entityContent:m.pd}}),b=G.provide((0,O.P4)({name:"TechdocsPage",component:()=>Promise.resolve().then(t.bind(t,52943)).then(K=>K.Router),mountPoint:m._Z})),l=G.provide((0,O.P4)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(t.bind(t,52943)).then(K=>K.EmbeddedDocsRouter),mountPoint:m.pd})),L=G.provide((0,O.P4)({name:"TechDocsCustomHome",component:()=>t.e(7560).then(t.bind(t,27560)).then(K=>K.TechDocsCustomHome),mountPoint:m._Z})),ee=G.provide((0,O.P4)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(t.bind(t,18662)).then(K=>K.TechDocsIndexPage),mountPoint:m._Z})),X=G.provide((0,O.P4)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(t.bind(t,7476)).then(K=>K.TechDocsReaderPage),mountPoint:m.Fw}))},7476:function(tt,Ae,t){"use strict";t.r(Ae),t.d(Ae,{TechDocsReaderLayout:function(){return ee},TechDocsReaderPage:function(){return X}});var h=t(52322),n=t(2784),m=t(10289),O=t(15018),G=t(61886),b=t(67896),l=t(93225),L=t(65124);const ee=({withSearch:K,withHeader:F=!0})=>(0,h.jsxs)(O.T3,{themeId:"documentation",children:[F&&(0,h.jsx)(l.S,{}),(0,h.jsx)(L.b,{}),(0,h.jsx)(b.F,{withSearch:K})]}),X=K=>{const{kind:F,name:Y,namespace:V}=(0,m.UO)(),{children:ie,entityRef:le={kind:F,name:Y,namespace:V}}=K,I=(0,m.pC)();if(!ie){const Z=(I?n.Children.toArray(I.props.children):[]).find(P=>{var $,te;const{type:ye}=P;return!(!(ye==null||($=ye.__backstage_data)===null||$===void 0||(te=$.map)===null||te===void 0)&&te.get(G.Zz))});return(0,h.jsx)(G.ZS,{entityRef:le,children:Z||(0,h.jsx)(ee,{})})}return(0,h.jsx)(G.ZS,{entityRef:le,children:({metadata:A,entityMetadata:Z,onReady:P})=>(0,h.jsx)("div",{className:"techdocs-reader-page",children:(0,h.jsx)(O.T3,{themeId:"documentation",children:ie instanceof Function?ie({entityRef:le,techdocsMetadataValue:A.value,entityMetadataValue:Z.value,onReady:P}):ie})})})}},67896:function(tt,Ae,t){"use strict";t.d(Ae,{F:function(){return Mt}});var h=t(52322),n=t(2784),m=t(79692),O=t(60905),G=t(61886),b=t(15018),l=t(17339),L=t(4614),ee=t(77277),X=t(99688),K=t(12420),F=t(90436),Y=t(61837),V=t(4190),ie=t(87685);const le=(0,m.Z)(E=>(0,K.Z)({paper:{width:"100%",[E.breakpoints.up("sm")]:{width:"75%"},[E.breakpoints.up("md")]:{width:"50%"},padding:E.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:E.palette.background.default}})),I=({buildLog:E,onClose:J})=>{const be=le(),ge=E.length===0?"Waiting for logs...":E.join(`
|
|
32
|
-
`);return(0,h.jsxs)(O.Z,{container:!0,direction:"column",className:be.root,spacing:0,wrap:"nowrap",children:[(0,h.jsxs)(O.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap",children:[(0,h.jsx)(F.Z,{variant:"h5",children:"Build Details"}),(0,h.jsx)(Y.Z,{title:"Close the drawer",onClick:J,color:"inherit",children:(0,h.jsx)(ie.Z,{})},"dismiss")]}),(0,h.jsx)(b.nU,{text:ge,classes:{root:be.logs}})]})},A=({buildLog:E})=>{const J=le(),[be,ge]=(0,n.useState)(!1);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ee.Z,{color:"inherit",onClick:()=>ge(!0),children:"Show Build Logs"}),(0,h.jsx)(V.ZP,{classes:{paper:J.paper},anchor:"right",open:be,onClose:()=>ge(!1),children:(0,h.jsx)(I,{buildLog:E,onClose:()=>ge(!1)})})]})};var Z=t(25248);const P=({errorMessage:E})=>{const J=(0,Z.h_)(Z.Ds).getOptionalString("techdocs.builder");let be="";return J!=="local"&&(be="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,h.jsx)(b.mf,{status:"404",statusMessage:E||"Documentation not found",additionalInfo:be})};var $=t(95481);const te=(0,m.Z)(E=>({root:{marginBottom:E.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),ye=()=>{let E=null;const J=te(),{state:be,contentReload:ge,contentErrorMessage:Le,syncErrorMessage:Be,buildLog:pt}=(0,$.DK)();return be==="INITIAL_BUILD"&&(E=(0,h.jsx)(X.Z,{classes:{root:J.root},variant:"outlined",severity:"info",icon:(0,h.jsx)(L.Z,{size:"24px"}),action:(0,h.jsx)(A,{buildLog:pt}),children:"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."})),be==="CONTENT_STALE_REFRESHING"&&(E=(0,h.jsx)(X.Z,{variant:"outlined",severity:"info",icon:(0,h.jsx)(L.Z,{size:"24px"}),action:(0,h.jsx)(A,{buildLog:pt}),classes:{root:J.root},children:"A newer version of this documentation is being prepared and will be available shortly."})),be==="CONTENT_STALE_READY"&&(E=(0,h.jsx)(X.Z,{variant:"outlined",severity:"success",action:(0,h.jsx)(ee.Z,{color:"inherit",onClick:()=>ge(),children:"Refresh"}),classes:{root:J.root},children:"A newer version of this documentation is now available, please refresh to view."})),be==="CONTENT_STALE_ERROR"&&(E=(0,h.jsxs)(X.Z,{variant:"outlined",severity:"error",action:(0,h.jsx)(A,{buildLog:pt}),classes:{root:J.root,message:J.message},children:["Building a newer version of this documentation failed."," ",Be]})),be==="CONTENT_NOT_FOUND"&&(E=(0,h.jsxs)(h.Fragment,{children:[Be&&(0,h.jsxs)(X.Z,{variant:"outlined",severity:"error",action:(0,h.jsx)(A,{buildLog:pt}),classes:{root:J.root,message:J.message},children:["Building a newer version of this documentation failed."," ",Be]}),(0,h.jsx)(P,{errorMessage:Le})]})),E};var Ge=t(10289),Ve=t(60364),Te=t(41156),Ye=t(32838),Ke=t(35368),Oe=t.n(Ke);const Fe=/main\.[A-Fa-f0-9]{8}\.min\.css$/,qe=/^https:\/\/fonts\.googleapis\.com/,st=/^https:\/\/fonts\.gstatic\.com/,nt=E=>E.nodeName==="LINK",ct=E=>{const J=(E==null?void 0:E.getAttribute("href"))||"",be=J.match(Fe),ge=J.match(qe),Le=J.match(st);return be||ge||Le},Se=E=>(nt(E)&&!ct(E)&&E.remove(),E),ht=E=>E.nodeName==="IFRAME",mt=(E,J)=>{const be=E.getAttribute("src")||"";try{const{host:ge}=new URL(be);return J.includes(ge)}catch{return!1}},Ie=E=>J=>(ht(J)&&!mt(J,E)&&J.remove(),J),q=()=>{const E=(0,Z.h_)(Z.Ds);return(0,n.useMemo)(()=>E.getOptionalConfig("techdocs.sanitizer"),[E])},xe=()=>{const E=q();return(0,n.useCallback)(async J=>{const be=E==null?void 0:E.getOptionalStringArray("allowedIframeHosts");Oe().addHook("beforeSanitizeElements",Se);const ge=["link"];return be&&(ge.push("iframe"),Oe().addHook("beforeSanitizeElements",Ie(be))),Oe().sanitize(J.innerHTML,{ADD_TAGS:ge,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[E])};var Ce=t(41128),Xe=({theme:E})=>`
|
|
33
|
-
/*================== Variables ==================*/
|
|
34
|
-
/*
|
|
35
|
-
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.
|
|
36
|
-
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.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
:host {
|
|
40
|
-
/* FONT */
|
|
41
|
-
--md-default-fg-color: ${E.palette.text.primary};
|
|
42
|
-
--md-default-fg-color--light: ${E.palette.text.secondary};
|
|
43
|
-
--md-default-fg-color--lighter: ${(0,Ce.$n)(E.palette.text.secondary,.7)};
|
|
44
|
-
--md-default-fg-color--lightest: ${(0,Ce.$n)(E.palette.text.secondary,.3)};
|
|
45
|
-
|
|
46
|
-
/* BACKGROUND */
|
|
47
|
-
--md-default-bg-color:${E.palette.background.default};
|
|
48
|
-
--md-default-bg-color--light: ${E.palette.background.paper};
|
|
49
|
-
--md-default-bg-color--lighter: ${(0,Ce.$n)(E.palette.background.paper,.7)};
|
|
50
|
-
--md-default-bg-color--lightest: ${(0,Ce.$n)(E.palette.background.paper,.3)};
|
|
51
|
-
|
|
52
|
-
/* PRIMARY */
|
|
53
|
-
--md-primary-fg-color: ${E.palette.primary.main};
|
|
54
|
-
--md-primary-fg-color--light: ${E.palette.primary.light};
|
|
55
|
-
--md-primary-fg-color--dark: ${E.palette.primary.dark};
|
|
56
|
-
--md-primary-bg-color: ${E.palette.primary.contrastText};
|
|
57
|
-
--md-primary-bg-color--light: ${(0,Ce.$n)(E.palette.primary.contrastText,.7)};
|
|
58
|
-
|
|
59
|
-
/* ACCENT */
|
|
60
|
-
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
|
-
|
|
62
|
-
/* SHADOW */
|
|
63
|
-
--md-shadow-z1: ${E.shadows[1]};
|
|
64
|
-
--md-shadow-z2: ${E.shadows[2]};
|
|
65
|
-
--md-shadow-z3: ${E.shadows[3]};
|
|
66
|
-
|
|
67
|
-
/* EXTENSIONS */
|
|
68
|
-
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
69
|
-
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
70
|
-
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
71
|
-
--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>');
|
|
72
|
-
--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>');
|
|
73
|
-
--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>');
|
|
74
|
-
--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>');
|
|
75
|
-
--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>');
|
|
76
|
-
--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>');
|
|
77
|
-
--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>');
|
|
78
|
-
--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>');
|
|
79
|
-
--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>');
|
|
80
|
-
--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>');
|
|
81
|
-
--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>');
|
|
82
|
-
--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>');
|
|
83
|
-
--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>');
|
|
84
|
-
--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>');
|
|
85
|
-
--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>');
|
|
86
|
-
--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>');
|
|
87
|
-
--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>');
|
|
88
|
-
--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>');
|
|
89
|
-
--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>');
|
|
90
|
-
--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>');
|
|
91
|
-
--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>');
|
|
92
|
-
--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>');
|
|
93
|
-
--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>');
|
|
94
|
-
--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>');
|
|
95
|
-
--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>');
|
|
96
|
-
--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>');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
:host > * {
|
|
100
|
-
/* CODE */
|
|
101
|
-
--md-code-fg-color: ${E.palette.text.primary};
|
|
102
|
-
--md-code-bg-color: ${E.palette.background.paper};
|
|
103
|
-
--md-code-hl-color: ${(0,Ce.Fq)(E.palette.warning.main,.5)};
|
|
104
|
-
--md-code-hl-keyword-color: ${E.palette.type==="dark"?E.palette.primary.light:E.palette.primary.dark};
|
|
105
|
-
--md-code-hl-function-color: ${E.palette.type==="dark"?E.palette.secondary.light:E.palette.secondary.dark};
|
|
106
|
-
--md-code-hl-string-color: ${E.palette.type==="dark"?E.palette.success.light:E.palette.success.dark};
|
|
107
|
-
--md-code-hl-number-color: ${E.palette.type==="dark"?E.palette.error.light:E.palette.error.dark};
|
|
108
|
-
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
109
|
-
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
110
|
-
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
111
|
-
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
112
|
-
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
113
|
-
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
114
|
-
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
115
|
-
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
116
|
-
|
|
117
|
-
/* TYPESET */
|
|
118
|
-
--md-typeset-font-size: 1rem;
|
|
119
|
-
--md-typeset-color: var(--md-default-fg-color);
|
|
120
|
-
--md-typeset-a-color: var(--md-accent-fg-color);
|
|
121
|
-
--md-typeset-table-color: ${E.palette.text.primary};
|
|
122
|
-
--md-typeset-del-color: ${E.palette.type==="dark"?(0,Ce.Fq)(E.palette.error.dark,.5):(0,Ce.Fq)(E.palette.error.light,.5)};
|
|
123
|
-
--md-typeset-ins-color: ${E.palette.type==="dark"?(0,Ce.Fq)(E.palette.success.dark,.5):(0,Ce.Fq)(E.palette.success.light,.5)};
|
|
124
|
-
--md-typeset-mark-color: ${E.palette.type==="dark"?(0,Ce.Fq)(E.palette.warning.dark,.5):(0,Ce.Fq)(E.palette.warning.light,.5)};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@media screen and (max-width: 76.1875em) {
|
|
128
|
-
:host > * {
|
|
129
|
-
/* TYPESET */
|
|
130
|
-
--md-typeset-font-size: .9rem;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@media screen and (max-width: 600px) {
|
|
135
|
-
:host > * {
|
|
136
|
-
/* TYPESET */
|
|
137
|
-
--md-typeset-font-size: .7rem;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
`,ut=({theme:E})=>`
|
|
141
|
-
/*================== Reset ==================*/
|
|
142
|
-
|
|
143
|
-
body {
|
|
144
|
-
--md-text-color: var(--md-default-fg-color);
|
|
145
|
-
--md-text-link-color: var(--md-accent-fg-color);
|
|
146
|
-
--md-text-font-family: ${E.typography.fontFamily};
|
|
147
|
-
font-family: var(--md-text-font-family);
|
|
148
|
-
background-color: unset;
|
|
149
|
-
}
|
|
150
|
-
`;const vt="224px";var at=({theme:E,sidebar:J})=>`
|
|
151
|
-
/*================== Layout ==================*/
|
|
152
|
-
|
|
153
|
-
.md-grid {
|
|
154
|
-
max-width: 100%;
|
|
155
|
-
margin: 0;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.md-nav {
|
|
159
|
-
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
160
|
-
}
|
|
161
|
-
.md-nav__link {
|
|
162
|
-
display: flex;
|
|
163
|
-
align-items: center;
|
|
164
|
-
justify-content: space-between;
|
|
165
|
-
}
|
|
166
|
-
.md-nav__icon {
|
|
167
|
-
height: 20px !important;
|
|
168
|
-
width: 20px !important;
|
|
169
|
-
margin-left:${E.spacing(1)}px;
|
|
170
|
-
}
|
|
171
|
-
.md-nav__icon svg {
|
|
172
|
-
margin: 0;
|
|
173
|
-
width: 20px !important;
|
|
174
|
-
height: 20px !important;
|
|
175
|
-
}
|
|
176
|
-
.md-nav__icon:after {
|
|
177
|
-
width: 20px !important;
|
|
178
|
-
height: 20px !important;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.md-nav__item--active > .md-nav__link, a.md-nav__link--active {
|
|
182
|
-
text-decoration: underline;
|
|
183
|
-
color: var(--md-typeset-a-color);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.md-main__inner {
|
|
187
|
-
margin-top: 0;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.md-sidebar {
|
|
191
|
-
bottom: 75px;
|
|
192
|
-
position: fixed;
|
|
193
|
-
width: 16rem;
|
|
194
|
-
overflow-y: auto;
|
|
195
|
-
overflow-x: hidden;
|
|
196
|
-
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
197
|
-
scrollbar-width: thin;
|
|
198
|
-
}
|
|
199
|
-
.md-sidebar .md-sidebar__scrollwrap {
|
|
200
|
-
width: calc(12.1rem);
|
|
201
|
-
}
|
|
202
|
-
.md-sidebar--secondary {
|
|
203
|
-
right: ${E.spacing(3)}px;
|
|
204
|
-
}
|
|
205
|
-
.md-sidebar::-webkit-scrollbar {
|
|
206
|
-
width: 5px;
|
|
207
|
-
}
|
|
208
|
-
.md-sidebar::-webkit-scrollbar-button {
|
|
209
|
-
width: 5px;
|
|
210
|
-
height: 5px;
|
|
211
|
-
}
|
|
212
|
-
.md-sidebar::-webkit-scrollbar-track {
|
|
213
|
-
background: #eee;
|
|
214
|
-
border: 1 px solid rgb(250, 250, 250);
|
|
215
|
-
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
216
|
-
border-radius: 3px;
|
|
217
|
-
}
|
|
218
|
-
.md-sidebar::-webkit-scrollbar-thumb {
|
|
219
|
-
width: 5px;
|
|
220
|
-
background: rgb(193, 193, 193);
|
|
221
|
-
border: transparent;
|
|
222
|
-
border-radius: 3px;
|
|
223
|
-
}
|
|
224
|
-
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
225
|
-
background: rgb(125, 125, 125);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.md-content {
|
|
229
|
-
max-width: calc(100% - 16rem * 2);
|
|
230
|
-
margin-left: 16rem;
|
|
231
|
-
margin-bottom: 50px;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.md-footer {
|
|
235
|
-
position: fixed;
|
|
236
|
-
bottom: 0px;
|
|
237
|
-
}
|
|
238
|
-
.md-footer__title {
|
|
239
|
-
background-color: unset;
|
|
240
|
-
}
|
|
241
|
-
.md-footer-nav__link {
|
|
242
|
-
width: 16rem;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.md-dialog {
|
|
246
|
-
background-color: unset;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
@media screen and (min-width: 76.25em) {
|
|
250
|
-
.md-sidebar {
|
|
251
|
-
height: auto;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
@media screen and (max-width: 76.1875em) {
|
|
256
|
-
.md-nav {
|
|
257
|
-
transition: none !important;
|
|
258
|
-
background-color: var(--md-default-bg-color)
|
|
259
|
-
}
|
|
260
|
-
.md-nav--primary .md-nav__title {
|
|
261
|
-
cursor: auto;
|
|
262
|
-
color: var(--md-default-fg-color);
|
|
263
|
-
font-weight: 700;
|
|
264
|
-
white-space: normal;
|
|
265
|
-
line-height: 1rem;
|
|
266
|
-
height: auto;
|
|
267
|
-
display: flex;
|
|
268
|
-
flex-flow: column;
|
|
269
|
-
row-gap: 1.6rem;
|
|
270
|
-
padding: 1.2rem .8rem .8rem;
|
|
271
|
-
background-color: var(--md-default-bg-color);
|
|
272
|
-
}
|
|
273
|
-
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
274
|
-
box-shadow: none;
|
|
275
|
-
}
|
|
276
|
-
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
277
|
-
border-top: none;
|
|
278
|
-
}
|
|
279
|
-
.md-nav--primary .md-nav__title .md-nav__button {
|
|
280
|
-
display: none;
|
|
281
|
-
}
|
|
282
|
-
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
283
|
-
color: var(--md-default-fg-color);
|
|
284
|
-
position: static;
|
|
285
|
-
height: auto;
|
|
286
|
-
margin: 0 0 0 -0.2rem;
|
|
287
|
-
}
|
|
288
|
-
.md-nav--primary > .md-nav__title [for="none"] {
|
|
289
|
-
padding-top: 0;
|
|
290
|
-
}
|
|
291
|
-
.md-nav--primary .md-nav__item {
|
|
292
|
-
border-top: none;
|
|
293
|
-
}
|
|
294
|
-
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
295
|
-
font-size : var(--md-typeset-font-size);
|
|
296
|
-
}
|
|
297
|
-
.md-nav .md-source {
|
|
298
|
-
display: none;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.md-sidebar {
|
|
302
|
-
height: 100%;
|
|
303
|
-
}
|
|
304
|
-
.md-sidebar--primary {
|
|
305
|
-
width: 12.1rem !important;
|
|
306
|
-
z-index: 200;
|
|
307
|
-
left: ${J.isPinned?`calc(-12.1rem + ${vt})`:"calc(-12.1rem + 72px)"} !important;
|
|
308
|
-
}
|
|
309
|
-
.md-sidebar--secondary:not([hidden]) {
|
|
310
|
-
display: none;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.md-content {
|
|
314
|
-
max-width: 100%;
|
|
315
|
-
margin-left: 0;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.md-header__button {
|
|
319
|
-
margin: 0.4rem 0;
|
|
320
|
-
margin-left: 0.4rem;
|
|
321
|
-
padding: 0;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.md-overlay {
|
|
325
|
-
left: 0;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.md-footer {
|
|
329
|
-
position: static;
|
|
330
|
-
padding-left: 0;
|
|
331
|
-
}
|
|
332
|
-
.md-footer-nav__link {
|
|
333
|
-
/* footer links begin to overlap at small sizes without setting width */
|
|
334
|
-
width: 50%;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
@media screen and (max-width: 600px) {
|
|
339
|
-
.md-sidebar--primary {
|
|
340
|
-
left: -12.1rem !important;
|
|
341
|
-
width: 12.1rem;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
`;const ae=["h1","h2","h3","h4","h5","h6"];var ce=({theme:E})=>`
|
|
345
|
-
/*================== Typeset ==================*/
|
|
346
|
-
|
|
347
|
-
.md-typeset {
|
|
348
|
-
font-size: var(--md-typeset-font-size);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
${ae.reduce((J,be)=>{var ge;const Le=(ge=E.typography.htmlFontSize)!==null&&ge!==void 0?ge:16,Be=E.typography[be],{lineHeight:pt,fontFamily:Ot,fontWeight:tn,fontSize:Dt}=Be,an=Tt=>{let ln=1;return typeof Tt=="number"&&(ln=Tt/Le*.6),typeof Tt=="string"&&(ln=Tt.replace("rem","")),`calc(${ln} * var(--md-typeset-font-size))`};return J.concat(`
|
|
352
|
-
.md-typeset ${be} {
|
|
353
|
-
color: var(--md-default-fg-color);
|
|
354
|
-
line-height: ${pt};
|
|
355
|
-
font-family: ${Ot};
|
|
356
|
-
font-weight: ${tn};
|
|
357
|
-
font-size: ${an(Dt)};
|
|
358
|
-
}
|
|
359
|
-
`)},"")}
|
|
360
|
-
|
|
361
|
-
.md-typeset .md-content__button {
|
|
362
|
-
color: var(--md-default-fg-color);
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
.md-typeset hr {
|
|
366
|
-
border-bottom: 0.05rem dotted ${E.palette.divider};
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.md-typeset details {
|
|
370
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
371
|
-
}
|
|
372
|
-
.md-typeset details summary {
|
|
373
|
-
padding-left: 2.5rem !important;
|
|
374
|
-
}
|
|
375
|
-
.md-typeset details summary:before,
|
|
376
|
-
.md-typeset details summary:after {
|
|
377
|
-
top: 50% !important;
|
|
378
|
-
width: 20px !important;
|
|
379
|
-
height: 20px !important;
|
|
380
|
-
transform: rotate(0deg) translateY(-50%) !important;
|
|
381
|
-
}
|
|
382
|
-
.md-typeset details[open] > summary:after {
|
|
383
|
-
transform: rotate(90deg) translateX(-50%) !important;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.md-typeset blockquote {
|
|
387
|
-
color: var(--md-default-fg-color--light);
|
|
388
|
-
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.md-typeset table:not([class]) {
|
|
392
|
-
font-size: var(--md-typeset-font-size);
|
|
393
|
-
border: 1px solid var(--md-default-fg-color);
|
|
394
|
-
border-bottom: none;
|
|
395
|
-
border-collapse: collapse;
|
|
396
|
-
}
|
|
397
|
-
.md-typeset table:not([class]) th {
|
|
398
|
-
font-weight: bold;
|
|
399
|
-
}
|
|
400
|
-
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
401
|
-
border-bottom: 1px solid var(--md-default-fg-color);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
405
|
-
background-color: hsla(0, 0%, 0%, 0.32);
|
|
406
|
-
}
|
|
407
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
408
|
-
background-color: hsla(0, 0%, 0%, 0.87);
|
|
409
|
-
}
|
|
410
|
-
`,De=()=>`
|
|
411
|
-
/*================== Animations ==================*/
|
|
412
|
-
/*
|
|
413
|
-
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
414
|
-
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
415
|
-
*/
|
|
416
|
-
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
417
|
-
transition: none;
|
|
418
|
-
}
|
|
419
|
-
`,He=({theme:E})=>`
|
|
420
|
-
/*================== Extensions ==================*/
|
|
421
|
-
|
|
422
|
-
/* HIGHLIGHT */
|
|
423
|
-
.highlight .md-clipboard:after {
|
|
424
|
-
content: unset;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.highlight .nx {
|
|
428
|
-
color: ${E.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
/* CODE HILITE */
|
|
432
|
-
.codehilite .gd {
|
|
433
|
-
background-color: ${E.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.codehilite .gi {
|
|
437
|
-
background-color: ${E.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
/* TABBED */
|
|
441
|
-
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
442
|
-
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
443
|
-
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
444
|
-
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
445
|
-
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
446
|
-
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
447
|
-
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
448
|
-
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
449
|
-
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
450
|
-
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
451
|
-
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
452
|
-
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
453
|
-
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
454
|
-
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
455
|
-
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
456
|
-
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
457
|
-
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
458
|
-
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
459
|
-
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
460
|
-
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
461
|
-
color: var(--md-accent-fg-color);
|
|
462
|
-
border-color: var(--md-accent-fg-color);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/* TASK-LIST */
|
|
466
|
-
.task-list-control .task-list-indicator::before {
|
|
467
|
-
background-color: ${E.palette.action.disabledBackground};
|
|
468
|
-
}
|
|
469
|
-
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
470
|
-
background-color: ${E.palette.success.main};
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/* ADMONITION */
|
|
474
|
-
.admonition {
|
|
475
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
476
|
-
}
|
|
477
|
-
.admonition .admonition-title {
|
|
478
|
-
padding-left: 2.5rem !important;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
.admonition .admonition-title:before {
|
|
482
|
-
top: 50% !important;
|
|
483
|
-
width: 20px !important;
|
|
484
|
-
height: 20px !important;
|
|
485
|
-
transform: translateY(-50%) !important;
|
|
486
|
-
}
|
|
487
|
-
`;const Ne=[Xe,ut,at,ce,De,He],ot=()=>(0,b.Pf)(),dt=()=>{const E=ot(),J=(0,Ve.Z)();return(0,n.useMemo)(()=>{const be={theme:J,sidebar:E};return Ne.reduce((ge,Le)=>ge+Le(be),"")},[J,E])},Rt=()=>{const E=dt();return(0,n.useCallback)(J=>(J.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${E}</style>`),J),[E])},kt=(E,J,be)=>{const ge=E==="src"&&J.endsWith(".svg"),Le=!J.match(/^([a-z]*:)?\/\//i),Be=J.startsWith(be);return ge&&(Le||Be)},Lt=({techdocsStorageApi:E,entityId:J,path:be})=>async ge=>{const Le=await E.getApiOrigin(),Be=async(pt,Ot)=>{for(const tn of pt)if(tn.hasAttribute(Ot)){const Dt=tn.getAttribute(Ot);if(!Dt)return;const an=await E.getBaseUrl(Dt,J,be);if(kt(Ot,Dt,Le))try{const ln=await(await fetch(an,{credentials:"include"})).text();tn.setAttribute(Ot,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(ln)))}`)}catch{tn.setAttribute("alt",`Error: ${Dt}`)}else tn.setAttribute(Ot,an)}};return await Promise.all([Be(ge.querySelectorAll("img"),"src"),Be(ge.querySelectorAll("script"),"src"),Be(ge.querySelectorAll("source"),"src"),Be(ge.querySelectorAll("link"),"href"),Be(ge.querySelectorAll("a[download]"),"href")]),ge};var zt=t(39619),_t=t(67097),Et=t(28316),cn=t(82717),xt=t.n(cn);const Bt=E=>J=>{var be;const ge=J.querySelector('[title="Edit this page"]');if(!ge||!ge.href)return J;const Le=new URL(ge.href),Be=E.byUrl(Le);if((Be==null?void 0:Be.type)!=="github"&&(Be==null?void 0:Be.type)!=="gitlab")return J;const pt=((be=J.querySelector("article>h1"))===null||be===void 0?void 0:be.childNodes[0].textContent)||"",Ot=encodeURIComponent(`Documentation Feedback: ${pt}`),tn=encodeURIComponent(`Page source:
|
|
488
|
-
${ge.href}
|
|
489
|
-
|
|
490
|
-
Feedback:`),Dt=(Be==null?void 0:Be.type)==="github"?(0,zt.Pb)(Le.href,"blob"):Le.href,an=xt()(Dt),Tt=`/${an.organization}/${an.name}`,ln=ge.cloneNode();switch(Be==null?void 0:Be.type){case"gitlab":ln.href=`${Le.origin}${Tt}/issues/new?issue[title]=${Ot}&issue[description]=${tn}`;break;case"github":ln.href=`${Le.origin}${Tt}/issues/new?title=${Ot}&body=${tn}`;break;default:return J}return Et.render(n.createElement(_t.Z),ln),ln.style.paddingLeft="5px",ln.title="Leave feedback for this page",ln.id="git-feedback-link",ge==null||ge.insertAdjacentElement("beforebegin",ln),J};var At=t(44882);const yt=()=>E=>{const J=E.querySelector('.md-header label[for="__drawer"]'),be=E.querySelector("article");if(!J||!be)return E;const ge=J.cloneNode();return Et.render(n.createElement(At.Z),ge),ge.id="toggle-sidebar",ge.title="Toggle Sidebar",ge.classList.add("md-content__button"),ge.style.setProperty("padding","0 0 0 5px"),ge.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),be==null||be.prepend(ge),E},Kt=()=>E=>(((be,ge)=>{Array.from(be).filter(Le=>Le.hasAttribute(ge)).forEach(Le=>{const Be=Le.getAttribute(ge);if(Be){Be.match(/^https?:\/\//i)&&Le.setAttribute("target","_blank");try{const pt=Vt(window.location.href);Le.setAttribute(ge,new URL(Be,pt).toString())}catch{Le.replaceWith(Le.textContent||Be)}}})})(Array.from(E.getElementsByTagName("a")),"href"),E);function Vt(E){const J=new URL(E);return!J.pathname.endsWith("/")&&!J.pathname.endsWith(".html")&&(J.pathname+="/"),J.toString()}const en=({baseUrl:E,onClick:J})=>be=>(Array.from(be.getElementsByTagName("a")).forEach(ge=>{ge.addEventListener("click",Le=>{const pt=ge.getAttribute("href");!pt||pt.startsWith(E)&&!ge.hasAttribute("download")&&(Le.preventDefault(),J(Le,pt))})}),be);var Zt=t(15459),Ft=t(80030),re=t(72379),M=t(41547);const we=(0,Zt.Z)(E=>({tooltip:{fontSize:"inherit",color:E.palette.text.primary,margin:0,padding:E.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Ft.ZP),Re=()=>(0,h.jsx)(re.Z,{children:(0,h.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"})}),Je=({text:E})=>{const[J,be]=(0,n.useState)(!1),ge=(0,n.useCallback)(()=>{navigator.clipboard.writeText(E),be(!0)},[E]),Le=(0,n.useCallback)(()=>{be(!1)},[be]);return(0,h.jsx)(we,{title:"Copied to clipboard",placement:"left",open:J,onClose:Le,leaveDelay:1e3,children:(0,h.jsx)("button",{className:"md-clipboard md-icon",onClick:ge,children:(0,h.jsx)(Re,{})})})},gt=E=>J=>{const be=J.querySelectorAll("pre > code");for(const Le of be){var ge;const Be=Le.textContent||"",pt=document.createElement("div");Le==null||(ge=Le.parentElement)===null||ge===void 0||ge.prepend(pt),Et.render((0,h.jsx)(M.Z,{theme:E,children:(0,h.jsx)(Je,{text:Be})}),pt)}return J},z=()=>E=>{var J;return(J=E.querySelector(".md-header"))===null||J===void 0||J.remove(),E},j=()=>E=>{var J,be;return(J=E.querySelector(".md-footer .md-copyright"))===null||J===void 0||J.remove(),(be=E.querySelector(".md-footer-copyright"))===null||be===void 0||be.remove(),E},se=({onLoading:E,onLoaded:J})=>be=>(E(),be.addEventListener(G.Ox,function ge(){J(),be.removeEventListener(G.Ox,ge)}),be),$e=()=>E=>(setTimeout(()=>{if(window.location.hash){var J;const be=window.location.hash.slice(1);(J=E==null?void 0:E.querySelector(`[id="${be}"]`))===null||J===void 0||J.scrollIntoView()}},200),E),Qe=()=>E=>(setTimeout(()=>{const J=E==null?void 0:E.querySelectorAll("li.md-nav__item--active");J.length!==0&&(J.forEach(ge=>{const Le=ge==null?void 0:ge.querySelector("input");Le!=null&&Le.checked||Le==null||Le.click()}),J[J.length-1].scrollIntoView())},200),E),et=async(E,J)=>{let be;if(typeof E=="string")be=new DOMParser().parseFromString(E,"text/html").documentElement;else if(E instanceof Element)be=E;else throw new Error("dom is not a recognized type");for(const ge of J)be=await ge(be);return be},Ct="screen and (max-width: 76.1875em)",on=E=>{const J=(0,Ge.s0)(),be=(0,Ve.Z)(),ge=(0,Te.Z)(Ct),Le=xe(),Be=Rt(),pt=(0,Z.h_)(G.Dl),Ot=(0,Z.h_)(Ye.q3),{state:tn,path:Dt,content:an}=(0,$.DK)(),[Tt,ln]=(0,n.useState)(null),Wn=(0,G.ux)(Tt),Cn=(0,n.useCallback)(()=>{if(!Tt)return;Tt.querySelectorAll(".md-sidebar").forEach(x=>{if(ge)x.style.top="0px";else{const H=document==null?void 0:document.querySelector(".techdocs-reader-page");var d;const de=(d=H==null?void 0:H.getBoundingClientRect().top)!==null&&d!==void 0?d:0;var y;let ve=(y=Tt.getBoundingClientRect().top)!==null&&y!==void 0?y:0;const Ee=Tt.querySelector(".md-container > .md-tabs");var w;const _e=(w=Ee==null?void 0:Ee.getBoundingClientRect().height)!==null&&w!==void 0?w:0;ve<de&&(ve=de),x.style.top=`${Math.max(ve,0)+_e}px`}x.style.setProperty("opacity","1")})},[Tt,ge]);(0,n.useEffect)(()=>(window.addEventListener("resize",Cn),window.addEventListener("scroll",Cn,!0),()=>{window.removeEventListener("resize",Cn),window.removeEventListener("scroll",Cn,!0)}),[Tt,Cn]);const On=(0,n.useCallback)(()=>{if(!Tt)return;const Wt=Tt.querySelector(".md-footer");Wt&&(Wt.style.width=`${Tt.getBoundingClientRect().width}px`)},[Tt]);(0,n.useEffect)(()=>(window.addEventListener("resize",On),()=>{window.removeEventListener("resize",On)}),[Tt,On]),(0,n.useEffect)(()=>{Wn||(On(),Cn())},[tn,Wn,On,Cn]);const $n=(0,n.useCallback)((Wt,x)=>et(Wt,[Le,Lt({techdocsStorageApi:pt,entityId:E,path:x}),Kt(),yt(),z(),j(),Bt(Ot),Be]),[E,Ot,pt,Le,Be]),Xn=(0,n.useCallback)(async Wt=>et(Wt,[$e(),Qe(),gt(be),en({baseUrl:window.location.origin,onClick:(x,d)=>{const y=x.ctrlKey||x.metaKey,w=new URL(d);if(w.hash)if(y)window.open(`${w.pathname}${w.hash}`,"_blank");else{var H;J(`${w.pathname}${w.hash}`),(H=Wt==null?void 0:Wt.querySelector(`#${w.hash.slice(1)}`))===null||H===void 0||H.scrollIntoView()}else y?window.open(w.pathname,"_blank"):J(w.pathname)}}),se({onLoading:()=>{},onLoaded:()=>{var x;(x=Wt.querySelector(".md-nav__title"))===null||x===void 0||x.removeAttribute("for")}}),se({onLoading:()=>{Array.from(Wt.querySelectorAll(".md-sidebar")).forEach(d=>{d.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[be,J]);return(0,n.useEffect)(()=>{if(!an)return()=>{};let Wt=!0;return $n(an,Dt).then(async x=>{if(!(x!=null&&x.innerHTML)||!Wt)return;window.scroll({top:0});const d=await Xn(x);ln(d)}),()=>{Wt=!1}},[an,Dt,$n,Xn]),Tt};var Ht=t(8560);const dn=()=>{const E=(0,G.$L)(),{shadowRoot:J}=(0,G.x1)(),be=J==null?void 0:J.querySelector('[data-md-component="content"]'),ge=J==null?void 0:J.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Le=ge==null?void 0:ge.querySelector('[data-techdocs-addons-location="primary sidebar"]');Le||(Le=document.createElement("div"),Le.setAttribute("data-techdocs-addons-location","primary sidebar"),ge==null||ge.prepend(Le));const Be=J==null?void 0:J.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let pt=Be==null?void 0:Be.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return pt||(pt=document.createElement("div"),pt.setAttribute("data-techdocs-addons-location","secondary sidebar"),Be==null||Be.prepend(pt)),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Ht.Z,{container:Le,children:E.renderComponentsByLocation(G.oZ.PrimarySidebar)}),(0,h.jsx)(Ht.Z,{container:be,children:E.renderComponentsByLocation(G.oZ.Content)}),(0,h.jsx)(Ht.Z,{container:pt,children:E.renderComponentsByLocation(G.oZ.SecondarySidebar)})]})},Ut=(0,m.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),Mt=(0,$.m1)(E=>{var J;const{withSearch:be=!0,onReady:ge}=E,Le=Ut(),{entityMetadata:{value:Be,loading:pt},entityRef:Ot,setShadowRoot:tn}=(0,G.x1)(),Dt=on(Ot),an=(0,n.useCallback)(Tt=>{tn(Tt),ge instanceof Function&&ge()},[tn,ge]);return pt===!1&&!Be?(0,h.jsx)(b.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}):Dt?(0,h.jsx)(b.VY,{children:(0,h.jsxs)(O.Z,{container:!0,children:[(0,h.jsx)(O.Z,{xs:12,item:!0,children:(0,h.jsx)(ye,{})}),be&&(0,h.jsx)(O.Z,{className:Le.search,xs:"auto",item:!0,children:(0,h.jsx)(l.S,{entityId:Ot,entityTitle:Be==null||(J=Be.metadata)===null||J===void 0?void 0:J.title})}),(0,h.jsx)(O.Z,{xs:12,item:!0,children:(0,h.jsx)(G.VA,{element:Dt,onAppend:an,children:(0,h.jsx)(dn,{})})})]})}):(0,h.jsx)(b.VY,{children:(0,h.jsx)(O.Z,{container:!0,children:(0,h.jsx)(O.Z,{xs:12,item:!0,children:(0,h.jsx)(ye,{})})})})}),wn=null},93225:function(tt,Ae,t){"use strict";t.d(Ae,{S:function(){return Y}});var h=t(52322),n=t(2784),m=t(18671),O=t(98069),G=t(73250),b=t(61886),l=t(46285),L=t(25271),ee=t(15018),X=t(25248),K=t(95573);const F=(0,h.jsx)(O.Z,{animation:"wave",variant:"text",height:40}),Y=V=>{const{children:ie}=V,le=(0,b.$L)(),I=(0,X.h_)(X.Ds),{title:A,setTitle:Z,subtitle:P,setSubtitle:$,entityRef:te,metadata:{value:ye,loading:Ge},entityMetadata:{value:Ve,loading:Te}}=(0,b.x1)();(0,n.useEffect)(()=>{!ye||(Z(ye.site_name),$(()=>{let{site_description:mt}=ye;return(!mt||mt==="None")&&(mt="Home"),mt}))},[ye,Z,$]);const Ye=I.getOptional("app.title")||"Backstage",Ke=[A,P,Ye].filter(Boolean).join(" | "),{locationMetadata:Oe,spec:Fe}=Ve||{},qe=Fe==null?void 0:Fe.lifecycle,st=Ve?(0,l.hF)(Ve,L.S4):[],nt=(0,X.tg)(K._Z)(),ct=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ee.i9,{label:"Component",value:(0,h.jsx)(l.dx,{color:"inherit",entityRef:te,title:Ve==null?void 0:Ve.metadata.title,defaultKind:"Component"})}),st.length>0&&(0,h.jsx)(ee.i9,{label:"Owner",value:(0,h.jsx)(l.rI,{color:"inherit",entityRefs:st,defaultKind:"group"})}),qe?(0,h.jsx)(ee.i9,{label:"Lifecycle",value:qe}):null,Oe&&Oe.type!=="dir"&&Oe.type!=="file"?(0,h.jsx)(ee.i9,{label:"",value:(0,h.jsx)("a",{href:Oe.target,target:"_blank",rel:"noopener noreferrer",children:(0,h.jsx)(G.Z,{style:{marginTop:"-25px",fill:"#fff"}})})}):null]});return!Te&&Ve===void 0||!Ge&&ye===void 0?null:(0,h.jsxs)(ee.h4,{type:"Documentation",typeLink:nt,title:A||F,subtitle:P||F,children:[(0,h.jsx)(m.Z,{titleTemplate:"%s",children:(0,h.jsx)("title",{children:Ke})}),ct,ie,le.renderComponentsByLocation(b.oZ.Header)]})}},65124:function(tt,Ae,t){"use strict";t.d(Ae,{b:function(){return F}});var h=t(52322),n=t(2784),m=t(79692),O=t(15223),G=t(95544),b=t(80030),l=t(61837),L=t(48348),ee=t(47603),X=t(61886);const K=(0,m.Z)(Y=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:Y.spacing(3,3,0)}})),F=Y=>{const V=K(),[ie,le]=(0,n.useState)(null),I=(0,n.useCallback)(Ge=>{le(Ge.currentTarget)},[]),A=(0,n.useCallback)(()=>{le(null)},[]),{entityMetadata:{value:Z,loading:P}}=(0,X.x1)(),$=(0,X.$L)(),te=$.renderComponentsByLocation(X.oZ.Subheader),ye=$.renderComponentsByLocation(X.oZ.Settings);return!te&&!ye||P===!1&&!Z?null:(0,h.jsx)(O.Z,{classes:V,...Y.toolbarProps,children:(0,h.jsxs)(G.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[te,ye?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(b.ZP,{title:"Settings",children:(0,h.jsx)(l.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:I,children:(0,h.jsx)(ee.Z,{})})}),(0,h.jsx)(L.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:ie,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(ie),onClose:A,keepMounted:!0,children:ye})]}):null]})})}},95481:function(tt,Ae,t){"use strict";t.d(Ae,{DK:function(){return F},m1:function(){return V}});var h=t(52322),n=t(2784),m=t(10289),O=t(61886),G=t(25248),b=t(64279),l=t(77446);function L({contentLoading:ie,content:le,activeSyncState:I}){return ie||I==="BUILD_READY_RELOAD"||!le&&I==="CHECKING"?"CHECKING":!le&&I==="BUILDING"?"INITIAL_BUILD":le?I==="BUILDING"?"CONTENT_STALE_REFRESHING":I==="BUILD_READY"?"CONTENT_STALE_READY":I==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function ee(ie,le){const I={...ie};switch(le.type){case"sync":le.state==="CHECKING"&&(I.buildLog=[]),I.activeSyncState=le.state,I.syncError=le.syncError;break;case"contentLoading":I.contentLoading=!0,I.contentError=void 0;break;case"content":typeof le.path=="string"&&(I.path=le.path),I.contentLoading=!1,I.content=le.content,I.contentError=le.contentError;break;case"buildLog":I.buildLog=I.buildLog.concat(le.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(I.activeSyncState)&&["contentLoading","content"].includes(le.type)&&(I.activeSyncState="UP_TO_DATE",I.buildLog=[]),I}function X(ie,le,I,A){var Z,P;const[$,te]=(0,n.useReducer)(ee,{activeSyncState:"CHECKING",path:A,contentLoading:!0,buildLog:[]}),ye=(0,G.h_)(O.Dl),{retry:Ge}=(0,l.Z)(async()=>{te({type:"contentLoading"});try{const Ye=await ye.getEntityDocs({kind:ie,namespace:le,name:I},A);return te({type:"content",content:Ye,path:A}),Ye}catch(Ye){te({type:"content",contentError:Ye,path:A})}},[ye,ie,le,I,A]),Ve=(0,n.useRef)({content:void 0,reload:()=>{}});return Ve.current={content:$.content,reload:Ge},(0,b.default)(async()=>{te({type:"sync",state:"CHECKING"});const Ye=setTimeout(()=>{te({type:"sync",state:"BUILDING"})},1e3);try{switch(await ye.syncEntityDocs({kind:ie,namespace:le,name:I},Oe=>{te({type:"buildLog",log:Oe})})){case"updated":Ve.current.content?te({type:"sync",state:"BUILD_READY"}):(Ve.current.reload(),te({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":te({type:"sync",state:"UP_TO_DATE"});break;default:te({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Ke){te({type:"sync",state:"ERROR",syncError:Ke})}finally{clearTimeout(Ye)}},[ie,I,le,ye,te,Ve]),{state:(0,n.useMemo)(()=>L({activeSyncState:$.activeSyncState,contentLoading:$.contentLoading,content:$.content}),[$.activeSyncState,$.content,$.contentLoading]),contentReload:Ge,path:$.path,content:$.content,contentErrorMessage:(Z=$.contentError)===null||Z===void 0?void 0:Z.toString(),syncErrorMessage:(P=$.syncError)===null||P===void 0?void 0:P.toString(),buildLog:$.buildLog}}const K=(0,n.createContext)({}),F=()=>(0,n.useContext)(K),Y=({children:ie})=>{const{"*":le=""}=(0,m.UO)(),{entityRef:I}=(0,O.x1)(),{kind:A,namespace:Z,name:P}=I,$=X(A,Z,P,le);return(0,h.jsx)(K.Provider,{value:$,children:ie instanceof Function?ie($):ie})},V=ie=>le=>(0,h.jsx)(Y,{children:(0,h.jsx)(ie,{...le})})},95573:function(tt,Ae,t){"use strict";t.d(Ae,{Fw:function(){return m},_Z:function(){return n},pd:function(){return O}});var h=t(25248);const n=(0,h.NT)({id:"techdocs:index-page"}),m=(0,h.NT)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),O=(0,h.NT)({id:"techdocs:catalog-reader-view"})},17339:function(tt,Ae,t){"use strict";t.d(Ae,{S:function(){return ye}});var h=t(52322),n=t(2784),m=t(79692),O=t(49378),G=t(38402),b=t(86136),l=t(85256),L=t(15018),ee=t(25248),X=t(21411);const K=(0,m.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),F=Ge=>{const{result:Ve,highlight:Te,rank:Ye,lineClamp:Ke=5,asListItem:Oe=!0,asLink:Fe=!0,title:qe,icon:st}=Ge,nt=K(),ct=(0,ee.z$)(),Se=()=>{ct.captureEvent("discover",Ve.title,{attributes:{to:Ve.location},value:Ye})},ht=()=>{const q=Te!=null&&Te.fields.title?(0,h.jsx)(X.FA,{text:Te.fields.title,preTag:Te.preTag,postTag:Te.postTag}):Ve.title,xe=Te!=null&&Te.fields.entityTitle?(0,h.jsx)(X.FA,{text:Te.fields.entityTitle,preTag:Te.preTag,postTag:Te.postTag}):Ve.entityTitle,Ce=Te!=null&&Te.fields.name?(0,h.jsx)(X.FA,{text:Te.fields.name,preTag:Te.preTag,postTag:Te.postTag}):Ve.name;return(0,h.jsx)(O.Z,{className:nt.itemText,primaryTypographyProps:{variant:"h6"},primary:qe||(0,h.jsxs)(h.Fragment,{children:[q," | ",xe!=null?xe:Ce," docs"]}),secondary:(0,h.jsx)("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:Ke,overflow:"hidden"},children:Te!=null&&Te.fields.text?(0,h.jsx)(X.FA,{text:Te.fields.text,preTag:Te.preTag,postTag:Te.postTag}):Ve.text})})},mt=({children:q})=>Fe?(0,h.jsx)(L.rU,{noTrack:!0,to:Ve.location,onClick:Se,children:q}):(0,h.jsx)(h.Fragment,{children:q}),Ie=({children:q})=>Oe?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(G.Z,{alignItems:"flex-start",children:[st&&(0,h.jsx)(b.Z,{children:st}),(0,h.jsx)("div",{className:nt.flexContainer,children:q})]}),(0,h.jsx)(l.Z,{component:"li"})]}):(0,h.jsx)(h.Fragment,{children:q});return(0,h.jsx)(mt,{children:(0,h.jsx)(Ie,{children:(0,h.jsx)(ht,{})})})};var Y=t(86619),V=t(50581),ie=t(61837),le=t(4614),I=t(21853),A=t(88013),Z=t(10289),P=t(48760);const $=(0,m.Z)({root:{width:"100%"}}),te=Ge=>{const{entityId:Ve,entityTitle:Te,debounceTime:Ye=150}=Ge,[Ke,Oe]=(0,n.useState)(!1),Fe=(0,Z.s0)(),{term:qe,setTerm:st,setFilters:nt,result:{loading:ct,value:Se}}=(0,X.Rx)(),ht=$(),[mt,Ie]=(0,n.useState)([]);(0,n.useEffect)(()=>{let ae=!0;if(ae&&Se){const ce=Se.results.slice(0,10);Ie(ce)}return()=>{ae=!1}},[ct,Se]);const[q,xe]=(0,n.useState)(qe);(0,P.Z)(()=>st(q),Ye,[q]);const{kind:Ce,name:Xe,namespace:ut}=Ve;(0,n.useEffect)(()=>{nt(ae=>({...ae,kind:Ce,namespace:ut,name:Xe}))},[Ce,ut,Xe,nt]);const vt=ae=>{Ke||Oe(!0),xe(ae.target.value)},at=(ae,ce)=>{if(ce!=null&&ce.document){const{location:De}=ce.document;Fe(De)}};return(0,h.jsx)(A.ZP,{classes:{root:ht.root},"data-testid":"techdocs-search-bar",size:"small",open:Ke,getOptionLabel:()=>"",filterOptions:ae=>ae,onClose:()=>{Oe(!1)},onFocus:()=>{Oe(!0)},onChange:at,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:mt,renderOption:({document:ae,highlight:ce})=>(0,h.jsx)(F,{result:ae,lineClamp:3,asListItem:!1,asLink:!1,title:ae.title,highlight:ce}),loading:ct,renderInput:ae=>(0,h.jsx)(Y.Z,{...ae,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${Te||Ve.name} docs`,value:q,onChange:vt,InputProps:{...ae.InputProps,startAdornment:(0,h.jsx)(V.Z,{position:"start",children:(0,h.jsx)(ie.Z,{"aria-label":"Query",disabled:!0,children:(0,h.jsx)(I.Z,{})})}),endAdornment:(0,h.jsxs)(n.Fragment,{children:[ct?(0,h.jsx)(le.Z,{color:"inherit",size:20}):null,ae.InputProps.endAdornment]})}})})},ye=Ge=>{const Ve={term:"",types:["techdocs"],pageCursor:"",filters:Ge.entityId};return(0,h.jsx)(X.Nd,{initialState:Ve,children:(0,h.jsx)(te,{...Ge})})}},19133:function(tt,Ae,t){"use strict";tt.exports=t.p+"static/createComponent.975d1e1e..svg"},86284:function(tt,Ae,t){"use strict";tt.exports=t.p+"static/missingAnnotation.67f79e98..svg"},3871:function(tt,Ae,t){"use strict";tt.exports=t.p+"static/noBuild.1715fa71..svg"},96465:function(tt,Ae,t){"use strict";tt.exports=t.p+"static/noInformation.4b426325..svg"},29788:function(tt,Ae,t){"use strict";tt.exports=t.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(tt){var Ae=function(h){return tt(tt.s=h)};tt.O(0,[2370,6202,9284,9035,2126,7012,1410,2194,427,3222,6816,5218,4736],function(){return Ae(71973)});var t=tt.O()}]);})();
|
|
491
|
-
|
|
492
|
-
//# sourceMappingURL=main.582cf8a9.js.map
|