@techdocs/cli 0.8.16 → 0.8.17-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/{PublisherConfig-a09bdfcc.cjs.js → PublisherConfig-162efac5.cjs.js} +1 -1
  3. package/dist/cjs/{PublisherConfig-a09bdfcc.cjs.js.map → PublisherConfig-162efac5.cjs.js.map} +1 -1
  4. package/dist/cjs/{generate-20171bf9.cjs.js → generate-143a6de3.cjs.js} +4 -4
  5. package/dist/cjs/generate-143a6de3.cjs.js.map +1 -0
  6. package/dist/cjs/{migrate-04a51fb3.cjs.js → migrate-181e95f5.cjs.js} +5 -5
  7. package/dist/cjs/migrate-181e95f5.cjs.js.map +1 -0
  8. package/dist/cjs/{mkdocs-f1cf9408.cjs.js → mkdocs-30f530ff.cjs.js} +3 -3
  9. package/dist/cjs/{mkdocs-f1cf9408.cjs.js.map → mkdocs-30f530ff.cjs.js.map} +1 -1
  10. package/dist/cjs/{mkdocsServer-7058189d.cjs.js → mkdocsServer-758a3ae9.cjs.js} +1 -1
  11. package/dist/cjs/{mkdocsServer-7058189d.cjs.js.map → mkdocsServer-758a3ae9.cjs.js.map} +1 -1
  12. package/dist/cjs/{publish-d1ccb001.cjs.js → publish-7bf1e5f7.cjs.js} +5 -5
  13. package/dist/cjs/publish-7bf1e5f7.cjs.js.map +1 -0
  14. package/dist/cjs/{serve-be4ef843.cjs.js → serve-21d1e885.cjs.js} +3 -3
  15. package/dist/cjs/serve-21d1e885.cjs.js.map +1 -0
  16. package/dist/cjs/{utility-6042a9ba.cjs.js → utility-51f4a306.cjs.js} +1 -1
  17. package/dist/cjs/utility-51f4a306.cjs.js.map +1 -0
  18. package/dist/embedded-app/index.html +1 -1
  19. package/dist/embedded-app/static/{1553.8d50cd6e.chunk.js → 1553.b7bcb06c.chunk.js} +2 -2
  20. package/dist/embedded-app/static/{1553.8d50cd6e.chunk.js.map → 1553.b7bcb06c.chunk.js.map} +1 -1
  21. package/dist/embedded-app/static/{1959.3c856a1e.chunk.js → 1959.6c1762da.chunk.js} +2 -2
  22. package/dist/embedded-app/static/{1959.3c856a1e.chunk.js.map → 1959.6c1762da.chunk.js.map} +1 -1
  23. package/dist/embedded-app/static/{2426.0fc592b4.chunk.js → 2426.92f98d58.chunk.js} +2 -2
  24. package/dist/embedded-app/static/{2426.0fc592b4.chunk.js.map → 2426.92f98d58.chunk.js.map} +1 -1
  25. package/dist/embedded-app/static/3696.77a82030.chunk.js +3 -0
  26. package/dist/embedded-app/static/{5011.c8e98520.chunk.js.map → 3696.77a82030.chunk.js.map} +1 -1
  27. package/dist/embedded-app/static/{390.879c2086.chunk.js → 390.b97bc67e.chunk.js} +2 -2
  28. package/dist/embedded-app/static/{390.879c2086.chunk.js.map → 390.b97bc67e.chunk.js.map} +1 -1
  29. package/dist/embedded-app/static/{4022.0fe21618.chunk.js → 4022.482a5f92.chunk.js} +2 -2
  30. package/dist/embedded-app/static/{4022.0fe21618.chunk.js.map → 4022.482a5f92.chunk.js.map} +1 -1
  31. package/dist/embedded-app/static/{6235.c0346cdc.chunk.js → 6235.a1086c98.chunk.js} +2 -2
  32. package/dist/embedded-app/static/{6235.c0346cdc.chunk.js.map → 6235.a1086c98.chunk.js.map} +1 -1
  33. package/dist/embedded-app/static/{6583.ad8c5d41.chunk.js → 6583.035b49a3.chunk.js} +2 -2
  34. package/dist/embedded-app/static/{6583.ad8c5d41.chunk.js.map → 6583.035b49a3.chunk.js.map} +1 -1
  35. package/dist/embedded-app/static/7110.cac06b1c.chunk.js +3 -0
  36. package/dist/embedded-app/static/7110.cac06b1c.chunk.js.map +1 -0
  37. package/dist/embedded-app/static/{7758.2fe27149.chunk.js → 7758.cb484a7b.chunk.js} +2 -2
  38. package/dist/embedded-app/static/{7758.2fe27149.chunk.js.map → 7758.cb484a7b.chunk.js.map} +1 -1
  39. package/dist/embedded-app/static/{8061.8b41800d.chunk.js → 8061.b8ba1848.chunk.js} +2 -2
  40. package/dist/embedded-app/static/{8061.8b41800d.chunk.js.map → 8061.b8ba1848.chunk.js.map} +1 -1
  41. package/dist/embedded-app/static/8718.71563d4c.chunk.js +4 -0
  42. package/dist/embedded-app/static/{8718.8a863f87.chunk.js.map → 8718.71563d4c.chunk.js.map} +1 -1
  43. package/dist/embedded-app/static/{8792.c72ab612.chunk.js → 8792.e74d00e0.chunk.js} +2 -2
  44. package/dist/embedded-app/static/{8792.c72ab612.chunk.js.map → 8792.e74d00e0.chunk.js.map} +1 -1
  45. package/dist/embedded-app/static/{9028.decd1f17.chunk.js → 9028.0f028f46.chunk.js} +2 -2
  46. package/dist/embedded-app/static/{9028.decd1f17.chunk.js.map → 9028.0f028f46.chunk.js.map} +1 -1
  47. package/dist/embedded-app/static/main.a81ffeda.js +444 -0
  48. package/dist/embedded-app/static/main.a81ffeda.js.map +1 -0
  49. package/dist/embedded-app/static/{runtime.a73a2a40.js → runtime.a81ffeda.js} +2 -2
  50. package/dist/embedded-app/static/{runtime.a73a2a40.js.map → runtime.a81ffeda.js.map} +1 -1
  51. package/dist/embedded-app/static/{vendor.a73a2a40.js → vendor.a81ffeda.js} +3 -3
  52. package/dist/embedded-app/static/vendor.a81ffeda.js.map +1 -0
  53. package/dist/index.cjs.js +8 -8
  54. package/dist/index.cjs.js.map +1 -1
  55. package/package.json +11 -11
  56. package/dist/cjs/generate-20171bf9.cjs.js.map +0 -1
  57. package/dist/cjs/migrate-04a51fb3.cjs.js.map +0 -1
  58. package/dist/cjs/publish-d1ccb001.cjs.js.map +0 -1
  59. package/dist/cjs/serve-be4ef843.cjs.js.map +0 -1
  60. package/dist/cjs/utility-6042a9ba.cjs.js.map +0 -1
  61. package/dist/embedded-app/static/5011.c8e98520.chunk.js +0 -3
  62. package/dist/embedded-app/static/7110.5f7b5114.chunk.js +0 -3
  63. package/dist/embedded-app/static/7110.5f7b5114.chunk.js.map +0 -1
  64. package/dist/embedded-app/static/8718.8a863f87.chunk.js +0 -4
  65. package/dist/embedded-app/static/main.a73a2a40.js +0 -444
  66. package/dist/embedded-app/static/main.a73a2a40.js.map +0 -1
  67. package/dist/embedded-app/static/vendor.a73a2a40.js.map +0 -1
@@ -0,0 +1,444 @@
1
+ (()=>{var Ni=Object.defineProperty;var $i=(q,s,e)=>s in q?Ni(q,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):q[s]=e;var ie=(q,s,e)=>($i(q,typeof s!="symbol"?s+"":s,e),e),_a=(q,s,e)=>{if(!s.has(q))throw TypeError("Cannot "+e)};var Je=(q,s,e)=>(_a(q,s,"read from private field"),e?e.call(q):s.get(q)),an=(q,s,e)=>{if(s.has(q))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(q):s.set(q,e)},un=(q,s,e,n)=>(_a(q,s,"write to private field"),n?n.call(q,e):s.set(q,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(q,s,e){"use strict";e.d(s,{n3:function(){return y},MS:function(){return i}});var n=e(48023),t=e(10179),c=e(96279),m=e.n(c);const y=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class i{constructor(h){ie(this,"discoveryApi");ie(this,"fetchApi");this.discoveryApi=h.discoveryApi,this.fetchApi=h.fetchApi||{fetch:m()}}async getEntityAncestors(h,l){const{kind:E,namespace:g,name:C}=(0,n.of)(h.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(E)}/${encodeURIComponent(g)}/${encodeURIComponent(C)}/ancestry`,l)}async getLocationById(h,l){return await this.requestOptional("GET",`/locations/${encodeURIComponent(h)}`,l)}async getEntities(h,l){const{filter:E=[],fields:g=[],offset:C,limit:L,after:Z}=h!=null?h:{},S=[];for(const x of[E].flat()){const D=[];for(const[U,V]of Object.entries(x))for(const X of[V].flat())X===y?D.push(encodeURIComponent(U)):typeof X=="string"&&D.push(`${encodeURIComponent(U)}=${encodeURIComponent(X)}`);D.length&&S.push(`filter=${D.join(",")}`)}g.length&&S.push(`fields=${g.map(encodeURIComponent).join(",")}`),C!==void 0&&S.push(`offset=${C}`),L!==void 0&&S.push(`limit=${L}`),Z!==void 0&&S.push(`after=${encodeURIComponent(Z)}`);const G=S.length?`?${S.join("&")}`:"",B=await this.requestRequired("GET",`/entities${G}`,l),T=(x,D)=>{var X,Ee;if(((X=x.metadata)==null?void 0:X.name)===void 0||x.kind===void 0||((Ee=D.metadata)==null?void 0:Ee.name)===void 0||D.kind===void 0)return 0;const U=(0,n.eE)(x),V=(0,n.eE)(D);return U<V?-1:U>V?1:0};return{items:B.sort(T)}}async getEntityByRef(h,l){const{kind:E,namespace:g,name:C}=(0,n.of)(h);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(E)}/${encodeURIComponent(g)}/${encodeURIComponent(C)}`,l)}async getEntityByName(h,l){const{kind:E,namespace:g="default",name:C}=h;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(E)}/${encodeURIComponent(g)}/${encodeURIComponent(C)}`,l)}async refreshEntity(h,l){const E=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(l==null?void 0:l.token)&&{Authorization:`Bearer ${l==null?void 0:l.token}`}},method:"POST",body:JSON.stringify({entityRef:h})});if(E.status!==200)throw new Error(await E.text())}async getEntityFacets(h,l){const{filter:E=[],facets:g}=h,C=[];for(const Z of[E].flat()){const S=[];for(const[G,B]of Object.entries(Z))for(const T of[B].flat())T===y?S.push(encodeURIComponent(G)):typeof T=="string"&&S.push(`${encodeURIComponent(G)}=${encodeURIComponent(T)}`);S.length&&C.push(`filter=${S.join(",")}`)}for(const Z of g)C.push(`facet=${encodeURIComponent(Z)}`);const L=C.length?`?${C.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${L}`,l)}async addLocation({type:h="url",target:l,dryRun:E,presence:g},C){const L=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${E?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(C==null?void 0:C.token)&&{Authorization:`Bearer ${C==null?void 0:C.token}`}},method:"POST",body:JSON.stringify({type:h,target:l,presence:g})});if(L.status!==201)throw new Error(await L.text());const{location:Z,entities:S,exists:G}=await L.json();if(!Z)throw new Error(`Location wasn't added: ${l}`);return{location:Z,entities:S,exists:G}}async getLocationByRef(h,l){return(await this.requestRequired("GET","/locations",l)).map(g=>g.data).find(g=>h===(0,n.NZ)(g))}async removeLocationById(h,l){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(h)}`,l)}async removeEntityByUid(h,l){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(h)}`,l)}async requestIgnored(h,l,E){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${l}`,C=(E==null?void 0:E.token)?{Authorization:`Bearer ${E.token}`}:{},L=await this.fetchApi.fetch(g,{method:h,headers:C});if(!L.ok)throw await t.VL.fromResponse(L)}async requestRequired(h,l,E){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${l}`,C=(E==null?void 0:E.token)?{Authorization:`Bearer ${E.token}`}:{},L=await this.fetchApi.fetch(g,{method:h,headers:C});if(!L.ok)throw await t.VL.fromResponse(L);return await L.json()}async requestOptional(h,l,E){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${l}`,C=(E==null?void 0:E.token)?{Authorization:`Bearer ${E.token}`}:{},L=await this.fetchApi.fetch(g,{method:h,headers:C});if(!L.ok){if(L.status===404)return;throw await t.VL.fromResponse(L)}return await L.json()}}},48023:function(q,s,e){"use strict";e.d(s,{Tf:function(){return c},P1:function(){return me},q1:function(){return ve},M6:function(){return Te},l2:function(){return t},zG:function(){return n},w$:function(){return k},nP:function(){return gt},aS:function(){return Me},S4:function(){return yt},cz:function(){return ye},iB:function(){return Ge},of:function(){return Qe},Ou:function(){return xe},eE:function(){return We},NZ:function(){return ft}});const n="default",t="backstage.io/view-url",c="backstage.io/edit-url";var m=e(76635),y=e.n(m);class i{constructor(P=DEFAULT_NAMESPACE){ie(this,"namespace");this.namespace=P}async enforce(P){return P.metadata.namespace?P:lodash.merge({metadata:{namespace:this.namespace}},P)}}class o{static isValidPrefixAndOrSuffix(P,z,A,d){if(typeof P!="string")return!1;const v=P.split(z);return v.length===1?d(v[0]):v.length===2?A(v[0])&&d(v[1]):!1}static isJsonSafe(P){try{return y().isEqual(P,JSON.parse(JSON.stringify(P)))}catch{return!1}}static isValidDnsSubdomain(P){return typeof P=="string"&&P.length>=1&&P.length<=253&&P.split(".").every(o.isValidDnsLabel)}static isValidDnsLabel(P){return typeof P=="string"&&P.length>=1&&P.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(P)}static isValidTag(P){return typeof P=="string"&&P.length>=1&&P.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(P)}static isValidUrl(P){if(typeof P!="string")return!1;try{return new URL(P),!0}catch{return!1}}static isValidString(P){var z;return typeof P=="string"&&((z=P==null?void 0:P.trim())==null?void 0:z.length)>=1}static isNonEmptyString(P){var z;return typeof P=="string"&&((z=P==null?void 0:P.trim())==null?void 0:z.length)>=1}}var h=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}}}}}'),l=e(48231),E=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"}}}`),g=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==","generation":13,"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},"generation":{"type":"integer","description":"A positive nonzero number that indicates the current generation of data for this entity; the value is incremented each time the spec changes. 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.","examples":[1],"minimum":1,"deprecated":true},"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}}}}}}'),C=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"}}},"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 L=new Map,Z=[h,E,g,C];function S(le){if(!(le==null?void 0:le.length))throw new TypeError("Unknown error");const P=le[0];throw new TypeError(`${P.dataPath||"<root>"} ${P.message}${P.params?` - ${Object.entries(P.params).map(([z,A])=>`${z}: ${A}`).join(", ")}`:""}`)}function G(le,P={}){var N;const z=(N=P==null?void 0:P.disableCache)!=null?N:!1,A=z?"":JSON.stringify(le);if(!z){const ne=L.get(A);if(ne)return ne}const d=B(le),v=new l.ZP({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});d.length&&v.addSchema(d,void 0,void 0,!0);const b=v.compile(le);return z||L.set(A,b),b}function B(le){if(typeof le!="object")return[];const P=new Set;le.$id&&P.add(le.$id);const z=new Array,A=[le];for(;A.length;){const d=A.pop();for(const v of T(d))if(!P.has(v)){P.add(v);const b=Z.find(N=>N.$id===v);b&&(z.push(b),A.push(b))}}return z}function*T(le){const P=[le];for(;P.length;){const z=P.pop();if(typeof z=="object"&&z)for(const[A,d]of Object.entries(z))A==="$ref"&&typeof d=="string"?yield d.split("#")[0]:P.push(d)}}function x(le){const P=compileAjvSchema(le||entityEnvelopeSchema);return z=>{if(P(z)===!0)return z;throw throwAjvError(P.errors)}}function D(le){const P=G(le);return z=>{var v;if(P(z)===!0)return z;const d=(v=P.errors)==null?void 0:v.filter(b=>["/kind","/apiVersion"].includes(b.dataPath));if((d==null?void 0:d.length)&&d.every(b=>b.keyword==="enum"))return!1;throw S(P.errors)}}function U(le){const P=compileAjvSchema(le||entitySchema);return z=>{if(P(z)===!0)return z;throw throwAjvError(P.errors)}}class V{static isValidApiVersion(P){return o.isValidPrefixAndOrSuffix(P,"/",o.isValidDnsSubdomain,z=>z.length>=1&&z.length<=63&&/^[a-z0-9A-Z]+$/.test(z))}static isValidKind(P){return typeof P=="string"&&P.length>=1&&P.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(P)}static isValidObjectName(P){return typeof P=="string"&&P.length>=1&&P.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(P)}static isValidNamespace(P){return o.isValidDnsLabel(P)}static isValidLabelKey(P){return o.isValidPrefixAndOrSuffix(P,"/",o.isValidDnsSubdomain,V.isValidObjectName)}static isValidLabelValue(P){return P===""||V.isValidObjectName(P)}static isValidAnnotationKey(P){return o.isValidPrefixAndOrSuffix(P,"/",o.isValidDnsSubdomain,V.isValidObjectName)}static isValidAnnotationValue(P){return typeof P=="string"}}const X={isValidApiVersion:V.isValidApiVersion,isValidKind:V.isValidKind,isValidEntityName:V.isValidObjectName,isValidNamespace:V.isValidNamespace,isValidLabelKey:V.isValidLabelKey,isValidLabelValue:V.isValidLabelValue,isValidAnnotationKey:V.isValidAnnotationKey,isValidAnnotationValue:V.isValidAnnotationValue,isValidTag:le=>typeof le=="string"&&le.length>=1&&le.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(le)};function Ee(le={}){return{...X,...le}}class Se{constructor(P=makeValidator()){ie(this,"validators");this.validators=P}async enforce(P){var b,N,ne,re,_,fe,ge;function z(Re,we,He){if(we==null)throw new Error(`${Re} must have a value`);let _e;try{_e=He(we)}catch(ke){throw new Error(`${Re} could not be validated, ${ke}`)}if(!_e){let ke;switch(He.name){case"isValidLabelValue":case"isValidObjectName":ke="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":ke="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":ke="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":ke="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":ke="a string";break;case"isValidKind":ke="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":ke="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":ke="a non empty string";break;default:ke=void 0;break}const Rt=ke?` expected ${ke} but found "${we}".`:"";throw new Error(`"${Re}" is not valid;${Rt} 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 A(Re,we,He){return we===void 0||z(Re,we,He)}z("apiVersion",P.apiVersion,this.validators.isValidApiVersion),z("kind",P.kind,this.validators.isValidKind),z("metadata.name",P.metadata.name,this.validators.isValidEntityName),A("metadata.namespace",P.metadata.namespace,this.validators.isValidNamespace);for(const[Re,we]of Object.entries((b=P.metadata.labels)!=null?b:[]))z(`labels.${Re}`,Re,this.validators.isValidLabelKey),z(`labels.${Re}`,we,this.validators.isValidLabelValue);for(const[Re,we]of Object.entries((N=P.metadata.annotations)!=null?N:[]))z(`annotations.${Re}`,Re,this.validators.isValidAnnotationKey),z(`annotations.${Re}`,we,this.validators.isValidAnnotationValue);const d=(ne=P.metadata.tags)!=null?ne:[];for(let Re=0;Re<d.length;++Re)z(`tags.${Re}`,d[Re],this.validators.isValidTag);const v=(re=P.metadata.links)!=null?re:[];for(let Re=0;Re<v.length;++Re)z(`links.${Re}.url`,(_=v[Re])==null?void 0:_.url,CommonValidatorFunctions.isValidUrl),A(`links.${Re}.title`,(fe=v[Re])==null?void 0:fe.title,CommonValidatorFunctions.isNonEmptyString),A(`links.${Re}.icon`,(ge=v[Re])==null?void 0:ge.icon,KubernetesValidatorFunctions.isValidObjectName);return P}}class Oe{constructor(){ie(this,"validate")}async enforce(P){if(!this.validate){const d=new Ajv({allowUnionTypes:!0});this.validate=d.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(P)===!0)return P;const[A]=this.validate.errors||[];throw A?new Error(`Malformed envelope, ${A.dataPath||"<root>"} ${A.message}`):new Error("Malformed envelope, Unknown error")}}function Ae(le){let P=le.indexOf(":");const z=le.indexOf("/");z!==-1&&z<P&&(P=-1);const A=P===-1?void 0:le.slice(0,P),d=z===-1?void 0:le.slice(P+1,z),v=le.slice(Math.max(P+1,z+1));if(A===""||d===""||v==="")throw new TypeError(`Entity reference "${le}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:A,namespace:d,name:v}}const Ke=Ge;function Ge(le){return{kind:le.kind,namespace:le.metadata.namespace||n,name:le.metadata.name}}function Qe(le,P){var N,ne,re,_;if(!le)throw new Error("Entity reference must not be empty");const z=P==null?void 0:P.defaultKind,A=(P==null?void 0:P.defaultNamespace)||n;let d,v,b;if(typeof le=="string"){const fe=Ae(le);d=(N=fe.kind)!=null?N:z,v=(ne=fe.namespace)!=null?ne:A,b=fe.name}else d=(re=le.kind)!=null?re:z,v=(_=le.namespace)!=null?_:A,b=le.name;if(d)if(v){if(!b){const fe=JSON.stringify(le);throw new Error(`Entity reference ${fe} had missing or empty name`)}}else{const fe=JSON.stringify(le);throw new Error(`Entity reference ${fe} had missing or empty namespace`)}else{const fe=JSON.stringify(le);throw new Error(`Entity reference ${fe} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:d,namespace:v,name:b}}function We(le){var d,v;let P,z,A;return"metadata"in le?(P=le.kind,z=(d=le.metadata.namespace)!=null?d:n,A=le.metadata.name):(P=le.kind,z=(v=le.namespace)!=null?v:n,A=le.name),`${P.toLocaleLowerCase("en-US")}:${z.toLocaleLowerCase("en-US")}/${A.toLocaleLowerCase("en-US")}`}class je{constructor(P){this.policies=P}async enforce(P){let z=P;for(const A of this.policies){const d=await A.enforce(z);if(!d)throw new Error(`Policy ${A.constructor.name} did not return a result`);z=d}return z}}class it{constructor(P){this.policies=P}async enforce(P){for(const z of this.policies){const A=await z.enforce(P);if(A)return A}throw new Error("The entity did not match any known policy")}}const Ue={allOf(le){return new je(le)},oneOf(le){return new it(le)}};var qe=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 nt(le){const P=D(le);return{async check(z){return P(z)===z}}}const ut=nt(qe);var dt=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 ht=nt(dt);var et=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 Xe=nt(et);var vt=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 ct=nt(vt);var St=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 Ct=nt(St),yt="ownedBy",Fe="ownerOf",at="consumesApi",lt="apiConsumedBy",Et="providesApi",rt="apiProvidedBy",gt="dependsOn",k="dependencyOf",$="parentOf",ae="childOf",ue="memberOf",se="hasMember",ye="partOf",Me="hasPart";var Le=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 ze=nt(Le);var K=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 j=nt(K);var M=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 te=nt(M),me="backstage.io/managed-by-location",ve="backstage.io/managed-by-origin-location",Te="backstage.io/source-location";function xe(le){if(typeof le!="string")throw new TypeError(`Unable to parse location ref '${le}', unexpected argument ${typeof le}`);const P=le.indexOf(":");if(P<0)throw new TypeError(`Unable to parse location ref '${le}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const z=le.substring(0,P).trim(),A=le.substring(P+1).trim();if(!z||!A)throw new TypeError(`Unable to parse location ref '${le}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(z==="http"||z==="https")throw new TypeError(`Invalid location ref '${le}', please prefix it with 'url:', e.g. 'url:${le}'`);return{type:z,target:A}}function ft(le){const{type:P,target:z}=le;if(P){if(!z)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${P}:${z}`}function At(le){var z,A,d,v,b;const P=(b=(A=(z=le.metadata)==null?void 0:z.annotations)==null?void 0:A[ANNOTATION_SOURCE_LOCATION])!=null?b:(v=(d=le.metadata)==null?void 0:d.annotations)==null?void 0:v[ANNOTATION_LOCATION];if(!P)throw new Error(`Entity '${stringifyEntityRef(le)}' is missing location`);return xe(P)}},23235:function(q,s,e){"use strict";e.d(s,{C:function(){return t}});var n=e(98005);class t{constructor(){ie(this,"subject",new n.J)}post(m){this.subject.next(m)}alert$(){return this.subject}}},47150:function(q,s,e){"use strict";e.d(s,{g:function(){return n}});class n{captureEvent(c){}}},58652:function(q,s,e){"use strict";e.d(s,{C:function(){return c}});var n=e(98005);const t="theme";class c{constructor(y){ie(this,"activeThemeId");ie(this,"subject",new n.X(void 0));this.themes=y}static createWithStorage(y){var h;const i=new c(y);if(!window.localStorage)return i;const o=(h=window.localStorage.getItem(t))!=null?h:void 0;return i.setActiveThemeId(o),i.activeThemeId$().subscribe(l=>{l?window.localStorage.setItem(t,l):window.localStorage.removeItem(t)}),window.addEventListener("storage",l=>{var E;if(l.key===t){const g=(E=localStorage.getItem(t))!=null?E:void 0;i.setActiveThemeId(g)}}),i}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(y){this.activeThemeId=y,this.subject.next(y)}}},14721:function(q,s,e){"use strict";e.d(s,{m:function(){return l}});var n=e(9850),t=e.n(n),c=e(12782),m=e.n(c);const y=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function i(E){return typeof E=="object"&&E!==null&&!Array.isArray(E)}function o(E){if(E===null)return"null";if(Array.isArray(E))return"array";const g=typeof E;return g==="number"&&isNaN(E)?"nan":g==="string"&&E===""?"empty-string":g}const h={type(E,g,C,L){return`Invalid type in config for key '${E}' in '${g}', got ${C}, wanted ${L}`},missing(E){return`Missing required config value at '${E}'`},convert(E,g,C){return`Unable to convert config value for key '${E}' in '${g}' to a ${C}`}};class l{constructor(g,C="mock-config",L,Z=""){ie(this,"filteredKeys");ie(this,"notifiedFilteredKeys",new Set);this.data=g,this.context=C,this.fallback=L,this.prefix=Z}static fromConfigs(g){return g.length===0?new l(void 0):g.reduce((C,{data:L,context:Z,filteredKeys:S,deprecatedKeys:G})=>{const B=new l(L,Z,C);if(B.filteredKeys=S,G)for(const{key:T,description:x}of G)console.warn(`The configuration key '${T}' of ${Z} is deprecated and may be removed soon. ${x||""}`);return B},void 0)}has(g){var L,Z;return this.readValue(g)!==void 0?!0:(Z=(L=this.fallback)==null?void 0:L.has(g))!=null?Z:!1}keys(){var L,Z;const g=this.data?Object.keys(this.data):[],C=(Z=(L=this.fallback)==null?void 0:L.keys())!=null?Z:[];return[...new Set([...g,...C])]}get(g){const C=this.getOptional(g);if(C===void 0)throw new Error(h.missing(this.fullKey(g!=null?g:"")));return C}getOptional(g){var Z;const C=t()(this.readValue(g)),L=(Z=this.fallback)==null?void 0:Z.getOptional(g);return C===void 0?L:L===void 0?C:m()({},{value:L},{value:C},(S,G)=>!i(G)||!i(S)?G:void 0).value}getConfig(g){const C=this.getOptionalConfig(g);if(C===void 0)throw new Error(h.missing(this.fullKey(g)));return C}getOptionalConfig(g){var Z;const C=this.readValue(g),L=(Z=this.fallback)==null?void 0:Z.getOptionalConfig(g);if(i(C))return this.copy(C,g,L);if(C!==void 0)throw new TypeError(h.type(this.fullKey(g),this.context,o(C),"object"));return L}getConfigArray(g){const C=this.getOptionalConfigArray(g);if(C===void 0)throw new Error(h.missing(this.fullKey(g)));return C}getOptionalConfigArray(g){const C=this.readConfigValue(g,L=>{if(!Array.isArray(L))return{expected:"object-array"};for(const[Z,S]of L.entries())if(!i(S))return{expected:"object-array",value:S,key:`${g}[${Z}]`};return!0});if(!!C)return C.map((L,Z)=>this.copy(L,`${g}[${Z}]`))}getNumber(g){const C=this.getOptionalNumber(g);if(C===void 0)throw new Error(h.missing(this.fullKey(g)));return C}getOptionalNumber(g){const C=this.readConfigValue(g,Z=>typeof Z=="number"||typeof Z=="string"||{expected:"number"});if(typeof C=="number"||C===void 0)return C;const L=Number(C);if(!Number.isFinite(L))throw new Error(h.convert(this.fullKey(g),this.context,"number"));return L}getBoolean(g){const C=this.getOptionalBoolean(g);if(C===void 0)throw new Error(h.missing(this.fullKey(g)));return C}getOptionalBoolean(g){return this.readConfigValue(g,C=>typeof C=="boolean"||{expected:"boolean"})}getString(g){const C=this.getOptionalString(g);if(C===void 0)throw new Error(h.missing(this.fullKey(g)));return C}getOptionalString(g){return this.readConfigValue(g,C=>typeof C=="string"&&C!==""||{expected:"string"})}getStringArray(g){const C=this.getOptionalStringArray(g);if(C===void 0)throw new Error(h.missing(this.fullKey(g)));return C}getOptionalStringArray(g){return this.readConfigValue(g,C=>{if(!Array.isArray(C))return{expected:"string-array"};for(const[L,Z]of C.entries())if(typeof Z!="string"||Z==="")return{expected:"string-array",value:Z,key:`${g}[${L}]`};return!0})}fullKey(g){return`${this.prefix}${this.prefix?".":""}${g}`}copy(g,C,L){const Z=new l(g,this.context,L,this.fullKey(C));return Z.filteredKeys=this.filteredKeys,Z}readConfigValue(g,C){var S;const L=this.readValue(g);if(L===void 0)return(S=this.fallback)==null?void 0:S.readConfigValue(g,C);const Z=C(L);if(Z!==!0){const{key:G=g,value:B=L,expected:T}=Z;throw new TypeError(h.type(this.fullKey(G),this.context,o(B),T))}return L}readValue(g){const C=g?g.split("."):[];for(const Z of C)if(!y.test(Z))throw new TypeError(`Invalid config key '${g}'`);if(this.data===void 0)return;let L=this.data;for(const[Z,S]of C.entries())if(i(L))L=L[S];else if(L!==void 0){const G=this.fullKey(C.slice(0,Z).join("."));throw new TypeError(h.type(G,this.context,o(L),"object"))}return L}}},4333:function(q,s,e){"use strict";e.d(s,{p:function(){return t}});const n="Invalid discovery URL pattern,";class t{static compile(m){const y=m.split(/\{\{\s*pluginId\s*\}\}/),i=y.join("pluginId");let o;try{o=new URL(i)}catch{throw new Error(`${n} URL '${i}' is invalid`)}if(o.hash)throw new Error(`${n} URL must not have a hash`);if(o.search)throw new Error(`${n} URL must not have a query`);if(i.endsWith("/"))throw new Error(`${n} URL must not end with a slash`);return new t(y)}constructor(m){this.parts=m}async getBaseUrl(m){return this.parts.join(m)}}},89536:function(q,s,e){"use strict";e.d(s,{KN:function(){return n},gr:function(){return c},Jv:function(){return m}});class n{constructor(i,o){this.alertApi=i,this.errorApi=o}post(i,o){return(o==null?void 0:o.hidden)||this.alertApi.post({message:i.message,severity:"error"}),this.errorApi.post(i,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class c{constructor(){ie(this,"subject",new t.J)}post(i,o){this.subject.next({error:i,context:o})}error$(){return this.subject}}class m{static forward(i,o){window.addEventListener("unhandledrejection",h=>{i.post(h.reason,o)})}}},14884:function(q,s,e){"use strict";e.d(s,{b:function(){return c}});var n=e(36964);function t(m){if(m.length<3)throw new Error(`The '${m}' feature flag must have a minimum length of three characters.`);if(m.length>150)throw new Error(`The '${m}' feature flag must not exceed 150 characters.`);if(!m.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${m}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class c{constructor(){ie(this,"registeredFeatureFlags",[]);ie(this,"flags")}registerFlag(y){t(y.name),this.registeredFeatureFlags.push(y)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(y){return this.flags||(this.flags=this.load()),this.flags.get(y)===n.FeatureFlagState.Active}save(y){this.flags||(this.flags=this.load()),y.merge||this.flags.clear();for(const[o,h]of Object.entries(y.states))this.flags.set(o,h);const i=Array.from(this.flags.entries()).filter(([,o])=>o===n.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(i)))}load(){try{const y=window.localStorage.getItem("featureFlags");if(!y)return new Map;const i=JSON.parse(y);if(typeof i!="object"||i===null||Array.isArray(i))return new Map;const o=Object.entries(i).filter(([h,l])=>(t(h),l===n.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(q,s,e){"use strict";e.d(s,{I:function(){return o},j:function(){return n}});function n(h){var g;let l=h.baseImplementation||e.g.fetch;const E=[(g=h.middleware)!=null?g:[]].flat().reverse();for(const C of E)l=C.apply(l);return{fetch:l}}class t{static create(l){var L,Z;const E=c(l),g=((L=l.header)==null?void 0:L.name)||"authorization",C=((Z=l.header)==null?void 0:Z.value)||(S=>`Bearer ${S}`);return new t(l.identityApi,E,g,C)}constructor(l,E,g,C){this.identityApi=l,this.allowUrl=E,this.headerName=g,this.headerValue=C}apply(l){return async(E,g)=>{const C=new Request(E,g),{token:L}=await this.identityApi.getCredentials();return C.headers.get(this.headerName)||typeof L!="string"||!L||!this.allowUrl(C.url)?l(E,g):(C.headers.set(this.headerName,this.headerValue(L)),l(C))}}}function c(h){return h.allowUrl?h.allowUrl:h.urlPrefixAllowlist?m(h.urlPrefixAllowlist):h.config?m([h.config.getString("backend.baseUrl")]):()=>!1}function m(h){const l=h.map(E=>E.replace(/\/$/,""));return E=>l.some(g=>E===g||E.startsWith(`${g}/`))}function y(h,l){return!l||l==="/"?h:`${h.replace(/\/$/,"")}/${l.replace(/^\//,"")}`}class i{constructor(l){this.discoveryApi=l}apply(l){return async(E,g)=>{const C=new Request(E,g),L="plugin://";if(!C.url.startsWith(L))return l(E,g);const{hostname:Z,pathname:S,search:G,hash:B,username:T,password:x}=new URL(`http://${C.url.substring(L.length)}`);let D=await this.discoveryApi.getBaseUrl(Z);if(T||x){const V=new URL(D),X=`${T}${x?`:${x}`:""}@`;D=`${V.protocol}//${X}${V.host}${V.pathname}`}const U=`${y(D,S)}${G}${B}`;return l(U,C)}}}class o{static resolvePluginProtocol(l){return new i(l.discoveryApi)}static injectIdentityAuth(l){return t.create(l)}constructor(){}}},11358:function(q,s,e){"use strict";e.d(s,{Y:function(){return y}});var n=e(98005);function t(i,o){for(const h of o)if(!i.has(h))return!1;return!0}function c(i,...o){const h=new Set(i);for(const l of o)for(const E of l)h.add(E);return h}class m{constructor(){ie(this,"requests",[]);ie(this,"subject",new n.X(this.getCurrentPending()))}request(o){return new Promise((h,l)=>{this.requests.push({scopes:o,resolve:h,reject:l}),this.subject.next(this.getCurrentPending())})}resolve(o,h){this.requests=this.requests.filter(l=>t(o,l.scopes)?(l.resolve(h),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(h=>h.reject(o)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const o=this.requests.length===0?void 0:this.requests.slice(1).reduce((h,l)=>c(h,l.scopes),this.requests[0].scopes);return{scopes:o,resolve:h=>{o&&this.resolve(o,h)},reject:h=>{o&&this.reject(h)}}}}class y{constructor(){ie(this,"subject",new n.X([]));ie(this,"currentRequests",[]);ie(this,"handlerCount",0)}createAuthRequester(o){const h=new m,l=this.handlerCount;return this.handlerCount++,h.pending().subscribe({next:E=>{const g=this.currentRequests.slice(),C=this.makeAuthRequest(E,o);C?g[l]=C:delete g[l],this.currentRequests=g,this.subject.next(g.filter(Boolean))}}),E=>h.request(E)}makeAuthRequest(o,h){const{scopes:l}=o;if(!!l)return{provider:h.provider,trigger:async()=>{const E=await h.onAuthRequest(l);o.resolve(E)},reject:()=>{const E=new Error("Login failed, rejected by user");E.name="RejectedError",o.reject(E)}}}authRequest$(){return this.subject}}},56054:function(q,s,e){"use strict";e.d(s,{C:function(){return m}});var n=e(82394),t=e.n(n);const c=new Map;class m{constructor(i,o){ie(this,"subscribers",new Set);ie(this,"observable",new(t())(i=>(this.subscribers.add(i),()=>{this.subscribers.delete(i)})));this.namespace=i,this.errorApi=o}static create(i){var o;return new m((o=i.namespace)!=null?o:"",i.errorApi)}get(i){return this.snapshot(i).value}snapshot(i){let o,h="absent";try{const l=localStorage.getItem(this.getKeyName(i));l&&(o=JSON.parse(l,(E,g)=>(typeof g=="object"&&g!==null&&Object.freeze(g),g)),h="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${i}`))}return{key:i,value:o,presence:h}}forBucket(i){const o=`${this.namespace}/${i}`;return c.has(o)||c.set(o,new m(o,this.errorApi)),c.get(o)}async set(i,o){localStorage.setItem(this.getKeyName(i),JSON.stringify(o)),this.notifyChanges(i)}async remove(i){localStorage.removeItem(this.getKeyName(i)),this.notifyChanges(i)}observe$(i){return this.observable.filter(({key:o})=>o===i)}getKeyName(i){return`${this.namespace}/${encodeURIComponent(i)}`}notifyChanges(i){const o=this.snapshot(i);for(const h of this.subscribers)h.next(o)}}},59589:function(q,s,e){"use strict";e.d(s,{u:function(){return c}});var n=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(y){const{discoveryApi:i,environment:o="development",provider:h=t,oauthRequestApi:l}=y;return n.OAuth2.create({discoveryApi:i,oauthRequestApi:l,provider:h,environment:o})}}},6098:function(q,s,e){"use strict";e.d(s,{Z:function(){return c}});var n=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(y){const{discoveryApi:i,environment:o="development",provider:h=t,oauthRequestApi:l,defaultScopes:E=["team"]}=y;return n.OAuth2.create({discoveryApi:i,oauthRequestApi:l,provider:h,environment:o,defaultScopes:E})}}},44431:function(q,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return c.Z}});var n=e(19347),t=e.n(n);e.o(n,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return n.AlertApiForwarder}}),e.o(n,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return n.AppThemeSelector}}),e.o(n,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return n.AtlassianAuth}}),e.o(n,"ConfigReader")&&e.d(s,{ConfigReader:function(){return n.ConfigReader}}),e.o(n,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return n.ErrorAlerter}}),e.o(n,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return n.ErrorApiForwarder}}),e.o(n,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return n.FetchMiddlewares}}),e.o(n,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return n.FlatRoutes}}),e.o(n,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return n.LocalStorageFeatureFlags}}),e.o(n,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return n.NoOpAnalyticsApi}}),e.o(n,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return n.OAuthRequestManager}}),e.o(n,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return n.UnhandledErrorForwarder}}),e.o(n,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return n.UrlPatternDiscovery}}),e.o(n,"WebStorage")&&e.d(s,{WebStorage:function(){return n.WebStorage}}),e.o(n,"createFetchApi")&&e.d(s,{createFetchApi:function(){return n.createFetchApi}}),e.o(n,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return n.createSpecializedApp}}),e.o(n,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return n.defaultConfigLoader}});var c=e(6098)},19347:function(){},44474:function(q,s,e){"use strict";e.d(s,{T:function(){return c}});var n=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(y){const{discoveryApi:i,environment:o="development",provider:h=t,oauthRequestApi:l,defaultScopes:E=["read:user"]}=y;return n.OAuth2.create({discoveryApi:i,oauthRequestApi:l,provider:h,environment:o,defaultScopes:E})}}},2922:function(q,s,e){"use strict";e.d(s,{a:function(){return c}});var n=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(y){const{discoveryApi:i,environment:o="development",provider:h=t,oauthRequestApi:l,defaultScopes:E=["read_user"]}=y;return n.OAuth2.create({discoveryApi:i,oauthRequestApi:l,provider:h,environment:o,defaultScopes:E})}}},59938:function(q,s,e){"use strict";e.d(s,{e:function(){return m}});var n=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class m{static create(i){const{discoveryApi:o,oauthRequestApi:h,environment:l="development",provider:E=t,defaultScopes:g=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=i;return n.OAuth2.create({discoveryApi:o,oauthRequestApi:h,provider:E,environment:l,defaultScopes:g,scopeTransform(C){return C.map(L=>L==="openid"?L:L==="profile"||L==="email"?`${c}userinfo.${L}`:L.startsWith(c)?L:`${c}${L}`)}})}}},91668:function(q,s,e){"use strict";e.d(s,{GithubAuth:function(){return n.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},OktaAuth:function(){return y.s},MicrosoftAuth:function(){return o._},OneLoginAuth:function(){return h.$},BitbucketAuth:function(){return l.BitbucketAuth},AtlassianAuth:function(){return E.u}});var n=e(44474),t=e(2922),c=e(59938),m=e(91205);e.o(m,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return m.AlertApiForwarder}}),e.o(m,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return m.AppThemeSelector}}),e.o(m,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return m.AtlassianAuth}}),e.o(m,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return m.BitbucketAuth}}),e.o(m,"ConfigReader")&&e.d(s,{ConfigReader:function(){return m.ConfigReader}}),e.o(m,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return m.ErrorAlerter}}),e.o(m,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return m.ErrorApiForwarder}}),e.o(m,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return m.FetchMiddlewares}}),e.o(m,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return m.FlatRoutes}}),e.o(m,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),e.o(m,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return m.MicrosoftAuth}}),e.o(m,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return m.NoOpAnalyticsApi}}),e.o(m,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return m.OAuthRequestManager}}),e.o(m,"OktaAuth")&&e.d(s,{OktaAuth:function(){return m.OktaAuth}}),e.o(m,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return m.OneLoginAuth}}),e.o(m,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return m.UnhandledErrorForwarder}}),e.o(m,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return m.UrlPatternDiscovery}}),e.o(m,"WebStorage")&&e.d(s,{WebStorage:function(){return m.WebStorage}}),e.o(m,"createFetchApi")&&e.d(s,{createFetchApi:function(){return m.createFetchApi}}),e.o(m,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return m.createSpecializedApp}}),e.o(m,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return m.defaultConfigLoader}});var y=e(26079),i=e(67604),o=e(38482),h=e(58381),l=e(44431);e.o(l,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return l.AlertApiForwarder}}),e.o(l,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return l.AppThemeSelector}}),e.o(l,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return l.AtlassianAuth}}),e.o(l,"ConfigReader")&&e.d(s,{ConfigReader:function(){return l.ConfigReader}}),e.o(l,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return l.ErrorAlerter}}),e.o(l,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return l.ErrorApiForwarder}}),e.o(l,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return l.FetchMiddlewares}}),e.o(l,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return l.FlatRoutes}}),e.o(l,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return l.LocalStorageFeatureFlags}}),e.o(l,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return l.NoOpAnalyticsApi}}),e.o(l,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return l.OAuthRequestManager}}),e.o(l,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return l.UnhandledErrorForwarder}}),e.o(l,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return l.UrlPatternDiscovery}}),e.o(l,"WebStorage")&&e.d(s,{WebStorage:function(){return l.WebStorage}}),e.o(l,"createFetchApi")&&e.d(s,{createFetchApi:function(){return l.createFetchApi}}),e.o(l,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return l.createSpecializedApp}}),e.o(l,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return l.defaultConfigLoader}});var E=e(59589)},38482:function(q,s,e){"use strict";e.d(s,{_:function(){return c}});var n=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(y){const{environment:i="development",provider:o=t,oauthRequestApi:h,discoveryApi:l,defaultScopes:E=["openid","offline_access","profile","email","User.Read"]}=y;return n.OAuth2.create({discoveryApi:l,oauthRequestApi:h,provider:o,environment:i,defaultScopes:E})}}},73124:function(q,s,e){"use strict";e.d(s,{Z:function(){return i}});function n(o){return new Promise((h,l)=>{const E=o.width||500,g=o.height||700,C=window.screen.width/2-E/2,L=window.screen.height/2-g/2,Z=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${E},height=${g},top=${L},left=${C}`);let S="";if(!Z||typeof Z.closed=="undefined"||Z.closed){const x=new Error("Failed to open auth popup.");x.name="PopupRejectedError",l(x);return}const G=x=>{if(x.source!==Z||x.origin!==o.origin)return;const{data:D}=x;if(D.type==="config_info"){S=D.targetOrigin;return}if(D.type!=="authorization_response")return;const U=D;if("error"in U){const V=new Error(U.error.message);V.name=U.error.name,l(V)}else h(U.response);T()},B=setInterval(()=>{if(Z.closed){const x=`Login failed, ${S&&S!==window.location.origin?`Incorrect app origin, expected ${S}`:"popup was closed"}`,D=new Error(x);D.name="PopupClosedError",l(D),T()}},100);function T(){window.removeEventListener("message",G),clearInterval(B)}window.addEventListener("message",G)})}function t(o){return[...o].join(" ")}class c{constructor(h){ie(this,"discoveryApi");ie(this,"environment");ie(this,"provider");ie(this,"joinScopesFunc");ie(this,"authRequester");ie(this,"sessionTransform");const{discoveryApi:l,environment:E,provider:g,joinScopes:C=t,oauthRequestApi:L,sessionTransform:Z=S=>S}=h;this.authRequester=L.createAuthRequester({provider:g,onAuthRequest:S=>this.showPopup(S)}),this.discoveryApi=l,this.environment=E,this.provider=g,this.joinScopesFunc=C,this.sessionTransform=Z}async createSession(h){return h.instantPopup?this.showPopup(h.scopes):this.authRequester(h.scopes)}async refreshSession(){const h=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(E=>{throw new Error(`Auth refresh request failed, ${E}`)});if(!h.ok){const E=new Error(`Auth refresh request failed, ${h.statusText}`);throw E.status=h.status,E}const l=await h.json();if(l.error){const E=new Error(l.error.message);throw l.error.name&&(E.name=l.error.name),E}return await this.sessionTransform(l)}async removeSession(){const h=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(l=>{throw new Error(`Logout request failed, ${l}`)});if(!h.ok){const l=new Error(`Logout request failed, ${h.statusText}`);throw l.status=h.status,l}}async showPopup(h){const l=this.joinScopesFunc(h),E=await this.buildUrl("/start",{scope:l,origin:location.origin}),g=await n({url:E,name:`${this.provider.title} Login`,origin:new URL(E).origin,width:450,height:730});return await this.sessionTransform(g)}async buildUrl(h,l){const E=await this.discoveryApi.getBaseUrl("auth"),g=this.buildQueryString({...l,env:this.environment});return`${E}/${this.provider.id}${h}${g}`}buildQueryString(h){if(!h)return"";const l=Object.entries(h).map(([E,g])=>{if(typeof g=="string")return`${encodeURIComponent(E)}=${encodeURIComponent(g)}`;if(g)return encodeURIComponent(E)}).filter(Boolean).join("&");return l?`?${l}`:""}}var m=e(57018);const y={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class i{constructor(h){ie(this,"sessionManager");ie(this,"scopeTransform");this.sessionManager=h.sessionManager,this.scopeTransform=h.scopeTransform}static create(h){const{discoveryApi:l,environment:E="development",provider:g=y,oauthRequestApi:C,defaultScopes:L=[],scopeTransform:Z=B=>B}=h,S=new c({discoveryApi:l,environment:E,provider:g,oauthRequestApi:C,sessionTransform(B){return{...B,providerInfo:{idToken:B.providerInfo.idToken,accessToken:B.providerInfo.accessToken,scopes:i.normalizeScopes(Z,B.providerInfo.scope),expiresAt:new Date(Date.now()+B.providerInfo.expiresInSeconds*1e3)}}}}),G=new m.RefreshingAuthSessionManager({connector:S,defaultScopes:new Set(L),sessionScopes:B=>B.providerInfo.scopes,sessionShouldRefresh:B=>(B.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new i({sessionManager:G,scopeTransform:Z})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(h,l){var C;const E=i.normalizeScopes(this.scopeTransform,h),g=await this.sessionManager.getSession({...l,scopes:E});return(C=g==null?void 0:g.providerInfo.accessToken)!=null?C:""}async getIdToken(h={}){var E;const l=await this.sessionManager.getSession(h);return(E=l==null?void 0:l.providerInfo.idToken)!=null?E:""}async getBackstageIdentity(h={}){const l=await this.sessionManager.getSession(h);return l==null?void 0:l.backstageIdentity}async getProfile(h={}){const l=await this.sessionManager.getSession(h);return l==null?void 0:l.profile}static normalizeScopes(h,l){if(!l)return new Set;const E=Array.isArray(l)?l:l.split(/[\s|,]/).filter(Boolean);return new Set(h(E))}}},91205:function(q,s,e){"use strict";e.d(s,{OAuth2:function(){return n.Z}});var n=e(73124),t=e(5973),c=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(q,s,e){"use strict";e.d(s,{s:function(){return y}});var n=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),m="okta.";class y{static create(o){const{discoveryApi:h,environment:l="development",provider:E=t,oauthRequestApi:g,defaultScopes:C=["openid","email","profile","offline_access"]}=o;return n.OAuth2.create({discoveryApi:h,oauthRequestApi:g,provider:E,environment:l,defaultScopes:C,scopeTransform(L){return L.map(Z=>c.has(Z)||Z.startsWith(m)?Z:`${m}${Z}`)}})}}},58381:function(q,s,e){"use strict";e.d(s,{$:function(){return y}});var n=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),m="onelogin.";class y{static create(o){const{discoveryApi:h,environment:l="development",provider:E=t,oauthRequestApi:g}=o;return n.OAuth2.create({discoveryApi:h,oauthRequestApi:g,provider:E,environment:l,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(C){return C.map(L=>c.has(L)||L.startsWith(m)?L:`${m}${L}`)}})}}},67604:function(q,s,e){"use strict";var n=e(57018),t=e(30195);const c=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({id:t.z.string(),token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),m={id:"saml",title:"SAML",icon:()=>null};class y{static create(o){const{discoveryApi:h,environment:l="development",provider:E=m}=o,g=new DirectAuthConnector({discoveryApi:h,environment:l,provider:E}),C=new StaticAuthSessionManager({connector:g}),L=new AuthSessionStore({manager:C,storageKey:`${E.id}Session`,schema:samlSessionSchema});return new y(L)}sessionState$(){return this.sessionManager.sessionState$()}constructor(o){this.sessionManager=o}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(o={}){const h=await this.sessionManager.getSession(o);return h==null?void 0:h.backstageIdentity}async getProfile(o={}){const h=await this.sessionManager.getSession(o);return h==null?void 0:h.profile}}},91631:function(q,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return n.AtlassianAuth},GithubAuth:function(){return n.GithubAuth},GitlabAuth:function(){return n.GitlabAuth},GoogleAuth:function(){return n.GoogleAuth},MicrosoftAuth:function(){return n.MicrosoftAuth},OktaAuth:function(){return n.OktaAuth},OneLoginAuth:function(){return n.OneLoginAuth},AlertApiForwarder:function(){return t.C},NoOpAnalyticsApi:function(){return c.g},AppThemeSelector:function(){return m.C},ConfigReader:function(){return y.m},UrlPatternDiscovery:function(){return i.p},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},UnhandledErrorForwarder:function(){return o.Jv},LocalStorageFeatureFlags:function(){return h.b},FetchMiddlewares:function(){return l.I},createFetchApi:function(){return l.j},OAuthRequestManager:function(){return E.Y},WebStorage:function(){return g.C}});var n=e(91668);e.o(n,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return n.AlertApiForwarder}}),e.o(n,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return n.AppThemeSelector}}),e.o(n,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return n.BitbucketAuth}}),e.o(n,"ConfigReader")&&e.d(s,{ConfigReader:function(){return n.ConfigReader}}),e.o(n,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return n.ErrorAlerter}}),e.o(n,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return n.ErrorApiForwarder}}),e.o(n,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return n.FetchMiddlewares}}),e.o(n,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return n.FlatRoutes}}),e.o(n,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return n.LocalStorageFeatureFlags}}),e.o(n,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return n.NoOpAnalyticsApi}}),e.o(n,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return n.OAuthRequestManager}}),e.o(n,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return n.UnhandledErrorForwarder}}),e.o(n,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return n.UrlPatternDiscovery}}),e.o(n,"WebStorage")&&e.d(s,{WebStorage:function(){return n.WebStorage}}),e.o(n,"createFetchApi")&&e.d(s,{createFetchApi:function(){return n.createFetchApi}}),e.o(n,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return n.createSpecializedApp}}),e.o(n,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return n.defaultConfigLoader}});var t=e(23235),c=e(47150),m=e(58652),y=e(14721),i=e(4333),o=e(89536),h=e(14884),l=e(50160),E=e(11358),g=e(56054)},56494:function(q,s,e){"use strict";e.d(s,{ApiProvider:function(){return n.ApiProvider},AlertApiForwarder:function(){return t.AlertApiForwarder},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var n=e(76105);e.o(n,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return n.AlertApiForwarder}}),e.o(n,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return n.AppThemeSelector}}),e.o(n,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return n.AtlassianAuth}}),e.o(n,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return n.BitbucketAuth}}),e.o(n,"ConfigReader")&&e.d(s,{ConfigReader:function(){return n.ConfigReader}}),e.o(n,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return n.ErrorAlerter}}),e.o(n,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return n.ErrorApiForwarder}}),e.o(n,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return n.FetchMiddlewares}}),e.o(n,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return n.FlatRoutes}}),e.o(n,"GithubAuth")&&e.d(s,{GithubAuth:function(){return n.GithubAuth}}),e.o(n,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return n.GitlabAuth}}),e.o(n,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return n.GoogleAuth}}),e.o(n,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return n.LocalStorageFeatureFlags}}),e.o(n,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return n.MicrosoftAuth}}),e.o(n,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return n.NoOpAnalyticsApi}}),e.o(n,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return n.OAuthRequestManager}}),e.o(n,"OktaAuth")&&e.d(s,{OktaAuth:function(){return n.OktaAuth}}),e.o(n,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return n.OneLoginAuth}}),e.o(n,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return n.UnhandledErrorForwarder}}),e.o(n,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return n.UrlPatternDiscovery}}),e.o(n,"WebStorage")&&e.d(s,{WebStorage:function(){return n.WebStorage}}),e.o(n,"createFetchApi")&&e.d(s,{createFetchApi:function(){return n.createFetchApi}}),e.o(n,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return n.createSpecializedApp}}),e.o(n,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return n.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(q,s,e){"use strict";e.d(s,{p:function(){return t}});var n;(function(c){c[c.default=10]="default";const m=50;c[c.app=m]="app",c[c.static=100]="static"})(n||(n={}));class t{constructor(){ie(this,"factories",new Map)}register(m,y){const i=n[m],o=this.factories.get(y.api.id);return o&&o.priority>=i?!1:(this.factories.set(y.api.id,{priority:i,factory:y}),!0)}get(m){const y=this.factories.get(m.id);if(!!y)return y.factory}getAllApis(){const m=new Set;for(const{factory:y}of this.factories.values())m.add(y.api);return m}}},14406:function(q,s,e){"use strict";e.d(s,{g:function(){return o}});var n=e(2784),t=e(13980),c=e.n(t);class m{constructor(...l){ie(this,"holders");this.holders=l}get(l){for(const E of this.holders){const g=E.get(l);if(g)return g}}}var y=e(76241);const i=(0,y.CT)("api-context"),o=h=>{var L;const{apis:l,children:E}=h,g=(L=(0,n.useContext)(i))==null?void 0:L.atVersion(1),C=g?new m(l,g):l;return n.createElement(i.Provider,{value:(0,y.EI)({1:C}),children:E})};o.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(q,s,e){"use strict";e.d(s,{M:function(){return n}});class n{constructor(c){ie(this,"apis",new Map);this.factories=c}static validateFactories(c,m){for(const y of m){const i=[y],o=new Set;for(;i.length;){const h=i.shift(),l=c.get(h);if(!!l)for(const E of Object.values(l.deps)){if(E.id===y.id)throw new Error(`Circular dependency of api factory for ${y}`);o.has(E)||(o.add(E),i.push(E))}}}}get(c){return this.load(c)}load(c,m=[]){const y=this.apis.get(c.id);if(y)return y;const i=this.factories.get(c);if(!i)return;if(m.includes(i.api))throw new Error(`Circular dependency of api factory for ${i.api}`);const o=this.loadDeps(c,i.deps,[...m,i.api]),h=i.factory(o);return this.apis.set(c.id,h),h}loadDeps(c,m,y){const i={};for(const o in m)if(m.hasOwnProperty(o)){const h=m[o],l=this.load(h,y);if(!l)throw new Error(`No API factory available for dependency ${h} of dependent ${c}`);i[o]=l}return i}}},76105:function(q,s,e){"use strict";e.d(s,{ApiProvider:function(){return n.g},ApiResolver:function(){return t.M},ApiFactoryRegistry:function(){return c.p}});var n=e(14406),t=e(12132),c=e(80396),m=e(82488),y=e.n(m);e.o(m,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return m.AlertApiForwarder}}),e.o(m,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return m.AppThemeSelector}}),e.o(m,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return m.AtlassianAuth}}),e.o(m,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return m.BitbucketAuth}}),e.o(m,"ConfigReader")&&e.d(s,{ConfigReader:function(){return m.ConfigReader}}),e.o(m,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return m.ErrorAlerter}}),e.o(m,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return m.ErrorApiForwarder}}),e.o(m,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return m.FetchMiddlewares}}),e.o(m,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return m.FlatRoutes}}),e.o(m,"GithubAuth")&&e.d(s,{GithubAuth:function(){return m.GithubAuth}}),e.o(m,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return m.GitlabAuth}}),e.o(m,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return m.GoogleAuth}}),e.o(m,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),e.o(m,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return m.MicrosoftAuth}}),e.o(m,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return m.NoOpAnalyticsApi}}),e.o(m,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return m.OAuthRequestManager}}),e.o(m,"OktaAuth")&&e.d(s,{OktaAuth:function(){return m.OktaAuth}}),e.o(m,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return m.OneLoginAuth}}),e.o(m,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return m.UnhandledErrorForwarder}}),e.o(m,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return m.UrlPatternDiscovery}}),e.o(m,"WebStorage")&&e.d(s,{WebStorage:function(){return m.WebStorage}}),e.o(m,"createFetchApi")&&e.d(s,{createFetchApi:function(){return m.createFetchApi}}),e.o(m,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return m.createSpecializedApp}}),e.o(m,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return m.defaultConfigLoader}})},82488:function(){},82370:function(q,s,e){"use strict";e.d(s,{b:function(){return gt}});var n=e(2784),t=e(10289),c=e(64279),m=e(56494),y=e(36964),i=e(76105);function o(k){const $={};for(const ue in k.collectors)k.collectors.hasOwnProperty(ue)&&($[ue]=k.collectors[ue]());const ae=[{node:n.Children.toArray(k.root),parent:void 0,contexts:{}}];for(;ae.length!==0;){const{node:ue,parent:se,contexts:ye}=ae.shift();n.Children.forEach(ue,Me=>{if(!(0,n.isValidElement)(Me))return;const Le={};for(const ze in $)if($.hasOwnProperty(ze)){const K=$[ze];Le[ze]=K.visit(K.accumulator,Me,se,ye[ze])}for(const ze of k.discoverers){const K=ze(Me);K&&ae.push({node:K,parent:Me,contexts:Le})}})}return Object.fromEntries(Object.entries($).map(([ue,se])=>[ue,se.accumulator]))}function h(k,$){return()=>({accumulator:k(),visit:$})}function l(k){var $;return($=k.props)==null?void 0:$.children}function E(k){var $,ae,ue;if((($=k.props)==null?void 0:$.path)&&((ae=k.props)==null?void 0:ae.element))return(ue=k.props)==null?void 0:ue.element}const g=h(()=>new Set,(k,$)=>{const ae=(0,y.getComponentData)($,"core.plugin");ae&&k.add(ae)});var C=e(88934);function L(k){var ue;const $=(ue=k.props)==null?void 0:ue.element;let ae=(0,y.getComponentData)(k,"core.mountPoint");return!ae&&(0,n.isValidElement)($)&&(ae=(0,y.getComponentData)($,"core.mountPoint")),ae}const Z=h(()=>new Map,(k,$,ae,ue)=>{var Me,Le;let se=ue;if((ae==null?void 0:ae.props.element)===$)return se;if((0,y.getComponentData)($,"core.gatherMountPoints")){const ze=(Me=$.props)==null?void 0:Me.path;if(!ze)throw new Error("Mount point gatherer must have a path");se=ze}const ye=L($);if(ye){let ze=(Le=$.props)==null?void 0:Le.path;if(se&&(ze?se=void 0:ze=se),!ze)throw new Error("Mounted routable extension must have a path");k.set(ye,ze)}return se}),S=h(()=>new Map,(k,$,ae,ue)=>{var Me;if((ae==null?void 0:ae.props.element)===$)return ue;let se=ue;const ye=L($);return ye&&(ue&&"sticky"in ue?(k.set(ye,ue.sticky),((Me=$.props)==null?void 0:Me.path)?se=ye:se=ue):(k.set(ye,ue),se=ye)),(0,y.getComponentData)($,"core.gatherMountPoints")?{sticky:se}:se}),G={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},B=h(()=>Array(),(k,$,ae,ue)=>{var K,j,M;const se=(K=ue==null?void 0:ue.children)!=null?K:k;if((ae==null?void 0:ae.props.element)===$)return ue;const ye=(j=$.props)==null?void 0:j.path,Me=Boolean((M=$.props)==null?void 0:M.caseSensitive),Le=L($);if(Le){if(ye){const te={caseSensitive:Me,path:ye,element:"mounted",routeRefs:new Set([Le]),children:[G],plugin:(0,y.getComponentData)($.props.element,"core.plugin")};return se.push(te),te}ue==null||ue.routeRefs.add(Le)}if((0,y.getComponentData)($,"core.gatherMountPoints")){if(!ye)throw new Error("Mount point gatherer must have a path");const te={caseSensitive:Me,path:ye,element:"gathered",routeRefs:new Set,children:[G],plugin:ue==null?void 0:ue.plugin};return se.push(te),te}return ue}),T=h(()=>new Set,(k,$)=>{if($.type===C.L){const ae=$.props;k.add("with"in ae?ae.with:ae.without)}});var x=e(76241);const D=(0,x.uW)("route-ref-type",()=>Symbol("route-ref-type"));function U(k){return k[D]==="absolute"}function V(k){return k[D]==="sub"}function X(k){return k[D]==="external"}function Ee(...k){const $=k.join("/").replace(/\/\/+/g,"/");return $!=="/"&&$.endsWith("/")?$.slice(0,-1):$}function Se(k,$,ae){let ue,se="";if(U(k))ue=k;else if(V(k))ue=k.parent,se=k.path;else if(X(k)){const Le=ae.get(k);if(!Le)return[void 0,""];if(U(Le))ue=Le;else if(V(Le))ue=Le.parent,se=Le.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Le}`)}else throw k[D]?new Error(`Unknown or invalid route ref type, ${k[D]}`):new Error(`Unknown object passed to useRouteRef, got ${k}`);if(!ue)return[void 0,""];const ye=$.get(ue);if(!ye)return[void 0,""];const Me=Ee(ye,se);return[ue,Me]}function Oe(k,$,ae,ue,se){var j;const ye=(j=(0,t.fp)(se,$))!=null?j:[],Me=Array();let Le=-1;for(let M=k;M&&(Le=ye.findIndex(te=>te.route.routeRefs.has(M)),Le===-1);M=ue.get(M))Me.unshift(M);Me.length===0&&(Le-=1);const ze=Le===-1?"":ye[Le].pathname,K=Ee(...Me.slice(0,-1).map(M=>{const te=ae.get(M);if(!te)throw new Error(`No path for ${M}`);if(te.includes(":"))throw new Error(`Cannot route to ${k} with parent ${M} as it has parameters`);return te}));return ze+K}class Ae{constructor($,ae,ue,se,ye){this.routePaths=$,this.routeParents=ae,this.routeObjects=ue,this.routeBindings=se,this.appBasePath=ye}resolve($,ae){const[ue,se]=Se($,this.routePaths,this.routeBindings);if(!ue)return;let ye;typeof ae=="string"?ye=this.trimPath(ae):ae.pathname?ye={...ae,pathname:this.trimPath(ae.pathname)}:ye=ae;const Me=this.appBasePath+Oe(ue,ye,this.routePaths,this.routeParents,this.routeObjects);return(...[ze])=>Me+(0,t.Gn)(se,ze)}trimPath($){return $&&($.startsWith(this.appBasePath)?$.slice(this.appBasePath.length):$)}}const Ke=(0,x.CT)("routing-context"),Ge=({routePaths:k,routeParents:$,routeObjects:ae,routeBindings:ue,basePath:se="",children:ye})=>{const Me=new Ae(k,$,ae,ue,se),Le=(0,x.EI)({1:Me});return n.createElement(Ke.Provider,{value:Le},ye)},Qe=(k,$)=>{var ae,ue;try{const se=(0,t.fp)($,{pathname:k}),ye=(ae=se==null?void 0:se.filter(Le=>{var ze;return((ze=Le==null?void 0:Le.route.routeRefs)==null?void 0:ze.size)>0}).pop())==null?void 0:ae.route;if(!ye)return{};let Me;return ye.routeRefs.size===1&&(Me=ye.routeRefs.values().next().value),{extension:"App",pluginId:((ue=ye.plugin)==null?void 0:ue.getId())||"root",...Me?{routeRef:Me.id}:{}}}catch{return{}}},We=({pathname:k,search:$,hash:ae})=>{const ue=(0,y.useAnalytics)();return(0,n.useEffect)(()=>{ue.captureEvent("navigate",`${k}${$}${ae}`)},[ue,k,$,ae]),null},je=({tree:k})=>{const{pathname:$,search:ae,hash:ue}=(0,t.TH)(),{routeObjects:se}=(0,n.useMemo)(()=>o({root:k,discoverers:[l,E],collectors:{routeObjects:B}}),[k]);return n.createElement(y.AnalyticsContext,{attributes:Qe($,se)},n.createElement(We,{pathname:$,search:ae,hash:ue}))};function it(k,$){const ae=new Set($.values());ae.delete(void 0);for(const ue of $.keys()){if(ae.has(ue))continue;let se=ue,ye="";for(;se;){const Le=k.get(se);if(!Le)throw new Error(`No path for ${se}`);ye=`${Le}${ye}`,se=$.get(se)}const Me=ye.match(/:(\w+)/g);if(Me){for(let Le=0;Le<Me.length;Le++)for(let ze=Le+1;ze<Me.length;ze++)if(Me[ze]===Me[Le])throw new Error(`Parameter ${Me[ze]} is duplicated in path ${ye}`)}}}function Ue(k,$){for(const ae of $)if(!!ae.externalRoutes){for(const[ue,se]of Object.entries(ae.externalRoutes))if(!se.optional&&!k.has(se))throw new Error(`External route '${ue}' of the '${ae.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const qe=(0,x.CT)("app-context"),nt=({appContext:k,children:$})=>{const ae=(0,x.EI)({1:k});return n.createElement(qe.Provider,{value:ae,children:$})};function ut(k){return new Error(`Tried to access IdentityApi ${k} before app was loaded`)}function dt(k){console.warn(`WARNING: Call to ${k} is deprecated and will break in the future`)}class ht{constructor(){ie(this,"target");ie(this,"waitForTarget");ie(this,"resolveTarget",()=>{});this.waitForTarget=new Promise($=>{this.resolveTarget=$})}setTarget($){this.target=$,this.resolveTarget($)}getUserId(){if(!this.target)throw ut("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return dt("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw ut("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return dt("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then($=>$.getProfileInfo())}async getBackstageIdentity(){const $=await this.waitForTarget.then(ae=>ae.getBackstageIdentity());return $.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${$.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),$}async getCredentials(){return this.waitForTarget.then($=>$.getCredentials())}async getIdToken(){return this.waitForTarget.then($=>{if(!$.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return dt("getIdToken"),$.getIdToken()})}async signOut(){await this.waitForTarget.then($=>$.signOut()),location.reload()}}var et=e(72164);function Xe(k,$,ae){if(k!==void 0){const se=ae.find(ye=>ye.id===k);if(se)return se}if($){const se=ae.find(ye=>ye.variant==="dark");if(se)return se}const ue=ae.find(se=>se.variant==="light");return ue||ae[0]}const vt=()=>{const k=(0,n.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[$,ae]=(0,n.useState)(k.matches);return(0,n.useEffect)(()=>{const ue=se=>{ae(se.matches)};return k.addListener(ue),()=>{k.removeListener(ue)}},[k]),$};function ct({children:k}){const $=(0,y.useApi)(y.appThemeApiRef),ae=(0,et.Z)($.activeThemeId$(),$.getActiveThemeId()),ue=Boolean(window.matchMedia)?vt():!1,se=Xe(ae,ue,$.getInstalledThemes());if(!se)throw new Error("App has no themes");return n.createElement(se.Provider,{children:k})}var St=e(46611);class Ct{constructor(){ie(this,"apis",[])}add($,ae){return this.apis.push([$.id,ae]),ae}build(){return new yt(new Map(this.apis))}}class yt{static builder(){return new Ct}static from($){return new yt(new Map($.map(([ae,ue])=>[ae.id,ue])))}static with($,ae){return new yt(new Map([[$.id,ae]]))}constructor($){this.apis=$}with($,ae){return new yt(new Map([...this.apis,[$.id,ae]]))}get($){return this.apis.get($.id)}}function Fe(k){const $=new Map;return k&&k({bind:(ue,se)=>{for(const[ye,Me]of Object.entries(se)){const Le=ue[ye];if(!Le)throw new Error(`Key ${ye} is not an existing external route`);if(!Me&&!Le.optional)throw new Error(`External route ${ye} is required but was undefined`);Me&&$.set(Le,Me)}}}),$}function at(k){var ae;let{pathname:$}=new URL((ae=k.getOptionalString("app.baseUrl"))!=null?ae:"/","http://dummy.dev");return $=$.replace(/\/*$/,""),$}function lt(k,$,ae){var ze;const ue=Boolean(k),se=(0,c.default)(k||(()=>Promise.resolve([])));let ye;if(ue&&se.loading){const{Progress:K}=$;ye=n.createElement(K,null)}else if(se.error){const{BootErrorPage:K}=$;ye=n.createElement(K,{step:"load-config",error:se.error})}const{ThemeProvider:Me=ct}=$;return ye?{node:n.createElement(m.ApiProvider,{apis:yt.with(y.appThemeApiRef,ae)},n.createElement(Me,null,ye))}:{api:m.ConfigReader.fromConfigs((ze=se.value)!=null?ze:[])}}class Et{constructor($){this.app=$}getPlugins(){return this.app.getPlugins()}getSystemIcon($){return this.app.getSystemIcon($)}getComponents(){return this.app.getComponents()}}class rt{constructor($){ie(this,"apiHolder");ie(this,"configApi");ie(this,"apis");ie(this,"icons");ie(this,"plugins");ie(this,"components");ie(this,"themes");ie(this,"configLoader");ie(this,"defaultApis");ie(this,"bindRoutes");ie(this,"appIdentityProxy",new ht);ie(this,"apiFactoryRegistry");var ae,ue,se,ye;this.apis=(ae=$.apis)!=null?ae:[],this.icons=$.icons,this.plugins=new Set((ue=$.plugins)!=null?ue:[]),this.components=$.components,this.themes=$.themes,this.configLoader=(se=$.configLoader)!=null?se:St.t,this.defaultApis=(ye=$.defaultApis)!=null?ye:[],this.bindRoutes=$.bindRoutes,this.apiFactoryRegistry=new i.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon($){return this.icons[$]}getComponents(){return this.components}getProvider(){const $=new Et(this);let ae=!1;return({children:se})=>{const ye=(0,n.useMemo)(()=>m.AppThemeSelector.createWithStorage(this.themes),[]),{routePaths:Me,routeParents:Le,routeObjects:ze,featureFlags:K,routeBindings:j}=(0,n.useMemo)(()=>{const ve=o({root:se,discoverers:[l,E],collectors:{routePaths:Z,routeParents:S,routeObjects:B,collectedPlugins:g,featureFlags:T}});return ve.collectedPlugins.forEach(Te=>this.plugins.add(Te)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...ve,routeBindings:Fe(this.bindRoutes)}},[se]);ae||(ae=!0,it(Me,Le),Ue(j,this.plugins));const M=lt(this.configLoader,this.components,ye),te="api"in M;if(te){const{api:ve}=M;this.configApi=ve}if((0,n.useEffect)(()=>{if(te){const ve=this.getApiHolder().get(y.featureFlagsApiRef);for(const Te of this.plugins.values())if("getFeatureFlags"in Te)for(const xe of Te.getFeatureFlags())ve.registerFlag({name:xe.name,pluginId:Te.getId()});else for(const xe of Te.output())xe.type==="feature-flag"&&ve.registerFlag({name:xe.name,pluginId:Te.getId()});for(const Te of K)ve.registerFlag({name:Te,pluginId:""})}},[te,M,K]),"node"in M)return M.node;const{ThemeProvider:me=ct}=this.components;return n.createElement(m.ApiProvider,{apis:this.getApiHolder()},n.createElement(nt,{appContext:$},n.createElement(me,null,n.createElement(Ge,{routePaths:Me,routeParents:Le,routeObjects:ze,routeBindings:j,basePath:at(M.api)},se))))}}getRouter(){const{Router:$,SignInPage:ae}=this.components,ue=({component:ye,children:Me})=>{const[Le,ze]=(0,n.useState)();return Le?(this.appIdentityProxy.setTarget(Le),Me):n.createElement(ye,{onSignInSuccess:ze})};return({children:ye})=>{const Me=(0,y.useApi)(y.configApiRef),Le=`${at(Me)}/*`;return ae?n.createElement($,null,n.createElement(je,{tree:ye}),n.createElement(ue,{component:ae},n.createElement(t.Z5,null,n.createElement(t.AW,{path:Le,element:n.createElement(n.Fragment,null,ye)})))):(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()=>{}}),n.createElement($,null,n.createElement(je,{tree:ye}),n.createElement(t.Z5,null,n.createElement(t.AW,{path:Le,element:n.createElement(n.Fragment,null,ye)}))))}}getApiHolder(){if(this.apiHolder){for(const $ of this.plugins)for(const ae of $.getApis())this.apiFactoryRegistry.get(ae.api)||this.apiFactoryRegistry.register("default",ae);return i.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:y.appThemeApiRef,deps:{},factory:()=>m.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:y.configApiRef,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:y.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:y.featureFlagsApiRef,deps:{},factory:()=>new m.LocalStorageFeatureFlags});for(const $ of this.defaultApis)this.apiFactoryRegistry.register("default",$);for(const $ of this.plugins)for(const ae of $.getApis())if(!this.apiFactoryRegistry.register("default",ae))throw new Error(`Plugin ${$.getId()} tried to register duplicate or forbidden API factory for ${ae.api}`);for(const $ of this.apis)if(!this.apiFactoryRegistry.register("app",$))throw new Error(`Duplicate or forbidden API factory for ${$.api} in app`);return i.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new i.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins($){const ae=new Set;for(const ue of $){const se=ue.getId();if(ae.has(se))throw new Error(`Duplicate plugin found '${se}'`);ae.add(se)}}}function gt(k){return new rt(k)}},46611:function(q,s,e){"use strict";e.d(s,{t:function(){return n}});const n=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const c=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external",requestUrl:"http://localhost:3000/api"}}}];if(!c)throw new Error("No static configuration provided");if(!Array.isArray(c))throw new Error("Static configuration has invalid format");const m=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const i=JSON.parse(t);Array.isArray(i)?m.push(...i):m.push({data:i,context:"env"})}catch(i){throw new Error(`Failed to load runtime configuration, ${i}`)}const y=window.__APP_CONFIG__;return y&&m.push({context:"window",data:y}),m}},44056:function(q,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return n.b},defaultConfigLoader:function(){return t.t}});var n=e(82370),t=e(46611),c=e(73495),m=e.n(c);e.o(c,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return c.BitbucketAuth}}),e.o(c,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"GithubAuth")&&e.d(s,{GithubAuth:function(){return c.GithubAuth}}),e.o(c,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return c.GitlabAuth}}),e.o(c,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return c.GoogleAuth}}),e.o(c,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),e.o(c,"OktaAuth")&&e.d(s,{OktaAuth:function(){return c.OktaAuth}}),e.o(c,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return c.OneLoginAuth}})},73495:function(){},49208:function(q,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return n.AlertApiForwarder},ErrorAlerter:function(){return n.ErrorAlerter},ErrorApiForwarder:function(){return n.ErrorApiForwarder},FetchMiddlewares:function(){return n.FetchMiddlewares},NoOpAnalyticsApi:function(){return n.NoOpAnalyticsApi},OAuthRequestManager:function(){return n.OAuthRequestManager},UnhandledErrorForwarder:function(){return n.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return n.UrlPatternDiscovery},WebStorage:function(){return n.WebStorage},createFetchApi:function(){return n.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader},FlatRoutes:function(){return c.w}});var n=e(56494);e.o(n,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return n.AtlassianAuth}}),e.o(n,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return n.BitbucketAuth}}),e.o(n,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return n.FlatRoutes}}),e.o(n,"GithubAuth")&&e.d(s,{GithubAuth:function(){return n.GithubAuth}}),e.o(n,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return n.GitlabAuth}}),e.o(n,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return n.GoogleAuth}}),e.o(n,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return n.MicrosoftAuth}}),e.o(n,"OktaAuth")&&e.d(s,{OktaAuth:function(){return n.OktaAuth}}),e.o(n,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return n.OneLoginAuth}}),e.o(n,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return n.createSpecializedApp}}),e.o(n,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return n.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var c=e(63938)},57018:function(q,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return i}});function n(h,l){for(const E of l)if(!h.has(E))return!1;return!0}class t{constructor(l){this.options=l}sessionExistsAndHasScope(l,E){if(!l)return!1;if(!E||this.options.sessionScopes===void 0)return!0;const g=this.options.sessionScopes(l);return n(g,E)}getExtendedScope(l,E){const g=new Set(this.options.defaultScopes);if(l&&this.options.sessionScopes!==void 0){const C=this.options.sessionScopes(l);for(const L of C)g.add(L)}if(E)for(const C of E)g.add(C);return g}}var c=e(98005),m=e(36964);class y{constructor(){ie(this,"subject",new c.X(m.SessionState.SignedOut));ie(this,"signedIn",!1)}setIsSignedIn(l){this.signedIn!==l&&(this.signedIn=l,this.subject.next(this.signedIn?m.SessionState.SignedIn:m.SessionState.SignedOut))}sessionState$(){return this.subject}}class i{constructor(l){ie(this,"connector");ie(this,"helper");ie(this,"sessionScopesFunc");ie(this,"sessionShouldRefreshFunc");ie(this,"stateTracker",new y);ie(this,"refreshPromise");ie(this,"currentSession");const{connector:E,defaultScopes:g=new Set,sessionScopes:C,sessionShouldRefresh:L}=l;this.connector=E,this.sessionScopesFunc=C,this.sessionShouldRefreshFunc=L,this.helper=new t({sessionScopes:C,defaultScopes:g})}async getSession(l){if(this.helper.sessionExistsAndHasScope(this.currentSession,l.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const g=await this.collapsedSessionRefresh(),C=this.sessionScopesFunc(this.currentSession),L=this.sessionScopesFunc(g);return n(L,C)&&(this.currentSession=g),g}catch(g){if(l.optional)return;throw g}}if(!this.currentSession&&!l.instantPopup)try{const E=await this.collapsedSessionRefresh();return this.currentSession=E,this.getSession(l)}catch{}if(!l.optional)return this.currentSession=await this.connector.createSession({...l,scopes:this.helper.getExtendedScope(this.currentSession,l.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 l=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),l}finally{delete this.refreshPromise}}}class o{constructor(l){ie(this,"connector");ie(this,"helper");ie(this,"stateTracker",new SessionStateTracker);ie(this,"currentSession");const{connector:E,defaultScopes:g=new Set,sessionScopes:C}=l;this.connector=E,this.helper=new SessionScopeHelper({sessionScopes:C,defaultScopes:g})}setSession(l){this.currentSession=l,this.stateTracker.setIsSignedIn(Boolean(l))}async getSession(l){if(this.helper.sessionExistsAndHasScope(this.currentSession,l.scopes))return this.currentSession;if(!l.optional)return this.currentSession=await this.connector.createSession({...l,scopes:this.helper.getExtendedScope(this.currentSession,l.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(q,s,e){"use strict";e.d(s,{J:function(){return c},X:function(){return m}});var n=e(82394),t=e.n(n);class c{constructor(){ie(this,"isClosed",!1);ie(this,"terminatingError");ie(this,"observable",new(t())(i=>this.isClosed?(this.terminatingError?i.error(this.terminatingError):i.complete(),()=>{}):(this.subscribers.add(i),()=>{this.subscribers.delete(i)})));ie(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(i){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(i))}error(i){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=i,this.subscribers.forEach(o=>o.error(i))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(i=>i.complete())}subscribe(i,o,h){const l=typeof i=="function"?{next:i,error:o,complete:h}:i;return this.observable.subscribe(l)}}class m{constructor(i){ie(this,"isClosed");ie(this,"currentValue");ie(this,"terminatingError");ie(this,"observable");ie(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=i,this.terminatingError=void 0,this.observable=new(t())(o=>this.isClosed?(this.terminatingError?o.error(this.terminatingError):o.complete(),()=>{}):(o.next(this.currentValue),this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(i){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=i,this.subscribers.forEach(o=>o.next(i))}error(i){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=i,this.subscribers.forEach(o=>o.error(i))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(i=>i.complete())}subscribe(i,o,h){const l=typeof i=="function"?{next:i,error:o,complete:h}:i;return this.observable.subscribe(l)}}},88934:function(q,s,e){"use strict";e.d(s,{L:function(){return c}});var n=e(36964),t=e(2784);const c=m=>{const{children:y}=m,i=(0,n.useApi)(n.featureFlagsApiRef),o="with"in m?i.isActive(m.with):!i.isActive(m.without);return t.createElement(t.Fragment,null,o?y:null)};(0,n.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(q,s,e){"use strict";e.d(s,{w:function(){return m}});var n=e(2784),t=e(10289),c=e(36964);const m=i=>{const o=(0,c.useApp)(),{NotFoundErrorPage:h}=o.getComponents(),l=(0,c.useElementFilter)(i.children,E=>E.getElements().flatMap(g=>{var L;let C=g.props.path;return C===""?[]:(C=(L=C==null?void 0:C.replace(/\/\*$/,""))!=null?L:"/",[{path:C,element:g,children:g.props.children?[{path:C==="/"?"/":"/*",element:g.props.children}]:void 0}])}).sort((g,C)=>C.path.localeCompare(g.path)).map(g=>(g.path=g.path==="/"?"/":`${g.path}/*`,g)));return l.push({element:n.createElement(h,null),path:"/*"}),(0,t.V$)(l)};var y=e(88934)},9118:function(q,s,e){"use strict";e.d(s,{Button:function(){return B},CodeSnippet:function(){return Ae},Content:function(){return Ma},ContentHeader:function(){return Ks},CreateButton:function(){return Qe},DependencyGraph:function(){return j},DependencyGraphTypes:function(){return n},EmptyState:function(){return v},ErrorPage:function(){return ks},ErrorPanel:function(){return Be},Header:function(){return Va},HeaderIconLinkRow:function(){return Ir},HeaderLabel:function(){return li},HeaderTabs:function(){return Za},InfoCard:function(){return Nn},ItemCardGrid:function(){return gi},ItemCardHeader:function(){return fi},Link:function(){return S},LogViewer:function(){return xr},MissingAnnotationEmptyState:function(){return ne},OverflowTooltip:function(){return Br},Page:function(){return Ga},PageWithHeader:function(){return Ei},Progress:function(){return Zr},ResponseErrorPanel:function(){return on},RoutedTabs:function(){return Na},Select:function(){return Ft},Sidebar:function(){return Ho},SidebarContext:function(){return Xn},SidebarDivider:function(){return rs},SidebarItem:function(){return Fa},SidebarPage:function(){return bo},SidebarPinStateContext:function(){return wn},SubvalueCell:function(){return ps},SupportButton:function(){return Lo},Table:function(){return $s},WarningPanel:function(){return _t},sidebarConfig:function(){return $t},useContent:function(){return Jr},useQueryParamState:function(){return Ao}});var n={};e.r(n),e.d(n,{Nm:function(){return We},ht:function(){return Ue},LJ:function(){return it}});var t=e(2784),c=e(36964),m=e(19928);function y(r){const[a,u]=useState([]),f=useApi(alertApiRef);if(useEffect(()=>{const F=f.alert$().subscribe(w=>u(Q=>Q.concat(w)));return()=>{F.unsubscribe()}},[f]),a.length===0)return null;const[p]=a,R=()=>{u(F=>F.filter(w=>w!==p))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:R,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:p.severity},React.createElement("span",null,p.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var i=e(79692),o=e(12420);const h=(0,i.Z)(r=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:r.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function l(r){const{displayName:a,picture:u,customStyles:f}=r,p=h();return React.createElement(MaterialAvatar,{alt:a,src:u,className:p.avatar,style:{backgroundColor:stringToColor(a||u||""),...f}},a&&extractInitials(a))}var E=e(77277),g=e(86689),C=e(62833);const L=r=>/^([a-z+.-]+):/.test(r),Z=r=>{var a;return r instanceof Array?r.map(Z).join(" ").trim():typeof r=="object"&&r?Z((a=r==null?void 0:r.props)==null?void 0:a.children):["string","number"].includes(typeof r)?String(r):""},S=t.forwardRef(({onClick:r,noTrack:a,...u},f)=>{const p=(0,c.useAnalytics)(),R=String(u.to),F=Z(u.children)||R,w=L(R),Q=w&&!!/^https?:/.exec(R),H=ce=>{r==null||r(ce),a||p.captureEvent("click",F,{attributes:{to:R}})};return w?t.createElement(g.Z,{ref:f,href:R,onClick:H,...Q?{target:"_blank",rel:"noopener"}:{},...u}):t.createElement(g.Z,{ref:f,component:C.rU,onClick:H,...u})}),G=t.forwardRef((r,a)=>t.createElement(S,{ref:a,...r,color:"initial"})),B=t.forwardRef((r,a)=>t.createElement(E.Z,{ref:a,component:G,...r}));var T=e(60364),x=e(61837),D=e(80030),U=e(19353),V=e(55295);function X(r){const{text:a,tooltipDelay:u=1e3,tooltipText:f="Text copied to clipboard"}=r,p=(0,c.useApi)(c.errorApiRef),[R,F]=(0,t.useState)(!1),[{error:w},Q]=(0,V.Z)();(0,t.useEffect)(()=>{w&&p.post(w)},[w,p]);const H=ce=>{ce.stopPropagation(),F(!0),Q(a)};return t.createElement(t.Fragment,null,t.createElement(D.ZP,{id:"copy-test-tooltip",title:f,placement:"top",leaveDelay:u,onClose:()=>F(!1),open:R},t.createElement(x.Z,{onClick:H},t.createElement(U.Z,null))))}var Ee=e(70813),Se=e(26639),Oe=e(39595);function Ae(r){const{text:a,language:u,showLineNumbers:f=!1,highlightedNumbers:p,customStyle:R,showCopyCodeButton:F=!1}=r,w=(0,T.Z)(),Q=w.palette.type==="dark"?Se.Z:Oe.Z,H=w.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(Ee.Z,{customStyle:R,language:u,style:Q,showLineNumbers:f,wrapLines:!0,lineNumberStyle:{color:w.palette.textVerySubtle},lineProps:ce=>(p==null?void 0:p.includes(ce))?{style:{backgroundColor:H}}:{}},a),F&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(X,{text:a})))}var Ke=e(41156),Ge=e(88188);function Qe(r){const{title:a,to:u}=r,f=(0,Ke.Z)(p=>p.breakpoints.down("xs"));return u?f?t.createElement(x.Z,{component:C.rU,color:"primary",title:a,size:"small",to:u},t.createElement(Ge.Z,null)):t.createElement(E.Z,{component:C.rU,variant:"contained",color:"primary",to:u},a):null}var We;(function(r){const a="TB";r.TOP_BOTTOM=a;const u="BT";r.BOTTOM_TOP=u;const f="LR";r.LEFT_RIGHT=f;const p="RL";r.RIGHT_LEFT=p})(We||(We={}));var je;(function(r){const a="UL";r.UP_LEFT=a;const u="UR";r.UP_RIGHT=u;const f="DL";r.DOWN_LEFT=f;const p="DR";r.DOWN_RIGHT=p})(je||(je={}));var it;(function(r){const a="network-simplex";r.NETWORK_SIMPLEX=a;const u="tight-tree";r.TIGHT_TREE=u;const f="longest-path";r.LONGEST_PATH=f})(it||(it={}));var Ue;(function(r){const a="l";r.LEFT=a;const u="r";r.RIGHT=u;const f="c";r.CENTER=f})(Ue||(Ue={}));var qe=e(13387),nt=e(11105),ut=e(97963),dt=e(46506),ht=e.n(dt),et=e(54073),Xe=e.n(et),vt=e(10368);const ct=(0,i.Z)(r=>({node:{fill:r.palette.primary.light,stroke:r.palette.primary.light},text:{fill:r.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function St({node:{id:r}}){const a=ct(),[u,f]=t.useState(0),[p,R]=t.useState(0),F=t.useRef(null);t.useLayoutEffect(()=>{if(F.current){let{height:ce,width:de}=F.current.getBBox();ce=Math.round(ce),de=Math.round(de),(ce!==p||de!==u)&&(f(de),R(ce))}},[u,p]);const w=10,Q=u+w*2,H=p+w*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:Q,height:H,rx:10}),t.createElement("text",{ref:F,className:a.text,y:H/2,x:Q/2,textAnchor:"middle",alignmentBaseline:"middle"},r))}const Ct="arrow-marker",yt="node",Fe="edge",at="label",lt=(0,vt.Z)(r=>({node:{transition:`${r.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Et=r=>t.createElement(St,{...r});function rt({render:r=Et,setNode:a,node:u}){const{width:f,height:p,x:R=0,y:F=0}=u,w=u,Q=lt(),H=t.useRef(null);return t.useLayoutEffect(()=>{if(H.current){let{height:ce,width:de}=H.current.getBBox();ce=Math.round(ce),de=Math.round(de),(ce!==p||de!==f)&&a(u.id,{...u,height:ce,width:de})}},[u,f,p,a]),t.createElement("g",{ref:H,"data-testid":yt,className:Q.node,transform:`translate(${R-f/2},${F-p/2})`},r({node:w}))}var gt=e(55876),k=e(66481),$=e(19574),ae=e.n($);const ue=(0,vt.Z)(r=>({text:{fill:r.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function se({edge:{label:r}}){const a=ue();return t.createElement("text",{className:a.text,textAnchor:"middle"},r)}const ye=(0,vt.Z)(r=>({path:{strokeWidth:2,stroke:r.palette.textSubtle,fill:"none",transition:`${r.transitions.duration.shortest}ms`},label:{transition:`${r.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),Me=r=>t.createElement(se,{...r}),Le=gt.Z().x(r=>r.x).y(r=>r.y).curve(k.Z);function ze({render:r=Me,setEdge:a,id:u,edge:f}){const{x:p=0,y:R=0,width:F,height:w,points:Q}=f,H=f,ce=ye(),de=t.useRef(null);t.useLayoutEffect(()=>{if(de.current){let{height:Pe,width:Ie}=de.current.getBBox();Pe=Math.round(Pe),Ie=Math.round(Ie),(Pe!==w||Ie!==F)&&a(u,{...f,height:Pe,width:Ie})}},[f,w,F,a,u]);let Ce="";if(Q){const Pe=Q.filter(Ie=>ae()(Ie.x)&&ae()(Ie.y));Ce=Le(Pe)||""}return t.createElement(t.Fragment,null,Ce&&t.createElement("path",{"data-testid":Fe,className:ce.path,markerEnd:`url(#${Ct})`,d:Ce}),H.label?t.createElement("g",{ref:de,"data-testid":at,className:ce.label,transform:`translate(${p},${R})`},r({edge:H})):null)}const K="workspace";function j(r){var Wn,qa;const{edges:a,nodes:u,renderNode:f,direction:p=We.TOP_BOTTOM,align:R,nodeMargin:F=50,edgeMargin:w=10,rankMargin:Q=50,paddingX:H=0,paddingY:ce=0,acyclicer:de,ranker:Ce=it.NETWORK_SIMPLEX,labelPosition:Pe=Ue.RIGHT,labelOffset:Ie=10,edgeRanks:st=1,edgeWeight:bt=1,renderLabel:jt,defs:Ut,zoom:ot="enabled",...xt}=r,Ot=(0,ut.Z)(),[Gt,Tn]=t.useState(100),[ln,qn]=t.useState(100),Pt=t.useRef(new(ht()).graphlib.Graph),[Pn,ta]=t.useState(((Wn=Pt.current.graph())==null?void 0:Wn.width)||0),[bn,na]=t.useState(((qa=Pt.current.graph())==null?void 0:qa.height)||0),[Rr,Sr]=t.useState([]),[ra,Jt]=t.useState([]),rn=Math.max(Pn,Gt),cn=Math.max(bn,ln),On=t.useMemo(()=>Xe()(Nt=>{if(!Nt)return;const Qt=nt.Z(Nt),Mt=nt.Z(Nt.getElementById(K));function pn(){Qt.call(qe.sP().scaleExtent([1,10]).on("zoom",Sn=>{Sn.transform.x=Math.min(0,Math.max(Sn.transform.x,rn-rn*Sn.transform.k)),Sn.transform.y=Math.min(0,Math.max(Sn.transform.y,cn-cn*Sn.transform.k)),Mt.attr("transform",Sn.transform)}))}ot==="enabled"?pn():ot==="enable-on-click"&&Qt.on("click",()=>pn());const{width:yn,height:Cr}=Nt.getBoundingClientRect();Gt!==yn&&Tn(yn),ln!==Cr&&qn(Cr)},100),[ln,Gt,rn,cn,ot]),Wt=t.useCallback(()=>{const Nt=Pt.current.nodes(),Qt=Pt.current.edges();Nt.forEach(Mt=>{u.some(yn=>yn.id===Mt)||Pt.current.removeNode(Mt)}),Qt.forEach(Mt=>{a.some(yn=>yn.from===Mt.v&&yn.to===Mt.w)||Pt.current.removeEdge(Mt.v,Mt.w)}),u.forEach(Mt=>{const pn=Pt.current.nodes().find(yn=>Mt.id===yn);if(pn&&Pt.current.node(pn)){const{width:yn,height:Cr,x:Sn,y:Zi}=Pt.current.node(pn);Pt.current.setNode(pn,{...Mt,width:yn,height:Cr,x:Sn,y:Zi})}else Pt.current.setNode(Mt.id,{...Mt,width:0,height:0})}),a.forEach(Mt=>{Pt.current.setEdge(Mt.from,Mt.to,{...Mt,label:Mt.label,width:0,height:0,labelpos:Pe,labeloffset:Ie,weight:bt,minlen:st})})},[a,u,Pe,Ie,bt,st]),Ht=t.useMemo(()=>Xe()(()=>{ht().layout(Pt.current);const{height:Nt,width:Qt}=Pt.current.graph(),Mt=Math.max(0,Nt||0),pn=Math.max(0,Qt||0);ta(pn),na(Mt),Sr(Pt.current.nodes()),Jt(Pt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Pt.current.setGraph({rankdir:p,align:R,nodesep:F,edgesep:w,ranksep:Q,marginx:H,marginy:ce,acyclicer:de,ranker:Ce}),Wt(),Ht(),Ht.cancel),[de,R,p,w,H,ce,F,Q,Ce,Wt,Ht]);function zn(Nt,Qt){return Pt.current.setNode(Nt,Qt),Ht(),Pt.current}function Dn(Nt,Qt){return Pt.current.setEdge(Nt,Qt),Ht(),Pt.current}return t.createElement("svg",{ref:On,...xt,width:"100%",height:cn,viewBox:`0 0 ${rn} ${cn}`},t.createElement("defs",null,t.createElement("marker",{id:Ct,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Ot.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Ut),t.createElement("g",{id:K},t.createElement("svg",{width:Pn,height:bn,y:cn/2-bn/2,x:rn/2-Pn/2,viewBox:`0 0 ${Pn} ${bn}`},ra.map(Nt=>{const Qt=Pt.current.edge(Nt);return Qt?t.createElement(ze,{key:`${Nt.v}-${Nt.w}`,id:Nt,setEdge:Dn,render:jt,edge:Qt}):null}),Rr.map(Nt=>{const Qt=Pt.current.node(Nt);return Qt?t.createElement(rt,{key:Nt,setNode:zn,render:f,node:Qt}):null}))))}var M=e(72779),te=e.n(M);const me=(0,i.Z)(r=>{var a;return{root:{padding:r.spacing(0),marginBottom:r.spacing(0),marginTop:r.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:r.spacing(6),marginTop:-r.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:r.palette.banner.text,"& a":{color:r.palette.banner.link}},info:{backgroundColor:r.palette.banner.info},error:{backgroundColor:r.palette.banner.error},warning:{backgroundColor:(a=r.palette.banner.warning)!=null?a:r.palette.banner.error}}},{name:"BackstageDismissableBanner"}),ve=r=>{var Pe;const{variant:a,message:u,id:f,fixed:p=!1}=r,R=me(),w=useApi(storageApiRef).forBucket("notifications"),Q=(Pe=w.snapshot("dismissedBanners").value)!=null?Pe:[],[H,ce]=useState(new Set(Q)),de=useObservable(w.observe$("dismissedBanners"));useEffect(()=>{var Ie;if(de==null?void 0:de.value){const st=(Ie=de==null?void 0:de.value)!=null?Ie:[];ce(new Set(st))}},[de==null?void 0:de.value]);const Ce=()=>{w.set("dismissedBanners",[...H,f])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!H.has(f),classes:{root:classNames(R.root,!p&&R.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(R.content,R[a]),message:R.message},message:u,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Ce},React.createElement(Close,{className:R.icon}))]}))};var Te=e(60905),xe=e(90436),ft=e(86284),At=e(96465),le=e(19133),P=e(3871);const z=(0,i.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),A=({missing:r})=>{const a=z();switch(r){case"field":return t.createElement("img",{src:ft,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:At,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:le,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:P,alt:"no Build",className:a.generalImg});default:return null}},d=(0,i.Z)(r=>({root:{backgroundColor:r.palette.background.default,padding:r.spacing(2,0,0,0)},action:{marginTop:r.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function v(r){const{title:a,description:u,missing:f,action:p}=r,R=d();return t.createElement(Te.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:R.root,spacing:2},t.createElement(Te.Z,{item:!0,xs:12,md:6},t.createElement(Te.Z,{container:!0,direction:"column"},t.createElement(Te.Z,{item:!0,xs:!0},t.createElement(xe.Z,{variant:"h5"},a)),t.createElement(Te.Z,{item:!0,xs:!0},t.createElement(xe.Z,{variant:"body1"},u)),t.createElement(Te.Z,{item:!0,xs:!0,className:R.action},p))),t.createElement(Te.Z,{item:!0,xs:12,md:6,className:R.imageContainer},t.createElement(A,{missing:f})))}const b=`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`,N=(0,i.Z)(r=>({code:{borderRadius:6,margin:`${r.spacing(2)}px 0px`,background:r.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function ne(r){const{annotation:a}=r,u=N(),f=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,a)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(v,{missing:"field",title:"Missing Annotation",description:f,action:t.createElement(t.Fragment,null,t.createElement(xe.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:u.code},t.createElement(Ae,{text:b.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(E.Z,{color:"primary",component:S,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var re=e(11776),_=e(38402),fe=e(49378),ge=e(41128),Re=e(27616),we=e(8284),He=e(70660),_e=e(91750),ke=e(38016);const Rt=(r,a)=>(a.palette.type==="light"?ge._j:ge.$n)(a.palette[r].light,.6),wt=(r,a)=>(a.palette.type==="light"?ge.$n:ge._j)(a.palette[r].light,.9),Dt=(0,i.Z)(r=>({root:{marginRight:r.spacing(1),fill:({severity:a})=>Rt(a,r)}})),Kt=({severity:r})=>{const a=Dt({severity:r});return t.createElement(_e.Z,{classes:a})},mt=({severity:r})=>{const a=Dt({severity:r});return t.createElement(ke.Z,{classes:a})},Tt=(0,i.Z)(r=>({panel:{backgroundColor:({severity:a})=>wt(a,r),color:({severity:a})=>Rt(a,r),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>Rt(a,r),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>Rt(a,r),backgroundColor:({severity:a})=>wt(a,r)},details:{width:"100%",display:"block",color:r.palette.textContrast,backgroundColor:r.palette.background.default,border:`1px solid ${r.palette.border}`,padding:r.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),zt=r=>r.charAt(0).toLocaleUpperCase("en-US")+r.slice(1);function _t(r){const{severity:a="warning",title:u,message:f,children:p,defaultExpanded:R}=r,F=Tt({severity:a}),w=zt(a)+(u?`: ${u}`:"");return t.createElement(Re.Z,{defaultExpanded:R!=null?R:!1,className:F.panel,role:"alert"},t.createElement(we.Z,{expandIcon:t.createElement(mt,{severity:a}),className:F.summary},t.createElement(Kt,{severity:a}),t.createElement(xe.Z,{className:F.summaryText,variant:"subtitle1"},w)),(f||p)&&t.createElement(He.Z,null,t.createElement(Te.Z,{container:!0},f&&t.createElement(Te.Z,{item:!0,xs:12},t.createElement(xe.Z,{className:F.message,variant:"body1"},f)),p&&t.createElement(Te.Z,{item:!0,xs:12,className:F.details},p))))}const Y=(0,i.Z)(r=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:r.spacing(2)},divider:{margin:r.spacing(2)}}),{name:"BackstageErrorPanel"}),pe=({error:r,message:a,stack:u,children:f})=>{const p=Y();return t.createElement(re.Z,{dense:!0},t.createElement(_.Z,{alignItems:"flex-start"},t.createElement(fe.Z,{classes:{secondary:p.text},primary:"Error",secondary:r}),t.createElement(X,{text:r})),t.createElement(_.Z,{alignItems:"flex-start"},t.createElement(fe.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),t.createElement(X,{text:a})),u&&t.createElement(_.Z,{alignItems:"flex-start"},t.createElement(fe.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:u}),t.createElement(X,{text:u})),f)};function Be(r){const{title:a,error:u,defaultExpanded:f,children:p}=r;return t.createElement(_t,{severity:"error",title:a!=null?a:u.message,defaultExpanded:f},t.createElement(pe,{error:u.name,message:u.message,stack:u.stack,children:p}))}var It=e(85256);const Zt=(0,i.Z)(r=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:r.spacing(2)},divider:{margin:r.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function on(r){var Ie;const{title:a,error:u,defaultExpanded:f}=r,p=Zt();if(u.name!=="ResponseError")return t.createElement(Be,{title:a!=null?a:u.message,defaultExpanded:f,error:u});const{body:R,cause:F}=u,{request:w,response:Q}=R,H=`${Q.statusCode}: ${F.name}`,ce=w&&`${w.method} ${w.url}`,de=F.message.replace(/\\n/g,`
12
+ `),Ce=(Ie=F.stack)==null?void 0:Ie.replace(/\\n/g,`
13
+ `),Pe=JSON.stringify(R,void 0,2);return t.createElement(Be,{title:a!=null?a:u.message,defaultExpanded:f,error:{name:H,message:de,stack:Ce}},ce&&t.createElement(_.Z,{alignItems:"flex-start"},t.createElement(fe.Z,{classes:{secondary:p.text},primary:"Request",secondary:w?`${ce}`:void 0}),t.createElement(X,{text:ce})),t.createElement(t.Fragment,null,t.createElement(It.Z,{component:"li",className:p.divider}),t.createElement(_.Z,{alignItems:"flex-start"},t.createElement(fe.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(Ae,{language:"json",text:Pe,showCopyCodeButton:!0})))}var Cn=e(47093);function _n(r){const a=document.createElement("div");return a.setAttribute("id",r),a}function er(r){document.body.insertBefore(r,document.body.lastElementChild.nextElementSibling)}function aa(r){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${r}`),R=p||_n(r);return p||er(R),R.appendChild(a.current),function(){a.current.remove(),R.childNodes.length===-1&&R.remove()}},[r]);function u(){return a.current||(a.current=document.createElement("div")),a.current}return u()}var Fn=null;const Bn="core.calloutSeen";function En(){const[r,a]=useState(()=>{const f=localStorage.getItem(Bn);return f?JSON.parse(f):{}}),u=useCallback((f,p)=>{const R=localStorage.getItem(Bn),w={...R?JSON.parse(R):{},[f]:p};a(w),localStorage.setItem(Bn,JSON.stringify(w))},[]);return{states:r,setState:u}}function Bt(r){const{states:a,setState:u}=En(),f=useCallback(()=>{u(r,!0)},[u,r]);return{seen:a[r]===!0,markSeen:f}}function oa(r){const{seen:a,markSeen:u}=Bt(r);return{show:a===!1,hide:u}}const Hn=(0,i.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 sa(r){const{featureId:a,title:u,description:f,children:p}=r,{show:R,hide:F}=useShowCallout(a),w=usePortal("core.callout"),Q=useRef(null),[H,ce]=useState(),de=Hn(),Ce=useCallback(()=>{if(Q.current){const Pe=Q.current.getBoundingClientRect(),Ie=Math.max(Pe.width,Pe.height),st=800,bt=Pe.x-(Ie-Pe.width)/2-st,jt=Pe.y-(Ie-Pe.height)/2-st,Ut=Ie+2*st,ot=450,xt=Pe.x+Pe.width/2-ot,Ot=Pe.y-(Ie-Pe.height)/2+Ie+20;ce({dotLeft:bt,dotTop:jt,dotSize:Ut,borderWidth:st,textTop:Ot,textLeft:xt,textWidth:ot})}},[]);return useEffect(()=>(window.addEventListener("resize",Ce),window.addEventListener("scroll",Ce),()=>{window.removeEventListener("resize",Ce),window.removeEventListener("scroll",Ce)}),[Ce]),useLayoutEffect(Ce,[Q.current,Ce]),R?React.createElement(React.Fragment,null,React.createElement("div",{className:de.featureWrapper,ref:Q},p),createPortal(React.createElement("div",{className:de.backdrop},React.createElement(ClickAwayListener,{onClickAway:F},React.createElement(React.Fragment,null,React.createElement("div",{className:de.dot,"data-testid":"dot",style:{left:H==null?void 0:H.dotLeft,top:H==null?void 0:H.dotTop,width:H==null?void 0:H.dotSize,height:H==null?void 0:H.dotSize,borderWidth:H==null?void 0:H.borderWidth},onClick:F,onKeyDown:F,role:"button",tabIndex:0},React.createElement("div",{className:de.pulseCircle})),React.createElement("div",{className:de.text,"data-testid":"text",style:{left:H==null?void 0:H.textLeft,top:H==null?void 0:H.textTop,width:H==null?void 0:H.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},u),React.createElement(Typography,null,f))))),w)):React.createElement(React.Fragment,null,p)}var tr=e(35292);const Tr=(0,i.Z)(r=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:"gray",cursor:"default"},primary:{color:r.palette.primary.main},secondary:{color:r.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function Pr({color:r="primary",disabled:a=!1,href:u="#",icon:f=t.createElement(tr.Z,null),label:p,onClick:R,title:F}){const w=Tr();return a?t.createElement(g.Z,{title:F,className:te()(w.link,w.disabled),underline:"none"},f,t.createElement("span",{className:w.label},p)):t.createElement(g.Z,{title:F,className:te()(w.link,w[r]),to:u,component:S,onClick:R},f,t.createElement("span",{className:w.label},p))}const Vn=(0,i.Z)(r=>({links:{margin:r.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:r.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function Ir(r){const{links:a}=r,u=Vn();return t.createElement("nav",{className:u.links},a.map((f,p)=>t.createElement(Pr,{key:p+1,...f})))}const nr=r=>{const a=r==="dark"?"16%":"97%";return`
14
+ hsl(0, 0%, ${a}) 0%,
15
+ hsla(0, 0%, ${a}, 0.987) 8.1%,
16
+ hsla(0, 0%, ${a}, 0.951) 15.5%,
17
+ hsla(0, 0%, ${a}, 0.896) 22.5%,
18
+ hsla(0, 0%, ${a}, 0.825) 29%,
19
+ hsla(0, 0%, ${a}, 0.741) 35.3%,
20
+ hsla(0, 0%, ${a}, 0.648) 41.2%,
21
+ hsla(0, 0%, ${a}, 0.55) 47.1%,
22
+ hsla(0, 0%, ${a}, 0.45) 52.9%,
23
+ hsla(0, 0%, ${a}, 0.352) 58.8%,
24
+ hsla(0, 0%, ${a}, 0.259) 64.7%,
25
+ hsla(0, 0%, ${a}, 0.175) 71%,
26
+ hsla(0, 0%, ${a}, 0.104) 77.5%,
27
+ hsla(0, 0%, ${a}, 0.049) 84.5%,
28
+ hsla(0, 0%, ${a}, 0.013) 91.9%,
29
+ hsla(0, 0%, ${a}, 0) 100%
30
+ `},Lr=100,jn=10,An=(0,i.Z)(r=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:Lr,height:`calc(100% + ${jn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-jn,background:`linear-gradient(90deg, ${nr(r.palette.type)})`},fadeRight:{right:-jn,background:`linear-gradient(270deg, ${nr(r.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-r.spacing(2)},buttonRight:{right:-r.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function dn(r){const[[a,u],f]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=r.current;if(!p){f([0,0]);return}const R=()=>{const F=p.scrollLeft,w=p.scrollWidth-p.offsetWidth-p.scrollLeft;f([F,w])};return R(),p.addEventListener("scroll",R),window.addEventListener("resize",R),()=>{p.removeEventListener("scroll",R),window.removeEventListener("resize",R)}},[r]),[a,u]}function In(r,a,u){const[f,p]=React.useState(0);return React.useLayoutEffect(()=>{if(f===0)return;const R=performance.now(),F=requestAnimationFrame(w=>{if(!r.current)return;const Q=w-R,H=Math.abs(f)*Q/a,de=Math.max(u,H)*Math.sign(f);r.current.scrollBy({left:de});const Ce=f-de;Math.sign(f)!==Math.sign(Ce)?p(0):p(Ce)});return()=>cancelAnimationFrame(F)},[r,f,a,u]),p}function Gn(r){const{scrollStep:a=100,scrollSpeed:u=50,minScrollDistance:f=5,children:p,...R}=r,F=An(r),w=React.useRef(),[Q,H]=dn(w),ce=In(w,u,f),de=Ce=>{!w.current||ce(Ce?a:-a)};return React.createElement("div",{...R,className:F.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:F.container,ref:w},p),React.createElement("div",{className:classNames(F.fade,F.fadeLeft,{[F.fadeHidden]:Q===0})}),React.createElement("div",{className:classNames(F.fade,F.fadeRight,{[F.fadeHidden]:H===0})}),Q>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>de(!1),className:classNames(F.button,F.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),H>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>de(!0),className:classNames(F.button,F.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const rr=(0,i.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function ia(r){const a=rr(r),{shorthand:u,alpha:f}=r;return u?React.createElement("span",{className:a[f?"alpha":"beta"],style:{fontSize:"120%"}},f?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[f?"alpha":"beta"]},f?"Alpha":"Beta")}const Kn=(0,t.lazy)(()=>Promise.all([e.e(3696),e.e(8718)]).then(e.bind(e,98718)).then(r=>({default:r.RealLogViewer})));function xr(r){const{Progress:a}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(Kn,{...r}))}const br=(0,i.Z)(r=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${r.palette.border}`},"& th, & td":{border:`1px solid ${r.palette.border}`,padding:r.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:r.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:r.palette.background.paper},"& tr":{backgroundColor:r.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:r.palette.background.default},"& a":{color:r.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Yn={code:({inline:r,className:a,children:u,...f})=>{const p=String(u).replace(/\n+$/,""),R=/language-(\w+)/.exec(a||"");return!r&&R?t.createElement(Ae,{language:R[1],text:p}):t.createElement("code",{className:a,...f},u)}};function vn(r){const{content:a,dialect:u="gfm",linkTarget:f}=r,p=br();return React.createElement(ReactMarkdown,{remarkPlugins:u==="gfm"?[gfm]:[],className:p.markdown,children:a,components:Yn,linkTarget:f})}var Mn=e(10179);const Zn=(0,i.Z)(r=>({root:{paddingLeft:r.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),ar=({request:r,busy:a,setBusy:u})=>{const f=Zn(),[p,R]=useState(),F=async()=>{u(!0);try{await r.trigger()}catch(Q){R(isError(Q)?Q.message:"An unspecified error occurred")}finally{u(!1)}},w=r.provider.icon;return React.createElement(ListItem,{button:!0,disabled:a,classes:{root:f.root}},React.createElement(ListItemAvatar,null,React.createElement(w,{fontSize:"large"})),React.createElement(ListItemText,{primary:r.provider.title,secondary:p&&React.createElement(Typography,{color:"error"},p)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:F},"Log in"))};var or=null;const Or=(0,i.Z)(r=>({dialog:{paddingTop:r.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:r.spacing(2,0)}}),{name:"OAuthRequestDialog"});function la(r){const a=Or(),[u,f]=useState(!1),p=useApi(oauthRequestApiRef),R=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),F=()=>{R.forEach(w=>w.reject())};return React.createElement(Dialog,{open:Boolean(R.length),fullWidth:!0,maxWidth:"xs",classes:{paper:a.dialog}},React.createElement(DialogTitle,{classes:{root:a.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:a.contentList}},React.createElement(List,null,R.map(w=>React.createElement(LoginRequestListItem,{key:w.provider.title,request:w,busy:u,setBusy:f})))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:F},"Reject All")))}var Jn=e(15277),Dr=e.n(Jn),Fr=e(14165);const sr=(0,i.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Br(r){var F;const[a,u]=(0,t.useState)(!1),f=(0,Fr.t)(),p=sr(),R=w=>{f()&&u(w)};return t.createElement(D.ZP,{title:(F=r.title)!=null?F:r.text||"",placement:r.placement,disableHoverListener:!a},t.createElement(Dr(),{text:r.text,line:r.line,onToggled:R,containerClassName:p.container}))}var Mr=e(67358);function Zr(r){const[a,u]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const f=setTimeout(()=>u(!0),250);return()=>clearTimeout(f)},[]),a?t.createElement(Mr.Z,{...r,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Nr=e(94339),ir=e(14503),$r=e(24579),lr=e(32552),Xt=e(15459),fn=e(95544),Ln=e(27597);const xn=(0,i.Z)(r=>({root:{maxWidth:"fit-content",padding:r.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:r.palette.textSubtle},arrow:{color:r.palette.textSubtle}}),{name:"BackstageBottomLink"});function Ur(r){const{link:a,title:u,onClick:f}=r,p=xn();return t.createElement("div",null,t.createElement(It.Z,null),t.createElement(S,{to:a,onClick:f,underline:"none"},t.createElement(fn.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(fn.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(xe.Z,null,t.createElement("strong",null,u))),t.createElement(Ln.Z,{className:p.arrow}))))}const wr=r=>{const{slackChannel:a}=r;if(a){if(typeof a=="string")return t.createElement(t.Fragment,null,"Please contact ",a," for help.");if(!a.href)return t.createElement(t.Fragment,null,"Please contact ",a.name," for help.")}else return null;return t.createElement(B,{to:a.href,variant:"contained"},a.name)},zr=class extends t.Component{constructor(a){super(a);this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,u){console.error(`ErrorBoundary, error: ${a}, info: ${u}`),this.setState({error:a,errorInfo:u})}render(){const{slackChannel:a,children:u}=this.props,{error:f}=this.state;return f?t.createElement(Be,{title:"Something Went Wrong",error:f},t.createElement(wr,{slackChannel:a})):u}},cr=(0,i.Z)(r=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:r.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:r.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),Wr=(0,Xt.Z)(r=>({root:{display:"inline-block",padding:r.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(ir.Z),ur={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 Nn(r){const{title:a,subheader:u,divider:f=!0,deepLink:p,slackChannel:R,errorBoundaryProps:F,variant:w,children:Q,headerStyle:H,headerProps:ce,icon:de,action:Ce,actionsClassName:Pe,actions:Ie,cardClassName:st,actionsTopRight:bt,className:jt,noPadding:Ut,titleTypographyProps:ot}=r,xt=cr();let Ot={},Gt={};w&&w.split(/[\s]+/g).forEach(Pt=>{Ot={...Ot,...ur.card[Pt]},Gt={...Gt,...ur.cardContent[Pt]}});const Tn=()=>t.createElement("div",{className:xt.headerSubheader},u&&t.createElement("div",{className:xt.subheader},u),de),ln=F||(R?{slackChannel:R}:{});return t.createElement(Nr.Z,{style:Ot,className:jt},t.createElement(zr,{...ln},a&&t.createElement(lr.Z,{classes:{root:xt.header,title:xt.headerTitle,subheader:xt.headerSubheader,avatar:xt.headerAvatar,action:xt.headerAction,content:xt.headerContent},title:a,subheader:Tn(),action:Ce,style:{...H},titleTypographyProps:ot,...ce}),bt&&t.createElement(Wr,null,bt),f&&t.createElement(It.Z,null),t.createElement($r.Z,{className:te()(st,{[xt.noPadding]:Ut}),style:Gt},Q),Ie&&t.createElement(ir.Z,{className:Pe},Ie),p&&t.createElement(Ur,{...p})))}var ca=e(39307);const Hr=(0,i.Z)(r=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:r.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"}),dr={fractional:!0,inverse:!1,unit:"%",max:100},Vr=({palette:r,value:a,inverse:u,max:f})=>{if(isNaN(a))return"#ddd";const p=f||dr.max,R=u?p-a:a;return R<p/3?r.status.error:R<p*(2/3)?r.status.warning:r.status.ok};function ua(r){const[a,u]=useState(null),{getColor:f=Vr}=r,p=Hr(r),{palette:R}=useTheme(),{value:F,fractional:w,inverse:Q,unit:H,max:ce,description:de}={...dr,...r},Ce=w?Math.round(F*ce):F,Pe=ce!==100?Math.round(F):Ce,[Ie,st]=useState(!1);return useEffect(()=>{const bt=a,jt=()=>st(!0),Ut=()=>st(!1);return bt&&de?(bt.addEventListener("mouseenter",jt),bt.addEventListener("mouseleave",Ut),()=>{bt.removeEventListener("mouseenter",jt),bt.removeEventListener("mouseleave",Ut)}):()=>{st(!1)}},[de,a]),React.createElement("div",{ref:u,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Ce,strokeWidth:12,trailWidth:12,strokeColor:f({palette:R,value:Pe,inverse:Q,max:ce}),className:p.circle}),de&&Ie?React.createElement("div",{className:p.description},de):React.createElement("div",{className:p.overlay},isNaN(F)?"N/A":`${Pe}${H}`))}const jr=(0,i.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function eo(r){const a=jr(r),{title:u,subheader:f,progress:p,inverse:R,deepLink:F,description:w,icon:Q,variant:H,getColor:ce}=r,de={inverse:R,description:w,getColor:ce,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:u,subheader:f,deepLink:F,variant:H,icon:Q},React.createElement(Gauge,{...de})))}function I(r){const{value:a,getColor:u=getProgressColor}=r,{palette:f}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const R=u({palette:f,value:p,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${p}%`},React.createElement("span",null,React.createElement(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:R})))}var O=e(21324),W=e(7089),J=e(1292),ee=e(42494),oe=e(74603),he=e(12231),be=e(73698),Ne=e(72379);const De=(0,i.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var $e=()=>{const r=De();return t.createElement(Ne.Z,{className:r.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const Ve=(0,i.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var tt=()=>{const r=Ve();return t.createElement(Ne.Z,{className:r.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const Ye=(0,Xt.Z)(r=>(0,o.Z)({root:{"label + &":{marginTop:r.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:r.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:r.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:r.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(oe.Z),Lt=(0,i.Z)(r=>(0,o.Z)({formControl:{margin:`${r.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:r.typography.fontFamily,color:r.palette.text.primary,"&.Mui-focused":{color:r.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function Ft(r){const{multiple:a,items:u,label:f,placeholder:p,selected:R,onChange:F,triggerReset:w,native:Q=!1,disabled:H=!1}=r,ce=Lt(),[de,Ce]=(0,t.useState)(R||(a?[]:"")),[Pe,Ie]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Ce(a?[]:"")},[w,a]),(0,t.useEffect)(()=>{R!==void 0&&Ce(R)},[R]);const st=ot=>{Ce(ot.target.value),F(ot.target.value)},bt=ot=>{if(H){ot.preventDefault();return}Ie(xt=>a&&!(ot.target instanceof HTMLElement)?!0:!xt)},jt=()=>{Ie(!1)},Ut=ot=>()=>{const xt=de.filter(Ot=>Ot!==ot);Ce(xt),F(xt)};return t.createElement("div",{className:ce.root},t.createElement(xe.Z,{variant:"button"},f),t.createElement(J.Z,{onClickAway:jt},t.createElement(ee.Z,{className:ce.formControl},t.createElement(be.Z,{value:de,native:Q,disabled:H,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:st,onClick:bt,open:Pe,input:t.createElement(Ye,null),renderValue:ot=>{var xt;return a&&de.length!==0?t.createElement("div",{className:ce.chips},ot.map(Ot=>{var Gt,Tn;return t.createElement(W.Z,{key:(Gt=u.find(ln=>ln.value===Ot))==null?void 0:Gt.value,label:(Tn=u.find(ln=>ln.value===Ot))==null?void 0:Tn.label,clickable:!0,onDelete:Ut(Ot),className:ce.chip})})):t.createElement(xe.Z,null,de.length===0?p||"":(xt=u.find(Ot=>Ot.value===ot))==null?void 0:xt.label)},IconComponent:()=>Pe?t.createElement(tt,null):t.createElement($e,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(he.Z,{value:[]},p),Q?u&&u.map(ot=>t.createElement("option",{value:ot.value,key:ot.value},ot.label)):u&&u.map(ot=>t.createElement(he.Z,{key:ot.value,value:ot.value},a&&t.createElement(O.Z,{color:"primary",checked:de.includes(ot.value)||!1,className:ce.checkbox}),ot.label))))))}const mn=()=>{},Vt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:mn,stepHistory:[],setStepHistory:mn,onStepChange:mn});function Yt(r){const{children:a,elevated:u,onStepChange:f,activeStep:p=0}=r,[R,F]=useState(p),[w,Q]=useState([0]);useEffect(()=>{F(p)},[p]);const H=[];let ce;return Children.forEach(a,de=>{isValidElement(de)&&(de.props.end?ce=de:H.push(de))}),React.createElement(React.Fragment,null,React.createElement(Vt.Provider,{value:{stepIndex:R,setStepIndex:F,stepHistory:w,setStepHistory:Q,onStepChange:f,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:R,orientation:"vertical",elevation:u?2:0},H)),R>=Children.count(a)-1&&ce)}const hn=(0,i.Z)(r=>({root:{marginTop:r.spacing(3),"& button":{marginRight:r.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),en=({text:r,handleClick:a})=>React.createElement(Button,{onClick:a},r||"Reset"),$n=({text:r,handleClick:a,disabled:u,last:f,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:u,"data-testid":`nextButton-${p}`,onClick:a},r||(f?"Finish":"Next")),fr=({text:r,handleClick:a,disabled:u,stepIndex:f})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${f}`,disabled:u},r||"Back"),tn=({actions:r={},children:a})=>{const u=hn(),{stepperLength:f,stepIndex:p,setStepIndex:R,stepHistory:F,setStepHistory:w,onStepChange:Q}=useContext(VerticalStepperContext),H=(Pe,Ie)=>{Ie&&Ie(),Q&&Q(p,Pe),R(Pe)},ce=()=>{const Pe=r.nextStep?r.nextStep(p,f-1):p+1;H(Pe,r.onNext),w([...F,Pe])},de=()=>{F.pop(),H(F[F.length-1],r.onBack),w([...F])},Ce=()=>{H(0,r.onRestart),w([0])};return React.createElement("div",{className:u.root},[void 0,!0].includes(r.showBack)&&p!==0&&React.createElement(fr,{text:r.backText,handleClick:de,disabled:p===0,stepIndex:p}),[void 0,!0].includes(r.showNext)&&React.createElement($n,{text:r.nextText,handleClick:ce,disabled:!!f&&p>=f||!!r.canNext&&!r.canNext(),stepIndex:p}),r.showRestart&&p!==0&&React.createElement(en,{text:r.restartText,handleClick:Ce,stepIndex:p}),a)},kt=(0,i.Z)(r=>({end:{padding:r.spacing(3)}}),{name:"SimpleStepperStep"});function Qn(r){const{title:a,children:u,end:f,actions:p,...R}=r,F=kt();return f?React.createElement("div",{className:F.end},React.createElement(Typography,{variant:"h6"},a),u,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...R},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,u,React.createElement(SimpleStepperFooter,{actions:p})))}const Rn=(0,i.Z)(r=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:r.palette.status.ok}},warning:{"&::before":{backgroundColor:r.palette.status.warning}},error:{"&::before":{backgroundColor:r.palette.status.error}},pending:{"&::before":{backgroundColor:r.palette.status.pending}},running:{"&::before":{backgroundColor:r.palette.status.running}},aborted:{"&::before":{backgroundColor:r.palette.status.aborted}}}),{name:"BackstageStatus"});function Ui(r){const a=Rn(r);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...r})}function wi(r){const a=Rn(r);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...r})}function zi(r){const a=Rn(r);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...r})}function Wi(r){const a=Rn(r);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...r})}function Hi(r){const a=Rn(r);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...r})}function Vi(r){const a=Rn(r);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...r})}var ji=e(74600),da=e(15584);const to=r=>(0,o.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:r.spacing(4),border:"0",verticalAlign:"top"}}),no={root:{border:"0",verticalAlign:"top"}},ro=r=>(0,o.Z)({root:{listStyle:"none",margin:r.spacing(0,0,-1,0),padding:"0"}}),ao=r=>(0,o.Z)({root:{padding:r.spacing(0,0,1,0)},random:{}}),oo=(0,Xt.Z)(to,{name:"BackstageMetadataTableTitleCell"})(da.Z),so=(0,Xt.Z)(no,{name:"BackstageMetadataTableCell"})(da.Z),Gi=({dense:r,children:a})=>React.createElement(Table,{size:r?"small":"medium"},React.createElement(TableBody,null,a)),Ki=({title:r,children:a,...u})=>React.createElement(TableRow,null,r&&React.createElement(oo,null,r),React.createElement(so,{colSpan:r?1:2,...u},a)),fa=(0,Xt.Z)(ro,{name:"BackstageMetadataTableList"})(({classes:r,children:a})=>t.createElement("ul",{className:r.root},a)),Yi=(0,Xt.Z)(ao,{name:"BackstageMetadataTableListItem"})(({classes:r,children:a})=>t.createElement("li",{className:r.root},a)),ma=(0,o.Z)({root:{margin:"0 0",listStyleType:"none"}}),io=r=>(0,o.Z)({root:{...ma.root,paddingLeft:r.spacing(1)}}),ha=(0,Xt.Z)(ma,{name:"BackstageStructuredMetadataTableList"})(({classes:r,children:a})=>t.createElement(fa,{classes:r},a)),ga=(0,Xt.Z)(io,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:r,children:a})=>t.createElement(fa,{classes:r},a));function lo(r,a){const u=r.map((f,p)=>React.createElement(MetadataListItem,{key:p},Gr(f)));return a?React.createElement(ga,null,u):React.createElement(ha,null,u)}function co(r,a,u){const f=Object.keys(r).map(p=>{const R=Gr(r[p],!0),F=u&&u.titleFormat?u.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${F}: `,R)});return a?React.createElement(ga,null,f):React.createElement(ha,null,f)}function Gr(r,a,u){return React.isValidElement(r)?React.createElement(Fragment,null,r):typeof r=="object"&&!Array.isArray(r)?co(r,a,u):Array.isArray(r)?lo(r,u):typeof r=="boolean"?React.createElement(Fragment,null,r?"\u2705":"\u274C"):React.createElement(Fragment,null,r)}const uo=({value:r,options:a})=>React.createElement(Fragment,null,Gr(r,a)),fo=({title:r,value:a,options:u})=>React.createElement(MetadataTableItem,{title:u&&u.titleFormat?u.titleFormat(r):startCase(r)},React.createElement(uo,{value:a,options:u}));function mo(r,a){return Object.keys(r).map(u=>React.createElement(fo,{key:u,title:u,value:r[u],options:a}))}function Ji(r){const{metadata:a,dense:u=!0,options:f}=r,p=mo(a,f||{});return React.createElement(MetadataTable,{dense:u},p)}var ho=e(49429),go=e(86136),pa=e(79784),Un=e(76635),po=e(19126),mr=e.n(po),yo=e(71919);function Eo(r){return mr().stringify(r,{strictNullHandling:!0})}function ya(r){return mr().parse(r,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Ea(r,a){return ya(r)[a]}function vo(r,a,u){const f={...ya(r),[a]:u};return Eo(f)}function Ao(r,a=250){const[u,f]=(0,C.lr)(),p=u.toString(),[R,F]=(0,t.useState)(Ea(p,r));return(0,t.useEffect)(()=>{const w=Ea(p,r);F(Q=>(0,Un.isEqual)(w,Q)?Q:w)},[p,F,r]),(0,yo.b)(()=>{const w=vo(p,r,R);p!==w&&f(w,{replace:!0})},[f,R,p,r],a),[R,F]}const Ro={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/andrewthauer/backstage/blob/master/app-config.yaml"}]}]};function va(){const a=(0,c.useApiHolder)().get(c.configApiRef),u=a==null?void 0:a.getOptionalConfig("app.support");return u?{url:u.getString("url"),items:u.getConfigArray("items").flatMap(f=>{var p;return{title:f.getString("title"),icon:f.getOptionalString("icon"),links:((p=f.getOptionalConfigArray("links"))!=null?p:[]).flatMap(R=>({url:R.getString("url"),title:R.getString("title")}))}})}:Ro}var So=e(80079);function gn(r,a){const f=(0,c.useApp)().getSystemIcon(r);return f?t.createElement(f,{...a}):t.createElement(So.Z,{...a})}function Qi(r){return gn("brokenImage",r)}function Xi(r){return gn("catalog",r)}function ki(r){return gn("chat",r)}function qi(r){return gn("dashboard",r)}function _i(r){return gn("docs",r)}function el(r){return gn("email",r)}function tl(r){return gn("github",r)}function nl(r){return gn("group",r)}function hr(r){return gn("help",r)}function rl(r){return gn("user",r)}function al(r){return gn("warning",r)}const Co=(0,i.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),To=({icon:r})=>{var f;const a=(0,c.useApp)(),u=r&&(f=a.getSystemIcon(r))!=null?f:hr;return t.createElement(u,null)},Po=({link:r})=>{var a;return t.createElement(S,{to:r.url},(a=r.title)!=null?a:r.url)},Io=({item:r})=>{var a;return t.createElement(_.Z,null,t.createElement(go.Z,null,t.createElement(To,{icon:r.icon})),t.createElement(fe.Z,{primary:r.title,secondary:(a=r.links)==null?void 0:a.reduce((u,f,p)=>[...u,p>0&&t.createElement("br",{key:p}),t.createElement(Po,{link:f,key:f.url})],[])}))};function Lo(r){const{title:a,children:u}=r,{items:f}=va(),[p,R]=(0,t.useState)(!1),[F,w]=(0,t.useState)(null),Q=Co(),H=(0,Ke.Z)(Ce=>Ce.breakpoints.down("sm")),ce=Ce=>{w(Ce.currentTarget),R(!0)},de=()=>{R(!1)};return t.createElement(t.Fragment,null,t.createElement(fn.Z,{display:"flex",ml:1},H?t.createElement(x.Z,{color:"primary",size:"small",onClick:ce,"data-testid":"support-button"},t.createElement(hr,null)):t.createElement(E.Z,{"data-testid":"support-button",color:"primary",onClick:ce,startIcon:t.createElement(hr,null)},"Support")),t.createElement(pa.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:F,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:de},t.createElement(re.Z,{className:Q.popoverList},a&&t.createElement(_.Z,{alignItems:"flex-start"},t.createElement(xe.Z,{variant:"subtitle1"},a)),t.Children.map(u,(Ce,Pe)=>t.createElement(_.Z,{alignItems:"flex-start",key:`child-${Pe}`},Ce)),f&&f.map((Ce,Pe)=>t.createElement(Io,{item:Ce,key:`item-${Pe}`}))),t.createElement(ho.Z,null,t.createElement(E.Z,{color:"primary",onClick:de},"Close"))))}var Kr=e(18671),sn=e(10289);const gr=72,Aa=24,Ra=18,$t={drawerWidthClosed:gr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:gr,iconSize:gr-Aa*2,iconPadding:Aa,selectedIndicatorWidth:3,userBadgePadding:Ra,userBadgeDiameter:gr-Ra*2,mobileSidebarHeight:56},Yr={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:$t.defaultOpenDelayMs+200},ol="@backstage/core/sidebar-intro-dismissed",Xn=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),Sa=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var pr;(function(r){const a="sidebarPinState";r.SIDEBAR_PIN_STATE=a})(pr||(pr={}));const Ca={getSidebarPinState(){let r;try{r=JSON.parse(window.localStorage.getItem(pr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!r},setSidebarPinState(r){return window.localStorage.setItem(pr.SIDEBAR_PIN_STATE,JSON.stringify(r))}},xo=(0,i.Z)(r=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[r.breakpoints.up("sm")]:{paddingLeft:({isPinned:a})=>a?$t.drawerWidthOpen:$t.drawerWidthClosed},[r.breakpoints.down("xs")]:{paddingBottom:$t.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),wn=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),Ta=(0,t.createContext)({content:{contentRef:void 0}});function bo(r){const[a,u]=(0,t.useState)(()=>Ca.getSidebarPinState()),f=(0,t.useRef)(null),p=(0,t.useMemo)(()=>({content:{contentRef:f}}),[f]);(0,t.useEffect)(()=>{Ca.setSidebarPinState(a)},[a]);const R=(0,Ke.Z)(Q=>Q.breakpoints.down("xs"),{noSsr:!0}),F=()=>u(!a),w=xo({isPinned:a});return t.createElement(wn.Provider,{value:{isPinned:a,toggleSidebarPinState:F,isMobile:R}},t.createElement(Ta.Provider,{value:p},t.createElement("div",{className:w.root},r.children)))}function Jr(){const{content:r}=(0,t.useContext)(Ta);return{focusContent:(0,t.useCallback)(()=>{var u,f;(f=(u=r==null?void 0:r.contentRef)==null?void 0:u.current)==null||f.focus()},[r]),contentRef:r==null?void 0:r.contentRef}}var Oo=e(50023),Do=e(4190),Fo=e(87685),Bo=e(44882),Mo=e(57998);const Zo=(0,i.Z)(r=>({root:{flexGrow:0,margin:r.spacing(0,2),color:r.palette.navigation.color},selected:{color:`${r.palette.navigation.selectedColor}!important`,borderTop:`solid ${$t.selectedIndicatorWidth}px ${r.palette.navigation.indicator}`,marginTop:"-1px"},label:{display:"none"}})),No=r=>{const{to:a,label:u,icon:f,value:p}=r,R=Zo(),F=(0,sn.TH)(),{selectedMenuItemIndex:w,setSelectedMenuItemIndex:Q}=(0,t.useContext)(La),H=(de,Ce)=>{Q(Ce===w?-1:Ce)},ce=p===w&&w>=0||p!==w&&!(w>=0)&&a===F.pathname;return t.createElement(Mo.Z,{label:u,icon:f,component:S,to:a||F.pathname,onChange:H,value:p,selected:ce,classes:R})},Pa=r=>{const{children:a,to:u,label:f,icon:p,value:R}=r,{isMobile:F}=(0,t.useContext)(wn);return F?t.createElement(No,{to:u,label:f,icon:p,value:R}):t.createElement(t.Fragment,null,a)},Ia=(0,i.Z)(r=>({root:{position:"fixed",backgroundColor:r.palette.navigation.background,color:r.palette.navigation.color,bottom:0,left:0,right:0,zIndex:r.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:{background:r.palette.navigation.background,width:"100%",bottom:`${$t.mobileSidebarHeight}px`,height:`calc(100% - ${$t.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"},overlayHeader:{display:"flex",color:r.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:r.spacing(2,3)},overlayHeaderClose:{color:r.palette.bursts.fontColor},marginMobileSidebar:{marginBottom:`${$t.mobileSidebarHeight}px`}})),$o=r=>(0,Un.orderBy)(r,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),Uo=t.createElement(Pa).type,wo=({children:r,label:a="Menu",open:u,onClose:f})=>{const p=Ia();return t.createElement(Do.ZP,{anchor:"bottom",open:u,onClose:f,ModalProps:{BackdropProps:{classes:{root:p.marginMobileSidebar}}},classes:{root:p.marginMobileSidebar,paperAnchorBottom:p.overlay}},t.createElement(fn.Z,{className:p.overlayHeader},t.createElement(xe.Z,{variant:"h3"},a),t.createElement(x.Z,{onClick:f,classes:{root:p.overlayHeaderClose}},t.createElement(Fo.Z,null))),t.createElement(fn.Z,null,r))},La=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),zo=r=>{const{children:a}=r,u=Ia(),f=(0,sn.TH)(),[p,R]=(0,t.useState)(-1);(0,t.useEffect)(()=>{R(-1)},[f.pathname]);let F=(0,c.useElementFilter)(a,Q=>Q.getElements().filter(H=>H.type===Uo));if(a)F.length?F=$o(F):F.push(t.createElement(Pa,{key:"default_menu",icon:t.createElement(Bo.Z,null)},a));else return null;const w=p>=0&&!F[p].props.to;return t.createElement(Xn.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(La.Provider,{value:{selectedMenuItemIndex:p,setSelectedMenuItemIndex:R}},t.createElement(wo,{label:F[p]&&F[p].props.label,open:w,onClose:()=>R(-1)},F[p]&&F[p].props.children),t.createElement(Oo.Z,{className:u.root,"data-testid":"mobile-sidebar-root"},F)))},xa=(0,i.Z)(r=>({drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:r.zIndex.appBar,background:r.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:$t.drawerWidthClosed,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:$t.drawerWidthOpen,transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shorter})},visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var nn;(function(r){r[r.Closed=0]="Closed";const u=0+1;r[r.Idle=u]="Idle";const f=u+1;r[r.Open=f]="Open"})(nn||(nn={}));const Wo=r=>{const{openDelayMs:a=$t.defaultOpenDelayMs,closeDelayMs:u=$t.defaultCloseDelayMs,disableExpandOnHover:f,children:p}=r,R=xa(),F=(0,Ke.Z)(bt=>bt.breakpoints.down("md"),{noSsr:!0}),[w,Q]=(0,t.useState)(nn.Closed),H=(0,t.useRef)(),{isPinned:ce,toggleSidebarPinState:de}=(0,t.useContext)(wn),Ce=()=>{ce||f||(H.current&&(clearTimeout(H.current),H.current=void 0),w!==nn.Open&&!F&&(H.current=window.setTimeout(()=>{H.current=void 0,Q(nn.Open)},a),Q(nn.Idle)))},Pe=()=>{ce||f||(H.current&&(clearTimeout(H.current),H.current=void 0),w===nn.Idle?Q(nn.Closed):w===nn.Open&&(H.current=window.setTimeout(()=>{H.current=void 0,Q(nn.Closed)},u)))},Ie=w===nn.Open&&!F||ce,st=bt=>{bt?(Q(nn.Open),de()):(Q(nn.Closed),de())};return t.createElement("div",{style:{}},t.createElement(Vo,null),t.createElement(Xn.Provider,{value:{isOpen:Ie,setOpen:st}},t.createElement("div",{className:R.root,"data-testid":"sidebar-root",onMouseEnter:f?()=>{}:Ce,onFocus:f?()=>{}:Ce,onMouseLeave:f?()=>{}:Pe,onBlur:f?()=>{}:Pe},t.createElement("div",{className:te()(R.drawer,{[R.drawerOpen]:Ie})},p))))},Ho=r=>{const{children:a,openDelayMs:u,closeDelayMs:f,disableExpandOnHover:p}=r,{isMobile:R}=(0,t.useContext)(wn);return R?t.createElement(zo,null,a):t.createElement(Wo,{openDelayMs:u,closeDelayMs:f,disableExpandOnHover:p},a)};function Vo(){const{focusContent:r,contentRef:a}=Jr(),u=xa();return(a==null?void 0:a.current)?t.createElement(E.Z,{onClick:r,variant:"contained",className:te()(u.visuallyHidden)},"Skip to content"):null}function ba(r,a){const u=new URLSearchParams(a.search).toString(),f=mr().parse(u),p=new URLSearchParams(r.search).toString(),R=mr().parse(p);return(0,Un.isEqual)(a.pathname,r.pathname)&&(0,Un.isMatch)(R,f)}const jo=(0,i.Z)(r=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:r.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:r.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},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0"},textContent:{color:r.palette.navigation.color,display:"flex",justifyContent:"center",[r.breakpoints.down("xs")]:{display:"block",paddingLeft:r.spacing(4)},fontSize:"14px"}}),{name:"BackstageSidebarSubmenuItem"}),sl=r=>{const{title:a,to:u,icon:f,dropdownItems:p}=r,R=jo(),{setIsHoveredOn:F}=useContext(SidebarItemWithSubmenuContext),w=()=>{F(!1)},Q=useResolvedPath(u),H=useLocation();let ce=isLocationMatch(H,Q);const[de,Ce]=useState(!1),Pe=()=>{Ce(!de)};return p!==void 0?(p.some(Ie=>{const st=resolvePath(Ie.to);return ce=isLocationMatch(H,st),ce}),React.createElement("div",{className:R.itemContainer},React.createElement("button",{onClick:Pe,onTouchStart:Ie=>Ie.stopPropagation(),className:classnames(R.item,ce?R.selected:void 0)},React.createElement(f,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:R.label},a),de?React.createElement(ArrowDropUpIcon,{className:R.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:R.dropdownArrow})),p&&de&&React.createElement("div",{className:R.dropdown},p.map((Ie,st)=>React.createElement(Link,{to:Ie.to,underline:"none",className:R.dropdownItem,onClick:w,onTouchStart:bt=>bt.stopPropagation(),key:st},React.createElement(Typography,{className:R.textContent},Ie.title)))))):React.createElement("div",{className:R.itemContainer},React.createElement(Link,{to:u,underline:"none",className:classnames(R.item,ce?R.selected:void 0),onClick:w,onTouchStart:Ie=>Ie.stopPropagation()},React.createElement(f,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:R.label},a)))},Go=r=>(0,i.Z)(a=>{var u,f;return{root:{zIndex:1e3,position:"relative",overflow:"visible",width:a.spacing(7)+1},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[a.breakpoints.up("sm")]:{marginLeft:r.left,transition:a.transitions.create("margin-left",{easing:a.transitions.easing.sharp,duration:a.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(f=(u=a.palette.navigation.submenu)==null?void 0:u.background)!=null?f:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:Yr.drawerWidthClosed,transitionDelay:`${Yr.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:Yr.drawerWidthOpen,[a.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:a.spacing(3),left:0,top:0}},title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[a.breakpoints.down("xs")]:{display:"none"}}}},{name:"BackstageSidebarSubmenu"}),Ko=r=>{const{isOpen:a}=(0,t.useContext)(Xn),u=a?$t.drawerWidthOpen:$t.drawerWidthClosed,f=Go({left:u})(),{isHoveredOn:p}=(0,t.useContext)(Sa),[R,F]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{F(p)},[p]),t.createElement("div",{className:te()(f.drawer,{[f.drawerOpen]:R})},t.createElement(xe.Z,{variant:"h5",className:f.title},r.title),r.children)};var yr=e(76600),Yo=e(26739),Jo=e(98989),Qo=e(59797),Xo=e(83543);const ko=(0,i.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),il=()=>{const r=ko();return React.createElement("div",{className:r.iconContainer},React.createElement("div",{className:r.arrow1},React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})))};var ll=null;const qo=(0,i.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),cl=()=>{const r=qo();return React.createElement("div",{className:r.iconContainer},React.createElement("div",{className:r.arrow1},React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})))};var ul=null;const Er=(0,i.Z)(r=>{var R,F,w,Q;const{selectedIndicatorWidth:a,drawerWidthClosed:u,drawerWidthOpen:f,iconContainerWidth:p}=$t;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:u,justifyContent:"center"},open:{[r.breakpoints.up("sm")]:{width:f}},highlightable:{"&:hover":{background:(F=(R=r.palette.navigation.navItem)==null?void 0:R.hoverBackground)!=null?F:"#404040"}},highlighted:{background:(Q=(w=r.palette.navigation.navItem)==null?void 0:w.hoverBackground)!=null?Q:"#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:p,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:f-p},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 ${a}px ${r.palette.navigation.indicator}`,color:r.palette.navigation.selectedColor},"&$closed":{width:u},"& $closedItemIcon":{paddingRight:a},"& $iconContainer":{marginLeft:-a}}}},{name:"BackstageSidebarItem"}),_o=(r,a)=>(0,c.useElementFilter)(r.props.children,u=>{let f=!1;return u.getElements().forEach(({props:{to:p,dropdownItems:R}})=>{if(!f){if(R==null?void 0:R.length){R.forEach(({to:F})=>f=f||ba(a,(0,sn.i3)(F)));return}p&&(f=ba(a,(0,sn.i3)(p)))}}),f},[a.pathname]);function Oa(r){return r.to===void 0}const es=t.createElement(Ko).type,ts=t.forwardRef(function({to:a,end:u,style:f,className:p,activeStyle:R,caseSensitive:F,activeClassName:w="active","aria-current":Q="page",...H},ce){let{pathname:de}=(0,sn.TH)(),{pathname:Ce}=(0,sn.WU)(a);F||(de=de.toLocaleLowerCase("en-US"),Ce=Ce.toLocaleLowerCase("en-US"));let Pe=de===Ce;!Pe&&!u&&(Pe=de.startsWith(`${Ce}/`));const Ie=Pe?Q:void 0;return t.createElement(C.rU,{...H,to:a,ref:ce,"aria-current":Ie,style:{...f,...Pe?R:void 0},className:te()([p,Pe?w:void 0])})}),Da=(0,t.forwardRef)((r,a)=>{const{icon:u,text:f,hasNotifications:p=!1,disableHighlight:R=!1,onClick:F,children:w,className:Q,...H}=r,ce=Er(),{isOpen:de}=(0,t.useContext)(Xn),Ce=t.createElement(Yo.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:te()({[ce.closedItemIcon]:!de})},t.createElement(u,{fontSize:"small"})),Pe=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:ce.iconContainer},Ce),f&&t.createElement(xe.Z,{variant:"subtitle2",className:ce.label},f),t.createElement("div",{className:ce.secondaryAction},w)),Ie=de?Pe:Ce,st={onClick:F,className:te()(Q,ce.root,de?ce.open:ce.closed,Oa(r)&&ce.buttonItem,{[ce.highlightable]:!R})};return Oa(r)?t.createElement("button",{"aria-label":f,...st,ref:a},Ie):t.createElement(ts,{...st,activeClassName:ce.selected,to:r.to?r.to:"",ref:a,"aria-label":f||r.to,...H},Ie)}),ns=({children:r,...a})=>{const u=Er(),[f,p]=(0,t.useState)(!1),R=(0,sn.TH)(),F=_o(r,R),w=(0,Ke.Z)(de=>de.breakpoints.down("sm")),Q=()=>{p(!0)},H=()=>{p(!1)},ce=()=>w?f?t.createElement(Qo.Z,{fontSize:"small",className:u.submenuArrow}):t.createElement(Xo.Z,{fontSize:"small",className:u.submenuArrow}):!f&&t.createElement(Jo.Z,{fontSize:"small",className:u.submenuArrow});return t.createElement(Sa.Provider,{value:{isHoveredOn:f,setIsHoveredOn:p}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:H,onTouchStart:f?H:Q,onMouseEnter:Q,className:te()(f&&u.highlighted)},t.createElement(Da,{className:F?u.selected:"",...a},ce()),f&&r))},Fa=(0,t.forwardRef)((r,a)=>{const[u]=(0,c.useElementFilter)(r.children,f=>f.getElements().filter(p=>p.type===es));return u?t.createElement(ns,{...r},u):t.createElement(Da,{...r,ref:a})});function dl(r){const[a,u]=useState(""),f=Er(),p=r.icon?r.icon:SearchIcon,R=()=>{r.onSearch(a),u("")},F=ce=>{ce.key==="Enter"&&(ce.preventDefault(),R())},w=ce=>{u(ce.target.value)},Q=ce=>{ce.preventDefault(),ce.stopPropagation()},H=ce=>{R(),ce.preventDefault()};return React.createElement("div",{className:f.searchRoot},React.createElement(Fa,{icon:p,to:r.to,onClick:H,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:a,onClick:Q,onChange:w,onKeyDown:F,className:f.searchContainer,InputProps:{disableUnderline:!0,className:f.searchField},inputProps:{className:f.searchFieldHTMLInput}})))}const fl=(0,yr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),ml=(0,yr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),rs=(0,yr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),as=r=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:r.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:r.palette.text.hint,borderRadius:"5px"}}),hl=(0,yr.Z)("div")(({theme:r})=>{const a=as(r);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),gl=()=>{const r=Er(),{isOpen:a,setOpen:u}=useContext(SidebarContext);if(useMediaQuery(R=>R.breakpoints.down("md"),{noSsr:!0}))return null;const p=()=>{u(!a)};return React.createElement("button",{onClick:p,className:r.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:r.arrows},a?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},os=(0,i.Z)(r=>({introCard:{color:"#b5b5b5",fontSize:12,width:$t.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:$t.iconPadding,paddingRight:$t.iconPadding},introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:r.palette.linkHover,transition:r.transitions.create("color",{easing:r.transitions.easing.sharp,duration:r.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function ss(r){const a=os(),{text:u,onClose:f}=r,p=()=>f();return React.createElement("div",{className:a.introCard},React.createElement(Typography,{variant:"subtitle2"},u),React.createElement("div",{className:a.introDismiss},React.createElement(Link,{component:"button",onClick:p,underline:"none",className:a.introDismissLink},React.createElement(CloseIcon,{className:a.introDismissIcon}),React.createElement(Typography,{component:"span",className:a.introDismissText},"Dismiss"))))}const Ba=r=>{const{text:a,onDismiss:u}=r,[f,p]=useState(!1),R=()=>{p(!0)};return React.createElement(Collapse,{in:!f,onExited:u},React.createElement(ss,{text:a,onClose:R}))},is=null,ls="And your recently viewed plugins will pop up here!";function pl(r){const{isOpen:a}=useContext(SidebarContext),u={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[f,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:R,recentlyViewedItemsDismissed:F}=f!=null?f:{},w=()=>{p(H=>({...u,...H,starredItemsDismissed:!0}))},Q=()=>{p(H=>({...u,...H,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!R&&React.createElement(React.Fragment,null,React.createElement(Ba,{text:is,onDismiss:w}),React.createElement(SidebarDivider,null)),!F&&React.createElement(Ba,{text:ls,onDismiss:Q})):null}const cs=(0,i.Z)(r=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:r.spacing(3),paddingBottom:r.spacing(3),paddingLeft:r.spacing(2),paddingRight:r.spacing(2),[r.breakpoints.up("sm")]:{paddingLeft:r.spacing(3),paddingRight:r.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function Ma(r){const{className:a,stretch:u,noPadding:f,children:p,...R}=r,{contentRef:F}=Jr(),w=cs();return t.createElement("article",{ref:F,tabIndex:-1,...R,className:te()(w.root,a,{[w.stretch]:u,[w.noPadding]:f})},p)}var us=e(6487),ds=e(99152);const fs=(0,i.Z)(r=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:r.palette.background.paper,paddingLeft:r.spacing(3)},defaultTab:{padding:r.spacing(3,3),...r.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:r.palette.text.secondary},selected:{color:r.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:r.palette.background.default,color:r.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function Za(r){const{tabs:a,onChange:u,selectedIndex:f}=r,[p,R]=(0,t.useState)(f!=null?f:0),F=fs(),w=(Q,H)=>{f===void 0&&R(H),u&&u(H)};return(0,t.useEffect)(()=>{f!==void 0&&R(f)},[f]),t.createElement("div",{className:F.tabsWrapper},t.createElement(ds.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:w,value:p},a.map((Q,H)=>t.createElement(us.Z,{...Q.tabProps,"data-testid":`header-tab-${H}`,label:Q.label,key:Q.id,value:H,className:F.defaultTab,classes:{selected:F.selected,root:F.tabRoot}}))))}function ms(r){var w,Q,H;const a=(0,sn.UO)(),f=r.map(({path:ce,children:de})=>({caseSensitive:!1,path:`${ce}/*`,element:de})).sort((ce,de)=>de.path.replace(/\/\*$/,"").localeCompare(ce.path.replace(/\/\*$/,""))),p=(w=(0,sn.V$)(f))!=null?w:r[0].children,[R]=(Q=(0,sn.fp)(f,`/${a["*"]}`))!=null?Q:[],F=R?r.findIndex(ce=>`${ce.path}/*`===R.route.path):0;return{index:F===-1?0:F,element:p,route:(H=r[F])!=null?H:r[0]}}function Na(r){const{routes:a}=r,u=(0,sn.s0)(),{index:f,route:p,element:R}=ms(a),F=(0,t.useMemo)(()=>a.map(Q=>({id:Q.path,label:Q.title,tabProps:Q.tabProps})),[a]),w=Q=>u(a[Q].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Za,{tabs:F,selectedIndex:f,onChange:w}),t.createElement(Ma,null,t.createElement(Kr.q,{title:p.title}),R))}const Qr=()=>null;(0,c.attachComponentData)(Qr,"core.gatherMountPoints",!0);function $a(r){const a=t.createElement(Qr,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(r).flatMap(u=>{if(!(0,t.isValidElement)(u))return[];if(u.type===t.Fragment)return $a(u.props.children);if(u.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:f,title:p,children:R,tabProps:F}=u.props;return[{path:f,title:p,children:R,tabProps:F}]})}function hs(r){const a=$a(r.children);return t.createElement(Na,{routes:a})}hs.Route=Qr;const gs=(0,i.Z)(r=>({value:{marginBottom:"6px"},subvalue:{color:r.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function ps(r){const{value:a,subvalue:u}=r,f=gs();return t.createElement(t.Fragment,null,t.createElement("div",{className:f.value},a),t.createElement("div",{className:f.subvalue},u))}var ys=e(21070),Es=e(90324),vs=e(98281),As=e(48049),Ua=e(51209),wa=e(33375),Rs=e(44233),Ss=e(27604),Xr=e(36444),Cs=e(37971),Ts=e(59709),Ps=e(17373),Is=e(3702),Ls=e(93111),vr=e(67222);const xs=(0,i.Z)(r=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:r.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${r.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:r.spacing(2)}}}),{name:"BackstageTableFilters"}),bs=r=>{var Q;const a=xs(),{onChangeFilters:u}=r,[f,p]=(0,t.useState)({...r.selectedFilters}),[R,F]=(0,t.useState)(!1),w=()=>{p({}),F(H=>!H)};return(0,t.useEffect)(()=>{u(f)},[f,u]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(E.Z,{color:"primary",onClick:w},"Clear all")),t.createElement("div",{className:a.filters},((Q=r.filters)==null?void 0:Q.length)&&r.filters.map(H=>t.createElement(Ft,{triggerReset:R,key:H.element.label,...H.element,selected:f[H.element.label],onChange:ce=>p({...f,[H.element.label]:ce})}))))},Os={Add:(0,t.forwardRef)((r,a)=>t.createElement(ys.Z,{...r,ref:a})),Check:(0,t.forwardRef)((r,a)=>t.createElement(vs.Z,{...r,ref:a})),Clear:(0,t.forwardRef)((r,a)=>t.createElement(wa.Z,{...r,ref:a})),Delete:(0,t.forwardRef)((r,a)=>t.createElement(Rs.Z,{...r,ref:a})),DetailPanel:(0,t.forwardRef)((r,a)=>t.createElement(Ua.Z,{...r,ref:a})),Edit:(0,t.forwardRef)((r,a)=>t.createElement(Ss.Z,{...r,ref:a})),Export:(0,t.forwardRef)((r,a)=>t.createElement(Is.Z,{...r,ref:a})),Filter:(0,t.forwardRef)((r,a)=>t.createElement(Xr.Z,{...r,ref:a})),FirstPage:(0,t.forwardRef)((r,a)=>t.createElement(Cs.Z,{...r,ref:a})),LastPage:(0,t.forwardRef)((r,a)=>t.createElement(Ts.Z,{...r,ref:a})),NextPage:(0,t.forwardRef)((r,a)=>t.createElement(Ua.Z,{...r,ref:a})),PreviousPage:(0,t.forwardRef)((r,a)=>t.createElement(As.Z,{...r,ref:a})),ResetSearch:(0,t.forwardRef)((r,a)=>t.createElement(wa.Z,{...r,ref:a})),Search:(0,t.forwardRef)((r,a)=>t.createElement(Xr.Z,{...r,ref:a})),SortArrow:(0,t.forwardRef)((r,a)=>t.createElement(Es.Z,{...r,ref:a})),ThirdStateCheck:(0,t.forwardRef)((r,a)=>t.createElement(Ps.Z,{...r,ref:a})),ViewColumn:(0,t.forwardRef)((r,a)=>t.createElement(Ls.Z,{...r,ref:a}))};function za(r,a){const u=a.split(".");let f=r[u[0]];for(let p=1;p<u.length;++p){if(f===void 0)return f;const R=u[p];f=f[R]}return f}const Ds=(0,Xt.Z)(r=>({header:{padding:r.spacing(1,2,1,2.5),borderTop:`1px solid ${r.palette.grey.A100}`,borderBottom:`1px solid ${r.palette.grey.A100}`,color:r.palette.textSubtle,fontWeight:r.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(vr.W$),Wa=(0,Xt.Z)(r=>({root:{padding:r.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:r.spacing(2)}}),{name:"BackstageTableToolbar"})(vr.UW),Fs=(0,i.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Bs=(0,i.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function Ms(r,a){return r.map(u=>{const f={};let p=u.cellStyle||{};if(u.highlight)if(f.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const R=p;p=(F,w,Q)=>({...R(F,w,Q),fontWeight:a.typography.fontWeightBold})}return{...u,headerStyle:f,cellStyle:p}})}function Zs(r,a){return(0,Un.transform)(r,(u,f,p)=>{(0,Un.isEqual)(f,a[p])||(u[p]=f)})}const Ha={search:"",filtersOpen:!1,filters:{}};function Ns(r){const{toolbarRef:a,setSearch:u,hasFilters:f,selectedFiltersLength:p,toggleFilters:R}=r,F=Fs(),w=(0,t.useCallback)(Q=>{r.onSearchChanged(Q),u(Q)},[r,u]);return f?t.createElement("div",{className:F.root},t.createElement("div",{className:F.root},t.createElement(x.Z,{onClick:R,"aria-label":"filter list"},t.createElement(Xr.Z,null)),t.createElement(xe.Z,{className:F.title},"Filters (",p,")")),t.createElement(Wa,{...r,ref:a,onSearchChanged:w})):t.createElement(Wa,{...r,ref:a,onSearchChanged:w})}function $s(r){const{data:a,columns:u,options:f,title:p,subtitle:R,filters:F,initialState:w,emptyContent:Q,onStateChange:H,...ce}=r,de=Bs(),Ce=(0,T.Z)(),Pe={...Ha,...w},[Ie,st]=(0,t.useState)(Pe.filtersOpen),bt=(0,t.useCallback)(()=>st(Jt=>!Jt),[st]),[jt,Ut]=(0,t.useState)(0),[ot,xt]=(0,t.useState)(a),[Ot,Gt]=(0,t.useState)(Pe.filters),Tn=Ms(u,Ce),[ln,qn]=(0,t.useState)(Pe.search);(0,t.useEffect)(()=>{if(H){const Jt=Zs({search:ln,filtersOpen:Ie,filters:Ot},Ha);H(Jt)}},[ln,Ie,Ot,H]);const Pt={headerStyle:{textTransform:"uppercase"}},Pn=(0,t.useCallback)(Jt=>{var rn;return(rn=u.find(cn=>cn.title===Jt))==null?void 0:rn.field},[u]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!Ot){xt(a);return}const Jt=Object.values(Ot);if(a&&Jt.flat().length){const rn=a.filter(cn=>!!Object.entries(Ot).filter(([,On])=>!!On.length).every(([On,Wt])=>{const Ht=za(cn,Pn(On));return Array.isArray(Ht)&&Array.isArray(Wt)?Ht.some(zn=>Wt.includes(zn)):Array.isArray(Ht)?Ht.includes(Wt):Array.isArray(Wt)?Wt.includes(Ht):Ht===Wt}));xt(rn)}else xt(a);Ut(Jt.flat().length)},[a,Ot,Pn]);const ta=(Jt,rn)=>{const cn=Wt=>{const Ht=new Set,zn=Dn=>{Dn!=null&&Ht.add(Dn)};return rn&&rn.forEach(Dn=>{const Wn=za(Dn,Pn(Wt));Array.isArray(Wn)?Wn.forEach(zn):zn(Wn)}),Ht},On=Wt=>({placeholder:"All results",label:Wt.column,multiple:Wt.type==="multiple-select",items:[...cn(Wt.column)].sort().map(Ht=>({label:Ht,value:Ht}))});return Jt.map(Wt=>({type:Wt.type,element:On(Wt)}))},bn=!!(F==null?void 0:F.length),na=(0,t.useCallback)(Jt=>t.createElement(Ns,{setSearch:qn,hasFilters:bn,selectedFiltersLength:jt,toggleFilters:bt,...Jt}),[bt,bn,jt,qn]),Rr=typeof a!="function"&&a.length===0,Sr=u.length,ra=(0,t.useCallback)(Jt=>Q&&Rr?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:Sr},Q))):t.createElement(vr.os,{...Jt}),[Rr,Q,Sr]);return t.createElement("div",{className:de.root},Ie&&a&&typeof a!="function"&&(F==null?void 0:F.length)&&t.createElement(bs,{filters:ta(F,a),selectedFilters:Ot,onChangeFilters:Gt}),t.createElement(vr.ZP,{components:{Header:Ds,Toolbar:na,Body:ra},options:{...Pt,...f},columns:Tn,icons:Os,title:t.createElement(t.Fragment,null,t.createElement(xe.Z,{variant:"h5",component:"h3"},p),R&&t.createElement(xe.Z,{color:"textSecondary",variant:"body1"},R)),data:typeof a=="function"?a:ot,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...ce}))}const yl=r=>{const{children:a,value:u,index:f,...p}=r;return React.createElement("div",{role:"tabpanel",hidden:u!==f,"aria-labelledby":`scrollable-auto-tab-${f}`,...p},u===f&&React.createElement(Box,{p:3},a))},Us=(0,i.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:r=>r.isNext?"auto":"0",marginRight:r=>r.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),El=r=>{const a=Us(r),{ariaLabel:u,onClick:f}=r;return React.createElement(IconButton,{onClick:f,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":u},r.children)},ws=(r,a)=>a?r?"20px":"0":"40px",zs=(0,i.Z)(r=>({root:{textTransform:"none",height:"64px",fontWeight:r.typography.fontWeightBold,fontSize:r.typography.pxToRem(13),color:r.palette.textSubtle,marginLeft:a=>ws(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:r.palette.textSubtle}}})),vl=r=>{const a=zs(r),{isFirstNav:u,isFirstIndex:f,...p}=r;return React.createElement(Tab,{className:a.root,disableRipple:!0,...p})},Ws=(0,i.Z)(r=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:r.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Al=r=>{const a=Ws(r);return React.createElement(Tabs,{classes:a,...r,TabIndicatorProps:{children:React.createElement("span",null)}})},Hs=(0,i.Z)(r=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:r.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:r.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Rl(r){const{tabs:a}=r,u=Hs(),[f,p]=useState([0,0]),[R,F]=useState(0),[w,Q]=useState(0),[H,ce]=useState([[]]),de=useRef(),{width:Ce}=useWindowSize(),Pe=(Ut,ot)=>{p([R,ot])},Ie=()=>{F(R-1)},st=()=>{F(R+1)},bt=()=>R+1<H.length;useEffect(()=>{const ot=R===0?1:2,xt=de.current.offsetWidth-20-ot*30,Ot=f[0]*w+f[1],Gt=Math.floor(xt/170);Q(Gt),ce(chunkArray(a,Gt)),p([Math.floor(Ot/Gt),Ot%Gt])},[Ce,a]);const jt=R===f[0]?f[1]:!1;return React.createElement("div",{className:u.root},React.createElement(AppBar,{ref:de,className:u.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:jt,onChange:Pe,selectionFollowsFocus:!0},R!==0&&React.createElement(StyledIcon,{onClick:Ie,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),H[R].map((Ut,ot)=>React.createElement(StyledTab,{value:ot,isFirstIndex:ot===0,isFirstNav:R===0,key:ot,icon:Ut.icon||void 0,label:Ut.label||void 0})),bt()&&React.createElement(StyledIcon,{isNext:!0,onClick:st,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),jt!==!1?H[R].map((Ut,ot)=>React.createElement(TabPanel,{key:ot,value:ot,index:jt},Ut.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:f[1],index:f[1]},H[f[0]][f[1]].content))}var Sl=e(44311);function Vs(r,a){const u=r[r.length-1];if(!!u)return u>=.9?a.palette.status.ok:u>=.5?a.palette.status.warning:a.palette.status.error}function Cl(r){var u;const a=useTheme();return r.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...r},r.title&&React.createElement("title",null,r.title),React.createElement(SparklinesLine,{color:(u=r.color)!=null?u:Vs(r.data,a)})):null}const js=r=>(0,i.Z)(a=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:a.spacing(2),textAlign:r.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:a.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),Gs=({title:r="Unknown page",className:a})=>t.createElement(xe.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},r);function Ks(r){const{description:a,title:u,titleComponent:f=void 0,children:p,textAlign:R="left"}=r,F=js({textAlign:R})(),w=f||t.createElement(Gs,{title:u,className:F.title});return t.createElement(t.Fragment,null,t.createElement(Kr.q,{title:u}),t.createElement("div",{className:F.container},t.createElement("div",{className:F.leftItemsBox},w,a&&t.createElement(xe.Z,{className:F.description,variant:"body2"},a)),t.createElement("div",{className:F.rightItemsBox},p)))}var Ys=e(29788);const Js=(0,i.Z)(r=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:r.spacing(2),right:r.spacing(2),[r.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${r.spacing(10)}px auto ${r.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),Qs=()=>{const r=Js();return t.createElement("img",{src:Ys,className:r.micDrop,alt:"Girl dropping mic from her hands"})},Xs=(0,i.Z)(r=>({container:{padding:r.spacing(8),[r.breakpoints.down("xs")]:{padding:r.spacing(2)}},title:{paddingBottom:r.spacing(5),[r.breakpoints.down("xs")]:{paddingBottom:r.spacing(4),fontSize:32}},subtitle:{color:r.palette.textSubtle}}),{name:"BackstageErrorPage"});function ks(r){const{status:a,statusMessage:u,additionalInfo:f,supportUrl:p}=r,R=Xs(),F=(0,sn.s0)(),w=va();return t.createElement(Te.Z,{container:!0,spacing:0,className:R.container},t.createElement(Qs,null),t.createElement(Te.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(xe.Z,{"data-testid":"error",variant:"body1",className:R.subtitle},"ERROR ",a,": ",u),t.createElement(xe.Z,{variant:"body1",className:R.subtitle},f),t.createElement(xe.Z,{variant:"h2",className:R.title},"Looks like someone dropped the mic!"),t.createElement(xe.Z,{variant:"h6"},t.createElement(S,{to:"#","data-testid":"go-back-link",onClick:()=>F(-1)},"Go back"),"... or please"," ",t.createElement(S,{to:p||w.url},"contact support")," if you think this is a bug.")))}var _s=e(16173);const ei=(0,Xt.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(xe.Z),kr=(0,Xt.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(fn.Z);function ti(r){const{children:a,...u}=r,[f,p]=t.useState(null),R=t.Children.toArray(a),[F,w,...Q]=R,H=Q.length?Q.pop():R[R.length-1],ce=R.length>3,de=Ie=>{p(Ie.currentTarget)},Ce=()=>{p(null)},Pe=Boolean(f);return t.createElement(t.Fragment,null,t.createElement(_s.Z,{"aria-label":"breadcrumb",...u},R.length>1&&t.createElement(kr,{clone:!0},F),R.length>2&&t.createElement(kr,{clone:!0},w),ce&&t.createElement(ei,{onClick:de},"..."),t.createElement(fn.Z,{style:{fontStyle:"italic"}},H)),t.createElement(pa.ZP,{open:Pe,anchorEl:f,onClose:Ce,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(re.Z,null,Q.map((Ie,st)=>t.createElement(_.Z,{key:st,button:!0},t.createElement(kr,{clone:!0},Ie))))))}const ni=(0,i.Z)(r=>({header:{gridArea:"pageHeader",padding:r.spacing(3),width:"100%",boxShadow:r.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:r.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[r.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:r.palette.bursts.fontColor,wordBreak:"break-all",fontSize:r.typography.h3.fontSize,marginBottom:0},subtitle:{color:r.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:r.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:r.spacing(1),color:r.palette.bursts.fontColor},breadcrumb:{color:r.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-r.spacing(.3),marginBottom:r.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-r.spacing(.3),marginBottom:r.spacing(.3)}}),{name:"BackstageHeader"}),ri=({type:r,typeLink:a,classes:u,pageTitle:f})=>r?a?t.createElement(ti,{className:u.breadcrumb},t.createElement(S,{to:a},r),t.createElement(xe.Z,null,f)):t.createElement(xe.Z,{className:u.type},r):null,ai=({pageTitle:r,classes:a,tooltip:u})=>{const f=t.createElement(xe.Z,{className:a.title,variant:"h1"},r);return u?t.createElement(D.ZP,{title:u,placement:"top-start"},f):f},oi=({classes:r,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(xe.Z,{className:r.subtitle,variant:"subtitle2",component:"span"},a):null;function Va(r){const{children:a,pageTitleOverride:u,style:f,subtitle:p,title:R,tooltip:F,type:w,typeLink:Q}=r,H=ni(),de=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",Ce=u||R,Pe=R||u,Ie=`${Ce} | %s | ${de}`,st=`${Ce} | ${de}`;return t.createElement(t.Fragment,null,t.createElement(Kr.q,{titleTemplate:Ie,defaultTitle:st}),t.createElement("header",{style:f,className:H.header},t.createElement(fn.Z,{className:H.leftItemsBox},t.createElement(ri,{classes:H,type:w,typeLink:Q,pageTitle:Pe}),t.createElement(ai,{classes:H,pageTitle:Pe,tooltip:F}),t.createElement(oi,{classes:H,subtitle:p})),t.createElement(Te.Z,{container:!0,className:H.rightItemsBox,spacing:4},a)))}const si=(0,i.Z)(r=>({root:{textAlign:"left"},label:{color:r.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:r.typography.fontSize,marginBottom:r.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:r.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),ii=({value:r,className:a})=>t.createElement(xe.Z,{className:a},r);function li(r){const{label:a,value:u,url:f}=r,p=si(),R=t.createElement(ii,{className:p.value,value:u||"<Unknown>"});return t.createElement(Te.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(xe.Z,{className:p.label},a),f?t.createElement(S,{to:f},R):R))}const ci={hour:"2-digit",minute:"2-digit"};function ja(r){const a=new Date,u=window.navigator.language,f=[];if(!r.has("homepage.clocks"))return f;const p=r.getConfigArray("homepage.clocks");for(const R of p)if(R.has("label")&&R.has("timezone")){let F=R.getString("label");const w={timeZone:R.getString("timezone"),...ci};try{new Date().toLocaleString(u,w)}catch{console.warn(`The timezone ${w.timeZone} is invalid. Defaulting to GMT`),w.timeZone="GMT",F="GMT"}const Q=a.toLocaleTimeString(u,w);f.push({time:Q,label:F})}return f}function Tl(r){const a=useApi(configApiRef),u=[],[f,p]=React.useState(u);return React.useEffect(()=>{p(ja(a));const R=setInterval(()=>{p(ja(a))},1e3);return()=>{clearInterval(R)}},[a]),f.length!==0?React.createElement(React.Fragment,null,f.map(R=>React.createElement(HeaderLabel,{label:R.label,value:R.time,key:R.label}))):null}const ui=r=>(0,o.Z)({root:{color:r.palette.common.white,padding:r.spacing(2,2,3),backgroundImage:r.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),di=(0,i.Z)(ui,{name:"BackstageItemCardHeader"});function fi(r){const{title:a,subtitle:u,children:f}=r,p=di(r);return t.createElement("div",{className:p.root},u&&t.createElement(xe.Z,{variant:"subtitle2",component:"h3"},u),a&&t.createElement(xe.Z,{variant:"h6",component:"h4"},a),f)}function Pl(r){const{description:a,tags:u,title:f,type:p,subtitle:R,label:F,onClick:w,href:Q}=r;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:f,subtitle:R||p})),React.createElement(CardContent,null,(u==null?void 0:u.length)?React.createElement(Box,null,u.map((H,ce)=>React.createElement(Chip,{size:"small",label:H,key:ce}))):null,a),React.createElement(CardActions,null,!Q&&React.createElement(Button,{to:"#",onClick:w,color:"primary"},F),Q&&React.createElement(Button,{to:Q,color:"primary"},F)))}const mi=r=>(0,o.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:r.spacing(2)}}),hi=(0,i.Z)(mi,{name:"BackstageItemCardGrid"});function gi(r){const{children:a,...u}=r,f=hi(u);return t.createElement("div",{className:f.root,...u},a)}var pi=e(41547);const yi=(0,i.Z)(()=>({root:({isMobile:r})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:r?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function Ga(r){const{themeId:a,children:u}=r,{isMobile:f}=(0,t.useContext)(wn),p=yi({isMobile:f});return t.createElement(pi.Z,{theme:R=>({...R,page:R.getPageTheme({themeId:a})})},t.createElement("div",{className:p.root},u))}function Ei(r){const{themeId:a,children:u,...f}=r;return t.createElement(Ga,{themeId:a},t.createElement(Va,{...f}),u)}var qt=e(30195);const Il=qt.z.object({providerInfo:qt.z.object({}).catchall(qt.z.unknown()).optional(),profile:qt.z.object({email:qt.z.string().optional(),displayName:qt.z.string().optional(),picture:qt.z.string().optional()}),backstageIdentity:qt.z.object({token:qt.z.string(),identity:qt.z.object({type:qt.z.literal("user"),userEntityRef:qt.z.string(),ownershipEntityRefs:qt.z.array(qt.z.string())})})}),Ka={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function vi(r){const a=new Date(Date.now()+Ka.defaultTokenExpiryMillis);if(!r)return a;const[u,f,p]=r.split("."),R=JSON.parse(atob(f));return typeof R.exp!="number"?a:new Date(R.exp*1e3-Ka.tokenExpiryMarginMillis)}class Ll{constructor(a){ie(this,"options");ie(this,"abortController");ie(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),u=a.identity.userEntityRef,f=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(u);if(!f)throw new TypeError(`Invalid user entity reference "${u}"`);return f[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 a=this.state.type==="active"?this.state.session:void 0,u=this.fetchSession().then(f=>(this.state={type:"active",session:f,expiresAt:vi(f.backstageIdentity.token)},f),f=>{throw this.state={type:"failed",error:f},f});return this.state={type:"fetching",promise:u,previous:a},u}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),u=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!u.ok)throw await ResponseError.fromResponse(u);return proxiedSessionSchema.parse(await u.json())}}const xl=r=>{const a=useApi(discoveryApiRef),[{status:u,error:f},{execute:p}]=useAsync(async()=>{const R=new ProxiedSignInIdentity({provider:r.provider,discoveryApi:a});await R.start(),r.onSignInSuccess(R)});return useMountEffect(p),u==="loading"?React.createElement(Progress,null):f?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:f}):null},Ai=(0,i.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),qr=({children:r})=>{const a=Ai();return t.createElement(Te.Z,{component:"li",item:!0,classes:a},r)};class _r{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 a="user:default/guest";return{type:"user",userEntityRef:a,ownershipEntityRefs:[a]}}async getCredentials(){return{}}async signOut(){}}function Ri(r){const[a,u,f]=r.split(".");return JSON.parse(atob(u))}class ea{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new ea(a)}async getIdToken(){var a,u;return(u=(a=this.result).getIdToken)==null?void 0:u.call(a)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const a=await this.getIdToken();if(!a){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:u,ent:f}=Ri(a);return{type:"user",userEntityRef:u,ownershipEntityRefs:f!=null?f:[]}}async getCredentials(){var u,f;return{token:await((f=(u=this.result).getIdToken)==null?void 0:f.call(u))}}async signOut(){var a,u;return(u=(a=this.result).signOut)==null?void 0:u.call(a)}}class kn{constructor(a,u,f){ie(this,"profilePromise");this.identity=a,this.authApi=u,this.profile=f}static createGuest(){return new _r}static fromLegacy(a){return ea.fromResult(a)}static create(a){return new kn(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,u=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!u)throw new TypeError(`Invalid user entity reference "${a}"`);return u[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(a){throw this.profilePromise=void 0,a}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Si={Component:({config:r,onSignInSuccess:a})=>{const{apiRef:u,title:f,message:p}=r,R=(0,c.useApi)(u),F=(0,c.useApi)(c.errorApiRef),w=async()=>{try{const Q=await R.getBackstageIdentity({instantPopup:!0});if(!Q)throw new Error(`The ${f} provider is not configured to support sign-in`);const H=await R.getProfile();a(kn.create({identity:Q.identity,profile:H,authApi:R}))}catch(Q){F.post(new Mn.SP("Login failed",Q))}};return t.createElement(qr,null,t.createElement(Nn,{variant:"fullHeight",title:f,actions:t.createElement(E.Z,{color:"primary",variant:"outlined",onClick:w},"Sign In")},t.createElement(xe.Z,{variant:"body1"},p)))},loader:async(r,a)=>{const u=r.get(a),f=await u.getBackstageIdentity({optional:!0});if(!f)return;const p=await u.getProfile();return kn.create({identity:f.identity,profile:p,authApi:u})}},Ci={Component:({onSignInSuccess:r})=>t.createElement(qr,null,t.createElement(Nn,{title:"Guest",variant:"fullHeight",actions:t.createElement(E.Z,{color:"primary",variant:"outlined",onClick:()=>r(new _r)},"Enter")},t.createElement(xe.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new _r};var Ti=e(94106),Ya=e(86619),Ja=e(74828),Pi=e(45455),Ii=e.n(Pi);const Li=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,xi=(0,i.Z)(r=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:r.spacing(2)}}),{name:"BackstageCustomProvider"}),Qa=r=>{const{ref:a,...u}=r;return{inputRef:a,...u}},bi={Component:({onSignInSuccess:r})=>{const a=xi(),{register:u,handleSubmit:f,formState:p}=(0,Ti.cI)({mode:"onChange"}),{errors:R}=p,F=({userId:w})=>{r(kn.fromLegacy({userId:w,profile:{email:`${w}@example.com`}}))};return t.createElement(qr,null,t.createElement(Nn,{title:"Custom User",variant:"fullHeight"},t.createElement(xe.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:a.form,onSubmit:f(F)},t.createElement(ee.Z,null,t.createElement(Ya.Z,{...Qa(u("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(R.userId)}),R.userId&&t.createElement(Ja.Z,{error:!0},R.userId.message)),t.createElement(ee.Z,null,t.createElement(Ya.Z,{...Qa(u("idToken",{required:!1,validate:w=>!w||Li.test(w)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(R.idToken)}),R.idToken&&t.createElement(Ja.Z,{error:!0},R.idToken.message)),t.createElement(E.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p==null?void 0:p.isDirty)||!Ii()(R)},"Continue"))))},loader:async()=>{}},Ar="@backstage/core:SignInPage:provider",Xa={guest:Ci,custom:bi,common:Si};function ka(r,a){if(r in a)throw new Error(`"${r}" ID is duplicated. IDs of identity providers have to be unique.`)}function Zl(r){return r.reduce((u,f)=>{if(typeof f=="string")return ka(f,u),u[f]={components:Xa[f],id:f},u;const{id:p}=f;return ka(p,u),u[p]={components:Xa.common,id:p,config:f},u},{})}const Nl=(r,a)=>{const u=useApi(errorApiRef),f=useApiHolder(),[p,R]=useState(!0),F=useCallback(Q=>{a(IdentityApiSignOutProxy.from({identityApi:Q,signOut:async()=>{var H;localStorage.removeItem(Ar),await((H=Q.signOut)==null?void 0:H.call(Q))}}))},[a]);useLayoutEffect(()=>{var de;if(!p)return;const Q=localStorage.getItem(Ar);if(Q===null){R(!1);return}const H=r[Q];if(!H){R(!1);return}let ce=!1;return H.components.loader(f,(de=H.config)==null?void 0:de.apiRef).then(Ce=>{ce||(Ce?F(Ce):R(!1))}).catch(Ce=>{ce||(localStorage.removeItem(Ar),u.post(Ce),R(!1))}),()=>{ce=!0}},[p,u,a,f,r,F]);const w=useMemo(()=>Object.keys(r).map(Q=>{const H=r[Q],{Component:ce}=H.components,de=Ce=>{localStorage.setItem(Ar,H.id),F(Ce)};return React.createElement(ce,{key:H.id,config:H.config,onSignInSuccess:de})}),[r,F]);return[p,w]},Oi=({onSignInSuccess:r,providers:a=[],title:u,align:f="left"})=>{const p=useApi(configApiRef),R=useStyles(),F=getSignInProviders(a),[w,Q]=useSignInProviders(F,r);return w?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,u&&React.createElement(ContentHeader,{title:u,textAlign:f}),React.createElement(Grid,{container:!0,justifyContent:f==="center"?f:"flex-start",spacing:2,component:"ul",classes:R},Q)))},Di=({provider:r,auto:a,onSignInSuccess:u})=>{const f=useStyles(),p=useApi(r.apiRef),R=useApi(configApiRef),[F,w]=useState(),[Q,H]=useState(!1),ce=async({checkExisting:de,showPopup:Ce})=>{try{let Pe;if(de&&(Pe=await p.getBackstageIdentity({optional:!0})),!Pe&&(Ce||a)&&(H(!0),Pe=await p.getBackstageIdentity({instantPopup:!0}),!Pe))throw new Error(`The ${r.title} provider is not configured to support sign-in`);if(!Pe){H(!0);return}const Ie=await p.getProfile();u(UserIdentity.create({identity:Pe.identity,authApi:p,profile:Ie}))}catch(Pe){w(Pe),H(!0)}};return useMountEffect(()=>ce({checkExisting:!0})),Q?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:R.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:f},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:r.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{ce({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},r.message),F&&F.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},F.message)))))):React.createElement(Progress,null)};function $l(r){return"provider"in r?React.createElement(Di,{...r}):React.createElement(Oi,{...r})}const Fi=(0,i.Z)(r=>({root:{padding:r.spacing(0,2,0,2.5),minHeight:r.spacing(3)},indicator:{backgroundColor:r.palette.info.main,height:r.spacing(.3)}}),{name:"BackstageTabbedCard"}),Bi=(0,Xt.Z)(r=>({root:{padding:r.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:r.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(lr.Z);function Ul(r){const{slackChannel:a,errorBoundaryProps:u,children:f,title:p,deepLink:R,value:F,onChange:w}=r,Q=Fi(),[H,ce]=useState(0),de=w||((Ie,st)=>ce(st));let Ce;F?React.Children.map(f,Ie=>{React.isValidElement(Ie)&&(Ie==null?void 0:Ie.props.value)===F&&(Ce=Ie==null?void 0:Ie.props.children)}):React.Children.map(f,(Ie,st)=>{React.isValidElement(Ie)&&st===H&&(Ce=Ie==null?void 0:Ie.props.children)});const Pe=u||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Pe},p&&React.createElement(Bi,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:Q,value:F||H,onChange:de},f),React.createElement(Divider,null),React.createElement(CardContent,null,Ce),R&&React.createElement(BottomLink,{...R})))}const Mi=(0,i.Z)(r=>({root:{minWidth:r.spacing(6),minHeight:r.spacing(3),margin:r.spacing(0,2,0,0),padding:r.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:r.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function wl(r){const{children:a,...u}=r,f=Mi();return React.createElement(Tab,{disableRipple:!0,classes:f,...u})}},88609:function(q,s,e){"use strict";e.d(s,{Os:function(){return m},fC:function(){return y}});var n=e(76241),t=e(2784);const c=(0,n.CT)("analytics-context"),m=()=>{const o=(0,t.useContext)(c);if(o===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const h=o.atVersion(1);if(h===void 0)throw new Error("No context found for version 1.");return h},y=o=>{const{attributes:h,children:l}=o,g={...m(),...h},C=(0,n.EI)({1:g});return t.createElement(c.Provider,{value:C},l)};function i(o,h){const l=E=>React.createElement(y,{attributes:h},React.createElement(o,{...E}));return l.displayName=`WithAnalyticsContext(${o.displayName||o.name||"Component"})`,l}},28461:function(q,s,e){"use strict";e.d(s,{f:function(){return n.fC},z:function(){return i}});var n=e(88609),t=e(27399),c=e(2784);class m{constructor(h,l={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=h,this.context=l}setContext(h){this.context=h}captureEvent(h,l,{value:E,attributes:g}={}){try{this.analyticsApi.captureEvent({action:h,subject:l,value:E,attributes:g,context:this.context})}catch(C){console.warn("Error during analytics event capture. %o",C)}}}function y(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function i(){const o=(0,c.useRef)(null),h=(0,n.Os)(),l=y();function E(){return o.current===null&&(o.current=new m(l)),o.current}const g=E();return g.setContext(h),g}},39135:function(q,s,e){"use strict";e.d(s,{CL:function(){return B},sM:function(){return t},$v:function(){return g},v_:function(){return C},hg:function(){return L},uB:function(){return E},bq:function(){return l},Ds:function(){return Z},NW:function(){return S},VE:function(){return G},W0:function(){return T},gP:function(){return x},F4:function(){return m},ux:function(){return i},Kp:function(){return c},$4:function(){return D},p_:function(){return o},ZM:function(){return U},D:function(){return y},gW:function(){return h},E6:function(){return V}});var n=e(86833),t;(function(X){const Ee="SignedIn";X.SignedIn=Ee;const Se="SignedOut";X.SignedOut=Se})(t||(t={}));const c=(0,n.createApiRef)({id:"core.auth.google"}),m=(0,n.createApiRef)({id:"core.auth.github"}),y=(0,n.createApiRef)({id:"core.auth.okta"}),i=(0,n.createApiRef)({id:"core.auth.gitlab"}),o=(0,n.createApiRef)({id:"core.auth.microsoft"}),h=(0,n.createApiRef)({id:"core.auth.onelogin"}),l=(0,n.createApiRef)({id:"core.auth.bitbucket"}),E=(0,n.createApiRef)({id:"core.auth.atlassian"}),g=(0,n.createApiRef)({id:"core.alert"}),C=(0,n.createApiRef)({id:"core.analytics"}),L=(0,n.createApiRef)({id:"core.apptheme"}),Z=(0,n.createApiRef)({id:"core.config"}),S=(0,n.createApiRef)({id:"core.discovery"}),G=(0,n.createApiRef)({id:"core.error"});var B;(function(X){X[X.None=0]="None";const Se=1;X[X.Active=Se]="Active"})(B||(B={}));const T=(0,n.createApiRef)({id:"core.featureflags"}),x=(0,n.createApiRef)({id:"core.fetch"}),D=(0,n.createApiRef)({id:"core.identity"}),U=(0,n.createApiRef)({id:"core.oauthrequest"}),V=(0,n.createApiRef)({id:"core.storage"})},27399:function(q,s,e){"use strict";e.d(s,{createApiFactory:function(){return n.createApiFactory},createApiRef:function(){return n.createApiRef},useApi:function(){return n.useApi},useApiHolder:function(){return n.useApiHolder},FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauthRequestApiRef:function(){return t.ZM},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},storageApiRef:function(){return t.E6}});var n=e(86833);e.o(n,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return n.FeatureFlagState}}),e.o(n,"SessionState")&&e.d(s,{SessionState:function(){return n.SessionState}}),e.o(n,"alertApiRef")&&e.d(s,{alertApiRef:function(){return n.alertApiRef}}),e.o(n,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return n.analyticsApiRef}}),e.o(n,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return n.appThemeApiRef}}),e.o(n,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return n.atlassianAuthApiRef}}),e.o(n,"attachComponentData")&&e.d(s,{attachComponentData:function(){return n.attachComponentData}}),e.o(n,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return n.bitbucketAuthApiRef}}),e.o(n,"configApiRef")&&e.d(s,{configApiRef:function(){return n.configApiRef}}),e.o(n,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return n.createComponentExtension}}),e.o(n,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return n.createExternalRouteRef}}),e.o(n,"createPlugin")&&e.d(s,{createPlugin:function(){return n.createPlugin}}),e.o(n,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return n.createRoutableExtension}}),e.o(n,"createRouteRef")&&e.d(s,{createRouteRef:function(){return n.createRouteRef}}),e.o(n,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return n.discoveryApiRef}}),e.o(n,"errorApiRef")&&e.d(s,{errorApiRef:function(){return n.errorApiRef}}),e.o(n,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return n.featureFlagsApiRef}}),e.o(n,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return n.fetchApiRef}}),e.o(n,"getComponentData")&&e.d(s,{getComponentData:function(){return n.getComponentData}}),e.o(n,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return n.githubAuthApiRef}}),e.o(n,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return n.gitlabAuthApiRef}}),e.o(n,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return n.googleAuthApiRef}}),e.o(n,"identityApiRef")&&e.d(s,{identityApiRef:function(){return n.identityApiRef}}),e.o(n,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return n.microsoftAuthApiRef}}),e.o(n,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return n.oauthRequestApiRef}}),e.o(n,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return n.oktaAuthApiRef}}),e.o(n,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return n.oneloginAuthApiRef}}),e.o(n,"storageApiRef")&&e.d(s,{storageApiRef:function(){return n.storageApiRef}}),e.o(n,"useApp")&&e.d(s,{useApp:function(){return n.useApp}}),e.o(n,"useElementFilter")&&e.d(s,{useElementFilter:function(){return n.useElementFilter}}),e.o(n,"useRouteRef")&&e.d(s,{useRouteRef:function(){return n.useRouteRef}}),e.o(n,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return n.useRouteRefParams}});var t=e(39135)},90515:function(q,s,e){"use strict";e.d(s,{T:function(){return t}});class n{constructor(m){if(this.config=m,!m.id.split(".").flatMap(i=>i.split("-")).every(i=>i.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${m.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(c){return new n(c)}},25182:function(q,s,e){"use strict";e.d(s,{n:function(){return n}});function n(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(q,s,e){"use strict";e.d(s,{useApi:function(){return n.h_},useApiHolder:function(){return n.I_},createApiRef:function(){return t.T},createApiFactory:function(){return y.n}});var n=e(5761),t=e(90515),c=e(16362),m=e.n(c);e.o(c,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return c.FeatureFlagState}}),e.o(c,"SessionState")&&e.d(s,{SessionState:function(){return c.SessionState}}),e.o(c,"alertApiRef")&&e.d(s,{alertApiRef:function(){return c.alertApiRef}}),e.o(c,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return c.analyticsApiRef}}),e.o(c,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return c.appThemeApiRef}}),e.o(c,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return c.atlassianAuthApiRef}}),e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return c.bitbucketAuthApiRef}}),e.o(c,"configApiRef")&&e.d(s,{configApiRef:function(){return c.configApiRef}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return c.discoveryApiRef}}),e.o(c,"errorApiRef")&&e.d(s,{errorApiRef:function(){return c.errorApiRef}}),e.o(c,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return c.featureFlagsApiRef}}),e.o(c,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return c.fetchApiRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return c.githubAuthApiRef}}),e.o(c,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return c.gitlabAuthApiRef}}),e.o(c,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return c.googleAuthApiRef}}),e.o(c,"identityApiRef")&&e.d(s,{identityApiRef:function(){return c.identityApiRef}}),e.o(c,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return c.microsoftAuthApiRef}}),e.o(c,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return c.oauthRequestApiRef}}),e.o(c,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return c.oktaAuthApiRef}}),e.o(c,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return c.oneloginAuthApiRef}}),e.o(c,"storageApiRef")&&e.d(s,{storageApiRef:function(){return c.storageApiRef}}),e.o(c,"useApp")&&e.d(s,{useApp:function(){return c.useApp}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var y=e(25182)},16362:function(){},5761:function(q,s,e){"use strict";e.d(s,{I_:function(){return c},h_:function(){return m}});var n=e(2784),t=e(76241);function c(){const i=(0,t.Vt)("api-context");if(!i)throw new Error("API context is not available");const o=i.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function m(i){const h=c().get(i);if(!h)throw new Error(`No implementation available for ${i}`);return h}function y(i){return function(h){const l=g=>{const C=c(),L={};for(const Z in i)if(i.hasOwnProperty(Z)){const S=i[Z],G=C.get(S);if(!G)throw new Error(`No implementation available for ${S}`);L[Z]=G}return React.createElement(h,{...g,...L})},E=h.displayName||h.name||"Component";return l.displayName=`withApis(${E})`,l}}},31311:function(q,s,e){"use strict";e.d(s,{useApp:function(){return n.q}});var n=e(32483),t=e(67229),c=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(q,s,e){"use strict";e.d(s,{q:function(){return t}});var n=e(76241);const t=()=>{const c=(0,n.Vt)("app-context");if(!c)throw new Error("App context is not available");const m=c.atVersion(1);if(!m)throw new Error("AppContext v1 not available");return m}},74181:function(q,s,e){"use strict";e.d(s,{R5:function(){return m},CO:function(){return C},P4:function(){return g},IY:function(){return y},vJ:function(){return B}});var n=e(76241);const t=(0,n.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function m(T,x,D){var X;const U=T;let V=(X=U[c])!=null?X:t.get(T);if(V||(V={map:new Map},Object.defineProperty(U,c,{enumerable:!1,configurable:!0,writable:!1,value:V}),t.set(T,V)),V.map.has(x)){const Ee=T.displayName||T.name;throw new Error(`Attempted to attach duplicate data "${x}" to component "${Ee}"`)}V.map.set(x,D)}function y(T,x){var V;if(!T)return;const D=T.type;if(!D)return;const U=(V=D[c])!=null?V:t.get(D);if(!!U)return U.map.get(x)}var i=e(2784),o=e(88609),h=e(31311),l=e(82772);class E extends i.Component{constructor(){super(...arguments);ie(this,"state",{error:void 0});ie(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(x){return{error:x}}render(){const{error:x}=this.state,{app:D,plugin:U}=this.props,{ErrorBoundaryFallback:V}=D.getComponents();return x?i.createElement(V,{error:x,resetError:this.handleErrorReset,plugin:U}):this.props.children}}function g(T){const{component:x,mountPoint:D,name:U}=T;return L({component:{lazy:()=>x().then(V=>{const X=Se=>{try{(0,l.tg)(D)}catch(Oe){if(typeof Oe=="object"&&Oe!==null){const{message:Ae}=Oe;if(typeof Ae=="string"&&Ae.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${D} 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 Oe}return i.createElement(V,{...Se})},Ee=U||V.displayName||V.name||"LazyComponent";return X.displayName=`RoutableExtension(${Ee})`,X},V=>Ee=>{const Se=(0,h.useApp)(),{BootErrorPage:Oe}=Se.getComponents();return i.createElement(Oe,{step:"load-chunk",error:V})})},data:{"core.mountPoint":D},name:U})}function C(T){const{component:x,name:D}=T;return L({component:x,name:D})}function L(T){const{data:x={},name:D}=T;D||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let U;if("lazy"in T.component){const X=T.component.lazy;U=(0,i.lazy)(()=>X().then(Ee=>({default:Ee})))}else U=T.component.sync;const V=D||U.displayName||U.name||"Component";return{expose(X){const Ee=Se=>{const Oe=(0,h.useApp)(),{Progress:Ae}=Oe.getComponents(),Ke=x==null?void 0:x["core.mountPoint"];return i.createElement(i.Suspense,{fallback:i.createElement(Ae,null)},i.createElement(E,{app:Oe,plugin:X},i.createElement(o.fC,{attributes:{pluginId:X.getId(),...D&&{extension:D},...Ke&&{routeRef:Ke.id}}},i.createElement(U,{...Se}))))};m(Ee,"core.plugin",X);for(const[Se,Oe]of Object.entries(x))m(Ee,Se,Oe);return Ee.displayName=`Extension(${V})`,Ee}}}var Z=e(27399);function S(T,x,D,U){return i.Children.toArray(T).flatMap(V=>{if(!(0,i.isValidElement)(V))return[];if(V.type===i.Fragment)return S(V.props.children,x,D,U);if(y(V,"core.featureFlagged")){const X=V.props;return("with"in X?x.isActive(X.with):!x.isActive(X.without))?S(V.props.children,x,D,U):[]}if(D===void 0||D(V))return[V];if(U)throw new Error(U);return S(V.props.children,x,D,U)})}class G{constructor(x,D){this.node=x,this.featureFlagsApi=D}selectByComponentData(x){const D=S(this.node,this.featureFlagsApi,U=>y(U,x.key)!==void 0,x.withStrictError);return new G(D,this.featureFlagsApi)}findComponentData(x){return S(this.node,this.featureFlagsApi,U=>y(U,x.key)!==void 0).map(U=>y(U,x.key)).filter(U=>U!==void 0)}getElements(){return S(this.node,this.featureFlagsApi)}}function B(T,x,D=[]){const U=(0,Z.useApi)(Z.featureFlagsApiRef),V=new G(T,U);return(0,i.useMemo)(()=>x(V),[T,...D])}},80274:function(){},36964:function(q,s,e){"use strict";e.d(s,{AnalyticsContext:function(){return n.f},useAnalytics:function(){return n.z},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},storageApiRef:function(){return t.storageApiRef},useApp:function(){return c.useApp},attachComponentData:function(){return m.R5},createComponentExtension:function(){return m.CO},createRoutableExtension:function(){return m.P4},getComponentData:function(){return m.IY},useElementFilter:function(){return m.vJ},createPlugin:function(){return o.r},createExternalRouteRef:function(){return h.x8},createRouteRef:function(){return h.NT},useRouteRef:function(){return h.tg},useRouteRefParams:function(){return h.Oi}});var n=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(s,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var c=e(31311);e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createApiRef")&&e.d(s,{createApiRef:function(){return c.createApiRef}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"useApi")&&e.d(s,{useApi:function(){return c.useApi}}),e.o(c,"useApiHolder")&&e.d(s,{useApiHolder:function(){return c.useApiHolder}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var m=e(74181),y=e(80274),i=e.n(y);e.o(y,"createApiFactory")&&e.d(s,{createApiFactory:function(){return y.createApiFactory}}),e.o(y,"createApiRef")&&e.d(s,{createApiRef:function(){return y.createApiRef}}),e.o(y,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return y.createExternalRouteRef}}),e.o(y,"createPlugin")&&e.d(s,{createPlugin:function(){return y.createPlugin}}),e.o(y,"createRouteRef")&&e.d(s,{createRouteRef:function(){return y.createRouteRef}}),e.o(y,"useApi")&&e.d(s,{useApi:function(){return y.useApi}}),e.o(y,"useApiHolder")&&e.d(s,{useApiHolder:function(){return y.useApiHolder}}),e.o(y,"useRouteRef")&&e.d(s,{useRouteRef:function(){return y.useRouteRef}}),e.o(y,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return y.useRouteRefParams}});var o=e(96896),h=e(82772)},96896:function(q,s,e){"use strict";e.d(s,{r:function(){return t}});class n{constructor(m){this.config=m}getId(){return this.config.id}getApis(){var m;return(m=this.config.apis)!=null?m:[]}getFeatureFlags(){var m,y;return(y=(m=this.config.featureFlags)==null?void 0:m.slice())!=null?y:[]}get routes(){var m;return(m=this.config.routes)!=null?m:{}}get externalRoutes(){var m;return(m=this.config.externalRoutes)!=null?m:{}}provide(m){return m.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(c){return new n(c)}},82772:function(q,s,e){var Z,S,G;"use strict";e.d(s,{x8:function(){return l},NT:function(){return m},tg:function(){return C},Oi:function(){return L}});var n=e(76241);const t=(0,n.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(T,x){ie(this,Z,"absolute");this.id=T,this.params=x}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}Z=t;function m(B){var T;return new c(B.id,(T=B.params)!=null?T:[])}const y=/^\w+$/;class i{constructor(T,x,D,U){ie(this,S,"sub");this.id=T,this.path=x,this.parent=D,this.params=U}toString(){return`routeRef{type=sub,id=${this.id}}`}}S=t;function o(B){const{id:T,path:x,parent:D}=B,U=x.split("/").filter(Ee=>Ee.startsWith(":")).map(Ee=>Ee.substring(1)),V=[...D.params,...U];if(D.params.some(Ee=>U.includes(Ee)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!x.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${x}'`);if(x.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${x}'`);for(const Ee of U)if(!y.test(Ee))throw new Error(`SubRouteRef path has invalid param, got '${Ee}'`);return new i(T,x,D,V)}class h{constructor(T,x,D){ie(this,G,"external");this.id=T,this.params=x,this.optional=D}toString(){return`routeRef{type=external,id=${this.id}}`}}G=t;function l(B){var T;return new h(B.id,(T=B.params)!=null?T:[],Boolean(B.optional))}var E=e(2784),g=e(10289);function C(B){const T=(0,g.TH)(),x=(0,n.Vt)("routing-context");if(!x)throw new Error("Routing context is not available");const D=x.atVersion(1),U=(0,E.useMemo)(()=>D&&D.resolve(B,T),[D,B,T]);if(!x)throw new Error("useRouteRef used outside of routing context");if(!D)throw new Error("RoutingContext v1 not available");const V="optional"in B&&B.optional;if(!U&&!V)throw new Error(`No path for ${B}`);return U}function L(B){return(0,g.UO)()}},10179:function(q,s,e){"use strict";e.d(s,{SP:function(){return Z},dR:function(){return g},VL:function(){return G},BD:function(){return t}});function n(B){if(typeof B!="object"||B===null||Array.isArray(B))return!1;const T=B;return!(typeof T.name!="string"||T.name===""||typeof T.message!="string")}function t(B){if(typeof B!="object"||B===null||Array.isArray(B))throw new Error(`Encountered invalid error, not an object, got '${B}'`);const T=B;if(typeof T.name!="string"||T.name==="")throw new Error(`Encountered error object without a name, got '${B}'`);if(typeof T.message!="string")throw new Error(`Encountered error object without a message, got '${B}'`)}var c=e(24852);function m(B,T){const x=serializeErrorInternal(B),D={name:"Unknown",message:"<no reason given>",...x};return(T==null?void 0:T.includeStack)||delete D.stack,D}function y(B){const T=(0,c.deserializeError)(B);return B.stack||(T.stack=void 0),T}function i(B){if(n(B)){const T=String(B);return T!=="[object Object]"?T:`${B.name}: ${B.message}`}return`unknown error '${B}'`}class o extends Error{constructor(T,x){var U;let D=T;if(x!==void 0){const V=i(x);D?D+=`; caused by ${V}`:D=`caused by ${V}`}super(D);ie(this,"cause");(U=Error.captureStackTrace)==null||U.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=n(x)?x:void 0}}class h extends null{}class l extends null{}class E extends null{}class g extends o{}class C extends null{}class L extends null{}class Z extends o{constructor(T,x){super(T,x);this.name=n(x)?x.name:"Error"}}async function S(B){var T;try{const x=await B.text();if(x){if((T=B.headers.get("content-type"))==null?void 0:T.startsWith("application/json"))try{const D=JSON.parse(x);if(D.error&&D.response)return D}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}, ${x}`},response:{statusCode:B.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}`},response:{statusCode:B.status}}}class G extends Error{constructor(T){super(T.message);ie(this,"response");ie(this,"body");ie(this,"cause");this.name="ResponseError",this.response=T.response,this.body=T.data,this.cause=T.cause}static async fromResponse(T){const x=await S(T),D=x.response.statusCode||T.status,U=x.error.name||T.statusText,V=`Request failed with ${D} ${U}`,X=y(x.error);return new G({message:V,response:T,data:x,cause:X})}}},36356:function(q,s,e){var g,C,L,Z,S;"use strict";e.d(s,{nW:function(){return E},ae:function(){return i},q3:function(){return o}});var n=e(36964);const t=(0,n.createApiRef)({id:"core.scmauth"});class c{constructor(T){an(this,g,void 0);un(this,g,T)}async getCredentials(T){const x=new URL(T.url),D=Je(this,g).find(U=>U.isUrlSupported(x));if(!D)throw new Error(`No auth provider available for '${T.url}', see https://backstage.io/link?scm-auth`);return D.getCredentials(T)}}g=new WeakMap;const G=class{constructor(T,x,D,U){an(this,C,void 0);an(this,L,void 0);an(this,Z,void 0);an(this,S,void 0);un(this,C,x),un(this,L,D),un(this,Z,U),un(this,S,T)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:T,gitlab:x,azure:D,bitbucket:U})=>G.merge(G.forGithub(T),G.forGitlab(x),G.forAzure(D),G.forBitbucket(U))})}static forAuthApi(T,x){return new G("generic",T,x.host,x.scopeMapping)}static forGithub(T,x){var U;const D=(U=x==null?void 0:x.host)!=null?U:"github.com";return new G("github",T,D,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(T,x){var U;const D=(U=x==null?void 0:x.host)!=null?U:"gitlab.com";return new G("gitlab",T,D,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(T,x){var U;const D=(U=x==null?void 0:x.host)!=null?U:"dev.azure.com";return new G("azure",T,D,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(T,x){var U;const D=(U=x==null?void 0:x.host)!=null?U:"bitbucket.org";return new G("bitbucket",T,D,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...T){return new c(T)}isUrlSupported(T){return T.host===Je(this,L)}getAdditionalScopesForProvider(T){var x,D;return!(T==null?void 0:T.customScopes)||Je(this,S)==="generic"?[]:(D=(x=T.customScopes)==null?void 0:x[Je(this,S)])!=null?D:[]}async getCredentials(T){const{url:x,additionalScope:D,...U}=T,V=Je(this,Z).default.slice();(D==null?void 0:D.repoWrite)&&V.push(...Je(this,Z).repoWrite);const X=this.getAdditionalScopesForProvider(D);X.length&&V.push(...X);const Ee=[...new Set(V)],Se=await Je(this,C).getAccessToken(Ee,U);return{token:Se,headers:{Authorization:`Bearer ${Se}`}}}};let m=G;C=new WeakMap,L=new WeakMap,Z=new WeakMap,S=new WeakMap;var y=e(63925);class i{static fromConfig(T){return y.Lx.fromConfig(T)}}const o=(0,n.createApiRef)({id:"integration.scmintegrations"});var h=e(73250),l=e(2784);const E=B=>{var V;const{type:T}=B,x=(0,n.useApp)(),D=h.Z,U=T&&(V=x.getSystemIcon(T))!=null?V:D;return l.createElement(U,null)}},63925:function(q,s,e){var K,j,M,te,me,ve,Te;"use strict";e.d(s,{Lx:function(){return ze},Pb:function(){return Ct}});var n=e(82717),t=e.n(n),c=e(76635);function m(A){const d=new URL("http://example.com");return d.host=A,d.host===A}function y(A){try{return new URL(A),!0}catch{return!1}}function i(A,d){return{list(){return A},byUrl(v){try{const b=typeof v=="string"?new URL(v):v;return A.find(N=>d(N)===b.host)}catch{return}},byHost(v){return A.find(b=>d(b)===v)}}}function o(A){const{url:d,base:v,lineNumber:b}=A;try{return new URL(d),d}catch{}let N;if(d.startsWith("/")){const{filepath:ne}=t()(v);N=new URL(v);const re=(0,c.trimEnd)(N.pathname.substring(0,N.pathname.length-ne.length),"/");N.pathname=`${re}${d}`}else N=new URL(d,v);return N.search=new URL(v).search,b&&(N.hash=`L${b}`),N.toString()}const h="GB",xe=class{constructor(d,v,b,N,ne,re){an(this,K,void 0);an(this,j,void 0);an(this,M,void 0);an(this,te,void 0);an(this,me,void 0);an(this,ve,void 0);an(this,Te,(...d)=>{const v=new URL(Je(this,K));return v.pathname=d.map(b=>encodeURIComponent(b)).join("/"),v});un(this,K,d),un(this,j,v),un(this,M,b),un(this,te,N),un(this,me,ne),un(this,ve,re)}static fromRepoUrl(d){var Re;const v=new URL(d);let b,N,ne;const re=v.pathname.split("/").map(we=>decodeURIComponent(we));if(re[2]==="_git"?(b=re[1],N=ne=re[3]):re[3]==="_git"&&(b=re[1],N=re[2],ne=re[4]),!b||!N||!ne)throw new Error("Azure URL must point to a git repository");const _=(Re=v.searchParams.get("path"))!=null?Re:void 0;let fe;const ge=v.searchParams.get("version");if(ge){if(ge.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");fe=ge.slice(2)}return new xe(v.origin,b,N,ne,_,fe)}toRepoUrl(){let d;return Je(this,M)===Je(this,te)?d=Je(this,Te).call(this,Je(this,j),"_git",Je(this,te)):d=Je(this,Te).call(this,Je(this,j),Je(this,M),"_git",Je(this,te)),Je(this,me)&&d.searchParams.set("path",Je(this,me)),Je(this,ve)&&d.searchParams.set("version",h+Je(this,ve)),d.toString()}toFileUrl(){if(!Je(this,me))throw new Error("Azure URL must point to a specific path to be able to download a file");const d=Je(this,Te).call(this,Je(this,j),Je(this,M),"_apis","git","repositories",Je(this,te),"items");return d.searchParams.set("api-version","6.0"),d.searchParams.set("path",Je(this,me)),Je(this,ve)&&d.searchParams.set("version",Je(this,ve)),d.toString()}toArchiveUrl(){const d=Je(this,Te).call(this,Je(this,j),Je(this,M),"_apis","git","repositories",Je(this,te),"items");return d.searchParams.set("recursionLevel","full"),d.searchParams.set("download","true"),d.searchParams.set("api-version","6.0"),Je(this,me)&&d.searchParams.set("scopePath",Je(this,me)),Je(this,ve)&&d.searchParams.set("version",Je(this,ve)),d.toString()}toCommitsUrl(){const d=Je(this,Te).call(this,Je(this,j),Je(this,M),"_apis","git","repositories",Je(this,te),"commits");return d.searchParams.set("api-version","6.0"),Je(this,ve)&&d.searchParams.set("searchCriteria.itemVersion.version",Je(this,ve)),d.toString()}getOwner(){return Je(this,j)}getProject(){return Je(this,M)}getRepo(){return Je(this,te)}getPath(){return Je(this,me)}getRef(){return Je(this,ve)}};let l=xe;K=new WeakMap,j=new WeakMap,M=new WeakMap,te=new WeakMap,me=new WeakMap,ve=new WeakMap,Te=new WeakMap;const E="dev.azure.com";function g(A){var b;const d=(b=A.getOptionalString("host"))!=null?b:E,v=A.getOptionalString("token");if(!m(d))throw new Error(`Invalid Azure integration config, '${d}' is not a valid host`);return{host:d,token:v}}function C(A){const d=A.map(g);return d.some(v=>v.host===E)||d.push({host:E}),d}const ft=class{constructor(d){this.integrationConfig=d}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){var N;const{url:v,base:b}=d;if(y(v))return v;try{const ne=l.fromRepoUrl(b),re=new URL(b),_=new URL(`https://a.com${(N=ne.getPath())!=null?N:""}`),fe=new URL(v,_).pathname;return re.searchParams.set("path",fe),d.lineNumber&&(re.searchParams.set("line",String(d.lineNumber)),re.searchParams.set("lineEnd",String(d.lineNumber+1)),re.searchParams.set("lineStartColumn","1"),re.searchParams.set("lineEndColumn","1")),re.toString()}catch{return new URL(v,b).toString()}}resolveEditUrl(d){return d}};let L=ft;ie(L,"factory",({config:d})=>{var b;const v=C((b=d.getOptionalConfigArray("integrations.azure"))!=null?b:[]);return i(v.map(N=>new ft(N)),N=>N.config.host)});var Z=e(48834).Buffer;function S(A){return AzureUrl.fromRepoUrl(A).toFileUrl()}function G(A){return AzureUrl.fromRepoUrl(A).toArchiveUrl()}function B(A){return AzureUrl.fromRepoUrl(A).toCommitsUrl()}function T(A,d){const v=d?{...d}:{};if(A.token){const b=Z.from(`:${A.token}`,"utf8");v.Authorization=`Basic ${b.toString("base64")}`}return{headers:v}}const x="bitbucket.org",D="https://api.bitbucket.org/2.0";function U(A){var re;const d=(re=A.getOptionalString("host"))!=null?re:x;let v=A.getOptionalString("apiBaseUrl");const b=A.getOptionalString("token"),N=A.getOptionalString("username"),ne=A.getOptionalString("appPassword");if(!m(d))throw new Error(`Invalid Bitbucket integration config, '${d}' is not a valid host`);return v?v=(0,c.trimEnd)(v,"/"):d===x?v=D:v=`https://${d}/rest/api/1.0`,{host:d,apiBaseUrl:v,token:b,username:N,appPassword:ne}}function V(A){const d=A.map(U);return d.some(v=>v.host===x)||d.push({host:x,apiBaseUrl:D}),d}const At=class{constructor(d){this.integrationConfig=d}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){const v=o(d);if(!d.lineNumber)return v;const b=new URL(v);return this.integrationConfig.host==="bitbucket.org"?b.hash=`lines-${d.lineNumber}`:b.hash=`${d.lineNumber}`,b.toString()}resolveEditUrl(d){const v=t()(d),b=new URL(d);return b.searchParams.set("mode","edit"),b.searchParams.set("spa","0"),b.searchParams.set("at",v.ref),b.toString()}};let X=At;ie(X,"factory",({config:d})=>{var b;const v=V((b=d.getOptionalConfigArray("integrations.bitbucket"))!=null?b:[]);return i(v.map(N=>new At(N)),N=>N.config.host)});var Ee=e(96279),Se=e(48834).Buffer;async function Oe(A,d){const{name:v,owner:b,resource:N}=parseGitUrl(A),ne=N==="bitbucket.org";let re=ne?`${d.apiBaseUrl}/repositories/${b}/${v}`:`${d.apiBaseUrl}/projects/${b}/repos/${v}/default-branch`,_=await fetch(re,Ge(d));if(_.status===404&&!ne&&(re=`${d.apiBaseUrl}/projects/${b}/repos/${v}/branches/default`,_=await fetch(re,Ge(d))),!_.ok){const ge=`Failed to retrieve default branch from ${re}, ${_.status} ${_.statusText}`;throw new Error(ge)}let fe;if(ne)fe=(await _.json()).mainbranch.name;else{const{displayId:ge}=await _.json();fe=ge}if(!fe)throw new Error(`Failed to read default branch from ${re}. Response ${_.status} ${_.json()}`);return fe}async function Ae(A,d){const{name:v,owner:b,ref:N,protocol:ne,resource:re,filepath:_}=parseGitUrl(A),fe=re==="bitbucket.org";let ge=N;ge||(ge=await Oe(A,d));const Re=_?`&path=${encodeURIComponent(_)}`:"";return fe?`${ne}://${re}/${b}/${v}/get/${ge}.tar.gz`:`${d.apiBaseUrl}/projects/${b}/repos/${v}/archive?format=tgz&at=${ge}&prefix=${b}-${v}${Re}`}function Ke(A,d){try{const{owner:v,name:b,ref:N,filepathtype:ne,filepath:re}=parseGitUrl(A);if(!v||!b||ne!=="browse"&&ne!=="raw"&&ne!=="src")throw new Error("Invalid Bitbucket URL or file path");const _=re.replace(/^\//,"");if(d.host==="bitbucket.org"){if(!N)throw new Error("Invalid Bitbucket URL or file path");return`${d.apiBaseUrl}/repositories/${v}/${b}/src/${N}/${_}`}return`${d.apiBaseUrl}/projects/${v}/repos/${b}/raw/${_}?at=${N}`}catch(v){throw new Error(`Incorrect URL: ${A}, ${v}`)}}function Ge(A){const d={};if(A.token)d.Authorization=`Bearer ${A.token}`;else if(A.username&&A.appPassword){const v=Se.from(`${A.username}:${A.appPassword}`,"utf8");d.Authorization=`Basic ${v.toString("base64")}`}return{headers:d}}const Qe="github.com",We="https://api.github.com",je="https://raw.githubusercontent.com";function it(A){var re,_;const d=(re=A.getOptionalString("host"))!=null?re:Qe;let v=A.getOptionalString("apiBaseUrl"),b=A.getOptionalString("rawBaseUrl");const N=A.getOptionalString("token"),ne=(_=A.getOptionalConfigArray("apps"))==null?void 0:_.map(fe=>({appId:fe.getNumber("appId"),clientId:fe.getString("clientId"),clientSecret:fe.getString("clientSecret"),webhookSecret:fe.getString("webhookSecret"),privateKey:fe.getString("privateKey"),allowedInstallationOwners:fe.getOptionalStringArray("allowedInstallationOwners")}));if(!m(d))throw new Error(`Invalid GitHub integration config, '${d}' is not a valid host`);return v?v=(0,c.trimEnd)(v,"/"):d===Qe&&(v=We),b?b=(0,c.trimEnd)(b,"/"):d===Qe&&(b=je),{host:d,apiBaseUrl:v,rawBaseUrl:b,token:N,apps:ne}}function Ue(A){const d=A.map(it);return d.some(v=>v.host===Qe)||d.push({host:Qe,apiBaseUrl:We,rawBaseUrl:je}),d}function qe(A,d,v){try{const{owner:b,name:N,ref:ne,filepathtype:re,filepath:_}=parseGitUrl(A);if(!b||!N||!ne||re!=="blob"&&re!=="raw"&&re!=="tree")throw new Error("Invalid GitHub URL or file path");const fe=_.replace(/^\//,"");return ut(d,v)==="api"?`${d.apiBaseUrl}/repos/${b}/${N}/contents/${fe}?ref=${ne}`:`${d.rawBaseUrl}/${b}/${N}/${ne}/${fe}`}catch(b){throw new Error(`Incorrect URL: ${A}, ${b}`)}}function nt(A,d){const v={};return ut(A,d)==="api"&&(v.Accept="application/vnd.github.v3.raw"),d.token&&(v.Authorization=`token ${d.token}`),{headers:v}}function ut(A,d){return A.apiBaseUrl&&(d.token||!A.rawBaseUrl)?"api":"raw"}class dt{constructor(){ie(this,"tokenCache",new Map);ie(this,"isNotExpired",d=>d.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(d,v){const b=this.tokenCache.get(d);if(b&&this.isNotExpired(b.expiresAt))return{accessToken:b.token};const N=await v();return this.tokenCache.set(d,N),{accessToken:N.token}}}const ht={Accept:"application/vnd.github.machine-man-preview+json"};class et{constructor(d,v){ie(this,"appClient");ie(this,"baseUrl");ie(this,"baseAuthConfig");ie(this,"cache",new dt);ie(this,"allowedInstallationOwners");this.allowedInstallationOwners=d.allowedInstallationOwners,this.baseUrl=v,this.baseAuthConfig={appId:d.appId,privateKey:d.privateKey.replace(/\\n/gm,`
31
+ `)},this.appClient=new Octokit({baseUrl:v,headers:ht,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(d,v){var re;const{installationId:b,suspended:N}=await this.getInstallationData(d);if(this.allowedInstallationOwners&&!((re=this.allowedInstallationOwners)==null?void 0:re.includes(d)))return{accessToken:void 0};if(N)throw new Error(`The GitHub application for ${d} is suspended`);const ne=v?`${d}/${v}`:d;return this.cache.getOrCreateToken(ne,async()=>{const _=await this.appClient.apps.createInstallationAccessToken({installation_id:b,headers:ht});if(v&&_.data.repository_selection==="selected"){const fe=new Octokit({baseUrl:this.baseUrl,auth:_.data.token});if(!(await fe.paginate(fe.apps.listReposAccessibleToInstallation)).some(we=>we.name===v))throw new Error(`The Backstage GitHub application used in the ${d} organization does not have access to a repository with the name ${v}`)}return{token:_.data.token,expiresAt:DateTime.fromISO(_.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(d){const b=(await this.getInstallations()).find(ne=>{var re,_;return((_=(re=ne.account)==null?void 0:re.login)==null?void 0:_.toLocaleLowerCase("en-US"))===d.toLocaleLowerCase("en-US")});if(b)return{installationId:b.id,suspended:Boolean(b.suspended_by)};const N=new Error(`No app installation found for ${d} in ${this.baseAuthConfig.appId}`);throw N.name="NotFoundError",N}}class Xe{constructor(d){ie(this,"apps");var v,b;this.apps=(b=(v=d.apps)==null?void 0:v.map(N=>new et(N,d.apiBaseUrl)))!=null?b:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(v=>v.getInstallations()))).flat():[]}async getAppToken(d,v){if(this.apps.length===0)return;const b=await Promise.all(this.apps.map(_=>_.getInstallationCredentials(d,v).then(fe=>({credentials:fe,error:void 0}),fe=>({credentials:void 0,error:fe})))),N=b.find(_=>_.credentials);if(N)return N.credentials.accessToken;const re=b.map(_=>_.error).find(_=>_.name!=="NotFoundError");if(re)throw re}}class vt{constructor(d,v){this.githubAppCredentialsMux=d,this.token=v}async getCredentials(d){const v=parseGitUrl(d.url),b=v.owner||v.name,N=v.owner?v.name:void 0;let ne="app",re=await this.githubAppCredentialsMux.getAppToken(b,N);return re||(ne="token",re=this.token),{headers:re?{Authorization:`Bearer ${re}`}:void 0,token:re,type:ne}}}ie(vt,"create",null);class ct{static fromIntegrations(d){const v=new Map;return d.github.list().forEach(b=>{const N=SingleInstanceGithubCredentialsProvider.create(b.config);v.set(b.config.host,N)}),new ct(v)}constructor(d){this.providers=d}async getCredentials(d){const v=new URL(d.url),b=this.providers.get(v.host);if(!b)throw new Error(`There is no GitHub integration that matches ${d.url}. Please add a configuration for an integration.`);return b.getCredentials(d)}}const le=class{constructor(d){this.integrationConfig=d}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){return Ct(o(d),"tree")}resolveEditUrl(d){return Ct(d,"edit")}};let St=le;ie(St,"factory",({config:d})=>{var b;const v=Ue((b=d.getOptionalConfigArray("integrations.github"))!=null?b:[]);return i(v.map(N=>new le(N)),N=>N.config.host)});function Ct(A,d){return A.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(v,b,N,ne)=>`//${b}/${N}/${ne}/${d}/`)}const yt="gitlab.com",Fe="https://gitlab.com/api/v4";function at(A){const d=A.getString("host");let v=A.getOptionalString("apiBaseUrl");const b=A.getOptionalString("token");let N=A.getOptionalString("baseUrl");if(v?v=(0,c.trimEnd)(v,"/"):d===yt&&(v=Fe),N?N=(0,c.trimEnd)(N,"/"):N=`https://${d}`,m(d)){if(!v||!y(v))throw new Error(`Invalid GitLab integration config, '${v}' is not a valid apiBaseUrl`);if(!y(N))throw new Error(`Invalid GitLab integration config, '${N}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${d}' is not a valid host`);return{host:d,token:b,apiBaseUrl:v,baseUrl:N}}function lt(A){const d=A.map(at);return d.some(v=>v.host===yt)||d.push({host:yt,apiBaseUrl:Fe,baseUrl:`https://${yt}`}),d}async function Et(A,d){if(A.includes("/-/blob/")){const v=await $(A,d);return k(A,v).toString()}return gt(A).toString()}function rt(A){const{token:d=""}=A;return{headers:{"PRIVATE-TOKEN":d}}}function gt(A){try{const d=new URL(A),[v,b,N,ne,...re]=d.pathname.split("/");if(v!==""||b===""||N===""||ne!=="blob"||!re.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return d.pathname=[v,b,N,"raw",...re].join("/"),d}catch(d){throw new Error(`Incorrect url: ${A}, ${d}`)}}function k(A,d){try{const v=new URL(A),b=v.pathname.split("/-/blob/")[1],[N,...ne]=b.split("/");return v.pathname=["/api/v4/projects",d,"repository/files",encodeURIComponent(decodeURIComponent(ne.join("/"))),"raw"].join("/"),v.search=`?ref=${N}`,v}catch(v){throw new Error(`Incorrect url: ${A}, ${v}`)}}async function $(A,d){const v=new URL(A);if(!v.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const b=v.pathname.split("/-/blob/")[0],N=new URL(`${v.origin}/api/v4/projects/${encodeURIComponent(b.replace(/^\//,""))}`),ne=await fetch(N.toString(),rt(d)),re=await ne.json();if(!ne.ok)throw new Error(`GitLab Error '${re.error}', ${re.error_description}`);return Number(re.id)}catch(b){throw new Error(`Could not get GitLab project ID for: ${A}, ${b}`)}}const P=class{constructor(d){this.integrationConfig=d}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(d){return o(d)}resolveEditUrl(d){return ue(d,"edit")}};let ae=P;ie(ae,"factory",({config:d})=>{var b;const v=lt((b=d.getOptionalConfigArray("integrations.gitlab"))!=null?b:[]);return i(v.map(N=>new P(N)),N=>N.config.host)});function ue(A,d){return A.replace(/\/\-\/(blob|tree|edit)\//,`/-/${d}/`)}const se="amazonaws.com";function ye(A){var fe;const d=A.getOptionalString("endpoint"),v=(fe=A.getOptionalBoolean("s3ForcePathStyle"))!=null?fe:!1;let b,N;if(d){try{const ge=new URL(d);b=ge.host,N=ge.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${d}' is not a valid URL`)}if(N!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${d}'`)}else b=se;const ne=A.getOptionalString("accessKeyId"),re=A.getOptionalString("secretAccessKey"),_=A.getOptionalString("roleArn");return{host:b,endpoint:d,s3ForcePathStyle:v,accessKeyId:ne,secretAccessKey:re,roleArn:_}}function Me(A){const d=A.map(ye);return d.some(v=>v.host===se)||d.push({host:se}),d}const z=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(d){this.integrationConfig=d}resolveUrl(d){return o(d)}resolveEditUrl(d){return d}};let Le=z;ie(Le,"factory",({config:d})=>{var b;const v=Me((b=d.getOptionalConfigArray("integrations.awsS3"))!=null?b:[]);return i(v.map(N=>new z(N)),N=>N.config.host)});class ze{constructor(d){ie(this,"byType");this.byType=d}static fromConfig(d){return new ze({awsS3:Le.factory({config:d}),azure:L.factory({config:d}),bitbucket:X.factory({config:d}),github:St.factory({config:d}),gitlab:ae.factory({config:d})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(d=>d.list())}byUrl(d){return Object.values(this.byType).map(v=>v.byUrl(d)).find(Boolean)}byHost(d){return Object.values(this.byType).map(v=>v.byHost(d)).find(Boolean)}resolveUrl(d){const v=this.byUrl(d.base);return v?v.resolveUrl(d):o(d)}resolveEditUrl(d){const v=this.byUrl(d);return v?v.resolveEditUrl(d):d}}},16119:function(q,s,e){"use strict";var n={};e.r(n),e.d(n,{TechDocsPlugin:function(){return se.plugin}});var t=e(2784),c=e(47093),m=e(10289),y=e(49208),i=e(36964),o=e(20221);const h=[(0,i.createApiFactory)({api:i.discoveryApiRef,deps:{configApi:i.configApiRef},factory:({configApi:Y})=>y.UrlPatternDiscovery.compile(`${Y.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,i.createApiFactory)({api:i.alertApiRef,deps:{},factory:()=>new y.AlertApiForwarder}),(0,i.createApiFactory)({api:i.analyticsApiRef,deps:{},factory:()=>new y.NoOpAnalyticsApi}),(0,i.createApiFactory)({api:i.errorApiRef,deps:{alertApi:i.alertApiRef},factory:({alertApi:Y})=>{const pe=new y.ErrorAlerter(Y,new y.ErrorApiForwarder);return y.UnhandledErrorForwarder.forward(pe,{hidden:!1}),pe}}),(0,i.createApiFactory)({api:i.storageApiRef,deps:{errorApi:i.errorApiRef},factory:({errorApi:Y})=>y.WebStorage.create({errorApi:Y})}),(0,i.createApiFactory)({api:i.fetchApiRef,deps:{configApi:i.configApiRef,identityApi:i.identityApiRef,discoveryApi:i.discoveryApiRef},factory:({configApi:Y,identityApi:pe,discoveryApi:Be})=>(0,y.createFetchApi)({middleware:[y.FetchMiddlewares.resolvePluginProtocol({discoveryApi:Be}),y.FetchMiddlewares.injectIdentityAuth({identityApi:pe,config:Y})]})}),(0,i.createApiFactory)({api:i.oauthRequestApiRef,deps:{},factory:()=>new y.OAuthRequestManager}),(0,i.createApiFactory)({api:i.googleAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:pe,configApi:Be})=>y.GoogleAuth.create({discoveryApi:Y,oauthRequestApi:pe,environment:Be.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.microsoftAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:pe,configApi:Be})=>y.MicrosoftAuth.create({discoveryApi:Y,oauthRequestApi:pe,environment:Be.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.githubAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:pe,configApi:Be})=>y.GithubAuth.create({discoveryApi:Y,oauthRequestApi:pe,defaultScopes:["read:user"],environment:Be.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oktaAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:pe,configApi:Be})=>y.OktaAuth.create({discoveryApi:Y,oauthRequestApi:pe,environment:Be.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.gitlabAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:pe,configApi:Be})=>y.GitlabAuth.create({discoveryApi:Y,oauthRequestApi:pe,environment:Be.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.oneloginAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:pe,configApi:Be})=>y.OneLoginAuth.create({discoveryApi:Y,oauthRequestApi:pe,environment:Be.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.bitbucketAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:pe,configApi:Be})=>y.BitbucketAuth.create({discoveryApi:Y,oauthRequestApi:pe,defaultScopes:["team"],environment:Be.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:i.atlassianAuthApiRef,deps:{discoveryApi:i.discoveryApiRef,oauthRequestApi:i.oauthRequestApiRef,configApi:i.configApiRef},factory:({discoveryApi:Y,oauthRequestApi:pe,configApi:Be})=>y.AtlassianAuth.create({discoveryApi:Y,oauthRequestApi:pe,environment:Be.getOptionalString("auth.environment")})}),(0,i.createApiFactory)({api:o.RV,deps:{discovery:i.discoveryApiRef,identity:i.identityApiRef,config:i.configApiRef},factory:({config:Y,discovery:pe,identity:Be})=>o.iM.create({config:Y,discovery:pe,identity:Be})})];var l=e(77277),E=e(9118),g=e(62833);function C({children:Y}){return(0,m.GV)()?t.createElement(t.Fragment,null,Y):t.createElement(m.VA,null,Y)}const L=()=>t.createElement(E.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),Z=({step:Y,error:pe})=>{let Be="";return Y==="load-config"?Be=`The configuration failed to load, someone should have a look at this error: ${pe.message}`:Y==="load-chunk"&&(Be=`Lazy loaded chunk failed to load, try to reload the page: ${pe.message}`),t.createElement(C,null,t.createElement(E.ErrorPage,{status:"501",statusMessage:Be}))},S=({error:Y,resetError:pe,plugin:Be})=>t.createElement(E.ErrorPanel,{title:`Error in ${Be==null?void 0:Be.getId()}`,defaultExpanded:!0,error:Y},t.createElement(l.Z,{variant:"outlined",onClick:pe},"Retry")),G={Progress:E.Progress,Router:g.VK,NotFoundErrorPage:L,BootErrorPage:Z,ErrorBoundaryFallback:S};var B=e(43642),T=e(80079),x=e(90941),D=e(32915),U=e(40562),V=e(21853),X=e(60744),Ee=e(66569),Se=e(30254),Oe=e(13384),Ae=e(15933),Ke=e(58838),Ge=e(86737),Qe=e(4989),We=e(44407),je=e(18628),it=e(84219),Ue=e(98685),qe=e(39781);const nt={brokenImage:T.Z,catalog:je.Z,scaffolder:D.Z,techdocs:U.Z,search:V.Z,chat:X.Z,dashboard:Ee.Z,docs:Se.Z,email:Oe.Z,github:Ke.Z,group:it.Z,help:Ge.Z,"kind:api":Ae.Z,"kind:component":We.Z,"kind:domain":B.Z,"kind:group":it.Z,"kind:location":Qe.Z,"kind:system":x.Z,"kind:user":Ue.Z,user:Ue.Z,warning:qe.Z};var ut=e(73689),dt=e(48032);const ht={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")`},et={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"]};function Xe(Y,pe){const It=`linear-gradient(90deg, ${(Y.length===1?[Y[0],Y[0]]:Y).join(", ")})`,Zt=`${pe}, ${It}`;return{colors:Y,shape:pe,backgroundImage:Zt}}const vt={home:Xe(et.teal,ht.wave),documentation:Xe(et.pinkSea,ht.wave2),tool:Xe(et.purpleSky,ht.round),service:Xe(et.marineBlue,ht.wave),website:Xe(et.veryBlue,ht.wave),library:Xe(et.rubyRed,ht.wave),other:Xe(et.darkGrey,ht.wave),app:Xe(et.toastyOrange,ht.wave),apis:Xe(et.teal,ht.wave2)},ct='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function St(Y){const{palette:pe,fontFamily:Be=ct,defaultPageTheme:It,pageTheme:Zt=vt}=Y;if(!Zt[It])throw new Error(`${It} is not defined in pageTheme.`);return{palette:pe,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:Be,h5:{fontWeight:700},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:Zt[It],getPageTheme:({themeId:on})=>{var Cn;return(Cn=Zt[on])!=null?Cn:Zt[It]}}}function Ct(Y){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:Y.typography.fontFamily},body:{height:"100%",fontFamily:Y.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:Y.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:Y.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:Y.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:Y.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:Y.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,dt.darken)(Y.palette.link,.3),background:(0,dt.lighten)(Y.palette.link,.95)},[Y.breakpoints.up("md")]:{minWidth:120,fontSize:Y.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:Y.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:Y.spacing(1),marginBottom:Y.spacing(1),color:Y.palette.grey[900]},outlined:{color:Y.palette.text.primary},label:{lineHeight:`${Y.spacing(2.5)}px`,fontWeight:Y.typography.fontWeightMedium,fontSize:`${Y.spacing(1.75)}px`},labelSmall:{fontSize:`${Y.spacing(1.5)}px`},deleteIcon:{color:Y.palette.grey[500],width:`${Y.spacing(3)}px`,height:`${Y.spacing(3)}px`,margin:`0 ${Y.spacing(.75)}px 0 -${Y.spacing(.75)}px`},deleteIconSmall:{width:`${Y.spacing(2)}px`,height:`${Y.spacing(2)}px`,margin:`0 ${Y.spacing(.5)}px 0 -${Y.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 yt(Y){const pe=St(Y),Be=(0,ut.Z)(pe),It=Ct(Be);return{...Be,overrides:It}}var Fe=e(34505);const at=yt({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:Fe.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:vt}),lt=yt({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:Fe.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:vt});var Et=e(98192),rt=e(15222),gt=e(41547),k=e(87561);const $=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(rt.Z,null),Provider:({children:Y})=>t.createElement(gt.Z,{theme:at},t.createElement(k.ZP,null,Y))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(Et.Z,null),Provider:({children:Y})=>t.createElement(gt.Z,{theme:lt},t.createElement(k.ZP,null,Y))}];function ae(Y){var pe,Be,It;return(0,y.createSpecializedApp)({...Y,apis:(pe=Y==null?void 0:Y.apis)!=null?pe:[],bindRoutes:Y==null?void 0:Y.bindRoutes,components:{...G,...Y==null?void 0:Y.components},configLoader:Y==null?void 0:Y.configLoader,defaultApis:h,icons:{...nt,...Y==null?void 0:Y.icons},plugins:(Be=Y==null?void 0:Y.plugins)!=null?Be:[],themes:(It=Y==null?void 0:Y.themes)!=null?It:$})}var ue=e(92902),se=e(82250),ye=e(36356);class Me{constructor({configApi:pe,discoveryApi:Be,identityApi:It}){ie(this,"configApi");ie(this,"discoveryApi");ie(this,"identityApi");this.configApi=pe,this.discoveryApi=Be,this.identityApi=It}async getApiOrigin(){var pe;return(pe=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?pe:await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var pe;return(pe=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?pe:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(pe,Be){const Zt=`${await this.getApiOrigin()}/${Be}`,on=await fetch(`${Zt.endsWith("/")?Zt:`${Zt}/`}index.html`);if(on.status===404)throw new Error("Page not found");return on.text()}async syncEntityDocs(pe){return"cached"}async getBaseUrl(pe,Be,It){const Zt=await this.getApiOrigin();return new URL(pe,`${Zt}/${It}`).toString()}}class Le{constructor({configApi:pe,discoveryApi:Be,identityApi:It}){ie(this,"configApi");ie(this,"discoveryApi");ie(this,"identityApi");this.configApi=pe,this.discoveryApi=Be,this.identityApi=It}async getApiOrigin(){var pe;return(pe=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?pe:await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(pe){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(pe){return{site_name:"Live preview environment",site_description:""}}}const ze=[(0,i.createApiFactory)({api:se.techdocsStorageApiRef,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:Y,discoveryApi:pe,identityApi:Be})=>new Me({configApi:Y,discoveryApi:pe,identityApi:Be})}),(0,i.createApiFactory)({api:se.techdocsApiRef,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef},factory:({configApi:Y,discoveryApi:pe,identityApi:Be})=>new Le({configApi:Y,discoveryApi:pe,identityApi:Be})}),(0,i.createApiFactory)({api:ye.q3,deps:{configApi:i.configApiRef},factory:({configApi:Y})=>ye.ae.fromConfig(Y)})];var K=e(79692),j=e(86689),M=e(58845);const te=(0,K.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var ve=()=>{const Y=te();return t.createElement("svg",{className:Y.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:Y.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 Te=(0,K.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var ft=()=>{const Y=Te();return t.createElement("svg",{className:Y.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:Y.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 At=(0,K.Z)({root:{width:E.sidebarConfig.drawerWidthClosed,height:3*E.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:E.sidebarConfig.drawerWidthClosed,marginLeft:24}}),le=()=>{const Y=At(),{isOpen:pe}=(0,t.useContext)(E.SidebarContext);return t.createElement("div",{className:Y.root},t.createElement(j.Z,{component:g.OL,to:"/docs/default/component/local/",underline:"none",className:Y.link},pe?t.createElement(ve,null):t.createElement(ft,null)))},P=({children:Y})=>t.createElement(E.SidebarPage,null,t.createElement(E.Sidebar,null,t.createElement(le,null),t.createElement(E.SidebarDivider,null),t.createElement(E.SidebarItem,{icon:M.Z,to:"/docs/default/component/local",text:"Docs Preview"})),Y);var z=e(95544),A=e(80030),d=e(61837),v=e(32388),b=e(4142);const N=(0,K.Z)(Y=>({headerIcon:{color:Y.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:Y.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var ne;(function(Y){const pe="light";Y.LIGHT=pe;const Be="dark";Y.DARK=Be})(ne||(ne={}));const re=(0,t.createContext)({theme:ne.LIGHT,toggleTheme:()=>{}}),_=({children:Y})=>{const[pe,Be]=(0,t.useState)(ne.LIGHT),It=(0,t.useCallback)(()=>{Be(Cn=>Cn===ne.LIGHT?ne.DARK:ne.LIGHT)},[Be]),Zt={theme:pe,toggleTheme:It},on={[ne.LIGHT]:at,[ne.DARK]:lt};return t.createElement(re.Provider,{value:Zt},t.createElement(gt.Z,{theme:on[pe]},Y))},fe=()=>(0,t.useContext)(re),ge=()=>{const Y=N(),{theme:pe,toggleTheme:Be}=fe(),It={[ne.LIGHT]:{icon:b.Z,title:"Dark theme"},[ne.DARK]:{icon:v.Z,title:"Light theme"}},{title:Zt,icon:on}=It[pe];return t.createElement(z.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(A.ZP,{title:Zt,arrow:!0},t.createElement(d.Z,{size:"small",onClick:Be},t.createElement(on,{className:Y.headerIcon}))))},Re=({onReady:Y,entityRef:pe})=>{const Be=N();return t.createElement(E.Content,{className:Be.content,"data-testid":"techdocs-content"},t.createElement(se.Reader,{onReady:Y,entityRef:pe,withSearch:!1}))},we=()=>{const Y={site_name:"Live preview environment",site_description:""};return t.createElement(se.TechDocsPage,null,({entityRef:pe,onReady:Be})=>t.createElement(t.Fragment,null,t.createElement(se.TechDocsPageHeader,{entityRef:pe,techDocsMetadata:Y},t.createElement(ge,null)),t.createElement(Re,{entityRef:pe,onReady:Be})))},He=t.createElement(_,null,t.createElement(we,null)),_e={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external",requestUrl:"http://localhost:3000/api"}},ke={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external",requestUrl:"http://localhost:7007/api"}};async function Rt(){const Y=await fetch("/.detect");return Y.ok?(await Y.text()).trim()==="techdocs-cli-server":!1}async function wt(){const Y=await(0,y.defaultConfigLoader)(),pe=await Rt();return[...Y,{context:"detected",data:pe?_e:ke}]}const Dt=ae({apis:ze,configLoader:wt,plugins:Object.values(n)}),Kt=Dt.getProvider(),mt=Dt.getRouter(),Tt=t.createElement(y.FlatRoutes,null,t.createElement(m.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(m.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(ue.CatalogEntityPage,null)}),t.createElement(m.AW,{path:"/docs",element:t.createElement(se.TechDocsIndexPage,null)},t.createElement(se.DefaultTechDocsHome,null)),t.createElement(m.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(se.TechDocsReaderPage,null)},He));var _t=()=>t.createElement(Kt,null,t.createElement(mt,null,t.createElement(P,null,Tt)));c.render(t.createElement(_t,null),document.getElementById("root"))},76241:function(q,s,e){"use strict";e.d(s,{CT:function(){return i},EI:function(){return l},uW:function(){return m},Vt:function(){return o}});function n(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=n(),c=E=>`__@backstage/${E}__`;function m(E,g){const C=c(E);let L=t[C];return L||(L=g(),t[C]=L,L)}var y=e(2784);function i(E){return m(E,()=>(0,y.createContext)(void 0))}function o(E){return(0,y.useContext)(i(E))}function h(E){return{set(g){globalThis[`__@backstage/${E}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${E}__`]}}}function l(E){return Object.freeze(E),{atVersion(g){return E[g]}}}},22707:function(q,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return E},CATALOG_FILTER_EXISTS:function(){return n.n3},EntityKindFilter:function(){return Ct},EntityLifecyclePicker:function(){return v},EntityListProvider:function(){return Qe},EntityOwnerPicker:function(){return re},EntityRefLink:function(){return ct},EntityRefLinks:function(){return St},EntityTable:function(){return _e},EntityTagPicker:function(){return Dt},EntityTypePicker:function(){return Tt},FavoriteEntity:function(){return on},InspectEntityDialog:function(){return Ur},UnregisterEntityDialog:function(){return Nn},UserListPicker:function(){return jr},catalogApiRef:function(){return c},entityRouteRef:function(){return ut},getEntityRelations:function(){return Oe},getEntitySourceLocation:function(){return Ae},humanizeEntityRef:function(){return et},starredEntitiesApiRef:function(){return m},useAsyncEntity:function(){return L},useEntity:function(){return C},useEntityList:function(){return We},useEntityOwnership:function(){return Le},useEntityPermission:function(){return K},useRelatedEntities:function(){return $},useStarredEntities:function(){return se}});var n=e(30001),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"}),m=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var y=e(82394);class i{constructor(){ie(this,"starredEntities",new Set);ie(this,"subscribers",new Set);ie(this,"observable",new ObservableImpl(O=>(O.next(new Set(this.starredEntities)),this.subscribers.add(O),()=>{this.subscribers.delete(O)})))}async toggleStarred(O){this.starredEntities.delete(O)||this.starredEntities.add(O);for(const W of this.subscribers)W.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),h=e(76241);const l=(0,h.CT)("entity-context"),E=({children:I,entity:O,loading:W,error:J,refresh:ee})=>{const oe={entity:O,loading:W,error:J,refresh:ee};return o.createElement(l.Provider,{value:(0,h.EI)({1:oe})},I)},g=({entity:I,children:O})=>React.createElement(E,{entity:I,loading:!Boolean(I),error:void 0,refresh:void 0,children:O});function C(){const I=(0,h.Vt)("entity-context");if(!I)throw new Error("Entity context is not available");const O=I.atVersion(1);if(!O)throw new Error("EntityContext v1 not available");O.entity||console.warn("DEPRECATION: useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead. This warning will be replaced with an error in future releases.");const{entity:W,loading:J,error:ee,refresh:oe}=O;return{entity:W,loading:J,error:ee,refresh:oe}}function L(){const I=(0,h.Vt)("entity-context");if(!I)throw new Error("Entity context is not available");const O=I.atVersion(1);if(!O)throw new Error("EntityContext v1 not available");const{entity:W,loading:J,error:ee,refresh:oe}=O;return{entity:W,loading:J,error:ee,refresh:oe}}var Z=e(76635),S=e(19126),G=e.n(S),B=e(10289),T=e(69294),x=e(48760),D=e(90736);function U(I){return I.reduce((O,W)=>({...O,...W.getCatalogFilters?W.getCatalogFilters():{}}),{})}function V(I){return O=>I.every(W=>!W.filterEntity||W.filterEntity(O))}var X=e(48023);function Ee(I){var O;return(O=I.metadata.annotations)==null?void 0:O[ANNOTATION_VIEW_URL]}function Se(I){var O;return(O=I.metadata.annotations)==null?void 0:O[ANNOTATION_EDIT_URL]}function Oe(I,O,W){var ee;let J=((ee=I==null?void 0:I.relations)==null?void 0:ee.filter(oe=>oe.type===O).map(oe=>(0,X.of)(oe.targetRef)))||[];return(W==null?void 0:W.kind)&&(J=J.filter(oe=>oe.kind.toLocaleLowerCase("en-US")===W.kind.toLocaleLowerCase("en-US"))),J}function Ae(I,O){var J;const W=(J=I.metadata.annotations)==null?void 0:J[X.M6];if(!!W)try{const ee=(0,X.Ou)(W),oe=O.byUrl(ee.target);return{locationTargetUrl:ee.target,integrationType:oe==null?void 0:oe.type}}catch{return}}function Ke(I,O){const W=new Set([...getEntityRelations(I,RELATION_MEMBER_OF,{kind:"group"}),...I?[getCompoundEntityRef(I)]:[]].map(stringifyEntityRef)),J=getEntityRelations(O,RELATION_OWNED_BY).map(stringifyEntityRef);for(const ee of J)if(W.has(ee))return!0;return!1}const Ge=(0,o.createContext)(void 0),Qe=({children:I})=>{const O=(0,D.default)(),W=(0,t.useApi)(c),[J,ee]=(0,o.useState)({}),oe=(0,B.TH)(),he=(0,o.useMemo)(()=>{var tt;return(tt=G().parse(oe.search,{ignoreQueryPrefix:!0}).filters)!=null?tt:{}},[oe]),[be,Ne]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:De,error:Ze},$e]=(0,T.default)(async()=>{var Vt;const tt=(0,Z.compact)(Object.values(J)),Ye=V(tt),Lt=U(tt),Ft=U((0,Z.compact)(Object.values(be.appliedFilters))),mn=Object.keys(J).reduce((Yt,hn)=>{const en=J[hn];return(en==null?void 0:en.toQueryValue)&&(Yt[hn]=en.toQueryValue()),Yt},{});if((0,Z.isEqual)(Ft,Lt))Ne({appliedFilters:J,backendEntities:be.backendEntities,entities:be.backendEntities.filter(Ye)});else{const Yt=await W.getEntities({filter:Lt});Ne({appliedFilters:J,backendEntities:Yt.items,entities:Yt.items.filter(Ye)})}if(O()){const Yt=G().parse(oe.search,{ignoreQueryPrefix:!0}),hn=G().stringify({...Yt,filters:mn},{addQueryPrefix:!0,arrayFormat:"repeat"}),en=`${window.location.pathname}${hn}`;(Vt=window.history)==null||Vt.replaceState(null,document.title,en)}},[W,he,J,be],{loading:!0});(0,x.Z)($e,10,[J]);const Ve=(0,o.useCallback)(tt=>{ee(Ye=>{const Lt=typeof tt=="function"?tt(Ye):tt;return{...Ye,...Lt}})},[]),pt=(0,o.useMemo)(()=>({filters:be.appliedFilters,entities:be.entities,backendEntities:be.backendEntities,updateFilters:Ve,queryParameters:he,loading:De,error:Ze}),[be,Ve,he,De,Ze]);return o.createElement(Ge.Provider,{value:pt},I)};function We(){const I=(0,o.useContext)(Ge);if(!I)throw new Error("useEntityList must be used within EntityListProvider");return I}var je=e(64279),it=e(18149),Ue=e.n(it),qe=e(829),nt=e.n(qe);const ut=(0,h.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function dt(I){var O,W;return{kind:I.kind.toLocaleLowerCase("en-US"),namespace:(W=(O=I.metadata.namespace)==null?void 0:O.toLocaleLowerCase("en-US"))!=null?W:DEFAULT_NAMESPACE,name:I.metadata.name}}const ht=et;function et(I,O){const W=O==null?void 0:O.defaultKind;let J,ee,oe;return"metadata"in I?(J=I.kind,ee=I.metadata.namespace,oe=I.metadata.name):(J=I.kind,ee=I.namespace,oe=I.name),ee===X.zG&&(ee=void 0),J=J.toLocaleLowerCase("en-US"),J=W&&W.toLocaleLowerCase("en-US")===J?void 0:J,`${J?`${J}:`:""}${ee?`${ee}/`:""}${oe}`}var Xe=e(9118),vt=e(80030);const ct=(0,o.forwardRef)((I,O)=>{var tt;const{entityRef:W,defaultKind:J,title:ee,children:oe,...he}=I,be=(0,t.useRouteRef)(ut);let Ne,De,Ze;if(typeof W=="string"){const Ye=(0,X.of)(W);Ne=Ye.kind,De=Ye.namespace,Ze=Ye.name}else"metadata"in W?(Ne=W.kind,De=W.metadata.namespace,Ze=W.metadata.name):(Ne=W.kind,De=W.namespace,Ze=W.name);Ne=Ne.toLocaleLowerCase("en-US"),De=(tt=De==null?void 0:De.toLocaleLowerCase("en-US"))!=null?tt:X.zG;const $e={kind:Ne,namespace:De,name:Ze},Ve=et({kind:Ne,namespace:De,name:Ze},{defaultKind:J}),pt=o.createElement(Xe.Link,{...he,ref:O,to:be($e)},oe,!oe&&(ee!=null?ee:Ve));return ee?o.createElement(vt.ZP,{title:Ve},pt):pt}),St=({entityRefs:I,defaultKind:O,...W})=>o.createElement(o.Fragment,null,I.map((J,ee)=>o.createElement(o.Fragment,{key:ee},ee>0&&", ",o.createElement(ct,{...W,entityRef:J,defaultKind:O}))));class Ct{constructor(O){this.value=O}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class yt{constructor(O){this.value=O}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class Fe{constructor(O){this.values=O}filterEntity(O){return this.values.every(W=>{var J;return((J=O.metadata.tags)!=null?J:[]).includes(W)})}toQueryValue(){return this.values}}class at{constructor(O){this.value=O}filterEntity(O){var J;const W=this.value.toLocaleUpperCase("en-US");return O.metadata.name.toLocaleUpperCase("en-US").includes(W)||`${O.metadata.title}`.toLocaleUpperCase("en-US").includes(W)||((J=O.metadata.tags)==null?void 0:J.join("").toLocaleUpperCase("en-US").indexOf(W))!==-1}}class lt{constructor(O){this.values=O}filterEntity(O){return this.values.some(W=>Oe(O,X.S4).some(J=>et(J,{defaultKind:"group"})===W))}toQueryValue(){return this.values}}class Et{constructor(O){this.values=O}filterEntity(O){return this.values.some(W=>{var J;return((J=O.spec)==null?void 0:J.lifecycle)===W})}toQueryValue(){return this.values}}class rt{constructor(O,W,J){this.value=O,this.isOwnedEntity=W,this.isStarredEntity=J}filterEntity(O){switch(this.value){case"owned":return this.isOwnedEntity(O);case"starred":return this.isStarredEntity(O);default:return!0}}toQueryValue(){return this.value}}function gt(){var Ye;const I=(0,t.useApi)(c),{filters:{kind:O,type:W},queryParameters:J,updateFilters:ee}=We(),oe=(0,o.useMemo)(()=>[J.type].flat().filter(Boolean),[J]),[he,be]=(0,o.useState)(oe.length?oe:(Ye=W==null?void 0:W.getTypes())!=null?Ye:[]);(0,o.useEffect)(()=>{oe.length&&be(oe)},[oe]);const[Ne,De]=(0,o.useState)([]),Ze=(0,o.useMemo)(()=>O==null?void 0:O.value,[O]),{error:$e,loading:Ve,value:pt}=(0,je.default)(async()=>Ze?await I.getEntityFacets({filter:{kind:Ze},facets:["spec.type"]}).then(Ft=>Ft.facets["spec.type"]||[]):[],[Ze,I]),tt=(0,o.useRef)(pt);return(0,o.useEffect)(()=>{const Lt=tt.current;if(tt.current=pt,Ve||!Ze||Lt===pt||!pt)return;const Ft=nt()(pt,Vt=>-Vt.count).map(Vt=>Vt.value);De(Ft);const mn=he.filter(Vt=>Ft.includes(Vt));Ue()(he,mn)||be(mn)},[Ve,Ze,he,be,pt]),(0,o.useEffect)(()=>{ee({type:he.length?new yt(he):void 0})},[he,ee]),{loading:Ve,error:$e,availableTypes:Ne,selectedTypes:he,setSelectedTypes:be}}const k=20;function $(I,O){var Ne,De;const W=(Ne=O==null?void 0:O.type)==null?void 0:Ne.toLocaleLowerCase("en-US"),J=(De=O==null?void 0:O.kind)==null?void 0:De.toLocaleLowerCase("en-US"),ee=(0,t.useApi)(c),{loading:oe,value:he,error:be}=(0,je.default)(async()=>{var tt;const Ze=(tt=I.relations)==null?void 0:tt.map(Ye=>({type:Ye.type,target:(0,X.of)(Ye.targetRef)})).filter(Ye=>(!W||Ye.type.toLocaleLowerCase("en-US")===W)&&(!J||Ye.target.kind===J));if(!Ze)return[];const $e=Object.values((0,Z.groupBy)(Ze,({target:Ye})=>`${Ye.kind}:${Ye.namespace}`.toLocaleLowerCase("en-US"))),Ve=[];for(const Ye of $e)Ve.push({kind:Ye[0].target.kind,namespace:Ye[0].target.namespace,nameBatches:(0,Z.chunk)(Ye.map(Lt=>Lt.target.name),k)});return(await Promise.all(Ve.flatMap(Ye=>Ye.nameBatches.map(Lt=>ee.getEntities({filter:{kind:Ye.kind,"metadata.namespace":Ye.namespace,"metadata.name":Lt}}))))).flatMap(Ye=>Ye.items)},[I,W,J]);return{entities:he,loading:oe,error:be}}var ae=e(72164);function ue(I){return typeof I=="string"?I:(0,X.eE)(I)}function se(){const I=(0,t.useApi)(m),O=(0,ae.Z)(I.starredEntitie$(),new Set),W=(0,o.useCallback)(ee=>O.has(ue(ee)),[O]),J=(0,o.useCallback)(ee=>I.toggleStarred(ue(ee)).then(),[I]);return{starredEntities:O,toggleStarredEntity:J,isStarredEntity:W}}function ye(I){return typeof I=="string"?I:(0,X.eE)(I)}function Me(I){const O=(0,t.useApi)(m),[W,J]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const oe=O.starredEntitie$().subscribe({next(he){J(he.has(ye(I)))}});return()=>{oe.unsubscribe()}},[I,O]),{toggleStarredEntity:(0,o.useCallback)(()=>O.toggleStarred(ye(I)).then(),[I,O]),isStarredEntity:W}}function Le(){const I=(0,t.useApi)(t.identityApiRef),{loading:O,value:W}=(0,je.default)(async()=>{const{ownershipEntityRefs:ee}=await I.getBackstageIdentity();return ee},[]),J=(0,o.useMemo)(()=>{const ee=new Set(W!=null?W:[]);return oe=>{const he=Oe(oe,X.S4).map(X.eE);for(const be of he)if(ee.has(be))return!0;return!1}},[W]);return(0,o.useMemo)(()=>({loading:O,isOwnedEntity:J}),[O,J])}var ze=e(20221);function K(I){const{entity:O,loading:W,error:J}=C(),{allowed:ee,loading:oe,error:he}=(0,ze.gI)(I,O?(0,X.eE)(O):void 0);return W||oe?{loading:!0,allowed:!1}:J?{loading:!1,allowed:!1,error:J}:{loading:!1,allowed:ee,error:he}}const j=I=>{var he;const{initialFilter:O,hidden:W}=I,{updateFilters:J,queryParameters:ee}=useEntityList(),[oe]=useState((he=[ee.kind].flat()[0])!=null?he:O);return useEffect(()=>{J({kind:oe?new EntityKindFilter(oe):void 0})},[oe,J]),W?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var M=e(79692),te=e(95544),me=e(90436),ve=e(5806),Te=e(21324),xe=e(86619),ft=e(19996),At=e(25505),le=e(38016),P=e(88013);const z=(0,M.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),A=o.createElement(At.Z,{fontSize:"small"}),d=o.createElement(ft.Z,{fontSize:"small"}),v=()=>{var De,Ze;const I=z(),{updateFilters:O,backendEntities:W,filters:J,queryParameters:ee}=We(),oe=(0,o.useMemo)(()=>[ee.lifecycles].flat().filter(Boolean),[ee]),[he,be]=(0,o.useState)(oe.length?oe:(Ze=(De=J.lifecycles)==null?void 0:De.values)!=null?Ze:[]);(0,o.useEffect)(()=>{oe.length&&be(oe)},[oe]),(0,o.useEffect)(()=>{O({lifecycles:he.length?new Et(he):void 0})},[he,O]);const Ne=(0,o.useMemo)(()=>[...new Set(W.map($e=>{var Ve;return(Ve=$e.spec)==null?void 0:Ve.lifecycle}).filter(Boolean))].sort(),[W]);return Ne.length?o.createElement(te.Z,{pb:1,pt:1},o.createElement(me.Z,{variant:"button"},"Lifecycle"),o.createElement(P.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Ne,value:he,onChange:($e,Ve)=>be(Ve),renderOption:($e,{selected:Ve})=>o.createElement(ve.Z,{control:o.createElement(Te.Z,{icon:A,checkedIcon:d,checked:Ve}),label:$e}),size:"small",popupIcon:o.createElement(le.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:$e=>o.createElement(xe.Z,{...$e,className:I.input,variant:"outlined"})})):null},b=(0,M.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),N=o.createElement(At.Z,{fontSize:"small"}),ne=o.createElement(ft.Z,{fontSize:"small"}),re=()=>{var De,Ze;const I=b(),{updateFilters:O,backendEntities:W,filters:J,queryParameters:ee}=We(),oe=(0,o.useMemo)(()=>[ee.owners].flat().filter(Boolean),[ee]),[he,be]=(0,o.useState)(oe.length?oe:(Ze=(De=J.owners)==null?void 0:De.values)!=null?Ze:[]);(0,o.useEffect)(()=>{oe.length&&be(oe)},[oe]),(0,o.useEffect)(()=>{O({owners:he.length?new lt(he):void 0})},[he,O]);const Ne=(0,o.useMemo)(()=>[...new Set(W.flatMap($e=>Oe($e,X.S4).map(Ve=>et(Ve,{defaultKind:"group"}))).filter(Boolean))].sort(),[W]);return Ne.length?o.createElement(te.Z,{pb:1,pt:1},o.createElement(me.Z,{variant:"button"},"Owner"),o.createElement(P.ZP,{multiple:!0,"aria-label":"Owner",options:Ne,value:he,onChange:($e,Ve)=>be(Ve),renderOption:($e,{selected:Ve})=>o.createElement(ve.Z,{control:o.createElement(Te.Z,{icon:N,checkedIcon:ne,checked:Ve}),label:$e}),size:"small",popupIcon:o.createElement(le.Z,{"data-testid":"owner-picker-expand"}),renderInput:$e=>o.createElement(xe.Z,{...$e,className:I.input,variant:"outlined"})})):null},_=(0,M.Z)(I=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),fe=()=>{var oe,he;const I=_(),{filters:O,updateFilters:W}=useEntityList(),[J,ee]=useState((he=(oe=O.text)==null?void 0:oe.value)!=null?he:"");return useDebounce(()=>{W({text:J.length?new EntityTextFilter(J):void 0})},250,[J,W]),React.createElement(Toolbar,{className:I.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{id:"input-with-icon-adornment",className:I.input,placeholder:"Search",autoComplete:"off",onChange:be=>ee(be.target.value),value:J,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>ee(""),edge:"end",disabled:J.length===0},React.createElement(Clear,null)))})))},ge=Object.freeze({createEntityRefColumn(I){const{defaultKind:O}=I;function W(J){var ee;return((ee=J.metadata)==null?void 0:ee.title)||et(J,{defaultKind:O})}return{title:"Name",highlight:!0,customFilterAndSearch(J,ee){return W(ee).includes(J)},customSort(J,ee){return W(J).localeCompare(W(ee))},render:J=>{var ee;return o.createElement(ct,{entityRef:J,defaultKind:O,title:(ee=J.metadata)==null?void 0:ee.title})}}},createEntityRelationColumn({title:I,relation:O,defaultKind:W,filter:J}){function ee(he){return Oe(he,O,J)}function oe(he){return ee(he).map(be=>et(be,{defaultKind:W})).join(", ")}return{title:I,customFilterAndSearch(he,be){return oe(be).includes(he)},customSort(he,be){return oe(he).localeCompare(oe(be))},render:he=>o.createElement(St,{entityRefs:ee(he),defaultKind:W})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:X.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:X.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:X.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:I=>o.createElement(Xe.OverflowTooltip,{text:I.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),Re=[ge.createEntityRefColumn({defaultKind:"system"}),ge.createDomainColumn(),ge.createOwnerColumn(),ge.createMetadataDescriptionColumn()],we=[ge.createEntityRefColumn({defaultKind:"component"}),ge.createSystemColumn(),ge.createOwnerColumn(),ge.createSpecTypeColumn(),ge.createSpecLifecycleColumn(),ge.createMetadataDescriptionColumn()],He=(0,M.Z)(I=>({empty:{padding:I.spacing(2),display:"flex",justifyContent:"center"}})),_e=I=>{const{entities:O,title:W,emptyContent:J,variant:ee="gridItem",columns:oe}=I,he=He(),be={minWidth:"0",width:"100%"};return ee==="gridItem"&&(be.height="calc(100% - 10px)"),o.createElement(Xe.Table,{columns:oe,title:W,style:be,emptyContent:J&&o.createElement("div",{className:he.empty},J),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:O})};_e.columns=ge,_e.systemEntityColumns=Re,_e.componentEntityColumns=we;const ke=(0,M.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),Rt=o.createElement(At.Z,{fontSize:"small"}),wt=o.createElement(ft.Z,{fontSize:"small"}),Dt=()=>{var De,Ze;const I=ke(),{updateFilters:O,backendEntities:W,filters:J,queryParameters:ee}=We(),oe=(0,o.useMemo)(()=>[ee.tags].flat().filter(Boolean),[ee]),[he,be]=(0,o.useState)(oe.length?oe:(Ze=(De=J.tags)==null?void 0:De.values)!=null?Ze:[]);(0,o.useEffect)(()=>{oe.length&&be(oe)},[oe]),(0,o.useEffect)(()=>{O({tags:he.length?new Fe(he):void 0})},[he,O]);const Ne=(0,o.useMemo)(()=>[...new Set(W.flatMap($e=>$e.metadata.tags).filter(Boolean))].sort(),[W]);return Ne.length?o.createElement(te.Z,{pb:1,pt:1},o.createElement(me.Z,{variant:"button"},"Tags"),o.createElement(P.ZP,{multiple:!0,"aria-label":"Tags",options:Ne,value:he,onChange:($e,Ve)=>be(Ve),renderOption:($e,{selected:Ve})=>o.createElement(ve.Z,{control:o.createElement(Te.Z,{icon:Rt,checkedIcon:wt,checked:Ve}),label:$e}),size:"small",popupIcon:o.createElement(le.Z,{"data-testid":"tag-picker-expand"}),renderInput:$e=>o.createElement(xe.Z,{...$e,className:I.input,variant:"outlined"})})):null};var Kt=e(82108),mt=e.n(Kt);const Tt=I=>{var De;const{hidden:O,initialFilter:W}=I,J=(0,t.useApi)(t.alertApiRef),{error:ee,availableTypes:oe,selectedTypes:he,setSelectedTypes:be}=gt();if((0,o.useEffect)(()=>{ee&&J.post({message:"Failed to load entity types",severity:"error"}),W&&be([W])},[ee,J,W,be]),oe.length===0||ee)return null;const Ne=[{value:"all",label:"All"},...oe.map(Ze=>({value:Ze,label:mt()(Ze)}))];return O?null:o.createElement(te.Z,{pb:1,pt:1},o.createElement(Xe.Select,{label:"Type",items:Ne,selected:(De=Ne.length>1?he[0]:void 0)!=null?De:"all",onChange:Ze=>be(Ze==="all"?[]:[String(Ze)])}))};var zt=e(15459),_t=e(61837),Y=e(11640),pe=e(28347);const Be=(0,zt.Z)({root:{color:"#f3ba37"}})(Y.Z),It=I=>I?"Remove from favorites":"Add to favorites",Zt=I=>I?React.createElement(Be,null):React.createElement(StarBorder,null),on=I=>{const{toggleStarredEntity:O,isStarredEntity:W}=Me(I.entity);return o.createElement(_t.Z,{color:"inherit",...I,onClick:()=>O()},o.createElement(vt.ZP,{title:W?"Remove from favorites":"Add to favorites"},W?o.createElement(Be,null):o.createElement(pe.Z,null)))};var Cn=e(8629),_n=e(79249),er=e(38724),aa=e(99152),Fn=e(6487),Bn=e(49429),En=e(77277),Bt=e(55999),oa=e(72779),Hn=e.n(oa),sa=e(39412);const tr=sa.Z;function Tr(I,O){if(I)return I.toLocaleLowerCase("en-US");if(O)try{return(0,X.of)(O).kind.toLocaleLowerCase("en-US")}catch{return}}function Pr(I,O){const W=(0,t.useApp)(),J=Tr(I,O);return J&&W.getSystemIcon(`kind:${J}`)||tr}function Vn(I){const{kind:O,entityRef:W,...J}=I,ee=Pr(O,W);return o.createElement(ee,{...J})}const Ir=(0,M.Z)(I=>({node:{fill:I.palette.grey[300],stroke:I.palette.grey[300],"&.primary":{fill:I.palette.primary.light,stroke:I.palette.primary.light},"&.secondary":{fill:I.palette.secondary.light,stroke:I.palette.secondary.light}},text:{fill:I.palette.getContrastText(I.palette.grey[300]),"&.primary":{fill:I.palette.primary.contrastText},"&.secondary":{fill:I.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function nr(I){const O=(0,t.useApi)(c),W=(0,X.eE)(I),{loading:J,error:ee,value:oe}=(0,je.default)(async()=>{const he=await O.getEntityAncestors({entityRef:W}),be=new Array,Ne=new Array;for(const De of he.items){const Ze=(0,X.eE)(De.entity),$e=Ze===he.rootEntityRef;be.push({id:Ze,root:$e,...De.entity});for(const Ve of De.parentEntityRefs)Ne.push({from:Ze,to:Ve})}return{nodes:be,edges:Ne}},[W]);return{loading:J,error:ee,nodes:(oe==null?void 0:oe.nodes)||[],edges:(oe==null?void 0:oe.edges)||[]}}function Lr({node:I}){const O=Ir(),W=(0,B.s0)(),J=(0,t.useRouteRef)(ut),[ee,oe]=(0,o.useState)(0),[he,be]=(0,o.useState)(0),Ne=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(Ne.current){let{height:Lt,width:Ft}=Ne.current.getBBox();Lt=Math.round(Lt),Ft=Math.round(Ft),(Lt!==he||Ft!==ee)&&(oe(Ft),be(Lt))}},[ee,he]);const De=10,Ze=he,$e=Ze+De,Ve=$e+ee+De*2,pt=he+De*2,tt=I.metadata.title||(I.kind&&I.metadata.name&&I.metadata.namespace?et({kind:I.kind,name:I.metadata.name,namespace:I.metadata.namespace||""}):I.id),Ye=()=>{W(J({kind:I.kind,namespace:I.metadata.namespace||X.zG,name:I.metadata.name}))};return o.createElement("g",{onClick:Ye,className:O.clickable},o.createElement("rect",{className:Hn()(O.node,I.root?"secondary":"primary"),width:Ve,height:pt,rx:10}),o.createElement(Vn,{kind:I.kind,y:De,x:De,width:Ze,height:Ze,className:Hn()(O.text,I.root?"secondary":"primary")}),o.createElement("text",{ref:Ne,className:Hn()(O.text,I.root?"secondary":"primary"),y:pt/2,x:$e+(ee+De*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},tt))}function jn(I){const{loading:O,error:W,nodes:J,edges:ee}=nr(I.entity);return O?o.createElement(Xe.Progress,null):W?o.createElement(Xe.ResponseErrorPanel,{error:W}):o.createElement(o.Fragment,null,o.createElement(Bt.Z,{variant:"h2"},"Ancestry"),o.createElement(Bt.Z,{gutterBottom:!0},"This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",o.createElement(Xe.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),o.createElement(te.Z,{mt:4},o.createElement(Xe.DependencyGraph,{nodes:J,edges:ee,renderNode:Lr,direction:Xe.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var An=e(11776),dn=e(38402),In=e(86136),Gn=e(99688),rr=e(49378),ia=e(54506),Kn=e(94339),xr=e(24579),br=e(27685);const Yn=(0,M.Z)(I=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:I.spacing(2)},helpIcon:{marginLeft:I.spacing(1),color:I.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function vn(I){const O=Yn();return o.createElement(rr.Z,{...I,primaryTypographyProps:{className:O.monospace},secondaryTypographyProps:{className:O.monospace}})}function Mn(I){const O=Yn();return o.createElement(ia.Z,{className:O.monospace},I.children)}function Zn(I){return o.createElement(te.Z,{mt:2},o.createElement(Kn.Z,{variant:"outlined"},o.createElement(xr.Z,null,o.createElement(me.Z,{variant:"h6",gutterBottom:!0},I.title,I.helpLink&&o.createElement(or,{to:I.helpLink})),I.children)))}function ar(I){const[O,W]=I.entry;return o.createElement(dn.Z,null,I.indent&&o.createElement(In.Z,null),o.createElement(vn,{primary:O,secondary:W.match(/^url:https?:\/\//)?o.createElement(o.Fragment,null,W.substring(0,4),o.createElement(Xe.Link,{to:W.substring(4)},W.substring(4))):W}))}function or(I){const O=Yn();return o.createElement(Xe.Link,{to:I.to,className:O.helpIcon},o.createElement(br.Z,{fontSize:"inherit"}))}const Or=(0,M.Z)({root:{display:"flex",flexDirection:"column"}});function la(I){var Ne,De;const O=(0,t.useApi)(c),W=(0,X.eE)(I),J=(Ne=I.metadata.annotations)==null?void 0:Ne[X.P1],ee=(De=I.metadata.annotations)==null?void 0:De[X.q1],{loading:oe,error:he,value:be}=(0,je.default)(async()=>!J&&!ee?[]:(await O.getEntities({filter:[...J?[{[`metadata.annotations.${X.P1}`]:J}]:[],...ee?[{[`metadata.annotations.${X.q1}`]:ee}]:[]]})).items,[J,ee]);return{loading:oe,error:he,location:J,originLocation:ee,colocatedEntities:be==null?void 0:be.filter(Ze=>(0,X.eE)(Ze)!==W)}}function Jn(I){return o.createElement(An.Z,{dense:!0},I.header&&o.createElement(ar,{key:"header",entry:I.header}),I.entities.map(O=>o.createElement(dn.Z,{key:(0,X.eE)(O)},o.createElement(In.Z,null,o.createElement(Vn,{kind:O.kind})),o.createElement(vn,{primary:o.createElement(ct,{entityRef:O})}))))}function Dr(I){const{entity:O}=I,{loading:W,error:J,location:ee,originLocation:oe,colocatedEntities:he}=la(O);if(W)return o.createElement(Xe.Progress,null);if(J)return o.createElement(Xe.ResponseErrorPanel,{error:J});if(!ee&&!oe)return o.createElement(Gn.Z,{severity:"warning"},"Entity had no location information.");if(!(he==null?void 0:he.length))return o.createElement(Gn.Z,{severity:"info"},"There were no other entities on this location.");if(ee===oe)return o.createElement(Jn,{entities:he});const be=he.filter(De=>{var Ze;return((Ze=De.metadata.annotations)==null?void 0:Ze[X.P1])===ee}),Ne=he.filter(De=>{var Ze;return((Ze=De.metadata.annotations)==null?void 0:Ze[X.q1])===oe});return o.createElement(o.Fragment,null,be.length>0&&o.createElement(Jn,{entities:be,header:["At the same location",ee]}),Ne.length>0&&o.createElement(Jn,{entities:Ne,header:["At the same origin",oe]}))}function Fr(I){const O=Or();return o.createElement(o.Fragment,null,o.createElement(Bt.Z,{variant:"h2"},"Colocated"),o.createElement(Bt.Z,null,"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)."),o.createElement("div",{className:O.root},o.createElement(Dr,{entity:I.entity})))}function sr(I){return Object.fromEntries([...Object.entries(I)].sort((O,W)=>O[0]<W[0]?-1:1))}function Br(I){return o.createElement(o.Fragment,null,o.createElement(Bt.Z,{variant:"h2"},"Entity as JSON"),o.createElement(Bt.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement(Bt.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(Xe.CodeSnippet,{text:JSON.stringify(sr(I.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Mr=e(3440),Zr=e.n(Mr);const Nr=(0,M.Z)({root:{display:"flex",flexDirection:"column"}});function ir(I){var De,Ze;const O=Nr(),{apiVersion:W,kind:J,metadata:ee,spec:oe,relations:he=[],status:be={}}=I.entity,Ne=Zr()(nt()(he,$e=>$e.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement(Bt.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:O.root},o.createElement(Zn,{title:"Identity"},o.createElement(An.Z,{dense:!0},o.createElement(dn.Z,null,o.createElement(vn,{primary:"apiVersion",secondary:W})),o.createElement(dn.Z,null,o.createElement(vn,{primary:"kind",secondary:J})),(oe==null?void 0:oe.type)&&o.createElement(dn.Z,null,o.createElement(vn,{primary:"spec.type",secondary:oe.type})),ee.uid&&o.createElement(dn.Z,null,o.createElement(vn,{primary:"uid",secondary:ee.uid})),ee.etag&&o.createElement(dn.Z,null,o.createElement(vn,{primary:"etag",secondary:ee.etag})))),o.createElement(Zn,{title:"Metadata"},!!Object.keys(ee.annotations||{}).length&&o.createElement(An.Z,{dense:!0,subheader:o.createElement(Mn,null,"Annotations",o.createElement(or,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(ee.annotations).map($e=>o.createElement(ar,{key:$e[0],indent:!0,entry:$e}))),!!Object.keys(ee.labels||{}).length&&o.createElement(An.Z,{dense:!0,subheader:o.createElement(Mn,null,"Labels",o.createElement(or,{to:"https://backstage.io/docs/features/software-catalog/well-known-labels"}))},Object.entries(ee.labels).map($e=>o.createElement(ar,{key:$e[0],indent:!0,entry:$e}))),!!((De=ee.tags)==null?void 0:De.length)&&o.createElement(An.Z,{dense:!0,subheader:o.createElement(Mn,null,"Tags")},ee.tags.map(($e,Ve)=>o.createElement(dn.Z,{key:`${$e}-${Ve}`},o.createElement(In.Z,null),o.createElement(vn,{primary:$e}))))),!!he.length&&o.createElement(Zn,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Ne).map(([$e,Ve],pt)=>o.createElement("div",{key:pt},o.createElement(An.Z,{dense:!0,subheader:o.createElement(Mn,null,$e)},Ve.map(tt=>o.createElement(dn.Z,{key:tt.targetRef},o.createElement(In.Z,null,o.createElement(Vn,{entityRef:tt.targetRef})),o.createElement(vn,{primary:o.createElement(ct,{entityRef:tt.targetRef})}))))))),!!((Ze=be.items)==null?void 0:Ze.length)&&o.createElement(Zn,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},be.items.map(($e,Ve)=>o.createElement("div",{key:Ve},o.createElement(me.Z,null,$e.level,": ",$e.type),o.createElement(te.Z,{ml:2},$e.message))))))}var $r=e(60155),lr=e.n($r);function Xt(I){return o.createElement(o.Fragment,null,o.createElement(Bt.Z,{variant:"h2"},"Entity as YAML"),o.createElement(Bt.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement(Bt.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(Xe.CodeSnippet,{text:lr().stringify(sr(I.entity)),language:"yaml",showCopyCodeButton:!0}))))}const fn=(0,M.Z)(I=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:I.palette.background.paper},tabs:{borderRight:`1px solid ${I.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Ln(I){const{children:O,value:W,index:J,...ee}=I,oe=fn();return o.createElement("div",{role:"tabpanel",hidden:W!==J,id:`vertical-tabpanel-${J}`,"aria-labelledby":`vertical-tab-${J}`,className:oe.tabContents,...ee},W===J&&o.createElement(te.Z,{pl:3,pr:3},O))}function xn(I){return{id:`vertical-tab-${I}`,"aria-controls":`vertical-tabpanel-${I}`}}function Ur(I){const O=fn(),[W,J]=o.useState(0);return(0,o.useEffect)(()=>{J(0)},[I.open]),I.entity?o.createElement(Cn.Z,{fullWidth:!0,maxWidth:"xl",open:I.open,onClose:I.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:O.fullHeightDialog}},o.createElement(_n.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement(er.Z,{dividers:!0},o.createElement("div",{className:O.root},o.createElement(aa.Z,{orientation:"vertical",variant:"scrollable",value:W,onChange:(ee,oe)=>J(oe),"aria-label":"Inspector options",className:O.tabs},o.createElement(Fn.Z,{label:"Overview",...xn(0)}),o.createElement(Fn.Z,{label:"Ancestry",...xn(1)}),o.createElement(Fn.Z,{label:"Colocated",...xn(2)}),o.createElement(Fn.Z,{label:"Raw JSON",...xn(3)}),o.createElement(Fn.Z,{label:"Raw YAML",...xn(4)})),o.createElement(Ln,{value:W,index:0},o.createElement(ir,{entity:I.entity})),o.createElement(Ln,{value:W,index:1},o.createElement(jn,{entity:I.entity})),o.createElement(Ln,{value:W,index:2},o.createElement(Fr,{entity:I.entity})),o.createElement(Ln,{value:W,index:3},o.createElement(Br,{entity:I.entity})),o.createElement(Ln,{value:W,index:4},o.createElement(Xt,{entity:I.entity})))),o.createElement(Bn.Z,null,o.createElement(En.Z,{onClick:I.onClose,color:"primary"},"Close"))):null}var wr=e(85256);function zr(I){var pt;const O=(0,t.useApi)(c),W=(pt=I.metadata.annotations)==null?void 0:pt[X.q1],J=I.metadata.uid,ee=W==="bootstrap:bootstrap",oe=(0,je.default)(async()=>{const tt=O.getLocationByRef(W);let Ye;if(!W)Ye=Promise.resolve([]);else{const Lt=`metadata.annotations.${X.q1}`;Ye=O.getEntities({filter:{[Lt]:W},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Ft=>Ft.items)}return Promise.all([tt,Ye]).then(([Lt,Ft])=>({location:Lt,colocatedEntities:Ft}))},[O,I]),he=(0,o.useCallback)(async function(){const{location:Ye,colocatedEntities:Lt}=oe.value;await O.removeLocationById(Ye.id),await Promise.allSettled(Lt.map(Ft=>O.removeEntityByUid(Ft.metadata.uid)))},[O,oe]),be=(0,o.useCallback)(async function(){await O.removeEntityByUid(J)},[O,J]);if(ee)return{type:"bootstrap",location:W,deleteEntity:be};const{loading:Ne,error:De,value:Ze}=oe;if(Ne)return{type:"loading"};if(De)return{type:"error",error:De};const{location:$e,colocatedEntities:Ve}=Ze;return $e?{type:"unregister",location:W,colocatedEntities:Ve.map(X.iB),unregisterLocation:he,deleteEntity:be}:{type:"only-delete",deleteEntity:be}}var cr=e(10179);const Wr=(0,M.Z)({advancedButton:{fontSize:"0.7em"}}),ur=({entity:I,onConfirm:O})=>{var pt;const W=(0,t.useApi)(t.alertApiRef),J=(0,t.useApi)(t.configApiRef),ee=Wr(),oe=zr(I),[he,be]=(0,o.useState)(!1),[Ne,De]=(0,o.useState)(!1),Ze=(pt=J.getOptionalString("app.title"))!=null?pt:"Backstage",$e=(0,o.useCallback)(async function(){if("unregisterLocation"in oe){De(!0);try{await oe.unregisterLocation(),O()}catch(Ye){(0,cr.BD)(Ye),W.post({message:Ye.message})}finally{De(!1)}}},[W,O,oe]),Ve=(0,o.useCallback)(async function(){if("deleteEntity"in oe){De(!0);try{await oe.deleteEntity(),O()}catch(Ye){(0,cr.BD)(Ye),W.post({message:Ye.message})}finally{De(!1)}}},[W,O,oe]);return oe.type==="loading"?o.createElement(Xe.Progress,null):oe.type==="error"?o.createElement(Xe.ResponseErrorPanel,{error:oe.error}):oe.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(Gn.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',oe.location,'"). If you believe this is in error, please contact the ',Ze," ","integrator."),o.createElement(te.Z,{marginTop:2},!he&&o.createElement(En.Z,{variant:"text",size:"small",color:"primary",className:ee.advancedButton,onClick:()=>be(!0)},"Advanced Options"),he&&o.createElement(o.Fragment,null,o.createElement(Bt.Z,null,"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."),o.createElement(En.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:Ve},"Delete Entity")))):oe.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement(Bt.Z,null,"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."),o.createElement(En.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:Ve},"Delete Entity")):oe.type==="unregister"?o.createElement(o.Fragment,null,o.createElement(Bt.Z,null,"This action will unregister the following entities:"),o.createElement(Bt.Z,{component:"ul"},oe.colocatedEntities.map(tt=>o.createElement("li",{key:`${tt.kind}:${tt.namespace}/${tt.name}`},o.createElement(ct,{entityRef:tt})))),o.createElement(Bt.Z,null,"Located at the following location:"),o.createElement(Bt.Z,{component:"ul"},o.createElement("li",null,oe.location)),o.createElement(Bt.Z,null,"To undo, just re-register the entity in ",Ze,"."),o.createElement(te.Z,{marginTop:2},o.createElement(En.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:$e},"Unregister Location"),!he&&o.createElement(te.Z,{component:"span",marginLeft:2},o.createElement(En.Z,{variant:"text",size:"small",color:"primary",className:ee.advancedButton,onClick:()=>be(!0)},"Advanced Options"))),he&&o.createElement(o.Fragment,null,o.createElement(te.Z,{paddingTop:4,paddingBottom:4},o.createElement(wr.Z,null)),o.createElement(Bt.Z,null,"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."),o.createElement(En.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:Ve},"Delete Entity"))):o.createElement(Gn.Z,{severity:"error"},"Internal error: Unknown state")},Nn=I=>{const{open:O,onConfirm:W,onClose:J,entity:ee}=I;return o.createElement(Cn.Z,{open:O,onClose:J},o.createElement(_n.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement(er.Z,null,o.createElement(ur,{entity:ee,onConfirm:W})),o.createElement(Bn.Z,null,o.createElement(En.Z,{onClick:J,color:"primary"},"Cancel")))};var ca=e(12231),Hr=e(9520),dr=e(47603);const Vr=(0,M.Z)(I=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:I.spacing(1,0,1,0)},title:{margin:I.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:I.palette.text.primary},menuItem:{minHeight:I.spacing(6)},groupWrapper:{margin:I.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function ua(I){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:dr.Z},{id:"starred",label:"Starred",icon:Y.Z}]},{name:I!=null?I:"Company",items:[{id:"all",label:"All"}]}]}const jr=I=>{var fr;const{initialFilter:O,availableFilters:W}=I,J=Vr(),oe=(fr=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?fr:"Company",{filters:he,updateFilters:be,backendEntities:Ne,queryParameters:De,loading:Ze}=We(),$e=["starred","all"],Ve=ua(oe).map(tn=>({...tn,items:tn.items.filter(({id:kt})=>["group","user"].some(Qn=>Qn===De.kind)?$e.includes(kt):!W||W.includes(kt))})).filter(({items:tn})=>!!tn.length),{isStarredEntity:pt}=se(),{isOwnedEntity:tt,loading:Ye}=Le(),Lt=Ze||Ye,Ft=(0,o.useMemo)(()=>new rt("owned",tt,pt),[tt,pt]),mn=(0,o.useMemo)(()=>new rt("starred",tt,pt),[tt,pt]),Vt=(0,o.useMemo)(()=>[De.user].flat()[0],[De]),[Yt,hn]=(0,o.useState)(Vt!=null?Vt:O),en=(0,o.useMemo)(()=>Ne.filter(V((0,Z.compact)(Object.values({...he,user:void 0})))),[he,Ne]),$n=(0,o.useMemo)(()=>({all:en.length,starred:en.filter(tn=>mn.filterEntity(tn)).length,owned:en.filter(tn=>Ft.filterEntity(tn)).length}),[en,mn,Ft]);return(0,o.useEffect)(()=>{Vt&&hn(Vt)},[Vt]),(0,o.useEffect)(()=>{!Lt&&!!Yt&&Yt!=="all"&&$n[Yt]===0&&hn("all")},[Lt,$n,Yt,hn]),(0,o.useEffect)(()=>{be({user:Yt?new rt(Yt,tt,pt):void 0})},[Yt,tt,pt,be]),o.createElement(Kn.Z,{className:J.root},Ve.map(tn=>o.createElement(o.Fragment,{key:tn.name},o.createElement(me.Z,{variant:"subtitle2",className:J.title},tn.name),o.createElement(Kn.Z,{className:J.groupWrapper},o.createElement(An.Z,{disablePadding:!0,dense:!0},tn.items.map(kt=>{var Qn,Rn;return o.createElement(ca.Z,{key:kt.id,button:!0,divider:!0,onClick:()=>hn(kt.id),selected:kt.id===((Qn=he.user)==null?void 0:Qn.value),className:J.menuItem,disabled:$n[kt.id]===0,"data-testid":`user-picker-${kt.id}`},kt.icon&&o.createElement(In.Z,{className:J.listIcon},o.createElement(kt.icon,{fontSize:"small"})),o.createElement(rr.Z,null,o.createElement(me.Z,{variant:"body1"},kt.label)),o.createElement(Hr.Z,null,(Rn=$n[kt.id])!=null?Rn:"-"))}))))))},eo=({children:I,value:O})=>{var be;const[W,J]=useState((be=O==null?void 0:O.filters)!=null?be:{}),ee=useCallback(Ne=>{J(De=>{const Ze=typeof Ne=="function"?Ne(De):Ne;return{...De,...Ze}})},[]),oe=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),he=useMemo(()=>{var Ne,De,Ze,$e,Ve;return{entities:(Ne=O==null?void 0:O.entities)!=null?Ne:oe.entities,backendEntities:(De=O==null?void 0:O.backendEntities)!=null?De:oe.backendEntities,updateFilters:(Ze=O==null?void 0:O.updateFilters)!=null?Ze:ee,filters:W,loading:($e=O==null?void 0:O.loading)!=null?$e:!1,queryParameters:(Ve=O==null?void 0:O.queryParameters)!=null?Ve:oe.queryParameters,error:O==null?void 0:O.error}},[O,oe,W,ee]);return React.createElement(EntityListContext.Provider,{value:he},I)}},39398:function(q,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return Se},AboutContent:function(){return X},AboutField:function(){return U}});var n=e(48023),t=e(9118),c=e(36964),m=e(36356),y=e(22707),i=e(79692),o=e(94339),h=e(32552),l=e(61837),E=e(85256),g=e(24579),C=e(52866),L=e(30254),Z=e(27604),S=e(2784),G=e(47851),B=e(60905),T=e(90436),x=e(7089);const D=(0,i.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 U(Oe){const{label:Ae,value:Ke,gridSizes:Ge,children:Qe}=Oe,We=D(),je=(0,c.useElementFilter)(Qe,Ue=>Ue.getElements()),it=je.length>0?je:S.createElement(T.Z,{variant:"body2",className:We.value},Ke||"unknown");return S.createElement(B.Z,{item:!0,...Ge},S.createElement(T.Z,{variant:"subtitle2",className:We.label},Ae),it)}const V=(0,i.Z)({description:{wordBreak:"break-word"}});function X(Oe){var et,Xe,vt,ct,St,Ct;const{entity:Ae}=Oe,Ke=V(),Ge=Ae.kind.toLocaleLowerCase("en-US")==="system",Qe=Ae.kind.toLocaleLowerCase("en-US")==="resource",We=Ae.kind.toLocaleLowerCase("en-US")==="component",je=Ae.kind.toLocaleLowerCase("en-US")==="api",it=Ae.kind.toLocaleLowerCase("en-US")==="template",Ue=Ae.kind.toLocaleLowerCase("en-US")==="location",qe=Ae.kind.toLocaleLowerCase("en-US")==="group",nt=(0,y.getEntityRelations)(Ae,n.cz,{kind:"system"}),ut=(0,y.getEntityRelations)(Ae,n.cz,{kind:"component"}),dt=(0,y.getEntityRelations)(Ae,n.cz,{kind:"domain"}),ht=(0,y.getEntityRelations)(Ae,n.S4);return S.createElement(B.Z,{container:!0},S.createElement(U,{label:"Description",gridSizes:{xs:12}},S.createElement(T.Z,{variant:"body2",paragraph:!0,className:Ke.description},((et=Ae==null?void 0:Ae.metadata)==null?void 0:et.description)||"No description")),S.createElement(U,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},ht.length>0&&S.createElement(y.EntityRefLinks,{entityRefs:ht,defaultKind:"group"})),(Ge||dt.length>0)&&S.createElement(U,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},dt.length>0&&S.createElement(y.EntityRefLinks,{entityRefs:dt,defaultKind:"domain"})),(je||We||Qe||nt.length>0)&&S.createElement(U,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},nt.length>0&&S.createElement(y.EntityRefLinks,{entityRefs:nt,defaultKind:"system"})),We&&ut.length>0&&S.createElement(U,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},S.createElement(y.EntityRefLinks,{entityRefs:ut,defaultKind:"component"})),(je||We||Qe||it||qe||Ue||typeof((Xe=Ae==null?void 0:Ae.spec)==null?void 0:Xe.type)=="string")&&S.createElement(U,{label:"Type",value:(vt=Ae==null?void 0:Ae.spec)==null?void 0:vt.type,gridSizes:{xs:12,sm:6,lg:4}}),(je||We||typeof((ct=Ae==null?void 0:Ae.spec)==null?void 0:ct.lifecycle)=="string")&&S.createElement(U,{label:"Lifecycle",value:(St=Ae==null?void 0:Ae.spec)==null?void 0:St.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),S.createElement(U,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Ct=Ae==null?void 0:Ae.metadata)==null?void 0:Ct.tags)||[]).map(yt=>S.createElement(x.Z,{key:yt,size:"small",label:yt}))))}const Ee=(0,i.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 Se(Oe){var ct,St,Ct;const{variant:Ae}=Oe,Ke=Ee(),{entity:Ge}=(0,y.useEntity)(),Qe=(0,c.useApi)(m.q3),We=(0,c.useApi)(y.catalogApiRef),je=(0,c.useApi)(c.alertApiRef),it=(0,c.useRouteRef)(G.jU),Ue=(0,y.getEntitySourceLocation)(Ge,Qe),qe=(ct=Ge.metadata.annotations)==null?void 0:ct[n.Tf],nt={label:"View Source",disabled:!Ue,icon:S.createElement(m.nW,{type:Ue==null?void 0:Ue.integrationType}),href:Ue==null?void 0:Ue.locationTargetUrl},ut={label:"View TechDocs",disabled:!((St=Ge.metadata.annotations)==null?void 0:St["backstage.io/techdocs-ref"])||!it,icon:S.createElement(L.Z,null),href:it&&it({namespace:Ge.metadata.namespace||n.zG,kind:Ge.kind,name:Ge.metadata.name})};let dt="";Ae==="gridItem"?dt=Ke.gridItemCard:Ae==="fullHeight"&&(dt=Ke.fullHeightCard);let ht="";Ae==="gridItem"?ht=Ke.gridItemCardContent:Ae==="fullHeight"&&(ht=Ke.fullHeightCardContent);const et=(Ct=Ge.metadata.annotations)==null?void 0:Ct[n.P1],Xe=(et==null?void 0:et.startsWith("url:"))||(et==null?void 0:et.startsWith("file:")),vt=(0,S.useCallback)(async()=>{await We.refreshEntity((0,n.eE)(Ge)),je.post({message:"Refresh scheduled",severity:"info"})},[We,je,Ge]);return S.createElement(o.Z,{className:dt},S.createElement(h.Z,{title:"About",action:S.createElement(S.Fragment,null,Xe&&S.createElement(l.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:vt},S.createElement(C.Z,null)),S.createElement(l.Z,{component:t.Link,"aria-label":"Edit",disabled:!qe,title:"Edit Metadata",to:qe!=null?qe:"#"},S.createElement(Z.Z,null))),subheader:S.createElement(t.HeaderIconLinkRow,{links:[nt,ut]})}),S.createElement(E.Z,null),S.createElement(g.Z,{className:ht},S.createElement(X,{entity:Ge})))}},49782:function(q,s,e){"use strict";e.d(s,{K:function(){return C}});var n=e(2784),t=e(79692),c=e(12420),m=e(97580),y=e(73698),i=e(74603),o=e(12231),h=e(22707),l=e(64279),E=e(36964);const g=(0,t.Z)(L=>(0,c.Z)({root:{...L.typography.h4}}));function C(L){const{initialFilter:Z="component"}=L,S=g(),G=(0,E.useApi)(h.catalogApiRef),{value:B}=(0,l.default)(async()=>await G.getEntityFacets({facets:["kind"]}).then(Ee=>{var Se;return((Se=Ee.facets.kind)==null?void 0:Se.map(Oe=>Oe.value).sort())||[]})),{updateFilters:T,queryParameters:{kind:x}}=(0,h.useEntityList)(),D=(0,n.useMemo)(()=>[x].flat()[0],[x]),[U,V]=(0,n.useState)(D!=null?D:Z);(0,n.useEffect)(()=>{T({kind:U?new h.EntityKindFilter(U):void 0})},[U,T]),(0,n.useEffect)(()=>{D&&V(D)},[D]);const X=[(0,m.Z)(U)].concat(B!=null?B:[]).sort().reduce((Ee,Se)=>(Ee[Se.toLocaleLowerCase("en-US")]=Se,Ee),{});return n.createElement(y.Z,{input:n.createElement(i.Z,{value:U}),value:U,onChange:Ee=>V(Ee.target.value),classes:S},Object.keys(X).map(Ee=>n.createElement(o.Z,{value:Ee,key:Ee},`${X[Ee]}s`)))}},30097:function(q,s,e){"use strict";e.d(s,{E:function(){return Z}});var n=e(48023),t=e(22707),c=e(27604),m=e(2997),y=e(76635),i=e(2784),o=e(7089),h=e(9118);const l=Object.freeze({createNameColumn(S){function G(B){var T;return((T=B.metadata)==null?void 0:T.title)||(0,t.humanizeEntityRef)(B,{defaultKind:S==null?void 0:S.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:B},{entity:T}){return G(B).localeCompare(G(T))},render:({entity:B})=>{var T;return i.createElement(t.EntityRefLink,{entityRef:B,defaultKind:(S==null?void 0:S.defaultKind)||"Component",title:(T=B.metadata)==null?void 0:T.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:S})=>i.createElement(t.EntityRefLinks,{entityRefs:S.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:S})=>i.createElement(t.EntityRefLinks,{entityRefs:S.ownedByRelations,defaultKind:"group"})}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:S})=>i.createElement(h.OverflowTooltip,{text:S.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:S})=>i.createElement(i.Fragment,null,S.metadata.tags&&S.metadata.tags.map(G=>i.createElement(o.Z,{key:G,label:G,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var E=e(28347),g=e(15459),C=e(11640);const L=(0,g.Z)({root:{color:"#f3ba37"}})(C.Z),Z=S=>{var We,je,it;const{columns:G,actions:B}=S,{isStarredEntity:T,toggleStarredEntity:x}=(0,t.useStarredEntities)(),{loading:D,error:U,entities:V,filters:X}=(0,t.useEntityList)(),Ee=(0,i.useMemo)(()=>{var Ue;return[l.createNameColumn({defaultKind:(Ue=X.kind)==null?void 0:Ue.value}),l.createSystemColumn(),l.createOwnerColumn(),l.createSpecTypeColumn(),l.createSpecLifecycleColumn(),l.createMetadataDescriptionColumn(),l.createTagsColumn()]},[(We=X.kind)==null?void 0:We.value]),Se=X.type===void 0,Oe=(0,y.capitalize)((it=(je=X.user)==null?void 0:je.value)!=null?it:"all");if(U)return i.createElement("div",null,i.createElement(h.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},i.createElement(h.CodeSnippet,{language:"text",text:U.toString()})));const Ae=[({entity:Ue})=>{var nt;const qe=(nt=Ue.metadata.annotations)==null?void 0:nt[n.l2];return{icon:()=>i.createElement(m.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!qe,onClick:()=>{!qe||window.open(qe,"_blank")}}},({entity:Ue})=>{var nt;const qe=(nt=Ue.metadata.annotations)==null?void 0:nt[n.Tf];return{icon:()=>i.createElement(c.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!qe,onClick:()=>{!qe||window.open(qe,"_blank")}}},({entity:Ue})=>{const qe=T(Ue);return{cellStyle:{paddingLeft:"1em"},icon:()=>qe?i.createElement(L,null):i.createElement(E.Z,null),tooltip:qe?"Remove from favorites":"Add to favorites",onClick:()=>x(Ue)}}],Ke=V.map(Ue=>{const qe=(0,t.getEntityRelations)(Ue,n.cz,{kind:"system"}),nt=(0,t.getEntityRelations)(Ue,n.S4);return{entity:Ue,resolved:{name:(0,t.humanizeEntityRef)(Ue,{defaultKind:"Component"}),ownedByRelationsTitle:nt.map(ut=>(0,t.humanizeEntityRef)(ut,{defaultKind:"group"})).join(", "),ownedByRelations:nt,partOfSystemRelationTitle:qe.map(ut=>(0,t.humanizeEntityRef)(ut,{defaultKind:"system"})).join(", "),partOfSystemRelations:qe}}}),Ge=(G||Ee).find(Ue=>Ue.title==="Type");Ge&&(Ge.hidden=!Se);const Qe=Ke.length>20;return i.createElement(h.Table,{isLoading:D,columns:G||Ee,options:{paging:Qe,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!D,padding:"dense",pageSizeOptions:[20,50,100]},title:`${Oe} (${V.length})`,data:Ke,actions:B||Ae})};Z.columns=l},26997:function(q,s,e){"use strict";e.d(s,{Nz:function(){return C},Gh:function(){return g},q7:function(){return c}});var n=e(60905),t=e(2784);function c(L){return t.createElement(n.Z,{container:!0,style:{position:"relative"}},L.children)}var m=e(41156),y=e(60364),i=e(77277),o=e(4190),h=e(95544),l=e(90436),E=e(36444);function g(L){const Z=(0,m.Z)(T=>T.breakpoints.down("md")),S=(0,y.Z)(),[G,B]=(0,t.useState)(!1);return Z?t.createElement(t.Fragment,null,t.createElement(i.Z,{style:{marginTop:S.spacing(1),marginLeft:S.spacing(1)},onClick:()=>B(!0),startIcon:t.createElement(E.Z,null)},"Filters"),t.createElement(o.ZP,{open:G,onClose:()=>B(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},t.createElement(h.Z,{m:2},t.createElement(l.Z,{variant:"h6",component:"h2",style:{marginBottom:S.spacing(1)}},"Filters"),L.children))):t.createElement(n.Z,{item:!0,lg:2},L.children)}function C(L){return t.createElement(n.Z,{item:!0,xs:12,lg:10},L.children)}},92902:function(q,s,e){"use strict";e.d(s,{CatalogEntityPage:function(){return M},EntityListContainer:function(){return ze.Nz},FilterContainer:function(){return ze.Gh},FilteredEntityLayout:function(){return ze.q7}});var n=e(82394),t=e.n(n),c=e(48023),m=e(76635);async function y({storageApi:A}){var ne;const d=A.forBucket("settings"),v=A.forBucket("starredEntities"),b=d.snapshot("starredEntities").value;if(!(0,m.isArray)(b))return;const N=new Set((ne=v.snapshot("entityRefs").value)!=null?ne:[]);b.filter(m.isString).map(re=>re.split(":")).filter(re=>re.length===4&&re[0]==="entity").map(([re,_,fe,ge])=>(0,c.eE)({kind:_,namespace:fe,name:ge})).forEach(re=>N.add(re)),await v.set("entityRefs",Array.from(N)),await d.remove("starredEntities")}class i{constructor(d){ie(this,"settingsStore");ie(this,"starredEntities");ie(this,"subscribers",new Set);ie(this,"observable",new(t())(d=>(d.next(new Set(this.starredEntities)),this.subscribers.add(d),()=>{this.subscribers.delete(d)})));var v;y(d).then(),this.settingsStore=d.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((v=this.settingsStore.snapshot("entityRefs").value)!=null?v:[]),this.settingsStore.observe$("entityRefs").subscribe({next:b=>{var N;this.starredEntities=new Set((N=b.value)!=null?N:[]),this.notifyChanges()}})}async toggleStarred(d){this.starredEntities.has(d)?this.starredEntities.delete(d):this.starredEntities.add(d),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const d of this.subscribers)d.next(new Set(this.starredEntities))}}var o=e(39398),h=e(49782),l=e(2784),E=e(79692),g=e(9118);const C=(0,E.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function L(A){const d=A.result,v=C();return React.createElement(Link,{to:d.location},React.createElement(ListItem,{alignItems:"flex-start",className:v.flexContainer},React.createElement(ListItemText,{className:v.itemText,primaryTypographyProps:{variant:"h6"},primary:d.title,secondary:d.text}),React.createElement(Box,null,d.kind&&React.createElement(Chip,{label:`Kind: ${d.kind}`,size:"small"}),d.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${d.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var Z=e(30097),S=e(36964),G=e(22707),B=e(95544),T=e(99688),x=e(10289),D=e(12231),U=e(86136),V=e(49378),X=e(85256),Ee=e(61837),Se=e(79784),Oe=e(50758),Ae=e(49166),Ke=e(31654),Ge=e(43054);const Qe="catalog-entity",We={name:"catalog.entity.read",attributes:{action:"read"},resourceType:Qe},je={name:"catalog.entity.create",attributes:{action:"create"}},it={name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:Qe},Ue={name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:Qe},qe={name:"catalog.location.read",attributes:{action:"read"}},nt={name:"catalog.location.create",attributes:{action:"create"}},ut={name:"catalog.location.delete",attributes:{action:"delete"}},dt=(0,E.Z)({button:{color:"white"}});function ht(A){var _e;const{UNSTABLE_extraContextMenuItems:d,UNSTABLE_contextMenuOptions:v,onUnregisterEntity:b,onInspectEntity:N}=A,[ne,re]=(0,l.useState)(),_=dt(),fe=(0,G.useEntityPermission)(it),ge=ke=>{re(ke.currentTarget)},Re=()=>{re(void 0)},we=d&&[...d.map(ke=>l.createElement(D.Z,{key:ke.title,onClick:()=>{Re(),ke.onClick()}},l.createElement(U.Z,null,l.createElement(ke.Icon,{fontSize:"small"})),l.createElement(V.Z,{primary:ke.title}))),l.createElement(X.Z,{key:"the divider is here!"})],He=(_e=!fe.allowed||(v==null?void 0:v.disableUnregister))!=null?_e:!1;return l.createElement(l.Fragment,null,l.createElement(Ee.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:ge,"data-testid":"menu-button",className:_.button},l.createElement(Ge.Z,null)),l.createElement(Se.ZP,{open:Boolean(ne),onClose:Re,anchorEl:ne,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},l.createElement(Oe.Z,null,we,l.createElement(D.Z,{onClick:()=>{Re(),b()},disabled:He},l.createElement(U.Z,null,l.createElement(Ae.Z,{fontSize:"small"})),l.createElement(V.Z,{primary:"Unregister entity"})),l.createElement(D.Z,{onClick:()=>{Re(),N()}},l.createElement(U.Z,null,l.createElement(Ke.Z,{fontSize:"small"})),l.createElement(V.Z,{primary:"Inspect entity"})))))}const et="plugin.catalog.entityLayoutRoute",Xe=()=>null;(0,S.attachComponentData)(Xe,et,!0),(0,S.attachComponentData)(Xe,"core.gatherMountPoints",!0);function vt(A){const{entity:d,title:v}=A;return l.createElement(B.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},l.createElement(B.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},v),d&&l.createElement(G.FavoriteEntity,{entity:d}))}function ct(A,d,v,b){var _,fe,ge,Re,we;const N=(_=A!=null?A:b==null?void 0:b.kind)!=null?_:"",ne=(fe=d!=null?d:b==null?void 0:b.metadata.namespace)!=null?fe:"";return{headerTitle:`${(we=(Re=(ge=b==null?void 0:b.metadata.title)!=null?ge:v)!=null?Re:b==null?void 0:b.metadata.name)!=null?we:""}${ne&&ne!==c.zG?` in ${ne}`:""}`,headerType:(()=>{let He=N.toLocaleLowerCase("en-US");return b&&b.spec&&"type"in b.spec&&(He+=" \u2014 ",He+=b.spec.type.toLocaleLowerCase("en-US")),He})()}}function St(A){var b;const{entity:d}=A,v=(0,G.getEntityRelations)(d,c.S4);return l.createElement(l.Fragment,null,v.length>0&&l.createElement(g.HeaderLabel,{label:"Owner",value:l.createElement(G.EntityRefLinks,{entityRefs:v,defaultKind:"Group",color:"inherit"})}),((b=d.spec)==null?void 0:b.lifecycle)&&l.createElement(g.HeaderLabel,{label:"Lifecycle",value:d.spec.lifecycle}))}const Ct=A=>{var Tt,zt,_t;const{UNSTABLE_extraContextMenuItems:d,UNSTABLE_contextMenuOptions:v,children:b}=A,{kind:N,namespace:ne,name:re}=(0,S.useRouteRefParams)(G.entityRouteRef),{entity:_,loading:fe,error:ge}=(0,G.useAsyncEntity)(),Re=(0,x.TH)(),we=(0,S.useElementFilter)(b,Y=>Y.selectByComponentData({key:et,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:pe})=>{if(_){if(pe.if&&!pe.if(_))return[]}else return[];return[{path:pe.path,title:pe.title,children:pe.children,tabProps:pe.tabProps}]}),[_]),{headerTitle:He,headerType:_e}=ct(N,ne,re,_),[ke,Rt]=(0,l.useState)(!1),[wt,Dt]=(0,l.useState)(!1),Kt=(0,x.s0)(),mt=async()=>{Rt(!1),Dt(!1),Kt("/")};return(0,l.useEffect)(()=>{Rt(!1),Dt(!1)},[Re.pathname]),l.createElement(g.Page,{themeId:(_t=(zt=(Tt=_==null?void 0:_.spec)==null?void 0:Tt.type)==null?void 0:zt.toString())!=null?_t:"home"},l.createElement(g.Header,{title:l.createElement(vt,{title:He,entity:_}),pageTitleOverride:He,type:_e},_&&l.createElement(l.Fragment,null,l.createElement(St,{entity:_}),l.createElement(ht,{UNSTABLE_extraContextMenuItems:d,UNSTABLE_contextMenuOptions:v,onUnregisterEntity:()=>Rt(!0),onInspectEntity:()=>Dt(!0)}))),fe&&l.createElement(g.Progress,null),_&&l.createElement(g.RoutedTabs,{routes:we}),ge&&l.createElement(g.Content,null,l.createElement(T.Z,{severity:"error"},ge.toString())),!fe&&!ge&&!_&&l.createElement(g.Content,null,l.createElement(g.WarningPanel,{title:"Entity not found"},"There is no ",N," with the requested"," ",l.createElement(g.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),l.createElement(G.UnregisterEntityDialog,{open:ke,entity:_,onConfirm:mt,onClose:()=>Rt(!1)}),l.createElement(G.InspectEntityDialog,{open:wt,entity:_,onClose:()=>Dt(!1)}))};Ct.Route=Xe;var yt=e(10179);function Fe(A){const{open:d,onClose:v,onConfirm:b,entity:N}=A,[ne,re]=useState(!1),_=useApi(catalogApiRef),fe=useApi(alertApiRef),ge=async()=>{re(!0);try{const Re=N.metadata.uid;await _.removeEntityByUid(Re),b()}catch(Re){assertError(Re),fe.post({message:Re.message})}finally{re(!1)}};return React.createElement(Dialog,{open:d,onClose:v},React.createElement(DialogTitle,{id:"responsive-dialog-title"},"Are you sure you want to delete this entity?"),React.createElement(DialogActions,null,React.createElement(Button,{variant:"contained",color:"secondary",disabled:ne,onClick:ge},"Delete"),React.createElement(Button,{onClick:v,color:"primary"},"Cancel")))}var at=e(47851);function lt(A){var d,v;return((v=(d=A==null?void 0:A.metadata)==null?void 0:d.annotations)==null?void 0:v["backstage.io/orphan"])==="true"}function Et(){const A=useNavigate(),d=useRouteRef(rootRouteRef),[v,b]=useState(!1),{entity:N}=useEntity(),ne=async()=>{b(!1),A(d())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>b(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:v,entity:N,onConfirm:ne,onClose:()=>b(!1)}))}var rt=e(30001);const gt=A=>A.error&&A.level==="error"&&A.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function k(A,d){return{items:(await d.getEntityAncestors({entityRef:A})).items.map(N=>{var _,fe;return{errors:((fe=(_=N.entity.status)==null?void 0:_.items)!=null?fe:[]).filter(gt).map(ge=>ge.error).filter(ge=>Boolean(ge)),entity:N.entity}}).filter(N=>N.errors.length>0)}}async function $(A,d){const v=d.apis.get(catalogApiRef);if(!v)throw new Error(`No implementation available for ${catalogApiRef}`);return(await k(stringifyEntityRef(A),v)).items.length>0}function ae(){const{entity:A}=useEntity(),d=stringifyEntityRef(A),v=useApi(catalogApiRef),{loading:b,error:N,value:ne}=useAsync(async()=>k(d,v),[d,v]);return N?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:N})):b||!ne?null:React.createElement(React.Fragment,null,ne.items.map((re,_)=>React.createElement(Box,{key:_,mb:1},stringifyEntityRef(A)!==stringifyEntityRef(re.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:re.entity})),re.errors.map((fe,ge)=>React.createElement(ResponseErrorPanel,{key:ge,error:fe})))))}var ue=e(64279);const se="core.backstage.entitySwitch",ye=A=>null;(0,S.attachComponentData)(ye,se,!0);const Me=A=>{var ne,re;const{entity:d}=(0,G.useAsyncEntity)(),v=(0,S.useApiHolder)(),b=(0,S.useElementFilter)(A.children,_=>_.selectByComponentData({key:se,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(fe=>{var we;if(!d)return[];const{if:ge,children:Re}=fe.props;return[{if:(we=ge==null?void 0:ge(d,{apis:v}))!=null?we:!0,children:Re}]}),[v,d]);return b.some(_=>typeof _.if=="object"&&"then"in _.if)?l.createElement(Le,{results:b}):(re=(ne=b.find(_=>_.if))==null?void 0:ne.children)!=null?re:null};function Le({results:A}){const{loading:d,value:v}=(0,ue.default)(async()=>{var N;const b=A.map(async({if:ne,children:re})=>{try{if(await ne)return re}catch{}return null});return(N=(await Promise.all(b)).find(Boolean))!=null?N:null},[A]);return d||!v?null:v}Me.Case=ye;var ze=e(26997);const K=(0,S.createPlugin)({id:"catalog",apis:[(0,S.createApiFactory)({api:G.catalogApiRef,deps:{discoveryApi:S.discoveryApiRef,fetchApi:S.fetchApiRef},factory:({discoveryApi:A,fetchApi:d})=>new rt.MS({discoveryApi:A,fetchApi:d})}),(0,S.createApiFactory)({api:G.starredEntitiesApiRef,deps:{storageApi:S.storageApiRef},factory:({storageApi:A})=>new i({storageApi:A})})],routes:{catalogIndex:at._Z,catalogEntity:G.entityRouteRef},externalRoutes:{createComponent:at.yw,viewTechDoc:at.jU}}),j=K.provide((0,S.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(A=>A.CatalogPage),mountPoint:at._Z})),M=K.provide((0,S.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(A=>A.CatalogEntityPage),mountPoint:G.entityRouteRef})),te=K.provide((0,S.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(A=>A.AboutCard)}})),me=K.provide((0,S.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(A=>A.EntityLinksCard)}})),ve=K.provide((0,S.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(A=>A.HasSystemsCard)}})),Te=K.provide((0,S.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(A=>A.HasComponentsCard)}})),xe=K.provide((0,S.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(A=>A.HasSubcomponentsCard)}})),ft=K.provide((0,S.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(A=>A.HasResourcesCard)}})),At=K.provide((0,S.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(A=>A.DependsOnComponentsCard)}})),le=K.provide((0,S.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(A=>A.DependencyOfComponentsCard)}})),P=K.provide((0,S.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(A=>A.DependsOnResourcesCard)}})),z=K.provide((0,S.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(A=>A.RelatedEntitiesCard)}}))},47851:function(q,s,e){"use strict";e.d(s,{yw:function(){return t},jU:function(){return c},_Z:function(){return m}});var n=e(36964);const t=(0,n.createExternalRouteRef)({id:"create-component",optional:!0}),c=(0,n.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),m=(0,n.createRouteRef)({id:"catalog"})},20221:function(q,s,e){"use strict";e.d(s,{iM:function(){return L},RV:function(){return c},gI:function(){return S}});var n=e(2784),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.permission.api"});var m;(function(B){const T="DENY";B.DENY=T;const x="ALLOW";B.ALLOW=x;const D="CONDITIONAL";B.CONDITIONAL=D})(m||(m={}));var y=e(10179),i=e(96279),o=e.n(i),h=e(9571),l=e(30195);const E=l.z.lazy(()=>l.z.object({rule:l.z.string(),params:l.z.array(l.z.unknown())}).strict().or(l.z.object({anyOf:l.z.array(E).nonempty()}).strict()).or(l.z.object({allOf:l.z.array(E).nonempty()}).strict()).or(l.z.object({not:E}).strict())),g=l.z.object({items:l.z.array(l.z.object({id:l.z.string(),result:l.z.literal(m.ALLOW).or(l.z.literal(m.DENY))}).or(l.z.object({id:l.z.string(),result:l.z.literal(m.CONDITIONAL),conditions:E})))});class C{constructor(T){ie(this,"enabled");ie(this,"discovery");var x;this.discovery=T.discovery,this.enabled=(x=T.config.getOptionalBoolean("permission.enabled"))!=null?x:!1}async authorize(T,x){if(!this.enabled)return T.map(Se=>({result:m.ALLOW}));const D={items:T.map(Se=>({id:h.Z(),...Se}))},U=await this.discovery.getBaseUrl("permission"),V=await o()(`${U}/authorize`,{method:"POST",body:JSON.stringify(D),headers:{...this.getAuthorizationHeader(x==null?void 0:x.token),"content-type":"application/json"}});if(!V.ok)throw await y.VL.fromResponse(V);const X=await V.json();this.assertValidResponse(D,X);const Ee=X.items.reduce((Se,Oe)=>(Se[Oe.id]=Oe,Se),{});return D.items.map(Se=>Ee[Se.id])}getAuthorizationHeader(T){return T?{Authorization:`Bearer ${T}`}:{}}assertValidResponse(T,x){const U=g.parse(x).items.map(X=>X.id);if(!T.items.every(X=>U.includes(X.id)))throw new Error("Unexpected authorization response from permission-backend")}}class L{constructor(T,x){this.permissionClient=T,this.identityApi=x}static create(T){const{config:x,discovery:D,identity:U}=T,V=new C({discovery:D,config:x});return new L(V,U)}async authorize(T){return(await this.permissionClient.authorize([T],await this.identityApi.getCredentials()))[0]}}var Z=e(49857);const S=(B,T)=>{const x=(0,t.useApi)(c),{data:D,error:U}=(0,Z.ZP)({permission:B,resourceRef:T},async V=>{const{result:X}=await x.authorize(V);return X});return U?{error:U,loading:!1,allowed:!1}:D===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:D===m.ALLOW}},G=B=>{const{permission:T,resourceRef:x,errorComponent:D,...U}=B,V=usePermission(T,x),X=useApp(),{NotFoundErrorPage:Ee}=X.getComponents();let Se=D===void 0?React.createElement(Ee,null):D;return V.loading?Se=null:V.allowed&&(Se=B.element),React.createElement(Route,{...U,element:Se})}},91512:function(q,s,e){"use strict";e.d(s,{g:function(){return y},w:function(){return i}});var n=e(36964),t=e(10179),c=e(19126),m=e.n(c);const y=(0,n.createApiRef)({id:"plugin.search.queryservice"});class i{constructor(h){ie(this,"discoveryApi");ie(this,"identityApi");this.discoveryApi=h.discoveryApi,this.identityApi=h.identityApi}async query(h){const{token:l}=await this.identityApi.getCredentials(),E=m().stringify(h),g=`${await this.discoveryApi.getBaseUrl("search/query")}?${E}`,C=await fetch(g,{headers:l?{Authorization:`Bearer ${l}`}:{}});if(!C.ok)throw await t.VL.fromResponse(C);return C.json()}}},19941:function(q,s,e){"use strict";e.r(s),e.d(s,{DefaultResultListItem:function(){return E}});var n=e(2784),t=e(38402),c=e(86136),m=e(49378),y=e(95544),i=e(85256),o=e(9118),h=e(15277),l=e.n(h);const E=({result:g,icon:C,secondaryAction:L,lineClamp:Z=5})=>n.createElement(o.Link,{to:g.location},n.createElement(t.Z,{alignItems:"center"},C&&n.createElement(c.Z,null,C),n.createElement(m.Z,{primaryTypographyProps:{variant:"h6"},primary:g.title,secondary:n.createElement(l(),{line:Z,truncateText:"\u2026",text:g.text,element:"span"})}),L&&n.createElement(y.Z,{alignItems:"flex-end"},L)),n.createElement(i.Z,null))},1795:function(q,s,e){"use strict";e.r(s),e.d(s,{SearchBar:function(){return L},SearchBarBase:function(){return C}});var n=e(2784),t=e(48760),c=e(36964),m=e(50581),y=e(61837),i=e(74603),o=e(21853),h=e(33375),l=e(22313);const E=({children:Z})=>{const S=(0,c.useAnalytics)(),{term:G}=(0,l.Rx)();return(0,n.useEffect)(()=>{G&&S.captureEvent("search",G)},[S,G]),n.createElement(n.Fragment,null,Z)},g=()=>(0,n.useContext)(l.ci)!==void 0,C=({onChange:Z,onKeyDown:S,onSubmit:G,debounceTime:B=200,clearButton:T=!0,fullWidth:x=!0,value:D,inputProps:U={},endAdornment:V,...X})=>{const Ee=(0,c.useApi)(c.configApiRef),[Se,Oe]=(0,n.useState)(D),Ae=g();(0,n.useEffect)(()=>{Oe(qe=>qe!==D?D:qe)},[D]),(0,t.Z)(()=>Z(Se),B,[Se]);const Ke=(0,n.useCallback)(qe=>{Oe(qe.target.value)},[Oe]),Ge=(0,n.useCallback)(qe=>{S&&S(qe),G&&qe.key==="Enter"&&G()},[S,G]),Qe=(0,n.useCallback)(()=>{Z("")},[Z]),We=`Search in ${Ee.getOptionalString("app.title")||"Backstage"}`,je=n.createElement(m.Z,{position:"start"},n.createElement(y.Z,{"aria-label":"Query",disabled:!0},n.createElement(o.Z,null))),it=n.createElement(m.Z,{position:"end"},n.createElement(y.Z,{"aria-label":"Clear",onClick:Qe},n.createElement(h.Z,null))),Ue=n.createElement(E,null,n.createElement(i.Z,{"data-testid":"search-bar-next",value:Se,placeholder:We,startAdornment:je,endAdornment:T?it:V,inputProps:{"aria-label":"Search",...U},fullWidth:x,onChange:Ke,onKeyDown:Ge,...X}));return Ae?Ue:n.createElement(l.Nd,null,Ue)},L=({onChange:Z,...S})=>{const{term:G,setTerm:B}=(0,l.Rx)(),T=(0,n.useCallback)(x=>{Z?Z(x):B(x)},[Z,B]);return n.createElement(C,{value:G,onChange:T,...S})}},22313:function(q,s,e){"use strict";e.d(s,{ci:function(){return i},Nd:function(){return h},Rx:function(){return l}});var n=e(36964),t=e(2784),c=e(64279),m=e(1849),y=e(91512);const i=(0,t.createContext)(void 0),o={term:"",pageCursor:void 0,filters:{},types:[]},h=({initialState:E=o,children:g})=>{var Ke,Ge,Qe,We;const C=(0,n.useApi)(y.g),[L,Z]=(0,t.useState)(E.pageCursor),[S,G]=(0,t.useState)(E.filters),[B,T]=(0,t.useState)(E.term),[x,D]=(0,t.useState)(E.types),U=(0,m.Z)(B),V=(0,c.default)(()=>C.query({term:B,filters:S,pageCursor:L,types:x}),[B,S,x,L]),X=!V.loading&&!V.error&&((Ke=V.value)==null?void 0:Ke.nextPageCursor),Ee=!V.loading&&!V.error&&((Ge=V.value)==null?void 0:Ge.previousPageCursor),Se=(0,t.useCallback)(()=>{var je;Z((je=V.value)==null?void 0:je.nextPageCursor)},[(Qe=V.value)==null?void 0:Qe.nextPageCursor]),Oe=(0,t.useCallback)(()=>{var je;Z((je=V.value)==null?void 0:je.previousPageCursor)},[(We=V.value)==null?void 0:We.previousPageCursor]);(0,t.useEffect)(()=>{B&&U&&B!==U&&Z(void 0)},[B,U,E.pageCursor]);const Ae={result:V,filters:S,setFilters:G,term:B,setTerm:T,types:x,setTypes:D,pageCursor:L,setPageCursor:Z,fetchNextPage:X?Se:void 0,fetchPreviousPage:Ee?Oe:void 0};return t.createElement(n.AnalyticsContext,{attributes:{searchTypes:x.sort().join(",")}},t.createElement(i.Provider,{value:Ae,children:g}))},l=()=>{const E=(0,t.useContext)(i);if(E===void 0)throw new Error("useSearch must be used within a SearchContextProvider");return E}},73032:function(q,s,e){"use strict";e.d(s,{s:function(){return X},O:function(){return Ee}});var n=e(2784),t=e(60364),c=e(79249),m=e(27556),y=e(38724),i=e(60905),o=e(85256),h=e(11776),l=e(49429),E=e(8629),g=e(69001),C=e(79692),L=e(1795),Z=e(19941),S=e(39332),G=e(22313),B=e(8542),T=e(36964),x=e(9118),D=e(20863);const U=(0,C.Z)(Se=>({container:{borderRadius:30,display:"flex",height:"2.4em"},input:{flex:1},paperFullWidth:{height:"calc(100% - 128px)"},dialogActionsContainer:{padding:Se.spacing(1,3)},viewResultsLink:{verticalAlign:"0.5em"}})),V=({toggleModal:Se})=>{const Oe=(0,T.useRouteRef)(D._Z),Ae=U(),{term:Ke}=(0,G.Rx)(),{focusContent:Ge}=(0,x.useContent)(),{transitions:Qe}=(0,t.Z)(),We=()=>{Se(),setTimeout(Ge,Qe.duration.leavingScreen)},je=()=>{We()};return n.createElement(n.Fragment,null,n.createElement(c.Z,null,n.createElement(m.Z,{className:Ae.container},n.createElement(L.SearchBar,{className:Ae.input}))),n.createElement(y.Z,null,n.createElement(i.Z,{container:!0,direction:"row-reverse",justifyContent:"flex-start",alignItems:"center"},n.createElement(i.Z,{item:!0},n.createElement(x.Link,{onClick:()=>{Se(),setTimeout(Ge,Qe.duration.leavingScreen)},to:`${Oe()}?query=${Ke}`},n.createElement("span",{className:Ae.viewResultsLink},"View Full Results"),n.createElement(g.Z,{color:"primary"})))),n.createElement(o.Z,null),n.createElement(S.SearchResult,null,({results:it})=>n.createElement(h.Z,null,it.map(({document:Ue})=>n.createElement("div",{role:"button",tabIndex:0,key:`${Ue.location}-btn`,onClick:We,onKeyPress:je},n.createElement(Z.DefaultResultListItem,{key:Ue.location,result:Ue})))))),n.createElement(l.Z,{className:Ae.dialogActionsContainer},n.createElement(i.Z,{container:!0,direction:"row"},n.createElement(i.Z,{item:!0,xs:12},n.createElement(B.G,null)))))},X=({open:Se=!0,hidden:Oe,toggleModal:Ae})=>{const Ke=U();return n.createElement(E.Z,{classes:{paperFullWidth:Ke.paperFullWidth},onClose:Ae,"aria-labelledby":"search-modal-title",fullWidth:!0,maxWidth:"lg",open:Se,hidden:Oe},Se&&n.createElement(G.Nd,null,n.createElement(V,{toggleModal:Ae})))};function Ee(Se=!1){const[Oe,Ae]=(0,n.useState)({hidden:!Se,open:Se}),Ke=(0,n.useCallback)(()=>Ae(Qe=>({open:!0,hidden:!Qe.hidden})),[]),Ge=(0,n.useCallback)(Qe=>Ae(We=>({open:We.open||Qe,hidden:!Qe})),[]);return{state:Oe,toggleModal:Ke,setOpen:Ge}}},3992:function(q,s,e){"use strict";e.r(s),e.d(s,{SearchPage:function(){return yt}});var n=e(2784),t=e(1849),c=e(19126),m=e.n(c),y=e(10289),i=e(22313),o=e(60905),h=e(48760),l=e(79692),E=e(27556),g=e(74603),C=e(61837),L=e(21853),Z=e(33375);const S=(0,l.Z)(()=>({root:{display:"flex",alignItems:"center"},input:{flex:1}})),G=({searchQuery:Fe,handleSearch:at,handleClearSearchBar:lt})=>{const Et=S();return n.createElement(E.Z,{component:"form",onSubmit:rt=>at(rt),className:Et.root},n.createElement(C.Z,{disabled:!0,type:"submit","aria-label":"search"},n.createElement(L.Z,null)),n.createElement(g.Z,{className:Et.input,placeholder:"Search in Backstage",value:Fe,onChange:rt=>at(rt),inputProps:{"aria-label":"search backstage"}}),n.createElement(C.Z,{"aria-label":"search",onClick:()=>lt()},n.createElement(Z.Z,null)))};var B=e(85256),T=e(90436),x=e(99688),D=e(64279),U=e(22707),V=e(36444);const X=(0,l.Z)(Fe=>({filters:{width:"250px",display:"flex"},icon:{margin:Fe.spacing(-1,0,0,0)}})),Ee=({numberOfSelectedFilters:Fe,handleToggleFilters:at})=>{const lt=X();return n.createElement("div",{className:lt.filters},n.createElement(C.Z,{className:lt.icon,"aria-label":"settings",onClick:at},n.createElement(V.Z,null)),n.createElement(T.Z,{variant:"h6"},"Filters (",Fe||0,")"))};var Se=e(94339),Oe=e(32552),Ae=e(77277),Ke=e(24579),Ge=e(73698),Qe=e(12231),We=e(11776),je=e(38402),it=e(21324),Ue=e(49378);const qe=(0,l.Z)(Fe=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:Fe.spacing(0,1,0,1)},dropdown:{width:"100%"}})),nt=({filters:Fe,filterOptions:at,resetFilters:lt,updateSelected:Et,updateChecked:rt})=>{const gt=qe();return n.createElement(Se.Z,{className:gt.filters},n.createElement(Oe.Z,{title:n.createElement(T.Z,{variant:"h6"},"Filters"),action:n.createElement(Ae.Z,{color:"primary",onClick:()=>lt()},"CLEAR ALL")}),n.createElement(B.Z,null),at.kind.length===0&&at.lifecycle.length===0&&n.createElement(Ke.Z,null,n.createElement(T.Z,{variant:"subtitle2"},"Filters cannot be applied to available results")),at.kind.length>0&&n.createElement(Ke.Z,null,n.createElement(T.Z,{variant:"subtitle2"},"Kind"),n.createElement(Ge.Z,{id:"outlined-select",onChange:k=>{var $;return Et(($=k==null?void 0:k.target)==null?void 0:$.value)},variant:"outlined",className:gt.dropdown,value:Fe.selected},at.kind.map(k=>n.createElement(Qe.Z,{selected:k==="",dense:!0,key:k,value:k},k)))),at.lifecycle.length>0&&n.createElement(Ke.Z,null,n.createElement(T.Z,{variant:"subtitle2"},"Lifecycle"),n.createElement(We.Z,{disablePadding:!0,dense:!0},at.lifecycle.map(k=>n.createElement(je.Z,{key:k,dense:!0,button:!0,onClick:()=>rt(k)},n.createElement(it.Z,{edge:"start",disableRipple:!0,className:gt.checkbox,color:"primary",checked:Fe.checked.includes(k),tabIndex:-1,value:k,name:k}),n.createElement(Ue.Z,{id:k,primary:k}))))))};var ut=e(48023),dt=e(9118),ht=e(36964);const et=(0,l.Z)(Fe=>({searchQuery:{color:Fe.palette.text.primary,background:Fe.palette.background.default,borderRadius:"10%"},tableHeader:{margin:Fe.spacing(1,0,0,0),display:"flex"},divider:{width:"1px",margin:Fe.spacing(0,2),padding:Fe.spacing(2,0)}})),Xe=[{title:"Name",field:"name",highlight:!0,render:Fe=>n.createElement(dt.Link,{to:Fe.url||""},Fe.name)},{title:"Description",field:"description"},{title:"Owner",field:"owner"},{title:"Kind",field:"kind"},{title:"LifeCycle",field:"lifecycle"}],vt=({searchQuery:Fe,numberOfSelectedFilters:at,numberOfResults:lt,handleToggleFilters:Et})=>{const rt=et();return n.createElement("div",{className:rt.tableHeader},n.createElement(Ee,{numberOfSelectedFilters:at,handleToggleFilters:Et}),n.createElement(B.Z,{className:rt.divider,orientation:"vertical"}),n.createElement(o.Z,{item:!0,xs:12},Fe?n.createElement(T.Z,{variant:"h6"},`${lt} `,lt>1?"results for ":"result for ",n.createElement("span",{className:rt.searchQuery},'"',Fe,'"')," "):n.createElement(T.Z,{variant:"h6"},`${lt} results`)))},ct=({searchQuery:Fe})=>{const at=(0,ht.useApi)(U.catalogApiRef),[lt,Et]=(0,n.useState)(!1),[rt,gt]=(0,n.useState)({selected:"",checked:[]}),[k,$]=(0,n.useState)([]),{loading:ae,error:ue,value:se}=(0,D.default)(async()=>(await at.getEntities()).items.map(j=>{var M,te,me,ve,Te;return{name:j.metadata.name,description:j.metadata.description,owner:typeof((M=j.spec)==null?void 0:M.owner)=="string"?(te=j.spec)==null?void 0:te.owner:void 0,kind:j.kind,lifecycle:typeof((me=j.spec)==null?void 0:me.lifecycle)=="string"?(ve=j.spec)==null?void 0:ve.lifecycle:void 0,url:`/catalog/${((Te=j.metadata.namespace)==null?void 0:Te.toLocaleLowerCase("en-US"))||ut.zG}/${j.kind.toLocaleLowerCase("en-US")}/${j.metadata.name}`}}),[]);if((0,n.useEffect)(()=>{if(se){let K=se;rt.selected!==""&&(K=se.filter(j=>rt.selected.includes(j.kind))),rt.checked.length>0&&(K=K.filter(j=>j.lifecycle&&rt.checked.includes(j.lifecycle))),Fe&&(K=K.filter(j=>{var M,te,me;return((M=j.name)==null?void 0:M.toLocaleLowerCase("en-US").includes(Fe))||((te=j.name)==null?void 0:te.toLocaleLowerCase("en-US").includes(Fe.split(" ").join("-")))||((me=j.description)==null?void 0:me.toLocaleLowerCase("en-US").includes(Fe))})),$(K)}},[rt,Fe,se]),ae)return n.createElement(dt.Progress,null);if(ue)return n.createElement(x.Z,{severity:"error"},"Error encountered while fetching search results. ",ue.toString());if(!se||se.length===0)return n.createElement(dt.EmptyState,{missing:"data",title:"Sorry, no results were found"});const ye=()=>{gt({selected:"",checked:[]})},Me=K=>{gt(j=>({...j,selected:K}))},Le=K=>{if(rt.checked.includes(K)){gt(j=>({...j,checked:j.checked.filter(M=>M!==K)}));return}gt(j=>({...j,checked:[...j.checked,K]}))},ze=se.reduce((K,j)=>(j.kind&&K.kind.indexOf(j.kind)<0&&K.kind.push(j.kind),j.lifecycle&&K.lifecycle.indexOf(j.lifecycle)<0&&K.lifecycle.push(j.lifecycle),K),{kind:[],lifecycle:[]});return n.createElement(n.Fragment,null,n.createElement(o.Z,{container:!0},lt&&n.createElement(o.Z,{item:!0,xs:3},n.createElement(nt,{filters:rt,filterOptions:ze,resetFilters:ye,updateSelected:Me,updateChecked:Le})),n.createElement(o.Z,{item:!0,xs:lt?9:12},n.createElement(dt.Table,{options:{paging:!0,pageSize:20,search:!1},data:k,columns:Xe,title:n.createElement(vt,{searchQuery:Fe,numberOfResults:k.length,numberOfSelectedFilters:(rt.selected!==""?1:0)+rt.checked.length,handleToggleFilters:()=>Et(!lt)})}))))},St=()=>{const[Fe,at]=(0,dt.useQueryParamState)("query"),[lt,Et]=(0,n.useState)(Fe!=null?Fe:""),rt=k=>{k.preventDefault(),Et(k.target.value)};(0,n.useEffect)(()=>Et(Fe!=null?Fe:""),[Fe]),(0,h.Z)(()=>{at(lt)},200,[lt]);const gt=()=>{Et("")};return n.createElement(dt.Page,{themeId:"home"},n.createElement(dt.Header,{title:"Search"}),n.createElement(dt.Content,null,n.createElement(o.Z,{container:!0,direction:"row"},n.createElement(o.Z,{item:!0,xs:12},n.createElement(G,{handleSearch:rt,handleClearSearchBar:gt,searchQuery:lt})),n.createElement(o.Z,{item:!0,xs:12},n.createElement(ct,{searchQuery:(Fe!=null?Fe:"").toLocaleLowerCase("en-US")})))))},Ct=()=>{const Fe=(0,y.TH)(),{term:at,setTerm:lt,types:Et,setTypes:rt,pageCursor:gt,setPageCursor:k,filters:$,setFilters:ae}=(0,i.Rx)(),ue=(0,t.Z)(Fe.search);return(0,n.useEffect)(()=>{if(Fe.search===ue)return;const se=m().parse(Fe.search.substring(1),{arrayLimit:0})||{};se.filters&&ae(se.filters),se.query&&lt(se.query),se.pageCursor&&k(se.pageCursor),se.types&&rt(se.types)},[ue,Fe,lt,rt,k,ae]),(0,n.useEffect)(()=>{const se=m().stringify({query:at,types:Et,pageCursor:gt,filters:$},{arrayFormat:"brackets"}),ye=`${window.location.pathname}?${se}`;window.history.replaceState(null,document.title,ye)},[at,Et,gt,$]),null},yt=()=>{const Fe=(0,y.pC)();return n.createElement(i.Nd,null,n.createElement(Ct,null),Fe||n.createElement(St,null))}},39332:function(q,s,e){"use strict";e.r(s),e.d(s,{SearchResult:function(){return m}});var n=e(9118),t=e(2784),c=e(22313);const m=({children:y})=>{const{result:{loading:i,error:o,value:h}}=(0,c.Rx)();return i?t.createElement(n.Progress,null):o?t.createElement(n.ResponseErrorPanel,{title:"Error encountered while fetching search results",error:o}):(h==null?void 0:h.results.length)?t.createElement(t.Fragment,null,y({results:h.results})):t.createElement(n.EmptyState,{missing:"data",title:"Sorry, no results were found"})}},8542:function(q,s,e){"use strict";e.d(s,{G:function(){return h}});var n=e(79692),t=e(77277),c=e(35352),m=e(27742),y=e(2784),i=e(22313);const o=(0,n.Z)(l=>({root:{display:"flex",justifyContent:"space-between",gap:l.spacing(2),margin:l.spacing(2,0)}})),h=()=>{const{fetchNextPage:l,fetchPreviousPage:E}=(0,i.Rx)(),g=o();return!l&&!E?y.createElement(y.Fragment,null):y.createElement("nav",{"arial-label":"pagination navigation",className:g.root},y.createElement(t.Z,{"aria-label":"previous page",disabled:!E,onClick:E,startIcon:y.createElement(c.Z,null)},"Previous"),y.createElement(t.Z,{"aria-label":"next page",disabled:!l,onClick:l,endIcon:y.createElement(m.Z,null)},"Next"))}},20863:function(q,s,e){"use strict";e.d(s,{_Z:function(){return c}});var n=e(91512),t=e(36964);const c=(0,t.createRouteRef)({id:"search"}),m=(0,t.createRouteRef)({id:"search:next"}),y=(0,t.createPlugin)({id:"search",apis:[(0,t.createApiFactory)({api:n.g,deps:{discoveryApi:t.discoveryApiRef,identityApi:t.identityApiRef},factory:({discoveryApi:S,identityApi:G})=>new n.w({discoveryApi:S,identityApi:G})})],routes:{root:c,nextRoot:m}}),i=y.provide((0,t.createRoutableExtension)({name:"SearchPage",component:()=>Promise.resolve().then(e.bind(e,3992)).then(S=>S.SearchPage),mountPoint:c})),o=y.provide((0,t.createRoutableExtension)({name:"SearchPageNext",component:()=>Promise.resolve().then(e.bind(e,3992)).then(S=>S.SearchPage),mountPoint:m})),h=y.provide((0,t.createComponentExtension)({name:"SearchBar",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(S=>S.SearchBar)}})),l=y.provide((0,t.createComponentExtension)({name:"SearchBarNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,1795)).then(S=>S.SearchBar)}})),E=y.provide((0,t.createComponentExtension)({name:"SearchResult",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(S=>S.SearchResult)}})),g=y.provide((0,t.createComponentExtension)({name:"SearchResultNext",component:{lazy:()=>Promise.resolve().then(e.bind(e,39332)).then(S=>S.SearchResult)}})),C=y.provide((0,t.createComponentExtension)({name:"SidebarSearchModal",component:{lazy:()=>e.e(3825).then(e.bind(e,43825)).then(S=>S.SidebarSearchModal)}})),L=y.provide((0,t.createComponentExtension)({name:"DefaultResultListItem",component:{lazy:()=>Promise.resolve().then(e.bind(e,19941)).then(S=>S.DefaultResultListItem)}})),Z=y.provide((0,t.createComponentExtension)({name:"HomePageSearchBar",component:{lazy:()=>e.e(6105).then(e.bind(e,46105)).then(S=>S.HomePageSearchBar)}}))},94067:function(q,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return Z},Router:function(){return L},isTechDocsAvailable:function(){return C}});var n=e(2784),t=e(22707),c=e(10289),m=e(50021),y=e(16292),i=e(96393),o=e(97589),h=e(36964);const l=({entity:S})=>{var B;const G=(0,h.useApi)(h.configApiRef);return n.createElement(i.Ej,{withSearch:!1,entityRef:{namespace:(0,o.D)((B=S.metadata.namespace)!=null?B:"default",G),kind:(0,o.D)(S.kind,G),name:(0,o.D)(S.metadata.name,G)}})};var E=e(9118);const g="backstage.io/techdocs-ref",C=S=>{var G,B;return Boolean((B=(G=S==null?void 0:S.metadata)==null?void 0:G.annotations)==null?void 0:B[g])},L=()=>n.createElement(c.Z5,null,n.createElement(c.AW,{path:"/",element:n.createElement(m.TechDocsIndexPage,null)}),n.createElement(c.AW,{path:"/:namespace/:kind/:name/*",element:n.createElement(y.TechDocsReaderPage,null)})),Z=()=>{var B;const{entity:S}=(0,t.useEntity)();return((B=S.metadata.annotations)==null?void 0:B[g])?n.createElement(c.Z5,null,n.createElement(c.AW,{path:"/*",element:n.createElement(l,{entity:S})})):n.createElement(E.MissingAnnotationEmptyState,{annotation:g})}},3337:function(q,s,e){"use strict";e.d(s,{D:function(){return t},g:function(){return c}});var n=e(36964);const t=(0,n.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,n.createApiRef)({id:"plugin.techdocs.service"})},42723:function(q,s,e){"use strict";e.d(s,{p:function(){return m},k:function(){return y}});var n=e(10179),t=e(76372),c=e.n(t);class m{constructor(o){ie(this,"configApi");ie(this,"discoveryApi");ie(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.fetchApi=o.fetchApi}async getApiOrigin(){var o;return(o=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?o:await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(o){const{kind:h,namespace:l,name:E}=o,C=`${await this.getApiOrigin()}/metadata/techdocs/${l}/${h}/${E}`,L=await this.fetchApi.fetch(`${C}`);if(!L.ok)throw await n.VL.fromResponse(L);return await L.json()}async getEntityMetadata(o){const{kind:h,namespace:l,name:E}=o,C=`${await this.getApiOrigin()}/metadata/entity/${l}/${h}/${E}`,L=await this.fetchApi.fetch(`${C}`);if(!L.ok)throw await n.VL.fromResponse(L);return await L.json()}}class y{constructor(o){ie(this,"configApi");ie(this,"discoveryApi");ie(this,"identityApi");ie(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.identityApi=o.identityApi,this.fetchApi=o.fetchApi}async getApiOrigin(){var o;return(o=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?o:await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var o;return(o=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?o:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(o,h){const{kind:l,namespace:E,name:g}=o,L=`${await this.getStorageUrl()}/${E}/${l}/${g}/${h}`,Z=await this.fetchApi.fetch(`${L.endsWith("/")?L:`${L}/`}index.html`);let S="";switch(Z.status){case 404:throw S="Page not found. ",h||(S+="This could be because there is no index.md file in the root of the docs directory of this repository."),new n.dR(S);case 500:throw S="Could not generate documentation or an error in the TechDocs backend. ",new Error(S);default:break}return Z.text()}async syncEntityDocs(o,h=()=>{}){const{kind:l,namespace:E,name:g}=o,L=`${await this.getApiOrigin()}/sync/${E}/${l}/${g}`,{token:Z}=await this.identityApi.getCredentials();return new Promise((S,G)=>{const B=new t.EventSourcePolyfill(L,{withCredentials:!0,headers:Z?{Authorization:`Bearer ${Z}`}:{}});B.addEventListener("log",T=>{T.data&&h(JSON.parse(T.data))}),B.addEventListener("finish",T=>{let x=!1;T.data&&({updated:x}=JSON.parse(T.data)),S(x?"updated":"cached")}),B.onerror=T=>{switch(B.close(),T.status){case 404:G(new n.dR(T.message));return;default:G(new Error(T.data));return}}})}async getBaseUrl(o,h,l){const{kind:E,namespace:g,name:C}=h,Z=`${await this.getApiOrigin()}/static/docs/${g}/${E}/${C}/${l}`;return new URL(o,Z.endsWith("/")?Z:`${Z}/`).toString()}}},97589:function(q,s,e){"use strict";e.d(s,{D:function(){return n}});function n(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(q,s,e){"use strict";e.d(s,{u:function(){return h}});var n=e(2784),t=e(9118),c=e(92902),m=e(22707),y=e(1114),i=e(70335),o=e(21956);const h=l=>{const{initialFilter:E="all",columns:g,actions:C}=l;return n.createElement(y.j,null,n.createElement(t.Content,null,n.createElement(t.ContentHeader,{title:""},n.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),n.createElement(m.EntityListProvider,null,n.createElement(c.FilteredEntityLayout,null,n.createElement(c.FilterContainer,null,n.createElement(i.f,null),n.createElement(m.UserListPicker,{initialFilter:E}),n.createElement(m.EntityOwnerPicker,null),n.createElement(m.EntityTagPicker,null)),n.createElement(c.EntityListContainer,null,n.createElement(o.EntityListDocsTable,{actions:C,columns:g}))))))}},51016:function(q,s,e){"use strict";e.d(s,{f:function(){return E}});var n=e(68725),t=e(97589),c=e(36964),m=e(9118),y=e(94339),i=e(16111),o=e(24579),h=e(14503),l=e(2784);const E=L=>{const{entities:Z}=L,S=(0,c.useRouteRef)(n.Fw),G=(0,c.useApi)(c.configApiRef);return Z?l.createElement(m.ItemCardGrid,{"data-testid":"docs-explore"},(Z==null?void 0:Z.length)?Z.map((B,T)=>{var x,D;return l.createElement(y.Z,{key:T},l.createElement(i.Z,null,l.createElement(m.ItemCardHeader,{title:(x=B.metadata.title)!=null?x:B.metadata.name})),l.createElement(o.Z,null,B.metadata.description),l.createElement(h.Z,null,l.createElement(m.Button,{to:S({namespace:(0,t.D)((D=B.metadata.namespace)!=null?D:"default",G),kind:(0,t.D)(B.kind,G),name:(0,t.D)(B.metadata.name,G)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var g=e(22707);const C=()=>{const{loading:L,error:Z,entities:S}=useEntityList();return Z?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:Z.toString()})):L||!S?React.createElement(Progress,null):(S.sort((G,B)=>{var T,x;return((T=G.metadata.title)!=null?T:G.metadata.name).localeCompare((x=B.metadata.title)!=null?x:B.metadata.name)}),React.createElement(DocsCardGrid,{entities:S}))}},81290:function(q,s,e){"use strict";e.d(s,{H:function(){return g}});var n=e(2784),t=e(95074),c=e(36964),m=e(48023),y=e(22707),i=e(68725),o=e(9118),h=e(98095),l=e(3792),E=e(97589);const g=C=>{const{entities:L,title:Z,loading:S,columns:G,actions:B}=C,[,T]=(0,t.Z)(),x=(0,c.useRouteRef)(i.Fw),D=(0,c.useApi)(c.configApiRef);if(!L)return null;const U=L.map(Ee=>{var Oe;const Se=(0,y.getEntityRelations)(Ee,m.S4);return{entity:Ee,resolved:{docsUrl:x({namespace:(0,E.D)((Oe=Ee.metadata.namespace)!=null?Oe:"default",D),kind:(0,E.D)(Ee.kind,D),name:(0,E.D)(Ee.metadata.name,D)}),ownedByRelations:Se,ownedByRelationsTitle:Se.map(Ae=>(0,y.humanizeEntityRef)(Ae,{defaultKind:"group"})).join(", ")}}}),V=[l.N.createNameColumn(),l.N.createOwnerColumn(),l.N.createTypeColumn()],X=[h.n.createCopyDocsUrlAction(T)];return n.createElement(n.Fragment,null,S||U&&U.length>0?n.createElement(o.Table,{isLoading:S,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:U,columns:G||V,actions:B||X,title:Z?`${Z} (${U.length})`:`All (${U.length})`}):n.createElement(o.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:n.createElement(o.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};g.columns=l.N,g.actions=h.n},12481:function(q,s,e){"use strict";e.d(s,{n:function(){return E}});var n=e(2784),t=e(95074),c=e(76635),m=e.n(c),y=e(9118),i=e(22707),o=e(81290),h=e(98095),l=e(3792);const E=g=>{var X,Ee;const{columns:C,actions:L}=g,{loading:Z,error:S,entities:G,filters:B}=(0,i.useEntityList)(),{isStarredEntity:T,toggleStarredEntity:x}=(0,i.useStarredEntities)(),[,D]=(0,t.Z)(),U=(0,c.capitalize)((Ee=(X=B.user)==null?void 0:X.value)!=null?Ee:"all"),V=[h.n.createCopyDocsUrlAction(D),h.n.createStarEntityAction(T,x)];return S?n.createElement(y.WarningPanel,{severity:"error",title:"Could not load available documentation."},n.createElement(y.CodeSnippet,{language:"text",text:S.toString()})):n.createElement(o.H,{title:U,entities:G,loading:Z,actions:L||V,columns:C})};E.columns=l.N,E.actions=h.n},98095:function(q,s,e){"use strict";e.d(s,{n:function(){return o}});var n=e(2784),t=e(39981),c=e(2337),m=e(11640),y=e(28347);const i=(0,c.Z)({root:{color:"#f3ba37"}})(m.Z),o={createCopyDocsUrlAction(h){return l=>({icon:()=>n.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>h(`${window.location.origin}${l.resolved.docsUrl}`)})},createStarEntityAction(h,l){return({entity:E})=>{const g=h(E);return{cellStyle:{paddingLeft:"1em"},icon:()=>g?n.createElement(i,null):n.createElement(y.Z,null),tooltip:g?"Remove from favorites":"Add to favorites",onClick:()=>l(E)}}}}},3792:function(q,s,e){"use strict";e.d(s,{N:function(){return y}});var n=e(2784),t=e(9118),c=e(22707);function m(i){return i.metadata.title||i.metadata.name}const y={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:i=>n.createElement(t.SubvalueCell,{value:n.createElement(t.Link,{to:i.resolved.docsUrl},m(i.entity)),subvalue:i.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:i})=>n.createElement(c.EntityRefLinks,{entityRefs:i.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(q,s,e){"use strict";e.d(s,{EntityListDocsTable:function(){return n.n},DocsTable:function(){return t.H}});var n=e(12481),t=e(81290),c=e(72580),m=e.n(c);e.o(c,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return c.DefaultTechDocsHome}})},72580:function(){},50021:function(q,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return m}});var n=e(2784),t=e(10289),c=e(2546);const m=()=>(0,t.pC)()||n.createElement(c.u,null)},1114:function(q,s,e){"use strict";e.d(s,{j:function(){return m}});var n=e(2784),t=e(9118),c=e(36964);const m=y=>{var l;const{children:i}=y,h=`Documentation available in ${(l=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?l:"Backstage"}`;return n.createElement(t.PageWithHeader,{title:"Documentation",subtitle:h,themeId:"documentation"},i)}},70335:function(q,s,e){"use strict";e.d(s,{f:function(){return m}});var n=e(2784),t=e(22707);class c{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const m=()=>{const{updateFilters:y}=(0,t.useEntityList)();return(0,n.useEffect)(()=>{y({techdocs:new c})},[y]),null}},19192:function(q,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return c.u}});var n=e(51016),t=e(21956),c=e(2546),m=e(1114),y=e(70335)},82250:function(q,s,e){"use strict";e.d(s,{techdocsApiRef:function(){return c.g},techdocsStorageApiRef:function(){return c.D},Reader:function(){return y.Ej},TechDocsPage:function(){return y.EV},TechDocsPageHeader:function(){return y.nN},DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},TechDocsIndexPage:function(){return h.Jl},TechDocsReaderPage:function(){return h.I6},plugin:function(){return h.s4}});var n=e(98157),t=e.n(n);e.o(n,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return n.DefaultTechDocsHome}}),e.o(n,"Reader")&&e.d(s,{Reader:function(){return n.Reader}}),e.o(n,"TechDocsPage")&&e.d(s,{TechDocsPage:function(){return n.TechDocsPage}}),e.o(n,"TechDocsPageHeader")&&e.d(s,{TechDocsPageHeader:function(){return n.TechDocsPageHeader}}),e.o(n,"techdocsApiRef")&&e.d(s,{techdocsApiRef:function(){return n.techdocsApiRef}}),e.o(n,"techdocsStorageApiRef")&&e.d(s,{techdocsStorageApiRef:function(){return n.techdocsStorageApiRef}});var c=e(3337),m=e(42723),y=e(96393),i=e(93566),o=e(19192),h=e(20961),l=e(94067)},20961:function(q,s,e){"use strict";e.d(s,{s4:function(){return y},Jl:function(){return l},I6:function(){return E}});var n=e(3337),t=e(42723),c=e(68725),m=e(36964);const y=(0,m.createPlugin)({id:"techdocs",apis:[(0,m.createApiFactory)({api:n.D,deps:{configApi:m.configApiRef,discoveryApi:m.discoveryApiRef,identityApi:m.identityApiRef,fetchApi:m.fetchApiRef},factory:({configApi:g,discoveryApi:C,identityApi:L,fetchApi:Z})=>new t.k({configApi:g,discoveryApi:C,identityApi:L,fetchApi:Z})}),(0,m.createApiFactory)({api:n.g,deps:{configApi:m.configApiRef,discoveryApi:m.discoveryApiRef,fetchApi:m.fetchApiRef},factory:({configApi:g,discoveryApi:C,fetchApi:L})=>new t.p({configApi:g,discoveryApi:C,fetchApi:L})})],routes:{root:c._Z,docRoot:c.Fw,entityContent:c.pd}}),i=y.provide((0,m.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.Router),mountPoint:c._Z})),o=y.provide((0,m.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.EmbeddedDocsRouter),mountPoint:c.pd})),h=y.provide((0,m.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(g=>g.TechDocsCustomHome),mountPoint:c._Z})),l=y.provide((0,m.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(g=>g.TechDocsIndexPage),mountPoint:c._Z})),E=y.provide((0,m.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,16292)).then(g=>g.TechDocsReaderPage),mountPoint:c.Fw}))},53242:function(q,s,e){"use strict";e.d(s,{Ej:function(){return ze},DK:function(){return se}});var n=e(2784),t=e(10289),c=e(79692),m=e(60364),y=e(41128),i=e(60905),o=e(36964),h=e(36356),l=e(9118),E=e(3337);const g=(K,j,M)=>{const te=K==="src"&&j.endsWith(".svg"),me=!j.match(/^([a-z]*:)?\/\//i),ve=j.startsWith(M);return te&&(me||ve)},C=({techdocsStorageApi:K,entityId:j,path:M})=>async te=>{const me=await K.getApiOrigin(),ve=async(Te,xe)=>{for(const ft of Te)if(ft.hasAttribute(xe)){const At=ft.getAttribute(xe);if(!At)return;const le=await K.getBaseUrl(At,j,M);if(g(xe,At,me))try{const z=await(await fetch(le,{credentials:"include"})).text();ft.setAttribute(xe,`data:image/svg+xml;base64,${btoa(z)}`)}catch{ft.setAttribute("alt",`Error: ${At}`)}else ft.setAttribute(xe,le)}};return await Promise.all([ve(te.querySelectorAll("img"),"src"),ve(te.querySelectorAll("script"),"src"),ve(te.querySelectorAll("source"),"src"),ve(te.querySelectorAll("link"),"href"),ve(te.querySelectorAll("a[download]"),"href")]),te};var L=e(63925),Z=e(67097),S=e(47093),G=e(82717),B=e.n(G);const T=K=>j=>{const M=j.querySelector('[title="Edit this page"]');if(!M||!M.href)return j;const te=new URL(M.href),me=K.byUrl(te);if((me==null?void 0:me.type)!=="github"&&(me==null?void 0:me.type)!=="gitlab")return j;const ve=j.querySelector("article>h1").childNodes[0].textContent,Te=encodeURIComponent(`Documentation Feedback: ${ve}`),xe=encodeURIComponent(`Page source:
32
+ ${M.href}
33
+
34
+ Feedback:`),ft=(me==null?void 0:me.type)==="github"?(0,L.Pb)(te.href,"blob"):te.href,At=B()(ft),le=`/${At.organization}/${At.name}`,P=M.cloneNode();switch(me==null?void 0:me.type){case"gitlab":P.href=`${te.origin}${le}/issues/new?issue[title]=${Te}&issue[description]=${xe}`;break;case"github":P.href=`${te.origin}${le}/issues/new?title=${Te}&body=${xe}`;break;default:return j}return S.render(n.createElement(Z.Z),P),P.style.paddingLeft="5px",P.title="Leave feedback for this page",P.id="git-feedback-link",M==null||M.insertAdjacentElement("beforebegin",P),j};var x=e(44882);const D=()=>K=>{const j=K.querySelector('.md-header label[for="__drawer"]'),M=K.querySelector("article");if(!j||!M)return K;const te=j.cloneNode();return S.render(n.createElement(x.Z),te),te.style.paddingLeft="5px",te.classList.add("md-content__button"),te.title="Toggle Sidebar",te.id="toggle-sidebar",M==null||M.prepend(te),K},U=()=>K=>(((M,te)=>{Array.from(M).filter(me=>me.hasAttribute(te)).forEach(me=>{const ve=me.getAttribute(te);if(ve){ve.match(/^https?:\/\//i)&&me.setAttribute("target","_blank");try{const Te=V(window.location.href);me.setAttribute(te,new URL(ve,Te).toString())}catch{me.replaceWith(me.textContent||ve)}}})})(Array.from(K.getElementsByTagName("a")),"href"),K);function V(K){const j=new URL(K);return!j.pathname.endsWith("/")&&!j.pathname.endsWith(".html")&&(j.pathname+="/"),j.toString()}const X=({baseUrl:K,onClick:j})=>M=>(Array.from(M.getElementsByTagName("a")).forEach(te=>{te.addEventListener("click",me=>{const Te=te.getAttribute("href");!Te||Te.startsWith(K)&&!te.hasAttribute("download")&&(me.preventDefault(),j(me,Te))})}),M);var Ee=e(15459),Se=e(80030),Oe=e(72379),Ae=e(41547);const Ke=(0,Ee.Z)(K=>({tooltip:{fontSize:"inherit",color:K.palette.text.primary,margin:0,padding:K.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Se.ZP),Ge=()=>n.createElement(Oe.Z,null,n.createElement("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"})),Qe=({text:K})=>{const[j,M]=(0,n.useState)(!1),te=(0,n.useCallback)(()=>{navigator.clipboard.writeText(K),M(!0)},[K]),me=(0,n.useCallback)(()=>{M(!1)},[M]);return n.createElement(Ke,{title:"Copied to clipboard",placement:"left",open:j,onClose:me,leaveDelay:1e3},n.createElement("button",{className:"md-clipboard md-icon",onClick:te},n.createElement(Ge,null)))},We=K=>j=>{var te;const M=j.querySelectorAll("pre > code");for(const me of M){const ve=me.textContent||"",Te=document.createElement("div");(te=me==null?void 0:me.parentElement)==null||te.prepend(Te),S.render(n.createElement(Ae.Z,{theme:K},n.createElement(Qe,{text:ve})),Te)}return j},je=()=>K=>{var j;return(j=K.querySelector(".md-header"))==null||j.remove(),K},it=()=>K=>{var j,M;return(j=K.querySelector(".md-footer .md-copyright"))==null||j.remove(),(M=K.querySelector(".md-footer-copyright"))==null||M.remove(),K},Ue=({docStorageUrl:K,onLoading:j,onLoaded:M})=>te=>{const me=Array.from(te.querySelectorAll('head > link[rel="stylesheet"]')).filter(Te=>{var xe;return(xe=Te.getAttribute("href"))==null?void 0:xe.startsWith(K)});let ve=me.length;return ve>0&&j(te),me.forEach(Te=>Te.addEventListener("load",()=>{ve-=1,ve===0&&M(te)})),te};var qe=e(35368),nt=e.n(qe);const ut=/main\.[A-Fa-f0-9]{8}\.min\.css$/,dt=/^https:\/\/fonts\.googleapis\.com/,ht=/^https:\/\/fonts\.gstatic\.com/,et=K=>{if(K.nodeName&&K.nodeName==="LINK"){const j=K.getAttribute("href")||"";j.match(ut)&&K.setAttribute("rel","stylesheet"),j.match(dt)&&K.setAttribute("rel","stylesheet"),j.match(ht)&&K.setAttribute("rel","preconnect")}return K},Xe=K=>j=>{if(j.nodeName==="IFRAME"){const M=j.getAttribute("src");if(!M)return j.remove(),j;try{const te=new URL(M);K.some(ve=>te.host===ve)||j.remove()}catch(te){console.warn(`Invalid iframe src, ${te}`),j.remove()}}return j},vt=K=>{const j=(K==null?void 0:K.getOptionalStringArray("allowedIframeHosts"))||[];return M=>{nt().addHook("afterSanitizeAttributes",et);const te=["link"];return j.length>0&&(nt().addHook("beforeSanitizeElements",Xe(j)),te.push("iframe")),nt().sanitize(M.innerHTML,{ADD_TAGS:te,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},ct=({css:K})=>j=>(j.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${K}</style>`),j),St=()=>K=>(setTimeout(()=>{var j;if(window.location.hash){const M=window.location.hash.slice(1);(j=K==null?void 0:K.querySelector(`#${M}`))==null||j.scrollIntoView()}},200),K),Ct=async(K,j)=>{let M;if(typeof K=="string")M=new DOMParser().parseFromString(K,"text/html").documentElement;else if(K instanceof Element)M=K;else throw new Error("dom is not a recognized type");for(const te of j)M=await te(M);return M};var yt=e(93566),Fe=e(25921),at=e(64279),lt=e(77446);function Et({contentLoading:K,content:j,activeSyncState:M}){return K||M==="BUILD_READY_RELOAD"||!j&&M==="CHECKING"?"CHECKING":!j&&M==="BUILDING"?"INITIAL_BUILD":j?M==="BUILDING"?"CONTENT_STALE_REFRESHING":M==="BUILD_READY"?"CONTENT_STALE_READY":M==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function rt(K,j){const M={...K};switch(j.type){case"sync":j.state==="CHECKING"&&(M.buildLog=[]),M.activeSyncState=j.state,M.syncError=j.syncError;break;case"contentLoading":M.contentLoading=!0,M.contentError=void 0;break;case"content":typeof j.path=="string"&&(M.path=j.path),M.contentLoading=!1,M.content=j.content,M.contentError=j.contentError;break;case"buildLog":M.buildLog=M.buildLog.concat(j.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(M.activeSyncState)&&["contentLoading","content"].includes(j.type)&&(M.activeSyncState="UP_TO_DATE",M.buildLog=[]),M}function gt(K,j,M,te){var le,P;const[me,ve]=(0,n.useReducer)(rt,{activeSyncState:"CHECKING",path:te,contentLoading:!0,buildLog:[]}),Te=(0,o.useApi)(E.D),{retry:xe}=(0,lt.Z)(async()=>{ve({type:"contentLoading"});try{const z=await Te.getEntityDocs({kind:K,namespace:j,name:M},te);return ve({type:"content",content:z,path:te}),z}catch(z){ve({type:"content",contentError:z,path:te})}},[Te,K,j,M,te]),ft=(0,n.useRef)({content:void 0,reload:()=>{}});return ft.current={content:me.content,reload:xe},(0,at.default)(async()=>{ve({type:"sync",state:"CHECKING"});const z=setTimeout(()=>{ve({type:"sync",state:"BUILDING"})},1e3);try{switch(await Te.syncEntityDocs({kind:K,namespace:j,name:M},d=>{ve({type:"buildLog",log:d})})){case"updated":ft.current.content?ve({type:"sync",state:"BUILD_READY"}):(ft.current.reload(),ve({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":ve({type:"sync",state:"UP_TO_DATE"});break;default:ve({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(A){ve({type:"sync",state:"ERROR",syncError:A})}finally{clearTimeout(z)}},[K,M,j,Te,ve,ft]),{state:(0,n.useMemo)(()=>Et({activeSyncState:me.activeSyncState,contentLoading:me.contentLoading,content:me.content}),[me.activeSyncState,me.content,me.contentLoading]),contentReload:xe,path:me.path,content:me.content,contentErrorMessage:(le=me.contentError)==null?void 0:le.toString(),syncErrorMessage:(P=me.syncError)==null?void 0:P.toString(),buildLog:me.buildLog}}const k=(0,c.Z)(K=>({searchBar:{maxWidth:"calc(100% - 16rem * 2 - 2.4rem)",marginTop:0,marginBottom:K.spacing(1),marginLeft:"calc(16rem + 1.2rem)","@media screen and (max-width: 76.1875em)":{marginLeft:"0",maxWidth:"100%"}}})),$=(0,n.createContext)({}),ae=({children:K,entityRef:j})=>{const{"*":M}=(0,t.UO)(),{kind:te,namespace:me,name:ve}=j,Te=gt(te,me,ve,M);return n.createElement($.Provider,{value:Te},K)},ue=(K,j)=>M=>React.createElement(ae,{entityRef:j},React.createElement(K,{...M})),se=()=>(0,n.useContext)($),ye=["h1","h2","h3","h4","h5","h6"],Me=K=>{const j=(0,t.s0)(),M=(0,m.Z)(),te=(0,o.useApi)(E.D),me=(0,o.useApi)(h.q3),ve=(0,o.useApi)(o.configApiRef),{namespace:Te="",kind:xe="",name:ft=""}=K,{state:At,path:le,content:P}=se(),z=M.palette.type==="dark",[A,d]=(0,n.useState)(),[v,b]=(0,n.useState)(null),{isPinned:N}=(0,n.useContext)(l.SidebarPinStateContext),ne=(0,n.useCallback)(()=>{if(!v||!A)return;const ge=v.querySelector(".md-container > .md-tabs"),Re=window.matchMedia("screen and (max-width: 76.1875em)").matches,we=Math.max(v.getBoundingClientRect().top,0);A.forEach(He=>{Re?He.style.top="0px":ge?He.style.top=`${we+ge.getBoundingClientRect().height}px`:He.style.top=`${we}px`})},[v,A]);(0,n.useEffect)(()=>(ne(),window.addEventListener("scroll",ne,!0),window.addEventListener("resize",ne),()=>{window.removeEventListener("scroll",ne,!0),window.removeEventListener("resize",ne)}),[ne,At]);const re=(0,n.useCallback)(()=>{if(!v)return;const ge=v.querySelector(".md-footer");ge&&(ge.style.width=`${v.getBoundingClientRect().width}px`)},[v]);(0,n.useEffect)(()=>(re(),window.addEventListener("resize",re),()=>{window.removeEventListener("resize",re)}));const _=(0,n.useCallback)((ge,Re)=>Ct(ge,[vt(ve.getOptionalConfig("techdocs.sanitizer")),C({techdocsStorageApi:te,entityId:{kind:xe,name:ft,namespace:Te},path:Re}),U(),D(),je(),it(),T(me),ct({css:`
35
+ /*
36
+ 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.
37
+ 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.
38
+ */
39
+ :host {
40
+ /* FONT */
41
+ --md-default-fg-color: ${M.palette.text.primary};
42
+ --md-default-fg-color--light: ${M.palette.text.secondary};
43
+ --md-default-fg-color--lighter: ${(0,y.$n)(M.palette.text.secondary,.7)};
44
+ --md-default-fg-color--lightest: ${(0,y.$n)(M.palette.text.secondary,.3)};
45
+
46
+ /* BACKGROUND */
47
+ --md-default-bg-color:${M.palette.background.default};
48
+ --md-default-bg-color--light: ${M.palette.background.paper};
49
+ --md-default-bg-color--lighter: ${(0,y.$n)(M.palette.background.paper,.7)};
50
+ --md-default-bg-color--lightest: ${(0,y.$n)(M.palette.background.paper,.3)};
51
+
52
+ /* PRIMARY */
53
+ --md-primary-fg-color: ${M.palette.primary.main};
54
+ --md-primary-fg-color--light: ${M.palette.primary.light};
55
+ --md-primary-fg-color--dark: ${M.palette.primary.dark};
56
+ --md-primary-bg-color: ${M.palette.primary.contrastText};
57
+ --md-primary-bg-color--light: ${(0,y.$n)(M.palette.primary.contrastText,.7)};
58
+
59
+ /* ACCENT */
60
+ --md-accent-fg-color: var(--md-primary-fg-color);
61
+
62
+ /* SHADOW */
63
+ --md-shadow-z1: ${M.shadows[1]};
64
+ --md-shadow-z2: ${M.shadows[2]};
65
+ --md-shadow-z3: ${M.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: ${M.palette.text.primary};
102
+ --md-code-bg-color: ${M.palette.background.paper};
103
+ --md-code-hl-color: ${(0,y.Fq)(M.palette.warning.main,.5)};
104
+ --md-code-hl-keyword-color: ${z?M.palette.primary.light:M.palette.primary.dark};
105
+ --md-code-hl-function-color: ${z?M.palette.secondary.light:M.palette.secondary.dark};
106
+ --md-code-hl-string-color: ${z?M.palette.success.light:M.palette.success.dark};
107
+ --md-code-hl-number-color: ${z?M.palette.error.light:M.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: ${M.palette.text.primary};
122
+ --md-typeset-del-color: ${z?(0,y.Fq)(M.palette.error.dark,.5):(0,y.Fq)(M.palette.error.light,.5)};
123
+ --md-typeset-ins-color: ${z?(0,y.Fq)(M.palette.success.dark,.5):(0,y.Fq)(M.palette.success.light,.5)};
124
+ --md-typeset-mark-color: ${z?(0,y.Fq)(M.palette.warning.dark,.5):(0,y.Fq)(M.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
+ `}),ct({css:`
141
+ body {
142
+ --md-text-color: var(--md-default-fg-color);
143
+ --md-text-link-color: var(--md-accent-fg-color);
144
+ --md-text-font-family: ${M.typography.fontFamily};
145
+ font-family: var(--md-text-font-family);
146
+ background-color: unset;
147
+ }
148
+ `}),ct({css:`
149
+ .md-grid {
150
+ max-width: 100%;
151
+ margin: 0;
152
+ }
153
+
154
+ .md-nav {
155
+ font-size: calc(var(--md-typeset-font-size) * 0.9);
156
+ }
157
+ .md-nav__link {
158
+ display: flex;
159
+ align-items: center;
160
+ justify-content: space-between;
161
+ }
162
+ .md-nav__icon {
163
+ height: 20px !important;
164
+ width: 20px !important;
165
+ margin-left:${M.spacing(1)}px;
166
+ }
167
+ .md-nav__icon svg {
168
+ margin: 0;
169
+ width: 20px !important;
170
+ height: 20px !important;
171
+ }
172
+ .md-nav__icon:after {
173
+ width: 20px !important;
174
+ height: 20px !important;
175
+ }
176
+
177
+ .md-main__inner {
178
+ margin-top: 0;
179
+ }
180
+
181
+ .md-sidebar {
182
+ height: calc(100% - 100px);
183
+ position: fixed;
184
+ width: 16rem;
185
+ }
186
+ .md-sidebar .md-sidebar__scrollwrap {
187
+ max-height: calc(100% - 100px);
188
+ }
189
+ .md-sidebar--secondary {
190
+ right: ${M.spacing(3)}px;
191
+ }
192
+
193
+ .md-content {
194
+ max-width: calc(100% - 16rem * 2);
195
+ margin-left: 16rem;
196
+ margin-bottom: 50px;
197
+ }
198
+
199
+ .md-footer {
200
+ position: fixed;
201
+ bottom: 0px;
202
+ }
203
+ .md-footer__title {
204
+ background-color: unset;
205
+ }
206
+ .md-footer-nav__link {
207
+ width: 16rem;
208
+ }
209
+
210
+ .md-dialog {
211
+ background-color: unset;
212
+ }
213
+
214
+ @media screen and (max-width: 76.1875em) {
215
+ .md-nav {
216
+ transition: none !important;
217
+ background-color: var(--md-default-bg-color)
218
+ }
219
+ .md-nav--primary .md-nav__title {
220
+ cursor: auto;
221
+ color: var(--md-default-fg-color);
222
+ font-weight: 700;
223
+ white-space: normal;
224
+ line-height: 1rem;
225
+ height: auto;
226
+ display: flex;
227
+ flex-flow: column;
228
+ row-gap: 1.6rem;
229
+ padding: 1.2rem .8rem .8rem;
230
+ background-color: var(--md-default-bg-color);
231
+ }
232
+ .md-nav--primary .md-nav__title~.md-nav__list {
233
+ box-shadow: none;
234
+ }
235
+ .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
236
+ border-top: none;
237
+ }
238
+ .md-nav--primary .md-nav__title .md-nav__button {
239
+ display: none;
240
+ }
241
+ .md-nav--primary .md-nav__title .md-nav__icon {
242
+ color: var(--md-default-fg-color);
243
+ position: static;
244
+ height: auto;
245
+ margin: 0 0 0 -0.2rem;
246
+ }
247
+ .md-nav--primary > .md-nav__title [for="none"] {
248
+ padding-top: 0;
249
+ }
250
+ .md-nav--primary .md-nav__item {
251
+ border-top: none;
252
+ }
253
+ .md-nav--primary :is(.md-nav__title,.md-nav__item) {
254
+ font-size : var(--md-typeset-font-size);
255
+ }
256
+ .md-nav .md-source {
257
+ display: none;
258
+ }
259
+
260
+ .md-sidebar {
261
+ height: 100%;
262
+ }
263
+ .md-sidebar--primary {
264
+ width: 12.1rem !important;
265
+ z-index: 200;
266
+ left: ${N?"calc(-12.1rem + 242px)":"calc(-12.1rem + 72px)"} !important;
267
+ }
268
+ .md-sidebar--secondary:not([hidden]) {
269
+ display: none;
270
+ }
271
+
272
+ .md-content {
273
+ max-width: 100%;
274
+ margin-left: 0;
275
+ }
276
+
277
+ .md-header__button {
278
+ margin: 0.4rem 0;
279
+ margin-left: 0.4rem;
280
+ padding: 0;
281
+ }
282
+
283
+ .md-overlay {
284
+ left: 0;
285
+ }
286
+
287
+ .md-footer {
288
+ position: static;
289
+ padding-left: 0;
290
+ }
291
+ .md-footer-nav__link {
292
+ /* footer links begin to overlap at small sizes without setting width */
293
+ width: 50%;
294
+ }
295
+ }
296
+
297
+ @media screen and (max-width: 600px) {
298
+ .md-sidebar--primary {
299
+ left: -12.1rem !important;
300
+ width: 12.1rem;
301
+ }
302
+ }
303
+ `}),ct({css:`
304
+ .md-typeset {
305
+ font-size: var(--md-typeset-font-size);
306
+ }
307
+
308
+ ${ye.reduce((we,He)=>{const _e=M.typography[He],{lineHeight:ke,fontFamily:Rt,fontWeight:wt,fontSize:Dt}=_e,Kt=mt=>{let Tt=1;return typeof mt=="number"&&(Tt=mt/16*.6),typeof mt=="string"&&(Tt=mt.replace("rem","")),`calc(${Tt} * var(--md-typeset-font-size))`};return we.concat(`
309
+ .md-typeset ${He} {
310
+ color: var(--md-default-fg-color);
311
+ line-height: ${ke};
312
+ font-family: ${Rt};
313
+ font-weight: ${wt};
314
+ font-size: ${Kt(Dt)};
315
+ }
316
+ `)},"")}
317
+
318
+ .md-typeset .md-content__button {
319
+ color: var(--md-default-fg-color);
320
+ }
321
+
322
+ .md-typeset hr {
323
+ border-bottom: 0.05rem dotted ${M.palette.divider};
324
+ }
325
+
326
+ .md-typeset details {
327
+ font-size: var(--md-typeset-font-size) !important;
328
+ }
329
+ .md-typeset details summary {
330
+ padding-left: 2.5rem !important;
331
+ }
332
+ .md-typeset details summary:before,
333
+ .md-typeset details summary:after {
334
+ top: 50% !important;
335
+ width: 20px !important;
336
+ height: 20px !important;
337
+ transform: rotate(0deg) translateY(-50%) !important;
338
+ }
339
+ .md-typeset details[open] > summary:after {
340
+ transform: rotate(90deg) translateX(-50%) !important;
341
+ }
342
+
343
+ .md-typeset blockquote {
344
+ color: var(--md-default-fg-color--light);
345
+ border-left: 0.2rem solid var(--md-default-fg-color--light);
346
+ }
347
+
348
+ .md-typeset table:not([class]) {
349
+ font-size: var(--md-typeset-font-size);
350
+ border: 1px solid var(--md-default-fg-color);
351
+ border-bottom: none;
352
+ border-collapse: collapse;
353
+ }
354
+ .md-typeset table:not([class]) th {
355
+ font-weight: bold;
356
+ }
357
+ .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
358
+ border-bottom: 1px solid var(--md-default-fg-color);
359
+ }
360
+
361
+ .md-typeset pre > code::-webkit-scrollbar-thumb {
362
+ background-color: hsla(0, 0%, 0%, 0.32);
363
+ }
364
+ .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
365
+ background-color: hsla(0, 0%, 0%, 0.87);
366
+ }
367
+ `}),ct({css:`
368
+ /*
369
+ Disable CSS animations on link colors as they lead to issues in dark mode.
370
+ The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
371
+ */
372
+ .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
373
+ transition: none;
374
+ }
375
+ `}),ct({css:`
376
+ /* HIGHLIGHT */
377
+ .highlight .md-clipboard:after {
378
+ content: unset;
379
+ }
380
+
381
+ .highlight .nx {
382
+ color: ${z?"#ff53a3":"#ec407a"};
383
+ }
384
+
385
+ /* CODE HILITE */
386
+ .codehilite .gd {
387
+ background-color: ${z?"rgba(248,81,73,0.65)":"#fdd"};
388
+ }
389
+
390
+ .codehilite .gi {
391
+ background-color: ${z?"rgba(46,160,67,0.65)":"#dfd"};
392
+ }
393
+
394
+ /* TABBED */
395
+ .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
396
+ .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
397
+ .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
398
+ .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
399
+ .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
400
+ .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
401
+ .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
402
+ .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
403
+ .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
404
+ .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
405
+ .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
406
+ .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
407
+ .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
408
+ .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
409
+ .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
410
+ .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
411
+ .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
412
+ .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
413
+ .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
414
+ .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
415
+ color: var(--md-accent-fg-color);
416
+ border-color: var(--md-accent-fg-color);
417
+ }
418
+
419
+ /* TASK-LIST */
420
+ .task-list-control .task-list-indicator::before {
421
+ background-color: ${M.palette.action.disabledBackground};
422
+ }
423
+ .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
424
+ background-color: ${M.palette.success.main};
425
+ }
426
+
427
+ /* ADMONITION */
428
+ .admonition {
429
+ font-size: var(--md-typeset-font-size) !important;
430
+ }
431
+ .admonition .admonition-title {
432
+ padding-left: 2.5rem !important;
433
+ }
434
+
435
+ .admonition .admonition-title:before {
436
+ top: 50% !important;
437
+ width: 20px !important;
438
+ height: 20px !important;
439
+ transform: translateY(-50%) !important;
440
+ }
441
+ `})]),[xe,ft,Te,me,ve,te,M,z,N]),fe=(0,n.useCallback)(async ge=>Ct(ge,[St(),We(M),X({baseUrl:window.location.origin,onClick:(Re,we)=>{var ke,Rt;const He=Re.ctrlKey||Re.metaKey,_e=new URL(we);_e.hash?He?window.open(`${_e.pathname}${_e.hash}`,"_blank"):(j(`${_e.pathname}${_e.hash}`),(ke=ge==null?void 0:ge.querySelector(`#${_e.hash.slice(1)}`))==null||ke.scrollIntoView()):He?window.open(_e.pathname,"_blank"):(j(_e.pathname),(Rt=ge==null?void 0:ge.querySelector(".md-content__inner"))==null||Rt.scrollIntoView())}}),Ue({docStorageUrl:await te.getApiOrigin(),onLoading:Re=>{Re.style.setProperty("opacity","0")},onLoaded:Re=>{var we;Re.style.removeProperty("opacity"),(we=Re.querySelector(".md-nav__title"))==null||we.removeAttribute("for"),d(Array.from(Re.querySelectorAll(".md-sidebar")))}})]),[M,j,te]);return(0,n.useEffect)(()=>{if(!P)return()=>{};let ge=!0;return _(P,le).then(async Re=>{if(!(Re==null?void 0:Re.innerHTML)||!ge)return;window.scroll({top:0});const we=await fe(Re);b(we)}),()=>{ge=!1}},[P,le,_,fe]),v},Le=({entityRef:K,onReady:j=()=>{},withSearch:M=!0})=>{var xe,ft;const te=k(),me=Me(K),ve=(0,n.useRef)(null),Te=(0,n.useRef)(j);return(0,n.useEffect)(()=>{Te.current=j},[j]),(0,n.useEffect)(()=>{if(!me||!ve.current)return;const At=ve.current,le=At.shadowRoot||At.attachShadow({mode:"open"});Array.from(le.children).forEach(P=>le.removeChild(P)),le.appendChild(me),Te.current()},[me]),n.createElement(n.Fragment,null,n.createElement(Fe.N,null),M&&((ft=(xe=ve==null?void 0:ve.current)==null?void 0:xe.shadowRoot)==null?void 0:ft.innerHTML)&&n.createElement(i.Z,{container:!0,className:te.searchBar},n.createElement(yt.S4,{entityId:K})),n.createElement("div",{"data-testid":"techdocs-content-shadowroot",ref:ve}))},ze=K=>{const{entityRef:j,onReady:M=()=>{},withSearch:te=!0}=K;return n.createElement(ae,{entityRef:j},n.createElement(Le,{entityRef:j,onReady:M,withSearch:te}))}},94252:function(q,s,e){"use strict";e.d(s,{T:function(){return m}});var n=e(2784),t=e(36964),c=e(9118);const m=({errorMessage:y})=>{const i=(0,t.useApi)(t.configApiRef).getOptionalString("techdocs.builder");let o="";return i!=="local"&&(o="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."),n.createElement(c.ErrorPage,{status:"404",statusMessage:y||"Documentation not found",additionalInfo:o})}},16292:function(q,s,e){"use strict";e.r(s),e.d(s,{TechDocsPage:function(){return C},TechDocsReaderPage:function(){return g}});var n=e(2784),t=e(10289),c=e(64279),m=e(3337),y=e(94252),i=e(36964),o=e(9118),h=e(53242),l=e(75505);const E=()=>{const[L,Z]=(0,n.useState)(!1),{namespace:S,kind:G,name:B}=(0,t.UO)(),T=(0,i.useApi)(m.g),{value:x}=(0,c.default)(()=>L?T.getTechDocsMetadata({kind:G,namespace:S,name:B}):Promise.resolve(void 0),[G,S,B,T,L]),{value:D,error:U}=(0,c.default)(()=>T.getEntityMetadata({kind:G,namespace:S,name:B}),[G,S,B,T]),V=(0,n.useCallback)(()=>{Z(!0)},[Z]);return U?n.createElement(y.T,{errorMessage:U.message}):n.createElement(o.Page,{themeId:"documentation"},n.createElement(l.S,{techDocsMetadata:x,entityMetadata:D,entityRef:{kind:G,namespace:S,name:B}}),n.createElement(o.Content,{"data-testid":"techdocs-content"},n.createElement(h.Ej,{onReady:V,entityRef:{kind:G,namespace:S,name:B}})))},g=L=>{const{children:Z}=L,{NotFoundErrorPage:S}=(0,i.useApp)().getComponents(),G=(0,t.pC)(),[B,T]=(0,n.useState)(!1),{namespace:x,kind:D,name:U}=(0,t.UO)(),V=(0,i.useApi)(m.g),{value:X}=(0,c.default)(()=>B?V.getTechDocsMetadata({kind:D,namespace:x,name:U}):Promise.resolve(void 0),[D,x,U,V,B]),{value:Ee,error:Se}=(0,c.default)(()=>V.getEntityMetadata({kind:D,namespace:x,name:U}),[D,x,U,V]),Oe=(0,n.useCallback)(()=>{T(!0)},[T]);return Se?n.createElement(S,null):Z?n.createElement(o.Page,{themeId:"documentation"},Z instanceof Function?Z({techdocsMetadataValue:X,entityMetadataValue:Ee,entityRef:{kind:D,namespace:x,name:U},onReady:Oe}):Z):G||n.createElement(E,null)},C=g},75505:function(q,s,e){"use strict";e.d(s,{S:function(){return h},n:function(){return l}});var n=e(2784),t=e(73250),c=e(36964),m=e(9118),y=e(48023),i=e(22707),o=e(68725);const h=E=>{const{entityRef:g,entityMetadata:C,techDocsMetadata:L,children:Z}=E,{name:S}=g,{site_name:G,site_description:B}=L||{},{locationMetadata:T,spec:x}=C||{},D=x==null?void 0:x.lifecycle,U=C?(0,i.getEntityRelations)(C,y.S4):[],V=(0,c.useRouteRef)(o._Z)(),X=n.createElement(n.Fragment,null,n.createElement(m.HeaderLabel,{label:"Component",value:n.createElement(i.EntityRefLink,{color:"inherit",entityRef:g,defaultKind:"Component"})}),U.length>0&&n.createElement(m.HeaderLabel,{label:"Owner",value:n.createElement(i.EntityRefLinks,{color:"inherit",entityRefs:U,defaultKind:"group"})}),D?n.createElement(m.HeaderLabel,{label:"Lifecycle",value:D}):null,T&&T.type!=="dir"&&T.type!=="file"?n.createElement(m.HeaderLabel,{label:"",value:n.createElement("a",{href:T.target,target:"_blank",rel:"noopener noreferrer"},n.createElement(t.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return n.createElement(m.Header,{title:G||".",pageTitleOverride:G||S,subtitle:B&&B!=="None"?B:"",type:"Docs",typeLink:V},X,Z)},l=h},25921:function(q,s,e){"use strict";e.d(s,{N:function(){return x}});var n=e(2784),t=e(9118),c=e(79692),m=e(4614),y=e(77277),i=e(99688),o=e(12420),h=e(60905),l=e(90436),E=e(61837),g=e(4190),C=e(87685);const L=(0,c.Z)(D=>(0,o.Z)({paper:{width:"100%",[D.breakpoints.up("sm")]:{width:"75%"},[D.breakpoints.up("md")]:{width:"50%"},padding:D.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:D.palette.background.default}})),Z=({buildLog:D,onClose:U})=>{const V=L(),X=D.length===0?"Waiting for logs...":D.join(`
442
+ `);return n.createElement(h.Z,{container:!0,direction:"column",className:V.root,spacing:0,wrap:"nowrap"},n.createElement(h.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},n.createElement(l.Z,{variant:"h5"},"Build Details"),n.createElement(E.Z,{key:"dismiss",title:"Close the drawer",onClick:U,color:"inherit"},n.createElement(C.Z,null))),n.createElement(t.LogViewer,{text:X,classes:{root:V.logs}}))},S=({buildLog:D})=>{const U=L(),[V,X]=(0,n.useState)(!1);return n.createElement(n.Fragment,null,n.createElement(y.Z,{color:"inherit",onClick:()=>X(!0)},"Show Build Logs"),n.createElement(g.ZP,{classes:{paper:U.paper},anchor:"right",open:V,onClose:()=>X(!1)},n.createElement(Z,{buildLog:D,onClose:()=>X(!1)})))};var G=e(94252),B=e(53242);const T=(0,c.Z)(D=>({root:{marginBottom:D.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),x=()=>{let D=null;const U=T(),{state:V,contentReload:X,contentErrorMessage:Ee,syncErrorMessage:Se,buildLog:Oe}=(0,B.DK)(),Ae=V==="CHECKING"?n.createElement(t.Progress,null):null;return V==="INITIAL_BUILD"&&(D=n.createElement(i.Z,{classes:{root:U.root},variant:"outlined",severity:"info",icon:n.createElement(m.Z,{size:"24px"}),action:n.createElement(S,{buildLog:Oe})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),V==="CONTENT_STALE_REFRESHING"&&(D=n.createElement(i.Z,{variant:"outlined",severity:"info",icon:n.createElement(m.Z,{size:"24px"}),action:n.createElement(S,{buildLog:Oe}),classes:{root:U.root}},"A newer version of this documentation is being prepared and will be available shortly.")),V==="CONTENT_STALE_READY"&&(D=n.createElement(i.Z,{variant:"outlined",severity:"success",action:n.createElement(y.Z,{color:"inherit",onClick:()=>X()},"Refresh"),classes:{root:U.root}},"A newer version of this documentation is now available, please refresh to view.")),V==="CONTENT_STALE_ERROR"&&(D=n.createElement(i.Z,{variant:"outlined",severity:"error",action:n.createElement(S,{buildLog:Oe}),classes:{root:U.root,message:U.message}},"Building a newer version of this documentation failed."," ",Se)),V==="CONTENT_NOT_FOUND"&&(D=n.createElement(n.Fragment,null,Se&&n.createElement(i.Z,{variant:"outlined",severity:"error",action:n.createElement(S,{buildLog:Oe}),classes:{root:U.root,message:U.message}},"Building a newer version of this documentation failed."," ",Se),n.createElement(G.T,{errorMessage:Ee}))),n.createElement(n.Fragment,null,Ae,D)}},96393:function(q,s,e){"use strict";e.d(s,{Ej:function(){return n.Ej},EV:function(){return t.TechDocsPage},nN:function(){return c.n}});var n=e(53242),t=e(16292),c=e(75505),m=e(25921)},68725:function(q,s,e){"use strict";e.d(s,{_Z:function(){return t},Fw:function(){return c},pd:function(){return m}});var n=e(36964);const t=(0,n.createRouteRef)({id:"techdocs:index-page"}),c=(0,n.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),m=(0,n.createRouteRef)({id:"techdocs:catalog-reader-view"})},93566:function(q,s,e){"use strict";e.d(s,{S4:function(){return le}});var n=e(2784),t=e(79692),c=e(49378),m=e(38402),y=e(85256),i=e(9118),o=e(15277),h=e.n(o);const l=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),E=P=>{const{result:z,lineClamp:A=5,asListItem:d=!0,asLink:v=!0,title:b}=P,N=l(),ne=()=>{var fe;return n.createElement(c.Z,{className:N.itemText,primaryTypographyProps:{variant:"h6"},primary:b||`${z.title} | ${(fe=z.entityTitle)!=null?fe:z.name} docs`,secondary:n.createElement(h(),{line:A,truncateText:"\u2026",text:z.text,element:"span"})})},re=({children:fe})=>v?n.createElement(i.Link,{to:z.location},fe):n.createElement(n.Fragment,null,fe),_=({children:fe})=>d?n.createElement(n.Fragment,null,n.createElement(m.Z,{alignItems:"flex-start",className:N.flexContainer},fe),n.createElement(y.Z,{component:"li"})):n.createElement(n.Fragment,null,fe);return n.createElement(re,null,n.createElement(_,null,n.createElement(ne,null)))},g=null;var C=e(91512);const L=(0,t.Z)(P=>({filters:{width:"250px",display:"flex"},icon:{margin:P.spacing(-1,0,0,0)}})),Z=({numberOfSelectedFilters:P,handleToggleFilters:z})=>{const A=L();return React.createElement("div",{className:A.filters},React.createElement(IconButton,{className:A.icon,"aria-label":"settings",onClick:z},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",P||0,")"))},S=(0,t.Z)(P=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:P.spacing(0,1,0,1)},dropdown:{width:"100%"}})),G=({filters:P,filterOptions:z,resetFilters:A,updateSelected:d,updateChecked:v})=>{const b=S();return React.createElement(Card,{className:b.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>A()},"CLEAR ALL")}),React.createElement(Divider,null),z.kind.length===0&&z.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),z.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:N=>{var ne;return d((ne=N==null?void 0:N.target)==null?void 0:ne.value)},variant:"outlined",className:b.dropdown,value:P.selected},z.kind.map(N=>React.createElement(MenuItem,{selected:N==="",dense:!0,key:N,value:N},N)))),z.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},z.lifecycle.map(N=>React.createElement(ListItem,{key:N,dense:!0,button:!0,onClick:()=>v(N)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:b.checkbox,color:"primary",checked:P.checked.includes(N),tabIndex:-1,value:N,name:N}),React.createElement(ListItemText,{id:N,primary:N}))))))};var B=e(1795),T=e(22313),x=e(42494),D=e(84899),U=e(5806),V=e(21324),X=e(56939),Ee=e(73698),Se=e(12231),Oe=e(86619),Ae=e(7089),Ke=e(88013),Ge=e(69294),Qe=e(48760);const We=(P,z,A=[],d=250)=>{const v=(0,n.useRef)({}),b=P||(()=>Promise.resolve([])),[N,ne]=(0,Ge.default)(b,[z],{loading:!0});if((0,Qe.Z)(()=>{v.current[z]===void 0&&(v.current[z]=ne(z).then(_=>(v.current[z]=_,_)))},d,[ne,z]),A.length)return{loading:!1,value:A};const re=v.current[z];return Array.isArray(re)?{loading:!1,value:re}:N},je=(P,z)=>{const{setFilters:A}=(0,T.Rx)();(0,n.useEffect)(()=>{z&&[z].flat().length>0&&A(d=>({...d,[P]:z}))},[])},it=P=>{const{className:z,defaultValue:A,name:d,values:v,valuesDebounceMs:b,label:N,filterSelectedOptions:ne,limitTags:re,multiple:_}=P,[fe,ge]=(0,n.useState)("");je(d,A);const Re=typeof v=="function"?v:void 0,we=typeof v=="function"?void 0:v,{value:He,loading:_e}=We(Re,fe,we,b),{filters:ke,setFilters:Rt}=(0,T.Rx)(),wt=ke[d]||(_?[]:null),Dt=(Tt,zt)=>{Rt(_t=>{const{[d]:Y,...pe}=_t;return zt?{...pe,[d]:zt}:{...pe}})},Kt=Tt=>n.createElement(Oe.Z,{...Tt,name:"search",variant:"outlined",label:N,fullWidth:!0}),mt=(Tt,zt)=>Tt.map((_t,Y)=>n.createElement(Ae.Z,{label:_t,color:"primary",...zt({index:Y})}));return n.createElement(Ke.ZP,{filterSelectedOptions:ne,limitTags:re,multiple:_,className:z,id:`${_?"multi-":""}select-filter-${d}--select`,options:He||[],loading:_e,value:wt,onChange:Dt,onInputChange:(Tt,zt)=>ge(zt),renderInput:Kt,renderTags:mt})},Ue=(0,t.Z)({label:{textTransform:"capitalize"}}),qe=P=>{const{className:z,defaultValue:A,label:d,name:v,values:b=[],valuesDebounceMs:N}=P,ne=Ue(),{filters:re,setFilters:_}=(0,T.Rx)();je(v,A);const fe=typeof b=="function"?b:void 0,ge=typeof b=="function"?void 0:b,{value:Re=[],loading:we}=We(fe,"",ge,N),He=_e=>{const{target:{value:ke,checked:Rt}}=_e;_(wt=>{const{[v]:Dt,...Kt}=wt,mt=(Dt||[]).filter(zt=>zt!==ke),Tt=Rt?[...mt,ke]:mt;return Tt.length?{...Kt,[v]:Tt}:Kt})};return n.createElement(x.Z,{className:z,disabled:we,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},d?n.createElement(D.Z,{className:ne.label},d):null,Re.map(_e=>{var ke;return n.createElement(U.Z,{key:_e,control:n.createElement(V.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":_e},value:_e,name:_e,onChange:He,checked:((ke=re[v])!=null?ke:[]).includes(_e)}),label:_e})}))},nt=P=>{const{className:z,defaultValue:A,label:d,name:v,values:b,valuesDebounceMs:N}=P,ne=Ue();je(v,A);const re=typeof b=="function"?b:void 0,_=typeof b=="function"?void 0:b,{value:fe=[],loading:ge}=We(re,"",_,N),{filters:Re,setFilters:we}=(0,T.Rx)(),He=_e=>{const{target:{value:ke}}=_e;we(Rt=>{const{[v]:wt,...Dt}=Rt;return ke?{...Dt,[v]:ke}:Dt})};return n.createElement(x.Z,{disabled:ge,className:z,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},d?n.createElement(X.Z,{className:ne.label,margin:"dense"},d):null,n.createElement(Ee.Z,{variant:"outlined",value:Re[v]||"",onChange:He},n.createElement(Se.Z,{value:""},n.createElement("em",null,"All")),fe.map(_e=>n.createElement(Se.Z,{key:_e,value:_e},_e))))},ut=({component:P,...z})=>n.createElement(P,{...z});ut.Checkbox=P=>n.createElement(ut,{...P,component:qe}),ut.Select=P=>n.createElement(ut,{...P,component:nt}),ut.Autocomplete=P=>n.createElement(ut,{...P,component:it});const dt=null;var ht=e(73032),et=e(3992),Xe=e(8542),vt=e(62155),ct=e(94339),St=e(32552),Ct=e(24579),yt=e(27616),Fe=e(8284),at=e(70660),lt=e(11776),Et=e(86136),rt=e(38016),gt=e(56881);const k=(0,t.Z)(P=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:P.spacing(1)},icon:{color:P.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:P.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:P.spacing(2,0),"&.Mui-expanded":{margin:P.spacing(2,0)}},accordionDetails:{padding:P.spacing(0,0,1)}})),$=P=>{const z=k(),{setPageCursor:A,setTypes:d,types:v}=(0,T.Rx)(),[b,N]=(0,n.useState)(!0),{defaultValue:ne,name:re,types:_}=P,fe=()=>N(He=>!He),ge=He=>()=>{d(He!==""?[He]:[]),A(void 0),N(!1)};(0,n.useEffect)(()=>{ne&&d([ne])},[]);const Re=[{value:"",name:"All",icon:n.createElement(gt.Z,null)},..._],we=v[0]||"";return n.createElement(ct.Z,{className:z.card},n.createElement(St.Z,{title:re,titleTypographyProps:{variant:"overline"}}),n.createElement(Ct.Z,{className:z.cardContent},n.createElement(yt.Z,{className:z.accordion,expanded:b,onChange:fe},n.createElement(Fe.Z,{classes:{root:z.accordionSummary,content:z.accordionSummaryContent},expandIcon:n.createElement(rt.Z,{className:z.icon}),IconButtonProps:{size:"small"}},b?"Collapse":Re.filter(He=>He.value===we)[0].name),n.createElement(at.Z,{classes:{root:z.accordionDetails}},n.createElement(lt.Z,{className:z.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},Re.map(He=>n.createElement(n.Fragment,{key:He.value},n.createElement(y.Z,null),n.createElement(m.Z,{selected:v[0]===He.value||v.length===0&&He.value==="",onClick:ge(He.value),button:!0},n.createElement(Et.Z,null,(0,n.cloneElement)(He.icon,{className:z.listItemIcon})),n.createElement(c.Z,{primary:He.name})))))))))};var ae=e(99152),ue=e(6487);const se=(0,t.Z)(P=>({tabs:{borderBottom:`1px solid ${P.palette.textVerySubtle}`,padding:P.spacing(0,4)},tab:{height:"50px",fontWeight:P.typography.fontWeightBold,fontSize:P.typography.pxToRem(13),color:P.palette.textSubtle,minWidth:"130px"}})),ye=P=>{const z=se(),{setPageCursor:A,setTypes:d,types:v}=(0,T.Rx)(),{defaultValue:b,types:N}=P,ne=(_,fe)=>{d(fe!==""?[fe]:[]),A(void 0)};(0,n.useEffect)(()=>{b&&d([b])},[]);const re=[{value:"",name:"All"},...N];return n.createElement(ae.Z,{className:z.tabs,indicatorColor:"primary",value:v.length===0?"":v[0],onChange:ne},re.map(_=>n.createElement(ue.Z,{className:z.tab,disableRipple:!0,label:_.name,value:_.value})))},Me=(0,t.Z)(P=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:P.spacing(1)},chip:{margin:2}})),Le=P=>{const{className:z,defaultValue:A,name:d,values:v=[]}=P,b=Me(),{types:N,setTypes:ne}=(0,T.Rx)();(0,vt.Z)(()=>{N.length||(A&&Array.isArray(A)?ne(A):A&&ne([A]))});const re=_=>{const fe=_.target.value;ne(fe)};return n.createElement(x.Z,{className:z,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},n.createElement(X.Z,{className:b.label,margin:"dense"},d),n.createElement(Ee.Z,{multiple:!0,variant:"outlined",value:N,onChange:re,placeholder:"All Results",renderValue:_=>n.createElement("div",{className:b.chips},_.map(fe=>n.createElement(Ae.Z,{key:fe,label:fe,className:b.chip,size:"small"})))},v.map(_=>n.createElement(Se.Z,{key:_,value:_},n.createElement(V.Z,{checked:N.indexOf(_)>-1}),n.createElement(c.Z,{primary:_})))))};Le.Accordion=P=>n.createElement($,{...P}),Le.Tabs=P=>n.createElement(ye,{...P});var ze=e(19126),K=e(20863),j=e(36964);const M=P=>{const z=useRouteRef(rootRouteRef),{focusContent:A}=useContent(),d=useNavigate(),v=useCallback(b=>{const N=qs.stringify({query:b},{addQueryPrefix:!0});A(),d(`${z()}${N}`)},[A,d,z]);return React.createElement(SidebarSearchField,{icon:P.icon,onSearch:v,to:"/search"})};var te=e(50581),me=e(61837),ve=e(4614),Te=e(21853),xe=e(10289);const ft=(0,t.Z)({root:{width:"100%"}}),At=P=>{const{entityId:z,debounceTime:A=150}=P,[d,v]=(0,n.useState)(!1),b=(0,xe.s0)(),{term:N,setTerm:ne,setFilters:re,result:{loading:_,value:fe}}=(0,T.Rx)(),ge=ft(),[Re,we]=(0,n.useState)([]);(0,n.useEffect)(()=>{let mt=!0;if(mt&&fe){const Tt=fe.results.slice(0,10);we(Tt)}return()=>{mt=!1}},[_,fe]);const[He,_e]=(0,n.useState)(N);(0,Qe.Z)(()=>ne(He),A,[He]);const{kind:ke,name:Rt,namespace:wt}=z;(0,n.useEffect)(()=>{re(mt=>({...mt,kind:ke,namespace:wt,name:Rt}))},[ke,wt,Rt,re]);const Dt=mt=>{d||v(!0),_e(mt.target.value)},Kt=(mt,Tt)=>{if(Tt==null?void 0:Tt.document){const{location:zt}=Tt.document;b(zt)}};return n.createElement(Ke.ZP,{classes:{root:ge.root},"data-testid":"techdocs-search-bar",size:"small",open:d,getOptionLabel:()=>"",filterOptions:mt=>mt,onClose:()=>{v(!1)},onFocus:()=>{v(!0)},onChange:Kt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Re,renderOption:({document:mt})=>n.createElement(E,{result:mt,lineClamp:3,asListItem:!1,asLink:!1,title:mt.title}),loading:_,renderInput:mt=>n.createElement(Oe.Z,{...mt,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${z.name} docs`,value:He,onChange:Dt,InputProps:{...mt.InputProps,startAdornment:n.createElement(te.Z,{position:"start"},n.createElement(me.Z,{"aria-label":"Query",disabled:!0},n.createElement(Te.Z,null))),endAdornment:n.createElement(n.Fragment,null,_?n.createElement(ve.Z,{color:"inherit",size:20}):null,mt.InputProps.endAdornment)}})})},le=P=>{const z={term:"",types:["techdocs"],pageCursor:"",filters:P.entityId};return n.createElement(T.Nd,{initialState:z},n.createElement(At,{...P}))}},98157:function(){},19133:function(q,s,e){"use strict";q.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(q,s,e){"use strict";q.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(q,s,e){"use strict";q.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(q,s,e){"use strict";q.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(q,s,e){"use strict";q.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(q){var s=function(n){return q(q.s=n)};q.O(0,[2370,6202,9284,2126,7012,9035,4983,5218,4736],function(){return s(88649),s(16119)});var e=q.O()}]);})();
443
+
444
+ //# sourceMappingURL=main.a81ffeda.js.map